@opexa/portal-sdk 0.0.64 → 0.0.66
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -30
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +1 -1
- package/dist/services/game.service.d.ts +1 -1
- package/dist/services/wallet.service.d.ts +1 -1
- package/dist/utils/types.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1218,7 +1218,7 @@ class At {
|
|
|
1218
1218
|
} : t;
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function _(n) {
|
|
1222
1222
|
return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
|
|
1223
1223
|
}
|
|
1224
1224
|
function h(n, e) {
|
|
@@ -1254,10 +1254,10 @@ class kt {
|
|
|
1254
1254
|
t.set("Authorization", `Basic ${a}`);
|
|
1255
1255
|
}
|
|
1256
1256
|
if (e.mobileNumber) {
|
|
1257
|
-
const
|
|
1258
|
-
t.set("Authorization", `MobileNumberOTP ${
|
|
1257
|
+
const a = `${_(e.mobileNumber)}:${e.authenticationCode}`, s = Buffer.from(a).toString("base64");
|
|
1258
|
+
console.log(`MobileNumberOTP ${s}`), t.set("Authorization", `MobileNumberOTP ${s}`);
|
|
1259
1259
|
}
|
|
1260
|
-
e.sessionId && t.set("Authorization", `
|
|
1260
|
+
e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`);
|
|
1261
1261
|
try {
|
|
1262
1262
|
const r = await fetch(`${this.url}/sessions`, {
|
|
1263
1263
|
method: "POST",
|
|
@@ -1378,7 +1378,7 @@ class kt {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
1380
|
async sendVerificationCode(e) {
|
|
1381
|
-
const t =
|
|
1381
|
+
const t = _(e);
|
|
1382
1382
|
try {
|
|
1383
1383
|
const r = await fetch(`${this.url}/sendVerificationCode`, {
|
|
1384
1384
|
method: "POST",
|
|
@@ -1419,9 +1419,9 @@ class Ct {
|
|
|
1419
1419
|
} : e;
|
|
1420
1420
|
}
|
|
1421
1421
|
async games(e) {
|
|
1422
|
-
var a, s, c, d, l, f, y, p,
|
|
1422
|
+
var a, s, c, d, l, f, y, p, T, v, M, N, I, g, R, D, k, P, G, x, C, $, U, O;
|
|
1423
1423
|
const t = new URLSearchParams();
|
|
1424
|
-
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), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (d = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && d.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (p = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && p.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (
|
|
1424
|
+
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), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (d = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && d.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (p = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && p.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (N = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && N.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (g = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && g.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (P = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (x = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && x.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), ($ = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.tags) != null && $.in && t.set(
|
|
1425
1425
|
"filter[tags][in]",
|
|
1426
1426
|
e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
|
|
1427
1427
|
), (O = (U = e == null ? void 0 : e.filter) == null ? void 0 : U.tags) != null && O.notIn && t.set(
|
|
@@ -2258,7 +2258,7 @@ class xt {
|
|
|
2258
2258
|
return w(t);
|
|
2259
2259
|
}
|
|
2260
2260
|
platform(e) {
|
|
2261
|
-
var t, r, a, s, c, d, l, f, y, p,
|
|
2261
|
+
var t, r, a, s, c, d, l, f, y, p, T, v, M, N, I, g, R, D, k, P, G, x, C, $, U, O, E, Q, K, J, z, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, me, de, ue, le, pe, fe, he;
|
|
2262
2262
|
return {
|
|
2263
2263
|
paymentSettings: {
|
|
2264
2264
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
@@ -2277,24 +2277,24 @@ class xt {
|
|
|
2277
2277
|
iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
|
|
2278
2278
|
webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
|
|
2279
2279
|
mobileWebEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.mobileWebEnabled) ?? !1,
|
|
2280
|
-
minimumAmount: i((
|
|
2281
|
-
maximumAmount: i((
|
|
2280
|
+
minimumAmount: i((T = e.gcashDepositGatewaySettings) == null ? void 0 : T.minimumAmount),
|
|
2281
|
+
maximumAmount: i((v = e.gcashDepositGatewaySettings) == null ? void 0 : v.maximumAmount)
|
|
2282
2282
|
},
|
|
2283
2283
|
maya: {
|
|
2284
|
-
androidEnabled: ((
|
|
2285
|
-
iosEnabled: ((
|
|
2286
|
-
webEnabled: ((
|
|
2284
|
+
androidEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
|
|
2285
|
+
iosEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.iosEnabled) ?? !1,
|
|
2286
|
+
webEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.webEnabled) ?? !1,
|
|
2287
2287
|
mobileWebEnabled: ((g = e.mayaDepositGatewaySettings) == null ? void 0 : g.mobileWebEnabled) ?? !1,
|
|
2288
|
-
minimumAmount: i((
|
|
2289
|
-
maximumAmount: i((
|
|
2288
|
+
minimumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.minimumAmount),
|
|
2289
|
+
maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
|
|
2290
2290
|
},
|
|
2291
2291
|
mayaApp: {
|
|
2292
2292
|
androidEnabled: ((k = e.mayaAppDepositGatewaySettings) == null ? void 0 : k.androidEnabled) ?? !1,
|
|
2293
|
-
iosEnabled: ((
|
|
2294
|
-
webEnabled: ((
|
|
2295
|
-
mobileWebEnabled: ((
|
|
2293
|
+
iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
|
|
2294
|
+
webEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.webEnabled) ?? !1,
|
|
2295
|
+
mobileWebEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.mobileWebEnabled) ?? !1,
|
|
2296
2296
|
minimumAmount: i((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
|
|
2297
|
-
maximumAmount: i((
|
|
2297
|
+
maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
|
|
2298
2298
|
}
|
|
2299
2299
|
},
|
|
2300
2300
|
withdrawalGateway: {
|
|
@@ -2683,8 +2683,8 @@ class Bt {
|
|
|
2683
2683
|
}), this.logger = new ke({
|
|
2684
2684
|
enabled: c ?? !1
|
|
2685
2685
|
});
|
|
2686
|
-
const l = d ? "https://auth.opexa.io" : "https://auth.development.opexa.io", f = d ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", y = d ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", p = d ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql",
|
|
2687
|
-
url:
|
|
2686
|
+
const l = d ? "https://auth.opexa.io" : "https://auth.development.opexa.io", f = d ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", y = d ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", p = d ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", T = d ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", v = d ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", M = d ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", N = d ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", I = new Ct({
|
|
2687
|
+
url: N,
|
|
2688
2688
|
site: t,
|
|
2689
2689
|
platform: r
|
|
2690
2690
|
}), g = {
|
|
@@ -2695,15 +2695,15 @@ class Bt {
|
|
|
2695
2695
|
"Platform-Code": a
|
|
2696
2696
|
}
|
|
2697
2697
|
}
|
|
2698
|
-
},
|
|
2698
|
+
}, R = new Tt(new W(M, g)), D = new _t(new W(v, g)), k = new It(new W(f, g)), P = new At(new W(p, g)), G = new Mt(new W(y, g)), x = new vt(new W(T, g)), C = new kt({
|
|
2699
2699
|
url: l,
|
|
2700
2700
|
platform: a
|
|
2701
|
-
}),
|
|
2701
|
+
}), $ = new Gt({
|
|
2702
2702
|
logs: c,
|
|
2703
2703
|
authService: C,
|
|
2704
2704
|
walletService: k
|
|
2705
2705
|
});
|
|
2706
|
-
this.authService = C, this.gameService =
|
|
2706
|
+
this.authService = C, this.gameService = R, this.fileService = D, this.walletService = k, this.accountService = P, this.reportService = G, this.portalService = x, this.sessionManager = $, this.cmsPortalService = I;
|
|
2707
2707
|
}
|
|
2708
2708
|
get authMiddleware() {
|
|
2709
2709
|
return async (e) => {
|
|
@@ -2914,7 +2914,7 @@ class Bt {
|
|
|
2914
2914
|
domain: e.domain,
|
|
2915
2915
|
birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
|
|
2916
2916
|
password: await S(e.password),
|
|
2917
|
-
mobileNumber:
|
|
2917
|
+
mobileNumber: _(e.mobileNumber)
|
|
2918
2918
|
},
|
|
2919
2919
|
referralCode: e.referralCode,
|
|
2920
2920
|
verificationCode: e.verificationCode,
|
|
@@ -2955,7 +2955,7 @@ class Bt {
|
|
|
2955
2955
|
password: t.password ? await S(t.password) : void 0,
|
|
2956
2956
|
transactionPassword: t.transactionPassword ? await S(t.transactionPassword) : void 0,
|
|
2957
2957
|
...t.mobileNumber && {
|
|
2958
|
-
mobileNumber:
|
|
2958
|
+
mobileNumber: _(t.mobileNumber)
|
|
2959
2959
|
},
|
|
2960
2960
|
secretAnswer: t.secretAnswer ? await S(t.secretAnswer) : void 0
|
|
2961
2961
|
}
|
|
@@ -3034,7 +3034,7 @@ class Bt {
|
|
|
3034
3034
|
async resetPassword(e) {
|
|
3035
3035
|
return await this.accountService.resetPassword({
|
|
3036
3036
|
input: {
|
|
3037
|
-
mobileNumber:
|
|
3037
|
+
mobileNumber: _(e.mobileNumber),
|
|
3038
3038
|
newPassword: await S(e.newPassword)
|
|
3039
3039
|
},
|
|
3040
3040
|
verificationCode: e.verificationCode
|
|
@@ -3058,7 +3058,7 @@ class Bt {
|
|
|
3058
3058
|
return await this.accountService.sendVerificationCode({
|
|
3059
3059
|
input: {
|
|
3060
3060
|
channel: "SMS",
|
|
3061
|
-
recipient:
|
|
3061
|
+
recipient: _(e)
|
|
3062
3062
|
}
|
|
3063
3063
|
});
|
|
3064
3064
|
}
|
|
@@ -3139,7 +3139,7 @@ class Bt {
|
|
|
3139
3139
|
id: t,
|
|
3140
3140
|
amount: e.amount.toString(),
|
|
3141
3141
|
transactionPassword: await S(e.transactionPassword),
|
|
3142
|
-
recipientMobileNumber:
|
|
3142
|
+
recipientMobileNumber: _(e.recipientMobileNumber)
|
|
3143
3143
|
}
|
|
3144
3144
|
});
|
|
3145
3145
|
if (!r.ok) return r;
|
|
@@ -3150,7 +3150,7 @@ class Bt {
|
|
|
3150
3150
|
id: t,
|
|
3151
3151
|
amount: e.amount.toString(),
|
|
3152
3152
|
transactionPassword: await S(e.transactionPassword),
|
|
3153
|
-
recipientMobileNumber:
|
|
3153
|
+
recipientMobileNumber: _(e.recipientMobileNumber)
|
|
3154
3154
|
}
|
|
3155
3155
|
});
|
|
3156
3156
|
if (!r.ok) return r;
|