@opexa/portal-sdk 0.0.5 → 0.0.6
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 +60 -60
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +375 -354
- package/dist/index.mjs.map +1 -1
- package/dist/sdk.d.ts +21 -0
- package/dist/services/transaction.d.ts +0 -1
- package/dist/session-manager.d.ts +4 -1
- package/dist/types.d.ts +0 -1
- package/dist/utils/graphql-client.d.ts +3 -2
- package/dist/utils/http-error.d.ts +21 -1
- package/package.json +1 -4
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ObjectId as
|
|
1
|
+
var ge = Object.defineProperty;
|
|
2
|
+
var ye = (i, e, t) => e in i ? ge(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var d = (i, e, t) => ye(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ObjectId as f } from "@opexa/object-id";
|
|
5
5
|
import { ObjectId as Ct } from "@opexa/object-id";
|
|
6
|
-
const
|
|
6
|
+
const w = {
|
|
7
7
|
Account: 8,
|
|
8
8
|
Deposit: 9,
|
|
9
9
|
Withdrawal: 14,
|
|
@@ -12,9 +12,9 @@ const g = {
|
|
|
12
12
|
GameSession: 204,
|
|
13
13
|
MayaSession: 230
|
|
14
14
|
};
|
|
15
|
-
class
|
|
15
|
+
class he {
|
|
16
16
|
constructor(e) {
|
|
17
|
-
|
|
17
|
+
d(this, "enabled");
|
|
18
18
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
19
19
|
}
|
|
20
20
|
info(e) {
|
|
@@ -32,13 +32,13 @@ class pe {
|
|
|
32
32
|
}
|
|
33
33
|
function n(i, ...e) {
|
|
34
34
|
let t = "";
|
|
35
|
-
for (const [a,
|
|
36
|
-
const
|
|
37
|
-
t = `${t}${
|
|
35
|
+
for (const [a, r] of i.entries()) {
|
|
36
|
+
const s = e.at(a) ?? "";
|
|
37
|
+
t = `${t}${r}${s}`;
|
|
38
38
|
}
|
|
39
39
|
return t.trim();
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const be = n`
|
|
42
42
|
query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
|
|
43
43
|
announcements(first: $first, after: $after, filter: $filter) {
|
|
44
44
|
edges {
|
|
@@ -64,15 +64,15 @@ const ye = n`
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
`,
|
|
67
|
+
`, y = n`
|
|
68
68
|
fragment GameFragment on Game {
|
|
69
69
|
id
|
|
70
70
|
type
|
|
71
71
|
name
|
|
72
72
|
provider
|
|
73
73
|
}
|
|
74
|
-
`,
|
|
75
|
-
${
|
|
74
|
+
`, Ae = n`
|
|
75
|
+
${y}
|
|
76
76
|
|
|
77
77
|
query Game($id: ObjectId!) {
|
|
78
78
|
node(id: $id) {
|
|
@@ -81,8 +81,8 @@ const ye = n`
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
`,
|
|
85
|
-
${
|
|
84
|
+
`, Se = n`
|
|
85
|
+
${y}
|
|
86
86
|
|
|
87
87
|
query Games($after: Cursor, $first: Int, $filter: GameFilterInput) {
|
|
88
88
|
games(after: $after, first: $first, filter: $filter) {
|
|
@@ -101,16 +101,16 @@ const ye = n`
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
`,
|
|
105
|
-
${
|
|
104
|
+
`, Ee = n`
|
|
105
|
+
${y}
|
|
106
106
|
|
|
107
107
|
query GamesByName($search: String!, $filter: GameFilterInput, $first: Int) {
|
|
108
108
|
gamesByName(search: $search, filter: $filter, first: $first) {
|
|
109
109
|
...GameFragment
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
`,
|
|
113
|
-
${
|
|
112
|
+
`, ke = n`
|
|
113
|
+
${y}
|
|
114
114
|
|
|
115
115
|
query GameSession($id: ObjectId!) {
|
|
116
116
|
node(id: $id) {
|
|
@@ -126,7 +126,7 @@ const ye = n`
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
`,
|
|
129
|
+
`, Ce = n`
|
|
130
130
|
mutation CreateGameSession($input: CreateGameSessionInput!) {
|
|
131
131
|
createGameSession(input: $input) {
|
|
132
132
|
... on GameDoesNotExistError {
|
|
@@ -135,12 +135,12 @@ const ye = n`
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
`,
|
|
138
|
+
`, Te = n`
|
|
139
139
|
mutation EndGameSession($input: EndGameSessionInput!) {
|
|
140
140
|
endGameSession(input: $input)
|
|
141
141
|
}
|
|
142
|
-
`,
|
|
143
|
-
${
|
|
142
|
+
`, _e = n`
|
|
143
|
+
${y}
|
|
144
144
|
|
|
145
145
|
query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
|
|
146
146
|
member {
|
|
@@ -179,7 +179,7 @@ const ye = n`
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
`,
|
|
182
|
+
`, ve = n`
|
|
183
183
|
query LatestBetRecords {
|
|
184
184
|
latestBetRecords {
|
|
185
185
|
id
|
|
@@ -198,7 +198,7 @@ const ye = n`
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
${
|
|
201
|
+
${y}
|
|
202
202
|
`, A = n`
|
|
203
203
|
fragment FileFragment on File {
|
|
204
204
|
id
|
|
@@ -206,7 +206,7 @@ const ye = n`
|
|
|
206
206
|
status
|
|
207
207
|
dateTimeCreated
|
|
208
208
|
}
|
|
209
|
-
`,
|
|
209
|
+
`, me = n`
|
|
210
210
|
${A}
|
|
211
211
|
|
|
212
212
|
query File($id: ObjectId!) {
|
|
@@ -251,7 +251,7 @@ const fe = n`
|
|
|
251
251
|
dateTimeCreated
|
|
252
252
|
dateTimeLastUpdated
|
|
253
253
|
}
|
|
254
|
-
`,
|
|
254
|
+
`, De = n`
|
|
255
255
|
${fe}
|
|
256
256
|
|
|
257
257
|
query Cashbacks {
|
|
@@ -259,7 +259,7 @@ const fe = n`
|
|
|
259
259
|
...CashbackFragment
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
`,
|
|
262
|
+
`, E = n`
|
|
263
263
|
${A}
|
|
264
264
|
|
|
265
265
|
fragment PromoFragment on Promo {
|
|
@@ -278,16 +278,16 @@ const fe = n`
|
|
|
278
278
|
dateTimeCreated
|
|
279
279
|
dateTimeLastUpdated
|
|
280
280
|
}
|
|
281
|
-
`,
|
|
282
|
-
${
|
|
281
|
+
`, Me = n`
|
|
282
|
+
${E}
|
|
283
283
|
|
|
284
284
|
query Promos {
|
|
285
285
|
promos {
|
|
286
286
|
...PromoFragment
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
`,
|
|
290
|
-
${
|
|
289
|
+
`, Ne = n`
|
|
290
|
+
${E}
|
|
291
291
|
|
|
292
292
|
query AvailablePromos($filter: PromoFilterInput) {
|
|
293
293
|
availablePromos(filter: $filter) {
|
|
@@ -295,7 +295,7 @@ const fe = n`
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
`, Re = n`
|
|
298
|
-
${
|
|
298
|
+
${E}
|
|
299
299
|
|
|
300
300
|
query Bonus {
|
|
301
301
|
bonus {
|
|
@@ -323,7 +323,7 @@ const fe = n`
|
|
|
323
323
|
dateTimeLastUpdated
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
`,
|
|
326
|
+
`, Ie = n`
|
|
327
327
|
${fe}
|
|
328
328
|
|
|
329
329
|
query CashbackBonuses {
|
|
@@ -337,7 +337,7 @@ const fe = n`
|
|
|
337
337
|
dateTimeLastUpdated
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
`,
|
|
340
|
+
`, Ge = n`
|
|
341
341
|
mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
|
|
342
342
|
claimCashbackBonus(input: $input) {
|
|
343
343
|
... on CashbackBonusDoesNotExistError {
|
|
@@ -346,7 +346,7 @@ const fe = n`
|
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
`,
|
|
349
|
+
`, $e = n`
|
|
350
350
|
query DepositRecords($after: Cursor, $first: Int, $filter: DepositRecordFilterInput) {
|
|
351
351
|
member {
|
|
352
352
|
depositRecords(after: $after, first: $first, filter: $filter) {
|
|
@@ -375,7 +375,7 @@ const fe = n`
|
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
`,
|
|
378
|
+
`, Pe = n`
|
|
379
379
|
mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
|
|
380
380
|
createGCashDeposit(input: $input) {
|
|
381
381
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -412,7 +412,7 @@ const fe = n`
|
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
`,
|
|
415
|
+
`, We = n`
|
|
416
416
|
mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
|
|
417
417
|
createMayaDeposit(input: $input) {
|
|
418
418
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -449,7 +449,7 @@ const fe = n`
|
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
-
`,
|
|
452
|
+
`, Be = n`
|
|
453
453
|
mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
|
|
454
454
|
createMayaAppDeposit(input: $input) {
|
|
455
455
|
... on DepositPromoMaximumAmountExceededError {
|
|
@@ -486,7 +486,7 @@ const fe = n`
|
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
`,
|
|
489
|
+
`, Ue = n`
|
|
490
490
|
query Deposit($id: ObjectId!) {
|
|
491
491
|
node(id: $id) {
|
|
492
492
|
... on GCashDeposit {
|
|
@@ -527,13 +527,13 @@ const fe = n`
|
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
`,
|
|
530
|
+
`, xe = n`
|
|
531
531
|
query DepositsCount {
|
|
532
532
|
member {
|
|
533
533
|
depositsCount
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
`,
|
|
536
|
+
`, qe = n`
|
|
537
537
|
query Member {
|
|
538
538
|
member {
|
|
539
539
|
dateTimeLastActive
|
|
@@ -562,7 +562,7 @@ const fe = n`
|
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
`,
|
|
565
|
+
`, Fe = n`
|
|
566
566
|
${A}
|
|
567
567
|
|
|
568
568
|
query MemberVerification {
|
|
@@ -586,7 +586,7 @@ const fe = n`
|
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
`,
|
|
589
|
+
`, Le = n`
|
|
590
590
|
mutation RegisterMemberAccount(
|
|
591
591
|
$input: RegisterMemberAccountInput!
|
|
592
592
|
$referralCode: String
|
|
@@ -629,7 +629,7 @@ const fe = n`
|
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
`,
|
|
632
|
+
`, Ve = n`
|
|
633
633
|
mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
|
|
634
634
|
updateMemberAccount(input: $input) {
|
|
635
635
|
... on AccountNameNotAvailableError {
|
|
@@ -662,7 +662,7 @@ const fe = n`
|
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
`,
|
|
665
|
+
`, He = n`
|
|
666
666
|
mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
|
|
667
667
|
resetPassword(input: $input, verificationCode: $verificationCode) {
|
|
668
668
|
... on AccountNotFoundError {
|
|
@@ -675,11 +675,11 @@ const fe = n`
|
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
|
-
`,
|
|
678
|
+
`, Ye = n`
|
|
679
679
|
mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
|
|
680
680
|
deleteMemberAccount(input: $input)
|
|
681
681
|
}
|
|
682
|
-
`,
|
|
682
|
+
`, je = n`
|
|
683
683
|
mutation SendVerificationCode($input: SendVerificationCodeInput!) {
|
|
684
684
|
sendVerificationCode(input: $input) {
|
|
685
685
|
... on InvalidPlatformError {
|
|
@@ -692,7 +692,7 @@ const fe = n`
|
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
|
-
`,
|
|
695
|
+
`, Qe = n`
|
|
696
696
|
mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
|
|
697
697
|
verifyMobileNumber(input: $input) {
|
|
698
698
|
... on InvalidSMSVerificationCodeError {
|
|
@@ -705,7 +705,7 @@ const fe = n`
|
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
`,
|
|
708
|
+
`, Ke = n`
|
|
709
709
|
mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
|
|
710
710
|
createMemberVerification(input: $input) {
|
|
711
711
|
... on FileDoesNotExistError {
|
|
@@ -722,7 +722,7 @@ const fe = n`
|
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
`,
|
|
725
|
+
`, ze = n`
|
|
726
726
|
mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
|
|
727
727
|
updateMemberVerification(input: $input) {
|
|
728
728
|
... on FileDoesNotExistError {
|
|
@@ -743,7 +743,7 @@ const fe = n`
|
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
`,
|
|
746
|
+
`, Je = n`
|
|
747
747
|
query ProfileCompletion {
|
|
748
748
|
profileCompletion {
|
|
749
749
|
completionPercentage
|
|
@@ -754,7 +754,7 @@ const fe = n`
|
|
|
754
754
|
accountPassword
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
`,
|
|
757
|
+
`, Ze = n`
|
|
758
758
|
fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
|
|
759
759
|
minimumAmount
|
|
760
760
|
maximumAmount
|
|
@@ -808,7 +808,7 @@ const fe = n`
|
|
|
808
808
|
multiplier
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
|
-
`,
|
|
811
|
+
`, Xe = n`
|
|
812
812
|
query PointsWallet {
|
|
813
813
|
pointsWallet {
|
|
814
814
|
id
|
|
@@ -817,7 +817,7 @@ const fe = n`
|
|
|
817
817
|
dateTimeCreated
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
|
-
`,
|
|
820
|
+
`, et = n`
|
|
821
821
|
mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
|
|
822
822
|
pointsToCashConversion(input: $input) {
|
|
823
823
|
... on InsufficientPointsError {
|
|
@@ -826,7 +826,7 @@ const fe = n`
|
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
|
-
`,
|
|
829
|
+
`, tt = n`
|
|
830
830
|
query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
|
|
831
831
|
member {
|
|
832
832
|
transactionRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -852,7 +852,7 @@ const fe = n`
|
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
|
-
`,
|
|
855
|
+
`, at = n`
|
|
856
856
|
query Wallet {
|
|
857
857
|
wallet {
|
|
858
858
|
id
|
|
@@ -862,7 +862,7 @@ const fe = n`
|
|
|
862
862
|
dateTimeLastUpdated
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
|
-
`,
|
|
865
|
+
`, rt = n`
|
|
866
866
|
query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
|
|
867
867
|
member {
|
|
868
868
|
withdrawalRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -929,7 +929,7 @@ const fe = n`
|
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
|
-
`,
|
|
932
|
+
`, ot = n`
|
|
933
933
|
mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
|
|
934
934
|
createGCashWithdrawal(input: $input) {
|
|
935
935
|
... on AccountNotVerifiedError {
|
|
@@ -958,7 +958,7 @@ const fe = n`
|
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
`,
|
|
961
|
+
`, nt = n`
|
|
962
962
|
mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
|
|
963
963
|
createMayaWithdrawal(input: $input) {
|
|
964
964
|
... on AccountNotVerifiedError {
|
|
@@ -987,7 +987,7 @@ const fe = n`
|
|
|
987
987
|
}
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
|
-
`,
|
|
990
|
+
`, it = n`
|
|
991
991
|
mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
|
|
992
992
|
createMayaAppWithdrawal(input: $input) {
|
|
993
993
|
... on AccountNotVerifiedError {
|
|
@@ -1012,7 +1012,7 @@ const fe = n`
|
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
|
-
`,
|
|
1015
|
+
`, st = n`
|
|
1016
1016
|
mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
|
|
1017
1017
|
createBankWithdrawal(input: $input) {
|
|
1018
1018
|
... on MobileNumberNotVerifiedError {
|
|
@@ -1041,14 +1041,14 @@ const fe = n`
|
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
1043
|
}
|
|
1044
|
-
`,
|
|
1044
|
+
`, dt = n`
|
|
1045
1045
|
query RemainingDailyWithdrawalsCount {
|
|
1046
1046
|
remainingDailyWithdrawalsCount
|
|
1047
1047
|
}
|
|
1048
1048
|
`;
|
|
1049
|
-
class
|
|
1049
|
+
class mt {
|
|
1050
1050
|
constructor(e) {
|
|
1051
|
-
|
|
1051
|
+
d(this, "client");
|
|
1052
1052
|
this.client = e;
|
|
1053
1053
|
}
|
|
1054
1054
|
/** aka `Query.self` */
|
|
@@ -1061,7 +1061,7 @@ class dt {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
async registerMemberAccount(e) {
|
|
1063
1063
|
const t = await this.client.request(
|
|
1064
|
-
|
|
1064
|
+
Le,
|
|
1065
1065
|
e
|
|
1066
1066
|
);
|
|
1067
1067
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
@@ -1073,7 +1073,7 @@ class dt {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
async updateMemberAccount(e) {
|
|
1075
1075
|
const t = await this.client.request(
|
|
1076
|
-
|
|
1076
|
+
Ve,
|
|
1077
1077
|
e
|
|
1078
1078
|
);
|
|
1079
1079
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
@@ -1085,7 +1085,7 @@ class dt {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
async deleteMemberAccount(e) {
|
|
1087
1087
|
const t = await this.client.request(
|
|
1088
|
-
|
|
1088
|
+
Ye,
|
|
1089
1089
|
e
|
|
1090
1090
|
);
|
|
1091
1091
|
return t.ok ? t.data.deleteMemberAccount ? {
|
|
@@ -1100,7 +1100,7 @@ class dt {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
async resetPassword(e) {
|
|
1102
1102
|
const t = await this.client.request(
|
|
1103
|
-
|
|
1103
|
+
He,
|
|
1104
1104
|
e
|
|
1105
1105
|
);
|
|
1106
1106
|
return t.ok ? t.data.resetPassword ? {
|
|
@@ -1111,15 +1111,15 @@ class dt {
|
|
|
1111
1111
|
} : t;
|
|
1112
1112
|
}
|
|
1113
1113
|
async profileCompletion() {
|
|
1114
|
-
const e = await this.client.request(
|
|
1114
|
+
const e = await this.client.request(Je);
|
|
1115
1115
|
return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
|
|
1116
1116
|
}
|
|
1117
1117
|
async platform() {
|
|
1118
|
-
return await this.client.request(
|
|
1118
|
+
return await this.client.request(Ze);
|
|
1119
1119
|
}
|
|
1120
1120
|
async sendVerificationCode(e) {
|
|
1121
1121
|
const t = await this.client.request(
|
|
1122
|
-
|
|
1122
|
+
je,
|
|
1123
1123
|
e
|
|
1124
1124
|
);
|
|
1125
1125
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
@@ -1131,7 +1131,7 @@ class dt {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
async verifyMobileNumber(e) {
|
|
1133
1133
|
const t = await this.client.request(
|
|
1134
|
-
|
|
1134
|
+
Qe,
|
|
1135
1135
|
e
|
|
1136
1136
|
);
|
|
1137
1137
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
@@ -1143,7 +1143,7 @@ class dt {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
async createMemberVerification(e) {
|
|
1145
1145
|
const t = await this.client.request(
|
|
1146
|
-
|
|
1146
|
+
Ke,
|
|
1147
1147
|
e
|
|
1148
1148
|
);
|
|
1149
1149
|
return t.ok ? t.data.createMemberVerification ? {
|
|
@@ -1155,7 +1155,7 @@ class dt {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
async updateMemberVerification(e) {
|
|
1157
1157
|
const t = await this.client.request(
|
|
1158
|
-
|
|
1158
|
+
ze,
|
|
1159
1159
|
e
|
|
1160
1160
|
);
|
|
1161
1161
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
@@ -1166,28 +1166,28 @@ class dt {
|
|
|
1166
1166
|
} : t;
|
|
1167
1167
|
}
|
|
1168
1168
|
async memberVerification() {
|
|
1169
|
-
const e = await this.client.request(
|
|
1169
|
+
const e = await this.client.request(Fe);
|
|
1170
1170
|
return e.ok ? {
|
|
1171
1171
|
ok: !0,
|
|
1172
1172
|
data: e.data.memberAccount.verification
|
|
1173
1173
|
} : e;
|
|
1174
1174
|
}
|
|
1175
1175
|
async announcements(e) {
|
|
1176
|
-
const t = await this.client.request(
|
|
1176
|
+
const t = await this.client.request(be, e);
|
|
1177
1177
|
return t.ok ? {
|
|
1178
1178
|
ok: !0,
|
|
1179
1179
|
data: t.data.announcements
|
|
1180
1180
|
} : t;
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1184
|
-
const t =
|
|
1183
|
+
function h(i, e) {
|
|
1184
|
+
const t = S[i] ? S[i] : S[500];
|
|
1185
1185
|
return {
|
|
1186
1186
|
code: t.code,
|
|
1187
1187
|
message: e ?? t.message
|
|
1188
1188
|
};
|
|
1189
1189
|
}
|
|
1190
|
-
const
|
|
1190
|
+
const S = {
|
|
1191
1191
|
400: {
|
|
1192
1192
|
code: "HttpBadRequest",
|
|
1193
1193
|
message: "Bad Request"
|
|
@@ -1216,37 +1216,45 @@ const ct = {
|
|
|
1216
1216
|
code: "HttpInternalServerError",
|
|
1217
1217
|
message: "Internal Server Error"
|
|
1218
1218
|
},
|
|
1219
|
+
502: {
|
|
1220
|
+
code: "HttpBadGateway",
|
|
1221
|
+
message: "Bad Gateway"
|
|
1222
|
+
},
|
|
1219
1223
|
503: {
|
|
1220
1224
|
code: "HttpServiceUnavailable",
|
|
1221
1225
|
message: "Service Unavailable"
|
|
1226
|
+
},
|
|
1227
|
+
504: {
|
|
1228
|
+
code: "HttpGatewayTimeout",
|
|
1229
|
+
message: "Gateway Timeout"
|
|
1222
1230
|
}
|
|
1223
1231
|
};
|
|
1224
|
-
async function
|
|
1232
|
+
async function p(i) {
|
|
1225
1233
|
const e = new TextEncoder().encode(i), t = await crypto.subtle.digest("SHA-256", e);
|
|
1226
|
-
return Array.from(new Uint8Array(t)).map((
|
|
1234
|
+
return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
1227
1235
|
}
|
|
1228
|
-
class
|
|
1236
|
+
class ct {
|
|
1229
1237
|
constructor(e) {
|
|
1230
|
-
|
|
1231
|
-
|
|
1238
|
+
d(this, "url");
|
|
1239
|
+
d(this, "platform");
|
|
1232
1240
|
this.url = e.url, this.platform = e.platform;
|
|
1233
1241
|
}
|
|
1234
1242
|
async createSession(e) {
|
|
1235
1243
|
const t = new Headers();
|
|
1236
1244
|
if (t.set("Content-Type", "application/json"), t.set("Platform-Code", this.platform), t.set("Role", "MEMBER"), "name" in e) {
|
|
1237
|
-
const a = `${e.name}:${await
|
|
1238
|
-
t.set("Authorization", `Basic ${
|
|
1245
|
+
const a = `${e.name}:${await p(e.password)}`, r = Buffer.from(a).toString("base64");
|
|
1246
|
+
t.set("Authorization", `Basic ${r}`);
|
|
1239
1247
|
}
|
|
1240
1248
|
if ("mobileNumber" in e) {
|
|
1241
|
-
const a = `${e.mobileNumber}:${e.verificationCode}`,
|
|
1242
|
-
t.set("Authorization", `Basic ${
|
|
1249
|
+
const a = `${e.mobileNumber}:${e.verificationCode}`, r = Buffer.from(a).toString("base64");
|
|
1250
|
+
t.set("Authorization", `Basic ${r}`);
|
|
1243
1251
|
}
|
|
1244
1252
|
try {
|
|
1245
1253
|
const a = await fetch(`${this.url}/sessions`, {
|
|
1246
1254
|
method: "POST",
|
|
1247
1255
|
headers: t
|
|
1248
|
-
}),
|
|
1249
|
-
return a.status === 401 || a.status === 403 ?
|
|
1256
|
+
}), r = await a.json();
|
|
1257
|
+
return a.status === 401 || a.status === 403 ? r.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1250
1258
|
ok: !1,
|
|
1251
1259
|
error: {
|
|
1252
1260
|
code: "AccountBlacklisted",
|
|
@@ -1260,10 +1268,10 @@ class mt {
|
|
|
1260
1268
|
}
|
|
1261
1269
|
} : a.ok ? {
|
|
1262
1270
|
ok: !0,
|
|
1263
|
-
data:
|
|
1271
|
+
data: r
|
|
1264
1272
|
} : {
|
|
1265
1273
|
ok: !1,
|
|
1266
|
-
error:
|
|
1274
|
+
error: h(a.status)
|
|
1267
1275
|
};
|
|
1268
1276
|
} catch {
|
|
1269
1277
|
return {
|
|
@@ -1303,7 +1311,7 @@ class mt {
|
|
|
1303
1311
|
data: a
|
|
1304
1312
|
} : {
|
|
1305
1313
|
ok: !1,
|
|
1306
|
-
error:
|
|
1314
|
+
error: h(t.status)
|
|
1307
1315
|
};
|
|
1308
1316
|
} catch {
|
|
1309
1317
|
return {
|
|
@@ -1328,7 +1336,7 @@ class mt {
|
|
|
1328
1336
|
});
|
|
1329
1337
|
return t.ok ? { ok: !0 } : {
|
|
1330
1338
|
ok: !1,
|
|
1331
|
-
error:
|
|
1339
|
+
error: h(t.status)
|
|
1332
1340
|
};
|
|
1333
1341
|
} catch {
|
|
1334
1342
|
return {
|
|
@@ -1359,18 +1367,18 @@ class mt {
|
|
|
1359
1367
|
}
|
|
1360
1368
|
class ut {
|
|
1361
1369
|
constructor(e) {
|
|
1362
|
-
|
|
1370
|
+
d(this, "client");
|
|
1363
1371
|
this.client = e;
|
|
1364
1372
|
}
|
|
1365
1373
|
async file(e) {
|
|
1366
|
-
const t = await this.client.request(
|
|
1374
|
+
const t = await this.client.request(me, e);
|
|
1367
1375
|
return t.ok ? {
|
|
1368
1376
|
ok: !0,
|
|
1369
1377
|
data: t.data.node
|
|
1370
1378
|
} : t;
|
|
1371
1379
|
}
|
|
1372
1380
|
async uploadPrivateImageFile(e) {
|
|
1373
|
-
const t = await this.client.upload(
|
|
1381
|
+
const t = await this.client.upload(me, e);
|
|
1374
1382
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1375
1383
|
ok: !1,
|
|
1376
1384
|
error: t.data.uploadPrivateImageFile
|
|
@@ -1379,30 +1387,30 @@ class ut {
|
|
|
1379
1387
|
} : t;
|
|
1380
1388
|
}
|
|
1381
1389
|
}
|
|
1382
|
-
class
|
|
1390
|
+
class we {
|
|
1383
1391
|
constructor(e) {
|
|
1384
|
-
|
|
1392
|
+
d(this, "client");
|
|
1385
1393
|
this.client = e;
|
|
1386
1394
|
}
|
|
1387
1395
|
async game(e) {
|
|
1388
|
-
const t = await this.client.request(
|
|
1396
|
+
const t = await this.client.request(Ae, e);
|
|
1389
1397
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1390
1398
|
}
|
|
1391
1399
|
async games(e) {
|
|
1392
|
-
const t = await this.client.request(
|
|
1400
|
+
const t = await this.client.request(Se, e);
|
|
1393
1401
|
return t.ok ? { ok: !0, data: t.data.games } : t;
|
|
1394
1402
|
}
|
|
1395
1403
|
async gamesByName(e) {
|
|
1396
|
-
const t = await this.client.request(
|
|
1404
|
+
const t = await this.client.request(Ee, e);
|
|
1397
1405
|
return t.ok ? { ok: !0, data: t.data.gamesByName } : t;
|
|
1398
1406
|
}
|
|
1399
1407
|
async gameSession(e) {
|
|
1400
|
-
const t = await this.client.request(
|
|
1408
|
+
const t = await this.client.request(ke, e);
|
|
1401
1409
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1402
1410
|
}
|
|
1403
1411
|
async createGameSession(e) {
|
|
1404
1412
|
const t = await this.client.request(
|
|
1405
|
-
|
|
1413
|
+
Ce,
|
|
1406
1414
|
e
|
|
1407
1415
|
);
|
|
1408
1416
|
return t.ok ? t.data.createGameSession ? {
|
|
@@ -1414,7 +1422,7 @@ class he {
|
|
|
1414
1422
|
}
|
|
1415
1423
|
async endGameSession(e) {
|
|
1416
1424
|
const t = await this.client.request(
|
|
1417
|
-
|
|
1425
|
+
Te,
|
|
1418
1426
|
e
|
|
1419
1427
|
);
|
|
1420
1428
|
return t.ok ? t.data.endGameSession ? {
|
|
@@ -1430,43 +1438,43 @@ class he {
|
|
|
1430
1438
|
}
|
|
1431
1439
|
class lt {
|
|
1432
1440
|
constructor(e) {
|
|
1433
|
-
|
|
1441
|
+
d(this, "client");
|
|
1434
1442
|
this.client = e;
|
|
1435
1443
|
}
|
|
1436
1444
|
async betRecords(e) {
|
|
1437
|
-
const t = await this.client.request(
|
|
1445
|
+
const t = await this.client.request(_e, e);
|
|
1438
1446
|
return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
|
|
1439
1447
|
}
|
|
1440
1448
|
async transactionRecords(e) {
|
|
1441
1449
|
const t = await this.client.request(
|
|
1442
|
-
|
|
1450
|
+
tt,
|
|
1443
1451
|
e
|
|
1444
1452
|
);
|
|
1445
1453
|
return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
|
|
1446
1454
|
}
|
|
1447
1455
|
async withdrawalRecords(e) {
|
|
1448
1456
|
const t = await this.client.request(
|
|
1449
|
-
|
|
1457
|
+
rt,
|
|
1450
1458
|
e
|
|
1451
1459
|
);
|
|
1452
1460
|
return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
|
|
1453
1461
|
}
|
|
1454
1462
|
async depositRecords(e) {
|
|
1455
|
-
const t = await this.client.request(
|
|
1463
|
+
const t = await this.client.request($e, e);
|
|
1456
1464
|
return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
|
|
1457
1465
|
}
|
|
1458
1466
|
async depositsCount() {
|
|
1459
|
-
const e = await this.client.request(
|
|
1467
|
+
const e = await this.client.request(xe);
|
|
1460
1468
|
return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
|
|
1461
1469
|
}
|
|
1462
1470
|
async member() {
|
|
1463
|
-
const e = await this.client.request(
|
|
1471
|
+
const e = await this.client.request(qe);
|
|
1464
1472
|
return e.ok ? { ok: e.ok, data: e.data.member } : e;
|
|
1465
1473
|
}
|
|
1466
1474
|
}
|
|
1467
1475
|
class pt {
|
|
1468
1476
|
constructor(e) {
|
|
1469
|
-
|
|
1477
|
+
d(this, "url");
|
|
1470
1478
|
this.url = e.url;
|
|
1471
1479
|
}
|
|
1472
1480
|
gameThumbnails(e) {
|
|
@@ -1476,26 +1484,26 @@ class pt {
|
|
|
1476
1484
|
];
|
|
1477
1485
|
}
|
|
1478
1486
|
}
|
|
1479
|
-
class
|
|
1487
|
+
class ht extends we {
|
|
1480
1488
|
async promos() {
|
|
1481
|
-
const e = await this.client.request(
|
|
1489
|
+
const e = await this.client.request(Me);
|
|
1482
1490
|
return e.ok ? { ok: e.ok, data: e.data.promos } : e;
|
|
1483
1491
|
}
|
|
1484
1492
|
async cashbacks() {
|
|
1485
|
-
const e = await this.client.request(
|
|
1493
|
+
const e = await this.client.request(De);
|
|
1486
1494
|
return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
|
|
1487
1495
|
}
|
|
1488
1496
|
async availablePromos(e) {
|
|
1489
|
-
const t = await this.client.request(
|
|
1497
|
+
const t = await this.client.request(Ne, e);
|
|
1490
1498
|
return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
|
|
1491
1499
|
}
|
|
1492
1500
|
async cashbackBonuses() {
|
|
1493
|
-
const e = await this.client.request(
|
|
1501
|
+
const e = await this.client.request(Ie);
|
|
1494
1502
|
return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
|
|
1495
1503
|
}
|
|
1496
1504
|
async claimCashbackBonus(e) {
|
|
1497
1505
|
const t = await this.client.request(
|
|
1498
|
-
|
|
1506
|
+
Ge,
|
|
1499
1507
|
e
|
|
1500
1508
|
);
|
|
1501
1509
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
@@ -1513,16 +1521,16 @@ class ft extends he {
|
|
|
1513
1521
|
return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
|
|
1514
1522
|
}
|
|
1515
1523
|
async wallet() {
|
|
1516
|
-
const e = await this.client.request(
|
|
1524
|
+
const e = await this.client.request(at);
|
|
1517
1525
|
return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
|
|
1518
1526
|
}
|
|
1519
1527
|
async deposit(e) {
|
|
1520
|
-
const t = await this.client.request(
|
|
1528
|
+
const t = await this.client.request(Ue, e);
|
|
1521
1529
|
return t.ok ? { ok: t.ok, data: t.data.node } : t;
|
|
1522
1530
|
}
|
|
1523
1531
|
async createGCashDeposit(e) {
|
|
1524
1532
|
const t = await this.client.request(
|
|
1525
|
-
|
|
1533
|
+
Pe,
|
|
1526
1534
|
e
|
|
1527
1535
|
);
|
|
1528
1536
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
@@ -1534,7 +1542,7 @@ class ft extends he {
|
|
|
1534
1542
|
}
|
|
1535
1543
|
async createMayaDeposit(e) {
|
|
1536
1544
|
const t = await this.client.request(
|
|
1537
|
-
|
|
1545
|
+
We,
|
|
1538
1546
|
e
|
|
1539
1547
|
);
|
|
1540
1548
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
@@ -1546,7 +1554,7 @@ class ft extends he {
|
|
|
1546
1554
|
}
|
|
1547
1555
|
async createMayaAppDeposit(e) {
|
|
1548
1556
|
const t = await this.client.request(
|
|
1549
|
-
|
|
1557
|
+
Be,
|
|
1550
1558
|
e
|
|
1551
1559
|
);
|
|
1552
1560
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
@@ -1558,7 +1566,7 @@ class ft extends he {
|
|
|
1558
1566
|
}
|
|
1559
1567
|
async createGCashWithdrawal(e) {
|
|
1560
1568
|
const t = await this.client.request(
|
|
1561
|
-
|
|
1569
|
+
ot,
|
|
1562
1570
|
e
|
|
1563
1571
|
);
|
|
1564
1572
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
@@ -1570,7 +1578,7 @@ class ft extends he {
|
|
|
1570
1578
|
}
|
|
1571
1579
|
async createMayaWithdrawal(e) {
|
|
1572
1580
|
const t = await this.client.request(
|
|
1573
|
-
|
|
1581
|
+
nt,
|
|
1574
1582
|
e
|
|
1575
1583
|
);
|
|
1576
1584
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
@@ -1582,7 +1590,7 @@ class ft extends he {
|
|
|
1582
1590
|
}
|
|
1583
1591
|
async createMayaAppWithdrawal(e) {
|
|
1584
1592
|
const t = await this.client.request(
|
|
1585
|
-
|
|
1593
|
+
it,
|
|
1586
1594
|
e
|
|
1587
1595
|
);
|
|
1588
1596
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
@@ -1594,7 +1602,7 @@ class ft extends he {
|
|
|
1594
1602
|
}
|
|
1595
1603
|
async createBankWithdrawal(e) {
|
|
1596
1604
|
const t = await this.client.request(
|
|
1597
|
-
|
|
1605
|
+
st,
|
|
1598
1606
|
e
|
|
1599
1607
|
);
|
|
1600
1608
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
@@ -1606,17 +1614,17 @@ class ft extends he {
|
|
|
1606
1614
|
}
|
|
1607
1615
|
async remainingDailyWithdrawalsCount() {
|
|
1608
1616
|
const e = await this.client.request(
|
|
1609
|
-
|
|
1617
|
+
dt
|
|
1610
1618
|
);
|
|
1611
1619
|
return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
|
|
1612
1620
|
}
|
|
1613
1621
|
async pointsWallet() {
|
|
1614
|
-
const e = await this.client.request(
|
|
1622
|
+
const e = await this.client.request(Xe);
|
|
1615
1623
|
return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
|
|
1616
1624
|
}
|
|
1617
1625
|
async pointsToCashConversion(e) {
|
|
1618
1626
|
const t = await this.client.request(
|
|
1619
|
-
|
|
1627
|
+
et,
|
|
1620
1628
|
e
|
|
1621
1629
|
);
|
|
1622
1630
|
return t.ok ? t.data.pointsToCashConversion ? {
|
|
@@ -1627,31 +1635,31 @@ class ft extends he {
|
|
|
1627
1635
|
} : t;
|
|
1628
1636
|
}
|
|
1629
1637
|
}
|
|
1630
|
-
class
|
|
1638
|
+
class ft {
|
|
1631
1639
|
constructor(e) {
|
|
1632
|
-
|
|
1640
|
+
d(this, "client");
|
|
1633
1641
|
this.client = e;
|
|
1634
1642
|
}
|
|
1635
1643
|
async latestBetRecords() {
|
|
1636
|
-
const e = await this.client.request(
|
|
1644
|
+
const e = await this.client.request(ve);
|
|
1637
1645
|
return e.ok ? {
|
|
1638
1646
|
ok: !0,
|
|
1639
1647
|
data: e.data.latestBetRecords
|
|
1640
1648
|
} : e;
|
|
1641
1649
|
}
|
|
1642
1650
|
}
|
|
1643
|
-
function
|
|
1651
|
+
function k(i) {
|
|
1644
1652
|
return new Date(i.getTime());
|
|
1645
1653
|
}
|
|
1646
1654
|
function ce(i, e) {
|
|
1647
|
-
const t =
|
|
1655
|
+
const t = k(i);
|
|
1648
1656
|
return t.setDate(t.getDate() + e), t;
|
|
1649
1657
|
}
|
|
1650
|
-
function
|
|
1651
|
-
const t =
|
|
1658
|
+
function ue(i, e) {
|
|
1659
|
+
const t = k(i);
|
|
1652
1660
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
1653
1661
|
}
|
|
1654
|
-
function
|
|
1662
|
+
function le(i, e) {
|
|
1655
1663
|
return i.getTime() > e.getTime();
|
|
1656
1664
|
}
|
|
1657
1665
|
function wt(i) {
|
|
@@ -1659,17 +1667,19 @@ function wt(i) {
|
|
|
1659
1667
|
setTimeout(e, i);
|
|
1660
1668
|
});
|
|
1661
1669
|
}
|
|
1662
|
-
function
|
|
1663
|
-
const t =
|
|
1670
|
+
function pe(i, e) {
|
|
1671
|
+
const t = k(i);
|
|
1664
1672
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
1665
1673
|
}
|
|
1666
1674
|
class gt {
|
|
1667
1675
|
constructor(e) {
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
this.
|
|
1676
|
+
d(this, "logger");
|
|
1677
|
+
d(this, "storageKey", "session");
|
|
1678
|
+
d(this, "authService");
|
|
1679
|
+
d(this, "_refreshing", !1);
|
|
1680
|
+
this.authService = new ct(e), this.logger = new he({
|
|
1681
|
+
enabled: e.log ?? !1
|
|
1682
|
+
});
|
|
1673
1683
|
}
|
|
1674
1684
|
get refreshing() {
|
|
1675
1685
|
return this._refreshing;
|
|
@@ -1685,8 +1695,8 @@ class gt {
|
|
|
1685
1695
|
this.storageKey,
|
|
1686
1696
|
JSON.stringify({
|
|
1687
1697
|
...t.data,
|
|
1688
|
-
accessTokenExpiresAt:
|
|
1689
|
-
refreshTokenExpiresAt:
|
|
1698
|
+
accessTokenExpiresAt: ue(a, 8).getTime(),
|
|
1699
|
+
refreshTokenExpiresAt: pe(ce(a, 30), 2).getTime()
|
|
1690
1700
|
})
|
|
1691
1701
|
), { ok: !0 };
|
|
1692
1702
|
} else
|
|
@@ -1708,8 +1718,8 @@ class gt {
|
|
|
1708
1718
|
};
|
|
1709
1719
|
try {
|
|
1710
1720
|
let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
|
|
1711
|
-
const
|
|
1712
|
-
if (
|
|
1721
|
+
const r = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
|
|
1722
|
+
if (le(a, s))
|
|
1713
1723
|
return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
|
|
1714
1724
|
ok: !1,
|
|
1715
1725
|
error: {
|
|
@@ -1717,7 +1727,7 @@ class gt {
|
|
|
1717
1727
|
message: "Session expired."
|
|
1718
1728
|
}
|
|
1719
1729
|
};
|
|
1720
|
-
if (
|
|
1730
|
+
if (le(a, r)) {
|
|
1721
1731
|
this.logger.info("Refreshing session..."), this.refreshing = !0;
|
|
1722
1732
|
const m = await this.authService.refreshSession(t.refreshToken);
|
|
1723
1733
|
if (this.refreshing = !1, !m.ok)
|
|
@@ -1731,8 +1741,8 @@ class gt {
|
|
|
1731
1741
|
this.logger.success("Session refreshed!"), a = /* @__PURE__ */ new Date(), t = {
|
|
1732
1742
|
...t,
|
|
1733
1743
|
...m.data,
|
|
1734
|
-
accessTokenExpiresAt:
|
|
1735
|
-
refreshTokenExpiresAt:
|
|
1744
|
+
accessTokenExpiresAt: ue(a, 8).getTime(),
|
|
1745
|
+
refreshTokenExpiresAt: pe(ce(a, 30), 2).getTime()
|
|
1736
1746
|
}, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
1737
1747
|
}
|
|
1738
1748
|
return {
|
|
@@ -1759,11 +1769,11 @@ class gt {
|
|
|
1759
1769
|
(t = e.data) != null && t.accessToken && await this.authService.destroySession(e.data.accessToken), window.localStorage.removeItem(this.storageKey);
|
|
1760
1770
|
}
|
|
1761
1771
|
async verify() {
|
|
1762
|
-
var a,
|
|
1772
|
+
var a, r, s;
|
|
1763
1773
|
if (this.isServer)
|
|
1764
1774
|
return this.logger.warn("'localStorage' is not available on the server."), !0;
|
|
1765
1775
|
const e = await this.get();
|
|
1766
|
-
if (((a = e.error) == null ? void 0 : a.code) === "InvalidToken" || ((
|
|
1776
|
+
if (((a = e.error) == null ? void 0 : a.code) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.code) === "SessionExpired" || ((s = e.error) == null ? void 0 : s.code) === "AccountBlacklisted") return !1;
|
|
1767
1777
|
if (!e.data) return !0;
|
|
1768
1778
|
const t = await this.authService.verifySession(e.data.accessToken);
|
|
1769
1779
|
return t || window.localStorage.removeItem(this.storageKey), t;
|
|
@@ -1772,7 +1782,7 @@ class gt {
|
|
|
1772
1782
|
return typeof window > "u";
|
|
1773
1783
|
}
|
|
1774
1784
|
}
|
|
1775
|
-
function
|
|
1785
|
+
function o(i, e) {
|
|
1776
1786
|
if (typeof i == "number" && !Number.isNaN(i))
|
|
1777
1787
|
return i;
|
|
1778
1788
|
if (typeof i == "string") {
|
|
@@ -1784,7 +1794,7 @@ function r(i, e) {
|
|
|
1784
1794
|
}
|
|
1785
1795
|
class yt {
|
|
1786
1796
|
constructor(e) {
|
|
1787
|
-
|
|
1797
|
+
d(this, "staticService");
|
|
1788
1798
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
1789
1799
|
this.staticService = new pt({
|
|
1790
1800
|
url: t ? "https://static.development.opexa.io/graphql" : "https://static.opexa.io/graphql"
|
|
@@ -1815,88 +1825,88 @@ class yt {
|
|
|
1815
1825
|
};
|
|
1816
1826
|
}
|
|
1817
1827
|
platform(e) {
|
|
1818
|
-
var t, a,
|
|
1828
|
+
var t, a, r, s, m, c, l, b, u, C, T, _, v, D, M, N, R, I, G, $, P, W, B, U, x, q, O, F, L, V, H, Y, j, Q, K, z, J, Z, X, ee, te, ae, re, oe, ne, ie, se, de;
|
|
1819
1829
|
return {
|
|
1820
1830
|
paymentSettings: {
|
|
1821
|
-
minimumFirstDepositAmount:
|
|
1831
|
+
minimumFirstDepositAmount: o(e.minimumFirstDepositAmount),
|
|
1822
1832
|
restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
|
|
1823
1833
|
depositGateway: {
|
|
1824
1834
|
bank: {
|
|
1825
1835
|
androidEnabled: ((t = e.bankDepositGatewaySettings) == null ? void 0 : t.androidEnabled) ?? !1,
|
|
1826
1836
|
iosEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.iosEnabled) ?? !1,
|
|
1827
|
-
webEnabled: ((
|
|
1828
|
-
mobileWebEnabled: ((
|
|
1829
|
-
minimumAmount:
|
|
1830
|
-
maximumAmount:
|
|
1837
|
+
webEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.webEnabled) ?? !1,
|
|
1838
|
+
mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
|
|
1839
|
+
minimumAmount: o((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
|
|
1840
|
+
maximumAmount: o((c = e.bankDepositGatewaySettings) == null ? void 0 : c.maximumAmount)
|
|
1831
1841
|
},
|
|
1832
1842
|
gcash: {
|
|
1833
|
-
androidEnabled: ((
|
|
1834
|
-
iosEnabled: ((
|
|
1835
|
-
webEnabled: ((
|
|
1836
|
-
mobileWebEnabled: ((
|
|
1837
|
-
minimumAmount:
|
|
1838
|
-
maximumAmount:
|
|
1843
|
+
androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
|
|
1844
|
+
iosEnabled: ((b = e.gcashDepositGatewaySettings) == null ? void 0 : b.iosEnabled) ?? !1,
|
|
1845
|
+
webEnabled: ((u = e.gcashDepositGatewaySettings) == null ? void 0 : u.webEnabled) ?? !1,
|
|
1846
|
+
mobileWebEnabled: ((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.mobileWebEnabled) ?? !1,
|
|
1847
|
+
minimumAmount: o((T = e.gcashDepositGatewaySettings) == null ? void 0 : T.minimumAmount),
|
|
1848
|
+
maximumAmount: o((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.maximumAmount)
|
|
1839
1849
|
},
|
|
1840
1850
|
maya: {
|
|
1841
|
-
androidEnabled: ((
|
|
1842
|
-
iosEnabled: ((
|
|
1843
|
-
webEnabled: ((
|
|
1844
|
-
mobileWebEnabled: ((
|
|
1845
|
-
minimumAmount:
|
|
1846
|
-
maximumAmount:
|
|
1851
|
+
androidEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.androidEnabled) ?? !1,
|
|
1852
|
+
iosEnabled: ((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.iosEnabled) ?? !1,
|
|
1853
|
+
webEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.webEnabled) ?? !1,
|
|
1854
|
+
mobileWebEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.mobileWebEnabled) ?? !1,
|
|
1855
|
+
minimumAmount: o((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.minimumAmount),
|
|
1856
|
+
maximumAmount: o((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.maximumAmount)
|
|
1847
1857
|
},
|
|
1848
1858
|
mayaApp: {
|
|
1849
|
-
androidEnabled: ((
|
|
1850
|
-
iosEnabled: ((
|
|
1851
|
-
webEnabled: ((
|
|
1852
|
-
mobileWebEnabled: ((
|
|
1853
|
-
minimumAmount:
|
|
1854
|
-
maximumAmount:
|
|
1859
|
+
androidEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.androidEnabled) ?? !1,
|
|
1860
|
+
iosEnabled: (($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.iosEnabled) ?? !1,
|
|
1861
|
+
webEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.webEnabled) ?? !1,
|
|
1862
|
+
mobileWebEnabled: ((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.mobileWebEnabled) ?? !1,
|
|
1863
|
+
minimumAmount: o((B = e.mayaAppDepositGatewaySettings) == null ? void 0 : B.minimumAmount),
|
|
1864
|
+
maximumAmount: o((U = e.mayaAppDepositGatewaySettings) == null ? void 0 : U.maximumAmount)
|
|
1855
1865
|
}
|
|
1856
1866
|
},
|
|
1857
1867
|
withdrawalGateway: {
|
|
1858
1868
|
bank: {
|
|
1859
|
-
androidEnabled: ((
|
|
1860
|
-
iosEnabled: ((
|
|
1869
|
+
androidEnabled: ((x = e.bankWithdrawalGatewaySettings) == null ? void 0 : x.androidEnabled) ?? !1,
|
|
1870
|
+
iosEnabled: ((q = e.bankWithdrawalGatewaySettings) == null ? void 0 : q.iosEnabled) ?? !1,
|
|
1861
1871
|
webEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.webEnabled) ?? !1,
|
|
1862
|
-
mobileWebEnabled: ((
|
|
1863
|
-
minimumAmount:
|
|
1864
|
-
maximumAmount:
|
|
1872
|
+
mobileWebEnabled: ((F = e.bankWithdrawalGatewaySettings) == null ? void 0 : F.mobileWebEnabled) ?? !1,
|
|
1873
|
+
minimumAmount: o((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.minimumAmount),
|
|
1874
|
+
maximumAmount: o((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.maximumAmount)
|
|
1865
1875
|
},
|
|
1866
1876
|
gcash: {
|
|
1867
|
-
androidEnabled: ((
|
|
1868
|
-
iosEnabled: ((
|
|
1869
|
-
webEnabled: ((
|
|
1870
|
-
mobileWebEnabled: ((
|
|
1871
|
-
minimumAmount:
|
|
1872
|
-
maximumAmount:
|
|
1873
|
-
(
|
|
1877
|
+
androidEnabled: ((H = e.gcashWithdrawalGatewaySettings) == null ? void 0 : H.androidEnabled) ?? !1,
|
|
1878
|
+
iosEnabled: ((Y = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Y.iosEnabled) ?? !1,
|
|
1879
|
+
webEnabled: ((j = e.gcashWithdrawalGatewaySettings) == null ? void 0 : j.webEnabled) ?? !1,
|
|
1880
|
+
mobileWebEnabled: ((Q = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
|
|
1881
|
+
minimumAmount: o((K = e.gcashWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
|
|
1882
|
+
maximumAmount: o(
|
|
1883
|
+
(z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.maximumAmount,
|
|
1874
1884
|
1e6
|
|
1875
1885
|
)
|
|
1876
1886
|
},
|
|
1877
1887
|
maya: {
|
|
1878
|
-
androidEnabled: ((
|
|
1879
|
-
iosEnabled: ((
|
|
1880
|
-
webEnabled: ((
|
|
1881
|
-
mobileWebEnabled: ((
|
|
1882
|
-
minimumAmount:
|
|
1883
|
-
maximumAmount:
|
|
1888
|
+
androidEnabled: ((J = e.mayaWithdrawalGatewaySettings) == null ? void 0 : J.androidEnabled) ?? !1,
|
|
1889
|
+
iosEnabled: ((Z = e.mayaWithdrawalGatewaySettings) == null ? void 0 : Z.iosEnabled) ?? !1,
|
|
1890
|
+
webEnabled: ((X = e.mayaWithdrawalGatewaySettings) == null ? void 0 : X.webEnabled) ?? !1,
|
|
1891
|
+
mobileWebEnabled: ((ee = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ee.mobileWebEnabled) ?? !1,
|
|
1892
|
+
minimumAmount: o((te = e.mayaWithdrawalGatewaySettings) == null ? void 0 : te.minimumAmount),
|
|
1893
|
+
maximumAmount: o((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.maximumAmount)
|
|
1884
1894
|
},
|
|
1885
1895
|
mayaApp: {
|
|
1886
|
-
androidEnabled: ((
|
|
1887
|
-
iosEnabled: ((
|
|
1888
|
-
webEnabled: ((
|
|
1889
|
-
mobileWebEnabled: ((
|
|
1890
|
-
minimumAmount:
|
|
1891
|
-
maximumAmount:
|
|
1892
|
-
(
|
|
1896
|
+
androidEnabled: ((re = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : re.androidEnabled) ?? !1,
|
|
1897
|
+
iosEnabled: ((oe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : oe.iosEnabled) ?? !1,
|
|
1898
|
+
webEnabled: ((ne = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ne.webEnabled) ?? !1,
|
|
1899
|
+
mobileWebEnabled: ((ie = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ie.mobileWebEnabled) ?? !1,
|
|
1900
|
+
minimumAmount: o((se = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : se.minimumAmount),
|
|
1901
|
+
maximumAmount: o(
|
|
1902
|
+
(de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.maximumAmount,
|
|
1893
1903
|
1e6
|
|
1894
1904
|
)
|
|
1895
1905
|
}
|
|
1896
1906
|
}
|
|
1897
1907
|
},
|
|
1898
1908
|
pointsClubSettings: {
|
|
1899
|
-
multiplier:
|
|
1909
|
+
multiplier: o(e.pointsClubSettings.multiplier, 0)
|
|
1900
1910
|
}
|
|
1901
1911
|
};
|
|
1902
1912
|
}
|
|
@@ -1924,7 +1934,7 @@ class yt {
|
|
|
1924
1934
|
wallet(e) {
|
|
1925
1935
|
return {
|
|
1926
1936
|
...e,
|
|
1927
|
-
balance:
|
|
1937
|
+
balance: o(e.balance, 0),
|
|
1928
1938
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
1929
1939
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
1930
1940
|
};
|
|
@@ -1947,7 +1957,7 @@ class yt {
|
|
|
1947
1957
|
profileCompletion(e) {
|
|
1948
1958
|
return {
|
|
1949
1959
|
...e,
|
|
1950
|
-
completionPercentage:
|
|
1960
|
+
completionPercentage: o(e, 0)
|
|
1951
1961
|
};
|
|
1952
1962
|
}
|
|
1953
1963
|
announcement(e) {
|
|
@@ -1962,9 +1972,9 @@ class yt {
|
|
|
1962
1972
|
withdrawalRecord(e) {
|
|
1963
1973
|
return {
|
|
1964
1974
|
...e,
|
|
1965
|
-
amount:
|
|
1966
|
-
netAmount:
|
|
1967
|
-
fee:
|
|
1975
|
+
amount: o(e.amount, 0),
|
|
1976
|
+
netAmount: o(e.netAmount, 0),
|
|
1977
|
+
fee: o(e.fee, 0),
|
|
1968
1978
|
reference: e.reference ?? void 0,
|
|
1969
1979
|
bank: e.bank ?? void 0,
|
|
1970
1980
|
recipientMobileNumber: e.recipientMobileNumber ?? void 0,
|
|
@@ -1976,9 +1986,9 @@ class yt {
|
|
|
1976
1986
|
deposit(e) {
|
|
1977
1987
|
return {
|
|
1978
1988
|
...e,
|
|
1979
|
-
fee:
|
|
1980
|
-
amount:
|
|
1981
|
-
netAmount:
|
|
1989
|
+
fee: o(e.fee, 0),
|
|
1990
|
+
amount: o(e.amount, 0),
|
|
1991
|
+
netAmount: o(e.netAmount, 0),
|
|
1982
1992
|
reference: e.reference ?? void 0,
|
|
1983
1993
|
checkoutUrl: e.checkoutUrl ?? void 0,
|
|
1984
1994
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
@@ -1988,9 +1998,9 @@ class yt {
|
|
|
1988
1998
|
depositRecord(e) {
|
|
1989
1999
|
return {
|
|
1990
2000
|
...e,
|
|
1991
|
-
amount:
|
|
1992
|
-
fee:
|
|
1993
|
-
netAmount:
|
|
2001
|
+
amount: o(e.amount, 0),
|
|
2002
|
+
fee: o(e.fee, 0),
|
|
2003
|
+
netAmount: o(e.netAmount, 0),
|
|
1994
2004
|
reference: e.reference ?? void 0,
|
|
1995
2005
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
1996
2006
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
@@ -2000,12 +2010,12 @@ class yt {
|
|
|
2000
2010
|
var t, a;
|
|
2001
2011
|
return {
|
|
2002
2012
|
...e,
|
|
2003
|
-
bet:
|
|
2004
|
-
payout:
|
|
2005
|
-
jackpotContribution:
|
|
2006
|
-
jackpotPayout:
|
|
2007
|
-
winloss:
|
|
2008
|
-
validBet:
|
|
2013
|
+
bet: o(e.bet, 0),
|
|
2014
|
+
payout: o(e.payout, 0),
|
|
2015
|
+
jackpotContribution: o(e.jackpotContribution, 0),
|
|
2016
|
+
jackpotPayout: o(e.jackpotPayout, 0),
|
|
2017
|
+
winloss: o(e.winloss),
|
|
2018
|
+
validBet: o(e.validBet, 0),
|
|
2009
2019
|
vendorRoundId: e.vendorRoundId ?? void 0,
|
|
2010
2020
|
game: this.game(e.game),
|
|
2011
2021
|
dateTimeSettled: e.dateTimeSettled ? new Date(e.dateTimeSettled) : void 0,
|
|
@@ -2016,7 +2026,7 @@ class yt {
|
|
|
2016
2026
|
externalCategory: e.externalCategory ?? void 0,
|
|
2017
2027
|
metadata: {
|
|
2018
2028
|
odds: ((t = e.metadata) == null ? void 0 : t.odds) ?? void 0,
|
|
2019
|
-
validBet:
|
|
2029
|
+
validBet: o((a = e.metadata) == null ? void 0 : a.validBet)
|
|
2020
2030
|
}
|
|
2021
2031
|
};
|
|
2022
2032
|
}
|
|
@@ -2024,9 +2034,9 @@ class yt {
|
|
|
2024
2034
|
return {
|
|
2025
2035
|
...e,
|
|
2026
2036
|
game: this.game(e.game),
|
|
2027
|
-
bet:
|
|
2028
|
-
payout:
|
|
2029
|
-
validBet:
|
|
2037
|
+
bet: o(e.bet, 0),
|
|
2038
|
+
payout: o(e.payout, 0),
|
|
2039
|
+
validBet: o(e.validBet, 0),
|
|
2030
2040
|
dateTimeSettled: new Date(e.dateTimeSettled),
|
|
2031
2041
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2032
2042
|
};
|
|
@@ -2034,11 +2044,10 @@ class yt {
|
|
|
2034
2044
|
transactionRecord(e) {
|
|
2035
2045
|
return {
|
|
2036
2046
|
...e,
|
|
2037
|
-
amount:
|
|
2047
|
+
amount: o(e.amount, 0),
|
|
2038
2048
|
content: e.content ?? void 0,
|
|
2039
|
-
currentBalance:
|
|
2040
|
-
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2041
|
-
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2049
|
+
currentBalance: o(e.currentBalance, 0),
|
|
2050
|
+
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2042
2051
|
};
|
|
2043
2052
|
}
|
|
2044
2053
|
game(e) {
|
|
@@ -2063,8 +2072,8 @@ class yt {
|
|
|
2063
2072
|
...e.banner,
|
|
2064
2073
|
dateTimeCreated: new Date(e.banner.dateTimeCreated)
|
|
2065
2074
|
},
|
|
2066
|
-
maximumBonusAmount:
|
|
2067
|
-
minimumBonusAmount:
|
|
2075
|
+
maximumBonusAmount: o(e.maximumBonusAmount),
|
|
2076
|
+
minimumBonusAmount: o(e.minimumBonusAmount),
|
|
2068
2077
|
activationEndDateTime: new Date(e.activationEndDateTime),
|
|
2069
2078
|
activationStartDateTime: new Date(e.activationStartDateTime),
|
|
2070
2079
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
@@ -2091,22 +2100,22 @@ class yt {
|
|
|
2091
2100
|
/* deposit here does not have an id and depositNumber field */
|
|
2092
2101
|
deposit: e.deposit ? {
|
|
2093
2102
|
...e.deposit,
|
|
2094
|
-
fee:
|
|
2095
|
-
amount:
|
|
2096
|
-
netAmount:
|
|
2103
|
+
fee: o(e.deposit.fee, 0),
|
|
2104
|
+
amount: o(e.deposit.amount, 0),
|
|
2105
|
+
netAmount: o(e.deposit.netAmount, 0),
|
|
2097
2106
|
reference: e.deposit.reference ?? void 0,
|
|
2098
2107
|
dateTimeCreated: new Date(e.deposit.dateTimeCreated),
|
|
2099
2108
|
dateTimeLastUpdated: new Date(e.deposit.dateTimeLastUpdated)
|
|
2100
2109
|
} : void 0,
|
|
2101
|
-
balance:
|
|
2102
|
-
amount:
|
|
2110
|
+
balance: o(e.balance, 0),
|
|
2111
|
+
amount: o(e.amount, 0),
|
|
2103
2112
|
expiration: new Date(e.expiration),
|
|
2104
|
-
turnoverRequirement:
|
|
2105
|
-
currentTurnoverRequirementContribution:
|
|
2113
|
+
turnoverRequirement: o(e.turnoverRequirement, 0),
|
|
2114
|
+
currentTurnoverRequirementContribution: o(
|
|
2106
2115
|
e.currentTurnoverRequirementContribution,
|
|
2107
2116
|
0
|
|
2108
2117
|
),
|
|
2109
|
-
currentTurnoverRequirementContributionPercentage:
|
|
2118
|
+
currentTurnoverRequirementContributionPercentage: o(
|
|
2110
2119
|
e.currentTurnoverRequirementContributionPercentage,
|
|
2111
2120
|
0
|
|
2112
2121
|
),
|
|
@@ -2117,7 +2126,7 @@ class yt {
|
|
|
2117
2126
|
cashbackBonus(e) {
|
|
2118
2127
|
return {
|
|
2119
2128
|
id: e.id,
|
|
2120
|
-
balance:
|
|
2129
|
+
balance: o(e.balance, 0),
|
|
2121
2130
|
cashback: this.cashback(e.cashback),
|
|
2122
2131
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2123
2132
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
@@ -2133,75 +2142,66 @@ class yt {
|
|
|
2133
2142
|
pointsWallet(e) {
|
|
2134
2143
|
return {
|
|
2135
2144
|
id: e.id,
|
|
2136
|
-
points:
|
|
2145
|
+
points: o(e.points, 0),
|
|
2137
2146
|
account: e.account,
|
|
2138
2147
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2139
2148
|
};
|
|
2140
2149
|
}
|
|
2141
2150
|
}
|
|
2142
|
-
class
|
|
2151
|
+
class g {
|
|
2143
2152
|
constructor(e, t) {
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
var
|
|
2148
|
-
const a = new Headers((
|
|
2153
|
+
d(this, "url");
|
|
2154
|
+
d(this, "options");
|
|
2155
|
+
d(this, "middlewares");
|
|
2156
|
+
var r;
|
|
2157
|
+
const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
|
|
2149
2158
|
this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
|
|
2150
2159
|
}
|
|
2151
2160
|
async request(e, t) {
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
const d = await this.runMiddlewares(
|
|
2161
|
+
const a = JSON.stringify({ query: e, variables: t }), r = new Headers(this.options.headers);
|
|
2162
|
+
r.set("Content-Type", "application/json"), r.set("Accept", "application/json");
|
|
2163
|
+
const s = await this.runMiddlewares(
|
|
2156
2164
|
new Request(this.url, {
|
|
2157
2165
|
...this.options,
|
|
2158
2166
|
body: a,
|
|
2159
|
-
headers:
|
|
2167
|
+
headers: r,
|
|
2160
2168
|
method: "POST"
|
|
2161
2169
|
})
|
|
2162
2170
|
);
|
|
2163
|
-
|
|
2164
|
-
const u = await fetch(d);
|
|
2165
|
-
if (!u.ok)
|
|
2166
|
-
return { ok: !1, error: l(u.status) };
|
|
2167
|
-
const p = await u.json(), y = p.data, s = (m = p.errors) == null ? void 0 : m.at(0);
|
|
2168
|
-
return (s == null ? void 0 : s.extensions.code) === "FORBIDDEN" ? { ok: !1, error: l(403, s.message) } : (s == null ? void 0 : s.extensions.code) === "UNAUTHORIZED" ? { ok: !1, error: l(401, s.message) } : (s == null ? void 0 : s.extensions.code) === "BAD_USER_INPUT" ? { ok: !1, error: l(400, s.message) } : (s == null ? void 0 : s.extensions.code) === "INTERNAL_SERVER_ERROR" ? { ok: !1, error: l(500, s.message) } : {
|
|
2169
|
-
ok: !0,
|
|
2170
|
-
data: y
|
|
2171
|
-
};
|
|
2172
|
-
} catch {
|
|
2173
|
-
return {
|
|
2174
|
-
ok: !1,
|
|
2175
|
-
error: l(500)
|
|
2176
|
-
};
|
|
2177
|
-
}
|
|
2171
|
+
return await this.exec(s);
|
|
2178
2172
|
}
|
|
2179
2173
|
/** Single file upload */
|
|
2180
2174
|
async upload(e, t) {
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
const d = await this.runMiddlewares(
|
|
2175
|
+
const a = this.createUploadBody(e, t), r = new Headers(this.options.headers);
|
|
2176
|
+
r.set("Accept", "application/json"), r.delete("Content-Type");
|
|
2177
|
+
const s = await this.runMiddlewares(
|
|
2185
2178
|
new Request(this.url, {
|
|
2186
2179
|
...this.options,
|
|
2187
2180
|
body: a,
|
|
2188
|
-
headers:
|
|
2181
|
+
headers: r,
|
|
2189
2182
|
method: "POST"
|
|
2190
2183
|
})
|
|
2191
2184
|
);
|
|
2185
|
+
return await this.exec(s);
|
|
2186
|
+
}
|
|
2187
|
+
async exec(e) {
|
|
2188
|
+
var t, a, r, s, m;
|
|
2192
2189
|
try {
|
|
2193
|
-
const
|
|
2194
|
-
if (!
|
|
2195
|
-
return { ok: !1, error:
|
|
2196
|
-
const
|
|
2197
|
-
return (
|
|
2190
|
+
const c = await fetch(e);
|
|
2191
|
+
if (!c.ok)
|
|
2192
|
+
return { ok: !1, error: h(c.status) };
|
|
2193
|
+
const l = await c.json(), b = l.data, u = (t = l.errors) == null ? void 0 : t.at(0);
|
|
2194
|
+
return u ? ((a = u.extensions) == null ? void 0 : a.code) === "FORBIDDEN" ? { ok: !1, error: h(403, u.message) } : ((r = u.extensions) == null ? void 0 : r.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, u.message) } : ((s = u.extensions) == null ? void 0 : s.code) === "BAD_USER_INPUT" || ((m = u.extensions) == null ? void 0 : m.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, u.message) } : {
|
|
2195
|
+
ok: !1,
|
|
2196
|
+
error: h(500, u.message)
|
|
2197
|
+
} : {
|
|
2198
2198
|
ok: !0,
|
|
2199
|
-
data:
|
|
2199
|
+
data: b
|
|
2200
2200
|
};
|
|
2201
2201
|
} catch {
|
|
2202
2202
|
return {
|
|
2203
2203
|
ok: !1,
|
|
2204
|
-
error:
|
|
2204
|
+
error: h(500)
|
|
2205
2205
|
};
|
|
2206
2206
|
}
|
|
2207
2207
|
}
|
|
@@ -2211,28 +2211,28 @@ class h {
|
|
|
2211
2211
|
t = await a(t);
|
|
2212
2212
|
return t;
|
|
2213
2213
|
}
|
|
2214
|
-
|
|
2215
|
-
const { files: a, others:
|
|
2216
|
-
|
|
2214
|
+
createUploadBody(e, t) {
|
|
2215
|
+
const { files: a, others: r } = this.extractFiles(t), s = new FormData();
|
|
2216
|
+
s.append(
|
|
2217
2217
|
"operations",
|
|
2218
2218
|
JSON.stringify({
|
|
2219
2219
|
query: e,
|
|
2220
2220
|
variables: t
|
|
2221
2221
|
})
|
|
2222
|
-
), Object.entries(
|
|
2223
|
-
|
|
2222
|
+
), Object.entries(r).forEach(([c, l]) => {
|
|
2223
|
+
s.append(c, JSON.stringify(l));
|
|
2224
2224
|
});
|
|
2225
2225
|
const m = {};
|
|
2226
|
-
return Object.keys(a).forEach((
|
|
2227
|
-
m[
|
|
2228
|
-
}),
|
|
2229
|
-
|
|
2230
|
-
}),
|
|
2226
|
+
return Object.keys(a).forEach((c, l) => {
|
|
2227
|
+
m[l.toString()] = `variables.${c}`;
|
|
2228
|
+
}), s.append("map", JSON.stringify(m)), Object.values(a).forEach((c, l) => {
|
|
2229
|
+
s.append(l.toString(), c);
|
|
2230
|
+
}), s;
|
|
2231
2231
|
}
|
|
2232
|
-
|
|
2232
|
+
extractFiles(e) {
|
|
2233
2233
|
const t = {}, a = {};
|
|
2234
|
-
return Object.entries(e).forEach(([
|
|
2235
|
-
|
|
2234
|
+
return Object.entries(e).forEach(([r, s]) => {
|
|
2235
|
+
s instanceof File || s instanceof Blob ? t[r] = s : a[r] = s;
|
|
2236
2236
|
}), {
|
|
2237
2237
|
files: t,
|
|
2238
2238
|
others: a
|
|
@@ -2241,19 +2241,19 @@ class h {
|
|
|
2241
2241
|
}
|
|
2242
2242
|
class St {
|
|
2243
2243
|
constructor(e) {
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2244
|
+
d(this, "gameService");
|
|
2245
|
+
d(this, "fileService");
|
|
2246
|
+
d(this, "walletService");
|
|
2247
|
+
d(this, "reportService");
|
|
2248
|
+
d(this, "portalService");
|
|
2249
|
+
d(this, "accountService");
|
|
2250
|
+
d(this, "sessionManager");
|
|
2251
|
+
d(this, "transformer");
|
|
2252
|
+
d(this, "logger");
|
|
2253
2253
|
const t = e.environment === "development";
|
|
2254
2254
|
this.sessionManager = new gt({
|
|
2255
|
-
|
|
2256
|
-
|
|
2255
|
+
...e,
|
|
2256
|
+
url: t ? "https://auth.development.opexa.io" : "https://auth.opexa.io"
|
|
2257
2257
|
});
|
|
2258
2258
|
const a = {
|
|
2259
2259
|
middlewares: [this.authMiddleware],
|
|
@@ -2264,37 +2264,37 @@ class St {
|
|
|
2264
2264
|
}
|
|
2265
2265
|
}
|
|
2266
2266
|
};
|
|
2267
|
-
this.gameService = new
|
|
2268
|
-
new
|
|
2267
|
+
this.gameService = new we(
|
|
2268
|
+
new g(
|
|
2269
2269
|
t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
|
|
2270
2270
|
a
|
|
2271
2271
|
)
|
|
2272
2272
|
), this.fileService = new ut(
|
|
2273
|
-
new
|
|
2273
|
+
new g(
|
|
2274
2274
|
t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
|
|
2275
2275
|
a
|
|
2276
2276
|
)
|
|
2277
|
-
), this.walletService = new
|
|
2278
|
-
new
|
|
2277
|
+
), this.walletService = new ht(
|
|
2278
|
+
new g(
|
|
2279
2279
|
t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2280
2280
|
a
|
|
2281
2281
|
)
|
|
2282
2282
|
), this.reportService = new lt(
|
|
2283
|
-
new
|
|
2283
|
+
new g(
|
|
2284
2284
|
t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
|
|
2285
2285
|
a
|
|
2286
2286
|
)
|
|
2287
|
-
), this.accountService = new
|
|
2288
|
-
new
|
|
2287
|
+
), this.accountService = new mt(
|
|
2288
|
+
new g(
|
|
2289
2289
|
t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
|
|
2290
2290
|
a
|
|
2291
2291
|
)
|
|
2292
|
-
), this.portalService = new
|
|
2293
|
-
new
|
|
2292
|
+
), this.portalService = new ft(
|
|
2293
|
+
new g(
|
|
2294
2294
|
t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
|
|
2295
2295
|
a
|
|
2296
2296
|
)
|
|
2297
|
-
), this.transformer = new yt(e), this.logger = new
|
|
2297
|
+
), this.transformer = new yt(e), this.logger = new he({
|
|
2298
2298
|
enabled: e.log ?? !1
|
|
2299
2299
|
});
|
|
2300
2300
|
}
|
|
@@ -2313,16 +2313,37 @@ class St {
|
|
|
2313
2313
|
await this.sessionManager.destroy();
|
|
2314
2314
|
}
|
|
2315
2315
|
/**
|
|
2316
|
+
* @description Watches the session if it is still valid whenever signed in.
|
|
2316
2317
|
* @returns Unsubscribe function
|
|
2318
|
+
* @example
|
|
2319
|
+
* ```tsx
|
|
2320
|
+
* import * as React from 'react';
|
|
2321
|
+
* import { useAuthenticated } from '@lib/stores';
|
|
2322
|
+
*
|
|
2323
|
+
* function WatchSession() {
|
|
2324
|
+
* const { setAuthenticated } = useAuthenticated();
|
|
2325
|
+
*
|
|
2326
|
+
* React.useEffect(() => {
|
|
2327
|
+
* const unsubscribe = sdk.watchSession({
|
|
2328
|
+
* interval: 30000,
|
|
2329
|
+
* onInvalid() {
|
|
2330
|
+
* setAuthenticated(false);
|
|
2331
|
+
* },
|
|
2332
|
+
* });
|
|
2333
|
+
*
|
|
2334
|
+
* return unsubscribe;
|
|
2335
|
+
* }, []);
|
|
2336
|
+
* }
|
|
2337
|
+
* ```
|
|
2317
2338
|
*/
|
|
2318
2339
|
watchSession(e) {
|
|
2319
2340
|
const t = e.interval ?? 3e4, a = e.onInvalid;
|
|
2320
|
-
let
|
|
2321
|
-
const
|
|
2322
|
-
await this.sessionManager.verify() || await a(),
|
|
2341
|
+
let r = null;
|
|
2342
|
+
const s = () => setTimeout(async () => {
|
|
2343
|
+
await this.sessionManager.verify() || await a(), r = s();
|
|
2323
2344
|
}, t);
|
|
2324
|
-
return
|
|
2325
|
-
|
|
2345
|
+
return r = s(), function() {
|
|
2346
|
+
r && clearTimeout(r);
|
|
2326
2347
|
};
|
|
2327
2348
|
}
|
|
2328
2349
|
async session() {
|
|
@@ -2387,12 +2408,12 @@ class St {
|
|
|
2387
2408
|
* ```
|
|
2388
2409
|
*/
|
|
2389
2410
|
async createAccount(e) {
|
|
2390
|
-
const t = e.id ??
|
|
2411
|
+
const t = e.id ?? f.generate(w.Account).toString(), a = await this.accountService.registerMemberAccount({
|
|
2391
2412
|
input: {
|
|
2392
2413
|
id: t,
|
|
2393
2414
|
name: e.name,
|
|
2394
2415
|
birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
|
|
2395
|
-
password: await
|
|
2416
|
+
password: await p(e.password),
|
|
2396
2417
|
mobileNumber: this.addAreaCode(e.mobileNumber),
|
|
2397
2418
|
domain: e.domain
|
|
2398
2419
|
},
|
|
@@ -2422,8 +2443,8 @@ class St {
|
|
|
2422
2443
|
id: e,
|
|
2423
2444
|
data: {
|
|
2424
2445
|
...t,
|
|
2425
|
-
password: t.password ? await
|
|
2426
|
-
transactionPassword: t.transactionPassword ? await
|
|
2446
|
+
password: t.password ? await p(t.password) : void 0,
|
|
2447
|
+
transactionPassword: t.transactionPassword ? await p(t.transactionPassword) : void 0,
|
|
2427
2448
|
...t.mobileNumber && {
|
|
2428
2449
|
mobileNumber: this.addAreaCode(t.mobileNumber)
|
|
2429
2450
|
}
|
|
@@ -2467,7 +2488,7 @@ class St {
|
|
|
2467
2488
|
* ```
|
|
2468
2489
|
*/
|
|
2469
2490
|
async submitVerificationDetails(e) {
|
|
2470
|
-
const t = e.id ??
|
|
2491
|
+
const t = e.id ?? f.generate(w.Verification).toString(), a = await this.accountService.createMemberVerification({
|
|
2471
2492
|
input: {
|
|
2472
2493
|
id: t,
|
|
2473
2494
|
...e
|
|
@@ -2504,7 +2525,7 @@ class St {
|
|
|
2504
2525
|
return await this.accountService.resetPassword({
|
|
2505
2526
|
input: {
|
|
2506
2527
|
mobileNumber: this.addAreaCode(e.mobileNumber),
|
|
2507
|
-
newPassword: await
|
|
2528
|
+
newPassword: await p(e.newPassword)
|
|
2508
2529
|
},
|
|
2509
2530
|
verificationCode: e.verificationCode
|
|
2510
2531
|
});
|
|
@@ -2558,8 +2579,8 @@ class St {
|
|
|
2558
2579
|
return t.ok ? {
|
|
2559
2580
|
ok: !0,
|
|
2560
2581
|
data: {
|
|
2561
|
-
announcements: t.data.edges.map(({ cursor: a, node:
|
|
2562
|
-
...this.transformer.transform.announcement(
|
|
2582
|
+
announcements: t.data.edges.map(({ cursor: a, node: r }) => ({
|
|
2583
|
+
...this.transformer.transform.announcement(r),
|
|
2563
2584
|
cursor: a
|
|
2564
2585
|
})),
|
|
2565
2586
|
totalCount: t.data.totalCount,
|
|
@@ -2591,13 +2612,13 @@ class St {
|
|
|
2591
2612
|
* ```
|
|
2592
2613
|
*/
|
|
2593
2614
|
async createWithdrawal(e) {
|
|
2594
|
-
const t = e.id ??
|
|
2615
|
+
const t = e.id ?? f.generate(w.Withdrawal).toString();
|
|
2595
2616
|
if (e.type === "BANK") {
|
|
2596
2617
|
const a = await this.walletService.createBankWithdrawal({
|
|
2597
2618
|
input: {
|
|
2598
2619
|
id: t,
|
|
2599
2620
|
amount: e.amount.toString(),
|
|
2600
|
-
transactionPassword: await
|
|
2621
|
+
transactionPassword: await p(e.transactionPassword)
|
|
2601
2622
|
}
|
|
2602
2623
|
});
|
|
2603
2624
|
if (!a.ok) return a;
|
|
@@ -2607,7 +2628,7 @@ class St {
|
|
|
2607
2628
|
input: {
|
|
2608
2629
|
id: t,
|
|
2609
2630
|
amount: e.amount.toString(),
|
|
2610
|
-
transactionPassword: await
|
|
2631
|
+
transactionPassword: await p(e.transactionPassword),
|
|
2611
2632
|
recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
|
|
2612
2633
|
}
|
|
2613
2634
|
});
|
|
@@ -2618,7 +2639,7 @@ class St {
|
|
|
2618
2639
|
input: {
|
|
2619
2640
|
id: t,
|
|
2620
2641
|
amount: e.amount.toString(),
|
|
2621
|
-
transactionPassword: await
|
|
2642
|
+
transactionPassword: await p(e.transactionPassword),
|
|
2622
2643
|
recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
|
|
2623
2644
|
}
|
|
2624
2645
|
});
|
|
@@ -2629,7 +2650,7 @@ class St {
|
|
|
2629
2650
|
input: {
|
|
2630
2651
|
id: t,
|
|
2631
2652
|
amount: e.amount.toString(),
|
|
2632
|
-
transactionPassword: await
|
|
2653
|
+
transactionPassword: await p(e.transactionPassword)
|
|
2633
2654
|
}
|
|
2634
2655
|
});
|
|
2635
2656
|
if (!a.ok) return a;
|
|
@@ -2641,8 +2662,8 @@ class St {
|
|
|
2641
2662
|
return t.ok ? {
|
|
2642
2663
|
ok: !0,
|
|
2643
2664
|
data: {
|
|
2644
|
-
withdrawalRecords: t.data.edges.map(({ cursor: a, node:
|
|
2645
|
-
...this.transformer.transform.withdrawalRecord(
|
|
2665
|
+
withdrawalRecords: t.data.edges.map(({ cursor: a, node: r }) => ({
|
|
2666
|
+
...this.transformer.transform.withdrawalRecord(r),
|
|
2646
2667
|
cursor: a
|
|
2647
2668
|
})),
|
|
2648
2669
|
totalCount: t.data.totalCount,
|
|
@@ -2677,7 +2698,7 @@ class St {
|
|
|
2677
2698
|
* ```
|
|
2678
2699
|
*/
|
|
2679
2700
|
async createDeposit(e) {
|
|
2680
|
-
const t = e.id ??
|
|
2701
|
+
const t = e.id ?? f.generate(w.Deposit).toString();
|
|
2681
2702
|
if (e.type === "MAYA") {
|
|
2682
2703
|
const a = await this.walletService.createMayaDeposit({
|
|
2683
2704
|
input: {
|
|
@@ -2722,8 +2743,8 @@ class St {
|
|
|
2722
2743
|
return t.ok ? {
|
|
2723
2744
|
ok: !0,
|
|
2724
2745
|
data: {
|
|
2725
|
-
depositRecords: t.data.edges.map(({ cursor: a, node:
|
|
2726
|
-
...this.transformer.transform.depositRecord(
|
|
2746
|
+
depositRecords: t.data.edges.map(({ cursor: a, node: r }) => ({
|
|
2747
|
+
...this.transformer.transform.depositRecord(r),
|
|
2727
2748
|
cursor: a
|
|
2728
2749
|
})),
|
|
2729
2750
|
totalCount: t.data.totalCount,
|
|
@@ -2745,8 +2766,8 @@ class St {
|
|
|
2745
2766
|
return t.ok ? {
|
|
2746
2767
|
ok: !0,
|
|
2747
2768
|
data: {
|
|
2748
|
-
betRecords: t.data.edges.map(({ cursor: a, node:
|
|
2749
|
-
...this.transformer.transform.betRecord(
|
|
2769
|
+
betRecords: t.data.edges.map(({ cursor: a, node: r }) => ({
|
|
2770
|
+
...this.transformer.transform.betRecord(r),
|
|
2750
2771
|
cursor: a
|
|
2751
2772
|
})),
|
|
2752
2773
|
totalCount: t.data.totalCount,
|
|
@@ -2772,8 +2793,8 @@ class St {
|
|
|
2772
2793
|
return t.ok ? {
|
|
2773
2794
|
ok: !0,
|
|
2774
2795
|
data: {
|
|
2775
|
-
transactionRecords: t.data.edges.map(({ cursor: a, node:
|
|
2776
|
-
...this.transformer.transform.transactionRecord(
|
|
2796
|
+
transactionRecords: t.data.edges.map(({ cursor: a, node: r }) => ({
|
|
2797
|
+
...this.transformer.transform.transactionRecord(r),
|
|
2777
2798
|
cursor: a
|
|
2778
2799
|
})),
|
|
2779
2800
|
totalCount: t.data.totalCount,
|
|
@@ -2835,8 +2856,8 @@ class St {
|
|
|
2835
2856
|
return t.ok ? {
|
|
2836
2857
|
ok: !0,
|
|
2837
2858
|
data: {
|
|
2838
|
-
games: t.data.edges.map(({ cursor: a, node:
|
|
2839
|
-
...this.transformer.transform.game(
|
|
2859
|
+
games: t.data.edges.map(({ cursor: a, node: r }) => ({
|
|
2860
|
+
...this.transformer.transform.game(r),
|
|
2840
2861
|
cursor: a
|
|
2841
2862
|
})),
|
|
2842
2863
|
totalCount: t.data.totalCount,
|
|
@@ -2864,8 +2885,8 @@ class St {
|
|
|
2864
2885
|
return t.ok ? {
|
|
2865
2886
|
ok: !0,
|
|
2866
2887
|
data: {
|
|
2867
|
-
games: t.data.edges.map(({ cursor: a, node:
|
|
2868
|
-
...this.transformer.transform.game(
|
|
2888
|
+
games: t.data.edges.map(({ cursor: a, node: r }) => ({
|
|
2889
|
+
...this.transformer.transform.game(r),
|
|
2869
2890
|
cursor: a
|
|
2870
2891
|
})),
|
|
2871
2892
|
totalCount: t.data.totalCount,
|
|
@@ -2890,7 +2911,7 @@ class St {
|
|
|
2890
2911
|
* ```
|
|
2891
2912
|
*/
|
|
2892
2913
|
async createGameSession(e) {
|
|
2893
|
-
const t = e.id ??
|
|
2914
|
+
const t = e.id ?? f.generate(w.GameSession).toString(), a = await this.gameService.createGameSession({
|
|
2894
2915
|
input: {
|
|
2895
2916
|
id: t,
|
|
2896
2917
|
game: e.game
|
|
@@ -2914,7 +2935,7 @@ class St {
|
|
|
2914
2935
|
* ```
|
|
2915
2936
|
*/
|
|
2916
2937
|
async createGameSession__next(e) {
|
|
2917
|
-
const t = e.id ??
|
|
2938
|
+
const t = e.id ?? f.generate(w.GameSession).toString(), a = await this.walletService.createGameSession({
|
|
2918
2939
|
input: {
|
|
2919
2940
|
id: t,
|
|
2920
2941
|
game: e.game
|
|
@@ -2970,7 +2991,7 @@ class St {
|
|
|
2970
2991
|
* ```
|
|
2971
2992
|
*/
|
|
2972
2993
|
async uploadImageFile(e) {
|
|
2973
|
-
const t = e.id ??
|
|
2994
|
+
const t = e.id ?? f.generate(w.File).toString(), a = await this.fileService.uploadPrivateImageFile({
|
|
2974
2995
|
input: {
|
|
2975
2996
|
id: t,
|
|
2976
2997
|
file: e.file
|
|
@@ -3003,7 +3024,7 @@ class St {
|
|
|
3003
3024
|
}
|
|
3004
3025
|
export {
|
|
3005
3026
|
Ct as ObjectId,
|
|
3006
|
-
|
|
3027
|
+
w as ObjectType,
|
|
3007
3028
|
St as Sdk
|
|
3008
3029
|
};
|
|
3009
3030
|
//# sourceMappingURL=index.mjs.map
|