@opexa/portal-sdk 0.0.74 → 0.0.76

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
@@ -1,9 +1,9 @@
1
- var _e = Object.defineProperty;
2
- var Te = (n, e, t) => e in n ? _e(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var m = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { ObjectId as b } from "@opexa/object-id";
5
- import { ObjectId as Yt } from "@opexa/object-id";
6
- const A = {
1
+ var ke = Object.defineProperty;
2
+ var Te = (o, e, t) => e in o ? ke(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var d = (o, e, t) => Te(o, typeof e != "symbol" ? e + "" : e, t);
4
+ import { ObjectId as k } from "@opexa/object-id";
5
+ import { ObjectId as Lt } from "@opexa/object-id";
6
+ const T = {
7
7
  Account: 8,
8
8
  Deposit: 9,
9
9
  Withdrawal: 14,
@@ -13,22 +13,22 @@ const A = {
13
13
  GameSession: 204,
14
14
  MayaSession: 230
15
15
  };
16
- function o(n, ...e) {
16
+ function i(o, ...e) {
17
17
  let t = "";
18
- for (const [r, a] of n.entries()) {
18
+ for (const [r, a] of o.entries()) {
19
19
  const s = e.at(r) ?? "";
20
20
  t = `${t}${a}${s}`;
21
21
  }
22
22
  return t.trim();
23
23
  }
24
- const L = o`
24
+ const L = i`
25
25
  fragment FileFragment on File {
26
26
  id
27
27
  url
28
28
  status
29
29
  dateTimeCreated
30
30
  }
31
- `, ve = o`
31
+ `, _e = i`
32
32
  ${L}
33
33
 
34
34
  query File($id: ObjectId!) {
@@ -38,7 +38,7 @@ const L = o`
38
38
  }
39
39
  }
40
40
  }
41
- `, Me = o`
41
+ `, ve = i`
42
42
  mutation UploadPrivateImageFile($input: UploadFileInput!) {
43
43
  uploadPrivateImageFile(input: $input) {
44
44
  ... on FileFormatNotSupportedError {
@@ -52,7 +52,7 @@ const L = o`
52
52
  }
53
53
  }
54
54
  }
55
- `, Ne = o`
55
+ `, Me = i`
56
56
  query Wallet {
57
57
  wallet {
58
58
  id
@@ -62,7 +62,7 @@ const L = o`
62
62
  dateTimeLastUpdated
63
63
  }
64
64
  }
65
- `, Ie = o`
65
+ `, Re = i`
66
66
  query PointsWallet {
67
67
  pointsWallet {
68
68
  id
@@ -71,7 +71,7 @@ const L = o`
71
71
  dateTimeCreated
72
72
  }
73
73
  }
74
- `, Re = o`
74
+ `, Ne = i`
75
75
  mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
76
76
  pointsToCashConversion(input: $input) {
77
77
  ... on InsufficientPointsError {
@@ -79,7 +79,7 @@ const L = o`
79
79
  }
80
80
  }
81
81
  }
82
- `, De = o`
82
+ `, Ie = i`
83
83
  query PointsWalletTransactions(
84
84
  $first: Int
85
85
  $after: Cursor
@@ -107,51 +107,38 @@ const L = o`
107
107
  }
108
108
  }
109
109
  }
110
- `, ge = o`
111
- query Games($first: Int, $after: Cursor, $filter: GameFilterInput) {
112
- games(first: $first, after: $after, filter: $filter) {
113
- edges {
114
- cursor
115
- node {
116
- ... on Game {
117
- id
118
- type
119
- name
120
- provider
121
- }
110
+ `, ge = {
111
+ current: i`
112
+ query GameSession($id: ObjectId!) {
113
+ node(id: $id) {
114
+ ... on GameSession {
115
+ id
116
+ game
117
+ status
118
+ launchUrl
119
+ dateTimeCreated
120
+ dateTimeLastUpdated
122
121
  }
123
122
  }
124
- totalCount
125
- pageInfo {
126
- hasNextPage
127
- endCursor
128
- }
129
123
  }
130
- }
131
- `, Se = o`
132
- query GamesByName($first: Int, $search: String!, $filter: GameFilterInput) {
133
- gamesByName(first: $first, search: $search, filter: $filter) {
134
- ... on Game {
135
- id
136
- type
137
- name
138
- provider
139
- }
140
- }
141
- }
142
- `, be = o`
143
- query GameSession($id: ObjectId!) {
144
- node(id: $id) {
145
- ... on GameSession {
146
- id
147
- status
148
- launchUrl
149
- dateTimeCreated
150
- dateTimeLastUpdated
124
+ `,
125
+ legacy: i`
126
+ query GameSession($id: ObjectId!) {
127
+ node(id: $id) {
128
+ ... on GameSession {
129
+ id
130
+ game {
131
+ id
132
+ }
133
+ status
134
+ launchUrl
135
+ dateTimeCreated
136
+ dateTimeLastUpdated
137
+ }
151
138
  }
152
139
  }
153
- }
154
- `, Ae = o`
140
+ `
141
+ }, be = i`
155
142
  mutation CreateGameSession($input: CreateGameSessionInput!) {
156
143
  createGameSession(input: $input) {
157
144
  ... on GameDoesNotExistError {
@@ -159,25 +146,28 @@ const L = o`
159
146
  }
160
147
  }
161
148
  }
162
- `, Pe = o`
163
- mutation EndGameSession($input: EndGameSessionInput!) {
164
- endGameSession(input: $input)
165
- }
166
- `, xe = o`
167
- mutation EndGameSession($input: EndGameSessionInput!) {
168
- endGameSession(input: $input) {
169
- ... on GameSessionDoesNotExistError {
170
- __typename
171
- }
172
- ... on GameSessionAlreadyClosedError {
173
- __typename
174
- }
175
- ... on GameProviderError {
176
- __typename
149
+ `, Ae = {
150
+ current: i`
151
+ mutation EndGameSession($input: EndGameSessionInput!) {
152
+ endGameSession(input: $input)
153
+ }
154
+ `,
155
+ legacy: i`
156
+ mutation EndGameSession($input: EndGameSessionInput!) {
157
+ endGameSession(input: $input) {
158
+ ... on GameSessionDoesNotExistError {
159
+ __typename
160
+ }
161
+ ... on GameSessionAlreadyClosedError {
162
+ __typename
163
+ }
164
+ ... on GameProviderError {
165
+ __typename
166
+ }
177
167
  }
178
168
  }
179
- }
180
- `, Ge = o`
169
+ `
170
+ }, De = i`
181
171
  query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
182
172
  announcements(first: $first, after: $after, filter: $filter) {
183
173
  edges {
@@ -203,7 +193,7 @@ const L = o`
203
193
  }
204
194
  }
205
195
  }
206
- `, $e = o`
196
+ `, Pe = i`
207
197
  query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
208
198
  member {
209
199
  withdrawalRecords(first: $first, after: $after, filter: $filter) {
@@ -270,7 +260,7 @@ const L = o`
270
260
  }
271
261
  }
272
262
  }
273
- `, Ue = o`
263
+ `, $e = i`
274
264
  mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
275
265
  createGCashWithdrawal(input: $input) {
276
266
  ... on AccountNotVerifiedError {
@@ -293,7 +283,7 @@ const L = o`
293
283
  }
294
284
  }
295
285
  }
296
- `, Oe = o`
286
+ `, xe = i`
297
287
  mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
298
288
  createMayaWithdrawal(input: $input) {
299
289
  ... on AccountNotVerifiedError {
@@ -316,7 +306,7 @@ const L = o`
316
306
  }
317
307
  }
318
308
  }
319
- `, We = o`
309
+ `, Ge = i`
320
310
  mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
321
311
  createMayaAppWithdrawal(input: $input) {
322
312
  ... on AccountNotVerifiedError {
@@ -336,7 +326,7 @@ const L = o`
336
326
  }
337
327
  }
338
328
  }
339
- `, Be = o`
329
+ `, Ue = i`
340
330
  mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
341
331
  createBankWithdrawal(input: $input) {
342
332
  ... on MobileNumberNotVerifiedError {
@@ -359,11 +349,11 @@ const L = o`
359
349
  }
360
350
  }
361
351
  }
362
- `, qe = o`
352
+ `, Oe = i`
363
353
  query RemainingDailyWithdrawalsCount {
364
354
  remainingDailyWithdrawalsCount
365
355
  }
366
- `, Fe = o`
356
+ `, We = i`
367
357
  query DepositRecords($after: Cursor, $first: Int, $filter: DepositRecordFilterInput) {
368
358
  member {
369
359
  depositRecords(after: $after, first: $first, filter: $filter) {
@@ -392,7 +382,7 @@ const L = o`
392
382
  }
393
383
  }
394
384
  }
395
- `, Le = o`
385
+ `, qe = i`
396
386
  mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
397
387
  createGCashDeposit(input: $input) {
398
388
  ... on DepositPromoMaximumAmountExceededError {
@@ -421,7 +411,7 @@ const L = o`
421
411
  }
422
412
  }
423
413
  }
424
- `, Ve = o`
414
+ `, Be = i`
425
415
  mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
426
416
  createMayaDeposit(input: $input) {
427
417
  ... on DepositPromoMaximumAmountExceededError {
@@ -450,7 +440,7 @@ const L = o`
450
440
  }
451
441
  }
452
442
  }
453
- `, He = o`
443
+ `, Fe = i`
454
444
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
455
445
  createMayaAppDeposit(input: $input) {
456
446
  ... on DepositPromoMaximumAmountExceededError {
@@ -479,7 +469,7 @@ const L = o`
479
469
  }
480
470
  }
481
471
  }
482
- `, Ye = o`
472
+ `, Le = i`
483
473
  query Deposit($id: ObjectId!) {
484
474
  node(id: $id) {
485
475
  ... on GCashDeposit {
@@ -511,13 +501,13 @@ const L = o`
511
501
  }
512
502
  }
513
503
  }
514
- `, je = o`
504
+ `, Ve = i`
515
505
  query DepositsCount {
516
506
  member {
517
507
  depositsCount
518
508
  }
519
509
  }
520
- `, Qe = o`
510
+ `, He = i`
521
511
  query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
522
512
  member {
523
513
  betRecords(first: $first, after: $after, filter: $filter) {
@@ -558,7 +548,7 @@ const L = o`
558
548
  }
559
549
  }
560
550
  }
561
- `, Ke = o`
551
+ `, Ye = i`
562
552
  query LatestBetRecords {
563
553
  latestBetRecords {
564
554
  id
@@ -578,7 +568,7 @@ const L = o`
578
568
  dateTimeCreated
579
569
  }
580
570
  }
581
- `, Je = o`
571
+ `, je = i`
582
572
  query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
583
573
  member {
584
574
  transactionRecords(first: $first, after: $after, filter: $filter) {
@@ -604,7 +594,7 @@ const L = o`
604
594
  }
605
595
  }
606
596
  }
607
- `, Y = o`
597
+ `, Y = i`
608
598
  ${L}
609
599
 
610
600
  fragment PromoFragment on Promo {
@@ -623,7 +613,7 @@ const L = o`
623
613
  dateTimeCreated
624
614
  dateTimeLastUpdated
625
615
  }
626
- `, ze = o`
616
+ `, Qe = i`
627
617
  ${Y}
628
618
 
629
619
  query Promos {
@@ -631,7 +621,7 @@ const L = o`
631
621
  ...PromoFragment
632
622
  }
633
623
  }
634
- `, Xe = o`
624
+ `, Ke = i`
635
625
  ${Y}
636
626
 
637
627
  query AvailablePromos($filter: PromoFilterInput) {
@@ -639,7 +629,7 @@ const L = o`
639
629
  ...PromoFragment
640
630
  }
641
631
  }
642
- `, Ee = o`
632
+ `, Ce = i`
643
633
  ${L}
644
634
 
645
635
  fragment CashbackFragment on Cashback {
@@ -656,15 +646,15 @@ const L = o`
656
646
  dateTimeCreated
657
647
  dateTimeLastUpdated
658
648
  }
659
- `, Ze = o`
660
- ${Ee}
649
+ `, Je = i`
650
+ ${Ce}
661
651
 
662
652
  query Cashbacks {
663
653
  cashbacks {
664
654
  ...CashbackFragment
665
655
  }
666
656
  }
667
- `, et = o`
657
+ `, ze = i`
668
658
  ${Y}
669
659
 
670
660
  query Bonus {
@@ -693,8 +683,8 @@ const L = o`
693
683
  dateTimeLastUpdated
694
684
  }
695
685
  }
696
- `, tt = o`
697
- ${Ee}
686
+ `, Xe = i`
687
+ ${Ce}
698
688
 
699
689
  query CashbackBonuses {
700
690
  cashbackBonuses {
@@ -707,7 +697,7 @@ const L = o`
707
697
  dateTimeLastUpdated
708
698
  }
709
699
  }
710
- `, rt = o`
700
+ `, Ze = i`
711
701
  mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
712
702
  claimCashbackBonus(input: $input) {
713
703
  ... on CashbackBonusDoesNotExistError {
@@ -715,13 +705,15 @@ const L = o`
715
705
  }
716
706
  }
717
707
  }
718
- `, at = o`
708
+ `;
709
+ i`
719
710
  query Member {
720
711
  member {
721
712
  dateTimeLastActive
722
713
  }
723
714
  }
724
- `, nt = o`
715
+ `;
716
+ const et = i`
725
717
  query MemberAccount {
726
718
  memberAccount: self {
727
719
  ... on MemberAccount {
@@ -745,7 +737,7 @@ const L = o`
745
737
  }
746
738
  }
747
739
  }
748
- `, ot = o`
740
+ `, tt = i`
749
741
  ${L}
750
742
 
751
743
  query MemberVerification {
@@ -770,7 +762,7 @@ const L = o`
770
762
  }
771
763
  }
772
764
  }
773
- `, it = o`
765
+ `, rt = i`
774
766
  mutation RegisterMemberAccount(
775
767
  $input: RegisterMemberAccountInput!
776
768
  $referralCode: String
@@ -806,7 +798,7 @@ const L = o`
806
798
  }
807
799
  }
808
800
  }
809
- `, st = o`
801
+ `, at = i`
810
802
  mutation RegisterMemberAccountViaMobile(
811
803
  $input: RegisterMemberAccountViaMobileInput!
812
804
  $referralCode: String
@@ -833,7 +825,7 @@ const L = o`
833
825
  }
834
826
  }
