@opexa/portal-sdk 0.0.29 → 0.0.31

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,8 +1,8 @@
1
- var Ce = Object.defineProperty;
2
- var Te = (n, e, t) => e in n ? Ce(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);
1
+ var _e = Object.defineProperty;
2
+ var Te = (o, e, t) => e in o ? _e(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
4
  import { ObjectId as b } from "@opexa/object-id";
5
- import { ObjectId as Gt } from "@opexa/object-id";
5
+ import { ObjectId as $t } from "@opexa/object-id";
6
6
  const S = {
7
7
  Account: 8,
8
8
  Deposit: 9,
@@ -13,22 +13,22 @@ const S = {
13
13
  GameSession: 204,
14
14
  MayaSession: 230
15
15
  };
16
- function i(n, ...e) {
16
+ function n(o, ...e) {
17
17
  let t = "";
18
- for (const [a, r] of n.entries()) {
19
- const s = e.at(a) ?? "";
20
- t = `${t}${r}${s}`;
18
+ for (const [a, r] of o.entries()) {
19
+ const c = e.at(a) ?? "";
20
+ t = `${t}${r}${c}`;
21
21
  }
22
22
  return t.trim();
23
23
  }
24
- const x = i`
24
+ const x = n`
25
25
  fragment FileFragment on File {
26
26
  id
27
27
  url
28
28
  status
29
29
  dateTimeCreated
30
30
  }
31
- `, ve = i`
31
+ `, ve = n`
32
32
  ${x}
33
33
 
34
34
  query File($id: ObjectId!) {
@@ -38,7 +38,7 @@ const x = i`
38
38
  }
39
39
  }
40
40
  }
41
- `, Ne = i`
41
+ `, Ne = n`
42
42
  mutation UploadPrivateImageFile($input: UploadFileInput!) {
43
43
  uploadPrivateImageFile(input: $input) {
44
44
  ... on FileFormatNotSupportedError {
@@ -52,7 +52,7 @@ const x = i`
52
52
  }
53
53
  }
54
54
  }
55
- `, Me = i`
55
+ `, Me = n`
56
56
  query Wallet {
57
57
  wallet {
58
58
  id
@@ -62,7 +62,7 @@ const x = i`
62
62
  dateTimeLastUpdated
63
63
  }
64
64
  }
65
- `, De = i`
65
+ `, Ie = n`
66
66
  query PointsWallet {
67
67
  pointsWallet {
68
68
  id
@@ -71,7 +71,7 @@ const x = i`
71
71
  dateTimeCreated
72
72
  }
73
73
  }
74
- `, Ie = i`
74
+ `, De = n`
75
75
  mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
76
76
  pointsToCashConversion(input: $input) {
77
77
  ... on InsufficientPointsError {
@@ -79,7 +79,7 @@ const x = i`
79
79
  }
80
80
  }
81
81
  }
82
- `, Re = i`
82
+ `, Re = n`
83
83
  query PointsWalletTransactions(
84
84
  $first: Int
85
85
  $after: Cursor
@@ -107,7 +107,7 @@ const x = i`
107
107
  }
108
108
  }
109
109
  }
110
- `, ye = i`
110
+ `, ye = n`
111
111
  query Games($first: Int, $after: Cursor, $filter: GameFilterInput) {
112
112
  games(first: $first, after: $after, filter: $filter) {
113
113
  edges {
@@ -128,7 +128,7 @@ const x = i`
128
128
  }
129
129
  }
130
130
  }
131
- `, ge = i`
131
+ `, ge = n`
132
132
  query GamesByName($first: Int, $search: String!, $filter: GameFilterInput) {
133
133
  gamesByName(first: $first, search: $search, filter: $filter) {
134
134
  ... on Game {
@@ -139,7 +139,7 @@ const x = i`
139
139
  }
140
140
  }
141
141
  }
142
- `, be = i`
142
+ `, be = n`
143
143
  query GameSession($id: ObjectId!) {
144
144
  node(id: $id) {
145
145
  ... on GameSession {
@@ -151,7 +151,7 @@ const x = i`
151
151
  }
152
152
  }
153
153
  }
154
- `, Se = i`
154
+ `, Se = n`
155
155
  mutation CreateGameSession($input: CreateGameSessionInput!) {
156
156
  createGameSession(input: $input) {
157
157
  ... on GameDoesNotExistError {
@@ -159,11 +159,11 @@ const x = i`
159
159
  }
160
160
  }
161
161
  }
162
- `, Pe = i`
162
+ `, Pe = n`
163
163
  mutation EndGameSession($input: EndGameSessionInput!) {
164
164
  endGameSession(input: $input)
165
165
  }
166
- `, xe = i`
166
+ `, xe = n`
167
167
  mutation EndGameSession($input: EndGameSessionInput!) {
168
168
  endGameSession(input: $input) {
169
169
  ... on GameSessionDoesNotExistError {
@@ -177,7 +177,7 @@ const x = i`
177
177
  }
178
178
  }
179
179
  }
180
- `, Ge = i`
180
+ `, Ge = n`
181
181
  query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
182
182
  announcements(first: $first, after: $after, filter: $filter) {
183
183
  edges {
@@ -203,7 +203,7 @@ const x = i`
203
203
  }
204
204
  }
205
205
  }
206
- `, We = i`
206
+ `, $e = n`
207
207
  query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
208
208
  member {
209
209
  withdrawalRecords(first: $first, after: $after, filter: $filter) {
@@ -270,7 +270,7 @@ const x = i`
270
270
  }
271
271
  }
272
272
  }
273
- `, $e = i`
273
+ `, We = n`
274
274
  mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
275
275
  createGCashWithdrawal(input: $input) {
276
276
  ... on AccountNotVerifiedError {
@@ -293,7 +293,7 @@ const x = i`
293
293
  }
294
294
  }
295
295
  }
296
- `, Be = i`
296
+ `, Be = n`
297
297
  mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
298
298
  createMayaWithdrawal(input: $input) {
299
299
  ... on AccountNotVerifiedError {
@@ -316,7 +316,7 @@ const x = i`
316
316
  }
317
317
  }
318
318
  }
319
- `, Ue = i`
319
+ `, Ue = n`
320
320
  mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
321
321
  createMayaAppWithdrawal(input: $input) {
322
322
  ... on AccountNotVerifiedError {
@@ -336,7 +336,7 @@ const x = i`
336
336
  }
337
337
  }
338
338
  }
339
- `, Oe = i`
339
+ `, Oe = n`
340
340
  mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
341
341
  createBankWithdrawal(input: $input) {
342
342
  ... on MobileNumberNotVerifiedError {
@@ -359,11 +359,11 @@ const x = i`
359
359
  }
360
360
  }
361
361
  }
362
- `, qe = i`
362
+ `, qe = n`
363
363
  query RemainingDailyWithdrawalsCount {
364
364
  remainingDailyWithdrawalsCount
365
365
  }
366
- `, Fe = i`
366
+ `, Fe = n`
367
367
  query DepositRecords($after: Cursor, $first: Int, $filter: DepositRecordFilterInput) {
368
368
  member {
369
369
  depositRecords(after: $after, first: $first, filter: $filter) {
@@ -392,7 +392,7 @@ const x = i`
392
392
  }
393
393
  }
394
394
  }
395
- `, Le = i`
395
+ `, Le = n`
396
396
  mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
397
397
  createGCashDeposit(input: $input) {
398
398
  ... on DepositPromoMaximumAmountExceededError {
@@ -421,7 +421,7 @@ const x = i`
421
421
  }
422
422
  }
423
423
  }
424
- `, Ve = i`
424
+ `, Ve = n`
425
425
  mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
426
426
  createMayaDeposit(input: $input) {
427
427
  ... on DepositPromoMaximumAmountExceededError {
@@ -450,7 +450,7 @@ const x = i`
450
450
  }
451
451
  }
452
452
  }
453
- `, Ye = i`
453
+ `, Ye = n`
454
454
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
455
455
  createMayaAppDeposit(input: $input) {
456
456
  ... on DepositPromoMaximumAmountExceededError {
@@ -479,7 +479,7 @@ const x = i`
479
479
  }
480
480
  }
481
481
  }
482
- `, He = i`
482
+ `, He = n`
483
483
  query Deposit($id: ObjectId!) {
484
484
  node(id: $id) {
485
485
  ... on GCashDeposit {
@@ -511,13 +511,13 @@ const x = i`
511
511
  }
512
512
  }
513
513
  }
514
- `, je = i`
514
+ `, je = n`
515
515
  query DepositsCount {
516
516
  member {
517
517
  depositsCount
518
518
  }
519
519
  }
520
- `, Qe = i`
520
+ `, Qe = n`
521
521
  query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
522
522
  member {
523
523
  betRecords(first: $first, after: $after, filter: $filter) {
@@ -557,7 +557,7 @@ const x = i`
557
557
  }
558
558
  }
559
559
  }
560
- `, Ke = i`
560
+ `, Ke = n`
561
561
  query LatestBetRecords {
562
562
  latestBetRecords {
563
563
  id
@@ -576,7 +576,7 @@ const x = i`
576
576
  dateTimeCreated
577
577
  }
578
578
  }
579
- `, ze = i`
579
+ `, ze = n`
580
580
  query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
581
581
  member {
582
582
  transactionRecords(first: $first, after: $after, filter: $filter) {
@@ -602,7 +602,7 @@ const x = i`
602
602
  }
603
603
  }
604
604
  }
605
- `, $ = i`
605
+ `, W = n`
606
606
  ${x}
607
607
 
608
608
  fragment PromoFragment on Promo {
@@ -621,23 +621,23 @@ const x = i`
621
621
  dateTimeCreated
622
622
  dateTimeLastUpdated
623
623
  }
624
- `, Je = i`
625
- ${$}
624
+ `, Je = n`
625
+ ${W}
626
626
 
627
627
  query Promos {
628
628
  promos {
629
629
  ...PromoFragment
630
630
  }
631
631
  }
632
- `, Xe = i`
633
- ${$}
632
+ `, Xe = n`
633
+ ${W}
634
634
 
635
635
  query AvailablePromos($filter: PromoFilterInput) {
636
636
  availablePromos(filter: $filter) {
637
637
  ...PromoFragment
638
638
  }
639
639
  }
640
- `, Ee = i`
640
+ `, Ee = n`
641
641
  ${x}
642
642
 
643
643
  fragment CashbackFragment on Cashback {
@@ -653,7 +653,7 @@ const x = i`
653
653
  dateTimeCreated
654
654
  dateTimeLastUpdated
655
655
  }
656
- `, Ze = i`
656
+ `, Ze = n`
657
657
  ${Ee}
658
658
 
659
659
  query Cashbacks {
@@ -661,8 +661,8 @@ const x = i`
661
661
  ...CashbackFragment
662
662
  }
663
663
  }
