@builtbystack/sq-shopify-theme-sdk 0.0.14 → 0.0.15
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 +44 -2
- package/dist/sq-shopify-theme-sdk.d.ts +10 -1
- package/dist/sq-shopify-theme-sdk.js +187 -159
- package/dist/sq-shopify-theme-sdk.umd.js +46 -34
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ function ze(e, t) {
|
|
|
17
17
|
}
|
|
18
18
|
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const Ce = JSON, Qe = (e) => e.toUpperCase(), Je = (e) => {
|
|
21
21
|
const t = {};
|
|
22
22
|
return e.forEach((n, i) => {
|
|
23
23
|
t[i] = n;
|
|
@@ -64,23 +64,23 @@ function pe(e, t) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
function nt(e) {
|
|
67
|
-
return
|
|
67
|
+
return Se(
|
|
68
68
|
e.source,
|
|
69
69
|
pe(e.source, e.start)
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Se(e, t) {
|
|
73
73
|
const n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, u = t.line === 1 ? n : 0, h = t.column + u, p = `${e.name}:${o}:${h}
|
|
74
74
|
`, m = i.split(/\r\n|[\n\r]/g), g = m[r];
|
|
75
75
|
if (g.length > 120) {
|
|
76
|
-
const
|
|
76
|
+
const C = Math.floor(h / 80), T = h % 80, y = [];
|
|
77
77
|
for (let N = 0; N < g.length; N += 80)
|
|
78
78
|
y.push(g.slice(N, N + 80));
|
|
79
79
|
return p + Te([
|
|
80
80
|
[`${o} |`, y[0]],
|
|
81
|
-
...y.slice(1,
|
|
81
|
+
...y.slice(1, C + 1).map((N) => ["|", N]),
|
|
82
82
|
["|", "^".padStart(T)],
|
|
83
|
-
["|", y[
|
|
83
|
+
["|", y[C + 1]]
|
|
84
84
|
]);
|
|
85
85
|
}
|
|
86
86
|
return p + Te([
|
|
@@ -107,7 +107,7 @@ function rt(e) {
|
|
|
107
107
|
extensions: e[5]
|
|
108
108
|
} : t;
|
|
109
109
|
}
|
|
110
|
-
class
|
|
110
|
+
class Ee extends Error {
|
|
111
111
|
/**
|
|
112
112
|
* An array of `{ line, column }` locations within the source GraphQL document
|
|
113
113
|
* which correspond to this error.
|
|
@@ -152,10 +152,10 @@ class Ce extends Error {
|
|
|
152
152
|
super(t), this.name = "GraphQLError", this.path = p ?? void 0, this.originalError = m ?? void 0, this.nodes = Ne(
|
|
153
153
|
Array.isArray(o) ? o : o ? [o] : void 0
|
|
154
154
|
);
|
|
155
|
-
const
|
|
155
|
+
const C = Ne(
|
|
156
156
|
(i = this.nodes) === null || i === void 0 ? void 0 : i.map((y) => y.loc).filter((y) => y != null)
|
|
157
157
|
);
|
|
158
|
-
this.source = u ?? (
|
|
158
|
+
this.source = u ?? (C == null || (r = C[0]) === null || r === void 0 ? void 0 : r.source), this.positions = h ?? (C == null ? void 0 : C.map((y) => y.start)), this.locations = h && u ? h.map((y) => pe(u, y)) : C == null ? void 0 : C.map((y) => pe(y.source, y.start));
|
|
159
159
|
const T = Ke(
|
|
160
160
|
m == null ? void 0 : m.extensions
|
|
161
161
|
) ? m == null ? void 0 : m.extensions : void 0;
|
|
@@ -183,7 +183,7 @@ class Ce extends Error {
|
|
|
183
183
|
value: m.stack,
|
|
184
184
|
writable: !0,
|
|
185
185
|
configurable: !0
|
|
186
|
-
}) : Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
186
|
+
}) : Error.captureStackTrace ? Error.captureStackTrace(this, Ee) : Object.defineProperty(this, "stack", {
|
|
187
187
|
value: Error().stack,
|
|
188
188
|
writable: !0,
|
|
189
189
|
configurable: !0
|
|
@@ -203,7 +203,7 @@ class Ce extends Error {
|
|
|
203
203
|
for (const n of this.locations)
|
|
204
204
|
t += `
|
|
205
205
|
|
|
206
|
-
` +
|
|
206
|
+
` + Se(this.source, n);
|
|
207
207
|
return t;
|
|
208
208
|
}
|
|
209
209
|
toJSON() {
|
|
@@ -217,7 +217,7 @@ function Ne(e) {
|
|
|
217
217
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
218
218
|
}
|
|
219
219
|
function x(e, t, n) {
|
|
220
|
-
return new
|
|
220
|
+
return new Ee(`Syntax Error: ${n}`, {
|
|
221
221
|
source: e,
|
|
222
222
|
positions: [t]
|
|
223
223
|
});
|
|
@@ -251,7 +251,7 @@ class it {
|
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
class
|
|
254
|
+
class Re {
|
|
255
255
|
/**
|
|
256
256
|
* The kind of Token.
|
|
257
257
|
*/
|
|
@@ -293,7 +293,7 @@ class _e {
|
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const _e = {
|
|
297
297
|
Name: [],
|
|
298
298
|
Document: ["definitions"],
|
|
299
299
|
OperationDefinition: [
|
|
@@ -367,7 +367,7 @@ const Se = {
|
|
|
367
367
|
UnionTypeExtension: ["name", "directives", "types"],
|
|
368
368
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
369
369
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
370
|
-
}, st = new Set(Object.keys(
|
|
370
|
+
}, st = new Set(Object.keys(_e));
|
|
371
371
|
function be(e) {
|
|
372
372
|
const t = e == null ? void 0 : e.kind;
|
|
373
373
|
return typeof t == "string" && st.has(t);
|
|
@@ -394,7 +394,7 @@ function ke(e) {
|
|
|
394
394
|
return e >= 97 && e <= 122 || // A-Z
|
|
395
395
|
e >= 65 && e <= 90;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function Pe(e) {
|
|
398
398
|
return ke(e) || e === 95;
|
|
399
399
|
}
|
|
400
400
|
function ot(e) {
|
|
@@ -423,8 +423,8 @@ function ut(e, t) {
|
|
|
423
423
|
const n = e.replace(/"""/g, '\\"""'), i = n.split(/\r\n|[\n\r]/g), r = i.length === 1, s = i.length > 1 && i.slice(1).every((T) => T.length === 0 || me(T.charCodeAt(0))), o = n.endsWith('\\"""'), u = e.endsWith('"') && !o, h = e.endsWith("\\"), p = u || h, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
424
424
|
(!r || e.length > 70 || p || s || o);
|
|
425
425
|
let g = "";
|
|
426
|
-
const
|
|
427
|
-
return (m && !
|
|
426
|
+
const C = r && me(e.charCodeAt(0));
|
|
427
|
+
return (m && !C || s) && (g += `
|
|
428
428
|
`), g += n, (m || p) && (g += `
|
|
429
429
|
`), '"""' + g + '"""';
|
|
430
430
|
}
|
|
@@ -446,7 +446,7 @@ class lt {
|
|
|
446
446
|
* The character offset at which the current line begins.
|
|
447
447
|
*/
|
|
448
448
|
constructor(t) {
|
|
449
|
-
const n = new
|
|
449
|
+
const n = new Re(c.SOF, 0, 0, 0, 0);
|
|
450
450
|
this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
|
|
451
451
|
}
|
|
452
452
|
get [Symbol.toStringTag]() {
|
|
@@ -483,12 +483,12 @@ function V(e) {
|
|
|
483
483
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
484
484
|
}
|
|
485
485
|
function se(e, t) {
|
|
486
|
-
return
|
|
486
|
+
return we(e.charCodeAt(t)) && Le(e.charCodeAt(t + 1));
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function we(e) {
|
|
489
489
|
return e >= 55296 && e <= 56319;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Le(e) {
|
|
492
492
|
return e >= 56320 && e <= 57343;
|
|
493
493
|
}
|
|
494
494
|
function F(e, t) {
|
|
@@ -503,7 +503,7 @@ function F(e, t) {
|
|
|
503
503
|
}
|
|
504
504
|
function b(e, t, n, i, r) {
|
|
505
505
|
const s = e.line, o = 1 + n - e.lineStart;
|
|
506
|
-
return new
|
|
506
|
+
return new Re(t, n, i, s, o, r);
|
|
507
507
|
}
|
|
508
508
|
function ht(e, t) {
|
|
509
509
|
const n = e.source.body, i = n.length;
|
|
@@ -556,11 +556,11 @@ function ht(e, t) {
|
|
|
556
556
|
case 125:
|
|
557
557
|
return b(e, c.BRACE_R, r, r + 1);
|
|
558
558
|
case 34:
|
|
559
|
-
return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ?
|
|
559
|
+
return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? Et(e, r) : mt(e, r);
|
|
560
560
|
}
|
|
561
561
|
if (Y(s) || s === 45)
|
|
562
562
|
return ft(e, r, s);
|
|
563
|
-
if (
|
|
563
|
+
if (Pe(s))
|
|
564
564
|
return vt(e, r);
|
|
565
565
|
throw x(
|
|
566
566
|
e.source,
|
|
@@ -607,7 +607,7 @@ function ft(e, t, n) {
|
|
|
607
607
|
);
|
|
608
608
|
} else
|
|
609
609
|
r = ue(e, r, s), s = i.charCodeAt(r);
|
|
610
|
-
if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = ue(e, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (o = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = ue(e, r, s), s = i.charCodeAt(r)), s === 46 ||
|
|
610
|
+
if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = ue(e, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (o = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = ue(e, r, s), s = i.charCodeAt(r)), s === 46 || Pe(s))
|
|
611
611
|
throw x(
|
|
612
612
|
e.source,
|
|
613
613
|
r,
|
|
@@ -649,7 +649,7 @@ function mt(e, t) {
|
|
|
649
649
|
return o += n.slice(s, r), b(e, c.STRING, t, r + 1, o);
|
|
650
650
|
if (u === 92) {
|
|
651
651
|
o += n.slice(s, r);
|
|
652
|
-
const h = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? yt(e, r) : gt(e, r) :
|
|
652
|
+
const h = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? yt(e, r) : gt(e, r) : Ct(e, r);
|
|
653
653
|
o += h.value, r += h.size, s = r;
|
|
654
654
|
continue;
|
|
655
655
|
}
|
|
@@ -703,9 +703,9 @@ function gt(e, t) {
|
|
|
703
703
|
value: String.fromCodePoint(i),
|
|
704
704
|
size: 6
|
|
705
705
|
};
|
|
706
|
-
if (
|
|
706
|
+
if (we(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
|
|
707
707
|
const r = xe(n, t + 8);
|
|
708
|
-
if (
|
|
708
|
+
if (Le(r))
|
|
709
709
|
return {
|
|
710
710
|
value: String.fromCodePoint(i, r),
|
|
711
711
|
size: 12
|
|
@@ -723,7 +723,7 @@ function xe(e, t) {
|
|
|
723
723
|
function $(e) {
|
|
724
724
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function Ct(e, t) {
|
|
727
727
|
const n = e.source.body;
|
|
728
728
|
switch (n.charCodeAt(t + 1)) {
|
|
729
729
|
case 34:
|
|
@@ -777,7 +777,7 @@ function Et(e, t) {
|
|
|
777
777
|
)}".`
|
|
778
778
|
);
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function Et(e, t) {
|
|
781
781
|
const n = e.source.body, i = n.length;
|
|
782
782
|
let r = e.lineStart, s = t + 3, o = s, u = "";
|
|
783
783
|
const h = [];
|
|
@@ -950,9 +950,9 @@ function Ot(e) {
|
|
|
950
950
|
return Dt(e, Ue);
|
|
951
951
|
}
|
|
952
952
|
function Be(e, t) {
|
|
953
|
-
return new
|
|
953
|
+
return new St(e, t).parseDocument();
|
|
954
954
|
}
|
|
955
|
-
class
|
|
955
|
+
class St {
|
|
956
956
|
constructor(t, n = {}) {
|
|
957
957
|
const i = Ot(t) ? t : new Ue(t);
|
|
958
958
|
this._lexer = new lt(i), this._options = n, this._tokenCounter = 0;
|
|
@@ -2060,14 +2060,14 @@ function W(e) {
|
|
|
2060
2060
|
function Me(e) {
|
|
2061
2061
|
return dt(e) ? `"${e}"` : e;
|
|
2062
2062
|
}
|
|
2063
|
-
function
|
|
2064
|
-
return `"${e.replace(
|
|
2063
|
+
function Rt(e) {
|
|
2064
|
+
return `"${e.replace(_t, kt)}"`;
|
|
2065
2065
|
}
|
|
2066
|
-
const
|
|
2066
|
+
const _t = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
2067
2067
|
function kt(e) {
|
|
2068
|
-
return
|
|
2068
|
+
return Pt[e.charCodeAt(0)];
|
|
2069
2069
|
}
|
|
2070
|
-
const
|
|
2070
|
+
const Pt = [
|
|
2071
2071
|
"\\u0000",
|
|
2072
2072
|
"\\u0001",
|
|
2073
2073
|
"\\u0002",
|
|
@@ -2233,18 +2233,18 @@ const wt = [
|
|
|
2233
2233
|
"\\u009D",
|
|
2234
2234
|
"\\u009E",
|
|
2235
2235
|
"\\u009F"
|
|
2236
|
-
],
|
|
2237
|
-
function
|
|
2236
|
+
], wt = Object.freeze({});
|
|
2237
|
+
function Lt(e, t, n = _e) {
|
|
2238
2238
|
const i = /* @__PURE__ */ new Map();
|
|
2239
|
-
for (const
|
|
2240
|
-
i.set(
|
|
2239
|
+
for (const S of Object.values(f))
|
|
2240
|
+
i.set(S, Ft(t, S));
|
|
2241
2241
|
let r, s = Array.isArray(e), o = [e], u = -1, h = [], p = e, m, g;
|
|
2242
|
-
const
|
|
2242
|
+
const C = [], T = [];
|
|
2243
2243
|
do {
|
|
2244
2244
|
u++;
|
|
2245
|
-
const
|
|
2246
|
-
if (
|
|
2247
|
-
if (m = T.length === 0 ? void 0 :
|
|
2245
|
+
const S = u === o.length, z = S && h.length !== 0;
|
|
2246
|
+
if (S) {
|
|
2247
|
+
if (m = T.length === 0 ? void 0 : C[C.length - 1], p = g, g = T.pop(), z)
|
|
2248
2248
|
if (s) {
|
|
2249
2249
|
p = p.slice();
|
|
2250
2250
|
let _ = 0;
|
|
@@ -2264,30 +2264,30 @@ function Pt(e, t, n = Se) {
|
|
|
2264
2264
|
} else if (g) {
|
|
2265
2265
|
if (m = s ? u : o[u], p = g[m], p == null)
|
|
2266
2266
|
continue;
|
|
2267
|
-
|
|
2267
|
+
C.push(m);
|
|
2268
2268
|
}
|
|
2269
|
-
let
|
|
2269
|
+
let P;
|
|
2270
2270
|
if (!Array.isArray(p)) {
|
|
2271
2271
|
var y, N;
|
|
2272
2272
|
be(p) || Z(!1, `Invalid AST Node: ${ve(p)}.`);
|
|
2273
|
-
const _ =
|
|
2274
|
-
if (
|
|
2273
|
+
const _ = S ? (y = i.get(p.kind)) === null || y === void 0 ? void 0 : y.leave : (N = i.get(p.kind)) === null || N === void 0 ? void 0 : N.enter;
|
|
2274
|
+
if (P = _ == null ? void 0 : _.call(t, p, m, g, C, T), P === wt)
|
|
2275
2275
|
break;
|
|
2276
|
-
if (
|
|
2277
|
-
if (!
|
|
2278
|
-
|
|
2276
|
+
if (P === !1) {
|
|
2277
|
+
if (!S) {
|
|
2278
|
+
C.pop();
|
|
2279
2279
|
continue;
|
|
2280
2280
|
}
|
|
2281
|
-
} else if (
|
|
2282
|
-
if (be(
|
|
2283
|
-
p =
|
|
2281
|
+
} else if (P !== void 0 && (h.push([m, P]), !S))
|
|
2282
|
+
if (be(P))
|
|
2283
|
+
p = P;
|
|
2284
2284
|
else {
|
|
2285
|
-
|
|
2285
|
+
C.pop();
|
|
2286
2286
|
continue;
|
|
2287
2287
|
}
|
|
2288
2288
|
}
|
|
2289
|
-
if (
|
|
2290
|
-
|
|
2289
|
+
if (P === void 0 && z && h.push([m, p]), S)
|
|
2290
|
+
C.pop();
|
|
2291
2291
|
else {
|
|
2292
2292
|
var O;
|
|
2293
2293
|
r = {
|
|
@@ -2312,7 +2312,7 @@ function Ft(e, t) {
|
|
|
2312
2312
|
};
|
|
2313
2313
|
}
|
|
2314
2314
|
function Ut(e) {
|
|
2315
|
-
return
|
|
2315
|
+
return Lt(e, Mt);
|
|
2316
2316
|
}
|
|
2317
2317
|
const Bt = 80, Mt = {
|
|
2318
2318
|
Name: {
|
|
@@ -2344,7 +2344,7 @@ const Bt = 80, Mt = {
|
|
|
2344
2344
|
leave: ({ variable: e, type: t, defaultValue: n, directives: i }) => e + ": " + t + v(" = ", n) + v(" ", d(i, " "))
|
|
2345
2345
|
},
|
|
2346
2346
|
SelectionSet: {
|
|
2347
|
-
leave: ({ selections: e }) =>
|
|
2347
|
+
leave: ({ selections: e }) => k(e)
|
|
2348
2348
|
},
|
|
2349
2349
|
Field: {
|
|
2350
2350
|
leave({ alias: e, name: t, arguments: n, directives: i, selectionSet: r }) {
|
|
@@ -2388,7 +2388,7 @@ const Bt = 80, Mt = {
|
|
|
2388
2388
|
leave: ({ value: e }) => e
|
|
2389
2389
|
},
|
|
2390
2390
|
StringValue: {
|
|
2391
|
-
leave: ({ value: e, block: t }) => t ? ut(e) :
|
|
2391
|
+
leave: ({ value: e, block: t }) => t ? ut(e) : Rt(e)
|
|
2392
2392
|
},
|
|
2393
2393
|
BooleanValue: {
|
|
2394
2394
|
leave: ({ value: e }) => e ? "true" : "false"
|
|
@@ -2425,7 +2425,7 @@ const Bt = 80, Mt = {
|
|
|
2425
2425
|
// Type System Definitions
|
|
2426
2426
|
SchemaDefinition: {
|
|
2427
2427
|
leave: ({ description: e, directives: t, operationTypes: n }) => v("", e, `
|
|
2428
|
-
`) + d(["schema", d(t, " "),
|
|
2428
|
+
`) + d(["schema", d(t, " "), k(n)], " ")
|
|
2429
2429
|
},
|
|
2430
2430
|
OperationTypeDefinition: {
|
|
2431
2431
|
leave: ({ operation: e, type: t }) => e + ": " + t
|
|
@@ -2442,7 +2442,7 @@ const Bt = 80, Mt = {
|
|
|
2442
2442
|
t,
|
|
2443
2443
|
v("implements ", d(n, " & ")),
|
|
2444
2444
|
d(i, " "),
|
|
2445
|
-
|
|
2445
|
+
k(r)
|
|
2446
2446
|
],
|
|
2447
2447
|
" "
|
|
2448
2448
|
)
|
|
@@ -2469,7 +2469,7 @@ const Bt = 80, Mt = {
|
|
|
2469
2469
|
t,
|
|
2470
2470
|
v("implements ", d(n, " & ")),
|
|
2471
2471
|
d(i, " "),
|
|
2472
|
-
|
|
2472
|
+
k(r)
|
|
2473
2473
|
],
|
|
2474
2474
|
" "
|
|
2475
2475
|
)
|
|
@@ -2483,7 +2483,7 @@ const Bt = 80, Mt = {
|
|
|
2483
2483
|
},
|
|
2484
2484
|
EnumTypeDefinition: {
|
|
2485
2485
|
leave: ({ description: e, name: t, directives: n, values: i }) => v("", e, `
|
|
2486
|
-
`) + d(["enum", t, d(n, " "),
|
|
2486
|
+
`) + d(["enum", t, d(n, " "), k(i)], " ")
|
|
2487
2487
|
},
|
|
2488
2488
|
EnumValueDefinition: {
|
|
2489
2489
|
leave: ({ description: e, name: t, directives: n }) => v("", e, `
|
|
@@ -2491,7 +2491,7 @@ const Bt = 80, Mt = {
|
|
|
2491
2491
|
},
|
|
2492
2492
|
InputObjectTypeDefinition: {
|
|
2493
2493
|
leave: ({ description: e, name: t, directives: n, fields: i }) => v("", e, `
|
|
2494
|
-
`) + d(["input", t, d(n, " "),
|
|
2494
|
+
`) + d(["input", t, d(n, " "), k(i)], " ")
|
|
2495
2495
|
},
|
|
2496
2496
|
DirectiveDefinition: {
|
|
2497
2497
|
leave: ({ description: e, name: t, arguments: n, repeatable: i, locations: r }) => v("", e, `
|
|
@@ -2502,7 +2502,7 @@ const Bt = 80, Mt = {
|
|
|
2502
2502
|
},
|
|
2503
2503
|
SchemaExtension: {
|
|
2504
2504
|
leave: ({ directives: e, operationTypes: t }) => d(
|
|
2505
|
-
["extend schema", d(e, " "),
|
|
2505
|
+
["extend schema", d(e, " "), k(t)],
|
|
2506
2506
|
" "
|
|
2507
2507
|
)
|
|
2508
2508
|
},
|
|
@@ -2516,7 +2516,7 @@ const Bt = 80, Mt = {
|
|
|
2516
2516
|
e,
|
|
2517
2517
|
v("implements ", d(t, " & ")),
|
|
2518
2518
|
d(n, " "),
|
|
2519
|
-
|
|
2519
|
+
k(i)
|
|
2520
2520
|
],
|
|
2521
2521
|
" "
|
|
2522
2522
|
)
|
|
@@ -2528,7 +2528,7 @@ const Bt = 80, Mt = {
|
|
|
2528
2528
|
e,
|
|
2529
2529
|
v("implements ", d(t, " & ")),
|
|
2530
2530
|
d(n, " "),
|
|
2531
|
-
|
|
2531
|
+
k(i)
|
|
2532
2532
|
],
|
|
2533
2533
|
" "
|
|
2534
2534
|
)
|
|
@@ -2545,17 +2545,17 @@ const Bt = 80, Mt = {
|
|
|
2545
2545
|
)
|
|
2546
2546
|
},
|
|
2547
2547
|
EnumTypeExtension: {
|
|
2548
|
-
leave: ({ name: e, directives: t, values: n }) => d(["extend enum", e, d(t, " "),
|
|
2548
|
+
leave: ({ name: e, directives: t, values: n }) => d(["extend enum", e, d(t, " "), k(n)], " ")
|
|
2549
2549
|
},
|
|
2550
2550
|
InputObjectTypeExtension: {
|
|
2551
|
-
leave: ({ name: e, directives: t, fields: n }) => d(["extend input", e, d(t, " "),
|
|
2551
|
+
leave: ({ name: e, directives: t, fields: n }) => d(["extend input", e, d(t, " "), k(n)], " ")
|
|
2552
2552
|
}
|
|
2553
2553
|
};
|
|
2554
2554
|
function d(e, t = "") {
|
|
2555
2555
|
var n;
|
|
2556
2556
|
return (n = e == null ? void 0 : e.filter((i) => i).join(t)) !== null && n !== void 0 ? n : "";
|
|
2557
2557
|
}
|
|
2558
|
-
function
|
|
2558
|
+
function k(e) {
|
|
2559
2559
|
return v(`{
|
|
2560
2560
|
`, K(d(e, `
|
|
2561
2561
|
`)), `
|
|
@@ -2653,14 +2653,14 @@ var ye = { exports: {} };
|
|
|
2653
2653
|
throw new TypeError("Invalid character in header field name");
|
|
2654
2654
|
return a.toLowerCase();
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2656
|
+
function C(a) {
|
|
2657
2657
|
return typeof a != "string" && (a = String(a)), a;
|
|
2658
2658
|
}
|
|
2659
2659
|
function T(a) {
|
|
2660
2660
|
var l = {
|
|
2661
2661
|
next: function() {
|
|
2662
|
-
var
|
|
2663
|
-
return { done:
|
|
2662
|
+
var E = a.shift();
|
|
2663
|
+
return { done: E === void 0, value: E };
|
|
2664
2664
|
}
|
|
2665
2665
|
};
|
|
2666
2666
|
return u.iterable && (l[Symbol.iterator] = function() {
|
|
@@ -2668,8 +2668,8 @@ var ye = { exports: {} };
|
|
|
2668
2668
|
}), l;
|
|
2669
2669
|
}
|
|
2670
2670
|
function y(a) {
|
|
2671
|
-
this.map = {}, a instanceof y ? a.forEach(function(l,
|
|
2672
|
-
this.append(
|
|
2671
|
+
this.map = {}, a instanceof y ? a.forEach(function(l, E) {
|
|
2672
|
+
this.append(E, l);
|
|
2673
2673
|
}, this) : Array.isArray(a) ? a.forEach(function(l) {
|
|
2674
2674
|
this.append(l[0], l[1]);
|
|
2675
2675
|
}, this) : a && Object.getOwnPropertyNames(a).forEach(function(l) {
|
|
@@ -2677,9 +2677,9 @@ var ye = { exports: {} };
|
|
|
2677
2677
|
}, this);
|
|
2678
2678
|
}
|
|
2679
2679
|
y.prototype.append = function(a, l) {
|
|
2680
|
-
a = g(a), l =
|
|
2681
|
-
var
|
|
2682
|
-
this.map[a] =
|
|
2680
|
+
a = g(a), l = C(l);
|
|
2681
|
+
var E = this.map[a];
|
|
2682
|
+
this.map[a] = E ? E + ", " + l : l;
|
|
2683
2683
|
}, y.prototype.delete = function(a) {
|
|
2684
2684
|
delete this.map[g(a)];
|
|
2685
2685
|
}, y.prototype.get = function(a) {
|
|
@@ -2687,14 +2687,14 @@ var ye = { exports: {} };
|
|
|
2687
2687
|
}, y.prototype.has = function(a) {
|
|
2688
2688
|
return this.map.hasOwnProperty(g(a));
|
|
2689
2689
|
}, y.prototype.set = function(a, l) {
|
|
2690
|
-
this.map[g(a)] =
|
|
2690
|
+
this.map[g(a)] = C(l);
|
|
2691
2691
|
}, y.prototype.forEach = function(a, l) {
|
|
2692
|
-
for (var
|
|
2693
|
-
this.map.hasOwnProperty(
|
|
2692
|
+
for (var E in this.map)
|
|
2693
|
+
this.map.hasOwnProperty(E) && a.call(l, this.map[E], E, this);
|
|
2694
2694
|
}, y.prototype.keys = function() {
|
|
2695
2695
|
var a = [];
|
|
2696
|
-
return this.forEach(function(l,
|
|
2697
|
-
a.push(
|
|
2696
|
+
return this.forEach(function(l, E) {
|
|
2697
|
+
a.push(E);
|
|
2698
2698
|
}), T(a);
|
|
2699
2699
|
}, y.prototype.values = function() {
|
|
2700
2700
|
var a = [];
|
|
@@ -2703,8 +2703,8 @@ var ye = { exports: {} };
|
|
|
2703
2703
|
}), T(a);
|
|
2704
2704
|
}, y.prototype.entries = function() {
|
|
2705
2705
|
var a = [];
|
|
2706
|
-
return this.forEach(function(l,
|
|
2707
|
-
a.push([
|
|
2706
|
+
return this.forEach(function(l, E) {
|
|
2707
|
+
a.push([E, l]);
|
|
2708
2708
|
}), T(a);
|
|
2709
2709
|
}, u.iterable && (y.prototype[Symbol.iterator] = y.prototype.entries);
|
|
2710
2710
|
function N(a) {
|
|
@@ -2713,26 +2713,26 @@ var ye = { exports: {} };
|
|
|
2713
2713
|
a.bodyUsed = !0;
|
|
2714
2714
|
}
|
|
2715
2715
|
function O(a) {
|
|
2716
|
-
return new Promise(function(l,
|
|
2716
|
+
return new Promise(function(l, E) {
|
|
2717
2717
|
a.onload = function() {
|
|
2718
2718
|
l(a.result);
|
|
2719
2719
|
}, a.onerror = function() {
|
|
2720
|
-
|
|
2720
|
+
E(a.error);
|
|
2721
2721
|
};
|
|
2722
2722
|
});
|
|
2723
2723
|
}
|
|
2724
|
-
function
|
|
2725
|
-
var l = new FileReader(),
|
|
2726
|
-
return l.readAsArrayBuffer(a),
|
|
2724
|
+
function S(a) {
|
|
2725
|
+
var l = new FileReader(), E = O(l);
|
|
2726
|
+
return l.readAsArrayBuffer(a), E;
|
|
2727
2727
|
}
|
|
2728
2728
|
function z(a) {
|
|
2729
|
-
var l = new FileReader(),
|
|
2730
|
-
return l.readAsText(a),
|
|
2729
|
+
var l = new FileReader(), E = O(l);
|
|
2730
|
+
return l.readAsText(a), E;
|
|
2731
2731
|
}
|
|
2732
|
-
function
|
|
2733
|
-
for (var l = new Uint8Array(a),
|
|
2734
|
-
|
|
2735
|
-
return
|
|
2732
|
+
function P(a) {
|
|
2733
|
+
for (var l = new Uint8Array(a), E = new Array(l.length), D = 0; D < l.length; D++)
|
|
2734
|
+
E[D] = String.fromCharCode(l[D]);
|
|
2735
|
+
return E.join("");
|
|
2736
2736
|
}
|
|
2737
2737
|
function _(a) {
|
|
2738
2738
|
if (a.slice)
|
|
@@ -2755,7 +2755,7 @@ var ye = { exports: {} };
|
|
|
2755
2755
|
throw new Error("could not read FormData body as blob");
|
|
2756
2756
|
return Promise.resolve(new Blob([this._bodyText]));
|
|
2757
2757
|
}, this.arrayBuffer = function() {
|
|
2758
|
-
return this._bodyArrayBuffer ? N(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(
|
|
2758
|
+
return this._bodyArrayBuffer ? N(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(S);
|
|
2759
2759
|
}), this.text = function() {
|
|
2760
2760
|
var a = N(this);
|
|
2761
2761
|
if (a)
|
|
@@ -2763,7 +2763,7 @@ var ye = { exports: {} };
|
|
|
2763
2763
|
if (this._bodyBlob)
|
|
2764
2764
|
return z(this._bodyBlob);
|
|
2765
2765
|
if (this._bodyArrayBuffer)
|
|
2766
|
-
return Promise.resolve(
|
|
2766
|
+
return Promise.resolve(P(this._bodyArrayBuffer));
|
|
2767
2767
|
if (this._bodyFormData)
|
|
2768
2768
|
throw new Error("could not read FormData body as text");
|
|
2769
2769
|
return Promise.resolve(this._bodyText);
|
|
@@ -2778,34 +2778,34 @@ var ye = { exports: {} };
|
|
|
2778
2778
|
var l = a.toUpperCase();
|
|
2779
2779
|
return Q.indexOf(l) > -1 ? l : a;
|
|
2780
2780
|
}
|
|
2781
|
-
function
|
|
2781
|
+
function L(a, l) {
|
|
2782
2782
|
l = l || {};
|
|
2783
|
-
var
|
|
2784
|
-
if (a instanceof
|
|
2783
|
+
var E = l.body;
|
|
2784
|
+
if (a instanceof L) {
|
|
2785
2785
|
if (a.bodyUsed)
|
|
2786
2786
|
throw new TypeError("Already read");
|
|
2787
|
-
this.url = a.url, this.credentials = a.credentials, l.headers || (this.headers = new y(a.headers)), this.method = a.method, this.mode = a.mode, this.signal = a.signal, !
|
|
2787
|
+
this.url = a.url, this.credentials = a.credentials, l.headers || (this.headers = new y(a.headers)), this.method = a.method, this.mode = a.mode, this.signal = a.signal, !E && a._bodyInit != null && (E = a._bodyInit, a.bodyUsed = !0);
|
|
2788
2788
|
} else
|
|
2789
2789
|
this.url = String(a);
|
|
2790
|
-
if (this.credentials = l.credentials || this.credentials || "same-origin", (l.headers || !this.headers) && (this.headers = new y(l.headers)), this.method = J(l.method || this.method || "GET"), this.mode = l.mode || this.mode || null, this.signal = l.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") &&
|
|
2790
|
+
if (this.credentials = l.credentials || this.credentials || "same-origin", (l.headers || !this.headers) && (this.headers = new y(l.headers)), this.method = J(l.method || this.method || "GET"), this.mode = l.mode || this.mode || null, this.signal = l.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && E)
|
|
2791
2791
|
throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
2792
|
-
this._initBody(
|
|
2792
|
+
this._initBody(E);
|
|
2793
2793
|
}
|
|
2794
|
-
|
|
2795
|
-
return new
|
|
2794
|
+
L.prototype.clone = function() {
|
|
2795
|
+
return new L(this, { body: this._bodyInit });
|
|
2796
2796
|
};
|
|
2797
2797
|
function je(a) {
|
|
2798
2798
|
var l = new FormData();
|
|
2799
|
-
return a.trim().split("&").forEach(function(
|
|
2800
|
-
if (
|
|
2801
|
-
var D =
|
|
2799
|
+
return a.trim().split("&").forEach(function(E) {
|
|
2800
|
+
if (E) {
|
|
2801
|
+
var D = E.split("="), I = D.shift().replace(/\+/g, " "), A = D.join("=").replace(/\+/g, " ");
|
|
2802
2802
|
l.append(decodeURIComponent(I), decodeURIComponent(A));
|
|
2803
2803
|
}
|
|
2804
2804
|
}), l;
|
|
2805
2805
|
}
|
|
2806
2806
|
function Ge(a) {
|
|
2807
|
-
var l = new y(),
|
|
2808
|
-
return
|
|
2807
|
+
var l = new y(), E = a.replace(/\r?\n[\t ]+/g, " ");
|
|
2808
|
+
return E.split(/\r?\n/).forEach(function(D) {
|
|
2809
2809
|
var I = D.split(":"), A = I.shift().trim();
|
|
2810
2810
|
if (A) {
|
|
2811
2811
|
var X = I.join(":").trim();
|
|
@@ -2813,39 +2813,39 @@ var ye = { exports: {} };
|
|
|
2813
2813
|
}
|
|
2814
2814
|
}), l;
|
|
2815
2815
|
}
|
|
2816
|
-
U.call(
|
|
2817
|
-
function
|
|
2816
|
+
U.call(L.prototype);
|
|
2817
|
+
function w(a, l) {
|
|
2818
2818
|
l || (l = {}), this.type = "default", this.status = l.status === void 0 ? 200 : l.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in l ? l.statusText : "OK", this.headers = new y(l.headers), this.url = l.url || "", this._initBody(a);
|
|
2819
2819
|
}
|
|
2820
|
-
U.call(
|
|
2821
|
-
return new
|
|
2820
|
+
U.call(w.prototype), w.prototype.clone = function() {
|
|
2821
|
+
return new w(this._bodyInit, {
|
|
2822
2822
|
status: this.status,
|
|
2823
2823
|
statusText: this.statusText,
|
|
2824
2824
|
headers: new y(this.headers),
|
|
2825
2825
|
url: this.url
|
|
2826
2826
|
});
|
|
2827
|
-
},
|
|
2828
|
-
var a = new
|
|
2827
|
+
}, w.error = function() {
|
|
2828
|
+
var a = new w(null, { status: 0, statusText: "" });
|
|
2829
2829
|
return a.type = "error", a;
|
|
2830
2830
|
};
|
|
2831
2831
|
var $e = [301, 302, 303, 307, 308];
|
|
2832
|
-
|
|
2832
|
+
w.redirect = function(a, l) {
|
|
2833
2833
|
if ($e.indexOf(l) === -1)
|
|
2834
2834
|
throw new RangeError("Invalid status code");
|
|
2835
|
-
return new
|
|
2835
|
+
return new w(null, { status: l, headers: { location: a } });
|
|
2836
2836
|
}, o.DOMException = s.DOMException;
|
|
2837
2837
|
try {
|
|
2838
2838
|
new o.DOMException();
|
|
2839
2839
|
} catch {
|
|
2840
|
-
o.DOMException = function(l,
|
|
2841
|
-
this.message = l, this.name =
|
|
2840
|
+
o.DOMException = function(l, E) {
|
|
2841
|
+
this.message = l, this.name = E;
|
|
2842
2842
|
var D = Error(l);
|
|
2843
2843
|
this.stack = D.stack;
|
|
2844
2844
|
}, o.DOMException.prototype = Object.create(Error.prototype), o.DOMException.prototype.constructor = o.DOMException;
|
|
2845
2845
|
}
|
|
2846
2846
|
function ae(a, l) {
|
|
2847
|
-
return new Promise(function(
|
|
2848
|
-
var I = new
|
|
2847
|
+
return new Promise(function(E, D) {
|
|
2848
|
+
var I = new L(a, l);
|
|
2849
2849
|
if (I.signal && I.signal.aborted)
|
|
2850
2850
|
return D(new o.DOMException("Aborted", "AbortError"));
|
|
2851
2851
|
var A = new XMLHttpRequest();
|
|
@@ -2860,7 +2860,7 @@ var ye = { exports: {} };
|
|
|
2860
2860
|
};
|
|
2861
2861
|
j.url = "responseURL" in A ? A.responseURL : j.headers.get("X-Request-URL");
|
|
2862
2862
|
var ce = "response" in A ? A.response : A.responseText;
|
|
2863
|
-
|
|
2863
|
+
E(new w(ce, j));
|
|
2864
2864
|
}, A.onerror = function() {
|
|
2865
2865
|
D(new TypeError("Network request failed"));
|
|
2866
2866
|
}, A.ontimeout = function() {
|
|
@@ -2874,7 +2874,7 @@ var ye = { exports: {} };
|
|
|
2874
2874
|
}), A.send(typeof I._bodyInit > "u" ? null : I._bodyInit);
|
|
2875
2875
|
});
|
|
2876
2876
|
}
|
|
2877
|
-
return ae.polyfill = !0, s.fetch || (s.fetch = ae, s.Headers = y, s.Request =
|
|
2877
|
+
return ae.polyfill = !0, s.fetch || (s.fetch = ae, s.Headers = y, s.Request = L, s.Response = w), o.Headers = y, o.Request = L, o.Response = w, o.fetch = ae, Object.defineProperty(o, "__esModule", { value: !0 }), o;
|
|
2878
2878
|
})({});
|
|
2879
2879
|
})(i), i.fetch.ponyfill = !0, delete i.fetch.polyfill;
|
|
2880
2880
|
var r = i;
|
|
@@ -2908,25 +2908,25 @@ const ee = /* @__PURE__ */ Vt(ne), jt = /* @__PURE__ */ ze({
|
|
|
2908
2908
|
query: i,
|
|
2909
2909
|
variables: r,
|
|
2910
2910
|
operationName: s,
|
|
2911
|
-
jsonSerializer: u.jsonSerializer ??
|
|
2911
|
+
jsonSerializer: u.jsonSerializer ?? Ce
|
|
2912
2912
|
});
|
|
2913
|
-
const
|
|
2913
|
+
const C = {
|
|
2914
2914
|
method: e,
|
|
2915
2915
|
headers: p,
|
|
2916
2916
|
body: g,
|
|
2917
2917
|
...u
|
|
2918
2918
|
};
|
|
2919
|
-
let T = n, y =
|
|
2919
|
+
let T = n, y = C;
|
|
2920
2920
|
if (h) {
|
|
2921
|
-
const N = await Promise.resolve(h({ ...
|
|
2922
|
-
T = O, y =
|
|
2921
|
+
const N = await Promise.resolve(h({ ...C, url: n, operationName: s, variables: r })), { url: O, ...S } = N;
|
|
2922
|
+
T = O, y = S;
|
|
2923
2923
|
}
|
|
2924
2924
|
return m && (T = `${T}?${m}`), await o(T, y);
|
|
2925
2925
|
};
|
|
2926
2926
|
class Ht {
|
|
2927
2927
|
constructor(t, n = {}) {
|
|
2928
2928
|
this.url = t, this.requestConfig = n, this.rawRequest = async (...i) => {
|
|
2929
|
-
const [r, s, o] = i, u = We(r, s, o), { headers: h, fetch: p = ee, method: m = "POST", requestMiddleware: g, responseMiddleware:
|
|
2929
|
+
const [r, s, o] = i, u = We(r, s, o), { headers: h, fetch: p = ee, method: m = "POST", requestMiddleware: g, responseMiddleware: C, ...T } = this.requestConfig, { url: y } = this;
|
|
2930
2930
|
u.signal !== void 0 && (T.signal = u.signal);
|
|
2931
2931
|
const { operationName: N } = le(u.query);
|
|
2932
2932
|
return de({
|
|
@@ -2942,17 +2942,17 @@ class Ht {
|
|
|
2942
2942
|
method: m,
|
|
2943
2943
|
fetchOptions: T,
|
|
2944
2944
|
middleware: g
|
|
2945
|
-
}).then((O) => (
|
|
2946
|
-
throw
|
|
2945
|
+
}).then((O) => (C && C(O), O)).catch((O) => {
|
|
2946
|
+
throw C && C(O), O;
|
|
2947
2947
|
});
|
|
2948
2948
|
};
|
|
2949
2949
|
}
|
|
2950
2950
|
async request(t, ...n) {
|
|
2951
|
-
const [i, r] = n, s = Xe(t, i, r), { headers: o, fetch: u = ee, method: h = "POST", requestMiddleware: p, responseMiddleware: m, ...g } = this.requestConfig, { url:
|
|
2951
|
+
const [i, r] = n, s = Xe(t, i, r), { headers: o, fetch: u = ee, method: h = "POST", requestMiddleware: p, responseMiddleware: m, ...g } = this.requestConfig, { url: C } = this;
|
|
2952
2952
|
s.signal !== void 0 && (g.signal = s.signal);
|
|
2953
2953
|
const { query: T, operationName: y } = le(s.document);
|
|
2954
2954
|
return de({
|
|
2955
|
-
url:
|
|
2955
|
+
url: C,
|
|
2956
2956
|
query: T,
|
|
2957
2957
|
variables: s.variables,
|
|
2958
2958
|
headers: {
|
|
@@ -3009,11 +3009,11 @@ class Ht {
|
|
|
3009
3009
|
}
|
|
3010
3010
|
}
|
|
3011
3011
|
const de = async (e) => {
|
|
3012
|
-
const { query: t, variables: n, fetchOptions: i } = e, r = $t(Qe(e.method ?? "post")), s = Array.isArray(e.query), o = await r(e), u = await zt(o, i.jsonSerializer ??
|
|
3012
|
+
const { query: t, variables: n, fetchOptions: i } = e, r = $t(Qe(e.method ?? "post")), s = Array.isArray(e.query), o = await r(e), u = await zt(o, i.jsonSerializer ?? Ce), h = Array.isArray(u) ? !u.some(({ data: m }) => !m) : !!u.data, p = Array.isArray(u) || !u.errors || Array.isArray(u.errors) && !u.errors.length || i.errorPolicy === "all" || i.errorPolicy === "ignore";
|
|
3013
3013
|
if (o.ok && p && h) {
|
|
3014
|
-
const { errors: m, ...g } = (Array.isArray(u), u),
|
|
3014
|
+
const { errors: m, ...g } = (Array.isArray(u), u), C = i.errorPolicy === "ignore" ? g : u;
|
|
3015
3015
|
return {
|
|
3016
|
-
...s ? { data:
|
|
3016
|
+
...s ? { data: C } : C,
|
|
3017
3017
|
headers: o.headers,
|
|
3018
3018
|
status: o.status
|
|
3019
3019
|
};
|
|
@@ -3028,7 +3028,7 @@ const de = async (e) => {
|
|
|
3028
3028
|
);
|
|
3029
3029
|
}
|
|
3030
3030
|
}, Yt = (e, t, n, i) => {
|
|
3031
|
-
const r = i ??
|
|
3031
|
+
const r = i ?? Ce;
|
|
3032
3032
|
if (!Array.isArray(e))
|
|
3033
3033
|
return r.stringify({ query: e, variables: t, operationName: n });
|
|
3034
3034
|
if (typeof t < "u" && !Array.isArray(t))
|
|
@@ -3126,7 +3126,7 @@ var G = {
|
|
|
3126
3126
|
e.gql = G.gql, e.resetCaches = G.resetCaches, e.disableFragmentWarnings = G.disableFragmentWarnings, e.enableExperimentalFragmentVariables = G.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = G.disableExperimentalFragmentVariables;
|
|
3127
3127
|
})(q || (q = {}));
|
|
3128
3128
|
q.default = q;
|
|
3129
|
-
const
|
|
3129
|
+
const R = q, nn = R`
|
|
3130
3130
|
query GetLocationAvailabilities($sku: String!, $first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
3131
3131
|
locationAvailabilities(
|
|
3132
3132
|
sku: $sku
|
|
@@ -3164,7 +3164,7 @@ const k = q, nn = k`
|
|
|
3164
3164
|
}
|
|
3165
3165
|
}
|
|
3166
3166
|
}
|
|
3167
|
-
`, rn =
|
|
3167
|
+
`, rn = R`
|
|
3168
3168
|
query GetLocationAvailability($sku: String!, $locationID: ID!) {
|
|
3169
3169
|
locationAvailability(sku: $sku, locationID: $locationID) {
|
|
3170
3170
|
location {
|
|
@@ -3189,7 +3189,7 @@ const k = q, nn = k`
|
|
|
3189
3189
|
inventoryQuantity
|
|
3190
3190
|
}
|
|
3191
3191
|
}
|
|
3192
|
-
`, sn =
|
|
3192
|
+
`, sn = R`
|
|
3193
3193
|
query GetPurchasingCustomerMetafield($namespace: String!, $key: String!) {
|
|
3194
3194
|
purchasingCustomerMetafield(namespace: $namespace, key: $key) {
|
|
3195
3195
|
id
|
|
@@ -3198,14 +3198,14 @@ const k = q, nn = k`
|
|
|
3198
3198
|
value
|
|
3199
3199
|
}
|
|
3200
3200
|
}
|
|
3201
|
-
`, on =
|
|
3201
|
+
`, on = R`
|
|
3202
3202
|
query GetPoints {
|
|
3203
3203
|
purchasingCustomer {
|
|
3204
3204
|
pointsApproved
|
|
3205
3205
|
pointsPending
|
|
3206
3206
|
}
|
|
3207
3207
|
}
|
|
3208
|
-
`, an =
|
|
3208
|
+
`, an = R`
|
|
3209
3209
|
query GetLocations($first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
3210
3210
|
locations(first: $first, after: $after, isReverse: $isReverse) {
|
|
3211
3211
|
nodes {
|
|
@@ -3235,7 +3235,7 @@ const k = q, nn = k`
|
|
|
3235
3235
|
}
|
|
3236
3236
|
}
|
|
3237
3237
|
}
|
|
3238
|
-
`, cn =
|
|
3238
|
+
`, cn = R`
|
|
3239
3239
|
query GetPurchasingCustomerDiscounts($first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
3240
3240
|
purchasingCustomer {
|
|
3241
3241
|
id
|
|
@@ -3264,14 +3264,14 @@ const k = q, nn = k`
|
|
|
3264
3264
|
}
|
|
3265
3265
|
}
|
|
3266
3266
|
}
|
|
3267
|
-
`, un =
|
|
3267
|
+
`, un = R`
|
|
3268
3268
|
query GetPurchasingCustomerDiscountCodeCount {
|
|
3269
3269
|
purchasingCustomer {
|
|
3270
3270
|
id
|
|
3271
3271
|
orderPriceAdjustmentRuleCount
|
|
3272
3272
|
}
|
|
3273
3273
|
}
|
|
3274
|
-
`, ln =
|
|
3274
|
+
`, ln = R`
|
|
3275
3275
|
query GetPurchasingCustomerPointChangeActivities($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: PointChangeActivitySortKey! = CREATED_AT) {
|
|
3276
3276
|
purchasingCustomer {
|
|
3277
3277
|
id
|
|
@@ -3322,7 +3322,7 @@ const k = q, nn = k`
|
|
|
3322
3322
|
}
|
|
3323
3323
|
}
|
|
3324
3324
|
}
|
|
3325
|
-
`, dn =
|
|
3325
|
+
`, dn = R`
|
|
3326
3326
|
query GetPurchasingCustomerRank {
|
|
3327
3327
|
purchasingCustomer {
|
|
3328
3328
|
currentCustomerRank {
|
|
@@ -3361,26 +3361,38 @@ const k = q, nn = k`
|
|
|
3361
3361
|
}
|
|
3362
3362
|
}
|
|
3363
3363
|
}
|
|
3364
|
-
`, hn =
|
|
3364
|
+
`, hn = R`
|
|
3365
3365
|
query GetSharingPurchasingCustomerCount {
|
|
3366
3366
|
purchasingCustomer {
|
|
3367
3367
|
id
|
|
3368
3368
|
sharingPurchasingCustomerCount
|
|
3369
3369
|
}
|
|
3370
3370
|
}
|
|
3371
|
-
`, pn =
|
|
3371
|
+
`, pn = R`
|
|
3372
3372
|
mutation PurchasingCustomerSendCustomerSharingActivationCode {
|
|
3373
3373
|
purchasingCustomerSendCustomerSharingActivationCode {
|
|
3374
3374
|
purchasingCustomer {
|
|
3375
3375
|
id
|
|
3376
|
+
sharingPurchasingCustomerCount
|
|
3376
3377
|
}
|
|
3377
3378
|
customerSharingActivationCode {
|
|
3378
3379
|
id
|
|
3379
3380
|
}
|
|
3380
3381
|
}
|
|
3381
3382
|
}
|
|
3382
|
-
`, fn =
|
|
3383
|
-
|
|
3383
|
+
`, fn = R`
|
|
3384
|
+
mutation PurchasingCustomerActivateCustomerSharing($email: String!, $activationCode: String!) {
|
|
3385
|
+
purchasingCustomerActivateCustomerSharing(
|
|
3386
|
+
input: {email: $email, activationCode: $activationCode}
|
|
3387
|
+
) {
|
|
3388
|
+
purchasingCustomer {
|
|
3389
|
+
id
|
|
3390
|
+
sharingPurchasingCustomerCount
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3394
|
+
`, mn = (e, t, n, i) => e();
|
|
3395
|
+
function yn(e, t = mn) {
|
|
3384
3396
|
return {
|
|
3385
3397
|
GetLocationAvailabilities(n, i) {
|
|
3386
3398
|
return t((r) => e.request(nn, n, { ...i, ...r }), "GetLocationAvailabilities", "query", n);
|
|
@@ -3414,13 +3426,16 @@ function mn(e, t = fn) {
|
|
|
3414
3426
|
},
|
|
3415
3427
|
PurchasingCustomerSendCustomerSharingActivationCode(n, i) {
|
|
3416
3428
|
return t((r) => e.request(pn, n, { ...i, ...r }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
|
|
3429
|
+
},
|
|
3430
|
+
PurchasingCustomerActivateCustomerSharing(n, i) {
|
|
3431
|
+
return t((r) => e.request(fn, n, { ...i, ...r }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
|
|
3417
3432
|
}
|
|
3418
3433
|
};
|
|
3419
3434
|
}
|
|
3420
|
-
class
|
|
3435
|
+
class Cn {
|
|
3421
3436
|
constructor(t) {
|
|
3422
3437
|
Ae(this, "api");
|
|
3423
|
-
this.api =
|
|
3438
|
+
this.api = yn(
|
|
3424
3439
|
new Ht(`${t}/apps/sq-api`, {
|
|
3425
3440
|
headers: {
|
|
3426
3441
|
"X-SQ-CLIENT": "ShopifyAppProxy"
|
|
@@ -3705,11 +3720,24 @@ class gn {
|
|
|
3705
3720
|
async purchasingCustomerSendCustomerSharingActivationCode() {
|
|
3706
3721
|
const t = await this.api.PurchasingCustomerSendCustomerSharingActivationCode();
|
|
3707
3722
|
return t.purchasingCustomerSendCustomerSharingActivationCode ? {
|
|
3708
|
-
|
|
3723
|
+
purchasingCustomer: {
|
|
3724
|
+
id: t.purchasingCustomerSendCustomerSharingActivationCode.purchasingCustomer.id,
|
|
3725
|
+
sharingPurchasingCustomerCount: t.purchasingCustomerSendCustomerSharingActivationCode.purchasingCustomer.sharingPurchasingCustomerCount
|
|
3726
|
+
},
|
|
3709
3727
|
customerSharingActivationCodeID: t.purchasingCustomerSendCustomerSharingActivationCode.customerSharingActivationCode.id
|
|
3710
3728
|
} : null;
|
|
3711
3729
|
}
|
|
3730
|
+
/**
|
|
3731
|
+
* purchasingCustomerActivateCustomerSharing はクティベーションコードを入力して顧客を有効化する。
|
|
3732
|
+
*/
|
|
3733
|
+
async purchasingCustomerActivateCustomerSharing(t, n) {
|
|
3734
|
+
const i = await this.api.PurchasingCustomerActivateCustomerSharing({ email: t, activationCode: n });
|
|
3735
|
+
return i.purchasingCustomerActivateCustomerSharing ? {
|
|
3736
|
+
id: i.purchasingCustomerActivateCustomerSharing.purchasingCustomer.id,
|
|
3737
|
+
sharingPurchasingCustomerCount: i.purchasingCustomerActivateCustomerSharing.purchasingCustomer.sharingPurchasingCustomerCount
|
|
3738
|
+
} : null;
|
|
3739
|
+
}
|
|
3712
3740
|
}
|
|
3713
3741
|
export {
|
|
3714
|
-
|
|
3742
|
+
Cn as SDK
|
|
3715
3743
|
};
|