835
827
  }
836
- `, ct = o`
828
+ `, ot = i`
837
829
  mutation RegisterMemberAccount(
838
830
  $input: RegisterMemberAccountInput_next!
839
831
  $reCAPTCHAResponse: String
@@ -865,7 +857,7 @@ const L = o`
865
857
  }
866
858
  }
867
859
  }
868
- `, mt = o`
860
+ `, nt = i`
869
861
  mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {
870
862
  registerMayaMemberAccount(input: $input) {
871
863
  ... on AccountNameNotAvailableError {
@@ -873,7 +865,7 @@ const L = o`
873
865
  }
874
866
  }
875
867
  }
876
- `, dt = o`
868
+ `, it = i`
877
869
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
878
870
  updateMemberAccount(input: $input) {
879
871
  ... on AccountNameNotAvailableError {
@@ -899,7 +891,7 @@ const L = o`
899
891
  }
900
892
  }
901
893
  }
902
- `, ut = o`
894
+ `, st = i`
903
895
  mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
904
896
  resetPassword(input: $input, verificationCode: $verificationCode) {
905
897
  ... on AccountNotFoundError {
@@ -910,11 +902,11 @@ const L = o`
910
902
  }
911
903
  }
912
904
  }
913
- `, lt = o`
905
+ `, ct = i`
914
906
  mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
915
907
  deleteMemberAccount(input: $input)
916
908
  }
917
- `, pt = o`
909
+ `, dt = i`
918
910
  mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
919
911
  verifyMobileNumber(input: $input) {
920
912
  ... on InvalidSMSVerificationCodeError {
@@ -925,7 +917,7 @@ const L = o`
925
917
  }
926
918
  }
927
919
  }
928
- `, ft = o`
920
+ `, mt = i`
929
921
  mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
930
922
  createMemberVerification(input: $input) {
931
923
  ... on FileDoesNotExistError {
@@ -939,7 +931,7 @@ const L = o`
939
931
  }
940
932
  }
941
933
  }
942
- `, ht = o`
934
+ `, ut = i`
943
935
  mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
944
936
  updateMemberVerification(input: $input) {
945
937
  ... on FileDoesNotExistError {
@@ -956,7 +948,7 @@ const L = o`
956
948
  }
957
949
  }
958
950
  }
959
- `, yt = o`
951
+ `, lt = i`
960
952
  query ProfileCompletion {
961
953
  profileCompletion {
962
954
  completionPercentage
@@ -967,7 +959,7 @@ const L = o`
967
959
  accountPassword
968
960
  }
969
961
  }
970
- `, wt = o`
962
+ `, pt = i`
971
963
  mutation SendVerificationCode($input: SendVerificationCodeInput!) {
972
964
  sendVerificationCode(input: $input) {
973
965
  ... on InvalidPlatformError {
@@ -978,7 +970,7 @@ const L = o`
978
970
  }
979
971
  }
980
972
  }
981
- `, gt = o`
973
+ `, ft = i`
982
974
  fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
983
975
  minimumAmount
984
976
  maximumAmount
@@ -1032,7 +1024,7 @@ const L = o`
1032
1024
  multiplier
1033
1025
  }
1034
1026
  }
1035
- `, St = o`
1027
+ `, ht = i`
1036
1028
  query MayaSession($id: ObjectId!) {
1037
1029
  mayaSession(id: $id) {
1038
1030
  id
@@ -1040,11 +1032,11 @@ const L = o`
1040
1032
  dateTimeCreated
1041
1033
  }
1042
1034
  }
1043
- `, bt = o`
1035
+ `, wt = i`
1044
1036
  mutation ValidateMayaSession {
1045
1037
  validateMayaSession: validMayaSession
1046
1038
  }
1047
- `, At = o`
1039
+ `, yt = i`
1048
1040
  query ActivityRecords($after: Cursor, $first: Int, $filter: ActivityRecordsFilterInput) {
1049
1041
  member {
1050
1042
  activityRecords(after: $after, first: $first, filter: $filter) {
@@ -1069,11 +1061,11 @@ const L = o`
1069
1061
  }
1070
1062
  }
1071
1063
  }
1072
- `, Et = o`
1064
+ `, gt = i`
1073
1065
  query ReferralCode {
1074
1066
  referralCode
1075
1067
  }
1076
- `, kt = o`
1068
+ `, bt = i`
1077
1069
  mutation UpdateReferralCode($input: UpdateReferralCodeInput!) {
1078
1070
  updateReferralCode(input: $input) {
1079
1071
  ... on ReferralCodeNotAvailableError {
@@ -1081,7 +1073,7 @@ const L = o`
1081
1073
  }
1082
1074
  }
1083
1075
  }
1084
- `, Ct = o`
1076
+ `, At = i`
1085
1077
  query Referrals($first: Int, $after: Cursor, $filter: ReferralFilterInput) {
1086
1078
  member {
1087
1079
  referrals(first: $first, after: $after, filter: $filter) {
@@ -1115,10 +1107,41 @@ const L = o`
1115
1107
  }
1116
1108
  }
1117
1109
  }
