@opexa/portal-sdk 0.0.23 → 0.0.25
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/README.md +29 -1
- package/dist/index.js +59 -59
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +667 -415
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/object-type.d.ts +1 -0
- package/dist/sdk/sdk.d.ts +30 -9
- package/dist/sdk/transformer.d.ts +5 -0
- package/dist/sdk/types.d.ts +17 -0
- package/dist/services/cms-portal.service.d.ts +18 -0
- package/dist/services/game.service.d.ts +2 -0
- package/dist/services/types.d.ts +39 -8
- package/dist/services/wallet.service.d.ts +2 -0
- package/dist/utils/compact.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Ce = (n, e, t) => e in n ?
|
|
3
|
-
var
|
|
4
|
-
import { ObjectId as
|
|
5
|
-
import { ObjectId as
|
|
6
|
-
const
|
|
1
|
+
var Te = Object.defineProperty;
|
|
2
|
+
var Ce = (n, e, t) => e in n ? Te(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var c = (n, e, t) => Ce(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ObjectId as E } from "@opexa/object-id";
|
|
5
|
+
import { ObjectId as Ut } from "@opexa/object-id";
|
|
6
|
+
const S = {
|
|
7
7
|
Account: 8,
|
|
8
8
|
Deposit: 9,
|
|
9
9
|
Withdrawal: 14,
|
|
10
10
|
Verification: 15,
|
|
11
11
|
File: 16,
|
|
12
|
+
Game: 203,
|
|
12
13
|
GameSession: 204,
|
|
13
14
|
MayaSession: 230
|
|
14
15
|
};
|
|
@@ -20,15 +21,15 @@ function o(n, ...e) {
|
|
|
20
21
|
}
|
|
21
22
|
return t.trim();
|
|
22
23
|
}
|
|
23
|
-
const
|
|
24
|
+
const V = o`
|
|
24
25
|
fragment FileFragment on File {
|
|
25
26
|
id
|
|
26
27
|
url
|
|
27
28
|
status
|
|
28
29
|
dateTimeCreated
|
|
29
30
|
}
|
|
30
|
-
`,
|
|
31
|
-
${
|
|
31
|
+
`, Ne = o`
|
|
32
|
+
${V}
|
|
32
33
|
|
|
33
34
|
query File($id: ObjectId!) {
|
|
34
35
|
node(id: $id) {
|
|
@@ -37,7 +38,7 @@ const C = o`
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
`,
|
|
41
|
+
`, ve = o`
|
|
41
42
|
mutation UploadPrivateImageFile($input: UploadFileInput!) {
|
|
42
43
|
uploadPrivateImageFile(input: $input) {
|
|
43
44
|
... on FileFormatNotSupportedError {
|
|
@@ -51,7 +52,7 @@ const C = o`
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
`,
|
|
55
|
+
`, Ie = o`
|
|
55
56
|
query Wallet {
|
|
56
57
|
wallet {
|
|
57
58
|
id
|
|
@@ -70,7 +71,7 @@ const C = o`
|
|
|
70
71
|
dateTimeCreated
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
|
-
`,
|
|
74
|
+
`, De = o`
|
|
74
75
|
mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
|
|
75
76
|
pointsToCashConversion(input: $input) {
|
|
76
77
|
... on InsufficientPointsError {
|
|
@@ -78,15 +79,15 @@ const C = o`
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
`,
|
|
82
|
+
`, H = o`
|
|
82
83
|
fragment GameFragment on Game {
|
|
83
84
|
id
|
|
84
85
|
type
|
|
85
86
|
name
|
|
86
87
|
provider
|
|
87
88
|
}
|
|
88
|
-
`,
|
|
89
|
-
${
|
|
89
|
+
`, ge = o`
|
|
90
|
+
${H}
|
|
90
91
|
|
|
91
92
|
query Games($first: Int, $after: Cursor, $filter: GameFilterInput) {
|
|
92
93
|
games(first: $first, after: $after, filter: $filter) {
|
|
@@ -105,15 +106,15 @@ const C = o`
|
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
|
-
`,
|
|
109
|
-
${
|
|
109
|
+
`, Ee = o`
|
|
110
|
+
${H}
|
|
110
111
|
|
|
111
112
|
query GamesByName($first: Int, $search: String!, $filter: GameFilterInput) {
|
|
112
113
|
gamesByName(first: $first, search: $search, filter: $filter) {
|
|
113
114
|
id
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
|
-
`,
|
|
117
|
+
`, Re = o`
|
|
117
118
|
query GameSession($id: ObjectId!) {
|
|
118
119
|
node(id: $id) {
|
|
119
120
|
... on GameSession {
|
|
@@ -126,7 +127,7 @@ const C = o`
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
|
-
`,
|
|
130
|
+
`, Se = o`
|
|
130
131
|
mutation CreateGameSession($input: CreateGameSessionInput!) {
|
|
131
132
|
createGameSession(input: $input) {
|
|
132
133
|
... on GameDoesNotExistError {
|
|
@@ -134,11 +135,11 @@ const C = o`
|
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
|
-
`,
|
|
138
|
+
`, Pe = o`
|
|
138
139
|
mutation EndGameSession($input: EndGameSessionInput!) {
|
|
139
140
|
endGameSession(input: $input)
|
|
140
141
|
}
|
|
141
|
-
`,
|
|
142
|
+
`, xe = o`
|
|
142
143
|
query GameSession($id: ObjectId!) {
|
|
143
144
|
node(id: $id) {
|
|
144
145
|
... on GameSession {
|
|
@@ -167,7 +168,7 @@ const C = o`
|
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
|
-
`,
|
|
171
|
+
`, Oe = o`
|
|
171
172
|
query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
|
|
172
173
|
announcements(first: $first, after: $after, filter: $filter) {
|
|
173
174
|
edges {
|
|
@@ -193,7 +194,7 @@ const C = o`
|
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
|
-
`,
|
|
197
|
+
`, Ue = o`
|
|
197
198
|
query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
|
|
198
199
|
member {
|
|
199
200
|
withdrawalRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -306,7 +307,7 @@ const C = o`
|
|
|
306
307
|
}
|
|
307
308
|
}
|
|
308
309
|
}
|
|
309
|
-
`,
|
|
310
|
+
`, qe = o`
|
|
310
311
|
mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
|
|
311
312
|
createMayaAppWithdrawal(input: $input) {
|
|
312
313
|
... on AccountNotVerifiedError {
|
|
@@ -326,7 +327,7 @@ const C = o`
|
|
|
326
327
|
}
|
|
327
328
|
}
|
|
328
329
|
}
|
|
329
|
-
`,
|
|
330
|
+
`, We = o`
|
|
330
331
|
mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
|
|
331
332
|
createBankWithdrawal(input: $input) {
|
|
332
333
|
... on MobileNumberNotVerifiedError {
|
|
@@ -349,11 +350,11 @@ const C = o`
|
|
|
349
350
|
}
|
|
350
351
|
}
|
|
351
352
|
}
|
|
352
|
-
`,
|
|
353
|
+
`, Le = o`
|
|
353
354
|
query RemainingDailyWithdrawalsCount {
|
|
354
355
|
remainingDailyWithdrawalsCount
|
|
355
356
|
}
|
|
356
|
-
`,
|
|
357
|
+
`, Fe = o`
|
|
357
358
|
query DepositRecords($after: Cursor, $first: Int, $filter: DepositRecordFilterInput) {
|
|
358
359
|
member {
|
|
359
360
|
depositRecords(after: $after, first: $first, filter: $filter) {
|
|
@@ -382,7 +383,7 @@ const C = o`
|
|
|
382
383
|
}
|
|
383
384
|
}
|
|
384
385
|
}
|
|
385
|
-
`,
|
|
386
|
+
`, Ve = o`
|
|
386
387
|
mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
|
|
387
388
|
createGCashDeposit(input: $input) {
|
|
388
389
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -411,7 +412,7 @@ const C = o`
|
|
|
411
412
|
}
|
|
412
413
|
}
|
|
413
414
|
}
|
|
414
|
-
`,
|
|
415
|
+
`, He = o`
|
|
415
416
|
mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
|
|
416
417
|
createMayaDeposit(input: $input) {
|
|
417
418
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -440,7 +441,7 @@ const C = o`
|
|
|
440
441
|
}
|
|
441
442
|
}
|
|
442
443
|
}
|
|
443
|
-
`,
|
|
444
|
+
`, Ye = o`
|
|
444
445
|
mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
|
|
445
446
|
createMayaAppDeposit(input: $input) {
|
|
446
447
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -469,7 +470,7 @@ const C = o`
|
|
|
469
470
|
}
|
|
470
471
|
}
|
|
471
472
|
}
|
|
472
|
-
`,
|
|
473
|
+
`, je = o`
|
|
473
474
|
query Deposit($id: ObjectId!) {
|
|
474
475
|
node(id: $id) {
|
|
475
476
|
... on GCashDeposit {
|
|
@@ -501,14 +502,14 @@ const C = o`
|
|
|
501
502
|
}
|
|
502
503
|
}
|
|
503
504
|
}
|
|
504
|
-
`,
|
|
505
|
+
`, Qe = o`
|
|
505
506
|
query DepositsCount {
|
|
506
507
|
member {
|
|
507
508
|
depositsCount
|
|
508
509
|
}
|
|
509
510
|
}
|
|
510
|
-
`,
|
|
511
|
-
${
|
|
511
|
+
`, Ke = o`
|
|
512
|
+
${H}
|
|
512
513
|
|
|
513
514
|
query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
|
|
514
515
|
member {
|
|
@@ -547,7 +548,7 @@ const C = o`
|
|
|
547
548
|
}
|
|
548
549
|
}
|
|
549
550
|
}
|
|
550
|
-
`,
|
|
551
|
+
`, ze = o`
|
|
551
552
|
query LatestBetRecords {
|
|
552
553
|
latestBetRecords {
|
|
553
554
|
id
|
|
@@ -566,8 +567,8 @@ const C = o`
|
|
|
566
567
|
}
|
|
567
568
|
}
|
|
568
569
|
|
|
569
|
-
${
|
|
570
|
-
`,
|
|
570
|
+
${H}
|
|
571
|
+
`, Je = o`
|
|
571
572
|
query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
|
|
572
573
|
member {
|
|
573
574
|
transactionRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -593,8 +594,8 @@ const C = o`
|
|
|
593
594
|
}
|
|
594
595
|
}
|
|
595
596
|
}
|
|
596
|
-
`,
|
|
597
|
-
${
|
|
597
|
+
`, Q = o`
|
|
598
|
+
${V}
|
|
598
599
|
|
|
599
600
|
fragment PromoFragment on Promo {
|
|
600
601
|
id
|
|
@@ -612,24 +613,24 @@ const C = o`
|
|
|
612
613
|
dateTimeCreated
|
|
613
614
|
dateTimeLastUpdated
|
|
614
615
|
}
|
|
615
|
-
`,
|
|
616
|
-
${
|
|
616
|
+
`, Xe = o`
|
|
617
|
+
${Q}
|
|
617
618
|
|
|
618
619
|
query Promos {
|
|
619
620
|
promos {
|
|
620
621
|
...PromoFragment
|
|
621
622
|
}
|
|
622
623
|
}
|
|
623
|
-
`,
|
|
624
|
-
${
|
|
624
|
+
`, Ze = o`
|
|
625
|
+
${Q}
|
|
625
626
|
|
|
626
627
|
query AvailablePromos($filter: PromoFilterInput) {
|
|
627
628
|
availablePromos(filter: $filter) {
|
|
628
629
|
...PromoFragment
|
|
629
630
|
}
|
|
630
631
|
}
|
|
631
|
-
`,
|
|
632
|
-
${
|
|
632
|
+
`, Ae = o`
|
|
633
|
+
${V}
|
|
633
634
|
|
|
634
635
|
fragment CashbackFragment on Cashback {
|
|
635
636
|
id
|
|
@@ -644,16 +645,16 @@ const C = o`
|
|
|
644
645
|
dateTimeCreated
|
|
645
646
|
dateTimeLastUpdated
|
|
646
647
|
}
|
|
647
|
-
`,
|
|
648
|
-
${
|
|
648
|
+
`, et = o`
|
|
649
|
+
${Ae}
|
|
649
650
|
|
|
650
651
|
query Cashbacks {
|
|
651
652
|
cashbacks {
|
|
652
653
|
...CashbackFragment
|
|
653
654
|
}
|
|
654
655
|
}
|
|
655
|
-
`,
|
|
656
|
-
${
|
|
656
|
+
`, tt = o`
|
|
657
|
+
${Q}
|
|
657
658
|
|
|
658
659
|
query Bonus {
|
|
659
660
|
bonus {
|
|
@@ -681,8 +682,8 @@ const C = o`
|
|
|
681
682
|
dateTimeLastUpdated
|
|
682
683
|
}
|
|
683
684
|
}
|
|
684
|
-
`,
|
|
685
|
-
${
|
|
685
|
+
`, at = o`
|
|
686
|
+
${Ae}
|
|
686
687
|
|
|
687
688
|
query CashbackBonuses {
|
|
688
689
|
cashbackBonuses {
|
|
@@ -695,7 +696,7 @@ const C = o`
|
|
|
695
696
|
dateTimeLastUpdated
|
|
696
697
|
}
|
|
697
698
|
}
|
|
698
|
-
`,
|
|
699
|
+
`, rt = o`
|
|
699
700
|
mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
|
|
700
701
|
claimCashbackBonus(input: $input) {
|
|
701
702
|
... on CashbackBonusDoesNotExistError {
|
|
@@ -703,13 +704,13 @@ const C = o`
|
|
|
703
704
|
}
|
|
704
705
|
}
|
|
705
706
|
}
|
|
706
|
-
`,
|
|
707
|
+
`, nt = o`
|
|
707
708
|
query Member {
|
|
708
709
|
member {
|
|
709
710
|
dateTimeLastActive
|
|
710
711
|
}
|
|
711
712
|
}
|
|
712
|
-
`,
|
|
713
|
+
`, ot = o`
|
|
713
714
|
query MemberAccount {
|
|
714
715
|
memberAccount: self {
|
|
715
716
|
... on MemberAccount {
|
|
@@ -733,8 +734,8 @@ const C = o`
|
|
|
733
734
|
}
|
|
734
735
|
}
|
|
735
736
|
}
|
|
736
|
-
`,
|
|
737
|
-
${
|
|
737
|
+
`, it = o`
|
|
738
|
+
${V}
|
|
738
739
|
|
|
739
740
|
query MemberVerification {
|
|
740
741
|
memberAccount: self {
|
|
@@ -757,7 +758,7 @@ const C = o`
|
|
|
757
758
|
}
|
|
758
759
|
}
|
|
759
760
|
}
|
|
760
|
-
`,
|
|
761
|
+
`, st = o`
|
|
761
762
|
mutation RegisterMemberAccount(
|
|
762
763
|
$input: RegisterMemberAccountInput!
|
|
763
764
|
$referralCode: String
|
|
@@ -793,7 +794,7 @@ const C = o`
|
|
|
793
794
|
}
|
|
794
795
|
}
|
|
795
796
|
}
|
|
796
|
-
`,
|
|
797
|
+
`, mt = o`
|
|
797
798
|
mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
|
|
798
799
|
updateMemberAccount(input: $input) {
|
|
799
800
|
... on AccountNameNotAvailableError {
|
|
@@ -819,7 +820,7 @@ const C = o`
|
|
|
819
820
|
}
|
|
820
821
|
}
|
|
821
822
|
}
|
|
822
|
-
`,
|
|
823
|
+
`, ct = o`
|
|
823
824
|
mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
|
|
824
825
|
resetPassword(input: $input, verificationCode: $verificationCode) {
|
|
825
826
|
... on AccountNotFoundError {
|
|
@@ -830,11 +831,11 @@ const C = o`
|
|
|
830
831
|
}
|
|
831
832
|
}
|
|
832
833
|
}
|
|
833
|
-
`,
|
|
834
|
+
`, dt = o`
|
|
834
835
|
mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
|
|
835
836
|
deleteMemberAccount(input: $input)
|
|
836
837
|
}
|
|
837
|
-
`,
|
|
838
|
+
`, ut = o`
|
|
838
839
|
mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
|
|
839
840
|
verifyMobileNumber(input: $input) {
|
|
840
841
|
... on InvalidSMSVerificationCodeError {
|
|
@@ -845,7 +846,7 @@ const C = o`
|
|
|
845
846
|
}
|
|
846
847
|
}
|
|
847
848
|
}
|
|
848
|
-
`,
|
|
849
|
+
`, lt = o`
|
|
849
850
|
mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
|
|
850
851
|
createMemberVerification(input: $input) {
|
|
851
852
|
... on FileDoesNotExistError {
|
|
@@ -859,7 +860,7 @@ const C = o`
|
|
|
859
860
|
}
|
|
860
861
|
}
|
|
861
862
|
}
|
|
862
|
-
`,
|
|
863
|
+
`, pt = o`
|
|
863
864
|
mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
|
|
864
865
|
updateMemberVerification(input: $input) {
|
|
865
866
|
... on FileDoesNotExistError {
|
|
@@ -876,7 +877,7 @@ const C = o`
|
|
|
876
877
|
}
|
|
877
878
|
}
|
|
878
879
|
}
|
|
879
|
-
`,
|
|
880
|
+
`, ft = o`
|
|
880
881
|
query ProfileCompletion {
|
|
881
882
|
profileCompletion {
|
|
882
883
|
completionPercentage
|
|
@@ -887,7 +888,7 @@ const C = o`
|
|
|
887
888
|
accountPassword
|
|
888
889
|
}
|
|
889
890
|
}
|
|
890
|
-
`,
|
|
891
|
+
`, ht = o`
|
|
891
892
|
mutation SendVerificationCode($input: SendVerificationCodeInput!) {
|
|
892
893
|
sendVerificationCode(input: $input) {
|
|
893
894
|
... on InvalidPlatformError {
|
|
@@ -898,7 +899,7 @@ const C = o`
|
|
|
898
899
|
}
|
|
899
900
|
}
|
|
900
901
|
}
|
|
901
|
-
`,
|
|
902
|
+
`, wt = o`
|
|
902
903
|
fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
|
|
903
904
|
minimumAmount
|
|
904
905
|
maximumAmount
|
|
@@ -952,7 +953,7 @@ const C = o`
|
|
|
952
953
|
multiplier
|
|
953
954
|
}
|
|
954
955
|
}
|
|
955
|
-
`,
|
|
956
|
+
`, yt = o`
|
|
956
957
|
query MayaSession($id: ObjectId!) {
|
|
957
958
|
mayaSession(id: $id) {
|
|
958
959
|
id
|
|
@@ -961,7 +962,7 @@ const C = o`
|
|
|
961
962
|
}
|
|
962
963
|
}
|
|
963
964
|
`;
|
|
964
|
-
function
|
|
965
|
+
function d(n) {
|
|
965
966
|
return {
|
|
966
967
|
name: n,
|
|
967
968
|
message: {
|
|
@@ -1015,39 +1016,39 @@ function c(n) {
|
|
|
1015
1016
|
}[n]
|
|
1016
1017
|
};
|
|
1017
1018
|
}
|
|
1018
|
-
class
|
|
1019
|
+
class gt {
|
|
1019
1020
|
constructor(e) {
|
|
1020
|
-
|
|
1021
|
+
c(this, "client");
|
|
1021
1022
|
this.client = e;
|
|
1022
1023
|
}
|
|
1023
1024
|
/** aka `Query.self` */
|
|
1024
1025
|
async memberAccount() {
|
|
1025
|
-
const e = await this.client.request(
|
|
1026
|
+
const e = await this.client.request(ot);
|
|
1026
1027
|
return e.ok ? {
|
|
1027
1028
|
ok: !0,
|
|
1028
1029
|
data: e.data.memberAccount
|
|
1029
1030
|
} : e;
|
|
1030
1031
|
}
|
|
1031
1032
|
async registerMemberAccount(e) {
|
|
1032
|
-
const t = await this.client.request(
|
|
1033
|
+
const t = await this.client.request(st, e);
|
|
1033
1034
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1034
1035
|
ok: !1,
|
|
1035
|
-
error:
|
|
1036
|
+
error: d(t.data.registerMemberAccount.__typename)
|
|
1036
1037
|
} : {
|
|
1037
1038
|
ok: !0
|
|
1038
1039
|
} : t;
|
|
1039
1040
|
}
|
|
1040
1041
|
async updateMemberAccount(e) {
|
|
1041
|
-
const t = await this.client.request(
|
|
1042
|
+
const t = await this.client.request(mt, e);
|
|
1042
1043
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
1043
1044
|
ok: !1,
|
|
1044
|
-
error:
|
|
1045
|
+
error: d(t.data.updateMemberAccount.__typename)
|
|
1045
1046
|
} : {
|
|
1046
1047
|
ok: !0
|
|
1047
1048
|
} : t;
|
|
1048
1049
|
}
|
|
1049
1050
|
async deleteMemberAccount(e) {
|
|
1050
|
-
const t = await this.client.request(
|
|
1051
|
+
const t = await this.client.request(dt, e);
|
|
1051
1052
|
return t.ok ? t.data.deleteMemberAccount ? {
|
|
1052
1053
|
ok: !0
|
|
1053
1054
|
} : {
|
|
@@ -1060,61 +1061,61 @@ class wt {
|
|
|
1060
1061
|
}
|
|
1061
1062
|
async resetPassword(e) {
|
|
1062
1063
|
const t = await this.client.request(
|
|
1063
|
-
|
|
1064
|
+
ct,
|
|
1064
1065
|
e
|
|
1065
1066
|
);
|
|
1066
1067
|
return t.ok ? t.data.resetPassword ? {
|
|
1067
1068
|
ok: !1,
|
|
1068
|
-
error:
|
|
1069
|
+
error: d(t.data.resetPassword.__typename)
|
|
1069
1070
|
} : {
|
|
1070
1071
|
ok: !0
|
|
1071
1072
|
} : t;
|
|
1072
1073
|
}
|
|
1073
1074
|
async profileCompletion() {
|
|
1074
|
-
const e = await this.client.request(
|
|
1075
|
+
const e = await this.client.request(ft);
|
|
1075
1076
|
return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
|
|
1076
1077
|
}
|
|
1077
1078
|
async platform() {
|
|
1078
|
-
return await this.client.request(
|
|
1079
|
+
return await this.client.request(wt);
|
|
1079
1080
|
}
|
|
1080
1081
|
async sendVerificationCode(e) {
|
|
1081
|
-
const t = await this.client.request(
|
|
1082
|
+
const t = await this.client.request(ht, e);
|
|
1082
1083
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
1083
1084
|
ok: !1,
|
|
1084
|
-
error:
|
|
1085
|
+
error: d(t.data.sendVerificationCode.__typename)
|
|
1085
1086
|
} : {
|
|
1086
1087
|
ok: !0
|
|
1087
1088
|
} : t;
|
|
1088
1089
|
}
|
|
1089
1090
|
async verifyMobileNumber(e) {
|
|
1090
|
-
const t = await this.client.request(
|
|
1091
|
+
const t = await this.client.request(ut, e);
|
|
1091
1092
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1092
1093
|
ok: !1,
|
|
1093
|
-
error:
|
|
1094
|
+
error: d(t.data.verifyMobileNumber.__typename)
|
|
1094
1095
|
} : {
|
|
1095
1096
|
ok: !0
|
|
1096
1097
|
} : t;
|
|
1097
1098
|
}
|
|
1098
1099
|
async createMemberVerification(e) {
|
|
1099
|
-
const t = await this.client.request(
|
|
1100
|
+
const t = await this.client.request(lt, e);
|
|
1100
1101
|
return t.ok ? t.data.createMemberVerification ? {
|
|
1101
1102
|
ok: !1,
|
|
1102
|
-
error:
|
|
1103
|
+
error: d(t.data.createMemberVerification.__typename)
|
|
1103
1104
|
} : {
|
|
1104
1105
|
ok: !0
|
|
1105
1106
|
} : t;
|
|
1106
1107
|
}
|
|
1107
1108
|
async updateMemberVerification(e) {
|
|
1108
|
-
const t = await this.client.request(
|
|
1109
|
+
const t = await this.client.request(pt, e);
|
|
1109
1110
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
1110
1111
|
ok: !1,
|
|
1111
|
-
error:
|
|
1112
|
+
error: d(t.data.updateMemberVerification.__typename)
|
|
1112
1113
|
} : {
|
|
1113
1114
|
ok: !0
|
|
1114
1115
|
} : t;
|
|
1115
1116
|
}
|
|
1116
1117
|
async memberVerification() {
|
|
1117
|
-
const e = await this.client.request(
|
|
1118
|
+
const e = await this.client.request(it);
|
|
1118
1119
|
return e.ok ? {
|
|
1119
1120
|
ok: !0,
|
|
1120
1121
|
data: e.data.memberAccount.verification
|
|
@@ -1122,7 +1123,7 @@ class wt {
|
|
|
1122
1123
|
}
|
|
1123
1124
|
async announcements(e) {
|
|
1124
1125
|
const t = await this.client.request(
|
|
1125
|
-
|
|
1126
|
+
Oe,
|
|
1126
1127
|
e
|
|
1127
1128
|
);
|
|
1128
1129
|
return t.ok ? {
|
|
@@ -1131,14 +1132,14 @@ class wt {
|
|
|
1131
1132
|
} : t;
|
|
1132
1133
|
}
|
|
1133
1134
|
}
|
|
1134
|
-
function
|
|
1135
|
-
const t =
|
|
1135
|
+
function h(n, e) {
|
|
1136
|
+
const t = Y[n] ? Y[n] : Y[500];
|
|
1136
1137
|
return {
|
|
1137
1138
|
name: t.name,
|
|
1138
1139
|
message: e ?? t.message
|
|
1139
1140
|
};
|
|
1140
1141
|
}
|
|
1141
|
-
const
|
|
1142
|
+
const Y = {
|
|
1142
1143
|
400: { name: "HttpBadRequest", message: "Bad Request" },
|
|
1143
1144
|
401: { name: "HttpUnauthorized", message: "Unauthorized" },
|
|
1144
1145
|
403: { name: "HttpForbidden", message: "Forbidden" },
|
|
@@ -1147,10 +1148,10 @@ const T = {
|
|
|
1147
1148
|
429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
|
|
1148
1149
|
500: { name: "HttpInternalServerError", message: "Internal Server Error" }
|
|
1149
1150
|
};
|
|
1150
|
-
class
|
|
1151
|
+
class Et {
|
|
1151
1152
|
constructor(e) {
|
|
1152
|
-
|
|
1153
|
-
|
|
1153
|
+
c(this, "url");
|
|
1154
|
+
c(this, "platform");
|
|
1154
1155
|
this.url = e.url, this.platform = e.platform;
|
|
1155
1156
|
}
|
|
1156
1157
|
async createSession(e) {
|
|
@@ -1178,15 +1179,15 @@ class yt {
|
|
|
1178
1179
|
data: r
|
|
1179
1180
|
} : r.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1180
1181
|
ok: !1,
|
|
1181
|
-
error:
|
|
1182
|
+
error: d("AccountBlacklisted")
|
|
1182
1183
|
} : {
|
|
1183
1184
|
ok: !1,
|
|
1184
|
-
error:
|
|
1185
|
+
error: h(a.status)
|
|
1185
1186
|
};
|
|
1186
1187
|
} catch {
|
|
1187
1188
|
return {
|
|
1188
1189
|
ok: !1,
|
|
1189
|
-
error:
|
|
1190
|
+
error: h(500)
|
|
1190
1191
|
};
|
|
1191
1192
|
}
|
|
1192
1193
|
}
|
|
@@ -1211,15 +1212,15 @@ class yt {
|
|
|
1211
1212
|
data: r
|
|
1212
1213
|
} : a.status === 401 || a.status === 403 ? {
|
|
1213
1214
|
ok: !1,
|
|
1214
|
-
error:
|
|
1215
|
+
error: d("InvalidTokenOrSecretAnswer")
|
|
1215
1216
|
} : {
|
|
1216
1217
|
ok: !1,
|
|
1217
|
-
error:
|
|
1218
|
+
error: h(a.status)
|
|
1218
1219
|
};
|
|
1219
1220
|
} catch {
|
|
1220
1221
|
return {
|
|
1221
1222
|
ok: !1,
|
|
1222
|
-
error:
|
|
1223
|
+
error: h(500)
|
|
1223
1224
|
};
|
|
1224
1225
|
}
|
|
1225
1226
|
}
|
|
@@ -1241,18 +1242,18 @@ class yt {
|
|
|
1241
1242
|
data: a
|
|
1242
1243
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1243
1244
|
ok: !1,
|
|
1244
|
-
error:
|
|
1245
|
+
error: d("AccountBlacklisted")
|
|
1245
1246
|
} : t.status === 403 || t.status === 401 ? {
|
|
1246
1247
|
ok: !1,
|
|
1247
|
-
error:
|
|
1248
|
+
error: d("InvalidToken")
|
|
1248
1249
|
} : {
|
|
1249
1250
|
ok: !1,
|
|
1250
|
-
error:
|
|
1251
|
+
error: h(t.status)
|
|
1251
1252
|
};
|
|
1252
1253
|
} catch {
|
|
1253
1254
|
return {
|
|
1254
1255
|
ok: !1,
|
|
1255
|
-
error:
|
|
1256
|
+
error: h(500)
|
|
1256
1257
|
};
|
|
1257
1258
|
}
|
|
1258
1259
|
}
|
|
@@ -1267,9 +1268,9 @@ class yt {
|
|
|
1267
1268
|
Authorization: `Bearer ${e}`
|
|
1268
1269
|
}
|
|
1269
1270
|
});
|
|
1270
|
-
return t.ok ? { ok: !0 } : { ok: !1, error:
|
|
1271
|
+
return t.ok ? { ok: !0 } : { ok: !1, error: h(t.status) };
|
|
1271
1272
|
} catch {
|
|
1272
|
-
return { ok: !1, error:
|
|
1273
|
+
return { ok: !1, error: h(500) };
|
|
1273
1274
|
}
|
|
1274
1275
|
}
|
|
1275
1276
|
async verifySession(e) {
|
|
@@ -1288,70 +1289,70 @@ class yt {
|
|
|
1288
1289
|
}
|
|
1289
1290
|
}
|
|
1290
1291
|
}
|
|
1291
|
-
class
|
|
1292
|
+
class St {
|
|
1292
1293
|
constructor(e) {
|
|
1293
|
-
|
|
1294
|
+
c(this, "client");
|
|
1294
1295
|
this.client = e;
|
|
1295
1296
|
}
|
|
1296
1297
|
async file(e) {
|
|
1297
|
-
const t = await this.client.request(
|
|
1298
|
+
const t = await this.client.request(Ne, e);
|
|
1298
1299
|
return t.ok ? {
|
|
1299
1300
|
ok: !0,
|
|
1300
1301
|
data: t.data.node
|
|
1301
1302
|
} : t;
|
|
1302
1303
|
}
|
|
1303
1304
|
async uploadPrivateImageFile(e) {
|
|
1304
|
-
const t = await this.client.upload(
|
|
1305
|
+
const t = await this.client.upload(ve, e);
|
|
1305
1306
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1306
1307
|
ok: !1,
|
|
1307
|
-
error:
|
|
1308
|
+
error: d(t.data.uploadPrivateImageFile.__typename)
|
|
1308
1309
|
} : {
|
|
1309
1310
|
ok: !0
|
|
1310
1311
|
} : t;
|
|
1311
1312
|
}
|
|
1312
1313
|
}
|
|
1313
|
-
class
|
|
1314
|
+
class At {
|
|
1314
1315
|
constructor(e) {
|
|
1315
|
-
|
|
1316
|
+
c(this, "client");
|
|
1316
1317
|
this.client = e;
|
|
1317
1318
|
}
|
|
1318
1319
|
async betRecords(e) {
|
|
1319
1320
|
const t = await this.client.request(
|
|
1320
|
-
|
|
1321
|
+
Ke,
|
|
1321
1322
|
e
|
|
1322
1323
|
);
|
|
1323
1324
|
return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
|
|
1324
1325
|
}
|
|
1325
1326
|
async transactionRecords(e) {
|
|
1326
|
-
const t = await this.client.request(
|
|
1327
|
+
const t = await this.client.request(Je, e);
|
|
1327
1328
|
return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
|
|
1328
1329
|
}
|
|
1329
1330
|
async withdrawalRecords(e) {
|
|
1330
1331
|
const t = await this.client.request(
|
|
1331
|
-
|
|
1332
|
+
Ue,
|
|
1332
1333
|
e
|
|
1333
1334
|
);
|
|
1334
1335
|
return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
|
|
1335
1336
|
}
|
|
1336
1337
|
async depositRecords(e) {
|
|
1337
1338
|
const t = await this.client.request(
|
|
1338
|
-
|
|
1339
|
+
Fe,
|
|
1339
1340
|
e
|
|
1340
1341
|
);
|
|
1341
1342
|
return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
|
|
1342
1343
|
}
|
|
1343
1344
|
async depositsCount() {
|
|
1344
|
-
const e = await this.client.request(
|
|
1345
|
+
const e = await this.client.request(Qe);
|
|
1345
1346
|
return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
|
|
1346
1347
|
}
|
|
1347
1348
|
async member() {
|
|
1348
|
-
const e = await this.client.request(
|
|
1349
|
+
const e = await this.client.request(nt);
|
|
1349
1350
|
return e.ok ? { ok: e.ok, data: e.data.member } : e;
|
|
1350
1351
|
}
|
|
1351
1352
|
}
|
|
1352
|
-
class
|
|
1353
|
+
class bt {
|
|
1353
1354
|
constructor(e) {
|
|
1354
|
-
|
|
1355
|
+
c(this, "url");
|
|
1355
1356
|
this.url = e.url;
|
|
1356
1357
|
}
|
|
1357
1358
|
gameThumbnails(e) {
|
|
@@ -1361,35 +1362,35 @@ class Et {
|
|
|
1361
1362
|
];
|
|
1362
1363
|
}
|
|
1363
1364
|
}
|
|
1364
|
-
class
|
|
1365
|
+
class be {
|
|
1365
1366
|
constructor(e) {
|
|
1366
|
-
|
|
1367
|
+
c(this, "client");
|
|
1367
1368
|
this.client = e;
|
|
1368
1369
|
}
|
|
1369
1370
|
async promos() {
|
|
1370
|
-
const e = await this.client.request(
|
|
1371
|
+
const e = await this.client.request(Xe);
|
|
1371
1372
|
return e.ok ? { ok: e.ok, data: e.data.promos } : e;
|
|
1372
1373
|
}
|
|
1373
1374
|
async cashbacks() {
|
|
1374
|
-
const e = await this.client.request(
|
|
1375
|
+
const e = await this.client.request(et);
|
|
1375
1376
|
return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
|
|
1376
1377
|
}
|
|
1377
1378
|
async availablePromos(e) {
|
|
1378
1379
|
const t = await this.client.request(
|
|
1379
|
-
|
|
1380
|
+
Ze,
|
|
1380
1381
|
e
|
|
1381
1382
|
);
|
|
1382
1383
|
return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
|
|
1383
1384
|
}
|
|
1384
1385
|
async cashbackBonuses() {
|
|
1385
|
-
const e = await this.client.request(
|
|
1386
|
+
const e = await this.client.request(at);
|
|
1386
1387
|
return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
|
|
1387
1388
|
}
|
|
1388
1389
|
async claimCashbackBonus(e) {
|
|
1389
|
-
const t = await this.client.request(
|
|
1390
|
+
const t = await this.client.request(rt, e);
|
|
1390
1391
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
1391
1392
|
ok: !1,
|
|
1392
|
-
error:
|
|
1393
|
+
error: d(t.data.claimCashbackBonus.__typename)
|
|
1393
1394
|
} : {
|
|
1394
1395
|
ok: !0
|
|
1395
1396
|
} : {
|
|
@@ -1398,43 +1399,43 @@ class Ee {
|
|
|
1398
1399
|
};
|
|
1399
1400
|
}
|
|
1400
1401
|
async bonus() {
|
|
1401
|
-
const e = await this.client.request(
|
|
1402
|
+
const e = await this.client.request(tt);
|
|
1402
1403
|
return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
|
|
1403
1404
|
}
|
|
1404
1405
|
async wallet() {
|
|
1405
|
-
const e = await this.client.request(
|
|
1406
|
+
const e = await this.client.request(Ie);
|
|
1406
1407
|
return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
|
|
1407
1408
|
}
|
|
1408
1409
|
async deposit(e) {
|
|
1409
1410
|
const t = await this.client.request(
|
|
1410
|
-
|
|
1411
|
+
je,
|
|
1411
1412
|
e
|
|
1412
1413
|
);
|
|
1413
1414
|
return t.ok ? { ok: t.ok, data: t.data.node } : t;
|
|
1414
1415
|
}
|
|
1415
1416
|
async createGCashDeposit(e) {
|
|
1416
|
-
const t = await this.client.request(
|
|
1417
|
+
const t = await this.client.request(Ve, e);
|
|
1417
1418
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
1418
1419
|
ok: !1,
|
|
1419
|
-
error:
|
|
1420
|
+
error: d(t.data.createGCashDeposit.__typename)
|
|
1420
1421
|
} : {
|
|
1421
1422
|
ok: !0
|
|
1422
1423
|
} : t;
|
|
1423
1424
|
}
|
|
1424
1425
|
async createMayaDeposit(e) {
|
|
1425
|
-
const t = await this.client.request(
|
|
1426
|
+
const t = await this.client.request(He, e);
|
|
1426
1427
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
1427
1428
|
ok: !1,
|
|
1428
|
-
error:
|
|
1429
|
+
error: d(t.data.createMayaDeposit.__typename)
|
|
1429
1430
|
} : {
|
|
1430
1431
|
ok: !0
|
|
1431
1432
|
} : t;
|
|
1432
1433
|
}
|
|
1433
1434
|
async createMayaAppDeposit(e) {
|
|
1434
|
-
const t = await this.client.request(
|
|
1435
|
+
const t = await this.client.request(Ye, e);
|
|
1435
1436
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
1436
1437
|
ok: !1,
|
|
1437
|
-
error:
|
|
1438
|
+
error: d(t.data.createMayaAppDeposit.__typename)
|
|
1438
1439
|
} : {
|
|
1439
1440
|
ok: !0
|
|
1440
1441
|
} : t;
|
|
@@ -1443,7 +1444,7 @@ class Ee {
|
|
|
1443
1444
|
const t = await this.client.request($e, e);
|
|
1444
1445
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
1445
1446
|
ok: !1,
|
|
1446
|
-
error:
|
|
1447
|
+
error: d(t.data.createGCashWithdrawal.__typename)
|
|
1447
1448
|
} : {
|
|
1448
1449
|
ok: !0
|
|
1449
1450
|
} : t;
|
|
@@ -1452,32 +1453,32 @@ class Ee {
|
|
|
1452
1453
|
const t = await this.client.request(Be, e);
|
|
1453
1454
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
1454
1455
|
ok: !1,
|
|
1455
|
-
error:
|
|
1456
|
+
error: d(t.data.createMayaWithdrawal.__typename)
|
|
1456
1457
|
} : {
|
|
1457
1458
|
ok: !0
|
|
1458
1459
|
} : t;
|
|
1459
1460
|
}
|
|
1460
1461
|
async createMayaAppWithdrawal(e) {
|
|
1461
|
-
const t = await this.client.request(
|
|
1462
|
+
const t = await this.client.request(qe, e);
|
|
1462
1463
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
1463
1464
|
ok: !1,
|
|
1464
|
-
error:
|
|
1465
|
+
error: d(t.data.createMayaAppWithdrawal.__typename)
|
|
1465
1466
|
} : {
|
|
1466
1467
|
ok: !0
|
|
1467
1468
|
} : t;
|
|
1468
1469
|
}
|
|
1469
1470
|
async createBankWithdrawal(e) {
|
|
1470
|
-
const t = await this.client.request(
|
|
1471
|
+
const t = await this.client.request(We, e);
|
|
1471
1472
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
1472
1473
|
ok: !1,
|
|
1473
|
-
error:
|
|
1474
|
+
error: d(t.data.createBankWithdrawal.__typename)
|
|
1474
1475
|
} : {
|
|
1475
1476
|
ok: !0
|
|
1476
1477
|
} : t;
|
|
1477
1478
|
}
|
|
1478
1479
|
async remainingDailyWithdrawalsCount() {
|
|
1479
1480
|
const e = await this.client.request(
|
|
1480
|
-
|
|
1481
|
+
Le
|
|
1481
1482
|
);
|
|
1482
1483
|
return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
|
|
1483
1484
|
}
|
|
@@ -1486,51 +1487,53 @@ class Ee {
|
|
|
1486
1487
|
return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
|
|
1487
1488
|
}
|
|
1488
1489
|
async pointsToCashConversion(e) {
|
|
1489
|
-
const t = await this.client.request(
|
|
1490
|
+
const t = await this.client.request(De, e);
|
|
1490
1491
|
return t.ok ? t.data.pointsToCashConversion ? {
|
|
1491
1492
|
ok: !1,
|
|
1492
|
-
error:
|
|
1493
|
+
error: d(t.data.pointsToCashConversion.__typename)
|
|
1493
1494
|
} : {
|
|
1494
1495
|
ok: !0
|
|
1495
1496
|
} : t;
|
|
1496
1497
|
}
|
|
1497
1498
|
async mayaSession(e) {
|
|
1498
1499
|
const t = await this.client.request(
|
|
1499
|
-
|
|
1500
|
+
yt,
|
|
1500
1501
|
e
|
|
1501
1502
|
);
|
|
1502
1503
|
return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
|
|
1503
1504
|
}
|
|
1505
|
+
/** @deprecated */
|
|
1504
1506
|
async games(e) {
|
|
1505
|
-
const t = await this.client.request(
|
|
1507
|
+
const t = await this.client.request(ge, e);
|
|
1506
1508
|
return t.ok ? { ok: t.ok, data: t.data.games } : t;
|
|
1507
1509
|
}
|
|
1510
|
+
/** @deprecated */
|
|
1508
1511
|
async gamesByName(e) {
|
|
1509
1512
|
const t = await this.client.request(
|
|
1510
|
-
|
|
1513
|
+
Ee,
|
|
1511
1514
|
e
|
|
1512
1515
|
);
|
|
1513
1516
|
return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
|
|
1514
1517
|
}
|
|
1515
1518
|
async gameSession(e) {
|
|
1516
1519
|
const t = await this.client.request(
|
|
1517
|
-
|
|
1520
|
+
Re,
|
|
1518
1521
|
e
|
|
1519
1522
|
);
|
|
1520
1523
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1521
1524
|
}
|
|
1522
1525
|
async createGameSession(e) {
|
|
1523
|
-
const t = await this.client.request(
|
|
1526
|
+
const t = await this.client.request(Se, e);
|
|
1524
1527
|
return t.ok ? t.data.createGameSession ? {
|
|
1525
1528
|
ok: !1,
|
|
1526
|
-
error:
|
|
1529
|
+
error: d(t.data.createGameSession.__typename)
|
|
1527
1530
|
} : {
|
|
1528
1531
|
ok: !0
|
|
1529
1532
|
} : t;
|
|
1530
1533
|
}
|
|
1531
1534
|
async endGameSession(e) {
|
|
1532
1535
|
const t = await this.client.request(
|
|
1533
|
-
|
|
1536
|
+
Pe,
|
|
1534
1537
|
e
|
|
1535
1538
|
);
|
|
1536
1539
|
return t.ok ? t.data.endGameSession ? {
|
|
@@ -1544,34 +1547,108 @@ class Ee {
|
|
|
1544
1547
|
} : t;
|
|
1545
1548
|
}
|
|
1546
1549
|
}
|
|
1547
|
-
class
|
|
1550
|
+
class _t {
|
|
1548
1551
|
constructor(e) {
|
|
1549
|
-
|
|
1552
|
+
c(this, "url");
|
|
1553
|
+
c(this, "siteId");
|
|
1554
|
+
c(this, "platformId");
|
|
1555
|
+
this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
|
|
1556
|
+
}
|
|
1557
|
+
async self() {
|
|
1558
|
+
const e = await this.getJson(`/sites/${this.siteId}`);
|
|
1559
|
+
return e.ok ? {
|
|
1560
|
+
ok: !0,
|
|
1561
|
+
data: e.data.data
|
|
1562
|
+
} : e;
|
|
1563
|
+
}
|
|
1564
|
+
async games(e) {
|
|
1565
|
+
var r, s, m, u, l, p, y, f, b, _, k, T, C, N, v, I, M, D, R, P, x, G, O, U, $, B;
|
|
1566
|
+
const t = new URLSearchParams();
|
|
1567
|
+
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), (s = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.name) != null && s.equal && t.set("filter[name][eq]", e.filter.name.equal), (u = (m = e == null ? void 0 : e.filter) == null ? void 0 : m.name) != null && u.notEqual && t.set("filter[name][neq]", e.filter.name.notEqual), (p = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.name) != null && p.in && t.set("filter[name][in]", e.filter.name.in.join(",")), (f = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.name) != null && f.notIn && t.set("filter[name][nin]", e.filter.name.notIn.join(",")), (_ = (b = e == null ? void 0 : e.filter) == null ? void 0 : b.name) != null && _.contains && t.set("filter[name][contains]", e.filter.name.contains), (T = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.type) != null && T.equal && t.set("filter[type][eq]", e.filter.type.equal), (N = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.type) != null && N.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (I = (v = e == null ? void 0 : e.filter) == null ? void 0 : v.type) != null && I.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (D = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.type) != null && D.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (P = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.provider) != null && P.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (G = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.provider) != null && G.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (U = (O = e == null ? void 0 : e.filter) == null ? void 0 : O.provider) != null && U.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (B = ($ = e == null ? void 0 : e.filter) == null ? void 0 : $.provider) != null && B.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(","));
|
|
1568
|
+
const a = await this.getJson("/games", t);
|
|
1569
|
+
return a.ok ? {
|
|
1570
|
+
ok: !0,
|
|
1571
|
+
data: {
|
|
1572
|
+
edges: a.data.data.map((q) => ({
|
|
1573
|
+
node: q,
|
|
1574
|
+
cursor: q.cursor
|
|
1575
|
+
})),
|
|
1576
|
+
totalCount: a.data.totalCount,
|
|
1577
|
+
pageInfo: {
|
|
1578
|
+
hasNextPage: !!a.data.next,
|
|
1579
|
+
endCursor: a.data.next
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
} : a;
|
|
1583
|
+
}
|
|
1584
|
+
async game(e) {
|
|
1585
|
+
var a;
|
|
1586
|
+
const t = await this.getJson(`/games/${e}`);
|
|
1587
|
+
return ((a = t.error) == null ? void 0 : a.name) === "HttpNotFound" ? {
|
|
1588
|
+
ok: !0,
|
|
1589
|
+
data: null
|
|
1590
|
+
} : t.ok ? {
|
|
1591
|
+
ok: !0,
|
|
1592
|
+
data: t.data.data
|
|
1593
|
+
} : t;
|
|
1594
|
+
}
|
|
1595
|
+
async getJson(e, t) {
|
|
1596
|
+
const a = new Request(`${this.url}${e}?${(t == null ? void 0 : t.toString()) ?? ""}`, {
|
|
1597
|
+
method: "GET",
|
|
1598
|
+
headers: {
|
|
1599
|
+
Accept: "application/json",
|
|
1600
|
+
"Content-Type": "application/json",
|
|
1601
|
+
"Site-ID": this.siteId,
|
|
1602
|
+
"Platform-ID": this.platformId
|
|
1603
|
+
}
|
|
1604
|
+
});
|
|
1605
|
+
try {
|
|
1606
|
+
const r = await fetch(a);
|
|
1607
|
+
return r.ok ? {
|
|
1608
|
+
ok: !0,
|
|
1609
|
+
data: await r.json()
|
|
1610
|
+
} : {
|
|
1611
|
+
ok: !1,
|
|
1612
|
+
error: h(r.status)
|
|
1613
|
+
};
|
|
1614
|
+
} catch {
|
|
1615
|
+
return {
|
|
1616
|
+
ok: !1,
|
|
1617
|
+
error: h(500)
|
|
1618
|
+
};
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
class kt {
|
|
1623
|
+
constructor(e) {
|
|
1624
|
+
c(this, "client");
|
|
1550
1625
|
this.client = e;
|
|
1551
1626
|
}
|
|
1627
|
+
/** @deprecated */
|
|
1552
1628
|
async games(e) {
|
|
1553
|
-
const t = await this.client.request(
|
|
1629
|
+
const t = await this.client.request(ge, e);
|
|
1554
1630
|
return t.ok ? { ok: t.ok, data: t.data.games } : t;
|
|
1555
1631
|
}
|
|
1632
|
+
/** @deprecated */
|
|
1556
1633
|
async gamesByName(e) {
|
|
1557
1634
|
const t = await this.client.request(
|
|
1558
|
-
|
|
1635
|
+
Ee,
|
|
1559
1636
|
e
|
|
1560
1637
|
);
|
|
1561
1638
|
return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
|
|
1562
1639
|
}
|
|
1563
1640
|
async gameSession(e) {
|
|
1564
1641
|
const t = await this.client.request(
|
|
1565
|
-
|
|
1642
|
+
xe,
|
|
1566
1643
|
e
|
|
1567
1644
|
);
|
|
1568
1645
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1569
1646
|
}
|
|
1570
1647
|
async createGameSession(e) {
|
|
1571
|
-
const t = await this.client.request(
|
|
1648
|
+
const t = await this.client.request(Se, e);
|
|
1572
1649
|
return t.ok ? t.data.createGameSession ? {
|
|
1573
1650
|
ok: !1,
|
|
1574
|
-
error:
|
|
1651
|
+
error: d(t.data.createGameSession.__typename)
|
|
1575
1652
|
} : {
|
|
1576
1653
|
ok: !0
|
|
1577
1654
|
} : t;
|
|
@@ -1580,37 +1657,37 @@ class At {
|
|
|
1580
1657
|
const t = await this.client.request(Ge, e);
|
|
1581
1658
|
return t.ok ? t.data.endGameSession ? {
|
|
1582
1659
|
ok: !1,
|
|
1583
|
-
error:
|
|
1660
|
+
error: d(t.data.endGameSession.__typename)
|
|
1584
1661
|
} : {
|
|
1585
1662
|
ok: !0
|
|
1586
1663
|
} : t;
|
|
1587
1664
|
}
|
|
1588
1665
|
}
|
|
1589
|
-
class
|
|
1666
|
+
class Tt {
|
|
1590
1667
|
constructor(e) {
|
|
1591
|
-
|
|
1668
|
+
c(this, "client");
|
|
1592
1669
|
this.client = e;
|
|
1593
1670
|
}
|
|
1594
1671
|
async latestBetRecords() {
|
|
1595
|
-
const e = await this.client.request(
|
|
1672
|
+
const e = await this.client.request(ze);
|
|
1596
1673
|
return e.ok ? {
|
|
1597
1674
|
ok: !0,
|
|
1598
1675
|
data: e.data.latestBetRecords
|
|
1599
1676
|
} : e;
|
|
1600
1677
|
}
|
|
1601
1678
|
}
|
|
1602
|
-
function
|
|
1679
|
+
function Ct(n, e, t) {
|
|
1603
1680
|
return n < e ? e : n > t ? t : n;
|
|
1604
1681
|
}
|
|
1605
|
-
function
|
|
1682
|
+
function j(n) {
|
|
1606
1683
|
return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
|
|
1607
1684
|
}
|
|
1608
|
-
function
|
|
1685
|
+
function Nt(n) {
|
|
1609
1686
|
const e = [];
|
|
1610
1687
|
function t(a, r = []) {
|
|
1611
1688
|
for (const s in a) {
|
|
1612
1689
|
const m = a[s];
|
|
1613
|
-
|
|
1690
|
+
j(m) ? t(m, [...r, s]) : Array.isArray(m) ? t(vt(m), [...r, s]) : e.push({
|
|
1614
1691
|
key: [...r, s],
|
|
1615
1692
|
value: m
|
|
1616
1693
|
});
|
|
@@ -1618,14 +1695,14 @@ function _t(n) {
|
|
|
1618
1695
|
}
|
|
1619
1696
|
return t(n), e;
|
|
1620
1697
|
}
|
|
1621
|
-
function
|
|
1698
|
+
function vt(n) {
|
|
1622
1699
|
return n.reduce((e, t, a) => (e[a] = t, e), {});
|
|
1623
1700
|
}
|
|
1624
|
-
class
|
|
1701
|
+
class A {
|
|
1625
1702
|
constructor(e, t) {
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1703
|
+
c(this, "url");
|
|
1704
|
+
c(this, "options");
|
|
1705
|
+
c(this, "middlewares");
|
|
1629
1706
|
var r;
|
|
1630
1707
|
const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
|
|
1631
1708
|
this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
|
|
@@ -1660,13 +1737,13 @@ class E {
|
|
|
1660
1737
|
async exec(e) {
|
|
1661
1738
|
var t, a, r, s, m, u;
|
|
1662
1739
|
try {
|
|
1663
|
-
const
|
|
1664
|
-
if (!
|
|
1665
|
-
return { ok: !1, error:
|
|
1666
|
-
const
|
|
1667
|
-
return f ? ((a = f.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = f.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error:
|
|
1740
|
+
const l = await fetch(e);
|
|
1741
|
+
if (!l.ok)
|
|
1742
|
+
return { ok: !1, error: h(l.status) };
|
|
1743
|
+
const p = await l.json(), y = p.data, f = (t = p.errors) == null ? void 0 : t.at(0);
|
|
1744
|
+
return f ? ((a = f.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = f.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, f.message) } : ((s = f.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, f.message) } : ((m = f.extensions) == null ? void 0 : m.code) === "BAD_USER_INPUT" || ((u = f.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, f.message) } : {
|
|
1668
1745
|
ok: !1,
|
|
1669
|
-
error:
|
|
1746
|
+
error: h(500, f.message)
|
|
1670
1747
|
} : {
|
|
1671
1748
|
ok: !0,
|
|
1672
1749
|
data: y
|
|
@@ -1674,7 +1751,7 @@ class E {
|
|
|
1674
1751
|
} catch {
|
|
1675
1752
|
return {
|
|
1676
1753
|
ok: !1,
|
|
1677
|
-
error:
|
|
1754
|
+
error: h(500)
|
|
1678
1755
|
};
|
|
1679
1756
|
}
|
|
1680
1757
|
}
|
|
@@ -1685,7 +1762,7 @@ class E {
|
|
|
1685
1762
|
return t;
|
|
1686
1763
|
}
|
|
1687
1764
|
createUploadBody(e, t) {
|
|
1688
|
-
const a =
|
|
1765
|
+
const a = Nt(t).filter(
|
|
1689
1766
|
(m) => m.value instanceof File || m.value instanceof Blob
|
|
1690
1767
|
), r = new FormData();
|
|
1691
1768
|
r.append(
|
|
@@ -1703,13 +1780,13 @@ class E {
|
|
|
1703
1780
|
}), r;
|
|
1704
1781
|
}
|
|
1705
1782
|
}
|
|
1706
|
-
async function
|
|
1783
|
+
async function g(n) {
|
|
1707
1784
|
const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
|
|
1708
1785
|
return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
1709
1786
|
}
|
|
1710
|
-
class
|
|
1787
|
+
class _e {
|
|
1711
1788
|
constructor(e) {
|
|
1712
|
-
|
|
1789
|
+
c(this, "enabled");
|
|
1713
1790
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
1714
1791
|
}
|
|
1715
1792
|
info(e) {
|
|
@@ -1725,26 +1802,26 @@ class Ae {
|
|
|
1725
1802
|
this.enabled && console.log(`\x1B[32m[success] ${e}`);
|
|
1726
1803
|
}
|
|
1727
1804
|
}
|
|
1728
|
-
function
|
|
1805
|
+
function K(n) {
|
|
1729
1806
|
return new Date(n.getTime());
|
|
1730
1807
|
}
|
|
1731
|
-
function
|
|
1732
|
-
const t =
|
|
1808
|
+
function W(n, e) {
|
|
1809
|
+
const t = K(n);
|
|
1733
1810
|
return t.setDate(t.getDate() + e), t;
|
|
1734
1811
|
}
|
|
1735
|
-
function
|
|
1736
|
-
const t =
|
|
1812
|
+
function L(n, e) {
|
|
1813
|
+
const t = K(n);
|
|
1737
1814
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
1738
1815
|
}
|
|
1739
|
-
function
|
|
1816
|
+
function we(n, e) {
|
|
1740
1817
|
return n.getTime() > e.getTime();
|
|
1741
1818
|
}
|
|
1742
|
-
function
|
|
1819
|
+
function ke(n) {
|
|
1743
1820
|
return new Promise((e) => {
|
|
1744
1821
|
setTimeout(e, n);
|
|
1745
1822
|
});
|
|
1746
1823
|
}
|
|
1747
|
-
function
|
|
1824
|
+
function ye(n, e) {
|
|
1748
1825
|
const {
|
|
1749
1826
|
until: t,
|
|
1750
1827
|
interval: a = 1e3,
|
|
@@ -1752,32 +1829,32 @@ function fe(n, e) {
|
|
|
1752
1829
|
/**/
|
|
1753
1830
|
} = e;
|
|
1754
1831
|
async function s(m, u) {
|
|
1755
|
-
const
|
|
1756
|
-
return t(
|
|
1832
|
+
const l = u ?? r, p = await n(...m);
|
|
1833
|
+
return t(p) ? p : l > 1 ? (await ke(a * ((r - l) / 2)), s(m, l - 1)) : p;
|
|
1757
1834
|
}
|
|
1758
1835
|
return async (...m) => await s(m);
|
|
1759
1836
|
}
|
|
1760
|
-
function
|
|
1761
|
-
const t =
|
|
1837
|
+
function F(n, e) {
|
|
1838
|
+
const t = K(n);
|
|
1762
1839
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
1763
1840
|
}
|
|
1764
|
-
class
|
|
1841
|
+
class It {
|
|
1765
1842
|
constructor(e) {
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
this.authService = new
|
|
1843
|
+
c(this, "logger");
|
|
1844
|
+
c(this, "storageKey", "session");
|
|
1845
|
+
c(this, "authService");
|
|
1846
|
+
c(this, "walletService");
|
|
1847
|
+
c(this, "_refreshing", !1);
|
|
1848
|
+
this.authService = new Et({
|
|
1772
1849
|
url: e.authUrl,
|
|
1773
1850
|
platform: e.platform
|
|
1774
|
-
}), this.walletService = new
|
|
1775
|
-
new
|
|
1851
|
+
}), this.walletService = new be(
|
|
1852
|
+
new A(e.walletUrl, {
|
|
1776
1853
|
middlewares: [
|
|
1777
1854
|
(t) => (t.headers.set("Platform", e.platform), t.headers.set("Role", "MEMBER"), t)
|
|
1778
1855
|
]
|
|
1779
1856
|
})
|
|
1780
|
-
), this.logger = new
|
|
1857
|
+
), this.logger = new _e({
|
|
1781
1858
|
enabled: e.log ?? !1
|
|
1782
1859
|
});
|
|
1783
1860
|
}
|
|
@@ -1797,28 +1874,28 @@ class vt {
|
|
|
1797
1874
|
}
|
|
1798
1875
|
};
|
|
1799
1876
|
if (e.type === "MAYA") {
|
|
1800
|
-
const s = await
|
|
1801
|
-
until: (
|
|
1877
|
+
const s = await ye(() => this.walletService.mayaSession({ id: e.sessionId }), {
|
|
1878
|
+
until: (p) => {
|
|
1802
1879
|
var y;
|
|
1803
|
-
return
|
|
1880
|
+
return p.ok && ((y = p.data) == null ? void 0 : y.member) != null;
|
|
1804
1881
|
},
|
|
1805
1882
|
interval: 1e3,
|
|
1806
1883
|
maxAttempt: 5
|
|
1807
1884
|
})();
|
|
1808
1885
|
if (!s.ok) return s;
|
|
1809
|
-
const u = await
|
|
1810
|
-
until: (
|
|
1886
|
+
const u = await ye(() => this.authService.createSession(e), {
|
|
1887
|
+
until: (p) => p.ok,
|
|
1811
1888
|
interval: 1e3,
|
|
1812
1889
|
maxAttempt: 5
|
|
1813
1890
|
})();
|
|
1814
1891
|
if (!u.ok) return u;
|
|
1815
|
-
const
|
|
1892
|
+
const l = /* @__PURE__ */ new Date();
|
|
1816
1893
|
return window.localStorage.setItem(
|
|
1817
1894
|
this.storageKey,
|
|
1818
1895
|
JSON.stringify({
|
|
1819
1896
|
...u.data,
|
|
1820
|
-
accessTokenExpiresAt:
|
|
1821
|
-
refreshTokenExpiresAt:
|
|
1897
|
+
accessTokenExpiresAt: L(l, 8).getTime(),
|
|
1898
|
+
refreshTokenExpiresAt: F(W(l, 30), 2).getTime()
|
|
1822
1899
|
})
|
|
1823
1900
|
), {
|
|
1824
1901
|
ok: !0,
|
|
@@ -1833,8 +1910,8 @@ class vt {
|
|
|
1833
1910
|
this.storageKey,
|
|
1834
1911
|
JSON.stringify({
|
|
1835
1912
|
...r.data,
|
|
1836
|
-
accessTokenExpiresAt:
|
|
1837
|
-
refreshTokenExpiresAt:
|
|
1913
|
+
accessTokenExpiresAt: L(s, 8).getTime(),
|
|
1914
|
+
refreshTokenExpiresAt: F(W(s, 30), 2).getTime()
|
|
1838
1915
|
})
|
|
1839
1916
|
), {
|
|
1840
1917
|
ok: !0,
|
|
@@ -1857,8 +1934,8 @@ class vt {
|
|
|
1857
1934
|
this.storageKey,
|
|
1858
1935
|
JSON.stringify({
|
|
1859
1936
|
...t.data,
|
|
1860
|
-
accessTokenExpiresAt:
|
|
1861
|
-
refreshTokenExpiresAt:
|
|
1937
|
+
accessTokenExpiresAt: L(a, 8).getTime(),
|
|
1938
|
+
refreshTokenExpiresAt: F(W(a, 30), 2).getTime()
|
|
1862
1939
|
})
|
|
1863
1940
|
), {
|
|
1864
1941
|
ok: !0,
|
|
@@ -1873,8 +1950,8 @@ class vt {
|
|
|
1873
1950
|
this.storageKey,
|
|
1874
1951
|
JSON.stringify({
|
|
1875
1952
|
...t.data,
|
|
1876
|
-
accessTokenExpiresAt:
|
|
1877
|
-
refreshTokenExpiresAt:
|
|
1953
|
+
accessTokenExpiresAt: L(a, 8).getTime(),
|
|
1954
|
+
refreshTokenExpiresAt: F(W(a, 30), 2).getTime()
|
|
1878
1955
|
})
|
|
1879
1956
|
), { ok: !0 };
|
|
1880
1957
|
} else
|
|
@@ -1887,7 +1964,7 @@ class vt {
|
|
|
1887
1964
|
data: null
|
|
1888
1965
|
};
|
|
1889
1966
|
if (this.refreshing)
|
|
1890
|
-
return await
|
|
1967
|
+
return await ke(1e3), await this.get();
|
|
1891
1968
|
const e = window.localStorage.getItem(this.storageKey);
|
|
1892
1969
|
if (!e)
|
|
1893
1970
|
return {
|
|
@@ -1897,7 +1974,7 @@ class vt {
|
|
|
1897
1974
|
try {
|
|
1898
1975
|
let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
|
|
1899
1976
|
const r = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
|
|
1900
|
-
if (
|
|
1977
|
+
if (we(a, s))
|
|
1901
1978
|
return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
|
|
1902
1979
|
ok: !1,
|
|
1903
1980
|
error: {
|
|
@@ -1905,7 +1982,7 @@ class vt {
|
|
|
1905
1982
|
message: "Session expired."
|
|
1906
1983
|
}
|
|
1907
1984
|
};
|
|
1908
|
-
if (
|
|
1985
|
+
if (we(a, r)) {
|
|
1909
1986
|
this.logger.info("Refreshing session..."), this.refreshing = !0;
|
|
1910
1987
|
const m = await this.authService.refreshSession(t.refreshToken);
|
|
1911
1988
|
if (this.refreshing = !1, !m.ok)
|
|
@@ -1919,8 +1996,8 @@ class vt {
|
|
|
1919
1996
|
this.logger.success("Session refreshed!"), a = /* @__PURE__ */ new Date(), t = {
|
|
1920
1997
|
...t,
|
|
1921
1998
|
...m.data,
|
|
1922
|
-
accessTokenExpiresAt:
|
|
1923
|
-
refreshTokenExpiresAt:
|
|
1999
|
+
accessTokenExpiresAt: L(a, 8).getTime(),
|
|
2000
|
+
refreshTokenExpiresAt: F(W(a, 30), 2).getTime()
|
|
1924
2001
|
}, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
1925
2002
|
}
|
|
1926
2003
|
return {
|
|
@@ -1960,6 +2037,24 @@ class vt {
|
|
|
1960
2037
|
return typeof window > "u";
|
|
1961
2038
|
}
|
|
1962
2039
|
}
|
|
2040
|
+
function w(n) {
|
|
2041
|
+
const e = {};
|
|
2042
|
+
for (const t in n) {
|
|
2043
|
+
const a = n[t];
|
|
2044
|
+
if (a !== null && a !== void 0) {
|
|
2045
|
+
if (j(a)) {
|
|
2046
|
+
e[t] = w(a);
|
|
2047
|
+
continue;
|
|
2048
|
+
}
|
|
2049
|
+
if (Array.isArray(a)) {
|
|
2050
|
+
e[t] = a.map((r) => j(r) ? w(r) : r);
|
|
2051
|
+
continue;
|
|
2052
|
+
}
|
|
2053
|
+
e[t] = a;
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
return e;
|
|
2057
|
+
}
|
|
1963
2058
|
function i(n, e) {
|
|
1964
2059
|
if (typeof n == "number" && !Number.isNaN(n))
|
|
1965
2060
|
return n;
|
|
@@ -1972,14 +2067,15 @@ function i(n, e) {
|
|
|
1972
2067
|
}
|
|
1973
2068
|
class Mt {
|
|
1974
2069
|
constructor(e) {
|
|
1975
|
-
|
|
2070
|
+
c(this, "staticService");
|
|
1976
2071
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
1977
|
-
this.staticService = new
|
|
2072
|
+
this.staticService = new bt({
|
|
1978
2073
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
1979
2074
|
});
|
|
1980
2075
|
}
|
|
1981
2076
|
get transform() {
|
|
1982
2077
|
return {
|
|
2078
|
+
site: this.site.bind(this),
|
|
1983
2079
|
platform: this.platform.bind(this),
|
|
1984
2080
|
account: this.account.bind(this),
|
|
1985
2081
|
wallet: this.wallet.bind(this),
|
|
@@ -1992,7 +2088,9 @@ class Mt {
|
|
|
1992
2088
|
betRecord: this.betRecord.bind(this),
|
|
1993
2089
|
latestBetRecord: this.latestBetRecord.bind(this),
|
|
1994
2090
|
transactionRecord: this.transactionRecord.bind(this),
|
|
2091
|
+
/** @deprecated */
|
|
1995
2092
|
game: this.game.bind(this),
|
|
2093
|
+
game__next: this.game__next.bind(this),
|
|
1996
2094
|
gameSession: this.gameSession.bind(this),
|
|
1997
2095
|
promo: this.promo.bind(this),
|
|
1998
2096
|
cashback: this.cashback.bind(this),
|
|
@@ -2002,8 +2100,16 @@ class Mt {
|
|
|
2002
2100
|
pointsWallet: this.pointsWallet.bind(this)
|
|
2003
2101
|
};
|
|
2004
2102
|
}
|
|
2103
|
+
site(e) {
|
|
2104
|
+
const t = {
|
|
2105
|
+
id: e.id,
|
|
2106
|
+
name: e.name,
|
|
2107
|
+
logo: e.logo ?? void 0
|
|
2108
|
+
};
|
|
2109
|
+
return w(t);
|
|
2110
|
+
}
|
|
2005
2111
|
platform(e) {
|
|
2006
|
-
var t, a, r, s, m, u,
|
|
2112
|
+
var t, a, r, s, m, u, l, p, y, f, b, _, k, T, C, N, v, I, M, D, R, P, x, G, O, U, $, B, q, z, J, X, Z, ee, te, ae, re, ne, oe, ie, se, me, ce, de, ue, le, pe, fe, he;
|
|
2007
2113
|
return {
|
|
2008
2114
|
paymentSettings: {
|
|
2009
2115
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
@@ -2018,78 +2124,78 @@ class Mt {
|
|
|
2018
2124
|
maximumAmount: i((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
|
|
2019
2125
|
},
|
|
2020
2126
|
gcash: {
|
|
2021
|
-
androidEnabled: ((
|
|
2022
|
-
iosEnabled: ((
|
|
2127
|
+
androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
|
|
2128
|
+
iosEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.iosEnabled) ?? !1,
|
|
2023
2129
|
webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
|
|
2024
2130
|
mobileWebEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.mobileWebEnabled) ?? !1,
|
|
2025
|
-
minimumAmount: i((
|
|
2026
|
-
maximumAmount: i((
|
|
2131
|
+
minimumAmount: i((b = e.gcashDepositGatewaySettings) == null ? void 0 : b.minimumAmount),
|
|
2132
|
+
maximumAmount: i((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.maximumAmount)
|
|
2027
2133
|
},
|
|
2028
2134
|
maya: {
|
|
2029
|
-
androidEnabled: ((
|
|
2030
|
-
iosEnabled: ((
|
|
2031
|
-
webEnabled: ((
|
|
2032
|
-
mobileWebEnabled: ((
|
|
2033
|
-
minimumAmount: i((
|
|
2034
|
-
maximumAmount: i((
|
|
2135
|
+
androidEnabled: ((k = e.mayaDepositGatewaySettings) == null ? void 0 : k.androidEnabled) ?? !1,
|
|
2136
|
+
iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
|
|
2137
|
+
webEnabled: ((C = e.mayaDepositGatewaySettings) == null ? void 0 : C.webEnabled) ?? !1,
|
|
2138
|
+
mobileWebEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.mobileWebEnabled) ?? !1,
|
|
2139
|
+
minimumAmount: i((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.minimumAmount),
|
|
2140
|
+
maximumAmount: i((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.maximumAmount)
|
|
2035
2141
|
},
|
|
2036
2142
|
mayaApp: {
|
|
2037
|
-
androidEnabled: ((
|
|
2038
|
-
iosEnabled: ((
|
|
2039
|
-
webEnabled: ((
|
|
2040
|
-
mobileWebEnabled: ((
|
|
2041
|
-
minimumAmount: i((
|
|
2042
|
-
maximumAmount: i((
|
|
2143
|
+
androidEnabled: ((M = e.mayaAppDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
|
|
2144
|
+
iosEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.iosEnabled) ?? !1,
|
|
2145
|
+
webEnabled: ((R = e.mayaAppDepositGatewaySettings) == null ? void 0 : R.webEnabled) ?? !1,
|
|
2146
|
+
mobileWebEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.mobileWebEnabled) ?? !1,
|
|
2147
|
+
minimumAmount: i((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.minimumAmount),
|
|
2148
|
+
maximumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.maximumAmount)
|
|
2043
2149
|
}
|
|
2044
2150
|
},
|
|
2045
2151
|
withdrawalGateway: {
|
|
2046
2152
|
bank: {
|
|
2047
|
-
androidEnabled: ((
|
|
2048
|
-
iosEnabled: ((
|
|
2049
|
-
webEnabled: ((
|
|
2050
|
-
mobileWebEnabled: ((
|
|
2051
|
-
minimumAmount: i((
|
|
2052
|
-
maximumAmount: i((
|
|
2153
|
+
androidEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.androidEnabled) ?? !1,
|
|
2154
|
+
iosEnabled: ((U = e.bankWithdrawalGatewaySettings) == null ? void 0 : U.iosEnabled) ?? !1,
|
|
2155
|
+
webEnabled: (($ = e.bankWithdrawalGatewaySettings) == null ? void 0 : $.webEnabled) ?? !1,
|
|
2156
|
+
mobileWebEnabled: ((B = e.bankWithdrawalGatewaySettings) == null ? void 0 : B.mobileWebEnabled) ?? !1,
|
|
2157
|
+
minimumAmount: i((q = e.bankWithdrawalGatewaySettings) == null ? void 0 : q.minimumAmount),
|
|
2158
|
+
maximumAmount: i((z = e.bankWithdrawalGatewaySettings) == null ? void 0 : z.maximumAmount)
|
|
2053
2159
|
},
|
|
2054
2160
|
gcash: {
|
|
2055
|
-
androidEnabled: ((
|
|
2056
|
-
iosEnabled: ((
|
|
2057
|
-
webEnabled: ((
|
|
2058
|
-
mobileWebEnabled: ((
|
|
2059
|
-
minimumAmount: i((
|
|
2161
|
+
androidEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.androidEnabled) ?? !1,
|
|
2162
|
+
iosEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.iosEnabled) ?? !1,
|
|
2163
|
+
webEnabled: ((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.webEnabled) ?? !1,
|
|
2164
|
+
mobileWebEnabled: ((ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.mobileWebEnabled) ?? !1,
|
|
2165
|
+
minimumAmount: i((te = e.gcashWithdrawalGatewaySettings) == null ? void 0 : te.minimumAmount),
|
|
2060
2166
|
maximumAmount: i(
|
|
2061
|
-
(
|
|
2167
|
+
(ae = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ae.maximumAmount,
|
|
2062
2168
|
1e6
|
|
2063
2169
|
)
|
|
2064
2170
|
},
|
|
2065
2171
|
maya: {
|
|
2066
|
-
androidEnabled: ((
|
|
2067
|
-
iosEnabled: ((
|
|
2068
|
-
webEnabled: ((
|
|
2069
|
-
mobileWebEnabled: ((
|
|
2070
|
-
minimumAmount: i((
|
|
2071
|
-
maximumAmount: i((
|
|
2172
|
+
androidEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.androidEnabled) ?? !1,
|
|
2173
|
+
iosEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.iosEnabled) ?? !1,
|
|
2174
|
+
webEnabled: ((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.webEnabled) ?? !1,
|
|
2175
|
+
mobileWebEnabled: ((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.mobileWebEnabled) ?? !1,
|
|
2176
|
+
minimumAmount: i((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.minimumAmount),
|
|
2177
|
+
maximumAmount: i((me = e.mayaWithdrawalGatewaySettings) == null ? void 0 : me.maximumAmount)
|
|
2072
2178
|
},
|
|
2073
2179
|
mayaApp: {
|
|
2074
|
-
androidEnabled: ((
|
|
2075
|
-
iosEnabled: ((
|
|
2076
|
-
webEnabled: ((
|
|
2077
|
-
mobileWebEnabled: ((
|
|
2078
|
-
minimumAmount: i((
|
|
2180
|
+
androidEnabled: ((ce = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ce.androidEnabled) ?? !1,
|
|
2181
|
+
iosEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.iosEnabled) ?? !1,
|
|
2182
|
+
webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
|
|
2183
|
+
mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
|
|
2184
|
+
minimumAmount: i((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
|
|
2079
2185
|
maximumAmount: i(
|
|
2080
|
-
(
|
|
2186
|
+
(fe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : fe.maximumAmount,
|
|
2081
2187
|
1e6
|
|
2082
2188
|
)
|
|
2083
2189
|
}
|
|
2084
2190
|
}
|
|
2085
2191
|
},
|
|
2086
2192
|
pointsClubSettings: {
|
|
2087
|
-
multiplier: i((
|
|
2193
|
+
multiplier: i((he = e.pointsClubSettings) == null ? void 0 : he.multiplier, 0)
|
|
2088
2194
|
}
|
|
2089
2195
|
};
|
|
2090
2196
|
}
|
|
2091
2197
|
account(e) {
|
|
2092
|
-
|
|
2198
|
+
const t = {
|
|
2093
2199
|
id: e.id,
|
|
2094
2200
|
name: e.name,
|
|
2095
2201
|
status: e.status,
|
|
@@ -2101,7 +2207,7 @@ class Mt {
|
|
|
2101
2207
|
mobileNumber: e.mobileNumber ?? void 0,
|
|
2102
2208
|
mobileNumberVerified: e.mobileNumberVerified ?? !1,
|
|
2103
2209
|
mobileNumberVerificationRequired: e.mobileNumberVerificationRequired ?? !1,
|
|
2104
|
-
validId: e.validId
|
|
2210
|
+
validId: e.validId || void 0,
|
|
2105
2211
|
verificationStatus: e.verificationStatus,
|
|
2106
2212
|
transactionPassword: e.transactionPassword,
|
|
2107
2213
|
secretAnswerSubmitted: e.secretAnswerSubmitted ?? !1,
|
|
@@ -2109,31 +2215,47 @@ class Mt {
|
|
|
2109
2215
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2110
2216
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2111
2217
|
};
|
|
2218
|
+
return w(t);
|
|
2112
2219
|
}
|
|
2113
2220
|
wallet(e) {
|
|
2114
2221
|
return {
|
|
2115
|
-
|
|
2222
|
+
id: e.id,
|
|
2116
2223
|
balance: i(e.balance, 0),
|
|
2224
|
+
currency: e.currency,
|
|
2117
2225
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2118
2226
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2119
2227
|
};
|
|
2120
2228
|
}
|
|
2121
2229
|
verificationDetails(e) {
|
|
2122
2230
|
return {
|
|
2123
|
-
|
|
2231
|
+
id: e.id,
|
|
2232
|
+
status: e.status,
|
|
2233
|
+
address: e.address,
|
|
2234
|
+
nationality: e.nationality,
|
|
2235
|
+
natureOfWork: e.natureOfWork,
|
|
2236
|
+
placeOfBirth: e.placeOfBirth,
|
|
2237
|
+
sourceOfIncome: e.sourceOfIncome,
|
|
2124
2238
|
selfieImage: this.file(e.selfieImage),
|
|
2125
2239
|
idFrontImage: this.file(e.idFrontImage)
|
|
2126
2240
|
};
|
|
2127
2241
|
}
|
|
2128
2242
|
profileCompletion(e) {
|
|
2129
2243
|
return {
|
|
2130
|
-
|
|
2244
|
+
accountPassword: e.accountPassword ?? !1,
|
|
2245
|
+
accountVerification: e.accountVerification ?? !1,
|
|
2246
|
+
mobileNumberVerification: e.mobileNumberVerification ?? !1,
|
|
2247
|
+
personalInformation: e.personalInformation ?? !1,
|
|
2248
|
+
transactionPassword: e.transactionPassword ?? !1,
|
|
2131
2249
|
completionPercentage: i(e, 0)
|
|
2132
2250
|
};
|
|
2133
2251
|
}
|
|
2134
2252
|
announcement(e) {
|
|
2135
2253
|
return {
|
|
2136
|
-
|
|
2254
|
+
id: e.id,
|
|
2255
|
+
type: e.type,
|
|
2256
|
+
title: e.title,
|
|
2257
|
+
status: e.status,
|
|
2258
|
+
message: e.message,
|
|
2137
2259
|
activationEndDateTime: new Date(e.activationEndDateTime),
|
|
2138
2260
|
activationStartDateTime: new Date(e.activationStartDateTime),
|
|
2139
2261
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
@@ -2141,50 +2263,61 @@ class Mt {
|
|
|
2141
2263
|
};
|
|
2142
2264
|
}
|
|
2143
2265
|
withdrawalRecord(e) {
|
|
2144
|
-
|
|
2145
|
-
|
|
2266
|
+
const t = {
|
|
2267
|
+
id: e.id,
|
|
2268
|
+
type: e.type,
|
|
2269
|
+
bank: e.bank,
|
|
2270
|
+
status: e.status,
|
|
2146
2271
|
amount: i(e.amount, 0),
|
|
2147
2272
|
netAmount: i(e.netAmount, 0),
|
|
2148
2273
|
fee: i(e.fee, 0),
|
|
2149
2274
|
reference: e.reference ?? void 0,
|
|
2150
|
-
|
|
2275
|
+
withdrawalNumber: e.withdrawalNumber,
|
|
2151
2276
|
recipientMobileNumber: e.recipientMobileNumber ?? void 0,
|
|
2152
2277
|
dateTimeConfirmed: e.dateTimeConfirmed ? new Date(e.dateTimeConfirmed) : void 0,
|
|
2153
2278
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2154
2279
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2155
2280
|
};
|
|
2281
|
+
return w(t);
|
|
2156
2282
|
}
|
|
2157
2283
|
deposit(e) {
|
|
2158
|
-
|
|
2284
|
+
const t = {
|
|
2159
2285
|
id: e.id,
|
|
2160
2286
|
type: e.type,
|
|
2161
2287
|
status: e.status,
|
|
2162
2288
|
checkoutUrl: e.checkoutUrl ?? void 0
|
|
2163
2289
|
};
|
|
2290
|
+
return w(t);
|
|
2164
2291
|
}
|
|
2165
2292
|
depositRecord(e) {
|
|
2166
|
-
|
|
2167
|
-
|
|
2293
|
+
const t = {
|
|
2294
|
+
id: e.id,
|
|
2295
|
+
type: e.type,
|
|
2296
|
+
status: e.status,
|
|
2168
2297
|
amount: i(e.amount, 0),
|
|
2169
2298
|
fee: i(e.fee, 0),
|
|
2170
2299
|
netAmount: i(e.netAmount, 0),
|
|
2171
2300
|
reference: e.reference ?? void 0,
|
|
2301
|
+
depositNumber: e.depositNumber,
|
|
2172
2302
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2173
2303
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2174
2304
|
};
|
|
2305
|
+
return w(t);
|
|
2175
2306
|
}
|
|
2176
2307
|
betRecord(e) {
|
|
2177
|
-
var
|
|
2178
|
-
|
|
2179
|
-
|
|
2308
|
+
var a;
|
|
2309
|
+
const t = {
|
|
2310
|
+
id: e.id,
|
|
2180
2311
|
bet: i(e.bet, 0),
|
|
2181
2312
|
payout: i(e.payout, 0),
|
|
2313
|
+
status: e.status,
|
|
2182
2314
|
jackpotContribution: i(e.jackpotContribution, 0),
|
|
2183
2315
|
jackpotPayout: i(e.jackpotPayout, 0),
|
|
2184
2316
|
winloss: i(e.winloss),
|
|
2185
2317
|
validBet: i(e.validBet, 0),
|
|
2186
2318
|
vendorRoundId: e.vendorRoundId ?? void 0,
|
|
2187
2319
|
game: this.game(e.game),
|
|
2320
|
+
serialCode: e.serialCode,
|
|
2188
2321
|
dateTimeSettled: e.dateTimeSettled ? new Date(e.dateTimeSettled) : void 0,
|
|
2189
2322
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2190
2323
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated),
|
|
@@ -2192,13 +2325,15 @@ class Mt {
|
|
|
2192
2325
|
contestName: e.contestName ?? void 0,
|
|
2193
2326
|
externalCategory: e.externalCategory ?? void 0,
|
|
2194
2327
|
metadata: {
|
|
2195
|
-
odds: ((
|
|
2328
|
+
odds: ((a = e.metadata) == null ? void 0 : a.odds) ?? void 0
|
|
2196
2329
|
}
|
|
2197
2330
|
};
|
|
2331
|
+
return w(t);
|
|
2198
2332
|
}
|
|
2199
2333
|
latestBetRecord(e) {
|
|
2200
2334
|
return {
|
|
2201
|
-
|
|
2335
|
+
id: e.id,
|
|
2336
|
+
member: e.member,
|
|
2202
2337
|
game: this.game(e.game),
|
|
2203
2338
|
bet: i(e.bet, 0),
|
|
2204
2339
|
payout: i(e.payout, 0),
|
|
@@ -2208,31 +2343,53 @@ class Mt {
|
|
|
2208
2343
|
};
|
|
2209
2344
|
}
|
|
2210
2345
|
transactionRecord(e) {
|
|
2211
|
-
|
|
2212
|
-
|
|
2346
|
+
const t = {
|
|
2347
|
+
id: e.id,
|
|
2348
|
+
type: e.type,
|
|
2213
2349
|
amount: i(e.amount, 0),
|
|
2214
2350
|
content: e.content ?? void 0,
|
|
2215
2351
|
currentBalance: i(e.currentBalance, 0),
|
|
2352
|
+
referenceNumber: e.referenceNumber,
|
|
2216
2353
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2217
2354
|
};
|
|
2355
|
+
return w(t);
|
|
2218
2356
|
}
|
|
2219
2357
|
game(e) {
|
|
2220
|
-
const t = this.staticService.gameThumbnails(e);
|
|
2221
2358
|
return {
|
|
2222
|
-
|
|
2223
|
-
|
|
2359
|
+
id: e.id,
|
|
2360
|
+
type: e.type,
|
|
2361
|
+
name: e.name,
|
|
2362
|
+
images: this.staticService.gameThumbnails(e),
|
|
2363
|
+
provider: e.provider
|
|
2224
2364
|
};
|
|
2225
2365
|
}
|
|
2226
|
-
|
|
2366
|
+
game__next(e) {
|
|
2227
2367
|
return {
|
|
2228
|
-
|
|
2368
|
+
id: e.id,
|
|
2369
|
+
type: e.type,
|
|
2370
|
+
name: e.name,
|
|
2371
|
+
images: this.staticService.gameThumbnails(e),
|
|
2372
|
+
provider: e.provider,
|
|
2373
|
+
externalId: e.externalId
|
|
2374
|
+
};
|
|
2375
|
+
}
|
|
2376
|
+
gameSession(e) {
|
|
2377
|
+
const t = {
|
|
2378
|
+
id: e.id,
|
|
2379
|
+
status: e.status,
|
|
2380
|
+
launchUrl: e.launchUrl ?? void 0,
|
|
2229
2381
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2230
2382
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2231
2383
|
};
|
|
2384
|
+
return w(t);
|
|
2232
2385
|
}
|
|
2233
2386
|
promo(e) {
|
|
2234
2387
|
return {
|
|
2235
|
-
|
|
2388
|
+
id: e.id,
|
|
2389
|
+
type: e.type,
|
|
2390
|
+
name: e.name,
|
|
2391
|
+
status: e.status,
|
|
2392
|
+
description: e.description,
|
|
2236
2393
|
banner: this.file(e.banner),
|
|
2237
2394
|
maximumBonusAmount: i(e.maximumBonusAmount),
|
|
2238
2395
|
minimumBonusAmount: i(e.minimumBonusAmount),
|
|
@@ -2244,7 +2401,10 @@ class Mt {
|
|
|
2244
2401
|
}
|
|
2245
2402
|
cashback(e) {
|
|
2246
2403
|
return {
|
|
2247
|
-
|
|
2404
|
+
id: e.id,
|
|
2405
|
+
name: e.name,
|
|
2406
|
+
description: e.description,
|
|
2407
|
+
status: e.status,
|
|
2248
2408
|
banner: this.file(e.banner),
|
|
2249
2409
|
activationEndDateTime: new Date(e.activationEndDateTime),
|
|
2250
2410
|
activationStartDateTime: new Date(e.activationStartDateTime),
|
|
@@ -2253,12 +2413,12 @@ class Mt {
|
|
|
2253
2413
|
};
|
|
2254
2414
|
}
|
|
2255
2415
|
bonus(e) {
|
|
2256
|
-
|
|
2257
|
-
|
|
2416
|
+
const t = {
|
|
2417
|
+
id: e.id,
|
|
2258
2418
|
promo: this.promo(e.promo),
|
|
2259
|
-
/* deposit here does not have an id and depositNumber field */
|
|
2260
2419
|
deposit: e.deposit ? {
|
|
2261
|
-
|
|
2420
|
+
type: e.deposit.type,
|
|
2421
|
+
status: e.deposit.status,
|
|
2262
2422
|
fee: i(e.deposit.fee, 0),
|
|
2263
2423
|
amount: i(e.deposit.amount, 0),
|
|
2264
2424
|
netAmount: i(e.deposit.netAmount, 0),
|
|
@@ -2281,6 +2441,7 @@ class Mt {
|
|
|
2281
2441
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2282
2442
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2283
2443
|
};
|
|
2444
|
+
return w(t);
|
|
2284
2445
|
}
|
|
2285
2446
|
cashbackBonus(e) {
|
|
2286
2447
|
return {
|
|
@@ -2292,11 +2453,13 @@ class Mt {
|
|
|
2292
2453
|
};
|
|
2293
2454
|
}
|
|
2294
2455
|
file(e) {
|
|
2295
|
-
|
|
2296
|
-
|
|
2456
|
+
const t = {
|
|
2457
|
+
id: e.id,
|
|
2297
2458
|
url: e.url ?? void 0,
|
|
2459
|
+
status: e.status,
|
|
2298
2460
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2299
2461
|
};
|
|
2462
|
+
return w(t);
|
|
2300
2463
|
}
|
|
2301
2464
|
pointsWallet(e) {
|
|
2302
2465
|
return {
|
|
@@ -2307,23 +2470,29 @@ class Mt {
|
|
|
2307
2470
|
};
|
|
2308
2471
|
}
|
|
2309
2472
|
}
|
|
2310
|
-
|
|
2473
|
+
var Dt = { VITE_AUTH_DEVELOPMENT_URL: "https://auth.development.opexa.io", VITE_AUTH_PRODUCTION_URL: "https://auth.opexa.io", VITE_GAME_DEVELOPMENT_URL: "https://game.development.opexa.io/graphql", VITE_GAME_PRODUCTION_URL: "https://game.opexa.io/graphql", VITE_FILE_DEVELOPMENT_URL: "https://file.development.opexa.io/graphql", VITE_FILE_PRODUCTION_URL: "https://file.opexa.io/graphql", VITE_REPORT_DEVELOPMENT_URL: "https://report.development.opexa.io/graphql", VITE_REPORT_PRODUCTION_URL: "https://report.opexa.io/graphql", VITE_WALLET_DEVELOPMENT_URL: "https://wallet.development.opexa.io/graphql", VITE_WALLET_PRODUCTION_URL: "https://wallet.opexa.io/graphql", VITE_ACCOUNT_DEVELOPMENT_URL: "https://account.development.opexa.io/graphql", VITE_ACCOUNT_PRODUCTION_URL: "https://account.opexa.io/graphql", VITE_PORTAL_DEVELOPMENT_URL: "https://portal.development.opexa.io/graphql", VITE_PORTAL_PRODUCTION_URL: "https://portal.opexa.io/graphql", VITE_STATIC_DEVELOPMENT_URL: "https://static.development.opexa.io", VITE_STATIC_PRODUCTION_URL: "https://static.opexa.io", VITE_CMS_PORTAL_DEVELOPMENT_URL: "https://portal-api.opexacms.io/v1", BASE_URL: "/", MODE: "library", DEV: !1, PROD: !0, SSR: !1 };
|
|
2474
|
+
class xt {
|
|
2311
2475
|
constructor(e) {
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2476
|
+
c(this, "gameService");
|
|
2477
|
+
c(this, "fileService");
|
|
2478
|
+
c(this, "walletService");
|
|
2479
|
+
c(this, "reportService");
|
|
2480
|
+
c(this, "portalService");
|
|
2481
|
+
c(this, "accountService");
|
|
2482
|
+
c(this, "cmsPortalService");
|
|
2483
|
+
c(this, "sessionManager");
|
|
2484
|
+
c(this, "transformer");
|
|
2485
|
+
c(this, "logger");
|
|
2321
2486
|
const t = e.environment === "development";
|
|
2322
|
-
this.sessionManager = new
|
|
2487
|
+
this.sessionManager = new It({
|
|
2323
2488
|
authUrl: t ? "https://auth.development.opexa.io" : "https://auth.opexa.io",
|
|
2324
2489
|
walletUrl: t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2325
2490
|
platform: e.platform,
|
|
2326
2491
|
log: e.log
|
|
2492
|
+
}), this.cmsPortalService = new _t({
|
|
2493
|
+
url: t ? "https://portal-api.opexacms.io/v1" : Dt.VITE_CMS_PORTAL_PRODUCTION_URL,
|
|
2494
|
+
site: e.site,
|
|
2495
|
+
platform: e.sitePlatform
|
|
2327
2496
|
});
|
|
2328
2497
|
const a = {
|
|
2329
2498
|
middlewares: [this.authMiddleware],
|
|
@@ -2334,37 +2503,37 @@ class It {
|
|
|
2334
2503
|
}
|
|
2335
2504
|
}
|
|
2336
2505
|
};
|
|
2337
|
-
this.gameService = new
|
|
2338
|
-
new
|
|
2506
|
+
this.gameService = new kt(
|
|
2507
|
+
new A(
|
|
2339
2508
|
t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
|
|
2340
2509
|
a
|
|
2341
2510
|
)
|
|
2342
|
-
), this.fileService = new
|
|
2343
|
-
new
|
|
2511
|
+
), this.fileService = new St(
|
|
2512
|
+
new A(
|
|
2344
2513
|
t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
|
|
2345
2514
|
a
|
|
2346
2515
|
)
|
|
2347
|
-
), this.walletService = new
|
|
2348
|
-
new
|
|
2516
|
+
), this.walletService = new be(
|
|
2517
|
+
new A(
|
|
2349
2518
|
t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2350
2519
|
a
|
|
2351
2520
|
)
|
|
2352
|
-
), this.reportService = new
|
|
2353
|
-
new
|
|
2521
|
+
), this.reportService = new At(
|
|
2522
|
+
new A(
|
|
2354
2523
|
t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
|
|
2355
2524
|
a
|
|
2356
2525
|
)
|
|
2357
|
-
), this.accountService = new
|
|
2358
|
-
new
|
|
2526
|
+
), this.accountService = new gt(
|
|
2527
|
+
new A(
|
|
2359
2528
|
t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
|
|
2360
2529
|
a
|
|
2361
2530
|
)
|
|
2362
|
-
), this.portalService = new
|
|
2363
|
-
new
|
|
2531
|
+
), this.portalService = new Tt(
|
|
2532
|
+
new A(
|
|
2364
2533
|
t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
|
|
2365
2534
|
a
|
|
2366
2535
|
)
|
|
2367
|
-
), this.transformer = new Mt(e), this.logger = new
|
|
2536
|
+
), this.transformer = new Mt(e), this.logger = new _e({
|
|
2368
2537
|
enabled: e.log ?? !1
|
|
2369
2538
|
});
|
|
2370
2539
|
}
|
|
@@ -2380,7 +2549,7 @@ class It {
|
|
|
2380
2549
|
case "NAME_AND_PASSWORD": {
|
|
2381
2550
|
const t = await this.sessionManager.create({
|
|
2382
2551
|
...e,
|
|
2383
|
-
password: await
|
|
2552
|
+
password: await g(e.password)
|
|
2384
2553
|
});
|
|
2385
2554
|
return t.ok ? t.data ? {
|
|
2386
2555
|
ok: !0,
|
|
@@ -2440,7 +2609,7 @@ class It {
|
|
|
2440
2609
|
return await this.sessionManager.createFromAuthenticator({
|
|
2441
2610
|
type: "SECURITY_QUESTION",
|
|
2442
2611
|
token: e.token,
|
|
2443
|
-
secretAnswer: await
|
|
2612
|
+
secretAnswer: await g(e.secretAnswer)
|
|
2444
2613
|
});
|
|
2445
2614
|
default:
|
|
2446
2615
|
return {
|
|
@@ -2480,7 +2649,7 @@ class It {
|
|
|
2480
2649
|
* ```
|
|
2481
2650
|
*/
|
|
2482
2651
|
watchSession(e) {
|
|
2483
|
-
const t =
|
|
2652
|
+
const t = Ct(e.interval ?? 3e4, 3e4, 6e4);
|
|
2484
2653
|
let a = null;
|
|
2485
2654
|
const r = () => setTimeout(async () => {
|
|
2486
2655
|
await this.sessionManager.verify() || await e.onInvalid(), a = r();
|
|
@@ -2499,11 +2668,23 @@ class It {
|
|
|
2499
2668
|
} : null
|
|
2500
2669
|
} : e;
|
|
2501
2670
|
}
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2671
|
+
/**/
|
|
2672
|
+
/*+----------------------------------------+*/
|
|
2673
|
+
/*+ SITE +*/
|
|
2674
|
+
/*+----------------------------------------+*/
|
|
2675
|
+
/**/
|
|
2676
|
+
async site() {
|
|
2677
|
+
const e = await this.cmsPortalService.self();
|
|
2678
|
+
return e.ok ? {
|
|
2679
|
+
ok: !0,
|
|
2680
|
+
data: this.transformer.transform.site(e.data)
|
|
2681
|
+
} : e;
|
|
2682
|
+
}
|
|
2683
|
+
/**/
|
|
2684
|
+
/*+----------------------------------------+*/
|
|
2685
|
+
/*+ PLATFORM +*/
|
|
2686
|
+
/*+----------------------------------------+*/
|
|
2687
|
+
/**/
|
|
2507
2688
|
async platform() {
|
|
2508
2689
|
const e = await this.accountService.platform();
|
|
2509
2690
|
return e.ok ? {
|
|
@@ -2511,11 +2692,11 @@ class It {
|
|
|
2511
2692
|
data: this.transformer.transform.platform(e.data)
|
|
2512
2693
|
} : e;
|
|
2513
2694
|
}
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2695
|
+
/**/
|
|
2696
|
+
/*+----------------------------------------+*/
|
|
2697
|
+
/*+ ACCOUNT +*/
|
|
2698
|
+
/*+----------------------------------------+*/
|
|
2699
|
+
/**/
|
|
2519
2700
|
async account() {
|
|
2520
2701
|
const [e, t] = await Promise.all([
|
|
2521
2702
|
this.accountService.memberAccount(),
|
|
@@ -2551,12 +2732,12 @@ class It {
|
|
|
2551
2732
|
* ```
|
|
2552
2733
|
*/
|
|
2553
2734
|
async createAccount(e) {
|
|
2554
|
-
const t = e.id ??
|
|
2735
|
+
const t = e.id ?? E.generate(S.Account).toString(), a = await this.accountService.registerMemberAccount({
|
|
2555
2736
|
input: {
|
|
2556
2737
|
id: t,
|
|
2557
2738
|
name: e.name,
|
|
2558
2739
|
birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
|
|
2559
|
-
password: await
|
|
2740
|
+
password: await g(e.password),
|
|
2560
2741
|
mobileNumber: this.addAreaCode(e.mobileNumber),
|
|
2561
2742
|
domain: e.domain,
|
|
2562
2743
|
btag: e.referralCode
|
|
@@ -2587,12 +2768,12 @@ class It {
|
|
|
2587
2768
|
id: e,
|
|
2588
2769
|
data: {
|
|
2589
2770
|
...t,
|
|
2590
|
-
password: t.password ? await
|
|
2591
|
-
transactionPassword: t.transactionPassword ? await
|
|
2771
|
+
password: t.password ? await g(t.password) : void 0,
|
|
2772
|
+
transactionPassword: t.transactionPassword ? await g(t.transactionPassword) : void 0,
|
|
2592
2773
|
...t.mobileNumber && {
|
|
2593
2774
|
mobileNumber: this.addAreaCode(t.mobileNumber)
|
|
2594
2775
|
},
|
|
2595
|
-
secretAnswer: t.secretAnswer ? await
|
|
2776
|
+
secretAnswer: t.secretAnswer ? await g(t.secretAnswer) : void 0
|
|
2596
2777
|
}
|
|
2597
2778
|
}
|
|
2598
2779
|
});
|
|
@@ -2633,7 +2814,7 @@ class It {
|
|
|
2633
2814
|
* ```
|
|
2634
2815
|
*/
|
|
2635
2816
|
async submitVerificationDetails(e) {
|
|
2636
|
-
const t = e.id ??
|
|
2817
|
+
const t = e.id ?? E.generate(S.Verification).toString(), a = await this.accountService.createMemberVerification({
|
|
2637
2818
|
input: {
|
|
2638
2819
|
id: t,
|
|
2639
2820
|
...e
|
|
@@ -2670,7 +2851,7 @@ class It {
|
|
|
2670
2851
|
return await this.accountService.resetPassword({
|
|
2671
2852
|
input: {
|
|
2672
2853
|
mobileNumber: this.addAreaCode(e.mobileNumber),
|
|
2673
|
-
newPassword: await
|
|
2854
|
+
newPassword: await g(e.newPassword)
|
|
2674
2855
|
},
|
|
2675
2856
|
verificationCode: e.verificationCode
|
|
2676
2857
|
});
|
|
@@ -2704,11 +2885,11 @@ class It {
|
|
|
2704
2885
|
data: e.data ? this.transformer.transform.wallet(e.data) : null
|
|
2705
2886
|
} : e;
|
|
2706
2887
|
}
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2888
|
+
/**/
|
|
2889
|
+
/*+----------------------------------------+*/
|
|
2890
|
+
/*+ ANNOUNCEMENT +*/
|
|
2891
|
+
/*+----------------------------------------+*/
|
|
2892
|
+
/**/
|
|
2712
2893
|
async announcements(e) {
|
|
2713
2894
|
const t = await this.accountService.announcements({
|
|
2714
2895
|
...e,
|
|
@@ -2734,11 +2915,11 @@ class It {
|
|
|
2734
2915
|
}
|
|
2735
2916
|
} : t;
|
|
2736
2917
|
}
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2918
|
+
/**/
|
|
2919
|
+
/*+----------------------------------------+*/
|
|
2920
|
+
/*+ WITHDRAWAL +*/
|
|
2921
|
+
/*+----------------------------------------+*/
|
|
2922
|
+
/**/
|
|
2742
2923
|
/**
|
|
2743
2924
|
* @example
|
|
2744
2925
|
* ```ts
|
|
@@ -2757,13 +2938,13 @@ class It {
|
|
|
2757
2938
|
* ```
|
|
2758
2939
|
*/
|
|
2759
2940
|
async createWithdrawal(e) {
|
|
2760
|
-
const t = e.id ??
|
|
2941
|
+
const t = e.id ?? E.generate(S.Withdrawal).toString();
|
|
2761
2942
|
if (e.type === "BANK") {
|
|
2762
2943
|
const a = await this.walletService.createBankWithdrawal({
|
|
2763
2944
|
input: {
|
|
2764
2945
|
id: t,
|
|
2765
2946
|
amount: e.amount.toString(),
|
|
2766
|
-
transactionPassword: await
|
|
2947
|
+
transactionPassword: await g(e.transactionPassword)
|
|
2767
2948
|
}
|
|
2768
2949
|
});
|
|
2769
2950
|
if (!a.ok) return a;
|
|
@@ -2773,7 +2954,7 @@ class It {
|
|
|
2773
2954
|
input: {
|
|
2774
2955
|
id: t,
|
|
2775
2956
|
amount: e.amount.toString(),
|
|
2776
|
-
transactionPassword: await
|
|
2957
|
+
transactionPassword: await g(e.transactionPassword),
|
|
2777
2958
|
recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
|
|
2778
2959
|
}
|
|
2779
2960
|
});
|
|
@@ -2784,7 +2965,7 @@ class It {
|
|
|
2784
2965
|
input: {
|
|
2785
2966
|
id: t,
|
|
2786
2967
|
amount: e.amount.toString(),
|
|
2787
|
-
transactionPassword: await
|
|
2968
|
+
transactionPassword: await g(e.transactionPassword),
|
|
2788
2969
|
recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
|
|
2789
2970
|
}
|
|
2790
2971
|
});
|
|
@@ -2795,7 +2976,7 @@ class It {
|
|
|
2795
2976
|
input: {
|
|
2796
2977
|
id: t,
|
|
2797
2978
|
amount: e.amount.toString(),
|
|
2798
|
-
transactionPassword: await
|
|
2979
|
+
transactionPassword: await g(e.transactionPassword)
|
|
2799
2980
|
}
|
|
2800
2981
|
});
|
|
2801
2982
|
if (!a.ok) return a;
|
|
@@ -2820,11 +3001,11 @@ class It {
|
|
|
2820
3001
|
async remainingDailyWithdrawalsCount() {
|
|
2821
3002
|
return await this.walletService.remainingDailyWithdrawalsCount();
|
|
2822
3003
|
}
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
3004
|
+
/**/
|
|
3005
|
+
/*+----------------------------------------+*/
|
|
3006
|
+
/*+ DEPOSIT +*/
|
|
3007
|
+
/*+----------------------------------------+*/
|
|
3008
|
+
/**/
|
|
2828
3009
|
/**
|
|
2829
3010
|
* @example
|
|
2830
3011
|
* ```ts
|
|
@@ -2843,7 +3024,7 @@ class It {
|
|
|
2843
3024
|
* ```
|
|
2844
3025
|
*/
|
|
2845
3026
|
async createDeposit(e) {
|
|
2846
|
-
const t = e.id ??
|
|
3027
|
+
const t = e.id ?? E.generate(S.Deposit).toString();
|
|
2847
3028
|
if (e.type === "MAYA") {
|
|
2848
3029
|
const a = await this.walletService.createMayaDeposit({
|
|
2849
3030
|
input: {
|
|
@@ -2901,11 +3082,11 @@ class It {
|
|
|
2901
3082
|
async depositsCount() {
|
|
2902
3083
|
return await this.reportService.depositsCount();
|
|
2903
3084
|
}
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
3085
|
+
/**/
|
|
3086
|
+
/*+----------------------------------------+*/
|
|
3087
|
+
/*+ BET +*/
|
|
3088
|
+
/*+----------------------------------------+*/
|
|
3089
|
+
/**/
|
|
2909
3090
|
async betRecords(e) {
|
|
2910
3091
|
const t = await this.reportService.betRecords(e);
|
|
2911
3092
|
return t.ok ? {
|
|
@@ -2928,11 +3109,11 @@ class It {
|
|
|
2928
3109
|
data: e.data.map(this.transformer.transform.latestBetRecord)
|
|
2929
3110
|
} : e;
|
|
2930
3111
|
}
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
3112
|
+
/**/
|
|
3113
|
+
/*+----------------------------------------+*/
|
|
3114
|
+
/*+ TRANSACTION +*/
|
|
3115
|
+
/*+----------------------------------------+*/
|
|
3116
|
+
/**/
|
|
2936
3117
|
async transactionRecords(e) {
|
|
2937
3118
|
const t = await this.reportService.transactionRecords(e);
|
|
2938
3119
|
return t.ok ? {
|
|
@@ -2948,11 +3129,11 @@ class It {
|
|
|
2948
3129
|
}
|
|
2949
3130
|
} : t;
|
|
2950
3131
|
}
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
3132
|
+
/**/
|
|
3133
|
+
/*+----------------------------------------+*/
|
|
3134
|
+
/*+ PROMO +*/
|
|
3135
|
+
/*+----------------------------------------+*/
|
|
3136
|
+
/**/
|
|
2956
3137
|
async promos() {
|
|
2957
3138
|
const e = await this.walletService.promos();
|
|
2958
3139
|
return e.ok ? {
|
|
@@ -2991,11 +3172,23 @@ class It {
|
|
|
2991
3172
|
async claimCashbackBonus(e) {
|
|
2992
3173
|
return await this.walletService.claimCashbackBonus({ input: { id: e } });
|
|
2993
3174
|
}
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
3175
|
+
/**/
|
|
3176
|
+
/*+----------------------------------------+*/
|
|
3177
|
+
/*+ GAME +*/
|
|
3178
|
+
/*+----------------------------------------+*/
|
|
3179
|
+
/**/
|
|
3180
|
+
/** @deprecated use `game__next` */
|
|
3181
|
+
async game(e) {
|
|
3182
|
+
return this.game__next(e);
|
|
3183
|
+
}
|
|
3184
|
+
async game__next(e) {
|
|
3185
|
+
const t = await this.cmsPortalService.game(e);
|
|
3186
|
+
return t.ok ? {
|
|
3187
|
+
ok: !0,
|
|
3188
|
+
data: t.data ? this.transformer.transform.game__next(t.data) : null
|
|
3189
|
+
} : t;
|
|
3190
|
+
}
|
|
3191
|
+
/** @deprecated use `games__next` */
|
|
2999
3192
|
async games(e) {
|
|
3000
3193
|
const t = await this.walletService.games(e);
|
|
3001
3194
|
return t.ok ? {
|
|
@@ -3011,6 +3204,22 @@ class It {
|
|
|
3011
3204
|
}
|
|
3012
3205
|
} : t;
|
|
3013
3206
|
}
|
|
3207
|
+
async games__next(e) {
|
|
3208
|
+
const t = await this.cmsPortalService.games(e);
|
|
3209
|
+
return t.ok ? {
|
|
3210
|
+
ok: !0,
|
|
3211
|
+
data: {
|
|
3212
|
+
games: t.data.edges.map(({ cursor: a, node: r }) => ({
|
|
3213
|
+
...this.transformer.transform.game__next(r),
|
|
3214
|
+
cursor: a
|
|
3215
|
+
})),
|
|
3216
|
+
totalCount: t.data.totalCount,
|
|
3217
|
+
hasNextPage: t.data.pageInfo.hasNextPage,
|
|
3218
|
+
endCursor: t.data.pageInfo.endCursor ?? void 0
|
|
3219
|
+
}
|
|
3220
|
+
} : t;
|
|
3221
|
+
}
|
|
3222
|
+
/** @deprecated use `games__next` */
|
|
3014
3223
|
async games__legacy(e) {
|
|
3015
3224
|
const t = await this.gameService.games(e);
|
|
3016
3225
|
return t.ok ? {
|
|
@@ -3026,6 +3235,7 @@ class It {
|
|
|
3026
3235
|
}
|
|
3027
3236
|
} : t;
|
|
3028
3237
|
}
|
|
3238
|
+
/** @deprecated use `games__next` */
|
|
3029
3239
|
async gamesByName(e) {
|
|
3030
3240
|
const t = await this.walletService.gamesByName(e);
|
|
3031
3241
|
return t.ok ? {
|
|
@@ -3033,6 +3243,7 @@ class It {
|
|
|
3033
3243
|
data: t.data.map(this.transformer.transform.game)
|
|
3034
3244
|
} : t;
|
|
3035
3245
|
}
|
|
3246
|
+
/** @deprecated use `games__next` */
|
|
3036
3247
|
async gamesByName__legacy(e) {
|
|
3037
3248
|
const t = await this.gameService.gamesByName(e);
|
|
3038
3249
|
return t.ok ? {
|
|
@@ -3040,6 +3251,7 @@ class It {
|
|
|
3040
3251
|
data: t.data.map(this.transformer.transform.game)
|
|
3041
3252
|
} : t;
|
|
3042
3253
|
}
|
|
3254
|
+
/** @deprecated use `gameSession__next` */
|
|
3043
3255
|
async gameSession(e) {
|
|
3044
3256
|
const t = await this.walletService.gameSession({ id: e });
|
|
3045
3257
|
return t.ok ? {
|
|
@@ -3047,6 +3259,7 @@ class It {
|
|
|
3047
3259
|
data: t.data ? this.transformer.transform.gameSession(t.data) : null
|
|
3048
3260
|
} : t;
|
|
3049
3261
|
}
|
|
3262
|
+
/** @deprecated use `gameSession__next` */
|
|
3050
3263
|
async gameSession__legacy(e) {
|
|
3051
3264
|
const t = await this.gameService.gameSession({ id: e });
|
|
3052
3265
|
return t.ok ? {
|
|
@@ -3057,7 +3270,22 @@ class It {
|
|
|
3057
3270
|
}) : null
|
|
3058
3271
|
} : t;
|
|
3059
3272
|
}
|
|
3273
|
+
async gameSession__next(e) {
|
|
3274
|
+
const t = await this.walletService.gameSession({ id: e });
|
|
3275
|
+
if (!t.ok) return t;
|
|
3276
|
+
if (t.data)
|
|
3277
|
+
return {
|
|
3278
|
+
ok: !0,
|
|
3279
|
+
data: this.transformer.transform.gameSession(t.data)
|
|
3280
|
+
};
|
|
3281
|
+
const a = await this.walletService.gameSession({ id: e });
|
|
3282
|
+
return a.ok ? {
|
|
3283
|
+
ok: !0,
|
|
3284
|
+
data: a.data ? this.transformer.transform.gameSession(a.data) : null
|
|
3285
|
+
} : a;
|
|
3286
|
+
}
|
|
3060
3287
|
/**
|
|
3288
|
+
* @deprecated use `createGameSession__next`
|
|
3061
3289
|
* @example
|
|
3062
3290
|
* ```ts
|
|
3063
3291
|
* const res = await sdk.createGameSession({
|
|
@@ -3073,34 +3301,58 @@ class It {
|
|
|
3073
3301
|
* ```
|
|
3074
3302
|
*/
|
|
3075
3303
|
async createGameSession(e) {
|
|
3076
|
-
const t = e.id ??
|
|
3077
|
-
input: {
|
|
3078
|
-
id: t,
|
|
3079
|
-
game: e.game
|
|
3080
|
-
}
|
|
3081
|
-
});
|
|
3304
|
+
const t = e.id ?? E.generate(S.GameSession).toString(), a = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
|
|
3082
3305
|
return a.ok ? { ok: !0, data: { id: t } } : a;
|
|
3083
3306
|
}
|
|
3307
|
+
/** @deprecated use `createGameSession__next` */
|
|
3084
3308
|
async createGameSession__legacy(e) {
|
|
3085
|
-
const t = e.id ??
|
|
3086
|
-
input: {
|
|
3087
|
-
id: t,
|
|
3088
|
-
game: e.game
|
|
3089
|
-
}
|
|
3090
|
-
});
|
|
3309
|
+
const t = e.id ?? E.generate(S.GameSession).toString(), a = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
|
|
3091
3310
|
return a.ok ? { ok: !0, data: { id: t } } : a;
|
|
3092
3311
|
}
|
|
3312
|
+
async createGameSession__next(e) {
|
|
3313
|
+
const t = await this.game__next(e.game);
|
|
3314
|
+
if (!t.data)
|
|
3315
|
+
return {
|
|
3316
|
+
ok: !1,
|
|
3317
|
+
error: {
|
|
3318
|
+
name: "GameDoesNotExistError",
|
|
3319
|
+
message: "Game does not exist"
|
|
3320
|
+
}
|
|
3321
|
+
};
|
|
3322
|
+
const {
|
|
3323
|
+
/**/
|
|
3324
|
+
type: a,
|
|
3325
|
+
provider: r,
|
|
3326
|
+
externalId: s
|
|
3327
|
+
} = t.data, m = a === "SPORTS" ? e.id ?? (await E.generateFromKey(S.Game, `SPORTS:${r}`)).toString() : e.id ?? E.generate(S.GameSession).toString(), l = [
|
|
3328
|
+
/**/
|
|
3329
|
+
"RTG",
|
|
3330
|
+
"DARWIN",
|
|
3331
|
+
"DRBINGO",
|
|
3332
|
+
"MEGABALL",
|
|
3333
|
+
"EVOLUTION",
|
|
3334
|
+
"EVOLUTION_NETENT",
|
|
3335
|
+
"EVOLUTION_REDTIGER"
|
|
3336
|
+
].includes(r) ? await this.walletService.createGameSession({ input: { id: m, game: s } }) : await this.gameService.createGameSession({ input: { id: m, game: s } });
|
|
3337
|
+
return l.ok ? { ok: !0, data: { id: m } } : l;
|
|
3338
|
+
}
|
|
3339
|
+
/** @deprecated use `endGameSession__next` */
|
|
3093
3340
|
async endGameSession(e) {
|
|
3094
3341
|
return await this.walletService.endGameSession({ input: { id: e } });
|
|
3095
3342
|
}
|
|
3343
|
+
/** @deprecated use `endGameSession__next` */
|
|
3096
3344
|
async endGameSession__legacy(e) {
|
|
3097
3345
|
return await this.gameService.endGameSession({ input: { id: e } });
|
|
3098
3346
|
}
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3347
|
+
async endGameSession__next(e) {
|
|
3348
|
+
const t = await this.walletService.endGameSession({ input: { id: e } });
|
|
3349
|
+
return t.ok ? t : await this.gameService.endGameSession({ input: { id: e } });
|
|
3350
|
+
}
|
|
3351
|
+
/**/
|
|
3352
|
+
/*+----------------------------------------+*/
|
|
3353
|
+
/*+ FILE +*/
|
|
3354
|
+
/*+----------------------------------------+*/
|
|
3355
|
+
/**/
|
|
3104
3356
|
async file(e) {
|
|
3105
3357
|
const t = await this.fileService.file({ id: e });
|
|
3106
3358
|
return t.ok ? {
|
|
@@ -3124,7 +3376,7 @@ class It {
|
|
|
3124
3376
|
* ```
|
|
3125
3377
|
*/
|
|
3126
3378
|
async uploadImageFile(e) {
|
|
3127
|
-
const t = e.id ??
|
|
3379
|
+
const t = e.id ?? E.generate(S.File).toString(), a = await this.fileService.uploadPrivateImageFile({
|
|
3128
3380
|
input: {
|
|
3129
3381
|
id: t,
|
|
3130
3382
|
file: e.file
|
|
@@ -3132,11 +3384,11 @@ class It {
|
|
|
3132
3384
|
});
|
|
3133
3385
|
return a.ok ? { ok: !0, data: { id: t } } : a;
|
|
3134
3386
|
}
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3387
|
+
/**/
|
|
3388
|
+
/*+----------------------------------------+*/
|
|
3389
|
+
/*+ POINTS +*/
|
|
3390
|
+
/*+----------------------------------------+*/
|
|
3391
|
+
/**/
|
|
3140
3392
|
async pointsWallet() {
|
|
3141
3393
|
const e = await this.walletService.pointsWallet();
|
|
3142
3394
|
return e.ok ? {
|
|
@@ -3156,8 +3408,8 @@ class It {
|
|
|
3156
3408
|
}
|
|
3157
3409
|
}
|
|
3158
3410
|
export {
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3411
|
+
Ut as ObjectId,
|
|
3412
|
+
S as ObjectType,
|
|
3413
|
+
xt as Sdk
|
|
3162
3414
|
};
|
|
3163
3415
|
//# sourceMappingURL=index.mjs.map
|