664
- `, et = i`
665
- ${$}
664
+ `, et = n`
665
+ ${W}
666
666
 
667
667
  query Bonus {
668
668
  bonus {
@@ -690,7 +690,7 @@ const x = i`
690
690
  dateTimeLastUpdated
691
691
  }
692
692
  }
693
- `, tt = i`
693
+ `, tt = n`
694
694
  ${Ee}
695
695
 
696
696
  query CashbackBonuses {
@@ -704,7 +704,7 @@ const x = i`
704
704
  dateTimeLastUpdated
705
705
  }
706
706
  }
707
- `, at = i`
707
+ `, at = n`
708
708
  mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
709
709
  claimCashbackBonus(input: $input) {
710
710
  ... on CashbackBonusDoesNotExistError {
@@ -712,13 +712,13 @@ const x = i`
712
712
  }
713
713
  }
714
714
  }
715
- `, rt = i`
715
+ `, rt = n`
716
716
  query Member {
717
717
  member {
718
718
  dateTimeLastActive
719
719
  }
720
720
  }
721
- `, nt = i`
721
+ `, ot = n`
722
722
  query MemberAccount {
723
723
  memberAccount: self {
724
724
  ... on MemberAccount {
@@ -742,7 +742,7 @@ const x = i`
742
742
  }
743
743
  }
744
744
  }
745
- `, ot = i`
745
+ `, nt = n`
746
746
  ${x}
747
747
 
748
748
  query MemberVerification {
@@ -766,7 +766,7 @@ const x = i`
766
766
  }
767
767
  }
768
768
  }
769
- `, it = i`
769
+ `, it = n`
770
770
  mutation RegisterMemberAccount(
771
771
  $input: RegisterMemberAccountInput!
772
772
  $referralCode: String
@@ -802,7 +802,7 @@ const x = i`
802
802
  }
803
803
  }
804
804
  }
805
- `, st = i`
805
+ `, st = n`
806
806
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
807
807
  updateMemberAccount(input: $input) {
808
808
  ... on AccountNameNotAvailableError {
@@ -828,7 +828,7 @@ const x = i`
828
828
  }
829
829
  }
830
830
  }
831
- `, ct = i`
831
+ `, ct = n`
832
832
  mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
833
833
  resetPassword(input: $input, verificationCode: $verificationCode) {
834
834
  ... on AccountNotFoundError {
@@ -839,11 +839,11 @@ const x = i`
839
839
  }
840
840
  }
841
841
  }
842
- `, mt = i`
842
+ `, dt = n`
843
843
  mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
844
844
  deleteMemberAccount(input: $input)
845
845
  }
846
- `, dt = i`
846
+ `, mt = n`
847
847
  mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
848
848
  verifyMobileNumber(input: $input) {
849
849
  ... on InvalidSMSVerificationCodeError {
@@ -854,7 +854,7 @@ const x = i`
854
854
  }
855
855
  }
856
856
  }
857
- `, ut = i`
857
+ `, ut = n`
858
858
  mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
859
859
  createMemberVerification(input: $input) {
860
860
  ... on FileDoesNotExistError {
@@ -868,7 +868,7 @@ const x = i`
868
868
  }
869
869
  }
870
870
  }
871
- `, lt = i`
871
+ `, lt = n`
872
872
  mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
873
873
  updateMemberVerification(input: $input) {
874
874
  ... on FileDoesNotExistError {
@@ -885,7 +885,7 @@ const x = i`
885
885
  }
886
886
  }
887
887
  }
888
- `, pt = i`
888
+ `, pt = n`
889
889
  query ProfileCompletion {
890
890
  profileCompletion {
891
891
  completionPercentage
@@ -896,7 +896,7 @@ const x = i`
896
896
  accountPassword
897
897
  }
898
898
  }