1110
+ `, Ct = i`
1111
+ query ReferralCommissions($after: Cursor, $first: Int, $filter: ReferralCommissionFilterInput) {
1112
+ member {
1113
+ referralCommissions(after: $after, first: $first, filter: $filter) {
1114
+ edges {
1115
+ cursor
1116
+ node {
1117
+ ... on ReferralCommission {
1118
+ id
1119
+ commission
1120
+ dateTimeCreated
1121
+ dateTimeLastUpdated
1122
+ level1Commission
1123
+ level1ReferralsCount
1124
+ level2Commission
1125
+ level2ReferralsCount
1126
+ level3Commission
1127
+ level3ReferralsCount
1128
+ referralCode
1129
+ referralsCount
1130
+ }
1131
+ }
1132
+ }
1133
+ totalCount
1134
+ pageInfo {
1135
+ endCursor
1136
+ hasNextPage
1137
+ }
1138
+ }
1139
+ }
1140
+ }
1118
1141
  `;
1119
- function d(n) {
1142
+ function m(o) {
1120
1143
  return {
1121
- name: n,
1144
+ name: o,
1122
1145
  message: {
1123
1146
  AccountNameNotAvailableError: "Username is no longer available",
1124
1147
  AccountNotFoundError: "Account does not exist",
@@ -1168,60 +1191,60 @@ function d(n) {
1168
1191
  InvalidToken: "Invalid token",
1169
1192
  InvalidTokenOrSecretAnswer: "Invalid token or secret answer",
1170
1193
  SessionExpired: "Session expired"
1171
- }[n]
1194
+ }[o]
1172
1195
  };
1173
1196
  }
1174
- class _t {
1197
+ class Et {
1175
1198
  constructor(e) {
1176
- m(this, "client");
1199
+ d(this, "client");
1177
1200
  this.client = e;
1178
1201
  }
1179
1202
  /** aka `Query.self` */
1180
1203
  async memberAccount() {
1181
- const e = await this.client.request(nt);
1204
+ const e = await this.client.request(et);
1182
1205
  return e.ok ? {
1183
1206
  ok: !0,
1184
1207
  data: e.data.memberAccount
1185
1208
  } : e;
1186
1209
  }
1187
1210
  async registerMemberAccount(e) {
1188
- const t = await this.client.request(it, e);
1211
+ const t = await this.client.request(rt, e);
1189
1212
  return t.ok ? t.data.registerMemberAccount ? {
1190
1213
  ok: !1,
1191
- error: d(t.data.registerMemberAccount.__typename)
1214
+ error: m(t.data.registerMemberAccount.__typename)
1192
1215
  } : {
1193
1216
  ok: !0
1194
1217
  } : t;
1195
1218
  }
1196
1219
  async registerMemberAccountViaMobile(e) {
1197
- const t = await this.client.request(st, e);
1220
+ const t = await this.client.request(at, e);
1198
1221
  return t.ok ? t.data.registerMemberAccountViaMobile ? {
1199
1222
  ok: !1,
1200
- error: d(t.data.registerMemberAccountViaMobile.__typename)
1223
+ error: m(t.data.registerMemberAccountViaMobile.__typename)
1201
1224
  } : {
1202
1225
  ok: !0
1203
1226
  } : t;
1204
1227
  }
1205
1228
  async registerMemberAccount__next(e) {
1206
- const t = await this.client.request(ct, e);
1229
+ const t = await this.client.request(ot, e);
1207
1230
  return t.ok ? t.data.registerMemberAccount ? {
1208
1231
  ok: !1,
1209
- error: d(t.data.registerMemberAccount.__typename)
1232
+ error: m(t.data.registerMemberAccount.__typename)
1210
1233
  } : {
1211
1234
  ok: !0
1212
1235
  } : t;
1213
1236
  }
1214
1237
  async updateMemberAccount(e) {
1215
- const t = await this.client.request(dt, e);
1238
+ const t = await this.client.request(it, e);
1216
1239
  return t.ok ? t.data.updateMemberAccount ? {
1217
1240
  ok: !1,
1218
- error: d(t.data.updateMemberAccount.__typename)
1241
+ error: m(t.data.updateMemberAccount.__typename)
1219
1242
  } : {
1220
1243
  ok: !0
1221
1244
  } : t;
1222
1245
  }
1223
1246
  async deleteMemberAccount(e) {
1224
- const t = await this.client.request(lt, e);
1247
+ const t = await this.client.request(ct, e);
1225
1248
  return t.ok ? t.data.deleteMemberAccount ? {
1226
1249
  ok: !0
1227
1250
  } : {
@@ -1234,61 +1257,61 @@ class _t {
1234
1257
  }
1235
1258
  async resetPassword(e) {
1236
1259
  const t = await this.client.request(
1237
- ut,
1260
+ st,
1238
1261
  e
1239
1262
  );
1240
1263
  return t.ok ? t.data.resetPassword ? {
1241
1264
  ok: !1,
1242
- error: d(t.data.resetPassword.__typename)
1265
+ error: m(t.data.resetPassword.__typename)
1243
1266
  } : {
1244
1267
  ok: !0
1245
1268
  } : t;
1246
1269
  }
1247
1270
  async profileCompletion() {
1248
- const e = await this.client.request(yt);
1271
+ const e = await this.client.request(lt);
1249
1272
  return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
1250
1273
  }
1251
1274
  async platform() {
1252
- return await this.client.request(gt);
1275
+ return await this.client.request(ft);
1253
1276
  }
1254
1277
  async sendVerificationCode(e) {
1255
- const t = await this.client.request(wt, e);
1278
+ const t = await this.client.request(pt, e);
1256
1279
  return t.ok ? t.data.sendVerificationCode ? {
1257
1280
  ok: !1,
1258
- error: d(t.data.sendVerificationCode.__typename)
1281
+ error: m(t.data.sendVerificationCode.__typename)
1259
1282
  } : {
1260
1283
  ok: !0
1261
1284
  } : t;
1262
1285
  }
1263
1286
  async verifyMobileNumber(e) {
1264
- const t = await this.client.request(pt, e);
1287
+ const t = await this.client.request(dt, e);
1265
1288
  return t.ok ? t.data.verifyMobileNumber ? {
1266
1289
  ok: !1,
1267
- error: d(t.data.verifyMobileNumber.__typename)
1290
+ error: m(t.data.verifyMobileNumber.__typename)
1268
1291
  } : {
1269
1292
  ok: !0
1270
1293
  } : t;
1271
1294
  }
1272
1295
  async createMemberVerification(e) {
1273
- const t = await this.client.request(ft, e);
1296
+ const t = await this.client.request(mt, e);
1274
1297
  return t.ok ? t.data.createMemberVerification ? {
1275
1298
  ok: !1,
1276
- error: d(t.data.createMemberVerification.__typename)
1299
+ error: m(t.data.createMemberVerification.__typename)
1277
1300
  } : {
1278
1301
  ok: !0
1279
1302
  } : t;
1280
1303
  }
1281
1304
  async updateMemberVerification(e) {
1282
- const t = await this.client.request(ht, e);
1305
+ const t = await this.client.request(ut, e);
1283
1306
  return t.ok ? t.data.updateMemberVerification ? {
1284
1307
  ok: !1,
1285
- error: d(t.data.updateMemberVerification.__typename)
1308
+ error: m(t.data.updateMemberVerification.__typename)
1286
1309
  } : {
1287
1310
  ok: !0
1288
1311
  } : t;
1289
1312
  }
1290
1313
  async memberVerification() {
1291
- const e = await this.client.request(ot);
1314
+ const e = await this.client.request(tt);
1292
1315
  return e.ok ? {
1293
1316
  ok: !0,
1294
1317
  data: e.data.memberAccount.verification
@@ -1296,7 +1319,7 @@ class _t {
1296
1319
  }
1297
1320
  async announcements(e) {
1298
1321
  const t = await this.client.request(
1299
- Ge,
1322
+ De,
1300
1323
  e
1301
1324
  );
1302
1325
  return t.ok ? {
@@ -1305,36 +1328,36 @@ class _t {
1305
1328
  } : t;
1306
1329
  }
1307
1330
  async registerMayaMemberAccount(e) {
1308
- const t = await this.client.request(mt, e);
1331
+ const t = await this.client.request(nt, e);
1309
1332
  return t.ok ? t.data.registerMayaMemberAccount ? {
1310
1333
  ok: !1,
1311
- error: d(t.data.registerMayaMemberAccount.__typename)
1334
+ error: m(t.data.registerMayaMemberAccount.__typename)
1312
1335
  } : {
1313
1336
  ok: !0
1314
1337
  } : t;
1315
1338
  }
1316
1339
  async referralCode() {
1317
- const e = await this.client.request(Et);
1340
+ const e = await this.client.request(gt);
1318
1341
  return e.ok ? {
1319
1342
  ok: !0,
1320
1343
  data: e.data.referralCode
1321
1344
  } : e;
1322
1345
  }
1323
1346
  async updateReferralCode(e) {
1324
- const t = await this.client.request(kt, e);
1347
+ const t = await this.client.request(bt, e);
1325
1348
  return t.ok ? t.data.updateReferralCode ? {
1326
1349
  ok: !1,
1327
- error: d(t.data.updateReferralCode.__typename)
1350
+ error: m(t.data.updateReferralCode.__typename)
1328
1351
  } : {
1329
1352
  ok: !0
1330
1353
  } : t;
1331
1354
  }
1332
1355
  }
1333
- function E(n) {
1334
- return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
1356
+ function A(o) {
1357
+ return o.startsWith("+63") ? o : o.startsWith("63") ? `+${o}` : o.startsWith("0") ? `+63${o.substring(1)}` : `+63${o}`;
1335
1358
  }
1336
- function h(n, e) {
1337
- const t = V[n] ? V[n] : V[500];
1359
+ function h(o, e) {
1360
+ const t = V[o] ? V[o] : V[500];
1338
1361
  return {
1339
1362
  name: t.name,
1340
1363
  message: e ?? t.message
@@ -1349,10 +1372,10 @@ const V = {
1349
1372
  429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1350
1373
  500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1351
1374
  };
1352
- class Tt {
1375
+ class St {
1353
1376
  constructor(e) {
1354
- m(this, "url");
1355
- m(this, "platform");
1377
+ d(this, "url");
1378
+ d(this, "platform");
1356
1379
  this.url = e.url, this.platform = e.platform;
1357
1380
  }
1358
1381
  get headers() {
@@ -1366,7 +1389,7 @@ class Tt {
1366
1389
  t.set("Authorization", `Basic ${a}`);
1367
1390
  }
1368
1391
  if (e.mobileNumber) {
1369
- const a = `${E(e.mobileNumber)}:${e.verificationCode}`, s = Buffer.from(a).toString("base64");
1392
+ const a = `${A(e.mobileNumber)}:${e.verificationCode}`, s = Buffer.from(a).toString("base64");
1370
1393
  console.log(`MobileNumberOTP ${s}`), t.set("Authorization", `MobileNumberOTP ${s}`);
1371
1394
  }
1372
1395
  e.sessionId && t.set("Authorization", `MayaSession ${e.sessionId}`);
@@ -1380,7 +1403,7 @@ class Tt {
1380
1403
  data: a
1381
1404
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1382
1405
  ok: !1,
1383
- error: d("AccountBlacklisted")
1406
+ error: m("AccountBlacklisted")
1384
1407
  } : {
1385
1408
  ok: !1,
1386
1409
  error: h(r.status)
@@ -1409,7 +1432,7 @@ class Tt {
1409
1432
  data: a
1410
1433
  } : r.status === 401 || r.status === 403 ? {
1411
1434
  ok: !1,
1412
- error: d("InvalidTokenOrSecretAnswer")
1435
+ error: m("InvalidTokenOrSecretAnswer")
1413
1436
  } : {
1414
1437
  ok: !1,
1415
1438
  error: h(r.status)
@@ -1436,10 +1459,10 @@ class Tt {
1436
1459
  data: a
1437
1460
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1438
1461
  ok: !1,
1439
- error: d("AccountBlacklisted")
1462
+ error: m("AccountBlacklisted")
1440
1463
  } : r.status === 403 || r.status === 401 ? {
1441
1464
  ok: !1,
1442
- error: d("InvalidToken")
1465
+ error: m("InvalidToken")
1443
1466
  } : {
1444
1467
  ok: !1,
1445
1468
  error: h(r.status)
@@ -1477,26 +1500,23 @@ class Tt {
1477
1500
  }
1478
1501
  }
1479
1502
  async sendVerificationCode(e) {
1480
- const t = E(e);
1503
+ if (e.channel === "EMAIL") throw new Error("Email channel is not yet supported");
1481
1504
  try {
1482
- const r = await fetch(`${this.url}/otps`, {
1505
+ const t = await fetch(`${this.url}/otps`, {
1483
1506
  method: "POST",
1484
1507
  headers: this.headers,
1485
- body: JSON.stringify({
1486
- channel: "SMS",
1487
- recipient: t
1488
- })
1508
+ body: JSON.stringify(e)
1489
1509
  });
1490
- if (r.status === 403) {
1491
- const a = await r.json();
1510
+ if (t.status === 403) {
1511
+ const r = await t.json();
1492
1512
  return {
1493
1513
  ok: !1,
1494
- error: h(r.status, a.message)
1514
+ error: h(t.status, r.message)
1495
1515
  };
1496
1516
  }
1497
- return r.ok ? { ok: !0 } : {
1517
+ return t.ok ? { ok: !0 } : {
1498
1518
  ok: !1,
1499
- error: h(r.status)
1519
+ error: h(t.status)
1500
1520
  };
1501
1521
  } catch {
1502
1522
  return {
@@ -1506,11 +1526,11 @@ class Tt {
1506
1526
  }
1507
1527
  }
1508
1528
  }
1509
- class vt {
1529
+ class kt {
1510
1530
  constructor(e) {
1511
- m(this, "url");
1512
- m(this, "siteId");
1513
- m(this, "platformId");
1531
+ d(this, "url");
1532
+ d(this, "siteId");
1533
+ d(this, "platformId");
1514
1534
  this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
1515
1535
  }
1516
1536
  async self() {
@@ -1521,22 +1541,22 @@ class vt {
1521
1541
  } : e;
1522
1542
  }
1523
1543
  async games(e) {
1524
- var a, s, c, u, l, f, y, p, T, v, M, N, I, S, R, D, C, P, x, G, _, $, O, W;
1544
+ var a, s, c, u, l, f, w, p, _, v, M, R, N, b, I, D, E, P, $, x, S, G, O, W;
1525
1545
  const t = new URLSearchParams();
1526
- 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), (u = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && u.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), (S = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && S.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 = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.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()), ($ = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.tags) != null && $.in && t.set(
1546
+ 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), (u = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && u.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 = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && p.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (v = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && v.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (R = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && R.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (b = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && b.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 = (E = e == null ? void 0 : e.filter) == null ? void 0 : E.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (x = ($ = e == null ? void 0 : e.filter) == null ? void 0 : $.tags) != null && x.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (G = (S = e == null ? void 0 : e.filter) == null ? void 0 : S.tags) != null && G.in && t.set(
1527
1547
  "filter[tags][in]",
1528
- e.filter.tags.in.map((k) => k.toLowerCase()).join(",")
1548
+ e.filter.tags.in.map((C) => C.toLowerCase()).join(",")
1529
1549
  ), (W = (O = e == null ? void 0 : e.filter) == null ? void 0 : O.tags) != null && W.notIn && t.set(
1530
1550
  "filter[tags][nin]",
1531
- e.filter.tags.notIn.map((k) => k.toLowerCase()).join(",")
1551
+ e.filter.tags.notIn.map((C) => C.toLowerCase()).join(",")
1532
1552
  );
1533
1553
  const r = await this.getJson("/games", t);
1534
1554
  return r.ok ? {
1535
1555
  ok: !0,
1536
1556
  data: {
1537
- edges: r.data.data.map((k) => ({
1538
- node: k,
1539
- cursor: k.cursor
1557
+ edges: r.data.data.map((C) => ({
1558
+ node: C,
1559
+ cursor: C.cursor
1540
1560
  })),
1541
1561
  totalCount: r.data.totalCount ?? 0,
1542
1562
  pageInfo: {
@@ -1584,145 +1604,138 @@ class vt {
1584
1604
  }
1585
1605
  }
1586
1606
  }
1587
- class Mt {
1607
+ class Tt {
1588
1608
  constructor(e) {
1589
- m(this, "client");
1609
+ d(this, "client");
1590
1610
  this.client = e;
1591
1611
  }
1592
1612
  async file(e) {
1593
- const t = await this.client.request(ve, e);
1613
+ const t = await this.client.request(_e, e);
1594
1614
  return t.ok ? {
1595
1615
  ok: !0,
1596
1616
  data: t.data.node
1597
1617
  } : t;
1598
1618
  }
1599
1619
  async uploadPrivateImageFile(e) {
1600
- const t = await this.client.upload(Me, e);
1620
+ const t = await this.client.upload(ve, e);
1601
1621
  return t.ok ? t.data.uploadPrivateImageFile ? {
1602
1622
  ok: !1,
1603
- error: d(t.data.uploadPrivateImageFile.__typename)
1623
+ error: m(t.data.uploadPrivateImageFile.__typename)
1604
1624
  } : {
1605
1625
  ok: !0
1606
1626
  } : t;
1607
1627
  }
1608
1628
  }
1609
- class Nt {
1629
+ class _t {
1610
1630
  constructor(e) {
1611
- m(this, "client");
1631
+ d(this, "client");
1612
1632
  this.client = e;
1613
1633
  }
1614
- /** @deprecated */
1615
- async games(e) {
1616
- const t = await this.client.request(ge, e);
1617
- return t.ok ? { ok: t.ok, data: t.data.games } : t;
1618
- }
1619
- /** @deprecated */
1620
- async gamesByName(e) {
1621
- const t = await this.client.request(
1622
- Se,
1623
- e
1624
- );
1625
- return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
1626
- }
1627
1634
  async gameSession(e) {
1628
1635
  const t = await this.client.request(
1629
- be,
1636
+ ge.legacy,
1630
1637
  e
1631
1638
  );
1632
- return t.ok ? { ok: !0, data: t.data.node } : t;
1639
+ return t.ok ? {
1640
+ ok: !0,
1641
+ data: t.data.node ? { ...t.data.node, game: t.data.node.game.id } : null
1642
+ } : t;
1633
1643
  }
1634
1644
  async createGameSession(e) {
1635
- const t = await this.client.request(Ae, e);
1645
+ const t = await this.client.request(be, e);
1636
1646
  return t.ok ? t.data.createGameSession ? {
1637
1647
  ok: !1,
1638
- error: d(t.data.createGameSession.__typename)
1648
+ error: m(t.data.createGameSession.__typename)
1639
1649
  } : {
1640
1650
  ok: !0
1641
1651
  } : t;
1642
1652
  }
1643
1653
  async endGameSession(e) {
1644
- const t = await this.client.request(xe, e);
1654
+ const t = await this.client.request(Ae.legacy, e);
1645
1655
  return t.ok ? t.data.endGameSession ? {
1646
1656
  ok: !1,
1647
- error: d(t.data.endGameSession.__typename)
1657
+ error: {
1658
+ name: "UnknownError",
1659
+ message: "Something went wrong."
1660
+ }
1648
1661
  } : {
1649
1662
  ok: !0
1650
1663
  } : t;
1651
1664
  }
1652
1665
  }
1653
- class It {
1666
+ class vt {
1654
1667
  constructor(e) {
1655
- m(this, "client");
1668
+ d(this, "client");
1656
1669
  this.client = e;
1657
1670
  }
1658
1671
  async latestBetRecords() {
1659
- const e = await this.client.request(Ke);
1672
+ const e = await this.client.request(Ye);
1660
1673
  return e.ok ? {
1661
1674
  ok: !0,
1662
1675
  data: e.data.latestBetRecords
1663
1676
  } : e;
1664
1677
  }
1665
1678
  }
1666
- class Rt {
1679
+ class Mt {
1667
1680
  constructor(e) {
1668
- m(this, "client");
1681
+ d(this, "client");
1669
1682
  this.client = e;
1670
1683
  }
1671
1684
  async betRecords(e) {
1672
1685
  const t = await this.client.request(
1673
- Qe,
1686
+ He,
1674
1687
  e
1675
1688
  );
1676
1689
  return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
1677
1690
  }
1678
1691
  async transactionRecords(e) {
1679
- const t = await this.client.request(Je, e);
1692
+ const t = await this.client.request(je, e);
1680
1693
  return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
1681
1694
  }
1682
1695
  async withdrawalRecords(e) {
1683
1696
  const t = await this.client.request(
1684
- $e,
1697
+ Pe,
1685
1698
  e
1686
1699
  );
1687
1700
  return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
1688
1701
  }
1689
1702
  async depositRecords(e) {
1690
1703
  const t = await this.client.request(
1691
- Fe,
1704
+ We,
1692
1705
  e
1693
1706
  );
1694
1707
  return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
1695
1708
  }
1696
1709
  async depositsCount() {
1697
- const e = await this.client.request(je);
1710
+ const e = await this.client.request(Ve);
1698
1711
  return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
1699
1712
  }
1700
- async member() {
1701
- const e = await this.client.request(at);
1702
- return e.ok ? { ok: e.ok, data: e.data.member } : e;
1703
- }
1704
1713
  async pointsWalletTransactions(e) {
1705
- const t = await this.client.request(De, e);
1714
+ const t = await this.client.request(Ie, e);
1706
1715
  return t.ok ? { ok: t.ok, data: t.data.member.pointsWalletTransactions } : t;
1707
1716
  }
1708
1717
  async activityRecords(e) {
1709
1718
  const t = await this.client.request(
1710
- At,
1719
+ yt,
1711
1720
  e
1712
1721
  );
1713
1722
  return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
1714
1723
  }
1715
1724
  async referrals(e) {
1716
1725
  const t = await this.client.request(
1717
- Ct,
1726
+ At,
1718
1727
  e
1719
1728
  );
1720
1729
  return t.ok ? { ok: t.ok, data: t.data.member.referrals } : t;
1721
1730
  }
1731
+ async referralCommissions(e) {
1732
+ const t = await this.client.request(Ct, e);
1733
+ return t.ok ? { ok: t.ok, data: t.data.member.referralCommissions } : t;
1734
+ }
1722
1735
  }
1723
- class Dt {
1736
+ class Rt {
1724
1737
  constructor(e) {
1725
- m(this, "url");
1738
+ d(this, "url");
1726
1739
  this.url = e.url;
1727
1740
  }
1728
1741
  gameThumbnails(e) {
@@ -1732,35 +1745,35 @@ class Dt {
1732
1745
  ];
1733
1746
  }
1734
1747
  }
1735
- class Pt {
1748
+ class Nt {
1736
1749
  constructor(e) {
1737
- m(this, "client");
1750
+ d(this, "client");
1738
1751
  this.client = e;
1739
1752
  }
1740
1753
  async promos() {
1741
- const e = await this.client.request(ze);
1754
+ const e = await this.client.request(Qe);
1742
1755
  return e.ok ? { ok: e.ok, data: e.data.promos } : e;
1743
1756
  }
1744
1757
  async cashbacks() {
1745
- const e = await this.client.request(Ze);
1758
+ const e = await this.client.request(Je);
1746
1759
  return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
1747
1760
  }
1748
1761
  async availablePromos(e) {
1749
1762
  const t = await this.client.request(
1750
- Xe,
1763
+ Ke,
1751
1764
  e
1752
1765
  );
1753
1766
  return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
1754
1767
  }
1755
1768
  async cashbackBonuses() {
1756
- const e = await this.client.request(tt);
1769
+ const e = await this.client.request(Xe);
1757
1770
  return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
1758
1771
  }
1759
1772
  async claimCashbackBonus(e) {
1760
- const t = await this.client.request(rt, e);
1773
+ const t = await this.client.request(Ze, e);
1761
1774
  return t.ok ? t.data.claimCashbackBonus ? {
1762
1775
  ok: !1,
1763
- error: d(t.data.claimCashbackBonus.__typename)
1776
+ error: m(t.data.claimCashbackBonus.__typename)
1764
1777
  } : {
1765
1778
  ok: !0
1766
1779
  } : {
@@ -1769,141 +1782,128 @@ class Pt {
1769
1782
  };
1770
1783
  }
1771
1784
  async bonus() {
1772
- const e = await this.client.request(et);
1785
+ const e = await this.client.request(ze);
1773
1786
  return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
1774
1787
  }
1775
1788
  async wallet() {
1776
- const e = await this.client.request(Ne);
1789
+ const e = await this.client.request(Me);
1777
1790
  return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
1778
1791
  }
1779
1792
  async deposit(e) {
1780
1793
  const t = await this.client.request(
1781
- Ye,
1794
+ Le,
1782
1795
  e
1783
1796
  );
1784
1797
  return t.ok ? { ok: t.ok, data: t.data.node } : t;
1785
1798
  }
1786
1799
  async createGCashDeposit(e) {
1787
- const t = await this.client.request(Le, e);
1800
+ const t = await this.client.request(qe, e);
1788
1801
  return t.ok ? t.data.createGCashDeposit ? {
1789
1802
  ok: !1,
1790
- error: d(t.data.createGCashDeposit.__typename)
1803
+ error: m(t.data.createGCashDeposit.__typename)
1791
1804
  } : {
1792
1805
  ok: !0
1793
1806
  } : t;
1794
1807
  }
1795
1808
  async createMayaDeposit(e) {
1796
- const t = await this.client.request(Ve, e);
1809
+ const t = await this.client.request(Be, e);
1797
1810
  return t.ok ? t.data.createMayaDeposit ? {
1798
1811
  ok: !1,
1799
- error: d(t.data.createMayaDeposit.__typename)
1812
+ error: m(t.data.createMayaDeposit.__typename)
1800
1813
  } : {
1801
1814
  ok: !0
1802
1815
  } : t;
1803
1816
  }
1804
1817
  async createMayaAppDeposit(e) {
1805
- const t = await this.client.request(He, e);
1818
+ const t = await this.client.request(Fe, e);
1806
1819
  return t.ok ? t.data.createMayaAppDeposit ? {
1807
1820
  ok: !1,
1808
- error: d(t.data.createMayaAppDeposit.__typename)
1821
+ error: m(t.data.createMayaAppDeposit.__typename)
1809
1822
  } : {
1810
1823
  ok: !0
1811
1824
  } : t;
1812
1825
  }
1813
1826
  async createGCashWithdrawal(e) {
1814
- const t = await this.client.request(Ue, e);
1827
+ const t = await this.client.request($e, e);
1815
1828
  return t.ok ? t.data.createGCashWithdrawal ? {
1816
1829
  ok: !1,
1817
- error: d(t.data.createGCashWithdrawal.__typename)
1830
+ error: m(t.data.createGCashWithdrawal.__typename)
1818
1831
  } : {
1819
1832
  ok: !0
1820
1833
  } : t;
1821
1834
  }
1822
1835
  async createMayaWithdrawal(e) {
1823
- const t = await this.client.request(Oe, e);
1836
+ const t = await this.client.request(xe, e);
1824
1837
  return t.ok ? t.data.createMayaWithdrawal ? {
1825
1838
  ok: !1,
1826
- error: d(t.data.createMayaWithdrawal.__typename)
1839
+ error: m(t.data.createMayaWithdrawal.__typename)
1827
1840
  } : {
1828
1841
  ok: !0
1829
1842
  } : t;
1830
1843
  }
1831
1844
  async createMayaAppWithdrawal(e) {
1832
- const t = await this.client.request(We, e);
1845
+ const t = await this.client.request(Ge, e);
1833
1846
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1834
1847
  ok: !1,
1835
- error: d(t.data.createMayaAppWithdrawal.__typename)
1848
+ error: m(t.data.createMayaAppWithdrawal.__typename)
1836
1849
  } : {
1837
1850
  ok: !0
1838
1851
  } : t;
1839
1852
  }
1840
1853
  async createBankWithdrawal(e) {
1841
- const t = await this.client.request(Be, e);
1854
+ const t = await this.client.request(Ue, e);
1842
1855
  return t.ok ? t.data.createBankWithdrawal ? {
1843
1856
  ok: !1,
1844
- error: d(t.data.createBankWithdrawal.__typename)
1857
+ error: m(t.data.createBankWithdrawal.__typename)
1845
1858
  } : {
1846
1859
  ok: !0
1847
1860
  } : t;
1848
1861
  }
1849
1862
  async remainingDailyWithdrawalsCount() {
1850
1863
  const e = await this.client.request(
1851
- qe
1864
+ Oe
1852
1865
  );
1853
1866
  return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
1854
1867
  }
1855
1868
  async pointsWallet() {
1856
- const e = await this.client.request(Ie);
1869
+ const e = await this.client.request(Re);
1857
1870
  return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
1858
1871
  }
1859
1872
  async pointsToCashConversion(e) {
1860
- const t = await this.client.request(Re, e);
1873
+ const t = await this.client.request(Ne, e);
1861
1874
  return t.ok ? t.data.pointsToCashConversion ? {
1862
1875
  ok: !1,
1863
- error: d(t.data.pointsToCashConversion.__typename)
1876
+ error: m(t.data.pointsToCashConversion.__typename)
1864
1877
  } : {
1865
1878
  ok: !0
1866
1879
  } : t;
1867
1880
  }
1868
1881
  async mayaSession(e) {
1869
1882
  const t = await this.client.request(
1870
- St,
1883
+ ht,
1871
1884
  e
1872
1885
  );
1873
1886
  return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
1874
1887
  }
1875
- /** @deprecated */
1876
- async games(e) {
1877
- const t = await this.client.request(ge, e);
1878
- return t.ok ? { ok: t.ok, data: t.data.games } : t;
1879
- }
1880
- /** @deprecated */
1881
- async gamesByName(e) {
1882
- const t = await this.client.request(
1883
- Se,
1884
- e
1885
- );
1886
- return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
1887
- }
1888
1888
  async gameSession(e) {
1889
1889
  const t = await this.client.request(
1890
- be,
1890
+ ge.current,
1891
1891
  e
1892
1892
  );
1893
1893
  return t.ok ? { ok: !0, data: t.data.node } : t;
1894
1894
  }
1895
1895
  async createGameSession(e) {
1896
- const t = await this.client.request(Ae, e);
1896
+ const t = await this.client.request(be, e);
1897
1897
  return t.ok ? t.data.createGameSession ? {
1898
1898
  ok: !1,
1899
- error: d(t.data.createGameSession.__typename)
1899
+ error: m(t.data.createGameSession.__typename)
1900
1900
  } : {
1901
1901
  ok: !0
1902
1902
  } : t;
1903
1903
  }
1904
1904
  async endGameSession(e) {
1905
1905
  const t = await this.client.request(
1906
- Pe,
1906
+ Ae.current,
1907
1907
  e
1908
1908
  );
1909
1909
  return t.ok ? t.data.endGameSession ? {
@@ -1918,7 +1918,7 @@ class Pt {
1918
1918
  }
1919
1919
  async validateMayaSession() {
1920
1920
  const e = await this.client.request(
1921
- bt
1921
+ wt
1922
1922
  );
1923
1923
  return e.ok ? e.data.validateMayaSession ? {
1924
1924
  ok: !0
@@ -1931,33 +1931,33 @@ class Pt {
1931
1931
  } : e;
1932
1932
  }
1933
1933
  }
1934
- function xt(n, e, t) {
1935
- return n < e ? e : n > t ? t : n;
1934
+ function It(o, e, t) {
1935
+ return o < e ? e : o > t ? t : o;
1936
1936
  }
1937
- function H(n) {
1938
- return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
1937
+ function H(o) {
1938
+ return Object.prototype.toString.call(o) === "[object Object]" && Object(o) === o;
1939
1939
  }
1940
- function Gt(n) {
1940
+ function Dt(o) {
1941
1941
  const e = [];
1942
1942
  function t(r, a = []) {
1943
1943
  for (const s in r) {
1944
1944
  const c = r[s];
1945
- H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t($t(c), [...a, s]) : e.push({
1945
+ H(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Pt(c), [...a, s]) : e.push({
1946
1946
  key: [...a, s],
1947
1947
  value: c
1948
1948
  });
1949
1949
  }
1950
1950
  }
1951
- return t(n), e;
1951
+ return t(o), e;
1952
1952
  }
1953
- function $t(n) {
1954
- return n.reduce((e, t, r) => (e[r] = t, e), {});
1953
+ function Pt(o) {
1954
+ return o.reduce((e, t, r) => (e[r] = t, e), {});
1955
1955
  }
1956
1956
  class U {
1957
1957
  constructor(e, t) {
1958
- m(this, "url");
1959
- m(this, "options");
1960
- m(this, "middlewares");
1958
+ d(this, "url");
1959
+ d(this, "options");
1960
+ d(this, "middlewares");
1961
1961
  var a;
1962
1962
  const r = new Headers((a = t == null ? void 0 : t.fetchOptions) == null ? void 0 : a.headers);
1963
1963
  this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: r }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
@@ -1995,13 +1995,13 @@ class U {
1995
1995
  const l = await fetch(e);
1996
1996
  if (!l.ok)
1997
1997
  return { ok: !1, error: h(l.status) };
1998
- const f = await l.json(), y = f.data, p = (t = f.errors) == null ? void 0 : t.at(0);
1998
+ const f = await l.json(), w = f.data, p = (t = f.errors) == null ? void 0 : t.at(0);
1999
1999
  return p ? ((r = p.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = p.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, p.message) } : ((s = p.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, p.message) } : ((c = p.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((u = p.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, p.message) } : {
2000
2000
  ok: !1,
2001
2001
  error: h(500, p.message)
2002
2002
  } : {
2003
2003
  ok: !0,
2004
- data: y
2004
+ data: w
2005
2005
  };
2006
2006
  } catch {
2007
2007
  return {
@@ -2017,7 +2017,7 @@ class U {
2017
2017
  return t;
2018
2018
  }
2019
2019
  createUploadBody(e, t) {
2020
- const r = Gt(t).filter(
2020
+ const r = Dt(t).filter(
2021
2021
  (c) => c.value instanceof File || c.value instanceof Blob
2022
2022
  ), a = new FormData();
2023
2023
  a.append(
@@ -2035,13 +2035,13 @@ class U {
2035
2035
  }), a;
2036
2036
  }
2037
2037
  }
2038
- async function w(n) {
2039
- const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
2038
+ async function y(o) {
2039
+ const e = new TextEncoder().encode(o), t = await crypto.subtle.digest("SHA-256", e);
2040
2040
  return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
2041
2041
  }
2042
- class ke {
2042
+ class Ee {
2043
2043
  constructor(e) {
2044
- m(this, "enabled");
2044
+ d(this, "enabled");
2045
2045
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
2046
2046
  }
2047
2047
  info(e) {
@@ -2057,26 +2057,26 @@ class ke {
2057
2057
  this.enabled && console.log(`\x1B[32m[success] ${e}`);
2058
2058
  }
2059
2059
  }
2060
- function j(n) {
2061
- return new Date(n.getTime());
2060
+ function j(o) {
2061
+ return new Date(o.getTime());
2062
2062
  }
2063
- function B(n, e) {
2064
- const t = j(n);
2063
+ function q(o, e) {
2064
+ const t = j(o);
2065
2065
  return t.setDate(t.getDate() + e), t;
2066
2066
  }
2067
- function q(n, e) {
2068
- const t = j(n);
2067
+ function B(o, e) {
2068
+ const t = j(o);
2069
2069
  return t.setMinutes(t.getMinutes() + e), t;
2070
2070
  }
2071
- function ye(n, e) {
2072
- return n.getTime() > e.getTime();
2071
+ function we(o, e) {
2072
+ return o.getTime() > e.getTime();
2073
2073
  }
2074
- function Ce(n) {
2074
+ function Se(o) {
2075
2075
  return new Promise((e) => {
2076
- setTimeout(e, n);
2076
+ setTimeout(e, o);
2077
2077
  });
2078
2078
  }
2079
- function we(n, e) {
2079
+ function ye(o, e) {
2080
2080
  const {
2081
2081
  until: t,
2082
2082
  interval: r = 1e3,
@@ -2084,23 +2084,23 @@ function we(n, e) {
2084
2084
  /**/
2085
2085
  } = e;
2086
2086
  async function s(c, u) {
2087
- const l = u ?? a, f = await n(...c);
2088
- return t(f) ? f : l > 1 ? (await Ce(r * ((a - l) / 2)), s(c, l - 1)) : f;
2087
+ const l = u ?? a, f = await o(...c);
2088
+ return t(f) ? f : l > 1 ? (await Se(r * ((a - l) / 2)), s(c, l - 1)) : f;
2089
2089
  }
2090
2090
  return async (...c) => await s(c);
2091
2091
  }
2092
- function F(n, e) {
2093
- const t = j(n);
2092
+ function F(o, e) {
2093
+ const t = j(o);
2094
2094
  return t.setMinutes(t.getMinutes() - e), t;
2095
2095
  }
2096
- class Ut {
2096
+ class $t {
2097
2097
  constructor(e) {
2098
- m(this, "logger");
2099
- m(this, "storageKey", "session");
2100
- m(this, "authService");
2101
- m(this, "walletService");
2102
- m(this, "_refreshing", !1);
2103
- this.authService = e.authService, this.walletService = e.walletService, this.logger = new ke({
2098
+ d(this, "logger");
2099
+ d(this, "storageKey", "session");
2100
+ d(this, "authService");
2101
+ d(this, "walletService");
2102
+ d(this, "_refreshing", !1);
2103
+ this.authService = e.authService, this.walletService = e.walletService, this.logger = new Ee({
2104
2104
  enabled: e.logs ?? !1
2105
2105
  });
2106
2106
  }
@@ -2121,10 +2121,10 @@ class Ut {
2121
2121
  }
2122
2122
  };
2123
2123
  if (e.type === "MAYA") {
2124
- const c = await we(() => this.walletService.mayaSession({ id: e.sessionId }), {
2125
- until: (y) => {
2124
+ const c = await ye(() => this.walletService.mayaSession({ id: e.sessionId }), {
2125
+ until: (w) => {
2126
2126
  var p;
2127
- return y.ok && ((p = y.data) == null ? void 0 : p.member) != null;
2127
+ return w.ok && ((p = w.data) == null ? void 0 : p.member) != null;
2128
2128
  },
2129
2129
  interval: 1e3,
2130
2130
  maxAttempt: 5
@@ -2138,8 +2138,8 @@ class Ut {
2138
2138
  message: "Forbidden"
2139
2139
  }
2140
2140
  };
2141
- const l = await we(() => this.authService.createSession(e), {
2142
- until: (y) => y.ok,
2141
+ const l = await ye(() => this.authService.createSession(e), {
2142
+ until: (w) => w.ok,
2143
2143
  interval: 1e3,
2144
2144
  maxAttempt: 5
2145
2145
  })();
@@ -2149,8 +2149,8 @@ class Ut {
2149
2149
  this.storageKey,
2150
2150
  JSON.stringify({
2151
2151
  ...l.data,
2152
- accessTokenExpiresAt: q(f, 8).getTime(),
2153
- refreshTokenExpiresAt: F(B(f, 30), 2).getTime()
2152
+ accessTokenExpiresAt: B(f, 8).getTime(),
2153
+ refreshTokenExpiresAt: F(q(f, 30), 2).getTime()
2154
2154
  })
2155
2155
  ), {
2156
2156
  ok: !0,
@@ -2165,8 +2165,8 @@ class Ut {
2165
2165
  this.storageKey,
2166
2166
  JSON.stringify({
2167
2167
  ...s.data,
2168
- accessTokenExpiresAt: q(c, 8).getTime(),
2169
- refreshTokenExpiresAt: F(B(c, 30), 2).getTime()
2168
+ accessTokenExpiresAt: B(c, 8).getTime(),
2169
+ refreshTokenExpiresAt: F(q(c, 30), 2).getTime()
2170
2170
  })
2171
2171
  ), {
2172
2172
  ok: !0,
@@ -2189,8 +2189,8 @@ class Ut {
2189
2189
  this.storageKey,
2190
2190
  JSON.stringify({
2191
2191
  ...t.data,
2192
- accessTokenExpiresAt: q(r, 8).getTime(),
2193
- refreshTokenExpiresAt: F(B(r, 30), 2).getTime()
2192
+ accessTokenExpiresAt: B(r, 8).getTime(),
2193
+ refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
2194
2194
  })
2195
2195
  ), {
2196
2196
  ok: !0,
@@ -2205,8 +2205,8 @@ class Ut {
2205
2205
  this.storageKey,
2206
2206
  JSON.stringify({
2207
2207
  ...t.data,
2208
- accessTokenExpiresAt: q(r, 8).getTime(),
2209
- refreshTokenExpiresAt: F(B(r, 30), 2).getTime()
2208
+ accessTokenExpiresAt: B(r, 8).getTime(),
2209
+ refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
2210
2210
  })
2211
2211
  ), { ok: !0 };
2212
2212
  } else
@@ -2219,7 +2219,7 @@ class Ut {
2219
2219
  data: null
2220
2220
  };
2221
2221
  if (this.refreshing)
2222
- return await Ce(1e3), await this.get();
2222
+ return await Se(1e3), await this.get();
2223
2223
  const e = window.localStorage.getItem(this.storageKey);
2224
2224
  if (!e)
2225
2225
  return {
@@ -2229,7 +2229,7 @@ class Ut {
2229
2229
  try {
2230
2230
  let t = JSON.parse(e), r = /* @__PURE__ */ new Date();
2231
2231
  const a = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
2232
- if (ye(r, s))
2232
+ if (we(r, s))
2233
2233
  return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
2234
2234
  ok: !1,
2235
2235
  error: {
@@ -2237,7 +2237,7 @@ class Ut {
2237
2237
  message: "Session expired."
2238
2238
  }
2239
2239
  };
2240
- if (ye(r, a)) {
2240
+ if (we(r, a)) {
2241
2241
  this.logger.info("Refreshing session..."), this.refreshing = !0;
2242
2242
  const c = await this.authService.refreshSession(t.refreshToken);
2243
2243
  if (this.refreshing = !1, !c.ok)
@@ -2251,8 +2251,8 @@ class Ut {
2251
2251
  this.logger.success("Session refreshed!"), r = /* @__PURE__ */ new Date(), t = {
2252
2252
  ...t,
2253
2253
  ...c.data,
2254
- accessTokenExpiresAt: q(r, 8).getTime(),
2255
- refreshTokenExpiresAt: F(B(r, 30), 2).getTime()
2254
+ accessTokenExpiresAt: B(r, 8).getTime(),
2255
+ refreshTokenExpiresAt: F(q(r, 30), 2).getTime()
2256
2256
  }, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
2257
2257
  }
2258
2258
  return {
@@ -2292,10 +2292,10 @@ class Ut {
2292
2292
  return typeof window > "u";
2293
2293
  }
2294
2294
  }
2295
- function g(n) {
2295
+ function g(o) {
2296
2296
  const e = {};
2297
- for (const t in n) {
2298
- const r = n[t];
2297
+ for (const t in o) {
2298
+ const r = o[t];
2299
2299
  if (r !== null && r !== void 0) {
2300
2300
  if (H(r)) {
2301
2301
  e[t] = g(r);
@@ -2310,21 +2310,21 @@ function g(n) {
2310
2310
  }
2311
2311
  return e;
2312
2312
  }
2313
- function i(n, e) {
2314
- if (typeof n == "number" && !Number.isNaN(n))
2315
- return n;
2316
- if (typeof n == "string") {
2317
- const t = Number.parseFloat(n);
2313
+ function n(o, e) {
2314
+ if (typeof o == "number" && !Number.isNaN(o))
2315
+ return o;
2316
+ if (typeof o == "string") {
2317
+ const t = Number.parseFloat(o);
2318
2318
  if (!Number.isNaN(t))
2319
2319
  return t;
2320
2320
  }
2321
2321
  return e;
2322
2322
  }
2323
- class Ot {
2323
+ class xt {
2324
2324
  constructor(e) {
2325
- m(this, "staticService");
2325
+ d(this, "staticService");
2326
2326
  const t = (e == null ? void 0 : e.environment) === "development";
2327
- this.staticService = new Dt({
2327
+ this.staticService = new Rt({
2328
2328
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2329
2329
  });
2330
2330
  }
@@ -2343,9 +2343,7 @@ class Ot {
2343
2343
  betRecord: this.betRecord.bind(this),
2344
2344
  latestBetRecord: this.latestBetRecord.bind(this),
2345
2345
  transactionRecord: this.transactionRecord.bind(this),
2346
- /** @deprecated */
2347
2346
  game: this.game.bind(this),
2348
- game__next: this.game__next.bind(this),
2349
2347
  gameSession: this.gameSession.bind(this),
2350
2348
  promo: this.promo.bind(this),
2351
2349
  cashback: this.cashback.bind(this),
@@ -2355,7 +2353,8 @@ class Ot {
2355
2353
  pointsWallet: this.pointsWallet.bind(this),
2356
2354
  pointsWalletTransaction: this.pointsWalletTransaction.bind(this),
2357
2355
  activityRecord: this.activityRecord.bind(this),
2358
- referrals: this.referrals.bind(this)
2356
+ referral: this.referral.bind(this),
2357
+ referralCommission: this.referralCommission.bind(this)
2359
2358
  };
2360
2359
  }
2361
2360
  site(e) {
@@ -2368,10 +2367,10 @@ class Ot {
2368
2367
  return g(t);
2369
2368
  }
2370
2369
  platform(e) {
2371
- var t, r, a, s, c, u, l, f, y, p, T, v, M, N, I, S, R, D, C, P, x, G, _, $, O, W, k, Q, K, J, z, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, me, de, ue, le, pe, fe, he;
2370
+ var t, r, a, s, c, u, l, f, w, p, _, v, M, R, N, b, I, D, E, P, $, x, S, G, O, W, C, Q, K, J, z, X, Z, ee, te, re, ae, oe, ne, ie, se, ce, de, me, ue, le, pe, fe, he;
2372
2371
  return {
2373
2372
  paymentSettings: {
2374
- minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
2373
+ minimumFirstDepositAmount: n(e.minimumFirstDepositAmount),
2375
2374
  restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
2376
2375
  depositGateway: {
2377
2376
  bank: {
@@ -2379,69 +2378,69 @@ class Ot {
2379
2378
  iosEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.iosEnabled) ?? !1,
2380
2379
  webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
2381
2380
  mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
2382
- minimumAmount: i((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
2383
- maximumAmount: i((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
2381
+ minimumAmount: n((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
2382
+ maximumAmount: n((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
2384
2383
  },
2385
2384
  gcash: {
2386
2385
  androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
2387
2386
  iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
2388
- webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
2387
+ webEnabled: ((w = e.gcashDepositGatewaySettings) == null ? void 0 : w.webEnabled) ?? !1,
2389
2388
  mobileWebEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.mobileWebEnabled) ?? !1,
2390
- minimumAmount: i((T = e.gcashDepositGatewaySettings) == null ? void 0 : T.minimumAmount),
2391
- maximumAmount: i((v = e.gcashDepositGatewaySettings) == null ? void 0 : v.maximumAmount)
2389
+ minimumAmount: n((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
2390
+ maximumAmount: n((v = e.gcashDepositGatewaySettings) == null ? void 0 : v.maximumAmount)
2392
2391
  },
2393
2392
  maya: {
2394
2393
  androidEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
2395
- iosEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.iosEnabled) ?? !1,
2396
- webEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.webEnabled) ?? !1,
2397
- mobileWebEnabled: ((S = e.mayaDepositGatewaySettings) == null ? void 0 : S.mobileWebEnabled) ?? !1,
2398
- minimumAmount: i((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.minimumAmount),
2399
- maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
2394
+ iosEnabled: ((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
2395
+ webEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.webEnabled) ?? !1,
2396
+ mobileWebEnabled: ((b = e.mayaDepositGatewaySettings) == null ? void 0 : b.mobileWebEnabled) ?? !1,
2397
+ minimumAmount: n((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.minimumAmount),
2398
+ maximumAmount: n((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
2400
2399
  },
2401
2400
  mayaApp: {
2402
- androidEnabled: ((C = e.mayaAppDepositGatewaySettings) == null ? void 0 : C.androidEnabled) ?? !1,
2401
+ androidEnabled: ((E = e.mayaAppDepositGatewaySettings) == null ? void 0 : E.androidEnabled) ?? !1,
2403
2402
  iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
2404
- webEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
2405
- mobileWebEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
2406
- minimumAmount: i((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
2407
- maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
2403
+ webEnabled: (($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.webEnabled) ?? !1,
2404
+ mobileWebEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.mobileWebEnabled) ?? !1,
2405
+ minimumAmount: n((S = e.mayaAppDepositGatewaySettings) == null ? void 0 : S.minimumAmount),
2406
+ maximumAmount: n((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.maximumAmount)
2408
2407
  }
2409
2408
  },
2410
2409
  withdrawalGateway: {
2411
2410
  bank: {
2412
2411
  androidEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.androidEnabled) ?? !1,
2413
2412
  iosEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
2414
- webEnabled: ((k = e.bankWithdrawalGatewaySettings) == null ? void 0 : k.webEnabled) ?? !1,
2413
+ webEnabled: ((C = e.bankWithdrawalGatewaySettings) == null ? void 0 : C.webEnabled) ?? !1,
2415
2414
  mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
2416
- minimumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
2417
- maximumAmount: i((J = e.bankWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount)
2415
+ minimumAmount: n((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
2416
+ maximumAmount: n((J = e.bankWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount)
2418
2417
  },
2419
2418
  gcash: {
2420
2419
  androidEnabled: ((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.androidEnabled) ?? !1,
2421
2420
  iosEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.iosEnabled) ?? !1,
2422
2421
  webEnabled: ((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.webEnabled) ?? !1,
2423
2422
  mobileWebEnabled: ((ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.mobileWebEnabled) ?? !1,
2424
- minimumAmount: i((te = e.gcashWithdrawalGatewaySettings) == null ? void 0 : te.minimumAmount),
2425
- maximumAmount: i(
2423
+ minimumAmount: n((te = e.gcashWithdrawalGatewaySettings) == null ? void 0 : te.minimumAmount),
2424
+ maximumAmount: n(
2426
2425
  (re = e.gcashWithdrawalGatewaySettings) == null ? void 0 : re.maximumAmount,
2427
2426
  1e6
2428
2427
  )
2429
2428
  },
2430
2429
  maya: {
2431
2430
  androidEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.androidEnabled) ?? !1,
2432
- iosEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.iosEnabled) ?? !1,
2433
- webEnabled: ((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.webEnabled) ?? !1,
2431
+ iosEnabled: ((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.iosEnabled) ?? !1,
2432
+ webEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.webEnabled) ?? !1,
2434
2433
  mobileWebEnabled: ((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.mobileWebEnabled) ?? !1,
2435
- minimumAmount: i((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.minimumAmount),
2436
- maximumAmount: i((ce = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount)
2434
+ minimumAmount: n((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.minimumAmount),
2435
+ maximumAmount: n((ce = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount)
2437
2436
  },
2438
2437
  mayaApp: {
2439
- androidEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.androidEnabled) ?? !1,
2440
- iosEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.iosEnabled) ?? !1,
2438
+ androidEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.androidEnabled) ?? !1,
2439
+ iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
2441
2440
  webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
2442
2441
  mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
2443
- minimumAmount: i((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
2444
- maximumAmount: i(
2442
+ minimumAmount: n((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
2443
+ maximumAmount: n(
2445
2444
  (fe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : fe.maximumAmount,
2446
2445
  1e6
2447
2446
  )
@@ -2449,7 +2448,7 @@ class Ot {
2449
2448
  }
2450
2449
  },
2451
2450
  pointsClubSettings: {
2452
- multiplier: i((he = e.pointsClubSettings) == null ? void 0 : he.multiplier, 0)
2451
+ multiplier: n((he = e.pointsClubSettings) == null ? void 0 : he.multiplier, 0)
2453
2452
  }
2454
2453
  };
2455
2454
  }
@@ -2470,7 +2469,6 @@ class Ot {
2470
2469
  verificationStatus: e.verificationStatus,
2471
2470
  transactionPassword: e.transactionPassword,
2472
2471
  secretAnswerSubmitted: e.secretAnswerSubmitted ?? !1,
2473
- dateTimeLastActive: e.dateTimeLastActive ? new Date(e.dateTimeLastActive) : void 0,
2474
2472
  dateTimeCreated: new Date(e.dateTimeCreated),
2475
2473
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2476
2474
  };
@@ -2479,7 +2477,7 @@ class Ot {
2479
2477
  wallet(e) {
2480
2478
  return {
2481
2479
  id: e.id,
2482
- balance: i(e.balance, 0),
2480
+ balance: n(e.balance, 0),
2483
2481
  currency: e.currency,
2484
2482
  dateTimeCreated: new Date(e.dateTimeCreated),
2485
2483
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
@@ -2506,7 +2504,7 @@ class Ot {
2506
2504
  mobileNumberVerification: e.mobileNumberVerification ?? !1,
2507
2505
  personalInformation: e.personalInformation ?? !1,
2508
2506
  transactionPassword: e.transactionPassword ?? !1,
2509
- completionPercentage: i(e.completionPercentage, 0)
2507
+ completionPercentage: n(e.completionPercentage, 0)
2510
2508
  };
2511
2509
  }
2512
2510
  announcement(e) {
@@ -2528,9 +2526,9 @@ class Ot {
2528
2526
  type: e.type,
2529
2527
  bank: e.bank,
2530
2528
  status: e.status,
2531
- amount: i(e.amount, 0),
2532
- netAmount: i(e.netAmount, 0),
2533
- fee: i(e.fee, 0),
2529
+ amount: n(e.amount, 0),
2530
+ netAmount: n(e.netAmount, 0),
2531
+ fee: n(e.fee, 0),
2534
2532
  reference: e.reference ?? void 0,
2535
2533
  withdrawalNumber: e.withdrawalNumber,
2536
2534
  recipientMobileNumber: e.recipientMobileNumber ?? void 0,
@@ -2554,9 +2552,9 @@ class Ot {
2554
2552
  id: e.id,
2555
2553
  type: e.type,
2556
2554
  status: e.status,
2557
- amount: i(e.amount, 0),
2558
- fee: i(e.fee, 0),
2559
- netAmount: i(e.netAmount, 0),
2555
+ amount: n(e.amount, 0),
2556
+ fee: n(e.fee, 0),
2557
+ netAmount: n(e.netAmount, 0),
2560
2558
  reference: e.reference ?? void 0,
2561
2559
  depositNumber: e.depositNumber,
2562
2560
  dateTimeCreated: new Date(e.dateTimeCreated),
@@ -2568,13 +2566,13 @@ class Ot {
2568
2566
  var r;
2569
2567
  const t = {
2570
2568
  id: e.id,
2571
- bet: i(e.bet, 0),
2572
- payout: i(e.payout, 0),
2569
+ bet: n(e.bet, 0),
2570
+ payout: n(e.payout, 0),
2573
2571
  status: e.status,
2574
- jackpotContribution: i(e.jackpotContribution, 0),
2575
- jackpotPayout: i(e.jackpotPayout, 0),
2576
- winloss: i(e.winloss),
2577
- validBet: i(e.validBet, 0),
2572
+ jackpotContribution: n(e.jackpotContribution, 0),
2573
+ jackpotPayout: n(e.jackpotPayout, 0),
2574
+ winloss: n(e.winloss),
2575
+ validBet: n(e.validBet, 0),
2578
2576
  vendorRoundId: e.vendorRoundId ?? void 0,
2579
2577
  game: {
2580
2578
  name: e.game.name,
@@ -2605,9 +2603,9 @@ class Ot {
2605
2603
  images: this.staticService.gameThumbnails(e.game),
2606
2604
  provider: e.game.provider
2607
2605
  },
2608
- bet: i(e.bet, 0),
2609
- payout: i(e.payout, 0),
2610
- validBet: i(e.validBet, 0),
2606
+ bet: n(e.bet, 0),
2607
+ payout: n(e.payout, 0),
2608
+ validBet: n(e.validBet, 0),
2611
2609
  dateTimeSettled: new Date(e.dateTimeSettled),
2612
2610
  dateTimeCreated: new Date(e.dateTimeCreated)
2613
2611
  };
@@ -2616,27 +2614,15 @@ class Ot {
2616
2614
  const t = {
2617
2615
  id: e.id,
2618
2616
  type: e.type,
2619
- amount: i(e.amount, 0),
2617
+ amount: n(e.amount, 0),
2620
2618
  content: e.content ?? void 0,
2621
- currentBalance: i(e.currentBalance, 0),
2619
+ currentBalance: n(e.currentBalance, 0),
2622
2620
  referenceNumber: e.referenceNumber,
2623
2621
  dateTimeCreated: new Date(e.dateTimeCreated)
2624
2622
  };
2625
2623
  return g(t);
2626
2624
  }
2627
- /**
2628
- * @deprecated
2629
- */
2630
2625
  game(e) {
2631
- return {
2632
- id: e.id,
2633
- type: e.type,
2634
- name: e.name,
2635
- images: this.staticService.gameThumbnails(e),
2636
- provider: e.provider
2637
- };
2638
- }
2639
- game__next(e) {
2640
2626
  return {
2641
2627
  id: e.id,
2642
2628
  type: e.type,
@@ -2644,8 +2630,7 @@ class Ot {
2644
2630
  name: e.name,
2645
2631
  images: [e.customImage, e.image].filter(Boolean),
2646
2632
  provider: e.provider,
2647
- reference: e.reference,
2648
- externalId: e.externalId
2633
+ reference: e.reference
2649
2634
  };
2650
2635
  }
2651
2636
  gameSession(e) {
@@ -2666,8 +2651,8 @@ class Ot {
2666
2651
  status: e.status,
2667
2652
  description: e.description,
2668
2653
  banner: this.file(e.banner),
2669
- maximumBonusAmount: i(e.maximumBonusAmount),
2670
- minimumBonusAmount: i(e.minimumBonusAmount),
2654
+ maximumBonusAmount: n(e.maximumBonusAmount),
2655
+ minimumBonusAmount: n(e.minimumBonusAmount),
2671
2656
  activationEndDateTime: new Date(e.activationEndDateTime),
2672
2657
  activationStartDateTime: new Date(e.activationStartDateTime),
2673
2658
  dateTimeCreated: new Date(e.dateTimeCreated),
@@ -2687,7 +2672,7 @@ class Ot {
2687
2672
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated),
2688
2673
  turnoverContributionPercentagePerGameProvider: Object.entries(
2689
2674
  e.turnoverContributionPercentagePerGameProvider
2690
- ).reduce((r, [a, s]) => (r[a] = i(s, 0), r), {})
2675
+ ).reduce((r, [a, s]) => (r[a] = n(s, 0), r), {})
2691
2676
  };
2692
2677
  }
2693
2678
  bonus(e) {
@@ -2697,22 +2682,22 @@ class Ot {
2697
2682
  deposit: e.deposit ? {
2698
2683
  type: e.deposit.type,
2699
2684
  status: e.deposit.status,
2700
- fee: i(e.deposit.fee, 0),
2701
- amount: i(e.deposit.amount, 0),
2702
- netAmount: i(e.deposit.netAmount, 0),
2685
+ fee: n(e.deposit.fee, 0),
2686
+ amount: n(e.deposit.amount, 0),
2687
+ netAmount: n(e.deposit.netAmount, 0),
2703
2688
  reference: e.deposit.reference ?? void 0,
2704
2689
  dateTimeCreated: new Date(e.deposit.dateTimeCreated),
2705
2690
  dateTimeLastUpdated: new Date(e.deposit.dateTimeLastUpdated)
2706
2691
  } : void 0,
2707
- balance: i(e.balance, 0),
2708
- amount: i(e.amount, 0),
2692
+ balance: n(e.balance, 0),
2693
+ amount: n(e.amount, 0),
2709
2694
  expiration: new Date(e.expiration),
2710
- turnoverRequirement: i(e.turnoverRequirement, 0),
2711
- currentTurnoverRequirementContribution: i(
2695
+ turnoverRequirement: n(e.turnoverRequirement, 0),
2696
+ currentTurnoverRequirementContribution: n(
2712
2697
  e.currentTurnoverRequirementContribution,
2713
2698
  0
2714
2699
  ),
2715
- currentTurnoverRequirementContributionPercentage: i(
2700
+ currentTurnoverRequirementContributionPercentage: n(
2716
2701
  e.currentTurnoverRequirementContributionPercentage,
2717
2702
  0
2718
2703
  ),
@@ -2724,7 +2709,7 @@ class Ot {
2724
2709
  cashbackBonus(e) {
2725
2710
  return {
2726
2711
  id: e.id,
2727
- balance: i(e.balance, 0),
2712
+ balance: n(e.balance, 0),
2728
2713
  cashback: this.cashback(e.cashback),
2729
2714
  dateTimeCreated: new Date(e.dateTimeCreated),
2730
2715
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
@@ -2742,7 +2727,7 @@ class Ot {
2742
2727
  pointsWallet(e) {
2743
2728
  return {
2744
2729
  id: e.id,
2745
- points: i(e.points, 0),
2730
+ points: n(e.points, 0),
2746
2731
  account: e.account,
2747
2732
  dateTimeCreated: new Date(e.dateTimeCreated)
2748
2733
  };
@@ -2751,8 +2736,8 @@ class Ot {
2751
2736
  return {
2752
2737
  id: e.id,
2753
2738
  type: e.type,
2754
- amount: i(e.amount, 0),
2755
- balance: i(e.balance, 0),
2739
+ amount: n(e.amount, 0),
2740
+ balance: n(e.balance, 0),
2756
2741
  dateTimeCreated: new Date(e.dateTimeCreated)
2757
2742
  };
2758
2743
  }
@@ -2760,38 +2745,54 @@ class Ot {
2760
2745
  const t = {
2761
2746
  id: e.id,
2762
2747
  type: e.type,
2763
- amount: e.amount ? i(e.amount, 0) : void 0,
2748
+ amount: e.amount ? n(e.amount, 0) : void 0,
2764
2749
  domain: e.domain ?? void 0,
2765
2750
  details: e.details,
2766
2751
  dateTimeCreated: new Date(e.dateTimeCreated)
2767
2752
  };
2768
2753
  return g(t);
2769
2754
  }
2770
- referrals(e) {
2755
+ referral(e) {
2771
2756
  return {
2772
2757
  id: e.id,
2773
2758
  level: e.level,
2774
2759
  upline: e.upline,
2775
2760
  downline: e.downline,
2776
- turnover: i(e.turnover, 0),
2777
- commision: i(e.commision, 0),
2761
+ turnover: n(e.turnover, 0),
2762
+ commision: n(e.commision, 0),
2778
2763
  dateTimeCreated: new Date(e.dateTimeCreated)
2779
2764
  };
2780
2765
  }
2766
+ referralCommission(e) {
2767
+ return {
2768
+ id: e.id,
2769
+ commission: n(e.commission, 0),
2770
+ level1Commission: n(e.level1Commission, 0),
2771
+ level2Commission: n(e.level2Commission, 0),
2772
+ level3Commission: n(e.level3Commission, 0),
2773
+ referralsCount: e.referralsCount,
2774
+ level1ReferralsCount: e.level1ReferralsCount,
2775
+ level2ReferralsCount: e.level2ReferralsCount,
2776
+ level3ReferralsCount: e.level3ReferralsCount,
2777
+ referralCode: e.referralCode,
2778
+ dateTimeCreated: new Date(e.dateTimeCreated),
2779
+ dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2780
+ };
2781
+ }
2781
2782
  }
2782
- class Lt {
2783
+ class qt {
2783
2784
  constructor(e) {
2784
- m(this, "cmsPortalService");
2785
- m(this, "authService");
2786
- m(this, "gameService");
2787
- m(this, "fileService");
2788
- m(this, "walletService");
2789
- m(this, "accountService");
2790
- m(this, "reportService");
2791
- m(this, "portalService");
2792
- m(this, "sessionManager");
2793
- m(this, "transformer");
2794
- m(this, "logger");
2785
+ d(this, "cmsPortalService");
2786
+ d(this, "authService");
2787
+ d(this, "gameService");
2788
+ d(this, "fileService");
2789
+ d(this, "walletService");
2790
+ d(this, "accountService");
2791
+ d(this, "reportService");
2792
+ d(this, "portalService");
2793
+ d(this, "sessionManager");
2794
+ d(this, "transformer");
2795
+ d(this, "logger");
2795
2796
  const {
2796
2797
  /**/
2797
2798
  site: t,
@@ -2800,16 +2801,16 @@ class Lt {
2800
2801
  environment: s,
2801
2802
  logs: c
2802
2803
  } = e, u = s === "production";
2803
- this.transformer = new Ot({
2804
+ this.transformer = new xt({
2804
2805
  environment: s
2805
- }), this.logger = new ke({
2806
+ }), this.logger = new Ee({
2806
2807
  enabled: c ?? !1
2807
2808
  });
2808
- const l = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", f = u ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", y = u ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", p = u ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", T = u ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", v = u ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", M = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", N = u ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", I = new vt({
2809
- url: N,
2809
+ const l = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", f = 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", p = u ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", _ = u ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", v = u ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", M = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", R = u ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", N = new kt({
2810
+ url: R,
2810
2811
  site: t,
2811
2812
  platform: r
2812
- }), S = {
2813
+ }), b = {
2813
2814
  middlewares: [this.authMiddleware],
2814
2815
  fetchOptions: {
2815
2816
  headers: {
@@ -2817,15 +2818,15 @@ class Lt {
2817
2818
  "Platform-Code": a
2818
2819
  }
2819
2820
  }
2820
- }, R = new Nt(new U(M, S)), D = new Mt(new U(v, S)), C = new Pt(new U(f, S)), P = new _t(new U(p, S)), x = new Rt(new U(y, S)), G = new It(new U(T, S)), _ = new Tt({
2821
+ }, I = new _t(new U(M, b)), D = new Tt(new U(v, b)), E = new Nt(new U(f, b)), P = new Et(new U(p, b)), $ = new Mt(new U(w, b)), x = new vt(new U(_, b)), S = new St({
2821
2822
  url: l,
2822
2823
  platform: a
2823
- }), $ = new Ut({
2824
+ }), G = new $t({
2824
2825
  logs: c,
2825
- authService: _,
2826
- walletService: C
2826
+ authService: S,
2827
+ walletService: E
2827
2828
  });
2828
- this.authService = _, this.gameService = R, this.fileService = D, this.walletService = C, this.accountService = P, this.reportService = x, this.portalService = G, this.sessionManager = $, this.cmsPortalService = I;
2829
+ this.authService = S, this.gameService = I, this.fileService = D, this.walletService = E, this.accountService = P, this.reportService = $, this.portalService = x, this.sessionManager = G, this.cmsPortalService = N;
2829
2830
  }
2830
2831
  get authMiddleware() {
2831
2832
  return async (e) => {
@@ -2839,7 +2840,7 @@ class Lt {
2839
2840
  case "NAME_AND_PASSWORD": {
2840
2841
  const t = await this.sessionManager.create({
2841
2842
  ...e,
2842
- password: await w(e.password)
2843
+ password: await y(e.password)
2843
2844
  });
2844
2845
  return t.ok ? t.data ? {
2845
2846
  ok: !0,
@@ -2866,7 +2867,7 @@ class Lt {
2866
2867
  return await this.sessionManager.createFromAuthenticator({
2867
2868
  type: "SECURITY_QUESTION",
2868
2869
  token: e.token,
2869
- secretAnswer: await w(e.secretAnswer)
2870
+ secretAnswer: await y(e.secretAnswer)
2870
2871
  });
2871
2872
  default:
2872
2873
  return {
@@ -2882,7 +2883,7 @@ class Lt {
2882
2883
  await this.sessionManager.destroy();
2883
2884
  }
2884
2885
  watchSession(e) {
2885
- const t = xt(e.interval ?? 3e4, 3e4, 6e4);
2886
+ const t = It(e.interval ?? 3e4, 3e4, 6e4);
2886
2887
  let r = null;
2887
2888
  const a = () => setTimeout(async () => {
2888
2889
  await this.sessionManager.verify() || await e.onInvalid(), r = a();
@@ -2934,28 +2935,25 @@ class Lt {
2934
2935
  /*+----------------------------------------+*/
2935
2936
  /**/
2936
2937
  async account() {
2937
- const [e, t] = await Promise.all([
2938
- this.accountService.memberAccount(),
2939
- this.reportService.member()
2940
- ]);
2941
- return e.ok ? t.ok ? {
2938
+ const e = await this.accountService.memberAccount();
2939
+ return e.ok ? {
2942
2940
  ok: !0,
2943
- data: this.transformer.transform.account({
2944
- ...e.data,
2945
- ...t.data
2946
- })
2947
- } : { ok: !1, error: t.error } : { ok: !1, error: e.error };
2941
+ data: this.transformer.transform.account(e.data)
2942
+ } : e;
2948
2943
  }
2944
+ /**
2945
+ * @deprecated use `createAccount__next`
2946
+ */
2949
2947
  async createAccount(e) {
2950
- const t = e.id ?? b.generate(A.Account).toString(), r = await this.accountService.registerMemberAccount({
2948
+ const t = e.id ?? k.generate(T.Account).toString(), r = await this.accountService.registerMemberAccount({
2951
2949
  input: {
2952
2950
  id: t,
2953
2951
  btag: e.btag,
2954
2952
  name: e.name,
2955
2953
  domain: e.domain,
2956
2954
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
2957
- password: await w(e.password),
2958
- mobileNumber: E(e.mobileNumber)
2955
+ password: await y(e.password),
2956
+ mobileNumber: A(e.mobileNumber)
2959
2957
  },
2960
2958
  referralCode: e.referralCode,
2961
2959
  verificationCode: e.verificationCode,
@@ -2964,12 +2962,12 @@ class Lt {
2964
2962
  return r.ok ? { ok: !0, data: { id: t } } : r;
2965
2963
  }
2966
2964
  async createAccount__next(e) {
2967
- const t = e.id ?? b.generate(A.Account).toString();
2965
+ const t = e.id ?? k.generate(T.Account).toString();
2968
2966
  if (e.type === "MOBILE_NUMBER") {
2969
2967
  const a = await this.accountService.registerMemberAccountViaMobile({
2970
2968
  input: {
2971
2969
  id: t,
2972
- mobileNumber: E(e.mobileNumber)
2970
+ mobileNumber: A(e.mobileNumber)
2973
2971
  },
2974
2972
  referralCode: e.referralCode,
2975
2973
  reCAPTCHAResponse: e.reCAPTCHAResponse,
@@ -2981,8 +2979,8 @@ class Lt {
2981
2979
  input: {
2982
2980
  id: t,
2983
2981
  name: e.name,
2984
- password: await w(e.password),
2985
- mobileNumber: e.mobileNumber ? E(e.mobileNumber) : void 0
2982
+ password: await y(e.password),
2983
+ mobileNumber: e.mobileNumber ? A(e.mobileNumber) : void 0
2986
2984
  },
2987
2985
  reCAPTCHAResponse: e.reCAPTCHAResponse
2988
2986
  });
@@ -2992,7 +2990,7 @@ class Lt {
2992
2990
  return await this.accountService.registerMayaMemberAccount({
2993
2991
  input: {
2994
2992
  name: e.name,
2995
- password: await w(e.password),
2993
+ password: await y(e.password),
2996
2994
  domain: e.domain
2997
2995
  }
2998
2996
  });
@@ -3003,12 +3001,12 @@ class Lt {
3003
3001
  id: e,
3004
3002
  data: {
3005
3003
  ...t,
3006
- password: t.password ? await w(t.password) : void 0,
3007
- transactionPassword: t.transactionPassword ? await w(t.transactionPassword) : void 0,
3004
+ password: t.password ? await y(t.password) : void 0,
3005
+ transactionPassword: t.transactionPassword ? await y(t.transactionPassword) : void 0,
3008
3006
  ...t.mobileNumber && {
3009
- mobileNumber: E(t.mobileNumber)
3007
+ mobileNumber: A(t.mobileNumber)
3010
3008
  },
3011
- secretAnswer: t.secretAnswer ? await w(t.secretAnswer) : void 0
3009
+ secretAnswer: t.secretAnswer ? await y(t.secretAnswer) : void 0
3012
3010
  }
3013
3011
  }
3014
3012
  });
@@ -3028,7 +3026,7 @@ class Lt {
3028
3026
  } : e;
3029
3027
  }
3030
3028
  async submitVerificationDetails(e) {
3031
- const t = e.id ?? b.generate(A.Verification).toString(), r = await this.accountService.createMemberVerification({
3029
+ const t = e.id ?? k.generate(T.Verification).toString(), r = await this.accountService.createMemberVerification({
3032
3030
  input: {
3033
3031
  id: t,
3034
3032
  ...e
@@ -3049,8 +3047,8 @@ class Lt {
3049
3047
  async resetPassword(e) {
3050
3048
  return await this.accountService.resetPassword({
3051
3049
  input: {
3052
- mobileNumber: E(e.mobileNumber),
3053
- newPassword: await w(e.newPassword)
3050
+ mobileNumber: A(e.mobileNumber),
3051
+ newPassword: await y(e.newPassword)
3054
3052
  },
3055
3053
  verificationCode: e.verificationCode
3056
3054
  });
@@ -3069,16 +3067,22 @@ class Lt {
3069
3067
  data: this.transformer.transform.profileCompletion(e.data)
3070
3068
  } : e;
3071
3069
  }
3070
+ /**
3071
+ * @deprecated use `sendVerificationCode__next`
3072
+ */
3072
3073
  async sendVerificationCode(e) {
3073
3074
  return await this.accountService.sendVerificationCode({
3074
3075
  input: {
3075
3076
  channel: "SMS",
3076
- recipient: E(e)
3077
+ recipient: A(e)
3077
3078
  }
3078
3079
  });
3079
3080
  }
3080
3081
  async sendVerificationCode__next(e) {
3081
- return this.authService.sendVerificationCode(e);
3082
+ return this.authService.sendVerificationCode({
3083
+ channel: "SMS",
3084
+ recipient: A(e)
3085
+ });
3082
3086
  }
3083
3087
  async wallet() {
3084
3088
  const e = await this.walletService.wallet();
@@ -3123,13 +3127,13 @@ class Lt {
3123
3127
  /*+----------------------------------------+*/
3124
3128
  /**/
3125
3129
  async createWithdrawal(e) {
3126
- const t = e.id ?? b.generate(A.Withdrawal).toString();
3130
+ const t = e.id ?? k.generate(T.Withdrawal).toString();
3127
3131
  if (e.type === "BANK") {
3128
3132
  const r = await this.walletService.createBankWithdrawal({
3129
3133
  input: {
3130
3134
  id: t,
3131
3135
  amount: e.amount.toString(),
3132
- transactionPassword: await w(e.transactionPassword)
3136
+ transactionPassword: await y(e.transactionPassword)
3133
3137
  }
3134
3138
  });
3135
3139
  if (!r.ok) return r;
@@ -3139,8 +3143,8 @@ class Lt {
3139
3143
  input: {
3140
3144
  id: t,
3141
3145
  amount: e.amount.toString(),
3142
- transactionPassword: await w(e.transactionPassword),
3143
- recipientMobileNumber: E(e.recipientMobileNumber)
3146
+ transactionPassword: await y(e.transactionPassword),
3147
+ recipientMobileNumber: A(e.recipientMobileNumber)
3144
3148
  }
3145
3149
  });
3146
3150
  if (!r.ok) return r;
@@ -3150,8 +3154,8 @@ class Lt {
3150
3154
  input: {
3151
3155
  id: t,
3152
3156
  amount: e.amount.toString(),
3153
- transactionPassword: await w(e.transactionPassword),
3154
- recipientMobileNumber: E(e.recipientMobileNumber)
3157
+ transactionPassword: await y(e.transactionPassword),
3158
+ recipientMobileNumber: A(e.recipientMobileNumber)
3155
3159
  }
3156
3160
  });
3157
3161
  if (!r.ok) return r;
@@ -3161,7 +3165,7 @@ class Lt {
3161
3165
  input: {
3162
3166
  id: t,
3163
3167
  amount: e.amount.toString(),
3164
- transactionPassword: await w(e.transactionPassword)
3168
+ transactionPassword: await y(e.transactionPassword)
3165
3169
  }
3166
3170
  });
3167
3171
  if (!r.ok) return r;
@@ -3192,7 +3196,7 @@ class Lt {
3192
3196
  /*+----------------------------------------+*/
3193
3197
  /**/
3194
3198
  async createDeposit(e) {
3195
- const t = e.id ?? b.generate(A.Deposit).toString();
3199
+ const t = e.id ?? k.generate(T.Deposit).toString();
3196
3200
  if (e.type === "MAYA") {
3197
3201
  const r = await this.walletService.createMayaDeposit({
3198
3202
  input: {
@@ -3357,51 +3361,15 @@ class Lt {
3357
3361
  /*+ GAME +*/
3358
3362
  /*+----------------------------------------+*/
3359
3363
  /**/
3360
- /** @deprecated use `game__next` */
3361
3364
  async game(e) {
3362
- return this.game__next(e);
3363
- }
3364
- async game__next(e) {
3365
3365
  const t = await this.cmsPortalService.game(e);
3366
3366
  return t.ok ? {
3367
3367
  ok: !0,
3368
- data: t.data ? this.transformer.transform.game__next(t.data) : null
3368
+ data: t.data ? this.transformer.transform.game(t.data) : null
3369
3369
  } : t;
3370
3370
  }
3371
- /** @deprecated use `games__next` */
3372
3371
  async games(e) {
3373
- const t = await this.walletService.games(e);
3374
- return t.ok ? {
3375
- ok: !0,
3376
- data: {
3377
- games: t.data.edges.map(({ cursor: r, node: a }) => ({
3378
- ...this.transformer.transform.game(a),
3379
- cursor: r
3380
- })),
3381
- totalCount: t.data.totalCount,
3382
- hasNextPage: t.data.pageInfo.hasNextPage,
3383
- endCursor: t.data.pageInfo.endCursor ?? void 0
3384
- }
3385
- } : t;
3386
- }
3387
- async games__next(e) {
3388
3372
  const t = await this.cmsPortalService.games(e);
3389
- return t.ok ? {
3390
- ok: !0,
3391
- data: {
3392
- games: t.data.edges.map(({ cursor: r, node: a }) => ({
3393
- ...this.transformer.transform.game__next(a),
3394
- cursor: r
3395
- })),
3396
- totalCount: t.data.totalCount,
3397
- hasNextPage: t.data.pageInfo.hasNextPage,
3398
- endCursor: t.data.pageInfo.endCursor ?? void 0
3399
- }
3400
- } : t;
3401
- }
3402
- /** @deprecated use `games__next` */
3403
- async games__legacy(e) {
3404
- const t = await this.gameService.games(e);
3405
3373
  return t.ok ? {
3406
3374
  ok: !0,
3407
3375
  data: {
@@ -3415,39 +3383,7 @@ class Lt {
3415
3383
  }
3416
3384
  } : t;
3417
3385
  }
3418
- /** @deprecated use `games__next` */
3419
- async gamesByName(e) {
3420
- const t = await this.walletService.gamesByName(e);
3421
- return t.ok ? {
3422
- ok: !0,
3423
- data: t.data.map(this.transformer.transform.game)
3424
- } : t;
3425
- }
3426
- /** @deprecated use `games__next` */
3427
- async gamesByName__legacy(e) {
3428
- const t = await this.gameService.gamesByName(e);
3429
- return t.ok ? {
3430
- ok: !0,
3431
- data: t.data.map(this.transformer.transform.game)
3432
- } : t;
3433
- }
3434
- /** @deprecated use `gameSession__next` */
3435
3386
  async gameSession(e) {
3436
- const t = await this.walletService.gameSession({ id: e });
3437
- return t.ok ? {
3438
- ok: !0,
3439
- data: t.data ? this.transformer.transform.gameSession(t.data) : null
3440
- } : t;
3441
- }
3442
- /** @deprecated use `gameSession__next` */
3443
- async gameSession__legacy(e) {
3444
- const t = await this.gameService.gameSession({ id: e });
3445
- return t.ok ? {
3446
- ok: !0,
3447
- data: t.data ? this.transformer.transform.gameSession(t.data) : null
3448
- } : t;
3449
- }
3450
- async gameSession__next(e) {
3451
3387
  const t = await this.walletService.gameSession({ id: e });
3452
3388
  if (!t.ok) return t;
3453
3389
  if (t.data)
@@ -3462,18 +3398,9 @@ class Lt {
3462
3398
  } : r;
3463
3399
  }
3464
3400
  async createGameSession(e) {
3465
- const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3466
- return r.ok ? { ok: !0, data: { id: t } } : r;
3467
- }
3468
- /** @deprecated use `createGameSession__next` */
3469
- async createGameSession__legacy(e) {
3470
- const t = e.id ?? b.generate(A.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3471
- return r.ok ? { ok: !0, data: { id: t } } : r;
3472
- }
3473
- async createGameSession__next(e) {
3474
- const t = e.id ?? b.generate(A.GameSession).toString();
3401
+ const t = e.id ?? k.generate(T.GameSession).toString();
3475
3402
  if (e.game.startsWith("SPORTS:")) {
3476
- const u = await b.generateFromKey(A.Game, e.game).then(
3403
+ const u = await k.generateFromKey(T.Game, e.game).then(
3477
3404
  (f) => f.toString()
3478
3405
  ), l = await this.gameService.createGameSession({
3479
3406
  input: {
@@ -3483,7 +3410,7 @@ class Lt {
3483
3410
  });
3484
3411
  return l.ok ? { ok: !0, data: { id: t } } : l;
3485
3412
  }
3486
- const r = await this.game__next(e.game);
3413
+ const r = await this.game(e.game);
3487
3414
  if (!r.data)
3488
3415
  return {
3489
3416
  ok: !1,
@@ -3496,18 +3423,10 @@ class Lt {
3496
3423
  /**/
3497
3424
  provider: a,
3498
3425
  reference: s
3499
- } = r.data, c = Bt(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3426
+ } = r.data, c = Ut(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3500
3427
  return c.ok ? { ok: !0, data: { id: t } } : c;
3501
3428
  }
3502
- /** @deprecated use `endGameSession__next` */
3503
3429
  async endGameSession(e) {
3504
- return await this.walletService.endGameSession({ input: { id: e } });
3505
- }
3506
- /** @deprecated use `endGameSession__next` */
3507
- async endGameSession__legacy(e) {
3508
- return await this.gameService.endGameSession({ input: { id: e } });
3509
- }
3510
- async endGameSession__next(e) {
3511
3430
  const t = await this.walletService.endGameSession({ input: { id: e } });
3512
3431
  return t.ok ? t : await this.gameService.endGameSession({ input: { id: e } });
3513
3432
  }
@@ -3524,7 +3443,7 @@ class Lt {
3524
3443
  } : t;
3525
3444
  }
3526
3445
  async uploadImageFile(e) {
3527
- const t = e.id ?? b.generate(A.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3446
+ const t = e.id ?? k.generate(T.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3528
3447
  input: {
3529
3448
  id: t,
3530
3449
  file: e.file
@@ -3607,7 +3526,22 @@ class Lt {
3607
3526
  ok: !0,
3608
3527
  data: {
3609
3528
  referrals: t.data.edges.map(({ cursor: r, node: a }) => ({
3610
- ...this.transformer.transform.referrals(a),
3529
+ ...this.transformer.transform.referral(a),
3530
+ cursor: r
3531
+ })),
3532
+ totalCount: t.data.totalCount,
3533
+ hasNextPage: t.data.pageInfo.hasNextPage,
3534
+ endCursor: t.data.pageInfo.endCursor ?? void 0
3535
+ }
3536
+ } : t;
3537
+ }
3538
+ async referralCommissions(e) {
3539
+ const t = await this.reportService.referralCommissions(e);
3540
+ return t.ok ? {
3541
+ ok: !0,
3542
+ data: {
3543
+ referralCommissions: t.data.edges.map(({ cursor: r, node: a }) => ({
3544
+ ...this.transformer.transform.referralCommission(a),
3611
3545
  cursor: r
3612
3546
  })),
3613
3547
  totalCount: t.data.totalCount,
@@ -3617,7 +3551,7 @@ class Lt {
3617
3551
  } : t;
3618
3552
  }
3619
3553
  }
3620
- const Wt = [
3554
+ const Gt = [
3621
3555
  /**/
3622
3556
  "RTG",
3623
3557
  "DARWIN",
@@ -3627,12 +3561,12 @@ const Wt = [
3627
3561
  "EVOLUTION_NETENT",
3628
3562
  "EVOLUTION_REDTIGER"
3629
3563
  ];
3630
- function Bt(n) {
3631
- return Wt.some((e) => e === n);
3564
+ function Ut(o) {
3565
+ return Gt.some((e) => e === o);
3632
3566
  }
3633
3567
  export {
3634
- Yt as ObjectId,
3635
- A as ObjectType,
3636
- Lt as Sdk
3568
+ Lt as ObjectId,
3569
+ T as ObjectType,
3570
+ qt as Sdk
3637
3571
  };
3638
3572
  //# sourceMappingURL=index.mjs.map