@daouypkgs/commerce-shopify 0.0.241

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 (51) hide show
  1. package/README.md +1 -0
  2. package/dist/cart/use-add-item.d.ts +5 -0
  3. package/dist/cart/use-cart.d.ts +4 -0
  4. package/dist/cart/use-remove-item.d.ts +21 -0
  5. package/dist/cart/use-update-item.d.ts +30 -0
  6. package/dist/commerce-shopify.cjs.development.js +3691 -0
  7. package/dist/commerce-shopify.cjs.development.js.map +1 -0
  8. package/dist/commerce-shopify.cjs.production.min.js +2 -0
  9. package/dist/commerce-shopify.cjs.production.min.js.map +1 -0
  10. package/dist/commerce-shopify.esm.js +3679 -0
  11. package/dist/commerce-shopify.esm.js.map +1 -0
  12. package/dist/const.d.ts +4 -0
  13. package/dist/fetcher.d.ts +2 -0
  14. package/dist/graphql-config.d.ts +6 -0
  15. package/dist/index.d.ts +5 -0
  16. package/dist/index.js +8 -0
  17. package/dist/product/use-product.d.ts +5 -0
  18. package/dist/product/use-search.d.ts +5 -0
  19. package/dist/provider.d.ts +74 -0
  20. package/dist/registerCommerceProvider.d.ts +12 -0
  21. package/dist/registerable.d.ts +6 -0
  22. package/dist/shopify-types.d.ts +5 -0
  23. package/dist/shopify.d.ts +5 -0
  24. package/dist/site/use-brands.d.ts +4 -0
  25. package/dist/site/use-categories.d.ts +4 -0
  26. package/dist/utils/cart-create.d.ts +3 -0
  27. package/dist/utils/colors.d.ts +1 -0
  28. package/dist/utils/fragments/cart.d.ts +1 -0
  29. package/dist/utils/fragments/collection.d.ts +1 -0
  30. package/dist/utils/fragments/image.d.ts +1 -0
  31. package/dist/utils/fragments/product-variant.d.ts +1 -0
  32. package/dist/utils/fragments/product.d.ts +1 -0
  33. package/dist/utils/fragments/seo.d.ts +1 -0
  34. package/dist/utils/get-cart-id.d.ts +1 -0
  35. package/dist/utils/get-search-variables.d.ts +16 -0
  36. package/dist/utils/get-sort-variables.d.ts +2 -0
  37. package/dist/utils/graphql/gen/gql.d.ts +76 -0
  38. package/dist/utils/graphql/gen/graphql.d.ts +11114 -0
  39. package/dist/utils/graphql/gen/index.d.ts +1 -0
  40. package/dist/utils/mutations/cart.d.ts +15 -0
  41. package/dist/utils/mutations/customer-activate-by-url.d.ts +4 -0
  42. package/dist/utils/normalize.d.ts +6 -0
  43. package/dist/utils/queries/get-all-collections-query.d.ts +3 -0
  44. package/dist/utils/queries/get-all-product-vendors-query.d.ts +4 -0
  45. package/dist/utils/queries/get-all-products-query.d.ts +6 -0
  46. package/dist/utils/queries/get-cart-query.d.ts +3 -0
  47. package/dist/utils/queries/get-collection-products-query.d.ts +6 -0
  48. package/dist/utils/queries/get-collection-query.d.ts +5 -0
  49. package/dist/utils/queries/get-product-query.d.ts +6 -0
  50. package/dist/utils/throw-user-errors.d.ts +4 -0
  51. package/package.json +42 -0