899
- `, ft = i`
899
+ `, ft = n`
900
900
  mutation SendVerificationCode($input: SendVerificationCodeInput!) {
901
901
  sendVerificationCode(input: $input) {
902
902
  ... on InvalidPlatformError {
@@ -907,7 +907,7 @@ const x = i`
907
907
  }
908
908
  }
909
909
  }
910
- `, ht = i`
910
+ `, ht = n`
911
911
  fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
912
912
  minimumAmount
913
913
  maximumAmount
@@ -961,7 +961,7 @@ const x = i`
961
961
  multiplier
962
962
  }
963
963
  }
964
- `, wt = i`
964
+ `, wt = n`
965
965
  query MayaSession($id: ObjectId!) {
966
966
  mayaSession(id: $id) {
967
967
  id
@@ -969,10 +969,33 @@ const x = i`
969
969
  dateTimeCreated
970
970
  }
971
971
  }
972
+ `, yt = n`
973
+ query ActivityRecords($after: Cursor, $first: Int, $filter: ActivityRecordsFilterInput) {
974
+ member {
975
+ activityRecords(after: $after, first: $first, filter: $filter) {
976
+ edges {
977
+ cursor
978
+ node {
979
+ ... on MemberActivity {
980
+ id
981
+ type
982
+ details
983
+ dateTimeCreated
984
+ }
985
+ }
986
+ }
987
+ totalCount
988
+ pageInfo {
989
+ hasNextPage
990
+ endCursor
991
+ }
992
+ }
993
+ }
994
+ }
972
995
  `;
973
- function d(n) {
996
+ function m(o) {
974
997
  return {
975
- name: n,
998
+ name: o,
976
999
  message: {
977
1000
  AccountNameNotAvailableError: "Username is no longer available",
978
1001
  AccountNotFoundError: "Account does not exist",
@@ -1021,17 +1044,17 @@ function d(n) {
1021
1044
  InvalidToken: "Invalid token",
1022
1045
  InvalidTokenOrSecretAnswer: "Invalid token or secret answer",
1023
1046
  SessionExpired: "Session expired"
1024
- }[n]
1047
+ }[o]
1025
1048
  };
1026
1049
  }
1027
- class yt {
1050
+ class gt {
1028
1051
  constructor(e) {
1029
- m(this, "client");
1052
+ d(this, "client");
1030
1053
  this.client = e;
1031
1054
  }
1032
1055
  /** aka `Query.self` */
1033
1056
  async memberAccount() {
1034
- const e = await this.client.request(nt);
1057
+ const e = await this.client.request(ot);
1035
1058
  return e.ok ? {
1036
1059
  ok: !0,
1037
1060
  data: e.data.memberAccount
@@ -1041,7 +1064,7 @@ class yt {
1041
1064
  const t = await this.client.request(it, e);
1042
1065
  return t.ok ? t.data.registerMemberAccount ? {
1043
1066
  ok: !1,
1044
- error: d(t.data.registerMemberAccount.__typename)
1067
+ error: m(t.data.registerMemberAccount.__typename)
1045
1068
  } : {
1046
1069
  ok: !0
1047
1070
  } : t;
@@ -1050,13 +1073,13 @@ class yt {
1050
1073
  const t = await this.client.request(st, e);
1051
1074
  return t.ok ? t.data.updateMemberAccount ? {
1052
1075
  ok: !1,
1053
- error: d(t.data.updateMemberAccount.__typename)
1076
+ error: m(t.data.updateMemberAccount.__typename)
1054
1077
  } : {
1055
1078
  ok: !0
1056
1079
  } : t;
1057
1080
  }
1058
1081
  async deleteMemberAccount(e) {
1059
- const t = await this.client.request(mt, e);
1082
+ const t = await this.client.request(dt, e);
1060
1083
  return t.ok ? t.data.deleteMemberAccount ? {
1061
1084
  ok: !0
1062
1085
  } : {
@@ -1074,7 +1097,7 @@ class yt {
1074
1097
  );
1075
1098
  return t.ok ? t.data.resetPassword ? {
1076
1099
  ok: !1,
1077
- error: d(t.data.resetPassword.__typename)
1100
+ error: m(t.data.resetPassword.__typename)
1078
1101
  } : {
1079
1102
  ok: !0
1080
1103
  } : t;
@@ -1090,16 +1113,16 @@ class yt {
1090
1113
  const t = await this.client.request(ft, e);
1091
1114
  return t.ok ? t.data.sendVerificationCode ? {
1092
1115
  ok: !1,
1093
- error: d(t.data.sendVerificationCode.__typename)
1116
+ error: m(t.data.sendVerificationCode.__typename)
1094
1117
  } : {
1095
1118
  ok: !0
1096
1119
  } : t;
1097
1120
  }
1098
1121
  async verifyMobileNumber(e) {
1099
- const t = await this.client.request(dt, e);
1122
+ const t = await this.client.request(mt, e);
1100
1123
  return t.ok ? t.data.verifyMobileNumber ? {
1101
1124
  ok: !1,
1102
- error: d(t.data.verifyMobileNumber.__typename)
1125
+ error: m(t.data.verifyMobileNumber.__typename)
1103
1126
  } : {
1104
1127
  ok: !0
1105
1128
  } : t;
@@ -1108,7 +1131,7 @@ class yt {
1108
1131
  const t = await this.client.request(ut, e);
1109
1132
  return t.ok ? t.data.createMemberVerification ? {
1110
1133
  ok: !1,
1111
- error: d(t.data.createMemberVerification.__typename)
1134
+ error: m(t.data.createMemberVerification.__typename)
1112
1135
  } : {
1113
1136
  ok: !0
1114
1137
  } : t;
@@ -1117,13 +1140,13 @@ class yt {
1117
1140
  const t = await this.client.request(lt, e);
1118
1141
  return t.ok ? t.data.updateMemberVerification ? {
1119
1142
  ok: !1,
1120
- error: d(t.data.updateMemberVerification.__typename)
1143
+ error: m(t.data.updateMemberVerification.__typename)
1121
1144
  } : {
1122
1145
  ok: !0
1123
1146
  } : t;
1124
1147
  }
1125
1148
  async memberVerification() {
1126
- const e = await this.client.request(ot);
1149
+ const e = await this.client.request(nt);
1127
1150
  return e.ok ? {
1128
1151
  ok: !0,
1129
1152
  data: e.data.memberAccount.verification
@@ -1140,8 +1163,8 @@ class yt {
1140
1163
  } : t;
1141
1164
  }
1142
1165
  }
1143
- function h(n, e) {
1144
- const t = G[n] ? G[n] : G[500];
1166
+ function f(o, e) {
1167
+ const t = G[o] ? G[o] : G[500];
1145
1168
  return {
1146
1169
  name: t.name,
1147
1170
  message: e ?? t.message
@@ -1156,10 +1179,10 @@ const G = {
1156
1179
  429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1157
1180
  500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1158
1181
  };
1159
- class gt {
1182
+ class bt {
1160
1183
  constructor(e) {
1161
- m(this, "url");
1162
- m(this, "platform");
1184
+ d(this, "url");
1185
+ d(this, "platform");
1163
1186
  this.url = e.url, this.platform = e.platform;
1164
1187
  }
1165
1188
  async createSession(e) {
@@ -1187,15 +1210,15 @@ class gt {
1187
1210
  data: r
1188
1211
  } : r.code === "ACCOUNT_BLACKLISTED" ? {
1189
1212
  ok: !1,
1190
- error: d("AccountBlacklisted")
1213
+ error: m("AccountBlacklisted")
1191
1214
  } : {
1192
1215
  ok: !1,
1193
- error: h(a.status)
1216
+ error: f(a.status)
1194
1217
  };
1195
1218
  } catch {
1196
1219
  return {
1197
1220
  ok: !1,
1198
- error: h(500)
1221
+ error: f(500)
1199
1222
  };
1200
1223
  }
1201
1224
  }
@@ -1220,15 +1243,15 @@ class gt {
1220
1243
  data: r
1221
1244
  } : a.status === 401 || a.status === 403 ? {
1222
1245
  ok: !1,
1223
- error: d("InvalidTokenOrSecretAnswer")
1246
+ error: m("InvalidTokenOrSecretAnswer")
1224
1247
  } : {
1225
1248
  ok: !1,
1226
- error: h(a.status)
1249
+ error: f(a.status)
1227
1250
  };
1228
1251
  } catch {
1229
1252
  return {
1230
1253
  ok: !1,
1231
- error: h(500)
1254
+ error: f(500)
1232
1255
  };
1233
1256
  }
1234
1257
  }
@@ -1250,18 +1273,18 @@ class gt {
1250
1273
  data: a
1251
1274
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1252
1275
  ok: !1,
1253
- error: d("AccountBlacklisted")
1276
+ error: m("AccountBlacklisted")
1254
1277
  } : t.status === 403 || t.status === 401 ? {
1255
1278
  ok: !1,
1256
- error: d("InvalidToken")
1279
+ error: m("InvalidToken")
1257
1280
  } : {
1258
1281
  ok: !1,
1259
- error: h(t.status)
1282
+ error: f(t.status)
1260
1283
  };
1261
1284
  } catch {
1262
1285
  return {
1263
1286
  ok: !1,
1264
- error: h(500)
1287
+ error: f(500)
1265
1288
  };
1266
1289
  }
1267
1290
  }
@@ -1276,9 +1299,9 @@ class gt {
1276
1299
  Authorization: `Bearer ${e}`
1277
1300
  }
1278
1301
  });
1279
- return t.ok ? { ok: !0 } : { ok: !1, error: h(t.status) };
1302
+ return t.ok ? { ok: !0 } : { ok: !1, error: f(t.status) };
1280
1303
  } catch {
1281
- return { ok: !1, error: h(500) };
1304
+ return { ok: !1, error: f(500) };
1282
1305
  }
1283
1306
  }
1284
1307
  async verifySession(e) {
@@ -1297,9 +1320,9 @@ class gt {
1297
1320
  }
1298
1321
  }
1299
1322
  }
1300
- class bt {
1323
+ class St {
1301
1324
  constructor(e) {
1302
- m(this, "client");
1325
+ d(this, "client");
1303
1326
  this.client = e;
1304
1327
  }
1305
1328
  async file(e) {
@@ -1313,15 +1336,15 @@ class bt {
1313
1336
  const t = await this.client.upload(Ne, e);
1314
1337
  return t.ok ? t.data.uploadPrivateImageFile ? {
1315
1338
  ok: !1,
1316
- error: d(t.data.uploadPrivateImageFile.__typename)
1339
+ error: m(t.data.uploadPrivateImageFile.__typename)
1317
1340
  } : {
1318
1341
  ok: !0
1319
1342
  } : t;
1320
1343
  }
1321
1344
  }
1322
- class St {
1345
+ class Et {
1323
1346
  constructor(e) {
1324
- m(this, "client");
1347
+ d(this, "client");
1325
1348
  this.client = e;
1326
1349
  }
1327
1350
  async betRecords(e) {
@@ -1337,7 +1360,7 @@ class St {
1337
1360
  }
1338
1361
  async withdrawalRecords(e) {
1339
1362
  const t = await this.client.request(
1340
- We,
1363
+ $e,
1341
1364
  e
1342
1365
  );
1343
1366
  return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
@@ -1361,10 +1384,17 @@ class St {
1361
1384
  const t = await this.client.request(Re, e);
1362
1385
  return t.ok ? { ok: t.ok, data: t.data.member.pointsWalletTransactions } : t;
1363
1386
  }
1387
+ async activityRecords(e) {
1388
+ const t = await this.client.request(
1389
+ yt,
1390
+ e
1391
+ );
1392
+ return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
1393
+ }
1364
1394
  }
1365
- class Et {
1395
+ class At {
1366
1396
  constructor(e) {
1367
- m(this, "url");
1397
+ d(this, "url");
1368
1398
  this.url = e.url;
1369
1399
  }
1370
1400
  gameThumbnails(e) {
@@ -1376,7 +1406,7 @@ class Et {
1376
1406
  }
1377
1407
  class Ae {
1378
1408
  constructor(e) {
1379
- m(this, "client");
1409
+ d(this, "client");
1380
1410
  this.client = e;
1381
1411
  }
1382
1412
  async promos() {
@@ -1402,7 +1432,7 @@ class Ae {
1402
1432
  const t = await this.client.request(at, e);
1403
1433
  return t.ok ? t.data.claimCashbackBonus ? {
1404
1434
  ok: !1,
1405
- error: d(t.data.claimCashbackBonus.__typename)
1435
+ error: m(t.data.claimCashbackBonus.__typename)
1406
1436
  } : {
1407
1437
  ok: !0
1408
1438
  } : {
@@ -1429,7 +1459,7 @@ class Ae {
1429
1459
  const t = await this.client.request(Le, e);
1430
1460
  return t.ok ? t.data.createGCashDeposit ? {
1431
1461
  ok: !1,
1432
- error: d(t.data.createGCashDeposit.__typename)
1462
+ error: m(t.data.createGCashDeposit.__typename)
1433
1463
  } : {
1434
1464
  ok: !0
1435
1465
  } : t;
@@ -1438,7 +1468,7 @@ class Ae {
1438
1468
  const t = await this.client.request(Ve, e);
1439
1469
  return t.ok ? t.data.createMayaDeposit ? {
1440
1470
  ok: !1,
1441
- error: d(t.data.createMayaDeposit.__typename)
1471
+ error: m(t.data.createMayaDeposit.__typename)
1442
1472
  } : {
1443
1473
  ok: !0
1444
1474
  } : t;
@@ -1447,16 +1477,16 @@ class Ae {
1447
1477
  const t = await this.client.request(Ye, e);
1448
1478
  return t.ok ? t.data.createMayaAppDeposit ? {
1449
1479
  ok: !1,
1450
- error: d(t.data.createMayaAppDeposit.__typename)
1480
+ error: m(t.data.createMayaAppDeposit.__typename)
1451
1481
  } : {
1452
1482
  ok: !0
1453
1483
  } : t;
1454
1484
  }
1455
1485
  async createGCashWithdrawal(e) {
1456
- const t = await this.client.request($e, e);
1486
+ const t = await this.client.request(We, e);
1457
1487
  return t.ok ? t.data.createGCashWithdrawal ? {
1458
1488
  ok: !1,
1459
- error: d(t.data.createGCashWithdrawal.__typename)
1489
+ error: m(t.data.createGCashWithdrawal.__typename)
1460
1490
  } : {
1461
1491
  ok: !0
1462
1492
  } : t;
@@ -1465,7 +1495,7 @@ class Ae {
1465
1495
  const t = await this.client.request(Be, e);
1466
1496
  return t.ok ? t.data.createMayaWithdrawal ? {
1467
1497
  ok: !1,
1468
- error: d(t.data.createMayaWithdrawal.__typename)
1498
+ error: m(t.data.createMayaWithdrawal.__typename)
1469
1499
  } : {
1470
1500
  ok: !0
1471
1501
  } : t;
@@ -1474,7 +1504,7 @@ class Ae {
1474
1504
  const t = await this.client.request(Ue, e);
1475
1505
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1476
1506
  ok: !1,
1477
- error: d(t.data.createMayaAppWithdrawal.__typename)
1507
+ error: m(t.data.createMayaAppWithdrawal.__typename)
1478
1508
  } : {
1479
1509
  ok: !0
1480
1510
  } : t;
@@ -1483,7 +1513,7 @@ class Ae {
1483
1513
  const t = await this.client.request(Oe, e);
1484
1514
  return t.ok ? t.data.createBankWithdrawal ? {
1485
1515
  ok: !1,
1486
- error: d(t.data.createBankWithdrawal.__typename)
1516
+ error: m(t.data.createBankWithdrawal.__typename)
1487
1517
  } : {
1488
1518
  ok: !0
1489
1519
  } : t;
@@ -1495,14 +1525,14 @@ class Ae {
1495
1525
  return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
1496
1526
  }
1497
1527
  async pointsWallet() {
1498
- const e = await this.client.request(De);
1528
+ const e = await this.client.request(Ie);
1499
1529
  return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
1500
1530
  }
1501
1531
  async pointsToCashConversion(e) {
1502
- const t = await this.client.request(Ie, e);
1532
+ const t = await this.client.request(De, e);
1503
1533
  return t.ok ? t.data.pointsToCashConversion ? {
1504
1534
  ok: !1,
1505
- error: d(t.data.pointsToCashConversion.__typename)
1535
+ error: m(t.data.pointsToCashConversion.__typename)
1506
1536
  } : {
1507
1537
  ok: !0
1508
1538
  } : t;
@@ -1538,7 +1568,7 @@ class Ae {
1538
1568
  const t = await this.client.request(Se, e);
1539
1569
  return t.ok ? t.data.createGameSession ? {
1540
1570
  ok: !1,
1541
- error: d(t.data.createGameSession.__typename)
1571
+ error: m(t.data.createGameSession.__typename)
1542
1572
  } : {
1543
1573
  ok: !0
1544
1574
  } : t;
@@ -1559,11 +1589,11 @@ class Ae {
1559
1589
  } : t;
1560
1590
  }
1561
1591
  }
1562
- class At {
1592
+ class kt {
1563
1593
  constructor(e) {
1564
- m(this, "url");
1565
- m(this, "siteId");
1566
- m(this, "platformId");
1594
+ d(this, "url");
1595
+ d(this, "siteId");
1596
+ d(this, "platformId");
1567
1597
  this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
1568
1598
  }
1569
1599
  async self() {
@@ -1574,16 +1604,16 @@ class At {
1574
1604
  } : e;
1575
1605
  }
1576
1606
  async games(e) {
1577
- var r, s, c, u, l, p, y, f, A, k, _, C, T, v, N, M;
1607
+ var r, c, s, p, u, h, w, l, A, k, C, _, T, v, N, M;
1578
1608
  const t = new URLSearchParams();
1579
- 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 = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.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), (p = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && p.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (f = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && f.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (k = (A = e == null ? void 0 : e.filter) == null ? void 0 : A.provider) != null && k.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (C = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && C.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (M = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && M.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(","));
1609
+ 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), (c = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.type) != null && c.equal && t.set("filter[type][eq]", e.filter.type.equal), (p = (s = e == null ? void 0 : e.filter) == null ? void 0 : s.type) != null && p.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (h = (u = e == null ? void 0 : e.filter) == null ? void 0 : u.type) != null && h.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (l = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && l.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (k = (A = e == null ? void 0 : e.filter) == null ? void 0 : A.provider) != null && k.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (_ = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.provider) != null && _.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (M = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && M.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(","));
1580
1610
  const a = await this.getJson("/games", t);
1581
1611
  return a.ok ? {
1582
1612
  ok: !0,
1583
1613
  data: {
1584
- edges: a.data.data.map((D) => ({
1585
- node: D,
1586
- cursor: D.cursor
1614
+ edges: a.data.data.map((I) => ({
1615
+ node: I,
1616
+ cursor: I.cursor
1587
1617
  })),
1588
1618
  totalCount: a.data.totalCount ?? 0,
1589
1619
  pageInfo: {
@@ -1621,19 +1651,19 @@ class At {
1621
1651
  data: await r.json()
1622
1652
  } : {
1623
1653
  ok: !1,
1624
- error: h(r.status)
1654
+ error: f(r.status)
1625
1655
  };
1626
1656
  } catch {
1627
1657
  return {
1628
1658
  ok: !1,
1629
- error: h(500)
1659
+ error: f(500)
1630
1660
  };
1631
1661
  }
1632
1662
  }
1633
1663
  }
1634
- class kt {
1664
+ class Ct {
1635
1665
  constructor(e) {
1636
- m(this, "client");
1666
+ d(this, "client");
1637
1667
  this.client = e;
1638
1668
  }
1639
1669
  /** @deprecated */
@@ -1660,7 +1690,7 @@ class kt {
1660
1690
  const t = await this.client.request(Se, e);
1661
1691
  return t.ok ? t.data.createGameSession ? {
1662
1692
  ok: !1,
1663
- error: d(t.data.createGameSession.__typename)
1693
+ error: m(t.data.createGameSession.__typename)
1664
1694
  } : {
1665
1695
  ok: !0
1666
1696
  } : t;
@@ -1669,7 +1699,7 @@ class kt {
1669
1699
  const t = await this.client.request(xe, e);
1670
1700
  return t.ok ? t.data.endGameSession ? {
1671
1701
  ok: !1,
1672
- error: d(t.data.endGameSession.__typename)
1702
+ error: m(t.data.endGameSession.__typename)
1673
1703
  } : {
1674
1704
  ok: !0
1675
1705
  } : t;
@@ -1677,7 +1707,7 @@ class kt {
1677
1707
  }
1678
1708
  class _t {
1679
1709
  constructor(e) {
1680
- m(this, "client");
1710
+ d(this, "client");
1681
1711
  this.client = e;
1682
1712
  }
1683
1713
  async latestBetRecords() {
@@ -1688,33 +1718,33 @@ class _t {
1688
1718
  } : e;
1689
1719
  }
1690
1720
  }
1691
- function Ct(n, e, t) {
1692
- return n < e ? e : n > t ? t : n;
1721
+ function Tt(o, e, t) {
1722
+ return o < e ? e : o > t ? t : o;
1693
1723
  }
1694
- function W(n) {
1695
- return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
1724
+ function $(o) {
1725
+ return Object.prototype.toString.call(o) === "[object Object]" && Object(o) === o;
1696
1726
  }
1697
- function Tt(n) {
1727
+ function vt(o) {
1698
1728
  const e = [];
1699
1729
  function t(a, r = []) {
1700
- for (const s in a) {
1701
- const c = a[s];
1702
- W(c) ? t(c, [...r, s]) : Array.isArray(c) ? t(vt(c), [...r, s]) : e.push({
1703
- key: [...r, s],
1704
- value: c
1730
+ for (const c in a) {
1731
+ const s = a[c];
1732
+ $(s) ? t(s, [...r, c]) : Array.isArray(s) ? t(Nt(s), [...r, c]) : e.push({
1733
+ key: [...r, c],
1734
+ value: s
1705
1735
  });
1706
1736
  }
1707
1737
  }
1708
- return t(n), e;
1738
+ return t(o), e;
1709
1739
  }
1710
- function vt(n) {
1711
- return n.reduce((e, t, a) => (e[a] = t, e), {});
1740
+ function Nt(o) {
1741
+ return o.reduce((e, t, a) => (e[a] = t, e), {});
1712
1742
  }
1713
1743
  class E {
1714
1744
  constructor(e, t) {
1715
- m(this, "url");
1716
- m(this, "options");
1717
- m(this, "middlewares");
1745
+ d(this, "url");
1746
+ d(this, "options");
1747
+ d(this, "middlewares");
1718
1748
  var r;
1719
1749
  const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
1720
1750
  this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
@@ -1722,7 +1752,7 @@ class E {
1722
1752
  async request(e, t) {
1723
1753
  const a = JSON.stringify({ query: e, variables: t }), r = new Headers(this.options.headers);
1724
1754
  r.set("Content-Type", "application/json"), r.set("Accept", "application/json");
1725
- const s = await this.runMiddlewares(
1755
+ const c = await this.runMiddlewares(
1726
1756
  new Request(this.url, {
1727
1757
  ...this.options,
1728
1758
  body: a,
@@ -1730,13 +1760,13 @@ class E {
1730
1760
  method: "POST"
1731
1761
  })
1732
1762
  );
1733
- return await this.exec(s);
1763
+ return await this.exec(c);
1734
1764
  }
1735
1765
  /** Single file upload */
1736
1766
  async upload(e, t) {
1737
1767
  const a = this.createUploadBody(e, t), r = new Headers(this.options.headers);
1738
1768
  r.delete("Content-Type");
1739
- const s = await this.runMiddlewares(
1769
+ const c = await this.runMiddlewares(
1740
1770
  new Request(this.url, {
1741
1771
  ...this.options,
1742
1772
  body: a,
@@ -1744,26 +1774,26 @@ class E {
1744
1774
  method: "POST"
1745
1775
  })
1746
1776
  );
1747
- return await this.exec(s);
1777
+ return await this.exec(c);
1748
1778
  }
1749
1779
  async exec(e) {
1750
- var t, a, r, s, c, u;
1780
+ var t, a, r, c, s, p;
1751
1781
  try {
1752
- const l = await fetch(e);
1753
- if (!l.ok)
1754
- return { ok: !1, error: h(l.status) };
1755
- const p = await l.json(), y = p.data, f = (t = p.errors) == null ? void 0 : t.at(0);
1756
- return f ? ((a = f.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = f.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, f.message) } : ((s = f.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, f.message) } : ((c = f.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((u = f.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, f.message) } : {
1782
+ const u = await fetch(e);
1783
+ if (!u.ok)
1784
+ return { ok: !1, error: f(u.status) };
1785
+ const h = await u.json(), w = h.data, l = (t = h.errors) == null ? void 0 : t.at(0);
1786
+ return l ? ((a = l.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = l.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: f(403, l.message) } : ((c = l.extensions) == null ? void 0 : c.code) === "UNAUTHORIZED" ? { ok: !1, error: f(401, l.message) } : ((s = l.extensions) == null ? void 0 : s.code) === "BAD_USER_INPUT" || ((p = l.extensions) == null ? void 0 : p.code) === "BAD_REQUEST" ? { ok: !1, error: f(400, l.message) } : {
1757
1787
  ok: !1,
1758
- error: h(500, f.message)
1788
+ error: f(500, l.message)
1759
1789
  } : {
1760
1790
  ok: !0,
1761
- data: y
1791
+ data: w
1762
1792
  };
1763
1793
  } catch {
1764
1794
  return {
1765
1795
  ok: !1,
1766
- error: h(500)
1796
+ error: f(500)
1767
1797
  };
1768
1798
  }
1769
1799
  }
@@ -1774,8 +1804,8 @@ class E {
1774
1804
  return t;
1775
1805
  }
1776
1806
  createUploadBody(e, t) {
1777
- const a = Tt(t).filter(
1778
- (c) => c.value instanceof File || c.value instanceof Blob
1807
+ const a = vt(t).filter(
1808
+ (s) => s.value instanceof File || s.value instanceof Blob
1779
1809
  ), r = new FormData();
1780
1810
  r.append(
1781
1811
  "operations",
@@ -1784,21 +1814,21 @@ class E {
1784
1814
  variables: t
1785
1815
  })
1786
1816
  );
1787
- const s = {};
1788
- return a.forEach((c, u) => {
1789
- s[u.toString()] = [`variables.${c.key.join(".")}`];
1790
- }), r.append("map", JSON.stringify(s)), a.forEach((c, u) => {
1791
- r.append(u.toString(), c.value);
1817
+ const c = {};
1818
+ return a.forEach((s, p) => {
1819
+ c[p.toString()] = [`variables.${s.key.join(".")}`];
1820
+ }), r.append("map", JSON.stringify(c)), a.forEach((s, p) => {
1821
+ r.append(p.toString(), s.value);
1792
1822
  }), r;
1793
1823
  }
1794
1824
  }
1795
- async function g(n) {
1796
- const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
1797
- return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
1825
+ async function g(o) {
1826
+ const e = new TextEncoder().encode(o), t = await crypto.subtle.digest("SHA-256", e);
1827
+ return Array.from(new Uint8Array(t)).map((c) => c.toString(16).padStart(2, "0")).join("");
1798
1828
  }
1799
1829
  class ke {
1800
1830
  constructor(e) {
1801
- m(this, "enabled");
1831
+ d(this, "enabled");
1802
1832
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
1803
1833
  }
1804
1834
  info(e) {
@@ -1814,50 +1844,50 @@ class ke {
1814
1844
  this.enabled && console.log(`\x1B[32m[success] ${e}`);
1815
1845
  }
1816
1846
  }
1817
- function B(n) {
1818
- return new Date(n.getTime());
1847
+ function B(o) {
1848
+ return new Date(o.getTime());
1819
1849
  }
1820
- function I(n, e) {
1821
- const t = B(n);
1850
+ function D(o, e) {
1851
+ const t = B(o);
1822
1852
  return t.setDate(t.getDate() + e), t;
1823
1853
  }
1824
- function R(n, e) {
1825
- const t = B(n);
1854
+ function R(o, e) {
1855
+ const t = B(o);
1826
1856
  return t.setMinutes(t.getMinutes() + e), t;
1827
1857
  }
1828
- function he(n, e) {
1829
- return n.getTime() > e.getTime();
1858
+ function he(o, e) {
1859
+ return o.getTime() > e.getTime();
1830
1860
  }
1831
- function _e(n) {
1861
+ function Ce(o) {
1832
1862
  return new Promise((e) => {
1833
- setTimeout(e, n);
1863
+ setTimeout(e, o);
1834
1864
  });
1835
1865
  }
1836
- function we(n, e) {
1866
+ function we(o, e) {
1837
1867
  const {
1838
1868
  until: t,
1839
1869
  interval: a = 1e3,
1840
1870
  maxAttempt: r = 3
1841
1871
  /**/
1842
1872
  } = e;
1843
- async function s(c, u) {
1844
- const l = u ?? r, p = await n(...c);
1845
- return t(p) ? p : l > 1 ? (await _e(a * ((r - l) / 2)), s(c, l - 1)) : p;
1873
+ async function c(s, p) {
1874
+ const u = p ?? r, h = await o(...s);
1875
+ return t(h) ? h : u > 1 ? (await Ce(a * ((r - u) / 2)), c(s, u - 1)) : h;
1846
1876
  }
1847
- return async (...c) => await s(c);
1877
+ return async (...s) => await c(s);
1848
1878
  }
1849
- function P(n, e) {
1850
- const t = B(n);
1879
+ function P(o, e) {
1880
+ const t = B(o);
1851
1881
  return t.setMinutes(t.getMinutes() - e), t;
1852
1882
  }
1853
- class Nt {
1883
+ class Mt {
1854
1884
  constructor(e) {
1855
- m(this, "logger");
1856
- m(this, "storageKey", "session");
1857
- m(this, "authService");
1858
- m(this, "walletService");
1859
- m(this, "_refreshing", !1);
1860
- this.authService = new gt({
1885
+ d(this, "logger");
1886
+ d(this, "storageKey", "session");
1887
+ d(this, "authService");
1888
+ d(this, "walletService");
1889
+ d(this, "_refreshing", !1);
1890
+ this.authService = new bt({
1861
1891
  url: e.authUrl,
1862
1892
  platform: e.platform
1863
1893
  }), this.walletService = new Ae(
@@ -1877,6 +1907,7 @@ class Nt {
1877
1907
  this._refreshing = e;
1878
1908
  }
1879
1909
  async create(e) {
1910
+ var r;
1880
1911
  if (this.isServer)
1881
1912
  return this.logger.warn("'localStorage' is not available on the server."), {
1882
1913
  ok: !1,
@@ -1887,27 +1918,35 @@ class Nt {
1887
1918
  };
1888
1919
  if (e.type === "MAYA") {
1889
1920
  const s = await we(() => this.walletService.mayaSession({ id: e.sessionId }), {
1890
- until: (p) => {
1891
- var y;
1892
- return p.ok && ((y = p.data) == null ? void 0 : y.member) != null;
1921
+ until: (w) => {
1922
+ var l;
1923
+ return w.ok && ((l = w.data) == null ? void 0 : l.member) != null;
1893
1924
  },
1894
1925
  interval: 1e3,
1895
1926
  maxAttempt: 5
1896
1927
  })();
1897
1928
  if (!s.ok) return s;
1929
+ if (!((r = s.data) != null && r.member))
1930
+ return {
1931
+ ok: !1,
1932
+ error: {
1933
+ name: "HttpForbidden",
1934
+ message: "Forbidden"
1935
+ }
1936
+ };
1898
1937
  const u = await we(() => this.authService.createSession(e), {
1899
- until: (p) => p.ok,
1938
+ until: (w) => w.ok,
1900
1939
  interval: 1e3,
1901
1940
  maxAttempt: 5
1902
1941
  })();
1903
1942
  if (!u.ok) return u;
1904
- const l = /* @__PURE__ */ new Date();
1943
+ const h = /* @__PURE__ */ new Date();
1905
1944
  return window.localStorage.setItem(
1906
1945
  this.storageKey,
1907
1946
  JSON.stringify({
1908
1947
  ...u.data,
1909
- accessTokenExpiresAt: R(l, 8).getTime(),
1910
- refreshTokenExpiresAt: P(I(l, 30), 2).getTime()
1948
+ accessTokenExpiresAt: R(h, 8).getTime(),
1949
+ refreshTokenExpiresAt: P(D(h, 30), 2).getTime()
1911
1950
  })
1912
1951
  ), {
1913
1952
  ok: !0,
@@ -1915,22 +1954,22 @@ class Nt {
1915
1954
  };
1916
1955
  }
1917
1956
  if (e.type === "MOBILE_NUMBER") {
1918
- const r = await this.authService.createSession(e);
1919
- if (r.ok) {
1957
+ const c = await this.authService.createSession(e);
1958
+ if (c.ok) {
1920
1959
  const s = /* @__PURE__ */ new Date();
1921
1960
  return window.localStorage.setItem(
1922
1961
  this.storageKey,
1923
1962
  JSON.stringify({
1924
- ...r.data,
1963
+ ...c.data,
1925
1964
  accessTokenExpiresAt: R(s, 8).getTime(),
1926
- refreshTokenExpiresAt: P(I(s, 30), 2).getTime()
1965
+ refreshTokenExpiresAt: P(D(s, 30), 2).getTime()
1927
1966
  })
1928
1967
  ), {
1929
1968
  ok: !0,
1930
1969
  data: null
1931
1970
  };
1932
1971
  }
1933
- return r;
1972
+ return c;
1934
1973
  }
1935
1974
  const t = await this.authService.createSession(e);
1936
1975
  if (!t.ok) return t;
@@ -1947,7 +1986,7 @@ class Nt {
1947
1986
  JSON.stringify({
1948
1987
  ...t.data,
1949
1988
  accessTokenExpiresAt: R(a, 8).getTime(),
1950
- refreshTokenExpiresAt: P(I(a, 30), 2).getTime()
1989
+ refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
1951
1990
  })
1952
1991
  ), {
1953
1992
  ok: !0,
@@ -1963,7 +2002,7 @@ class Nt {
1963
2002
  JSON.stringify({
1964
2003
  ...t.data,
1965
2004
  accessTokenExpiresAt: R(a, 8).getTime(),
1966
- refreshTokenExpiresAt: P(I(a, 30), 2).getTime()
2005
+ refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
1967
2006
  })
1968
2007
  ), { ok: !0 };
1969
2008
  } else
@@ -1976,7 +2015,7 @@ class Nt {
1976
2015
  data: null
1977
2016
  };
1978
2017
  if (this.refreshing)
1979
- return await _e(1e3), await this.get();
2018
+ return await Ce(1e3), await this.get();
1980
2019
  const e = window.localStorage.getItem(this.storageKey);
1981
2020
  if (!e)
1982
2021
  return {
@@ -1985,8 +2024,8 @@ class Nt {
1985
2024
  };
1986
2025
  try {
1987
2026
  let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
1988
- const r = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
1989
- if (he(a, s))
2027
+ const r = new Date(t.accessTokenExpiresAt), c = new Date(t.refreshTokenExpiresAt);
2028
+ if (he(a, c))
1990
2029
  return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
1991
2030
  ok: !1,
1992
2031
  error: {
@@ -1996,20 +2035,20 @@ class Nt {
1996
2035
  };
1997
2036
  if (he(a, r)) {
1998
2037
  this.logger.info("Refreshing session..."), this.refreshing = !0;
1999
- const c = await this.authService.refreshSession(t.refreshToken);
2000
- if (this.refreshing = !1, !c.ok)
2001
- return this.logger.error(`Failed to refresh session: ${c.error.message}`), c.error.name === "InvalidToken" || c.error.name === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
2038
+ const s = await this.authService.refreshSession(t.refreshToken);
2039
+ if (this.refreshing = !1, !s.ok)
2040
+ return this.logger.error(`Failed to refresh session: ${s.error.message}`), s.error.name === "InvalidToken" || s.error.name === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
2002
2041
  ok: !1,
2003
- error: c.error
2042
+ error: s.error
2004
2043
  }) : (this.logger.warn("Old session returned."), {
2005
2044
  ok: !0,
2006
2045
  data: t
2007
2046
  });
2008
2047
  this.logger.success("Session refreshed!"), a = /* @__PURE__ */ new Date(), t = {
2009
2048
  ...t,
2010
- ...c.data,
2049
+ ...s.data,
2011
2050
  accessTokenExpiresAt: R(a, 8).getTime(),
2012
- refreshTokenExpiresAt: P(I(a, 30), 2).getTime()
2051
+ refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
2013
2052
  }, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
2014
2053
  }
2015
2054
  return {
@@ -2036,11 +2075,11 @@ class Nt {
2036
2075
  (t = e.data) != null && t.accessToken && await this.authService.destroySession(e.data.accessToken), window.localStorage.removeItem(this.storageKey);
2037
2076
  }
2038
2077
  async verify() {
2039
- var a, r, s;
2078
+ var a, r, c;
2040
2079
  if (this.isServer)
2041
2080
  return this.logger.warn("'localStorage' is not available on the server."), !0;
2042
2081
  const e = await this.get();
2043
- if (((a = e.error) == null ? void 0 : a.name) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.name) === "SessionExpired" || ((s = e.error) == null ? void 0 : s.name) === "AccountBlacklisted") return !1;
2082
+ if (((a = e.error) == null ? void 0 : a.name) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.name) === "SessionExpired" || ((c = e.error) == null ? void 0 : c.name) === "AccountBlacklisted") return !1;
2044
2083
  if (!e.data) return !0;
2045
2084
  const t = await this.authService.verifySession(e.data.accessToken);
2046
2085
  return t || window.localStorage.removeItem(this.storageKey), t;
@@ -2049,17 +2088,17 @@ class Nt {
2049
2088
  return typeof window > "u";
2050
2089
  }
2051
2090
  }
2052
- function w(n) {
2091
+ function y(o) {
2053
2092
  const e = {};
2054
- for (const t in n) {
2055
- const a = n[t];
2093
+ for (const t in o) {
2094
+ const a = o[t];
2056
2095
  if (a !== null && a !== void 0) {
2057
- if (W(a)) {
2058
- e[t] = w(a);
2096
+ if ($(a)) {
2097
+ e[t] = y(a);
2059
2098
  continue;
2060
2099
  }
2061
2100
  if (Array.isArray(a)) {
2062
- e[t] = a.map((r) => W(r) ? w(r) : r);
2101
+ e[t] = a.map((r) => $(r) ? y(r) : r);
2063
2102
  continue;
2064
2103
  }
2065
2104
  e[t] = a;
@@ -2067,21 +2106,21 @@ function w(n) {
2067
2106
  }
2068
2107
  return e;
2069
2108
  }
2070
- function o(n, e) {
2071
- if (typeof n == "number" && !Number.isNaN(n))
2072
- return n;
2073
- if (typeof n == "string") {
2074
- const t = Number.parseFloat(n);
2109
+ function i(o, e) {
2110
+ if (typeof o == "number" && !Number.isNaN(o))
2111
+ return o;
2112
+ if (typeof o == "string") {
2113
+ const t = Number.parseFloat(o);
2075
2114
  if (!Number.isNaN(t))
2076
2115
  return t;
2077
2116
  }
2078
2117
  return e;
2079
2118
  }
2080
- class Mt {
2119
+ class It {
2081
2120
  constructor(e) {
2082
- m(this, "staticService");
2121
+ d(this, "staticService");
2083
2122
  const t = (e == null ? void 0 : e.environment) === "development";
2084
- this.staticService = new Et({
2123
+ this.staticService = new At({
2085
2124
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2086
2125
  });
2087
2126
  }
@@ -2110,7 +2149,8 @@ class Mt {
2110
2149
  cashbackBonus: this.cashbackBonus.bind(this),
2111
2150
  file: this.file.bind(this),
2112
2151
  pointsWallet: this.pointsWallet.bind(this),
2113
- pointsWalletTransaction: this.pointsWalletTransaction.bind(this)
2152
+ pointsWalletTransaction: this.pointsWalletTransaction.bind(this),
2153
+ activityRecord: this.activityRecord.bind(this)
2114
2154
  };
2115
2155
  }
2116
2156
  site(e) {
@@ -2119,46 +2159,46 @@ class Mt {
2119
2159
  name: e.name,
2120
2160
  logo: e.logo ?? void 0
2121
2161
  };
2122
- return w(t);
2162
+ return y(t);
2123
2163
  }
2124
2164
  platform(e) {
2125
- var t, a, r, s, c, u, l, p, y, f, A, k, _, C, T, v, N, M, D, U, O, q, F, L, V, Y, H, j, Q, K, z, J, X, Z, ee, te, ae, re, ne, oe, ie, se, ce, me, de, ue, le, pe, fe;
2165
+ var t, a, r, c, s, p, u, h, w, l, A, k, C, _, T, v, N, M, I, U, O, q, F, L, V, Y, H, j, Q, K, z, J, X, Z, ee, te, ae, re, oe, ne, ie, se, ce, de, me, ue, le, pe, fe;
2126
2166
  return {
2127
2167
  paymentSettings: {
2128
- minimumFirstDepositAmount: o(e.minimumFirstDepositAmount),
2168
+ minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
2129
2169
  restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
2130
2170
  depositGateway: {
2131
2171
  bank: {
2132
2172
  androidEnabled: ((t = e.bankDepositGatewaySettings) == null ? void 0 : t.androidEnabled) ?? !1,
2133
2173
  iosEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.iosEnabled) ?? !1,
2134
2174
  webEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.webEnabled) ?? !1,
2135
- mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
2136
- minimumAmount: o((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
2137
- maximumAmount: o((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
2175
+ mobileWebEnabled: ((c = e.bankDepositGatewaySettings) == null ? void 0 : c.mobileWebEnabled) ?? !1,
2176
+ minimumAmount: i((s = e.bankDepositGatewaySettings) == null ? void 0 : s.minimumAmount),
2177
+ maximumAmount: i((p = e.bankDepositGatewaySettings) == null ? void 0 : p.maximumAmount)
2138
2178
  },
2139
2179
  gcash: {
2140
- androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
2141
- iosEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.iosEnabled) ?? !1,
2142
- webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
2143
- mobileWebEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.mobileWebEnabled) ?? !1,
2144
- minimumAmount: o((A = e.gcashDepositGatewaySettings) == null ? void 0 : A.minimumAmount),
2145
- maximumAmount: o((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.maximumAmount)
2180
+ androidEnabled: ((u = e.gcashDepositGatewaySettings) == null ? void 0 : u.androidEnabled) ?? !1,
2181
+ iosEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.iosEnabled) ?? !1,
2182
+ webEnabled: ((w = e.gcashDepositGatewaySettings) == null ? void 0 : w.webEnabled) ?? !1,
2183
+ mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
2184
+ minimumAmount: i((A = e.gcashDepositGatewaySettings) == null ? void 0 : A.minimumAmount),
2185
+ maximumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.maximumAmount)
2146
2186
  },
2147
2187
  maya: {
2148
- androidEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.androidEnabled) ?? !1,
2149
- iosEnabled: ((C = e.mayaDepositGatewaySettings) == null ? void 0 : C.iosEnabled) ?? !1,
2188
+ androidEnabled: ((C = e.mayaDepositGatewaySettings) == null ? void 0 : C.androidEnabled) ?? !1,
2189
+ iosEnabled: ((_ = e.mayaDepositGatewaySettings) == null ? void 0 : _.iosEnabled) ?? !1,
2150
2190
  webEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.webEnabled) ?? !1,
2151
2191
  mobileWebEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.mobileWebEnabled) ?? !1,
2152
- minimumAmount: o((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.minimumAmount),
2153
- maximumAmount: o((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.maximumAmount)
2192
+ minimumAmount: i((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.minimumAmount),
2193
+ maximumAmount: i((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.maximumAmount)
2154
2194
  },
2155
2195
  mayaApp: {
2156
- androidEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.androidEnabled) ?? !1,
2196
+ androidEnabled: ((I = e.mayaAppDepositGatewaySettings) == null ? void 0 : I.androidEnabled) ?? !1,
2157
2197
  iosEnabled: ((U = e.mayaAppDepositGatewaySettings) == null ? void 0 : U.iosEnabled) ?? !1,
2158
2198
  webEnabled: ((O = e.mayaAppDepositGatewaySettings) == null ? void 0 : O.webEnabled) ?? !1,
2159
2199
  mobileWebEnabled: ((q = e.mayaAppDepositGatewaySettings) == null ? void 0 : q.mobileWebEnabled) ?? !1,
2160
- minimumAmount: o((F = e.mayaAppDepositGatewaySettings) == null ? void 0 : F.minimumAmount),
2161
- maximumAmount: o((L = e.mayaAppDepositGatewaySettings) == null ? void 0 : L.maximumAmount)
2200
+ minimumAmount: i((F = e.mayaAppDepositGatewaySettings) == null ? void 0 : F.minimumAmount),
2201
+ maximumAmount: i((L = e.mayaAppDepositGatewaySettings) == null ? void 0 : L.maximumAmount)
2162
2202
  }
2163
2203
  },
2164
2204
  withdrawalGateway: {
@@ -2167,16 +2207,16 @@ class Mt {
2167
2207
  iosEnabled: ((Y = e.bankWithdrawalGatewaySettings) == null ? void 0 : Y.iosEnabled) ?? !1,
2168
2208
  webEnabled: ((H = e.bankWithdrawalGatewaySettings) == null ? void 0 : H.webEnabled) ?? !1,
2169
2209
  mobileWebEnabled: ((j = e.bankWithdrawalGatewaySettings) == null ? void 0 : j.mobileWebEnabled) ?? !1,
2170
- minimumAmount: o((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.minimumAmount),
2171
- maximumAmount: o((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.maximumAmount)
2210
+ minimumAmount: i((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.minimumAmount),
2211
+ maximumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.maximumAmount)
2172
2212
  },
2173
2213
  gcash: {
2174
2214
  androidEnabled: ((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.androidEnabled) ?? !1,
2175
2215
  iosEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.iosEnabled) ?? !1,
2176
2216
  webEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.webEnabled) ?? !1,
2177
2217
  mobileWebEnabled: ((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.mobileWebEnabled) ?? !1,
2178
- minimumAmount: o((ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.minimumAmount),
2179
- maximumAmount: o(
2218
+ minimumAmount: i((ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.minimumAmount),
2219
+ maximumAmount: i(
2180
2220
  (te = e.gcashWithdrawalGatewaySettings) == null ? void 0 : te.maximumAmount,
2181
2221
  1e6
2182
2222
  )
@@ -2184,18 +2224,18 @@ class Mt {
2184
2224
  maya: {
2185
2225
  androidEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.androidEnabled) ?? !1,
2186
2226
  iosEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.iosEnabled) ?? !1,
2187
- webEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.webEnabled) ?? !1,
2188
- mobileWebEnabled: ((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.mobileWebEnabled) ?? !1,
2189
- minimumAmount: o((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.minimumAmount),
2190
- maximumAmount: o((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.maximumAmount)
2227
+ webEnabled: ((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.webEnabled) ?? !1,
2228
+ mobileWebEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.mobileWebEnabled) ?? !1,
2229
+ minimumAmount: i((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.minimumAmount),
2230
+ maximumAmount: i((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.maximumAmount)
2191
2231
  },
2192
2232
  mayaApp: {
2193
2233
  androidEnabled: ((ce = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ce.androidEnabled) ?? !1,
2194
- iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
2195
- webEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.webEnabled) ?? !1,
2234
+ iosEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.iosEnabled) ?? !1,
2235
+ webEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.webEnabled) ?? !1,
2196
2236
  mobileWebEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.mobileWebEnabled) ?? !1,
2197
- minimumAmount: o((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.minimumAmount),
2198
- maximumAmount: o(
2237
+ minimumAmount: i((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.minimumAmount),
2238
+ maximumAmount: i(
2199
2239
  (pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.maximumAmount,
2200
2240
  1e6
2201
2241
  )
@@ -2203,7 +2243,7 @@ class Mt {
2203
2243
  }
2204
2244
  },
2205
2245
  pointsClubSettings: {
2206
- multiplier: o((fe = e.pointsClubSettings) == null ? void 0 : fe.multiplier, 0)
2246
+ multiplier: i((fe = e.pointsClubSettings) == null ? void 0 : fe.multiplier, 0)
2207
2247
  }
2208
2248
  };
2209
2249
  }
@@ -2228,12 +2268,12 @@ class Mt {
2228
2268
  dateTimeCreated: new Date(e.dateTimeCreated),
2229
2269
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2230
2270
  };
2231
- return w(t);
2271
+ return y(t);
2232
2272
  }
2233
2273
  wallet(e) {
2234
2274
  return {
2235
2275
  id: e.id,
2236
- balance: o(e.balance, 0),
2276
+ balance: i(e.balance, 0),
2237
2277
  currency: e.currency,
2238
2278
  dateTimeCreated: new Date(e.dateTimeCreated),
2239
2279
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
@@ -2259,7 +2299,7 @@ class Mt {
2259
2299
  mobileNumberVerification: e.mobileNumberVerification ?? !1,
2260
2300
  personalInformation: e.personalInformation ?? !1,
2261
2301
  transactionPassword: e.transactionPassword ?? !1,
2262
- completionPercentage: o(e, 0)
2302
+ completionPercentage: i(e, 0)
2263
2303
  };
2264
2304
  }
2265
2305
  announcement(e) {
@@ -2281,9 +2321,9 @@ class Mt {
2281
2321
  type: e.type,
2282
2322
  bank: e.bank,
2283
2323
  status: e.status,
2284
- amount: o(e.amount, 0),
2285
- netAmount: o(e.netAmount, 0),
2286
- fee: o(e.fee, 0),
2324
+ amount: i(e.amount, 0),
2325
+ netAmount: i(e.netAmount, 0),
2326
+ fee: i(e.fee, 0),
2287
2327
  reference: e.reference ?? void 0,
2288
2328
  withdrawalNumber: e.withdrawalNumber,
2289
2329
  recipientMobileNumber: e.recipientMobileNumber ?? void 0,
@@ -2291,7 +2331,7 @@ class Mt {
2291
2331
  dateTimeCreated: new Date(e.dateTimeCreated),
2292
2332
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2293
2333
  };
2294
- return w(t);
2334
+ return y(t);
2295
2335
  }
2296
2336
  deposit(e) {
2297
2337
  const t = {
@@ -2300,34 +2340,34 @@ class Mt {
2300
2340
  status: e.status,
2301
2341
  checkoutUrl: e.checkoutUrl ?? void 0
2302
2342
  };
2303
- return w(t);
2343
+ return y(t);
2304
2344
  }
2305
2345
  depositRecord(e) {
2306
2346
  const t = {
2307
2347
  id: e.id,
2308
2348
  type: e.type,
2309
2349
  status: e.status,
2310
- amount: o(e.amount, 0),
2311
- fee: o(e.fee, 0),
2312
- netAmount: o(e.netAmount, 0),
2350
+ amount: i(e.amount, 0),
2351
+ fee: i(e.fee, 0),
2352
+ netAmount: i(e.netAmount, 0),
2313
2353
  reference: e.reference ?? void 0,
2314
2354
  depositNumber: e.depositNumber,
2315
2355
  dateTimeCreated: new Date(e.dateTimeCreated),
2316
2356
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2317
2357
  };
2318
- return w(t);
2358
+ return y(t);
2319
2359
  }
2320
2360
  betRecord(e) {
2321
2361
  var a;
2322
2362
  const t = {
2323
2363
  id: e.id,
2324
- bet: o(e.bet, 0),
2325
- payout: o(e.payout, 0),
2364
+ bet: i(e.bet, 0),
2365
+ payout: i(e.payout, 0),
2326
2366
  status: e.status,
2327
- jackpotContribution: o(e.jackpotContribution, 0),
2328
- jackpotPayout: o(e.jackpotPayout, 0),
2329
- winloss: o(e.winloss),
2330
- validBet: o(e.validBet, 0),
2367
+ jackpotContribution: i(e.jackpotContribution, 0),
2368
+ jackpotPayout: i(e.jackpotPayout, 0),
2369
+ winloss: i(e.winloss),
2370
+ validBet: i(e.validBet, 0),
2331
2371
  vendorRoundId: e.vendorRoundId ?? void 0,
2332
2372
  game: e.game,
2333
2373
  serialCode: e.serialCode,
@@ -2341,16 +2381,16 @@ class Mt {
2341
2381
  odds: ((a = e.metadata) == null ? void 0 : a.odds) ?? void 0
2342
2382
  }
2343
2383
  };
2344
- return w(t);
2384
+ return y(t);
2345
2385
  }
2346
2386
  latestBetRecord(e) {
2347
2387
  return {
2348
2388
  id: e.id,
2349
2389
  member: e.member,
2350
2390
  game: e.game,
2351
- bet: o(e.bet, 0),
2352
- payout: o(e.payout, 0),
2353
- validBet: o(e.validBet, 0),
2391
+ bet: i(e.bet, 0),
2392
+ payout: i(e.payout, 0),
2393
+ validBet: i(e.validBet, 0),
2354
2394
  dateTimeSettled: new Date(e.dateTimeSettled),
2355
2395
  dateTimeCreated: new Date(e.dateTimeCreated)
2356
2396
  };
@@ -2359,13 +2399,13 @@ class Mt {
2359
2399
  const t = {
2360
2400
  id: e.id,
2361
2401
  type: e.type,
2362
- amount: o(e.amount, 0),
2402
+ amount: i(e.amount, 0),
2363
2403
  content: e.content ?? void 0,
2364
- currentBalance: o(e.currentBalance, 0),
2404
+ currentBalance: i(e.currentBalance, 0),
2365
2405
  referenceNumber: e.referenceNumber,
2366
2406
  dateTimeCreated: new Date(e.dateTimeCreated)
2367
2407
  };
2368
- return w(t);
2408
+ return y(t);
2369
2409
  }
2370
2410
  game(e) {
2371
2411
  return {
@@ -2397,7 +2437,7 @@ class Mt {
2397
2437
  dateTimeCreated: new Date(e.dateTimeCreated),
2398
2438
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2399
2439
  };
2400
- return w(t);
2440
+ return y(t);
2401
2441
  }
2402
2442
  promo(e) {
2403
2443
  return {
@@ -2407,8 +2447,8 @@ class Mt {
2407
2447
  status: e.status,
2408
2448
  description: e.description,
2409
2449
  banner: this.file(e.banner),
2410
- maximumBonusAmount: o(e.maximumBonusAmount),
2411
- minimumBonusAmount: o(e.minimumBonusAmount),
2450
+ maximumBonusAmount: i(e.maximumBonusAmount),
2451
+ minimumBonusAmount: i(e.minimumBonusAmount),
2412
2452
  activationEndDateTime: new Date(e.activationEndDateTime),
2413
2453
  activationStartDateTime: new Date(e.activationStartDateTime),
2414
2454
  dateTimeCreated: new Date(e.dateTimeCreated),
@@ -2435,34 +2475,34 @@ class Mt {
2435
2475
  deposit: e.deposit ? {
2436
2476
  type: e.deposit.type,
2437
2477
  status: e.deposit.status,
2438
- fee: o(e.deposit.fee, 0),
2439
- amount: o(e.deposit.amount, 0),
2440
- netAmount: o(e.deposit.netAmount, 0),
2478
+ fee: i(e.deposit.fee, 0),
2479
+ amount: i(e.deposit.amount, 0),
2480
+ netAmount: i(e.deposit.netAmount, 0),
2441
2481
  reference: e.deposit.reference ?? void 0,
2442
2482
  dateTimeCreated: new Date(e.deposit.dateTimeCreated),
2443
2483
  dateTimeLastUpdated: new Date(e.deposit.dateTimeLastUpdated)
2444
2484
  } : void 0,
2445
- balance: o(e.balance, 0),
2446
- amount: o(e.amount, 0),
2485
+ balance: i(e.balance, 0),
2486
+ amount: i(e.amount, 0),
2447
2487
  expiration: new Date(e.expiration),
2448
- turnoverRequirement: o(e.turnoverRequirement, 0),
2449
- currentTurnoverRequirementContribution: o(
2488
+ turnoverRequirement: i(e.turnoverRequirement, 0),
2489
+ currentTurnoverRequirementContribution: i(
2450
2490
  e.currentTurnoverRequirementContribution,
2451
2491
  0
2452
2492
  ),
2453
- currentTurnoverRequirementContributionPercentage: o(
2493
+ currentTurnoverRequirementContributionPercentage: i(
2454
2494
  e.currentTurnoverRequirementContributionPercentage,
2455
2495
  0
2456
2496
  ),
2457
2497
  dateTimeCreated: new Date(e.dateTimeCreated),
2458
2498
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2459
2499
  };
2460
- return w(t);
2500
+ return y(t);
2461
2501
  }
2462
2502
  cashbackBonus(e) {
2463
2503
  return {
2464
2504
  id: e.id,
2465
- balance: o(e.balance, 0),
2505
+ balance: i(e.balance, 0),
2466
2506
  cashback: this.cashback(e.cashback),
2467
2507
  dateTimeCreated: new Date(e.dateTimeCreated),
2468
2508
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
@@ -2475,12 +2515,12 @@ class Mt {
2475
2515
  status: e.status,
2476
2516
  dateTimeCreated: new Date(e.dateTimeCreated)
2477
2517
  };
2478
- return w(t);
2518
+ return y(t);
2479
2519
  }
2480
2520
  pointsWallet(e) {
2481
2521
  return {
2482
2522
  id: e.id,
2483
- points: o(e.points, 0),
2523
+ points: i(e.points, 0),
2484
2524
  account: e.account,
2485
2525
  dateTimeCreated: new Date(e.dateTimeCreated)
2486
2526
  };
@@ -2489,31 +2529,39 @@ class Mt {
2489
2529
  return {
2490
2530
  id: e.id,
2491
2531
  type: e.type,
2492
- amount: o(e.amount, 0),
2493
- balance: o(e.balance, 0),
2532
+ amount: i(e.amount, 0),
2533
+ balance: i(e.balance, 0),
2534
+ dateTimeCreated: new Date(e.dateTimeCreated)
2535
+ };
2536
+ }
2537
+ activityRecord(e) {
2538
+ return {
2539
+ id: e.id,
2540
+ type: e.type,
2541
+ details: e.details,
2494
2542
  dateTimeCreated: new Date(e.dateTimeCreated)
2495
2543
  };
2496
2544
  }
2497
2545
  }
2498
- class Rt {
2546
+ class Pt {
2499
2547
  constructor(e) {
2500
- m(this, "gameService");
2501
- m(this, "fileService");
2502
- m(this, "walletService");
2503
- m(this, "reportService");
2504
- m(this, "portalService");
2505
- m(this, "accountService");
2506
- m(this, "cmsPortalService");
2507
- m(this, "sessionManager");
2508
- m(this, "transformer");
2509
- m(this, "logger");
2548
+ d(this, "gameService");
2549
+ d(this, "fileService");
2550
+ d(this, "walletService");
2551
+ d(this, "reportService");
2552
+ d(this, "portalService");
2553
+ d(this, "accountService");
2554
+ d(this, "cmsPortalService");
2555
+ d(this, "sessionManager");
2556
+ d(this, "transformer");
2557
+ d(this, "logger");
2510
2558
  const t = e.environment === "development";
2511
- this.sessionManager = new Nt({
2559
+ this.sessionManager = new Mt({
2512
2560
  authUrl: t ? "https://auth.development.opexa.io" : "https://auth.opexa.io",
2513
2561
  walletUrl: t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
2514
2562
  platform: e.platform,
2515
2563
  log: e.log
2516
- }), this.cmsPortalService = new At({
2564
+ }), this.cmsPortalService = new kt({
2517
2565
  url: "https://portal-api.opexacms.io/v1",
2518
2566
  site: e.site,
2519
2567
  platform: e.sitePlatform
@@ -2527,12 +2575,12 @@ class Rt {
2527
2575
  }
2528
2576
  }
2529
2577
  };
2530
- this.gameService = new kt(
2578
+ this.gameService = new Ct(
2531
2579
  new E(
2532
2580
  t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
2533
2581
  a
2534
2582
  )
2535
- ), this.fileService = new bt(
2583
+ ), this.fileService = new St(
2536
2584
  new E(
2537
2585
  t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
2538
2586
  a
@@ -2542,12 +2590,12 @@ class Rt {
2542
2590
  t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
2543
2591
  a
2544
2592
  )
2545
- ), this.reportService = new St(
2593
+ ), this.reportService = new Et(
2546
2594
  new E(
2547
2595
  t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
2548
2596
  a
2549
2597
  )
2550
- ), this.accountService = new yt(
2598
+ ), this.accountService = new gt(
2551
2599
  new E(
2552
2600
  t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
2553
2601
  a
@@ -2557,7 +2605,7 @@ class Rt {
2557
2605
  t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
2558
2606
  a
2559
2607
  )
2560
- ), this.transformer = new Mt(e), this.logger = new ke({
2608
+ ), this.transformer = new It(e), this.logger = new ke({
2561
2609
  enabled: e.log ?? !1
2562
2610
  });
2563
2611
  }
@@ -2673,7 +2721,7 @@ class Rt {
2673
2721
  * ```
2674
2722
  */
2675
2723
  watchSession(e) {
2676
- const t = Ct(e.interval ?? 3e4, 3e4, 6e4);
2724
+ const t = Tt(e.interval ?? 3e4, 3e4, 6e4);
2677
2725
  let a = null;
2678
2726
  const r = () => setTimeout(async () => {
2679
2727
  await this.sessionManager.verify() || await e.onInvalid(), a = r();
@@ -3130,9 +3178,9 @@ class Rt {
3130
3178
  return t.ok ? {
3131
3179
  ok: !0,
3132
3180
  data: {
3133
- betRecords: t.data.edges.map(({ cursor: s, node: c }) => ({
3134
- ...this.transformer.transform.betRecord(c),
3135
- cursor: s
3181
+ betRecords: t.data.edges.map(({ cursor: c, node: s }) => ({
3182
+ ...this.transformer.transform.betRecord(s),
3183
+ cursor: c
3136
3184
  })),
3137
3185
  totalCount: t.data.totalCount,
3138
3186
  endCursor: t.data.pageInfo.endCursor ?? void 0,
@@ -3358,8 +3406,8 @@ class Rt {
3358
3406
  /**/
3359
3407
  type: a,
3360
3408
  provider: r,
3361
- externalId: s
3362
- } = t.data, c = a === "SPORTS" ? e.id ?? (await b.generateFromKey(S.Game, `SPORTS:${r}`)).toString() : e.id ?? b.generate(S.GameSession).toString(), l = [
3409
+ externalId: c
3410
+ } = t.data, s = a === "SPORTS" ? e.id ?? (await b.generateFromKey(S.Game, `SPORTS:${r}`)).toString() : e.id ?? b.generate(S.GameSession).toString(), u = [
3363
3411
  /**/
3364
3412
  "RTG",
3365
3413
  "DARWIN",
@@ -3368,8 +3416,8 @@ class Rt {
3368
3416
  "EVOLUTION",
3369
3417
  "EVOLUTION_NETENT",
3370
3418
  "EVOLUTION_REDTIGER"
3371
- ].includes(r) ? await this.walletService.createGameSession({ input: { id: c, game: s } }) : await this.gameService.createGameSession({ input: { id: c, game: s } });
3372
- return l.ok ? { ok: !0, data: { id: c } } : l;
3419
+ ].includes(r) ? await this.walletService.createGameSession({ input: { id: s, game: c } }) : await this.gameService.createGameSession({ input: { id: s, game: c } });
3420
+ return u.ok ? { ok: !0, data: { id: s } } : u;
3373
3421
  }
3374
3422
  /** @deprecated use `endGameSession__next` */
3375
3423
  async endGameSession(e) {
@@ -3453,13 +3501,33 @@ class Rt {
3453
3501
  }
3454
3502
  } : t;
3455
3503
  }
3504
+ /**/
3505
+ /*+----------------------------------------+*/
3506
+ /*+ ACTIVITY +*/
3507
+ /*+----------------------------------------+*/
3508
+ /**/
3509
+ async activityRecords(e) {
3510
+ const t = await this.reportService.activityRecords(e);
3511
+ return t.ok ? {
3512
+ ok: !0,
3513
+ data: {
3514
+ activityRecords: t.data.edges.map(({ cursor: a, node: r }) => ({
3515
+ ...this.transformer.transform.activityRecord(r),
3516
+ cursor: a
3517
+ })),
3518
+ totalCount: t.data.totalCount,
3519
+ hasNextPage: t.data.pageInfo.hasNextPage,
3520
+ endCursor: t.data.pageInfo.endCursor ?? void 0
3521
+ }
3522
+ } : t;
3523
+ }
3456
3524
  addAreaCode(e) {
3457
3525
  return e.startsWith("+63") ? e : e.startsWith("63") ? `+${e}` : e.startsWith("0") ? `+63${e.substring(1)}` : `+63${e}`;
3458
3526
  }
3459
3527
  }
3460
3528
  export {
3461
- Gt as ObjectId,
3529
+ $t as ObjectId,
3462
3530
  S as ObjectType,
3463
- Rt as Sdk
3531
+ Pt as Sdk
3464
3532
  };
3465
3533
  //# sourceMappingURL=index.mjs.map