@opexa/portal-sdk 0.0.30 → 0.0.32
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 +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +255 -225
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +2 -1
- package/dist/sdk/types.d.ts +1 -0
- package/dist/services/queries.d.ts +1 -0
- package/dist/services/types.d.ts +3 -0
- package/dist/services/wallet.service.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var _e = Object.defineProperty;
|
|
2
|
-
var Te = (
|
|
3
|
-
var d = (
|
|
4
|
-
import { ObjectId as
|
|
5
|
-
import { ObjectId as
|
|
6
|
-
const
|
|
2
|
+
var Te = (n, e, t) => e in n ? _e(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var d = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ObjectId as S } from "@opexa/object-id";
|
|
5
|
+
import { ObjectId as Wt } from "@opexa/object-id";
|
|
6
|
+
const b = {
|
|
7
7
|
Account: 8,
|
|
8
8
|
Deposit: 9,
|
|
9
9
|
Withdrawal: 14,
|
|
@@ -13,22 +13,22 @@ const S = {
|
|
|
13
13
|
GameSession: 204,
|
|
14
14
|
MayaSession: 230
|
|
15
15
|
};
|
|
16
|
-
function n
|
|
16
|
+
function o(n, ...e) {
|
|
17
17
|
let t = "";
|
|
18
|
-
for (const [a, r] of
|
|
19
|
-
const
|
|
20
|
-
t = `${t}${r}${
|
|
18
|
+
for (const [a, r] of n.entries()) {
|
|
19
|
+
const c = e.at(a) ?? "";
|
|
20
|
+
t = `${t}${r}${c}`;
|
|
21
21
|
}
|
|
22
22
|
return t.trim();
|
|
23
23
|
}
|
|
24
|
-
const x =
|
|
24
|
+
const x = o`
|
|
25
25
|
fragment FileFragment on File {
|
|
26
26
|
id
|
|
27
27
|
url
|
|
28
28
|
status
|
|
29
29
|
dateTimeCreated
|
|
30
30
|
}
|
|
31
|
-
`, ve =
|
|
31
|
+
`, ve = o`
|
|
32
32
|
${x}
|
|
33
33
|
|
|
34
34
|
query File($id: ObjectId!) {
|
|
@@ -38,7 +38,7 @@ const x = n`
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
`, Ne =
|
|
41
|
+
`, Ne = o`
|
|
42
42
|
mutation UploadPrivateImageFile($input: UploadFileInput!) {
|
|
43
43
|
uploadPrivateImageFile(input: $input) {
|
|
44
44
|
... on FileFormatNotSupportedError {
|
|
@@ -52,7 +52,7 @@ const x = n`
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
`, Me =
|
|
55
|
+
`, Me = o`
|
|
56
56
|
query Wallet {
|
|
57
57
|
wallet {
|
|
58
58
|
id
|
|
@@ -62,7 +62,7 @@ const x = n`
|
|
|
62
62
|
dateTimeLastUpdated
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
`, Ie =
|
|
65
|
+
`, Ie = o`
|
|
66
66
|
query PointsWallet {
|
|
67
67
|
pointsWallet {
|
|
68
68
|
id
|
|
@@ -71,7 +71,7 @@ const x = n`
|
|
|
71
71
|
dateTimeCreated
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
`, De =
|
|
74
|
+
`, De = o`
|
|
75
75
|
mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
|
|
76
76
|
pointsToCashConversion(input: $input) {
|
|
77
77
|
... on InsufficientPointsError {
|
|
@@ -79,7 +79,7 @@ const x = n`
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
`, Re =
|
|
82
|
+
`, Re = o`
|
|
83
83
|
query PointsWalletTransactions(
|
|
84
84
|
$first: Int
|
|
85
85
|
$after: Cursor
|
|
@@ -107,7 +107,7 @@ const x = n`
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
`, ye =
|
|
110
|
+
`, ye = o`
|
|
111
111
|
query Games($first: Int, $after: Cursor, $filter: GameFilterInput) {
|
|
112
112
|
games(first: $first, after: $after, filter: $filter) {
|
|
113
113
|
edges {
|
|
@@ -128,7 +128,7 @@ const x = n`
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
`, ge =
|
|
131
|
+
`, ge = o`
|
|
132
132
|
query GamesByName($first: Int, $search: String!, $filter: GameFilterInput) {
|
|
133
133
|
gamesByName(first: $first, search: $search, filter: $filter) {
|
|
134
134
|
... on Game {
|
|
@@ -139,7 +139,7 @@ const x = n`
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
`,
|
|
142
|
+
`, Se = o`
|
|
143
143
|
query GameSession($id: ObjectId!) {
|
|
144
144
|
node(id: $id) {
|
|
145
145
|
... on GameSession {
|
|
@@ -151,7 +151,7 @@ const x = n`
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
`,
|
|
154
|
+
`, be = o`
|
|
155
155
|
mutation CreateGameSession($input: CreateGameSessionInput!) {
|
|
156
156
|
createGameSession(input: $input) {
|
|
157
157
|
... on GameDoesNotExistError {
|
|
@@ -159,11 +159,11 @@ const x = n`
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
`, Pe =
|
|
162
|
+
`, Pe = o`
|
|
163
163
|
mutation EndGameSession($input: EndGameSessionInput!) {
|
|
164
164
|
endGameSession(input: $input)
|
|
165
165
|
}
|
|
166
|
-
`, xe =
|
|
166
|
+
`, xe = o`
|
|
167
167
|
mutation EndGameSession($input: EndGameSessionInput!) {
|
|
168
168
|
endGameSession(input: $input) {
|
|
169
169
|
... on GameSessionDoesNotExistError {
|
|
@@ -177,7 +177,7 @@ const x = n`
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
`, Ge =
|
|
180
|
+
`, Ge = o`
|
|
181
181
|
query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
|
|
182
182
|
announcements(first: $first, after: $after, filter: $filter) {
|
|
183
183
|
edges {
|
|
@@ -203,7 +203,7 @@ const x = n`
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
`, $e =
|
|
206
|
+
`, $e = o`
|
|
207
207
|
query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
|
|
208
208
|
member {
|
|
209
209
|
withdrawalRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -270,7 +270,7 @@ const x = n`
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
`, We =
|
|
273
|
+
`, We = o`
|
|
274
274
|
mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
|
|
275
275
|
createGCashWithdrawal(input: $input) {
|
|
276
276
|
... on AccountNotVerifiedError {
|
|
@@ -293,7 +293,7 @@ const x = n`
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
`, Be =
|
|
296
|
+
`, Be = o`
|
|
297
297
|
mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
|
|
298
298
|
createMayaWithdrawal(input: $input) {
|
|
299
299
|
... on AccountNotVerifiedError {
|
|
@@ -316,7 +316,7 @@ const x = n`
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
`, Ue =
|
|
319
|
+
`, Ue = o`
|
|
320
320
|
mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
|
|
321
321
|
createMayaAppWithdrawal(input: $input) {
|
|
322
322
|
... on AccountNotVerifiedError {
|
|
@@ -336,7 +336,7 @@ const x = n`
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
`, Oe =
|
|
339
|
+
`, Oe = o`
|
|
340
340
|
mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
|
|
341
341
|
createBankWithdrawal(input: $input) {
|
|
342
342
|
... on MobileNumberNotVerifiedError {
|
|
@@ -359,11 +359,11 @@ const x = n`
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
`, qe =
|
|
362
|
+
`, qe = o`
|
|
363
363
|
query RemainingDailyWithdrawalsCount {
|
|
364
364
|
remainingDailyWithdrawalsCount
|
|
365
365
|
}
|
|
366
|
-
`, Fe =
|
|
366
|
+
`, Fe = o`
|
|
367
367
|
query DepositRecords($after: Cursor, $first: Int, $filter: DepositRecordFilterInput) {
|
|
368
368
|
member {
|
|
369
369
|
depositRecords(after: $after, first: $first, filter: $filter) {
|
|
@@ -392,7 +392,7 @@ const x = n`
|
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
`, Le =
|
|
395
|
+
`, Le = o`
|
|
396
396
|
mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
|
|
397
397
|
createGCashDeposit(input: $input) {
|
|
398
398
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -421,7 +421,7 @@ const x = n`
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
`, Ve =
|
|
424
|
+
`, Ve = o`
|
|
425
425
|
mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
|
|
426
426
|
createMayaDeposit(input: $input) {
|
|
427
427
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -450,7 +450,7 @@ const x = n`
|
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
`, Ye =
|
|
453
|
+
`, Ye = o`
|
|
454
454
|
mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
|
|
455
455
|
createMayaAppDeposit(input: $input) {
|
|
456
456
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -479,7 +479,7 @@ const x = n`
|
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
`, He =
|
|
482
|
+
`, He = o`
|
|
483
483
|
query Deposit($id: ObjectId!) {
|
|
484
484
|
node(id: $id) {
|
|
485
485
|
... on GCashDeposit {
|
|
@@ -511,13 +511,13 @@ const x = n`
|
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
`, je =
|
|
514
|
+
`, je = o`
|
|
515
515
|
query DepositsCount {
|
|
516
516
|
member {
|
|
517
517
|
depositsCount
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
`, Qe =
|
|
520
|
+
`, Qe = o`
|
|
521
521
|
query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
|
|
522
522
|
member {
|
|
523
523
|
betRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -557,7 +557,7 @@ const x = n`
|
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
`, Ke =
|
|
560
|
+
`, Ke = o`
|
|
561
561
|
query LatestBetRecords {
|
|
562
562
|
latestBetRecords {
|
|
563
563
|
id
|
|
@@ -576,7 +576,7 @@ const x = n`
|
|
|
576
576
|
dateTimeCreated
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
`, ze =
|
|
579
|
+
`, ze = o`
|
|
580
580
|
query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
|
|
581
581
|
member {
|
|
582
582
|
transactionRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -602,7 +602,7 @@ const x = n`
|
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
`, W =
|
|
605
|
+
`, W = o`
|
|
606
606
|
${x}
|
|
607
607
|
|
|
608
608
|
fragment PromoFragment on Promo {
|
|
@@ -621,7 +621,7 @@ const x = n`
|
|
|
621
621
|
dateTimeCreated
|
|
622
622
|
dateTimeLastUpdated
|
|
623
623
|
}
|
|
624
|
-
`, Je =
|
|
624
|
+
`, Je = o`
|
|
625
625
|
${W}
|
|
626
626
|
|
|
627
627
|
query Promos {
|
|
@@ -629,7 +629,7 @@ const x = n`
|
|
|
629
629
|
...PromoFragment
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
`, Xe =
|
|
632
|
+
`, Xe = o`
|
|
633
633
|
${W}
|
|
634
634
|
|
|
635
635
|
query AvailablePromos($filter: PromoFilterInput) {
|
|
@@ -637,7 +637,7 @@ const x = n`
|
|
|
637
637
|
...PromoFragment
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
`, Ee =
|
|
640
|
+
`, Ee = o`
|
|
641
641
|
${x}
|
|
642
642
|
|
|
643
643
|
fragment CashbackFragment on Cashback {
|
|
@@ -653,7 +653,7 @@ const x = n`
|
|
|
653
653
|
dateTimeCreated
|
|
654
654
|
dateTimeLastUpdated
|
|
655
655
|
}
|
|
656
|
-
`, Ze =
|
|
656
|
+
`, Ze = o`
|
|
657
657
|
${Ee}
|
|
658
658
|
|
|
659
659
|
query Cashbacks {
|
|
@@ -661,7 +661,7 @@ const x = n`
|
|
|
661
661
|
...CashbackFragment
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
|
-
`, et =
|
|
664
|
+
`, et = o`
|
|
665
665
|
${W}
|
|
666
666
|
|
|
667
667
|
query Bonus {
|
|
@@ -690,7 +690,7 @@ const x = n`
|
|
|
690
690
|
dateTimeLastUpdated
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
`, tt =
|
|
693
|
+
`, tt = o`
|
|
694
694
|
${Ee}
|
|
695
695
|
|
|
696
696
|
query CashbackBonuses {
|
|
@@ -704,7 +704,7 @@ const x = n`
|
|
|
704
704
|
dateTimeLastUpdated
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
`, at =
|
|
707
|
+
`, at = o`
|
|
708
708
|
mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
|
|
709
709
|
claimCashbackBonus(input: $input) {
|
|
710
710
|
... on CashbackBonusDoesNotExistError {
|
|
@@ -712,13 +712,13 @@ const x = n`
|
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
|
-
`, rt =
|
|
715
|
+
`, rt = o`
|
|
716
716
|
query Member {
|
|
717
717
|
member {
|
|
718
718
|
dateTimeLastActive
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
`,
|
|
721
|
+
`, nt = o`
|
|
722
722
|
query MemberAccount {
|
|
723
723
|
memberAccount: self {
|
|
724
724
|
... on MemberAccount {
|
|
@@ -742,7 +742,7 @@ const x = n`
|
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
`,
|
|
745
|
+
`, ot = o`
|
|
746
746
|
${x}
|
|
747
747
|
|
|
748
748
|
query MemberVerification {
|
|
@@ -766,7 +766,7 @@ const x = n`
|
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
|
-
`, it =
|
|
769
|
+
`, it = o`
|
|
770
770
|
mutation RegisterMemberAccount(
|
|
771
771
|
$input: RegisterMemberAccountInput!
|
|
772
772
|
$referralCode: String
|
|
@@ -802,7 +802,7 @@ const x = n`
|
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
|
-
`, st =
|
|
805
|
+
`, st = o`
|
|
806
806
|
mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
|
|
807
807
|
updateMemberAccount(input: $input) {
|
|
808
808
|
... on AccountNameNotAvailableError {
|
|
@@ -828,7 +828,7 @@ const x = n`
|
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
|
-
`, ct =
|
|
831
|
+
`, ct = o`
|
|
832
832
|
mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
|
|
833
833
|
resetPassword(input: $input, verificationCode: $verificationCode) {
|
|
834
834
|
... on AccountNotFoundError {
|
|
@@ -839,11 +839,11 @@ const x = n`
|
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
`, dt =
|
|
842
|
+
`, dt = o`
|
|
843
843
|
mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
|
|
844
844
|
deleteMemberAccount(input: $input)
|
|
845
845
|
}
|
|
846
|
-
`, mt =
|
|
846
|
+
`, mt = o`
|
|
847
847
|
mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
|
|
848
848
|
verifyMobileNumber(input: $input) {
|
|
849
849
|
... on InvalidSMSVerificationCodeError {
|
|
@@ -854,7 +854,7 @@ const x = n`
|
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
|
-
`, ut =
|
|
857
|
+
`, ut = o`
|
|
858
858
|
mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
|
|
859
859
|
createMemberVerification(input: $input) {
|
|
860
860
|
... on FileDoesNotExistError {
|
|
@@ -868,7 +868,7 @@ const x = n`
|
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
|
-
`, lt =
|
|
871
|
+
`, lt = o`
|
|
872
872
|
mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
|
|
873
873
|
updateMemberVerification(input: $input) {
|
|
874
874
|
... on FileDoesNotExistError {
|
|
@@ -885,7 +885,7 @@ const x = n`
|
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
|
-
`, pt =
|
|
888
|
+
`, pt = o`
|
|
889
889
|
query ProfileCompletion {
|
|
890
890
|
profileCompletion {
|
|
891
891
|
completionPercentage
|
|
@@ -896,7 +896,7 @@ const x = n`
|
|
|
896
896
|
accountPassword
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
|
-
`, ft =
|
|
899
|
+
`, ft = o`
|
|
900
900
|
mutation SendVerificationCode($input: SendVerificationCodeInput!) {
|
|
901
901
|
sendVerificationCode(input: $input) {
|
|
902
902
|
... on InvalidPlatformError {
|
|
@@ -907,7 +907,7 @@ const x = n`
|
|
|
907
907
|
}
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
|
-
`, ht =
|
|
910
|
+
`, ht = o`
|
|
911
911
|
fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
|
|
912
912
|
minimumAmount
|
|
913
913
|
maximumAmount
|
|
@@ -961,7 +961,7 @@ const x = n`
|
|
|
961
961
|
multiplier
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
`, wt =
|
|
964
|
+
`, wt = o`
|
|
965
965
|
query MayaSession($id: ObjectId!) {
|
|
966
966
|
mayaSession(id: $id) {
|
|
967
967
|
id
|
|
@@ -969,7 +969,11 @@ const x = n`
|
|
|
969
969
|
dateTimeCreated
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
`, yt =
|
|
972
|
+
`, yt = o`
|
|
973
|
+
mutation ValidateMayaSession {
|
|
974
|
+
validateMayaSession: validMayaSession
|
|
975
|
+
}
|
|
976
|
+
`, gt = o`
|
|
973
977
|
query ActivityRecords($after: Cursor, $first: Int, $filter: ActivityRecordsFilterInput) {
|
|
974
978
|
member {
|
|
975
979
|
activityRecords(after: $after, first: $first, filter: $filter) {
|
|
@@ -993,9 +997,9 @@ const x = n`
|
|
|
993
997
|
}
|
|
994
998
|
}
|
|
995
999
|
`;
|
|
996
|
-
function m(
|
|
1000
|
+
function m(n) {
|
|
997
1001
|
return {
|
|
998
|
-
name:
|
|
1002
|
+
name: n,
|
|
999
1003
|
message: {
|
|
1000
1004
|
AccountNameNotAvailableError: "Username is no longer available",
|
|
1001
1005
|
AccountNotFoundError: "Account does not exist",
|
|
@@ -1044,17 +1048,17 @@ function m(o) {
|
|
|
1044
1048
|
InvalidToken: "Invalid token",
|
|
1045
1049
|
InvalidTokenOrSecretAnswer: "Invalid token or secret answer",
|
|
1046
1050
|
SessionExpired: "Session expired"
|
|
1047
|
-
}[
|
|
1051
|
+
}[n]
|
|
1048
1052
|
};
|
|
1049
1053
|
}
|
|
1050
|
-
class
|
|
1054
|
+
class St {
|
|
1051
1055
|
constructor(e) {
|
|
1052
1056
|
d(this, "client");
|
|
1053
1057
|
this.client = e;
|
|
1054
1058
|
}
|
|
1055
1059
|
/** aka `Query.self` */
|
|
1056
1060
|
async memberAccount() {
|
|
1057
|
-
const e = await this.client.request(
|
|
1061
|
+
const e = await this.client.request(nt);
|
|
1058
1062
|
return e.ok ? {
|
|
1059
1063
|
ok: !0,
|
|
1060
1064
|
data: e.data.memberAccount
|
|
@@ -1146,7 +1150,7 @@ class gt {
|
|
|
1146
1150
|
} : t;
|
|
1147
1151
|
}
|
|
1148
1152
|
async memberVerification() {
|
|
1149
|
-
const e = await this.client.request(
|
|
1153
|
+
const e = await this.client.request(ot);
|
|
1150
1154
|
return e.ok ? {
|
|
1151
1155
|
ok: !0,
|
|
1152
1156
|
data: e.data.memberAccount.verification
|
|
@@ -1163,8 +1167,8 @@ class gt {
|
|
|
1163
1167
|
} : t;
|
|
1164
1168
|
}
|
|
1165
1169
|
}
|
|
1166
|
-
function
|
|
1167
|
-
const t = G[
|
|
1170
|
+
function f(n, e) {
|
|
1171
|
+
const t = G[n] ? G[n] : G[500];
|
|
1168
1172
|
return {
|
|
1169
1173
|
name: t.name,
|
|
1170
1174
|
message: e ?? t.message
|
|
@@ -1213,12 +1217,12 @@ class bt {
|
|
|
1213
1217
|
error: m("AccountBlacklisted")
|
|
1214
1218
|
} : {
|
|
1215
1219
|
ok: !1,
|
|
1216
|
-
error:
|
|
1220
|
+
error: f(a.status)
|
|
1217
1221
|
};
|
|
1218
1222
|
} catch {
|
|
1219
1223
|
return {
|
|
1220
1224
|
ok: !1,
|
|
1221
|
-
error:
|
|
1225
|
+
error: f(500)
|
|
1222
1226
|
};
|
|
1223
1227
|
}
|
|
1224
1228
|
}
|
|
@@ -1246,12 +1250,12 @@ class bt {
|
|
|
1246
1250
|
error: m("InvalidTokenOrSecretAnswer")
|
|
1247
1251
|
} : {
|
|
1248
1252
|
ok: !1,
|
|
1249
|
-
error:
|
|
1253
|
+
error: f(a.status)
|
|
1250
1254
|
};
|
|
1251
1255
|
} catch {
|
|
1252
1256
|
return {
|
|
1253
1257
|
ok: !1,
|
|
1254
|
-
error:
|
|
1258
|
+
error: f(500)
|
|
1255
1259
|
};
|
|
1256
1260
|
}
|
|
1257
1261
|
}
|
|
@@ -1279,12 +1283,12 @@ class bt {
|
|
|
1279
1283
|
error: m("InvalidToken")
|
|
1280
1284
|
} : {
|
|
1281
1285
|
ok: !1,
|
|
1282
|
-
error:
|
|
1286
|
+
error: f(t.status)
|
|
1283
1287
|
};
|
|
1284
1288
|
} catch {
|
|
1285
1289
|
return {
|
|
1286
1290
|
ok: !1,
|
|
1287
|
-
error:
|
|
1291
|
+
error: f(500)
|
|
1288
1292
|
};
|
|
1289
1293
|
}
|
|
1290
1294
|
}
|
|
@@ -1299,9 +1303,9 @@ class bt {
|
|
|
1299
1303
|
Authorization: `Bearer ${e}`
|
|
1300
1304
|
}
|
|
1301
1305
|
});
|
|
1302
|
-
return t.ok ? { ok: !0 } : { ok: !1, error:
|
|
1306
|
+
return t.ok ? { ok: !0 } : { ok: !1, error: f(t.status) };
|
|
1303
1307
|
} catch {
|
|
1304
|
-
return { ok: !1, error:
|
|
1308
|
+
return { ok: !1, error: f(500) };
|
|
1305
1309
|
}
|
|
1306
1310
|
}
|
|
1307
1311
|
async verifySession(e) {
|
|
@@ -1320,7 +1324,7 @@ class bt {
|
|
|
1320
1324
|
}
|
|
1321
1325
|
}
|
|
1322
1326
|
}
|
|
1323
|
-
class
|
|
1327
|
+
class Et {
|
|
1324
1328
|
constructor(e) {
|
|
1325
1329
|
d(this, "client");
|
|
1326
1330
|
this.client = e;
|
|
@@ -1342,7 +1346,7 @@ class St {
|
|
|
1342
1346
|
} : t;
|
|
1343
1347
|
}
|
|
1344
1348
|
}
|
|
1345
|
-
class
|
|
1349
|
+
class At {
|
|
1346
1350
|
constructor(e) {
|
|
1347
1351
|
d(this, "client");
|
|
1348
1352
|
this.client = e;
|
|
@@ -1386,13 +1390,13 @@ class Et {
|
|
|
1386
1390
|
}
|
|
1387
1391
|
async activityRecords(e) {
|
|
1388
1392
|
const t = await this.client.request(
|
|
1389
|
-
|
|
1393
|
+
gt,
|
|
1390
1394
|
e
|
|
1391
1395
|
);
|
|
1392
1396
|
return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
|
|
1393
1397
|
}
|
|
1394
1398
|
}
|
|
1395
|
-
class
|
|
1399
|
+
class kt {
|
|
1396
1400
|
constructor(e) {
|
|
1397
1401
|
d(this, "url");
|
|
1398
1402
|
this.url = e.url;
|
|
@@ -1559,13 +1563,13 @@ class Ae {
|
|
|
1559
1563
|
}
|
|
1560
1564
|
async gameSession(e) {
|
|
1561
1565
|
const t = await this.client.request(
|
|
1562
|
-
|
|
1566
|
+
Se,
|
|
1563
1567
|
e
|
|
1564
1568
|
);
|
|
1565
1569
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1566
1570
|
}
|
|
1567
1571
|
async createGameSession(e) {
|
|
1568
|
-
const t = await this.client.request(
|
|
1572
|
+
const t = await this.client.request(be, e);
|
|
1569
1573
|
return t.ok ? t.data.createGameSession ? {
|
|
1570
1574
|
ok: !1,
|
|
1571
1575
|
error: m(t.data.createGameSession.__typename)
|
|
@@ -1588,8 +1592,22 @@ class Ae {
|
|
|
1588
1592
|
}
|
|
1589
1593
|
} : t;
|
|
1590
1594
|
}
|
|
1595
|
+
async validateMayaSession() {
|
|
1596
|
+
const e = await this.client.request(
|
|
1597
|
+
yt
|
|
1598
|
+
);
|
|
1599
|
+
return e.ok ? e.data.validateMayaSession ? {
|
|
1600
|
+
ok: !0
|
|
1601
|
+
} : {
|
|
1602
|
+
ok: !1,
|
|
1603
|
+
error: {
|
|
1604
|
+
name: "UnknownError",
|
|
1605
|
+
message: "Something went wrong."
|
|
1606
|
+
}
|
|
1607
|
+
} : e;
|
|
1608
|
+
}
|
|
1591
1609
|
}
|
|
1592
|
-
class
|
|
1610
|
+
class Ct {
|
|
1593
1611
|
constructor(e) {
|
|
1594
1612
|
d(this, "url");
|
|
1595
1613
|
d(this, "siteId");
|
|
@@ -1604,9 +1622,9 @@ class kt {
|
|
|
1604
1622
|
} : e;
|
|
1605
1623
|
}
|
|
1606
1624
|
async games(e) {
|
|
1607
|
-
var r, s,
|
|
1625
|
+
var r, c, s, p, u, h, w, l, A, k, C, _, T, v, N, M;
|
|
1608
1626
|
const t = new URLSearchParams();
|
|
1609
|
-
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (
|
|
1627
|
+
e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (c = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.type) != null && c.equal && t.set("filter[type][eq]", e.filter.type.equal), (p = (s = e == null ? void 0 : e.filter) == null ? void 0 : s.type) != null && p.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (h = (u = e == null ? void 0 : e.filter) == null ? void 0 : u.type) != null && h.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (l = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && l.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (k = (A = e == null ? void 0 : e.filter) == null ? void 0 : A.provider) != null && k.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (_ = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.provider) != null && _.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (M = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && M.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(","));
|
|
1610
1628
|
const a = await this.getJson("/games", t);
|
|
1611
1629
|
return a.ok ? {
|
|
1612
1630
|
ok: !0,
|
|
@@ -1651,17 +1669,17 @@ class kt {
|
|
|
1651
1669
|
data: await r.json()
|
|
1652
1670
|
} : {
|
|
1653
1671
|
ok: !1,
|
|
1654
|
-
error:
|
|
1672
|
+
error: f(r.status)
|
|
1655
1673
|
};
|
|
1656
1674
|
} catch {
|
|
1657
1675
|
return {
|
|
1658
1676
|
ok: !1,
|
|
1659
|
-
error:
|
|
1677
|
+
error: f(500)
|
|
1660
1678
|
};
|
|
1661
1679
|
}
|
|
1662
1680
|
}
|
|
1663
1681
|
}
|
|
1664
|
-
class
|
|
1682
|
+
class _t {
|
|
1665
1683
|
constructor(e) {
|
|
1666
1684
|
d(this, "client");
|
|
1667
1685
|
this.client = e;
|
|
@@ -1681,13 +1699,13 @@ class Ct {
|
|
|
1681
1699
|
}
|
|
1682
1700
|
async gameSession(e) {
|
|
1683
1701
|
const t = await this.client.request(
|
|
1684
|
-
|
|
1702
|
+
Se,
|
|
1685
1703
|
e
|
|
1686
1704
|
);
|
|
1687
1705
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1688
1706
|
}
|
|
1689
1707
|
async createGameSession(e) {
|
|
1690
|
-
const t = await this.client.request(
|
|
1708
|
+
const t = await this.client.request(be, e);
|
|
1691
1709
|
return t.ok ? t.data.createGameSession ? {
|
|
1692
1710
|
ok: !1,
|
|
1693
1711
|
error: m(t.data.createGameSession.__typename)
|
|
@@ -1705,7 +1723,7 @@ class Ct {
|
|
|
1705
1723
|
} : t;
|
|
1706
1724
|
}
|
|
1707
1725
|
}
|
|
1708
|
-
class
|
|
1726
|
+
class Tt {
|
|
1709
1727
|
constructor(e) {
|
|
1710
1728
|
d(this, "client");
|
|
1711
1729
|
this.client = e;
|
|
@@ -1718,27 +1736,27 @@ class _t {
|
|
|
1718
1736
|
} : e;
|
|
1719
1737
|
}
|
|
1720
1738
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1739
|
+
function vt(n, e, t) {
|
|
1740
|
+
return n < e ? e : n > t ? t : n;
|
|
1723
1741
|
}
|
|
1724
|
-
function $(
|
|
1725
|
-
return Object.prototype.toString.call(
|
|
1742
|
+
function $(n) {
|
|
1743
|
+
return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
|
|
1726
1744
|
}
|
|
1727
|
-
function
|
|
1745
|
+
function Nt(n) {
|
|
1728
1746
|
const e = [];
|
|
1729
1747
|
function t(a, r = []) {
|
|
1730
|
-
for (const
|
|
1731
|
-
const
|
|
1732
|
-
$(
|
|
1733
|
-
key: [...r,
|
|
1734
|
-
value:
|
|
1748
|
+
for (const c in a) {
|
|
1749
|
+
const s = a[c];
|
|
1750
|
+
$(s) ? t(s, [...r, c]) : Array.isArray(s) ? t(Mt(s), [...r, c]) : e.push({
|
|
1751
|
+
key: [...r, c],
|
|
1752
|
+
value: s
|
|
1735
1753
|
});
|
|
1736
1754
|
}
|
|
1737
1755
|
}
|
|
1738
|
-
return t(
|
|
1756
|
+
return t(n), e;
|
|
1739
1757
|
}
|
|
1740
|
-
function
|
|
1741
|
-
return
|
|
1758
|
+
function Mt(n) {
|
|
1759
|
+
return n.reduce((e, t, a) => (e[a] = t, e), {});
|
|
1742
1760
|
}
|
|
1743
1761
|
class E {
|
|
1744
1762
|
constructor(e, t) {
|
|
@@ -1752,7 +1770,7 @@ class E {
|
|
|
1752
1770
|
async request(e, t) {
|
|
1753
1771
|
const a = JSON.stringify({ query: e, variables: t }), r = new Headers(this.options.headers);
|
|
1754
1772
|
r.set("Content-Type", "application/json"), r.set("Accept", "application/json");
|
|
1755
|
-
const
|
|
1773
|
+
const c = await this.runMiddlewares(
|
|
1756
1774
|
new Request(this.url, {
|
|
1757
1775
|
...this.options,
|
|
1758
1776
|
body: a,
|
|
@@ -1760,13 +1778,13 @@ class E {
|
|
|
1760
1778
|
method: "POST"
|
|
1761
1779
|
})
|
|
1762
1780
|
);
|
|
1763
|
-
return await this.exec(
|
|
1781
|
+
return await this.exec(c);
|
|
1764
1782
|
}
|
|
1765
1783
|
/** Single file upload */
|
|
1766
1784
|
async upload(e, t) {
|
|
1767
1785
|
const a = this.createUploadBody(e, t), r = new Headers(this.options.headers);
|
|
1768
1786
|
r.delete("Content-Type");
|
|
1769
|
-
const
|
|
1787
|
+
const c = await this.runMiddlewares(
|
|
1770
1788
|
new Request(this.url, {
|
|
1771
1789
|
...this.options,
|
|
1772
1790
|
body: a,
|
|
@@ -1774,26 +1792,26 @@ class E {
|
|
|
1774
1792
|
method: "POST"
|
|
1775
1793
|
})
|
|
1776
1794
|
);
|
|
1777
|
-
return await this.exec(
|
|
1795
|
+
return await this.exec(c);
|
|
1778
1796
|
}
|
|
1779
1797
|
async exec(e) {
|
|
1780
|
-
var t, a, r,
|
|
1798
|
+
var t, a, r, c, s, p;
|
|
1781
1799
|
try {
|
|
1782
|
-
const
|
|
1783
|
-
if (!
|
|
1784
|
-
return { ok: !1, error:
|
|
1785
|
-
const
|
|
1786
|
-
return
|
|
1800
|
+
const u = await fetch(e);
|
|
1801
|
+
if (!u.ok)
|
|
1802
|
+
return { ok: !1, error: f(u.status) };
|
|
1803
|
+
const h = await u.json(), w = h.data, l = (t = h.errors) == null ? void 0 : t.at(0);
|
|
1804
|
+
return l ? ((a = l.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = l.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: f(403, l.message) } : ((c = l.extensions) == null ? void 0 : c.code) === "UNAUTHORIZED" ? { ok: !1, error: f(401, l.message) } : ((s = l.extensions) == null ? void 0 : s.code) === "BAD_USER_INPUT" || ((p = l.extensions) == null ? void 0 : p.code) === "BAD_REQUEST" ? { ok: !1, error: f(400, l.message) } : {
|
|
1787
1805
|
ok: !1,
|
|
1788
|
-
error:
|
|
1806
|
+
error: f(500, l.message)
|
|
1789
1807
|
} : {
|
|
1790
1808
|
ok: !0,
|
|
1791
|
-
data:
|
|
1809
|
+
data: w
|
|
1792
1810
|
};
|
|
1793
1811
|
} catch {
|
|
1794
1812
|
return {
|
|
1795
1813
|
ok: !1,
|
|
1796
|
-
error:
|
|
1814
|
+
error: f(500)
|
|
1797
1815
|
};
|
|
1798
1816
|
}
|
|
1799
1817
|
}
|
|
@@ -1804,8 +1822,8 @@ class E {
|
|
|
1804
1822
|
return t;
|
|
1805
1823
|
}
|
|
1806
1824
|
createUploadBody(e, t) {
|
|
1807
|
-
const a =
|
|
1808
|
-
(
|
|
1825
|
+
const a = Nt(t).filter(
|
|
1826
|
+
(s) => s.value instanceof File || s.value instanceof Blob
|
|
1809
1827
|
), r = new FormData();
|
|
1810
1828
|
r.append(
|
|
1811
1829
|
"operations",
|
|
@@ -1814,17 +1832,17 @@ class E {
|
|
|
1814
1832
|
variables: t
|
|
1815
1833
|
})
|
|
1816
1834
|
);
|
|
1817
|
-
const
|
|
1818
|
-
return a.forEach((
|
|
1819
|
-
|
|
1820
|
-
}), r.append("map", JSON.stringify(
|
|
1821
|
-
r.append(
|
|
1835
|
+
const c = {};
|
|
1836
|
+
return a.forEach((s, p) => {
|
|
1837
|
+
c[p.toString()] = [`variables.${s.key.join(".")}`];
|
|
1838
|
+
}), r.append("map", JSON.stringify(c)), a.forEach((s, p) => {
|
|
1839
|
+
r.append(p.toString(), s.value);
|
|
1822
1840
|
}), r;
|
|
1823
1841
|
}
|
|
1824
1842
|
}
|
|
1825
|
-
async function g(
|
|
1826
|
-
const e = new TextEncoder().encode(
|
|
1827
|
-
return Array.from(new Uint8Array(t)).map((
|
|
1843
|
+
async function g(n) {
|
|
1844
|
+
const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
|
|
1845
|
+
return Array.from(new Uint8Array(t)).map((c) => c.toString(16).padStart(2, "0")).join("");
|
|
1828
1846
|
}
|
|
1829
1847
|
class ke {
|
|
1830
1848
|
constructor(e) {
|
|
@@ -1844,43 +1862,43 @@ class ke {
|
|
|
1844
1862
|
this.enabled && console.log(`\x1B[32m[success] ${e}`);
|
|
1845
1863
|
}
|
|
1846
1864
|
}
|
|
1847
|
-
function B(
|
|
1848
|
-
return new Date(
|
|
1865
|
+
function B(n) {
|
|
1866
|
+
return new Date(n.getTime());
|
|
1849
1867
|
}
|
|
1850
|
-
function D(
|
|
1851
|
-
const t = B(
|
|
1868
|
+
function D(n, e) {
|
|
1869
|
+
const t = B(n);
|
|
1852
1870
|
return t.setDate(t.getDate() + e), t;
|
|
1853
1871
|
}
|
|
1854
|
-
function R(
|
|
1855
|
-
const t = B(
|
|
1872
|
+
function R(n, e) {
|
|
1873
|
+
const t = B(n);
|
|
1856
1874
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
1857
1875
|
}
|
|
1858
|
-
function he(
|
|
1859
|
-
return
|
|
1876
|
+
function he(n, e) {
|
|
1877
|
+
return n.getTime() > e.getTime();
|
|
1860
1878
|
}
|
|
1861
|
-
function Ce(
|
|
1879
|
+
function Ce(n) {
|
|
1862
1880
|
return new Promise((e) => {
|
|
1863
|
-
setTimeout(e,
|
|
1881
|
+
setTimeout(e, n);
|
|
1864
1882
|
});
|
|
1865
1883
|
}
|
|
1866
|
-
function we(
|
|
1884
|
+
function we(n, e) {
|
|
1867
1885
|
const {
|
|
1868
1886
|
until: t,
|
|
1869
1887
|
interval: a = 1e3,
|
|
1870
1888
|
maxAttempt: r = 3
|
|
1871
1889
|
/**/
|
|
1872
1890
|
} = e;
|
|
1873
|
-
async function s
|
|
1874
|
-
const
|
|
1875
|
-
return t(
|
|
1891
|
+
async function c(s, p) {
|
|
1892
|
+
const u = p ?? r, h = await n(...s);
|
|
1893
|
+
return t(h) ? h : u > 1 ? (await Ce(a * ((r - u) / 2)), c(s, u - 1)) : h;
|
|
1876
1894
|
}
|
|
1877
|
-
return async (...
|
|
1895
|
+
return async (...s) => await c(s);
|
|
1878
1896
|
}
|
|
1879
|
-
function P(
|
|
1880
|
-
const t = B(
|
|
1897
|
+
function P(n, e) {
|
|
1898
|
+
const t = B(n);
|
|
1881
1899
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
1882
1900
|
}
|
|
1883
|
-
class
|
|
1901
|
+
class It {
|
|
1884
1902
|
constructor(e) {
|
|
1885
1903
|
d(this, "logger");
|
|
1886
1904
|
d(this, "storageKey", "session");
|
|
@@ -1907,6 +1925,7 @@ class Mt {
|
|
|
1907
1925
|
this._refreshing = e;
|
|
1908
1926
|
}
|
|
1909
1927
|
async create(e) {
|
|
1928
|
+
var r;
|
|
1910
1929
|
if (this.isServer)
|
|
1911
1930
|
return this.logger.warn("'localStorage' is not available on the server."), {
|
|
1912
1931
|
ok: !1,
|
|
@@ -1917,27 +1936,35 @@ class Mt {
|
|
|
1917
1936
|
};
|
|
1918
1937
|
if (e.type === "MAYA") {
|
|
1919
1938
|
const s = await we(() => this.walletService.mayaSession({ id: e.sessionId }), {
|
|
1920
|
-
until: (
|
|
1921
|
-
var
|
|
1922
|
-
return
|
|
1939
|
+
until: (w) => {
|
|
1940
|
+
var l;
|
|
1941
|
+
return w.ok && ((l = w.data) == null ? void 0 : l.member) != null;
|
|
1923
1942
|
},
|
|
1924
1943
|
interval: 1e3,
|
|
1925
1944
|
maxAttempt: 5
|
|
1926
1945
|
})();
|
|
1927
1946
|
if (!s.ok) return s;
|
|
1947
|
+
if (!((r = s.data) != null && r.member))
|
|
1948
|
+
return {
|
|
1949
|
+
ok: !1,
|
|
1950
|
+
error: {
|
|
1951
|
+
name: "HttpForbidden",
|
|
1952
|
+
message: "Forbidden"
|
|
1953
|
+
}
|
|
1954
|
+
};
|
|
1928
1955
|
const u = await we(() => this.authService.createSession(e), {
|
|
1929
|
-
until: (
|
|
1956
|
+
until: (w) => w.ok,
|
|
1930
1957
|
interval: 1e3,
|
|
1931
1958
|
maxAttempt: 5
|
|
1932
1959
|
})();
|
|
1933
1960
|
if (!u.ok) return u;
|
|
1934
|
-
const
|
|
1961
|
+
const h = /* @__PURE__ */ new Date();
|
|
1935
1962
|
return window.localStorage.setItem(
|
|
1936
1963
|
this.storageKey,
|
|
1937
1964
|
JSON.stringify({
|
|
1938
1965
|
...u.data,
|
|
1939
|
-
accessTokenExpiresAt: R(
|
|
1940
|
-
refreshTokenExpiresAt: P(D(
|
|
1966
|
+
accessTokenExpiresAt: R(h, 8).getTime(),
|
|
1967
|
+
refreshTokenExpiresAt: P(D(h, 30), 2).getTime()
|
|
1941
1968
|
})
|
|
1942
1969
|
), {
|
|
1943
1970
|
ok: !0,
|
|
@@ -1945,13 +1972,13 @@ class Mt {
|
|
|
1945
1972
|
};
|
|
1946
1973
|
}
|
|
1947
1974
|
if (e.type === "MOBILE_NUMBER") {
|
|
1948
|
-
const
|
|
1949
|
-
if (
|
|
1975
|
+
const c = await this.authService.createSession(e);
|
|
1976
|
+
if (c.ok) {
|
|
1950
1977
|
const s = /* @__PURE__ */ new Date();
|
|
1951
1978
|
return window.localStorage.setItem(
|
|
1952
1979
|
this.storageKey,
|
|
1953
1980
|
JSON.stringify({
|
|
1954
|
-
...
|
|
1981
|
+
...c.data,
|
|
1955
1982
|
accessTokenExpiresAt: R(s, 8).getTime(),
|
|
1956
1983
|
refreshTokenExpiresAt: P(D(s, 30), 2).getTime()
|
|
1957
1984
|
})
|
|
@@ -1960,7 +1987,7 @@ class Mt {
|
|
|
1960
1987
|
data: null
|
|
1961
1988
|
};
|
|
1962
1989
|
}
|
|
1963
|
-
return
|
|
1990
|
+
return c;
|
|
1964
1991
|
}
|
|
1965
1992
|
const t = await this.authService.createSession(e);
|
|
1966
1993
|
if (!t.ok) return t;
|
|
@@ -2015,8 +2042,8 @@ class Mt {
|
|
|
2015
2042
|
};
|
|
2016
2043
|
try {
|
|
2017
2044
|
let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
|
|
2018
|
-
const r = new Date(t.accessTokenExpiresAt),
|
|
2019
|
-
if (he(a,
|
|
2045
|
+
const r = new Date(t.accessTokenExpiresAt), c = new Date(t.refreshTokenExpiresAt);
|
|
2046
|
+
if (he(a, c))
|
|
2020
2047
|
return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
|
|
2021
2048
|
ok: !1,
|
|
2022
2049
|
error: {
|
|
@@ -2026,18 +2053,18 @@ class Mt {
|
|
|
2026
2053
|
};
|
|
2027
2054
|
if (he(a, r)) {
|
|
2028
2055
|
this.logger.info("Refreshing session..."), this.refreshing = !0;
|
|
2029
|
-
const
|
|
2030
|
-
if (this.refreshing = !1, !
|
|
2031
|
-
return this.logger.error(`Failed to refresh session: ${
|
|
2056
|
+
const s = await this.authService.refreshSession(t.refreshToken);
|
|
2057
|
+
if (this.refreshing = !1, !s.ok)
|
|
2058
|
+
return this.logger.error(`Failed to refresh session: ${s.error.message}`), s.error.name === "InvalidToken" || s.error.name === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
|
|
2032
2059
|
ok: !1,
|
|
2033
|
-
error:
|
|
2060
|
+
error: s.error
|
|
2034
2061
|
}) : (this.logger.warn("Old session returned."), {
|
|
2035
2062
|
ok: !0,
|
|
2036
2063
|
data: t
|
|
2037
2064
|
});
|
|
2038
2065
|
this.logger.success("Session refreshed!"), a = /* @__PURE__ */ new Date(), t = {
|
|
2039
2066
|
...t,
|
|
2040
|
-
...
|
|
2067
|
+
...s.data,
|
|
2041
2068
|
accessTokenExpiresAt: R(a, 8).getTime(),
|
|
2042
2069
|
refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
|
|
2043
2070
|
}, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
@@ -2066,11 +2093,11 @@ class Mt {
|
|
|
2066
2093
|
(t = e.data) != null && t.accessToken && await this.authService.destroySession(e.data.accessToken), window.localStorage.removeItem(this.storageKey);
|
|
2067
2094
|
}
|
|
2068
2095
|
async verify() {
|
|
2069
|
-
var a, r,
|
|
2096
|
+
var a, r, c;
|
|
2070
2097
|
if (this.isServer)
|
|
2071
2098
|
return this.logger.warn("'localStorage' is not available on the server."), !0;
|
|
2072
2099
|
const e = await this.get();
|
|
2073
|
-
if (((a = e.error) == null ? void 0 : a.name) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.name) === "SessionExpired" || ((
|
|
2100
|
+
if (((a = e.error) == null ? void 0 : a.name) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.name) === "SessionExpired" || ((c = e.error) == null ? void 0 : c.name) === "AccountBlacklisted") return !1;
|
|
2074
2101
|
if (!e.data) return !0;
|
|
2075
2102
|
const t = await this.authService.verifySession(e.data.accessToken);
|
|
2076
2103
|
return t || window.localStorage.removeItem(this.storageKey), t;
|
|
@@ -2079,17 +2106,17 @@ class Mt {
|
|
|
2079
2106
|
return typeof window > "u";
|
|
2080
2107
|
}
|
|
2081
2108
|
}
|
|
2082
|
-
function
|
|
2109
|
+
function y(n) {
|
|
2083
2110
|
const e = {};
|
|
2084
|
-
for (const t in
|
|
2085
|
-
const a =
|
|
2111
|
+
for (const t in n) {
|
|
2112
|
+
const a = n[t];
|
|
2086
2113
|
if (a !== null && a !== void 0) {
|
|
2087
2114
|
if ($(a)) {
|
|
2088
|
-
e[t] =
|
|
2115
|
+
e[t] = y(a);
|
|
2089
2116
|
continue;
|
|
2090
2117
|
}
|
|
2091
2118
|
if (Array.isArray(a)) {
|
|
2092
|
-
e[t] = a.map((r) => $(r) ?
|
|
2119
|
+
e[t] = a.map((r) => $(r) ? y(r) : r);
|
|
2093
2120
|
continue;
|
|
2094
2121
|
}
|
|
2095
2122
|
e[t] = a;
|
|
@@ -2097,21 +2124,21 @@ function w(o) {
|
|
|
2097
2124
|
}
|
|
2098
2125
|
return e;
|
|
2099
2126
|
}
|
|
2100
|
-
function i(
|
|
2101
|
-
if (typeof
|
|
2102
|
-
return
|
|
2103
|
-
if (typeof
|
|
2104
|
-
const t = Number.parseFloat(
|
|
2127
|
+
function i(n, e) {
|
|
2128
|
+
if (typeof n == "number" && !Number.isNaN(n))
|
|
2129
|
+
return n;
|
|
2130
|
+
if (typeof n == "string") {
|
|
2131
|
+
const t = Number.parseFloat(n);
|
|
2105
2132
|
if (!Number.isNaN(t))
|
|
2106
2133
|
return t;
|
|
2107
2134
|
}
|
|
2108
2135
|
return e;
|
|
2109
2136
|
}
|
|
2110
|
-
class
|
|
2137
|
+
class Dt {
|
|
2111
2138
|
constructor(e) {
|
|
2112
2139
|
d(this, "staticService");
|
|
2113
2140
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
2114
|
-
this.staticService = new
|
|
2141
|
+
this.staticService = new kt({
|
|
2115
2142
|
url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
|
|
2116
2143
|
});
|
|
2117
2144
|
}
|
|
@@ -2150,10 +2177,10 @@ class It {
|
|
|
2150
2177
|
name: e.name,
|
|
2151
2178
|
logo: e.logo ?? void 0
|
|
2152
2179
|
};
|
|
2153
|
-
return
|
|
2180
|
+
return y(t);
|
|
2154
2181
|
}
|
|
2155
2182
|
platform(e) {
|
|
2156
|
-
var t, a, r, s,
|
|
2183
|
+
var t, a, r, c, s, p, u, h, w, l, A, k, C, _, T, v, N, M, I, U, O, q, F, L, V, Y, H, j, Q, K, z, J, X, Z, ee, te, ae, re, ne, oe, ie, se, ce, de, me, ue, le, pe, fe;
|
|
2157
2184
|
return {
|
|
2158
2185
|
paymentSettings: {
|
|
2159
2186
|
minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
|
|
@@ -2163,15 +2190,15 @@ class It {
|
|
|
2163
2190
|
androidEnabled: ((t = e.bankDepositGatewaySettings) == null ? void 0 : t.androidEnabled) ?? !1,
|
|
2164
2191
|
iosEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.iosEnabled) ?? !1,
|
|
2165
2192
|
webEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.webEnabled) ?? !1,
|
|
2166
|
-
mobileWebEnabled: ((
|
|
2167
|
-
minimumAmount: i((
|
|
2168
|
-
maximumAmount: i((
|
|
2193
|
+
mobileWebEnabled: ((c = e.bankDepositGatewaySettings) == null ? void 0 : c.mobileWebEnabled) ?? !1,
|
|
2194
|
+
minimumAmount: i((s = e.bankDepositGatewaySettings) == null ? void 0 : s.minimumAmount),
|
|
2195
|
+
maximumAmount: i((p = e.bankDepositGatewaySettings) == null ? void 0 : p.maximumAmount)
|
|
2169
2196
|
},
|
|
2170
2197
|
gcash: {
|
|
2171
|
-
androidEnabled: ((
|
|
2172
|
-
iosEnabled: ((
|
|
2173
|
-
webEnabled: ((
|
|
2174
|
-
mobileWebEnabled: ((
|
|
2198
|
+
androidEnabled: ((u = e.gcashDepositGatewaySettings) == null ? void 0 : u.androidEnabled) ?? !1,
|
|
2199
|
+
iosEnabled: ((h = e.gcashDepositGatewaySettings) == null ? void 0 : h.iosEnabled) ?? !1,
|
|
2200
|
+
webEnabled: ((w = e.gcashDepositGatewaySettings) == null ? void 0 : w.webEnabled) ?? !1,
|
|
2201
|
+
mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
|
|
2175
2202
|
minimumAmount: i((A = e.gcashDepositGatewaySettings) == null ? void 0 : A.minimumAmount),
|
|
2176
2203
|
maximumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.maximumAmount)
|
|
2177
2204
|
},
|
|
@@ -2215,8 +2242,8 @@ class It {
|
|
|
2215
2242
|
maya: {
|
|
2216
2243
|
androidEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.androidEnabled) ?? !1,
|
|
2217
2244
|
iosEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.iosEnabled) ?? !1,
|
|
2218
|
-
webEnabled: ((
|
|
2219
|
-
mobileWebEnabled: ((
|
|
2245
|
+
webEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.webEnabled) ?? !1,
|
|
2246
|
+
mobileWebEnabled: ((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.mobileWebEnabled) ?? !1,
|
|
2220
2247
|
minimumAmount: i((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.minimumAmount),
|
|
2221
2248
|
maximumAmount: i((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.maximumAmount)
|
|
2222
2249
|
},
|
|
@@ -2259,7 +2286,7 @@ class It {
|
|
|
2259
2286
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2260
2287
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2261
2288
|
};
|
|
2262
|
-
return
|
|
2289
|
+
return y(t);
|
|
2263
2290
|
}
|
|
2264
2291
|
wallet(e) {
|
|
2265
2292
|
return {
|
|
@@ -2322,7 +2349,7 @@ class It {
|
|
|
2322
2349
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2323
2350
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2324
2351
|
};
|
|
2325
|
-
return
|
|
2352
|
+
return y(t);
|
|
2326
2353
|
}
|
|
2327
2354
|
deposit(e) {
|
|
2328
2355
|
const t = {
|
|
@@ -2331,7 +2358,7 @@ class It {
|
|
|
2331
2358
|
status: e.status,
|
|
2332
2359
|
checkoutUrl: e.checkoutUrl ?? void 0
|
|
2333
2360
|
};
|
|
2334
|
-
return
|
|
2361
|
+
return y(t);
|
|
2335
2362
|
}
|
|
2336
2363
|
depositRecord(e) {
|
|
2337
2364
|
const t = {
|
|
@@ -2346,7 +2373,7 @@ class It {
|
|
|
2346
2373
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2347
2374
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2348
2375
|
};
|
|
2349
|
-
return
|
|
2376
|
+
return y(t);
|
|
2350
2377
|
}
|
|
2351
2378
|
betRecord(e) {
|
|
2352
2379
|
var a;
|
|
@@ -2372,7 +2399,7 @@ class It {
|
|
|
2372
2399
|
odds: ((a = e.metadata) == null ? void 0 : a.odds) ?? void 0
|
|
2373
2400
|
}
|
|
2374
2401
|
};
|
|
2375
|
-
return
|
|
2402
|
+
return y(t);
|
|
2376
2403
|
}
|
|
2377
2404
|
latestBetRecord(e) {
|
|
2378
2405
|
return {
|
|
@@ -2396,7 +2423,7 @@ class It {
|
|
|
2396
2423
|
referenceNumber: e.referenceNumber,
|
|
2397
2424
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2398
2425
|
};
|
|
2399
|
-
return
|
|
2426
|
+
return y(t);
|
|
2400
2427
|
}
|
|
2401
2428
|
game(e) {
|
|
2402
2429
|
return {
|
|
@@ -2428,7 +2455,7 @@ class It {
|
|
|
2428
2455
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2429
2456
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2430
2457
|
};
|
|
2431
|
-
return
|
|
2458
|
+
return y(t);
|
|
2432
2459
|
}
|
|
2433
2460
|
promo(e) {
|
|
2434
2461
|
return {
|
|
@@ -2488,7 +2515,7 @@ class It {
|
|
|
2488
2515
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2489
2516
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2490
2517
|
};
|
|
2491
|
-
return
|
|
2518
|
+
return y(t);
|
|
2492
2519
|
}
|
|
2493
2520
|
cashbackBonus(e) {
|
|
2494
2521
|
return {
|
|
@@ -2506,7 +2533,7 @@ class It {
|
|
|
2506
2533
|
status: e.status,
|
|
2507
2534
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2508
2535
|
};
|
|
2509
|
-
return
|
|
2536
|
+
return y(t);
|
|
2510
2537
|
}
|
|
2511
2538
|
pointsWallet(e) {
|
|
2512
2539
|
return {
|
|
@@ -2534,7 +2561,7 @@ class It {
|
|
|
2534
2561
|
};
|
|
2535
2562
|
}
|
|
2536
2563
|
}
|
|
2537
|
-
class
|
|
2564
|
+
class xt {
|
|
2538
2565
|
constructor(e) {
|
|
2539
2566
|
d(this, "gameService");
|
|
2540
2567
|
d(this, "fileService");
|
|
@@ -2547,12 +2574,12 @@ class Pt {
|
|
|
2547
2574
|
d(this, "transformer");
|
|
2548
2575
|
d(this, "logger");
|
|
2549
2576
|
const t = e.environment === "development";
|
|
2550
|
-
this.sessionManager = new
|
|
2577
|
+
this.sessionManager = new It({
|
|
2551
2578
|
authUrl: t ? "https://auth.development.opexa.io" : "https://auth.opexa.io",
|
|
2552
2579
|
walletUrl: t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2553
2580
|
platform: e.platform,
|
|
2554
2581
|
log: e.log
|
|
2555
|
-
}), this.cmsPortalService = new
|
|
2582
|
+
}), this.cmsPortalService = new Ct({
|
|
2556
2583
|
url: "https://portal-api.opexacms.io/v1",
|
|
2557
2584
|
site: e.site,
|
|
2558
2585
|
platform: e.sitePlatform
|
|
@@ -2566,12 +2593,12 @@ class Pt {
|
|
|
2566
2593
|
}
|
|
2567
2594
|
}
|
|
2568
2595
|
};
|
|
2569
|
-
this.gameService = new
|
|
2596
|
+
this.gameService = new _t(
|
|
2570
2597
|
new E(
|
|
2571
2598
|
t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
|
|
2572
2599
|
a
|
|
2573
2600
|
)
|
|
2574
|
-
), this.fileService = new
|
|
2601
|
+
), this.fileService = new Et(
|
|
2575
2602
|
new E(
|
|
2576
2603
|
t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
|
|
2577
2604
|
a
|
|
@@ -2581,22 +2608,22 @@ class Pt {
|
|
|
2581
2608
|
t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2582
2609
|
a
|
|
2583
2610
|
)
|
|
2584
|
-
), this.reportService = new
|
|
2611
|
+
), this.reportService = new At(
|
|
2585
2612
|
new E(
|
|
2586
2613
|
t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
|
|
2587
2614
|
a
|
|
2588
2615
|
)
|
|
2589
|
-
), this.accountService = new
|
|
2616
|
+
), this.accountService = new St(
|
|
2590
2617
|
new E(
|
|
2591
2618
|
t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
|
|
2592
2619
|
a
|
|
2593
2620
|
)
|
|
2594
|
-
), this.portalService = new
|
|
2621
|
+
), this.portalService = new Tt(
|
|
2595
2622
|
new E(
|
|
2596
2623
|
t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
|
|
2597
2624
|
a
|
|
2598
2625
|
)
|
|
2599
|
-
), this.transformer = new
|
|
2626
|
+
), this.transformer = new Dt(e), this.logger = new ke({
|
|
2600
2627
|
enabled: e.log ?? !1
|
|
2601
2628
|
});
|
|
2602
2629
|
}
|
|
@@ -2712,7 +2739,7 @@ class Pt {
|
|
|
2712
2739
|
* ```
|
|
2713
2740
|
*/
|
|
2714
2741
|
watchSession(e) {
|
|
2715
|
-
const t =
|
|
2742
|
+
const t = vt(e.interval ?? 3e4, 3e4, 6e4);
|
|
2716
2743
|
let a = null;
|
|
2717
2744
|
const r = () => setTimeout(async () => {
|
|
2718
2745
|
await this.sessionManager.verify() || await e.onInvalid(), a = r();
|
|
@@ -2731,6 +2758,9 @@ class Pt {
|
|
|
2731
2758
|
} : null
|
|
2732
2759
|
} : e;
|
|
2733
2760
|
}
|
|
2761
|
+
async validateMayaSession() {
|
|
2762
|
+
return await this.walletService.validateMayaSession();
|
|
2763
|
+
}
|
|
2734
2764
|
/**/
|
|
2735
2765
|
/*+----------------------------------------+*/
|
|
2736
2766
|
/*+ SITE +*/
|
|
@@ -2795,7 +2825,7 @@ class Pt {
|
|
|
2795
2825
|
* ```
|
|
2796
2826
|
*/
|
|
2797
2827
|
async createAccount(e) {
|
|
2798
|
-
const t = e.id ??
|
|
2828
|
+
const t = e.id ?? S.generate(b.Account).toString(), a = await this.accountService.registerMemberAccount({
|
|
2799
2829
|
input: {
|
|
2800
2830
|
id: t,
|
|
2801
2831
|
name: e.name,
|
|
@@ -2877,7 +2907,7 @@ class Pt {
|
|
|
2877
2907
|
* ```
|
|
2878
2908
|
*/
|
|
2879
2909
|
async submitVerificationDetails(e) {
|
|
2880
|
-
const t = e.id ??
|
|
2910
|
+
const t = e.id ?? S.generate(b.Verification).toString(), a = await this.accountService.createMemberVerification({
|
|
2881
2911
|
input: {
|
|
2882
2912
|
id: t,
|
|
2883
2913
|
...e
|
|
@@ -3001,7 +3031,7 @@ class Pt {
|
|
|
3001
3031
|
* ```
|
|
3002
3032
|
*/
|
|
3003
3033
|
async createWithdrawal(e) {
|
|
3004
|
-
const t = e.id ??
|
|
3034
|
+
const t = e.id ?? S.generate(b.Withdrawal).toString();
|
|
3005
3035
|
if (e.type === "BANK") {
|
|
3006
3036
|
const a = await this.walletService.createBankWithdrawal({
|
|
3007
3037
|
input: {
|
|
@@ -3087,7 +3117,7 @@ class Pt {
|
|
|
3087
3117
|
* ```
|
|
3088
3118
|
*/
|
|
3089
3119
|
async createDeposit(e) {
|
|
3090
|
-
const t = e.id ??
|
|
3120
|
+
const t = e.id ?? S.generate(b.Deposit).toString();
|
|
3091
3121
|
if (e.type === "MAYA") {
|
|
3092
3122
|
const a = await this.walletService.createMayaDeposit({
|
|
3093
3123
|
input: {
|
|
@@ -3169,9 +3199,9 @@ class Pt {
|
|
|
3169
3199
|
return t.ok ? {
|
|
3170
3200
|
ok: !0,
|
|
3171
3201
|
data: {
|
|
3172
|
-
betRecords: t.data.edges.map(({ cursor:
|
|
3173
|
-
...this.transformer.transform.betRecord(
|
|
3174
|
-
cursor:
|
|
3202
|
+
betRecords: t.data.edges.map(({ cursor: c, node: s }) => ({
|
|
3203
|
+
...this.transformer.transform.betRecord(s),
|
|
3204
|
+
cursor: c
|
|
3175
3205
|
})),
|
|
3176
3206
|
totalCount: t.data.totalCount,
|
|
3177
3207
|
endCursor: t.data.pageInfo.endCursor ?? void 0,
|
|
@@ -3375,12 +3405,12 @@ class Pt {
|
|
|
3375
3405
|
* ```
|
|
3376
3406
|
*/
|
|
3377
3407
|
async createGameSession(e) {
|
|
3378
|
-
const t = e.id ??
|
|
3408
|
+
const t = e.id ?? S.generate(b.GameSession).toString(), a = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
|
|
3379
3409
|
return a.ok ? { ok: !0, data: { id: t } } : a;
|
|
3380
3410
|
}
|
|
3381
3411
|
/** @deprecated use `createGameSession__next` */
|
|
3382
3412
|
async createGameSession__legacy(e) {
|
|
3383
|
-
const t = e.id ??
|
|
3413
|
+
const t = e.id ?? S.generate(b.GameSession).toString(), a = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
|
|
3384
3414
|
return a.ok ? { ok: !0, data: { id: t } } : a;
|
|
3385
3415
|
}
|
|
3386
3416
|
async createGameSession__next(e) {
|
|
@@ -3397,8 +3427,8 @@ class Pt {
|
|
|
3397
3427
|
/**/
|
|
3398
3428
|
type: a,
|
|
3399
3429
|
provider: r,
|
|
3400
|
-
externalId:
|
|
3401
|
-
} = t.data,
|
|
3430
|
+
externalId: c
|
|
3431
|
+
} = t.data, s = a === "SPORTS" ? e.id ?? (await S.generateFromKey(b.Game, `SPORTS:${r}`)).toString() : e.id ?? S.generate(b.GameSession).toString(), u = [
|
|
3402
3432
|
/**/
|
|
3403
3433
|
"RTG",
|
|
3404
3434
|
"DARWIN",
|
|
@@ -3407,8 +3437,8 @@ class Pt {
|
|
|
3407
3437
|
"EVOLUTION",
|
|
3408
3438
|
"EVOLUTION_NETENT",
|
|
3409
3439
|
"EVOLUTION_REDTIGER"
|
|
3410
|
-
].includes(r) ? await this.walletService.createGameSession({ input: { id:
|
|
3411
|
-
return
|
|
3440
|
+
].includes(r) ? await this.walletService.createGameSession({ input: { id: s, game: c } }) : await this.gameService.createGameSession({ input: { id: s, game: c } });
|
|
3441
|
+
return u.ok ? { ok: !0, data: { id: s } } : u;
|
|
3412
3442
|
}
|
|
3413
3443
|
/** @deprecated use `endGameSession__next` */
|
|
3414
3444
|
async endGameSession(e) {
|
|
@@ -3450,7 +3480,7 @@ class Pt {
|
|
|
3450
3480
|
* ```
|
|
3451
3481
|
*/
|
|
3452
3482
|
async uploadImageFile(e) {
|
|
3453
|
-
const t = e.id ??
|
|
3483
|
+
const t = e.id ?? S.generate(b.File).toString(), a = await this.fileService.uploadPrivateImageFile({
|
|
3454
3484
|
input: {
|
|
3455
3485
|
id: t,
|
|
3456
3486
|
file: e.file
|
|
@@ -3517,8 +3547,8 @@ class Pt {
|
|
|
3517
3547
|
}
|
|
3518
3548
|
}
|
|
3519
3549
|
export {
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3550
|
+
Wt as ObjectId,
|
|
3551
|
+
b as ObjectType,
|
|
3552
|
+
xt as Sdk
|
|
3523
3553
|
};
|
|
3524
3554
|
//# sourceMappingURL=index.mjs.map
|