@opexa/portal-sdk 0.0.40 → 0.0.42
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 +61 -61
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +433 -520
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +11 -15
- package/dist/sdk/transformer.d.ts +3 -0
- package/dist/services/index.d.ts +3 -0
- package/dist/services/types.d.ts +1 -1
- package/dist/utils/mobile-number.d.ts +11 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var m = (n, e, t) =>
|
|
1
|
+
var Te = Object.defineProperty;
|
|
2
|
+
var ve = (n, e, t) => e in n ? Te(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var m = (n, e, t) => ve(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { ObjectId as E } from "@opexa/object-id";
|
|
5
|
-
import { ObjectId as
|
|
6
|
-
const
|
|
5
|
+
import { ObjectId as qt } from "@opexa/object-id";
|
|
6
|
+
const b = {
|
|
7
7
|
Account: 8,
|
|
8
8
|
Deposit: 9,
|
|
9
9
|
Withdrawal: 14,
|
|
@@ -21,15 +21,15 @@ function o(n, ...e) {
|
|
|
21
21
|
}
|
|
22
22
|
return t.trim();
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const L = o`
|
|
25
25
|
fragment FileFragment on File {
|
|
26
26
|
id
|
|
27
27
|
url
|
|
28
28
|
status
|
|
29
29
|
dateTimeCreated
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
32
|
-
${
|
|
31
|
+
`, Me = o`
|
|
32
|
+
${L}
|
|
33
33
|
|
|
34
34
|
query File($id: ObjectId!) {
|
|
35
35
|
node(id: $id) {
|
|
@@ -38,7 +38,7 @@ const F = o`
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
`,
|
|
41
|
+
`, Ne = o`
|
|
42
42
|
mutation UploadPrivateImageFile($input: UploadFileInput!) {
|
|
43
43
|
uploadPrivateImageFile(input: $input) {
|
|
44
44
|
... on FileFormatNotSupportedError {
|
|
@@ -52,7 +52,7 @@ const F = o`
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
`,
|
|
55
|
+
`, Ie = o`
|
|
56
56
|
query Wallet {
|
|
57
57
|
wallet {
|
|
58
58
|
id
|
|
@@ -62,7 +62,7 @@ const F = o`
|
|
|
62
62
|
dateTimeLastUpdated
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
`,
|
|
65
|
+
`, De = o`
|
|
66
66
|
query PointsWallet {
|
|
67
67
|
pointsWallet {
|
|
68
68
|
id
|
|
@@ -71,7 +71,7 @@ const F = o`
|
|
|
71
71
|
dateTimeCreated
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
`,
|
|
74
|
+
`, Re = o`
|
|
75
75
|
mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
|
|
76
76
|
pointsToCashConversion(input: $input) {
|
|
77
77
|
... on InsufficientPointsError {
|
|
@@ -79,7 +79,7 @@ const F = o`
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
`,
|
|
82
|
+
`, Pe = o`
|
|
83
83
|
query PointsWalletTransactions(
|
|
84
84
|
$first: Int
|
|
85
85
|
$after: Cursor
|
|
@@ -107,7 +107,7 @@ const F = o`
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
`,
|
|
110
|
+
`, ge = o`
|
|
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 F = o`
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
131
|
+
`, Se = o`
|
|
132
132
|
query GamesByName($first: Int, $search: String!, $filter: GameFilterInput) {
|
|
133
133
|
gamesByName(first: $first, search: $search, filter: $filter) {
|
|
134
134
|
... on Game {
|
|
@@ -151,7 +151,7 @@ const F = o`
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
`,
|
|
154
|
+
`, be = o`
|
|
155
155
|
mutation CreateGameSession($input: CreateGameSessionInput!) {
|
|
156
156
|
createGameSession(input: $input) {
|
|
157
157
|
... on GameDoesNotExistError {
|
|
@@ -159,11 +159,11 @@ const F = o`
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
`,
|
|
162
|
+
`, Ge = o`
|
|
163
163
|
mutation EndGameSession($input: EndGameSessionInput!) {
|
|
164
164
|
endGameSession(input: $input)
|
|
165
165
|
}
|
|
166
|
-
`,
|
|
166
|
+
`, xe = o`
|
|
167
167
|
mutation EndGameSession($input: EndGameSessionInput!) {
|
|
168
168
|
endGameSession(input: $input) {
|
|
169
169
|
... on GameSessionDoesNotExistError {
|
|
@@ -177,7 +177,7 @@ const F = o`
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
`,
|
|
180
|
+
`, $e = o`
|
|
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 F = o`
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
`,
|
|
206
|
+
`, We = o`
|
|
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 F = o`
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
`,
|
|
273
|
+
`, Ue = o`
|
|
274
274
|
mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
|
|
275
275
|
createGCashWithdrawal(input: $input) {
|
|
276
276
|
... on AccountNotVerifiedError {
|
|
@@ -336,7 +336,7 @@ const F = o`
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
`,
|
|
339
|
+
`, qe = o`
|
|
340
340
|
mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
|
|
341
341
|
createBankWithdrawal(input: $input) {
|
|
342
342
|
... on MobileNumberNotVerifiedError {
|
|
@@ -359,11 +359,11 @@ const F = o`
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
`,
|
|
362
|
+
`, Fe = o`
|
|
363
363
|
query RemainingDailyWithdrawalsCount {
|
|
364
364
|
remainingDailyWithdrawalsCount
|
|
365
365
|
}
|
|
366
|
-
`,
|
|
366
|
+
`, Le = o`
|
|
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 F = o`
|
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
`,
|
|
395
|
+
`, Ve = o`
|
|
396
396
|
mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
|
|
397
397
|
createGCashDeposit(input: $input) {
|
|
398
398
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -421,7 +421,7 @@ const F = o`
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
`,
|
|
424
|
+
`, Ye = o`
|
|
425
425
|
mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
|
|
426
426
|
createMayaDeposit(input: $input) {
|
|
427
427
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -450,7 +450,7 @@ const F = o`
|
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
`,
|
|
453
|
+
`, He = o`
|
|
454
454
|
mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
|
|
455
455
|
createMayaAppDeposit(input: $input) {
|
|
456
456
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -479,7 +479,7 @@ const F = o`
|
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
`,
|
|
482
|
+
`, je = o`
|
|
483
483
|
query Deposit($id: ObjectId!) {
|
|
484
484
|
node(id: $id) {
|
|
485
485
|
... on GCashDeposit {
|
|
@@ -511,13 +511,13 @@ const F = o`
|
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
`,
|
|
514
|
+
`, Qe = o`
|
|
515
515
|
query DepositsCount {
|
|
516
516
|
member {
|
|
517
517
|
depositsCount
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
`,
|
|
520
|
+
`, Ke = o`
|
|
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 F = o`
|
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
`,
|
|
560
|
+
`, ze = o`
|
|
561
561
|
query LatestBetRecords {
|
|
562
562
|
latestBetRecords {
|
|
563
563
|
id
|
|
@@ -576,7 +576,7 @@ const F = o`
|
|
|
576
576
|
dateTimeCreated
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
`,
|
|
579
|
+
`, Je = o`
|
|
580
580
|
query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
|
|
581
581
|
member {
|
|
582
582
|
transactionRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -602,8 +602,8 @@ const F = o`
|
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
`,
|
|
606
|
-
${
|
|
605
|
+
`, H = o`
|
|
606
|
+
${L}
|
|
607
607
|
|
|
608
608
|
fragment PromoFragment on Promo {
|
|
609
609
|
id
|
|
@@ -621,24 +621,24 @@ const F = o`
|
|
|
621
621
|
dateTimeCreated
|
|
622
622
|
dateTimeLastUpdated
|
|
623
623
|
}
|
|
624
|
-
`,
|
|
625
|
-
${
|
|
624
|
+
`, Xe = o`
|
|
625
|
+
${H}
|
|
626
626
|
|
|
627
627
|
query Promos {
|
|
628
628
|
promos {
|
|
629
629
|
...PromoFragment
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
`,
|
|
633
|
-
${
|
|
632
|
+
`, Ze = o`
|
|
633
|
+
${H}
|
|
634
634
|
|
|
635
635
|
query AvailablePromos($filter: PromoFilterInput) {
|
|
636
636
|
availablePromos(filter: $filter) {
|
|
637
637
|
...PromoFragment
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
`,
|
|
641
|
-
${
|
|
640
|
+
`, Ae = o`
|
|
641
|
+
${L}
|
|
642
642
|
|
|
643
643
|
fragment CashbackFragment on Cashback {
|
|
644
644
|
id
|
|
@@ -654,16 +654,16 @@ const F = o`
|
|
|
654
654
|
dateTimeCreated
|
|
655
655
|
dateTimeLastUpdated
|
|
656
656
|
}
|
|
657
|
-
`,
|
|
658
|
-
${
|
|
657
|
+
`, et = o`
|
|
658
|
+
${Ae}
|
|
659
659
|
|
|
660
660
|
query Cashbacks {
|
|
661
661
|
cashbacks {
|
|
662
662
|
...CashbackFragment
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
`,
|
|
666
|
-
${
|
|
665
|
+
`, tt = o`
|
|
666
|
+
${H}
|
|
667
667
|
|
|
668
668
|
query Bonus {
|
|
669
669
|
bonus {
|
|
@@ -691,8 +691,8 @@ const F = o`
|
|
|
691
691
|
dateTimeLastUpdated
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
-
`,
|
|
695
|
-
${
|
|
694
|
+
`, rt = o`
|
|
695
|
+
${Ae}
|
|
696
696
|
|
|
697
697
|
query CashbackBonuses {
|
|
698
698
|
cashbackBonuses {
|
|
@@ -705,7 +705,7 @@ const F = o`
|
|
|
705
705
|
dateTimeLastUpdated
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
`,
|
|
708
|
+
`, at = o`
|
|
709
709
|
mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
|
|
710
710
|
claimCashbackBonus(input: $input) {
|
|
711
711
|
... on CashbackBonusDoesNotExistError {
|
|
@@ -713,13 +713,13 @@ const F = o`
|
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
`,
|
|
716
|
+
`, nt = o`
|
|
717
717
|
query Member {
|
|
718
718
|
member {
|
|
719
719
|
dateTimeLastActive
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
|
-
`,
|
|
722
|
+
`, ot = o`
|
|
723
723
|
query MemberAccount {
|
|
724
724
|
memberAccount: self {
|
|
725
725
|
... on MemberAccount {
|
|
@@ -743,8 +743,8 @@ const F = o`
|
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
`,
|
|
747
|
-
${
|
|
746
|
+
`, it = o`
|
|
747
|
+
${L}
|
|
748
748
|
|
|
749
749
|
query MemberVerification {
|
|
750
750
|
memberAccount: self {
|
|
@@ -767,7 +767,7 @@ const F = o`
|
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
`,
|
|
770
|
+
`, st = o`
|
|
771
771
|
mutation RegisterMemberAccount(
|
|
772
772
|
$input: RegisterMemberAccountInput!
|
|
773
773
|
$referralCode: String
|
|
@@ -803,7 +803,7 @@ const F = o`
|
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
`,
|
|
806
|
+
`, ct = o`
|
|
807
807
|
mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {
|
|
808
808
|
registerMayaMemberAccount(input: $input) {
|
|
809
809
|
... on AccountNameNotAvailableError {
|
|
@@ -811,7 +811,7 @@ const F = o`
|
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
|
-
`,
|
|
814
|
+
`, mt = o`
|
|
815
815
|
mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
|
|
816
816
|
updateMemberAccount(input: $input) {
|
|
817
817
|
... on AccountNameNotAvailableError {
|
|
@@ -848,11 +848,11 @@ const F = o`
|
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
`,
|
|
851
|
+
`, ut = o`
|
|
852
852
|
mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
|
|
853
853
|
deleteMemberAccount(input: $input)
|
|
854
854
|
}
|
|
855
|
-
`,
|
|
855
|
+
`, lt = o`
|
|
856
856
|
mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
|
|
857
857
|
verifyMobileNumber(input: $input) {
|
|
858
858
|
... on InvalidSMSVerificationCodeError {
|
|
@@ -863,7 +863,7 @@ const F = o`
|
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
|
-
`,
|
|
866
|
+
`, pt = o`
|
|
867
867
|
mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
|
|
868
868
|
createMemberVerification(input: $input) {
|
|
869
869
|
... on FileDoesNotExistError {
|
|
@@ -877,7 +877,7 @@ const F = o`
|
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
`,
|
|
880
|
+
`, ft = o`
|
|
881
881
|
mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
|
|
882
882
|
updateMemberVerification(input: $input) {
|
|
883
883
|
... on FileDoesNotExistError {
|
|
@@ -894,7 +894,7 @@ const F = o`
|
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
|
-
`,
|
|
897
|
+
`, ht = o`
|
|
898
898
|
query ProfileCompletion {
|
|
899
899
|
profileCompletion {
|
|
900
900
|
completionPercentage
|
|
@@ -905,7 +905,7 @@ const F = o`
|
|
|
905
905
|
accountPassword
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
|
-
`,
|
|
908
|
+
`, wt = o`
|
|
909
909
|
mutation SendVerificationCode($input: SendVerificationCodeInput!) {
|
|
910
910
|
sendVerificationCode(input: $input) {
|
|
911
911
|
... on InvalidPlatformError {
|
|
@@ -916,7 +916,7 @@ const F = o`
|
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
`,
|
|
919
|
+
`, yt = o`
|
|
920
920
|
fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
|
|
921
921
|
minimumAmount
|
|
922
922
|
maximumAmount
|
|
@@ -970,7 +970,7 @@ const F = o`
|
|
|
970
970
|
multiplier
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
|
-
`,
|
|
973
|
+
`, gt = o`
|
|
974
974
|
query MayaSession($id: ObjectId!) {
|
|
975
975
|
mayaSession(id: $id) {
|
|
976
976
|
id
|
|
@@ -978,7 +978,7 @@ const F = o`
|
|
|
978
978
|
dateTimeCreated
|
|
979
979
|
}
|
|
980
980
|
}
|
|
981
|
-
`,
|
|
981
|
+
`, St = o`
|
|
982
982
|
mutation ValidateMayaSession {
|
|
983
983
|
validateMayaSession: validMayaSession
|
|
984
984
|
}
|
|
@@ -1008,7 +1008,7 @@ const F = o`
|
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
1010
|
`;
|
|
1011
|
-
function
|
|
1011
|
+
function u(n) {
|
|
1012
1012
|
return {
|
|
1013
1013
|
name: n,
|
|
1014
1014
|
message: {
|
|
@@ -1062,39 +1062,39 @@ function d(n) {
|
|
|
1062
1062
|
}[n]
|
|
1063
1063
|
};
|
|
1064
1064
|
}
|
|
1065
|
-
class
|
|
1065
|
+
class bt {
|
|
1066
1066
|
constructor(e) {
|
|
1067
1067
|
m(this, "client");
|
|
1068
1068
|
this.client = e;
|
|
1069
1069
|
}
|
|
1070
1070
|
/** aka `Query.self` */
|
|
1071
1071
|
async memberAccount() {
|
|
1072
|
-
const e = await this.client.request(
|
|
1072
|
+
const e = await this.client.request(ot);
|
|
1073
1073
|
return e.ok ? {
|
|
1074
1074
|
ok: !0,
|
|
1075
1075
|
data: e.data.memberAccount
|
|
1076
1076
|
} : e;
|
|
1077
1077
|
}
|
|
1078
1078
|
async registerMemberAccount(e) {
|
|
1079
|
-
const t = await this.client.request(
|
|
1079
|
+
const t = await this.client.request(st, e);
|
|
1080
1080
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1081
1081
|
ok: !1,
|
|
1082
|
-
error:
|
|
1082
|
+
error: u(t.data.registerMemberAccount.__typename)
|
|
1083
1083
|
} : {
|
|
1084
1084
|
ok: !0
|
|
1085
1085
|
} : t;
|
|
1086
1086
|
}
|
|
1087
1087
|
async updateMemberAccount(e) {
|
|
1088
|
-
const t = await this.client.request(
|
|
1088
|
+
const t = await this.client.request(mt, e);
|
|
1089
1089
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
1090
1090
|
ok: !1,
|
|
1091
|
-
error:
|
|
1091
|
+
error: u(t.data.updateMemberAccount.__typename)
|
|
1092
1092
|
} : {
|
|
1093
1093
|
ok: !0
|
|
1094
1094
|
} : t;
|
|
1095
1095
|
}
|
|
1096
1096
|
async deleteMemberAccount(e) {
|
|
1097
|
-
const t = await this.client.request(
|
|
1097
|
+
const t = await this.client.request(ut, e);
|
|
1098
1098
|
return t.ok ? t.data.deleteMemberAccount ? {
|
|
1099
1099
|
ok: !0
|
|
1100
1100
|
} : {
|
|
@@ -1112,56 +1112,56 @@ class St {
|
|
|
1112
1112
|
);
|
|
1113
1113
|
return t.ok ? t.data.resetPassword ? {
|
|
1114
1114
|
ok: !1,
|
|
1115
|
-
error:
|
|
1115
|
+
error: u(t.data.resetPassword.__typename)
|
|
1116
1116
|
} : {
|
|
1117
1117
|
ok: !0
|
|
1118
1118
|
} : t;
|
|
1119
1119
|
}
|
|
1120
1120
|
async profileCompletion() {
|
|
1121
|
-
const e = await this.client.request(
|
|
1121
|
+
const e = await this.client.request(ht);
|
|
1122
1122
|
return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
|
|
1123
1123
|
}
|
|
1124
1124
|
async platform() {
|
|
1125
|
-
return await this.client.request(
|
|
1125
|
+
return await this.client.request(yt);
|
|
1126
1126
|
}
|
|
1127
1127
|
async sendVerificationCode(e) {
|
|
1128
|
-
const t = await this.client.request(
|
|
1128
|
+
const t = await this.client.request(wt, e);
|
|
1129
1129
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
1130
1130
|
ok: !1,
|
|
1131
|
-
error:
|
|
1131
|
+
error: u(t.data.sendVerificationCode.__typename)
|
|
1132
1132
|
} : {
|
|
1133
1133
|
ok: !0
|
|
1134
1134
|
} : t;
|
|
1135
1135
|
}
|
|
1136
1136
|
async verifyMobileNumber(e) {
|
|
1137
|
-
const t = await this.client.request(
|
|
1137
|
+
const t = await this.client.request(lt, e);
|
|
1138
1138
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1139
1139
|
ok: !1,
|
|
1140
|
-
error:
|
|
1140
|
+
error: u(t.data.verifyMobileNumber.__typename)
|
|
1141
1141
|
} : {
|
|
1142
1142
|
ok: !0
|
|
1143
1143
|
} : t;
|
|
1144
1144
|
}
|
|
1145
1145
|
async createMemberVerification(e) {
|
|
1146
|
-
const t = await this.client.request(
|
|
1146
|
+
const t = await this.client.request(pt, e);
|
|
1147
1147
|
return t.ok ? t.data.createMemberVerification ? {
|
|
1148
1148
|
ok: !1,
|
|
1149
|
-
error:
|
|
1149
|
+
error: u(t.data.createMemberVerification.__typename)
|
|
1150
1150
|
} : {
|
|
1151
1151
|
ok: !0
|
|
1152
1152
|
} : t;
|
|
1153
1153
|
}
|
|
1154
1154
|
async updateMemberVerification(e) {
|
|
1155
|
-
const t = await this.client.request(
|
|
1155
|
+
const t = await this.client.request(ft, e);
|
|
1156
1156
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
1157
1157
|
ok: !1,
|
|
1158
|
-
error:
|
|
1158
|
+
error: u(t.data.updateMemberVerification.__typename)
|
|
1159
1159
|
} : {
|
|
1160
1160
|
ok: !0
|
|
1161
1161
|
} : t;
|
|
1162
1162
|
}
|
|
1163
1163
|
async memberVerification() {
|
|
1164
|
-
const e = await this.client.request(
|
|
1164
|
+
const e = await this.client.request(it);
|
|
1165
1165
|
return e.ok ? {
|
|
1166
1166
|
ok: !0,
|
|
1167
1167
|
data: e.data.memberAccount.verification
|
|
@@ -1169,7 +1169,7 @@ class St {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
async announcements(e) {
|
|
1171
1171
|
const t = await this.client.request(
|
|
1172
|
-
|
|
1172
|
+
$e,
|
|
1173
1173
|
e
|
|
1174
1174
|
);
|
|
1175
1175
|
return t.ok ? {
|
|
@@ -1178,23 +1178,23 @@ class St {
|
|
|
1178
1178
|
} : t;
|
|
1179
1179
|
}
|
|
1180
1180
|
async registerMayaMemberAccount(e) {
|
|
1181
|
-
const t = await this.client.request(
|
|
1181
|
+
const t = await this.client.request(ct, e);
|
|
1182
1182
|
return t.ok ? t.data.registerMayaMemberAccount ? {
|
|
1183
1183
|
ok: !1,
|
|
1184
|
-
error:
|
|
1184
|
+
error: u(t.data.registerMayaMemberAccount.__typename)
|
|
1185
1185
|
} : {
|
|
1186
1186
|
ok: !0
|
|
1187
1187
|
} : t;
|
|
1188
1188
|
}
|
|
1189
1189
|
}
|
|
1190
1190
|
function h(n, e) {
|
|
1191
|
-
const t =
|
|
1191
|
+
const t = V[n] ? V[n] : V[500];
|
|
1192
1192
|
return {
|
|
1193
1193
|
name: t.name,
|
|
1194
1194
|
message: e ?? t.message
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
|
-
const
|
|
1197
|
+
const V = {
|
|
1198
1198
|
400: { name: "HttpBadRequest", message: "Bad Request" },
|
|
1199
1199
|
401: { name: "HttpUnauthorized", message: "Unauthorized" },
|
|
1200
1200
|
403: { name: "HttpForbidden", message: "Forbidden" },
|
|
@@ -1203,7 +1203,7 @@ const L = {
|
|
|
1203
1203
|
429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
|
|
1204
1204
|
500: { name: "HttpInternalServerError", message: "Internal Server Error" }
|
|
1205
1205
|
};
|
|
1206
|
-
class
|
|
1206
|
+
class At {
|
|
1207
1207
|
constructor(e) {
|
|
1208
1208
|
m(this, "url");
|
|
1209
1209
|
m(this, "platform");
|
|
@@ -1234,7 +1234,7 @@ class bt {
|
|
|
1234
1234
|
data: a
|
|
1235
1235
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1236
1236
|
ok: !1,
|
|
1237
|
-
error:
|
|
1237
|
+
error: u("AccountBlacklisted")
|
|
1238
1238
|
} : {
|
|
1239
1239
|
ok: !1,
|
|
1240
1240
|
error: h(r.status)
|
|
@@ -1267,7 +1267,7 @@ class bt {
|
|
|
1267
1267
|
data: a
|
|
1268
1268
|
} : r.status === 401 || r.status === 403 ? {
|
|
1269
1269
|
ok: !1,
|
|
1270
|
-
error:
|
|
1270
|
+
error: u("InvalidTokenOrSecretAnswer")
|
|
1271
1271
|
} : {
|
|
1272
1272
|
ok: !1,
|
|
1273
1273
|
error: h(r.status)
|
|
@@ -1297,10 +1297,10 @@ class bt {
|
|
|
1297
1297
|
data: r
|
|
1298
1298
|
} : r.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1299
1299
|
ok: !1,
|
|
1300
|
-
error:
|
|
1300
|
+
error: u("AccountBlacklisted")
|
|
1301
1301
|
} : t.status === 403 || t.status === 401 ? {
|
|
1302
1302
|
ok: !1,
|
|
1303
|
-
error:
|
|
1303
|
+
error: u("InvalidToken")
|
|
1304
1304
|
} : {
|
|
1305
1305
|
ok: !1,
|
|
1306
1306
|
error: h(t.status)
|
|
@@ -1344,68 +1344,203 @@ class bt {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
class
|
|
1347
|
+
class kt {
|
|
1348
|
+
constructor(e) {
|
|
1349
|
+
m(this, "url");
|
|
1350
|
+
m(this, "siteId");
|
|
1351
|
+
m(this, "platformId");
|
|
1352
|
+
this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
|
|
1353
|
+
}
|
|
1354
|
+
async self() {
|
|
1355
|
+
const e = await this.getJson(`/sites/${this.siteId}`);
|
|
1356
|
+
return e.ok ? {
|
|
1357
|
+
ok: !0,
|
|
1358
|
+
data: e.data.data
|
|
1359
|
+
} : e;
|
|
1360
|
+
}
|
|
1361
|
+
async games(e) {
|
|
1362
|
+
var a, s, c, p, l, f, w, d, _, C, T, v, M, N, I, D, R, P, G, x, $, W, U, B;
|
|
1363
|
+
const t = new URLSearchParams();
|
|
1364
|
+
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (d = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && d.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (C = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.provider) != null && C.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (N = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && N.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (P = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (x = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && x.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (W = ($ = e == null ? void 0 : e.filter) == null ? void 0 : $.tags) != null && W.in && t.set(
|
|
1365
|
+
"filter[tags][in]",
|
|
1366
|
+
e.filter.tags.in.map((S) => S.toLowerCase()).join(",")
|
|
1367
|
+
), (B = (U = e == null ? void 0 : e.filter) == null ? void 0 : U.tags) != null && B.notIn && t.set(
|
|
1368
|
+
"filter[tags][nin]",
|
|
1369
|
+
e.filter.tags.notIn.map((S) => S.toLowerCase()).join(",")
|
|
1370
|
+
);
|
|
1371
|
+
const r = await this.getJson("/games", t);
|
|
1372
|
+
return r.ok ? {
|
|
1373
|
+
ok: !0,
|
|
1374
|
+
data: {
|
|
1375
|
+
edges: r.data.data.map((S) => ({
|
|
1376
|
+
node: S,
|
|
1377
|
+
cursor: S.cursor
|
|
1378
|
+
})),
|
|
1379
|
+
totalCount: r.data.totalCount ?? 0,
|
|
1380
|
+
pageInfo: {
|
|
1381
|
+
hasNextPage: !!r.data.next,
|
|
1382
|
+
endCursor: r.data.next
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
} : r;
|
|
1386
|
+
}
|
|
1387
|
+
async game(e) {
|
|
1388
|
+
var r;
|
|
1389
|
+
const t = await this.getJson(`/games/${e}`);
|
|
1390
|
+
return ((r = t.error) == null ? void 0 : r.name) === "HttpNotFound" ? {
|
|
1391
|
+
ok: !0,
|
|
1392
|
+
data: null
|
|
1393
|
+
} : t.ok ? {
|
|
1394
|
+
ok: !0,
|
|
1395
|
+
data: t.data.data
|
|
1396
|
+
} : t;
|
|
1397
|
+
}
|
|
1398
|
+
async getJson(e, t) {
|
|
1399
|
+
const r = new Request(`${this.url}${e}?${(t == null ? void 0 : t.toString()) ?? ""}`, {
|
|
1400
|
+
method: "GET",
|
|
1401
|
+
headers: {
|
|
1402
|
+
Accept: "application/json",
|
|
1403
|
+
"Content-Type": "application/json",
|
|
1404
|
+
"Site-ID": this.siteId,
|
|
1405
|
+
"Platform-ID": this.platformId
|
|
1406
|
+
}
|
|
1407
|
+
});
|
|
1408
|
+
try {
|
|
1409
|
+
const a = await fetch(r);
|
|
1410
|
+
return a.ok ? {
|
|
1411
|
+
ok: !0,
|
|
1412
|
+
data: await a.json()
|
|
1413
|
+
} : {
|
|
1414
|
+
ok: !1,
|
|
1415
|
+
error: h(a.status)
|
|
1416
|
+
};
|
|
1417
|
+
} catch {
|
|
1418
|
+
return {
|
|
1419
|
+
ok: !1,
|
|
1420
|
+
error: h(500)
|
|
1421
|
+
};
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
class _t {
|
|
1348
1426
|
constructor(e) {
|
|
1349
1427
|
m(this, "client");
|
|
1350
1428
|
this.client = e;
|
|
1351
1429
|
}
|
|
1352
1430
|
async file(e) {
|
|
1353
|
-
const t = await this.client.request(
|
|
1431
|
+
const t = await this.client.request(Me, e);
|
|
1354
1432
|
return t.ok ? {
|
|
1355
1433
|
ok: !0,
|
|
1356
1434
|
data: t.data.node
|
|
1357
1435
|
} : t;
|
|
1358
1436
|
}
|
|
1359
1437
|
async uploadPrivateImageFile(e) {
|
|
1360
|
-
const t = await this.client.upload(
|
|
1438
|
+
const t = await this.client.upload(Ne, e);
|
|
1361
1439
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1362
1440
|
ok: !1,
|
|
1363
|
-
error:
|
|
1441
|
+
error: u(t.data.uploadPrivateImageFile.__typename)
|
|
1364
1442
|
} : {
|
|
1365
1443
|
ok: !0
|
|
1366
1444
|
} : t;
|
|
1367
1445
|
}
|
|
1368
1446
|
}
|
|
1369
|
-
class
|
|
1447
|
+
class Ct {
|
|
1448
|
+
constructor(e) {
|
|
1449
|
+
m(this, "client");
|
|
1450
|
+
this.client = e;
|
|
1451
|
+
}
|
|
1452
|
+
/** @deprecated */
|
|
1453
|
+
async games(e) {
|
|
1454
|
+
const t = await this.client.request(ge, e);
|
|
1455
|
+
return t.ok ? { ok: t.ok, data: t.data.games } : t;
|
|
1456
|
+
}
|
|
1457
|
+
/** @deprecated */
|
|
1458
|
+
async gamesByName(e) {
|
|
1459
|
+
const t = await this.client.request(
|
|
1460
|
+
Se,
|
|
1461
|
+
e
|
|
1462
|
+
);
|
|
1463
|
+
return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
|
|
1464
|
+
}
|
|
1465
|
+
async gameSession(e) {
|
|
1466
|
+
const t = await this.client.request(
|
|
1467
|
+
Ee,
|
|
1468
|
+
e
|
|
1469
|
+
);
|
|
1470
|
+
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1471
|
+
}
|
|
1472
|
+
async createGameSession(e) {
|
|
1473
|
+
const t = await this.client.request(be, e);
|
|
1474
|
+
return t.ok ? t.data.createGameSession ? {
|
|
1475
|
+
ok: !1,
|
|
1476
|
+
error: u(t.data.createGameSession.__typename)
|
|
1477
|
+
} : {
|
|
1478
|
+
ok: !0
|
|
1479
|
+
} : t;
|
|
1480
|
+
}
|
|
1481
|
+
async endGameSession(e) {
|
|
1482
|
+
const t = await this.client.request(xe, e);
|
|
1483
|
+
return t.ok ? t.data.endGameSession ? {
|
|
1484
|
+
ok: !1,
|
|
1485
|
+
error: u(t.data.endGameSession.__typename)
|
|
1486
|
+
} : {
|
|
1487
|
+
ok: !0
|
|
1488
|
+
} : t;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
class Tt {
|
|
1492
|
+
constructor(e) {
|
|
1493
|
+
m(this, "client");
|
|
1494
|
+
this.client = e;
|
|
1495
|
+
}
|
|
1496
|
+
async latestBetRecords() {
|
|
1497
|
+
const e = await this.client.request(ze);
|
|
1498
|
+
return e.ok ? {
|
|
1499
|
+
ok: !0,
|
|
1500
|
+
data: e.data.latestBetRecords
|
|
1501
|
+
} : e;
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
class vt {
|
|
1370
1505
|
constructor(e) {
|
|
1371
1506
|
m(this, "client");
|
|
1372
1507
|
this.client = e;
|
|
1373
1508
|
}
|
|
1374
1509
|
async betRecords(e) {
|
|
1375
1510
|
const t = await this.client.request(
|
|
1376
|
-
|
|
1511
|
+
Ke,
|
|
1377
1512
|
e
|
|
1378
1513
|
);
|
|
1379
1514
|
return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
|
|
1380
1515
|
}
|
|
1381
1516
|
async transactionRecords(e) {
|
|
1382
|
-
const t = await this.client.request(
|
|
1517
|
+
const t = await this.client.request(Je, e);
|
|
1383
1518
|
return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
|
|
1384
1519
|
}
|
|
1385
1520
|
async withdrawalRecords(e) {
|
|
1386
1521
|
const t = await this.client.request(
|
|
1387
|
-
|
|
1522
|
+
We,
|
|
1388
1523
|
e
|
|
1389
1524
|
);
|
|
1390
1525
|
return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
|
|
1391
1526
|
}
|
|
1392
1527
|
async depositRecords(e) {
|
|
1393
1528
|
const t = await this.client.request(
|
|
1394
|
-
|
|
1529
|
+
Le,
|
|
1395
1530
|
e
|
|
1396
1531
|
);
|
|
1397
1532
|
return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
|
|
1398
1533
|
}
|
|
1399
1534
|
async depositsCount() {
|
|
1400
|
-
const e = await this.client.request(
|
|
1535
|
+
const e = await this.client.request(Qe);
|
|
1401
1536
|
return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
|
|
1402
1537
|
}
|
|
1403
1538
|
async member() {
|
|
1404
|
-
const e = await this.client.request(
|
|
1539
|
+
const e = await this.client.request(nt);
|
|
1405
1540
|
return e.ok ? { ok: e.ok, data: e.data.member } : e;
|
|
1406
1541
|
}
|
|
1407
1542
|
async pointsWalletTransactions(e) {
|
|
1408
|
-
const t = await this.client.request(
|
|
1543
|
+
const t = await this.client.request(Pe, e);
|
|
1409
1544
|
return t.ok ? { ok: t.ok, data: t.data.member.pointsWalletTransactions } : t;
|
|
1410
1545
|
}
|
|
1411
1546
|
async activityRecords(e) {
|
|
@@ -1416,7 +1551,7 @@ class kt {
|
|
|
1416
1551
|
return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
|
|
1417
1552
|
}
|
|
1418
1553
|
}
|
|
1419
|
-
class
|
|
1554
|
+
class Mt {
|
|
1420
1555
|
constructor(e) {
|
|
1421
1556
|
m(this, "url");
|
|
1422
1557
|
this.url = e.url;
|
|
@@ -1428,35 +1563,35 @@ class _t {
|
|
|
1428
1563
|
];
|
|
1429
1564
|
}
|
|
1430
1565
|
}
|
|
1431
|
-
class
|
|
1566
|
+
class ke {
|
|
1432
1567
|
constructor(e) {
|
|
1433
1568
|
m(this, "client");
|
|
1434
1569
|
this.client = e;
|
|
1435
1570
|
}
|
|
1436
1571
|
async promos() {
|
|
1437
|
-
const e = await this.client.request(
|
|
1572
|
+
const e = await this.client.request(Xe);
|
|
1438
1573
|
return e.ok ? { ok: e.ok, data: e.data.promos } : e;
|
|
1439
1574
|
}
|
|
1440
1575
|
async cashbacks() {
|
|
1441
|
-
const e = await this.client.request(
|
|
1576
|
+
const e = await this.client.request(et);
|
|
1442
1577
|
return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
|
|
1443
1578
|
}
|
|
1444
1579
|
async availablePromos(e) {
|
|
1445
1580
|
const t = await this.client.request(
|
|
1446
|
-
|
|
1581
|
+
Ze,
|
|
1447
1582
|
e
|
|
1448
1583
|
);
|
|
1449
1584
|
return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
|
|
1450
1585
|
}
|
|
1451
1586
|
async cashbackBonuses() {
|
|
1452
|
-
const e = await this.client.request(
|
|
1587
|
+
const e = await this.client.request(rt);
|
|
1453
1588
|
return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
|
|
1454
1589
|
}
|
|
1455
1590
|
async claimCashbackBonus(e) {
|
|
1456
|
-
const t = await this.client.request(
|
|
1591
|
+
const t = await this.client.request(at, e);
|
|
1457
1592
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
1458
1593
|
ok: !1,
|
|
1459
|
-
error:
|
|
1594
|
+
error: u(t.data.claimCashbackBonus.__typename)
|
|
1460
1595
|
} : {
|
|
1461
1596
|
ok: !0
|
|
1462
1597
|
} : {
|
|
@@ -1465,52 +1600,52 @@ class Ae {
|
|
|
1465
1600
|
};
|
|
1466
1601
|
}
|
|
1467
1602
|
async bonus() {
|
|
1468
|
-
const e = await this.client.request(
|
|
1603
|
+
const e = await this.client.request(tt);
|
|
1469
1604
|
return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
|
|
1470
1605
|
}
|
|
1471
1606
|
async wallet() {
|
|
1472
|
-
const e = await this.client.request(
|
|
1607
|
+
const e = await this.client.request(Ie);
|
|
1473
1608
|
return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
|
|
1474
1609
|
}
|
|
1475
1610
|
async deposit(e) {
|
|
1476
1611
|
const t = await this.client.request(
|
|
1477
|
-
|
|
1612
|
+
je,
|
|
1478
1613
|
e
|
|
1479
1614
|
);
|
|
1480
1615
|
return t.ok ? { ok: t.ok, data: t.data.node } : t;
|
|
1481
1616
|
}
|
|
1482
1617
|
async createGCashDeposit(e) {
|
|
1483
|
-
const t = await this.client.request(
|
|
1618
|
+
const t = await this.client.request(Ve, e);
|
|
1484
1619
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
1485
1620
|
ok: !1,
|
|
1486
|
-
error:
|
|
1621
|
+
error: u(t.data.createGCashDeposit.__typename)
|
|
1487
1622
|
} : {
|
|
1488
1623
|
ok: !0
|
|
1489
1624
|
} : t;
|
|
1490
1625
|
}
|
|
1491
1626
|
async createMayaDeposit(e) {
|
|
1492
|
-
const t = await this.client.request(
|
|
1627
|
+
const t = await this.client.request(Ye, e);
|
|
1493
1628
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
1494
1629
|
ok: !1,
|
|
1495
|
-
error:
|
|
1630
|
+
error: u(t.data.createMayaDeposit.__typename)
|
|
1496
1631
|
} : {
|
|
1497
1632
|
ok: !0
|
|
1498
1633
|
} : t;
|
|
1499
1634
|
}
|
|
1500
1635
|
async createMayaAppDeposit(e) {
|
|
1501
|
-
const t = await this.client.request(
|
|
1636
|
+
const t = await this.client.request(He, e);
|
|
1502
1637
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
1503
1638
|
ok: !1,
|
|
1504
|
-
error:
|
|
1639
|
+
error: u(t.data.createMayaAppDeposit.__typename)
|
|
1505
1640
|
} : {
|
|
1506
1641
|
ok: !0
|
|
1507
1642
|
} : t;
|
|
1508
1643
|
}
|
|
1509
1644
|
async createGCashWithdrawal(e) {
|
|
1510
|
-
const t = await this.client.request(
|
|
1645
|
+
const t = await this.client.request(Ue, e);
|
|
1511
1646
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
1512
1647
|
ok: !1,
|
|
1513
|
-
error:
|
|
1648
|
+
error: u(t.data.createGCashWithdrawal.__typename)
|
|
1514
1649
|
} : {
|
|
1515
1650
|
ok: !0
|
|
1516
1651
|
} : t;
|
|
@@ -1519,7 +1654,7 @@ class Ae {
|
|
|
1519
1654
|
const t = await this.client.request(Be, e);
|
|
1520
1655
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
1521
1656
|
ok: !1,
|
|
1522
|
-
error:
|
|
1657
|
+
error: u(t.data.createMayaWithdrawal.__typename)
|
|
1523
1658
|
} : {
|
|
1524
1659
|
ok: !0
|
|
1525
1660
|
} : t;
|
|
@@ -1528,55 +1663,55 @@ class Ae {
|
|
|
1528
1663
|
const t = await this.client.request(Oe, e);
|
|
1529
1664
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
1530
1665
|
ok: !1,
|
|
1531
|
-
error:
|
|
1666
|
+
error: u(t.data.createMayaAppWithdrawal.__typename)
|
|
1532
1667
|
} : {
|
|
1533
1668
|
ok: !0
|
|
1534
1669
|
} : t;
|
|
1535
1670
|
}
|
|
1536
1671
|
async createBankWithdrawal(e) {
|
|
1537
|
-
const t = await this.client.request(
|
|
1672
|
+
const t = await this.client.request(qe, e);
|
|
1538
1673
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
1539
1674
|
ok: !1,
|
|
1540
|
-
error:
|
|
1675
|
+
error: u(t.data.createBankWithdrawal.__typename)
|
|
1541
1676
|
} : {
|
|
1542
1677
|
ok: !0
|
|
1543
1678
|
} : t;
|
|
1544
1679
|
}
|
|
1545
1680
|
async remainingDailyWithdrawalsCount() {
|
|
1546
1681
|
const e = await this.client.request(
|
|
1547
|
-
|
|
1682
|
+
Fe
|
|
1548
1683
|
);
|
|
1549
1684
|
return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
|
|
1550
1685
|
}
|
|
1551
1686
|
async pointsWallet() {
|
|
1552
|
-
const e = await this.client.request(
|
|
1687
|
+
const e = await this.client.request(De);
|
|
1553
1688
|
return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
|
|
1554
1689
|
}
|
|
1555
1690
|
async pointsToCashConversion(e) {
|
|
1556
|
-
const t = await this.client.request(
|
|
1691
|
+
const t = await this.client.request(Re, e);
|
|
1557
1692
|
return t.ok ? t.data.pointsToCashConversion ? {
|
|
1558
1693
|
ok: !1,
|
|
1559
|
-
error:
|
|
1694
|
+
error: u(t.data.pointsToCashConversion.__typename)
|
|
1560
1695
|
} : {
|
|
1561
1696
|
ok: !0
|
|
1562
1697
|
} : t;
|
|
1563
1698
|
}
|
|
1564
1699
|
async mayaSession(e) {
|
|
1565
1700
|
const t = await this.client.request(
|
|
1566
|
-
|
|
1701
|
+
gt,
|
|
1567
1702
|
e
|
|
1568
1703
|
);
|
|
1569
1704
|
return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
|
|
1570
1705
|
}
|
|
1571
1706
|
/** @deprecated */
|
|
1572
1707
|
async games(e) {
|
|
1573
|
-
const t = await this.client.request(
|
|
1708
|
+
const t = await this.client.request(ge, e);
|
|
1574
1709
|
return t.ok ? { ok: t.ok, data: t.data.games } : t;
|
|
1575
1710
|
}
|
|
1576
1711
|
/** @deprecated */
|
|
1577
1712
|
async gamesByName(e) {
|
|
1578
1713
|
const t = await this.client.request(
|
|
1579
|
-
|
|
1714
|
+
Se,
|
|
1580
1715
|
e
|
|
1581
1716
|
);
|
|
1582
1717
|
return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
|
|
@@ -1589,17 +1724,17 @@ class Ae {
|
|
|
1589
1724
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1590
1725
|
}
|
|
1591
1726
|
async createGameSession(e) {
|
|
1592
|
-
const t = await this.client.request(
|
|
1727
|
+
const t = await this.client.request(be, e);
|
|
1593
1728
|
return t.ok ? t.data.createGameSession ? {
|
|
1594
1729
|
ok: !1,
|
|
1595
|
-
error:
|
|
1730
|
+
error: u(t.data.createGameSession.__typename)
|
|
1596
1731
|
} : {
|
|
1597
1732
|
ok: !0
|
|
1598
1733
|
} : t;
|
|
1599
1734
|
}
|
|
1600
1735
|
async endGameSession(e) {
|
|
1601
1736
|
const t = await this.client.request(
|
|
1602
|
-
|
|
1737
|
+
Ge,
|
|
1603
1738
|
e
|
|
1604
1739
|
);
|
|
1605
1740
|
return t.ok ? t.data.endGameSession ? {
|
|
@@ -1614,7 +1749,7 @@ class Ae {
|
|
|
1614
1749
|
}
|
|
1615
1750
|
async validateMayaSession() {
|
|
1616
1751
|
const e = await this.client.request(
|
|
1617
|
-
|
|
1752
|
+
St
|
|
1618
1753
|
);
|
|
1619
1754
|
return e.ok ? e.data.validateMayaSession ? {
|
|
1620
1755
|
ok: !0
|
|
@@ -1627,147 +1762,18 @@ class Ae {
|
|
|
1627
1762
|
} : e;
|
|
1628
1763
|
}
|
|
1629
1764
|
}
|
|
1630
|
-
|
|
1631
|
-
constructor(e) {
|
|
1632
|
-
m(this, "url");
|
|
1633
|
-
m(this, "siteId");
|
|
1634
|
-
m(this, "platformId");
|
|
1635
|
-
this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
|
|
1636
|
-
}
|
|
1637
|
-
async self() {
|
|
1638
|
-
const e = await this.getJson(`/sites/${this.siteId}`);
|
|
1639
|
-
return e.ok ? {
|
|
1640
|
-
ok: !0,
|
|
1641
|
-
data: e.data.data
|
|
1642
|
-
} : e;
|
|
1643
|
-
}
|
|
1644
|
-
async games(e) {
|
|
1645
|
-
var a, s, c, p, u, f, w, l, A, k, _, C, T, v, M, N, I, D, R, P, G, x, $, W;
|
|
1646
|
-
const t = new URLSearchParams();
|
|
1647
|
-
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (u = e == null ? void 0 : e.filter) == null ? void 0 : u.type) != null && f.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 : _.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(",")), (N = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && N.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (D = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.tags) != null && D.equal && t.set("filter[tags][eq]", e.filter.tags.equal), (P = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.tags) != null && P.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual), (x = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && x.in && t.set("filter[tags][in]", e.filter.tags.in.join(",")), (W = ($ = e == null ? void 0 : e.filter) == null ? void 0 : $.tags) != null && W.notIn && t.set("filter[tags][nin]", e.filter.tags.notIn.join(","));
|
|
1648
|
-
const r = await this.getJson("/games", t);
|
|
1649
|
-
return r.ok ? {
|
|
1650
|
-
ok: !0,
|
|
1651
|
-
data: {
|
|
1652
|
-
edges: r.data.data.map((B) => ({
|
|
1653
|
-
node: B,
|
|
1654
|
-
cursor: B.cursor
|
|
1655
|
-
})),
|
|
1656
|
-
totalCount: r.data.totalCount ?? 0,
|
|
1657
|
-
pageInfo: {
|
|
1658
|
-
hasNextPage: !!r.data.next,
|
|
1659
|
-
endCursor: r.data.next
|
|
1660
|
-
}
|
|
1661
|
-
}
|
|
1662
|
-
} : r;
|
|
1663
|
-
}
|
|
1664
|
-
async game(e) {
|
|
1665
|
-
var r;
|
|
1666
|
-
const t = await this.getJson(`/games/${e}`);
|
|
1667
|
-
return ((r = t.error) == null ? void 0 : r.name) === "HttpNotFound" ? {
|
|
1668
|
-
ok: !0,
|
|
1669
|
-
data: null
|
|
1670
|
-
} : t.ok ? {
|
|
1671
|
-
ok: !0,
|
|
1672
|
-
data: t.data.data
|
|
1673
|
-
} : t;
|
|
1674
|
-
}
|
|
1675
|
-
async getJson(e, t) {
|
|
1676
|
-
const r = new Request(`${this.url}${e}?${(t == null ? void 0 : t.toString()) ?? ""}`, {
|
|
1677
|
-
method: "GET",
|
|
1678
|
-
headers: {
|
|
1679
|
-
Accept: "application/json",
|
|
1680
|
-
"Content-Type": "application/json",
|
|
1681
|
-
"Site-ID": this.siteId,
|
|
1682
|
-
"Platform-ID": this.platformId
|
|
1683
|
-
}
|
|
1684
|
-
});
|
|
1685
|
-
try {
|
|
1686
|
-
const a = await fetch(r);
|
|
1687
|
-
return a.ok ? {
|
|
1688
|
-
ok: !0,
|
|
1689
|
-
data: await a.json()
|
|
1690
|
-
} : {
|
|
1691
|
-
ok: !1,
|
|
1692
|
-
error: h(a.status)
|
|
1693
|
-
};
|
|
1694
|
-
} catch {
|
|
1695
|
-
return {
|
|
1696
|
-
ok: !1,
|
|
1697
|
-
error: h(500)
|
|
1698
|
-
};
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
class Tt {
|
|
1703
|
-
constructor(e) {
|
|
1704
|
-
m(this, "client");
|
|
1705
|
-
this.client = e;
|
|
1706
|
-
}
|
|
1707
|
-
/** @deprecated */
|
|
1708
|
-
async games(e) {
|
|
1709
|
-
const t = await this.client.request(ye, e);
|
|
1710
|
-
return t.ok ? { ok: t.ok, data: t.data.games } : t;
|
|
1711
|
-
}
|
|
1712
|
-
/** @deprecated */
|
|
1713
|
-
async gamesByName(e) {
|
|
1714
|
-
const t = await this.client.request(
|
|
1715
|
-
ge,
|
|
1716
|
-
e
|
|
1717
|
-
);
|
|
1718
|
-
return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
|
|
1719
|
-
}
|
|
1720
|
-
async gameSession(e) {
|
|
1721
|
-
const t = await this.client.request(
|
|
1722
|
-
Ee,
|
|
1723
|
-
e
|
|
1724
|
-
);
|
|
1725
|
-
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1726
|
-
}
|
|
1727
|
-
async createGameSession(e) {
|
|
1728
|
-
const t = await this.client.request(Se, e);
|
|
1729
|
-
return t.ok ? t.data.createGameSession ? {
|
|
1730
|
-
ok: !1,
|
|
1731
|
-
error: d(t.data.createGameSession.__typename)
|
|
1732
|
-
} : {
|
|
1733
|
-
ok: !0
|
|
1734
|
-
} : t;
|
|
1735
|
-
}
|
|
1736
|
-
async endGameSession(e) {
|
|
1737
|
-
const t = await this.client.request(Ge, e);
|
|
1738
|
-
return t.ok ? t.data.endGameSession ? {
|
|
1739
|
-
ok: !1,
|
|
1740
|
-
error: d(t.data.endGameSession.__typename)
|
|
1741
|
-
} : {
|
|
1742
|
-
ok: !0
|
|
1743
|
-
} : t;
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
class vt {
|
|
1747
|
-
constructor(e) {
|
|
1748
|
-
m(this, "client");
|
|
1749
|
-
this.client = e;
|
|
1750
|
-
}
|
|
1751
|
-
async latestBetRecords() {
|
|
1752
|
-
const e = await this.client.request(Ke);
|
|
1753
|
-
return e.ok ? {
|
|
1754
|
-
ok: !0,
|
|
1755
|
-
data: e.data.latestBetRecords
|
|
1756
|
-
} : e;
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1759
|
-
function Mt(n, e, t) {
|
|
1765
|
+
function Nt(n, e, t) {
|
|
1760
1766
|
return n < e ? e : n > t ? t : n;
|
|
1761
1767
|
}
|
|
1762
|
-
function
|
|
1768
|
+
function Y(n) {
|
|
1763
1769
|
return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
|
|
1764
1770
|
}
|
|
1765
|
-
function
|
|
1771
|
+
function It(n) {
|
|
1766
1772
|
const e = [];
|
|
1767
1773
|
function t(r, a = []) {
|
|
1768
1774
|
for (const s in r) {
|
|
1769
1775
|
const c = r[s];
|
|
1770
|
-
|
|
1776
|
+
Y(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Dt(c), [...a, s]) : e.push({
|
|
1771
1777
|
key: [...a, s],
|
|
1772
1778
|
value: c
|
|
1773
1779
|
});
|
|
@@ -1775,10 +1781,10 @@ function Nt(n) {
|
|
|
1775
1781
|
}
|
|
1776
1782
|
return t(n), e;
|
|
1777
1783
|
}
|
|
1778
|
-
function
|
|
1784
|
+
function Dt(n) {
|
|
1779
1785
|
return n.reduce((e, t, r) => (e[r] = t, e), {});
|
|
1780
1786
|
}
|
|
1781
|
-
class
|
|
1787
|
+
class A {
|
|
1782
1788
|
constructor(e, t) {
|
|
1783
1789
|
m(this, "url");
|
|
1784
1790
|
m(this, "options");
|
|
@@ -1817,13 +1823,13 @@ class b {
|
|
|
1817
1823
|
async exec(e) {
|
|
1818
1824
|
var t, r, a, s, c, p;
|
|
1819
1825
|
try {
|
|
1820
|
-
const
|
|
1821
|
-
if (!
|
|
1822
|
-
return { ok: !1, error: h(
|
|
1823
|
-
const f = await
|
|
1824
|
-
return
|
|
1826
|
+
const l = await fetch(e);
|
|
1827
|
+
if (!l.ok)
|
|
1828
|
+
return { ok: !1, error: h(l.status) };
|
|
1829
|
+
const f = await l.json(), w = f.data, d = (t = f.errors) == null ? void 0 : t.at(0);
|
|
1830
|
+
return d ? ((r = d.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = d.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, d.message) } : ((s = d.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, d.message) } : ((c = d.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((p = d.extensions) == null ? void 0 : p.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, d.message) } : {
|
|
1825
1831
|
ok: !1,
|
|
1826
|
-
error: h(500,
|
|
1832
|
+
error: h(500, d.message)
|
|
1827
1833
|
} : {
|
|
1828
1834
|
ok: !0,
|
|
1829
1835
|
data: w
|
|
@@ -1842,7 +1848,7 @@ class b {
|
|
|
1842
1848
|
return t;
|
|
1843
1849
|
}
|
|
1844
1850
|
createUploadBody(e, t) {
|
|
1845
|
-
const r =
|
|
1851
|
+
const r = It(t).filter(
|
|
1846
1852
|
(c) => c.value instanceof File || c.value instanceof Blob
|
|
1847
1853
|
), a = new FormData();
|
|
1848
1854
|
a.append(
|
|
@@ -1860,11 +1866,14 @@ class b {
|
|
|
1860
1866
|
}), a;
|
|
1861
1867
|
}
|
|
1862
1868
|
}
|
|
1869
|
+
function k(n) {
|
|
1870
|
+
return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
|
|
1871
|
+
}
|
|
1863
1872
|
async function g(n) {
|
|
1864
1873
|
const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
|
|
1865
1874
|
return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
1866
1875
|
}
|
|
1867
|
-
class
|
|
1876
|
+
class _e {
|
|
1868
1877
|
constructor(e) {
|
|
1869
1878
|
m(this, "enabled");
|
|
1870
1879
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
@@ -1882,26 +1891,26 @@ class ke {
|
|
|
1882
1891
|
this.enabled && console.log(`\x1B[32m[success] ${e}`);
|
|
1883
1892
|
}
|
|
1884
1893
|
}
|
|
1885
|
-
function
|
|
1894
|
+
function j(n) {
|
|
1886
1895
|
return new Date(n.getTime());
|
|
1887
1896
|
}
|
|
1888
1897
|
function O(n, e) {
|
|
1889
|
-
const t =
|
|
1898
|
+
const t = j(n);
|
|
1890
1899
|
return t.setDate(t.getDate() + e), t;
|
|
1891
1900
|
}
|
|
1892
|
-
function
|
|
1893
|
-
const t =
|
|
1901
|
+
function q(n, e) {
|
|
1902
|
+
const t = j(n);
|
|
1894
1903
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
1895
1904
|
}
|
|
1896
|
-
function
|
|
1905
|
+
function we(n, e) {
|
|
1897
1906
|
return n.getTime() > e.getTime();
|
|
1898
1907
|
}
|
|
1899
|
-
function
|
|
1908
|
+
function Ce(n) {
|
|
1900
1909
|
return new Promise((e) => {
|
|
1901
1910
|
setTimeout(e, n);
|
|
1902
1911
|
});
|
|
1903
1912
|
}
|
|
1904
|
-
function
|
|
1913
|
+
function ye(n, e) {
|
|
1905
1914
|
const {
|
|
1906
1915
|
until: t,
|
|
1907
1916
|
interval: r = 1e3,
|
|
@@ -1909,32 +1918,32 @@ function we(n, e) {
|
|
|
1909
1918
|
/**/
|
|
1910
1919
|
} = e;
|
|
1911
1920
|
async function s(c, p) {
|
|
1912
|
-
const
|
|
1913
|
-
return t(f) ? f :
|
|
1921
|
+
const l = p ?? a, f = await n(...c);
|
|
1922
|
+
return t(f) ? f : l > 1 ? (await Ce(r * ((a - l) / 2)), s(c, l - 1)) : f;
|
|
1914
1923
|
}
|
|
1915
1924
|
return async (...c) => await s(c);
|
|
1916
1925
|
}
|
|
1917
|
-
function
|
|
1918
|
-
const t =
|
|
1926
|
+
function F(n, e) {
|
|
1927
|
+
const t = j(n);
|
|
1919
1928
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
1920
1929
|
}
|
|
1921
|
-
class
|
|
1930
|
+
class Rt {
|
|
1922
1931
|
constructor(e) {
|
|
1923
1932
|
m(this, "logger");
|
|
1924
1933
|
m(this, "storageKey", "session");
|
|
1925
1934
|
m(this, "authService");
|
|
1926
1935
|
m(this, "walletService");
|
|
1927
1936
|
m(this, "_refreshing", !1);
|
|
1928
|
-
this.authService = new
|
|
1937
|
+
this.authService = new At({
|
|
1929
1938
|
url: e.authUrl,
|
|
1930
1939
|
platform: e.platform
|
|
1931
|
-
}), this.walletService = new
|
|
1932
|
-
new
|
|
1940
|
+
}), this.walletService = new ke(
|
|
1941
|
+
new A(e.walletUrl, {
|
|
1933
1942
|
middlewares: [
|
|
1934
1943
|
(t) => (t.headers.set("Platform", e.platform), t.headers.set("Role", "MEMBER"), t)
|
|
1935
1944
|
]
|
|
1936
1945
|
})
|
|
1937
|
-
), this.logger = new
|
|
1946
|
+
), this.logger = new _e({
|
|
1938
1947
|
enabled: e.logs ?? !1
|
|
1939
1948
|
});
|
|
1940
1949
|
}
|
|
@@ -1955,10 +1964,10 @@ class Dt {
|
|
|
1955
1964
|
}
|
|
1956
1965
|
};
|
|
1957
1966
|
if (e.type === "MAYA") {
|
|
1958
|
-
const c = await
|
|
1967
|
+
const c = await ye(() => this.walletService.mayaSession({ id: e.sessionId }), {
|
|
1959
1968
|
until: (w) => {
|
|
1960
|
-
var
|
|
1961
|
-
return w.ok && ((
|
|
1969
|
+
var d;
|
|
1970
|
+
return w.ok && ((d = w.data) == null ? void 0 : d.member) != null;
|
|
1962
1971
|
},
|
|
1963
1972
|
interval: 1e3,
|
|
1964
1973
|
maxAttempt: 5
|
|
@@ -1972,19 +1981,19 @@ class Dt {
|
|
|
1972
1981
|
message: "Forbidden"
|
|
1973
1982
|
}
|
|
1974
1983
|
};
|
|
1975
|
-
const
|
|
1984
|
+
const l = await ye(() => this.authService.createSession(e), {
|
|
1976
1985
|
until: (w) => w.ok,
|
|
1977
1986
|
interval: 1e3,
|
|
1978
1987
|
maxAttempt: 5
|
|
1979
1988
|
})();
|
|
1980
|
-
if (!
|
|
1989
|
+
if (!l.ok) return l;
|
|
1981
1990
|
const f = /* @__PURE__ */ new Date();
|
|
1982
1991
|
return window.localStorage.setItem(
|
|
1983
1992
|
this.storageKey,
|
|
1984
1993
|
JSON.stringify({
|
|
1985
|
-
...
|
|
1986
|
-
accessTokenExpiresAt:
|
|
1987
|
-
refreshTokenExpiresAt:
|
|
1994
|
+
...l.data,
|
|
1995
|
+
accessTokenExpiresAt: q(f, 8).getTime(),
|
|
1996
|
+
refreshTokenExpiresAt: F(O(f, 30), 2).getTime()
|
|
1988
1997
|
})
|
|
1989
1998
|
), {
|
|
1990
1999
|
ok: !0,
|
|
@@ -1999,8 +2008,8 @@ class Dt {
|
|
|
1999
2008
|
this.storageKey,
|
|
2000
2009
|
JSON.stringify({
|
|
2001
2010
|
...s.data,
|
|
2002
|
-
accessTokenExpiresAt:
|
|
2003
|
-
refreshTokenExpiresAt:
|
|
2011
|
+
accessTokenExpiresAt: q(c, 8).getTime(),
|
|
2012
|
+
refreshTokenExpiresAt: F(O(c, 30), 2).getTime()
|
|
2004
2013
|
})
|
|
2005
2014
|
), {
|
|
2006
2015
|
ok: !0,
|
|
@@ -2023,8 +2032,8 @@ class Dt {
|
|
|
2023
2032
|
this.storageKey,
|
|
2024
2033
|
JSON.stringify({
|
|
2025
2034
|
...t.data,
|
|
2026
|
-
accessTokenExpiresAt:
|
|
2027
|
-
refreshTokenExpiresAt:
|
|
2035
|
+
accessTokenExpiresAt: q(r, 8).getTime(),
|
|
2036
|
+
refreshTokenExpiresAt: F(O(r, 30), 2).getTime()
|
|
2028
2037
|
})
|
|
2029
2038
|
), {
|
|
2030
2039
|
ok: !0,
|
|
@@ -2039,8 +2048,8 @@ class Dt {
|
|
|
2039
2048
|
this.storageKey,
|
|
2040
2049
|
JSON.stringify({
|
|
2041
2050
|
...t.data,
|
|
2042
|
-
accessTokenExpiresAt:
|
|
2043
|
-
refreshTokenExpiresAt:
|
|
2051
|
+
accessTokenExpiresAt: q(r, 8).getTime(),
|
|
2052
|
+
refreshTokenExpiresAt: F(O(r, 30), 2).getTime()
|
|
2044
2053
|
})
|
|
2045
2054
|
), { ok: !0 };
|
|
2046
2055
|
} else
|
|
@@ -2053,7 +2062,7 @@ class Dt {
|
|
|
2053
2062
|
data: null
|
|
2054
2063
|
};
|
|
2055
2064
|
if (this.refreshing)
|
|
2056
|
-
return await
|
|
2065
|
+
return await Ce(1e3), await this.get();
|
|
2057
2066
|
const e = window.localStorage.getItem(this.storageKey);
|
|
2058
2067
|
if (!e)
|
|
2059
2068
|
return {
|
|
@@ -2063,7 +2072,7 @@ class Dt {
|
|
|
2063
2072
|
try {
|
|
2064
2073
|
let t = JSON.parse(e), r = /* @__PURE__ */ new Date();
|
|
2065
2074
|
const a = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
|
|
2066
|
-
if (
|
|
2075
|
+
if (we(r, s))
|
|
2067
2076
|
return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
|
|
2068
2077
|
ok: !1,
|
|
2069
2078
|
error: {
|
|
@@ -2071,7 +2080,7 @@ class Dt {
|
|
|
2071
2080
|
message: "Session expired."
|
|
2072
2081
|
}
|
|
2073
2082
|
};
|
|
2074
|
-
if (
|
|
2083
|
+
if (we(r, a)) {
|
|
2075
2084
|
this.logger.info("Refreshing session..."), this.refreshing = !0;
|
|
2076
2085
|
const c = await this.authService.refreshSession(t.refreshToken);
|
|
2077
2086
|
if (this.refreshing = !1, !c.ok)
|
|
@@ -2085,8 +2094,8 @@ class Dt {
|
|
|
2085
2094
|
this.logger.success("Session refreshed!"), r = /* @__PURE__ */ new Date(), t = {
|
|
2086
2095
|
...t,
|
|
2087
2096
|
...c.data,
|
|
2088
|
-
accessTokenExpiresAt:
|
|
2089
|
-
refreshTokenExpiresAt:
|
|
2097
|
+
accessTokenExpiresAt: q(r, 8).getTime(),
|
|
2098
|
+
refreshTokenExpiresAt: F(O(r, 30), 2).getTime()
|
|
2090
2099
|
}, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
2091
2100
|
}
|
|
2092
2101
|
return {
|
|
@@ -2131,12 +2140,12 @@ function y(n) {
|
|
|
2131
2140
|
for (const t in n) {
|
|
2132
2141
|
const r = n[t];
|
|
2133
2142
|
if (r !== null && r !== void 0) {
|
|
2134
|
-
if (
|
|
2143
|
+
if (Y(r)) {
|
|
2135
2144
|
e[t] = y(r);
|
|
2136
2145
|
continue;
|
|
2137
2146
|
}
|
|
2138
2147
|
if (Array.isArray(r)) {
|
|
2139
|
-
e[t] = r.map((a) =>
|
|
2148
|
+
e[t] = r.map((a) => Y(a) ? y(a) : a);
|
|
2140
2149
|
continue;
|
|
2141
2150
|
}
|
|
2142
2151
|
e[t] = r;
|
|
@@ -2154,11 +2163,11 @@ function i(n, e) {
|
|
|
2154
2163
|
}
|
|
2155
2164
|
return e;
|
|
2156
2165
|
}
|
|
2157
|
-
class
|
|
2166
|
+
class Pt {
|
|
2158
2167
|
constructor(e) {
|
|
2159
2168
|
m(this, "staticService");
|
|
2160
2169
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
2161
|
-
this.staticService = new
|
|
2170
|
+
this.staticService = new Mt({
|
|
2162
2171
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
2163
2172
|
});
|
|
2164
2173
|
}
|
|
@@ -2200,7 +2209,7 @@ class Rt {
|
|
|
2200
2209
|
return y(t);
|
|
2201
2210
|
}
|
|
2202
2211
|
platform(e) {
|
|
2203
|
-
var t, r, a, s, c, p,
|
|
2212
|
+
var t, r, a, s, c, p, l, f, w, d, _, C, T, v, M, N, I, D, R, P, G, x, $, W, U, B, S, Q, K, z, J, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, me, de, ue, le, pe, fe, he;
|
|
2204
2213
|
return {
|
|
2205
2214
|
paymentSettings: {
|
|
2206
2215
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
@@ -2215,73 +2224,73 @@ class Rt {
|
|
|
2215
2224
|
maximumAmount: i((p = e.bankDepositGatewaySettings) == null ? void 0 : p.maximumAmount)
|
|
2216
2225
|
},
|
|
2217
2226
|
gcash: {
|
|
2218
|
-
androidEnabled: ((
|
|
2227
|
+
androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
|
|
2219
2228
|
iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
|
|
2220
2229
|
webEnabled: ((w = e.gcashDepositGatewaySettings) == null ? void 0 : w.webEnabled) ?? !1,
|
|
2221
|
-
mobileWebEnabled: ((
|
|
2222
|
-
minimumAmount: i((
|
|
2223
|
-
maximumAmount: i((
|
|
2230
|
+
mobileWebEnabled: ((d = e.gcashDepositGatewaySettings) == null ? void 0 : d.mobileWebEnabled) ?? !1,
|
|
2231
|
+
minimumAmount: i((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
|
|
2232
|
+
maximumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.maximumAmount)
|
|
2224
2233
|
},
|
|
2225
2234
|
maya: {
|
|
2226
|
-
androidEnabled: ((
|
|
2227
|
-
iosEnabled: ((
|
|
2228
|
-
webEnabled: ((
|
|
2229
|
-
mobileWebEnabled: ((
|
|
2230
|
-
minimumAmount: i((
|
|
2231
|
-
maximumAmount: i((
|
|
2235
|
+
androidEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.androidEnabled) ?? !1,
|
|
2236
|
+
iosEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.iosEnabled) ?? !1,
|
|
2237
|
+
webEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.webEnabled) ?? !1,
|
|
2238
|
+
mobileWebEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.mobileWebEnabled) ?? !1,
|
|
2239
|
+
minimumAmount: i((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.minimumAmount),
|
|
2240
|
+
maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
|
|
2232
2241
|
},
|
|
2233
2242
|
mayaApp: {
|
|
2234
|
-
androidEnabled: ((
|
|
2235
|
-
iosEnabled: ((
|
|
2236
|
-
webEnabled: ((
|
|
2237
|
-
mobileWebEnabled: ((
|
|
2238
|
-
minimumAmount: i((
|
|
2239
|
-
maximumAmount: i((
|
|
2243
|
+
androidEnabled: ((R = e.mayaAppDepositGatewaySettings) == null ? void 0 : R.androidEnabled) ?? !1,
|
|
2244
|
+
iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
|
|
2245
|
+
webEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.webEnabled) ?? !1,
|
|
2246
|
+
mobileWebEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.mobileWebEnabled) ?? !1,
|
|
2247
|
+
minimumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.minimumAmount),
|
|
2248
|
+
maximumAmount: i((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.maximumAmount)
|
|
2240
2249
|
}
|
|
2241
2250
|
},
|
|
2242
2251
|
withdrawalGateway: {
|
|
2243
2252
|
bank: {
|
|
2244
|
-
androidEnabled: ((
|
|
2245
|
-
iosEnabled: ((
|
|
2246
|
-
webEnabled: ((
|
|
2247
|
-
mobileWebEnabled: ((
|
|
2248
|
-
minimumAmount: i((
|
|
2249
|
-
maximumAmount: i((
|
|
2253
|
+
androidEnabled: ((U = e.bankWithdrawalGatewaySettings) == null ? void 0 : U.androidEnabled) ?? !1,
|
|
2254
|
+
iosEnabled: ((B = e.bankWithdrawalGatewaySettings) == null ? void 0 : B.iosEnabled) ?? !1,
|
|
2255
|
+
webEnabled: ((S = e.bankWithdrawalGatewaySettings) == null ? void 0 : S.webEnabled) ?? !1,
|
|
2256
|
+
mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
|
|
2257
|
+
minimumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
|
|
2258
|
+
maximumAmount: i((z = e.bankWithdrawalGatewaySettings) == null ? void 0 : z.maximumAmount)
|
|
2250
2259
|
},
|
|
2251
2260
|
gcash: {
|
|
2252
|
-
androidEnabled: ((
|
|
2253
|
-
iosEnabled: ((
|
|
2254
|
-
webEnabled: ((
|
|
2255
|
-
mobileWebEnabled: ((
|
|
2256
|
-
minimumAmount: i((
|
|
2261
|
+
androidEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.androidEnabled) ?? !1,
|
|
2262
|
+
iosEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.iosEnabled) ?? !1,
|
|
2263
|
+
webEnabled: ((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.webEnabled) ?? !1,
|
|
2264
|
+
mobileWebEnabled: ((ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.mobileWebEnabled) ?? !1,
|
|
2265
|
+
minimumAmount: i((te = e.gcashWithdrawalGatewaySettings) == null ? void 0 : te.minimumAmount),
|
|
2257
2266
|
maximumAmount: i(
|
|
2258
|
-
(
|
|
2267
|
+
(re = e.gcashWithdrawalGatewaySettings) == null ? void 0 : re.maximumAmount,
|
|
2259
2268
|
1e6
|
|
2260
2269
|
)
|
|
2261
2270
|
},
|
|
2262
2271
|
maya: {
|
|
2263
|
-
androidEnabled: ((
|
|
2264
|
-
iosEnabled: ((
|
|
2265
|
-
webEnabled: ((
|
|
2266
|
-
mobileWebEnabled: ((
|
|
2267
|
-
minimumAmount: i((
|
|
2268
|
-
maximumAmount: i((
|
|
2272
|
+
androidEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.androidEnabled) ?? !1,
|
|
2273
|
+
iosEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.iosEnabled) ?? !1,
|
|
2274
|
+
webEnabled: ((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.webEnabled) ?? !1,
|
|
2275
|
+
mobileWebEnabled: ((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.mobileWebEnabled) ?? !1,
|
|
2276
|
+
minimumAmount: i((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.minimumAmount),
|
|
2277
|
+
maximumAmount: i((ce = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount)
|
|
2269
2278
|
},
|
|
2270
2279
|
mayaApp: {
|
|
2271
|
-
androidEnabled: ((
|
|
2280
|
+
androidEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.androidEnabled) ?? !1,
|
|
2272
2281
|
iosEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.iosEnabled) ?? !1,
|
|
2273
|
-
webEnabled: ((
|
|
2274
|
-
mobileWebEnabled: ((
|
|
2275
|
-
minimumAmount: i((
|
|
2282
|
+
webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
|
|
2283
|
+
mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
|
|
2284
|
+
minimumAmount: i((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
|
|
2276
2285
|
maximumAmount: i(
|
|
2277
|
-
(
|
|
2286
|
+
(fe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : fe.maximumAmount,
|
|
2278
2287
|
1e6
|
|
2279
2288
|
)
|
|
2280
2289
|
}
|
|
2281
2290
|
}
|
|
2282
2291
|
},
|
|
2283
2292
|
pointsClubSettings: {
|
|
2284
|
-
multiplier: i((
|
|
2293
|
+
multiplier: i((he = e.pointsClubSettings) == null ? void 0 : he.multiplier, 0)
|
|
2285
2294
|
}
|
|
2286
2295
|
};
|
|
2287
2296
|
}
|
|
@@ -2445,6 +2454,9 @@ class Rt {
|
|
|
2445
2454
|
};
|
|
2446
2455
|
return y(t);
|
|
2447
2456
|
}
|
|
2457
|
+
/**
|
|
2458
|
+
* @deprecated
|
|
2459
|
+
*/
|
|
2448
2460
|
game(e) {
|
|
2449
2461
|
return {
|
|
2450
2462
|
id: e.id,
|
|
@@ -2588,142 +2600,43 @@ class Rt {
|
|
|
2588
2600
|
return y(t);
|
|
2589
2601
|
}
|
|
2590
2602
|
}
|
|
2591
|
-
class
|
|
2603
|
+
class Ut {
|
|
2592
2604
|
constructor(e) {
|
|
2593
|
-
m(this, "
|
|
2594
|
-
this
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
this.
|
|
2605
|
-
|
|
2606
|
-
...e
|
|
2607
|
-
};
|
|
2608
|
-
}
|
|
2609
|
-
get logger() {
|
|
2610
|
-
return new ke({
|
|
2611
|
-
enabled: this.config.logs ?? !1
|
|
2612
|
-
});
|
|
2613
|
-
}
|
|
2614
|
-
get transformer() {
|
|
2615
|
-
return new Rt(this.config);
|
|
2616
|
-
}
|
|
2617
|
-
get cmsPortalService() {
|
|
2618
|
-
return new Ct({
|
|
2619
|
-
url: this.config.environment === "development" ? "https://portal-api.development.opexacms.io/v1" : "https://portal-api.opexacms.io/v1",
|
|
2620
|
-
site: this.config.site,
|
|
2621
|
-
platform: this.config.sitePlatform
|
|
2605
|
+
m(this, "cmsPortalService");
|
|
2606
|
+
m(this, "gameService");
|
|
2607
|
+
m(this, "fileService");
|
|
2608
|
+
m(this, "walletService");
|
|
2609
|
+
m(this, "accountService");
|
|
2610
|
+
m(this, "reportService");
|
|
2611
|
+
m(this, "portalService");
|
|
2612
|
+
m(this, "sessionManager");
|
|
2613
|
+
m(this, "transformer");
|
|
2614
|
+
m(this, "logger");
|
|
2615
|
+
const t = e.environment === "production";
|
|
2616
|
+
this.transformer = new Pt(e), this.logger = new _e({
|
|
2617
|
+
enabled: e.logs ?? !1
|
|
2622
2618
|
});
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2619
|
+
const r = t ? "https://auth.opexa.io" : "https://auth.development.opexa.io", a = t ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", s = t ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", c = t ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", p = t ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", l = t ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", f = t ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", w = t ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1";
|
|
2620
|
+
this.cmsPortalService = new kt({
|
|
2621
|
+
url: w,
|
|
2622
|
+
site: e.site,
|
|
2623
|
+
platform: e.sitePlatform
|
|
2624
|
+
}), this.sessionManager = new Rt({
|
|
2625
|
+
authUrl: r,
|
|
2626
|
+
walletUrl: a,
|
|
2627
|
+
platform: e.platform,
|
|
2628
|
+
logs: e.logs
|
|
2630
2629
|
});
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
middlewares: [this.authMiddleware],
|
|
2638
|
-
fetchOptions: {
|
|
2639
|
-
headers: {
|
|
2640
|
-
Role: "MEMBER",
|
|
2641
|
-
"Platform-Code": this.config.platform
|
|
2642
|
-
}
|
|
2643
|
-
}
|
|
2644
|
-
}
|
|
2645
|
-
)
|
|
2646
|
-
);
|
|
2647
|
-
}
|
|
2648
|
-
get fileService() {
|
|
2649
|
-
return new At(
|
|
2650
|
-
new b(
|
|
2651
|
-
this.config.environment === "development" ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
|
|
2652
|
-
{
|
|
2653
|
-
middlewares: [this.authMiddleware],
|
|
2654
|
-
fetchOptions: {
|
|
2655
|
-
headers: {
|
|
2656
|
-
Role: "MEMBER",
|
|
2657
|
-
"Platform-Code": this.config.platform
|
|
2658
|
-
}
|
|
2659
|
-
}
|
|
2660
|
-
}
|
|
2661
|
-
)
|
|
2662
|
-
);
|
|
2663
|
-
}
|
|
2664
|
-
get walletService() {
|
|
2665
|
-
return new Ae(
|
|
2666
|
-
new b(
|
|
2667
|
-
this.config.environment === "development" ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2668
|
-
{
|
|
2669
|
-
middlewares: [this.authMiddleware],
|
|
2670
|
-
fetchOptions: {
|
|
2671
|
-
headers: {
|
|
2672
|
-
Role: "MEMBER",
|
|
2673
|
-
"Platform-Code": this.config.platform
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
}
|
|
2677
|
-
)
|
|
2678
|
-
);
|
|
2679
|
-
}
|
|
2680
|
-
get accountService() {
|
|
2681
|
-
return new St(
|
|
2682
|
-
new b(
|
|
2683
|
-
this.config.environment === "development" ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
|
|
2684
|
-
{
|
|
2685
|
-
middlewares: [this.authMiddleware],
|
|
2686
|
-
fetchOptions: {
|
|
2687
|
-
headers: {
|
|
2688
|
-
Role: "MEMBER",
|
|
2689
|
-
"Platform-Code": this.config.platform
|
|
2690
|
-
}
|
|
2691
|
-
}
|
|
2692
|
-
}
|
|
2693
|
-
)
|
|
2694
|
-
);
|
|
2695
|
-
}
|
|
2696
|
-
get reportService() {
|
|
2697
|
-
return new kt(
|
|
2698
|
-
new b(
|
|
2699
|
-
this.config.environment === "development" ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
|
|
2700
|
-
{
|
|
2701
|
-
middlewares: [this.authMiddleware],
|
|
2702
|
-
fetchOptions: {
|
|
2703
|
-
headers: {
|
|
2704
|
-
Role: "MEMBER",
|
|
2705
|
-
"Platform-Code": this.config.platform
|
|
2706
|
-
}
|
|
2707
|
-
}
|
|
2708
|
-
}
|
|
2709
|
-
)
|
|
2710
|
-
);
|
|
2711
|
-
}
|
|
2712
|
-
get portalService() {
|
|
2713
|
-
return new vt(
|
|
2714
|
-
new b(
|
|
2715
|
-
this.config.environment === "development" ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
|
|
2716
|
-
{
|
|
2717
|
-
middlewares: [this.authMiddleware],
|
|
2718
|
-
fetchOptions: {
|
|
2719
|
-
headers: {
|
|
2720
|
-
Role: "MEMBER",
|
|
2721
|
-
"Platform-Code": this.config.platform
|
|
2722
|
-
}
|
|
2723
|
-
}
|
|
2630
|
+
const d = {
|
|
2631
|
+
middlewares: [this.authMiddleware],
|
|
2632
|
+
fetchOptions: {
|
|
2633
|
+
headers: {
|
|
2634
|
+
Role: "MEMBER",
|
|
2635
|
+
"Platform-Code": e.platform
|
|
2724
2636
|
}
|
|
2725
|
-
|
|
2726
|
-
|
|
2637
|
+
}
|
|
2638
|
+
};
|
|
2639
|
+
this.gameService = new Ct(new A(f, d)), this.fileService = new _t(new A(l, d)), this.walletService = new ke(new A(a, d)), this.accountService = new bt(new A(c, d)), this.reportService = new vt(new A(s, d)), this.portalService = new Tt(new A(p, d));
|
|
2727
2640
|
}
|
|
2728
2641
|
get authMiddleware() {
|
|
2729
2642
|
return async (e) => {
|
|
@@ -2837,7 +2750,7 @@ class $t {
|
|
|
2837
2750
|
* ```
|
|
2838
2751
|
*/
|
|
2839
2752
|
watchSession(e) {
|
|
2840
|
-
const t =
|
|
2753
|
+
const t = Nt(e.interval ?? 3e4, 3e4, 6e4);
|
|
2841
2754
|
let r = null;
|
|
2842
2755
|
const a = () => setTimeout(async () => {
|
|
2843
2756
|
await this.sessionManager.verify() || await e.onInvalid(), r = a();
|
|
@@ -2923,13 +2836,13 @@ class $t {
|
|
|
2923
2836
|
* ```
|
|
2924
2837
|
*/
|
|
2925
2838
|
async createAccount(e) {
|
|
2926
|
-
const t = e.id ?? E.generate(
|
|
2839
|
+
const t = e.id ?? E.generate(b.Account).toString(), r = await this.accountService.registerMemberAccount({
|
|
2927
2840
|
input: {
|
|
2928
2841
|
id: t,
|
|
2929
2842
|
name: e.name,
|
|
2930
2843
|
birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
|
|
2931
2844
|
password: await g(e.password),
|
|
2932
|
-
mobileNumber:
|
|
2845
|
+
mobileNumber: k(e.mobileNumber),
|
|
2933
2846
|
domain: e.domain,
|
|
2934
2847
|
btag: e.referralCode
|
|
2935
2848
|
},
|
|
@@ -2971,7 +2884,7 @@ class $t {
|
|
|
2971
2884
|
password: t.password ? await g(t.password) : void 0,
|
|
2972
2885
|
transactionPassword: t.transactionPassword ? await g(t.transactionPassword) : void 0,
|
|
2973
2886
|
...t.mobileNumber && {
|
|
2974
|
-
mobileNumber:
|
|
2887
|
+
mobileNumber: k(t.mobileNumber)
|
|
2975
2888
|
},
|
|
2976
2889
|
secretAnswer: t.secretAnswer ? await g(t.secretAnswer) : void 0
|
|
2977
2890
|
}
|
|
@@ -3014,7 +2927,7 @@ class $t {
|
|
|
3014
2927
|
* ```
|
|
3015
2928
|
*/
|
|
3016
2929
|
async submitVerificationDetails(e) {
|
|
3017
|
-
const t = e.id ?? E.generate(
|
|
2930
|
+
const t = e.id ?? E.generate(b.Verification).toString(), r = await this.accountService.createMemberVerification({
|
|
3018
2931
|
input: {
|
|
3019
2932
|
id: t,
|
|
3020
2933
|
...e
|
|
@@ -3050,7 +2963,7 @@ class $t {
|
|
|
3050
2963
|
async resetPassword(e) {
|
|
3051
2964
|
return await this.accountService.resetPassword({
|
|
3052
2965
|
input: {
|
|
3053
|
-
mobileNumber:
|
|
2966
|
+
mobileNumber: k(e.mobileNumber),
|
|
3054
2967
|
newPassword: await g(e.newPassword)
|
|
3055
2968
|
},
|
|
3056
2969
|
verificationCode: e.verificationCode
|
|
@@ -3074,7 +2987,7 @@ class $t {
|
|
|
3074
2987
|
return await this.accountService.sendVerificationCode({
|
|
3075
2988
|
input: {
|
|
3076
2989
|
channel: "SMS",
|
|
3077
|
-
recipient:
|
|
2990
|
+
recipient: k(e)
|
|
3078
2991
|
}
|
|
3079
2992
|
});
|
|
3080
2993
|
}
|
|
@@ -3138,7 +3051,7 @@ class $t {
|
|
|
3138
3051
|
* ```
|
|
3139
3052
|
*/
|
|
3140
3053
|
async createWithdrawal(e) {
|
|
3141
|
-
const t = e.id ?? E.generate(
|
|
3054
|
+
const t = e.id ?? E.generate(b.Withdrawal).toString();
|
|
3142
3055
|
if (e.type === "BANK") {
|
|
3143
3056
|
const r = await this.walletService.createBankWithdrawal({
|
|
3144
3057
|
input: {
|
|
@@ -3155,7 +3068,7 @@ class $t {
|
|
|
3155
3068
|
id: t,
|
|
3156
3069
|
amount: e.amount.toString(),
|
|
3157
3070
|
transactionPassword: await g(e.transactionPassword),
|
|
3158
|
-
recipientMobileNumber:
|
|
3071
|
+
recipientMobileNumber: k(e.recipientMobileNumber)
|
|
3159
3072
|
}
|
|
3160
3073
|
});
|
|
3161
3074
|
if (!r.ok) return r;
|
|
@@ -3166,7 +3079,7 @@ class $t {
|
|
|
3166
3079
|
id: t,
|
|
3167
3080
|
amount: e.amount.toString(),
|
|
3168
3081
|
transactionPassword: await g(e.transactionPassword),
|
|
3169
|
-
recipientMobileNumber:
|
|
3082
|
+
recipientMobileNumber: k(e.recipientMobileNumber)
|
|
3170
3083
|
}
|
|
3171
3084
|
});
|
|
3172
3085
|
if (!r.ok) return r;
|
|
@@ -3224,7 +3137,7 @@ class $t {
|
|
|
3224
3137
|
* ```
|
|
3225
3138
|
*/
|
|
3226
3139
|
async createDeposit(e) {
|
|
3227
|
-
const t = e.id ?? E.generate(
|
|
3140
|
+
const t = e.id ?? E.generate(b.Deposit).toString();
|
|
3228
3141
|
if (e.type === "MAYA") {
|
|
3229
3142
|
const r = await this.walletService.createMayaDeposit({
|
|
3230
3143
|
input: {
|
|
@@ -3512,26 +3425,26 @@ class $t {
|
|
|
3512
3425
|
* ```
|
|
3513
3426
|
*/
|
|
3514
3427
|
async createGameSession(e) {
|
|
3515
|
-
const t = e.id ?? E.generate(
|
|
3428
|
+
const t = e.id ?? E.generate(b.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
|
|
3516
3429
|
return r.ok ? { ok: !0, data: { id: t } } : r;
|
|
3517
3430
|
}
|
|
3518
3431
|
/** @deprecated use `createGameSession__next` */
|
|
3519
3432
|
async createGameSession__legacy(e) {
|
|
3520
|
-
const t = e.id ?? E.generate(
|
|
3433
|
+
const t = e.id ?? E.generate(b.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
|
|
3521
3434
|
return r.ok ? { ok: !0, data: { id: t } } : r;
|
|
3522
3435
|
}
|
|
3523
3436
|
async createGameSession__next(e) {
|
|
3524
|
-
const t = e.id ?? E.generate(
|
|
3437
|
+
const t = e.id ?? E.generate(b.GameSession).toString();
|
|
3525
3438
|
if (e.game.startsWith("SPORTS:")) {
|
|
3526
|
-
const p = await E.generateFromKey(
|
|
3439
|
+
const p = await E.generateFromKey(b.Game, e.game).then(
|
|
3527
3440
|
(f) => f.toString()
|
|
3528
|
-
),
|
|
3441
|
+
), l = await this.gameService.createGameSession({
|
|
3529
3442
|
input: {
|
|
3530
3443
|
id: t,
|
|
3531
3444
|
game: p
|
|
3532
3445
|
}
|
|
3533
3446
|
});
|
|
3534
|
-
return
|
|
3447
|
+
return l.ok ? { ok: !0, data: { id: t } } : l;
|
|
3535
3448
|
}
|
|
3536
3449
|
const r = await this.game__next(e.game);
|
|
3537
3450
|
if (!r.data)
|
|
@@ -3546,7 +3459,7 @@ class $t {
|
|
|
3546
3459
|
/**/
|
|
3547
3460
|
provider: a,
|
|
3548
3461
|
externalId: s
|
|
3549
|
-
} = r.data, c =
|
|
3462
|
+
} = r.data, c = xt(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
|
|
3550
3463
|
return c.ok ? { ok: !0, data: { id: t } } : c;
|
|
3551
3464
|
}
|
|
3552
3465
|
/** @deprecated use `endGameSession__next` */
|
|
@@ -3589,7 +3502,7 @@ class $t {
|
|
|
3589
3502
|
* ```
|
|
3590
3503
|
*/
|
|
3591
3504
|
async uploadImageFile(e) {
|
|
3592
|
-
const t = e.id ?? E.generate(
|
|
3505
|
+
const t = e.id ?? E.generate(b.File).toString(), r = await this.fileService.uploadPrivateImageFile({
|
|
3593
3506
|
input: {
|
|
3594
3507
|
id: t,
|
|
3595
3508
|
file: e.file
|
|
@@ -3651,11 +3564,8 @@ class $t {
|
|
|
3651
3564
|
}
|
|
3652
3565
|
} : t;
|
|
3653
3566
|
}
|
|
3654
|
-
addAreaCode(e) {
|
|
3655
|
-
return e.startsWith("+63") ? e : e.startsWith("63") ? `+${e}` : e.startsWith("0") ? `+63${e.substring(1)}` : `+63${e}`;
|
|
3656
|
-
}
|
|
3657
3567
|
}
|
|
3658
|
-
const
|
|
3568
|
+
const Gt = [
|
|
3659
3569
|
/**/
|
|
3660
3570
|
"RTG",
|
|
3661
3571
|
"DARWIN",
|
|
@@ -3665,9 +3575,12 @@ const Pt = [
|
|
|
3665
3575
|
"EVOLUTION_NETENT",
|
|
3666
3576
|
"EVOLUTION_REDTIGER"
|
|
3667
3577
|
];
|
|
3578
|
+
function xt(n) {
|
|
3579
|
+
return Gt.some((e) => e === n);
|
|
3580
|
+
}
|
|
3668
3581
|
export {
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3582
|
+
qt as ObjectId,
|
|
3583
|
+
b as ObjectType,
|
|
3584
|
+
Ut as Sdk
|
|
3672
3585
|
};
|
|
3673
3586
|
//# sourceMappingURL=index.mjs.map
|