@opexa/portal-sdk 0.0.57 → 0.0.59

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.mjs CHANGED
@@ -1439,9 +1439,9 @@ class vt {
1439
1439
  } : e;
1440
1440
  }
1441
1441
  async games(e) {
1442
- var a, s, c, p, l, f, y, u, _, C, T, v, M, N, I, D, R, P, x, G, W, $, U, O;
1442
+ var a, s, c, p, l, f, y, u, b, C, T, v, M, N, I, D, R, P, x, G, W, $, U, O;
1443
1443
  const t = new URLSearchParams();
1444
- 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), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.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(",")), (u = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && u.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (C = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && C.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (N = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && N.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (P = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (G = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.tags) != null && G.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), ($ = (W = e == null ? void 0 : e.filter) == null ? void 0 : W.tags) != null && $.in && t.set(
1444
+ 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), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.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(",")), (u = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && u.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (C = (b = e == null ? void 0 : e.filter) == null ? void 0 : b.provider) != null && C.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (N = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && N.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (P = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (G = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.tags) != null && G.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), ($ = (W = e == null ? void 0 : e.filter) == null ? void 0 : W.tags) != null && $.in && t.set(
1445
1445
  "filter[tags][in]",
1446
1446
  e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
1447
1447
  ), (O = (U = e == null ? void 0 : e.filter) == null ? void 0 : U.tags) != null && O.notIn && t.set(
@@ -1882,7 +1882,7 @@ function xt(o) {
1882
1882
  function Gt(o) {
1883
1883
  return o.reduce((e, t, r) => (e[r] = t, e), {});
1884
1884
  }
1885
- class b {
1885
+ class k {
1886
1886
  constructor(e, t) {
1887
1887
  m(this, "url");
1888
1888
  m(this, "options");
@@ -1964,7 +1964,7 @@ class b {
1964
1964
  }), a;
1965
1965
  }
1966
1966
  }
1967
- function k(o) {
1967
+ function _(o) {
1968
1968
  return o.startsWith("+63") ? o : o.startsWith("63") ? `+${o}` : o.startsWith("0") ? `+63${o.substring(1)}` : `+63${o}`;
1969
1969
  }
1970
1970
  async function w(o) {
@@ -2036,7 +2036,7 @@ class Wt {
2036
2036
  url: e.authUrl,
2037
2037
  platform: e.platform
2038
2038
  }), this.walletService = new ke(
2039
- new b(e.walletUrl, {
2039
+ new k(e.walletUrl, {
2040
2040
  middlewares: [
2041
2041
  (t) => (t.headers.set("Platform", e.platform), t.headers.set("Role", "MEMBER"), t)
2042
2042
  ]
@@ -2308,7 +2308,7 @@ class $t {
2308
2308
  return g(t);
2309
2309
  }
2310
2310
  platform(e) {
2311
- var t, r, a, s, c, p, l, f, y, u, _, C, T, v, M, N, I, D, R, P, x, G, W, $, U, O, E, Q, K, z, J, X, Z, ee, te, re, ae, oe, ne, ie, se, ce, me, de, ue, le, pe, fe, he;
2311
+ var t, r, a, s, c, p, l, f, y, u, b, C, T, v, M, N, I, D, R, P, x, G, W, $, U, O, E, Q, K, z, J, X, Z, ee, te, re, ae, oe, ne, ie, se, ce, me, de, ue, le, pe, fe, he;
2312
2312
  return {
2313
2313
  paymentSettings: {
2314
2314
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
@@ -2327,7 +2327,7 @@ class $t {
2327
2327
  iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
2328
2328
  webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
2329
2329
  mobileWebEnabled: ((u = e.gcashDepositGatewaySettings) == null ? void 0 : u.mobileWebEnabled) ?? !1,
2330
- minimumAmount: i((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
2330
+ minimumAmount: i((b = e.gcashDepositGatewaySettings) == null ? void 0 : b.minimumAmount),
2331
2331
  maximumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.maximumAmount)
2332
2332
  },
2333
2333
  maya: {
@@ -2719,6 +2719,7 @@ class Ft {
2719
2719
  m(this, "sessionManager");
2720
2720
  m(this, "transformer");
2721
2721
  m(this, "logger");
2722
+ var b;
2722
2723
  const t = e.environment === "production";
2723
2724
  this.transformer = new $t(e), this.logger = new _e({
2724
2725
  enabled: e.logs ?? !1
@@ -2737,13 +2738,15 @@ class Ft {
2737
2738
  const u = {
2738
2739
  middlewares: [this.authMiddleware],
2739
2740
  fetchOptions: {
2741
+ ...e.graphql,
2740
2742
  headers: {
2743
+ ...(b = e.graphql) == null ? void 0 : b.headers,
2741
2744
  Role: "MEMBER",
2742
2745
  "Platform-Code": e.platform
2743
2746
  }
2744
2747
  }
2745
2748
  };
2746
- this.gameService = new Nt(new b(f, u)), this.fileService = new Mt(new b(l, u)), this.walletService = new ke(new b(a, u)), this.accountService = new Ct(new b(c, u)), this.reportService = new Dt(new b(s, u)), this.portalService = new It(new b(p, u));
2749
+ this.gameService = new Nt(new k(f, u)), this.fileService = new Mt(new k(l, u)), this.walletService = new ke(new k(a, u)), this.accountService = new Ct(new k(c, u)), this.reportService = new Dt(new k(s, u)), this.portalService = new It(new k(p, u));
2747
2750
  }
2748
2751
  get authMiddleware() {
2749
2752
  return async (e) => {
@@ -2946,13 +2949,14 @@ class Ft {
2946
2949
  const t = e.id ?? A.generate(S.Account).toString(), r = await this.accountService.registerMemberAccount({
2947
2950
  input: {
2948
2951
  id: t,
2952
+ btag: e.btag,
2949
2953
  name: e.name,
2954
+ domain: e.domain,
2950
2955
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
2951
2956
  password: await w(e.password),
2952
- mobileNumber: k(e.mobileNumber),
2953
- domain: e.domain,
2954
- btag: e.referralCode
2957
+ mobileNumber: _(e.mobileNumber)
2955
2958
  },
2959
+ referralCode: e.referralCode,
2956
2960
  verificationCode: e.verificationCode,
2957
2961
  reCAPTCHAResponse: e.reCAPTCHAResponse
2958
2962
  });
@@ -2991,7 +2995,7 @@ class Ft {
2991
2995
  password: t.password ? await w(t.password) : void 0,
2992
2996
  transactionPassword: t.transactionPassword ? await w(t.transactionPassword) : void 0,
2993
2997
  ...t.mobileNumber && {
2994
- mobileNumber: k(t.mobileNumber)
2998
+ mobileNumber: _(t.mobileNumber)
2995
2999
  },
2996
3000
  secretAnswer: t.secretAnswer ? await w(t.secretAnswer) : void 0
2997
3001
  }
@@ -3070,7 +3074,7 @@ class Ft {
3070
3074
  async resetPassword(e) {
3071
3075
  return await this.accountService.resetPassword({
3072
3076
  input: {
3073
- mobileNumber: k(e.mobileNumber),
3077
+ mobileNumber: _(e.mobileNumber),
3074
3078
  newPassword: await w(e.newPassword)
3075
3079
  },
3076
3080
  verificationCode: e.verificationCode
@@ -3094,7 +3098,7 @@ class Ft {
3094
3098
  return await this.accountService.sendVerificationCode({
3095
3099
  input: {
3096
3100
  channel: "SMS",
3097
- recipient: k(e)
3101
+ recipient: _(e)
3098
3102
  }
3099
3103
  });
3100
3104
  }
@@ -3175,7 +3179,7 @@ class Ft {
3175
3179
  id: t,
3176
3180
  amount: e.amount.toString(),
3177
3181
  transactionPassword: await w(e.transactionPassword),
3178
- recipientMobileNumber: k(e.recipientMobileNumber)
3182
+ recipientMobileNumber: _(e.recipientMobileNumber)
3179
3183
  }
3180
3184
  });
3181
3185
  if (!r.ok) return r;
@@ -3186,7 +3190,7 @@ class Ft {
3186
3190
  id: t,
3187
3191
  amount: e.amount.toString(),
3188
3192
  transactionPassword: await w(e.transactionPassword),
3189
- recipientMobileNumber: k(e.recipientMobileNumber)
3193
+ recipientMobileNumber: _(e.recipientMobileNumber)
3190
3194
  }
3191
3195
  });
3192
3196
  if (!r.ok) return r;