@shopify/shop-minis-cli 0.0.38 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/.eslintrc.cjs +84 -0
  2. package/.vscode/extensions.json +3 -0
  3. package/.vscode/settings.json +8 -0
  4. package/.vscode/shop-minis-cli.code-workspace +8 -0
  5. package/build/commands/cancel-submission/index.d.ts +2 -0
  6. package/build/commands/cancel-submission/index.js +22 -0
  7. package/build/commands/cancel-submission/index.js.map +1 -0
  8. package/build/commands/cancel-submission/types.d.ts +3 -0
  9. package/build/commands/cancel-submission/types.js +2 -0
  10. package/build/commands/cancel-submission/types.js.map +1 -0
  11. package/build/commands/check-submission/index.d.ts +2 -0
  12. package/build/commands/check-submission/index.js +22 -0
  13. package/build/commands/check-submission/index.js.map +1 -0
  14. package/build/commands/check-submission/types.d.ts +3 -0
  15. package/build/commands/check-submission/types.js +2 -0
  16. package/build/commands/check-submission/types.js.map +1 -0
  17. package/build/commands/config.d.ts +10 -0
  18. package/build/commands/config.js +34 -0
  19. package/build/commands/config.js.map +1 -0
  20. package/build/commands/create-mini/index.js +38 -40
  21. package/build/commands/create-mini/index.js.map +1 -1
  22. package/build/commands/create-mini/utils/template-app.js +20 -25
  23. package/build/commands/create-mini/utils/template-app.js.map +1 -1
  24. package/build/commands/dev/index.js +13 -20
  25. package/build/commands/dev/index.js.map +1 -1
  26. package/build/commands/dev/utils/android.js +34 -48
  27. package/build/commands/dev/utils/android.js.map +1 -1
  28. package/build/commands/dev/utils/binaries.d.ts +1 -22
  29. package/build/commands/dev/utils/binaries.js +19 -98
  30. package/build/commands/dev/utils/binaries.js.map +1 -1
  31. package/build/commands/dev/utils/deeplink.d.ts +1 -1
  32. package/build/commands/dev/utils/deeplink.js +2 -7
  33. package/build/commands/dev/utils/deeplink.js.map +1 -1
  34. package/build/commands/dev/utils/interactive-terminal.d.ts +1 -1
  35. package/build/commands/dev/utils/interactive-terminal.js +46 -52
  36. package/build/commands/dev/utils/interactive-terminal.js.map +1 -1
  37. package/build/commands/dev/utils/metro/metro-config.js +19 -20
  38. package/build/commands/dev/utils/metro/metro-config.js.map +1 -1
  39. package/build/commands/dev/utils/metro/metro-reporter.d.ts +2 -3
  40. package/build/commands/dev/utils/metro/metro-reporter.js +7 -12
  41. package/build/commands/dev/utils/metro/metro-reporter.js.map +1 -1
  42. package/build/commands/dev/utils/metro/metro-server-middleware.js +5 -12
  43. package/build/commands/dev/utils/metro/metro-server-middleware.js.map +1 -1
  44. package/build/commands/dev/utils/metro/metro-server.d.ts +1 -1
  45. package/build/commands/dev/utils/metro/metro-server.js +6 -13
  46. package/build/commands/dev/utils/metro/metro-server.js.map +1 -1
  47. package/build/commands/dev/utils/network.d.ts +20 -0
  48. package/build/commands/dev/utils/network.js +62 -0
  49. package/build/commands/dev/utils/network.js.map +1 -0
  50. package/build/commands/dev/utils/qr-code.js +3 -10
  51. package/build/commands/dev/utils/qr-code.js.map +1 -1
  52. package/build/commands/dev/utils/simulator.js +25 -35
  53. package/build/commands/dev/utils/simulator.js.map +1 -1
  54. package/build/commands/dev/utils/types.d.ts +1 -0
  55. package/build/commands/dev/utils/types.js +2 -0
  56. package/build/commands/dev/utils/types.js.map +1 -0
  57. package/build/commands/dev/utils/with-retries.js +1 -5
  58. package/build/commands/dev/utils/with-retries.js.map +1 -1
  59. package/build/commands/generate-graphql-types/index.js +25 -26
  60. package/build/commands/generate-graphql-types/index.js.map +1 -1
  61. package/build/commands/schemas/contextual-image.schema.d.ts +22 -0
  62. package/build/commands/schemas/contextual-image.schema.js +23 -0
  63. package/build/commands/schemas/contextual-image.schema.js.map +1 -0
  64. package/build/commands/schemas/contextual-object.schema.d.ts +18 -0
  65. package/build/commands/schemas/contextual-object.schema.js +19 -0
  66. package/build/commands/schemas/contextual-object.schema.js.map +1 -0
  67. package/build/commands/schemas/manifest.schema.d.ts +181 -0
  68. package/build/commands/schemas/manifest.schema.js +230 -0
  69. package/build/commands/schemas/manifest.schema.js.map +1 -0
  70. package/build/commands/schemas/visibility.schema.d.ts +18 -0
  71. package/build/commands/schemas/visibility.schema.js +19 -0
  72. package/build/commands/schemas/visibility.schema.js.map +1 -0
  73. package/build/commands/submit/config.d.ts +9 -0
  74. package/build/commands/submit/config.js +18 -0
  75. package/build/commands/submit/config.js.map +1 -0
  76. package/build/commands/submit/errors.d.ts +19 -0
  77. package/build/commands/submit/errors.js +87 -0
  78. package/build/commands/submit/errors.js.map +1 -0
  79. package/build/commands/submit/gcs.d.ts +6 -0
  80. package/build/commands/submit/gcs.js +10 -0
  81. package/build/commands/submit/gcs.js.map +1 -0
  82. package/build/commands/submit/graphql.d.ts +73 -0
  83. package/build/commands/submit/graphql.js +100 -0
  84. package/build/commands/submit/graphql.js.map +1 -0
  85. package/build/commands/submit/index.d.ts +2 -0
  86. package/build/commands/submit/index.js +21 -0
  87. package/build/commands/submit/index.js.map +1 -0
  88. package/build/commands/submit/submit.d.ts +4 -0
  89. package/build/commands/submit/submit.js +171 -0
  90. package/build/commands/submit/submit.js.map +1 -0
  91. package/build/commands/submit/tasks.d.ts +39 -0
  92. package/build/commands/submit/tasks.js +167 -0
  93. package/build/commands/submit/tasks.js.map +1 -0
  94. package/build/commands/submit/types.d.ts +14 -0
  95. package/build/commands/submit/types.js +2 -0
  96. package/build/commands/submit/types.js.map +1 -0
  97. package/build/commands/submit/validation.d.ts +2 -0
  98. package/build/commands/submit/validation.js +14 -0
  99. package/build/commands/submit/validation.js.map +1 -0
  100. package/build/commands/types/autogenerated/shop-minis-admin-api/fragment-masking.d.ts +13 -0
  101. package/build/commands/types/autogenerated/shop-minis-admin-api/fragment-masking.js +7 -0
  102. package/build/commands/types/autogenerated/shop-minis-admin-api/fragment-masking.js.map +1 -0
  103. package/build/commands/types/autogenerated/shop-minis-admin-api/gql.d.ts +54 -0
  104. package/build/commands/types/autogenerated/shop-minis-admin-api/gql.js +21 -0
  105. package/build/commands/types/autogenerated/shop-minis-admin-api/gql.js.map +1 -0
  106. package/build/commands/types/autogenerated/shop-minis-admin-api/graphql.d.ts +613 -0
  107. package/build/commands/types/autogenerated/shop-minis-admin-api/graphql.js +427 -0
  108. package/build/commands/types/autogenerated/shop-minis-admin-api/graphql.js.map +1 -0
  109. package/build/commands/types/autogenerated/shop-minis-admin-api/index.d.ts +2 -0
  110. package/build/commands/types/autogenerated/shop-minis-admin-api/index.js +3 -0
  111. package/build/commands/types/autogenerated/shop-minis-admin-api/index.js.map +1 -0
  112. package/build/commands/types/helpers.d.ts +1 -0
  113. package/build/commands/types/helpers.js +2 -0
  114. package/build/commands/types/helpers.js.map +1 -0
  115. package/build/commands/utils/archive.d.ts +30 -0
  116. package/build/commands/utils/archive.js +38 -0
  117. package/build/commands/utils/archive.js.map +1 -0
  118. package/build/commands/utils/exec-async-child-process.d.ts +1 -1
  119. package/build/commands/utils/exec-async-child-process.js +6 -13
  120. package/build/commands/utils/exec-async-child-process.js.map +1 -1
  121. package/build/commands/utils/file.d.ts +1 -0
  122. package/build/commands/utils/file.js +7 -0
  123. package/build/commands/utils/file.js.map +1 -0
  124. package/build/commands/{check/utils/manifest.d.ts → utils/minis-manifest.d.ts} +1 -0
  125. package/build/commands/utils/minis-manifest.js +42 -0
  126. package/build/commands/utils/minis-manifest.js.map +1 -0
  127. package/build/commands/utils/wrap-with-loading-indicator.js +3 -10
  128. package/build/commands/utils/wrap-with-loading-indicator.js.map +1 -1
  129. package/build/dev-panel/middleware.js +5 -10
  130. package/build/dev-panel/middleware.js.map +1 -1
  131. package/build/index.js +15 -13
  132. package/build/index.js.map +1 -1
  133. package/jest.config.ts +11 -0
  134. package/package.json +4 -7
  135. package/scripts/graphql-codegen.ts +23 -0
  136. package/templates/__template_common/.eslintrc.json +2 -119
  137. package/templates/__template_common/gitignore +1 -0
  138. package/templates/__template_common/package.json +8 -7
  139. package/templates/__template_common/src/manifest.json +1 -0
  140. package/templates/__template_hello_world/src/screens/BottomSheetScreen.tsx +6 -5
  141. package/templates/__template_hello_world/src/screens/QuizScreen.tsx +2 -2
  142. package/templates/__template_hello_world/src/screens/QuizSlideScreen.tsx +2 -2
  143. package/build/commands/check/index.d.ts +0 -6
  144. package/build/commands/check/index.js +0 -87
  145. package/build/commands/check/index.js.map +0 -1
  146. package/build/commands/check/utils/manifest.js +0 -26
  147. package/build/commands/check/utils/manifest.js.map +0 -1
  148. package/build/commands/check/utils/schemas/contextual-image.schema.json +0 -21
  149. package/build/commands/check/utils/schemas/contextual-object.schema.json +0 -17
  150. package/build/commands/check/utils/schemas/manifest.schema.json +0 -226
  151. package/build/commands/check/utils/schemas/visibility.schema.json +0 -17
  152. package/build/commands/check/utils/versions.d.ts +0 -1
  153. package/build/commands/check/utils/versions.js +0 -14
  154. package/build/commands/check/utils/versions.js.map +0 -1
  155. package/build/commands/dev/utils/binaries.test.d.ts +0 -1
  156. package/build/commands/dev/utils/binaries.test.js +0 -275
  157. package/build/commands/dev/utils/binaries.test.js.map +0 -1
  158. package/build/commands/dev/utils/minis-manifest.d.ts +0 -1
  159. package/build/commands/dev/utils/minis-manifest.js +0 -24
  160. package/build/commands/dev/utils/minis-manifest.js.map +0 -1
  161. package/templates/__template_hello_world/src/utils/getFlagEmoji.spec.tsx +0 -19
