@ticketapp-dev/shop-sdk 1.0.56 → 1.0.57
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/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphQLClient as A } from "graphql-request";
|
|
2
2
|
import { DateTime as Te } from "luxon";
|
|
3
|
-
var T = /* @__PURE__ */ ((e) => (e.PACKAGE = "PACKAGE", e.PRODUCT = "PRODUCT", e.ADD_ONS = "ADD_ONS", e.DELIVERY = "DELIVERY", e.PICKUP = "PICKUP", e))(T || {}), L = /* @__PURE__ */ ((e) => (e.AdditionalEvent = "ADDITIONAL_EVENT", e.Addon = "ADDON", e.Regular = "REGULAR", e))(L || {}), W = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Concept = "CONCEPT", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(W || {}), Z = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e))(Z || {}), K = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(K || {}), ee = /* @__PURE__ */ ((e) => (e.Asc = "ASC", e.Desc = "DESC", e))(ee || {}), te = /* @__PURE__ */ ((e) => (e.AllReserved = "ALL_RESERVED", e.Available = "AVAILABLE", e.SoldOut = "SOLD_OUT", e))(te || {}), ne = /* @__PURE__ */ ((e) => (e.Addon = "ADDON", e.Delivery = "DELIVERY", e.Door = "DOOR", e.Friend = "FRIEND", e.Guest = "GUEST", e.Pickup = "PICKUP", e.Promoter = "PROMOTER", e.Ticket = "TICKET", e))(ne || {}),
|
|
3
|
+
var T = /* @__PURE__ */ ((e) => (e.PACKAGE = "PACKAGE", e.PRODUCT = "PRODUCT", e.ADD_ONS = "ADD_ONS", e.DELIVERY = "DELIVERY", e.PICKUP = "PICKUP", e))(T || {}), L = /* @__PURE__ */ ((e) => (e.AdditionalEvent = "ADDITIONAL_EVENT", e.Addon = "ADDON", e.Regular = "REGULAR", e))(L || {}), W = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Concept = "CONCEPT", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(W || {}), Z = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e))(Z || {}), K = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(K || {}), ee = /* @__PURE__ */ ((e) => (e.Asc = "ASC", e.Desc = "DESC", e))(ee || {}), te = /* @__PURE__ */ ((e) => (e.AllReserved = "ALL_RESERVED", e.Available = "AVAILABLE", e.SoldOut = "SOLD_OUT", e))(te || {}), ne = /* @__PURE__ */ ((e) => (e.Addon = "ADDON", e.Delivery = "DELIVERY", e.Door = "DOOR", e.Friend = "FRIEND", e.Guest = "GUEST", e.Pickup = "PICKUP", e.Promoter = "PROMOTER", e.Ticket = "TICKET", e))(ne || {}), ie = /* @__PURE__ */ ((e) => (e.FIXED = "FIXED", e.PERCENTAGE = "PERCENTAGE", e))(ie || {}), re = /* @__PURE__ */ ((e) => (e.AddOn = "ADD_ON", e.DeliveryOption = "DELIVERY_OPTION", e.EntranceTicket = "ENTRANCE_TICKET", e))(re || {}), se = /* @__PURE__ */ ((e) => (e.Fixed = "FIXED", e.Percentage = "PERCENTAGE", e))(se || {}), ae = /* @__PURE__ */ ((e) => (e.Default = "DEFAULT", e.Transparent = "TRANSPARENT", e))(ae || {}), oe = /* @__PURE__ */ ((e) => (e.Calendar = "CALENDAR", e.Large = "LARGE", e.Small = "SMALL", e))(oe || {}), R = /* @__PURE__ */ ((e) => (e.Event = "EVENT", e.Package = "PACKAGE", e))(R || {}), ce = /* @__PURE__ */ ((e) => (e.RADIO_BUTTON = "RADIO_BUTTON", e.DATE = "DATE", e.EMAIL = "EMAIL", e.NUMERIC = "NUMERIC", e.DROPDOWN = "DROPDOWN", e.TEXT = "TEXT", e.TEXT_AREA = "TEXT_AREA", e.TIME = "TIME", e.CHECKBOX = "CHECKBOX", e.PHONE_NUMBER = "PHONE_NUMBER", e))(ce || {}), de = /* @__PURE__ */ ((e) => (e.GENDER = "GENDER", e.FIRST_NAME = "FIRST_NAME", e.LAST_NAME = "LAST_NAME", e.EMAIL = "EMAIL", e.AGE = "AGE", e.RESIDENCE = "RESIDENCE", e.GOOGLE_PLACE = "GOOGLE_PLACE", e))(de || {}), ue = /* @__PURE__ */ ((e) => (e.ONLINE = "ONLINE", e.OFFLINE = "OFFLINE", e))(ue || {});
|
|
4
4
|
const Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5
5
|
__proto__: null,
|
|
6
6
|
BasketOrderType: T,
|
|
@@ -9,11 +9,11 @@ const Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9
9
|
DiscountType: se,
|
|
10
10
|
EventStatus: K,
|
|
11
11
|
MetricsType: R,
|
|
12
|
-
OrderItemType:
|
|
12
|
+
OrderItemType: re,
|
|
13
13
|
PackageItemType: L,
|
|
14
14
|
PackageStatus: W,
|
|
15
15
|
PackageTabType: Z,
|
|
16
|
-
PaymentMethodFeeType:
|
|
16
|
+
PaymentMethodFeeType: ie,
|
|
17
17
|
ProductStatus: te,
|
|
18
18
|
ProductType: ne,
|
|
19
19
|
SalesLocations: ue,
|
|
@@ -23,8 +23,8 @@ const Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
23
23
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
24
24
|
var F = function() {
|
|
25
25
|
return F = Object.assign || function(t) {
|
|
26
|
-
for (var n,
|
|
27
|
-
n = arguments[
|
|
26
|
+
for (var n, i = 1, r = arguments.length; i < r; i++) {
|
|
27
|
+
n = arguments[i];
|
|
28
28
|
for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
|
|
29
29
|
}
|
|
30
30
|
return t;
|
|
@@ -45,14 +45,14 @@ function ve(e, t) {
|
|
|
45
45
|
}
|
|
46
46
|
const Pe = /\r\n|[\n\r]/g;
|
|
47
47
|
function M(e, t) {
|
|
48
|
-
let n = 0,
|
|
49
|
-
for (const
|
|
50
|
-
if (typeof
|
|
48
|
+
let n = 0, i = 1;
|
|
49
|
+
for (const r of e.body.matchAll(Pe)) {
|
|
50
|
+
if (typeof r.index == "number" || ve(!1), r.index >= t)
|
|
51
51
|
break;
|
|
52
|
-
n =
|
|
52
|
+
n = r.index + r[0].length, i += 1;
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
55
|
-
line:
|
|
55
|
+
line: i,
|
|
56
56
|
column: t + 1 - n
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -63,8 +63,8 @@ function be(e) {
|
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
65
|
function le(e, t) {
|
|
66
|
-
const n = e.locationOffset.column - 1,
|
|
67
|
-
`, p =
|
|
66
|
+
const n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, l = t.line === 1 ? n : 0, h = t.column + l, E = `${e.name}:${o}:${h}
|
|
67
|
+
`, p = i.split(/\r\n|[\n\r]/g), d = p[r];
|
|
68
68
|
if (d.length > 120) {
|
|
69
69
|
const g = Math.floor(h / 80), y = h % 80, m = [];
|
|
70
70
|
for (let k = 0; k < d.length; k += 80)
|
|
@@ -78,15 +78,15 @@ function le(e, t) {
|
|
|
78
78
|
}
|
|
79
79
|
return E + Q([
|
|
80
80
|
// Lines specified like this: ["prefix", "string"],
|
|
81
|
-
[`${o - 1} |`, p[
|
|
81
|
+
[`${o - 1} |`, p[r - 1]],
|
|
82
82
|
[`${o} |`, d],
|
|
83
83
|
["|", "^".padStart(h)],
|
|
84
|
-
[`${o + 1} |`, p[
|
|
84
|
+
[`${o + 1} |`, p[r + 1]]
|
|
85
85
|
]);
|
|
86
86
|
}
|
|
87
87
|
function Q(e) {
|
|
88
|
-
const t = e.filter(([
|
|
89
|
-
return t.map(([
|
|
88
|
+
const t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
|
|
89
|
+
return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
|
|
90
90
|
`);
|
|
91
91
|
}
|
|
92
92
|
function xe(e) {
|
|
@@ -140,15 +140,15 @@ class G extends Error {
|
|
|
140
140
|
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
|
|
141
141
|
*/
|
|
142
142
|
constructor(t, ...n) {
|
|
143
|
-
var
|
|
143
|
+
var i, r, s;
|
|
144
144
|
const { nodes: o, source: l, positions: h, path: E, originalError: p, extensions: d } = xe(n);
|
|
145
145
|
super(t), this.name = "GraphQLError", this.path = E ?? void 0, this.originalError = p ?? void 0, this.nodes = X(
|
|
146
146
|
Array.isArray(o) ? o : o ? [o] : void 0
|
|
147
147
|
);
|
|
148
148
|
const g = X(
|
|
149
|
-
(
|
|
149
|
+
(i = this.nodes) === null || i === void 0 ? void 0 : i.map((m) => m.loc).filter((m) => m != null)
|
|
150
150
|
);
|
|
151
|
-
this.source = l ?? (g == null || (
|
|
151
|
+
this.source = l ?? (g == null || (r = g[0]) === null || r === void 0 ? void 0 : r.source), this.positions = h ?? g?.map((m) => m.start), this.locations = h && l ? h.map((m) => M(l, m)) : g?.map((m) => M(m.source, m.start));
|
|
152
152
|
const y = De(
|
|
153
153
|
p?.extensions
|
|
154
154
|
) ? p?.extensions : void 0;
|
|
@@ -231,8 +231,8 @@ class Se {
|
|
|
231
231
|
/**
|
|
232
232
|
* The Source document the AST represents.
|
|
233
233
|
*/
|
|
234
|
-
constructor(t, n,
|
|
235
|
-
this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source =
|
|
234
|
+
constructor(t, n, i) {
|
|
235
|
+
this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
|
|
236
236
|
}
|
|
237
237
|
get [Symbol.toStringTag]() {
|
|
238
238
|
return "Location";
|
|
@@ -271,8 +271,8 @@ class he {
|
|
|
271
271
|
* including ignored tokens. <SOF> is always the first node and <EOF>
|
|
272
272
|
* the last.
|
|
273
273
|
*/
|
|
274
|
-
constructor(t, n,
|
|
275
|
-
this.kind = t, this.start = n, this.end =
|
|
274
|
+
constructor(t, n, i, r, s, o) {
|
|
275
|
+
this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
|
|
276
276
|
}
|
|
277
277
|
get [Symbol.toStringTag]() {
|
|
278
278
|
return "Token";
|
|
@@ -405,15 +405,15 @@ function Le(e) {
|
|
|
405
405
|
}
|
|
406
406
|
function Re(e) {
|
|
407
407
|
var t;
|
|
408
|
-
let n = Number.MAX_SAFE_INTEGER,
|
|
408
|
+
let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
|
|
409
409
|
for (let o = 0; o < e.length; ++o) {
|
|
410
410
|
var s;
|
|
411
411
|
const l = e[o], h = Fe(l);
|
|
412
|
-
h !== l.length && (
|
|
412
|
+
h !== l.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < n && (n = h));
|
|
413
413
|
}
|
|
414
414
|
return e.map((o, l) => l === 0 ? o : o.slice(n)).slice(
|
|
415
|
-
(t =
|
|
416
|
-
|
|
415
|
+
(t = i) !== null && t !== void 0 ? t : 0,
|
|
416
|
+
r + 1
|
|
417
417
|
);
|
|
418
418
|
}
|
|
419
419
|
function Fe(e) {
|
|
@@ -490,20 +490,20 @@ function N(e, t) {
|
|
|
490
490
|
if (n === void 0)
|
|
491
491
|
return a.EOF;
|
|
492
492
|
if (n >= 32 && n <= 126) {
|
|
493
|
-
const
|
|
494
|
-
return
|
|
493
|
+
const i = String.fromCodePoint(n);
|
|
494
|
+
return i === '"' ? `'"'` : `"${i}"`;
|
|
495
495
|
}
|
|
496
496
|
return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
|
|
497
497
|
}
|
|
498
|
-
function f(e, t, n,
|
|
498
|
+
function f(e, t, n, i, r) {
|
|
499
499
|
const s = e.line, o = 1 + n - e.lineStart;
|
|
500
|
-
return new he(t, n,
|
|
500
|
+
return new he(t, n, i, s, o, r);
|
|
501
501
|
}
|
|
502
502
|
function Be(e, t) {
|
|
503
|
-
const n = e.source.body,
|
|
504
|
-
let
|
|
505
|
-
for (;
|
|
506
|
-
const s = n.charCodeAt(
|
|
503
|
+
const n = e.source.body, i = n.length;
|
|
504
|
+
let r = t;
|
|
505
|
+
for (; r < i; ) {
|
|
506
|
+
const s = n.charCodeAt(r);
|
|
507
507
|
switch (s) {
|
|
508
508
|
// Ignored ::
|
|
509
509
|
// - UnicodeBOM
|
|
@@ -526,21 +526,21 @@ function Be(e, t) {
|
|
|
526
526
|
case 32:
|
|
527
527
|
// <space>
|
|
528
528
|
case 44:
|
|
529
|
-
++
|
|
529
|
+
++r;
|
|
530
530
|
continue;
|
|
531
531
|
// LineTerminator ::
|
|
532
532
|
// - "New Line (U+000A)"
|
|
533
533
|
// - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
|
|
534
534
|
// - "Carriage Return (U+000D)" "New Line (U+000A)"
|
|
535
535
|
case 10:
|
|
536
|
-
++
|
|
536
|
+
++r, ++e.line, e.lineStart = r;
|
|
537
537
|
continue;
|
|
538
538
|
case 13:
|
|
539
|
-
n.charCodeAt(
|
|
539
|
+
n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
|
|
540
540
|
continue;
|
|
541
541
|
// Comment
|
|
542
542
|
case 35:
|
|
543
|
-
return Ue(e,
|
|
543
|
+
return Ue(e, r);
|
|
544
544
|
// Token ::
|
|
545
545
|
// - Punctuator
|
|
546
546
|
// - Name
|
|
@@ -550,62 +550,62 @@ function Be(e, t) {
|
|
|
550
550
|
//
|
|
551
551
|
// Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
|
|
552
552
|
case 33:
|
|
553
|
-
return f(e, a.BANG,
|
|
553
|
+
return f(e, a.BANG, r, r + 1);
|
|
554
554
|
case 36:
|
|
555
|
-
return f(e, a.DOLLAR,
|
|
555
|
+
return f(e, a.DOLLAR, r, r + 1);
|
|
556
556
|
case 38:
|
|
557
|
-
return f(e, a.AMP,
|
|
557
|
+
return f(e, a.AMP, r, r + 1);
|
|
558
558
|
case 40:
|
|
559
|
-
return f(e, a.PAREN_L,
|
|
559
|
+
return f(e, a.PAREN_L, r, r + 1);
|
|
560
560
|
case 41:
|
|
561
|
-
return f(e, a.PAREN_R,
|
|
561
|
+
return f(e, a.PAREN_R, r, r + 1);
|
|
562
562
|
case 46:
|
|
563
|
-
if (n.charCodeAt(
|
|
564
|
-
return f(e, a.SPREAD,
|
|
563
|
+
if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46)
|
|
564
|
+
return f(e, a.SPREAD, r, r + 3);
|
|
565
565
|
break;
|
|
566
566
|
case 58:
|
|
567
|
-
return f(e, a.COLON,
|
|
567
|
+
return f(e, a.COLON, r, r + 1);
|
|
568
568
|
case 61:
|
|
569
|
-
return f(e, a.EQUALS,
|
|
569
|
+
return f(e, a.EQUALS, r, r + 1);
|
|
570
570
|
case 64:
|
|
571
|
-
return f(e, a.AT,
|
|
571
|
+
return f(e, a.AT, r, r + 1);
|
|
572
572
|
case 91:
|
|
573
|
-
return f(e, a.BRACKET_L,
|
|
573
|
+
return f(e, a.BRACKET_L, r, r + 1);
|
|
574
574
|
case 93:
|
|
575
|
-
return f(e, a.BRACKET_R,
|
|
575
|
+
return f(e, a.BRACKET_R, r, r + 1);
|
|
576
576
|
case 123:
|
|
577
|
-
return f(e, a.BRACE_L,
|
|
577
|
+
return f(e, a.BRACE_L, r, r + 1);
|
|
578
578
|
case 124:
|
|
579
|
-
return f(e, a.PIPE,
|
|
579
|
+
return f(e, a.PIPE, r, r + 1);
|
|
580
580
|
case 125:
|
|
581
|
-
return f(e, a.BRACE_R,
|
|
581
|
+
return f(e, a.BRACE_R, r, r + 1);
|
|
582
582
|
// StringValue
|
|
583
583
|
case 34:
|
|
584
|
-
return n.charCodeAt(
|
|
584
|
+
return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? je(e, r) : Me(e, r);
|
|
585
585
|
}
|
|
586
586
|
if (x(s) || s === 45)
|
|
587
|
-
return Ve(e,
|
|
587
|
+
return Ve(e, r, s);
|
|
588
588
|
if (ge(s))
|
|
589
|
-
return He(e,
|
|
589
|
+
return He(e, r);
|
|
590
590
|
throw I(
|
|
591
591
|
e.source,
|
|
592
|
-
|
|
593
|
-
s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : v(s) || $(n,
|
|
592
|
+
r,
|
|
593
|
+
s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : v(s) || $(n, r) ? `Unexpected character: ${N(e, r)}.` : `Invalid character: ${N(e, r)}.`
|
|
594
594
|
);
|
|
595
595
|
}
|
|
596
|
-
return f(e, a.EOF,
|
|
596
|
+
return f(e, a.EOF, i, i);
|
|
597
597
|
}
|
|
598
598
|
function Ue(e, t) {
|
|
599
|
-
const n = e.source.body,
|
|
600
|
-
let
|
|
601
|
-
for (;
|
|
602
|
-
const s = n.charCodeAt(
|
|
599
|
+
const n = e.source.body, i = n.length;
|
|
600
|
+
let r = t + 1;
|
|
601
|
+
for (; r < i; ) {
|
|
602
|
+
const s = n.charCodeAt(r);
|
|
603
603
|
if (s === 10 || s === 13)
|
|
604
604
|
break;
|
|
605
605
|
if (v(s))
|
|
606
|
-
++
|
|
607
|
-
else if ($(n,
|
|
608
|
-
|
|
606
|
+
++r;
|
|
607
|
+
else if ($(n, r))
|
|
608
|
+
r += 2;
|
|
609
609
|
else
|
|
610
610
|
break;
|
|
611
611
|
}
|
|
@@ -613,40 +613,40 @@ function Ue(e, t) {
|
|
|
613
613
|
e,
|
|
614
614
|
a.COMMENT,
|
|
615
615
|
t,
|
|
616
|
-
|
|
617
|
-
n.slice(t + 1,
|
|
616
|
+
r,
|
|
617
|
+
n.slice(t + 1, r)
|
|
618
618
|
);
|
|
619
619
|
}
|
|
620
620
|
function Ve(e, t, n) {
|
|
621
|
-
const
|
|
622
|
-
let
|
|
623
|
-
if (s === 45 && (s =
|
|
624
|
-
if (s =
|
|
621
|
+
const i = e.source.body;
|
|
622
|
+
let r = t, s = n, o = !1;
|
|
623
|
+
if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
|
|
624
|
+
if (s = i.charCodeAt(++r), x(s))
|
|
625
625
|
throw I(
|
|
626
626
|
e.source,
|
|
627
|
-
|
|
627
|
+
r,
|
|
628
628
|
`Invalid number, unexpected digit after 0: ${N(
|
|
629
629
|
e,
|
|
630
|
-
|
|
630
|
+
r
|
|
631
631
|
)}.`
|
|
632
632
|
);
|
|
633
633
|
} else
|
|
634
|
-
|
|
635
|
-
if (s === 46 && (o = !0, s =
|
|
634
|
+
r = V(e, r, s), s = i.charCodeAt(r);
|
|
635
|
+
if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = V(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 = V(e, r, s), s = i.charCodeAt(r)), s === 46 || ge(s))
|
|
636
636
|
throw I(
|
|
637
637
|
e.source,
|
|
638
|
-
|
|
638
|
+
r,
|
|
639
639
|
`Invalid number, expected digit but got: ${N(
|
|
640
640
|
e,
|
|
641
|
-
|
|
641
|
+
r
|
|
642
642
|
)}.`
|
|
643
643
|
);
|
|
644
644
|
return f(
|
|
645
645
|
e,
|
|
646
646
|
o ? a.FLOAT : a.INT,
|
|
647
647
|
t,
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
r,
|
|
649
|
+
i.slice(t, r)
|
|
650
650
|
);
|
|
651
651
|
}
|
|
652
652
|
function V(e, t, n) {
|
|
@@ -659,57 +659,57 @@ function V(e, t, n) {
|
|
|
659
659
|
t
|
|
660
660
|
)}.`
|
|
661
661
|
);
|
|
662
|
-
const
|
|
663
|
-
let
|
|
664
|
-
for (; x(
|
|
665
|
-
++
|
|
666
|
-
return
|
|
662
|
+
const i = e.source.body;
|
|
663
|
+
let r = t + 1;
|
|
664
|
+
for (; x(i.charCodeAt(r)); )
|
|
665
|
+
++r;
|
|
666
|
+
return r;
|
|
667
667
|
}
|
|
668
668
|
function Me(e, t) {
|
|
669
|
-
const n = e.source.body,
|
|
670
|
-
let
|
|
671
|
-
for (;
|
|
672
|
-
const l = n.charCodeAt(
|
|
669
|
+
const n = e.source.body, i = n.length;
|
|
670
|
+
let r = t + 1, s = r, o = "";
|
|
671
|
+
for (; r < i; ) {
|
|
672
|
+
const l = n.charCodeAt(r);
|
|
673
673
|
if (l === 34)
|
|
674
|
-
return o += n.slice(s,
|
|
674
|
+
return o += n.slice(s, r), f(e, a.STRING, t, r + 1, o);
|
|
675
675
|
if (l === 92) {
|
|
676
|
-
o += n.slice(s,
|
|
677
|
-
const h = n.charCodeAt(
|
|
678
|
-
o += h.value,
|
|
676
|
+
o += n.slice(s, r);
|
|
677
|
+
const h = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? qe(e, r) : ze(e, r) : Ge(e, r);
|
|
678
|
+
o += h.value, r += h.size, s = r;
|
|
679
679
|
continue;
|
|
680
680
|
}
|
|
681
681
|
if (l === 10 || l === 13)
|
|
682
682
|
break;
|
|
683
683
|
if (v(l))
|
|
684
|
-
++
|
|
685
|
-
else if ($(n,
|
|
686
|
-
|
|
684
|
+
++r;
|
|
685
|
+
else if ($(n, r))
|
|
686
|
+
r += 2;
|
|
687
687
|
else
|
|
688
688
|
throw I(
|
|
689
689
|
e.source,
|
|
690
|
-
|
|
690
|
+
r,
|
|
691
691
|
`Invalid character within String: ${N(
|
|
692
692
|
e,
|
|
693
|
-
|
|
693
|
+
r
|
|
694
694
|
)}.`
|
|
695
695
|
);
|
|
696
696
|
}
|
|
697
|
-
throw I(e.source,
|
|
697
|
+
throw I(e.source, r, "Unterminated string.");
|
|
698
698
|
}
|
|
699
699
|
function qe(e, t) {
|
|
700
700
|
const n = e.source.body;
|
|
701
|
-
let
|
|
702
|
-
for (;
|
|
703
|
-
const s = n.charCodeAt(t +
|
|
701
|
+
let i = 0, r = 3;
|
|
702
|
+
for (; r < 12; ) {
|
|
703
|
+
const s = n.charCodeAt(t + r++);
|
|
704
704
|
if (s === 125) {
|
|
705
|
-
if (
|
|
705
|
+
if (r < 5 || !v(i))
|
|
706
706
|
break;
|
|
707
707
|
return {
|
|
708
|
-
value: String.fromCodePoint(
|
|
709
|
-
size:
|
|
708
|
+
value: String.fromCodePoint(i),
|
|
709
|
+
size: r
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
if (
|
|
712
|
+
if (i = i << 4 | b(s), i < 0)
|
|
713
713
|
break;
|
|
714
714
|
}
|
|
715
715
|
throw I(
|
|
@@ -717,22 +717,22 @@ function qe(e, t) {
|
|
|
717
717
|
t,
|
|
718
718
|
`Invalid Unicode escape sequence: "${n.slice(
|
|
719
719
|
t,
|
|
720
|
-
t +
|
|
720
|
+
t + r
|
|
721
721
|
)}".`
|
|
722
722
|
);
|
|
723
723
|
}
|
|
724
724
|
function ze(e, t) {
|
|
725
|
-
const n = e.source.body,
|
|
726
|
-
if (v(
|
|
725
|
+
const n = e.source.body, i = J(n, t + 2);
|
|
726
|
+
if (v(i))
|
|
727
727
|
return {
|
|
728
|
-
value: String.fromCodePoint(
|
|
728
|
+
value: String.fromCodePoint(i),
|
|
729
729
|
size: 6
|
|
730
730
|
};
|
|
731
|
-
if (me(
|
|
732
|
-
const
|
|
733
|
-
if (fe(
|
|
731
|
+
if (me(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
|
|
732
|
+
const r = J(n, t + 8);
|
|
733
|
+
if (fe(r))
|
|
734
734
|
return {
|
|
735
|
-
value: String.fromCodePoint(
|
|
735
|
+
value: String.fromCodePoint(i, r),
|
|
736
736
|
size: 12
|
|
737
737
|
};
|
|
738
738
|
}
|
|
@@ -803,10 +803,10 @@ function Ge(e, t) {
|
|
|
803
803
|
);
|
|
804
804
|
}
|
|
805
805
|
function je(e, t) {
|
|
806
|
-
const n = e.source.body,
|
|
807
|
-
let
|
|
806
|
+
const n = e.source.body, i = n.length;
|
|
807
|
+
let r = e.lineStart, s = t + 3, o = s, l = "";
|
|
808
808
|
const h = [];
|
|
809
|
-
for (; s <
|
|
809
|
+
for (; s < i; ) {
|
|
810
810
|
const E = n.charCodeAt(s);
|
|
811
811
|
if (E === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
|
|
812
812
|
l += n.slice(o, s), h.push(l);
|
|
@@ -819,14 +819,14 @@ function je(e, t) {
|
|
|
819
819
|
Re(h).join(`
|
|
820
820
|
`)
|
|
821
821
|
);
|
|
822
|
-
return e.line += h.length - 1, e.lineStart =
|
|
822
|
+
return e.line += h.length - 1, e.lineStart = r, p;
|
|
823
823
|
}
|
|
824
824
|
if (E === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
|
|
825
825
|
l += n.slice(o, s), o = s + 1, s += 4;
|
|
826
826
|
continue;
|
|
827
827
|
}
|
|
828
828
|
if (E === 10 || E === 13) {
|
|
829
|
-
l += n.slice(o, s), h.push(l), E === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, l = "", o = s,
|
|
829
|
+
l += n.slice(o, s), h.push(l), E === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, l = "", o = s, r = s;
|
|
830
830
|
continue;
|
|
831
831
|
}
|
|
832
832
|
if (v(E))
|
|
@@ -846,12 +846,12 @@ function je(e, t) {
|
|
|
846
846
|
throw I(e.source, s, "Unterminated string.");
|
|
847
847
|
}
|
|
848
848
|
function He(e, t) {
|
|
849
|
-
const n = e.source.body,
|
|
850
|
-
let
|
|
851
|
-
for (;
|
|
852
|
-
const s = n.charCodeAt(
|
|
849
|
+
const n = e.source.body, i = n.length;
|
|
850
|
+
let r = t + 1;
|
|
851
|
+
for (; r < i; ) {
|
|
852
|
+
const s = n.charCodeAt(r);
|
|
853
853
|
if (Le(s))
|
|
854
|
-
++
|
|
854
|
+
++r;
|
|
855
855
|
else
|
|
856
856
|
break;
|
|
857
857
|
}
|
|
@@ -859,8 +859,8 @@ function He(e, t) {
|
|
|
859
859
|
e,
|
|
860
860
|
a.NAME,
|
|
861
861
|
t,
|
|
862
|
-
|
|
863
|
-
n.slice(t,
|
|
862
|
+
r,
|
|
863
|
+
n.slice(t, r)
|
|
864
864
|
);
|
|
865
865
|
}
|
|
866
866
|
const Ye = 10, Ie = 2;
|
|
@@ -886,9 +886,9 @@ function Qe(e, t) {
|
|
|
886
886
|
return "[Circular]";
|
|
887
887
|
const n = [...t, e];
|
|
888
888
|
if (Xe(e)) {
|
|
889
|
-
const
|
|
890
|
-
if (
|
|
891
|
-
return typeof
|
|
889
|
+
const i = e.toJSON();
|
|
890
|
+
if (i !== e)
|
|
891
|
+
return typeof i == "string" ? i : B(i, n);
|
|
892
892
|
} else if (Array.isArray(e))
|
|
893
893
|
return We(e, n);
|
|
894
894
|
return Je(e, n);
|
|
@@ -899,7 +899,7 @@ function Xe(e) {
|
|
|
899
899
|
function Je(e, t) {
|
|
900
900
|
const n = Object.entries(e);
|
|
901
901
|
return n.length === 0 ? "{}" : t.length > Ie ? "[" + Ze(e) + "]" : "{ " + n.map(
|
|
902
|
-
([
|
|
902
|
+
([r, s]) => r + ": " + B(s, t)
|
|
903
903
|
).join(", ") + " }";
|
|
904
904
|
}
|
|
905
905
|
function We(e, t) {
|
|
@@ -907,10 +907,10 @@ function We(e, t) {
|
|
|
907
907
|
return "[]";
|
|
908
908
|
if (t.length > Ie)
|
|
909
909
|
return "[Array]";
|
|
910
|
-
const n = Math.min(Ye, e.length),
|
|
910
|
+
const n = Math.min(Ye, e.length), i = e.length - n, r = [];
|
|
911
911
|
for (let s = 0; s < n; ++s)
|
|
912
|
-
|
|
913
|
-
return
|
|
912
|
+
r.push(B(e[s], t));
|
|
913
|
+
return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
|
|
914
914
|
}
|
|
915
915
|
function Ze(e) {
|
|
916
916
|
const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
@@ -931,14 +931,14 @@ process.env.NODE_ENV === "production", et = (
|
|
|
931
931
|
if (t instanceof n)
|
|
932
932
|
return !0;
|
|
933
933
|
if (typeof t == "object" && t !== null) {
|
|
934
|
-
var
|
|
935
|
-
const
|
|
934
|
+
var i;
|
|
935
|
+
const r = n.prototype[Symbol.toStringTag], s = (
|
|
936
936
|
// We still need to support constructor's name to detect conflicts with older versions of this library.
|
|
937
|
-
Symbol.toStringTag in t ? t[Symbol.toStringTag] : (
|
|
937
|
+
Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name
|
|
938
938
|
);
|
|
939
|
-
if (
|
|
939
|
+
if (r === s) {
|
|
940
940
|
const o = Ee(t);
|
|
941
|
-
throw new Error(`Cannot use ${
|
|
941
|
+
throw new Error(`Cannot use ${r} "${o}" from another module or realm.
|
|
942
942
|
|
|
943
943
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
944
944
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -956,11 +956,11 @@ spurious results.`);
|
|
|
956
956
|
}
|
|
957
957
|
);
|
|
958
958
|
class ye {
|
|
959
|
-
constructor(t, n = "GraphQL request",
|
|
959
|
+
constructor(t, n = "GraphQL request", i = {
|
|
960
960
|
line: 1,
|
|
961
961
|
column: 1
|
|
962
962
|
}) {
|
|
963
|
-
typeof t == "string" || U(!1, `Body must be a string. Received: ${Ee(t)}.`), this.body = t, this.name = n, this.locationOffset =
|
|
963
|
+
typeof t == "string" || U(!1, `Body must be a string. Received: ${Ee(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || U(
|
|
964
964
|
!1,
|
|
965
965
|
"line in locationOffset is 1-indexed and must be positive."
|
|
966
966
|
), this.locationOffset.column > 0 || U(
|
|
@@ -976,22 +976,22 @@ function tt(e) {
|
|
|
976
976
|
return et(e, ye);
|
|
977
977
|
}
|
|
978
978
|
function nt(e, t) {
|
|
979
|
-
const n = new
|
|
980
|
-
return Object.defineProperty(
|
|
979
|
+
const n = new it(e, t), i = n.parseDocument();
|
|
980
|
+
return Object.defineProperty(i, "tokenCount", {
|
|
981
981
|
enumerable: !1,
|
|
982
982
|
value: n.tokenCount
|
|
983
|
-
}),
|
|
983
|
+
}), i;
|
|
984
984
|
}
|
|
985
|
-
class
|
|
985
|
+
class it {
|
|
986
986
|
constructor(t, n = {}) {
|
|
987
|
-
const { lexer:
|
|
988
|
-
if (
|
|
989
|
-
this._lexer =
|
|
987
|
+
const { lexer: i, ...r } = n;
|
|
988
|
+
if (i)
|
|
989
|
+
this._lexer = i;
|
|
990
990
|
else {
|
|
991
991
|
const s = tt(t) ? t : new ye(t);
|
|
992
992
|
this._lexer = new we(s);
|
|
993
993
|
}
|
|
994
|
-
this._options =
|
|
994
|
+
this._options = r, this._tokenCounter = 0;
|
|
995
995
|
}
|
|
996
996
|
get tokenCount() {
|
|
997
997
|
return this._tokenCounter;
|
|
@@ -1109,13 +1109,13 @@ class rt {
|
|
|
1109
1109
|
directives: [],
|
|
1110
1110
|
selectionSet: this.parseSelectionSet()
|
|
1111
1111
|
});
|
|
1112
|
-
const n = this.parseDescription(),
|
|
1113
|
-
let
|
|
1114
|
-
return this.peek(a.NAME) && (
|
|
1112
|
+
const n = this.parseDescription(), i = this.parseOperationType();
|
|
1113
|
+
let r;
|
|
1114
|
+
return this.peek(a.NAME) && (r = this.parseName()), this.node(t, {
|
|
1115
1115
|
kind: c.OPERATION_DEFINITION,
|
|
1116
|
-
operation:
|
|
1116
|
+
operation: i,
|
|
1117
1117
|
description: n,
|
|
1118
|
-
name:
|
|
1118
|
+
name: r,
|
|
1119
1119
|
variableDefinitions: this.parseVariableDefinitions(),
|
|
1120
1120
|
directives: this.parseDirectives(!1),
|
|
1121
1121
|
selectionSet: this.parseSelectionSet()
|
|
@@ -1200,11 +1200,11 @@ class rt {
|
|
|
1200
1200
|
*/
|
|
1201
1201
|
parseField() {
|
|
1202
1202
|
const t = this._lexer.token, n = this.parseName();
|
|
1203
|
-
let
|
|
1204
|
-
return this.expectOptionalToken(a.COLON) ? (
|
|
1203
|
+
let i, r;
|
|
1204
|
+
return this.expectOptionalToken(a.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
|
|
1205
1205
|
kind: c.FIELD,
|
|
1206
|
-
alias:
|
|
1207
|
-
name:
|
|
1206
|
+
alias: i,
|
|
1207
|
+
name: r,
|
|
1208
1208
|
arguments: this.parseArguments(!1),
|
|
1209
1209
|
directives: this.parseDirectives(!1),
|
|
1210
1210
|
selectionSet: this.peek(a.BRACE_L) ? this.parseSelectionSet() : void 0
|
|
@@ -1221,10 +1221,10 @@ class rt {
|
|
|
1221
1221
|
* Argument[Const] : Name : Value[?Const]
|
|
1222
1222
|
*/
|
|
1223
1223
|
parseArgument(t = !1) {
|
|
1224
|
-
const n = this._lexer.token,
|
|
1224
|
+
const n = this._lexer.token, i = this.parseName();
|
|
1225
1225
|
return this.expectToken(a.COLON), this.node(n, {
|
|
1226
1226
|
kind: c.ARGUMENT,
|
|
1227
|
-
name:
|
|
1227
|
+
name: i,
|
|
1228
1228
|
value: this.parseValueLiteral(t)
|
|
1229
1229
|
});
|
|
1230
1230
|
}
|
|
@@ -1351,11 +1351,11 @@ class rt {
|
|
|
1351
1351
|
case a.DOLLAR:
|
|
1352
1352
|
if (t)
|
|
1353
1353
|
if (this.expectToken(a.DOLLAR), this._lexer.token.kind === a.NAME) {
|
|
1354
|
-
const
|
|
1354
|
+
const i = this._lexer.token.value;
|
|
1355
1355
|
throw I(
|
|
1356
1356
|
this._lexer.source,
|
|
1357
1357
|
n.start,
|
|
1358
|
-
`Unexpected variable "$${
|
|
1358
|
+
`Unexpected variable "$${i}" in constant value.`
|
|
1359
1359
|
);
|
|
1360
1360
|
} else
|
|
1361
1361
|
throw this.unexpected(n);
|
|
@@ -1405,10 +1405,10 @@ class rt {
|
|
|
1405
1405
|
* ObjectField[Const] : Name : Value[?Const]
|
|
1406
1406
|
*/
|
|
1407
1407
|
parseObjectField(t) {
|
|
1408
|
-
const n = this._lexer.token,
|
|
1408
|
+
const n = this._lexer.token, i = this.parseName();
|
|
1409
1409
|
return this.expectToken(a.COLON), this.node(n, {
|
|
1410
1410
|
kind: c.OBJECT_FIELD,
|
|
1411
|
-
name:
|
|
1411
|
+
name: i,
|
|
1412
1412
|
value: this.parseValueLiteral(t)
|
|
1413
1413
|
});
|
|
1414
1414
|
}
|
|
@@ -1449,10 +1449,10 @@ class rt {
|
|
|
1449
1449
|
const t = this._lexer.token;
|
|
1450
1450
|
let n;
|
|
1451
1451
|
if (this.expectOptionalToken(a.BRACKET_L)) {
|
|
1452
|
-
const
|
|
1452
|
+
const i = this.parseTypeReference();
|
|
1453
1453
|
this.expectToken(a.BRACKET_R), n = this.node(t, {
|
|
1454
1454
|
kind: c.LIST_TYPE,
|
|
1455
|
-
type:
|
|
1455
|
+
type: i
|
|
1456
1456
|
});
|
|
1457
1457
|
} else
|
|
1458
1458
|
n = this.parseNamedType();
|
|
@@ -1489,7 +1489,7 @@ class rt {
|
|
|
1489
1489
|
parseSchemaDefinition() {
|
|
1490
1490
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1491
1491
|
this.expectKeyword("schema");
|
|
1492
|
-
const
|
|
1492
|
+
const i = this.parseConstDirectives(), r = this.many(
|
|
1493
1493
|
a.BRACE_L,
|
|
1494
1494
|
this.parseOperationTypeDefinition,
|
|
1495
1495
|
a.BRACE_R
|
|
@@ -1497,8 +1497,8 @@ class rt {
|
|
|
1497
1497
|
return this.node(t, {
|
|
1498
1498
|
kind: c.SCHEMA_DEFINITION,
|
|
1499
1499
|
description: n,
|
|
1500
|
-
directives:
|
|
1501
|
-
operationTypes:
|
|
1500
|
+
directives: i,
|
|
1501
|
+
operationTypes: r
|
|
1502
1502
|
});
|
|
1503
1503
|
}
|
|
1504
1504
|
/**
|
|
@@ -1507,11 +1507,11 @@ class rt {
|
|
|
1507
1507
|
parseOperationTypeDefinition() {
|
|
1508
1508
|
const t = this._lexer.token, n = this.parseOperationType();
|
|
1509
1509
|
this.expectToken(a.COLON);
|
|
1510
|
-
const
|
|
1510
|
+
const i = this.parseNamedType();
|
|
1511
1511
|
return this.node(t, {
|
|
1512
1512
|
kind: c.OPERATION_TYPE_DEFINITION,
|
|
1513
1513
|
operation: n,
|
|
1514
|
-
type:
|
|
1514
|
+
type: i
|
|
1515
1515
|
});
|
|
1516
1516
|
}
|
|
1517
1517
|
/**
|
|
@@ -1520,12 +1520,12 @@ class rt {
|
|
|
1520
1520
|
parseScalarTypeDefinition() {
|
|
1521
1521
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1522
1522
|
this.expectKeyword("scalar");
|
|
1523
|
-
const
|
|
1523
|
+
const i = this.parseName(), r = this.parseConstDirectives();
|
|
1524
1524
|
return this.node(t, {
|
|
1525
1525
|
kind: c.SCALAR_TYPE_DEFINITION,
|
|
1526
1526
|
description: n,
|
|
1527
|
-
name:
|
|
1528
|
-
directives:
|
|
1527
|
+
name: i,
|
|
1528
|
+
directives: r
|
|
1529
1529
|
});
|
|
1530
1530
|
}
|
|
1531
1531
|
/**
|
|
@@ -1536,12 +1536,12 @@ class rt {
|
|
|
1536
1536
|
parseObjectTypeDefinition() {
|
|
1537
1537
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1538
1538
|
this.expectKeyword("type");
|
|
1539
|
-
const
|
|
1539
|
+
const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
|
|
1540
1540
|
return this.node(t, {
|
|
1541
1541
|
kind: c.OBJECT_TYPE_DEFINITION,
|
|
1542
1542
|
description: n,
|
|
1543
|
-
name:
|
|
1544
|
-
interfaces:
|
|
1543
|
+
name: i,
|
|
1544
|
+
interfaces: r,
|
|
1545
1545
|
directives: s,
|
|
1546
1546
|
fields: o
|
|
1547
1547
|
});
|
|
@@ -1571,14 +1571,14 @@ class rt {
|
|
|
1571
1571
|
* - Description? Name ArgumentsDefinition? : Type Directives[Const]?
|
|
1572
1572
|
*/
|
|
1573
1573
|
parseFieldDefinition() {
|
|
1574
|
-
const t = this._lexer.token, n = this.parseDescription(),
|
|
1574
|
+
const t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
|
|
1575
1575
|
this.expectToken(a.COLON);
|
|
1576
1576
|
const s = this.parseTypeReference(), o = this.parseConstDirectives();
|
|
1577
1577
|
return this.node(t, {
|
|
1578
1578
|
kind: c.FIELD_DEFINITION,
|
|
1579
1579
|
description: n,
|
|
1580
|
-
name:
|
|
1581
|
-
arguments:
|
|
1580
|
+
name: i,
|
|
1581
|
+
arguments: r,
|
|
1582
1582
|
type: s,
|
|
1583
1583
|
directives: o
|
|
1584
1584
|
});
|
|
@@ -1598,17 +1598,17 @@ class rt {
|
|
|
1598
1598
|
* - Description? Name : Type DefaultValue? Directives[Const]?
|
|
1599
1599
|
*/
|
|
1600
1600
|
parseInputValueDef() {
|
|
1601
|
-
const t = this._lexer.token, n = this.parseDescription(),
|
|
1601
|
+
const t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
|
|
1602
1602
|
this.expectToken(a.COLON);
|
|
1603
|
-
const
|
|
1603
|
+
const r = this.parseTypeReference();
|
|
1604
1604
|
let s;
|
|
1605
1605
|
this.expectOptionalToken(a.EQUALS) && (s = this.parseConstValueLiteral());
|
|
1606
1606
|
const o = this.parseConstDirectives();
|
|
1607
1607
|
return this.node(t, {
|
|
1608
1608
|
kind: c.INPUT_VALUE_DEFINITION,
|
|
1609
1609
|
description: n,
|
|
1610
|
-
name:
|
|
1611
|
-
type:
|
|
1610
|
+
name: i,
|
|
1611
|
+
type: r,
|
|
1612
1612
|
defaultValue: s,
|
|
1613
1613
|
directives: o
|
|
1614
1614
|
});
|
|
@@ -1620,12 +1620,12 @@ class rt {
|
|
|
1620
1620
|
parseInterfaceTypeDefinition() {
|
|
1621
1621
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1622
1622
|
this.expectKeyword("interface");
|
|
1623
|
-
const
|
|
1623
|
+
const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
|
|
1624
1624
|
return this.node(t, {
|
|
1625
1625
|
kind: c.INTERFACE_TYPE_DEFINITION,
|
|
1626
1626
|
description: n,
|
|
1627
|
-
name:
|
|
1628
|
-
interfaces:
|
|
1627
|
+
name: i,
|
|
1628
|
+
interfaces: r,
|
|
1629
1629
|
directives: s,
|
|
1630
1630
|
fields: o
|
|
1631
1631
|
});
|
|
@@ -1637,12 +1637,12 @@ class rt {
|
|
|
1637
1637
|
parseUnionTypeDefinition() {
|
|
1638
1638
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1639
1639
|
this.expectKeyword("union");
|
|
1640
|
-
const
|
|
1640
|
+
const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
|
|
1641
1641
|
return this.node(t, {
|
|
1642
1642
|
kind: c.UNION_TYPE_DEFINITION,
|
|
1643
1643
|
description: n,
|
|
1644
|
-
name:
|
|
1645
|
-
directives:
|
|
1644
|
+
name: i,
|
|
1645
|
+
directives: r,
|
|
1646
1646
|
types: s
|
|
1647
1647
|
});
|
|
1648
1648
|
}
|
|
@@ -1661,12 +1661,12 @@ class rt {
|
|
|
1661
1661
|
parseEnumTypeDefinition() {
|
|
1662
1662
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1663
1663
|
this.expectKeyword("enum");
|
|
1664
|
-
const
|
|
1664
|
+
const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
|
|
1665
1665
|
return this.node(t, {
|
|
1666
1666
|
kind: c.ENUM_TYPE_DEFINITION,
|
|
1667
1667
|
description: n,
|
|
1668
|
-
name:
|
|
1669
|
-
directives:
|
|
1668
|
+
name: i,
|
|
1669
|
+
directives: r,
|
|
1670
1670
|
values: s
|
|
1671
1671
|
});
|
|
1672
1672
|
}
|
|
@@ -1686,12 +1686,12 @@ class rt {
|
|
|
1686
1686
|
* EnumValueDefinition : Description? EnumValue Directives[Const]?
|
|
1687
1687
|
*/
|
|
1688
1688
|
parseEnumValueDefinition() {
|
|
1689
|
-
const t = this._lexer.token, n = this.parseDescription(),
|
|
1689
|
+
const t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
|
|
1690
1690
|
return this.node(t, {
|
|
1691
1691
|
kind: c.ENUM_VALUE_DEFINITION,
|
|
1692
1692
|
description: n,
|
|
1693
|
-
name:
|
|
1694
|
-
directives:
|
|
1693
|
+
name: i,
|
|
1694
|
+
directives: r
|
|
1695
1695
|
});
|
|
1696
1696
|
}
|
|
1697
1697
|
/**
|
|
@@ -1715,12 +1715,12 @@ class rt {
|
|
|
1715
1715
|
parseInputObjectTypeDefinition() {
|
|
1716
1716
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1717
1717
|
this.expectKeyword("input");
|
|
1718
|
-
const
|
|
1718
|
+
const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
|
|
1719
1719
|
return this.node(t, {
|
|
1720
1720
|
kind: c.INPUT_OBJECT_TYPE_DEFINITION,
|
|
1721
1721
|
description: n,
|
|
1722
|
-
name:
|
|
1723
|
-
directives:
|
|
1722
|
+
name: i,
|
|
1723
|
+
directives: r,
|
|
1724
1724
|
fields: s
|
|
1725
1725
|
});
|
|
1726
1726
|
}
|
|
@@ -1780,17 +1780,17 @@ class rt {
|
|
|
1780
1780
|
parseSchemaExtension() {
|
|
1781
1781
|
const t = this._lexer.token;
|
|
1782
1782
|
this.expectKeyword("extend"), this.expectKeyword("schema");
|
|
1783
|
-
const n = this.parseConstDirectives(),
|
|
1783
|
+
const n = this.parseConstDirectives(), i = this.optionalMany(
|
|
1784
1784
|
a.BRACE_L,
|
|
1785
1785
|
this.parseOperationTypeDefinition,
|
|
1786
1786
|
a.BRACE_R
|
|
1787
1787
|
);
|
|
1788
|
-
if (n.length === 0 &&
|
|
1788
|
+
if (n.length === 0 && i.length === 0)
|
|
1789
1789
|
throw this.unexpected();
|
|
1790
1790
|
return this.node(t, {
|
|
1791
1791
|
kind: c.SCHEMA_EXTENSION,
|
|
1792
1792
|
directives: n,
|
|
1793
|
-
operationTypes:
|
|
1793
|
+
operationTypes: i
|
|
1794
1794
|
});
|
|
1795
1795
|
}
|
|
1796
1796
|
/**
|
|
@@ -1800,13 +1800,13 @@ class rt {
|
|
|
1800
1800
|
parseScalarTypeExtension() {
|
|
1801
1801
|
const t = this._lexer.token;
|
|
1802
1802
|
this.expectKeyword("extend"), this.expectKeyword("scalar");
|
|
1803
|
-
const n = this.parseName(),
|
|
1804
|
-
if (
|
|
1803
|
+
const n = this.parseName(), i = this.parseConstDirectives();
|
|
1804
|
+
if (i.length === 0)
|
|
1805
1805
|
throw this.unexpected();
|
|
1806
1806
|
return this.node(t, {
|
|
1807
1807
|
kind: c.SCALAR_TYPE_EXTENSION,
|
|
1808
1808
|
name: n,
|
|
1809
|
-
directives:
|
|
1809
|
+
directives: i
|
|
1810
1810
|
});
|
|
1811
1811
|
}
|
|
1812
1812
|
/**
|
|
@@ -1818,14 +1818,14 @@ class rt {
|
|
|
1818
1818
|
parseObjectTypeExtension() {
|
|
1819
1819
|
const t = this._lexer.token;
|
|
1820
1820
|
this.expectKeyword("extend"), this.expectKeyword("type");
|
|
1821
|
-
const n = this.parseName(),
|
|
1822
|
-
if (
|
|
1821
|
+
const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
|
|
1822
|
+
if (i.length === 0 && r.length === 0 && s.length === 0)
|
|
1823
1823
|
throw this.unexpected();
|
|
1824
1824
|
return this.node(t, {
|
|
1825
1825
|
kind: c.OBJECT_TYPE_EXTENSION,
|
|
1826
1826
|
name: n,
|
|
1827
|
-
interfaces:
|
|
1828
|
-
directives:
|
|
1827
|
+
interfaces: i,
|
|
1828
|
+
directives: r,
|
|
1829
1829
|
fields: s
|
|
1830
1830
|
});
|
|
1831
1831
|
}
|
|
@@ -1838,14 +1838,14 @@ class rt {
|
|
|
1838
1838
|
parseInterfaceTypeExtension() {
|
|
1839
1839
|
const t = this._lexer.token;
|
|
1840
1840
|
this.expectKeyword("extend"), this.expectKeyword("interface");
|
|
1841
|
-
const n = this.parseName(),
|
|
1842
|
-
if (
|
|
1841
|
+
const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
|
|
1842
|
+
if (i.length === 0 && r.length === 0 && s.length === 0)
|
|
1843
1843
|
throw this.unexpected();
|
|
1844
1844
|
return this.node(t, {
|
|
1845
1845
|
kind: c.INTERFACE_TYPE_EXTENSION,
|
|
1846
1846
|
name: n,
|
|
1847
|
-
interfaces:
|
|
1848
|
-
directives:
|
|
1847
|
+
interfaces: i,
|
|
1848
|
+
directives: r,
|
|
1849
1849
|
fields: s
|
|
1850
1850
|
});
|
|
1851
1851
|
}
|
|
@@ -1857,14 +1857,14 @@ class rt {
|
|
|
1857
1857
|
parseUnionTypeExtension() {
|
|
1858
1858
|
const t = this._lexer.token;
|
|
1859
1859
|
this.expectKeyword("extend"), this.expectKeyword("union");
|
|
1860
|
-
const n = this.parseName(),
|
|
1861
|
-
if (
|
|
1860
|
+
const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
|
|
1861
|
+
if (i.length === 0 && r.length === 0)
|
|
1862
1862
|
throw this.unexpected();
|
|
1863
1863
|
return this.node(t, {
|
|
1864
1864
|
kind: c.UNION_TYPE_EXTENSION,
|
|
1865
1865
|
name: n,
|
|
1866
|
-
directives:
|
|
1867
|
-
types:
|
|
1866
|
+
directives: i,
|
|
1867
|
+
types: r
|
|
1868
1868
|
});
|
|
1869
1869
|
}
|
|
1870
1870
|
/**
|
|
@@ -1875,14 +1875,14 @@ class rt {
|
|
|
1875
1875
|
parseEnumTypeExtension() {
|
|
1876
1876
|
const t = this._lexer.token;
|
|
1877
1877
|
this.expectKeyword("extend"), this.expectKeyword("enum");
|
|
1878
|
-
const n = this.parseName(),
|
|
1879
|
-
if (
|
|
1878
|
+
const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
|
|
1879
|
+
if (i.length === 0 && r.length === 0)
|
|
1880
1880
|
throw this.unexpected();
|
|
1881
1881
|
return this.node(t, {
|
|
1882
1882
|
kind: c.ENUM_TYPE_EXTENSION,
|
|
1883
1883
|
name: n,
|
|
1884
|
-
directives:
|
|
1885
|
-
values:
|
|
1884
|
+
directives: i,
|
|
1885
|
+
values: r
|
|
1886
1886
|
});
|
|
1887
1887
|
}
|
|
1888
1888
|
/**
|
|
@@ -1893,14 +1893,14 @@ class rt {
|
|
|
1893
1893
|
parseInputObjectTypeExtension() {
|
|
1894
1894
|
const t = this._lexer.token;
|
|
1895
1895
|
this.expectKeyword("extend"), this.expectKeyword("input");
|
|
1896
|
-
const n = this.parseName(),
|
|
1897
|
-
if (
|
|
1896
|
+
const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
|
|
1897
|
+
if (i.length === 0 && r.length === 0)
|
|
1898
1898
|
throw this.unexpected();
|
|
1899
1899
|
return this.node(t, {
|
|
1900
1900
|
kind: c.INPUT_OBJECT_TYPE_EXTENSION,
|
|
1901
1901
|
name: n,
|
|
1902
|
-
directives:
|
|
1903
|
-
fields:
|
|
1902
|
+
directives: i,
|
|
1903
|
+
fields: r
|
|
1904
1904
|
});
|
|
1905
1905
|
}
|
|
1906
1906
|
/**
|
|
@@ -1912,14 +1912,14 @@ class rt {
|
|
|
1912
1912
|
parseDirectiveDefinition() {
|
|
1913
1913
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1914
1914
|
this.expectKeyword("directive"), this.expectToken(a.AT);
|
|
1915
|
-
const
|
|
1915
|
+
const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
|
|
1916
1916
|
this.expectKeyword("on");
|
|
1917
1917
|
const o = this.parseDirectiveLocations();
|
|
1918
1918
|
return this.node(t, {
|
|
1919
1919
|
kind: c.DIRECTIVE_DEFINITION,
|
|
1920
1920
|
description: n,
|
|
1921
|
-
name:
|
|
1922
|
-
arguments:
|
|
1921
|
+
name: i,
|
|
1922
|
+
arguments: r,
|
|
1923
1923
|
repeatable: s,
|
|
1924
1924
|
locations: o
|
|
1925
1925
|
});
|
|
@@ -1975,29 +1975,29 @@ class rt {
|
|
|
1975
1975
|
* - \@ Name ( Name : )
|
|
1976
1976
|
*/
|
|
1977
1977
|
parseSchemaCoordinate() {
|
|
1978
|
-
const t = this._lexer.token, n = this.expectOptionalToken(a.AT),
|
|
1979
|
-
let
|
|
1980
|
-
!n && this.expectOptionalToken(a.DOT) && (
|
|
1978
|
+
const t = this._lexer.token, n = this.expectOptionalToken(a.AT), i = this.parseName();
|
|
1979
|
+
let r;
|
|
1980
|
+
!n && this.expectOptionalToken(a.DOT) && (r = this.parseName());
|
|
1981
1981
|
let s;
|
|
1982
|
-
return (n ||
|
|
1982
|
+
return (n || r) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), n ? s ? this.node(t, {
|
|
1983
1983
|
kind: c.DIRECTIVE_ARGUMENT_COORDINATE,
|
|
1984
|
-
name:
|
|
1984
|
+
name: i,
|
|
1985
1985
|
argumentName: s
|
|
1986
1986
|
}) : this.node(t, {
|
|
1987
1987
|
kind: c.DIRECTIVE_COORDINATE,
|
|
1988
|
-
name:
|
|
1989
|
-
}) :
|
|
1988
|
+
name: i
|
|
1989
|
+
}) : r ? s ? this.node(t, {
|
|
1990
1990
|
kind: c.ARGUMENT_COORDINATE,
|
|
1991
|
-
name:
|
|
1992
|
-
fieldName:
|
|
1991
|
+
name: i,
|
|
1992
|
+
fieldName: r,
|
|
1993
1993
|
argumentName: s
|
|
1994
1994
|
}) : this.node(t, {
|
|
1995
1995
|
kind: c.MEMBER_COORDINATE,
|
|
1996
|
-
name:
|
|
1997
|
-
memberName:
|
|
1996
|
+
name: i,
|
|
1997
|
+
memberName: r
|
|
1998
1998
|
}) : this.node(t, {
|
|
1999
1999
|
kind: c.TYPE_COORDINATE,
|
|
2000
|
-
name:
|
|
2000
|
+
name: i
|
|
2001
2001
|
});
|
|
2002
2002
|
}
|
|
2003
2003
|
// Core parsing utility functions
|
|
@@ -2079,12 +2079,12 @@ class rt {
|
|
|
2079
2079
|
* This list begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
2080
2080
|
* Advances the parser to the next lex token after the closing token.
|
|
2081
2081
|
*/
|
|
2082
|
-
any(t, n,
|
|
2082
|
+
any(t, n, i) {
|
|
2083
2083
|
this.expectToken(t);
|
|
2084
|
-
const
|
|
2085
|
-
for (; !this.expectOptionalToken(
|
|
2086
|
-
|
|
2087
|
-
return
|
|
2084
|
+
const r = [];
|
|
2085
|
+
for (; !this.expectOptionalToken(i); )
|
|
2086
|
+
r.push(n.call(this));
|
|
2087
|
+
return r;
|
|
2088
2088
|
}
|
|
2089
2089
|
/**
|
|
2090
2090
|
* Returns a list of parse nodes, determined by the parseFn.
|
|
@@ -2092,13 +2092,13 @@ class rt {
|
|
|
2092
2092
|
* that begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
2093
2093
|
* Advances the parser to the next lex token after the closing token.
|
|
2094
2094
|
*/
|
|
2095
|
-
optionalMany(t, n,
|
|
2095
|
+
optionalMany(t, n, i) {
|
|
2096
2096
|
if (this.expectOptionalToken(t)) {
|
|
2097
|
-
const
|
|
2097
|
+
const r = [];
|
|
2098
2098
|
do
|
|
2099
|
-
|
|
2100
|
-
while (!this.expectOptionalToken(
|
|
2101
|
-
return
|
|
2099
|
+
r.push(n.call(this));
|
|
2100
|
+
while (!this.expectOptionalToken(i));
|
|
2101
|
+
return r;
|
|
2102
2102
|
}
|
|
2103
2103
|
return [];
|
|
2104
2104
|
}
|
|
@@ -2107,13 +2107,13 @@ class rt {
|
|
|
2107
2107
|
* This list begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
2108
2108
|
* Advances the parser to the next lex token after the closing token.
|
|
2109
2109
|
*/
|
|
2110
|
-
many(t, n,
|
|
2110
|
+
many(t, n, i) {
|
|
2111
2111
|
this.expectToken(t);
|
|
2112
|
-
const
|
|
2112
|
+
const r = [];
|
|
2113
2113
|
do
|
|
2114
|
-
|
|
2115
|
-
while (!this.expectOptionalToken(
|
|
2116
|
-
return
|
|
2114
|
+
r.push(n.call(this));
|
|
2115
|
+
while (!this.expectOptionalToken(i));
|
|
2116
|
+
return r;
|
|
2117
2117
|
}
|
|
2118
2118
|
/**
|
|
2119
2119
|
* Returns a non-empty list of parse nodes, determined by the parseFn.
|
|
@@ -2122,11 +2122,11 @@ class rt {
|
|
|
2122
2122
|
*/
|
|
2123
2123
|
delimitedMany(t, n) {
|
|
2124
2124
|
this.expectOptionalToken(t);
|
|
2125
|
-
const
|
|
2125
|
+
const i = [];
|
|
2126
2126
|
do
|
|
2127
|
-
|
|
2127
|
+
i.push(n.call(this));
|
|
2128
2128
|
while (this.expectOptionalToken(t));
|
|
2129
|
-
return
|
|
2129
|
+
return i;
|
|
2130
2130
|
}
|
|
2131
2131
|
advanceLexer() {
|
|
2132
2132
|
const { maxTokens: t } = this._options, n = this._lexer.advance();
|
|
@@ -2149,26 +2149,26 @@ var _ = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), Oe = !0, w = !
|
|
|
2149
2149
|
function Ae(e) {
|
|
2150
2150
|
return e.replace(/[\s,]+/g, " ").trim();
|
|
2151
2151
|
}
|
|
2152
|
-
function
|
|
2152
|
+
function rt(e) {
|
|
2153
2153
|
return Ae(e.source.body.substring(e.start, e.end));
|
|
2154
2154
|
}
|
|
2155
2155
|
function st(e) {
|
|
2156
2156
|
var t = /* @__PURE__ */ new Set(), n = [];
|
|
2157
|
-
return e.definitions.forEach(function(
|
|
2158
|
-
if (
|
|
2159
|
-
var
|
|
2160
|
-
o && !o.has(s) ? Oe && console.warn("Warning: fragment with name " +
|
|
2157
|
+
return e.definitions.forEach(function(i) {
|
|
2158
|
+
if (i.kind === "FragmentDefinition") {
|
|
2159
|
+
var r = i.name.value, s = rt(i.loc), o = z.get(r);
|
|
2160
|
+
o && !o.has(s) ? Oe && console.warn("Warning: fragment with name " + r + ` already exists.
|
|
2161
2161
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
2162
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || z.set(
|
|
2162
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || z.set(r, o = /* @__PURE__ */ new Set()), o.add(s), t.has(s) || (t.add(s), n.push(i));
|
|
2163
2163
|
} else
|
|
2164
|
-
n.push(
|
|
2164
|
+
n.push(i);
|
|
2165
2165
|
}), F(F({}, e), { definitions: n });
|
|
2166
2166
|
}
|
|
2167
2167
|
function at(e) {
|
|
2168
2168
|
var t = new Set(e.definitions);
|
|
2169
|
-
t.forEach(function(
|
|
2170
|
-
|
|
2171
|
-
var s = r
|
|
2169
|
+
t.forEach(function(i) {
|
|
2170
|
+
i.loc && delete i.loc, Object.keys(i).forEach(function(r) {
|
|
2171
|
+
var s = i[r];
|
|
2172
2172
|
s && typeof s == "object" && t.add(s);
|
|
2173
2173
|
});
|
|
2174
2174
|
});
|
|
@@ -2192,10 +2192,10 @@ function u(e) {
|
|
|
2192
2192
|
for (var t = [], n = 1; n < arguments.length; n++)
|
|
2193
2193
|
t[n - 1] = arguments[n];
|
|
2194
2194
|
typeof e == "string" && (e = [e]);
|
|
2195
|
-
var
|
|
2196
|
-
return t.forEach(function(
|
|
2197
|
-
|
|
2198
|
-
}), ot(
|
|
2195
|
+
var i = e[0];
|
|
2196
|
+
return t.forEach(function(r, s) {
|
|
2197
|
+
r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += e[s + 1];
|
|
2198
|
+
}), ot(i);
|
|
2199
2199
|
}
|
|
2200
2200
|
function ct() {
|
|
2201
2201
|
_.clear(), z.clear();
|
|
@@ -2418,38 +2418,38 @@ const ht = u`
|
|
|
2418
2418
|
mutation deleteOrder($orderId: ID!) {
|
|
2419
2419
|
cancelOrder(id: $orderId)
|
|
2420
2420
|
}
|
|
2421
|
-
`, At = (e, t, n,
|
|
2421
|
+
`, At = (e, t, n, i) => e();
|
|
2422
2422
|
function Tt(e, t = At) {
|
|
2423
2423
|
return {
|
|
2424
|
-
findActiveOrderById(n,
|
|
2425
|
-
return t((s) => e.request({ document: ht, variables: n, requestHeaders: { ...
|
|
2424
|
+
findActiveOrderById(n, i, r) {
|
|
2425
|
+
return t((s) => e.request({ document: ht, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", n);
|
|
2426
2426
|
},
|
|
2427
|
-
findOrderById(n,
|
|
2428
|
-
return t((s) => e.request({ document: pt, variables: n, requestHeaders: { ...
|
|
2427
|
+
findOrderById(n, i, r) {
|
|
2428
|
+
return t((s) => e.request({ document: pt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", n);
|
|
2429
2429
|
},
|
|
2430
|
-
addToOrder(n,
|
|
2431
|
-
return t((s) => e.request({ document: gt, variables: n, requestHeaders: { ...
|
|
2430
|
+
addToOrder(n, i, r) {
|
|
2431
|
+
return t((s) => e.request({ document: gt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", n);
|
|
2432
2432
|
},
|
|
2433
|
-
removeFromOrder(n,
|
|
2434
|
-
return t((s) => e.request({ document: mt, variables: n, requestHeaders: { ...
|
|
2433
|
+
removeFromOrder(n, i, r) {
|
|
2434
|
+
return t((s) => e.request({ document: mt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", n);
|
|
2435
2435
|
},
|
|
2436
|
-
configureDiscount(n,
|
|
2437
|
-
return t((s) => e.request({ document: ft, variables: n, requestHeaders: { ...
|
|
2436
|
+
configureDiscount(n, i, r) {
|
|
2437
|
+
return t((s) => e.request({ document: ft, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configureDiscount", "mutation", n);
|
|
2438
2438
|
},
|
|
2439
|
-
configurePackage(n,
|
|
2440
|
-
return t((s) => e.request({ document: It, variables: n, requestHeaders: { ...
|
|
2439
|
+
configurePackage(n, i, r) {
|
|
2440
|
+
return t((s) => e.request({ document: It, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", n);
|
|
2441
2441
|
},
|
|
2442
|
-
reserveAdditionalPackageItem(n,
|
|
2443
|
-
return t((s) => e.request({ document: Et, variables: n, requestHeaders: { ...
|
|
2442
|
+
reserveAdditionalPackageItem(n, i, r) {
|
|
2443
|
+
return t((s) => e.request({ document: Et, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", n);
|
|
2444
2444
|
},
|
|
2445
|
-
configureOrderDeliveryOption(n,
|
|
2446
|
-
return t((s) => e.request({ document: yt, variables: n, requestHeaders: { ...
|
|
2445
|
+
configureOrderDeliveryOption(n, i, r) {
|
|
2446
|
+
return t((s) => e.request({ document: yt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", n);
|
|
2447
2447
|
},
|
|
2448
|
-
createOrderCustomer(n,
|
|
2449
|
-
return t((s) => e.request({ document: kt, variables: n, requestHeaders: { ...
|
|
2448
|
+
createOrderCustomer(n, i, r) {
|
|
2449
|
+
return t((s) => e.request({ document: kt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", n);
|
|
2450
2450
|
},
|
|
2451
|
-
deleteOrder(n,
|
|
2452
|
-
return t((s) => e.request({ document: Ot, variables: n, requestHeaders: { ...
|
|
2451
|
+
deleteOrder(n, i, r) {
|
|
2452
|
+
return t((s) => e.request({ document: Ot, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", n);
|
|
2453
2453
|
}
|
|
2454
2454
|
};
|
|
2455
2455
|
}
|
|
@@ -2460,7 +2460,7 @@ class Nt {
|
|
|
2460
2460
|
this.config = t, this.sdk = Tt(new A(t.apiUrl));
|
|
2461
2461
|
}
|
|
2462
2462
|
// Basket update functions
|
|
2463
|
-
async addProduct(t, n,
|
|
2463
|
+
async addProduct(t, n, i) {
|
|
2464
2464
|
try {
|
|
2465
2465
|
return this.debugLog("Adding product", {
|
|
2466
2466
|
productId: n.id,
|
|
@@ -2478,11 +2478,11 @@ class Nt {
|
|
|
2478
2478
|
}
|
|
2479
2479
|
} : null,
|
|
2480
2480
|
trackerId: this.config.trackerId,
|
|
2481
|
-
shopId:
|
|
2481
|
+
shopId: i,
|
|
2482
2482
|
amount: n.amount
|
|
2483
2483
|
})).reserveProduct;
|
|
2484
|
-
} catch (
|
|
2485
|
-
throw this.debugLog("Error adding product",
|
|
2484
|
+
} catch (r) {
|
|
2485
|
+
throw this.debugLog("Error adding product", r), this.handleError(r), r;
|
|
2486
2486
|
}
|
|
2487
2487
|
}
|
|
2488
2488
|
async removeProduct(t, n) {
|
|
@@ -2502,13 +2502,13 @@ class Nt {
|
|
|
2502
2502
|
} : null,
|
|
2503
2503
|
amount: n.amount
|
|
2504
2504
|
})).releaseProduct ?? null;
|
|
2505
|
-
} catch (
|
|
2506
|
-
throw this.debugLog("Error removing product",
|
|
2505
|
+
} catch (i) {
|
|
2506
|
+
throw this.debugLog("Error removing product", i), this.handleError(i), i;
|
|
2507
2507
|
}
|
|
2508
2508
|
}
|
|
2509
|
-
async configurePackage(t, n,
|
|
2509
|
+
async configurePackage(t, n, i) {
|
|
2510
2510
|
try {
|
|
2511
|
-
const
|
|
2511
|
+
const r = n.items.map((o) => ({
|
|
2512
2512
|
packageItemId: o.packageItemId,
|
|
2513
2513
|
eventId: o.eventId
|
|
2514
2514
|
}));
|
|
@@ -2516,32 +2516,32 @@ class Nt {
|
|
|
2516
2516
|
packageId: n.id,
|
|
2517
2517
|
orderId: t,
|
|
2518
2518
|
amount: n.amount,
|
|
2519
|
-
items:
|
|
2520
|
-
shopId:
|
|
2519
|
+
items: r,
|
|
2520
|
+
shopId: i
|
|
2521
2521
|
});
|
|
2522
2522
|
const s = await this.sdk.configurePackage({
|
|
2523
2523
|
trackerId: this.config.trackerId,
|
|
2524
|
-
shopId:
|
|
2524
|
+
shopId: i,
|
|
2525
2525
|
packageId: n.id,
|
|
2526
2526
|
orderId: t,
|
|
2527
2527
|
amount: n.amount,
|
|
2528
|
-
items:
|
|
2528
|
+
items: r
|
|
2529
2529
|
});
|
|
2530
2530
|
return this.debugLog("Configure package response"), s.configurePackage ?? null;
|
|
2531
|
-
} catch (
|
|
2532
|
-
throw this.debugLog("Error configuring package",
|
|
2531
|
+
} catch (r) {
|
|
2532
|
+
throw this.debugLog("Error configuring package", r), this.handleError(r), r;
|
|
2533
2533
|
}
|
|
2534
2534
|
}
|
|
2535
2535
|
async configureCustomer(t, n) {
|
|
2536
2536
|
this.debugLog("Creating/replacing customer", { orderId: t, email: n.email });
|
|
2537
2537
|
try {
|
|
2538
|
-
const
|
|
2538
|
+
const i = await this.sdk.createOrderCustomer({
|
|
2539
2539
|
orderId: t,
|
|
2540
2540
|
customer: n
|
|
2541
2541
|
});
|
|
2542
|
-
this.debugLog("Customer set successfully",
|
|
2543
|
-
} catch (
|
|
2544
|
-
throw this.debugLog("Failed to set customer",
|
|
2542
|
+
this.debugLog("Customer set successfully", i);
|
|
2543
|
+
} catch (i) {
|
|
2544
|
+
throw this.debugLog("Failed to set customer", i), new Error(`Failed to set customer: ${i.message}`);
|
|
2545
2545
|
}
|
|
2546
2546
|
}
|
|
2547
2547
|
async reserveAdditionalPackageItem(t, n) {
|
|
@@ -2553,16 +2553,16 @@ class Nt {
|
|
|
2553
2553
|
packageId: n.packageId,
|
|
2554
2554
|
packageItemId: n.packageItemId
|
|
2555
2555
|
});
|
|
2556
|
-
const
|
|
2556
|
+
const i = await this.sdk.reserveAdditionalPackageItem({
|
|
2557
2557
|
orderId: t,
|
|
2558
2558
|
eventId: n.eventId,
|
|
2559
2559
|
amount: n.amount,
|
|
2560
2560
|
packageId: n.packageId,
|
|
2561
2561
|
packageItemId: n.packageItemId
|
|
2562
2562
|
});
|
|
2563
|
-
return this.debugLog("reserve additional packageItem"),
|
|
2564
|
-
} catch (
|
|
2565
|
-
throw this.debugLog("Error configuring package",
|
|
2563
|
+
return this.debugLog("reserve additional packageItem"), i.reserveAdditionalPackageItem ?? null;
|
|
2564
|
+
} catch (i) {
|
|
2565
|
+
throw this.debugLog("Error configuring package", i), this.handleError(i), i;
|
|
2566
2566
|
}
|
|
2567
2567
|
}
|
|
2568
2568
|
// Cancel and clear order functions
|
|
@@ -2571,30 +2571,30 @@ class Nt {
|
|
|
2571
2571
|
}
|
|
2572
2572
|
async findOrder(t, n) {
|
|
2573
2573
|
try {
|
|
2574
|
-
const
|
|
2575
|
-
return
|
|
2576
|
-
id:
|
|
2577
|
-
reference:
|
|
2578
|
-
currency:
|
|
2579
|
-
downloadCode:
|
|
2574
|
+
const i = await this.sdk.findOrderById({ id: t, reference: n });
|
|
2575
|
+
return i.findOrder ? {
|
|
2576
|
+
id: i.findOrder.id,
|
|
2577
|
+
reference: i.findOrder.reference,
|
|
2578
|
+
currency: i.findOrder.currency,
|
|
2579
|
+
downloadCode: i.findOrder.downloadCode,
|
|
2580
2580
|
organization: {
|
|
2581
|
-
name:
|
|
2582
|
-
paymentBanner:
|
|
2581
|
+
name: i.findOrder.organization.name,
|
|
2582
|
+
paymentBanner: i.findOrder.organization.name
|
|
2583
2583
|
},
|
|
2584
|
-
customer:
|
|
2585
|
-
firstName:
|
|
2586
|
-
lastName:
|
|
2587
|
-
email:
|
|
2588
|
-
age:
|
|
2589
|
-
gender:
|
|
2590
|
-
residence:
|
|
2591
|
-
extraInfo:
|
|
2584
|
+
customer: i.findOrder.mainBooker ? {
|
|
2585
|
+
firstName: i.findOrder.mainBooker.firstName,
|
|
2586
|
+
lastName: i.findOrder.mainBooker.lastName,
|
|
2587
|
+
email: i.findOrder.mainBooker.email,
|
|
2588
|
+
age: i.findOrder.mainBooker.age,
|
|
2589
|
+
gender: i.findOrder.mainBooker.gender,
|
|
2590
|
+
residence: i.findOrder.mainBooker.residence,
|
|
2591
|
+
extraInfo: i.findOrder.mainBooker.extraInfo
|
|
2592
2592
|
} : null,
|
|
2593
|
-
items:
|
|
2594
|
-
discountCode:
|
|
2593
|
+
items: i.findOrder.items,
|
|
2594
|
+
discountCode: i.findOrder.discount?.code
|
|
2595
2595
|
} : null;
|
|
2596
|
-
} catch (
|
|
2597
|
-
return this.debugLog("Error finding order",
|
|
2596
|
+
} catch (i) {
|
|
2597
|
+
return this.debugLog("Error finding order", i), this.handleError(i), null;
|
|
2598
2598
|
}
|
|
2599
2599
|
}
|
|
2600
2600
|
async configureDiscountCode(t, n) {
|
|
@@ -2605,9 +2605,9 @@ class Nt {
|
|
|
2605
2605
|
}), await this.sdk.configureDiscount({
|
|
2606
2606
|
orderId: t,
|
|
2607
2607
|
discountCode: n.code
|
|
2608
|
-
}).then((
|
|
2609
|
-
} catch (
|
|
2610
|
-
return this.debugLog("Error configuring discount",
|
|
2608
|
+
}).then((i) => i.createOrderDiscount ?? null);
|
|
2609
|
+
} catch (i) {
|
|
2610
|
+
return this.debugLog("Error configuring discount", i), this.handleError(i), null;
|
|
2611
2611
|
}
|
|
2612
2612
|
}
|
|
2613
2613
|
async findActiveOrder(t) {
|
|
@@ -2616,9 +2616,9 @@ class Nt {
|
|
|
2616
2616
|
const n = await this.sdk.findActiveOrderById({ id: t });
|
|
2617
2617
|
if (!n?.findOrder)
|
|
2618
2618
|
return null;
|
|
2619
|
-
const
|
|
2620
|
-
this.debugLog("Order fetched successfully",
|
|
2621
|
-
const
|
|
2619
|
+
const i = n.findOrder;
|
|
2620
|
+
this.debugLog("Order fetched successfully", i);
|
|
2621
|
+
const r = i.items, s = r.filter((d) => d.product != null && d.amount > 0).map((d) => {
|
|
2622
2622
|
let g = T.PRODUCT;
|
|
2623
2623
|
return d.product.type === "ADDON" ? g = T.ADD_ONS : d.product.type === "PICKUP" ? g = T.PICKUP : d.product.type === "DELIVERY" && (g = T.DELIVERY), {
|
|
2624
2624
|
id: d.product.id,
|
|
@@ -2637,7 +2637,7 @@ class Nt {
|
|
|
2637
2637
|
amount: y.amount
|
|
2638
2638
|
}))
|
|
2639
2639
|
};
|
|
2640
|
-
}), o =
|
|
2640
|
+
}), o = r.filter((d) => d.packageItem != null && d.amount > 0).reduce((d, g) => {
|
|
2641
2641
|
const {
|
|
2642
2642
|
packageItem: y,
|
|
2643
2643
|
event: m,
|
|
@@ -2671,20 +2671,20 @@ class Nt {
|
|
|
2671
2671
|
], h = l.reduce((d, g) => d + (g.amount || 0), 0);
|
|
2672
2672
|
if (h === 0)
|
|
2673
2673
|
return null;
|
|
2674
|
-
const E =
|
|
2674
|
+
const E = r.filter((d) => d.amount > 0).map((d) => new Date(d.expiredAt).getTime()), p = Te.fromMillis(Math.min(...E));
|
|
2675
2675
|
return {
|
|
2676
|
-
id:
|
|
2677
|
-
currency:
|
|
2676
|
+
id: i.id,
|
|
2677
|
+
currency: i.currency,
|
|
2678
2678
|
expiredAt: p?.toJSDate().toISOString(),
|
|
2679
2679
|
items: l,
|
|
2680
|
-
customer:
|
|
2681
|
-
firstName:
|
|
2682
|
-
lastName:
|
|
2683
|
-
email:
|
|
2684
|
-
age:
|
|
2685
|
-
gender:
|
|
2686
|
-
residence:
|
|
2687
|
-
extraInfo:
|
|
2680
|
+
customer: i.mainBooker ? {
|
|
2681
|
+
firstName: i.mainBooker.firstName,
|
|
2682
|
+
lastName: i.mainBooker.lastName,
|
|
2683
|
+
email: i.mainBooker.email,
|
|
2684
|
+
age: i.mainBooker.age,
|
|
2685
|
+
gender: i.mainBooker.gender,
|
|
2686
|
+
residence: i.mainBooker.residence,
|
|
2687
|
+
extraInfo: i.mainBooker.extraInfo
|
|
2688
2688
|
} : null,
|
|
2689
2689
|
count: h,
|
|
2690
2690
|
orderProtection: !1
|
|
@@ -2699,12 +2699,12 @@ class Nt {
|
|
|
2699
2699
|
handleError(t) {
|
|
2700
2700
|
const n = t;
|
|
2701
2701
|
if (n.graphQLErrors && n.graphQLErrors.length > 0) {
|
|
2702
|
-
const
|
|
2703
|
-
|
|
2702
|
+
const i = n.graphQLErrors[0];
|
|
2703
|
+
i.extensions?.status === "RATE_LIMIT" && console.error("Rate Limit reached"), i.extensions?.status === "SOLD_OUT" && console.error("Product sold out");
|
|
2704
2704
|
}
|
|
2705
2705
|
if (n.response?.errors && n.response.errors.length > 0) {
|
|
2706
|
-
const
|
|
2707
|
-
console.error("GraphQL Error:",
|
|
2706
|
+
const i = n.response.errors[0];
|
|
2707
|
+
console.error("GraphQL Error:", i.message), i.extensions?.code && console.error("Error Code:", i.extensions.code);
|
|
2708
2708
|
}
|
|
2709
2709
|
}
|
|
2710
2710
|
}
|
|
@@ -2855,20 +2855,20 @@ const Dt = u`
|
|
|
2855
2855
|
showEndSalesAtTag
|
|
2856
2856
|
}
|
|
2857
2857
|
}
|
|
2858
|
-
`, xt = (e, t, n,
|
|
2858
|
+
`, xt = (e, t, n, i) => e();
|
|
2859
2859
|
function St(e, t = xt) {
|
|
2860
2860
|
return {
|
|
2861
|
-
EventOverviewPage(n,
|
|
2862
|
-
return t((s) => e.request({ document: Dt, variables: n, requestHeaders: { ...
|
|
2861
|
+
EventOverviewPage(n, i, r) {
|
|
2862
|
+
return t((s) => e.request({ document: Dt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", n);
|
|
2863
2863
|
},
|
|
2864
|
-
EventDetailPage(n,
|
|
2865
|
-
return t((s) => e.request({ document: vt, variables: n, requestHeaders: { ...
|
|
2864
|
+
EventDetailPage(n, i, r) {
|
|
2865
|
+
return t((s) => e.request({ document: vt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", n);
|
|
2866
2866
|
},
|
|
2867
|
-
FindPublicEventBySlug(n,
|
|
2868
|
-
return t((s) => e.request({ document: Pt, variables: n, requestHeaders: { ...
|
|
2867
|
+
FindPublicEventBySlug(n, i, r) {
|
|
2868
|
+
return t((s) => e.request({ document: Pt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "FindPublicEventBySlug", "query", n);
|
|
2869
2869
|
},
|
|
2870
|
-
findProductsByEventId(n,
|
|
2871
|
-
return t((s) => e.request({ document: bt, variables: n, requestHeaders: { ...
|
|
2870
|
+
findProductsByEventId(n, i, r) {
|
|
2871
|
+
return t((s) => e.request({ document: bt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", n);
|
|
2872
2872
|
}
|
|
2873
2873
|
};
|
|
2874
2874
|
}
|
|
@@ -2892,7 +2892,7 @@ class Ct {
|
|
|
2892
2892
|
sorts: t.sorts,
|
|
2893
2893
|
trackerId: this.config.trackerId
|
|
2894
2894
|
});
|
|
2895
|
-
const
|
|
2895
|
+
const i = await this.sdk.EventOverviewPage({
|
|
2896
2896
|
organizationId: this.config.organizationId ?? n ?? "",
|
|
2897
2897
|
hostingIds: t.hostingIds,
|
|
2898
2898
|
locationIds: t.locationIds,
|
|
@@ -2908,8 +2908,8 @@ class Ct {
|
|
|
2908
2908
|
searchTerm: t.searchTerm,
|
|
2909
2909
|
priceRange: t.priceRange
|
|
2910
2910
|
});
|
|
2911
|
-
if (this.debugLog("Raw GraphQL response",
|
|
2912
|
-
const
|
|
2911
|
+
if (this.debugLog("Raw GraphQL response", i), i?.findAllPublicEventByOrganizationId?.data) {
|
|
2912
|
+
const r = i.findAllPublicEventByOrganizationId.data.map((s) => ({
|
|
2913
2913
|
id: s.id,
|
|
2914
2914
|
name: s.name,
|
|
2915
2915
|
icon: s.icon,
|
|
@@ -2937,11 +2937,11 @@ class Ct {
|
|
|
2937
2937
|
startingPrice: s.startingPrice,
|
|
2938
2938
|
totalViews: s.totalViews
|
|
2939
2939
|
}));
|
|
2940
|
-
return this.debugLog("Processed events", { events:
|
|
2940
|
+
return this.debugLog("Processed events", { events: r, count: r.length }), [r, i.findAllPublicEventByOrganizationId.count ?? 0];
|
|
2941
2941
|
} else
|
|
2942
2942
|
return this.debugLog("No events found in response"), [[], 0];
|
|
2943
|
-
} catch (
|
|
2944
|
-
throw this.debugLog("Error fetching events",
|
|
2943
|
+
} catch (i) {
|
|
2944
|
+
throw this.debugLog("Error fetching events", i), i;
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
2947
|
async getEvent(t) {
|
|
@@ -2949,51 +2949,7 @@ class Ct {
|
|
|
2949
2949
|
this.debugLog("Fetching single event", { eventId: t });
|
|
2950
2950
|
const n = await this.sdk.EventDetailPage({ eventId: t });
|
|
2951
2951
|
if (this.debugLog("Raw GraphQL response", n), n?.findPublicEventById) {
|
|
2952
|
-
const
|
|
2953
|
-
id: r.id,
|
|
2954
|
-
name: r.name,
|
|
2955
|
-
icon: r.icon,
|
|
2956
|
-
banner: r.banner,
|
|
2957
|
-
description: r.description,
|
|
2958
|
-
addonDescription: r.addonDescription,
|
|
2959
|
-
startAt: r.startAt,
|
|
2960
|
-
endAt: r.endAt,
|
|
2961
|
-
timezone: r.timezone,
|
|
2962
|
-
startSalesAt: r.startSalesAt,
|
|
2963
|
-
endSalesAt: r.endSalesAt,
|
|
2964
|
-
slug: r.slug ?? "ERROR",
|
|
2965
|
-
facebookPixelId: r.facebookPixelId,
|
|
2966
|
-
status: r.status,
|
|
2967
|
-
location: r.location ? {
|
|
2968
|
-
id: r.location.id,
|
|
2969
|
-
name: r.location.name,
|
|
2970
|
-
address: r.location.address
|
|
2971
|
-
} : void 0,
|
|
2972
|
-
hosting: r.hosting ? {
|
|
2973
|
-
id: r.hosting.id,
|
|
2974
|
-
name: r.hosting.name
|
|
2975
|
-
} : void 0,
|
|
2976
|
-
infoDescription: r.infoDescription,
|
|
2977
|
-
startingPrice: r.startingPrice,
|
|
2978
|
-
totalViews: r.totalViews,
|
|
2979
|
-
seatsIoEventId: r.seatsIoEventId,
|
|
2980
|
-
maxAmountOfTicketsPerOrder: r.maxAmountOfTicketsPerOrder
|
|
2981
|
-
};
|
|
2982
|
-
return this.debugLog("Processed single event", i), i;
|
|
2983
|
-
} else {
|
|
2984
|
-
this.debugLog("No event found for id", t);
|
|
2985
|
-
return;
|
|
2986
|
-
}
|
|
2987
|
-
} catch (n) {
|
|
2988
|
-
throw this.debugLog("Error fetching single event", n), n;
|
|
2989
|
-
}
|
|
2990
|
-
}
|
|
2991
|
-
async getEventBySlug(t, n) {
|
|
2992
|
-
try {
|
|
2993
|
-
this.debugLog("Fetching single event by slug", { organizationId: t, slug: n });
|
|
2994
|
-
const r = await this.sdk.FindPublicEventBySlug({ organizationId: t, slug: n });
|
|
2995
|
-
if (this.debugLog("Raw GraphQL response", r), r?.findPublicEventBySlug) {
|
|
2996
|
-
const i = r.findPublicEventBySlug, s = {
|
|
2952
|
+
const i = n.findPublicEventById, r = {
|
|
2997
2953
|
id: i.id,
|
|
2998
2954
|
name: i.name,
|
|
2999
2955
|
icon: i.icon,
|
|
@@ -3023,31 +2979,75 @@ class Ct {
|
|
|
3023
2979
|
seatsIoEventId: i.seatsIoEventId,
|
|
3024
2980
|
maxAmountOfTicketsPerOrder: i.maxAmountOfTicketsPerOrder
|
|
3025
2981
|
};
|
|
2982
|
+
return this.debugLog("Processed single event", r), r;
|
|
2983
|
+
} else {
|
|
2984
|
+
this.debugLog("No event found for id", t);
|
|
2985
|
+
return;
|
|
2986
|
+
}
|
|
2987
|
+
} catch (n) {
|
|
2988
|
+
throw this.debugLog("Error fetching single event", n), n;
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
async getEventBySlug(t, n) {
|
|
2992
|
+
try {
|
|
2993
|
+
this.debugLog("Fetching single event by slug", { organizationId: t, slug: n });
|
|
2994
|
+
const i = await this.sdk.FindPublicEventBySlug({ organizationId: t, slug: n });
|
|
2995
|
+
if (this.debugLog("Raw GraphQL response", i), i?.findPublicEventBySlug) {
|
|
2996
|
+
const r = i.findPublicEventBySlug, s = {
|
|
2997
|
+
id: r.id,
|
|
2998
|
+
name: r.name,
|
|
2999
|
+
icon: r.icon,
|
|
3000
|
+
banner: r.banner,
|
|
3001
|
+
description: r.description,
|
|
3002
|
+
addonDescription: r.addonDescription,
|
|
3003
|
+
startAt: r.startAt,
|
|
3004
|
+
endAt: r.endAt,
|
|
3005
|
+
timezone: r.timezone,
|
|
3006
|
+
startSalesAt: r.startSalesAt,
|
|
3007
|
+
endSalesAt: r.endSalesAt,
|
|
3008
|
+
slug: r.slug ?? "ERROR",
|
|
3009
|
+
facebookPixelId: r.facebookPixelId,
|
|
3010
|
+
status: r.status,
|
|
3011
|
+
location: r.location ? {
|
|
3012
|
+
id: r.location.id,
|
|
3013
|
+
name: r.location.name,
|
|
3014
|
+
address: r.location.address
|
|
3015
|
+
} : void 0,
|
|
3016
|
+
hosting: r.hosting ? {
|
|
3017
|
+
id: r.hosting.id,
|
|
3018
|
+
name: r.hosting.name
|
|
3019
|
+
} : void 0,
|
|
3020
|
+
infoDescription: r.infoDescription,
|
|
3021
|
+
startingPrice: r.startingPrice,
|
|
3022
|
+
totalViews: r.totalViews,
|
|
3023
|
+
seatsIoEventId: r.seatsIoEventId,
|
|
3024
|
+
maxAmountOfTicketsPerOrder: r.maxAmountOfTicketsPerOrder
|
|
3025
|
+
};
|
|
3026
3026
|
return this.debugLog("Processed single event", s), s;
|
|
3027
3027
|
} else {
|
|
3028
3028
|
this.debugLog("No event found for id by slug", { organizationId: t, slug: n });
|
|
3029
3029
|
return;
|
|
3030
3030
|
}
|
|
3031
|
-
} catch (
|
|
3032
|
-
throw this.debugLog("Error fetching single event",
|
|
3031
|
+
} catch (i) {
|
|
3032
|
+
throw this.debugLog("Error fetching single event", i), i;
|
|
3033
3033
|
}
|
|
3034
3034
|
}
|
|
3035
|
-
async getProducts(t, n,
|
|
3035
|
+
async getProducts(t, n, i) {
|
|
3036
3036
|
try {
|
|
3037
3037
|
this.debugLog("Fetching products for event", {
|
|
3038
3038
|
eventId: t,
|
|
3039
|
-
promoCode:
|
|
3039
|
+
promoCode: i,
|
|
3040
3040
|
trackerId: this.config.trackerId,
|
|
3041
3041
|
productTypes: n
|
|
3042
3042
|
});
|
|
3043
|
-
const
|
|
3043
|
+
const r = await this.sdk.findProductsByEventId({
|
|
3044
3044
|
eventId: t,
|
|
3045
|
-
promoCode:
|
|
3045
|
+
promoCode: i,
|
|
3046
3046
|
trackerId: this.config.trackerId,
|
|
3047
3047
|
productTypes: n
|
|
3048
3048
|
});
|
|
3049
|
-
if (
|
|
3050
|
-
const s =
|
|
3049
|
+
if (r?.findPublicProductsByEventId) {
|
|
3050
|
+
const s = r.findPublicProductsByEventId.map((o) => ({
|
|
3051
3051
|
id: o.id,
|
|
3052
3052
|
name: o.name,
|
|
3053
3053
|
category: o.category ? {
|
|
@@ -3080,8 +3080,8 @@ class Ct {
|
|
|
3080
3080
|
}), s;
|
|
3081
3081
|
}
|
|
3082
3082
|
return;
|
|
3083
|
-
} catch (
|
|
3084
|
-
throw this.debugLog("Error fetching products", { eventId: t, error:
|
|
3083
|
+
} catch (r) {
|
|
3084
|
+
throw this.debugLog("Error fetching products", { eventId: t, error: r }), r;
|
|
3085
3085
|
}
|
|
3086
3086
|
}
|
|
3087
3087
|
debugLog(t, n) {
|
|
@@ -3122,14 +3122,14 @@ const _t = u`
|
|
|
3122
3122
|
mutation createDigitalPayment($input: CreateDigitalOrderPaymentInput!) {
|
|
3123
3123
|
createDigitalOrderPayment(input: $input)
|
|
3124
3124
|
}
|
|
3125
|
-
`, Rt = (e, t, n,
|
|
3125
|
+
`, Rt = (e, t, n, i) => e();
|
|
3126
3126
|
function Ft(e, t = Rt) {
|
|
3127
3127
|
return {
|
|
3128
|
-
findPaymentMethods(n,
|
|
3129
|
-
return t((s) => e.request({ document: _t, variables: n, requestHeaders: { ...
|
|
3128
|
+
findPaymentMethods(n, i, r) {
|
|
3129
|
+
return t((s) => e.request({ document: _t, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", n);
|
|
3130
3130
|
},
|
|
3131
|
-
createDigitalPayment(n,
|
|
3132
|
-
return t((s) => e.request({ document: Lt, variables: n, requestHeaders: { ...
|
|
3131
|
+
createDigitalPayment(n, i, r) {
|
|
3132
|
+
return t((s) => e.request({ document: Lt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", n);
|
|
3133
3133
|
}
|
|
3134
3134
|
};
|
|
3135
3135
|
}
|
|
@@ -3151,29 +3151,29 @@ class wt {
|
|
|
3151
3151
|
});
|
|
3152
3152
|
if (!n?.findPaymentDetails)
|
|
3153
3153
|
throw this.debugLog("No payment details found"), new Error("No payment details found for this order");
|
|
3154
|
-
const
|
|
3154
|
+
const i = n.findPaymentDetails;
|
|
3155
3155
|
return this.debugLog("Payment methods fetched successfully", {
|
|
3156
|
-
methodCount:
|
|
3157
|
-
transactionPrice:
|
|
3158
|
-
transactionDiscount:
|
|
3159
|
-
transactionFee:
|
|
3160
|
-
paymentSpesificTransactionFee:
|
|
3161
|
-
protectionFee:
|
|
3156
|
+
methodCount: i.methods?.length ?? 0,
|
|
3157
|
+
transactionPrice: i.transactionPrice,
|
|
3158
|
+
transactionDiscount: i.transactionDiscount,
|
|
3159
|
+
transactionFee: i.transactionFee,
|
|
3160
|
+
paymentSpesificTransactionFee: i.paymentSpesificTransactionFee,
|
|
3161
|
+
protectionFee: i.protectionFee
|
|
3162
3162
|
}), {
|
|
3163
|
-
transactionPrice:
|
|
3164
|
-
transactionDiscount:
|
|
3165
|
-
transactionFee:
|
|
3166
|
-
protectionFee:
|
|
3167
|
-
paymentSpesificTransactionFee:
|
|
3168
|
-
methods:
|
|
3169
|
-
id:
|
|
3170
|
-
name:
|
|
3171
|
-
image:
|
|
3172
|
-
fee:
|
|
3173
|
-
type:
|
|
3174
|
-
value:
|
|
3163
|
+
transactionPrice: i.transactionPrice,
|
|
3164
|
+
transactionDiscount: i.transactionDiscount,
|
|
3165
|
+
transactionFee: i.transactionFee,
|
|
3166
|
+
protectionFee: i.protectionFee,
|
|
3167
|
+
paymentSpesificTransactionFee: i.paymentSpesificTransactionFee,
|
|
3168
|
+
methods: i.methods?.map((r) => ({
|
|
3169
|
+
id: r.id,
|
|
3170
|
+
name: r.name,
|
|
3171
|
+
image: r.image,
|
|
3172
|
+
fee: r.fee ? {
|
|
3173
|
+
type: r.fee.type,
|
|
3174
|
+
value: r.fee.value
|
|
3175
3175
|
} : null,
|
|
3176
|
-
issuers:
|
|
3176
|
+
issuers: r.issuers?.map((s) => ({
|
|
3177
3177
|
id: s.id,
|
|
3178
3178
|
name: s.name,
|
|
3179
3179
|
image: s.image
|
|
@@ -3200,13 +3200,13 @@ class wt {
|
|
|
3200
3200
|
withTicketProtection: t.withTicketProtection
|
|
3201
3201
|
};
|
|
3202
3202
|
t.customer && (n.customer = t.customer), t.products && (n.products = t.products), t.description && (n.description = t.description), t.reference && (n.reference = t.reference), t.ipAddress && (n.ipAddress = t.ipAddress);
|
|
3203
|
-
const
|
|
3203
|
+
const i = await this.sdk.createDigitalPayment({
|
|
3204
3204
|
input: n
|
|
3205
3205
|
});
|
|
3206
|
-
if (!
|
|
3206
|
+
if (!i?.createDigitalOrderPayment)
|
|
3207
3207
|
throw this.debugLog("Failed to create payment"), new Error("Failed to create payment for this order");
|
|
3208
|
-
const
|
|
3209
|
-
return this.debugLog("Payment created successfully", { paymentUrl:
|
|
3208
|
+
const r = i.createDigitalOrderPayment;
|
|
3209
|
+
return this.debugLog("Payment created successfully", { paymentUrl: r }), { paymentUrl: r };
|
|
3210
3210
|
} catch (n) {
|
|
3211
3211
|
throw this.debugLog("Error creating payment", n), n;
|
|
3212
3212
|
}
|
|
@@ -3327,20 +3327,20 @@ const $t = u`
|
|
|
3327
3327
|
count
|
|
3328
3328
|
}
|
|
3329
3329
|
}
|
|
3330
|
-
`, Mt = (e, t, n,
|
|
3330
|
+
`, Mt = (e, t, n, i) => e();
|
|
3331
3331
|
function qt(e, t = Mt) {
|
|
3332
3332
|
return {
|
|
3333
|
-
findAllPublicPackagesByOrganizationId(n,
|
|
3334
|
-
return t((s) => e.request({ document: $t, variables: n, requestHeaders: { ...
|
|
3333
|
+
findAllPublicPackagesByOrganizationId(n, i, r) {
|
|
3334
|
+
return t((s) => e.request({ document: $t, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", n);
|
|
3335
3335
|
},
|
|
3336
|
-
findPublicPackageById(n,
|
|
3337
|
-
return t((s) => e.request({ document: Bt, variables: n, requestHeaders: { ...
|
|
3336
|
+
findPublicPackageById(n, i, r) {
|
|
3337
|
+
return t((s) => e.request({ document: Bt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", n);
|
|
3338
3338
|
},
|
|
3339
|
-
findPublicPackageBySlug(n,
|
|
3340
|
-
return t((s) => e.request({ document: Ut, variables: n, requestHeaders: { ...
|
|
3339
|
+
findPublicPackageBySlug(n, i, r) {
|
|
3340
|
+
return t((s) => e.request({ document: Ut, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageBySlug", "query", n);
|
|
3341
3341
|
},
|
|
3342
|
-
findPublicItemsByPackageId(n,
|
|
3343
|
-
return t((s) => e.request({ document: Vt, variables: n, requestHeaders: { ...
|
|
3342
|
+
findPublicItemsByPackageId(n, i, r) {
|
|
3343
|
+
return t((s) => e.request({ document: Vt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", n);
|
|
3344
3344
|
}
|
|
3345
3345
|
};
|
|
3346
3346
|
}
|
|
@@ -3355,29 +3355,29 @@ class zt {
|
|
|
3355
3355
|
}
|
|
3356
3356
|
async getPackages(t, n) {
|
|
3357
3357
|
try {
|
|
3358
|
-
let
|
|
3359
|
-
t.page && (
|
|
3358
|
+
let i;
|
|
3359
|
+
t.page && (i = {
|
|
3360
3360
|
index: t.page.index ?? 0,
|
|
3361
3361
|
size: t.page.size ?? 20
|
|
3362
3362
|
}), this.debugLog("Fetching public packages", {
|
|
3363
3363
|
organizationId: this.config.organizationId ?? n ?? "",
|
|
3364
|
-
page:
|
|
3364
|
+
page: i,
|
|
3365
3365
|
tab: t.tab,
|
|
3366
3366
|
statuses: t.statuses
|
|
3367
3367
|
});
|
|
3368
|
-
const
|
|
3368
|
+
const r = await this.sdk.findAllPublicPackagesByOrganizationId({
|
|
3369
3369
|
organizationId: this.config.organizationId ?? n ?? ""
|
|
3370
3370
|
});
|
|
3371
|
-
if (
|
|
3372
|
-
const s =
|
|
3371
|
+
if (r?.findAllPublicPackagesByOrganizationId) {
|
|
3372
|
+
const s = r.findAllPublicPackagesByOrganizationId;
|
|
3373
3373
|
return this.debugLog("Public packages fetched", {
|
|
3374
3374
|
count: s.count,
|
|
3375
3375
|
dataLength: s.data.length
|
|
3376
3376
|
}), s.data;
|
|
3377
3377
|
}
|
|
3378
3378
|
return null;
|
|
3379
|
-
} catch (
|
|
3380
|
-
throw this.debugLog("Error fetching public packages",
|
|
3379
|
+
} catch (i) {
|
|
3380
|
+
throw this.debugLog("Error fetching public packages", i), i;
|
|
3381
3381
|
}
|
|
3382
3382
|
}
|
|
3383
3383
|
async getPackage(t) {
|
|
@@ -3387,8 +3387,8 @@ class zt {
|
|
|
3387
3387
|
});
|
|
3388
3388
|
const n = await this.sdk.findPublicPackageById({ packageId: t });
|
|
3389
3389
|
if (n?.findPublicPackageById) {
|
|
3390
|
-
const
|
|
3391
|
-
return this.debugLog("Public package fetched"),
|
|
3390
|
+
const i = n.findPublicPackageById;
|
|
3391
|
+
return this.debugLog("Public package fetched"), i;
|
|
3392
3392
|
}
|
|
3393
3393
|
return null;
|
|
3394
3394
|
} catch (n) {
|
|
@@ -3401,34 +3401,34 @@ class zt {
|
|
|
3401
3401
|
organizationId: t,
|
|
3402
3402
|
slug: n
|
|
3403
3403
|
});
|
|
3404
|
-
const
|
|
3405
|
-
if (
|
|
3406
|
-
const
|
|
3407
|
-
return this.debugLog("Public package fetched"),
|
|
3404
|
+
const i = await this.sdk.findPublicPackageBySlug({ organizationId: t, slug: n });
|
|
3405
|
+
if (i?.findPublicPackageBySlug) {
|
|
3406
|
+
const r = i.findPublicPackageBySlug;
|
|
3407
|
+
return this.debugLog("Public package fetched"), r;
|
|
3408
3408
|
}
|
|
3409
3409
|
return null;
|
|
3410
|
-
} catch (
|
|
3411
|
-
throw this.debugLog("Error fetching public packages",
|
|
3410
|
+
} catch (i) {
|
|
3411
|
+
throw this.debugLog("Error fetching public packages", i), i;
|
|
3412
3412
|
}
|
|
3413
3413
|
}
|
|
3414
3414
|
async getPackageItems(t, n = [L.Regular, L.AdditionalEvent]) {
|
|
3415
3415
|
try {
|
|
3416
3416
|
this.debugLog("Fetching public package items", { packageId: t, types: n });
|
|
3417
|
-
const
|
|
3417
|
+
const i = await this.sdk.findPublicItemsByPackageId({
|
|
3418
3418
|
packageId: t,
|
|
3419
3419
|
types: n,
|
|
3420
3420
|
page: { index: 0, size: 100 }
|
|
3421
3421
|
});
|
|
3422
|
-
if (
|
|
3423
|
-
const
|
|
3422
|
+
if (i?.findPublicItemsByPackageId) {
|
|
3423
|
+
const r = i.findPublicItemsByPackageId;
|
|
3424
3424
|
return this.debugLog("Public package items fetched", {
|
|
3425
|
-
count:
|
|
3426
|
-
dataLength:
|
|
3427
|
-
}),
|
|
3425
|
+
count: r.count,
|
|
3426
|
+
dataLength: r.data.length
|
|
3427
|
+
}), r.data;
|
|
3428
3428
|
}
|
|
3429
3429
|
return null;
|
|
3430
|
-
} catch (
|
|
3431
|
-
throw this.debugLog("Error fetching public package items",
|
|
3430
|
+
} catch (i) {
|
|
3431
|
+
throw this.debugLog("Error fetching public package items", i), i;
|
|
3432
3432
|
}
|
|
3433
3433
|
}
|
|
3434
3434
|
}
|
|
@@ -3452,11 +3452,11 @@ const Gt = u`
|
|
|
3452
3452
|
count
|
|
3453
3453
|
}
|
|
3454
3454
|
}
|
|
3455
|
-
`, jt = (e, t, n,
|
|
3455
|
+
`, jt = (e, t, n, i) => e();
|
|
3456
3456
|
function Ht(e, t = jt) {
|
|
3457
3457
|
return {
|
|
3458
|
-
findAllPublicCategoriesByOrganizationId(n,
|
|
3459
|
-
return t((s) => e.request({ document: Gt, variables: n, requestHeaders: { ...
|
|
3458
|
+
findAllPublicCategoriesByOrganizationId(n, i, r) {
|
|
3459
|
+
return t((s) => e.request({ document: Gt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", n);
|
|
3460
3460
|
}
|
|
3461
3461
|
};
|
|
3462
3462
|
}
|
|
@@ -3472,17 +3472,17 @@ class Yt {
|
|
|
3472
3472
|
async getCategories(t, n) {
|
|
3473
3473
|
try {
|
|
3474
3474
|
this.debugLog("Fetching all categories", { organizationId: this.config.organizationId });
|
|
3475
|
-
const
|
|
3476
|
-
if (
|
|
3477
|
-
const
|
|
3478
|
-
return this.debugLog("Categories fetched", { count:
|
|
3479
|
-
...
|
|
3475
|
+
const i = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId ?? n ?? "", dateRange: t ?? null });
|
|
3476
|
+
if (i?.findAllPublicHostingsByOrganizationId) {
|
|
3477
|
+
const r = i.findAllPublicHostingsByOrganizationId, s = i.findAllPublicLocationsByOrganizationId;
|
|
3478
|
+
return this.debugLog("Categories fetched", { count: r.count + s.count, dataLength: r.data.length + s.data.length }), [
|
|
3479
|
+
...r.data.map((o) => ({ id: o.id, name: o.name, icon: o.icon, activeEvents: o.amountOfActiveEvents, type: "HOSTING" })),
|
|
3480
3480
|
...s.data.map((o) => ({ id: o.id, name: o.name, activeEvents: o.amountOfActiveEvents, type: "LOCATION" }))
|
|
3481
3481
|
];
|
|
3482
3482
|
}
|
|
3483
3483
|
return [];
|
|
3484
|
-
} catch (
|
|
3485
|
-
throw this.debugLog("Error fetching categories",
|
|
3484
|
+
} catch (i) {
|
|
3485
|
+
throw this.debugLog("Error fetching categories", i), i;
|
|
3486
3486
|
}
|
|
3487
3487
|
}
|
|
3488
3488
|
}
|
|
@@ -3498,17 +3498,17 @@ const Qt = u`
|
|
|
3498
3498
|
mutation CreatePackageView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
|
|
3499
3499
|
createPackageView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
|
|
3500
3500
|
}
|
|
3501
|
-
`, Wt = (e, t, n,
|
|
3501
|
+
`, Wt = (e, t, n, i) => e();
|
|
3502
3502
|
function Zt(e, t = Wt) {
|
|
3503
3503
|
return {
|
|
3504
|
-
CreateShopView(n,
|
|
3505
|
-
return t((s) => e.request({ document: Qt, variables: n, requestHeaders: { ...
|
|
3504
|
+
CreateShopView(n, i, r) {
|
|
3505
|
+
return t((s) => e.request({ document: Qt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", n);
|
|
3506
3506
|
},
|
|
3507
|
-
CreateEventView(n,
|
|
3508
|
-
return t((s) => e.request({ document: Xt, variables: n, requestHeaders: { ...
|
|
3507
|
+
CreateEventView(n, i, r) {
|
|
3508
|
+
return t((s) => e.request({ document: Xt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", n);
|
|
3509
3509
|
},
|
|
3510
|
-
CreatePackageView(n,
|
|
3511
|
-
return t((s) => e.request({ document: Jt, variables: n, requestHeaders: { ...
|
|
3510
|
+
CreatePackageView(n, i, r) {
|
|
3511
|
+
return t((s) => e.request({ document: Jt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", n);
|
|
3512
3512
|
}
|
|
3513
3513
|
};
|
|
3514
3514
|
}
|
|
@@ -3518,11 +3518,11 @@ class Kt {
|
|
|
3518
3518
|
constructor(t) {
|
|
3519
3519
|
this.config = t, this.sdk = Zt(new A(t.apiUrl));
|
|
3520
3520
|
}
|
|
3521
|
-
createMetric = async (t, n,
|
|
3522
|
-
switch (!n && !
|
|
3521
|
+
createMetric = async (t, n, i) => {
|
|
3522
|
+
switch (!n && !i && await this.sdk.CreateShopView({
|
|
3523
3523
|
id: t,
|
|
3524
3524
|
trackerLinkId: this.config.trackerId
|
|
3525
|
-
}),
|
|
3525
|
+
}), i) {
|
|
3526
3526
|
case R.Event:
|
|
3527
3527
|
await this.sdk.CreateEventView({
|
|
3528
3528
|
id: t,
|
|
@@ -3586,11 +3586,11 @@ const en = u`
|
|
|
3586
3586
|
blockedLanguages
|
|
3587
3587
|
}
|
|
3588
3588
|
}
|
|
3589
|
-
`, tn = (e, t, n,
|
|
3589
|
+
`, tn = (e, t, n, i) => e();
|
|
3590
3590
|
function nn(e, t = tn) {
|
|
3591
3591
|
return {
|
|
3592
|
-
getShopBySlug(n,
|
|
3593
|
-
return t((s) => e.request({ document: en, variables: n, requestHeaders: { ...
|
|
3592
|
+
getShopBySlug(n, i, r) {
|
|
3593
|
+
return t((s) => e.request({ document: en, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "getShopBySlug", "query", n);
|
|
3594
3594
|
}
|
|
3595
3595
|
};
|
|
3596
3596
|
}
|
|
@@ -3605,8 +3605,8 @@ class rn {
|
|
|
3605
3605
|
this.debugLog("Fetching shop", { slug: t });
|
|
3606
3606
|
const n = await this.sdk.getShopBySlug({ slug: t, trackerLinkId: this.config.trackerId });
|
|
3607
3607
|
if (this.debugLog("Raw GraphQL response", n), n?.findShopBySlug) {
|
|
3608
|
-
const
|
|
3609
|
-
return this.debugLog("Public Shop fetched"),
|
|
3608
|
+
const i = n.findShopBySlug;
|
|
3609
|
+
return this.debugLog("Public Shop fetched"), i;
|
|
3610
3610
|
}
|
|
3611
3611
|
return null;
|
|
3612
3612
|
} catch (n) {
|
|
@@ -3636,11 +3636,11 @@ const sn = u`
|
|
|
3636
3636
|
confirm
|
|
3637
3637
|
}
|
|
3638
3638
|
}
|
|
3639
|
-
`, an = (e, t, n,
|
|
3639
|
+
`, an = (e, t, n, i) => e();
|
|
3640
3640
|
function on(e, t = an) {
|
|
3641
3641
|
return {
|
|
3642
|
-
findAllCustomFieldsByOrderId(n,
|
|
3643
|
-
return t((s) => e.request({ document: sn, variables: n, requestHeaders: { ...
|
|
3642
|
+
findAllCustomFieldsByOrderId(n, i, r) {
|
|
3643
|
+
return t((s) => e.request({ document: sn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllCustomFieldsByOrderId", "query", n);
|
|
3644
3644
|
}
|
|
3645
3645
|
};
|
|
3646
3646
|
}
|
|
@@ -3653,13 +3653,13 @@ class cn {
|
|
|
3653
3653
|
async findByOrderId(t, n) {
|
|
3654
3654
|
try {
|
|
3655
3655
|
this.debugLog("Fetching custom fields for order", { orderId: t, salesLocations: n });
|
|
3656
|
-
const
|
|
3656
|
+
const i = await this.sdk.findAllCustomFieldsByOrderId({
|
|
3657
3657
|
orderId: t,
|
|
3658
3658
|
salesLocations: n || null
|
|
3659
3659
|
});
|
|
3660
|
-
return this.debugLog("Custom fields fetched successfully",
|
|
3661
|
-
} catch (
|
|
3662
|
-
throw this.debugLog("Error fetching custom fields for order",
|
|
3660
|
+
return this.debugLog("Custom fields fetched successfully", i.findAllCustomFieldsByOrderId), i.findAllCustomFieldsByOrderId;
|
|
3661
|
+
} catch (i) {
|
|
3662
|
+
throw this.debugLog("Error fetching custom fields for order", i), i;
|
|
3663
3663
|
}
|
|
3664
3664
|
}
|
|
3665
3665
|
debugLog(t, n) {
|
|
@@ -3679,8 +3679,8 @@ class hn {
|
|
|
3679
3679
|
// Attach selected public types to the SDK class
|
|
3680
3680
|
static Types = Ne;
|
|
3681
3681
|
constructor(t) {
|
|
3682
|
-
const { organizationId: n, debug:
|
|
3683
|
-
this.event = new Ct({ organizationId: n, debug:
|
|
3682
|
+
const { organizationId: n, debug: i = !1, apiUrl: r = dn } = t;
|
|
3683
|
+
this.event = new Ct({ organizationId: n, debug: i, apiUrl: r, trackerId: t.trackerId }), this.package = new zt({ organizationId: n, debug: i, apiUrl: r }), this.category = new Yt({ organizationId: n, debug: i, apiUrl: r }), this.metric = new Kt({ apiUrl: r, trackerId: t.trackerId }), this.shop = new rn({ debug: i, apiUrl: r, trackerId: t.trackerId }), this.customField = new cn({ debug: i, apiUrl: r }), this.basket = new Nt({ debug: i, apiUrl: r, trackerId: t.trackerId }), this.payment = new wt({ debug: i, apiUrl: r });
|
|
3684
3684
|
}
|
|
3685
3685
|
}
|
|
3686
3686
|
export {
|
|
@@ -3690,11 +3690,11 @@ export {
|
|
|
3690
3690
|
se as DiscountType,
|
|
3691
3691
|
K as EventStatus,
|
|
3692
3692
|
R as MetricsType,
|
|
3693
|
-
|
|
3693
|
+
re as OrderItemType,
|
|
3694
3694
|
L as PackageItemType,
|
|
3695
3695
|
W as PackageStatus,
|
|
3696
3696
|
Z as PackageTabType,
|
|
3697
|
-
|
|
3697
|
+
ie as PaymentMethodFeeType,
|
|
3698
3698
|
te as ProductStatus,
|
|
3699
3699
|
ne as ProductType,
|
|
3700
3700
|
ue as SalesLocations,
|