@opexa/portal-sdk 0.0.22 → 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 +77 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +665 -433
- 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/game.service.d.ts +2 -2
- package/dist/services/queries.d.ts +1 -0
- package/dist/services/types.d.ts +38 -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
|
|
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
|
-
`, De =
|
|
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,26 @@ 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
|
+
query GameSession($id: ObjectId!) {
|
|
143
|
+
node(id: $id) {
|
|
144
|
+
... on GameSession {
|
|
145
|
+
id
|
|
146
|
+
game {
|
|
147
|
+
id
|
|
148
|
+
}
|
|
149
|
+
status
|
|
150
|
+
launchUrl
|
|
151
|
+
dateTimeCreated
|
|
152
|
+
dateTimeLastUpdated
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
`, xe = n`
|
|
142
157
|
mutation EndGameSession($input: EndGameSessionInput!) {
|
|
143
158
|
endGameSession(input: $input) {
|
|
144
159
|
... on GameSessionDoesNotExistError {
|
|
@@ -152,7 +167,7 @@ const C = o`
|
|
|
152
167
|
}
|
|
153
168
|
}
|
|
154
169
|
}
|
|
155
|
-
`,
|
|
170
|
+
`, Ue = n`
|
|
156
171
|
query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
|
|
157
172
|
announcements(first: $first, after: $after, filter: $filter) {
|
|
158
173
|
edges {
|
|
@@ -178,7 +193,7 @@ const C = o`
|
|
|
178
193
|
}
|
|
179
194
|
}
|
|
180
195
|
}
|
|
181
|
-
`,
|
|
196
|
+
`, Oe = n`
|
|
182
197
|
query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
|
|
183
198
|
member {
|
|
184
199
|
withdrawalRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -245,7 +260,7 @@ const C = o`
|
|
|
245
260
|
}
|
|
246
261
|
}
|
|
247
262
|
}
|
|
248
|
-
`,
|
|
263
|
+
`, $e = n`
|
|
249
264
|
mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
|
|
250
265
|
createGCashWithdrawal(input: $input) {
|
|
251
266
|
... on AccountNotVerifiedError {
|
|
@@ -268,7 +283,7 @@ const C = o`
|
|
|
268
283
|
}
|
|
269
284
|
}
|
|
270
285
|
}
|
|
271
|
-
`,
|
|
286
|
+
`, qe = n`
|
|
272
287
|
mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
|
|
273
288
|
createMayaWithdrawal(input: $input) {
|
|
274
289
|
... on AccountNotVerifiedError {
|
|
@@ -291,7 +306,7 @@ const C = o`
|
|
|
291
306
|
}
|
|
292
307
|
}
|
|
293
308
|
}
|
|
294
|
-
`, Be =
|
|
309
|
+
`, Be = n`
|
|
295
310
|
mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
|
|
296
311
|
createMayaAppWithdrawal(input: $input) {
|
|
297
312
|
... on AccountNotVerifiedError {
|
|
@@ -311,7 +326,7 @@ const C = o`
|
|
|
311
326
|
}
|
|
312
327
|
}
|
|
313
328
|
}
|
|
314
|
-
`, We =
|
|
329
|
+
`, We = n`
|
|
315
330
|
mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
|
|
316
331
|
createBankWithdrawal(input: $input) {
|
|
317
332
|
... on MobileNumberNotVerifiedError {
|
|
@@ -334,11 +349,11 @@ const C = o`
|
|
|
334
349
|
}
|
|
335
350
|
}
|
|
336
351
|
}
|
|
337
|
-
`,
|
|
352
|
+
`, Le = n`
|
|
338
353
|
query RemainingDailyWithdrawalsCount {
|
|
339
354
|
remainingDailyWithdrawalsCount
|
|
340
355
|
}
|
|
341
|
-
`,
|
|
356
|
+
`, Fe = n`
|
|
342
357
|
query DepositRecords($after: Cursor, $first: Int, $filter: DepositRecordFilterInput) {
|
|
343
358
|
member {
|
|
344
359
|
depositRecords(after: $after, first: $first, filter: $filter) {
|
|
@@ -367,7 +382,7 @@ const C = o`
|
|
|
367
382
|
}
|
|
368
383
|
}
|
|
369
384
|
}
|
|
370
|
-
`,
|
|
385
|
+
`, Ve = n`
|
|
371
386
|
mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
|
|
372
387
|
createGCashDeposit(input: $input) {
|
|
373
388
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -396,7 +411,7 @@ const C = o`
|
|
|
396
411
|
}
|
|
397
412
|
}
|
|
398
413
|
}
|
|
399
|
-
`,
|
|
414
|
+
`, je = n`
|
|
400
415
|
mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
|
|
401
416
|
createMayaDeposit(input: $input) {
|
|
402
417
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -425,7 +440,7 @@ const C = o`
|
|
|
425
440
|
}
|
|
426
441
|
}
|
|
427
442
|
}
|
|
428
|
-
`,
|
|
443
|
+
`, Ye = n`
|
|
429
444
|
mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
|
|
430
445
|
createMayaAppDeposit(input: $input) {
|
|
431
446
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -454,7 +469,7 @@ const C = o`
|
|
|
454
469
|
}
|
|
455
470
|
}
|
|
456
471
|
}
|
|
457
|
-
`,
|
|
472
|
+
`, He = n`
|
|
458
473
|
query Deposit($id: ObjectId!) {
|
|
459
474
|
node(id: $id) {
|
|
460
475
|
... on GCashDeposit {
|
|
@@ -486,14 +501,14 @@ const C = o`
|
|
|
486
501
|
}
|
|
487
502
|
}
|
|
488
503
|
}
|
|
489
|
-
`,
|
|
504
|
+
`, Qe = n`
|
|
490
505
|
query DepositsCount {
|
|
491
506
|
member {
|
|
492
507
|
depositsCount
|
|
493
508
|
}
|
|
494
509
|
}
|
|
495
|
-
`,
|
|
496
|
-
${
|
|
510
|
+
`, Ke = n`
|
|
511
|
+
${H}
|
|
497
512
|
|
|
498
513
|
query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
|
|
499
514
|
member {
|
|
@@ -532,7 +547,7 @@ const C = o`
|
|
|
532
547
|
}
|
|
533
548
|
}
|
|
534
549
|
}
|
|
535
|
-
`,
|
|
550
|
+
`, ze = n`
|
|
536
551
|
query LatestBetRecords {
|
|
537
552
|
latestBetRecords {
|
|
538
553
|
id
|
|
@@ -551,8 +566,8 @@ const C = o`
|
|
|
551
566
|
}
|
|
552
567
|
}
|
|
553
568
|
|
|
554
|
-
${
|
|
555
|
-
`,
|
|
569
|
+
${H}
|
|
570
|
+
`, Je = n`
|
|
556
571
|
query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
|
|
557
572
|
member {
|
|
558
573
|
transactionRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -578,8 +593,8 @@ const C = o`
|
|
|
578
593
|
}
|
|
579
594
|
}
|
|
580
595
|
}
|
|
581
|
-
`,
|
|
582
|
-
${
|
|
596
|
+
`, z = n`
|
|
597
|
+
${Y}
|
|
583
598
|
|
|
584
599
|
fragment PromoFragment on Promo {
|
|
585
600
|
id
|
|
@@ -597,24 +612,24 @@ const C = o`
|
|
|
597
612
|
dateTimeCreated
|
|
598
613
|
dateTimeLastUpdated
|
|
599
614
|
}
|
|
600
|
-
`,
|
|
601
|
-
${
|
|
615
|
+
`, Xe = n`
|
|
616
|
+
${z}
|
|
602
617
|
|
|
603
618
|
query Promos {
|
|
604
619
|
promos {
|
|
605
620
|
...PromoFragment
|
|
606
621
|
}
|
|
607
622
|
}
|
|
608
|
-
`,
|
|
609
|
-
${
|
|
623
|
+
`, Ze = n`
|
|
624
|
+
${z}
|
|
610
625
|
|
|
611
626
|
query AvailablePromos($filter: PromoFilterInput) {
|
|
612
627
|
availablePromos(filter: $filter) {
|
|
613
628
|
...PromoFragment
|
|
614
629
|
}
|
|
615
630
|
}
|
|
616
|
-
`,
|
|
617
|
-
${
|
|
631
|
+
`, Se = n`
|
|
632
|
+
${Y}
|
|
618
633
|
|
|
619
634
|
fragment CashbackFragment on Cashback {
|
|
620
635
|
id
|
|
@@ -629,16 +644,16 @@ const C = o`
|
|
|
629
644
|
dateTimeCreated
|
|
630
645
|
dateTimeLastUpdated
|
|
631
646
|
}
|
|
632
|
-
`,
|
|
633
|
-
${
|
|
647
|
+
`, et = n`
|
|
648
|
+
${Se}
|
|
634
649
|
|
|
635
650
|
query Cashbacks {
|
|
636
651
|
cashbacks {
|
|
637
652
|
...CashbackFragment
|
|
638
653
|
}
|
|
639
654
|
}
|
|
640
|
-
`,
|
|
641
|
-
${
|
|
655
|
+
`, tt = n`
|
|
656
|
+
${z}
|
|
642
657
|
|
|
643
658
|
query Bonus {
|
|
644
659
|
bonus {
|
|
@@ -666,8 +681,8 @@ const C = o`
|
|
|
666
681
|
dateTimeLastUpdated
|
|
667
682
|
}
|
|
668
683
|
}
|
|
669
|
-
`,
|
|
670
|
-
${
|
|
684
|
+
`, at = n`
|
|
685
|
+
${Se}
|
|
671
686
|
|
|
672
687
|
query CashbackBonuses {
|
|
673
688
|
cashbackBonuses {
|
|
@@ -680,7 +695,7 @@ const C = o`
|
|
|
680
695
|
dateTimeLastUpdated
|
|
681
696
|
}
|
|
682
697
|
}
|
|
683
|
-
`,
|
|
698
|
+
`, rt = n`
|
|
684
699
|
mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
|
|
685
700
|
claimCashbackBonus(input: $input) {
|
|
686
701
|
... on CashbackBonusDoesNotExistError {
|
|
@@ -688,13 +703,13 @@ const C = o`
|
|
|
688
703
|
}
|
|
689
704
|
}
|
|
690
705
|
}
|
|
691
|
-
`,
|
|
706
|
+
`, ot = n`
|
|
692
707
|
query Member {
|
|
693
708
|
member {
|
|
694
709
|
dateTimeLastActive
|
|
695
710
|
}
|
|
696
711
|
}
|
|
697
|
-
`,
|
|
712
|
+
`, nt = n`
|
|
698
713
|
query MemberAccount {
|
|
699
714
|
memberAccount: self {
|
|
700
715
|
... on MemberAccount {
|
|
@@ -718,8 +733,8 @@ const C = o`
|
|
|
718
733
|
}
|
|
719
734
|
}
|
|
720
735
|
}
|
|
721
|
-
`,
|
|
722
|
-
${
|
|
736
|
+
`, it = n`
|
|
737
|
+
${Y}
|
|
723
738
|
|
|
724
739
|
query MemberVerification {
|
|
725
740
|
memberAccount: self {
|
|
@@ -742,7 +757,7 @@ const C = o`
|
|
|
742
757
|
}
|
|
743
758
|
}
|
|
744
759
|
}
|
|
745
|
-
`,
|
|
760
|
+
`, st = n`
|
|
746
761
|
mutation RegisterMemberAccount(
|
|
747
762
|
$input: RegisterMemberAccountInput!
|
|
748
763
|
$referralCode: String
|
|
@@ -778,7 +793,7 @@ const C = o`
|
|
|
778
793
|
}
|
|
779
794
|
}
|
|
780
795
|
}
|
|
781
|
-
`,
|
|
796
|
+
`, mt = n`
|
|
782
797
|
mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
|
|
783
798
|
updateMemberAccount(input: $input) {
|
|
784
799
|
... on AccountNameNotAvailableError {
|
|
@@ -804,7 +819,7 @@ const C = o`
|
|
|
804
819
|
}
|
|
805
820
|
}
|
|
806
821
|
}
|
|
807
|
-
`,
|
|
822
|
+
`, ct = n`
|
|
808
823
|
mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
|
|
809
824
|
resetPassword(input: $input, verificationCode: $verificationCode) {
|
|
810
825
|
... on AccountNotFoundError {
|
|
@@ -815,11 +830,11 @@ const C = o`
|
|
|
815
830
|
}
|
|
816
831
|
}
|
|
817
832
|
}
|
|
818
|
-
`,
|
|
833
|
+
`, dt = n`
|
|
819
834
|
mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
|
|
820
835
|
deleteMemberAccount(input: $input)
|
|
821
836
|
}
|
|
822
|
-
`,
|
|
837
|
+
`, ut = n`
|
|
823
838
|
mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
|
|
824
839
|
verifyMobileNumber(input: $input) {
|
|
825
840
|
... on InvalidSMSVerificationCodeError {
|
|
@@ -830,7 +845,7 @@ const C = o`
|
|
|
830
845
|
}
|
|
831
846
|
}
|
|
832
847
|
}
|
|
833
|
-
`,
|
|
848
|
+
`, lt = n`
|
|
834
849
|
mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
|
|
835
850
|
createMemberVerification(input: $input) {
|
|
836
851
|
... on FileDoesNotExistError {
|
|
@@ -844,7 +859,7 @@ const C = o`
|
|
|
844
859
|
}
|
|
845
860
|
}
|
|
846
861
|
}
|
|
847
|
-
`,
|
|
862
|
+
`, pt = n`
|
|
848
863
|
mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
|
|
849
864
|
updateMemberVerification(input: $input) {
|
|
850
865
|
... on FileDoesNotExistError {
|
|
@@ -861,7 +876,7 @@ const C = o`
|
|
|
861
876
|
}
|
|
862
877
|
}
|
|
863
878
|
}
|
|
864
|
-
`,
|
|
879
|
+
`, ft = n`
|
|
865
880
|
query ProfileCompletion {
|
|
866
881
|
profileCompletion {
|
|
867
882
|
completionPercentage
|
|
@@ -872,7 +887,7 @@ const C = o`
|
|
|
872
887
|
accountPassword
|
|
873
888
|
}
|
|
874
889
|
}
|
|
875
|
-
`,
|
|
890
|
+
`, ht = n`
|
|
876
891
|
mutation SendVerificationCode($input: SendVerificationCodeInput!) {
|
|
877
892
|
sendVerificationCode(input: $input) {
|
|
878
893
|
... on InvalidPlatformError {
|
|
@@ -883,7 +898,7 @@ const C = o`
|
|
|
883
898
|
}
|
|
884
899
|
}
|
|
885
900
|
}
|
|
886
|
-
`,
|
|
901
|
+
`, wt = n`
|
|
887
902
|
fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
|
|
888
903
|
minimumAmount
|
|
889
904
|
maximumAmount
|
|
@@ -937,7 +952,7 @@ const C = o`
|
|
|
937
952
|
multiplier
|
|
938
953
|
}
|
|
939
954
|
}
|
|
940
|
-
`,
|
|
955
|
+
`, yt = n`
|
|
941
956
|
query MayaSession($id: ObjectId!) {
|
|
942
957
|
mayaSession(id: $id) {
|
|
943
958
|
id
|
|
@@ -946,9 +961,9 @@ const C = o`
|
|
|
946
961
|
}
|
|
947
962
|
}
|
|
948
963
|
`;
|
|
949
|
-
function
|
|
964
|
+
function d(o) {
|
|
950
965
|
return {
|
|
951
|
-
name:
|
|
966
|
+
name: o,
|
|
952
967
|
message: {
|
|
953
968
|
AccountNameNotAvailableError: "Username is no longer available",
|
|
954
969
|
AccountNotFoundError: "Account does not exist",
|
|
@@ -997,42 +1012,42 @@ function c(n) {
|
|
|
997
1012
|
InvalidToken: "Invalid token",
|
|
998
1013
|
InvalidTokenOrSecretAnswer: "Invalid token or secret answer",
|
|
999
1014
|
SessionExpired: "Session expired"
|
|
1000
|
-
}[
|
|
1015
|
+
}[o]
|
|
1001
1016
|
};
|
|
1002
1017
|
}
|
|
1003
|
-
class
|
|
1018
|
+
class gt {
|
|
1004
1019
|
constructor(e) {
|
|
1005
|
-
|
|
1020
|
+
c(this, "client");
|
|
1006
1021
|
this.client = e;
|
|
1007
1022
|
}
|
|
1008
1023
|
/** aka `Query.self` */
|
|
1009
1024
|
async memberAccount() {
|
|
1010
|
-
const e = await this.client.request(
|
|
1025
|
+
const e = await this.client.request(nt);
|
|
1011
1026
|
return e.ok ? {
|
|
1012
1027
|
ok: !0,
|
|
1013
1028
|
data: e.data.memberAccount
|
|
1014
1029
|
} : e;
|
|
1015
1030
|
}
|
|
1016
1031
|
async registerMemberAccount(e) {
|
|
1017
|
-
const t = await this.client.request(
|
|
1032
|
+
const t = await this.client.request(st, e);
|
|
1018
1033
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1019
1034
|
ok: !1,
|
|
1020
|
-
error:
|
|
1035
|
+
error: d(t.data.registerMemberAccount.__typename)
|
|
1021
1036
|
} : {
|
|
1022
1037
|
ok: !0
|
|
1023
1038
|
} : t;
|
|
1024
1039
|
}
|
|
1025
1040
|
async updateMemberAccount(e) {
|
|
1026
|
-
const t = await this.client.request(
|
|
1041
|
+
const t = await this.client.request(mt, e);
|
|
1027
1042
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
1028
1043
|
ok: !1,
|
|
1029
|
-
error:
|
|
1044
|
+
error: d(t.data.updateMemberAccount.__typename)
|
|
1030
1045
|
} : {
|
|
1031
1046
|
ok: !0
|
|
1032
1047
|
} : t;
|
|
1033
1048
|
}
|
|
1034
1049
|
async deleteMemberAccount(e) {
|
|
1035
|
-
const t = await this.client.request(
|
|
1050
|
+
const t = await this.client.request(dt, e);
|
|
1036
1051
|
return t.ok ? t.data.deleteMemberAccount ? {
|
|
1037
1052
|
ok: !0
|
|
1038
1053
|
} : {
|
|
@@ -1045,61 +1060,61 @@ class ht {
|
|
|
1045
1060
|
}
|
|
1046
1061
|
async resetPassword(e) {
|
|
1047
1062
|
const t = await this.client.request(
|
|
1048
|
-
|
|
1063
|
+
ct,
|
|
1049
1064
|
e
|
|
1050
1065
|
);
|
|
1051
1066
|
return t.ok ? t.data.resetPassword ? {
|
|
1052
1067
|
ok: !1,
|
|
1053
|
-
error:
|
|
1068
|
+
error: d(t.data.resetPassword.__typename)
|
|
1054
1069
|
} : {
|
|
1055
1070
|
ok: !0
|
|
1056
1071
|
} : t;
|
|
1057
1072
|
}
|
|
1058
1073
|
async profileCompletion() {
|
|
1059
|
-
const e = await this.client.request(
|
|
1074
|
+
const e = await this.client.request(ft);
|
|
1060
1075
|
return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
|
|
1061
1076
|
}
|
|
1062
1077
|
async platform() {
|
|
1063
|
-
return await this.client.request(
|
|
1078
|
+
return await this.client.request(wt);
|
|
1064
1079
|
}
|
|
1065
1080
|
async sendVerificationCode(e) {
|
|
1066
|
-
const t = await this.client.request(
|
|
1081
|
+
const t = await this.client.request(ht, e);
|
|
1067
1082
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
1068
1083
|
ok: !1,
|
|
1069
|
-
error:
|
|
1084
|
+
error: d(t.data.sendVerificationCode.__typename)
|
|
1070
1085
|
} : {
|
|
1071
1086
|
ok: !0
|
|
1072
1087
|
} : t;
|
|
1073
1088
|
}
|
|
1074
1089
|
async verifyMobileNumber(e) {
|
|
1075
|
-
const t = await this.client.request(
|
|
1090
|
+
const t = await this.client.request(ut, e);
|
|
1076
1091
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1077
1092
|
ok: !1,
|
|
1078
|
-
error:
|
|
1093
|
+
error: d(t.data.verifyMobileNumber.__typename)
|
|
1079
1094
|
} : {
|
|
1080
1095
|
ok: !0
|
|
1081
1096
|
} : t;
|
|
1082
1097
|
}
|
|
1083
1098
|
async createMemberVerification(e) {
|
|
1084
|
-
const t = await this.client.request(
|
|
1099
|
+
const t = await this.client.request(lt, e);
|
|
1085
1100
|
return t.ok ? t.data.createMemberVerification ? {
|
|
1086
1101
|
ok: !1,
|
|
1087
|
-
error:
|
|
1102
|
+
error: d(t.data.createMemberVerification.__typename)
|
|
1088
1103
|
} : {
|
|
1089
1104
|
ok: !0
|
|
1090
1105
|
} : t;
|
|
1091
1106
|
}
|
|
1092
1107
|
async updateMemberVerification(e) {
|
|
1093
|
-
const t = await this.client.request(
|
|
1108
|
+
const t = await this.client.request(pt, e);
|
|
1094
1109
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
1095
1110
|
ok: !1,
|
|
1096
|
-
error:
|
|
1111
|
+
error: d(t.data.updateMemberVerification.__typename)
|
|
1097
1112
|
} : {
|
|
1098
1113
|
ok: !0
|
|
1099
1114
|
} : t;
|
|
1100
1115
|
}
|
|
1101
1116
|
async memberVerification() {
|
|
1102
|
-
const e = await this.client.request(
|
|
1117
|
+
const e = await this.client.request(it);
|
|
1103
1118
|
return e.ok ? {
|
|
1104
1119
|
ok: !0,
|
|
1105
1120
|
data: e.data.memberAccount.verification
|
|
@@ -1107,7 +1122,7 @@ class ht {
|
|
|
1107
1122
|
}
|
|
1108
1123
|
async announcements(e) {
|
|
1109
1124
|
const t = await this.client.request(
|
|
1110
|
-
|
|
1125
|
+
Ue,
|
|
1111
1126
|
e
|
|
1112
1127
|
);
|
|
1113
1128
|
return t.ok ? {
|
|
@@ -1116,14 +1131,14 @@ class ht {
|
|
|
1116
1131
|
} : t;
|
|
1117
1132
|
}
|
|
1118
1133
|
}
|
|
1119
|
-
function
|
|
1120
|
-
const t =
|
|
1134
|
+
function u(o, e) {
|
|
1135
|
+
const t = Q[o] ? Q[o] : Q[500];
|
|
1121
1136
|
return {
|
|
1122
1137
|
name: t.name,
|
|
1123
1138
|
message: e ?? t.message
|
|
1124
1139
|
};
|
|
1125
1140
|
}
|
|
1126
|
-
const
|
|
1141
|
+
const Q = {
|
|
1127
1142
|
400: { name: "HttpBadRequest", message: "Bad Request" },
|
|
1128
1143
|
401: { name: "HttpUnauthorized", message: "Unauthorized" },
|
|
1129
1144
|
403: { name: "HttpForbidden", message: "Forbidden" },
|
|
@@ -1132,10 +1147,10 @@ const T = {
|
|
|
1132
1147
|
429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
|
|
1133
1148
|
500: { name: "HttpInternalServerError", message: "Internal Server Error" }
|
|
1134
1149
|
};
|
|
1135
|
-
class
|
|
1150
|
+
class Et {
|
|
1136
1151
|
constructor(e) {
|
|
1137
|
-
|
|
1138
|
-
|
|
1152
|
+
c(this, "url");
|
|
1153
|
+
c(this, "platform");
|
|
1139
1154
|
this.url = e.url, this.platform = e.platform;
|
|
1140
1155
|
}
|
|
1141
1156
|
async createSession(e) {
|
|
@@ -1163,15 +1178,15 @@ class wt {
|
|
|
1163
1178
|
data: r
|
|
1164
1179
|
} : r.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1165
1180
|
ok: !1,
|
|
1166
|
-
error:
|
|
1181
|
+
error: d("AccountBlacklisted")
|
|
1167
1182
|
} : {
|
|
1168
1183
|
ok: !1,
|
|
1169
|
-
error:
|
|
1184
|
+
error: u(a.status)
|
|
1170
1185
|
};
|
|
1171
1186
|
} catch {
|
|
1172
1187
|
return {
|
|
1173
1188
|
ok: !1,
|
|
1174
|
-
error:
|
|
1189
|
+
error: u(500)
|
|
1175
1190
|
};
|
|
1176
1191
|
}
|
|
1177
1192
|
}
|
|
@@ -1196,15 +1211,15 @@ class wt {
|
|
|
1196
1211
|
data: r
|
|
1197
1212
|
} : a.status === 401 || a.status === 403 ? {
|
|
1198
1213
|
ok: !1,
|
|
1199
|
-
error:
|
|
1214
|
+
error: d("InvalidTokenOrSecretAnswer")
|
|
1200
1215
|
} : {
|
|
1201
1216
|
ok: !1,
|
|
1202
|
-
error:
|
|
1217
|
+
error: u(a.status)
|
|
1203
1218
|
};
|
|
1204
1219
|
} catch {
|
|
1205
1220
|
return {
|
|
1206
1221
|
ok: !1,
|
|
1207
|
-
error:
|
|
1222
|
+
error: u(500)
|
|
1208
1223
|
};
|
|
1209
1224
|
}
|
|
1210
1225
|
}
|
|
@@ -1226,18 +1241,18 @@ class wt {
|
|
|
1226
1241
|
data: a
|
|
1227
1242
|
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1228
1243
|
ok: !1,
|
|
1229
|
-
error:
|
|
1244
|
+
error: d("AccountBlacklisted")
|
|
1230
1245
|
} : t.status === 403 || t.status === 401 ? {
|
|
1231
1246
|
ok: !1,
|
|
1232
|
-
error:
|
|
1247
|
+
error: d("InvalidToken")
|
|
1233
1248
|
} : {
|
|
1234
1249
|
ok: !1,
|
|
1235
|
-
error:
|
|
1250
|
+
error: u(t.status)
|
|
1236
1251
|
};
|
|
1237
1252
|
} catch {
|
|
1238
1253
|
return {
|
|
1239
1254
|
ok: !1,
|
|
1240
|
-
error:
|
|
1255
|
+
error: u(500)
|
|
1241
1256
|
};
|
|
1242
1257
|
}
|
|
1243
1258
|
}
|
|
@@ -1252,9 +1267,9 @@ class wt {
|
|
|
1252
1267
|
Authorization: `Bearer ${e}`
|
|
1253
1268
|
}
|
|
1254
1269
|
});
|
|
1255
|
-
return t.ok ? { ok: !0 } : { ok: !1, error:
|
|
1270
|
+
return t.ok ? { ok: !0 } : { ok: !1, error: u(t.status) };
|
|
1256
1271
|
} catch {
|
|
1257
|
-
return { ok: !1, error:
|
|
1272
|
+
return { ok: !1, error: u(500) };
|
|
1258
1273
|
}
|
|
1259
1274
|
}
|
|
1260
1275
|
async verifySession(e) {
|
|
@@ -1273,70 +1288,70 @@ class wt {
|
|
|
1273
1288
|
}
|
|
1274
1289
|
}
|
|
1275
1290
|
}
|
|
1276
|
-
class
|
|
1291
|
+
class At {
|
|
1277
1292
|
constructor(e) {
|
|
1278
|
-
|
|
1293
|
+
c(this, "client");
|
|
1279
1294
|
this.client = e;
|
|
1280
1295
|
}
|
|
1281
1296
|
async file(e) {
|
|
1282
|
-
const t = await this.client.request(
|
|
1297
|
+
const t = await this.client.request(Ie, e);
|
|
1283
1298
|
return t.ok ? {
|
|
1284
1299
|
ok: !0,
|
|
1285
1300
|
data: t.data.node
|
|
1286
1301
|
} : t;
|
|
1287
1302
|
}
|
|
1288
1303
|
async uploadPrivateImageFile(e) {
|
|
1289
|
-
const t = await this.client.upload(
|
|
1304
|
+
const t = await this.client.upload(Me, e);
|
|
1290
1305
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1291
1306
|
ok: !1,
|
|
1292
|
-
error:
|
|
1307
|
+
error: d(t.data.uploadPrivateImageFile.__typename)
|
|
1293
1308
|
} : {
|
|
1294
1309
|
ok: !0
|
|
1295
1310
|
} : t;
|
|
1296
1311
|
}
|
|
1297
1312
|
}
|
|
1298
|
-
class
|
|
1313
|
+
class St {
|
|
1299
1314
|
constructor(e) {
|
|
1300
|
-
|
|
1315
|
+
c(this, "client");
|
|
1301
1316
|
this.client = e;
|
|
1302
1317
|
}
|
|
1303
1318
|
async betRecords(e) {
|
|
1304
1319
|
const t = await this.client.request(
|
|
1305
|
-
|
|
1320
|
+
Ke,
|
|
1306
1321
|
e
|
|
1307
1322
|
);
|
|
1308
1323
|
return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
|
|
1309
1324
|
}
|
|
1310
1325
|
async transactionRecords(e) {
|
|
1311
|
-
const t = await this.client.request(
|
|
1326
|
+
const t = await this.client.request(Je, e);
|
|
1312
1327
|
return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
|
|
1313
1328
|
}
|
|
1314
1329
|
async withdrawalRecords(e) {
|
|
1315
1330
|
const t = await this.client.request(
|
|
1316
|
-
|
|
1331
|
+
Oe,
|
|
1317
1332
|
e
|
|
1318
1333
|
);
|
|
1319
1334
|
return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
|
|
1320
1335
|
}
|
|
1321
1336
|
async depositRecords(e) {
|
|
1322
1337
|
const t = await this.client.request(
|
|
1323
|
-
|
|
1338
|
+
Fe,
|
|
1324
1339
|
e
|
|
1325
1340
|
);
|
|
1326
1341
|
return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
|
|
1327
1342
|
}
|
|
1328
1343
|
async depositsCount() {
|
|
1329
|
-
const e = await this.client.request(
|
|
1344
|
+
const e = await this.client.request(Qe);
|
|
1330
1345
|
return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
|
|
1331
1346
|
}
|
|
1332
1347
|
async member() {
|
|
1333
|
-
const e = await this.client.request(
|
|
1348
|
+
const e = await this.client.request(ot);
|
|
1334
1349
|
return e.ok ? { ok: e.ok, data: e.data.member } : e;
|
|
1335
1350
|
}
|
|
1336
1351
|
}
|
|
1337
|
-
class
|
|
1352
|
+
class bt {
|
|
1338
1353
|
constructor(e) {
|
|
1339
|
-
|
|
1354
|
+
c(this, "url");
|
|
1340
1355
|
this.url = e.url;
|
|
1341
1356
|
}
|
|
1342
1357
|
gameThumbnails(e) {
|
|
@@ -1346,35 +1361,35 @@ class gt {
|
|
|
1346
1361
|
];
|
|
1347
1362
|
}
|
|
1348
1363
|
}
|
|
1349
|
-
class
|
|
1364
|
+
class be {
|
|
1350
1365
|
constructor(e) {
|
|
1351
|
-
|
|
1366
|
+
c(this, "client");
|
|
1352
1367
|
this.client = e;
|
|
1353
1368
|
}
|
|
1354
1369
|
async promos() {
|
|
1355
|
-
const e = await this.client.request(
|
|
1370
|
+
const e = await this.client.request(Xe);
|
|
1356
1371
|
return e.ok ? { ok: e.ok, data: e.data.promos } : e;
|
|
1357
1372
|
}
|
|
1358
1373
|
async cashbacks() {
|
|
1359
|
-
const e = await this.client.request(
|
|
1374
|
+
const e = await this.client.request(et);
|
|
1360
1375
|
return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
|
|
1361
1376
|
}
|
|
1362
1377
|
async availablePromos(e) {
|
|
1363
1378
|
const t = await this.client.request(
|
|
1364
|
-
|
|
1379
|
+
Ze,
|
|
1365
1380
|
e
|
|
1366
1381
|
);
|
|
1367
1382
|
return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
|
|
1368
1383
|
}
|
|
1369
1384
|
async cashbackBonuses() {
|
|
1370
|
-
const e = await this.client.request(
|
|
1385
|
+
const e = await this.client.request(at);
|
|
1371
1386
|
return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
|
|
1372
1387
|
}
|
|
1373
1388
|
async claimCashbackBonus(e) {
|
|
1374
|
-
const t = await this.client.request(
|
|
1389
|
+
const t = await this.client.request(rt, e);
|
|
1375
1390
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
1376
1391
|
ok: !1,
|
|
1377
|
-
error:
|
|
1392
|
+
error: d(t.data.claimCashbackBonus.__typename)
|
|
1378
1393
|
} : {
|
|
1379
1394
|
ok: !0
|
|
1380
1395
|
} : {
|
|
@@ -1383,61 +1398,61 @@ class Ae {
|
|
|
1383
1398
|
};
|
|
1384
1399
|
}
|
|
1385
1400
|
async bonus() {
|
|
1386
|
-
const e = await this.client.request(
|
|
1401
|
+
const e = await this.client.request(tt);
|
|
1387
1402
|
return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
|
|
1388
1403
|
}
|
|
1389
1404
|
async wallet() {
|
|
1390
|
-
const e = await this.client.request(
|
|
1405
|
+
const e = await this.client.request(Ne);
|
|
1391
1406
|
return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
|
|
1392
1407
|
}
|
|
1393
1408
|
async deposit(e) {
|
|
1394
1409
|
const t = await this.client.request(
|
|
1395
|
-
|
|
1410
|
+
He,
|
|
1396
1411
|
e
|
|
1397
1412
|
);
|
|
1398
1413
|
return t.ok ? { ok: t.ok, data: t.data.node } : t;
|
|
1399
1414
|
}
|
|
1400
1415
|
async createGCashDeposit(e) {
|
|
1401
|
-
const t = await this.client.request(
|
|
1416
|
+
const t = await this.client.request(Ve, e);
|
|
1402
1417
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
1403
1418
|
ok: !1,
|
|
1404
|
-
error:
|
|
1419
|
+
error: d(t.data.createGCashDeposit.__typename)
|
|
1405
1420
|
} : {
|
|
1406
1421
|
ok: !0
|
|
1407
1422
|
} : t;
|
|
1408
1423
|
}
|
|
1409
1424
|
async createMayaDeposit(e) {
|
|
1410
|
-
const t = await this.client.request(
|
|
1425
|
+
const t = await this.client.request(je, e);
|
|
1411
1426
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
1412
1427
|
ok: !1,
|
|
1413
|
-
error:
|
|
1428
|
+
error: d(t.data.createMayaDeposit.__typename)
|
|
1414
1429
|
} : {
|
|
1415
1430
|
ok: !0
|
|
1416
1431
|
} : t;
|
|
1417
1432
|
}
|
|
1418
1433
|
async createMayaAppDeposit(e) {
|
|
1419
|
-
const t = await this.client.request(
|
|
1434
|
+
const t = await this.client.request(Ye, e);
|
|
1420
1435
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
1421
1436
|
ok: !1,
|
|
1422
|
-
error:
|
|
1437
|
+
error: d(t.data.createMayaAppDeposit.__typename)
|
|
1423
1438
|
} : {
|
|
1424
1439
|
ok: !0
|
|
1425
1440
|
} : t;
|
|
1426
1441
|
}
|
|
1427
1442
|
async createGCashWithdrawal(e) {
|
|
1428
|
-
const t = await this.client.request(
|
|
1443
|
+
const t = await this.client.request($e, e);
|
|
1429
1444
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
1430
1445
|
ok: !1,
|
|
1431
|
-
error:
|
|
1446
|
+
error: d(t.data.createGCashWithdrawal.__typename)
|
|
1432
1447
|
} : {
|
|
1433
1448
|
ok: !0
|
|
1434
1449
|
} : t;
|
|
1435
1450
|
}
|
|
1436
1451
|
async createMayaWithdrawal(e) {
|
|
1437
|
-
const t = await this.client.request(
|
|
1452
|
+
const t = await this.client.request(qe, e);
|
|
1438
1453
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
1439
1454
|
ok: !1,
|
|
1440
|
-
error:
|
|
1455
|
+
error: d(t.data.createMayaWithdrawal.__typename)
|
|
1441
1456
|
} : {
|
|
1442
1457
|
ok: !0
|
|
1443
1458
|
} : t;
|
|
@@ -1446,7 +1461,7 @@ class Ae {
|
|
|
1446
1461
|
const t = await this.client.request(Be, e);
|
|
1447
1462
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
1448
1463
|
ok: !1,
|
|
1449
|
-
error:
|
|
1464
|
+
error: d(t.data.createMayaAppWithdrawal.__typename)
|
|
1450
1465
|
} : {
|
|
1451
1466
|
ok: !0
|
|
1452
1467
|
} : t;
|
|
@@ -1455,14 +1470,14 @@ class Ae {
|
|
|
1455
1470
|
const t = await this.client.request(We, e);
|
|
1456
1471
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
1457
1472
|
ok: !1,
|
|
1458
|
-
error:
|
|
1473
|
+
error: d(t.data.createBankWithdrawal.__typename)
|
|
1459
1474
|
} : {
|
|
1460
1475
|
ok: !0
|
|
1461
1476
|
} : t;
|
|
1462
1477
|
}
|
|
1463
1478
|
async remainingDailyWithdrawalsCount() {
|
|
1464
1479
|
const e = await this.client.request(
|
|
1465
|
-
|
|
1480
|
+
Le
|
|
1466
1481
|
);
|
|
1467
1482
|
return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
|
|
1468
1483
|
}
|
|
@@ -1471,51 +1486,51 @@ class Ae {
|
|
|
1471
1486
|
return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
|
|
1472
1487
|
}
|
|
1473
1488
|
async pointsToCashConversion(e) {
|
|
1474
|
-
const t = await this.client.request(
|
|
1489
|
+
const t = await this.client.request(ve, e);
|
|
1475
1490
|
return t.ok ? t.data.pointsToCashConversion ? {
|
|
1476
1491
|
ok: !1,
|
|
1477
|
-
error:
|
|
1492
|
+
error: d(t.data.pointsToCashConversion.__typename)
|
|
1478
1493
|
} : {
|
|
1479
1494
|
ok: !0
|
|
1480
1495
|
} : t;
|
|
1481
1496
|
}
|
|
1482
1497
|
async mayaSession(e) {
|
|
1483
1498
|
const t = await this.client.request(
|
|
1484
|
-
|
|
1499
|
+
yt,
|
|
1485
1500
|
e
|
|
1486
1501
|
);
|
|
1487
1502
|
return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
|
|
1488
1503
|
}
|
|
1489
1504
|
async games(e) {
|
|
1490
|
-
const t = await this.client.request(
|
|
1505
|
+
const t = await this.client.request(ge, e);
|
|
1491
1506
|
return t.ok ? { ok: t.ok, data: t.data.games } : t;
|
|
1492
1507
|
}
|
|
1493
1508
|
async gamesByName(e) {
|
|
1494
1509
|
const t = await this.client.request(
|
|
1495
|
-
|
|
1510
|
+
Ee,
|
|
1496
1511
|
e
|
|
1497
1512
|
);
|
|
1498
1513
|
return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
|
|
1499
1514
|
}
|
|
1500
1515
|
async gameSession(e) {
|
|
1501
1516
|
const t = await this.client.request(
|
|
1502
|
-
|
|
1517
|
+
Re,
|
|
1503
1518
|
e
|
|
1504
1519
|
);
|
|
1505
1520
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1506
1521
|
}
|
|
1507
1522
|
async createGameSession(e) {
|
|
1508
|
-
const t = await this.client.request(
|
|
1523
|
+
const t = await this.client.request(Ae, e);
|
|
1509
1524
|
return t.ok ? t.data.createGameSession ? {
|
|
1510
1525
|
ok: !1,
|
|
1511
|
-
error:
|
|
1526
|
+
error: d(t.data.createGameSession.__typename)
|
|
1512
1527
|
} : {
|
|
1513
1528
|
ok: !0
|
|
1514
1529
|
} : t;
|
|
1515
1530
|
}
|
|
1516
1531
|
async endGameSession(e) {
|
|
1517
1532
|
const t = await this.client.request(
|
|
1518
|
-
|
|
1533
|
+
Pe,
|
|
1519
1534
|
e
|
|
1520
1535
|
);
|
|
1521
1536
|
return t.ok ? t.data.endGameSession ? {
|
|
@@ -1529,88 +1544,188 @@ class Ae {
|
|
|
1529
1544
|
} : t;
|
|
1530
1545
|
}
|
|
1531
1546
|
}
|
|
1532
|
-
class
|
|
1547
|
+
class kt {
|
|
1533
1548
|
constructor(e) {
|
|
1534
|
-
|
|
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 {
|
|
1648
|
+
constructor(e) {
|
|
1649
|
+
c(this, "client");
|
|
1535
1650
|
this.client = e;
|
|
1536
1651
|
}
|
|
1537
1652
|
async games(e) {
|
|
1538
|
-
const t = await this.client.request(
|
|
1653
|
+
const t = await this.client.request(ge, e);
|
|
1539
1654
|
return t.ok ? { ok: t.ok, data: t.data.games } : t;
|
|
1540
1655
|
}
|
|
1541
1656
|
async gamesByName(e) {
|
|
1542
1657
|
const t = await this.client.request(
|
|
1543
|
-
|
|
1658
|
+
Ee,
|
|
1544
1659
|
e
|
|
1545
1660
|
);
|
|
1546
1661
|
return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
|
|
1547
1662
|
}
|
|
1548
1663
|
async gameSession(e) {
|
|
1549
1664
|
const t = await this.client.request(
|
|
1550
|
-
|
|
1665
|
+
Ge,
|
|
1551
1666
|
e
|
|
1552
1667
|
);
|
|
1553
1668
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1554
1669
|
}
|
|
1555
1670
|
async createGameSession(e) {
|
|
1556
|
-
const t = await this.client.request(
|
|
1671
|
+
const t = await this.client.request(Ae, e);
|
|
1557
1672
|
return t.ok ? t.data.createGameSession ? {
|
|
1558
1673
|
ok: !1,
|
|
1559
|
-
error:
|
|
1674
|
+
error: d(t.data.createGameSession.__typename)
|
|
1560
1675
|
} : {
|
|
1561
1676
|
ok: !0
|
|
1562
1677
|
} : t;
|
|
1563
1678
|
}
|
|
1564
1679
|
async endGameSession(e) {
|
|
1565
|
-
const t = await this.client.request(
|
|
1680
|
+
const t = await this.client.request(xe, e);
|
|
1566
1681
|
return t.ok ? t.data.endGameSession ? {
|
|
1567
1682
|
ok: !1,
|
|
1568
|
-
error:
|
|
1683
|
+
error: d(t.data.endGameSession.__typename)
|
|
1569
1684
|
} : {
|
|
1570
1685
|
ok: !0
|
|
1571
1686
|
} : t;
|
|
1572
1687
|
}
|
|
1573
1688
|
}
|
|
1574
|
-
class
|
|
1689
|
+
class Tt {
|
|
1575
1690
|
constructor(e) {
|
|
1576
|
-
|
|
1691
|
+
c(this, "client");
|
|
1577
1692
|
this.client = e;
|
|
1578
1693
|
}
|
|
1579
1694
|
async latestBetRecords() {
|
|
1580
|
-
const e = await this.client.request(
|
|
1695
|
+
const e = await this.client.request(ze);
|
|
1581
1696
|
return e.ok ? {
|
|
1582
1697
|
ok: !0,
|
|
1583
1698
|
data: e.data.latestBetRecords
|
|
1584
1699
|
} : e;
|
|
1585
1700
|
}
|
|
1586
1701
|
}
|
|
1587
|
-
function
|
|
1588
|
-
return
|
|
1702
|
+
function Ct(o, e, t) {
|
|
1703
|
+
return o < e ? e : o > t ? t : o;
|
|
1589
1704
|
}
|
|
1590
|
-
function
|
|
1591
|
-
return Object.prototype.toString.call(
|
|
1705
|
+
function K(o) {
|
|
1706
|
+
return Object.prototype.toString.call(o) === "[object Object]" && Object(o) === o;
|
|
1592
1707
|
}
|
|
1593
|
-
function
|
|
1708
|
+
function It(o) {
|
|
1594
1709
|
const e = [];
|
|
1595
1710
|
function t(a, r = []) {
|
|
1596
1711
|
for (const s in a) {
|
|
1597
1712
|
const m = a[s];
|
|
1598
|
-
|
|
1713
|
+
K(m) ? t(m, [...r, s]) : Array.isArray(m) ? t(Mt(m), [...r, s]) : e.push({
|
|
1599
1714
|
key: [...r, s],
|
|
1600
1715
|
value: m
|
|
1601
1716
|
});
|
|
1602
1717
|
}
|
|
1603
1718
|
}
|
|
1604
|
-
return t(
|
|
1719
|
+
return t(o), e;
|
|
1605
1720
|
}
|
|
1606
|
-
function
|
|
1607
|
-
return
|
|
1721
|
+
function Mt(o) {
|
|
1722
|
+
return o.reduce((e, t, a) => (e[a] = t, e), {});
|
|
1608
1723
|
}
|
|
1609
|
-
class
|
|
1724
|
+
class b {
|
|
1610
1725
|
constructor(e, t) {
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1726
|
+
c(this, "url");
|
|
1727
|
+
c(this, "options");
|
|
1728
|
+
c(this, "middlewares");
|
|
1614
1729
|
var r;
|
|
1615
1730
|
const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
|
|
1616
1731
|
this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
|
|
@@ -1643,15 +1758,15 @@ class E {
|
|
|
1643
1758
|
return await this.exec(s);
|
|
1644
1759
|
}
|
|
1645
1760
|
async exec(e) {
|
|
1646
|
-
var t, a, r, s, m,
|
|
1761
|
+
var t, a, r, s, m, l;
|
|
1647
1762
|
try {
|
|
1648
1763
|
const f = await fetch(e);
|
|
1649
1764
|
if (!f.ok)
|
|
1650
|
-
return { ok: !1, error:
|
|
1651
|
-
const
|
|
1652
|
-
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:
|
|
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) } : {
|
|
1653
1768
|
ok: !1,
|
|
1654
|
-
error:
|
|
1769
|
+
error: u(500, h.message)
|
|
1655
1770
|
} : {
|
|
1656
1771
|
ok: !0,
|
|
1657
1772
|
data: y
|
|
@@ -1659,7 +1774,7 @@ class E {
|
|
|
1659
1774
|
} catch {
|
|
1660
1775
|
return {
|
|
1661
1776
|
ok: !1,
|
|
1662
|
-
error:
|
|
1777
|
+
error: u(500)
|
|
1663
1778
|
};
|
|
1664
1779
|
}
|
|
1665
1780
|
}
|
|
@@ -1670,7 +1785,7 @@ class E {
|
|
|
1670
1785
|
return t;
|
|
1671
1786
|
}
|
|
1672
1787
|
createUploadBody(e, t) {
|
|
1673
|
-
const a =
|
|
1788
|
+
const a = It(t).filter(
|
|
1674
1789
|
(m) => m.value instanceof File || m.value instanceof Blob
|
|
1675
1790
|
), r = new FormData();
|
|
1676
1791
|
r.append(
|
|
@@ -1681,20 +1796,20 @@ class E {
|
|
|
1681
1796
|
})
|
|
1682
1797
|
);
|
|
1683
1798
|
const s = {};
|
|
1684
|
-
return a.forEach((m,
|
|
1685
|
-
s[
|
|
1686
|
-
}), r.append("map", JSON.stringify(s)), a.forEach((m,
|
|
1687
|
-
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);
|
|
1688
1803
|
}), r;
|
|
1689
1804
|
}
|
|
1690
1805
|
}
|
|
1691
|
-
async function
|
|
1692
|
-
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);
|
|
1693
1808
|
return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
1694
1809
|
}
|
|
1695
|
-
class
|
|
1810
|
+
class ke {
|
|
1696
1811
|
constructor(e) {
|
|
1697
|
-
|
|
1812
|
+
c(this, "enabled");
|
|
1698
1813
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
1699
1814
|
}
|
|
1700
1815
|
info(e) {
|
|
@@ -1710,59 +1825,59 @@ class Se {
|
|
|
1710
1825
|
this.enabled && console.log(`\x1B[32m[success] ${e}`);
|
|
1711
1826
|
}
|
|
1712
1827
|
}
|
|
1713
|
-
function
|
|
1714
|
-
return new Date(
|
|
1828
|
+
function J(o) {
|
|
1829
|
+
return new Date(o.getTime());
|
|
1715
1830
|
}
|
|
1716
|
-
function
|
|
1717
|
-
const t =
|
|
1831
|
+
function F(o, e) {
|
|
1832
|
+
const t = J(o);
|
|
1718
1833
|
return t.setDate(t.getDate() + e), t;
|
|
1719
1834
|
}
|
|
1720
|
-
function
|
|
1721
|
-
const t =
|
|
1835
|
+
function V(o, e) {
|
|
1836
|
+
const t = J(o);
|
|
1722
1837
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
1723
1838
|
}
|
|
1724
|
-
function
|
|
1725
|
-
return
|
|
1839
|
+
function we(o, e) {
|
|
1840
|
+
return o.getTime() > e.getTime();
|
|
1726
1841
|
}
|
|
1727
|
-
function
|
|
1842
|
+
function _e(o) {
|
|
1728
1843
|
return new Promise((e) => {
|
|
1729
|
-
setTimeout(e,
|
|
1844
|
+
setTimeout(e, o);
|
|
1730
1845
|
});
|
|
1731
1846
|
}
|
|
1732
|
-
function
|
|
1847
|
+
function ye(o, e) {
|
|
1733
1848
|
const {
|
|
1734
1849
|
until: t,
|
|
1735
1850
|
interval: a = 1e3,
|
|
1736
1851
|
maxAttempt: r = 3
|
|
1737
1852
|
/**/
|
|
1738
1853
|
} = e;
|
|
1739
|
-
async function s(m,
|
|
1740
|
-
const f =
|
|
1741
|
-
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;
|
|
1742
1857
|
}
|
|
1743
1858
|
return async (...m) => await s(m);
|
|
1744
1859
|
}
|
|
1745
|
-
function
|
|
1746
|
-
const t =
|
|
1860
|
+
function j(o, e) {
|
|
1861
|
+
const t = J(o);
|
|
1747
1862
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
1748
1863
|
}
|
|
1749
|
-
class
|
|
1864
|
+
class Nt {
|
|
1750
1865
|
constructor(e) {
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
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({
|
|
1757
1872
|
url: e.authUrl,
|
|
1758
1873
|
platform: e.platform
|
|
1759
|
-
}), this.walletService = new
|
|
1760
|
-
new
|
|
1874
|
+
}), this.walletService = new be(
|
|
1875
|
+
new b(e.walletUrl, {
|
|
1761
1876
|
middlewares: [
|
|
1762
1877
|
(t) => (t.headers.set("Platform", e.platform), t.headers.set("Role", "MEMBER"), t)
|
|
1763
1878
|
]
|
|
1764
1879
|
})
|
|
1765
|
-
), this.logger = new
|
|
1880
|
+
), this.logger = new ke({
|
|
1766
1881
|
enabled: e.log ?? !1
|
|
1767
1882
|
});
|
|
1768
1883
|
}
|
|
@@ -1782,28 +1897,28 @@ class Tt {
|
|
|
1782
1897
|
}
|
|
1783
1898
|
};
|
|
1784
1899
|
if (e.type === "MAYA") {
|
|
1785
|
-
const s = await
|
|
1786
|
-
until: (
|
|
1900
|
+
const s = await ye(() => this.walletService.mayaSession({ id: e.sessionId }), {
|
|
1901
|
+
until: (p) => {
|
|
1787
1902
|
var y;
|
|
1788
|
-
return
|
|
1903
|
+
return p.ok && ((y = p.data) == null ? void 0 : y.member) != null;
|
|
1789
1904
|
},
|
|
1790
1905
|
interval: 1e3,
|
|
1791
1906
|
maxAttempt: 5
|
|
1792
1907
|
})();
|
|
1793
1908
|
if (!s.ok) return s;
|
|
1794
|
-
const
|
|
1795
|
-
until: (
|
|
1909
|
+
const l = await ye(() => this.authService.createSession(e), {
|
|
1910
|
+
until: (p) => p.ok,
|
|
1796
1911
|
interval: 1e3,
|
|
1797
1912
|
maxAttempt: 5
|
|
1798
1913
|
})();
|
|
1799
|
-
if (!
|
|
1914
|
+
if (!l.ok) return l;
|
|
1800
1915
|
const f = /* @__PURE__ */ new Date();
|
|
1801
1916
|
return window.localStorage.setItem(
|
|
1802
1917
|
this.storageKey,
|
|
1803
1918
|
JSON.stringify({
|
|
1804
|
-
...
|
|
1805
|
-
accessTokenExpiresAt:
|
|
1806
|
-
refreshTokenExpiresAt:
|
|
1919
|
+
...l.data,
|
|
1920
|
+
accessTokenExpiresAt: V(f, 8).getTime(),
|
|
1921
|
+
refreshTokenExpiresAt: j(F(f, 30), 2).getTime()
|
|
1807
1922
|
})
|
|
1808
1923
|
), {
|
|
1809
1924
|
ok: !0,
|
|
@@ -1818,8 +1933,8 @@ class Tt {
|
|
|
1818
1933
|
this.storageKey,
|
|
1819
1934
|
JSON.stringify({
|
|
1820
1935
|
...r.data,
|
|
1821
|
-
accessTokenExpiresAt:
|
|
1822
|
-
refreshTokenExpiresAt:
|
|
1936
|
+
accessTokenExpiresAt: V(s, 8).getTime(),
|
|
1937
|
+
refreshTokenExpiresAt: j(F(s, 30), 2).getTime()
|
|
1823
1938
|
})
|
|
1824
1939
|
), {
|
|
1825
1940
|
ok: !0,
|
|
@@ -1842,8 +1957,8 @@ class Tt {
|
|
|
1842
1957
|
this.storageKey,
|
|
1843
1958
|
JSON.stringify({
|
|
1844
1959
|
...t.data,
|
|
1845
|
-
accessTokenExpiresAt:
|
|
1846
|
-
refreshTokenExpiresAt:
|
|
1960
|
+
accessTokenExpiresAt: V(a, 8).getTime(),
|
|
1961
|
+
refreshTokenExpiresAt: j(F(a, 30), 2).getTime()
|
|
1847
1962
|
})
|
|
1848
1963
|
), {
|
|
1849
1964
|
ok: !0,
|
|
@@ -1858,8 +1973,8 @@ class Tt {
|
|
|
1858
1973
|
this.storageKey,
|
|
1859
1974
|
JSON.stringify({
|
|
1860
1975
|
...t.data,
|
|
1861
|
-
accessTokenExpiresAt:
|
|
1862
|
-
refreshTokenExpiresAt:
|
|
1976
|
+
accessTokenExpiresAt: V(a, 8).getTime(),
|
|
1977
|
+
refreshTokenExpiresAt: j(F(a, 30), 2).getTime()
|
|
1863
1978
|
})
|
|
1864
1979
|
), { ok: !0 };
|
|
1865
1980
|
} else
|
|
@@ -1872,7 +1987,7 @@ class Tt {
|
|
|
1872
1987
|
data: null
|
|
1873
1988
|
};
|
|
1874
1989
|
if (this.refreshing)
|
|
1875
|
-
return await
|
|
1990
|
+
return await _e(1e3), await this.get();
|
|
1876
1991
|
const e = window.localStorage.getItem(this.storageKey);
|
|
1877
1992
|
if (!e)
|
|
1878
1993
|
return {
|
|
@@ -1882,7 +1997,7 @@ class Tt {
|
|
|
1882
1997
|
try {
|
|
1883
1998
|
let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
|
|
1884
1999
|
const r = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
|
|
1885
|
-
if (
|
|
2000
|
+
if (we(a, s))
|
|
1886
2001
|
return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
|
|
1887
2002
|
ok: !1,
|
|
1888
2003
|
error: {
|
|
@@ -1890,7 +2005,7 @@ class Tt {
|
|
|
1890
2005
|
message: "Session expired."
|
|
1891
2006
|
}
|
|
1892
2007
|
};
|
|
1893
|
-
if (
|
|
2008
|
+
if (we(a, r)) {
|
|
1894
2009
|
this.logger.info("Refreshing session..."), this.refreshing = !0;
|
|
1895
2010
|
const m = await this.authService.refreshSession(t.refreshToken);
|
|
1896
2011
|
if (this.refreshing = !1, !m.ok)
|
|
@@ -1904,8 +2019,8 @@ class Tt {
|
|
|
1904
2019
|
this.logger.success("Session refreshed!"), a = /* @__PURE__ */ new Date(), t = {
|
|
1905
2020
|
...t,
|
|
1906
2021
|
...m.data,
|
|
1907
|
-
accessTokenExpiresAt:
|
|
1908
|
-
refreshTokenExpiresAt:
|
|
2022
|
+
accessTokenExpiresAt: V(a, 8).getTime(),
|
|
2023
|
+
refreshTokenExpiresAt: j(F(a, 30), 2).getTime()
|
|
1909
2024
|
}, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
1910
2025
|
}
|
|
1911
2026
|
return {
|
|
@@ -1945,26 +2060,45 @@ class Tt {
|
|
|
1945
2060
|
return typeof window > "u";
|
|
1946
2061
|
}
|
|
1947
2062
|
}
|
|
1948
|
-
function
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
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);
|
|
1953
2086
|
if (!Number.isNaN(t))
|
|
1954
2087
|
return t;
|
|
1955
2088
|
}
|
|
1956
2089
|
return e;
|
|
1957
2090
|
}
|
|
1958
|
-
class
|
|
2091
|
+
class Dt {
|
|
1959
2092
|
constructor(e) {
|
|
1960
|
-
|
|
2093
|
+
c(this, "staticService");
|
|
1961
2094
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
1962
|
-
this.staticService = new
|
|
2095
|
+
this.staticService = new bt({
|
|
1963
2096
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
1964
2097
|
});
|
|
1965
2098
|
}
|
|
1966
2099
|
get transform() {
|
|
1967
2100
|
return {
|
|
2101
|
+
site: this.site.bind(this),
|
|
1968
2102
|
platform: this.platform.bind(this),
|
|
1969
2103
|
account: this.account.bind(this),
|
|
1970
2104
|
wallet: this.wallet.bind(this),
|
|
@@ -1987,8 +2121,16 @@ class vt {
|
|
|
1987
2121
|
pointsWallet: this.pointsWallet.bind(this)
|
|
1988
2122
|
};
|
|
1989
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
|
+
}
|
|
1990
2132
|
platform(e) {
|
|
1991
|
-
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;
|
|
1992
2134
|
return {
|
|
1993
2135
|
paymentSettings: {
|
|
1994
2136
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
@@ -2000,81 +2142,81 @@ class vt {
|
|
|
2000
2142
|
webEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.webEnabled) ?? !1,
|
|
2001
2143
|
mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
|
|
2002
2144
|
minimumAmount: i((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
|
|
2003
|
-
maximumAmount: i((
|
|
2145
|
+
maximumAmount: i((l = e.bankDepositGatewaySettings) == null ? void 0 : l.maximumAmount)
|
|
2004
2146
|
},
|
|
2005
2147
|
gcash: {
|
|
2006
2148
|
androidEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.androidEnabled) ?? !1,
|
|
2007
|
-
iosEnabled: ((
|
|
2149
|
+
iosEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.iosEnabled) ?? !1,
|
|
2008
2150
|
webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
|
|
2009
2151
|
mobileWebEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.mobileWebEnabled) ?? !1,
|
|
2010
|
-
minimumAmount: i((
|
|
2011
|
-
maximumAmount: i((
|
|
2152
|
+
minimumAmount: i((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
|
|
2153
|
+
maximumAmount: i((T = e.gcashDepositGatewaySettings) == null ? void 0 : T.maximumAmount)
|
|
2012
2154
|
},
|
|
2013
2155
|
maya: {
|
|
2014
|
-
androidEnabled: ((
|
|
2015
|
-
iosEnabled: ((
|
|
2016
|
-
webEnabled: ((
|
|
2017
|
-
mobileWebEnabled: ((
|
|
2018
|
-
minimumAmount: i((
|
|
2019
|
-
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)
|
|
2020
2162
|
},
|
|
2021
2163
|
mayaApp: {
|
|
2022
|
-
androidEnabled: ((
|
|
2023
|
-
iosEnabled: ((
|
|
2024
|
-
webEnabled: ((
|
|
2025
|
-
mobileWebEnabled: ((
|
|
2026
|
-
minimumAmount: i((
|
|
2027
|
-
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)
|
|
2028
2170
|
}
|
|
2029
2171
|
},
|
|
2030
2172
|
withdrawalGateway: {
|
|
2031
2173
|
bank: {
|
|
2032
|
-
androidEnabled: ((
|
|
2033
|
-
iosEnabled: ((
|
|
2034
|
-
webEnabled: ((
|
|
2035
|
-
mobileWebEnabled: ((
|
|
2036
|
-
minimumAmount: i((
|
|
2037
|
-
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)
|
|
2038
2180
|
},
|
|
2039
2181
|
gcash: {
|
|
2040
|
-
androidEnabled: ((
|
|
2041
|
-
iosEnabled: ((
|
|
2042
|
-
webEnabled: ((
|
|
2043
|
-
mobileWebEnabled: ((
|
|
2044
|
-
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),
|
|
2045
2187
|
maximumAmount: i(
|
|
2046
|
-
(
|
|
2188
|
+
(ae = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ae.maximumAmount,
|
|
2047
2189
|
1e6
|
|
2048
2190
|
)
|
|
2049
2191
|
},
|
|
2050
2192
|
maya: {
|
|
2051
|
-
androidEnabled: ((
|
|
2052
|
-
iosEnabled: ((
|
|
2053
|
-
webEnabled: ((
|
|
2054
|
-
mobileWebEnabled: ((
|
|
2055
|
-
minimumAmount: i((
|
|
2056
|
-
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)
|
|
2057
2199
|
},
|
|
2058
2200
|
mayaApp: {
|
|
2059
|
-
androidEnabled: ((
|
|
2060
|
-
iosEnabled: ((
|
|
2061
|
-
webEnabled: ((
|
|
2062
|
-
mobileWebEnabled: ((
|
|
2063
|
-
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),
|
|
2064
2206
|
maximumAmount: i(
|
|
2065
|
-
(
|
|
2207
|
+
(fe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : fe.maximumAmount,
|
|
2066
2208
|
1e6
|
|
2067
2209
|
)
|
|
2068
2210
|
}
|
|
2069
2211
|
}
|
|
2070
2212
|
},
|
|
2071
2213
|
pointsClubSettings: {
|
|
2072
|
-
multiplier: i((
|
|
2214
|
+
multiplier: i((he = e.pointsClubSettings) == null ? void 0 : he.multiplier, 0)
|
|
2073
2215
|
}
|
|
2074
2216
|
};
|
|
2075
2217
|
}
|
|
2076
2218
|
account(e) {
|
|
2077
|
-
|
|
2219
|
+
const t = {
|
|
2078
2220
|
id: e.id,
|
|
2079
2221
|
name: e.name,
|
|
2080
2222
|
status: e.status,
|
|
@@ -2086,7 +2228,7 @@ class vt {
|
|
|
2086
2228
|
mobileNumber: e.mobileNumber ?? void 0,
|
|
2087
2229
|
mobileNumberVerified: e.mobileNumberVerified ?? !1,
|
|
2088
2230
|
mobileNumberVerificationRequired: e.mobileNumberVerificationRequired ?? !1,
|
|
2089
|
-
validId: e.validId
|
|
2231
|
+
validId: e.validId ?? void 0,
|
|
2090
2232
|
verificationStatus: e.verificationStatus,
|
|
2091
2233
|
transactionPassword: e.transactionPassword,
|
|
2092
2234
|
secretAnswerSubmitted: e.secretAnswerSubmitted ?? !1,
|
|
@@ -2094,31 +2236,47 @@ class vt {
|
|
|
2094
2236
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2095
2237
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2096
2238
|
};
|
|
2239
|
+
return w(t);
|
|
2097
2240
|
}
|
|
2098
2241
|
wallet(e) {
|
|
2099
2242
|
return {
|
|
2100
|
-
|
|
2243
|
+
id: e.id,
|
|
2101
2244
|
balance: i(e.balance, 0),
|
|
2245
|
+
currency: e.currency,
|
|
2102
2246
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2103
2247
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2104
2248
|
};
|
|
2105
2249
|
}
|
|
2106
2250
|
verificationDetails(e) {
|
|
2107
2251
|
return {
|
|
2108
|
-
|
|
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,
|
|
2109
2259
|
selfieImage: this.file(e.selfieImage),
|
|
2110
2260
|
idFrontImage: this.file(e.idFrontImage)
|
|
2111
2261
|
};
|
|
2112
2262
|
}
|
|
2113
2263
|
profileCompletion(e) {
|
|
2114
2264
|
return {
|
|
2115
|
-
|
|
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,
|
|
2116
2270
|
completionPercentage: i(e, 0)
|
|
2117
2271
|
};
|
|
2118
2272
|
}
|
|
2119
2273
|
announcement(e) {
|
|
2120
2274
|
return {
|
|
2121
|
-
|
|
2275
|
+
id: e.id,
|
|
2276
|
+
type: e.type,
|
|
2277
|
+
title: e.title,
|
|
2278
|
+
status: e.status,
|
|
2279
|
+
message: e.message,
|
|
2122
2280
|
activationEndDateTime: new Date(e.activationEndDateTime),
|
|
2123
2281
|
activationStartDateTime: new Date(e.activationStartDateTime),
|
|
2124
2282
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
@@ -2126,50 +2284,61 @@ class vt {
|
|
|
2126
2284
|
};
|
|
2127
2285
|
}
|
|
2128
2286
|
withdrawalRecord(e) {
|
|
2129
|
-
|
|
2130
|
-
|
|
2287
|
+
const t = {
|
|
2288
|
+
id: e.id,
|
|
2289
|
+
type: e.type,
|
|
2290
|
+
bank: e.bank,
|
|
2291
|
+
status: e.status,
|
|
2131
2292
|
amount: i(e.amount, 0),
|
|
2132
2293
|
netAmount: i(e.netAmount, 0),
|
|
2133
2294
|
fee: i(e.fee, 0),
|
|
2134
2295
|
reference: e.reference ?? void 0,
|
|
2135
|
-
|
|
2296
|
+
withdrawalNumber: e.withdrawalNumber,
|
|
2136
2297
|
recipientMobileNumber: e.recipientMobileNumber ?? void 0,
|
|
2137
2298
|
dateTimeConfirmed: e.dateTimeConfirmed ? new Date(e.dateTimeConfirmed) : void 0,
|
|
2138
2299
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2139
2300
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2140
2301
|
};
|
|
2302
|
+
return w(t);
|
|
2141
2303
|
}
|
|
2142
2304
|
deposit(e) {
|
|
2143
|
-
|
|
2305
|
+
const t = {
|
|
2144
2306
|
id: e.id,
|
|
2145
2307
|
type: e.type,
|
|
2146
2308
|
status: e.status,
|
|
2147
2309
|
checkoutUrl: e.checkoutUrl ?? void 0
|
|
2148
2310
|
};
|
|
2311
|
+
return w(t);
|
|
2149
2312
|
}
|
|
2150
2313
|
depositRecord(e) {
|
|
2151
|
-
|
|
2152
|
-
|
|
2314
|
+
const t = {
|
|
2315
|
+
id: e.id,
|
|
2316
|
+
type: e.type,
|
|
2317
|
+
status: e.status,
|
|
2153
2318
|
amount: i(e.amount, 0),
|
|
2154
2319
|
fee: i(e.fee, 0),
|
|
2155
2320
|
netAmount: i(e.netAmount, 0),
|
|
2156
2321
|
reference: e.reference ?? void 0,
|
|
2322
|
+
depositNumber: e.depositNumber,
|
|
2157
2323
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2158
2324
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2159
2325
|
};
|
|
2326
|
+
return w(t);
|
|
2160
2327
|
}
|
|
2161
2328
|
betRecord(e) {
|
|
2162
|
-
var
|
|
2163
|
-
|
|
2164
|
-
|
|
2329
|
+
var a;
|
|
2330
|
+
const t = {
|
|
2331
|
+
id: e.id,
|
|
2165
2332
|
bet: i(e.bet, 0),
|
|
2166
2333
|
payout: i(e.payout, 0),
|
|
2334
|
+
status: e.status,
|
|
2167
2335
|
jackpotContribution: i(e.jackpotContribution, 0),
|
|
2168
2336
|
jackpotPayout: i(e.jackpotPayout, 0),
|
|
2169
2337
|
winloss: i(e.winloss),
|
|
2170
2338
|
validBet: i(e.validBet, 0),
|
|
2171
2339
|
vendorRoundId: e.vendorRoundId ?? void 0,
|
|
2172
2340
|
game: this.game(e.game),
|
|
2341
|
+
serialCode: e.serialCode,
|
|
2173
2342
|
dateTimeSettled: e.dateTimeSettled ? new Date(e.dateTimeSettled) : void 0,
|
|
2174
2343
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2175
2344
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated),
|
|
@@ -2177,13 +2346,15 @@ class vt {
|
|
|
2177
2346
|
contestName: e.contestName ?? void 0,
|
|
2178
2347
|
externalCategory: e.externalCategory ?? void 0,
|
|
2179
2348
|
metadata: {
|
|
2180
|
-
odds: ((
|
|
2349
|
+
odds: ((a = e.metadata) == null ? void 0 : a.odds) ?? void 0
|
|
2181
2350
|
}
|
|
2182
2351
|
};
|
|
2352
|
+
return w(t);
|
|
2183
2353
|
}
|
|
2184
2354
|
latestBetRecord(e) {
|
|
2185
2355
|
return {
|
|
2186
|
-
|
|
2356
|
+
id: e.id,
|
|
2357
|
+
member: e.member,
|
|
2187
2358
|
game: this.game(e.game),
|
|
2188
2359
|
bet: i(e.bet, 0),
|
|
2189
2360
|
payout: i(e.payout, 0),
|
|
@@ -2193,31 +2364,43 @@ class vt {
|
|
|
2193
2364
|
};
|
|
2194
2365
|
}
|
|
2195
2366
|
transactionRecord(e) {
|
|
2196
|
-
|
|
2197
|
-
|
|
2367
|
+
const t = {
|
|
2368
|
+
id: e.id,
|
|
2369
|
+
type: e.type,
|
|
2198
2370
|
amount: i(e.amount, 0),
|
|
2199
2371
|
content: e.content ?? void 0,
|
|
2200
2372
|
currentBalance: i(e.currentBalance, 0),
|
|
2373
|
+
referenceNumber: e.referenceNumber,
|
|
2201
2374
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2202
2375
|
};
|
|
2376
|
+
return w(t);
|
|
2203
2377
|
}
|
|
2204
2378
|
game(e) {
|
|
2205
|
-
const t = this.staticService.gameThumbnails(e);
|
|
2206
2379
|
return {
|
|
2207
|
-
|
|
2208
|
-
|
|
2380
|
+
id: e.id,
|
|
2381
|
+
type: e.type,
|
|
2382
|
+
name: e.name,
|
|
2383
|
+
images: this.staticService.gameThumbnails(e),
|
|
2384
|
+
provider: e.provider
|
|
2209
2385
|
};
|
|
2210
2386
|
}
|
|
2211
2387
|
gameSession(e) {
|
|
2212
|
-
|
|
2213
|
-
|
|
2388
|
+
const t = {
|
|
2389
|
+
id: e.id,
|
|
2390
|
+
status: e.status,
|
|
2391
|
+
launchUrl: e.launchUrl ?? void 0,
|
|
2214
2392
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2215
2393
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2216
2394
|
};
|
|
2395
|
+
return w(t);
|
|
2217
2396
|
}
|
|
2218
2397
|
promo(e) {
|
|
2219
2398
|
return {
|
|
2220
|
-
|
|
2399
|
+
id: e.id,
|
|
2400
|
+
type: e.type,
|
|
2401
|
+
name: e.name,
|
|
2402
|
+
status: e.status,
|
|
2403
|
+
description: e.description,
|
|
2221
2404
|
banner: this.file(e.banner),
|
|
2222
2405
|
maximumBonusAmount: i(e.maximumBonusAmount),
|
|
2223
2406
|
minimumBonusAmount: i(e.minimumBonusAmount),
|
|
@@ -2229,7 +2412,10 @@ class vt {
|
|
|
2229
2412
|
}
|
|
2230
2413
|
cashback(e) {
|
|
2231
2414
|
return {
|
|
2232
|
-
|
|
2415
|
+
id: e.id,
|
|
2416
|
+
name: e.name,
|
|
2417
|
+
description: e.description,
|
|
2418
|
+
status: e.status,
|
|
2233
2419
|
banner: this.file(e.banner),
|
|
2234
2420
|
activationEndDateTime: new Date(e.activationEndDateTime),
|
|
2235
2421
|
activationStartDateTime: new Date(e.activationStartDateTime),
|
|
@@ -2238,12 +2424,12 @@ class vt {
|
|
|
2238
2424
|
};
|
|
2239
2425
|
}
|
|
2240
2426
|
bonus(e) {
|
|
2241
|
-
|
|
2242
|
-
|
|
2427
|
+
const t = {
|
|
2428
|
+
id: e.id,
|
|
2243
2429
|
promo: this.promo(e.promo),
|
|
2244
|
-
/* deposit here does not have an id and depositNumber field */
|
|
2245
2430
|
deposit: e.deposit ? {
|
|
2246
|
-
|
|
2431
|
+
type: e.deposit.type,
|
|
2432
|
+
status: e.deposit.status,
|
|
2247
2433
|
fee: i(e.deposit.fee, 0),
|
|
2248
2434
|
amount: i(e.deposit.amount, 0),
|
|
2249
2435
|
netAmount: i(e.deposit.netAmount, 0),
|
|
@@ -2266,6 +2452,7 @@ class vt {
|
|
|
2266
2452
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2267
2453
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2268
2454
|
};
|
|
2455
|
+
return w(t);
|
|
2269
2456
|
}
|
|
2270
2457
|
cashbackBonus(e) {
|
|
2271
2458
|
return {
|
|
@@ -2277,11 +2464,13 @@ class vt {
|
|
|
2277
2464
|
};
|
|
2278
2465
|
}
|
|
2279
2466
|
file(e) {
|
|
2280
|
-
|
|
2281
|
-
|
|
2467
|
+
const t = {
|
|
2468
|
+
id: e.id,
|
|
2282
2469
|
url: e.url ?? void 0,
|
|
2470
|
+
status: e.status,
|
|
2283
2471
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2284
2472
|
};
|
|
2473
|
+
return w(t);
|
|
2285
2474
|
}
|
|
2286
2475
|
pointsWallet(e) {
|
|
2287
2476
|
return {
|
|
@@ -2292,23 +2481,29 @@ class vt {
|
|
|
2292
2481
|
};
|
|
2293
2482
|
}
|
|
2294
2483
|
}
|
|
2295
|
-
|
|
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 {
|
|
2296
2486
|
constructor(e) {
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
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");
|
|
2306
2497
|
const t = e.environment === "development";
|
|
2307
|
-
this.sessionManager = new
|
|
2498
|
+
this.sessionManager = new Nt({
|
|
2308
2499
|
authUrl: t ? "https://auth.development.opexa.io" : "https://auth.opexa.io",
|
|
2309
2500
|
walletUrl: t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2310
2501
|
platform: e.platform,
|
|
2311
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
|
|
2312
2507
|
});
|
|
2313
2508
|
const a = {
|
|
2314
2509
|
middlewares: [this.authMiddleware],
|
|
@@ -2319,37 +2514,37 @@ class Nt {
|
|
|
2319
2514
|
}
|
|
2320
2515
|
}
|
|
2321
2516
|
};
|
|
2322
|
-
this.gameService = new
|
|
2323
|
-
new
|
|
2517
|
+
this.gameService = new _t(
|
|
2518
|
+
new b(
|
|
2324
2519
|
t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
|
|
2325
2520
|
a
|
|
2326
2521
|
)
|
|
2327
|
-
), this.fileService = new
|
|
2328
|
-
new
|
|
2522
|
+
), this.fileService = new At(
|
|
2523
|
+
new b(
|
|
2329
2524
|
t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
|
|
2330
2525
|
a
|
|
2331
2526
|
)
|
|
2332
|
-
), this.walletService = new
|
|
2333
|
-
new
|
|
2527
|
+
), this.walletService = new be(
|
|
2528
|
+
new b(
|
|
2334
2529
|
t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2335
2530
|
a
|
|
2336
2531
|
)
|
|
2337
|
-
), this.reportService = new
|
|
2338
|
-
new
|
|
2532
|
+
), this.reportService = new St(
|
|
2533
|
+
new b(
|
|
2339
2534
|
t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
|
|
2340
2535
|
a
|
|
2341
2536
|
)
|
|
2342
|
-
), this.accountService = new
|
|
2343
|
-
new
|
|
2537
|
+
), this.accountService = new gt(
|
|
2538
|
+
new b(
|
|
2344
2539
|
t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
|
|
2345
2540
|
a
|
|
2346
2541
|
)
|
|
2347
|
-
), this.portalService = new
|
|
2348
|
-
new
|
|
2542
|
+
), this.portalService = new Tt(
|
|
2543
|
+
new b(
|
|
2349
2544
|
t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
|
|
2350
2545
|
a
|
|
2351
2546
|
)
|
|
2352
|
-
), this.transformer = new
|
|
2547
|
+
), this.transformer = new Dt(e), this.logger = new ke({
|
|
2353
2548
|
enabled: e.log ?? !1
|
|
2354
2549
|
});
|
|
2355
2550
|
}
|
|
@@ -2365,7 +2560,7 @@ class Nt {
|
|
|
2365
2560
|
case "NAME_AND_PASSWORD": {
|
|
2366
2561
|
const t = await this.sessionManager.create({
|
|
2367
2562
|
...e,
|
|
2368
|
-
password: await
|
|
2563
|
+
password: await g(e.password)
|
|
2369
2564
|
});
|
|
2370
2565
|
return t.ok ? t.data ? {
|
|
2371
2566
|
ok: !0,
|
|
@@ -2425,7 +2620,7 @@ class Nt {
|
|
|
2425
2620
|
return await this.sessionManager.createFromAuthenticator({
|
|
2426
2621
|
type: "SECURITY_QUESTION",
|
|
2427
2622
|
token: e.token,
|
|
2428
|
-
secretAnswer: await
|
|
2623
|
+
secretAnswer: await g(e.secretAnswer)
|
|
2429
2624
|
});
|
|
2430
2625
|
default:
|
|
2431
2626
|
return {
|
|
@@ -2465,7 +2660,7 @@ class Nt {
|
|
|
2465
2660
|
* ```
|
|
2466
2661
|
*/
|
|
2467
2662
|
watchSession(e) {
|
|
2468
|
-
const t =
|
|
2663
|
+
const t = Ct(e.interval ?? 3e4, 3e4, 6e4);
|
|
2469
2664
|
let a = null;
|
|
2470
2665
|
const r = () => setTimeout(async () => {
|
|
2471
2666
|
await this.sessionManager.verify() || await e.onInvalid(), a = r();
|
|
@@ -2484,11 +2679,23 @@ class Nt {
|
|
|
2484
2679
|
} : null
|
|
2485
2680
|
} : e;
|
|
2486
2681
|
}
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
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
|
+
/**/
|
|
2492
2699
|
async platform() {
|
|
2493
2700
|
const e = await this.accountService.platform();
|
|
2494
2701
|
return e.ok ? {
|
|
@@ -2496,11 +2703,11 @@ class Nt {
|
|
|
2496
2703
|
data: this.transformer.transform.platform(e.data)
|
|
2497
2704
|
} : e;
|
|
2498
2705
|
}
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2706
|
+
/**/
|
|
2707
|
+
/*+----------------------------------------+*/
|
|
2708
|
+
/*+ ACCOUNT +*/
|
|
2709
|
+
/*+----------------------------------------+*/
|
|
2710
|
+
/**/
|
|
2504
2711
|
async account() {
|
|
2505
2712
|
const [e, t] = await Promise.all([
|
|
2506
2713
|
this.accountService.memberAccount(),
|
|
@@ -2536,12 +2743,12 @@ class Nt {
|
|
|
2536
2743
|
* ```
|
|
2537
2744
|
*/
|
|
2538
2745
|
async createAccount(e) {
|
|
2539
|
-
const t = e.id ??
|
|
2746
|
+
const t = e.id ?? A.generate(S.Account).toString(), a = await this.accountService.registerMemberAccount({
|
|
2540
2747
|
input: {
|
|
2541
2748
|
id: t,
|
|
2542
2749
|
name: e.name,
|
|
2543
2750
|
birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
|
|
2544
|
-
password: await
|
|
2751
|
+
password: await g(e.password),
|
|
2545
2752
|
mobileNumber: this.addAreaCode(e.mobileNumber),
|
|
2546
2753
|
domain: e.domain,
|
|
2547
2754
|
btag: e.referralCode
|
|
@@ -2572,12 +2779,12 @@ class Nt {
|
|
|
2572
2779
|
id: e,
|
|
2573
2780
|
data: {
|
|
2574
2781
|
...t,
|
|
2575
|
-
password: t.password ? await
|
|
2576
|
-
transactionPassword: t.transactionPassword ? await
|
|
2782
|
+
password: t.password ? await g(t.password) : void 0,
|
|
2783
|
+
transactionPassword: t.transactionPassword ? await g(t.transactionPassword) : void 0,
|
|
2577
2784
|
...t.mobileNumber && {
|
|
2578
2785
|
mobileNumber: this.addAreaCode(t.mobileNumber)
|
|
2579
2786
|
},
|
|
2580
|
-
secretAnswer: t.secretAnswer ? await
|
|
2787
|
+
secretAnswer: t.secretAnswer ? await g(t.secretAnswer) : void 0
|
|
2581
2788
|
}
|
|
2582
2789
|
}
|
|
2583
2790
|
});
|
|
@@ -2618,7 +2825,7 @@ class Nt {
|
|
|
2618
2825
|
* ```
|
|
2619
2826
|
*/
|
|
2620
2827
|
async submitVerificationDetails(e) {
|
|
2621
|
-
const t = e.id ??
|
|
2828
|
+
const t = e.id ?? A.generate(S.Verification).toString(), a = await this.accountService.createMemberVerification({
|
|
2622
2829
|
input: {
|
|
2623
2830
|
id: t,
|
|
2624
2831
|
...e
|
|
@@ -2655,7 +2862,7 @@ class Nt {
|
|
|
2655
2862
|
return await this.accountService.resetPassword({
|
|
2656
2863
|
input: {
|
|
2657
2864
|
mobileNumber: this.addAreaCode(e.mobileNumber),
|
|
2658
|
-
newPassword: await
|
|
2865
|
+
newPassword: await g(e.newPassword)
|
|
2659
2866
|
},
|
|
2660
2867
|
verificationCode: e.verificationCode
|
|
2661
2868
|
});
|
|
@@ -2689,11 +2896,11 @@ class Nt {
|
|
|
2689
2896
|
data: e.data ? this.transformer.transform.wallet(e.data) : null
|
|
2690
2897
|
} : e;
|
|
2691
2898
|
}
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2899
|
+
/**/
|
|
2900
|
+
/*+----------------------------------------+*/
|
|
2901
|
+
/*+ ANNOUNCEMENT +*/
|
|
2902
|
+
/*+----------------------------------------+*/
|
|
2903
|
+
/**/
|
|
2697
2904
|
async announcements(e) {
|
|
2698
2905
|
const t = await this.accountService.announcements({
|
|
2699
2906
|
...e,
|
|
@@ -2719,11 +2926,11 @@ class Nt {
|
|
|
2719
2926
|
}
|
|
2720
2927
|
} : t;
|
|
2721
2928
|
}
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2929
|
+
/**/
|
|
2930
|
+
/*+----------------------------------------+*/
|
|
2931
|
+
/*+ WITHDRAWAL +*/
|
|
2932
|
+
/*+----------------------------------------+*/
|
|
2933
|
+
/**/
|
|
2727
2934
|
/**
|
|
2728
2935
|
* @example
|
|
2729
2936
|
* ```ts
|
|
@@ -2742,13 +2949,13 @@ class Nt {
|
|
|
2742
2949
|
* ```
|
|
2743
2950
|
*/
|
|
2744
2951
|
async createWithdrawal(e) {
|
|
2745
|
-
const t = e.id ??
|
|
2952
|
+
const t = e.id ?? A.generate(S.Withdrawal).toString();
|
|
2746
2953
|
if (e.type === "BANK") {
|
|
2747
2954
|
const a = await this.walletService.createBankWithdrawal({
|
|
2748
2955
|
input: {
|
|
2749
2956
|
id: t,
|
|
2750
2957
|
amount: e.amount.toString(),
|
|
2751
|
-
transactionPassword: await
|
|
2958
|
+
transactionPassword: await g(e.transactionPassword)
|
|
2752
2959
|
}
|
|
2753
2960
|
});
|
|
2754
2961
|
if (!a.ok) return a;
|
|
@@ -2758,7 +2965,7 @@ class Nt {
|
|
|
2758
2965
|
input: {
|
|
2759
2966
|
id: t,
|
|
2760
2967
|
amount: e.amount.toString(),
|
|
2761
|
-
transactionPassword: await
|
|
2968
|
+
transactionPassword: await g(e.transactionPassword),
|
|
2762
2969
|
recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
|
|
2763
2970
|
}
|
|
2764
2971
|
});
|
|
@@ -2769,7 +2976,7 @@ class Nt {
|
|
|
2769
2976
|
input: {
|
|
2770
2977
|
id: t,
|
|
2771
2978
|
amount: e.amount.toString(),
|
|
2772
|
-
transactionPassword: await
|
|
2979
|
+
transactionPassword: await g(e.transactionPassword),
|
|
2773
2980
|
recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
|
|
2774
2981
|
}
|
|
2775
2982
|
});
|
|
@@ -2780,7 +2987,7 @@ class Nt {
|
|
|
2780
2987
|
input: {
|
|
2781
2988
|
id: t,
|
|
2782
2989
|
amount: e.amount.toString(),
|
|
2783
|
-
transactionPassword: await
|
|
2990
|
+
transactionPassword: await g(e.transactionPassword)
|
|
2784
2991
|
}
|
|
2785
2992
|
});
|
|
2786
2993
|
if (!a.ok) return a;
|
|
@@ -2805,11 +3012,11 @@ class Nt {
|
|
|
2805
3012
|
async remainingDailyWithdrawalsCount() {
|
|
2806
3013
|
return await this.walletService.remainingDailyWithdrawalsCount();
|
|
2807
3014
|
}
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
3015
|
+
/**/
|
|
3016
|
+
/*+----------------------------------------+*/
|
|
3017
|
+
/*+ DEPOSIT +*/
|
|
3018
|
+
/*+----------------------------------------+*/
|
|
3019
|
+
/**/
|
|
2813
3020
|
/**
|
|
2814
3021
|
* @example
|
|
2815
3022
|
* ```ts
|
|
@@ -2828,7 +3035,7 @@ class Nt {
|
|
|
2828
3035
|
* ```
|
|
2829
3036
|
*/
|
|
2830
3037
|
async createDeposit(e) {
|
|
2831
|
-
const t = e.id ??
|
|
3038
|
+
const t = e.id ?? A.generate(S.Deposit).toString();
|
|
2832
3039
|
if (e.type === "MAYA") {
|
|
2833
3040
|
const a = await this.walletService.createMayaDeposit({
|
|
2834
3041
|
input: {
|
|
@@ -2886,11 +3093,11 @@ class Nt {
|
|
|
2886
3093
|
async depositsCount() {
|
|
2887
3094
|
return await this.reportService.depositsCount();
|
|
2888
3095
|
}
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
3096
|
+
/**/
|
|
3097
|
+
/*+----------------------------------------+*/
|
|
3098
|
+
/*+ BET +*/
|
|
3099
|
+
/*+----------------------------------------+*/
|
|
3100
|
+
/**/
|
|
2894
3101
|
async betRecords(e) {
|
|
2895
3102
|
const t = await this.reportService.betRecords(e);
|
|
2896
3103
|
return t.ok ? {
|
|
@@ -2913,11 +3120,11 @@ class Nt {
|
|
|
2913
3120
|
data: e.data.map(this.transformer.transform.latestBetRecord)
|
|
2914
3121
|
} : e;
|
|
2915
3122
|
}
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
3123
|
+
/**/
|
|
3124
|
+
/*+----------------------------------------+*/
|
|
3125
|
+
/*+ TRANSACTION +*/
|
|
3126
|
+
/*+----------------------------------------+*/
|
|
3127
|
+
/**/
|
|
2921
3128
|
async transactionRecords(e) {
|
|
2922
3129
|
const t = await this.reportService.transactionRecords(e);
|
|
2923
3130
|
return t.ok ? {
|
|
@@ -2933,11 +3140,11 @@ class Nt {
|
|
|
2933
3140
|
}
|
|
2934
3141
|
} : t;
|
|
2935
3142
|
}
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
3143
|
+
/**/
|
|
3144
|
+
/*+----------------------------------------+*/
|
|
3145
|
+
/*+ PROMO +*/
|
|
3146
|
+
/*+----------------------------------------+*/
|
|
3147
|
+
/**/
|
|
2941
3148
|
async promos() {
|
|
2942
3149
|
const e = await this.walletService.promos();
|
|
2943
3150
|
return e.ok ? {
|
|
@@ -2976,11 +3183,18 @@ class Nt {
|
|
|
2976
3183
|
async claimCashbackBonus(e) {
|
|
2977
3184
|
return await this.walletService.claimCashbackBonus({ input: { id: e } });
|
|
2978
3185
|
}
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
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
|
+
}
|
|
2984
3198
|
async games(e) {
|
|
2985
3199
|
const t = await this.walletService.games(e);
|
|
2986
3200
|
return t.ok ? {
|
|
@@ -2996,6 +3210,21 @@ class Nt {
|
|
|
2996
3210
|
}
|
|
2997
3211
|
} : t;
|
|
2998
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
|
+
}
|
|
2999
3228
|
async games__legacy(e) {
|
|
3000
3229
|
const t = await this.gameService.games(e);
|
|
3001
3230
|
return t.ok ? {
|
|
@@ -3036,7 +3265,10 @@ class Nt {
|
|
|
3036
3265
|
const t = await this.gameService.gameSession({ id: e });
|
|
3037
3266
|
return t.ok ? {
|
|
3038
3267
|
ok: !0,
|
|
3039
|
-
data: t.data ? this.transformer.transform.gameSession(
|
|
3268
|
+
data: t.data ? this.transformer.transform.gameSession({
|
|
3269
|
+
...t.data,
|
|
3270
|
+
game: t.data.game.id
|
|
3271
|
+
}) : null
|
|
3040
3272
|
} : t;
|
|
3041
3273
|
}
|
|
3042
3274
|
/**
|
|
@@ -3055,7 +3287,7 @@ class Nt {
|
|
|
3055
3287
|
* ```
|
|
3056
3288
|
*/
|
|
3057
3289
|
async createGameSession(e) {
|
|
3058
|
-
const t = e.id ??
|
|
3290
|
+
const t = e.id ?? A.generate(S.GameSession).toString(), a = await this.walletService.createGameSession({
|
|
3059
3291
|
input: {
|
|
3060
3292
|
id: t,
|
|
3061
3293
|
game: e.game
|
|
@@ -3064,7 +3296,7 @@ class Nt {
|
|
|
3064
3296
|
return a.ok ? { ok: !0, data: { id: t } } : a;
|
|
3065
3297
|
}
|
|
3066
3298
|
async createGameSession__legacy(e) {
|
|
3067
|
-
const t = e.id ??
|
|
3299
|
+
const t = e.id ?? A.generate(S.GameSession).toString(), a = await this.gameService.createGameSession({
|
|
3068
3300
|
input: {
|
|
3069
3301
|
id: t,
|
|
3070
3302
|
game: e.game
|
|
@@ -3078,11 +3310,11 @@ class Nt {
|
|
|
3078
3310
|
async endGameSession__legacy(e) {
|
|
3079
3311
|
return await this.gameService.endGameSession({ input: { id: e } });
|
|
3080
3312
|
}
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3313
|
+
/**/
|
|
3314
|
+
/*+----------------------------------------+*/
|
|
3315
|
+
/*+ FILE +*/
|
|
3316
|
+
/*+----------------------------------------+*/
|
|
3317
|
+
/**/
|
|
3086
3318
|
async file(e) {
|
|
3087
3319
|
const t = await this.fileService.file({ id: e });
|
|
3088
3320
|
return t.ok ? {
|
|
@@ -3106,7 +3338,7 @@ class Nt {
|
|
|
3106
3338
|
* ```
|
|
3107
3339
|
*/
|
|
3108
3340
|
async uploadImageFile(e) {
|
|
3109
|
-
const t = e.id ??
|
|
3341
|
+
const t = e.id ?? A.generate(S.File).toString(), a = await this.fileService.uploadPrivateImageFile({
|
|
3110
3342
|
input: {
|
|
3111
3343
|
id: t,
|
|
3112
3344
|
file: e.file
|
|
@@ -3114,11 +3346,11 @@ class Nt {
|
|
|
3114
3346
|
});
|
|
3115
3347
|
return a.ok ? { ok: !0, data: { id: t } } : a;
|
|
3116
3348
|
}
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3349
|
+
/**/
|
|
3350
|
+
/*+----------------------------------------+*/
|
|
3351
|
+
/*+ POINTS +*/
|
|
3352
|
+
/*+----------------------------------------+*/
|
|
3353
|
+
/**/
|
|
3122
3354
|
async pointsWallet() {
|
|
3123
3355
|
const e = await this.walletService.pointsWallet();
|
|
3124
3356
|
return e.ok ? {
|
|
@@ -3138,8 +3370,8 @@ class Nt {
|
|
|
3138
3370
|
}
|
|
3139
3371
|
}
|
|
3140
3372
|
export {
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3373
|
+
Ot as ObjectId,
|
|
3374
|
+
S as ObjectType,
|
|
3375
|
+
Gt as Sdk
|
|
3144
3376
|
};
|
|
3145
3377
|
//# sourceMappingURL=index.mjs.map
|