@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.js +36 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +407 -339
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +2 -1
- package/dist/sdk/transformer.d.ts +2 -0
- package/dist/sdk/types.d.ts +14 -0
- package/dist/services/queries.d.ts +1 -0
- package/dist/services/report.service.d.ts +2 -1
- package/dist/services/types.d.ts +18 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Te = (
|
|
3
|
-
var
|
|
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
|
|
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
|
|
16
|
+
function n(o, ...e) {
|
|
17
17
|
let t = "";
|
|
18
|
-
for (const [a, r] of
|
|
19
|
-
const
|
|
20
|
-
t = `${t}${r}${
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
162
|
+
`, Pe = n`
|
|
163
163
|
mutation EndGameSession($input: EndGameSessionInput!) {
|
|
164
164
|
endGameSession(input: $input)
|
|
165
165
|
}
|
|
166
|
-
`, xe =
|
|
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 =
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
362
|
+
`, qe = n`
|
|
363
363
|
query RemainingDailyWithdrawalsCount {
|
|
364
364
|
remainingDailyWithdrawalsCount
|
|
365
365
|
}
|
|
366
|
-
`, Fe =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
514
|
+
`, je = n`
|
|
515
515
|
query DepositsCount {
|
|
516
516
|
member {
|
|
517
517
|
depositsCount
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
`, Qe =
|
|
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 =
|
|
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 =
|
|
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
|
-
`,
|
|
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 =
|
|
625
|
-
${
|
|
624
|
+
`, Je = n`
|
|
625
|
+
${W}
|
|
626
626
|
|
|
627
627
|
query Promos {
|
|
628
628
|
promos {
|
|
629
629
|
...PromoFragment
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
`, Xe =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
715
|
+
`, rt = n`
|
|
716
716
|
query Member {
|
|
717
717
|
member {
|
|
718
718
|
dateTimeLastActive
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
`,
|
|
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
|
-
`,
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
-
`,
|
|
842
|
+
`, dt = n`
|
|
843
843
|
mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
|
|
844
844
|
deleteMemberAccount(input: $input)
|
|
845
845
|
}
|
|
846
|
-
`,
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
996
|
+
function m(o) {
|
|
974
997
|
return {
|
|
975
|
-
name:
|
|
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
|
-
}[
|
|
1047
|
+
}[o]
|
|
1025
1048
|
};
|
|
1026
1049
|
}
|
|
1027
|
-
class
|
|
1050
|
+
class gt {
|
|
1028
1051
|
constructor(e) {
|
|
1029
|
-
|
|
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(
|
|
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:
|
|
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:
|
|
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(
|
|
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:
|
|
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:
|
|
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(
|
|
1122
|
+
const t = await this.client.request(mt, e);
|
|
1100
1123
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1101
1124
|
ok: !1,
|
|
1102
|
-
error:
|
|
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:
|
|
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:
|
|
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(
|
|
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
|
|
1144
|
-
const t = G[
|
|
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
|
|
1182
|
+
class bt {
|
|
1160
1183
|
constructor(e) {
|
|
1161
|
-
|
|
1162
|
-
|
|
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:
|
|
1213
|
+
error: m("AccountBlacklisted")
|
|
1191
1214
|
} : {
|
|
1192
1215
|
ok: !1,
|
|
1193
|
-
error:
|
|
1216
|
+
error: f(a.status)
|
|
1194
1217
|
};
|
|
1195
1218
|
} catch {
|
|
1196
1219
|
return {
|
|
1197
1220
|
ok: !1,
|
|
1198
|
-
error:
|
|
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:
|
|
1246
|
+
error: m("InvalidTokenOrSecretAnswer")
|
|
1224
1247
|
} : {
|
|
1225
1248
|
ok: !1,
|
|
1226
|
-
error:
|
|
1249
|
+
error: f(a.status)
|
|
1227
1250
|
};
|
|
1228
1251
|
} catch {
|
|
1229
1252
|
return {
|
|
1230
1253
|
ok: !1,
|
|
1231
|
-
error:
|
|
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:
|
|
1276
|
+
error: m("AccountBlacklisted")
|
|
1254
1277
|
} : t.status === 403 || t.status === 401 ? {
|
|
1255
1278
|
ok: !1,
|
|
1256
|
-
error:
|
|
1279
|
+
error: m("InvalidToken")
|
|
1257
1280
|
} : {
|
|
1258
1281
|
ok: !1,
|
|
1259
|
-
error:
|
|
1282
|
+
error: f(t.status)
|
|
1260
1283
|
};
|
|
1261
1284
|
} catch {
|
|
1262
1285
|
return {
|
|
1263
1286
|
ok: !1,
|
|
1264
|
-
error:
|
|
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:
|
|
1302
|
+
return t.ok ? { ok: !0 } : { ok: !1, error: f(t.status) };
|
|
1280
1303
|
} catch {
|
|
1281
|
-
return { ok: !1, error:
|
|
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
|
|
1323
|
+
class St {
|
|
1301
1324
|
constructor(e) {
|
|
1302
|
-
|
|
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:
|
|
1339
|
+
error: m(t.data.uploadPrivateImageFile.__typename)
|
|
1317
1340
|
} : {
|
|
1318
1341
|
ok: !0
|
|
1319
1342
|
} : t;
|
|
1320
1343
|
}
|
|
1321
1344
|
}
|
|
1322
|
-
class
|
|
1345
|
+
class Et {
|
|
1323
1346
|
constructor(e) {
|
|
1324
|
-
|
|
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
|
-
|
|
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
|
|
1395
|
+
class At {
|
|
1366
1396
|
constructor(e) {
|
|
1367
|
-
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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(
|
|
1486
|
+
const t = await this.client.request(We, e);
|
|
1457
1487
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
1458
1488
|
ok: !1,
|
|
1459
|
-
error:
|
|
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:
|
|
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:
|
|
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:
|
|
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(
|
|
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(
|
|
1532
|
+
const t = await this.client.request(De, e);
|
|
1503
1533
|
return t.ok ? t.data.pointsToCashConversion ? {
|
|
1504
1534
|
ok: !1,
|
|
1505
|
-
error:
|
|
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:
|
|
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
|
|
1592
|
+
class kt {
|
|
1563
1593
|
constructor(e) {
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
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,
|
|
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), (
|
|
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((
|
|
1585
|
-
node:
|
|
1586
|
-
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:
|
|
1654
|
+
error: f(r.status)
|
|
1625
1655
|
};
|
|
1626
1656
|
} catch {
|
|
1627
1657
|
return {
|
|
1628
1658
|
ok: !1,
|
|
1629
|
-
error:
|
|
1659
|
+
error: f(500)
|
|
1630
1660
|
};
|
|
1631
1661
|
}
|
|
1632
1662
|
}
|
|
1633
1663
|
}
|
|
1634
|
-
class
|
|
1664
|
+
class Ct {
|
|
1635
1665
|
constructor(e) {
|
|
1636
|
-
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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
|
|
1692
|
-
return
|
|
1721
|
+
function Tt(o, e, t) {
|
|
1722
|
+
return o < e ? e : o > t ? t : o;
|
|
1693
1723
|
}
|
|
1694
|
-
function
|
|
1695
|
-
return Object.prototype.toString.call(
|
|
1724
|
+
function $(o) {
|
|
1725
|
+
return Object.prototype.toString.call(o) === "[object Object]" && Object(o) === o;
|
|
1696
1726
|
}
|
|
1697
|
-
function
|
|
1727
|
+
function vt(o) {
|
|
1698
1728
|
const e = [];
|
|
1699
1729
|
function t(a, r = []) {
|
|
1700
|
-
for (const
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1703
|
-
key: [...r,
|
|
1704
|
-
value:
|
|
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(
|
|
1738
|
+
return t(o), e;
|
|
1709
1739
|
}
|
|
1710
|
-
function
|
|
1711
|
-
return
|
|
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
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
1777
|
+
return await this.exec(c);
|
|
1748
1778
|
}
|
|
1749
1779
|
async exec(e) {
|
|
1750
|
-
var t, a, r,
|
|
1780
|
+
var t, a, r, c, s, p;
|
|
1751
1781
|
try {
|
|
1752
|
-
const
|
|
1753
|
-
if (!
|
|
1754
|
-
return { ok: !1, error:
|
|
1755
|
-
const
|
|
1756
|
-
return
|
|
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:
|
|
1788
|
+
error: f(500, l.message)
|
|
1759
1789
|
} : {
|
|
1760
1790
|
ok: !0,
|
|
1761
|
-
data:
|
|
1791
|
+
data: w
|
|
1762
1792
|
};
|
|
1763
1793
|
} catch {
|
|
1764
1794
|
return {
|
|
1765
1795
|
ok: !1,
|
|
1766
|
-
error:
|
|
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 =
|
|
1778
|
-
(
|
|
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
|
|
1788
|
-
return a.forEach((
|
|
1789
|
-
|
|
1790
|
-
}), r.append("map", JSON.stringify(
|
|
1791
|
-
r.append(
|
|
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(
|
|
1796
|
-
const e = new TextEncoder().encode(
|
|
1797
|
-
return Array.from(new Uint8Array(t)).map((
|
|
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
|
-
|
|
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(
|
|
1818
|
-
return new Date(
|
|
1847
|
+
function B(o) {
|
|
1848
|
+
return new Date(o.getTime());
|
|
1819
1849
|
}
|
|
1820
|
-
function
|
|
1821
|
-
const t = B(
|
|
1850
|
+
function D(o, e) {
|
|
1851
|
+
const t = B(o);
|
|
1822
1852
|
return t.setDate(t.getDate() + e), t;
|
|
1823
1853
|
}
|
|
1824
|
-
function R(
|
|
1825
|
-
const t = B(
|
|
1854
|
+
function R(o, e) {
|
|
1855
|
+
const t = B(o);
|
|
1826
1856
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
1827
1857
|
}
|
|
1828
|
-
function he(
|
|
1829
|
-
return
|
|
1858
|
+
function he(o, e) {
|
|
1859
|
+
return o.getTime() > e.getTime();
|
|
1830
1860
|
}
|
|
1831
|
-
function
|
|
1861
|
+
function Ce(o) {
|
|
1832
1862
|
return new Promise((e) => {
|
|
1833
|
-
setTimeout(e,
|
|
1863
|
+
setTimeout(e, o);
|
|
1834
1864
|
});
|
|
1835
1865
|
}
|
|
1836
|
-
function we(
|
|
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
|
|
1844
|
-
const
|
|
1845
|
-
return t(
|
|
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 (...
|
|
1877
|
+
return async (...s) => await c(s);
|
|
1848
1878
|
}
|
|
1849
|
-
function P(
|
|
1850
|
-
const t = B(
|
|
1879
|
+
function P(o, e) {
|
|
1880
|
+
const t = B(o);
|
|
1851
1881
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
1852
1882
|
}
|
|
1853
|
-
class
|
|
1883
|
+
class Mt {
|
|
1854
1884
|
constructor(e) {
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
this.authService = new
|
|
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: (
|
|
1891
|
-
var
|
|
1892
|
-
return
|
|
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: (
|
|
1938
|
+
until: (w) => w.ok,
|
|
1900
1939
|
interval: 1e3,
|
|
1901
1940
|
maxAttempt: 5
|
|
1902
1941
|
})();
|
|
1903
1942
|
if (!u.ok) return u;
|
|
1904
|
-
const
|
|
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(
|
|
1910
|
-
refreshTokenExpiresAt: P(
|
|
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
|
|
1919
|
-
if (
|
|
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
|
-
...
|
|
1963
|
+
...c.data,
|
|
1925
1964
|
accessTokenExpiresAt: R(s, 8).getTime(),
|
|
1926
|
-
refreshTokenExpiresAt: P(
|
|
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
|
|
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(
|
|
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(
|
|
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
|
|
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),
|
|
1989
|
-
if (he(a,
|
|
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
|
|
2000
|
-
if (this.refreshing = !1, !
|
|
2001
|
-
return this.logger.error(`Failed to refresh session: ${
|
|
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:
|
|
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
|
-
...
|
|
2049
|
+
...s.data,
|
|
2011
2050
|
accessTokenExpiresAt: R(a, 8).getTime(),
|
|
2012
|
-
refreshTokenExpiresAt: P(
|
|
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,
|
|
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" || ((
|
|
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
|
|
2091
|
+
function y(o) {
|
|
2053
2092
|
const e = {};
|
|
2054
|
-
for (const t in
|
|
2055
|
-
const a =
|
|
2093
|
+
for (const t in o) {
|
|
2094
|
+
const a = o[t];
|
|
2056
2095
|
if (a !== null && a !== void 0) {
|
|
2057
|
-
if (
|
|
2058
|
-
e[t] =
|
|
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) =>
|
|
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
|
|
2071
|
-
if (typeof
|
|
2072
|
-
return
|
|
2073
|
-
if (typeof
|
|
2074
|
-
const t = Number.parseFloat(
|
|
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
|
|
2119
|
+
class It {
|
|
2081
2120
|
constructor(e) {
|
|
2082
|
-
|
|
2121
|
+
d(this, "staticService");
|
|
2083
2122
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
2084
|
-
this.staticService = new
|
|
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
|
|
2162
|
+
return y(t);
|
|
2123
2163
|
}
|
|
2124
2164
|
platform(e) {
|
|
2125
|
-
var t, a, r, s,
|
|
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:
|
|
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: ((
|
|
2136
|
-
minimumAmount:
|
|
2137
|
-
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: ((
|
|
2141
|
-
iosEnabled: ((
|
|
2142
|
-
webEnabled: ((
|
|
2143
|
-
mobileWebEnabled: ((
|
|
2144
|
-
minimumAmount:
|
|
2145
|
-
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: ((
|
|
2149
|
-
iosEnabled: ((
|
|
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:
|
|
2153
|
-
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: ((
|
|
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:
|
|
2161
|
-
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:
|
|
2171
|
-
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:
|
|
2179
|
-
maximumAmount:
|
|
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: ((
|
|
2188
|
-
mobileWebEnabled: ((
|
|
2189
|
-
minimumAmount:
|
|
2190
|
-
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: ((
|
|
2195
|
-
webEnabled: ((
|
|
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:
|
|
2198
|
-
maximumAmount:
|
|
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:
|
|
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
|
|
2271
|
+
return y(t);
|
|
2232
2272
|
}
|
|
2233
2273
|
wallet(e) {
|
|
2234
2274
|
return {
|
|
2235
2275
|
id: e.id,
|
|
2236
|
-
balance:
|
|
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:
|
|
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:
|
|
2285
|
-
netAmount:
|
|
2286
|
-
fee:
|
|
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
|
|
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
|
|
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:
|
|
2311
|
-
fee:
|
|
2312
|
-
netAmount:
|
|
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
|
|
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:
|
|
2325
|
-
payout:
|
|
2364
|
+
bet: i(e.bet, 0),
|
|
2365
|
+
payout: i(e.payout, 0),
|
|
2326
2366
|
status: e.status,
|
|
2327
|
-
jackpotContribution:
|
|
2328
|
-
jackpotPayout:
|
|
2329
|
-
winloss:
|
|
2330
|
-
validBet:
|
|
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
|
|
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:
|
|
2352
|
-
payout:
|
|
2353
|
-
validBet:
|
|
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:
|
|
2402
|
+
amount: i(e.amount, 0),
|
|
2363
2403
|
content: e.content ?? void 0,
|
|
2364
|
-
currentBalance:
|
|
2404
|
+
currentBalance: i(e.currentBalance, 0),
|
|
2365
2405
|
referenceNumber: e.referenceNumber,
|
|
2366
2406
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2367
2407
|
};
|
|
2368
|
-
return
|
|
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
|
|
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:
|
|
2411
|
-
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:
|
|
2439
|
-
amount:
|
|
2440
|
-
netAmount:
|
|
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:
|
|
2446
|
-
amount:
|
|
2485
|
+
balance: i(e.balance, 0),
|
|
2486
|
+
amount: i(e.amount, 0),
|
|
2447
2487
|
expiration: new Date(e.expiration),
|
|
2448
|
-
turnoverRequirement:
|
|
2449
|
-
currentTurnoverRequirementContribution:
|
|
2488
|
+
turnoverRequirement: i(e.turnoverRequirement, 0),
|
|
2489
|
+
currentTurnoverRequirementContribution: i(
|
|
2450
2490
|
e.currentTurnoverRequirementContribution,
|
|
2451
2491
|
0
|
|
2452
2492
|
),
|
|
2453
|
-
currentTurnoverRequirementContributionPercentage:
|
|
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
|
|
2500
|
+
return y(t);
|
|
2461
2501
|
}
|
|
2462
2502
|
cashbackBonus(e) {
|
|
2463
2503
|
return {
|
|
2464
2504
|
id: e.id,
|
|
2465
|
-
balance:
|
|
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
|
|
2518
|
+
return y(t);
|
|
2479
2519
|
}
|
|
2480
2520
|
pointsWallet(e) {
|
|
2481
2521
|
return {
|
|
2482
2522
|
id: e.id,
|
|
2483
|
-
points:
|
|
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:
|
|
2493
|
-
balance:
|
|
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
|
|
2546
|
+
class Pt {
|
|
2499
2547
|
constructor(e) {
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
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:
|
|
3134
|
-
...this.transformer.transform.betRecord(
|
|
3135
|
-
cursor:
|
|
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:
|
|
3362
|
-
} = t.data,
|
|
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:
|
|
3372
|
-
return
|
|
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
|
-
|
|
3529
|
+
$t as ObjectId,
|
|
3462
3530
|
S as ObjectType,
|
|
3463
|
-
|
|
3531
|
+
Pt as Sdk
|
|
3464
3532
|
};
|
|
3465
3533
|
//# sourceMappingURL=index.mjs.map
|