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