@@ -0,0 +1,3679 @@
1
+ import registerGlobalContext from '@daouy/host/registerGlobalContext';
2
+ import { useCart, CommerceError, ValidationError, FetcherError, useCommerce as useCommerce$1, getCommerceProvider as getCommerceProvider$1, CartActionsProvider, globalActionsRegistrations } from '@daouypkgs/commerce';
3
+ import React, { useMemo, useCallback } from 'react';
4
+ import Cookies from 'js-cookie';
5
+ import debounce from 'debounce';
6
+
7
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
8
+ try {
9
+ var i = n[a](c),
10
+ u = i.value;
11
+ } catch (n) {
12
+ return void e(n);
13
+ }
14
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
15
+ }
16
+ function _asyncToGenerator(n) {
17
+ return function () {
18
+ var t = this,
19
+ e = arguments;
20
+ return new Promise(function (r, o) {
21
+ var a = n.apply(t, e);
22
+ function _next(n) {
23
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
24
+ }
25
+ function _throw(n) {
26
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
27
+ }
28
+ _next(void 0);
29
+ });
30
+ };
31
+ }
32
+ function _construct(t, e, r) {
33
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
34
+ var o = [null];
35
+ o.push.apply(o, e);
36
+ var p = new (t.bind.apply(t, o))();
37
+ return r && _setPrototypeOf(p, r.prototype), p;
38
+ }
39
+ function _extends() {
40
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
41
+ for (var e = 1; e < arguments.length; e++) {
42
+ var t = arguments[e];
43
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
44
+ }
45
+ return n;
46
+ }, _extends.apply(null, arguments);
47
+ }
48
+ function _getPrototypeOf(t) {
49
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
50
+ return t.__proto__ || Object.getPrototypeOf(t);
51
+ }, _getPrototypeOf(t);
52
+ }
53
+ function _inheritsLoose(t, o) {
54
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
55
+ }
56
+ function _isNativeFunction(t) {
57
+ try {
58
+ return -1 !== Function.toString.call(t).indexOf("[native code]");
59
+ } catch (n) {
60
+ return "function" == typeof t;
61
+ }
62
+ }
63
+ function _isNativeReflectConstruct() {
64
+ try {
65
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
66
+ } catch (t) {}
67
+ return (_isNativeReflectConstruct = function () {
68
+ return !!t;
69
+ })();
70
+ }
71
+ function _objectWithoutPropertiesLoose(r, e) {
72
+ if (null == r) return {};
73
+ var t = {};
74
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
75
+ if (-1 !== e.indexOf(n)) continue;
76
+ t[n] = r[n];
77
+ }
78
+ return t;
79
+ }
80
+ function _regenerator() {
81
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
82
+ var e,
83
+ t,
84
+ r = "function" == typeof Symbol ? Symbol : {},
85
+ n = r.iterator || "@@iterator",
86
+ o = r.toStringTag || "@@toStringTag";
87
+ function i(r, n, o, i) {
88
+ var c = n && n.prototype instanceof Generator ? n : Generator,
89
+ u = Object.create(c.prototype);
90
+ return _regeneratorDefine(u, "_invoke", function (r, n, o) {
91
+ var i,
92
+ c,
93
+ u,
94
+ f = 0,
95
+ p = o || [],
96
+ y = !1,
97
+ G = {
98
+ p: 0,
99
+ n: 0,
100
+ v: e,
101
+ a: d,
102
+ f: d.bind(e, 4),
103
+ d: function (t, r) {
104
+ return i = t, c = 0, u = e, G.n = r, a;
105
+ }
106
+ };
107
+ function d(r, n) {
108
+ for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
109
+ var o,
110
+ i = p[t],
111
+ d = G.p,
112
+ l = i[2];
113
+ r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
114
+ }
115
+ if (o || r > 1) return a;
116
+ throw y = !0, n;
117
+ }
118
+ return function (o, p, l) {
119
+ if (f > 1) throw TypeError("Generator is already running");
120
+ for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
121
+ i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
122
+ try {
123
+ if (f = 2, i) {
124
+ if (c || (o = "next"), t = i[o]) {
125
+ if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
126
+ if (!t.done) return t;
127
+ u = t.value, c < 2 && (c = 0);
128
+ } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
129
+ i = e;
130
+ } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
131
+ } catch (t) {
132
+ i = e, c = 1, u = t;
133
+ } finally {
134
+ f = 1;
135
+ }
136
+ }
137
+ return {
138
+ value: t,
139
+ done: y
140
+ };
141
+ };
142
+ }(r, o, i), !0), u;
143
+ }
144
+ var a = {};
145
+ function Generator() {}
146
+ function GeneratorFunction() {}
147
+ function GeneratorFunctionPrototype() {}
148
+ t = Object.getPrototypeOf;
149
+ var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
150
+ return this;
151
+ }), t),
152
+ u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
153
+ function f(e) {
154
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
155
+ }
156
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
157
+ return this;
158
+ }), _regeneratorDefine(u, "toString", function () {
159
+ return "[object Generator]";
160
+ }), (_regenerator = function () {
161
+ return {
162
+ w: i,
163
+ m: f
164
+ };
165
+ })();
166
+ }
167
+ function _regeneratorDefine(e, r, n, t) {
168
+ var i = Object.defineProperty;
169
+ try {
170
+ i({}, "", {});
171
+ } catch (e) {
172
+ i = 0;
173
+ }
174
+ _regeneratorDefine = function (e, r, n, t) {
175
+ function o(r, n) {
176
+ _regeneratorDefine(e, r, function (e) {
177
+ return this._invoke(r, n, e);
178
+ });
179
+ }
180
+ r ? i ? i(e, r, {
181
+ value: n,
182
+ enumerable: !t,
183
+ configurable: !t,
184
+ writable: !t
185
+ }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
186
+ }, _regeneratorDefine(e, r, n, t);
187
+ }
188
+ function _setPrototypeOf(t, e) {
189
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
190
+ return t.__proto__ = e, t;
191
+ }, _setPrototypeOf(t, e);
192
+ }
193
+ function _wrapNativeSuper(t) {
194
+ var r = "function" == typeof Map ? new Map() : void 0;
195
+ return _wrapNativeSuper = function (t) {
196
+ if (null === t || !_isNativeFunction(t)) return t;
197
+ if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
198
+ if (void 0 !== r) {
199
+ if (r.has(t)) return r.get(t);
200
+ r.set(t, Wrapper);
201
+ }
202
+ function Wrapper() {
203
+ return _construct(t, arguments, _getPrototypeOf(this).constructor);
204
+ }
205
+ return Wrapper.prototype = Object.create(t.prototype, {
206
+ constructor: {
207
+ value: Wrapper,
208
+ enumerable: !1,
209
+ writable: !0,
210
+ configurable: !0
211
+ }
212
+ }), _setPrototypeOf(Wrapper, t);
213
+ }, _wrapNativeSuper(t);
214
+ }
215
+
216
+ var _schema;
217
+ var defaultStoreDomain = "next-js-store.myshopify.com";
218
+ var defaultAccessToken = "ef7d41c7bf7e1c214074d0d3047bcd7b";
219
+ var shopifyApiVersion = "2025-01";
220
+ var config = {
221
+ schema: (_schema = {}, _schema["https://" + defaultStoreDomain + "/api/" + shopifyApiVersion + "/graphql.json"] = {
222
+ headers: {
223
+ "X-Shopify-Storefront-Access-Token": defaultAccessToken
224
+ }
225
+ }, _schema),
226
+ generates: {
227
+ "./src/utils/graphql/gen/": {
228
+ preset: "client",
229
+ presetConfig: {
230
+ fragmentMasking: false
231
+ },
232
+ config: {
233
+ documentMode: "string"
234
+ }
235
+ }
236
+ },
237
+ documents: ["./src/utils/fragments/*.{ts,tsx}", "./src/utils/mutations/*.{ts,tsx}", "./src/utils/queries/*.{ts,tsx}"]
238
+ };
239
+
240
+ var SHOPIFY_CART_ID_COOKIE = "shopify_cartId";
241
+ var SHOPIFY_CHECKOUT_URL_COOKIE = "shopify_checkoutUrl";
242
+ var SHOPIFY_COOKIE_EXPIRE = 30;
243
+
244
+ /** The set of valid sort keys for the Article query. */
245
+ var ArticleSortKeys;
246
+ (function (ArticleSortKeys) {
247
+ /** Sort by the `author` value. */
248
+ ArticleSortKeys["Author"] = "AUTHOR";
249
+ /** Sort by the `blog_title` value. */
250
+ ArticleSortKeys["BlogTitle"] = "BLOG_TITLE";
251
+ /** Sort by the `id` value. */
252
+ ArticleSortKeys["Id"] = "ID";
253
+ /** Sort by the `published_at` value. */
254
+ ArticleSortKeys["PublishedAt"] = "PUBLISHED_AT";
255
+ /**
256
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
257
+ * Don't use this sort key when no search query is specified.
258
+ *
259
+ */
260
+ ArticleSortKeys["Relevance"] = "RELEVANCE";
261
+ /** Sort by the `title` value. */
262
+ ArticleSortKeys["Title"] = "TITLE";
263
+ /** Sort by the `updated_at` value. */
264
+ ArticleSortKeys["UpdatedAt"] = "UPDATED_AT";
265
+ })(ArticleSortKeys || (ArticleSortKeys = {}));
266
+ /** The set of valid sort keys for the Blog query. */
267
+ var BlogSortKeys;
268
+ (function (BlogSortKeys) {
269
+ /** Sort by the `handle` value. */
270
+ BlogSortKeys["Handle"] = "HANDLE";
271
+ /** Sort by the `id` value. */
272
+ BlogSortKeys["Id"] = "ID";
273
+ /**
274
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
275
+ * Don't use this sort key when no search query is specified.
276
+ *
277
+ */
278
+ BlogSortKeys["Relevance"] = "RELEVANCE";
279
+ /** Sort by the `title` value. */
280
+ BlogSortKeys["Title"] = "TITLE";
281
+ })(BlogSortKeys || (BlogSortKeys = {}));
282
+ /** Card brand, such as Visa or Mastercard, which can be used for payments. */
283
+ var CardBrand;
284
+ (function (CardBrand) {
285
+ /** American Express. */
286
+ CardBrand["AmericanExpress"] = "AMERICAN_EXPRESS";
287
+ /** Diners Club. */
288
+ CardBrand["DinersClub"] = "DINERS_CLUB";
289
+ /** Discover. */
290
+ CardBrand["Discover"] = "DISCOVER";
291
+ /** JCB. */
292
+ CardBrand["Jcb"] = "JCB";
293
+ /** Mastercard. */
294
+ CardBrand["Mastercard"] = "MASTERCARD";
295
+ /** Visa. */
296
+ CardBrand["Visa"] = "VISA";
297
+ })(CardBrand || (CardBrand = {}));
298
+ /**
299
+ * Represents how credit card details are provided for a direct payment.
300
+ *
301
+ */
302
+ var CartCardSource;
303
+ (function (CartCardSource) {
304
+ /**
305
+ * The credit card was provided by a third party and vaulted on their system.
306
+ * Using this value requires a separate permission from Shopify.
307
+ *
308
+ */
309
+ CartCardSource["SavedCreditCard"] = "SAVED_CREDIT_CARD";
310
+ })(CartCardSource || (CartCardSource = {}));
311
+ /**
312
+ * Defines what type of merchandise is in the delivery group.
313
+ *
314
+ */
315
+ var CartDeliveryGroupType;
316
+ (function (CartDeliveryGroupType) {
317
+ /**
318
+ * The delivery group only contains merchandise that is either a one time purchase or a first delivery of
319
+ * subscription merchandise.
320
+ *
321
+ */
322
+ CartDeliveryGroupType["OneTimePurchase"] = "ONE_TIME_PURCHASE";
323
+ /** The delivery group only contains subscription merchandise. */
324
+ CartDeliveryGroupType["Subscription"] = "SUBSCRIPTION";
325
+ })(CartDeliveryGroupType || (CartDeliveryGroupType = {}));
326
+ /** Possible error codes that can be returned by `CartUserError`. */
327
+ var CartErrorCode;
328
+ (function (CartErrorCode) {
329
+ /** The specified address field contains emojis. */
330
+ CartErrorCode["AddressFieldContainsEmojis"] = "ADDRESS_FIELD_CONTAINS_EMOJIS";
331
+ /** The specified address field contains HTML tags. */
332
+ CartErrorCode["AddressFieldContainsHtmlTags"] = "ADDRESS_FIELD_CONTAINS_HTML_TAGS";
333
+ /** The specified address field contains a URL. */
334
+ CartErrorCode["AddressFieldContainsUrl"] = "ADDRESS_FIELD_CONTAINS_URL";
335
+ /** The specified address field does not match the expected pattern. */
336
+ CartErrorCode["AddressFieldDoesNotMatchExpectedPattern"] = "ADDRESS_FIELD_DOES_NOT_MATCH_EXPECTED_PATTERN";
337
+ /** The specified address field is required. */
338
+ CartErrorCode["AddressFieldIsRequired"] = "ADDRESS_FIELD_IS_REQUIRED";
339
+ /** The specified address field is too long. */
340
+ CartErrorCode["AddressFieldIsTooLong"] = "ADDRESS_FIELD_IS_TOO_LONG";
341
+ /** The input value is invalid. */
342
+ CartErrorCode["Invalid"] = "INVALID";
343
+ /** Company location not found or not allowed. */
344
+ CartErrorCode["InvalidCompanyLocation"] = "INVALID_COMPANY_LOCATION";
345
+ /** The delivery address was not found. */
346
+ CartErrorCode["InvalidDeliveryAddressId"] = "INVALID_DELIVERY_ADDRESS_ID";
347
+ /** Delivery group was not found in cart. */
348
+ CartErrorCode["InvalidDeliveryGroup"] = "INVALID_DELIVERY_GROUP";
349
+ /** Delivery option was not valid. */
350
+ CartErrorCode["InvalidDeliveryOption"] = "INVALID_DELIVERY_OPTION";
351
+ /** The quantity must be a multiple of the specified increment. */
352
+ CartErrorCode["InvalidIncrement"] = "INVALID_INCREMENT";
353
+ /** Merchandise line was not found in cart. */
354
+ CartErrorCode["InvalidMerchandiseLine"] = "INVALID_MERCHANDISE_LINE";
355
+ /** The metafields were not valid. */
356
+ CartErrorCode["InvalidMetafields"] = "INVALID_METAFIELDS";
357
+ /** The payment wasn't valid. */
358
+ CartErrorCode["InvalidPayment"] = "INVALID_PAYMENT";
359
+ /** Cannot update payment on an empty cart */
360
+ CartErrorCode["InvalidPaymentEmptyCart"] = "INVALID_PAYMENT_EMPTY_CART";
361
+ /** The given zip code is invalid for the provided country. */
362
+ CartErrorCode["InvalidZipCodeForCountry"] = "INVALID_ZIP_CODE_FOR_COUNTRY";
363
+ /** The given zip code is invalid for the provided province. */
364
+ CartErrorCode["InvalidZipCodeForProvince"] = "INVALID_ZIP_CODE_FOR_PROVINCE";
365
+ /** The input value should be less than the maximum value allowed. */
366
+ CartErrorCode["LessThan"] = "LESS_THAN";
367
+ /** The quantity must be below the specified maximum for the item. */
368
+ CartErrorCode["MaximumExceeded"] = "MAXIMUM_EXCEEDED";
369
+ /** The quantity must be above the specified minimum for the item. */
370
+ CartErrorCode["MinimumNotMet"] = "MINIMUM_NOT_MET";
371
+ /** The customer access token is required when setting a company location. */
372
+ CartErrorCode["MissingCustomerAccessToken"] = "MISSING_CUSTOMER_ACCESS_TOKEN";
373
+ /** Missing discount code. */
374
+ CartErrorCode["MissingDiscountCode"] = "MISSING_DISCOUNT_CODE";
375
+ /** Missing note. */
376
+ CartErrorCode["MissingNote"] = "MISSING_NOTE";
377
+ /** The note length must be below the specified maximum. */
378
+ CartErrorCode["NoteTooLong"] = "NOTE_TOO_LONG";
379
+ /** Only one delivery address can be selected. */
380
+ CartErrorCode["OnlyOneDeliveryAddressCanBeSelected"] = "ONLY_ONE_DELIVERY_ADDRESS_CAN_BE_SELECTED";
381
+ /** The payment method is not supported. */
382
+ CartErrorCode["PaymentMethodNotSupported"] = "PAYMENT_METHOD_NOT_SUPPORTED";
383
+ /** The given province cannot be found. */
384
+ CartErrorCode["ProvinceNotFound"] = "PROVINCE_NOT_FOUND";
385
+ /** Too many delivery addresses on Cart. */
386
+ CartErrorCode["TooManyDeliveryAddresses"] = "TOO_MANY_DELIVERY_ADDRESSES";
387
+ /** A general error occurred during address validation. */
388
+ CartErrorCode["UnspecifiedAddressError"] = "UNSPECIFIED_ADDRESS_ERROR";
389
+ /** Validation failed. */
390
+ CartErrorCode["ValidationCustom"] = "VALIDATION_CUSTOM";
391
+ /** The given zip code is unsupported. */
392
+ CartErrorCode["ZipCodeNotSupported"] = "ZIP_CODE_NOT_SUPPORTED";
393
+ })(CartErrorCode || (CartErrorCode = {}));
394
+ /** The code for the cart warning. */
395
+ var CartWarningCode;
396
+ (function (CartWarningCode) {
397
+ /** A delivery address with the same details already exists on this cart. */
398
+ CartWarningCode["DuplicateDeliveryAddress"] = "DUPLICATE_DELIVERY_ADDRESS";
399
+ /** The merchandise does not have enough stock. */
400
+ CartWarningCode["MerchandiseNotEnoughStock"] = "MERCHANDISE_NOT_ENOUGH_STOCK";
401
+ /** The merchandise is out of stock. */
402
+ CartWarningCode["MerchandiseOutOfStock"] = "MERCHANDISE_OUT_OF_STOCK";
403
+ /** Gift cards are not available as a payment method. */
404
+ CartWarningCode["PaymentsGiftCardsUnavailable"] = "PAYMENTS_GIFT_CARDS_UNAVAILABLE";
405
+ })(CartWarningCode || (CartWarningCode = {}));
406
+ /** The set of valid sort keys for the Collection query. */
407
+ var CollectionSortKeys;
408
+ (function (CollectionSortKeys) {
409
+ /** Sort by the `id` value. */
410
+ CollectionSortKeys["Id"] = "ID";
411
+ /**
412
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
413
+ * Don't use this sort key when no search query is specified.
414
+ *
415
+ */
416
+ CollectionSortKeys["Relevance"] = "RELEVANCE";
417
+ /** Sort by the `title` value. */
418
+ CollectionSortKeys["Title"] = "TITLE";
419
+ /** Sort by the `updated_at` value. */
420
+ CollectionSortKeys["UpdatedAt"] = "UPDATED_AT";
421
+ })(CollectionSortKeys || (CollectionSortKeys = {}));
422
+ /** The code of the error that occurred during a cart completion attempt. */
423
+ var CompletionErrorCode;
424
+ (function (CompletionErrorCode) {
425
+ CompletionErrorCode["Error"] = "ERROR";
426
+ CompletionErrorCode["InventoryReservationError"] = "INVENTORY_RESERVATION_ERROR";
427
+ CompletionErrorCode["PaymentAmountTooSmall"] = "PAYMENT_AMOUNT_TOO_SMALL";
428
+ CompletionErrorCode["PaymentCallIssuer"] = "PAYMENT_CALL_ISSUER";
429
+ CompletionErrorCode["PaymentCardDeclined"] = "PAYMENT_CARD_DECLINED";
430
+ CompletionErrorCode["PaymentError"] = "PAYMENT_ERROR";
431
+ CompletionErrorCode["PaymentGatewayNotEnabledError"] = "PAYMENT_GATEWAY_NOT_ENABLED_ERROR";
432
+ CompletionErrorCode["PaymentInsufficientFunds"] = "PAYMENT_INSUFFICIENT_FUNDS";
433
+ CompletionErrorCode["PaymentInvalidBillingAddress"] = "PAYMENT_INVALID_BILLING_ADDRESS";
434
+ CompletionErrorCode["PaymentInvalidCreditCard"] = "PAYMENT_INVALID_CREDIT_CARD";
435
+ CompletionErrorCode["PaymentInvalidCurrency"] = "PAYMENT_INVALID_CURRENCY";
436
+ CompletionErrorCode["PaymentInvalidPaymentMethod"] = "PAYMENT_INVALID_PAYMENT_METHOD";
437
+ CompletionErrorCode["PaymentTransientError"] = "PAYMENT_TRANSIENT_ERROR";
438
+ })(CompletionErrorCode || (CompletionErrorCode = {}));
439
+ /** The precision of the value returned by a count field. */
440
+ var CountPrecision;
441
+ (function (CountPrecision) {
442
+ /** The count is at least the value. A limit was reached. */
443
+ CountPrecision["AtLeast"] = "AT_LEAST";
444
+ /** The count is exactly the value. */
445
+ CountPrecision["Exact"] = "EXACT";
446
+ })(CountPrecision || (CountPrecision = {}));
447
+ /**
448
+ * The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines.
449
+ * If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision
450
+ * of another country. For example, the territories associated with Spain are represented by the country code `ES`,
451
+ * and the territories associated with the United States of America are represented by the country code `US`.
452
+ *
453
+ */
454
+ var CountryCode;
455
+ (function (CountryCode) {
456
+ /** Ascension Island. */
457
+ CountryCode["Ac"] = "AC";
458
+ /** Andorra. */
459
+ CountryCode["Ad"] = "AD";
460
+ /** United Arab Emirates. */
461
+ CountryCode["Ae"] = "AE";
462
+ /** Afghanistan. */
463
+ CountryCode["Af"] = "AF";
464
+ /** Antigua & Barbuda. */
465
+ CountryCode["Ag"] = "AG";
466
+ /** Anguilla. */
467
+ CountryCode["Ai"] = "AI";
468
+ /** Albania. */
469
+ CountryCode["Al"] = "AL";
470
+ /** Armenia. */
471
+ CountryCode["Am"] = "AM";
472
+ /** Netherlands Antilles. */
473
+ CountryCode["An"] = "AN";
474
+ /** Angola. */
475
+ CountryCode["Ao"] = "AO";
476
+ /** Argentina. */
477
+ CountryCode["Ar"] = "AR";
478
+ /** Austria. */
479
+ CountryCode["At"] = "AT";
480
+ /** Australia. */
481
+ CountryCode["Au"] = "AU";
482
+ /** Aruba. */
483
+ CountryCode["Aw"] = "AW";
484
+ /** Åland Islands. */
485
+ CountryCode["Ax"] = "AX";
486
+ /** Azerbaijan. */
487
+ CountryCode["Az"] = "AZ";
488
+ /** Bosnia & Herzegovina. */
489
+ CountryCode["Ba"] = "BA";
490
+ /** Barbados. */
491
+ CountryCode["Bb"] = "BB";
492
+ /** Bangladesh. */
493
+ CountryCode["Bd"] = "BD";
494
+ /** Belgium. */
495
+ CountryCode["Be"] = "BE";
496
+ /** Burkina Faso. */
497
+ CountryCode["Bf"] = "BF";
498
+ /** Bulgaria. */
499
+ CountryCode["Bg"] = "BG";
500
+ /** Bahrain. */
501
+ CountryCode["Bh"] = "BH";
502
+ /** Burundi. */
503
+ CountryCode["Bi"] = "BI";
504
+ /** Benin. */
505
+ CountryCode["Bj"] = "BJ";
506
+ /** St. Barthélemy. */
507
+ CountryCode["Bl"] = "BL";
508
+ /** Bermuda. */
509
+ CountryCode["Bm"] = "BM";
510
+ /** Brunei. */
511
+ CountryCode["Bn"] = "BN";
512
+ /** Bolivia. */
513
+ CountryCode["Bo"] = "BO";
514
+ /** Caribbean Netherlands. */
515
+ CountryCode["Bq"] = "BQ";
516
+ /** Brazil. */
517
+ CountryCode["Br"] = "BR";
518
+ /** Bahamas. */
519
+ CountryCode["Bs"] = "BS";
520
+ /** Bhutan. */
521
+ CountryCode["Bt"] = "BT";
522
+ /** Bouvet Island. */
523
+ CountryCode["Bv"] = "BV";
524
+ /** Botswana. */
525
+ CountryCode["Bw"] = "BW";
526
+ /** Belarus. */
527
+ CountryCode["By"] = "BY";
528
+ /** Belize. */
529
+ CountryCode["Bz"] = "BZ";
530
+ /** Canada. */
531
+ CountryCode["Ca"] = "CA";
532
+ /** Cocos (Keeling) Islands. */
533
+ CountryCode["Cc"] = "CC";
534
+ /** Congo - Kinshasa. */
535
+ CountryCode["Cd"] = "CD";
536
+ /** Central African Republic. */
537
+ CountryCode["Cf"] = "CF";
538
+ /** Congo - Brazzaville. */
539
+ CountryCode["Cg"] = "CG";
540
+ /** Switzerland. */
541
+ CountryCode["Ch"] = "CH";
542
+ /** Côte d’Ivoire. */
543
+ CountryCode["Ci"] = "CI";
544
+ /** Cook Islands. */
545
+ CountryCode["Ck"] = "CK";
546
+ /** Chile. */
547
+ CountryCode["Cl"] = "CL";
548
+ /** Cameroon. */
549
+ CountryCode["Cm"] = "CM";
550
+ /** China. */
551
+ CountryCode["Cn"] = "CN";
552
+ /** Colombia. */
553
+ CountryCode["Co"] = "CO";
554
+ /** Costa Rica. */
555
+ CountryCode["Cr"] = "CR";
556
+ /** Cuba. */
557
+ CountryCode["Cu"] = "CU";
558
+ /** Cape Verde. */
559
+ CountryCode["Cv"] = "CV";
560
+ /** Curaçao. */
561
+ CountryCode["Cw"] = "CW";
562
+ /** Christmas Island. */
563
+ CountryCode["Cx"] = "CX";
564
+ /** Cyprus. */
565
+ CountryCode["Cy"] = "CY";
566
+ /** Czechia. */
567
+ CountryCode["Cz"] = "CZ";
568
+ /** Germany. */
569
+ CountryCode["De"] = "DE";
570
+ /** Djibouti. */
571
+ CountryCode["Dj"] = "DJ";
572
+ /** Denmark. */
573
+ CountryCode["Dk"] = "DK";
574
+ /** Dominica. */
575
+ CountryCode["Dm"] = "DM";
576
+ /** Dominican Republic. */
577
+ CountryCode["Do"] = "DO";
578
+ /** Algeria. */
579
+ CountryCode["Dz"] = "DZ";
580
+ /** Ecuador. */
581
+ CountryCode["Ec"] = "EC";
582
+ /** Estonia. */
583
+ CountryCode["Ee"] = "EE";
584
+ /** Egypt. */
585
+ CountryCode["Eg"] = "EG";
586
+ /** Western Sahara. */
587
+ CountryCode["Eh"] = "EH";
588
+ /** Eritrea. */
589
+ CountryCode["Er"] = "ER";
590
+ /** Spain. */
591
+ CountryCode["Es"] = "ES";
592
+ /** Ethiopia. */
593
+ CountryCode["Et"] = "ET";
594
+ /** Finland. */
595
+ CountryCode["Fi"] = "FI";
596
+ /** Fiji. */
597
+ CountryCode["Fj"] = "FJ";
598
+ /** Falkland Islands. */
599
+ CountryCode["Fk"] = "FK";
600
+ /** Faroe Islands. */
601
+ CountryCode["Fo"] = "FO";
602
+ /** France. */
603
+ CountryCode["Fr"] = "FR";
604
+ /** Gabon. */
605
+ CountryCode["Ga"] = "GA";
606
+ /** United Kingdom. */
607
+ CountryCode["Gb"] = "GB";
608
+ /** Grenada. */
609
+ CountryCode["Gd"] = "GD";
610
+ /** Georgia. */
611
+ CountryCode["Ge"] = "GE";
612
+ /** French Guiana. */
613
+ CountryCode["Gf"] = "GF";
614
+ /** Guernsey. */
615
+ CountryCode["Gg"] = "GG";
616
+ /** Ghana. */
617
+ CountryCode["Gh"] = "GH";
618
+ /** Gibraltar. */
619
+ CountryCode["Gi"] = "GI";
620
+ /** Greenland. */
621
+ CountryCode["Gl"] = "GL";
622
+ /** Gambia. */
623
+ CountryCode["Gm"] = "GM";
624
+ /** Guinea. */
625
+ CountryCode["Gn"] = "GN";
626
+ /** Guadeloupe. */
627
+ CountryCode["Gp"] = "GP";
628
+ /** Equatorial Guinea. */
629
+ CountryCode["Gq"] = "GQ";
630
+ /** Greece. */
631
+ CountryCode["Gr"] = "GR";
632
+ /** South Georgia & South Sandwich Islands. */
633
+ CountryCode["Gs"] = "GS";
634
+ /** Guatemala. */
635
+ CountryCode["Gt"] = "GT";
636
+ /** Guinea-Bissau. */
637
+ CountryCode["Gw"] = "GW";
638
+ /** Guyana. */
639
+ CountryCode["Gy"] = "GY";
640
+ /** Hong Kong SAR. */
641
+ CountryCode["Hk"] = "HK";
642
+ /** Heard & McDonald Islands. */
643
+ CountryCode["Hm"] = "HM";
644
+ /** Honduras. */
645
+ CountryCode["Hn"] = "HN";
646
+ /** Croatia. */
647
+ CountryCode["Hr"] = "HR";
648
+ /** Haiti. */
649
+ CountryCode["Ht"] = "HT";
650
+ /** Hungary. */
651
+ CountryCode["Hu"] = "HU";
652
+ /** Indonesia. */
653
+ CountryCode["Id"] = "ID";
654
+ /** Ireland. */
655
+ CountryCode["Ie"] = "IE";
656
+ /** Israel. */
657
+ CountryCode["Il"] = "IL";
658
+ /** Isle of Man. */
659
+ CountryCode["Im"] = "IM";
660
+ /** India. */
661
+ CountryCode["In"] = "IN";
662
+ /** British Indian Ocean Territory. */
663
+ CountryCode["Io"] = "IO";
664
+ /** Iraq. */
665
+ CountryCode["Iq"] = "IQ";
666
+ /** Iran. */
667
+ CountryCode["Ir"] = "IR";
668
+ /** Iceland. */
669
+ CountryCode["Is"] = "IS";
670
+ /** Italy. */
671
+ CountryCode["It"] = "IT";
672
+ /** Jersey. */
673
+ CountryCode["Je"] = "JE";
674
+ /** Jamaica. */
675
+ CountryCode["Jm"] = "JM";
676
+ /** Jordan. */
677
+ CountryCode["Jo"] = "JO";
678
+ /** Japan. */
679
+ CountryCode["Jp"] = "JP";
680
+ /** Kenya. */
681
+ CountryCode["Ke"] = "KE";
682
+ /** Kyrgyzstan. */
683
+ CountryCode["Kg"] = "KG";
684
+ /** Cambodia. */
685
+ CountryCode["Kh"] = "KH";
686
+ /** Kiribati. */
687
+ CountryCode["Ki"] = "KI";
688
+ /** Comoros. */
689
+ CountryCode["Km"] = "KM";
690
+ /** St. Kitts & Nevis. */
691
+ CountryCode["Kn"] = "KN";
692
+ /** North Korea. */
693
+ CountryCode["Kp"] = "KP";
694
+ /** South Korea. */
695
+ CountryCode["Kr"] = "KR";
696
+ /** Kuwait. */
697
+ CountryCode["Kw"] = "KW";
698
+ /** Cayman Islands. */
699
+ CountryCode["Ky"] = "KY";
700
+ /** Kazakhstan. */
701
+ CountryCode["Kz"] = "KZ";
702
+ /** Laos. */
703
+ CountryCode["La"] = "LA";
704
+ /** Lebanon. */
705
+ CountryCode["Lb"] = "LB";
706
+ /** St. Lucia. */
707
+ CountryCode["Lc"] = "LC";
708
+ /** Liechtenstein. */
709
+ CountryCode["Li"] = "LI";
710
+ /** Sri Lanka. */
711
+ CountryCode["Lk"] = "LK";
712
+ /** Liberia. */
713
+ CountryCode["Lr"] = "LR";
714
+ /** Lesotho. */
715
+ CountryCode["Ls"] = "LS";
716
+ /** Lithuania. */
717
+ CountryCode["Lt"] = "LT";
718
+ /** Luxembourg. */
719
+ CountryCode["Lu"] = "LU";
720
+ /** Latvia. */
721
+ CountryCode["Lv"] = "LV";
722
+ /** Libya. */
723
+ CountryCode["Ly"] = "LY";
724
+ /** Morocco. */
725
+ CountryCode["Ma"] = "MA";
726
+ /** Monaco. */
727
+ CountryCode["Mc"] = "MC";
728
+ /** Moldova. */
729
+ CountryCode["Md"] = "MD";
730
+ /** Montenegro. */
731
+ CountryCode["Me"] = "ME";
732
+ /** St. Martin. */
733
+ CountryCode["Mf"] = "MF";
734
+ /** Madagascar. */
735
+ CountryCode["Mg"] = "MG";
736
+ /** North Macedonia. */
737
+ CountryCode["Mk"] = "MK";
738
+ /** Mali. */
739
+ CountryCode["Ml"] = "ML";
740
+ /** Myanmar (Burma). */
741
+ CountryCode["Mm"] = "MM";
742
+ /** Mongolia. */
743
+ CountryCode["Mn"] = "MN";
744
+ /** Macao SAR. */
745
+ CountryCode["Mo"] = "MO";
746
+ /** Martinique. */
747
+ CountryCode["Mq"] = "MQ";
748
+ /** Mauritania. */
749
+ CountryCode["Mr"] = "MR";
750
+ /** Montserrat. */
751
+ CountryCode["Ms"] = "MS";
752
+ /** Malta. */
753
+ CountryCode["Mt"] = "MT";
754
+ /** Mauritius. */
755
+ CountryCode["Mu"] = "MU";
756
+ /** Maldives. */
757
+ CountryCode["Mv"] = "MV";
758
+ /** Malawi. */
759
+ CountryCode["Mw"] = "MW";
760
+ /** Mexico. */
761
+ CountryCode["Mx"] = "MX";
762
+ /** Malaysia. */
763
+ CountryCode["My"] = "MY";
764
+ /** Mozambique. */
765
+ CountryCode["Mz"] = "MZ";
766
+ /** Namibia. */
767
+ CountryCode["Na"] = "NA";
768
+ /** New Caledonia. */
769
+ CountryCode["Nc"] = "NC";
770
+ /** Niger. */
771
+ CountryCode["Ne"] = "NE";
772
+ /** Norfolk Island. */
773
+ CountryCode["Nf"] = "NF";
774
+ /** Nigeria. */
775
+ CountryCode["Ng"] = "NG";
776
+ /** Nicaragua. */
777
+ CountryCode["Ni"] = "NI";
778
+ /** Netherlands. */
779
+ CountryCode["Nl"] = "NL";
780
+ /** Norway. */
781
+ CountryCode["No"] = "NO";
782
+ /** Nepal. */
783
+ CountryCode["Np"] = "NP";
784
+ /** Nauru. */
785
+ CountryCode["Nr"] = "NR";
786
+ /** Niue. */
787
+ CountryCode["Nu"] = "NU";
788
+ /** New Zealand. */
789
+ CountryCode["Nz"] = "NZ";
790
+ /** Oman. */
791
+ CountryCode["Om"] = "OM";
792
+ /** Panama. */
793
+ CountryCode["Pa"] = "PA";
794
+ /** Peru. */
795
+ CountryCode["Pe"] = "PE";
796
+ /** French Polynesia. */
797
+ CountryCode["Pf"] = "PF";
798
+ /** Papua New Guinea. */
799
+ CountryCode["Pg"] = "PG";
800
+ /** Philippines. */
801
+ CountryCode["Ph"] = "PH";
802
+ /** Pakistan. */
803
+ CountryCode["Pk"] = "PK";
804
+ /** Poland. */
805
+ CountryCode["Pl"] = "PL";
806
+ /** St. Pierre & Miquelon. */
807
+ CountryCode["Pm"] = "PM";
808
+ /** Pitcairn Islands. */
809
+ CountryCode["Pn"] = "PN";
810
+ /** Palestinian Territories. */
811
+ CountryCode["Ps"] = "PS";
812
+ /** Portugal. */
813
+ CountryCode["Pt"] = "PT";
814
+ /** Paraguay. */
815
+ CountryCode["Py"] = "PY";
816
+ /** Qatar. */
817
+ CountryCode["Qa"] = "QA";
818
+ /** Réunion. */
819
+ CountryCode["Re"] = "RE";
820
+ /** Romania. */
821
+ CountryCode["Ro"] = "RO";
822
+ /** Serbia. */
823
+ CountryCode["Rs"] = "RS";
824
+ /** Russia. */
825
+ CountryCode["Ru"] = "RU";
826
+ /** Rwanda. */
827
+ CountryCode["Rw"] = "RW";
828
+ /** Saudi Arabia. */
829
+ CountryCode["Sa"] = "SA";
830
+ /** Solomon Islands. */
831
+ CountryCode["Sb"] = "SB";
832
+ /** Seychelles. */
833
+ CountryCode["Sc"] = "SC";
834
+ /** Sudan. */
835
+ CountryCode["Sd"] = "SD";
836
+ /** Sweden. */
837
+ CountryCode["Se"] = "SE";
838
+ /** Singapore. */
839
+ CountryCode["Sg"] = "SG";
840
+ /** St. Helena. */
841
+ CountryCode["Sh"] = "SH";
842
+ /** Slovenia. */
843
+ CountryCode["Si"] = "SI";
844
+ /** Svalbard & Jan Mayen. */
845
+ CountryCode["Sj"] = "SJ";
846
+ /** Slovakia. */
847
+ CountryCode["Sk"] = "SK";
848
+ /** Sierra Leone. */
849
+ CountryCode["Sl"] = "SL";
850
+ /** San Marino. */
851
+ CountryCode["Sm"] = "SM";
852
+ /** Senegal. */
853
+ CountryCode["Sn"] = "SN";
854
+ /** Somalia. */
855
+ CountryCode["So"] = "SO";
856
+ /** Suriname. */
857
+ CountryCode["Sr"] = "SR";
858
+ /** South Sudan. */
859
+ CountryCode["Ss"] = "SS";
860
+ /** São Tomé & Príncipe. */
861
+ CountryCode["St"] = "ST";
862
+ /** El Salvador. */
863
+ CountryCode["Sv"] = "SV";
864
+ /** Sint Maarten. */
865
+ CountryCode["Sx"] = "SX";
866
+ /** Syria. */
867
+ CountryCode["Sy"] = "SY";
868
+ /** Eswatini. */
869
+ CountryCode["Sz"] = "SZ";
870
+ /** Tristan da Cunha. */
871
+ CountryCode["Ta"] = "TA";
872
+ /** Turks & Caicos Islands. */
873
+ CountryCode["Tc"] = "TC";
874
+ /** Chad. */
875
+ CountryCode["Td"] = "TD";
876
+ /** French Southern Territories. */
877
+ CountryCode["Tf"] = "TF";
878
+ /** Togo. */
879
+ CountryCode["Tg"] = "TG";
880
+ /** Thailand. */
881
+ CountryCode["Th"] = "TH";
882
+ /** Tajikistan. */
883
+ CountryCode["Tj"] = "TJ";
884
+ /** Tokelau. */
885
+ CountryCode["Tk"] = "TK";
886
+ /** Timor-Leste. */
887
+ CountryCode["Tl"] = "TL";
888
+ /** Turkmenistan. */
889
+ CountryCode["Tm"] = "TM";
890
+ /** Tunisia. */
891
+ CountryCode["Tn"] = "TN";
892
+ /** Tonga. */
893
+ CountryCode["To"] = "TO";
894
+ /** Türkiye. */
895
+ CountryCode["Tr"] = "TR";
896
+ /** Trinidad & Tobago. */
897
+ CountryCode["Tt"] = "TT";
898
+ /** Tuvalu. */
899
+ CountryCode["Tv"] = "TV";
900
+ /** Taiwan. */
901
+ CountryCode["Tw"] = "TW";
902
+ /** Tanzania. */
903
+ CountryCode["Tz"] = "TZ";
904
+ /** Ukraine. */
905
+ CountryCode["Ua"] = "UA";
906
+ /** Uganda. */
907
+ CountryCode["Ug"] = "UG";
908
+ /** U.S. Outlying Islands. */
909
+ CountryCode["Um"] = "UM";
910
+ /** United States. */
911
+ CountryCode["Us"] = "US";
912
+ /** Uruguay. */
913
+ CountryCode["Uy"] = "UY";
914
+ /** Uzbekistan. */
915
+ CountryCode["Uz"] = "UZ";
916
+ /** Vatican City. */
917
+ CountryCode["Va"] = "VA";
918
+ /** St. Vincent & Grenadines. */
919
+ CountryCode["Vc"] = "VC";
920
+ /** Venezuela. */
921
+ CountryCode["Ve"] = "VE";
922
+ /** British Virgin Islands. */
923
+ CountryCode["Vg"] = "VG";
924
+ /** Vietnam. */
925
+ CountryCode["Vn"] = "VN";
926
+ /** Vanuatu. */
927
+ CountryCode["Vu"] = "VU";
928
+ /** Wallis & Futuna. */
929
+ CountryCode["Wf"] = "WF";
930
+ /** Samoa. */
931
+ CountryCode["Ws"] = "WS";
932
+ /** Kosovo. */
933
+ CountryCode["Xk"] = "XK";
934
+ /** Yemen. */
935
+ CountryCode["Ye"] = "YE";
936
+ /** Mayotte. */
937
+ CountryCode["Yt"] = "YT";
938
+ /** South Africa. */
939
+ CountryCode["Za"] = "ZA";
940
+ /** Zambia. */
941
+ CountryCode["Zm"] = "ZM";
942
+ /** Zimbabwe. */
943
+ CountryCode["Zw"] = "ZW";
944
+ /** Unknown Region. */
945
+ CountryCode["Zz"] = "ZZ";
946
+ })(CountryCode || (CountryCode = {}));
947
+ /** The part of the image that should remain after cropping. */
948
+ var CropRegion;
949
+ (function (CropRegion) {
950
+ /** Keep the bottom of the image. */
951
+ CropRegion["Bottom"] = "BOTTOM";
952
+ /** Keep the center of the image. */
953
+ CropRegion["Center"] = "CENTER";
954
+ /** Keep the left of the image. */
955
+ CropRegion["Left"] = "LEFT";
956
+ /** Keep the right of the image. */
957
+ CropRegion["Right"] = "RIGHT";
958
+ /** Keep the top of the image. */
959
+ CropRegion["Top"] = "TOP";
960
+ })(CropRegion || (CropRegion = {}));
961
+ /**
962
+ * The three-letter currency codes that represent the world currencies used in
963
+ * stores. These include standard ISO 4217 codes, legacy codes,
964
+ * and non-standard codes.
965
+ *
966
+ */
967
+ var CurrencyCode;
968
+ (function (CurrencyCode) {
969
+ /** United Arab Emirates Dirham (AED). */
970
+ CurrencyCode["Aed"] = "AED";
971
+ /** Afghan Afghani (AFN). */
972
+ CurrencyCode["Afn"] = "AFN";
973
+ /** Albanian Lek (ALL). */
974
+ CurrencyCode["All"] = "ALL";
975
+ /** Armenian Dram (AMD). */
976
+ CurrencyCode["Amd"] = "AMD";
977
+ /** Netherlands Antillean Guilder. */
978
+ CurrencyCode["Ang"] = "ANG";
979
+ /** Angolan Kwanza (AOA). */
980
+ CurrencyCode["Aoa"] = "AOA";
981
+ /** Argentine Pesos (ARS). */
982
+ CurrencyCode["Ars"] = "ARS";
983
+ /** Australian Dollars (AUD). */
984
+ CurrencyCode["Aud"] = "AUD";
985
+ /** Aruban Florin (AWG). */
986
+ CurrencyCode["Awg"] = "AWG";
987
+ /** Azerbaijani Manat (AZN). */
988
+ CurrencyCode["Azn"] = "AZN";
989
+ /** Bosnia and Herzegovina Convertible Mark (BAM). */
990
+ CurrencyCode["Bam"] = "BAM";
991
+ /** Barbadian Dollar (BBD). */
992
+ CurrencyCode["Bbd"] = "BBD";
993
+ /** Bangladesh Taka (BDT). */
994
+ CurrencyCode["Bdt"] = "BDT";
995
+ /** Bulgarian Lev (BGN). */
996
+ CurrencyCode["Bgn"] = "BGN";
997
+ /** Bahraini Dinar (BHD). */
998
+ CurrencyCode["Bhd"] = "BHD";
999
+ /** Burundian Franc (BIF). */
1000
+ CurrencyCode["Bif"] = "BIF";
1001
+ /** Bermudian Dollar (BMD). */
1002
+ CurrencyCode["Bmd"] = "BMD";
1003
+ /** Brunei Dollar (BND). */
1004
+ CurrencyCode["Bnd"] = "BND";
1005
+ /** Bolivian Boliviano (BOB). */
1006
+ CurrencyCode["Bob"] = "BOB";
1007
+ /** Brazilian Real (BRL). */
1008
+ CurrencyCode["Brl"] = "BRL";
1009
+ /** Bahamian Dollar (BSD). */
1010
+ CurrencyCode["Bsd"] = "BSD";
1011
+ /** Bhutanese Ngultrum (BTN). */
1012
+ CurrencyCode["Btn"] = "BTN";
1013
+ /** Botswana Pula (BWP). */
1014
+ CurrencyCode["Bwp"] = "BWP";
1015
+ /** Belarusian Ruble (BYN). */
1016
+ CurrencyCode["Byn"] = "BYN";
1017
+ /**
1018
+ * Belarusian Ruble (BYR).
1019
+ * @deprecated `BYR` is deprecated. Use `BYN` available from version `2021-01` onwards instead.
1020
+ */
1021
+ CurrencyCode["Byr"] = "BYR";
1022
+ /** Belize Dollar (BZD). */
1023
+ CurrencyCode["Bzd"] = "BZD";
1024
+ /** Canadian Dollars (CAD). */
1025
+ CurrencyCode["Cad"] = "CAD";
1026
+ /** Congolese franc (CDF). */
1027
+ CurrencyCode["Cdf"] = "CDF";
1028
+ /** Swiss Francs (CHF). */
1029
+ CurrencyCode["Chf"] = "CHF";
1030
+ /** Chilean Peso (CLP). */
1031
+ CurrencyCode["Clp"] = "CLP";
1032
+ /** Chinese Yuan Renminbi (CNY). */
1033
+ CurrencyCode["Cny"] = "CNY";
1034
+ /** Colombian Peso (COP). */
1035
+ CurrencyCode["Cop"] = "COP";
1036
+ /** Costa Rican Colones (CRC). */
1037
+ CurrencyCode["Crc"] = "CRC";
1038
+ /** Cape Verdean escudo (CVE). */
1039
+ CurrencyCode["Cve"] = "CVE";
1040
+ /** Czech Koruny (CZK). */
1041
+ CurrencyCode["Czk"] = "CZK";
1042
+ /** Djiboutian Franc (DJF). */
1043
+ CurrencyCode["Djf"] = "DJF";
1044
+ /** Danish Kroner (DKK). */
1045
+ CurrencyCode["Dkk"] = "DKK";
1046
+ /** Dominican Peso (DOP). */
1047
+ CurrencyCode["Dop"] = "DOP";
1048
+ /** Algerian Dinar (DZD). */
1049
+ CurrencyCode["Dzd"] = "DZD";
1050
+ /** Egyptian Pound (EGP). */
1051
+ CurrencyCode["Egp"] = "EGP";
1052
+ /** Eritrean Nakfa (ERN). */
1053
+ CurrencyCode["Ern"] = "ERN";
1054
+ /** Ethiopian Birr (ETB). */
1055
+ CurrencyCode["Etb"] = "ETB";
1056
+ /** Euro (EUR). */
1057
+ CurrencyCode["Eur"] = "EUR";
1058
+ /** Fijian Dollars (FJD). */
1059
+ CurrencyCode["Fjd"] = "FJD";
1060
+ /** Falkland Islands Pounds (FKP). */
1061
+ CurrencyCode["Fkp"] = "FKP";
1062
+ /** United Kingdom Pounds (GBP). */
1063
+ CurrencyCode["Gbp"] = "GBP";
1064
+ /** Georgian Lari (GEL). */
1065
+ CurrencyCode["Gel"] = "GEL";
1066
+ /** Ghanaian Cedi (GHS). */
1067
+ CurrencyCode["Ghs"] = "GHS";
1068
+ /** Gibraltar Pounds (GIP). */
1069
+ CurrencyCode["Gip"] = "GIP";
1070
+ /** Gambian Dalasi (GMD). */
1071
+ CurrencyCode["Gmd"] = "GMD";
1072
+ /** Guinean Franc (GNF). */
1073
+ CurrencyCode["Gnf"] = "GNF";
1074
+ /** Guatemalan Quetzal (GTQ). */
1075
+ CurrencyCode["Gtq"] = "GTQ";
1076
+ /** Guyanese Dollar (GYD). */
1077
+ CurrencyCode["Gyd"] = "GYD";
1078
+ /** Hong Kong Dollars (HKD). */
1079
+ CurrencyCode["Hkd"] = "HKD";
1080
+ /** Honduran Lempira (HNL). */
1081
+ CurrencyCode["Hnl"] = "HNL";
1082
+ /** Croatian Kuna (HRK). */
1083
+ CurrencyCode["Hrk"] = "HRK";
1084
+ /** Haitian Gourde (HTG). */
1085
+ CurrencyCode["Htg"] = "HTG";
1086
+ /** Hungarian Forint (HUF). */
1087
+ CurrencyCode["Huf"] = "HUF";
1088
+ /** Indonesian Rupiah (IDR). */
1089
+ CurrencyCode["Idr"] = "IDR";
1090
+ /** Israeli New Shekel (NIS). */
1091
+ CurrencyCode["Ils"] = "ILS";
1092
+ /** Indian Rupees (INR). */
1093
+ CurrencyCode["Inr"] = "INR";
1094
+ /** Iraqi Dinar (IQD). */
1095
+ CurrencyCode["Iqd"] = "IQD";
1096
+ /** Iranian Rial (IRR). */
1097
+ CurrencyCode["Irr"] = "IRR";
1098
+ /** Icelandic Kronur (ISK). */
1099
+ CurrencyCode["Isk"] = "ISK";
1100
+ /** Jersey Pound. */
1101
+ CurrencyCode["Jep"] = "JEP";
1102
+ /** Jamaican Dollars (JMD). */
1103
+ CurrencyCode["Jmd"] = "JMD";
1104
+ /** Jordanian Dinar (JOD). */
1105
+ CurrencyCode["Jod"] = "JOD";
1106
+ /** Japanese Yen (JPY). */
1107
+ CurrencyCode["Jpy"] = "JPY";
1108
+ /** Kenyan Shilling (KES). */
1109
+ CurrencyCode["Kes"] = "KES";
1110
+ /** Kyrgyzstani Som (KGS). */
1111
+ CurrencyCode["Kgs"] = "KGS";
1112
+ /** Cambodian Riel. */
1113
+ CurrencyCode["Khr"] = "KHR";
1114
+ /** Kiribati Dollar (KID). */
1115
+ CurrencyCode["Kid"] = "KID";
1116
+ /** Comorian Franc (KMF). */
1117
+ CurrencyCode["Kmf"] = "KMF";
1118
+ /** South Korean Won (KRW). */
1119
+ CurrencyCode["Krw"] = "KRW";
1120
+ /** Kuwaiti Dinar (KWD). */
1121
+ CurrencyCode["Kwd"] = "KWD";
1122
+ /** Cayman Dollars (KYD). */
1123
+ CurrencyCode["Kyd"] = "KYD";
1124
+ /** Kazakhstani Tenge (KZT). */
1125
+ CurrencyCode["Kzt"] = "KZT";
1126
+ /** Laotian Kip (LAK). */
1127
+ CurrencyCode["Lak"] = "LAK";
1128
+ /** Lebanese Pounds (LBP). */
1129
+ CurrencyCode["Lbp"] = "LBP";
1130
+ /** Sri Lankan Rupees (LKR). */
1131
+ CurrencyCode["Lkr"] = "LKR";
1132
+ /** Liberian Dollar (LRD). */
1133
+ CurrencyCode["Lrd"] = "LRD";
1134
+ /** Lesotho Loti (LSL). */
1135
+ CurrencyCode["Lsl"] = "LSL";
1136
+ /** Lithuanian Litai (LTL). */
1137
+ CurrencyCode["Ltl"] = "LTL";
1138
+ /** Latvian Lati (LVL). */
1139
+ CurrencyCode["Lvl"] = "LVL";
1140
+ /** Libyan Dinar (LYD). */
1141
+ CurrencyCode["Lyd"] = "LYD";
1142
+ /** Moroccan Dirham. */
1143
+ CurrencyCode["Mad"] = "MAD";
1144
+ /** Moldovan Leu (MDL). */
1145
+ CurrencyCode["Mdl"] = "MDL";
1146
+ /** Malagasy Ariary (MGA). */
1147
+ CurrencyCode["Mga"] = "MGA";
1148
+ /** Macedonia Denar (MKD). */
1149
+ CurrencyCode["Mkd"] = "MKD";
1150
+ /** Burmese Kyat (MMK). */
1151
+ CurrencyCode["Mmk"] = "MMK";
1152
+ /** Mongolian Tugrik. */
1153
+ CurrencyCode["Mnt"] = "MNT";
1154
+ /** Macanese Pataca (MOP). */
1155
+ CurrencyCode["Mop"] = "MOP";
1156
+ /** Mauritanian Ouguiya (MRU). */
1157
+ CurrencyCode["Mru"] = "MRU";
1158
+ /** Mauritian Rupee (MUR). */
1159
+ CurrencyCode["Mur"] = "MUR";
1160
+ /** Maldivian Rufiyaa (MVR). */
1161
+ CurrencyCode["Mvr"] = "MVR";
1162
+ /** Malawian Kwacha (MWK). */
1163
+ CurrencyCode["Mwk"] = "MWK";
1164
+ /** Mexican Pesos (MXN). */
1165
+ CurrencyCode["Mxn"] = "MXN";
1166
+ /** Malaysian Ringgits (MYR). */
1167
+ CurrencyCode["Myr"] = "MYR";
1168
+ /** Mozambican Metical. */
1169
+ CurrencyCode["Mzn"] = "MZN";
1170
+ /** Namibian Dollar. */
1171
+ CurrencyCode["Nad"] = "NAD";
1172
+ /** Nigerian Naira (NGN). */
1173
+ CurrencyCode["Ngn"] = "NGN";
1174
+ /** Nicaraguan Córdoba (NIO). */
1175
+ CurrencyCode["Nio"] = "NIO";
1176
+ /** Norwegian Kroner (NOK). */
1177
+ CurrencyCode["Nok"] = "NOK";
1178
+ /** Nepalese Rupee (NPR). */
1179
+ CurrencyCode["Npr"] = "NPR";
1180
+ /** New Zealand Dollars (NZD). */
1181
+ CurrencyCode["Nzd"] = "NZD";
1182
+ /** Omani Rial (OMR). */
1183
+ CurrencyCode["Omr"] = "OMR";
1184
+ /** Panamian Balboa (PAB). */
1185
+ CurrencyCode["Pab"] = "PAB";
1186
+ /** Peruvian Nuevo Sol (PEN). */
1187
+ CurrencyCode["Pen"] = "PEN";
1188
+ /** Papua New Guinean Kina (PGK). */
1189
+ CurrencyCode["Pgk"] = "PGK";
1190
+ /** Philippine Peso (PHP). */
1191
+ CurrencyCode["Php"] = "PHP";
1192
+ /** Pakistani Rupee (PKR). */
1193
+ CurrencyCode["Pkr"] = "PKR";
1194
+ /** Polish Zlotych (PLN). */
1195
+ CurrencyCode["Pln"] = "PLN";
1196
+ /** Paraguayan Guarani (PYG). */
1197
+ CurrencyCode["Pyg"] = "PYG";
1198
+ /** Qatari Rial (QAR). */
1199
+ CurrencyCode["Qar"] = "QAR";
1200
+ /** Romanian Lei (RON). */
1201
+ CurrencyCode["Ron"] = "RON";
1202
+ /** Serbian dinar (RSD). */
1203
+ CurrencyCode["Rsd"] = "RSD";
1204
+ /** Russian Rubles (RUB). */
1205
+ CurrencyCode["Rub"] = "RUB";
1206
+ /** Rwandan Franc (RWF). */
1207
+ CurrencyCode["Rwf"] = "RWF";
1208
+ /** Saudi Riyal (SAR). */
1209
+ CurrencyCode["Sar"] = "SAR";
1210
+ /** Solomon Islands Dollar (SBD). */
1211
+ CurrencyCode["Sbd"] = "SBD";
1212
+ /** Seychellois Rupee (SCR). */
1213
+ CurrencyCode["Scr"] = "SCR";
1214
+ /** Sudanese Pound (SDG). */
1215
+ CurrencyCode["Sdg"] = "SDG";
1216
+ /** Swedish Kronor (SEK). */
1217
+ CurrencyCode["Sek"] = "SEK";
1218
+ /** Singapore Dollars (SGD). */
1219
+ CurrencyCode["Sgd"] = "SGD";
1220
+ /** Saint Helena Pounds (SHP). */
1221
+ CurrencyCode["Shp"] = "SHP";
1222
+ /** Sierra Leonean Leone (SLL). */
1223
+ CurrencyCode["Sll"] = "SLL";
1224
+ /** Somali Shilling (SOS). */
1225
+ CurrencyCode["Sos"] = "SOS";
1226
+ /** Surinamese Dollar (SRD). */
1227
+ CurrencyCode["Srd"] = "SRD";
1228
+ /** South Sudanese Pound (SSP). */
1229
+ CurrencyCode["Ssp"] = "SSP";
1230
+ /**
1231
+ * Sao Tome And Principe Dobra (STD).
1232
+ * @deprecated `STD` is deprecated. Use `STN` available from version `2022-07` onwards instead.
1233
+ */
1234
+ CurrencyCode["Std"] = "STD";
1235
+ /** Sao Tome And Principe Dobra (STN). */
1236
+ CurrencyCode["Stn"] = "STN";
1237
+ /** Syrian Pound (SYP). */
1238
+ CurrencyCode["Syp"] = "SYP";
1239
+ /** Swazi Lilangeni (SZL). */
1240
+ CurrencyCode["Szl"] = "SZL";
1241
+ /** Thai baht (THB). */
1242
+ CurrencyCode["Thb"] = "THB";
1243
+ /** Tajikistani Somoni (TJS). */
1244
+ CurrencyCode["Tjs"] = "TJS";
1245
+ /** Turkmenistani Manat (TMT). */
1246
+ CurrencyCode["Tmt"] = "TMT";
1247
+ /** Tunisian Dinar (TND). */
1248
+ CurrencyCode["Tnd"] = "TND";
1249
+ /** Tongan Pa'anga (TOP). */
1250
+ CurrencyCode["Top"] = "TOP";
1251
+ /** Turkish Lira (TRY). */
1252
+ CurrencyCode["Try"] = "TRY";
1253
+ /** Trinidad and Tobago Dollars (TTD). */
1254
+ CurrencyCode["Ttd"] = "TTD";
1255
+ /** Taiwan Dollars (TWD). */
1256
+ CurrencyCode["Twd"] = "TWD";
1257
+ /** Tanzanian Shilling (TZS). */
1258
+ CurrencyCode["Tzs"] = "TZS";
1259
+ /** Ukrainian Hryvnia (UAH). */
1260
+ CurrencyCode["Uah"] = "UAH";
1261
+ /** Ugandan Shilling (UGX). */
1262
+ CurrencyCode["Ugx"] = "UGX";
1263
+ /** United States Dollars (USD). */
1264
+ CurrencyCode["Usd"] = "USD";
1265
+ /** Uruguayan Pesos (UYU). */
1266
+ CurrencyCode["Uyu"] = "UYU";
1267
+ /** Uzbekistan som (UZS). */
1268
+ CurrencyCode["Uzs"] = "UZS";
1269
+ /** Venezuelan Bolivares (VED). */
1270
+ CurrencyCode["Ved"] = "VED";
1271
+ /**
1272
+ * Venezuelan Bolivares (VEF).
1273
+ * @deprecated `VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead.
1274
+ */
1275
+ CurrencyCode["Vef"] = "VEF";
1276
+ /** Venezuelan Bolivares Soberanos (VES). */
1277
+ CurrencyCode["Ves"] = "VES";
1278
+ /** Vietnamese đồng (VND). */
1279
+ CurrencyCode["Vnd"] = "VND";
1280
+ /** Vanuatu Vatu (VUV). */
1281
+ CurrencyCode["Vuv"] = "VUV";
1282
+ /** Samoan Tala (WST). */
1283
+ CurrencyCode["Wst"] = "WST";
1284
+ /** Central African CFA Franc (XAF). */
1285
+ CurrencyCode["Xaf"] = "XAF";
1286
+ /** East Caribbean Dollar (XCD). */
1287
+ CurrencyCode["Xcd"] = "XCD";
1288
+ /** West African CFA franc (XOF). */
1289
+ CurrencyCode["Xof"] = "XOF";
1290
+ /** CFP Franc (XPF). */
1291
+ CurrencyCode["Xpf"] = "XPF";
1292
+ /** Unrecognized currency. */
1293
+ CurrencyCode["Xxx"] = "XXX";
1294
+ /** Yemeni Rial (YER). */
1295
+ CurrencyCode["Yer"] = "YER";
1296
+ /** South African Rand (ZAR). */
1297
+ CurrencyCode["Zar"] = "ZAR";
1298
+ /** Zambian Kwacha (ZMW). */
1299
+ CurrencyCode["Zmw"] = "ZMW";
1300
+ })(CurrencyCode || (CurrencyCode = {}));
1301
+ /** Possible error codes that can be returned by `CustomerUserError`. */
1302
+ var CustomerErrorCode;
1303
+ (function (CustomerErrorCode) {
1304
+ /** Customer already enabled. */
1305
+ CustomerErrorCode["AlreadyEnabled"] = "ALREADY_ENABLED";
1306
+ /** Input email contains an invalid domain name. */
1307
+ CustomerErrorCode["BadDomain"] = "BAD_DOMAIN";
1308
+ /** The input value is blank. */
1309
+ CustomerErrorCode["Blank"] = "BLANK";
1310
+ /** Input contains HTML tags. */
1311
+ CustomerErrorCode["ContainsHtmlTags"] = "CONTAINS_HTML_TAGS";
1312
+ /** Input contains URL. */
1313
+ CustomerErrorCode["ContainsUrl"] = "CONTAINS_URL";
1314
+ /** Customer is disabled. */
1315
+ CustomerErrorCode["CustomerDisabled"] = "CUSTOMER_DISABLED";
1316
+ /** The input value is invalid. */
1317
+ CustomerErrorCode["Invalid"] = "INVALID";
1318
+ /** Multipass token is not valid. */
1319
+ CustomerErrorCode["InvalidMultipassRequest"] = "INVALID_MULTIPASS_REQUEST";
1320
+ /** Address does not exist. */
1321
+ CustomerErrorCode["NotFound"] = "NOT_FOUND";
1322
+ /** Input password starts or ends with whitespace. */
1323
+ CustomerErrorCode["PasswordStartsOrEndsWithWhitespace"] = "PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE";
1324
+ /** The input value is already taken. */
1325
+ CustomerErrorCode["Taken"] = "TAKEN";
1326
+ /** Invalid activation token. */
1327
+ CustomerErrorCode["TokenInvalid"] = "TOKEN_INVALID";
1328
+ /** The input value is too long. */
1329
+ CustomerErrorCode["TooLong"] = "TOO_LONG";
1330
+ /** The input value is too short. */
1331
+ CustomerErrorCode["TooShort"] = "TOO_SHORT";
1332
+ /** Unidentified customer. */
1333
+ CustomerErrorCode["UnidentifiedCustomer"] = "UNIDENTIFIED_CUSTOMER";
1334
+ })(CustomerErrorCode || (CustomerErrorCode = {}));
1335
+ /**
1336
+ * Defines the types of available validation strategies for delivery addresses.
1337
+ *
1338
+ */
1339
+ var DeliveryAddressValidationStrategy;
1340
+ (function (DeliveryAddressValidationStrategy) {
1341
+ /** Only the country code is validated. */
1342
+ DeliveryAddressValidationStrategy["CountryCodeOnly"] = "COUNTRY_CODE_ONLY";
1343
+ /**
1344
+ * Strict validation is performed, i.e. all fields in the address are validated
1345
+ * according to Shopify's checkout rules. If the address fails validation, the cart will not be updated.
1346
+ *
1347
+ */
1348
+ DeliveryAddressValidationStrategy["Strict"] = "STRICT";
1349
+ })(DeliveryAddressValidationStrategy || (DeliveryAddressValidationStrategy = {}));
1350
+ /** List of different delivery method types. */
1351
+ var DeliveryMethodType;
1352
+ (function (DeliveryMethodType) {
1353
+ /** Local Delivery. */
1354
+ DeliveryMethodType["Local"] = "LOCAL";
1355
+ /** None. */
1356
+ DeliveryMethodType["None"] = "NONE";
1357
+ /** Shipping to a Pickup Point. */
1358
+ DeliveryMethodType["PickupPoint"] = "PICKUP_POINT";
1359
+ /** Local Pickup. */
1360
+ DeliveryMethodType["PickUp"] = "PICK_UP";
1361
+ /** Retail. */
1362
+ DeliveryMethodType["Retail"] = "RETAIL";
1363
+ /** Shipping. */
1364
+ DeliveryMethodType["Shipping"] = "SHIPPING";
1365
+ })(DeliveryMethodType || (DeliveryMethodType = {}));
1366
+ /** Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. */
1367
+ var DigitalWallet;
1368
+ (function (DigitalWallet) {
1369
+ /** Android Pay. */
1370
+ DigitalWallet["AndroidPay"] = "ANDROID_PAY";
1371
+ /** Apple Pay. */
1372
+ DigitalWallet["ApplePay"] = "APPLE_PAY";
1373
+ /** Google Pay. */
1374
+ DigitalWallet["GooglePay"] = "GOOGLE_PAY";
1375
+ /** Shopify Pay. */
1376
+ DigitalWallet["ShopifyPay"] = "SHOPIFY_PAY";
1377
+ })(DigitalWallet || (DigitalWallet = {}));
1378
+ /** The method by which the discount's value is allocated onto its entitled lines. */
1379
+ var DiscountApplicationAllocationMethod;
1380
+ (function (DiscountApplicationAllocationMethod) {
1381
+ /** The value is spread across all entitled lines. */
1382
+ DiscountApplicationAllocationMethod["Across"] = "ACROSS";
1383
+ /** The value is applied onto every entitled line. */
1384
+ DiscountApplicationAllocationMethod["Each"] = "EACH";
1385
+ /**
1386
+ * The value is specifically applied onto a particular line.
1387
+ * @deprecated Use ACROSS instead.
1388
+ */
1389
+ DiscountApplicationAllocationMethod["One"] = "ONE";
1390
+ })(DiscountApplicationAllocationMethod || (DiscountApplicationAllocationMethod = {}));
1391
+ /**
1392
+ * The lines on the order to which the discount is applied, of the type defined by
1393
+ * the discount application's `targetType`. For example, the value `ENTITLED`, combined with a `targetType` of
1394
+ * `LINE_ITEM`, applies the discount on all line items that are entitled to the discount.
1395
+ * The value `ALL`, combined with a `targetType` of `SHIPPING_LINE`, applies the discount on all shipping lines.
1396
+ *
1397
+ */
1398
+ var DiscountApplicationTargetSelection;
1399
+ (function (DiscountApplicationTargetSelection) {
1400
+ /** The discount is allocated onto all the lines. */
1401
+ DiscountApplicationTargetSelection["All"] = "ALL";
1402
+ /** The discount is allocated onto only the lines that it's entitled for. */
1403
+ DiscountApplicationTargetSelection["Entitled"] = "ENTITLED";
1404
+ /** The discount is allocated onto explicitly chosen lines. */
1405
+ DiscountApplicationTargetSelection["Explicit"] = "EXPLICIT";
1406
+ })(DiscountApplicationTargetSelection || (DiscountApplicationTargetSelection = {}));
1407
+ /**
1408
+ * The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards.
1409
+ *
1410
+ */
1411
+ var DiscountApplicationTargetType;
1412
+ (function (DiscountApplicationTargetType) {
1413
+ /** The discount applies onto line items. */
1414
+ DiscountApplicationTargetType["LineItem"] = "LINE_ITEM";
1415
+ /** The discount applies onto shipping lines. */
1416
+ DiscountApplicationTargetType["ShippingLine"] = "SHIPPING_LINE";
1417
+ })(DiscountApplicationTargetType || (DiscountApplicationTargetType = {}));
1418
+ /**
1419
+ * Defines how to present the filter values, specifies the presentation of the filter.
1420
+ *
1421
+ */
1422
+ var FilterPresentation;
1423
+ (function (FilterPresentation) {
1424
+ /** Image presentation, filter values display an image. */
1425
+ FilterPresentation["Image"] = "IMAGE";
1426
+ /** Swatch presentation, filter values display color or image patterns. */
1427
+ FilterPresentation["Swatch"] = "SWATCH";
1428
+ /** Text presentation, no additional visual display for filter values. */
1429
+ FilterPresentation["Text"] = "TEXT";
1430
+ })(FilterPresentation || (FilterPresentation = {}));
1431
+ /**
1432
+ * The type of data that the filter group represents.
1433
+ *
1434
+ * For more information, refer to [Filter products in a collection with the Storefront API]
1435
+ * (https://shopify.dev/custom-storefronts/products-collections/filter-products).
1436
+ *
1437
+ */
1438
+ var FilterType;
1439
+ (function (FilterType) {
1440
+ /** A boolean value. */
1441
+ FilterType["Boolean"] = "BOOLEAN";
1442
+ /** A list of selectable values. */
1443
+ FilterType["List"] = "LIST";
1444
+ /** A range of prices. */
1445
+ FilterType["PriceRange"] = "PRICE_RANGE";
1446
+ })(FilterType || (FilterType = {}));
1447
+ /** List of supported image content types. */
1448
+ var ImageContentType;
1449
+ (function (ImageContentType) {
1450
+ /** A JPG image. */
1451
+ ImageContentType["Jpg"] = "JPG";
1452
+ /** A PNG image. */
1453
+ ImageContentType["Png"] = "PNG";
1454
+ /** A WEBP image. */
1455
+ ImageContentType["Webp"] = "WEBP";
1456
+ })(ImageContentType || (ImageContentType = {}));
1457
+ /** Language codes supported by Shopify. */
1458
+ var LanguageCode;
1459
+ (function (LanguageCode) {
1460
+ /** Afrikaans. */
1461
+ LanguageCode["Af"] = "AF";
1462
+ /** Akan. */
1463
+ LanguageCode["Ak"] = "AK";
1464
+ /** Amharic. */
1465
+ LanguageCode["Am"] = "AM";
1466
+ /** Arabic. */
1467
+ LanguageCode["Ar"] = "AR";
1468
+ /** Assamese. */
1469
+ LanguageCode["As"] = "AS";
1470
+ /** Azerbaijani. */
1471
+ LanguageCode["Az"] = "AZ";
1472
+ /** Belarusian. */
1473
+ LanguageCode["Be"] = "BE";
1474
+ /** Bulgarian. */
1475
+ LanguageCode["Bg"] = "BG";
1476
+ /** Bambara. */
1477
+ LanguageCode["Bm"] = "BM";
1478
+ /** Bangla. */
1479
+ LanguageCode["Bn"] = "BN";
1480
+ /** Tibetan. */
1481
+ LanguageCode["Bo"] = "BO";
1482
+ /** Breton. */
1483
+ LanguageCode["Br"] = "BR";
1484
+ /** Bosnian. */
1485
+ LanguageCode["Bs"] = "BS";
1486
+ /** Catalan. */
1487
+ LanguageCode["Ca"] = "CA";
1488
+ /** Chechen. */
1489
+ LanguageCode["Ce"] = "CE";
1490
+ /** Central Kurdish. */
1491
+ LanguageCode["Ckb"] = "CKB";
1492
+ /** Czech. */
1493
+ LanguageCode["Cs"] = "CS";
1494
+ /** Church Slavic. */
1495
+ LanguageCode["Cu"] = "CU";
1496
+ /** Welsh. */
1497
+ LanguageCode["Cy"] = "CY";
1498
+ /** Danish. */
1499
+ LanguageCode["Da"] = "DA";
1500
+ /** German. */
1501
+ LanguageCode["De"] = "DE";
1502
+ /** Dzongkha. */
1503
+ LanguageCode["Dz"] = "DZ";
1504
+ /** Ewe. */
1505
+ LanguageCode["Ee"] = "EE";
1506
+ /** Greek. */
1507
+ LanguageCode["El"] = "EL";
1508
+ /** English. */
1509
+ LanguageCode["En"] = "EN";
1510
+ /** Esperanto. */
1511
+ LanguageCode["Eo"] = "EO";
1512
+ /** Spanish. */
1513
+ LanguageCode["Es"] = "ES";
1514
+ /** Estonian. */
1515
+ LanguageCode["Et"] = "ET";
1516
+ /** Basque. */
1517
+ LanguageCode["Eu"] = "EU";
1518
+ /** Persian. */
1519
+ LanguageCode["Fa"] = "FA";
1520
+ /** Fulah. */
1521
+ LanguageCode["Ff"] = "FF";
1522
+ /** Finnish. */
1523
+ LanguageCode["Fi"] = "FI";
1524
+ /** Filipino. */
1525
+ LanguageCode["Fil"] = "FIL";
1526
+ /** Faroese. */
1527
+ LanguageCode["Fo"] = "FO";
1528
+ /** French. */
1529
+ LanguageCode["Fr"] = "FR";
1530
+ /** Western Frisian. */
1531
+ LanguageCode["Fy"] = "FY";
1532
+ /** Irish. */
1533
+ LanguageCode["Ga"] = "GA";
1534
+ /** Scottish Gaelic. */
1535
+ LanguageCode["Gd"] = "GD";
1536
+ /** Galician. */
1537
+ LanguageCode["Gl"] = "GL";
1538
+ /** Gujarati. */
1539
+ LanguageCode["Gu"] = "GU";
1540
+ /** Manx. */
1541
+ LanguageCode["Gv"] = "GV";
1542
+ /** Hausa. */
1543
+ LanguageCode["Ha"] = "HA";
1544
+ /** Hebrew. */
1545
+ LanguageCode["He"] = "HE";
1546
+ /** Hindi. */
1547
+ LanguageCode["Hi"] = "HI";
1548
+ /** Croatian. */
1549
+ LanguageCode["Hr"] = "HR";
1550
+ /** Hungarian. */
1551
+ LanguageCode["Hu"] = "HU";
1552
+ /** Armenian. */
1553
+ LanguageCode["Hy"] = "HY";
1554
+ /** Interlingua. */
1555
+ LanguageCode["Ia"] = "IA";
1556
+ /** Indonesian. */
1557
+ LanguageCode["Id"] = "ID";
1558
+ /** Igbo. */
1559
+ LanguageCode["Ig"] = "IG";
1560
+ /** Sichuan Yi. */
1561
+ LanguageCode["Ii"] = "II";
1562
+ /** Icelandic. */
1563
+ LanguageCode["Is"] = "IS";
1564
+ /** Italian. */
1565
+ LanguageCode["It"] = "IT";
1566
+ /** Japanese. */
1567
+ LanguageCode["Ja"] = "JA";
1568
+ /** Javanese. */
1569
+ LanguageCode["Jv"] = "JV";
1570
+ /** Georgian. */
1571
+ LanguageCode["Ka"] = "KA";
1572
+ /** Kikuyu. */
1573
+ LanguageCode["Ki"] = "KI";
1574
+ /** Kazakh. */
1575
+ LanguageCode["Kk"] = "KK";
1576
+ /** Kalaallisut. */
1577
+ LanguageCode["Kl"] = "KL";
1578
+ /** Khmer. */
1579
+ LanguageCode["Km"] = "KM";
1580
+ /** Kannada. */
1581
+ LanguageCode["Kn"] = "KN";
1582
+ /** Korean. */
1583
+ LanguageCode["Ko"] = "KO";
1584
+ /** Kashmiri. */
1585
+ LanguageCode["Ks"] = "KS";
1586
+ /** Kurdish. */
1587
+ LanguageCode["Ku"] = "KU";
1588
+ /** Cornish. */
1589
+ LanguageCode["Kw"] = "KW";
1590
+ /** Kyrgyz. */
1591
+ LanguageCode["Ky"] = "KY";
1592
+ /** Latin. */
1593
+ LanguageCode["La"] = "LA";
1594
+ /** Luxembourgish. */
1595
+ LanguageCode["Lb"] = "LB";
1596
+ /** Ganda. */
1597
+ LanguageCode["Lg"] = "LG";
1598
+ /** Lingala. */
1599
+ LanguageCode["Ln"] = "LN";
1600
+ /** Lao. */
1601
+ LanguageCode["Lo"] = "LO";
1602
+ /** Lithuanian. */
1603
+ LanguageCode["Lt"] = "LT";
1604
+ /** Luba-Katanga. */
1605
+ LanguageCode["Lu"] = "LU";
1606
+ /** Latvian. */
1607
+ LanguageCode["Lv"] = "LV";
1608
+ /** Malagasy. */
1609
+ LanguageCode["Mg"] = "MG";
1610
+ /** Māori. */
1611
+ LanguageCode["Mi"] = "MI";
1612
+ /** Macedonian. */
1613
+ LanguageCode["Mk"] = "MK";
1614
+ /** Malayalam. */
1615
+ LanguageCode["Ml"] = "ML";
1616
+ /** Mongolian. */
1617
+ LanguageCode["Mn"] = "MN";
1618
+ /** Moldavian. */
1619
+ LanguageCode["Mo"] = "MO";
1620
+ /** Marathi. */
1621
+ LanguageCode["Mr"] = "MR";
1622
+ /** Malay. */
1623
+ LanguageCode["Ms"] = "MS";
1624
+ /** Maltese. */
1625
+ LanguageCode["Mt"] = "MT";
1626
+ /** Burmese. */
1627
+ LanguageCode["My"] = "MY";
1628
+ /** Norwegian (Bokmål). */
1629
+ LanguageCode["Nb"] = "NB";
1630
+ /** North Ndebele. */
1631
+ LanguageCode["Nd"] = "ND";
1632
+ /** Nepali. */
1633
+ LanguageCode["Ne"] = "NE";
1634
+ /** Dutch. */
1635
+ LanguageCode["Nl"] = "NL";
1636
+ /** Norwegian Nynorsk. */
1637
+ LanguageCode["Nn"] = "NN";
1638
+ /** Norwegian. */
1639
+ LanguageCode["No"] = "NO";
1640
+ /** Oromo. */
1641
+ LanguageCode["Om"] = "OM";
1642
+ /** Odia. */
1643
+ LanguageCode["Or"] = "OR";
1644
+ /** Ossetic. */
1645
+ LanguageCode["Os"] = "OS";
1646
+ /** Punjabi. */
1647
+ LanguageCode["Pa"] = "PA";
1648
+ /** Polish. */
1649
+ LanguageCode["Pl"] = "PL";
1650
+ /** Pashto. */
1651
+ LanguageCode["Ps"] = "PS";
1652
+ /** Portuguese. */
1653
+ LanguageCode["Pt"] = "PT";
1654
+ /** Portuguese (Brazil). */
1655
+ LanguageCode["PtBr"] = "PT_BR";
1656
+ /** Portuguese (Portugal). */
1657
+ LanguageCode["PtPt"] = "PT_PT";
1658
+ /** Quechua. */
1659
+ LanguageCode["Qu"] = "QU";
1660
+ /** Romansh. */
1661
+ LanguageCode["Rm"] = "RM";
1662
+ /** Rundi. */
1663
+ LanguageCode["Rn"] = "RN";
1664
+ /** Romanian. */
1665
+ LanguageCode["Ro"] = "RO";
1666
+ /** Russian. */
1667
+ LanguageCode["Ru"] = "RU";
1668
+ /** Kinyarwanda. */
1669
+ LanguageCode["Rw"] = "RW";
1670
+ /** Sanskrit. */
1671
+ LanguageCode["Sa"] = "SA";
1672
+ /** Sardinian. */
1673
+ LanguageCode["Sc"] = "SC";
1674
+ /** Sindhi. */
1675
+ LanguageCode["Sd"] = "SD";
1676
+ /** Northern Sami. */
1677
+ LanguageCode["Se"] = "SE";
1678
+ /** Sango. */
1679
+ LanguageCode["Sg"] = "SG";
1680
+ /** Serbo-Croatian. */
1681
+ LanguageCode["Sh"] = "SH";
1682
+ /** Sinhala. */
1683
+ LanguageCode["Si"] = "SI";
1684
+ /** Slovak. */
1685
+ LanguageCode["Sk"] = "SK";
1686
+ /** Slovenian. */
1687
+ LanguageCode["Sl"] = "SL";
1688
+ /** Shona. */
1689
+ LanguageCode["Sn"] = "SN";
1690
+ /** Somali. */
1691
+ LanguageCode["So"] = "SO";
1692
+ /** Albanian. */
1693
+ LanguageCode["Sq"] = "SQ";
1694
+ /** Serbian. */
1695
+ LanguageCode["Sr"] = "SR";
1696
+ /** Sundanese. */
1697
+ LanguageCode["Su"] = "SU";
1698
+ /** Swedish. */
1699
+ LanguageCode["Sv"] = "SV";
1700
+ /** Swahili. */
1701
+ LanguageCode["Sw"] = "SW";
1702
+ /** Tamil. */
1703
+ LanguageCode["Ta"] = "TA";
1704
+ /** Telugu. */
1705
+ LanguageCode["Te"] = "TE";
1706
+ /** Tajik. */
1707
+ LanguageCode["Tg"] = "TG";
1708
+ /** Thai. */
1709
+ LanguageCode["Th"] = "TH";
1710
+ /** Tigrinya. */
1711
+ LanguageCode["Ti"] = "TI";
1712
+ /** Turkmen. */
1713
+ LanguageCode["Tk"] = "TK";
1714
+ /** Tongan. */
1715
+ LanguageCode["To"] = "TO";
1716
+ /** Turkish. */
1717
+ LanguageCode["Tr"] = "TR";
1718
+ /** Tatar. */
1719
+ LanguageCode["Tt"] = "TT";
1720
+ /** Uyghur. */
1721
+ LanguageCode["Ug"] = "UG";
1722
+ /** Ukrainian. */
1723
+ LanguageCode["Uk"] = "UK";
1724
+ /** Urdu. */
1725
+ LanguageCode["Ur"] = "UR";
1726
+ /** Uzbek. */
1727
+ LanguageCode["Uz"] = "UZ";
1728
+ /** Vietnamese. */
1729
+ LanguageCode["Vi"] = "VI";
1730
+ /** Volapük. */
1731
+ LanguageCode["Vo"] = "VO";
1732
+ /** Wolof. */
1733
+ LanguageCode["Wo"] = "WO";
1734
+ /** Xhosa. */
1735
+ LanguageCode["Xh"] = "XH";
1736
+ /** Yiddish. */
1737
+ LanguageCode["Yi"] = "YI";
1738
+ /** Yoruba. */
1739
+ LanguageCode["Yo"] = "YO";
1740
+ /** Chinese. */
1741
+ LanguageCode["Zh"] = "ZH";
1742
+ /** Chinese (Simplified). */
1743
+ LanguageCode["ZhCn"] = "ZH_CN";
1744
+ /** Chinese (Traditional). */
1745
+ LanguageCode["ZhTw"] = "ZH_TW";
1746
+ /** Zulu. */
1747
+ LanguageCode["Zu"] = "ZU";
1748
+ })(LanguageCode || (LanguageCode = {}));
1749
+ /** The set of valid sort keys for the Location query. */
1750
+ var LocationSortKeys;
1751
+ (function (LocationSortKeys) {
1752
+ /** Sort by the `city` value. */
1753
+ LocationSortKeys["City"] = "CITY";
1754
+ /** Sort by the `distance` value. */
1755
+ LocationSortKeys["Distance"] = "DISTANCE";
1756
+ /** Sort by the `id` value. */
1757
+ LocationSortKeys["Id"] = "ID";
1758
+ /** Sort by the `name` value. */
1759
+ LocationSortKeys["Name"] = "NAME";
1760
+ })(LocationSortKeys || (LocationSortKeys = {}));
1761
+ /** The possible content types for a media object. */
1762
+ var MediaContentType;
1763
+ (function (MediaContentType) {
1764
+ /** An externally hosted video. */
1765
+ MediaContentType["ExternalVideo"] = "EXTERNAL_VIDEO";
1766
+ /** A Shopify hosted image. */
1767
+ MediaContentType["Image"] = "IMAGE";
1768
+ /** A 3d model. */
1769
+ MediaContentType["Model_3D"] = "MODEL_3D";
1770
+ /** A Shopify hosted video. */
1771
+ MediaContentType["Video"] = "VIDEO";
1772
+ })(MediaContentType || (MediaContentType = {}));
1773
+ /** Host for a Media Resource. */
1774
+ var MediaHost;
1775
+ (function (MediaHost) {
1776
+ /** Host for Vimeo embedded videos. */
1777
+ MediaHost["Vimeo"] = "VIMEO";
1778
+ /** Host for YouTube embedded videos. */
1779
+ MediaHost["Youtube"] = "YOUTUBE";
1780
+ })(MediaHost || (MediaHost = {}));
1781
+ /** The possible formats for a media presentation. */
1782
+ var MediaPresentationFormat;
1783
+ (function (MediaPresentationFormat) {
1784
+ /** A media image presentation. */
1785
+ MediaPresentationFormat["Image"] = "IMAGE";
1786
+ /** A model viewer presentation. */
1787
+ MediaPresentationFormat["ModelViewer"] = "MODEL_VIEWER";
1788
+ })(MediaPresentationFormat || (MediaPresentationFormat = {}));
1789
+ /** A menu item type. */
1790
+ var MenuItemType;
1791
+ (function (MenuItemType) {
1792
+ /** An article link. */
1793
+ MenuItemType["Article"] = "ARTICLE";
1794
+ /** A blog link. */
1795
+ MenuItemType["Blog"] = "BLOG";
1796
+ /** A catalog link. */
1797
+ MenuItemType["Catalog"] = "CATALOG";
1798
+ /** A collection link. */
1799
+ MenuItemType["Collection"] = "COLLECTION";
1800
+ /** A collection link. */
1801
+ MenuItemType["Collections"] = "COLLECTIONS";
1802
+ /** A customer account page link. */
1803
+ MenuItemType["CustomerAccountPage"] = "CUSTOMER_ACCOUNT_PAGE";
1804
+ /** A frontpage link. */
1805
+ MenuItemType["Frontpage"] = "FRONTPAGE";
1806
+ /** An http link. */
1807
+ MenuItemType["Http"] = "HTTP";
1808
+ /** A metaobject page link. */
1809
+ MenuItemType["Metaobject"] = "METAOBJECT";
1810
+ /** A page link. */
1811
+ MenuItemType["Page"] = "PAGE";
1812
+ /** A product link. */
1813
+ MenuItemType["Product"] = "PRODUCT";
1814
+ /** A search link. */
1815
+ MenuItemType["Search"] = "SEARCH";
1816
+ /** A shop policy link. */
1817
+ MenuItemType["ShopPolicy"] = "SHOP_POLICY";
1818
+ })(MenuItemType || (MenuItemType = {}));
1819
+ /** Possible error codes that can be returned by `MetafieldDeleteUserError`. */
1820
+ var MetafieldDeleteErrorCode;
1821
+ (function (MetafieldDeleteErrorCode) {
1822
+ /** The owner ID is invalid. */
1823
+ MetafieldDeleteErrorCode["InvalidOwner"] = "INVALID_OWNER";
1824
+ /** Metafield not found. */
1825
+ MetafieldDeleteErrorCode["MetafieldDoesNotExist"] = "METAFIELD_DOES_NOT_EXIST";
1826
+ })(MetafieldDeleteErrorCode || (MetafieldDeleteErrorCode = {}));
1827
+ /** Possible error codes that can be returned by `MetafieldsSetUserError`. */
1828
+ var MetafieldsSetUserErrorCode;
1829
+ (function (MetafieldsSetUserErrorCode) {
1830
+ /** The input value is blank. */
1831
+ MetafieldsSetUserErrorCode["Blank"] = "BLANK";
1832
+ /** The input value isn't included in the list. */
1833
+ MetafieldsSetUserErrorCode["Inclusion"] = "INCLUSION";
1834
+ /** The owner ID is invalid. */
1835
+ MetafieldsSetUserErrorCode["InvalidOwner"] = "INVALID_OWNER";
1836
+ /** The type is invalid. */
1837
+ MetafieldsSetUserErrorCode["InvalidType"] = "INVALID_TYPE";
1838
+ /** The value is invalid for metafield type or for definition options. */
1839
+ MetafieldsSetUserErrorCode["InvalidValue"] = "INVALID_VALUE";
1840
+ /** The input value should be less than or equal to the maximum value allowed. */
1841
+ MetafieldsSetUserErrorCode["LessThanOrEqualTo"] = "LESS_THAN_OR_EQUAL_TO";
1842
+ /** The input value needs to be blank. */
1843
+ MetafieldsSetUserErrorCode["Present"] = "PRESENT";
1844
+ /** The input value is too long. */
1845
+ MetafieldsSetUserErrorCode["TooLong"] = "TOO_LONG";
1846
+ /** The input value is too short. */
1847
+ MetafieldsSetUserErrorCode["TooShort"] = "TOO_SHORT";
1848
+ })(MetafieldsSetUserErrorCode || (MetafieldsSetUserErrorCode = {}));
1849
+ /** Represents the reason for the order's cancellation. */
1850
+ var OrderCancelReason;
1851
+ (function (OrderCancelReason) {
1852
+ /** The customer wanted to cancel the order. */
1853
+ OrderCancelReason["Customer"] = "CUSTOMER";
1854
+ /** Payment was declined. */
1855
+ OrderCancelReason["Declined"] = "DECLINED";
1856
+ /** The order was fraudulent. */
1857
+ OrderCancelReason["Fraud"] = "FRAUD";
1858
+ /** There was insufficient inventory. */
1859
+ OrderCancelReason["Inventory"] = "INVENTORY";
1860
+ /** The order was canceled for an unlisted reason. */
1861
+ OrderCancelReason["Other"] = "OTHER";
1862
+ /** Staff made an error. */
1863
+ OrderCancelReason["Staff"] = "STAFF";
1864
+ })(OrderCancelReason || (OrderCancelReason = {}));
1865
+ /** Represents the order's current financial status. */
1866
+ var OrderFinancialStatus;
1867
+ (function (OrderFinancialStatus) {
1868
+ /** Displayed as **Authorized**. */
1869
+ OrderFinancialStatus["Authorized"] = "AUTHORIZED";
1870
+ /** Displayed as **Paid**. */
1871
+ OrderFinancialStatus["Paid"] = "PAID";
1872
+ /** Displayed as **Partially paid**. */
1873
+ OrderFinancialStatus["PartiallyPaid"] = "PARTIALLY_PAID";
1874
+ /** Displayed as **Partially refunded**. */
1875
+ OrderFinancialStatus["PartiallyRefunded"] = "PARTIALLY_REFUNDED";
1876
+ /** Displayed as **Pending**. */
1877
+ OrderFinancialStatus["Pending"] = "PENDING";
1878
+ /** Displayed as **Refunded**. */
1879
+ OrderFinancialStatus["Refunded"] = "REFUNDED";
1880
+ /** Displayed as **Voided**. */
1881
+ OrderFinancialStatus["Voided"] = "VOIDED";
1882
+ })(OrderFinancialStatus || (OrderFinancialStatus = {}));
1883
+ /** Represents the order's aggregated fulfillment status for display purposes. */
1884
+ var OrderFulfillmentStatus;
1885
+ (function (OrderFulfillmentStatus) {
1886
+ /** Displayed as **Fulfilled**. All of the items in the order have been fulfilled. */
1887
+ OrderFulfillmentStatus["Fulfilled"] = "FULFILLED";
1888
+ /** Displayed as **In progress**. Some of the items in the order have been fulfilled, or a request for fulfillment has been sent to the fulfillment service. */
1889
+ OrderFulfillmentStatus["InProgress"] = "IN_PROGRESS";
1890
+ /** Displayed as **On hold**. All of the unfulfilled items in this order are on hold. */
1891
+ OrderFulfillmentStatus["OnHold"] = "ON_HOLD";
1892
+ /** Displayed as **Open**. None of the items in the order have been fulfilled. Replaced by "UNFULFILLED" status. */
1893
+ OrderFulfillmentStatus["Open"] = "OPEN";
1894
+ /** Displayed as **Partially fulfilled**. Some of the items in the order have been fulfilled. */
1895
+ OrderFulfillmentStatus["PartiallyFulfilled"] = "PARTIALLY_FULFILLED";
1896
+ /** Displayed as **Pending fulfillment**. A request for fulfillment of some items awaits a response from the fulfillment service. Replaced by "IN_PROGRESS" status. */
1897
+ OrderFulfillmentStatus["PendingFulfillment"] = "PENDING_FULFILLMENT";
1898
+ /** Displayed as **Restocked**. All of the items in the order have been restocked. Replaced by "UNFULFILLED" status. */
1899
+ OrderFulfillmentStatus["Restocked"] = "RESTOCKED";
1900
+ /** Displayed as **Scheduled**. All of the unfulfilled items in this order are scheduled for fulfillment at later time. */
1901
+ OrderFulfillmentStatus["Scheduled"] = "SCHEDULED";
1902
+ /** Displayed as **Unfulfilled**. None of the items in the order have been fulfilled. */
1903
+ OrderFulfillmentStatus["Unfulfilled"] = "UNFULFILLED";
1904
+ })(OrderFulfillmentStatus || (OrderFulfillmentStatus = {}));
1905
+ /** The set of valid sort keys for the Order query. */
1906
+ var OrderSortKeys;
1907
+ (function (OrderSortKeys) {
1908
+ /** Sort by the `id` value. */
1909
+ OrderSortKeys["Id"] = "ID";
1910
+ /** Sort by the `processed_at` value. */
1911
+ OrderSortKeys["ProcessedAt"] = "PROCESSED_AT";
1912
+ /**
1913
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
1914
+ * Don't use this sort key when no search query is specified.
1915
+ *
1916
+ */
1917
+ OrderSortKeys["Relevance"] = "RELEVANCE";
1918
+ /** Sort by the `total_price` value. */
1919
+ OrderSortKeys["TotalPrice"] = "TOTAL_PRICE";
1920
+ })(OrderSortKeys || (OrderSortKeys = {}));
1921
+ /** The set of valid sort keys for the Page query. */
1922
+ var PageSortKeys;
1923
+ (function (PageSortKeys) {
1924
+ /** Sort by the `id` value. */
1925
+ PageSortKeys["Id"] = "ID";
1926
+ /**
1927
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
1928
+ * Don't use this sort key when no search query is specified.
1929
+ *
1930
+ */
1931
+ PageSortKeys["Relevance"] = "RELEVANCE";
1932
+ /** Sort by the `title` value. */
1933
+ PageSortKeys["Title"] = "TITLE";
1934
+ /** Sort by the `updated_at` value. */
1935
+ PageSortKeys["UpdatedAt"] = "UPDATED_AT";
1936
+ })(PageSortKeys || (PageSortKeys = {}));
1937
+ /** Decides the distribution of results. */
1938
+ var PredictiveSearchLimitScope;
1939
+ (function (PredictiveSearchLimitScope) {
1940
+ /** Return results up to limit across all types. */
1941
+ PredictiveSearchLimitScope["All"] = "ALL";
1942
+ /** Return results up to limit per type. */
1943
+ PredictiveSearchLimitScope["Each"] = "EACH";
1944
+ })(PredictiveSearchLimitScope || (PredictiveSearchLimitScope = {}));
1945
+ /** The types of search items to perform predictive search on. */
1946
+ var PredictiveSearchType;
1947
+ (function (PredictiveSearchType) {
1948
+ /** Returns matching articles. */
1949
+ PredictiveSearchType["Article"] = "ARTICLE";
1950
+ /** Returns matching collections. */
1951
+ PredictiveSearchType["Collection"] = "COLLECTION";
1952
+ /** Returns matching pages. */
1953
+ PredictiveSearchType["Page"] = "PAGE";
1954
+ /** Returns matching products. */
1955
+ PredictiveSearchType["Product"] = "PRODUCT";
1956
+ /** Returns matching query strings. */
1957
+ PredictiveSearchType["Query"] = "QUERY";
1958
+ })(PredictiveSearchType || (PredictiveSearchType = {}));
1959
+ /** The preferred delivery methods such as shipping, local pickup or through pickup points. */
1960
+ var PreferenceDeliveryMethodType;
1961
+ (function (PreferenceDeliveryMethodType) {
1962
+ /** A delivery method used to let buyers collect purchases at designated locations like parcel lockers. */
1963
+ PreferenceDeliveryMethodType["PickupPoint"] = "PICKUP_POINT";
1964
+ /** A delivery method used to let buyers receive items directly from a specific location within an area. */
1965
+ PreferenceDeliveryMethodType["PickUp"] = "PICK_UP";
1966
+ /** A delivery method used to send items directly to a buyer’s specified address. */
1967
+ PreferenceDeliveryMethodType["Shipping"] = "SHIPPING";
1968
+ })(PreferenceDeliveryMethodType || (PreferenceDeliveryMethodType = {}));
1969
+ /** The set of valid sort keys for the ProductCollection query. */
1970
+ var ProductCollectionSortKeys;
1971
+ (function (ProductCollectionSortKeys) {
1972
+ /** Sort by the `best-selling` value. */
1973
+ ProductCollectionSortKeys["BestSelling"] = "BEST_SELLING";
1974
+ /** Sort by the `collection-default` value. */
1975
+ ProductCollectionSortKeys["CollectionDefault"] = "COLLECTION_DEFAULT";
1976
+ /** Sort by the `created` value. */
1977
+ ProductCollectionSortKeys["Created"] = "CREATED";
1978
+ /** Sort by the `id` value. */
1979
+ ProductCollectionSortKeys["Id"] = "ID";
1980
+ /** Sort by the `manual` value. */
1981
+ ProductCollectionSortKeys["Manual"] = "MANUAL";
1982
+ /** Sort by the `price` value. */
1983
+ ProductCollectionSortKeys["Price"] = "PRICE";
1984
+ /**
1985
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
1986
+ * Don't use this sort key when no search query is specified.
1987
+ *
1988
+ */
1989
+ ProductCollectionSortKeys["Relevance"] = "RELEVANCE";
1990
+ /** Sort by the `title` value. */
1991
+ ProductCollectionSortKeys["Title"] = "TITLE";
1992
+ })(ProductCollectionSortKeys || (ProductCollectionSortKeys = {}));
1993
+ /** The set of valid sort keys for the ProductImage query. */
1994
+ var ProductImageSortKeys;
1995
+ (function (ProductImageSortKeys) {
1996
+ /** Sort by the `created_at` value. */
1997
+ ProductImageSortKeys["CreatedAt"] = "CREATED_AT";
1998
+ /** Sort by the `id` value. */
1999
+ ProductImageSortKeys["Id"] = "ID";
2000
+ /** Sort by the `position` value. */
2001
+ ProductImageSortKeys["Position"] = "POSITION";
2002
+ /**
2003
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
2004
+ * Don't use this sort key when no search query is specified.
2005
+ *
2006
+ */
2007
+ ProductImageSortKeys["Relevance"] = "RELEVANCE";
2008
+ })(ProductImageSortKeys || (ProductImageSortKeys = {}));
2009
+ /** The set of valid sort keys for the ProductMedia query. */
2010
+ var ProductMediaSortKeys;
2011
+ (function (ProductMediaSortKeys) {
2012
+ /** Sort by the `id` value. */
2013
+ ProductMediaSortKeys["Id"] = "ID";
2014
+ /** Sort by the `position` value. */
2015
+ ProductMediaSortKeys["Position"] = "POSITION";
2016
+ /**
2017
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
2018
+ * Don't use this sort key when no search query is specified.
2019
+ *
2020
+ */
2021
+ ProductMediaSortKeys["Relevance"] = "RELEVANCE";
2022
+ })(ProductMediaSortKeys || (ProductMediaSortKeys = {}));
2023
+ /**
2024
+ * The recommendation intent that is used to generate product recommendations.
2025
+ * You can use intent to generate product recommendations according to different strategies.
2026
+ *
2027
+ */
2028
+ var ProductRecommendationIntent;
2029
+ (function (ProductRecommendationIntent) {
2030
+ /** Offer customers products that are complementary to a product for which recommendations are to be fetched. An example is add-on products that display in a Pair it with section. */
2031
+ ProductRecommendationIntent["Complementary"] = "COMPLEMENTARY";
2032
+ /** Offer customers a mix of products that are similar or complementary to a product for which recommendations are to be fetched. An example is substitutable products that display in a You may also like section. */
2033
+ ProductRecommendationIntent["Related"] = "RELATED";
2034
+ })(ProductRecommendationIntent || (ProductRecommendationIntent = {}));
2035
+ /** The set of valid sort keys for the Product query. */
2036
+ var ProductSortKeys;
2037
+ (function (ProductSortKeys) {
2038
+ /** Sort by the `best_selling` value. */
2039
+ ProductSortKeys["BestSelling"] = "BEST_SELLING";
2040
+ /** Sort by the `created_at` value. */
2041
+ ProductSortKeys["CreatedAt"] = "CREATED_AT";
2042
+ /** Sort by the `id` value. */
2043
+ ProductSortKeys["Id"] = "ID";
2044
+ /** Sort by the `price` value. */
2045
+ ProductSortKeys["Price"] = "PRICE";
2046
+ /** Sort by the `product_type` value. */
2047
+ ProductSortKeys["ProductType"] = "PRODUCT_TYPE";
2048
+ /**
2049
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
2050
+ * Don't use this sort key when no search query is specified.
2051
+ *
2052
+ */
2053
+ ProductSortKeys["Relevance"] = "RELEVANCE";
2054
+ /** Sort by the `title` value. */
2055
+ ProductSortKeys["Title"] = "TITLE";
2056
+ /** Sort by the `updated_at` value. */
2057
+ ProductSortKeys["UpdatedAt"] = "UPDATED_AT";
2058
+ /** Sort by the `vendor` value. */
2059
+ ProductSortKeys["Vendor"] = "VENDOR";
2060
+ })(ProductSortKeys || (ProductSortKeys = {}));
2061
+ /** The set of valid sort keys for the ProductVariant query. */
2062
+ var ProductVariantSortKeys;
2063
+ (function (ProductVariantSortKeys) {
2064
+ /** Sort by the `id` value. */
2065
+ ProductVariantSortKeys["Id"] = "ID";
2066
+ /** Sort by the `position` value. */
2067
+ ProductVariantSortKeys["Position"] = "POSITION";
2068
+ /**
2069
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
2070
+ * Don't use this sort key when no search query is specified.
2071
+ *
2072
+ */
2073
+ ProductVariantSortKeys["Relevance"] = "RELEVANCE";
2074
+ /** Sort by the `sku` value. */
2075
+ ProductVariantSortKeys["Sku"] = "SKU";
2076
+ /** Sort by the `title` value. */
2077
+ ProductVariantSortKeys["Title"] = "TITLE";
2078
+ })(ProductVariantSortKeys || (ProductVariantSortKeys = {}));
2079
+ /** Specifies whether to perform a partial word match on the last search term. */
2080
+ var SearchPrefixQueryType;
2081
+ (function (SearchPrefixQueryType) {
2082
+ /** Perform a partial word match on the last search term. */
2083
+ SearchPrefixQueryType["Last"] = "LAST";
2084
+ /** Don't perform a partial word match on the last search term. */
2085
+ SearchPrefixQueryType["None"] = "NONE";
2086
+ })(SearchPrefixQueryType || (SearchPrefixQueryType = {}));
2087
+ /** The set of valid sort keys for the search query. */
2088
+ var SearchSortKeys;
2089
+ (function (SearchSortKeys) {
2090
+ /** Sort by the `price` value. */
2091
+ SearchSortKeys["Price"] = "PRICE";
2092
+ /** Sort by relevance to the search terms. */
2093
+ SearchSortKeys["Relevance"] = "RELEVANCE";
2094
+ })(SearchSortKeys || (SearchSortKeys = {}));
2095
+ /** The types of search items to perform search within. */
2096
+ var SearchType;
2097
+ (function (SearchType) {
2098
+ /** Returns matching articles. */
2099
+ SearchType["Article"] = "ARTICLE";
2100
+ /** Returns matching pages. */
2101
+ SearchType["Page"] = "PAGE";
2102
+ /** Returns matching products. */
2103
+ SearchType["Product"] = "PRODUCT";
2104
+ })(SearchType || (SearchType = {}));
2105
+ /** Specifies whether to display results for unavailable products. */
2106
+ var SearchUnavailableProductsType;
2107
+ (function (SearchUnavailableProductsType) {
2108
+ /** Exclude unavailable products. */
2109
+ SearchUnavailableProductsType["Hide"] = "HIDE";
2110
+ /** Show unavailable products after all other matching results. This is the default. */
2111
+ SearchUnavailableProductsType["Last"] = "LAST";
2112
+ /** Show unavailable products in the order that they're found. */
2113
+ SearchUnavailableProductsType["Show"] = "SHOW";
2114
+ })(SearchUnavailableProductsType || (SearchUnavailableProductsType = {}));
2115
+ /** Specifies the list of resource fields to search. */
2116
+ var SearchableField;
2117
+ (function (SearchableField) {
2118
+ /** Author of the page or article. */
2119
+ SearchableField["Author"] = "AUTHOR";
2120
+ /** Body of the page or article or product description or collection description. */
2121
+ SearchableField["Body"] = "BODY";
2122
+ /** Product type. */
2123
+ SearchableField["ProductType"] = "PRODUCT_TYPE";
2124
+ /** Tag associated with the product or article. */
2125
+ SearchableField["Tag"] = "TAG";
2126
+ /** Title of the page or article or product title or collection title. */
2127
+ SearchableField["Title"] = "TITLE";
2128
+ /** Variant barcode. */
2129
+ SearchableField["VariantsBarcode"] = "VARIANTS_BARCODE";
2130
+ /** Variant SKU. */
2131
+ SearchableField["VariantsSku"] = "VARIANTS_SKU";
2132
+ /** Variant title. */
2133
+ SearchableField["VariantsTitle"] = "VARIANTS_TITLE";
2134
+ /** Product vendor. */
2135
+ SearchableField["Vendor"] = "VENDOR";
2136
+ })(SearchableField || (SearchableField = {}));
2137
+ /** The checkout charge when the full amount isn't charged at checkout. */
2138
+ var SellingPlanCheckoutChargeType;
2139
+ (function (SellingPlanCheckoutChargeType) {
2140
+ /** The checkout charge is a percentage of the product or variant price. */
2141
+ SellingPlanCheckoutChargeType["Percentage"] = "PERCENTAGE";
2142
+ /** The checkout charge is a fixed price amount. */
2143
+ SellingPlanCheckoutChargeType["Price"] = "PRICE";
2144
+ })(SellingPlanCheckoutChargeType || (SellingPlanCheckoutChargeType = {}));
2145
+ /** Represents a valid selling plan interval. */
2146
+ var SellingPlanInterval;
2147
+ (function (SellingPlanInterval) {
2148
+ /** Day interval. */
2149
+ SellingPlanInterval["Day"] = "DAY";
2150
+ /** Month interval. */
2151
+ SellingPlanInterval["Month"] = "MONTH";
2152
+ /** Week interval. */
2153
+ SellingPlanInterval["Week"] = "WEEK";
2154
+ /** Year interval. */
2155
+ SellingPlanInterval["Year"] = "YEAR";
2156
+ })(SellingPlanInterval || (SellingPlanInterval = {}));
2157
+ /** The payment frequency for a Shop Pay Installments Financing Plan. */
2158
+ var ShopPayInstallmentsFinancingPlanFrequency;
2159
+ (function (ShopPayInstallmentsFinancingPlanFrequency) {
2160
+ /** Monthly payment frequency. */
2161
+ ShopPayInstallmentsFinancingPlanFrequency["Monthly"] = "MONTHLY";
2162
+ /** Weekly payment frequency. */
2163
+ ShopPayInstallmentsFinancingPlanFrequency["Weekly"] = "WEEKLY";
2164
+ })(ShopPayInstallmentsFinancingPlanFrequency || (ShopPayInstallmentsFinancingPlanFrequency = {}));
2165
+ /** The loan type for a Shop Pay Installments Financing Plan Term. */
2166
+ var ShopPayInstallmentsLoan;
2167
+ (function (ShopPayInstallmentsLoan) {
2168
+ /** An interest-bearing loan type. */
2169
+ ShopPayInstallmentsLoan["Interest"] = "INTEREST";
2170
+ /** A split-pay loan type. */
2171
+ ShopPayInstallmentsLoan["SplitPay"] = "SPLIT_PAY";
2172
+ /** A zero-percent loan type. */
2173
+ ShopPayInstallmentsLoan["ZeroPercent"] = "ZERO_PERCENT";
2174
+ })(ShopPayInstallmentsLoan || (ShopPayInstallmentsLoan = {}));
2175
+ /** Represents the delivery method type for a Shop Pay payment request. */
2176
+ var ShopPayPaymentRequestDeliveryMethodType;
2177
+ (function (ShopPayPaymentRequestDeliveryMethodType) {
2178
+ /** The delivery method type is pickup. */
2179
+ ShopPayPaymentRequestDeliveryMethodType["Pickup"] = "PICKUP";
2180
+ /** The delivery method type is shipping. */
2181
+ ShopPayPaymentRequestDeliveryMethodType["Shipping"] = "SHIPPING";
2182
+ })(ShopPayPaymentRequestDeliveryMethodType || (ShopPayPaymentRequestDeliveryMethodType = {}));
2183
+ /** The types of resources potentially present in a sitemap. */
2184
+ var SitemapType;
2185
+ (function (SitemapType) {
2186
+ /** Articles present in the sitemap. */
2187
+ SitemapType["Article"] = "ARTICLE";
2188
+ /** Blogs present in the sitemap. */
2189
+ SitemapType["Blog"] = "BLOG";
2190
+ /** Collections present in the sitemap. */
2191
+ SitemapType["Collection"] = "COLLECTION";
2192
+ /**
2193
+ * Metaobjects present in the sitemap. Only metaobject types with the
2194
+ * [`renderable` capability](https://shopify.dev/docs/apps/build/custom-data/metaobjects/use-metaobject-capabilities#render-metaobjects-as-web-pages)
2195
+ * are included in sitemap.
2196
+ *
2197
+ */
2198
+ SitemapType["Metaobject"] = "METAOBJECT";
2199
+ /** Pages present in the sitemap. */
2200
+ SitemapType["Page"] = "PAGE";
2201
+ /** Products present in the sitemap. */
2202
+ SitemapType["Product"] = "PRODUCT";
2203
+ })(SitemapType || (SitemapType = {}));
2204
+ /** The code of the error that occurred during cart submit for completion. */
2205
+ var SubmissionErrorCode;
2206
+ (function (SubmissionErrorCode) {
2207
+ SubmissionErrorCode["BuyerIdentityEmailIsInvalid"] = "BUYER_IDENTITY_EMAIL_IS_INVALID";
2208
+ SubmissionErrorCode["BuyerIdentityEmailRequired"] = "BUYER_IDENTITY_EMAIL_REQUIRED";
2209
+ SubmissionErrorCode["BuyerIdentityPhoneIsInvalid"] = "BUYER_IDENTITY_PHONE_IS_INVALID";
2210
+ SubmissionErrorCode["DeliveryAddress1Invalid"] = "DELIVERY_ADDRESS1_INVALID";
2211
+ SubmissionErrorCode["DeliveryAddress1Required"] = "DELIVERY_ADDRESS1_REQUIRED";
2212
+ SubmissionErrorCode["DeliveryAddress1TooLong"] = "DELIVERY_ADDRESS1_TOO_LONG";
2213
+ SubmissionErrorCode["DeliveryAddress2Invalid"] = "DELIVERY_ADDRESS2_INVALID";
2214
+ SubmissionErrorCode["DeliveryAddress2Required"] = "DELIVERY_ADDRESS2_REQUIRED";
2215
+ SubmissionErrorCode["DeliveryAddress2TooLong"] = "DELIVERY_ADDRESS2_TOO_LONG";
2216
+ SubmissionErrorCode["DeliveryAddressRequired"] = "DELIVERY_ADDRESS_REQUIRED";
2217
+ SubmissionErrorCode["DeliveryCityInvalid"] = "DELIVERY_CITY_INVALID";
2218
+ SubmissionErrorCode["DeliveryCityRequired"] = "DELIVERY_CITY_REQUIRED";
2219
+ SubmissionErrorCode["DeliveryCityTooLong"] = "DELIVERY_CITY_TOO_LONG";
2220
+ SubmissionErrorCode["DeliveryCompanyInvalid"] = "DELIVERY_COMPANY_INVALID";
2221
+ SubmissionErrorCode["DeliveryCompanyRequired"] = "DELIVERY_COMPANY_REQUIRED";
2222
+ SubmissionErrorCode["DeliveryCompanyTooLong"] = "DELIVERY_COMPANY_TOO_LONG";
2223
+ SubmissionErrorCode["DeliveryCountryRequired"] = "DELIVERY_COUNTRY_REQUIRED";
2224
+ SubmissionErrorCode["DeliveryFirstNameInvalid"] = "DELIVERY_FIRST_NAME_INVALID";
2225
+ SubmissionErrorCode["DeliveryFirstNameRequired"] = "DELIVERY_FIRST_NAME_REQUIRED";
2226
+ SubmissionErrorCode["DeliveryFirstNameTooLong"] = "DELIVERY_FIRST_NAME_TOO_LONG";
2227
+ SubmissionErrorCode["DeliveryInvalidPostalCodeForCountry"] = "DELIVERY_INVALID_POSTAL_CODE_FOR_COUNTRY";
2228
+ SubmissionErrorCode["DeliveryInvalidPostalCodeForZone"] = "DELIVERY_INVALID_POSTAL_CODE_FOR_ZONE";
2229
+ SubmissionErrorCode["DeliveryLastNameInvalid"] = "DELIVERY_LAST_NAME_INVALID";
2230
+ SubmissionErrorCode["DeliveryLastNameRequired"] = "DELIVERY_LAST_NAME_REQUIRED";
2231
+ SubmissionErrorCode["DeliveryLastNameTooLong"] = "DELIVERY_LAST_NAME_TOO_LONG";
2232
+ SubmissionErrorCode["DeliveryNoDeliveryAvailable"] = "DELIVERY_NO_DELIVERY_AVAILABLE";
2233
+ SubmissionErrorCode["DeliveryNoDeliveryAvailableForMerchandiseLine"] = "DELIVERY_NO_DELIVERY_AVAILABLE_FOR_MERCHANDISE_LINE";
2234
+ SubmissionErrorCode["DeliveryOptionsPhoneNumberInvalid"] = "DELIVERY_OPTIONS_PHONE_NUMBER_INVALID";
2235
+ SubmissionErrorCode["DeliveryOptionsPhoneNumberRequired"] = "DELIVERY_OPTIONS_PHONE_NUMBER_REQUIRED";
2236
+ SubmissionErrorCode["DeliveryPhoneNumberInvalid"] = "DELIVERY_PHONE_NUMBER_INVALID";
2237
+ SubmissionErrorCode["DeliveryPhoneNumberRequired"] = "DELIVERY_PHONE_NUMBER_REQUIRED";
2238
+ SubmissionErrorCode["DeliveryPostalCodeInvalid"] = "DELIVERY_POSTAL_CODE_INVALID";
2239
+ SubmissionErrorCode["DeliveryPostalCodeRequired"] = "DELIVERY_POSTAL_CODE_REQUIRED";
2240
+ SubmissionErrorCode["DeliveryZoneNotFound"] = "DELIVERY_ZONE_NOT_FOUND";
2241
+ SubmissionErrorCode["DeliveryZoneRequiredForCountry"] = "DELIVERY_ZONE_REQUIRED_FOR_COUNTRY";
2242
+ SubmissionErrorCode["Error"] = "ERROR";
2243
+ SubmissionErrorCode["MerchandiseLineLimitReached"] = "MERCHANDISE_LINE_LIMIT_REACHED";
2244
+ SubmissionErrorCode["MerchandiseNotApplicable"] = "MERCHANDISE_NOT_APPLICABLE";
2245
+ SubmissionErrorCode["MerchandiseNotEnoughStockAvailable"] = "MERCHANDISE_NOT_ENOUGH_STOCK_AVAILABLE";
2246
+ SubmissionErrorCode["MerchandiseOutOfStock"] = "MERCHANDISE_OUT_OF_STOCK";
2247
+ SubmissionErrorCode["MerchandiseProductNotPublished"] = "MERCHANDISE_PRODUCT_NOT_PUBLISHED";
2248
+ SubmissionErrorCode["NoDeliveryGroupSelected"] = "NO_DELIVERY_GROUP_SELECTED";
2249
+ SubmissionErrorCode["PaymentsAddress1Invalid"] = "PAYMENTS_ADDRESS1_INVALID";
2250
+ SubmissionErrorCode["PaymentsAddress1Required"] = "PAYMENTS_ADDRESS1_REQUIRED";
2251
+ SubmissionErrorCode["PaymentsAddress1TooLong"] = "PAYMENTS_ADDRESS1_TOO_LONG";
2252
+ SubmissionErrorCode["PaymentsAddress2Invalid"] = "PAYMENTS_ADDRESS2_INVALID";
2253
+ SubmissionErrorCode["PaymentsAddress2Required"] = "PAYMENTS_ADDRESS2_REQUIRED";
2254
+ SubmissionErrorCode["PaymentsAddress2TooLong"] = "PAYMENTS_ADDRESS2_TOO_LONG";
2255
+ SubmissionErrorCode["PaymentsBillingAddressZoneNotFound"] = "PAYMENTS_BILLING_ADDRESS_ZONE_NOT_FOUND";
2256
+ SubmissionErrorCode["PaymentsBillingAddressZoneRequiredForCountry"] = "PAYMENTS_BILLING_ADDRESS_ZONE_REQUIRED_FOR_COUNTRY";
2257
+ SubmissionErrorCode["PaymentsCityInvalid"] = "PAYMENTS_CITY_INVALID";
2258
+ SubmissionErrorCode["PaymentsCityRequired"] = "PAYMENTS_CITY_REQUIRED";
2259
+ SubmissionErrorCode["PaymentsCityTooLong"] = "PAYMENTS_CITY_TOO_LONG";
2260
+ SubmissionErrorCode["PaymentsCompanyInvalid"] = "PAYMENTS_COMPANY_INVALID";
2261
+ SubmissionErrorCode["PaymentsCompanyRequired"] = "PAYMENTS_COMPANY_REQUIRED";
2262
+ SubmissionErrorCode["PaymentsCompanyTooLong"] = "PAYMENTS_COMPANY_TOO_LONG";
2263
+ SubmissionErrorCode["PaymentsCountryRequired"] = "PAYMENTS_COUNTRY_REQUIRED";
2264
+ SubmissionErrorCode["PaymentsCreditCardBaseExpired"] = "PAYMENTS_CREDIT_CARD_BASE_EXPIRED";
2265
+ SubmissionErrorCode["PaymentsCreditCardBaseGatewayNotSupported"] = "PAYMENTS_CREDIT_CARD_BASE_GATEWAY_NOT_SUPPORTED";
2266
+ SubmissionErrorCode["PaymentsCreditCardBaseInvalidStartDateOrIssueNumberForDebit"] = "PAYMENTS_CREDIT_CARD_BASE_INVALID_START_DATE_OR_ISSUE_NUMBER_FOR_DEBIT";
2267
+ SubmissionErrorCode["PaymentsCreditCardBrandNotSupported"] = "PAYMENTS_CREDIT_CARD_BRAND_NOT_SUPPORTED";
2268
+ SubmissionErrorCode["PaymentsCreditCardFirstNameBlank"] = "PAYMENTS_CREDIT_CARD_FIRST_NAME_BLANK";
2269
+ SubmissionErrorCode["PaymentsCreditCardGeneric"] = "PAYMENTS_CREDIT_CARD_GENERIC";
2270
+ SubmissionErrorCode["PaymentsCreditCardLastNameBlank"] = "PAYMENTS_CREDIT_CARD_LAST_NAME_BLANK";
2271
+ SubmissionErrorCode["PaymentsCreditCardMonthInclusion"] = "PAYMENTS_CREDIT_CARD_MONTH_INCLUSION";
2272
+ SubmissionErrorCode["PaymentsCreditCardNameInvalid"] = "PAYMENTS_CREDIT_CARD_NAME_INVALID";
2273
+ SubmissionErrorCode["PaymentsCreditCardNumberInvalid"] = "PAYMENTS_CREDIT_CARD_NUMBER_INVALID";
2274
+ SubmissionErrorCode["PaymentsCreditCardNumberInvalidFormat"] = "PAYMENTS_CREDIT_CARD_NUMBER_INVALID_FORMAT";
2275
+ SubmissionErrorCode["PaymentsCreditCardSessionId"] = "PAYMENTS_CREDIT_CARD_SESSION_ID";
2276
+ SubmissionErrorCode["PaymentsCreditCardVerificationValueBlank"] = "PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_BLANK";
2277
+ SubmissionErrorCode["PaymentsCreditCardVerificationValueInvalidForCardType"] = "PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_INVALID_FOR_CARD_TYPE";
2278
+ SubmissionErrorCode["PaymentsCreditCardYearExpired"] = "PAYMENTS_CREDIT_CARD_YEAR_EXPIRED";
2279
+ SubmissionErrorCode["PaymentsCreditCardYearInvalidExpiryYear"] = "PAYMENTS_CREDIT_CARD_YEAR_INVALID_EXPIRY_YEAR";
2280
+ SubmissionErrorCode["PaymentsFirstNameInvalid"] = "PAYMENTS_FIRST_NAME_INVALID";
2281
+ SubmissionErrorCode["PaymentsFirstNameRequired"] = "PAYMENTS_FIRST_NAME_REQUIRED";
2282
+ SubmissionErrorCode["PaymentsFirstNameTooLong"] = "PAYMENTS_FIRST_NAME_TOO_LONG";
2283
+ SubmissionErrorCode["PaymentsInvalidPostalCodeForCountry"] = "PAYMENTS_INVALID_POSTAL_CODE_FOR_COUNTRY";
2284
+ SubmissionErrorCode["PaymentsInvalidPostalCodeForZone"] = "PAYMENTS_INVALID_POSTAL_CODE_FOR_ZONE";
2285
+ SubmissionErrorCode["PaymentsLastNameInvalid"] = "PAYMENTS_LAST_NAME_INVALID";
2286
+ SubmissionErrorCode["PaymentsLastNameRequired"] = "PAYMENTS_LAST_NAME_REQUIRED";
2287
+ SubmissionErrorCode["PaymentsLastNameTooLong"] = "PAYMENTS_LAST_NAME_TOO_LONG";
2288
+ SubmissionErrorCode["PaymentsMethodRequired"] = "PAYMENTS_METHOD_REQUIRED";
2289
+ SubmissionErrorCode["PaymentsMethodUnavailable"] = "PAYMENTS_METHOD_UNAVAILABLE";
2290
+ SubmissionErrorCode["PaymentsPhoneNumberInvalid"] = "PAYMENTS_PHONE_NUMBER_INVALID";
2291
+ SubmissionErrorCode["PaymentsPhoneNumberRequired"] = "PAYMENTS_PHONE_NUMBER_REQUIRED";
2292
+ SubmissionErrorCode["PaymentsPostalCodeInvalid"] = "PAYMENTS_POSTAL_CODE_INVALID";
2293
+ SubmissionErrorCode["PaymentsPostalCodeRequired"] = "PAYMENTS_POSTAL_CODE_REQUIRED";
2294
+ SubmissionErrorCode["PaymentsShopifyPaymentsRequired"] = "PAYMENTS_SHOPIFY_PAYMENTS_REQUIRED";
2295
+ SubmissionErrorCode["PaymentsUnacceptablePaymentAmount"] = "PAYMENTS_UNACCEPTABLE_PAYMENT_AMOUNT";
2296
+ SubmissionErrorCode["PaymentsWalletContentMissing"] = "PAYMENTS_WALLET_CONTENT_MISSING";
2297
+ SubmissionErrorCode["TaxesDeliveryGroupIdNotFound"] = "TAXES_DELIVERY_GROUP_ID_NOT_FOUND";
2298
+ SubmissionErrorCode["TaxesLineIdNotFound"] = "TAXES_LINE_ID_NOT_FOUND";
2299
+ SubmissionErrorCode["TaxesMustBeDefined"] = "TAXES_MUST_BE_DEFINED";
2300
+ })(SubmissionErrorCode || (SubmissionErrorCode = {}));
2301
+ /** The accepted types of unit of measurement. */
2302
+ var UnitPriceMeasurementMeasuredType;
2303
+ (function (UnitPriceMeasurementMeasuredType) {
2304
+ /** Unit of measurements representing areas. */
2305
+ UnitPriceMeasurementMeasuredType["Area"] = "AREA";
2306
+ /** Unit of measurements representing lengths. */
2307
+ UnitPriceMeasurementMeasuredType["Length"] = "LENGTH";
2308
+ /** Unit of measurements representing volumes. */
2309
+ UnitPriceMeasurementMeasuredType["Volume"] = "VOLUME";
2310
+ /** Unit of measurements representing weights. */
2311
+ UnitPriceMeasurementMeasuredType["Weight"] = "WEIGHT";
2312
+ })(UnitPriceMeasurementMeasuredType || (UnitPriceMeasurementMeasuredType = {}));
2313
+ /** The valid units of measurement for a unit price measurement. */
2314
+ var UnitPriceMeasurementMeasuredUnit;
2315
+ (function (UnitPriceMeasurementMeasuredUnit) {
2316
+ /** 100 centiliters equals 1 liter. */
2317
+ UnitPriceMeasurementMeasuredUnit["Cl"] = "CL";
2318
+ /** 100 centimeters equals 1 meter. */
2319
+ UnitPriceMeasurementMeasuredUnit["Cm"] = "CM";
2320
+ /** Metric system unit of weight. */
2321
+ UnitPriceMeasurementMeasuredUnit["G"] = "G";
2322
+ /** 1 kilogram equals 1000 grams. */
2323
+ UnitPriceMeasurementMeasuredUnit["Kg"] = "KG";
2324
+ /** Metric system unit of volume. */
2325
+ UnitPriceMeasurementMeasuredUnit["L"] = "L";
2326
+ /** Metric system unit of length. */
2327
+ UnitPriceMeasurementMeasuredUnit["M"] = "M";
2328
+ /** Metric system unit of area. */
2329
+ UnitPriceMeasurementMeasuredUnit["M2"] = "M2";
2330
+ /** 1 cubic meter equals 1000 liters. */
2331
+ UnitPriceMeasurementMeasuredUnit["M3"] = "M3";
2332
+ /** 1000 milligrams equals 1 gram. */
2333
+ UnitPriceMeasurementMeasuredUnit["Mg"] = "MG";
2334
+ /** 1000 milliliters equals 1 liter. */
2335
+ UnitPriceMeasurementMeasuredUnit["Ml"] = "ML";
2336
+ /** 1000 millimeters equals 1 meter. */
2337
+ UnitPriceMeasurementMeasuredUnit["Mm"] = "MM";
2338
+ })(UnitPriceMeasurementMeasuredUnit || (UnitPriceMeasurementMeasuredUnit = {}));
2339
+ /** Systems of weights and measures. */
2340
+ var UnitSystem;
2341
+ (function (UnitSystem) {
2342
+ /** Imperial system of weights and measures. */
2343
+ UnitSystem["ImperialSystem"] = "IMPERIAL_SYSTEM";
2344
+ /** Metric system of weights and measures. */
2345
+ UnitSystem["MetricSystem"] = "METRIC_SYSTEM";
2346
+ })(UnitSystem || (UnitSystem = {}));
2347
+ /** Possible error codes that can be returned by `ShopPayPaymentRequestSessionUserErrors`. */
2348
+ var UserErrorsShopPayPaymentRequestSessionUserErrorsCode;
2349
+ (function (UserErrorsShopPayPaymentRequestSessionUserErrorsCode) {
2350
+ /** Idempotency key has already been used. */
2351
+ UserErrorsShopPayPaymentRequestSessionUserErrorsCode["IdempotencyKeyAlreadyUsed"] = "IDEMPOTENCY_KEY_ALREADY_USED";
2352
+ /** Payment request input is invalid. */
2353
+ UserErrorsShopPayPaymentRequestSessionUserErrorsCode["PaymentRequestInvalidInput"] = "PAYMENT_REQUEST_INVALID_INPUT";
2354
+ /** Payment request not found. */
2355
+ UserErrorsShopPayPaymentRequestSessionUserErrorsCode["PaymentRequestNotFound"] = "PAYMENT_REQUEST_NOT_FOUND";
2356
+ })(UserErrorsShopPayPaymentRequestSessionUserErrorsCode || (UserErrorsShopPayPaymentRequestSessionUserErrorsCode = {}));
2357
+ /** Units of measurement for weight. */
2358
+ var WeightUnit;
2359
+ (function (WeightUnit) {
2360
+ /** Metric system unit of mass. */
2361
+ WeightUnit["Grams"] = "GRAMS";
2362
+ /** 1 kilogram equals 1000 grams. */
2363
+ WeightUnit["Kilograms"] = "KILOGRAMS";
2364
+ /** Imperial system unit of mass. */
2365
+ WeightUnit["Ounces"] = "OUNCES";
2366
+ /** 1 pound equals 16 ounces. */
2367
+ WeightUnit["Pounds"] = "POUNDS";
2368
+ })(WeightUnit || (WeightUnit = {}));
2369
+ var TypedDocumentString = /*#__PURE__*/function (_String) {
2370
+ function TypedDocumentString(value, __meta__) {
2371
+ var _this;
2372
+ _this = _String.call(this, value) || this;
2373
+ _this.value = value;
2374
+ _this.__meta__ = __meta__;
2375
+ return _this;
2376
+ }
2377
+ _inheritsLoose(TypedDocumentString, _String);
2378
+ var _proto = TypedDocumentString.prototype;
2379
+ _proto.toString = function toString() {
2380
+ return this.value;
2381
+ };
2382
+ return TypedDocumentString;
2383
+ }(/*#__PURE__*/_wrapNativeSuper(String));
2384
+ var ImageFragmentDoc = /*#__PURE__*/new TypedDocumentString("\n fragment image on Image {\n url\n altText\n width\n height\n}\n ", {
2385
+ fragmentName: "image"
2386
+ });
2387
+ var ProductVariantFragmentDoc = /*#__PURE__*/new TypedDocumentString("\n fragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\n fragment image on Image {\n url\n altText\n width\n height\n}", {
2388
+ fragmentName: "productVariant"
2389
+ });
2390
+ var SeoFragmentDoc = /*#__PURE__*/new TypedDocumentString("\n fragment seo on SEO {\n description\n title\n}\n ", {
2391
+ fragmentName: "seo"
2392
+ });
2393
+ var ProductFragmentDoc = /*#__PURE__*/new TypedDocumentString("\n fragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\n fragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment seo on SEO {\n description\n title\n}", {
2394
+ fragmentName: "product"
2395
+ });
2396
+ var CartFragmentDoc = /*#__PURE__*/new TypedDocumentString("\n fragment cart on Cart {\n id\n createdAt\n checkoutUrl\n cost {\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n totalTaxAmount {\n amount\n currencyCode\n }\n }\n lines(first: 100) {\n edges {\n node {\n id\n quantity\n cost {\n totalAmount {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n ...productVariant\n product {\n ...product\n }\n }\n }\n }\n }\n }\n totalQuantity\n}\n fragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\nfragment seo on SEO {\n description\n title\n}", {
2397
+ fragmentName: "cart"
2398
+ });
2399
+ var CollectionFragmentDoc = /*#__PURE__*/new TypedDocumentString("\n fragment collection on Collection {\n id\n title\n handle\n image {\n ...image\n }\n}\n fragment image on Image {\n url\n altText\n width\n height\n}", {
2400
+ fragmentName: "collection"
2401
+ });
2402
+ var AddToCartDocument = /*#__PURE__*/new TypedDocumentString("\n mutation addToCart($cartId: ID!, $lines: [CartLineInput!]!) {\n cartLinesAdd(cartId: $cartId, lines: $lines) {\n cart {\n ...cart\n }\n }\n}\n fragment cart on Cart {\n id\n createdAt\n checkoutUrl\n cost {\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n totalTaxAmount {\n amount\n currencyCode\n }\n }\n lines(first: 100) {\n edges {\n node {\n id\n quantity\n cost {\n totalAmount {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n ...productVariant\n product {\n ...product\n }\n }\n }\n }\n }\n }\n totalQuantity\n}\nfragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\nfragment seo on SEO {\n description\n title\n}");
2403
+ var CreateCartDocument = /*#__PURE__*/new TypedDocumentString("\n mutation createCart($lines: [CartLineInput!]) {\n cartCreate(input: {lines: $lines}) {\n cart {\n ...cart\n }\n }\n}\n fragment cart on Cart {\n id\n createdAt\n checkoutUrl\n cost {\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n totalTaxAmount {\n amount\n currencyCode\n }\n }\n lines(first: 100) {\n edges {\n node {\n id\n quantity\n cost {\n totalAmount {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n ...productVariant\n product {\n ...product\n }\n }\n }\n }\n }\n }\n totalQuantity\n}\nfragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\nfragment seo on SEO {\n description\n title\n}");
2404
+ var EditCartItemsDocument = /*#__PURE__*/new TypedDocumentString("\n mutation editCartItems($cartId: ID!, $lines: [CartLineUpdateInput!]!) {\n cartLinesUpdate(cartId: $cartId, lines: $lines) {\n cart {\n ...cart\n }\n }\n}\n fragment cart on Cart {\n id\n createdAt\n checkoutUrl\n cost {\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n totalTaxAmount {\n amount\n currencyCode\n }\n }\n lines(first: 100) {\n edges {\n node {\n id\n quantity\n cost {\n totalAmount {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n ...productVariant\n product {\n ...product\n }\n }\n }\n }\n }\n }\n totalQuantity\n}\nfragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\nfragment seo on SEO {\n description\n title\n}");
2405
+ var RemoveFromCartDocument = /*#__PURE__*/new TypedDocumentString("\n mutation removeFromCart($cartId: ID!, $lineIds: [ID!]!) {\n cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {\n cart {\n ...cart\n }\n }\n}\n fragment cart on Cart {\n id\n createdAt\n checkoutUrl\n cost {\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n totalTaxAmount {\n amount\n currencyCode\n }\n }\n lines(first: 100) {\n edges {\n node {\n id\n quantity\n cost {\n totalAmount {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n ...productVariant\n product {\n ...product\n }\n }\n }\n }\n }\n }\n totalQuantity\n}\nfragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\nfragment seo on SEO {\n description\n title\n}");
2406
+ var CustomerActivateByUrlDocument = /*#__PURE__*/new TypedDocumentString("\n mutation customerActivateByUrl($activationUrl: URL!, $password: String!) {\n customerActivateByUrl(activationUrl: $activationUrl, password: $password) {\n customer {\n id\n }\n customerAccessToken {\n accessToken\n expiresAt\n }\n customerUserErrors {\n code\n field\n message\n }\n }\n}\n ");
2407
+ var GetSiteCollectionsDocument = /*#__PURE__*/new TypedDocumentString("\n query getSiteCollections($first: Int!) {\n collections(first: $first) {\n edges {\n node {\n ...collection\n products(first: $first) {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n }\n}\n fragment collection on Collection {\n id\n title\n handle\n image {\n ...image\n }\n}\nfragment image on Image {\n url\n altText\n width\n height\n}");
2408
+ var GetAllProductVendorsDocument = /*#__PURE__*/new TypedDocumentString("\n query getAllProductVendors($first: Int = 250, $cursor: String) {\n products(first: $first, after: $cursor) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n edges {\n node {\n vendor\n }\n cursor\n }\n }\n}\n ");
2409
+ var GetAllProductsDocument = /*#__PURE__*/new TypedDocumentString("\n query getAllProducts($first: Int = 250, $query: String = \"\", $sortKey: ProductSortKeys = RELEVANCE, $reverse: Boolean = false) {\n products(first: $first, sortKey: $sortKey, reverse: $reverse, query: $query) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n edges {\n node {\n ...product\n }\n }\n }\n}\n fragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\nfragment seo on SEO {\n description\n title\n}");
2410
+ var GetCartDocument = /*#__PURE__*/new TypedDocumentString("\n query getCart($cartId: ID!) {\n cart(id: $cartId) {\n ...cart\n }\n}\n fragment cart on Cart {\n id\n createdAt\n checkoutUrl\n cost {\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n totalTaxAmount {\n amount\n currencyCode\n }\n }\n lines(first: 100) {\n edges {\n node {\n id\n quantity\n cost {\n totalAmount {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n ...productVariant\n product {\n ...product\n }\n }\n }\n }\n }\n }\n totalQuantity\n}\nfragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\nfragment seo on SEO {\n description\n title\n}");
2411
+ var GetProductsFromCollectionDocument = /*#__PURE__*/new TypedDocumentString("\n query getProductsFromCollection($categoryId: ID!, $first: Int = 250, $sortKey: ProductCollectionSortKeys = RELEVANCE, $reverse: Boolean = false) {\n node(id: $categoryId) {\n id\n ... on Collection {\n ...collection\n products(first: $first, sortKey: $sortKey, reverse: $reverse) {\n edges {\n node {\n ...product\n }\n }\n }\n }\n }\n}\n fragment collection on Collection {\n id\n title\n handle\n image {\n ...image\n }\n}\nfragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\nfragment seo on SEO {\n description\n title\n}");
2412
+ var GetSiteCollectionDocument = /*#__PURE__*/new TypedDocumentString("\n query getSiteCollection($id: ID, $handle: String, $first: Int = 1) {\n collection(id: $id, handle: $handle) {\n ...collection\n products(first: $first) {\n edges {\n node {\n id\n }\n }\n }\n }\n}\n fragment collection on Collection {\n id\n title\n handle\n image {\n ...image\n }\n}\nfragment image on Image {\n url\n altText\n width\n height\n}");
2413
+ var GetProductBySlugDocument = /*#__PURE__*/new TypedDocumentString("\n query getProductBySlug($slug: String!) {\n productByHandle(handle: $slug) {\n ...product\n }\n}\n fragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\nfragment seo on SEO {\n description\n title\n}");
2414
+ var GetProductByIdDocument = /*#__PURE__*/new TypedDocumentString("\n query getProductById($id: ID!) {\n product(id: $id) {\n ...product\n }\n}\n fragment image on Image {\n url\n altText\n width\n height\n}\nfragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n}\nfragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n}\nfragment seo on SEO {\n description\n title\n}");
2415
+
2416
+ /* eslint-disable */
2417
+ /**
2418
+ * Map of all GraphQL operations in the project.
2419
+ *
2420
+ * This map has several performance disadvantages:
2421
+ * 1. It is not tree-shakeable, so it will include all operations in the project.
2422
+ * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
2423
+ * 3. It does not support dead code elimination, so it will add unused operations.
2424
+ *
2425
+ * Therefore it is highly recommended to use the babel or swc plugin for production.
2426
+ * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
2427
+ */
2428
+ var documents = {
2429
+ "\n fragment cart on Cart {\n id\n createdAt\n checkoutUrl\n cost {\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n totalTaxAmount {\n amount\n currencyCode\n }\n }\n lines(first: 100) {\n edges {\n node {\n id\n quantity\n cost {\n totalAmount {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n ...productVariant\n product {\n ...product\n }\n }\n }\n }\n }\n }\n totalQuantity\n }\n": CartFragmentDoc,
2430
+ "\n fragment collection on Collection {\n id\n title\n handle\n image {\n ...image\n }\n }\n": CollectionFragmentDoc,
2431
+ "\n fragment image on Image {\n url\n altText\n width\n height\n }\n": ImageFragmentDoc,
2432
+ "\n fragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n }\n": ProductVariantFragmentDoc,
2433
+ "\n fragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n }\n": ProductFragmentDoc,
2434
+ "\n fragment seo on SEO {\n description\n title\n }\n": SeoFragmentDoc,
2435
+ "\n mutation addToCart($cartId: ID!, $lines: [CartLineInput!]!) {\n cartLinesAdd(cartId: $cartId, lines: $lines) {\n cart {\n ...cart\n }\n }\n }\n": AddToCartDocument,
2436
+ "\n mutation createCart($lines: [CartLineInput!]) {\n cartCreate(input: { lines: $lines }) {\n cart {\n ...cart\n }\n }\n }\n": CreateCartDocument,
2437
+ "\n mutation editCartItems($cartId: ID!, $lines: [CartLineUpdateInput!]!) {\n cartLinesUpdate(cartId: $cartId, lines: $lines) {\n cart {\n ...cart\n }\n }\n }\n": EditCartItemsDocument,
2438
+ "\n mutation removeFromCart($cartId: ID!, $lineIds: [ID!]!) {\n cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {\n cart {\n ...cart\n }\n }\n }\n": RemoveFromCartDocument,
2439
+ "\n mutation customerActivateByUrl($activationUrl: URL!, $password: String!) {\n customerActivateByUrl(activationUrl: $activationUrl, password: $password) {\n customer {\n id\n }\n customerAccessToken {\n accessToken\n expiresAt\n }\n customerUserErrors {\n code\n field\n message\n }\n }\n }\n": CustomerActivateByUrlDocument,
2440
+ "\n query getSiteCollections($first: Int!) {\n collections(first: $first) {\n edges {\n node {\n ...collection\n products(first: $first) {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n }\n }\n": GetSiteCollectionsDocument,
2441
+ "\n query getAllProductVendors($first: Int = 250, $cursor: String) {\n products(first: $first, after: $cursor) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n edges {\n node {\n vendor\n }\n cursor\n }\n }\n }\n": GetAllProductVendorsDocument,
2442
+ '\n query getAllProducts(\n $first: Int = 250\n $query: String = ""\n $sortKey: ProductSortKeys = RELEVANCE\n $reverse: Boolean = false\n ) {\n products(\n first: $first\n sortKey: $sortKey\n reverse: $reverse\n query: $query\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n edges {\n node {\n ...product\n }\n }\n }\n }\n': GetAllProductsDocument,
2443
+ "\n query getCart($cartId: ID!) {\n cart(id: $cartId) {\n ...cart\n }\n }\n": GetCartDocument,
2444
+ "\n query getProductsFromCollection(\n $categoryId: ID!\n $first: Int = 250\n $sortKey: ProductCollectionSortKeys = RELEVANCE\n $reverse: Boolean = false\n ) {\n node(id: $categoryId) {\n id\n ... on Collection {\n ...collection\n products(first: $first, sortKey: $sortKey, reverse: $reverse) {\n edges {\n node {\n ...product\n }\n }\n }\n }\n }\n }\n": GetProductsFromCollectionDocument,
2445
+ "\n query getSiteCollection($id: ID, $handle: String, $first: Int = 1) {\n collection(id: $id, handle: $handle) {\n ...collection\n products(first: $first) {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n": GetSiteCollectionDocument,
2446
+ "\n query getProductBySlug($slug: String!) {\n productByHandle(handle: $slug) {\n ...product\n }\n }\n": GetProductBySlugDocument,
2447
+ "\n query getProductById($id: ID!) {\n product(id: $id) {\n ...product\n }\n }\n": GetProductByIdDocument
2448
+ };
2449
+ function graphql(source) {
2450
+ var _documents$source;
2451
+ return (_documents$source = documents[source]) != null ? _documents$source : {};
2452
+ }
2453
+
2454
+ var addToCartMutation = /*#__PURE__*/graphql("\n mutation addToCart($cartId: ID!, $lines: [CartLineInput!]!) {\n cartLinesAdd(cartId: $cartId, lines: $lines) {\n cart {\n ...cart\n }\n }\n }\n");
2455
+ var createCartMutation = /*#__PURE__*/graphql("\n mutation createCart($lines: [CartLineInput!]) {\n cartCreate(input: { lines: $lines }) {\n cart {\n ...cart\n }\n }\n }\n");
2456
+ var editCartItemsMutation = /*#__PURE__*/graphql("\n mutation editCartItems($cartId: ID!, $lines: [CartLineUpdateInput!]!) {\n cartLinesUpdate(cartId: $cartId, lines: $lines) {\n cart {\n ...cart\n }\n }\n }\n");
2457
+ var removeFromCartMutation = /*#__PURE__*/graphql("\n mutation removeFromCart($cartId: ID!, $lineIds: [ID!]!) {\n cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {\n cart {\n ...cart\n }\n }\n }\n");
2458
+
2459
+ /*
2460
+ Forked from https://github.com/vercel/commerce/tree/main/packages/shopify/src
2461
+ Changes: None
2462
+ */
2463
+ var colorMap = {
2464
+ aliceblue: '#F0F8FF',
2465
+ antiquewhite: '#FAEBD7',
2466
+ aqua: '#00FFFF',
2467
+ aquamarine: '#7FFFD4',
2468
+ azure: '#F0FFFF',
2469
+ beige: '#F5F5DC',
2470
+ bisque: '#FFE4C4',
2471
+ black: '#000000',
2472
+ blanchedalmond: '#FFEBCD',
2473
+ blue: '#0000FF',
2474
+ blueviolet: '#8A2BE2',
2475
+ brown: '#A52A2A',
2476
+ burlywood: '#DEB887',
2477
+ burgandy: '#800020',
2478
+ burgundy: '#800020',
2479
+ cadetblue: '#5F9EA0',
2480
+ chartreuse: '#7FFF00',
2481
+ chocolate: '#D2691E',
2482
+ coral: '#FF7F50',
2483
+ cornflowerblue: '#6495ED',
2484
+ cornsilk: '#FFF8DC',
2485
+ crimson: '#DC143C',
2486
+ cyan: '#00FFFF',
2487
+ darkblue: '#00008B',
2488
+ darkcyan: '#008B8B',
2489
+ darkgoldenrod: '#B8860B',
2490
+ darkgray: '#A9A9A9',
2491
+ darkgreen: '#006400',
2492
+ darkgrey: '#A9A9A9',
2493
+ darkkhaki: '#BDB76B',
2494
+ darkmagenta: '#8B008B',
2495
+ darkolivegreen: '#556B2F',
2496
+ darkorange: '#FF8C00',
2497
+ darkorchid: '#9932CC',
2498
+ darkred: '#8B0000',
2499
+ darksalmon: '#E9967A',
2500
+ darkseagreen: '#8FBC8F',
2501
+ darkslateblue: '#483D8B',
2502
+ darkslategray: '#2F4F4F',
2503
+ darkslategrey: '#2F4F4F',
2504
+ darkturquoise: '#00CED1',
2505
+ darkviolet: '#9400D3',
2506
+ deeppink: '#FF1493',
2507
+ deepskyblue: '#00BFFF',
2508
+ dimgray: '#696969',
2509
+ dimgrey: '#696969',
2510
+ dodgerblue: '#1E90FF',
2511
+ firebrick: '#B22222',
2512
+ floralwhite: '#FFFAF0',
2513
+ forestgreen: '#228B22',
2514
+ fuchsia: '#FF00FF',
2515
+ gainsboro: '#DCDCDC',
2516
+ ghostwhite: '#F8F8FF',
2517
+ gold: '#FFD700',
2518
+ goldenrod: '#DAA520',
2519
+ gray: '#808080',
2520
+ green: '#008000',
2521
+ greenyellow: '#ADFF2F',
2522
+ grey: '#808080',
2523
+ honeydew: '#F0FFF0',
2524
+ hotpink: '#FF69B4',
2525
+ indianred: '#CD5C5C',
2526
+ indigo: '#4B0082',
2527
+ ivory: '#FFFFF0',
2528
+ khaki: '#F0E68C',
2529
+ lavender: '#E6E6FA',
2530
+ lavenderblush: '#FFF0F5',
2531
+ lawngreen: '#7CFC00',
2532
+ lemonchiffon: '#FFFACD',
2533
+ lightblue: '#ADD8E6',
2534
+ lightcoral: '#F08080',
2535
+ lightcyan: '#E0FFFF',
2536
+ lightgoldenrodyellow: '#FAFAD2',
2537
+ lightgray: '#D3D3D3',
2538
+ lightgreen: '#90EE90',
2539
+ lightgrey: '#D3D3D3',
2540
+ lightpink: '#FFB6C1',
2541
+ lightsalmon: '#FFA07A',
2542
+ lightseagreen: '#20B2AA',
2543
+ lightskyblue: '#87CEFA',
2544
+ lightslategray: '#778899',
2545
+ lightslategrey: '#778899',
2546
+ lightsteelblue: '#B0C4DE',
2547
+ lightyellow: '#FFFFE0',
2548
+ lime: '#00FF00',
2549
+ limegreen: '#32CD32',
2550
+ linen: '#FAF0E6',
2551
+ magenta: '#FF00FF',
2552
+ maroon: '#800000',
2553
+ mediumaquamarine: '#66CDAA',
2554
+ mediumblue: '#0000CD',
2555
+ mediumorchid: '#BA55D3',
2556
+ mediumpurple: '#9370DB',
2557
+ mediumseagreen: '#3CB371',
2558
+ mediumslateblue: '#7B68EE',
2559
+ mediumspringgreen: '#00FA9A',
2560
+ mediumturquoise: '#48D1CC',
2561
+ mediumvioletred: '#C71585',
2562
+ midnightblue: '#191970',
2563
+ mintcream: '#F5FFFA',
2564
+ mistyrose: '#FFE4E1',
2565
+ moccasin: '#FFE4B5',
2566
+ navajowhite: '#FFDEAD',
2567
+ navy: '#000080',
2568
+ oldlace: '#FDF5E6',
2569
+ olive: '#808000',
2570
+ olivedrab: '#6B8E23',
2571
+ orange: '#FFA500',
2572
+ orangered: '#FF4500',
2573
+ orchid: '#DA70D6',
2574
+ palegoldenrod: '#EEE8AA',
2575
+ palegreen: '#98FB98',
2576
+ paleturquoise: '#AFEEEE',
2577
+ palevioletred: '#DB7093',
2578
+ papayawhip: '#FFEFD5',
2579
+ peachpuff: '#FFDAB9',
2580
+ peru: '#CD853F',
2581
+ pink: '#FFC0CB',
2582
+ plum: '#DDA0DD',
2583
+ powderblue: '#B0E0E6',
2584
+ purple: '#800080',
2585
+ rebeccapurple: '#663399',
2586
+ red: '#FF0000',
2587
+ rosybrown: '#BC8F8F',
2588
+ royalblue: '#4169E1',
2589
+ saddlebrown: '#8B4513',
2590
+ salmon: '#FA8072',
2591
+ sandybrown: '#F4A460',
2592
+ seagreen: '#2E8B57',
2593
+ seashell: '#FFF5EE',
2594
+ sienna: '#A0522D',
2595
+ silver: '#C0C0C0',
2596
+ skyblue: '#87CEEB',
2597
+ slateblue: '#6A5ACD',
2598
+ slategray: '#708090',
2599
+ slategrey: '#708090',
2600
+ spacegrey: '#65737e',
2601
+ spacegray: '#65737e',
2602
+ snow: '#FFFAFA',
2603
+ springgreen: '#00FF7F',
2604
+ steelblue: '#4682B4',
2605
+ tan: '#D2B48C',
2606
+ teal: '#008080',
2607
+ thistle: '#D8BFD8',
2608
+ tomato: '#FF6347',
2609
+ turquoise: '#40E0D0',
2610
+ violet: '#EE82EE',
2611
+ wheat: '#F5DEB3',
2612
+ white: '#FFFFFF',
2613
+ whitesmoke: '#F5F5F5',
2614
+ yellow: '#FFFF00',
2615
+ yellowgreen: '#9ACD32'
2616
+ };
2617
+
2618
+ var _excluded = ["id", "title", "vendor", "images", "variants", "description", "handle", "priceRange", "options"];
2619
+ var money = function money(_ref) {
2620
+ var amount = _ref.amount,
2621
+ currencyCode = _ref.currencyCode;
2622
+ return {
2623
+ value: +amount,
2624
+ currencyCode: currencyCode
2625
+ };
2626
+ };
2627
+ var isDefaultOption = function isDefaultOption(selectedOption) {
2628
+ return selectedOption.name === "Title";
2629
+ };
2630
+ var normalizeProductOption = function normalizeProductOption(_ref2) {
2631
+ var id = _ref2.id,
2632
+ displayName = _ref2.name,
2633
+ values = _ref2.values;
2634
+ return {
2635
+ __typename: "MultipleChoiceOption",
2636
+ id: id,
2637
+ displayName: displayName.toLowerCase(),
2638
+ values: values.map(function (value) {
2639
+ var output = {
2640
+ label: value
2641
+ };
2642
+ if (displayName.match(/colou?r/gi)) {
2643
+ var mapedColor = colorMap[value.toLowerCase().replace(/ /g, "")];
2644
+ if (mapedColor) {
2645
+ output = _extends({}, output, {
2646
+ hexColors: [mapedColor]
2647
+ });
2648
+ }
2649
+ }
2650
+ return output;
2651
+ })
2652
+ };
2653
+ };
2654
+ function normalizeProduct(_ref3) {
2655
+ var id = _ref3.id,
2656
+ name = _ref3.title,
2657
+ images = _ref3.images,
2658
+ variants = _ref3.variants,
2659
+ description = _ref3.description,
2660
+ handle = _ref3.handle,
2661
+ priceRange = _ref3.priceRange,
2662
+ options = _ref3.options,
2663
+ rest = _objectWithoutPropertiesLoose(_ref3, _excluded);
2664
+ return _extends({
2665
+ id: id,
2666
+ name: name,
2667
+ description: description || "",
2668
+ path: "/" + handle,
2669
+ slug: handle == null ? void 0 : handle.replace(/^\/+|\/+$/g, ""),
2670
+ price: money(priceRange == null ? void 0 : priceRange.minVariantPrice),
2671
+ images: images.edges.map(function (edge) {
2672
+ return normalizeImage(edge.node);
2673
+ }),
2674
+ variants: variants.edges.map(function (_ref4) {
2675
+ var _ref4$node = _ref4.node,
2676
+ id = _ref4$node.id,
2677
+ selectedOptions = _ref4$node.selectedOptions,
2678
+ sku = _ref4$node.sku,
2679
+ title = _ref4$node.title,
2680
+ price = _ref4$node.price,
2681
+ compareAtPrice = _ref4$node.compareAtPrice,
2682
+ requiresShipping = _ref4$node.requiresShipping,
2683
+ availableForSale = _ref4$node.availableForSale;
2684
+ return {
2685
+ id: id,
2686
+ name: selectedOptions.some(function (o) {
2687
+ return !isDefaultOption(o);
2688
+ }) ? title : "Default variant",
2689
+ sku: sku != null ? sku : id,
2690
+ price: +price.amount,
2691
+ listPrice: +(compareAtPrice == null ? void 0 : compareAtPrice.amount),
2692
+ requiresShipping: requiresShipping,
2693
+ availableForSale: availableForSale,
2694
+ options: selectedOptions.map(function (_ref5) {
2695
+ var name = _ref5.name,
2696
+ value = _ref5.value;
2697
+ var options = normalizeProductOption({
2698
+ id: id,
2699
+ name: name,
2700
+ optionValues: [{
2701
+ id: id,
2702
+ name: name
2703
+ }],
2704
+ values: [value]
2705
+ });
2706
+ return options;
2707
+ })
2708
+ };
2709
+ }),
2710
+ options: options ? options.filter(function (o) {
2711
+ return !isDefaultOption(o);
2712
+ }) // By default Shopify adds a 'Title' name when there's only one option. We don't need it. https://community.shopify.com/c/Shopify-APIs-SDKs/Adding-new-product-variant-is-automatically-adding-quot-Default/td-p/358095
2713
+ .map(function (o) {
2714
+ return normalizeProductOption(o);
2715
+ }) : []
2716
+ }, rest);
2717
+ }
2718
+ function normalizeCart(cart) {
2719
+ var _cart$cost$totalAmoun;
2720
+ if (!cart) {
2721
+ return undefined;
2722
+ }
2723
+ return {
2724
+ id: cart.id,
2725
+ url: cart.checkoutUrl,
2726
+ customerId: "",
2727
+ email: "",
2728
+ createdAt: cart.createdAt,
2729
+ currency: {
2730
+ code: (_cart$cost$totalAmoun = cart.cost.totalAmount) == null ? void 0 : _cart$cost$totalAmoun.currencyCode
2731
+ },
2732
+ taxesIncluded: false,
2733
+ lineItems: cart.lines.edges.map(function (_ref6) {
2734
+ var _merchandise$id, _merchandise$compareA;
2735
+ var _ref6$node = _ref6.node,
2736
+ id = _ref6$node.id,
2737
+ quantity = _ref6$node.quantity,
2738
+ merchandise = _ref6$node.merchandise;
2739
+ return {
2740
+ id: id,
2741
+ variantId: merchandise.id,
2742
+ productId: merchandise.product.id,
2743
+ name: merchandise.product.title,
2744
+ quantity: quantity,
2745
+ variant: {
2746
+ id: merchandise.id,
2747
+ sku: (_merchandise$id = merchandise.id) != null ? _merchandise$id : "",
2748
+ name: merchandise.title,
2749
+ image: normalizeImage(merchandise.image),
2750
+ requiresShipping: merchandise.requiresShipping,
2751
+ price: merchandise.price.amount,
2752
+ listPrice: (_merchandise$compareA = merchandise.compareAtPrice) == null ? void 0 : _merchandise$compareA.amount
2753
+ },
2754
+ path: merchandise.product.handle,
2755
+ discounts: [],
2756
+ options: merchandise.title === "Default Title" ? [] : merchandise.selectedOptions
2757
+ };
2758
+ }),
2759
+ lineItemsSubtotalPrice: +cart.cost.subtotalAmount.amount,
2760
+ subtotalPrice: +cart.cost.subtotalAmount.amount,
2761
+ totalPrice: +cart.cost.totalAmount.amount,
2762
+ discounts: []
2763
+ };
2764
+ }
2765
+ function normalizeCategory(_ref7) {
2766
+ var name = _ref7.title,
2767
+ handle = _ref7.handle,
2768
+ id = _ref7.id,
2769
+ products = _ref7.products,
2770
+ image = _ref7.image;
2771
+ return {
2772
+ id: id,
2773
+ name: name,
2774
+ slug: handle,
2775
+ path: "/" + handle,
2776
+ isEmpty: products.edges.length === 0,
2777
+ images: image ? [normalizeImage(image)] : undefined
2778
+ };
2779
+ }
2780
+ function normalizeImage(image) {
2781
+ if (!image) {
2782
+ return {
2783
+ url: "/product-img-placeholder.svg"
2784
+ };
2785
+ }
2786
+ var url = image.url,
2787
+ altText = image.altText,
2788
+ height = image.height,
2789
+ width = image.width;
2790
+ return {
2791
+ url: url,
2792
+ alt: altText || undefined,
2793
+ height: height || undefined,
2794
+ width: width || undefined
2795
+ };
2796
+ }
2797
+
2798
+ var cartCreate = /*#__PURE__*/function () {
2799
+ var _ref = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(fetch, lines) {
2800
+ var _yield$fetch, cartCreate, cart, options;
2801
+ return _regenerator().w(function (_context) {
2802
+ while (1) switch (_context.n) {
2803
+ case 0:
2804
+ _context.n = 1;
2805
+ return fetch({
2806
+ query: createCartMutation.toString(),
2807
+ variables: {
2808
+ lines: lines
2809
+ }
2810
+ });
2811
+ case 1:
2812
+ _yield$fetch = _context.v;
2813
+ cartCreate = _yield$fetch.cartCreate;
2814
+ cart = cartCreate == null ? void 0 : cartCreate.cart;
2815
+ if (!cart) {
2816
+ _context.n = 2;
2817
+ break;
2818
+ }
2819
+ options = {
2820
+ expires: SHOPIFY_COOKIE_EXPIRE,
2821
+ sameSite: "none",
2822
+ secure: true
2823
+ };
2824
+ Cookies.set(SHOPIFY_CART_ID_COOKIE, cart.id, options);
2825
+ Cookies.set(SHOPIFY_CHECKOUT_URL_COOKIE, cart.checkoutUrl, options);
2826
+ return _context.a(2, normalizeCart(cart));
2827
+ case 2:
2828
+ return _context.a(2, undefined);
2829
+ case 3:
2830
+ return _context.a(2);
2831
+ }
2832
+ }, _callee);
2833
+ }));
2834
+ return function cartCreate(_x, _x2) {
2835
+ return _ref.apply(this, arguments);
2836
+ };
2837
+ }();
2838
+
2839
+ /*
2840
+ Forked from https://github.com/vercel/commerce/tree/main/packages/shopify/src
2841
+ Changes: None
2842
+ */
2843
+ var getCartId = function getCartId(id) {
2844
+ return id != null ? id : Cookies.get(SHOPIFY_CART_ID_COOKIE);
2845
+ };
2846
+
2847
+ var getCartQuery = /*#__PURE__*/graphql("\n query getCart($cartId: ID!) {\n cart(id: $cartId) {\n ...cart\n }\n }\n");
2848
+
2849
+ var handler = {
2850
+ fetchOptions: {
2851
+ query: /*#__PURE__*/getCartQuery.toString()
2852
+ },
2853
+ fetcher: function fetcher(_ref) {
2854
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
2855
+ var cartId, options, fetch, _yield$fetch, cart;
2856
+ return _regenerator().w(function (_context) {
2857
+ while (1) switch (_context.n) {
2858
+ case 0:
2859
+ cartId = _ref.input.cartId, options = _ref.options, fetch = _ref.fetch;
2860
+ if (!cartId) {
2861
+ _context.n = 3;
2862
+ break;
2863
+ }
2864
+ _context.n = 1;
2865
+ return fetch(_extends({}, options, {
2866
+ variables: {
2867
+ cartId: cartId
2868
+ }
2869
+ }));
2870
+ case 1:
2871
+ _yield$fetch = _context.v;
2872
+ cart = _yield$fetch.cart;
2873
+ if (cart) {
2874
+ _context.n = 2;
2875
+ break;
2876
+ }
2877
+ Cookies.remove(SHOPIFY_CART_ID_COOKIE);
2878
+ Cookies.remove(SHOPIFY_CHECKOUT_URL_COOKIE);
2879
+ return _context.a(2, null);
2880
+ case 2:
2881
+ return _context.a(2, normalizeCart(cart));
2882
+ case 3:
2883
+ return _context.a(2, null);
2884
+ }
2885
+ }, _callee);
2886
+ }))();
2887
+ },
2888
+ useHook: function useHook(_ref2) {
2889
+ var useData = _ref2.useData;
2890
+ return function (input) {
2891
+ var response = useData({
2892
+ swrOptions: _extends({
2893
+ revalidateOnFocus: false
2894
+ }, input == null ? void 0 : input.swrOptions)
2895
+ });
2896
+ return useMemo(function () {
2897
+ return Object.create(response, {
2898
+ isEmpty: {
2899
+ get: function get() {
2900
+ var _response$data$lineIt, _response$data;
2901
+ return ((_response$data$lineIt = (_response$data = response.data) == null ? void 0 : _response$data.lineItems.length) != null ? _response$data$lineIt : 0) <= 0;
2902
+ },
2903
+ enumerable: true
2904
+ }
2905
+ });
2906
+ }, [response]);
2907
+ };
2908
+ }
2909
+ };
2910
+
2911
+ var handler$1 = {
2912
+ fetchOptions: {
2913
+ query: /*#__PURE__*/addToCartMutation.toString()
2914
+ },
2915
+ fetcher: function fetcher(_ref) {
2916
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
2917
+ var _item$quantity;
2918
+ var item, options, fetch, lines, cartId, _yield$fetch, cartLinesAdd;
2919
+ return _regenerator().w(function (_context) {
2920
+ while (1) switch (_context.n) {
2921
+ case 0:
2922
+ item = _ref.input, options = _ref.options, fetch = _ref.fetch;
2923
+ if (!(item.quantity && (!Number.isInteger(item.quantity) || item.quantity < 1))) {
2924
+ _context.n = 1;
2925
+ break;
2926
+ }
2927
+ throw new CommerceError({
2928
+ message: "The item quantity has to be a valid integer greater than 0"
2929
+ });
2930
+ case 1:
2931
+ lines = [{
2932
+ merchandiseId: item.variantId,
2933
+ quantity: (_item$quantity = item.quantity) != null ? _item$quantity : 1
2934
+ }];
2935
+ cartId = getCartId();
2936
+ if (cartId) {
2937
+ _context.n = 3;
2938
+ break;
2939
+ }
2940
+ _context.n = 2;
2941
+ return cartCreate(fetch, lines);
2942
+ case 2:
2943
+ return _context.a(2, _context.v);
2944
+ case 3:
2945
+ _context.n = 4;
2946
+ return fetch(_extends({}, options, {
2947
+ variables: {
2948
+ cartId: cartId,
2949
+ lines: lines
2950
+ }
2951
+ }));
2952
+ case 4:
2953
+ _yield$fetch = _context.v;
2954
+ cartLinesAdd = _yield$fetch.cartLinesAdd;
2955
+ return _context.a(2, normalizeCart(cartLinesAdd == null ? void 0 : cartLinesAdd.cart));
2956
+ case 5:
2957
+ return _context.a(2);
2958
+ }
2959
+ }, _callee);
2960
+ }))();
2961
+ },
2962
+ useHook: function useHook(_ref2) {
2963
+ var fetch = _ref2.fetch;
2964
+ return function () {
2965
+ var _useCart = useCart(),
2966
+ mutate = _useCart.mutate;
2967
+ return useCallback(/*#__PURE__*/function () {
2968
+ var _addItem = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(input) {
2969
+ var data;
2970
+ return _regenerator().w(function (_context2) {
2971
+ while (1) switch (_context2.n) {
2972
+ case 0:
2973
+ _context2.n = 1;
2974
+ return fetch({
2975
+ input: input
2976
+ });
2977
+ case 1:
2978
+ data = _context2.v;
2979
+ _context2.n = 2;
2980
+ return mutate(data, false);
2981
+ case 2:
2982
+ return _context2.a(2, data);
2983
+ }
2984
+ }, _callee2);
2985
+ }));
2986
+ function addItem(_x) {
2987
+ return _addItem.apply(this, arguments);
2988
+ }
2989
+ return addItem;
2990
+ }(), [fetch, mutate]);
2991
+ };
2992
+ }
2993
+ };
2994
+
2995
+ var handler$2 = {
2996
+ fetchOptions: {
2997
+ query: /*#__PURE__*/removeFromCartMutation.toString()
2998
+ },
2999
+ fetcher: function fetcher(_ref) {
3000
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
3001
+ var itemId, options, fetch, _yield$fetch, cartLinesRemove;
3002
+ return _regenerator().w(function (_context) {
3003
+ while (1) switch (_context.n) {
3004
+ case 0:
3005
+ itemId = _ref.input.itemId, options = _ref.options, fetch = _ref.fetch;
3006
+ _context.n = 1;
3007
+ return fetch(_extends({}, options, {
3008
+ variables: {
3009
+ cartId: getCartId(),
3010
+ lineIds: [itemId]
3011
+ }
3012
+ }));
3013
+ case 1:
3014
+ _yield$fetch = _context.v;
3015
+ cartLinesRemove = _yield$fetch.cartLinesRemove;
3016
+ return _context.a(2, normalizeCart(cartLinesRemove == null ? void 0 : cartLinesRemove.cart));
3017
+ }
3018
+ }, _callee);
3019
+ }))();
3020
+ },
3021
+ useHook: function useHook(_ref2) {
3022
+ var fetch = _ref2.fetch;
3023
+ return function (ctx) {
3024
+ if (ctx === void 0) {
3025
+ ctx = {};
3026
+ }
3027
+ var _ctx = ctx,
3028
+ item = _ctx.item;
3029
+ var _useCart = useCart(),
3030
+ mutate = _useCart.mutate;
3031
+ var removeItem = /*#__PURE__*/function () {
3032
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(input) {
3033
+ var _input$id;
3034
+ var itemId, data;
3035
+ return _regenerator().w(function (_context2) {
3036
+ while (1) switch (_context2.n) {
3037
+ case 0:
3038
+ itemId = (_input$id = input == null ? void 0 : input.id) != null ? _input$id : item == null ? void 0 : item.id;
3039
+ if (itemId) {
3040
+ _context2.n = 1;
3041
+ break;
3042
+ }
3043
+ throw new ValidationError({
3044
+ message: "Invalid input used for this operation"
3045
+ });
3046
+ case 1:
3047
+ _context2.n = 2;
3048
+ return fetch({
3049
+ input: {
3050
+ itemId: itemId
3051
+ }
3052
+ });
3053
+ case 2:
3054
+ data = _context2.v;
3055
+ _context2.n = 3;
3056
+ return mutate(data, false);
3057
+ case 3:
3058
+ return _context2.a(2, data);
3059
+ }
3060
+ }, _callee2);
3061
+ }));
3062
+ return function removeItem(_x) {
3063
+ return _ref3.apply(this, arguments);
3064
+ };
3065
+ }();
3066
+ return useCallback(removeItem, [fetch, mutate]);
3067
+ };
3068
+ }
3069
+ };
3070
+
3071
+ var handler$3 = {
3072
+ fetchOptions: {
3073
+ query: /*#__PURE__*/editCartItemsMutation.toString()
3074
+ },
3075
+ fetcher: function fetcher(_ref) {
3076
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
3077
+ var _ref$input, itemId, item, options, fetch, _yield$fetch, cartLinesUpdate;
3078
+ return _regenerator().w(function (_context) {
3079
+ while (1) switch (_context.n) {
3080
+ case 0:
3081
+ _ref$input = _ref.input, itemId = _ref$input.itemId, item = _ref$input.item, options = _ref.options, fetch = _ref.fetch;
3082
+ if (!Number.isInteger(item.quantity)) {
3083
+ _context.n = 2;
3084
+ break;
3085
+ }
3086
+ if (!(item.quantity < 1)) {
3087
+ _context.n = 1;
3088
+ break;
3089
+ }
3090
+ return _context.a(2, handler$2.fetcher({
3091
+ options: handler$2.fetchOptions,
3092
+ input: {
3093
+ itemId: itemId
3094
+ },
3095
+ fetch: fetch
3096
+ }));
3097
+ case 1:
3098
+ _context.n = 3;
3099
+ break;
3100
+ case 2:
3101
+ if (!item.quantity) {
3102
+ _context.n = 3;
3103
+ break;
3104
+ }
3105
+ throw new ValidationError({
3106
+ message: "The item quantity has to be a valid integer"
3107
+ });
3108
+ case 3:
3109
+ _context.n = 4;
3110
+ return fetch(_extends({}, options, {
3111
+ variables: {
3112
+ cartId: getCartId(),
3113
+ lines: [{
3114
+ id: itemId,
3115
+ quantity: item.quantity
3116
+ }]
3117
+ }
3118
+ }));
3119
+ case 4:
3120
+ _yield$fetch = _context.v;
3121
+ cartLinesUpdate = _yield$fetch.cartLinesUpdate;
3122
+ return _context.a(2, normalizeCart(cartLinesUpdate == null ? void 0 : cartLinesUpdate.cart));
3123
+ }
3124
+ }, _callee);
3125
+ }))();
3126
+ },
3127
+ useHook: function useHook(_ref2) {
3128
+ var fetch = _ref2.fetch;
3129
+ return function (ctx) {
3130
+ var _ctx$wait;
3131
+ if (ctx === void 0) {
3132
+ ctx = {};
3133
+ }
3134
+ var _ctx = ctx,
3135
+ item = _ctx.item;
3136
+ var _useCart = useCart(),
3137
+ mutate = _useCart.mutate;
3138
+ return useCallback(debounce(/*#__PURE__*/function () {
3139
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(input) {
3140
+ var _input$id;
3141
+ var itemId, data;
3142
+ return _regenerator().w(function (_context2) {
3143
+ while (1) switch (_context2.n) {
3144
+ case 0:
3145
+ itemId = (_input$id = input.id) != null ? _input$id : item == null ? void 0 : item.id;
3146
+ if (!(!itemId || input.quantity == null)) {
3147
+ _context2.n = 1;
3148
+ break;
3149
+ }
3150
+ throw new ValidationError({
3151
+ message: "Invalid input used for this operation"
3152
+ });
3153
+ case 1:
3154
+ _context2.n = 2;
3155
+ return fetch({
3156
+ input: {
3157
+ item: {
3158
+ quantity: input.quantity
3159
+ },
3160
+ itemId: itemId
3161
+ }
3162
+ });
3163
+ case 2:
3164
+ data = _context2.v;
3165
+ _context2.n = 3;
3166
+ return mutate(data, false);
3167
+ case 3:
3168
+ return _context2.a(2, data);
3169
+ }
3170
+ }, _callee2);
3171
+ }));
3172
+ return function (_x) {
3173
+ return _ref3.apply(this, arguments);
3174
+ };
3175
+ }(), (_ctx$wait = ctx.wait) != null ? _ctx$wait : 500), [fetch, mutate]);
3176
+ };
3177
+ }
3178
+ };
3179
+
3180
+ var _excluded$1 = ["locale"];
3181
+ var getFetcher = function getFetcher(storeDomain, accessToken) {
3182
+ return /*#__PURE__*/function () {
3183
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref) {
3184
+ var _ref$url, url, _ref$method, method, variables, query, _ref3, locale, vars, res, _yield$res$json, data, errors, _yield$res$json2, _errors;
3185
+ return _regenerator().w(function (_context) {
3186
+ while (1) switch (_context.n) {
3187
+ case 0:
3188
+ _ref$url = _ref.url, url = _ref$url === void 0 ? "https://" + storeDomain + "/api/" + shopifyApiVersion + "/graphql.json" : _ref$url, _ref$method = _ref.method, method = _ref$method === void 0 ? "POST" : _ref$method, variables = _ref.variables, query = _ref.query;
3189
+ _ref3 = variables != null ? variables : {}, locale = _ref3.locale, vars = _objectWithoutPropertiesLoose(_ref3, _excluded$1);
3190
+ _context.n = 1;
3191
+ return fetch(url, {
3192
+ method: method,
3193
+ body: JSON.stringify({
3194
+ query: query,
3195
+ variables: vars
3196
+ }),
3197
+ headers: _extends({
3198
+ "X-Shopify-Storefront-Access-Token": accessToken,
3199
+ "Content-Type": "application/json"
3200
+ }, locale && {
3201
+ "Accept-Language": locale
3202
+ })
3203
+ });
3204
+ case 1:
3205
+ res = _context.v;
3206
+ if (!res.ok) {
3207
+ _context.n = 4;
3208
+ break;
3209
+ }
3210
+ _context.n = 2;
3211
+ return res.json();
3212
+ case 2:
3213
+ _yield$res$json = _context.v;
3214
+ data = _yield$res$json.data;
3215
+ errors = _yield$res$json.errors;
3216
+ if (!(errors && errors.length)) {
3217
+ _context.n = 3;
3218
+ break;
3219
+ }
3220
+ throw getError(errors, res.status);
3221
+ case 3:
3222
+ return _context.a(2, data);
3223
+ case 4:
3224
+ _context.n = 5;
3225
+ return res.json();
3226
+ case 5:
3227
+ _yield$res$json2 = _context.v;
3228
+ _errors = _yield$res$json2.errors;
3229
+ throw getError(_errors, res.status);
3230
+ case 6:
3231
+ return _context.a(2);
3232
+ }
3233
+ }, _callee);
3234
+ }));
3235
+ return function (_x) {
3236
+ return _ref2.apply(this, arguments);
3237
+ };
3238
+ }();
3239
+ };
3240
+ function getError(errors, status) {
3241
+ errors = errors != null ? errors : [{
3242
+ message: "Failed to fetch Shopify API"
3243
+ }];
3244
+ return new FetcherError({
3245
+ errors: errors,
3246
+ status: status
3247
+ });
3248
+ }
3249
+
3250
+ var getProductQueryBySlug = /*#__PURE__*/graphql("\n query getProductBySlug($slug: String!) {\n productByHandle(handle: $slug) {\n ...product\n }\n }\n");
3251
+ var getProductQueryById = /*#__PURE__*/graphql("\n query getProductById($id: ID!) {\n product(id: $id) {\n ...product\n }\n }\n");
3252
+
3253
+ var handler$4 = {
3254
+ fetchOptions: {
3255
+ query: /*#__PURE__*/getProductQueryBySlug.toString()
3256
+ },
3257
+ fetcher: function fetcher(_ref) {
3258
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
3259
+ var input, options, fetch, id, product, data, _data;
3260
+ return _regenerator().w(function (_context) {
3261
+ while (1) switch (_context.n) {
3262
+ case 0:
3263
+ input = _ref.input, options = _ref.options, fetch = _ref.fetch;
3264
+ id = input.id;
3265
+ if (id) {
3266
+ _context.n = 1;
3267
+ break;
3268
+ }
3269
+ return _context.a(2, null);
3270
+ case 1:
3271
+ product = null;
3272
+ if (!id.startsWith("gid://shopify")) {
3273
+ _context.n = 3;
3274
+ break;
3275
+ }
3276
+ _context.n = 2;
3277
+ return fetch({
3278
+ query: getProductQueryById.toString(),
3279
+ variables: {
3280
+ id: id
3281
+ }
3282
+ });
3283
+ case 2:
3284
+ data = _context.v;
3285
+ product = data.product;
3286
+ _context.n = 5;
3287
+ break;
3288
+ case 3:
3289
+ _context.n = 4;
3290
+ return fetch({
3291
+ query: options.query,
3292
+ variables: {
3293
+ slug: id
3294
+ }
3295
+ });
3296
+ case 4:
3297
+ _data = _context.v;
3298
+ if (_data.productByHandle) {
3299
+ product = _data.productByHandle;
3300
+ }
3301
+ case 5:
3302
+ return _context.a(2, product ? normalizeProduct(product) : null);
3303
+ }
3304
+ }, _callee);
3305
+ }))();
3306
+ },
3307
+ useHook: function useHook(_ref2) {
3308
+ var useData = _ref2.useData;
3309
+ return function (input) {
3310
+ if (input === void 0) {
3311
+ input = {};
3312
+ }
3313
+ return useData({
3314
+ input: [["id", input.id]],
3315
+ swrOptions: _extends({
3316
+ revalidateOnFocus: false
3317
+ }, input.swrOptions)
3318
+ });
3319
+ };
3320
+ }
3321
+ };
3322
+
3323
+ /*
3324
+ Forked from https://github.com/vercel/commerce/tree/main/packages/shopify/src
3325
+ Changes: None
3326
+ */
3327
+ var getSortVariables = function getSortVariables(sort, isCategory) {
3328
+ if (isCategory === void 0) {
3329
+ isCategory = false;
3330
+ }
3331
+ var output = {};
3332
+ switch (sort) {
3333
+ case 'price-asc':
3334
+ output = {
3335
+ sortKey: 'PRICE',
3336
+ reverse: false
3337
+ };
3338
+ break;
3339
+ case 'price-desc':
3340
+ output = {
3341
+ sortKey: 'PRICE',
3342
+ reverse: true
3343
+ };
3344
+ break;
3345
+ case 'trending-desc':
3346
+ output = {
3347
+ sortKey: 'BEST_SELLING',
3348
+ reverse: false
3349
+ };
3350
+ break;
3351
+ case 'latest-desc':
3352
+ output = {
3353
+ sortKey: isCategory ? 'CREATED' : 'CREATED_AT',
3354
+ reverse: true
3355
+ };
3356
+ break;
3357
+ }
3358
+ return output;
3359
+ };
3360
+
3361
+ var getSearchVariables = function getSearchVariables(_ref) {
3362
+ var brandId = _ref.brandId,
3363
+ search = _ref.search,
3364
+ categoryId = _ref.categoryId,
3365
+ sort = _ref.sort,
3366
+ locale = _ref.locale,
3367
+ count = _ref.count;
3368
+ var query = "";
3369
+ var searchQuery = search + "*";
3370
+ if (search) {
3371
+ query += "product_type:" + searchQuery + " OR title:" + searchQuery + " OR tag:" + searchQuery;
3372
+ }
3373
+ if (brandId) {
3374
+ query += (search ? "AND " : "") + "vendor:" + brandId;
3375
+ }
3376
+ return _extends({
3377
+ categoryId: categoryId,
3378
+ query: query
3379
+ }, getSortVariables(sort, !!categoryId), locale && {
3380
+ locale: locale
3381
+ }, {
3382
+ first: count
3383
+ });
3384
+ };
3385
+
3386
+ var getAllProductsQuery = /*#__PURE__*/graphql("\n query getAllProducts(\n $first: Int = 250\n $query: String = \"\"\n $sortKey: ProductSortKeys = RELEVANCE\n $reverse: Boolean = false\n ) {\n products(\n first: $first\n sortKey: $sortKey\n reverse: $reverse\n query: $query\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n edges {\n node {\n ...product\n }\n }\n }\n }\n");
3387
+
3388
+ var getCollectionProductsQuery = /*#__PURE__*/graphql("\n query getProductsFromCollection(\n $categoryId: ID!\n $first: Int = 250\n $sortKey: ProductCollectionSortKeys = RELEVANCE\n $reverse: Boolean = false\n ) {\n node(id: $categoryId) {\n id\n ... on Collection {\n ...collection\n products(first: $first, sortKey: $sortKey, reverse: $reverse) {\n edges {\n node {\n ...product\n }\n }\n }\n }\n }\n }\n");
3389
+
3390
+ var handler$5 = {
3391
+ fetchOptions: {
3392
+ query: /*#__PURE__*/getAllProductsQuery.toString()
3393
+ },
3394
+ fetcher: function fetcher(_ref) {
3395
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
3396
+ var _products, _products2;
3397
+ var input, options, fetch, categoryId, brandId, method, variables, products, _data$node, _data$node2, data, _data$products, _data;
3398
+ return _regenerator().w(function (_context) {
3399
+ while (1) switch (_context.n) {
3400
+ case 0:
3401
+ input = _ref.input, options = _ref.options, fetch = _ref.fetch;
3402
+ categoryId = input.categoryId, brandId = input.brandId;
3403
+ method = options == null ? void 0 : options.method;
3404
+ variables = getSearchVariables(input);
3405
+ if (!categoryId) {
3406
+ _context.n = 2;
3407
+ break;
3408
+ }
3409
+ _context.n = 1;
3410
+ return fetch({
3411
+ query: getCollectionProductsQuery.toString(),
3412
+ method: method,
3413
+ variables: _extends({}, variables, {
3414
+ first: undefined
3415
+ })
3416
+ });
3417
+ case 1:
3418
+ data = _context.v;
3419
+ // filter on client when brandId & categoryId are set since is not available on collection product query
3420
+ products = brandId ? (_data$node = data.node) == null || (_data$node = _data$node.products) == null || (_data$node = _data$node.edges) == null ? void 0 : _data$node.filter(function (_ref2) {
3421
+ var vendor = _ref2.node.vendor;
3422
+ return vendor.replace(/\s+/g, "-").toLowerCase() === ("" + brandId).toLowerCase();
3423
+ }).slice(0, input.count) : (_data$node2 = data.node) == null || (_data$node2 = _data$node2.products) == null ? void 0 : _data$node2.edges.slice(0, input.count);
3424
+ _context.n = 4;
3425
+ break;
3426
+ case 2:
3427
+ _context.n = 3;
3428
+ return fetch({
3429
+ query: options.query,
3430
+ method: method,
3431
+ variables: variables
3432
+ });
3433
+ case 3:
3434
+ _data = _context.v;
3435
+ products = (_data$products = _data.products) == null ? void 0 : _data$products.edges;
3436
+ case 4:
3437
+ return _context.a(2, {
3438
+ products: (_products = products) == null ? void 0 : _products.map(function (_ref3) {
3439
+ var node = _ref3.node;
3440
+ return normalizeProduct(node);
3441
+ }),
3442
+ found: !!((_products2 = products) != null && _products2.length)
3443
+ });
3444
+ }
3445
+ }, _callee);
3446
+ }))();
3447
+ },
3448
+ useHook: function useHook(_ref4) {
3449
+ var useData = _ref4.useData;
3450
+ return function (input) {
3451
+ if (input === void 0) {
3452
+ input = {};
3453
+ }
3454
+ return useData({
3455
+ input: [["search", input.search], ["categoryId", input.categoryId], ["brandId", input.brandId], ["sort", input.sort], ["locale", input.locale], ["count", input.count]],
3456
+ swrOptions: _extends({
3457
+ revalidateOnFocus: false
3458
+ }, input.swrOptions)
3459
+ });
3460
+ };
3461
+ }
3462
+ };
3463
+
3464
+ var getAllProductVendors = /*#__PURE__*/graphql("\n query getAllProductVendors($first: Int = 250, $cursor: String) {\n products(first: $first, after: $cursor) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n edges {\n node {\n vendor\n }\n cursor\n }\n }\n }\n");
3465
+
3466
+ var handler$6 = {
3467
+ fetchOptions: {
3468
+ query: /*#__PURE__*/getAllProductVendors.toString()
3469
+ },
3470
+ fetcher: function fetcher(_ref) {
3471
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
3472
+ var fetch, data, vendorsStrings;
3473
+ return _regenerator().w(function (_context) {
3474
+ while (1) switch (_context.n) {
3475
+ case 0:
3476
+ fetch = _ref.fetch;
3477
+ _context.n = 1;
3478
+ return fetch({
3479
+ query: getAllProductVendors.toString(),
3480
+ variables: {
3481
+ first: 250
3482
+ }
3483
+ });
3484
+ case 1:
3485
+ data = _context.v;
3486
+ vendorsStrings = data.products.edges.map(function (_ref2) {
3487
+ var vendor = _ref2.node.vendor;
3488
+ return vendor;
3489
+ });
3490
+ return _context.a(2, Array.from(new Set(vendorsStrings).values()).map(function (v) {
3491
+ var id = v.replace(/\s+/g, "-").toLowerCase();
3492
+ return {
3493
+ entityId: id,
3494
+ name: v,
3495
+ path: "brands/" + id
3496
+ };
3497
+ }));
3498
+ }
3499
+ }, _callee);
3500
+ }))();
3501
+ },
3502
+ useHook: function useHook(_ref3) {
3503
+ var useData = _ref3.useData;
3504
+ return function (input) {
3505
+ var response = useData({
3506
+ swrOptions: _extends({
3507
+ revalidateOnFocus: false
3508
+ }, input == null ? void 0 : input.swrOptions)
3509
+ });
3510
+ return useMemo(function () {
3511
+ return Object.create(response, {
3512
+ isEmpty: {
3513
+ get: function get() {
3514
+ var _response$data$length, _response$data;
3515
+ return ((_response$data$length = (_response$data = response.data) == null ? void 0 : _response$data.length) != null ? _response$data$length : 0) <= 0;
3516
+ },
3517
+ enumerable: true
3518
+ }
3519
+ });
3520
+ }, [response]);
3521
+ };
3522
+ }
3523
+ };
3524
+
3525
+ var getSiteCollectionsQuery = /*#__PURE__*/graphql("\n query getSiteCollections($first: Int!) {\n collections(first: $first) {\n edges {\n node {\n ...collection\n products(first: $first) {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n }\n }\n");
3526
+
3527
+ var getCollectionQueryById = /*#__PURE__*/graphql("\n query getSiteCollection($id: ID, $handle: String, $first: Int = 1) {\n collection(id: $id, handle: $handle) {\n ...collection\n products(first: $first) {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n");
3528
+
3529
+ var handler$7 = {
3530
+ fetchOptions: {
3531
+ query: /*#__PURE__*/getSiteCollectionsQuery.toString()
3532
+ },
3533
+ fetcher: function fetcher(_ref) {
3534
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
3535
+ var input, options, fetch, categoryId, _data$collections$edg, _data$collections, data, _data;
3536
+ return _regenerator().w(function (_context) {
3537
+ while (1) switch (_context.n) {
3538
+ case 0:
3539
+ input = _ref.input, options = _ref.options, fetch = _ref.fetch;
3540
+ categoryId = input.categoryId;
3541
+ if (categoryId) {
3542
+ _context.n = 2;
3543
+ break;
3544
+ }
3545
+ _context.n = 1;
3546
+ return fetch({
3547
+ query: options.query,
3548
+ variables: {
3549
+ first: 250
3550
+ }
3551
+ });
3552
+ case 1:
3553
+ data = _context.v;
3554
+ return _context.a(2, (_data$collections$edg = data == null || (_data$collections = data.collections) == null || (_data$collections = _data$collections.edges) == null ? void 0 : _data$collections.map(function (_ref2) {
3555
+ var node = _ref2.node;
3556
+ return normalizeCategory(node);
3557
+ })) != null ? _data$collections$edg : []);
3558
+ case 2:
3559
+ _context.n = 3;
3560
+ return fetch({
3561
+ query: getCollectionQueryById.toString(),
3562
+ variables: _extends({}, categoryId.startsWith("gid://") ? {
3563
+ id: categoryId
3564
+ } : {
3565
+ handle: categoryId
3566
+ })
3567
+ });
3568
+ case 3:
3569
+ _data = _context.v;
3570
+ return _context.a(2, !!(_data != null && _data.collection) ? [normalizeCategory(_data == null ? void 0 : _data.collection)] : []);
3571
+ case 4:
3572
+ return _context.a(2);
3573
+ }
3574
+ }, _callee);
3575
+ }))();
3576
+ },
3577
+ useHook: function useHook(_ref3) {
3578
+ var useData = _ref3.useData;
3579
+ return function (input) {
3580
+ var response = useData({
3581
+ input: [["categoryId", input == null ? void 0 : input.categoryId]],
3582
+ swrOptions: _extends({
3583
+ revalidateOnFocus: false
3584
+ }, input == null ? void 0 : input.swrOptions)
3585
+ });
3586
+ return useMemo(function () {
3587
+ return Object.create(response, {
3588
+ isEmpty: {
3589
+ get: function get() {
3590
+ var _response$data$length, _response$data;
3591
+ return ((_response$data$length = (_response$data = response.data) == null ? void 0 : _response$data.length) != null ? _response$data$length : 0) <= 0;
3592
+ },
3593
+ enumerable: true
3594
+ }
3595
+ });
3596
+ }, [response]);
3597
+ };
3598
+ }
3599
+ };
3600
+
3601
+ var getShopifyProvider = function getShopifyProvider(storeDomain, accessToken) {
3602
+ return {
3603
+ locale: "en-us",
3604
+ cartCookie: SHOPIFY_CART_ID_COOKIE,
3605
+ cart: {
3606
+ useCart: handler,
3607
+ useAddItem: handler$1,
3608
+ useUpdateItem: handler$3,
3609
+ useRemoveItem: handler$2
3610
+ },
3611
+ fetcher: getFetcher(storeDomain, accessToken),
3612
+ products: {
3613
+ useSearch: handler$5,
3614
+ useProduct: handler$4
3615
+ },
3616
+ site: {
3617
+ useCategories: handler$7,
3618
+ useBrands: handler$6
3619
+ }
3620
+ };
3621
+ };
3622
+
3623
+ /*
3624
+ Forked from https://github.com/vercel/commerce/tree/main/packages/shopify/src
3625
+ Changes:
3626
+ - Added storeDomain and accessToken parameters.
3627
+ */
3628
+ var useCommerce = function useCommerce() {
3629
+ return useCommerce$1();
3630
+ };
3631
+ var getCommerceProvider = function getCommerceProvider(storeDomain, accessToken) {
3632
+ return getCommerceProvider$1(getShopifyProvider(storeDomain, accessToken));
3633
+ };
3634
+
3635
+ var globalContextName = "daouy-commerce-shopify-provider";
3636
+ var commerceProviderMeta = /*#__PURE__*/_extends({
3637
+ name: globalContextName,
3638
+ displayName: "Shopify Provider",
3639
+ props: {
3640
+ storeDomain: {
3641
+ type: "string",
3642
+ defaultValue: defaultStoreDomain
3643
+ },
3644
+ accessToken: {
3645
+ type: "string",
3646
+ defaultValue: defaultAccessToken
3647
+ }
3648
+ }
3649
+ }, {
3650
+ globalActions: globalActionsRegistrations
3651
+ }, {
3652
+ description: "Your store domain usually looks like **storename.myshopify.com**.\n\nFor your access token, get it by following [this video](https://www.youtube.com/watch?v=wB_6cM7tdv4).\n\nSee also the [getting started video](https://www.youtube.com/watch?v=1OJ_gXmta2Q).",
3653
+ importPath: "@daouypkgs/commerce-shopify",
3654
+ importName: "CommerceProviderComponent"
3655
+ });
3656
+ function CommerceProviderComponent(props) {
3657
+ var storeDomain = props.storeDomain,
3658
+ accessToken = props.accessToken,
3659
+ children = props.children;
3660
+ var CommerceProvider = React.useMemo(function () {
3661
+ return getCommerceProvider(storeDomain, accessToken);
3662
+ }, [storeDomain, accessToken]);
3663
+ return React.createElement(CommerceProvider, null, React.createElement(CartActionsProvider, {
3664
+ globalContextName: globalContextName
3665
+ }, children));
3666
+ }
3667
+ function registerCommerceProvider(loader, customCommerceProviderMeta) {
3668
+ var doRegisterComponent = function doRegisterComponent() {
3669
+ return loader ? loader.registerGlobalContext.apply(loader, arguments) : registerGlobalContext.apply(void 0, arguments);
3670
+ };
3671
+ doRegisterComponent(CommerceProviderComponent, customCommerceProviderMeta != null ? customCommerceProviderMeta : commerceProviderMeta);
3672
+ }
3673
+
3674
+ function registerAll(loader) {
3675
+ registerCommerceProvider(loader);
3676
+ }
3677
+
3678
+ export { CommerceProviderComponent, commerceProviderMeta, getCommerceProvider, registerAll, registerCommerceProvider, useCommerce };
3679
+ //# sourceMappingURL=commerce-shopify.esm.js.map