@opexa/portal-sdk 0.0.22 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +65 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +168 -150
- package/dist/index.mjs.map +1 -1
- package/dist/services/game.service.d.ts +2 -2
- package/dist/services/queries.d.ts +1 -0
- package/dist/services/types.d.ts +13 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var d = (n, e, t) =>
|
|
1
|
+
var ke = Object.defineProperty;
|
|
2
|
+
var Ce = (n, e, t) => e in n ? ke(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var d = (n, e, t) => Ce(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { ObjectId as b } from "@opexa/object-id";
|
|
5
|
-
import { ObjectId as
|
|
5
|
+
import { ObjectId as Pt } from "@opexa/object-id";
|
|
6
6
|
const g = {
|
|
7
7
|
Account: 8,
|
|
8
8
|
Deposit: 9,
|
|
@@ -27,7 +27,7 @@ const C = o`
|
|
|
27
27
|
status
|
|
28
28
|
dateTimeCreated
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
30
|
+
`, _e = o`
|
|
31
31
|
${C}
|
|
32
32
|
|
|
33
33
|
query File($id: ObjectId!) {
|
|
@@ -37,7 +37,7 @@ const C = o`
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`, Te = o`
|
|
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
|
+
`, ve = o`
|
|
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
|
+
`, Me = o`
|
|
65
65
|
query PointsWallet {
|
|
66
66
|
pointsWallet {
|
|
67
67
|
id
|
|
@@ -113,7 +113,7 @@ const C = o`
|
|
|
113
113
|
id
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
`,
|
|
116
|
+
`, De = o`
|
|
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
|
+
`, be = o`
|
|
130
130
|
mutation CreateGameSession($input: CreateGameSessionInput!) {
|
|
131
131
|
createGameSession(input: $input) {
|
|
132
132
|
... on GameDoesNotExistError {
|
|
@@ -139,6 +139,21 @@ const C = o`
|
|
|
139
139
|
endGameSession(input: $input)
|
|
140
140
|
}
|
|
141
141
|
`, Re = o`
|
|
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
|
+
`, Ge = o`
|
|
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
|
+
`, Pe = o`
|
|
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
|
+
`, xe = o`
|
|
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 = o`
|
|
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
|
+
`, Be = o`
|
|
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
|
-
`,
|
|
309
|
+
`, We = o`
|
|
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
|
-
`,
|
|
329
|
+
`, Ue = o`
|
|
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
|
+
`, Oe = o`
|
|
338
353
|
query RemainingDailyWithdrawalsCount {
|
|
339
354
|
remainingDailyWithdrawalsCount
|
|
340
355
|
}
|
|
341
|
-
`,
|
|
356
|
+
`, qe = o`
|
|
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
|
+
`, Fe = o`
|
|
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
|
+
`, Le = o`
|
|
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
|
+
`, Ve = o`
|
|
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
|
+
`, Ye = o`
|
|
458
473
|
query Deposit($id: ObjectId!) {
|
|
459
474
|
node(id: $id) {
|
|
460
475
|
... on GCashDeposit {
|
|
@@ -486,13 +501,13 @@ const C = o`
|
|
|
486
501
|
}
|
|
487
502
|
}
|
|
488
503
|
}
|
|
489
|
-
`,
|
|
504
|
+
`, He = o`
|
|
490
505
|
query DepositsCount {
|
|
491
506
|
member {
|
|
492
507
|
depositsCount
|
|
493
508
|
}
|
|
494
509
|
}
|
|
495
|
-
`,
|
|
510
|
+
`, je = o`
|
|
496
511
|
${_}
|
|
497
512
|
|
|
498
513
|
query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
|
|
@@ -532,7 +547,7 @@ const C = o`
|
|
|
532
547
|
}
|
|
533
548
|
}
|
|
534
549
|
}
|
|
535
|
-
`,
|
|
550
|
+
`, Qe = o`
|
|
536
551
|
query LatestBetRecords {
|
|
537
552
|
latestBetRecords {
|
|
538
553
|
id
|
|
@@ -552,7 +567,7 @@ const C = o`
|
|
|
552
567
|
}
|
|
553
568
|
|
|
554
569
|
${_}
|
|
555
|
-
`,
|
|
570
|
+
`, Ke = o`
|
|
556
571
|
query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
|
|
557
572
|
member {
|
|
558
573
|
transactionRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -597,7 +612,7 @@ const C = o`
|
|
|
597
612
|
dateTimeCreated
|
|
598
613
|
dateTimeLastUpdated
|
|
599
614
|
}
|
|
600
|
-
`,
|
|
615
|
+
`, ze = o`
|
|
601
616
|
${v}
|
|
602
617
|
|
|
603
618
|
query Promos {
|
|
@@ -605,7 +620,7 @@ const C = o`
|
|
|
605
620
|
...PromoFragment
|
|
606
621
|
}
|
|
607
622
|
}
|
|
608
|
-
`,
|
|
623
|
+
`, Je = o`
|
|
609
624
|
${v}
|
|
610
625
|
|
|
611
626
|
query AvailablePromos($filter: PromoFilterInput) {
|
|
@@ -613,7 +628,7 @@ const C = o`
|
|
|
613
628
|
...PromoFragment
|
|
614
629
|
}
|
|
615
630
|
}
|
|
616
|
-
`,
|
|
631
|
+
`, ge = o`
|
|
617
632
|
${C}
|
|
618
633
|
|
|
619
634
|
fragment CashbackFragment on Cashback {
|
|
@@ -629,15 +644,15 @@ const C = o`
|
|
|
629
644
|
dateTimeCreated
|
|
630
645
|
dateTimeLastUpdated
|
|
631
646
|
}
|
|
632
|
-
`,
|
|
633
|
-
${
|
|
647
|
+
`, Xe = o`
|
|
648
|
+
${ge}
|
|
634
649
|
|
|
635
650
|
query Cashbacks {
|
|
636
651
|
cashbacks {
|
|
637
652
|
...CashbackFragment
|
|
638
653
|
}
|
|
639
654
|
}
|
|
640
|
-
`,
|
|
655
|
+
`, Ze = o`
|
|
641
656
|
${v}
|
|
642
657
|
|
|
643
658
|
query Bonus {
|
|
@@ -666,8 +681,8 @@ const C = o`
|
|
|
666
681
|
dateTimeLastUpdated
|
|
667
682
|
}
|
|
668
683
|
}
|
|
669
|
-
`,
|
|
670
|
-
${
|
|
684
|
+
`, et = o`
|
|
685
|
+
${ge}
|
|
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
|
+
`, tt = o`
|
|
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
|
+
`, at = o`
|
|
692
707
|
query Member {
|
|
693
708
|
member {
|
|
694
709
|
dateTimeLastActive
|
|
695
710
|
}
|
|
696
711
|
}
|
|
697
|
-
`,
|
|
712
|
+
`, rt = o`
|
|
698
713
|
query MemberAccount {
|
|
699
714
|
memberAccount: self {
|
|
700
715
|
... on MemberAccount {
|
|
@@ -718,7 +733,7 @@ const C = o`
|
|
|
718
733
|
}
|
|
719
734
|
}
|
|
720
735
|
}
|
|
721
|
-
`,
|
|
736
|
+
`, nt = o`
|
|
722
737
|
${C}
|
|
723
738
|
|
|
724
739
|
query MemberVerification {
|
|
@@ -742,7 +757,7 @@ const C = o`
|
|
|
742
757
|
}
|
|
743
758
|
}
|
|
744
759
|
}
|
|
745
|
-
`,
|
|
760
|
+
`, ot = o`
|
|
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
|
+
`, it = o`
|
|
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
|
+
`, st = o`
|
|
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
|
+
`, mt = o`
|
|
819
834
|
mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
|
|
820
835
|
deleteMemberAccount(input: $input)
|
|
821
836
|
}
|
|
822
|
-
`,
|
|
837
|
+
`, dt = o`
|
|
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
|
+
`, ct = o`
|
|
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
|
+
`, ut = o`
|
|
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
|
+
`, lt = o`
|
|
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
|
+
`, pt = o`
|
|
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
|
+
`, ht = o`
|
|
887
902
|
fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
|
|
888
903
|
minimumAmount
|
|
889
904
|
maximumAmount
|
|
@@ -1000,21 +1015,21 @@ function c(n) {
|
|
|
1000
1015
|
}[n]
|
|
1001
1016
|
};
|
|
1002
1017
|
}
|
|
1003
|
-
class
|
|
1018
|
+
class wt {
|
|
1004
1019
|
constructor(e) {
|
|
1005
1020
|
d(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(rt);
|
|
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(ot, e);
|
|
1018
1033
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1019
1034
|
ok: !1,
|
|
1020
1035
|
error: c(t.data.registerMemberAccount.__typename)
|
|
@@ -1023,7 +1038,7 @@ class ht {
|
|
|
1023
1038
|
} : t;
|
|
1024
1039
|
}
|
|
1025
1040
|
async updateMemberAccount(e) {
|
|
1026
|
-
const t = await this.client.request(
|
|
1041
|
+
const t = await this.client.request(it, e);
|
|
1027
1042
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
1028
1043
|
ok: !1,
|
|
1029
1044
|
error: c(t.data.updateMemberAccount.__typename)
|
|
@@ -1032,7 +1047,7 @@ class ht {
|
|
|
1032
1047
|
} : t;
|
|
1033
1048
|
}
|
|
1034
1049
|
async deleteMemberAccount(e) {
|
|
1035
|
-
const t = await this.client.request(
|
|
1050
|
+
const t = await this.client.request(mt, e);
|
|
1036
1051
|
return t.ok ? t.data.deleteMemberAccount ? {
|
|
1037
1052
|
ok: !0
|
|
1038
1053
|
} : {
|
|
@@ -1045,7 +1060,7 @@ class ht {
|
|
|
1045
1060
|
}
|
|
1046
1061
|
async resetPassword(e) {
|
|
1047
1062
|
const t = await this.client.request(
|
|
1048
|
-
|
|
1063
|
+
st,
|
|
1049
1064
|
e
|
|
1050
1065
|
);
|
|
1051
1066
|
return t.ok ? t.data.resetPassword ? {
|
|
@@ -1056,14 +1071,14 @@ class ht {
|
|
|
1056
1071
|
} : t;
|
|
1057
1072
|
}
|
|
1058
1073
|
async profileCompletion() {
|
|
1059
|
-
const e = await this.client.request(
|
|
1074
|
+
const e = await this.client.request(lt);
|
|
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(ht);
|
|
1064
1079
|
}
|
|
1065
1080
|
async sendVerificationCode(e) {
|
|
1066
|
-
const t = await this.client.request(
|
|
1081
|
+
const t = await this.client.request(pt, e);
|
|
1067
1082
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
1068
1083
|
ok: !1,
|
|
1069
1084
|
error: c(t.data.sendVerificationCode.__typename)
|
|
@@ -1072,7 +1087,7 @@ class ht {
|
|
|
1072
1087
|
} : t;
|
|
1073
1088
|
}
|
|
1074
1089
|
async verifyMobileNumber(e) {
|
|
1075
|
-
const t = await this.client.request(
|
|
1090
|
+
const t = await this.client.request(dt, e);
|
|
1076
1091
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1077
1092
|
ok: !1,
|
|
1078
1093
|
error: c(t.data.verifyMobileNumber.__typename)
|
|
@@ -1081,7 +1096,7 @@ class ht {
|
|
|
1081
1096
|
} : t;
|
|
1082
1097
|
}
|
|
1083
1098
|
async createMemberVerification(e) {
|
|
1084
|
-
const t = await this.client.request(
|
|
1099
|
+
const t = await this.client.request(ct, e);
|
|
1085
1100
|
return t.ok ? t.data.createMemberVerification ? {
|
|
1086
1101
|
ok: !1,
|
|
1087
1102
|
error: c(t.data.createMemberVerification.__typename)
|
|
@@ -1090,7 +1105,7 @@ class ht {
|
|
|
1090
1105
|
} : t;
|
|
1091
1106
|
}
|
|
1092
1107
|
async updateMemberVerification(e) {
|
|
1093
|
-
const t = await this.client.request(
|
|
1108
|
+
const t = await this.client.request(ut, e);
|
|
1094
1109
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
1095
1110
|
ok: !1,
|
|
1096
1111
|
error: c(t.data.updateMemberVerification.__typename)
|
|
@@ -1099,7 +1114,7 @@ class ht {
|
|
|
1099
1114
|
} : t;
|
|
1100
1115
|
}
|
|
1101
1116
|
async memberVerification() {
|
|
1102
|
-
const e = await this.client.request(
|
|
1117
|
+
const e = await this.client.request(nt);
|
|
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
|
+
Pe,
|
|
1111
1126
|
e
|
|
1112
1127
|
);
|
|
1113
1128
|
return t.ok ? {
|
|
@@ -1132,7 +1147,7 @@ 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 yt {
|
|
1136
1151
|
constructor(e) {
|
|
1137
1152
|
d(this, "url");
|
|
1138
1153
|
d(this, "platform");
|
|
@@ -1273,20 +1288,20 @@ class wt {
|
|
|
1273
1288
|
}
|
|
1274
1289
|
}
|
|
1275
1290
|
}
|
|
1276
|
-
class
|
|
1291
|
+
class bt {
|
|
1277
1292
|
constructor(e) {
|
|
1278
1293
|
d(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(_e, 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(Te, e);
|
|
1290
1305
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1291
1306
|
ok: !1,
|
|
1292
1307
|
error: c(t.data.uploadPrivateImageFile.__typename)
|
|
@@ -1295,46 +1310,46 @@ class yt {
|
|
|
1295
1310
|
} : t;
|
|
1296
1311
|
}
|
|
1297
1312
|
}
|
|
1298
|
-
class
|
|
1313
|
+
class gt {
|
|
1299
1314
|
constructor(e) {
|
|
1300
1315
|
d(this, "client");
|
|
1301
1316
|
this.client = e;
|
|
1302
1317
|
}
|
|
1303
1318
|
async betRecords(e) {
|
|
1304
1319
|
const t = await this.client.request(
|
|
1305
|
-
|
|
1320
|
+
je,
|
|
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(Ke, 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
|
+
xe,
|
|
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
|
+
qe,
|
|
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(He);
|
|
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(at);
|
|
1334
1349
|
return e.ok ? { ok: e.ok, data: e.data.member } : e;
|
|
1335
1350
|
}
|
|
1336
1351
|
}
|
|
1337
|
-
class
|
|
1352
|
+
class Et {
|
|
1338
1353
|
constructor(e) {
|
|
1339
1354
|
d(this, "url");
|
|
1340
1355
|
this.url = e.url;
|
|
@@ -1346,32 +1361,32 @@ class gt {
|
|
|
1346
1361
|
];
|
|
1347
1362
|
}
|
|
1348
1363
|
}
|
|
1349
|
-
class
|
|
1364
|
+
class Ee {
|
|
1350
1365
|
constructor(e) {
|
|
1351
1366
|
d(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(ze);
|
|
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(Xe);
|
|
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
|
+
Je,
|
|
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(et);
|
|
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(tt, e);
|
|
1375
1390
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
1376
1391
|
ok: !1,
|
|
1377
1392
|
error: c(t.data.claimCashbackBonus.__typename)
|
|
@@ -1383,22 +1398,22 @@ class Ae {
|
|
|
1383
1398
|
};
|
|
1384
1399
|
}
|
|
1385
1400
|
async bonus() {
|
|
1386
|
-
const e = await this.client.request(
|
|
1401
|
+
const e = await this.client.request(Ze);
|
|
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(ve);
|
|
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
|
+
Ye,
|
|
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(Fe, e);
|
|
1402
1417
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
1403
1418
|
ok: !1,
|
|
1404
1419
|
error: c(t.data.createGCashDeposit.__typename)
|
|
@@ -1407,7 +1422,7 @@ class Ae {
|
|
|
1407
1422
|
} : t;
|
|
1408
1423
|
}
|
|
1409
1424
|
async createMayaDeposit(e) {
|
|
1410
|
-
const t = await this.client.request(
|
|
1425
|
+
const t = await this.client.request(Le, e);
|
|
1411
1426
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
1412
1427
|
ok: !1,
|
|
1413
1428
|
error: c(t.data.createMayaDeposit.__typename)
|
|
@@ -1416,7 +1431,7 @@ class Ae {
|
|
|
1416
1431
|
} : t;
|
|
1417
1432
|
}
|
|
1418
1433
|
async createMayaAppDeposit(e) {
|
|
1419
|
-
const t = await this.client.request(
|
|
1434
|
+
const t = await this.client.request(Ve, e);
|
|
1420
1435
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
1421
1436
|
ok: !1,
|
|
1422
1437
|
error: c(t.data.createMayaAppDeposit.__typename)
|
|
@@ -1425,7 +1440,7 @@ class Ae {
|
|
|
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
1446
|
error: c(t.data.createGCashWithdrawal.__typename)
|
|
@@ -1434,7 +1449,7 @@ class Ae {
|
|
|
1434
1449
|
} : t;
|
|
1435
1450
|
}
|
|
1436
1451
|
async createMayaWithdrawal(e) {
|
|
1437
|
-
const t = await this.client.request(
|
|
1452
|
+
const t = await this.client.request(Be, e);
|
|
1438
1453
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
1439
1454
|
ok: !1,
|
|
1440
1455
|
error: c(t.data.createMayaWithdrawal.__typename)
|
|
@@ -1443,7 +1458,7 @@ class Ae {
|
|
|
1443
1458
|
} : t;
|
|
1444
1459
|
}
|
|
1445
1460
|
async createMayaAppWithdrawal(e) {
|
|
1446
|
-
const t = await this.client.request(
|
|
1461
|
+
const t = await this.client.request(We, e);
|
|
1447
1462
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
1448
1463
|
ok: !1,
|
|
1449
1464
|
error: c(t.data.createMayaAppWithdrawal.__typename)
|
|
@@ -1452,7 +1467,7 @@ class Ae {
|
|
|
1452
1467
|
} : t;
|
|
1453
1468
|
}
|
|
1454
1469
|
async createBankWithdrawal(e) {
|
|
1455
|
-
const t = await this.client.request(
|
|
1470
|
+
const t = await this.client.request(Ue, e);
|
|
1456
1471
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
1457
1472
|
ok: !1,
|
|
1458
1473
|
error: c(t.data.createBankWithdrawal.__typename)
|
|
@@ -1462,12 +1477,12 @@ class Ae {
|
|
|
1462
1477
|
}
|
|
1463
1478
|
async remainingDailyWithdrawalsCount() {
|
|
1464
1479
|
const e = await this.client.request(
|
|
1465
|
-
|
|
1480
|
+
Oe
|
|
1466
1481
|
);
|
|
1467
1482
|
return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
|
|
1468
1483
|
}
|
|
1469
1484
|
async pointsWallet() {
|
|
1470
|
-
const e = await this.client.request(
|
|
1485
|
+
const e = await this.client.request(Me);
|
|
1471
1486
|
return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
|
|
1472
1487
|
}
|
|
1473
1488
|
async pointsToCashConversion(e) {
|
|
@@ -1499,13 +1514,13 @@ class Ae {
|
|
|
1499
1514
|
}
|
|
1500
1515
|
async gameSession(e) {
|
|
1501
1516
|
const t = await this.client.request(
|
|
1502
|
-
|
|
1517
|
+
De,
|
|
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(be, e);
|
|
1509
1524
|
return t.ok ? t.data.createGameSession ? {
|
|
1510
1525
|
ok: !1,
|
|
1511
1526
|
error: c(t.data.createGameSession.__typename)
|
|
@@ -1529,7 +1544,7 @@ class Ae {
|
|
|
1529
1544
|
} : t;
|
|
1530
1545
|
}
|
|
1531
1546
|
}
|
|
1532
|
-
class
|
|
1547
|
+
class At {
|
|
1533
1548
|
constructor(e) {
|
|
1534
1549
|
d(this, "client");
|
|
1535
1550
|
this.client = e;
|
|
@@ -1547,13 +1562,13 @@ class Et {
|
|
|
1547
1562
|
}
|
|
1548
1563
|
async gameSession(e) {
|
|
1549
1564
|
const t = await this.client.request(
|
|
1550
|
-
|
|
1565
|
+
Re,
|
|
1551
1566
|
e
|
|
1552
1567
|
);
|
|
1553
1568
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1554
1569
|
}
|
|
1555
1570
|
async createGameSession(e) {
|
|
1556
|
-
const t = await this.client.request(
|
|
1571
|
+
const t = await this.client.request(be, e);
|
|
1557
1572
|
return t.ok ? t.data.createGameSession ? {
|
|
1558
1573
|
ok: !1,
|
|
1559
1574
|
error: c(t.data.createGameSession.__typename)
|
|
@@ -1562,7 +1577,7 @@ class Et {
|
|
|
1562
1577
|
} : t;
|
|
1563
1578
|
}
|
|
1564
1579
|
async endGameSession(e) {
|
|
1565
|
-
const t = await this.client.request(
|
|
1580
|
+
const t = await this.client.request(Ge, e);
|
|
1566
1581
|
return t.ok ? t.data.endGameSession ? {
|
|
1567
1582
|
ok: !1,
|
|
1568
1583
|
error: c(t.data.endGameSession.__typename)
|
|
@@ -1571,31 +1586,31 @@ class Et {
|
|
|
1571
1586
|
} : t;
|
|
1572
1587
|
}
|
|
1573
1588
|
}
|
|
1574
|
-
class
|
|
1589
|
+
class St {
|
|
1575
1590
|
constructor(e) {
|
|
1576
1591
|
d(this, "client");
|
|
1577
1592
|
this.client = e;
|
|
1578
1593
|
}
|
|
1579
1594
|
async latestBetRecords() {
|
|
1580
|
-
const e = await this.client.request(
|
|
1595
|
+
const e = await this.client.request(Qe);
|
|
1581
1596
|
return e.ok ? {
|
|
1582
1597
|
ok: !0,
|
|
1583
1598
|
data: e.data.latestBetRecords
|
|
1584
1599
|
} : e;
|
|
1585
1600
|
}
|
|
1586
1601
|
}
|
|
1587
|
-
function
|
|
1602
|
+
function kt(n, e, t) {
|
|
1588
1603
|
return n < e ? e : n > t ? t : n;
|
|
1589
1604
|
}
|
|
1590
|
-
function
|
|
1605
|
+
function Ct(n) {
|
|
1591
1606
|
return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
|
|
1592
1607
|
}
|
|
1593
|
-
function
|
|
1608
|
+
function _t(n) {
|
|
1594
1609
|
const e = [];
|
|
1595
1610
|
function t(a, r = []) {
|
|
1596
1611
|
for (const s in a) {
|
|
1597
1612
|
const m = a[s];
|
|
1598
|
-
|
|
1613
|
+
Ct(m) ? t(m, [...r, s]) : Array.isArray(m) ? t(Tt(m), [...r, s]) : e.push({
|
|
1599
1614
|
key: [...r, s],
|
|
1600
1615
|
value: m
|
|
1601
1616
|
});
|
|
@@ -1603,7 +1618,7 @@ function Ct(n) {
|
|
|
1603
1618
|
}
|
|
1604
1619
|
return t(n), e;
|
|
1605
1620
|
}
|
|
1606
|
-
function
|
|
1621
|
+
function Tt(n) {
|
|
1607
1622
|
return n.reduce((e, t, a) => (e[a] = t, e), {});
|
|
1608
1623
|
}
|
|
1609
1624
|
class E {
|
|
@@ -1645,13 +1660,13 @@ class E {
|
|
|
1645
1660
|
async exec(e) {
|
|
1646
1661
|
var t, a, r, s, m, u;
|
|
1647
1662
|
try {
|
|
1648
|
-
const
|
|
1649
|
-
if (!
|
|
1650
|
-
return { ok: !1, error: p(
|
|
1651
|
-
const l = await
|
|
1652
|
-
return
|
|
1663
|
+
const h = await fetch(e);
|
|
1664
|
+
if (!h.ok)
|
|
1665
|
+
return { ok: !1, error: p(h.status) };
|
|
1666
|
+
const l = await h.json(), y = l.data, f = (t = l.errors) == null ? void 0 : t.at(0);
|
|
1667
|
+
return f ? ((a = f.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = f.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: p(403, f.message) } : ((s = f.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: p(401, f.message) } : ((m = f.extensions) == null ? void 0 : m.code) === "BAD_USER_INPUT" || ((u = f.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: p(400, f.message) } : {
|
|
1653
1668
|
ok: !1,
|
|
1654
|
-
error: p(500,
|
|
1669
|
+
error: p(500, f.message)
|
|
1655
1670
|
} : {
|
|
1656
1671
|
ok: !0,
|
|
1657
1672
|
data: y
|
|
@@ -1670,7 +1685,7 @@ class E {
|
|
|
1670
1685
|
return t;
|
|
1671
1686
|
}
|
|
1672
1687
|
createUploadBody(e, t) {
|
|
1673
|
-
const a =
|
|
1688
|
+
const a = _t(t).filter(
|
|
1674
1689
|
(m) => m.value instanceof File || m.value instanceof Blob
|
|
1675
1690
|
), r = new FormData();
|
|
1676
1691
|
r.append(
|
|
@@ -1692,7 +1707,7 @@ async function w(n) {
|
|
|
1692
1707
|
const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
|
|
1693
1708
|
return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
1694
1709
|
}
|
|
1695
|
-
class
|
|
1710
|
+
class Ae {
|
|
1696
1711
|
constructor(e) {
|
|
1697
1712
|
d(this, "enabled");
|
|
1698
1713
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
@@ -1721,15 +1736,15 @@ function S(n, e) {
|
|
|
1721
1736
|
const t = M(n);
|
|
1722
1737
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
1723
1738
|
}
|
|
1724
|
-
function
|
|
1739
|
+
function he(n, e) {
|
|
1725
1740
|
return n.getTime() > e.getTime();
|
|
1726
1741
|
}
|
|
1727
|
-
function
|
|
1742
|
+
function Se(n) {
|
|
1728
1743
|
return new Promise((e) => {
|
|
1729
1744
|
setTimeout(e, n);
|
|
1730
1745
|
});
|
|
1731
1746
|
}
|
|
1732
|
-
function
|
|
1747
|
+
function fe(n, e) {
|
|
1733
1748
|
const {
|
|
1734
1749
|
until: t,
|
|
1735
1750
|
interval: a = 1e3,
|
|
@@ -1737,8 +1752,8 @@ function he(n, e) {
|
|
|
1737
1752
|
/**/
|
|
1738
1753
|
} = e;
|
|
1739
1754
|
async function s(m, u) {
|
|
1740
|
-
const
|
|
1741
|
-
return t(l) ? l :
|
|
1755
|
+
const h = u ?? r, l = await n(...m);
|
|
1756
|
+
return t(l) ? l : h > 1 ? (await Se(a * ((r - h) / 2)), s(m, h - 1)) : l;
|
|
1742
1757
|
}
|
|
1743
1758
|
return async (...m) => await s(m);
|
|
1744
1759
|
}
|
|
@@ -1746,23 +1761,23 @@ function k(n, e) {
|
|
|
1746
1761
|
const t = M(n);
|
|
1747
1762
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
1748
1763
|
}
|
|
1749
|
-
class
|
|
1764
|
+
class vt {
|
|
1750
1765
|
constructor(e) {
|
|
1751
1766
|
d(this, "logger");
|
|
1752
1767
|
d(this, "storageKey", "session");
|
|
1753
1768
|
d(this, "authService");
|
|
1754
1769
|
d(this, "walletService");
|
|
1755
1770
|
d(this, "_refreshing", !1);
|
|
1756
|
-
this.authService = new
|
|
1771
|
+
this.authService = new yt({
|
|
1757
1772
|
url: e.authUrl,
|
|
1758
1773
|
platform: e.platform
|
|
1759
|
-
}), this.walletService = new
|
|
1774
|
+
}), this.walletService = new Ee(
|
|
1760
1775
|
new E(e.walletUrl, {
|
|
1761
1776
|
middlewares: [
|
|
1762
1777
|
(t) => (t.headers.set("Platform", e.platform), t.headers.set("Role", "MEMBER"), t)
|
|
1763
1778
|
]
|
|
1764
1779
|
})
|
|
1765
|
-
), this.logger = new
|
|
1780
|
+
), this.logger = new Ae({
|
|
1766
1781
|
enabled: e.log ?? !1
|
|
1767
1782
|
});
|
|
1768
1783
|
}
|
|
@@ -1782,7 +1797,7 @@ class Tt {
|
|
|
1782
1797
|
}
|
|
1783
1798
|
};
|
|
1784
1799
|
if (e.type === "MAYA") {
|
|
1785
|
-
const s = await
|
|
1800
|
+
const s = await fe(() => this.walletService.mayaSession({ id: e.sessionId }), {
|
|
1786
1801
|
until: (l) => {
|
|
1787
1802
|
var y;
|
|
1788
1803
|
return l.ok && ((y = l.data) == null ? void 0 : y.member) != null;
|
|
@@ -1791,19 +1806,19 @@ class Tt {
|
|
|
1791
1806
|
maxAttempt: 5
|
|
1792
1807
|
})();
|
|
1793
1808
|
if (!s.ok) return s;
|
|
1794
|
-
const u = await
|
|
1809
|
+
const u = await fe(() => this.authService.createSession(e), {
|
|
1795
1810
|
until: (l) => l.ok,
|
|
1796
1811
|
interval: 1e3,
|
|
1797
1812
|
maxAttempt: 5
|
|
1798
1813
|
})();
|
|
1799
1814
|
if (!u.ok) return u;
|
|
1800
|
-
const
|
|
1815
|
+
const h = /* @__PURE__ */ new Date();
|
|
1801
1816
|
return window.localStorage.setItem(
|
|
1802
1817
|
this.storageKey,
|
|
1803
1818
|
JSON.stringify({
|
|
1804
1819
|
...u.data,
|
|
1805
|
-
accessTokenExpiresAt: S(
|
|
1806
|
-
refreshTokenExpiresAt: k(A(
|
|
1820
|
+
accessTokenExpiresAt: S(h, 8).getTime(),
|
|
1821
|
+
refreshTokenExpiresAt: k(A(h, 30), 2).getTime()
|
|
1807
1822
|
})
|
|
1808
1823
|
), {
|
|
1809
1824
|
ok: !0,
|
|
@@ -1872,7 +1887,7 @@ class Tt {
|
|
|
1872
1887
|
data: null
|
|
1873
1888
|
};
|
|
1874
1889
|
if (this.refreshing)
|
|
1875
|
-
return await
|
|
1890
|
+
return await Se(1e3), await this.get();
|
|
1876
1891
|
const e = window.localStorage.getItem(this.storageKey);
|
|
1877
1892
|
if (!e)
|
|
1878
1893
|
return {
|
|
@@ -1882,7 +1897,7 @@ class Tt {
|
|
|
1882
1897
|
try {
|
|
1883
1898
|
let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
|
|
1884
1899
|
const r = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
|
|
1885
|
-
if (
|
|
1900
|
+
if (he(a, s))
|
|
1886
1901
|
return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
|
|
1887
1902
|
ok: !1,
|
|
1888
1903
|
error: {
|
|
@@ -1890,7 +1905,7 @@ class Tt {
|
|
|
1890
1905
|
message: "Session expired."
|
|
1891
1906
|
}
|
|
1892
1907
|
};
|
|
1893
|
-
if (
|
|
1908
|
+
if (he(a, r)) {
|
|
1894
1909
|
this.logger.info("Refreshing session..."), this.refreshing = !0;
|
|
1895
1910
|
const m = await this.authService.refreshSession(t.refreshToken);
|
|
1896
1911
|
if (this.refreshing = !1, !m.ok)
|
|
@@ -1955,11 +1970,11 @@ function i(n, e) {
|
|
|
1955
1970
|
}
|
|
1956
1971
|
return e;
|
|
1957
1972
|
}
|
|
1958
|
-
class
|
|
1973
|
+
class Mt {
|
|
1959
1974
|
constructor(e) {
|
|
1960
1975
|
d(this, "staticService");
|
|
1961
1976
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
1962
|
-
this.staticService = new
|
|
1977
|
+
this.staticService = new Et({
|
|
1963
1978
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
1964
1979
|
});
|
|
1965
1980
|
}
|
|
@@ -1988,7 +2003,7 @@ class vt {
|
|
|
1988
2003
|
};
|
|
1989
2004
|
}
|
|
1990
2005
|
platform(e) {
|
|
1991
|
-
var t, a, r, s, m, u,
|
|
2006
|
+
var t, a, r, s, m, u, h, l, y, f, N, D, I, R, G, P, x, $, B, W, U, O, q, F, L, V, Y, H, j, Q, K, z, J, X, Z, ee, te, ae, re, ne, oe, ie, se, me, de, ce, ue, le, pe;
|
|
1992
2007
|
return {
|
|
1993
2008
|
paymentSettings: {
|
|
1994
2009
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
@@ -2003,12 +2018,12 @@ class vt {
|
|
|
2003
2018
|
maximumAmount: i((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
|
|
2004
2019
|
},
|
|
2005
2020
|
gcash: {
|
|
2006
|
-
androidEnabled: ((
|
|
2021
|
+
androidEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.androidEnabled) ?? !1,
|
|
2007
2022
|
iosEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.iosEnabled) ?? !1,
|
|
2008
2023
|
webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
|
|
2009
|
-
mobileWebEnabled: ((
|
|
2010
|
-
minimumAmount: i((
|
|
2011
|
-
maximumAmount: i((
|
|
2024
|
+
mobileWebEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.mobileWebEnabled) ?? !1,
|
|
2025
|
+
minimumAmount: i((N = e.gcashDepositGatewaySettings) == null ? void 0 : N.minimumAmount),
|
|
2026
|
+
maximumAmount: i((D = e.gcashDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
|
|
2012
2027
|
},
|
|
2013
2028
|
maya: {
|
|
2014
2029
|
androidEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.androidEnabled) ?? !1,
|
|
@@ -2292,7 +2307,7 @@ class vt {
|
|
|
2292
2307
|
};
|
|
2293
2308
|
}
|
|
2294
2309
|
}
|
|
2295
|
-
class
|
|
2310
|
+
class It {
|
|
2296
2311
|
constructor(e) {
|
|
2297
2312
|
d(this, "gameService");
|
|
2298
2313
|
d(this, "fileService");
|
|
@@ -2304,7 +2319,7 @@ class Nt {
|
|
|
2304
2319
|
d(this, "transformer");
|
|
2305
2320
|
d(this, "logger");
|
|
2306
2321
|
const t = e.environment === "development";
|
|
2307
|
-
this.sessionManager = new
|
|
2322
|
+
this.sessionManager = new vt({
|
|
2308
2323
|
authUrl: t ? "https://auth.development.opexa.io" : "https://auth.opexa.io",
|
|
2309
2324
|
walletUrl: t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2310
2325
|
platform: e.platform,
|
|
@@ -2319,37 +2334,37 @@ class Nt {
|
|
|
2319
2334
|
}
|
|
2320
2335
|
}
|
|
2321
2336
|
};
|
|
2322
|
-
this.gameService = new
|
|
2337
|
+
this.gameService = new At(
|
|
2323
2338
|
new E(
|
|
2324
2339
|
t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
|
|
2325
2340
|
a
|
|
2326
2341
|
)
|
|
2327
|
-
), this.fileService = new
|
|
2342
|
+
), this.fileService = new bt(
|
|
2328
2343
|
new E(
|
|
2329
2344
|
t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
|
|
2330
2345
|
a
|
|
2331
2346
|
)
|
|
2332
|
-
), this.walletService = new
|
|
2347
|
+
), this.walletService = new Ee(
|
|
2333
2348
|
new E(
|
|
2334
2349
|
t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2335
2350
|
a
|
|
2336
2351
|
)
|
|
2337
|
-
), this.reportService = new
|
|
2352
|
+
), this.reportService = new gt(
|
|
2338
2353
|
new E(
|
|
2339
2354
|
t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
|
|
2340
2355
|
a
|
|
2341
2356
|
)
|
|
2342
|
-
), this.accountService = new
|
|
2357
|
+
), this.accountService = new wt(
|
|
2343
2358
|
new E(
|
|
2344
2359
|
t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
|
|
2345
2360
|
a
|
|
2346
2361
|
)
|
|
2347
|
-
), this.portalService = new
|
|
2362
|
+
), this.portalService = new St(
|
|
2348
2363
|
new E(
|
|
2349
2364
|
t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
|
|
2350
2365
|
a
|
|
2351
2366
|
)
|
|
2352
|
-
), this.transformer = new
|
|
2367
|
+
), this.transformer = new Mt(e), this.logger = new Ae({
|
|
2353
2368
|
enabled: e.log ?? !1
|
|
2354
2369
|
});
|
|
2355
2370
|
}
|
|
@@ -2465,7 +2480,7 @@ class Nt {
|
|
|
2465
2480
|
* ```
|
|
2466
2481
|
*/
|
|
2467
2482
|
watchSession(e) {
|
|
2468
|
-
const t =
|
|
2483
|
+
const t = kt(e.interval ?? 3e4, 3e4, 6e4);
|
|
2469
2484
|
let a = null;
|
|
2470
2485
|
const r = () => setTimeout(async () => {
|
|
2471
2486
|
await this.sessionManager.verify() || await e.onInvalid(), a = r();
|
|
@@ -3036,7 +3051,10 @@ class Nt {
|
|
|
3036
3051
|
const t = await this.gameService.gameSession({ id: e });
|
|
3037
3052
|
return t.ok ? {
|
|
3038
3053
|
ok: !0,
|
|
3039
|
-
data: t.data ? this.transformer.transform.gameSession(
|
|
3054
|
+
data: t.data ? this.transformer.transform.gameSession({
|
|
3055
|
+
...t.data,
|
|
3056
|
+
game: t.data.game.id
|
|
3057
|
+
}) : null
|
|
3040
3058
|
} : t;
|
|
3041
3059
|
}
|
|
3042
3060
|
/**
|
|
@@ -3138,8 +3156,8 @@ class Nt {
|
|
|
3138
3156
|
}
|
|
3139
3157
|
}
|
|
3140
3158
|
export {
|
|
3141
|
-
|
|
3159
|
+
Pt as ObjectId,
|
|
3142
3160
|
g as ObjectType,
|
|
3143
|
-
|
|
3161
|
+
It as Sdk
|
|
3144
3162
|
};
|
|
3145
3163
|
//# sourceMappingURL=index.mjs.map
|