@@ -0,0 +1,613 @@
1
+ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
2
+ export type Maybe<T> = T | null;
3
+ export type InputMaybe<T> = Maybe<T>;
4
+ export type Exact<T extends {
5
+ [key: string]: unknown;
6
+ }> = {
7
+ [K in keyof T]: T[K];
8
+ };
9
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
10
+ [SubKey in K]?: Maybe<T[SubKey]>;
11
+ };
12
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
13
+ [SubKey in K]: Maybe<T[SubKey]>;
14
+ };
15
+ /** All built-in and custom scalars, mapped to their actual values */
16
+ export type Scalars = {
17
+ ID: string;
18
+ String: string;
19
+ Boolean: boolean;
20
+ Int: number;
21
+ Float: number;
22
+ /** An ISO 8601-encoded datetime */
23
+ ISO8601DateTime: any;
24
+ /**
25
+ * Represents an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and [RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string.
26
+ *
27
+ * For example, `"https://johns-apparel.myshopify.com"` is a valid URL. It includes a scheme (`https`) and a host (`johns-apparel.myshopify.com`).
28
+ *
29
+ */
30
+ URL: any;
31
+ };
32
+ /** Represents attribution details for a line item in an order. */
33
+ export type Attribution = {
34
+ __typename?: 'Attribution';
35
+ /** The fields associated with this attribution. */
36
+ fields: Array<AttributionField>;
37
+ /** The LineItem ID associated with this attribution. */
38
+ lineItemId: Scalars['ID'];
39
+ /** The Order ID associated with this attribution. */
40
+ orderId: Scalars['ID'];
41
+ /** The Shop domain ({store_name}.myshopify.com) associated with this attribution. */
42
+ shopDomain: Scalars['String'];
43
+ /**
44
+ * The Shop ID associated with this attribution.
45
+ * @deprecated DEPRECATED - Please use shopDomain instead.
46
+ */
47
+ shopId: Scalars['ID'];
48
+ };
49
+ /** The connection type for Attribution. */
50
+ export type AttributionConnection = {
51
+ __typename?: 'AttributionConnection';
52
+ /** A list of edges. */
53
+ edges: Array<AttributionEdge>;
54
+ /** A list of nodes. */
55
+ nodes: Array<Attribution>;
56
+ /** Information to aid in pagination. */
57
+ pageInfo: PageInfo;
58
+ };
59
+ /** An edge in a connection. */
60
+ export type AttributionEdge = {
61
+ __typename?: 'AttributionEdge';
62
+ /** A cursor for use in pagination. */
63
+ cursor: Scalars['String'];
64
+ /** The item at the end of the edge. */
65
+ node?: Maybe<Attribution>;
66
+ };
67
+ /** Represents a single attribution detail. */
68
+ export type AttributionField = {
69
+ __typename?: 'AttributionField';
70
+ /** The key of the field. */
71
+ key: Scalars['String'];
72
+ /** The value of the field. */
73
+ value: Scalars['String'];
74
+ };
75
+ /** The information needed to create a new call to action entry point. */
76
+ export type CallToActionEntryPointSetInput = {
77
+ /** The text of the call to action. */
78
+ text: Scalars['String'];
79
+ };
80
+ /** Represents the entry points debug object. */
81
+ export type EntryPointDebug = {
82
+ __typename?: 'EntryPointDebug';
83
+ /** Whether the entry point is available or not. */
84
+ available: Scalars['Boolean'];
85
+ /** The fields of the entry points. */
86
+ fields: Array<EntryPointField>;
87
+ /** The issues with the entry point. */
88
+ issues: Array<Scalars['String']>;
89
+ };
90
+ /** The event status enum for an entry point. */
91
+ export declare enum EntryPointEventStatus {
92
+ /** The active status for Mini entry point event type. */
93
+ Active = "ACTIVE",
94
+ /** The post active status for Mini entry point event type. */
95
+ PostActive = "POST_ACTIVE",
96
+ /** The pre active status for Mini entry point event type. */
97
+ PreActive = "PRE_ACTIVE"
98
+ }
99
+ /** Return type for the `entryPointEventStatusUpdate` mutation. */
100
+ export type EntryPointEventStatusUpdatePayload = {
101
+ __typename?: 'EntryPointEventStatusUpdatePayload';
102
+ /** List of errors that occured while executing the mutation. */
103
+ userErrors: Array<EntryPointEventStatusUpdateUserError>;
104
+ };
105
+ /** A user or client error that could occur during the execution of the `entryPointEventStatusUpdate` mutation. */
106
+ export type EntryPointEventStatusUpdateUserError = {
107
+ __typename?: 'EntryPointEventStatusUpdateUserError';
108
+ /** Error code associated with the error. */
109
+ code: EntryPointEventStatusUpdateUserErrorCode;
110
+ /** Which input value this error came from. */
111
+ field?: Maybe<Array<Scalars['String']>>;
112
+ /** A description of the error. */
113
+ message: Scalars['String'];
114
+ };
115
+ /** Possible error codes that can be returned by EntryPointEventStatusUpdateUserError. */
116
+ export declare enum EntryPointEventStatusUpdateUserErrorCode {
117
+ /** Error code when the product is not found. */
118
+ ProductNotFound = "PRODUCT_NOT_FOUND",
119
+ /** Error code when the shop is not found. */
120
+ ShopNotFound = "SHOP_NOT_FOUND"
121
+ }
122
+ /** Represents fields from the entry point on the relevant resource. */
123
+ export type EntryPointField = {
124
+ __typename?: 'EntryPointField';
125
+ /** Name of the field. */
126
+ name: Scalars['String'];
127
+ /** Value of the field. */
128
+ value: Scalars['String'];
129
+ };
130
+ /** The entry point location of a Mini. */
131
+ export declare enum EntryPointLocation {
132
+ /** The Mini should be displayed on the product page. */
133
+ ProductPage = "PRODUCT_PAGE",
134
+ /** The Mini should be displayed on the store page. */
135
+ StorePage = "STORE_PAGE"
136
+ }
137
+ /** The information needed to create a new entry point. */
138
+ export type EntryPointSetInput = {
139
+ /** The call to action entry point set input. */
140
+ callToActionSetInput?: InputMaybe<CallToActionEntryPointSetInput>;
141
+ /** The image content card entry point set input. */
142
+ imageContentCardSetInput?: InputMaybe<ImageContentCardEntryPointSetInput>;
143
+ };
144
+ /** Return type for the `entryPointSet` mutation. */
145
+ export type EntryPointSetPayload = {
146
+ __typename?: 'EntryPointSetPayload';
147
+ /** List of errors that occured while executing the mutation. */
148
+ userErrors: Array<EntryPointSetUserError>;
149
+ };
150
+ /** A user or client error that could occur during the execution of the `entryPointSet` mutation. */
151
+ export type EntryPointSetUserError = {
152
+ __typename?: 'EntryPointSetUserError';
153
+ /** Error code associated with the error. */
154
+ code: EntryPointSetUserErrorCode;
155
+ /** Which input value this error came from. */
156
+ field?: Maybe<Array<Scalars['String']>>;
157
+ /** A description of the error. */
158
+ message: Scalars['String'];
159
+ };
160
+ /** Possible error codes that can be returned by EntryPointSetUserError. */
161
+ export declare enum EntryPointSetUserErrorCode {
162
+ /** Error code when the entry point definition is not found from the manifest. */
163
+ DefinitionNotFound = "DEFINITION_NOT_FOUND",
164
+ /** Error code when the shop is not eligible for Shop Minis. */
165
+ ShopNotEligible = "SHOP_NOT_ELIGIBLE",
166
+ /** Error code when the shop is not found. */
167
+ ShopNotFound = "SHOP_NOT_FOUND"
168
+ }
169
+ /** Represents the validity of an entry point visibility rule. */
170
+ export type EntryPointVisibilityRuleValidity = {
171
+ __typename?: 'EntryPointVisibilityRuleValidity';
172
+ /** The validity status of the rule. */
173
+ status: EntryPointVisibilityRuleValidityStatus;
174
+ /** The errors that occurred when validating the rule. */
175
+ userErrors: Array<EntryPointVisibilityRuleValidityUserError>;
176
+ };
177
+ /** The error code for an entry point visibility rule error. */
178
+ export declare enum EntryPointVisibilityRuleValidityErrorCode {
179
+ /** Rules cannot be applied to all fields. Please specify the field name. */
180
+ FieldsUnspecified = "FIELDS_UNSPECIFIED",
181
+ /** Incompatible comparator found for the given fields. */
182
+ IncompatibleComparators = "INCOMPATIBLE_COMPARATORS",
183
+ /** Incompatible values given to the fields. Please refer to https://shopify.dev/api/usage/search-syntax for more information. */
184
+ IncompatibleQueryTypes = "INCOMPATIBLE_QUERY_TYPES",
185
+ /** Rule is not parseable. Please refer to https://shopify.dev/api/usage/search-syntax for more information. */
186
+ IncorrectSyntax = "INCORRECT_SYNTAX",
187
+ /** Unsupported fields given. Please refer to https://github.com/Shopify/shop-minis/blob/main/docs/ENTRY_POINT_VISIBILITY_RULE_FOR_PRODUCT_DETAILS_PAGES.md for more information. */
188
+ UnsupportedFields = "UNSUPPORTED_FIELDS"
189
+ }
190
+ /** The validity status of an entry point visibility rule. */
191
+ export declare enum EntryPointVisibilityRuleValidityStatus {
192
+ /** The rule is not valid. */
193
+ Invalid = "INVALID",
194
+ /** The rule is valid. */
195
+ Valid = "VALID"
196
+ }
197
+ /** An error that occurred when validating an entry point visibility rule. */
198
+ export type EntryPointVisibilityRuleValidityUserError = {
199
+ __typename?: 'EntryPointVisibilityRuleValidityUserError';
200
+ /** The code of the error that occurred. */
201
+ code: EntryPointVisibilityRuleValidityErrorCode;
202
+ /** The path to the field that the error occurred on. */
203
+ field: Array<Scalars['String']>;
204
+ /** The message describing the error. */
205
+ message: Scalars['String'];
206
+ };
207
+ /** The information needed to create a new image content card entry point. */
208
+ export type ImageContentCardEntryPointSetInput = {
209
+ /** The images of the image content card. */
210
+ images: Array<ImageInput>;
211
+ /** The subtitle of the image content card. */
212
+ subtitle?: InputMaybe<Scalars['String']>;
213
+ /** The title of the image content card. */
214
+ title: Scalars['String'];
215
+ };
216
+ /** The information needed to create a new image. */
217
+ export type ImageInput = {
218
+ /** The URL of the image. */
219
+ url: Scalars['URL'];
220
+ };
221
+ export type Mutation = {
222
+ __typename?: 'Mutation';
223
+ /** Updates the status of an event entry point. */
224
+ entryPointEventStatusUpdate: EntryPointEventStatusUpdatePayload;
225
+ /** Creates or updates an entry point. */
226
+ entryPointSet: EntryPointSetPayload;
227
+ /** Triggers a notification. */
228
+ notificationTrigger: NotificationTriggerPayload;
229
+ /** Cancels a pending submission. */
230
+ submissionCancel: SubmissionCancelPayload;
231
+ /** Creates a new submission. */
232
+ submissionCreate: SubmissionCreatePayload;
233
+ /** Creates a new staged upload for a submission. */
234
+ submissionUploadCreate: SubmissionUploadCreatePayload;
235
+ };
236
+ export type MutationEntryPointEventStatusUpdateArgs = {
237
+ productId?: InputMaybe<Scalars['ID']>;
238
+ shopDomain?: InputMaybe<Scalars['String']>;
239
+ status: EntryPointEventStatus;
240
+ };
241
+ export type MutationEntryPointSetArgs = {
242
+ entryPointSetInput: EntryPointSetInput;
243
+ location: EntryPointLocation;
244
+ productId?: InputMaybe<Scalars['ID']>;
245
+ shopDomain: Scalars['String'];
246
+ };
247
+ export type MutationNotificationTriggerArgs = {
248
+ scopedEntityId: Scalars['ID'];
249
+ shopDomain?: InputMaybe<Scalars['String']>;
250
+ templateHandle: Scalars['String'];
251
+ };
252
+ export type MutationSubmissionCancelArgs = {
253
+ reference: Scalars['String'];
254
+ };
255
+ export type MutationSubmissionCreateArgs = {
256
+ description: Scalars['String'];
257
+ uploadId: Scalars['ID'];
258
+ };
259
+ export type MutationSubmissionUploadCreateArgs = {
260
+ input: StagedUploadInput;
261
+ };
262
+ /** Return type for the `notificationTrigger` mutation. */
263
+ export type NotificationTriggerPayload = {
264
+ __typename?: 'NotificationTriggerPayload';
265
+ /** List of errors that occured while executing the mutation. */
266
+ userErrors: Array<NotificationTriggerUserError>;
267
+ /** The warnings related to the notification trigger. */
268
+ warnings?: Maybe<Array<Warning>>;
269
+ };
270
+ /** A user or client error that could occur during the execution of the `notificationTrigger` mutation. */
271
+ export type NotificationTriggerUserError = {
272
+ __typename?: 'NotificationTriggerUserError';
273
+ /** Error code associated with the error. */
274
+ code: NotificationTriggerUserErrorCode;
275
+ /** Which input value this error came from. */
276
+ field?: Maybe<Array<Scalars['String']>>;
277
+ /** A description of the error. */
278
+ message: Scalars['String'];
279
+ };
280
+ /** Possible error codes that can be returned by NotificationTriggerUserError. */
281
+ export declare enum NotificationTriggerUserErrorCode {
282
+ /** Error code when the scoped entity is not found. */
283
+ ScopedEntityNotFound = "SCOPED_ENTITY_NOT_FOUND",
284
+ /** Error code when the shop is not found. */
285
+ ShopNotFound = "SHOP_NOT_FOUND",
286
+ /** Error code when the template handle is not found in the Mini's manifest. */
287
+ TemplateNotFound = "TEMPLATE_NOT_FOUND",
288
+ /** Error code when the template's topic_handle is invalid. */
289
+ TopicNotFound = "TOPIC_NOT_FOUND",
290
+ /** Error code when scopedEntityId object does not match topic scope. */
291
+ TopicScopeNotMatchingEntity = "TOPIC_SCOPE_NOT_MATCHING_ENTITY"
292
+ }
293
+ /** Information about pagination in a connection. */
294
+ export type PageInfo = {
295
+ __typename?: 'PageInfo';
296
+ /** When paginating forwards, the cursor to continue. */
297
+ endCursor?: Maybe<Scalars['String']>;
298
+ /** When paginating forwards, are there more items? */
299
+ hasNextPage: Scalars['Boolean'];
300
+ /** When paginating backwards, are there more items? */
301
+ hasPreviousPage: Scalars['Boolean'];
302
+ /** When paginating backwards, the cursor to continue. */
303
+ startCursor?: Maybe<Scalars['String']>;
304
+ };
305
+ /** Represents the eligibility of a product within Shop. */
306
+ export type ProductEligibility = {
307
+ __typename?: 'ProductEligibility';
308
+ /** The ID of the product. */
309
+ productId: Scalars['ID'];
310
+ /** The eligibility status of the product. */
311
+ status: ProductEligibilityStatus;
312
+ };
313
+ /** The eligibility status of a product. */
314
+ export declare enum ProductEligibilityStatus {
315
+ /** The product is eligible to appear in Shop. */
316
+ Eligible = "ELIGIBLE",
317
+ /** The product is ineligible to appear in Shop. */
318
+ Ineligible = "INELIGIBLE"
319
+ }
320
+ export type Query = {
321
+ __typename?: 'Query';
322
+ /** Returns attributions for orders made through a Mini within Shop. */
323
+ attributions: AttributionConnection;
324
+ /** Returns entry point debug information for a given shop and product. */
325
+ entryPointDebug: Array<EntryPointDebug>;
326
+ /** Returns whether a given entry point visibility rule is valid. */
327
+ entryPointVisibilityRuleValidity: EntryPointVisibilityRuleValidity;
328
+ /** Returns eligibilities for products within Shop. */
329
+ productEligibilities: Array<ProductEligibility>;
330
+ /** Returns eligibilities for shops within Shop. */
331
+ shopEligibilities: Array<ShopEligibility>;
332
+ /** Returns submissions for the Shop Mini. */
333
+ submissions: SubmissionConnection;
334
+ };
335
+ export type QueryAttributionsArgs = {
336
+ after?: InputMaybe<Scalars['String']>;
337
+ before?: InputMaybe<Scalars['String']>;
338
+ first?: InputMaybe<Scalars['Int']>;
339
+ last?: InputMaybe<Scalars['Int']>;
340
+ orderId?: InputMaybe<Scalars['ID']>;
341
+ shopDomain?: InputMaybe<Scalars['String']>;
342
+ };
343
+ export type QueryEntryPointDebugArgs = {
344
+ productId?: InputMaybe<Scalars['ID']>;
345
+ shopDomain?: InputMaybe<Scalars['String']>;
346
+ };
347
+ export type QueryEntryPointVisibilityRuleValidityArgs = {
348
+ rule: Scalars['String'];
349
+ };
350
+ export type QueryProductEligibilitiesArgs = {
351
+ productIds: Array<Scalars['ID']>;
352
+ };
353
+ export type QueryShopEligibilitiesArgs = {
354
+ shopDomains?: InputMaybe<Array<Scalars['String']>>;
355
+ };
356
+ export type QuerySubmissionsArgs = {
357
+ after?: InputMaybe<Scalars['String']>;
358
+ before?: InputMaybe<Scalars['String']>;
359
+ first?: InputMaybe<Scalars['Int']>;
360
+ last?: InputMaybe<Scalars['Int']>;
361
+ };
362
+ /** Represents the eligibility of a shop within Shop. */
363
+ export type ShopEligibility = {
364
+ __typename?: 'ShopEligibility';
365
+ /** The domain of the shop. */
366
+ shopDomain?: Maybe<Scalars['String']>;
367
+ /**
368
+ * The ID of the shop.
369
+ * @deprecated DEPRECATED - Please use shopDomain instead.
370
+ */
371
+ shopId?: Maybe<Scalars['ID']>;
372
+ /** The eligibility status of the shop. */
373
+ status: ShopEligibilityStatus;
374
+ };
375
+ /** The eligibility status of a shop. */
376
+ export declare enum ShopEligibilityStatus {
377
+ /** The shop is eligible to appear in Shop. */
378
+ Eligible = "ELIGIBLE",
379
+ /** The shop is ineligible to appear in Shop. */
380
+ Ineligible = "INELIGIBLE"
381
+ }
382
+ /** A staged upload where the file can be uploaded to and an id to identify it. */
383
+ export type StagedUpload = {
384
+ __typename?: 'StagedUpload';
385
+ /** The headers to send with the upload request. */
386
+ headers: Scalars['String'];
387
+ /** The ID of the staged upload. */
388
+ id: Scalars['ID'];
389
+ /** The URL to upload the file to. */
390
+ url: Scalars['URL'];
391
+ };
392
+ /** The information needed to create a new staged upload. */
393
+ export type StagedUploadInput = {
394
+ /** The base64-encoded md5 hash of the file contents. */
395
+ checksum: Scalars['String'];
396
+ /** The size of the file in bytes. */
397
+ fileSize: Scalars['Int'];
398
+ /** The name of the file. */
399
+ filename: Scalars['String'];
400
+ /** The MIME of the file. */
401
+ mimeType: Scalars['String'];
402
+ };
403
+ /** A submission for a Shop Mini. */
404
+ export type Submission = {
405
+ __typename?: 'Submission';
406
+ /** A description of the Shop Mini and any changes since the last released version. */
407
+ description: Scalars['String'];
408
+ /** The unique reference for the submission. */
409
+ reference: Scalars['String'];
410
+ /** The status of the submission. */
411
+ status: SubmissionStatus;
412
+ /** The date and time the submission was submitted. */
413
+ submittedAt: Scalars['ISO8601DateTime'];
414
+ };
415
+ /** Return type for the `submissionCancel` mutation. */
416
+ export type SubmissionCancelPayload = {
417
+ __typename?: 'SubmissionCancelPayload';
418
+ /** The cancelled submission. */
419
+ submission?: Maybe<Submission>;
420
+ /** List of errors that occured while executing the mutation. */
421
+ userErrors: Array<SubmissionCancelUserError>;
422
+ };
423
+ /** A user or client error that could occur during the execution of the `submissionCancel` mutation. */
424
+ export type SubmissionCancelUserError = {
425
+ __typename?: 'SubmissionCancelUserError';
426
+ /** Error code associated with the error. */
427
+ code: SubmissionCancelUserErrorCode;
428
+ /** Which input value this error came from. */
429
+ field?: Maybe<Array<Scalars['String']>>;
430
+ /** A description of the error. */
431
+ message: Scalars['String'];
432
+ };
433
+ /** Possible error codes that can be returned by SubmissionCancelUserError. */
434
+ export declare enum SubmissionCancelUserErrorCode {
435
+ /** Error code when the submission is not found. */
436
+ NotFound = "NOT_FOUND",
437
+ /** Error code when the submission does not have a pending status. */
438
+ NotPending = "NOT_PENDING"
439
+ }
440
+ /** The connection type for Submission. */
441
+ export type SubmissionConnection = {
442
+ __typename?: 'SubmissionConnection';
443
+ /** A list of edges. */
444
+ edges: Array<SubmissionEdge>;
445
+ /** A list of nodes. */
446
+ nodes: Array<Submission>;
447
+ /** Information to aid in pagination. */
448
+ pageInfo: PageInfo;
449
+ };
450
+ /** Return type for the `submissionCreate` mutation. */
451
+ export type SubmissionCreatePayload = {
452
+ __typename?: 'SubmissionCreatePayload';
453
+ /** The submission that was created. */
454
+ submission?: Maybe<Submission>;
455
+ /** List of errors that occured while executing the mutation. */
456
+ userErrors: Array<SubmissionCreateUserError>;
457
+ };
458
+ /** A user or client error that could occur during the execution of the `submissionCreate` mutation. */
459
+ export type SubmissionCreateUserError = {
460
+ __typename?: 'SubmissionCreateUserError';
461
+ /** Error code associated with the error. */
462
+ code: SubmissionCreateUserErrorCode;
463
+ /** Which input value this error came from. */
464
+ field?: Maybe<Array<Scalars['String']>>;
465
+ /** A description of the error. */
466
+ message: Scalars['String'];
467
+ };
468
+ /** Possible error codes that can be returned by SubmissionCreateUserError. */
469
+ export declare enum SubmissionCreateUserErrorCode {
470
+ /** Error code when there is already a pending submission. */
471
+ AlreadyPendingSubmission = "ALREADY_PENDING_SUBMISSION",
472
+ /** Error code when the file does not exist in the storage service. */
473
+ FileNotFound = "FILE_NOT_FOUND",
474
+ /** Error code when the upload ID is not valid. Either it is does not point to a blob or is not signed correctly. */
475
+ UploadNotFound = "UPLOAD_NOT_FOUND"
476
+ }
477
+ /** An edge in a connection. */
478
+ export type SubmissionEdge = {
479
+ __typename?: 'SubmissionEdge';
480
+ /** A cursor for use in pagination. */
481
+ cursor: Scalars['String'];
482
+ /** The item at the end of the edge. */
483
+ node?: Maybe<Submission>;
484
+ };
485
+ /** The status of a submission. */
486
+ export declare enum SubmissionStatus {
487
+ /** The submission has been approved. */
488
+ Approved = "APPROVED",
489
+ /** The submission has been cancelled. */
490
+ Cancelled = "CANCELLED",
491
+ /** The submission is pending review. */
492
+ Pending = "PENDING",
493
+ /** The submission has been rejected. */
494
+ Rejected = "REJECTED"
495
+ }
496
+ /** Return type for the `submissionUploadCreate` mutation. */
497
+ export type SubmissionUploadCreatePayload = {
498
+ __typename?: 'SubmissionUploadCreatePayload';
499
+ /** The staged upload that was created. */
500
+ upload?: Maybe<StagedUpload>;
501
+ /** List of errors that occured while executing the mutation. */
502
+ userErrors: Array<SubmissionUploadCreateUserError>;
503
+ };
504
+ /** A user or client error that could occur during the execution of the `submissionUploadCreate` mutation. */
505
+ export type SubmissionUploadCreateUserError = {
506
+ __typename?: 'SubmissionUploadCreateUserError';
507
+ /** Error code associated with the error. */
508
+ code: SubmissionUploadCreateUserErrorCode;
509
+ /** Which input value this error came from. */
510
+ field?: Maybe<Array<Scalars['String']>>;
511
+ /** A description of the error. */
512
+ message: Scalars['String'];
513
+ };
514
+ /** Possible error codes that can be returned by SubmissionUploadCreateUserError. */
515
+ export declare enum SubmissionUploadCreateUserErrorCode {
516
+ /** Error code when an invalid checksum is provided. */
517
+ InvalidChecksum = "INVALID_CHECKSUM",
518
+ /** Error code when the file size is less than 0 or exceeds 1048576 bytes. */
519
+ InvalidFileSize = "INVALID_FILE_SIZE",
520
+ /** Error code when an invalid MIME type is provided. */
521
+ InvalidMimeType = "INVALID_MIME_TYPE"
522
+ }
523
+ /** Informs API user about non critical casualties during the execution of a query or a mutation. */
524
+ export type Warning = {
525
+ __typename?: 'Warning';
526
+ /** Text identifier of the warning. */
527
+ code: Scalars['String'];
528
+ /** Description of the warning. */
529
+ message: Scalars['String'];
530
+ };
531
+ export type CreateUploadMutationVariables = Exact<{
532
+ filename: Scalars['String'];
533
+ fileSize: Scalars['Int'];
534
+ checksum: Scalars['String'];
535
+ mimeType: Scalars['String'];
536
+ }>;
537
+ export type CreateUploadMutation = {
538
+ __typename?: 'Mutation';
539
+ submissionUploadCreate: {
540
+ __typename?: 'SubmissionUploadCreatePayload';
541
+ upload?: {
542
+ __typename?: 'StagedUpload';
543
+ url: any;
544
+ headers: string;
545
+ id: string;
546
+ } | null;
547
+ userErrors: Array<{
548
+ __typename?: 'SubmissionUploadCreateUserError';
549
+ code: SubmissionUploadCreateUserErrorCode;
550
+ message: string;
551
+ field?: Array<string> | null;
552
+ }>;
553
+ };
554
+ };
555
+ export type CreateSubmissionMutationVariables = Exact<{
556
+ description: Scalars['String'];
557
+ uploadId: Scalars['ID'];
558
+ }>;
559
+ export type CreateSubmissionMutation = {
560
+ __typename?: 'Mutation';
561
+ submissionCreate: {
562
+ __typename?: 'SubmissionCreatePayload';
563
+ submission?: {
564
+ __typename?: 'Submission';
565
+ reference: string;
566
+ description: string;
567
+ status: SubmissionStatus;
568
+ submittedAt: any;
569
+ } | null;
570
+ userErrors: Array<{
571
+ __typename?: 'SubmissionCreateUserError';
572
+ code: SubmissionCreateUserErrorCode;
573
+ message: string;
574
+ field?: Array<string> | null;
575
+ }>;
576
+ };
577
+ };
578
+ export type SubmissionsQueryVariables = Exact<{
579
+ first?: InputMaybe<Scalars['Int']>;
580
+ }>;
581
+ export type SubmissionsQuery = {
582
+ __typename?: 'Query';
583
+ submissions: {
584
+ __typename?: 'SubmissionConnection';
585
+ nodes: Array<{
586
+ __typename?: 'Submission';
587
+ reference: string;
588
+ description: string;
589
+ status: SubmissionStatus;
590
+ submittedAt: any;
591
+ }>;
592
+ pageInfo: {
593
+ __typename?: 'PageInfo';
594
+ hasNextPage: boolean;
595
+ hasPreviousPage: boolean;
596
+ startCursor?: string | null;
597
+ endCursor?: string | null;
598
+ };
599
+ };
600
+ };
601
+ export declare const CreateUploadDocument: DocumentNode<CreateUploadMutation, Exact<{
602
+ filename: Scalars['String'];
603
+ fileSize: Scalars['Int'];
604
+ checksum: Scalars['String'];
605
+ mimeType: Scalars['String'];
606
+ }>>;
607
+ export declare const CreateSubmissionDocument: DocumentNode<CreateSubmissionMutation, Exact<{
608
+ description: Scalars['String'];
609
+ uploadId: Scalars['ID'];
610
+ }>>;
611
+ export declare const SubmissionsDocument: DocumentNode<SubmissionsQuery, Exact<{
612
+ first?: InputMaybe<number> | undefined;
613
+ }>>;