-
Notifications
You must be signed in to change notification settings - Fork 250
Expand file tree
/
Copy pathextension_specifications.ts
More file actions
86 lines (81 loc) · 1.93 KB
/
extension_specifications.ts
File metadata and controls
86 lines (81 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import {gql} from 'graphql-request'
// eslint-disable-next-line @shopify/cli/no-inline-graphql
export const ExtensionSpecificationsQuery = gql`
query fetchSpecifications($apiKey: String!) {
extensionSpecifications(apiKey: $apiKey) {
name
externalName
externalIdentifier
identifier
gated
experience
options {
managementExperience
registrationLimit
}
features {
argo {
surface
}
}
validationSchema {
jsonSchema
}
}
}
`
export interface ExtensionSpecificationsQueryVariables {
apiKey: string
}
/**
* Raw shape returned by the GraphQL extensionSpecifications query (Partners API).
* Has nested `options` and `features` matching the query structure.
*/
export interface RawRemoteSpecification {
name: string
externalName: string
identifier: string
gated: boolean
externalIdentifier: string
experience: 'extension' | 'configuration' | 'deprecated'
options: {
managementExperience: 'cli' | 'custom' | 'dashboard'
registrationLimit: number
}
features?: {
argo?: {
surface: string
}
}
validationSchema?: {
jsonSchema: string
} | null
}
/**
* Flattened remote specification used throughout the CLI.
* Options are flattened to top-level fields to align with ExtensionSpecification.
*/
export interface RemoteSpecification {
name: string
externalName: string
identifier: string
gated: boolean
externalIdentifier: string
experience: 'extension' | 'configuration' | 'deprecated'
managementExperience: 'cli' | 'custom' | 'dashboard'
registrationLimit: number
uidIsClientProvided: boolean
uidStrategy?: 'single' | 'dynamic' | 'uuid'
surface?: string
features?: {
argo?: {
surface: string
}
}
validationSchema?: {
jsonSchema: string
} | null
}
export interface ExtensionSpecificationsQuerySchema {
extensionSpecifications: RawRemoteSpecification[]
}