@opexa/portal-sdk 0.0.149 → 0.0.151
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 +1624 -1624
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +67 -63
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/types.d.ts +2 -0
- package/dist/services/types.d.ts +2 -0
- package/package.json +81 -81
package/dist/index.mjs
CHANGED
|
@@ -380,7 +380,7 @@ const Me = i`
|
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
|
-
`,
|
|
383
|
+
`, ut = i`
|
|
384
384
|
query InstapayBankList {
|
|
385
385
|
instapayBankList {
|
|
386
386
|
id
|
|
@@ -388,7 +388,7 @@ const Me = i`
|
|
|
388
388
|
name
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
`,
|
|
391
|
+
`, ct = i`
|
|
392
392
|
query RemainingDailyWithdrawalsCount {
|
|
393
393
|
remainingDailyWithdrawalsCount
|
|
394
394
|
}
|
|
@@ -1482,7 +1482,7 @@ const Nt = i`
|
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
|
-
`,
|
|
1485
|
+
`, ur = i`
|
|
1486
1486
|
mutation ClaimSpotBonus($code: String!) {
|
|
1487
1487
|
claimSpotBonus(code: $code) {
|
|
1488
1488
|
... on InvalidPromoCodeError {
|
|
@@ -1496,7 +1496,7 @@ const Nt = i`
|
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
|
-
`,
|
|
1499
|
+
`, cr = i`
|
|
1500
1500
|
query OnboardingStatus {
|
|
1501
1501
|
onboardingStatus
|
|
1502
1502
|
}
|
|
@@ -1524,6 +1524,8 @@ const Nt = i`
|
|
|
1524
1524
|
}
|
|
1525
1525
|
status
|
|
1526
1526
|
progressPercentage
|
|
1527
|
+
turnover
|
|
1528
|
+
targetTurnover
|
|
1527
1529
|
bonus
|
|
1528
1530
|
endDateTime
|
|
1529
1531
|
dateTimeCreated
|
|
@@ -1987,9 +1989,9 @@ class yr {
|
|
|
1987
1989
|
} : e;
|
|
1988
1990
|
}
|
|
1989
1991
|
async games(e) {
|
|
1990
|
-
var a, m, s,
|
|
1992
|
+
var a, m, s, u, c, p, w, f, b, k, T, _, R, D, y, M, I, A, N, P, G, v, E, B, x, W, q, U, $, L, F, H;
|
|
1991
1993
|
const t = new URLSearchParams();
|
|
1992
|
-
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (m = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && m.equal && t.set("filter[type][eq]", e.filter.type.equal), (
|
|
1994
|
+
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (m = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && m.equal && t.set("filter[type][eq]", e.filter.type.equal), (u = (s = e == null ? void 0 : e.filter) == null ? void 0 : s.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (f = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && f.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (k = (b = e == null ? void 0 : e.filter) == null ? void 0 : b.provider) != null && k.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (_ = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && _.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (D = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.provider) != null && D.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (M = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.provider) != null && M.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (A = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.tags) != null && A.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (P = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.tags) != null && P.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (v = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && v.in && t.set(
|
|
1993
1995
|
"filter[tags][in]",
|
|
1994
1996
|
e.filter.tags.in.map((h) => h.toLowerCase()).join(",")
|
|
1995
1997
|
), (B = (E = e == null ? void 0 : e.filter) == null ? void 0 : E.tags) != null && B.notIn && t.set(
|
|
@@ -2013,9 +2015,9 @@ class yr {
|
|
|
2013
2015
|
} : r;
|
|
2014
2016
|
}
|
|
2015
2017
|
async games__next(e) {
|
|
2016
|
-
var a, m, s,
|
|
2018
|
+
var a, m, s, u, c, p, w, f, b, k, T, _, R, D, y, M, I, A, N, P, G, v, E, B, x, W, q, U, $, L, F, H;
|
|
2017
2019
|
const t = new URLSearchParams();
|
|
2018
|
-
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (m = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && m.equal && t.set("filter[type][eq]", e.filter.type.equal), (
|
|
2020
|
+
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (m = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && m.equal && t.set("filter[type][eq]", e.filter.type.equal), (u = (s = e == null ? void 0 : e.filter) == null ? void 0 : s.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (f = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && f.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (k = (b = e == null ? void 0 : e.filter) == null ? void 0 : b.provider) != null && k.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (_ = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && _.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (D = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.provider) != null && D.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (M = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.provider) != null && M.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (A = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.tags) != null && A.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (P = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.tags) != null && P.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (v = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && v.in && t.set(
|
|
2019
2021
|
"filter[tags][in]",
|
|
2020
2022
|
e.filter.tags.in.map((h) => h.toLowerCase()).join(",")
|
|
2021
2023
|
), (B = (E = e == null ? void 0 : e.filter) == null ? void 0 : E.tags) != null && B.notIn && t.set(
|
|
@@ -2162,7 +2164,7 @@ class Ar {
|
|
|
2162
2164
|
} : e;
|
|
2163
2165
|
}
|
|
2164
2166
|
async onboardingStatus() {
|
|
2165
|
-
const e = await this.client.request(
|
|
2167
|
+
const e = await this.client.request(cr);
|
|
2166
2168
|
return e.ok ? { ok: e.ok, data: e.data.onboardingStatus ?? [] } : e;
|
|
2167
2169
|
}
|
|
2168
2170
|
async completeOnboarding(e) {
|
|
@@ -2543,12 +2545,12 @@ class Cr {
|
|
|
2543
2545
|
} : a;
|
|
2544
2546
|
}
|
|
2545
2547
|
async instapayBankList() {
|
|
2546
|
-
const e = await this.client.request(
|
|
2548
|
+
const e = await this.client.request(ut);
|
|
2547
2549
|
return e.ok ? { ok: e.ok, data: e.data.instapayBankList } : e;
|
|
2548
2550
|
}
|
|
2549
2551
|
async remainingDailyWithdrawalsCount() {
|
|
2550
2552
|
const e = await this.client.request(
|
|
2551
|
-
|
|
2553
|
+
ct
|
|
2552
2554
|
);
|
|
2553
2555
|
return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
|
|
2554
2556
|
}
|
|
@@ -2623,7 +2625,7 @@ class Cr {
|
|
|
2623
2625
|
}
|
|
2624
2626
|
async claimSpotBonus(e) {
|
|
2625
2627
|
const t = await this.client.request(
|
|
2626
|
-
|
|
2628
|
+
ur,
|
|
2627
2629
|
e
|
|
2628
2630
|
);
|
|
2629
2631
|
return t.ok ? t.data.claimSpotBonus ? {
|
|
@@ -2705,10 +2707,10 @@ class K {
|
|
|
2705
2707
|
variables: t
|
|
2706
2708
|
}), s = new Headers(a.headers);
|
|
2707
2709
|
s.set("Content-Type", "application/json"), s.set("Accept", "application/json");
|
|
2708
|
-
const
|
|
2709
|
-
|
|
2710
|
+
const u = new URL(this.url), c = xe(e);
|
|
2711
|
+
c && u.searchParams.set(`_${c.type}`, c.name);
|
|
2710
2712
|
const p = await this.runMiddlewares(
|
|
2711
|
-
new Request(
|
|
2713
|
+
new Request(u, {
|
|
2712
2714
|
...a,
|
|
2713
2715
|
body: m,
|
|
2714
2716
|
headers: s,
|
|
@@ -2721,10 +2723,10 @@ class K {
|
|
|
2721
2723
|
async upload(e, t, r) {
|
|
2722
2724
|
const a = We(this.options, r), m = this.createUploadBody(e, t), s = new Headers(a.headers);
|
|
2723
2725
|
s.delete("Content-Type");
|
|
2724
|
-
const
|
|
2725
|
-
|
|
2726
|
+
const u = new URL(this.url), c = xe(e);
|
|
2727
|
+
c && u.searchParams.set(`_${c.type}`, c.name);
|
|
2726
2728
|
const p = await this.runMiddlewares(
|
|
2727
|
-
new Request(
|
|
2729
|
+
new Request(u, {
|
|
2728
2730
|
...a,
|
|
2729
2731
|
body: m,
|
|
2730
2732
|
headers: s,
|
|
@@ -2734,13 +2736,13 @@ class K {
|
|
|
2734
2736
|
return await this.exec(p);
|
|
2735
2737
|
}
|
|
2736
2738
|
async exec(e) {
|
|
2737
|
-
var t, r, a, m, s,
|
|
2739
|
+
var t, r, a, m, s, u;
|
|
2738
2740
|
try {
|
|
2739
|
-
const
|
|
2740
|
-
if (!
|
|
2741
|
-
return { ok: !1, error: g(
|
|
2742
|
-
const p = await
|
|
2743
|
-
return f ? ((r = f.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = f.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: g(403, f.message) } : ((m = f.extensions) == null ? void 0 : m.code) === "UNAUTHORIZED" ? { ok: !1, error: g(401, f.message) } : ((s = f.extensions) == null ? void 0 : s.code) === "BAD_USER_INPUT" || ((
|
|
2741
|
+
const c = await fetch(e);
|
|
2742
|
+
if (!c.ok)
|
|
2743
|
+
return { ok: !1, error: g(c.status) };
|
|
2744
|
+
const p = await c.json(), w = p.data, f = (t = p.errors) == null ? void 0 : t.at(0);
|
|
2745
|
+
return f ? ((r = f.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = f.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: g(403, f.message) } : ((m = f.extensions) == null ? void 0 : m.code) === "UNAUTHORIZED" ? { ok: !1, error: g(401, f.message) } : ((s = f.extensions) == null ? void 0 : s.code) === "BAD_USER_INPUT" || ((u = f.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: g(400, f.message) } : {
|
|
2744
2746
|
ok: !1,
|
|
2745
2747
|
error: g(500, f.message)
|
|
2746
2748
|
} : {
|
|
@@ -2772,10 +2774,10 @@ class K {
|
|
|
2772
2774
|
})
|
|
2773
2775
|
);
|
|
2774
2776
|
const m = {};
|
|
2775
|
-
return r.forEach((s,
|
|
2776
|
-
m[
|
|
2777
|
-
}), a.append("map", JSON.stringify(m)), r.forEach((s,
|
|
2778
|
-
a.append(
|
|
2777
|
+
return r.forEach((s, u) => {
|
|
2778
|
+
m[u.toString()] = [`variables.${s.key.join(".")}`];
|
|
2779
|
+
}), a.append("map", JSON.stringify(m)), r.forEach((s, u) => {
|
|
2780
|
+
a.append(u.toString(), s.value);
|
|
2779
2781
|
}), a;
|
|
2780
2782
|
}
|
|
2781
2783
|
}
|
|
@@ -2857,9 +2859,9 @@ function Ue(o, e) {
|
|
|
2857
2859
|
maxAttempt: a = 3
|
|
2858
2860
|
/**/
|
|
2859
2861
|
} = e;
|
|
2860
|
-
async function m(s,
|
|
2861
|
-
const
|
|
2862
|
-
return t(p) ? p :
|
|
2862
|
+
async function m(s, u) {
|
|
2863
|
+
const c = u ?? a, p = await o(...s);
|
|
2864
|
+
return t(p) ? p : c > 1 ? (await Ye(r * ((a - c) / 2)), m(s, c - 1)) : p;
|
|
2863
2865
|
}
|
|
2864
2866
|
return async (...s) => await m(s);
|
|
2865
2867
|
}
|
|
@@ -2912,17 +2914,17 @@ class Ir {
|
|
|
2912
2914
|
message: "Forbidden"
|
|
2913
2915
|
}
|
|
2914
2916
|
};
|
|
2915
|
-
const
|
|
2917
|
+
const c = await Ue(() => this.authService.createSession(e), {
|
|
2916
2918
|
until: (w) => w.ok,
|
|
2917
2919
|
interval: 1e3,
|
|
2918
2920
|
maxAttempt: 5
|
|
2919
2921
|
})();
|
|
2920
|
-
if (!
|
|
2922
|
+
if (!c.ok) return c;
|
|
2921
2923
|
const p = /* @__PURE__ */ new Date();
|
|
2922
2924
|
return window.localStorage.setItem(
|
|
2923
2925
|
this.storageKey,
|
|
2924
2926
|
JSON.stringify({
|
|
2925
|
-
...
|
|
2927
|
+
...c.data,
|
|
2926
2928
|
accessTokenExpiresAt: j(p, 8).getTime(),
|
|
2927
2929
|
refreshTokenExpiresAt: J(z(p, 30), 2).getTime()
|
|
2928
2930
|
})
|
|
@@ -3181,7 +3183,7 @@ class Nr {
|
|
|
3181
3183
|
}
|
|
3182
3184
|
/** @deprecated */
|
|
3183
3185
|
platform(e) {
|
|
3184
|
-
var t, r, a, m, s,
|
|
3186
|
+
var t, r, a, m, s, u, c, p, w, f, b, k, T, _, R, D, y, M, I, A, N, P, G, v, E, B, x, W, q, U, $, L, F, H, h, X, Z, ee, te, re, ae, ne, oe, ie, se, me, ue, ce, de, le, pe, fe, we, ye, he, ge, Ae, Ee, Se, Ce, be, ke, Te, _e, Re, De, Oe;
|
|
3185
3187
|
return {
|
|
3186
3188
|
timezone: e.timezone,
|
|
3187
3189
|
currency: e.currency,
|
|
@@ -3195,10 +3197,10 @@ class Nr {
|
|
|
3195
3197
|
webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
|
|
3196
3198
|
mobileWebEnabled: ((m = e.bankDepositGatewaySettings) == null ? void 0 : m.mobileWebEnabled) ?? !1,
|
|
3197
3199
|
minimumAmount: n((s = e.bankDepositGatewaySettings) == null ? void 0 : s.minimumAmount),
|
|
3198
|
-
maximumAmount: n((
|
|
3200
|
+
maximumAmount: n((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
|
|
3199
3201
|
},
|
|
3200
3202
|
gcash: {
|
|
3201
|
-
androidEnabled: ((
|
|
3203
|
+
androidEnabled: ((c = e.gcashDepositGatewaySettings) == null ? void 0 : c.androidEnabled) ?? !1,
|
|
3202
3204
|
iosEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.iosEnabled) ?? !1,
|
|
3203
3205
|
webEnabled: ((w = e.gcashDepositGatewaySettings) == null ? void 0 : w.webEnabled) ?? !1,
|
|
3204
3206
|
mobileWebEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.mobileWebEnabled) ?? !1,
|
|
@@ -3252,9 +3254,9 @@ class Nr {
|
|
|
3252
3254
|
iosEnabled: ((ie = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ie.iosEnabled) ?? !1,
|
|
3253
3255
|
webEnabled: ((se = e.gcashWithdrawalGatewaySettings) == null ? void 0 : se.webEnabled) ?? !1,
|
|
3254
3256
|
mobileWebEnabled: ((me = e.gcashWithdrawalGatewaySettings) == null ? void 0 : me.mobileWebEnabled) ?? !1,
|
|
3255
|
-
minimumAmount: n((
|
|
3257
|
+
minimumAmount: n((ue = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ue.minimumAmount),
|
|
3256
3258
|
maximumAmount: n(
|
|
3257
|
-
(
|
|
3259
|
+
(ce = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount,
|
|
3258
3260
|
1e6
|
|
3259
3261
|
)
|
|
3260
3262
|
},
|
|
@@ -3308,7 +3310,7 @@ class Nr {
|
|
|
3308
3310
|
};
|
|
3309
3311
|
}
|
|
3310
3312
|
paymentSettings(e) {
|
|
3311
|
-
var t, r, a, m, s,
|
|
3313
|
+
var t, r, a, m, s, u, c, p, w, f, b, k, T, _, R, D, y, M, I, A, N, P, G, v, E, B, x, W, q, U, $, L, F, H, h, X, Z, ee, te, re, ae, ne, oe, ie, se, me, ue, ce, de, le, pe, fe, we, ye, he, ge, Ae, Ee, Se, Ce, be, ke, Te, _e, Re, De;
|
|
3312
3314
|
return {
|
|
3313
3315
|
minimumFirstDepositAmount: n(e.minimumFirstDepositAmount),
|
|
3314
3316
|
restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
|
|
@@ -3319,10 +3321,10 @@ class Nr {
|
|
|
3319
3321
|
webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
|
|
3320
3322
|
mobileWebEnabled: ((m = e.bankDepositGatewaySettings) == null ? void 0 : m.mobileWebEnabled) ?? !1,
|
|
3321
3323
|
minimumAmount: n((s = e.bankDepositGatewaySettings) == null ? void 0 : s.minimumAmount),
|
|
3322
|
-
maximumAmount: n((
|
|
3324
|
+
maximumAmount: n((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
|
|
3323
3325
|
},
|
|
3324
3326
|
gcash: {
|
|
3325
|
-
androidEnabled: ((
|
|
3327
|
+
androidEnabled: ((c = e.gcashDepositGatewaySettings) == null ? void 0 : c.androidEnabled) ?? !1,
|
|
3326
3328
|
iosEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.iosEnabled) ?? !1,
|
|
3327
3329
|
webEnabled: ((w = e.gcashDepositGatewaySettings) == null ? void 0 : w.webEnabled) ?? !1,
|
|
3328
3330
|
mobileWebEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.mobileWebEnabled) ?? !1,
|
|
@@ -3376,8 +3378,8 @@ class Nr {
|
|
|
3376
3378
|
iosEnabled: ((ie = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ie.iosEnabled) ?? !1,
|
|
3377
3379
|
webEnabled: ((se = e.gcashWithdrawalGatewaySettings) == null ? void 0 : se.webEnabled) ?? !1,
|
|
3378
3380
|
mobileWebEnabled: ((me = e.gcashWithdrawalGatewaySettings) == null ? void 0 : me.mobileWebEnabled) ?? !1,
|
|
3379
|
-
minimumAmount: n((
|
|
3380
|
-
maximumAmount: n((
|
|
3381
|
+
minimumAmount: n((ue = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ue.minimumAmount),
|
|
3382
|
+
maximumAmount: n((ce = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount, 1e6)
|
|
3381
3383
|
},
|
|
3382
3384
|
maya: {
|
|
3383
3385
|
androidEnabled: ((de = e.mayaWithdrawalGatewaySettings) == null ? void 0 : de.androidEnabled) ?? !1,
|
|
@@ -3814,7 +3816,9 @@ class Nr {
|
|
|
3814
3816
|
totalBonus: n(e.program.totalBonus, 0),
|
|
3815
3817
|
status: e.program.status
|
|
3816
3818
|
},
|
|
3817
|
-
progressPercentage: n(e.progressPercentage, 0)
|
|
3819
|
+
progressPercentage: n(e.progressPercentage, 0),
|
|
3820
|
+
turnover: n(e.turnover, 0),
|
|
3821
|
+
targetTurnover: n(e.targetTurnover, 0)
|
|
3818
3822
|
};
|
|
3819
3823
|
}
|
|
3820
3824
|
}
|
|
@@ -3840,11 +3844,11 @@ class vr {
|
|
|
3840
3844
|
platform: a,
|
|
3841
3845
|
environment: m,
|
|
3842
3846
|
logs: s
|
|
3843
|
-
} = e,
|
|
3847
|
+
} = e, u = m === "production";
|
|
3844
3848
|
this.transformer = new Nr(), this.logger = new Ve({
|
|
3845
3849
|
enabled: s ?? !1
|
|
3846
3850
|
});
|
|
3847
|
-
const
|
|
3851
|
+
const c = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", p = u ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", w = u ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", f = u ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", b = u ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", k = u ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", T = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", _ = u ? "https://trigger.opexa.io/graphql" : "https://trigger.development.opexa.io/graphql", R = "https://portal-api.opexacms.io", D = new yr({
|
|
3848
3852
|
url: R,
|
|
3849
3853
|
site: t,
|
|
3850
3854
|
platform: r
|
|
@@ -3857,12 +3861,12 @@ class vr {
|
|
|
3857
3861
|
}
|
|
3858
3862
|
}
|
|
3859
3863
|
}, M = new gr(new K(T, y)), I = new hr(new K(k, y)), A = new Cr(new K(p, y)), N = new fr(new K(f, y)), P = new Er(new K(w, y)), G = new Ar(new K(b, y)), v = new Sr(new K(_, y)), E = new wr({
|
|
3860
|
-
url:
|
|
3864
|
+
url: c,
|
|
3861
3865
|
fetchOptions: {
|
|
3862
3866
|
headers: {
|
|
3863
3867
|
Role: "MEMBER",
|
|
3864
3868
|
"Platform-Code": a,
|
|
3865
|
-
...!
|
|
3869
|
+
...!u && {
|
|
3866
3870
|
"Test-Pass": ""
|
|
3867
3871
|
}
|
|
3868
3872
|
}
|
|
@@ -4100,16 +4104,16 @@ class vr {
|
|
|
4100
4104
|
dateOfBirth: a,
|
|
4101
4105
|
mobileNumber: m,
|
|
4102
4106
|
secretAnswer: s,
|
|
4103
|
-
transactionPassword:
|
|
4104
|
-
...
|
|
4107
|
+
transactionPassword: u,
|
|
4108
|
+
...c
|
|
4105
4109
|
} = t;
|
|
4106
4110
|
return await this.accountService.updateMemberAccount({
|
|
4107
4111
|
input: {
|
|
4108
4112
|
id: e,
|
|
4109
4113
|
data: {
|
|
4110
|
-
...
|
|
4114
|
+
...c,
|
|
4111
4115
|
password: r ? await S(r) : void 0,
|
|
4112
|
-
transactionPassword:
|
|
4116
|
+
transactionPassword: u ? await S(u) : void 0,
|
|
4113
4117
|
mobileNumber: m ? V(m, await this.locale) : void 0,
|
|
4114
4118
|
secretAnswer: s ? await S(s) : void 0,
|
|
4115
4119
|
birthDay: a ? typeof a == "string" ? a : this.formatYmd(a) : void 0
|
|
@@ -4466,12 +4470,12 @@ class vr {
|
|
|
4466
4470
|
ok: !0,
|
|
4467
4471
|
data: {
|
|
4468
4472
|
betRecords: t.data.edges.map(({ cursor: m, node: s }) => {
|
|
4469
|
-
var
|
|
4470
|
-
const
|
|
4473
|
+
var c;
|
|
4474
|
+
const u = (c = a.data.edges.find((p) => s.game.id === p.node.reference)) == null ? void 0 : c.node;
|
|
4471
4475
|
return {
|
|
4472
4476
|
...this.transformer.transform.betRecord({
|
|
4473
4477
|
...s,
|
|
4474
|
-
game:
|
|
4478
|
+
game: u
|
|
4475
4479
|
}),
|
|
4476
4480
|
cursor: m
|
|
4477
4481
|
};
|
|
@@ -4502,7 +4506,7 @@ class vr {
|
|
|
4502
4506
|
ok: !0,
|
|
4503
4507
|
data: e.data.map((a) => {
|
|
4504
4508
|
var s;
|
|
4505
|
-
const m = (s = r.data.edges.find((
|
|
4509
|
+
const m = (s = r.data.edges.find((u) => u.node.reference === a.game.id)) == null ? void 0 : s.node;
|
|
4506
4510
|
return this.transformer.transform.latestBetRecord({
|
|
4507
4511
|
...a,
|
|
4508
4512
|
game: m
|
|
@@ -4679,16 +4683,16 @@ class vr {
|
|
|
4679
4683
|
async createGameSession(e) {
|
|
4680
4684
|
const t = e.id ?? Y.generate(Q.GameSession).toString();
|
|
4681
4685
|
if (e.provider) {
|
|
4682
|
-
const
|
|
4683
|
-
return
|
|
4686
|
+
const c = qe.includes(e.provider) ? await this.walletService.createGameSession({ input: { id: t, game: e.reference } }) : await this.gameService.createGameSession({ input: { id: t, game: e.reference } });
|
|
4687
|
+
return c.ok ? { ok: !0, data: { id: t } } : c;
|
|
4684
4688
|
}
|
|
4685
4689
|
if (e.game.startsWith("SPORTS:")) {
|
|
4686
|
-
const
|
|
4690
|
+
const c = await Y.generateFromKey(Q.Game, e.game).then(
|
|
4687
4691
|
(w) => w.toString()
|
|
4688
4692
|
), p = await this.gameService.createGameSession({
|
|
4689
4693
|
input: {
|
|
4690
4694
|
id: t,
|
|
4691
|
-
game:
|
|
4695
|
+
game: c
|
|
4692
4696
|
}
|
|
4693
4697
|
});
|
|
4694
4698
|
return p.ok ? { ok: !0, data: { id: t } } : p;
|
|
@@ -4702,8 +4706,8 @@ class vr {
|
|
|
4702
4706
|
message: "Game does not exist"
|
|
4703
4707
|
}
|
|
4704
4708
|
};
|
|
4705
|
-
const { provider: m, reference: s } = a.data,
|
|
4706
|
-
return
|
|
4709
|
+
const { provider: m, reference: s } = a.data, u = qe.includes(m) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
|
|
4710
|
+
return u.ok ? { ok: !0, data: { id: t } } : u;
|
|
4707
4711
|
}
|
|
4708
4712
|
async endGameSession(e) {
|
|
4709
4713
|
const t = await this.walletService.endGameSession({ input: { id: e } });
|