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