@opexa/portal-sdk 0.0.8 → 0.0.10
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 +148 -227
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +592 -698
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/types.d.ts +2 -0
- package/dist/services/auth.service.d.ts +2 -1
- package/dist/services/bonus.d.ts +4 -3
- package/dist/services/deposit.d.ts +10 -5
- package/dist/services/file.d.ts +4 -3
- package/dist/services/game.d.ts +4 -3
- package/dist/services/member.d.ts +29 -15
- package/dist/services/points.d.ts +4 -3
- package/dist/services/session.d.ts +3 -4
- package/dist/services/utils.d.ts +13 -0
- package/dist/services/withdrawal.d.ts +13 -6
- package/dist/utils/graphql-client.d.ts +0 -1
- package/dist/utils/status-code-to-operation-error.d.ts +3 -0
- package/dist/utils/types.d.ts +7 -7
- package/package.json +1 -1
- package/dist/utils/rest-client.d.ts +0 -34
- package/dist/utils/status-code-to-error.d.ts +0 -3
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var ge = Object.defineProperty;
|
|
2
|
+
var Ee = (i, e, t) => e in i ? ge(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var m = (i, e, t) => Ee(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { ObjectId as w } from "@opexa/object-id";
|
|
5
5
|
import { ObjectId as vt } from "@opexa/object-id";
|
|
6
|
-
const
|
|
6
|
+
const y = {
|
|
7
7
|
Account: 8,
|
|
8
8
|
Deposit: 9,
|
|
9
9
|
Withdrawal: 14,
|
|
@@ -15,12 +15,12 @@ const f = {
|
|
|
15
15
|
function o(i, ...e) {
|
|
16
16
|
let t = "";
|
|
17
17
|
for (const [a, r] of i.entries()) {
|
|
18
|
-
const
|
|
19
|
-
t = `${t}${r}${
|
|
18
|
+
const s = e.at(a) ?? "";
|
|
19
|
+
t = `${t}${r}${s}`;
|
|
20
20
|
}
|
|
21
21
|
return t.trim();
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const Ae = o`
|
|
24
24
|
query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
|
|
25
25
|
announcements(first: $first, after: $after, filter: $filter) {
|
|
26
26
|
edges {
|
|
@@ -46,15 +46,15 @@ const Se = o`
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
`,
|
|
49
|
+
`, g = o`
|
|
50
50
|
fragment GameFragment on Game {
|
|
51
51
|
id
|
|
52
52
|
type
|
|
53
53
|
name
|
|
54
54
|
provider
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
57
|
-
${
|
|
56
|
+
`, Se = o`
|
|
57
|
+
${g}
|
|
58
58
|
|
|
59
59
|
query Game($id: ObjectId!) {
|
|
60
60
|
node(id: $id) {
|
|
@@ -63,8 +63,8 @@ const Se = o`
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
`,
|
|
67
|
-
${
|
|
66
|
+
`, ke = o`
|
|
67
|
+
${g}
|
|
68
68
|
|
|
69
69
|
query Games($after: Cursor, $first: Int, $filter: GameFilterInput) {
|
|
70
70
|
games(after: $after, first: $first, filter: $filter) {
|
|
@@ -83,16 +83,16 @@ const Se = o`
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
87
|
-
${
|
|
86
|
+
`, Ce = o`
|
|
87
|
+
${g}
|
|
88
88
|
|
|
89
89
|
query GamesByName($search: String!, $filter: GameFilterInput, $first: Int) {
|
|
90
90
|
gamesByName(search: $search, filter: $filter, first: $first) {
|
|
91
91
|
...GameFragment
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
`,
|
|
95
|
-
${
|
|
94
|
+
`, Te = o`
|
|
95
|
+
${g}
|
|
96
96
|
|
|
97
97
|
query GameSession($id: ObjectId!) {
|
|
98
98
|
node(id: $id) {
|
|
@@ -108,21 +108,20 @@ const Se = o`
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
`,
|
|
111
|
+
`, _e = o`
|
|
112
112
|
mutation CreateGameSession($input: CreateGameSessionInput!) {
|
|
113
113
|
createGameSession(input: $input) {
|
|
114
114
|
... on GameDoesNotExistError {
|
|
115
|
-
|
|
116
|
-
message
|
|
115
|
+
__typename
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
|
-
`,
|
|
119
|
+
`, ve = o`
|
|
121
120
|
mutation EndGameSession($input: EndGameSessionInput!) {
|
|
122
121
|
endGameSession(input: $input)
|
|
123
122
|
}
|
|
124
|
-
`,
|
|
125
|
-
${
|
|
123
|
+
`, Me = o`
|
|
124
|
+
${g}
|
|
126
125
|
|
|
127
126
|
query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
|
|
128
127
|
member {
|
|
@@ -180,16 +179,16 @@ const Se = o`
|
|
|
180
179
|
}
|
|
181
180
|
}
|
|
182
181
|
|
|
183
|
-
${
|
|
184
|
-
`,
|
|
182
|
+
${g}
|
|
183
|
+
`, T = o`
|
|
185
184
|
fragment FileFragment on File {
|
|
186
185
|
id
|
|
187
186
|
url
|
|
188
187
|
status
|
|
189
188
|
dateTimeCreated
|
|
190
189
|
}
|
|
191
|
-
`,
|
|
192
|
-
${
|
|
190
|
+
`, he = o`
|
|
191
|
+
${T}
|
|
193
192
|
|
|
194
193
|
query File($id: ObjectId!) {
|
|
195
194
|
node(id: $id) {
|
|
@@ -203,22 +202,19 @@ o`
|
|
|
203
202
|
mutation UploadPrivateImageFile($input: UploadFileInput!) {
|
|
204
203
|
uploadPrivateImageFile(input: $input) {
|
|
205
204
|
... on FileFormatNotSupportedError {
|
|
206
|
-
|
|
207
|
-
message
|
|
205
|
+
__typename
|
|
208
206
|
}
|
|
209
207
|
... on FileNameTooLongError {
|
|
210
|
-
|
|
211
|
-
message
|
|
208
|
+
__typename
|
|
212
209
|
}
|
|
213
210
|
... on FileSizeTooBigError {
|
|
214
|
-
|
|
215
|
-
message
|
|
211
|
+
__typename
|
|
216
212
|
}
|
|
217
213
|
}
|
|
218
214
|
}
|
|
219
215
|
`;
|
|
220
216
|
const we = o`
|
|
221
|
-
${
|
|
217
|
+
${T}
|
|
222
218
|
|
|
223
219
|
fragment CashbackFragment on Cashback {
|
|
224
220
|
id
|
|
@@ -233,7 +229,7 @@ const we = o`
|
|
|
233
229
|
dateTimeCreated
|
|
234
230
|
dateTimeLastUpdated
|
|
235
231
|
}
|
|
236
|
-
`,
|
|
232
|
+
`, Ne = o`
|
|
237
233
|
${we}
|
|
238
234
|
|
|
239
235
|
query Cashbacks {
|
|
@@ -241,8 +237,8 @@ const we = o`
|
|
|
241
237
|
...CashbackFragment
|
|
242
238
|
}
|
|
243
239
|
}
|
|
244
|
-
`,
|
|
245
|
-
${
|
|
240
|
+
`, v = o`
|
|
241
|
+
${T}
|
|
246
242
|
|
|
247
243
|
fragment PromoFragment on Promo {
|
|
248
244
|
id
|
|
@@ -260,8 +256,8 @@ const we = o`
|
|
|
260
256
|
dateTimeCreated
|
|
261
257
|
dateTimeLastUpdated
|
|
262
258
|
}
|
|
263
|
-
`,
|
|
264
|
-
${
|
|
259
|
+
`, Ie = o`
|
|
260
|
+
${v}
|
|
265
261
|
|
|
266
262
|
query Promos {
|
|
267
263
|
promos {
|
|
@@ -269,15 +265,15 @@ const we = o`
|
|
|
269
265
|
}
|
|
270
266
|
}
|
|
271
267
|
`, Re = o`
|
|
272
|
-
${
|
|
268
|
+
${v}
|
|
273
269
|
|
|
274
270
|
query AvailablePromos($filter: PromoFilterInput) {
|
|
275
271
|
availablePromos(filter: $filter) {
|
|
276
272
|
...PromoFragment
|
|
277
273
|
}
|
|
278
274
|
}
|
|
279
|
-
`,
|
|
280
|
-
${
|
|
275
|
+
`, xe = o`
|
|
276
|
+
${v}
|
|
281
277
|
|
|
282
278
|
query Bonus {
|
|
283
279
|
bonus {
|
|
@@ -305,7 +301,7 @@ const we = o`
|
|
|
305
301
|
dateTimeLastUpdated
|
|
306
302
|
}
|
|
307
303
|
}
|
|
308
|
-
`,
|
|
304
|
+
`, Pe = o`
|
|
309
305
|
${we}
|
|
310
306
|
|
|
311
307
|
query CashbackBonuses {
|
|
@@ -319,12 +315,11 @@ const we = o`
|
|
|
319
315
|
dateTimeLastUpdated
|
|
320
316
|
}
|
|
321
317
|
}
|
|
322
|
-
`,
|
|
318
|
+
`, Ge = o`
|
|
323
319
|
mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
|
|
324
320
|
claimCashbackBonus(input: $input) {
|
|
325
321
|
... on CashbackBonusDoesNotExistError {
|
|
326
|
-
|
|
327
|
-
message
|
|
322
|
+
__typename
|
|
328
323
|
}
|
|
329
324
|
}
|
|
330
325
|
}
|
|
@@ -357,118 +352,94 @@ const we = o`
|
|
|
357
352
|
}
|
|
358
353
|
}
|
|
359
354
|
}
|
|
360
|
-
`,
|
|
355
|
+
`, Be = o`
|
|
361
356
|
mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
|
|
362
357
|
createGCashDeposit(input: $input) {
|
|
363
358
|
... on DepositPromoMaximumAmountExceededError {
|
|
364
|
-
|
|
365
|
-
message
|
|
359
|
+
__typename
|
|
366
360
|
}
|
|
367
361
|
... on DepositPromoMinimumAmountNotMetError {
|
|
368
|
-
|
|
369
|
-
message
|
|
362
|
+
__typename
|
|
370
363
|
}
|
|
371
364
|
... on HasActiveBonusError {
|
|
372
|
-
|
|
373
|
-
message
|
|
365
|
+
__typename
|
|
374
366
|
}
|
|
375
367
|
... on MaximumDepositAmountExceededError {
|
|
376
|
-
|
|
377
|
-
message
|
|
368
|
+
__typename
|
|
378
369
|
}
|
|
379
370
|
... on MinimumDepositAmountNotMetError {
|
|
380
|
-
|
|
381
|
-
message
|
|
371
|
+
__typename
|
|
382
372
|
}
|
|
383
373
|
... on MinimumFirstDepositAmountNotMetError {
|
|
384
|
-
|
|
385
|
-
message
|
|
374
|
+
__typename
|
|
386
375
|
}
|
|
387
376
|
... on PromoNotEnabledError {
|
|
388
|
-
|
|
389
|
-
message
|
|
377
|
+
__typename
|
|
390
378
|
}
|
|
391
379
|
... on WalletDoesNotExistError {
|
|
392
|
-
|
|
393
|
-
message
|
|
380
|
+
__typename
|
|
394
381
|
}
|
|
395
382
|
}
|
|
396
383
|
}
|
|
397
|
-
`,
|
|
384
|
+
`, We = o`
|
|
398
385
|
mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
|
|
399
386
|
createMayaDeposit(input: $input) {
|
|
400
387
|
... on DepositPromoMaximumAmountExceededError {
|
|
401
|
-
|
|
402
|
-
message
|
|
388
|
+
__typename
|
|
403
389
|
}
|
|
404
390
|
... on DepositPromoMinimumAmountNotMetError {
|
|
405
|
-
|
|
406
|
-
message
|
|
391
|
+
__typename
|
|
407
392
|
}
|
|
408
393
|
... on HasActiveBonusError {
|
|
409
|
-
|
|
410
|
-
message
|
|
394
|
+
__typename
|
|
411
395
|
}
|
|
412
396
|
... on MaximumDepositAmountExceededError {
|
|
413
|
-
|
|
414
|
-
message
|
|
397
|
+
__typename
|
|
415
398
|
}
|
|
416
399
|
... on MinimumDepositAmountNotMetError {
|
|
417
|
-
|
|
418
|
-
message
|
|
400
|
+
__typename
|
|
419
401
|
}
|
|
420
402
|
... on MinimumFirstDepositAmountNotMetError {
|
|
421
|
-
|
|
422
|
-
message
|
|
403
|
+
__typename
|
|
423
404
|
}
|
|
424
405
|
... on PromoNotEnabledError {
|
|
425
|
-
|
|
426
|
-
message
|
|
406
|
+
__typename
|
|
427
407
|
}
|
|
428
408
|
... on WalletDoesNotExistError {
|
|
429
|
-
|
|
430
|
-
message
|
|
409
|
+
__typename
|
|
431
410
|
}
|
|
432
411
|
}
|
|
433
412
|
}
|
|
434
|
-
`,
|
|
413
|
+
`, Ue = o`
|
|
435
414
|
mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
|
|
436
415
|
createMayaAppDeposit(input: $input) {
|
|
437
416
|
... on DepositPromoMaximumAmountExceededError {
|
|
438
|
-
|
|
439
|
-
message
|
|
417
|
+
__typename
|
|
440
418
|
}
|
|
441
419
|
... on DepositPromoMinimumAmountNotMetError {
|
|
442
|
-
|
|
443
|
-
message
|
|
420
|
+
__typename
|
|
444
421
|
}
|
|
445
422
|
... on HasActiveBonusError {
|
|
446
|
-
|
|
447
|
-
message
|
|
423
|
+
__typename
|
|
448
424
|
}
|
|
449
425
|
... on MaximumDepositAmountExceededError {
|
|
450
|
-
|
|
451
|
-
message
|
|
426
|
+
__typename
|
|
452
427
|
}
|
|
453
428
|
... on MinimumDepositAmountNotMetError {
|
|
454
|
-
|
|
455
|
-
message
|
|
429
|
+
__typename
|
|
456
430
|
}
|
|
457
431
|
... on MinimumFirstDepositAmountNotMetError {
|
|
458
|
-
|
|
459
|
-
message
|
|
432
|
+
__typename
|
|
460
433
|
}
|
|
461
434
|
... on PromoNotEnabledError {
|
|
462
|
-
|
|
463
|
-
message
|
|
435
|
+
__typename
|
|
464
436
|
}
|
|
465
437
|
... on WalletDoesNotExistError {
|
|
466
|
-
|
|
467
|
-
message
|
|
438
|
+
__typename
|
|
468
439
|
}
|
|
469
440
|
}
|
|
470
441
|
}
|
|
471
|
-
`,
|
|
442
|
+
`, Oe = o`
|
|
472
443
|
query Deposit($id: ObjectId!) {
|
|
473
444
|
node(id: $id) {
|
|
474
445
|
... on GCashDeposit {
|
|
@@ -508,19 +479,19 @@ const we = o`
|
|
|
508
479
|
}
|
|
509
480
|
}
|
|
510
481
|
}
|
|
511
|
-
`,
|
|
482
|
+
`, qe = o`
|
|
512
483
|
query DepositsCount {
|
|
513
484
|
member {
|
|
514
485
|
depositsCount
|
|
515
486
|
}
|
|
516
487
|
}
|
|
517
|
-
`,
|
|
488
|
+
`, Fe = o`
|
|
518
489
|
query Member {
|
|
519
490
|
member {
|
|
520
491
|
dateTimeLastActive
|
|
521
492
|
}
|
|
522
493
|
}
|
|
523
|
-
`,
|
|
494
|
+
`, Le = o`
|
|
524
495
|
query MemberAccount {
|
|
525
496
|
memberAccount: self {
|
|
526
497
|
... on MemberAccount {
|
|
@@ -538,13 +509,14 @@ const we = o`
|
|
|
538
509
|
mobileNumberVerified
|
|
539
510
|
mobileNumberVerificationRequired
|
|
540
511
|
transactionPassword
|
|
512
|
+
secretAnswerSubmitted
|
|
541
513
|
dateTimeCreated
|
|
542
514
|
dateTimeLastUpdated
|
|
543
515
|
}
|
|
544
516
|
}
|
|
545
517
|
}
|
|
546
|
-
`,
|
|
547
|
-
${
|
|
518
|
+
`, Ve = o`
|
|
519
|
+
${T}
|
|
548
520
|
|
|
549
521
|
query MemberVerification {
|
|
550
522
|
memberAccount: self {
|
|
@@ -567,7 +539,7 @@ const we = o`
|
|
|
567
539
|
}
|
|
568
540
|
}
|
|
569
541
|
}
|
|
570
|
-
`,
|
|
542
|
+
`, Ye = o`
|
|
571
543
|
mutation RegisterMemberAccount(
|
|
572
544
|
$input: RegisterMemberAccountInput!
|
|
573
545
|
$referralCode: String
|
|
@@ -581,32 +553,25 @@ const we = o`
|
|
|
581
553
|
reCAPTCHAResponse: $reCAPTCHAResponse
|
|
582
554
|
) {
|
|
583
555
|
... on AccountNameNotAvailableError {
|
|
584
|
-
|
|
585
|
-
message
|
|
556
|
+
__typename
|
|
586
557
|
}
|
|
587
558
|
... on InvalidPlatformError {
|
|
588
|
-
|
|
589
|
-
message
|
|
559
|
+
__typename
|
|
590
560
|
}
|
|
591
561
|
... on InvalidPlatformError {
|
|
592
|
-
|
|
593
|
-
message
|
|
562
|
+
__typename
|
|
594
563
|
}
|
|
595
564
|
... on InvalidReCAPTCHAResponseError {
|
|
596
|
-
|
|
597
|
-
message
|
|
565
|
+
__typename
|
|
598
566
|
}
|
|
599
567
|
... on InvalidSMSVerificationCodeError {
|
|
600
|
-
|
|
601
|
-
message
|
|
568
|
+
__typename
|
|
602
569
|
}
|
|
603
570
|
... on MinimumAgeRequirementError {
|
|
604
|
-
|
|
605
|
-
message
|
|
571
|
+
__typename
|
|
606
572
|
}
|
|
607
573
|
... on MobileNumberNotAvailableError {
|
|
608
|
-
|
|
609
|
-
message
|
|
574
|
+
__typename
|
|
610
575
|
}
|
|
611
576
|
}
|
|
612
577
|
}
|
|
@@ -614,45 +579,36 @@ const we = o`
|
|
|
614
579
|
mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
|
|
615
580
|
updateMemberAccount(input: $input) {
|
|
616
581
|
... on AccountNameNotAvailableError {
|
|
617
|
-
|
|
618
|
-
message
|
|
582
|
+
__typename
|
|
619
583
|
}
|
|
620
584
|
... on EmailAddressNotAvailableError {
|
|
621
|
-
|
|
622
|
-
message
|
|
585
|
+
__typename
|
|
623
586
|
}
|
|
624
587
|
... on InvalidTransactionPasswordError {
|
|
625
|
-
|
|
626
|
-
message
|
|
588
|
+
__typename
|
|
627
589
|
}
|
|
628
590
|
... on MobileNumberNotAvailableError {
|
|
629
|
-
|
|
630
|
-
message
|
|
591
|
+
__typename
|
|
631
592
|
}
|
|
632
593
|
... on NickNameNotAvailableError {
|
|
633
|
-
|
|
634
|
-
message
|
|
594
|
+
__typename
|
|
635
595
|
}
|
|
636
596
|
... on RealNameAlreadySetError {
|
|
637
|
-
|
|
638
|
-
message
|
|
597
|
+
__typename
|
|
639
598
|
}
|
|
640
599
|
... on ValidIdAlreadySetError {
|
|
641
|
-
|
|
642
|
-
message
|
|
600
|
+
__typename
|
|
643
601
|
}
|
|
644
602
|
}
|
|
645
603
|
}
|
|
646
|
-
`,
|
|
604
|
+
`, je = o`
|
|
647
605
|
mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
|
|
648
606
|
resetPassword(input: $input, verificationCode: $verificationCode) {
|
|
649
607
|
... on AccountNotFoundError {
|
|
650
|
-
|
|
651
|
-
message
|
|
608
|
+
__typename
|
|
652
609
|
}
|
|
653
610
|
... on InvalidVerificationCodeError {
|
|
654
|
-
|
|
655
|
-
message
|
|
611
|
+
__typename
|
|
656
612
|
}
|
|
657
613
|
}
|
|
658
614
|
}
|
|
@@ -660,71 +616,60 @@ const we = o`
|
|
|
660
616
|
mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
|
|
661
617
|
deleteMemberAccount(input: $input)
|
|
662
618
|
}
|
|
663
|
-
`,
|
|
619
|
+
`, Ke = o`
|
|
664
620
|
mutation SendVerificationCode($input: SendVerificationCodeInput!) {
|
|
665
621
|
sendVerificationCode(input: $input) {
|
|
666
622
|
... on InvalidPlatformError {
|
|
667
|
-
|
|
668
|
-
message
|
|
623
|
+
__typename
|
|
669
624
|
}
|
|
670
625
|
... on NotReadyToSendVerficationCodeError {
|
|
671
|
-
|
|
672
|
-
message
|
|
626
|
+
__typename
|
|
673
627
|
}
|
|
674
628
|
}
|
|
675
629
|
}
|
|
676
|
-
`,
|
|
630
|
+
`, ze = o`
|
|
677
631
|
mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
|
|
678
632
|
verifyMobileNumber(input: $input) {
|
|
679
633
|
... on InvalidSMSVerificationCodeError {
|
|
680
|
-
|
|
681
|
-
message
|
|
634
|
+
__typename
|
|
682
635
|
}
|
|
683
636
|
... on MobileNumberAlreadyVerifiedError {
|
|
684
|
-
|
|
685
|
-
message
|
|
637
|
+
__typename
|
|
686
638
|
}
|
|
687
639
|
}
|
|
688
640
|
}
|
|
689
|
-
`,
|
|
641
|
+
`, Je = o`
|
|
690
642
|
mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
|
|
691
643
|
createMemberVerification(input: $input) {
|
|
692
644
|
... on FileDoesNotExistError {
|
|
693
|
-
|
|
694
|
-
message
|
|
645
|
+
__typename
|
|
695
646
|
}
|
|
696
647
|
... on FileNotReadyError {
|
|
697
|
-
|
|
698
|
-
message
|
|
648
|
+
__typename
|
|
699
649
|
}
|
|
700
650
|
... on MemberVerificationAlreadyExistsError {
|
|
701
|
-
|
|
702
|
-
message
|
|
651
|
+
__typename
|
|
703
652
|
}
|
|
704
653
|
}
|
|
705
654
|
}
|
|
706
|
-
`,
|
|
655
|
+
`, Xe = o`
|
|
707
656
|
mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
|
|
708
657
|
updateMemberVerification(input: $input) {
|
|
709
658
|
... on FileDoesNotExistError {
|
|
710
|
-
|
|
711
|
-
message
|
|
659
|
+
__typename
|
|
712
660
|
}
|
|
713
661
|
... on FileNotReadyError {
|
|
714
|
-
|
|
715
|
-
message
|
|
662
|
+
__typename
|
|
716
663
|
}
|
|
717
664
|
... on MemberVerificationAlreadyApprovedError {
|
|
718
|
-
|
|
719
|
-
message
|
|
665
|
+
__typename
|
|
720
666
|
}
|
|
721
667
|
... on MemberVerificationDoesNotExistError {
|
|
722
|
-
|
|
723
|
-
message
|
|
668
|
+
__typename
|
|
724
669
|
}
|
|
725
670
|
}
|
|
726
671
|
}
|
|
727
|
-
`,
|
|
672
|
+
`, Ze = o`
|
|
728
673
|
query ProfileCompletion {
|
|
729
674
|
profileCompletion {
|
|
730
675
|
completionPercentage
|
|
@@ -735,7 +680,7 @@ const we = o`
|
|
|
735
680
|
accountPassword
|
|
736
681
|
}
|
|
737
682
|
}
|
|
738
|
-
`,
|
|
683
|
+
`, et = o`
|
|
739
684
|
fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
|
|
740
685
|
minimumAmount
|
|
741
686
|
maximumAmount
|
|
@@ -789,7 +734,7 @@ const we = o`
|
|
|
789
734
|
multiplier
|
|
790
735
|
}
|
|
791
736
|
}
|
|
792
|
-
`,
|
|
737
|
+
`, tt = o`
|
|
793
738
|
query PointsWallet {
|
|
794
739
|
pointsWallet {
|
|
795
740
|
id
|
|
@@ -798,16 +743,15 @@ const we = o`
|
|
|
798
743
|
dateTimeCreated
|
|
799
744
|
}
|
|
800
745
|
}
|
|
801
|
-
`,
|
|
746
|
+
`, at = o`
|
|
802
747
|
mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
|
|
803
748
|
pointsToCashConversion(input: $input) {
|
|
804
749
|
... on InsufficientPointsError {
|
|
805
|
-
|
|
806
|
-
message
|
|
750
|
+
__typename
|
|
807
751
|
}
|
|
808
752
|
}
|
|
809
753
|
}
|
|
810
|
-
`,
|
|
754
|
+
`, rt = o`
|
|
811
755
|
query MayaSession($id: ObjectId!) {
|
|
812
756
|
mayaSession(id: $id) {
|
|
813
757
|
id
|
|
@@ -815,7 +759,7 @@ const we = o`
|
|
|
815
759
|
dateTimeCreated
|
|
816
760
|
}
|
|
817
761
|
}
|
|
818
|
-
`,
|
|
762
|
+
`, nt = o`
|
|
819
763
|
query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
|
|
820
764
|
member {
|
|
821
765
|
transactionRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -841,7 +785,7 @@ const we = o`
|
|
|
841
785
|
}
|
|
842
786
|
}
|
|
843
787
|
}
|
|
844
|
-
`,
|
|
788
|
+
`, ot = o`
|
|
845
789
|
query Wallet {
|
|
846
790
|
wallet {
|
|
847
791
|
id
|
|
@@ -851,7 +795,7 @@ const we = o`
|
|
|
851
795
|
dateTimeLastUpdated
|
|
852
796
|
}
|
|
853
797
|
}
|
|
854
|
-
`,
|
|
798
|
+
`, it = o`
|
|
855
799
|
query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
|
|
856
800
|
member {
|
|
857
801
|
withdrawalRecords(first: $first, after: $after, filter: $filter) {
|
|
@@ -918,61 +862,49 @@ const we = o`
|
|
|
918
862
|
}
|
|
919
863
|
}
|
|
920
864
|
}
|
|
921
|
-
`,
|
|
865
|
+
`, st = o`
|
|
922
866
|
mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
|
|
923
867
|
createGCashWithdrawal(input: $input) {
|
|
924
868
|
... on AccountNotVerifiedError {
|
|
925
|
-
|
|
926
|
-
message
|
|
869
|
+
__typename
|
|
927
870
|
}
|
|
928
871
|
... on InvalidTransactionPasswordError {
|
|
929
|
-
|
|
930
|
-
message
|
|
872
|
+
__typename
|
|
931
873
|
}
|
|
932
874
|
... on InvalidWithdrawalAmountError {
|
|
933
|
-
|
|
934
|
-
message
|
|
875
|
+
__typename
|
|
935
876
|
}
|
|
936
877
|
... on MobileNumberNotVerifiedError {
|
|
937
|
-
|
|
938
|
-
message
|
|
878
|
+
__typename
|
|
939
879
|
}
|
|
940
880
|
... on NotEnoughBalanceError {
|
|
941
|
-
|
|
942
|
-
message
|
|
881
|
+
__typename
|
|
943
882
|
}
|
|
944
883
|
... on WithdrawalDailyLimitExceededError {
|
|
945
|
-
|
|
946
|
-
message
|
|
884
|
+
__typename
|
|
947
885
|
}
|
|
948
886
|
}
|
|
949
887
|
}
|
|
950
|
-
`,
|
|
888
|
+
`, mt = o`
|
|
951
889
|
mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
|
|
952
890
|
createMayaWithdrawal(input: $input) {
|
|
953
891
|
... on AccountNotVerifiedError {
|
|
954
|
-
|
|
955
|
-
message
|
|
892
|
+
__typename
|
|
956
893
|
}
|
|
957
894
|
... on InvalidTransactionPasswordError {
|
|
958
|
-
|
|
959
|
-
message
|
|
895
|
+
__typename
|
|
960
896
|
}
|
|
961
897
|
... on InvalidWithdrawalAmountError {
|
|
962
|
-
|
|
963
|
-
message
|
|
898
|
+
__typename
|
|
964
899
|
}
|
|
965
900
|
... on MobileNumberNotVerifiedError {
|
|
966
|
-
|
|
967
|
-
message
|
|
901
|
+
__typename
|
|
968
902
|
}
|
|
969
903
|
... on NotEnoughBalanceError {
|
|
970
|
-
|
|
971
|
-
message
|
|
904
|
+
__typename
|
|
972
905
|
}
|
|
973
906
|
... on WithdrawalDailyLimitExceededError {
|
|
974
|
-
|
|
975
|
-
message
|
|
907
|
+
__typename
|
|
976
908
|
}
|
|
977
909
|
}
|
|
978
910
|
}
|
|
@@ -980,24 +912,19 @@ const we = o`
|
|
|
980
912
|
mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
|
|
981
913
|
createMayaAppWithdrawal(input: $input) {
|
|
982
914
|
... on AccountNotVerifiedError {
|
|
983
|
-
|
|
984
|
-
message
|
|
915
|
+
__typename
|
|
985
916
|
}
|
|
986
917
|
... on InvalidTransactionPasswordError {
|
|
987
|
-
|
|
988
|
-
message
|
|
918
|
+
__typename
|
|
989
919
|
}
|
|
990
920
|
... on InvalidWithdrawalAmountError {
|
|
991
|
-
|
|
992
|
-
message
|
|
921
|
+
__typename
|
|
993
922
|
}
|
|
994
923
|
... on NotEnoughBalanceError {
|
|
995
|
-
|
|
996
|
-
message
|
|
924
|
+
__typename
|
|
997
925
|
}
|
|
998
926
|
... on WithdrawalDailyLimitExceededError {
|
|
999
|
-
|
|
1000
|
-
message
|
|
927
|
+
__typename
|
|
1001
928
|
}
|
|
1002
929
|
}
|
|
1003
930
|
}
|
|
@@ -1005,54 +932,99 @@ const we = o`
|
|
|
1005
932
|
mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
|
|
1006
933
|
createBankWithdrawal(input: $input) {
|
|
1007
934
|
... on MobileNumberNotVerifiedError {
|
|
1008
|
-
|
|
1009
|
-
message
|
|
935
|
+
__typename
|
|
1010
936
|
}
|
|
1011
937
|
... on AccountNotVerifiedError {
|
|
1012
|
-
|
|
1013
|
-
message
|
|
938
|
+
__typename
|
|
1014
939
|
}
|
|
1015
940
|
... on InvalidWithdrawalAmountError {
|
|
1016
|
-
|
|
1017
|
-
message
|
|
941
|
+
__typename
|
|
1018
942
|
}
|
|
1019
943
|
... on WithdrawalDailyLimitExceededError {
|
|
1020
|
-
|
|
1021
|
-
message
|
|
944
|
+
__typename
|
|
1022
945
|
}
|
|
1023
946
|
... on InvalidTransactionPasswordError {
|
|
1024
|
-
|
|
1025
|
-
message
|
|
947
|
+
__typename
|
|
1026
948
|
}
|
|
1027
949
|
... on NotEnoughBalanceError {
|
|
1028
|
-
|
|
1029
|
-
message
|
|
950
|
+
__typename
|
|
1030
951
|
}
|
|
1031
952
|
}
|
|
1032
953
|
}
|
|
1033
|
-
`,
|
|
954
|
+
`, ut = o`
|
|
1034
955
|
query RemainingDailyWithdrawalsCount {
|
|
1035
956
|
remainingDailyWithdrawalsCount
|
|
1036
957
|
}
|
|
1037
958
|
`;
|
|
1038
|
-
|
|
959
|
+
function d(i) {
|
|
960
|
+
return {
|
|
961
|
+
name: i,
|
|
962
|
+
message: {
|
|
963
|
+
AccountNameNotAvailableError: "Username is no longer available",
|
|
964
|
+
AccountNotFoundError: "Account does not exist",
|
|
965
|
+
AccountNotVerifiedError: "Account is not verified",
|
|
966
|
+
CashbackBonusDoesNotExistError: "Cashback bonus does not exists",
|
|
967
|
+
DepositPromoMaximumAmountExceededError: "Deposit amount exceeds maximum amount",
|
|
968
|
+
DepositPromoMinimumAmountNotMetError: "Deposit amount does not meet minimum amount",
|
|
969
|
+
EmailAddressNotAvailableError: "Email is no longer available",
|
|
970
|
+
FileDoesNotExistError: "File does not exist",
|
|
971
|
+
FileFormatNotSupportedError: "File format is not supported",
|
|
972
|
+
FileNameTooLongError: "File name is too long",
|
|
973
|
+
FileNotReadyError: "File is not yet ready",
|
|
974
|
+
FileSizeTooBigError: "File size is too big",
|
|
975
|
+
GameDoesNotExistError: "Game does not exist",
|
|
976
|
+
HasActiveBonusError: "Account has active bonus",
|
|
977
|
+
InsufficientPointsError: "Insufficient points",
|
|
978
|
+
InvalidPlatformError: "Invalid platform",
|
|
979
|
+
InvalidReCAPTCHAResponseError: "Invalid reCAPTCHA",
|
|
980
|
+
InvalidSMSVerificationCodeError: "Invalid SMS verification code",
|
|
981
|
+
InvalidTransactionPasswordError: "Invalid transaction password",
|
|
982
|
+
InvalidVerificationCodeError: "Invalid verification code",
|
|
983
|
+
InvalidWithdrawalAmountError: "Invalid withdrawal amount",
|
|
984
|
+
MaximumDepositAmountExceededError: "Maximum deposit amount exceeded",
|
|
985
|
+
MemberVerificationAlreadyApprovedError: "Member verification is already approved",
|
|
986
|
+
MemberVerificationAlreadyExistsError: "Member verification already exists",
|
|
987
|
+
MemberVerificationDoesNotExistError: "Member verification does not exist",
|
|
988
|
+
MinimumAgeRequirementError: "Minimum age requirement not met",
|
|
989
|
+
MinimumDepositAmountNotMetError: "Minimum deposit amount not met",
|
|
990
|
+
MinimumFirstDepositAmountNotMetError: "Minimum first deposit amount not met",
|
|
991
|
+
MobileNumberAlreadyVerifiedError: "Mobile number is already verified",
|
|
992
|
+
MobileNumberNotAvailableError: "Mobile number is no longer available",
|
|
993
|
+
MobileNumberNotVerifiedError: "Mobile number is not verified",
|
|
994
|
+
NickNameNotAvailableError: "Nickname is no longer available",
|
|
995
|
+
NotEnoughBalanceError: "Insufficient balance",
|
|
996
|
+
NotReadyToSendVerficationCodeError: "Not ready to send verification code",
|
|
997
|
+
PromoNotEnabledError: "Promo is not enabled",
|
|
998
|
+
RealNameAlreadySetError: "Real name is already set",
|
|
999
|
+
ValidIdAlreadySetError: "Valid ID is already set",
|
|
1000
|
+
WalletDoesNotExistError: "Wallet does not exist",
|
|
1001
|
+
WithdrawalDailyLimitExceededError: "Daily withdrawal limit exceeded",
|
|
1002
|
+
AccountBlacklisted: "Account is blacklisted",
|
|
1003
|
+
AccountNotFound: "Account not found",
|
|
1004
|
+
InvalidToken: "Invalid token",
|
|
1005
|
+
InvalidTokenOrSecretAnswer: "Invalid token or secret answer",
|
|
1006
|
+
SessionExpired: "Session expired"
|
|
1007
|
+
}[i]
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
class lt {
|
|
1039
1011
|
constructor(e) {
|
|
1040
|
-
|
|
1012
|
+
m(this, "client");
|
|
1041
1013
|
this.client = e;
|
|
1042
1014
|
}
|
|
1043
1015
|
/** aka `Query.self` */
|
|
1044
1016
|
async memberAccount() {
|
|
1045
|
-
const e = await this.client.request(
|
|
1017
|
+
const e = await this.client.request(Le);
|
|
1046
1018
|
return e.ok ? {
|
|
1047
1019
|
ok: !0,
|
|
1048
1020
|
data: e.data.memberAccount
|
|
1049
1021
|
} : e;
|
|
1050
1022
|
}
|
|
1051
1023
|
async registerMemberAccount(e) {
|
|
1052
|
-
const t = await this.client.request(
|
|
1024
|
+
const t = await this.client.request(Ye, e);
|
|
1053
1025
|
return t.ok ? t.data.registerMemberAccount ? {
|
|
1054
1026
|
ok: !1,
|
|
1055
|
-
error: t.data.registerMemberAccount
|
|
1027
|
+
error: d(t.data.registerMemberAccount.__typename)
|
|
1056
1028
|
} : {
|
|
1057
1029
|
ok: !0
|
|
1058
1030
|
} : t;
|
|
@@ -1061,7 +1033,7 @@ class ut {
|
|
|
1061
1033
|
const t = await this.client.request(He, e);
|
|
1062
1034
|
return t.ok ? t.data.updateMemberAccount ? {
|
|
1063
1035
|
ok: !1,
|
|
1064
|
-
error: t.data.updateMemberAccount
|
|
1036
|
+
error: d(t.data.updateMemberAccount.__typename)
|
|
1065
1037
|
} : {
|
|
1066
1038
|
ok: !0
|
|
1067
1039
|
} : t;
|
|
@@ -1073,68 +1045,68 @@ class ut {
|
|
|
1073
1045
|
} : {
|
|
1074
1046
|
ok: !1,
|
|
1075
1047
|
error: {
|
|
1076
|
-
|
|
1048
|
+
name: "UnknownError",
|
|
1077
1049
|
message: "Something went wrong."
|
|
1078
1050
|
}
|
|
1079
1051
|
} : t;
|
|
1080
1052
|
}
|
|
1081
1053
|
async resetPassword(e) {
|
|
1082
1054
|
const t = await this.client.request(
|
|
1083
|
-
|
|
1055
|
+
je,
|
|
1084
1056
|
e
|
|
1085
1057
|
);
|
|
1086
1058
|
return t.ok ? t.data.resetPassword ? {
|
|
1087
1059
|
ok: !1,
|
|
1088
|
-
error: t.data.resetPassword
|
|
1060
|
+
error: d(t.data.resetPassword.__typename)
|
|
1089
1061
|
} : {
|
|
1090
1062
|
ok: !0
|
|
1091
1063
|
} : t;
|
|
1092
1064
|
}
|
|
1093
1065
|
async profileCompletion() {
|
|
1094
|
-
const e = await this.client.request(
|
|
1066
|
+
const e = await this.client.request(Ze);
|
|
1095
1067
|
return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
|
|
1096
1068
|
}
|
|
1097
1069
|
async platform() {
|
|
1098
|
-
return await this.client.request(
|
|
1070
|
+
return await this.client.request(et);
|
|
1099
1071
|
}
|
|
1100
1072
|
async sendVerificationCode(e) {
|
|
1101
|
-
const t = await this.client.request(
|
|
1073
|
+
const t = await this.client.request(Ke, e);
|
|
1102
1074
|
return t.ok ? t.data.sendVerificationCode ? {
|
|
1103
1075
|
ok: !1,
|
|
1104
|
-
error: t.data.sendVerificationCode
|
|
1076
|
+
error: d(t.data.sendVerificationCode.__typename)
|
|
1105
1077
|
} : {
|
|
1106
1078
|
ok: !0
|
|
1107
1079
|
} : t;
|
|
1108
1080
|
}
|
|
1109
1081
|
async verifyMobileNumber(e) {
|
|
1110
|
-
const t = await this.client.request(
|
|
1082
|
+
const t = await this.client.request(ze, e);
|
|
1111
1083
|
return t.ok ? t.data.verifyMobileNumber ? {
|
|
1112
1084
|
ok: !1,
|
|
1113
|
-
error: t.data.verifyMobileNumber
|
|
1085
|
+
error: d(t.data.verifyMobileNumber.__typename)
|
|
1114
1086
|
} : {
|
|
1115
1087
|
ok: !0
|
|
1116
1088
|
} : t;
|
|
1117
1089
|
}
|
|
1118
1090
|
async createMemberVerification(e) {
|
|
1119
|
-
const t = await this.client.request(
|
|
1091
|
+
const t = await this.client.request(Je, e);
|
|
1120
1092
|
return t.ok ? t.data.createMemberVerification ? {
|
|
1121
1093
|
ok: !1,
|
|
1122
|
-
error: t.data.createMemberVerification
|
|
1094
|
+
error: d(t.data.createMemberVerification.__typename)
|
|
1123
1095
|
} : {
|
|
1124
1096
|
ok: !0
|
|
1125
1097
|
} : t;
|
|
1126
1098
|
}
|
|
1127
1099
|
async updateMemberVerification(e) {
|
|
1128
|
-
const t = await this.client.request(
|
|
1100
|
+
const t = await this.client.request(Xe, e);
|
|
1129
1101
|
return t.ok ? t.data.updateMemberVerification ? {
|
|
1130
1102
|
ok: !1,
|
|
1131
|
-
error: t.data.updateMemberVerification
|
|
1103
|
+
error: d(t.data.updateMemberVerification.__typename)
|
|
1132
1104
|
} : {
|
|
1133
1105
|
ok: !0
|
|
1134
1106
|
} : t;
|
|
1135
1107
|
}
|
|
1136
1108
|
async memberVerification() {
|
|
1137
|
-
const e = await this.client.request(
|
|
1109
|
+
const e = await this.client.request(Ve);
|
|
1138
1110
|
return e.ok ? {
|
|
1139
1111
|
ok: !0,
|
|
1140
1112
|
data: e.data.memberAccount.verification
|
|
@@ -1142,7 +1114,7 @@ class ut {
|
|
|
1142
1114
|
}
|
|
1143
1115
|
async announcements(e) {
|
|
1144
1116
|
const t = await this.client.request(
|
|
1145
|
-
|
|
1117
|
+
Ae,
|
|
1146
1118
|
e
|
|
1147
1119
|
);
|
|
1148
1120
|
return t.ok ? {
|
|
@@ -1151,304 +1123,231 @@ class ut {
|
|
|
1151
1123
|
} : t;
|
|
1152
1124
|
}
|
|
1153
1125
|
}
|
|
1154
|
-
function
|
|
1155
|
-
const t =
|
|
1126
|
+
function u(i, e) {
|
|
1127
|
+
const t = _[i] ? _[i] : _[500];
|
|
1156
1128
|
return {
|
|
1157
|
-
|
|
1129
|
+
name: t.name,
|
|
1158
1130
|
message: e ?? t.message
|
|
1159
1131
|
};
|
|
1160
1132
|
}
|
|
1161
|
-
const
|
|
1162
|
-
400: {
|
|
1163
|
-
401: {
|
|
1164
|
-
403: {
|
|
1165
|
-
404: {
|
|
1166
|
-
408: {
|
|
1167
|
-
429: {
|
|
1168
|
-
500: {
|
|
1133
|
+
const _ = {
|
|
1134
|
+
400: { name: "HttpBadRequest", message: "Bad Request" },
|
|
1135
|
+
401: { name: "HttpUnauthorized", message: "Unauthorized" },
|
|
1136
|
+
403: { name: "HttpForbidden", message: "Forbidden" },
|
|
1137
|
+
404: { name: "HttpNotFound", message: "Not Found" },
|
|
1138
|
+
408: { name: "HttpRequestTimeout", message: "Request Timeout" },
|
|
1139
|
+
429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
|
|
1140
|
+
500: { name: "HttpInternalServerError", message: "Internal Server Error" }
|
|
1169
1141
|
};
|
|
1170
|
-
class
|
|
1171
|
-
constructor(e
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
var r;
|
|
1176
|
-
const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
|
|
1177
|
-
a.append("Content-Type", "application/json"), this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
|
|
1142
|
+
class pt {
|
|
1143
|
+
constructor(e) {
|
|
1144
|
+
m(this, "url");
|
|
1145
|
+
m(this, "platform");
|
|
1146
|
+
this.url = e.url, this.platform = e.platform;
|
|
1178
1147
|
}
|
|
1179
|
-
async
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
const r = t != null && t.body ? JSON.stringify(t.body) : void 0, n = await this.runMiddlewares(
|
|
1185
|
-
new Request(a, {
|
|
1186
|
-
...this.options,
|
|
1187
|
-
body: r,
|
|
1188
|
-
method: "POST"
|
|
1189
|
-
})
|
|
1190
|
-
);
|
|
1191
|
-
t != null && t.headers && new Headers(t.headers).forEach((d, m) => {
|
|
1192
|
-
n.headers.set(m, d);
|
|
1148
|
+
async createSession(e) {
|
|
1149
|
+
const t = new Headers({
|
|
1150
|
+
"Content-Type": "application/json",
|
|
1151
|
+
"Platform-Code": this.platform,
|
|
1152
|
+
Role: "MEMBER"
|
|
1193
1153
|
});
|
|
1154
|
+
switch (e.type) {
|
|
1155
|
+
case "NAME_AND_PASSWORD": {
|
|
1156
|
+
const a = `${e.name}:${e.password}`, r = Buffer.from(a).toString("base64");
|
|
1157
|
+
t.set("Authorization", `Basic ${r}`);
|
|
1158
|
+
break;
|
|
1159
|
+
}
|
|
1160
|
+
case "MOBILE_NUMBER": {
|
|
1161
|
+
const a = `${e.mobileNumber}:${e.verificationCode}`, r = Buffer.from(a).toString("base64");
|
|
1162
|
+
t.set("Authorization", `MobileNumberOTP ${r}`);
|
|
1163
|
+
break;
|
|
1164
|
+
}
|
|
1165
|
+
case "MAYA": {
|
|
1166
|
+
t.set("Authorization", `Maya ${e.sessionId}`);
|
|
1167
|
+
break;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1194
1170
|
try {
|
|
1195
|
-
const
|
|
1196
|
-
|
|
1171
|
+
const a = await fetch(`${this.url}/sessions`, {
|
|
1172
|
+
method: "POST",
|
|
1173
|
+
headers: t
|
|
1174
|
+
}), r = await a.json();
|
|
1175
|
+
return a.ok ? {
|
|
1197
1176
|
ok: !0,
|
|
1198
|
-
data:
|
|
1177
|
+
data: r
|
|
1178
|
+
} : r.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1179
|
+
ok: !1,
|
|
1180
|
+
error: d("AccountBlacklisted")
|
|
1199
1181
|
} : {
|
|
1200
1182
|
ok: !1,
|
|
1201
|
-
error:
|
|
1183
|
+
error: u(a.status)
|
|
1202
1184
|
};
|
|
1203
1185
|
} catch {
|
|
1204
1186
|
return {
|
|
1205
1187
|
ok: !1,
|
|
1206
|
-
error:
|
|
1207
|
-
code: "HttpInternalServerError",
|
|
1208
|
-
message: "Something went wrong."
|
|
1209
|
-
}
|
|
1188
|
+
error: u(500)
|
|
1210
1189
|
};
|
|
1211
1190
|
}
|
|
1212
1191
|
}
|
|
1213
|
-
async
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
const r = await this.runMiddlewares(
|
|
1219
|
-
new Request(a, {
|
|
1220
|
-
...this.options,
|
|
1221
|
-
method: "GET"
|
|
1222
|
-
})
|
|
1223
|
-
);
|
|
1224
|
-
t != null && t.headers && new Headers(t.headers).forEach((n, d) => {
|
|
1225
|
-
r.headers.set(d, n);
|
|
1192
|
+
async authenticate(e) {
|
|
1193
|
+
const t = new Headers({
|
|
1194
|
+
"Content-Type": "application/json",
|
|
1195
|
+
"Platform-Code": this.platform,
|
|
1196
|
+
Role: "MEMBER"
|
|
1226
1197
|
});
|
|
1198
|
+
if (e.type === "SECURITY_QUESTION") {
|
|
1199
|
+
t.set("Authorization", `Bearer ${e.token}`);
|
|
1200
|
+
try {
|
|
1201
|
+
const a = await fetch(`${this.url}/session/${e.token}/authenticate`, {
|
|
1202
|
+
method: "POST",
|
|
1203
|
+
headers: t,
|
|
1204
|
+
body: JSON.stringify({
|
|
1205
|
+
secretAnswer: e.secretAnswer
|
|
1206
|
+
})
|
|
1207
|
+
}), r = await a.json();
|
|
1208
|
+
return a.ok ? {
|
|
1209
|
+
ok: !0,
|
|
1210
|
+
data: r
|
|
1211
|
+
} : a.status === 401 || a.status === 403 ? {
|
|
1212
|
+
ok: !1,
|
|
1213
|
+
error: d("InvalidTokenOrSecretAnswer")
|
|
1214
|
+
} : {
|
|
1215
|
+
ok: !1,
|
|
1216
|
+
error: u(a.status)
|
|
1217
|
+
};
|
|
1218
|
+
} catch {
|
|
1219
|
+
return {
|
|
1220
|
+
ok: !1,
|
|
1221
|
+
error: u(500)
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
throw new Error("Invalid input 'type'");
|
|
1226
|
+
}
|
|
1227
|
+
async refreshSession(e) {
|
|
1227
1228
|
try {
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1229
|
+
const t = await fetch(`${this.url}/session:refresh`, {
|
|
1230
|
+
method: "POST",
|
|
1231
|
+
headers: {
|
|
1232
|
+
"Content-Type": "application/json",
|
|
1233
|
+
"Platform-Code": this.platform,
|
|
1234
|
+
Role: "MEMBER",
|
|
1235
|
+
Authorization: `Bearer ${e}`
|
|
1236
|
+
}
|
|
1237
|
+
}), a = await t.json();
|
|
1238
|
+
return t.ok ? {
|
|
1230
1239
|
ok: !0,
|
|
1231
|
-
data:
|
|
1232
|
-
} : {
|
|
1240
|
+
data: a
|
|
1241
|
+
} : a.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1233
1242
|
ok: !1,
|
|
1234
|
-
error:
|
|
1235
|
-
}
|
|
1236
|
-
} catch {
|
|
1237
|
-
return {
|
|
1243
|
+
error: d("AccountBlacklisted")
|
|
1244
|
+
} : t.status === 403 || t.status === 401 ? {
|
|
1238
1245
|
ok: !1,
|
|
1239
|
-
error:
|
|
1240
|
-
code: "HttpInternalServerError",
|
|
1241
|
-
message: "Something went wrong."
|
|
1242
|
-
}
|
|
1243
|
-
};
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
async delete(e, t) {
|
|
1247
|
-
const a = new URL(this.url);
|
|
1248
|
-
a.pathname = e, t != null && t.searchParams && t.searchParams.forEach((n, d) => {
|
|
1249
|
-
a.searchParams.append(d, n);
|
|
1250
|
-
});
|
|
1251
|
-
const r = await this.runMiddlewares(
|
|
1252
|
-
new Request(a, {
|
|
1253
|
-
...this.options,
|
|
1254
|
-
method: "DELETE"
|
|
1255
|
-
})
|
|
1256
|
-
);
|
|
1257
|
-
t != null && t.headers && new Headers(t.headers).forEach((n, d) => {
|
|
1258
|
-
r.headers.set(d, n);
|
|
1259
|
-
});
|
|
1260
|
-
try {
|
|
1261
|
-
const n = await fetch(r);
|
|
1262
|
-
return n.ok ? {
|
|
1263
|
-
ok: !0
|
|
1246
|
+
error: d("InvalidToken")
|
|
1264
1247
|
} : {
|
|
1265
1248
|
ok: !1,
|
|
1266
|
-
error:
|
|
1249
|
+
error: u(t.status)
|
|
1267
1250
|
};
|
|
1268
1251
|
} catch {
|
|
1269
1252
|
return {
|
|
1270
1253
|
ok: !1,
|
|
1271
|
-
error:
|
|
1272
|
-
code: "HttpInternalServerError",
|
|
1273
|
-
message: "Something went wrong."
|
|
1274
|
-
}
|
|
1254
|
+
error: u(500)
|
|
1275
1255
|
};
|
|
1276
1256
|
}
|
|
1277
1257
|
}
|
|
1278
|
-
async
|
|
1279
|
-
let t = e.clone();
|
|
1280
|
-
for (const a of this.middlewares)
|
|
1281
|
-
t = await a(t);
|
|
1282
|
-
return t;
|
|
1283
|
-
}
|
|
1284
|
-
async safeToJson(e) {
|
|
1258
|
+
async destroySession(e) {
|
|
1285
1259
|
try {
|
|
1286
|
-
|
|
1260
|
+
const t = await fetch(`${this.url}/session`, {
|
|
1261
|
+
method: "DELETE",
|
|
1262
|
+
headers: {
|
|
1263
|
+
"Content-Type": "application/json",
|
|
1264
|
+
"Platform-Code": this.platform,
|
|
1265
|
+
Role: "MEMBER",
|
|
1266
|
+
Authorization: `Bearer ${e}`
|
|
1267
|
+
}
|
|
1268
|
+
});
|
|
1269
|
+
return t.ok ? { ok: !0 } : { ok: !1, error: u(t.status) };
|
|
1287
1270
|
} catch {
|
|
1288
|
-
return
|
|
1271
|
+
return { ok: !1, error: u(500) };
|
|
1289
1272
|
}
|
|
1290
1273
|
}
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
}
|
|
1301
|
-
async createSession(e) {
|
|
1302
|
-
const t = new Headers();
|
|
1303
|
-
switch (e.type) {
|
|
1304
|
-
case "NAME_AND_PASSWORD": {
|
|
1305
|
-
const r = `${e.name}:${e.password}`, n = Buffer.from(r).toString("base64");
|
|
1306
|
-
t.set("Authorization", `Basic ${n}`);
|
|
1307
|
-
break;
|
|
1308
|
-
}
|
|
1309
|
-
case "MOBILE_NUMBER": {
|
|
1310
|
-
const r = `${e.mobileNumber}:${e.verificationCode}`, n = Buffer.from(r).toString("base64");
|
|
1311
|
-
t.set("Authorization", `MobileNumberOTP ${n}`);
|
|
1312
|
-
break;
|
|
1313
|
-
}
|
|
1314
|
-
case "MAYA": {
|
|
1315
|
-
t.set("Authorization", `Maya ${e.sessionId}`);
|
|
1316
|
-
break;
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
const a = await this.client.post("/sessions", {
|
|
1320
|
-
headers: t
|
|
1321
|
-
});
|
|
1322
|
-
return a.ok ? a : a.error.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1323
|
-
ok: !1,
|
|
1324
|
-
error: {
|
|
1325
|
-
code: "AccountBlacklisted",
|
|
1326
|
-
message: "Account is blacklisted"
|
|
1327
|
-
}
|
|
1328
|
-
} : a.error.code === "HttpForbidden" || a.error.code === "HttpUnauthorized" ? {
|
|
1329
|
-
ok: !1,
|
|
1330
|
-
error: {
|
|
1331
|
-
code: "AccountNotFound",
|
|
1332
|
-
message: "Invalid credentials."
|
|
1333
|
-
}
|
|
1334
|
-
} : a;
|
|
1335
|
-
}
|
|
1336
|
-
async authenticate(e) {
|
|
1337
|
-
if (e.type === "SECURITY_QUESTION") {
|
|
1338
|
-
const t = await this.client.post(
|
|
1339
|
-
`/session/${e.token}/authenticate`,
|
|
1340
|
-
{
|
|
1341
|
-
body: {
|
|
1342
|
-
secretAnswer: e.secretAnswer
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
1345
|
-
);
|
|
1346
|
-
return t.ok ? t : t.error.code === "HttpForbidden" || t.error.code === "HttpUnauthorized" ? {
|
|
1347
|
-
ok: !1,
|
|
1348
|
-
error: {
|
|
1349
|
-
code: "InvalidTokenOrAnswer",
|
|
1350
|
-
message: "Invalid token or secret answer"
|
|
1274
|
+
async verifySession(e) {
|
|
1275
|
+
try {
|
|
1276
|
+
return (await fetch(`${this.url}/session`, {
|
|
1277
|
+
method: "GET",
|
|
1278
|
+
headers: {
|
|
1279
|
+
"Content-Type": "application/json",
|
|
1280
|
+
"Platform-Code": this.platform,
|
|
1281
|
+
Role: "MEMBER",
|
|
1282
|
+
Authorization: `Bearer ${e}`
|
|
1351
1283
|
}
|
|
1352
|
-
}
|
|
1284
|
+
})).ok;
|
|
1285
|
+
} catch {
|
|
1286
|
+
return !0;
|
|
1353
1287
|
}
|
|
1354
|
-
throw new Error("Invalid input 'type'");
|
|
1355
|
-
}
|
|
1356
|
-
async refreshSession(e) {
|
|
1357
|
-
const t = await this.client.post("/session:refresh", {
|
|
1358
|
-
headers: {
|
|
1359
|
-
Authorization: `Bearer ${e}`
|
|
1360
|
-
}
|
|
1361
|
-
});
|
|
1362
|
-
return t.ok ? t : t.error.code === "ACCOUNT_BLACKLISTED" ? {
|
|
1363
|
-
ok: !1,
|
|
1364
|
-
error: {
|
|
1365
|
-
code: "AccountBlacklisted",
|
|
1366
|
-
message: "Account is blacklisted"
|
|
1367
|
-
}
|
|
1368
|
-
} : t.error.code === "HttpForbidden" || t.error.code === "HttpUnauthorized" ? {
|
|
1369
|
-
ok: !1,
|
|
1370
|
-
error: {
|
|
1371
|
-
code: "InvalidToken",
|
|
1372
|
-
message: "Invalid token."
|
|
1373
|
-
}
|
|
1374
|
-
} : t;
|
|
1375
|
-
}
|
|
1376
|
-
async destroySession(e) {
|
|
1377
|
-
return await this.client.delete("/session", {
|
|
1378
|
-
headers: {
|
|
1379
|
-
Authorization: `Bearer ${e}`
|
|
1380
|
-
}
|
|
1381
|
-
});
|
|
1382
|
-
}
|
|
1383
|
-
async verifySession(e) {
|
|
1384
|
-
return (await this.client.get("/session", {
|
|
1385
|
-
headers: {
|
|
1386
|
-
Authorization: `Bearer ${e}`
|
|
1387
|
-
}
|
|
1388
|
-
})).ok;
|
|
1389
1288
|
}
|
|
1390
1289
|
}
|
|
1391
1290
|
class ht {
|
|
1392
1291
|
constructor(e) {
|
|
1393
|
-
|
|
1292
|
+
m(this, "client");
|
|
1394
1293
|
this.client = e;
|
|
1395
1294
|
}
|
|
1396
1295
|
async file(e) {
|
|
1397
|
-
const t = await this.client.request(
|
|
1296
|
+
const t = await this.client.request(he, e);
|
|
1398
1297
|
return t.ok ? {
|
|
1399
1298
|
ok: !0,
|
|
1400
1299
|
data: t.data.node
|
|
1401
1300
|
} : t;
|
|
1402
1301
|
}
|
|
1403
1302
|
async uploadPrivateImageFile(e) {
|
|
1404
|
-
const t = await this.client.upload(
|
|
1303
|
+
const t = await this.client.upload(he, e);
|
|
1405
1304
|
return t.ok ? t.data.uploadPrivateImageFile ? {
|
|
1406
1305
|
ok: !1,
|
|
1407
|
-
error: t.data.uploadPrivateImageFile
|
|
1306
|
+
error: d(t.data.uploadPrivateImageFile.__typename)
|
|
1408
1307
|
} : {
|
|
1409
1308
|
ok: !0
|
|
1410
1309
|
} : t;
|
|
1411
1310
|
}
|
|
1412
1311
|
}
|
|
1413
|
-
class
|
|
1312
|
+
class ye {
|
|
1414
1313
|
constructor(e) {
|
|
1415
|
-
|
|
1314
|
+
m(this, "client");
|
|
1416
1315
|
this.client = e;
|
|
1417
1316
|
}
|
|
1418
1317
|
async game(e) {
|
|
1419
|
-
const t = await this.client.request(
|
|
1318
|
+
const t = await this.client.request(Se, e);
|
|
1420
1319
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1421
1320
|
}
|
|
1422
1321
|
async games(e) {
|
|
1423
|
-
const t = await this.client.request(
|
|
1322
|
+
const t = await this.client.request(ke, e);
|
|
1424
1323
|
return t.ok ? { ok: !0, data: t.data.games } : t;
|
|
1425
1324
|
}
|
|
1426
1325
|
async gamesByName(e) {
|
|
1427
1326
|
const t = await this.client.request(
|
|
1428
|
-
|
|
1327
|
+
Ce,
|
|
1429
1328
|
e
|
|
1430
1329
|
);
|
|
1431
1330
|
return t.ok ? { ok: !0, data: t.data.gamesByName } : t;
|
|
1432
1331
|
}
|
|
1433
1332
|
async gameSession(e) {
|
|
1434
1333
|
const t = await this.client.request(
|
|
1435
|
-
|
|
1334
|
+
Te,
|
|
1436
1335
|
e
|
|
1437
1336
|
);
|
|
1438
1337
|
return t.ok ? { ok: !0, data: t.data.node } : t;
|
|
1439
1338
|
}
|
|
1440
1339
|
async createGameSession(e) {
|
|
1441
|
-
const t = await this.client.request(
|
|
1340
|
+
const t = await this.client.request(_e, e);
|
|
1442
1341
|
return t.ok ? t.data.createGameSession ? {
|
|
1443
1342
|
ok: !1,
|
|
1444
|
-
error: t.data.createGameSession
|
|
1343
|
+
error: d(t.data.createGameSession.__typename)
|
|
1445
1344
|
} : {
|
|
1446
1345
|
ok: !0
|
|
1447
1346
|
} : t;
|
|
1448
1347
|
}
|
|
1449
1348
|
async endGameSession(e) {
|
|
1450
1349
|
const t = await this.client.request(
|
|
1451
|
-
|
|
1350
|
+
ve,
|
|
1452
1351
|
e
|
|
1453
1352
|
);
|
|
1454
1353
|
return t.ok ? t.data.endGameSession ? {
|
|
@@ -1456,31 +1355,31 @@ class fe {
|
|
|
1456
1355
|
} : {
|
|
1457
1356
|
ok: !1,
|
|
1458
1357
|
error: {
|
|
1459
|
-
|
|
1358
|
+
name: "UnknownError",
|
|
1460
1359
|
message: "Something went wrong."
|
|
1461
1360
|
}
|
|
1462
1361
|
} : t;
|
|
1463
1362
|
}
|
|
1464
1363
|
}
|
|
1465
|
-
class
|
|
1364
|
+
class ft {
|
|
1466
1365
|
constructor(e) {
|
|
1467
|
-
|
|
1366
|
+
m(this, "client");
|
|
1468
1367
|
this.client = e;
|
|
1469
1368
|
}
|
|
1470
1369
|
async betRecords(e) {
|
|
1471
1370
|
const t = await this.client.request(
|
|
1472
|
-
|
|
1371
|
+
Me,
|
|
1473
1372
|
e
|
|
1474
1373
|
);
|
|
1475
1374
|
return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
|
|
1476
1375
|
}
|
|
1477
1376
|
async transactionRecords(e) {
|
|
1478
|
-
const t = await this.client.request(
|
|
1377
|
+
const t = await this.client.request(nt, e);
|
|
1479
1378
|
return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
|
|
1480
1379
|
}
|
|
1481
1380
|
async withdrawalRecords(e) {
|
|
1482
1381
|
const t = await this.client.request(
|
|
1483
|
-
|
|
1382
|
+
it,
|
|
1484
1383
|
e
|
|
1485
1384
|
);
|
|
1486
1385
|
return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
|
|
@@ -1493,17 +1392,17 @@ class wt {
|
|
|
1493
1392
|
return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
|
|
1494
1393
|
}
|
|
1495
1394
|
async depositsCount() {
|
|
1496
|
-
const e = await this.client.request(
|
|
1395
|
+
const e = await this.client.request(qe);
|
|
1497
1396
|
return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
|
|
1498
1397
|
}
|
|
1499
1398
|
async member() {
|
|
1500
|
-
const e = await this.client.request(
|
|
1399
|
+
const e = await this.client.request(Fe);
|
|
1501
1400
|
return e.ok ? { ok: e.ok, data: e.data.member } : e;
|
|
1502
1401
|
}
|
|
1503
1402
|
}
|
|
1504
|
-
class
|
|
1403
|
+
class wt {
|
|
1505
1404
|
constructor(e) {
|
|
1506
|
-
|
|
1405
|
+
m(this, "url");
|
|
1507
1406
|
this.url = e.url;
|
|
1508
1407
|
}
|
|
1509
1408
|
gameThumbnails(e) {
|
|
@@ -1513,13 +1412,13 @@ class ft {
|
|
|
1513
1412
|
];
|
|
1514
1413
|
}
|
|
1515
1414
|
}
|
|
1516
|
-
class
|
|
1415
|
+
class yt extends ye {
|
|
1517
1416
|
async promos() {
|
|
1518
|
-
const e = await this.client.request(
|
|
1417
|
+
const e = await this.client.request(Ie);
|
|
1519
1418
|
return e.ok ? { ok: e.ok, data: e.data.promos } : e;
|
|
1520
1419
|
}
|
|
1521
1420
|
async cashbacks() {
|
|
1522
|
-
const e = await this.client.request(
|
|
1421
|
+
const e = await this.client.request(Ne);
|
|
1523
1422
|
return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
|
|
1524
1423
|
}
|
|
1525
1424
|
async availablePromos(e) {
|
|
@@ -1530,14 +1429,14 @@ class gt extends fe {
|
|
|
1530
1429
|
return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
|
|
1531
1430
|
}
|
|
1532
1431
|
async cashbackBonuses() {
|
|
1533
|
-
const e = await this.client.request(
|
|
1432
|
+
const e = await this.client.request(Pe);
|
|
1534
1433
|
return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
|
|
1535
1434
|
}
|
|
1536
1435
|
async claimCashbackBonus(e) {
|
|
1537
|
-
const t = await this.client.request(
|
|
1436
|
+
const t = await this.client.request(Ge, e);
|
|
1538
1437
|
return t.ok ? t.data.claimCashbackBonus ? {
|
|
1539
1438
|
ok: !1,
|
|
1540
|
-
error: t.data.claimCashbackBonus
|
|
1439
|
+
error: d(t.data.claimCashbackBonus.__typename)
|
|
1541
1440
|
} : {
|
|
1542
1441
|
ok: !0
|
|
1543
1442
|
} : {
|
|
@@ -1546,61 +1445,61 @@ class gt extends fe {
|
|
|
1546
1445
|
};
|
|
1547
1446
|
}
|
|
1548
1447
|
async bonus() {
|
|
1549
|
-
const e = await this.client.request(
|
|
1448
|
+
const e = await this.client.request(xe);
|
|
1550
1449
|
return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
|
|
1551
1450
|
}
|
|
1552
1451
|
async wallet() {
|
|
1553
|
-
const e = await this.client.request(
|
|
1452
|
+
const e = await this.client.request(ot);
|
|
1554
1453
|
return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
|
|
1555
1454
|
}
|
|
1556
1455
|
async deposit(e) {
|
|
1557
1456
|
const t = await this.client.request(
|
|
1558
|
-
|
|
1457
|
+
Oe,
|
|
1559
1458
|
e
|
|
1560
1459
|
);
|
|
1561
1460
|
return t.ok ? { ok: t.ok, data: t.data.node } : t;
|
|
1562
1461
|
}
|
|
1563
1462
|
async createGCashDeposit(e) {
|
|
1564
|
-
const t = await this.client.request(
|
|
1463
|
+
const t = await this.client.request(Be, e);
|
|
1565
1464
|
return t.ok ? t.data.createGCashDeposit ? {
|
|
1566
1465
|
ok: !1,
|
|
1567
|
-
error: t.data.createGCashDeposit
|
|
1466
|
+
error: d(t.data.createGCashDeposit.__typename)
|
|
1568
1467
|
} : {
|
|
1569
1468
|
ok: !0
|
|
1570
1469
|
} : t;
|
|
1571
1470
|
}
|
|
1572
1471
|
async createMayaDeposit(e) {
|
|
1573
|
-
const t = await this.client.request(
|
|
1472
|
+
const t = await this.client.request(We, e);
|
|
1574
1473
|
return t.ok ? t.data.createMayaDeposit ? {
|
|
1575
1474
|
ok: !1,
|
|
1576
|
-
error: t.data.createMayaDeposit
|
|
1475
|
+
error: d(t.data.createMayaDeposit.__typename)
|
|
1577
1476
|
} : {
|
|
1578
1477
|
ok: !0
|
|
1579
1478
|
} : t;
|
|
1580
1479
|
}
|
|
1581
1480
|
async createMayaAppDeposit(e) {
|
|
1582
|
-
const t = await this.client.request(
|
|
1481
|
+
const t = await this.client.request(Ue, e);
|
|
1583
1482
|
return t.ok ? t.data.createMayaAppDeposit ? {
|
|
1584
1483
|
ok: !1,
|
|
1585
|
-
error: t.data.createMayaAppDeposit
|
|
1484
|
+
error: d(t.data.createMayaAppDeposit.__typename)
|
|
1586
1485
|
} : {
|
|
1587
1486
|
ok: !0
|
|
1588
1487
|
} : t;
|
|
1589
1488
|
}
|
|
1590
1489
|
async createGCashWithdrawal(e) {
|
|
1591
|
-
const t = await this.client.request(
|
|
1490
|
+
const t = await this.client.request(st, e);
|
|
1592
1491
|
return t.ok ? t.data.createGCashWithdrawal ? {
|
|
1593
1492
|
ok: !1,
|
|
1594
|
-
error: t.data.createGCashWithdrawal
|
|
1493
|
+
error: d(t.data.createGCashWithdrawal.__typename)
|
|
1595
1494
|
} : {
|
|
1596
1495
|
ok: !0
|
|
1597
1496
|
} : t;
|
|
1598
1497
|
}
|
|
1599
1498
|
async createMayaWithdrawal(e) {
|
|
1600
|
-
const t = await this.client.request(
|
|
1499
|
+
const t = await this.client.request(mt, e);
|
|
1601
1500
|
return t.ok ? t.data.createMayaWithdrawal ? {
|
|
1602
1501
|
ok: !1,
|
|
1603
|
-
error: t.data.createMayaWithdrawal
|
|
1502
|
+
error: d(t.data.createMayaWithdrawal.__typename)
|
|
1604
1503
|
} : {
|
|
1605
1504
|
ok: !0
|
|
1606
1505
|
} : t;
|
|
@@ -1609,7 +1508,7 @@ class gt extends fe {
|
|
|
1609
1508
|
const t = await this.client.request(dt, e);
|
|
1610
1509
|
return t.ok ? t.data.createMayaAppWithdrawal ? {
|
|
1611
1510
|
ok: !1,
|
|
1612
|
-
error: t.data.createMayaAppWithdrawal
|
|
1511
|
+
error: d(t.data.createMayaAppWithdrawal.__typename)
|
|
1613
1512
|
} : {
|
|
1614
1513
|
ok: !0
|
|
1615
1514
|
} : t;
|
|
@@ -1618,41 +1517,41 @@ class gt extends fe {
|
|
|
1618
1517
|
const t = await this.client.request(ct, e);
|
|
1619
1518
|
return t.ok ? t.data.createBankWithdrawal ? {
|
|
1620
1519
|
ok: !1,
|
|
1621
|
-
error: t.data.createBankWithdrawal
|
|
1520
|
+
error: d(t.data.createBankWithdrawal.__typename)
|
|
1622
1521
|
} : {
|
|
1623
1522
|
ok: !0
|
|
1624
1523
|
} : t;
|
|
1625
1524
|
}
|
|
1626
1525
|
async remainingDailyWithdrawalsCount() {
|
|
1627
1526
|
const e = await this.client.request(
|
|
1628
|
-
|
|
1527
|
+
ut
|
|
1629
1528
|
);
|
|
1630
1529
|
return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
|
|
1631
1530
|
}
|
|
1632
1531
|
async pointsWallet() {
|
|
1633
|
-
const e = await this.client.request(
|
|
1532
|
+
const e = await this.client.request(tt);
|
|
1634
1533
|
return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
|
|
1635
1534
|
}
|
|
1636
1535
|
async pointsToCashConversion(e) {
|
|
1637
|
-
const t = await this.client.request(
|
|
1536
|
+
const t = await this.client.request(at, e);
|
|
1638
1537
|
return t.ok ? t.data.pointsToCashConversion ? {
|
|
1639
1538
|
ok: !1,
|
|
1640
|
-
error: t.data.pointsToCashConversion
|
|
1539
|
+
error: d(t.data.pointsToCashConversion.__typename)
|
|
1641
1540
|
} : {
|
|
1642
1541
|
ok: !0
|
|
1643
1542
|
} : t;
|
|
1644
1543
|
}
|
|
1645
1544
|
async mayaSession(e) {
|
|
1646
1545
|
const t = await this.client.request(
|
|
1647
|
-
|
|
1546
|
+
rt,
|
|
1648
1547
|
e
|
|
1649
1548
|
);
|
|
1650
1549
|
return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
|
|
1651
1550
|
}
|
|
1652
1551
|
}
|
|
1653
|
-
class
|
|
1552
|
+
class bt {
|
|
1654
1553
|
constructor(e) {
|
|
1655
|
-
|
|
1554
|
+
m(this, "client");
|
|
1656
1555
|
this.client = e;
|
|
1657
1556
|
}
|
|
1658
1557
|
async latestBetRecords() {
|
|
@@ -1663,11 +1562,11 @@ class yt {
|
|
|
1663
1562
|
} : e;
|
|
1664
1563
|
}
|
|
1665
1564
|
}
|
|
1666
|
-
class
|
|
1565
|
+
class b {
|
|
1667
1566
|
constructor(e, t) {
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1567
|
+
m(this, "url");
|
|
1568
|
+
m(this, "options");
|
|
1569
|
+
m(this, "middlewares");
|
|
1671
1570
|
var r;
|
|
1672
1571
|
const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
|
|
1673
1572
|
this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
|
|
@@ -1675,7 +1574,7 @@ class g {
|
|
|
1675
1574
|
async request(e, t) {
|
|
1676
1575
|
const a = JSON.stringify({ query: e, variables: t }), r = new Headers(this.options.headers);
|
|
1677
1576
|
r.set("Content-Type", "application/json"), r.set("Accept", "application/json");
|
|
1678
|
-
const
|
|
1577
|
+
const s = await this.runMiddlewares(
|
|
1679
1578
|
new Request(this.url, {
|
|
1680
1579
|
...this.options,
|
|
1681
1580
|
body: a,
|
|
@@ -1683,13 +1582,13 @@ class g {
|
|
|
1683
1582
|
method: "POST"
|
|
1684
1583
|
})
|
|
1685
1584
|
);
|
|
1686
|
-
return await this.exec(
|
|
1585
|
+
return await this.exec(s);
|
|
1687
1586
|
}
|
|
1688
1587
|
/** Single file upload */
|
|
1689
1588
|
async upload(e, t) {
|
|
1690
1589
|
const a = this.createUploadBody(e, t), r = new Headers(this.options.headers);
|
|
1691
1590
|
r.set("Accept", "application/json"), r.delete("Content-Type");
|
|
1692
|
-
const
|
|
1591
|
+
const s = await this.runMiddlewares(
|
|
1693
1592
|
new Request(this.url, {
|
|
1694
1593
|
...this.options,
|
|
1695
1594
|
body: a,
|
|
@@ -1697,32 +1596,26 @@ class g {
|
|
|
1697
1596
|
method: "POST"
|
|
1698
1597
|
})
|
|
1699
1598
|
);
|
|
1700
|
-
return await this.exec(
|
|
1599
|
+
return await this.exec(s);
|
|
1701
1600
|
}
|
|
1702
1601
|
async exec(e) {
|
|
1703
|
-
var t, a, r,
|
|
1602
|
+
var t, a, r, s, c, h;
|
|
1704
1603
|
try {
|
|
1705
|
-
const
|
|
1706
|
-
if (!
|
|
1707
|
-
return { ok: !1, error:
|
|
1708
|
-
const
|
|
1709
|
-
return
|
|
1604
|
+
const p = await fetch(e);
|
|
1605
|
+
if (!p.ok)
|
|
1606
|
+
return { ok: !1, error: u(p.status) };
|
|
1607
|
+
const E = await p.json(), C = E.data, l = (t = E.errors) == null ? void 0 : t.at(0);
|
|
1608
|
+
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: u(403, l.message) } : ((s = l.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: u(401, l.message) } : ((c = l.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((h = l.extensions) == null ? void 0 : h.code) === "BAD_REQUEST" ? { ok: !1, error: u(400, l.message) } : {
|
|
1710
1609
|
ok: !1,
|
|
1711
|
-
error:
|
|
1712
|
-
code: "HttpForbidden",
|
|
1713
|
-
message: u.message ?? "Access token expired."
|
|
1714
|
-
}
|
|
1715
|
-
} : {
|
|
1716
|
-
ok: !1,
|
|
1717
|
-
error: h(500, u.message)
|
|
1610
|
+
error: u(500, l.message)
|
|
1718
1611
|
} : {
|
|
1719
1612
|
ok: !0,
|
|
1720
|
-
data:
|
|
1613
|
+
data: C
|
|
1721
1614
|
};
|
|
1722
1615
|
} catch {
|
|
1723
1616
|
return {
|
|
1724
1617
|
ok: !1,
|
|
1725
|
-
error:
|
|
1618
|
+
error: u(500)
|
|
1726
1619
|
};
|
|
1727
1620
|
}
|
|
1728
1621
|
}
|
|
@@ -1733,40 +1626,40 @@ class g {
|
|
|
1733
1626
|
return t;
|
|
1734
1627
|
}
|
|
1735
1628
|
createUploadBody(e, t) {
|
|
1736
|
-
const { files: a, others: r } = this.extractFiles(t),
|
|
1737
|
-
|
|
1629
|
+
const { files: a, others: r } = this.extractFiles(t), s = new FormData();
|
|
1630
|
+
s.append(
|
|
1738
1631
|
"operations",
|
|
1739
1632
|
JSON.stringify({
|
|
1740
1633
|
query: e,
|
|
1741
1634
|
variables: t
|
|
1742
1635
|
})
|
|
1743
|
-
), Object.entries(r).forEach(([
|
|
1744
|
-
|
|
1636
|
+
), Object.entries(r).forEach(([h, p]) => {
|
|
1637
|
+
s.append(h, JSON.stringify(p));
|
|
1745
1638
|
});
|
|
1746
|
-
const
|
|
1747
|
-
return Object.keys(a).forEach((
|
|
1748
|
-
|
|
1749
|
-
}),
|
|
1750
|
-
|
|
1751
|
-
}),
|
|
1639
|
+
const c = {};
|
|
1640
|
+
return Object.keys(a).forEach((h, p) => {
|
|
1641
|
+
c[p.toString()] = `variables.${h}`;
|
|
1642
|
+
}), s.append("map", JSON.stringify(c)), Object.values(a).forEach((h, p) => {
|
|
1643
|
+
s.append(p.toString(), h);
|
|
1644
|
+
}), s;
|
|
1752
1645
|
}
|
|
1753
1646
|
extractFiles(e) {
|
|
1754
1647
|
const t = {}, a = {};
|
|
1755
|
-
return Object.entries(e).forEach(([r,
|
|
1756
|
-
|
|
1648
|
+
return Object.entries(e).forEach(([r, s]) => {
|
|
1649
|
+
s instanceof File || s instanceof Blob ? t[r] = s : a[r] = s;
|
|
1757
1650
|
}), {
|
|
1758
1651
|
files: t,
|
|
1759
1652
|
others: a
|
|
1760
1653
|
};
|
|
1761
1654
|
}
|
|
1762
1655
|
}
|
|
1763
|
-
async function
|
|
1656
|
+
async function f(i) {
|
|
1764
1657
|
const e = new TextEncoder().encode(i), t = await crypto.subtle.digest("SHA-256", e);
|
|
1765
|
-
return Array.from(new Uint8Array(t)).map((
|
|
1658
|
+
return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
1766
1659
|
}
|
|
1767
|
-
class
|
|
1660
|
+
class be {
|
|
1768
1661
|
constructor(e) {
|
|
1769
|
-
|
|
1662
|
+
m(this, "enabled");
|
|
1770
1663
|
this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
|
|
1771
1664
|
}
|
|
1772
1665
|
info(e) {
|
|
@@ -1782,36 +1675,36 @@ class ge {
|
|
|
1782
1675
|
this.enabled && console.log(`\x1B[32m[success] ${e}`);
|
|
1783
1676
|
}
|
|
1784
1677
|
}
|
|
1785
|
-
function
|
|
1678
|
+
function M(i) {
|
|
1786
1679
|
return new Date(i.getTime());
|
|
1787
1680
|
}
|
|
1788
|
-
function
|
|
1789
|
-
const t =
|
|
1681
|
+
function A(i, e) {
|
|
1682
|
+
const t = M(i);
|
|
1790
1683
|
return t.setDate(t.getDate() + e), t;
|
|
1791
1684
|
}
|
|
1792
|
-
function
|
|
1793
|
-
const t =
|
|
1685
|
+
function S(i, e) {
|
|
1686
|
+
const t = M(i);
|
|
1794
1687
|
return t.setMinutes(t.getMinutes() + e), t;
|
|
1795
1688
|
}
|
|
1796
|
-
function
|
|
1689
|
+
function fe(i, e) {
|
|
1797
1690
|
return i.getTime() > e.getTime();
|
|
1798
1691
|
}
|
|
1799
|
-
function
|
|
1692
|
+
function gt(i) {
|
|
1800
1693
|
return new Promise((e) => {
|
|
1801
1694
|
setTimeout(e, i);
|
|
1802
1695
|
});
|
|
1803
1696
|
}
|
|
1804
|
-
function
|
|
1805
|
-
const t =
|
|
1697
|
+
function k(i, e) {
|
|
1698
|
+
const t = M(i);
|
|
1806
1699
|
return t.setMinutes(t.getMinutes() - e), t;
|
|
1807
1700
|
}
|
|
1808
|
-
class
|
|
1701
|
+
class Et {
|
|
1809
1702
|
constructor(e) {
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
this.authService = new pt(e), this.logger = new
|
|
1703
|
+
m(this, "logger");
|
|
1704
|
+
m(this, "storageKey", "session");
|
|
1705
|
+
m(this, "authService");
|
|
1706
|
+
m(this, "_refreshing", !1);
|
|
1707
|
+
this.authService = new pt(e), this.logger = new be({
|
|
1815
1708
|
enabled: e.log ?? !1
|
|
1816
1709
|
});
|
|
1817
1710
|
}
|
|
@@ -1826,21 +1719,21 @@ class St {
|
|
|
1826
1719
|
return this.logger.warn("'localStorage' is not available on the server."), {
|
|
1827
1720
|
ok: !1,
|
|
1828
1721
|
error: {
|
|
1829
|
-
|
|
1722
|
+
name: "UnknownError",
|
|
1830
1723
|
message: "Server sign in is not supported."
|
|
1831
1724
|
}
|
|
1832
1725
|
};
|
|
1833
1726
|
if (e.type === "MAYA") {
|
|
1834
1727
|
const r = await this.authService.createSession(e);
|
|
1835
1728
|
if (r.ok) {
|
|
1836
|
-
const
|
|
1729
|
+
const s = /* @__PURE__ */ new Date();
|
|
1837
1730
|
return window.localStorage.setItem(
|
|
1838
1731
|
this.storageKey,
|
|
1839
1732
|
JSON.stringify({
|
|
1840
1733
|
...r.data,
|
|
1841
1734
|
maya: !0,
|
|
1842
|
-
accessTokenExpiresAt:
|
|
1843
|
-
refreshTokenExpiresAt:
|
|
1735
|
+
accessTokenExpiresAt: S(s, 8).getTime(),
|
|
1736
|
+
refreshTokenExpiresAt: k(A(s, 30), 2).getTime()
|
|
1844
1737
|
})
|
|
1845
1738
|
), {
|
|
1846
1739
|
ok: !0,
|
|
@@ -1852,13 +1745,13 @@ class St {
|
|
|
1852
1745
|
if (e.type === "MOBILE_NUMBER") {
|
|
1853
1746
|
const r = await this.authService.createSession(e);
|
|
1854
1747
|
if (r.ok) {
|
|
1855
|
-
const
|
|
1748
|
+
const s = /* @__PURE__ */ new Date();
|
|
1856
1749
|
return window.localStorage.setItem(
|
|
1857
1750
|
this.storageKey,
|
|
1858
1751
|
JSON.stringify({
|
|
1859
1752
|
...r.data,
|
|
1860
|
-
accessTokenExpiresAt:
|
|
1861
|
-
refreshTokenExpiresAt:
|
|
1753
|
+
accessTokenExpiresAt: S(s, 8).getTime(),
|
|
1754
|
+
refreshTokenExpiresAt: k(A(s, 30), 2).getTime()
|
|
1862
1755
|
})
|
|
1863
1756
|
), {
|
|
1864
1757
|
ok: !0,
|
|
@@ -1881,8 +1774,8 @@ class St {
|
|
|
1881
1774
|
this.storageKey,
|
|
1882
1775
|
JSON.stringify({
|
|
1883
1776
|
...t.data,
|
|
1884
|
-
accessTokenExpiresAt:
|
|
1885
|
-
refreshTokenExpiresAt:
|
|
1777
|
+
accessTokenExpiresAt: S(a, 8).getTime(),
|
|
1778
|
+
refreshTokenExpiresAt: k(A(a, 30), 2).getTime()
|
|
1886
1779
|
})
|
|
1887
1780
|
), {
|
|
1888
1781
|
ok: !0,
|
|
@@ -1897,8 +1790,8 @@ class St {
|
|
|
1897
1790
|
this.storageKey,
|
|
1898
1791
|
JSON.stringify({
|
|
1899
1792
|
...t.data,
|
|
1900
|
-
accessTokenExpiresAt:
|
|
1901
|
-
refreshTokenExpiresAt:
|
|
1793
|
+
accessTokenExpiresAt: S(a, 8).getTime(),
|
|
1794
|
+
refreshTokenExpiresAt: k(A(a, 30), 2).getTime()
|
|
1902
1795
|
})
|
|
1903
1796
|
), { ok: !0 };
|
|
1904
1797
|
} else
|
|
@@ -1911,7 +1804,7 @@ class St {
|
|
|
1911
1804
|
data: null
|
|
1912
1805
|
};
|
|
1913
1806
|
if (this.refreshing)
|
|
1914
|
-
return await
|
|
1807
|
+
return await gt(1e3), await this.get();
|
|
1915
1808
|
const e = window.localStorage.getItem(this.storageKey);
|
|
1916
1809
|
if (!e)
|
|
1917
1810
|
return {
|
|
@@ -1920,31 +1813,31 @@ class St {
|
|
|
1920
1813
|
};
|
|
1921
1814
|
try {
|
|
1922
1815
|
let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
|
|
1923
|
-
const r = new Date(t.accessTokenExpiresAt),
|
|
1924
|
-
if (
|
|
1816
|
+
const r = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
|
|
1817
|
+
if (fe(a, s))
|
|
1925
1818
|
return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
|
|
1926
1819
|
ok: !1,
|
|
1927
1820
|
error: {
|
|
1928
|
-
|
|
1821
|
+
name: "SessionExpired",
|
|
1929
1822
|
message: "Session expired."
|
|
1930
1823
|
}
|
|
1931
1824
|
};
|
|
1932
|
-
if (
|
|
1825
|
+
if (fe(a, r)) {
|
|
1933
1826
|
this.logger.info("Refreshing session..."), this.refreshing = !0;
|
|
1934
|
-
const
|
|
1935
|
-
if (this.refreshing = !1, !
|
|
1936
|
-
return this.logger.error(`Failed to refresh session: ${
|
|
1827
|
+
const c = await this.authService.refreshSession(t.refreshToken);
|
|
1828
|
+
if (this.refreshing = !1, !c.ok)
|
|
1829
|
+
return this.logger.error(`Failed to refresh session: ${c.error.message}`), c.error.name === "InvalidToken" || c.error.name === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
|
|
1937
1830
|
ok: !1,
|
|
1938
|
-
error:
|
|
1831
|
+
error: c.error
|
|
1939
1832
|
}) : (this.logger.warn("Old session returned."), {
|
|
1940
1833
|
ok: !0,
|
|
1941
1834
|
data: t
|
|
1942
1835
|
});
|
|
1943
1836
|
this.logger.success("Session refreshed!"), a = /* @__PURE__ */ new Date(), t = {
|
|
1944
1837
|
...t,
|
|
1945
|
-
...
|
|
1946
|
-
accessTokenExpiresAt:
|
|
1947
|
-
refreshTokenExpiresAt:
|
|
1838
|
+
...c.data,
|
|
1839
|
+
accessTokenExpiresAt: S(a, 8).getTime(),
|
|
1840
|
+
refreshTokenExpiresAt: k(A(a, 30), 2).getTime()
|
|
1948
1841
|
}, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
1949
1842
|
}
|
|
1950
1843
|
return {
|
|
@@ -1955,7 +1848,7 @@ class St {
|
|
|
1955
1848
|
return {
|
|
1956
1849
|
ok: !1,
|
|
1957
1850
|
error: {
|
|
1958
|
-
|
|
1851
|
+
name: "UnknownError",
|
|
1959
1852
|
message: "Something went wrong."
|
|
1960
1853
|
}
|
|
1961
1854
|
};
|
|
@@ -1971,11 +1864,11 @@ class St {
|
|
|
1971
1864
|
(t = e.data) != null && t.accessToken && await this.authService.destroySession(e.data.accessToken), window.localStorage.removeItem(this.storageKey);
|
|
1972
1865
|
}
|
|
1973
1866
|
async verify() {
|
|
1974
|
-
var a, r,
|
|
1867
|
+
var a, r, s;
|
|
1975
1868
|
if (this.isServer)
|
|
1976
1869
|
return this.logger.warn("'localStorage' is not available on the server."), !0;
|
|
1977
1870
|
const e = await this.get();
|
|
1978
|
-
if (((a = e.error) == null ? void 0 : a.
|
|
1871
|
+
if (((a = e.error) == null ? void 0 : a.name) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.name) === "SessionExpired" || ((s = e.error) == null ? void 0 : s.name) === "AccountBlacklisted") return !1;
|
|
1979
1872
|
if (!e.data) return !0;
|
|
1980
1873
|
const t = await this.authService.verifySession(e.data.accessToken);
|
|
1981
1874
|
return t || window.localStorage.removeItem(this.storageKey), t;
|
|
@@ -1984,7 +1877,7 @@ class St {
|
|
|
1984
1877
|
return typeof window > "u";
|
|
1985
1878
|
}
|
|
1986
1879
|
}
|
|
1987
|
-
function
|
|
1880
|
+
function n(i, e) {
|
|
1988
1881
|
if (typeof i == "number" && !Number.isNaN(i))
|
|
1989
1882
|
return i;
|
|
1990
1883
|
if (typeof i == "string") {
|
|
@@ -1996,9 +1889,9 @@ function s(i, e) {
|
|
|
1996
1889
|
}
|
|
1997
1890
|
class At {
|
|
1998
1891
|
constructor(e) {
|
|
1999
|
-
|
|
1892
|
+
m(this, "staticService");
|
|
2000
1893
|
const t = (e == null ? void 0 : e.environment) === "development";
|
|
2001
|
-
this.staticService = new
|
|
1894
|
+
this.staticService = new wt({
|
|
2002
1895
|
url: t ? "https://static.development.opexa.io/graphql" : "https://static.opexa.io/graphql"
|
|
2003
1896
|
});
|
|
2004
1897
|
}
|
|
@@ -2027,88 +1920,88 @@ class At {
|
|
|
2027
1920
|
};
|
|
2028
1921
|
}
|
|
2029
1922
|
platform(e) {
|
|
2030
|
-
var t, a, r,
|
|
1923
|
+
var t, a, r, s, c, h, p, E, C, l, D, N, I, R, x, P, G, $, B, W, U, O, q, F, L, V, Y, H, j, Q, K, z, J, X, Z, ee, te, ae, re, ne, oe, ie, se, me, de, ce, ue, le, pe;
|
|
2031
1924
|
return {
|
|
2032
1925
|
paymentSettings: {
|
|
2033
|
-
minimumFirstDepositAmount:
|
|
1926
|
+
minimumFirstDepositAmount: n(e.minimumFirstDepositAmount),
|
|
2034
1927
|
restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
|
|
2035
1928
|
depositGateway: {
|
|
2036
1929
|
bank: {
|
|
2037
1930
|
androidEnabled: ((t = e.bankDepositGatewaySettings) == null ? void 0 : t.androidEnabled) ?? !1,
|
|
2038
1931
|
iosEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.iosEnabled) ?? !1,
|
|
2039
1932
|
webEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.webEnabled) ?? !1,
|
|
2040
|
-
mobileWebEnabled: ((
|
|
2041
|
-
minimumAmount:
|
|
2042
|
-
maximumAmount:
|
|
1933
|
+
mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
|
|
1934
|
+
minimumAmount: n((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
|
|
1935
|
+
maximumAmount: n((h = e.bankDepositGatewaySettings) == null ? void 0 : h.maximumAmount)
|
|
2043
1936
|
},
|
|
2044
1937
|
gcash: {
|
|
2045
|
-
androidEnabled: ((
|
|
2046
|
-
iosEnabled: ((
|
|
2047
|
-
webEnabled: ((
|
|
2048
|
-
mobileWebEnabled: ((
|
|
2049
|
-
minimumAmount:
|
|
2050
|
-
maximumAmount:
|
|
1938
|
+
androidEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.androidEnabled) ?? !1,
|
|
1939
|
+
iosEnabled: ((E = e.gcashDepositGatewaySettings) == null ? void 0 : E.iosEnabled) ?? !1,
|
|
1940
|
+
webEnabled: ((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.webEnabled) ?? !1,
|
|
1941
|
+
mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
|
|
1942
|
+
minimumAmount: n((D = e.gcashDepositGatewaySettings) == null ? void 0 : D.minimumAmount),
|
|
1943
|
+
maximumAmount: n((N = e.gcashDepositGatewaySettings) == null ? void 0 : N.maximumAmount)
|
|
2051
1944
|
},
|
|
2052
1945
|
maya: {
|
|
2053
|
-
androidEnabled: ((
|
|
1946
|
+
androidEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.androidEnabled) ?? !1,
|
|
2054
1947
|
iosEnabled: ((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
|
|
2055
|
-
webEnabled: ((
|
|
2056
|
-
mobileWebEnabled: ((
|
|
2057
|
-
minimumAmount:
|
|
2058
|
-
maximumAmount:
|
|
1948
|
+
webEnabled: ((x = e.mayaDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
|
|
1949
|
+
mobileWebEnabled: ((P = e.mayaDepositGatewaySettings) == null ? void 0 : P.mobileWebEnabled) ?? !1,
|
|
1950
|
+
minimumAmount: n((G = e.mayaDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
|
|
1951
|
+
maximumAmount: n(($ = e.mayaDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
|
|
2059
1952
|
},
|
|
2060
1953
|
mayaApp: {
|
|
2061
|
-
androidEnabled: ((
|
|
2062
|
-
iosEnabled: ((
|
|
2063
|
-
webEnabled: ((
|
|
2064
|
-
mobileWebEnabled: ((
|
|
2065
|
-
minimumAmount:
|
|
2066
|
-
maximumAmount:
|
|
1954
|
+
androidEnabled: ((B = e.mayaAppDepositGatewaySettings) == null ? void 0 : B.androidEnabled) ?? !1,
|
|
1955
|
+
iosEnabled: ((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
|
|
1956
|
+
webEnabled: ((U = e.mayaAppDepositGatewaySettings) == null ? void 0 : U.webEnabled) ?? !1,
|
|
1957
|
+
mobileWebEnabled: ((O = e.mayaAppDepositGatewaySettings) == null ? void 0 : O.mobileWebEnabled) ?? !1,
|
|
1958
|
+
minimumAmount: n((q = e.mayaAppDepositGatewaySettings) == null ? void 0 : q.minimumAmount),
|
|
1959
|
+
maximumAmount: n((F = e.mayaAppDepositGatewaySettings) == null ? void 0 : F.maximumAmount)
|
|
2067
1960
|
}
|
|
2068
1961
|
},
|
|
2069
1962
|
withdrawalGateway: {
|
|
2070
1963
|
bank: {
|
|
2071
|
-
androidEnabled: ((
|
|
2072
|
-
iosEnabled: ((
|
|
2073
|
-
webEnabled: ((
|
|
1964
|
+
androidEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.androidEnabled) ?? !1,
|
|
1965
|
+
iosEnabled: ((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.iosEnabled) ?? !1,
|
|
1966
|
+
webEnabled: ((Y = e.bankWithdrawalGatewaySettings) == null ? void 0 : Y.webEnabled) ?? !1,
|
|
2074
1967
|
mobileWebEnabled: ((H = e.bankWithdrawalGatewaySettings) == null ? void 0 : H.mobileWebEnabled) ?? !1,
|
|
2075
|
-
minimumAmount:
|
|
2076
|
-
maximumAmount:
|
|
1968
|
+
minimumAmount: n((j = e.bankWithdrawalGatewaySettings) == null ? void 0 : j.minimumAmount),
|
|
1969
|
+
maximumAmount: n((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.maximumAmount)
|
|
2077
1970
|
},
|
|
2078
1971
|
gcash: {
|
|
2079
|
-
androidEnabled: ((
|
|
2080
|
-
iosEnabled: ((
|
|
2081
|
-
webEnabled: ((
|
|
2082
|
-
mobileWebEnabled: ((
|
|
2083
|
-
minimumAmount:
|
|
2084
|
-
maximumAmount:
|
|
2085
|
-
(
|
|
1972
|
+
androidEnabled: ((K = e.gcashWithdrawalGatewaySettings) == null ? void 0 : K.androidEnabled) ?? !1,
|
|
1973
|
+
iosEnabled: ((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.iosEnabled) ?? !1,
|
|
1974
|
+
webEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.webEnabled) ?? !1,
|
|
1975
|
+
mobileWebEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.mobileWebEnabled) ?? !1,
|
|
1976
|
+
minimumAmount: n((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.minimumAmount),
|
|
1977
|
+
maximumAmount: n(
|
|
1978
|
+
(ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.maximumAmount,
|
|
2086
1979
|
1e6
|
|
2087
1980
|
)
|
|
2088
1981
|
},
|
|
2089
1982
|
maya: {
|
|
2090
|
-
androidEnabled: ((
|
|
2091
|
-
iosEnabled: ((
|
|
2092
|
-
webEnabled: ((
|
|
2093
|
-
mobileWebEnabled: ((
|
|
2094
|
-
minimumAmount:
|
|
2095
|
-
maximumAmount:
|
|
1983
|
+
androidEnabled: ((te = e.mayaWithdrawalGatewaySettings) == null ? void 0 : te.androidEnabled) ?? !1,
|
|
1984
|
+
iosEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.iosEnabled) ?? !1,
|
|
1985
|
+
webEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.webEnabled) ?? !1,
|
|
1986
|
+
mobileWebEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.mobileWebEnabled) ?? !1,
|
|
1987
|
+
minimumAmount: n((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.minimumAmount),
|
|
1988
|
+
maximumAmount: n((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.maximumAmount)
|
|
2096
1989
|
},
|
|
2097
1990
|
mayaApp: {
|
|
2098
|
-
androidEnabled: ((
|
|
2099
|
-
iosEnabled: ((
|
|
1991
|
+
androidEnabled: ((se = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : se.androidEnabled) ?? !1,
|
|
1992
|
+
iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
|
|
2100
1993
|
webEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.webEnabled) ?? !1,
|
|
2101
1994
|
mobileWebEnabled: ((ce = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ce.mobileWebEnabled) ?? !1,
|
|
2102
|
-
minimumAmount:
|
|
2103
|
-
maximumAmount:
|
|
2104
|
-
(
|
|
1995
|
+
minimumAmount: n((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.minimumAmount),
|
|
1996
|
+
maximumAmount: n(
|
|
1997
|
+
(le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.maximumAmount,
|
|
2105
1998
|
1e6
|
|
2106
1999
|
)
|
|
2107
2000
|
}
|
|
2108
2001
|
}
|
|
2109
2002
|
},
|
|
2110
2003
|
pointsClubSettings: {
|
|
2111
|
-
multiplier:
|
|
2004
|
+
multiplier: n((pe = e.pointsClubSettings) == null ? void 0 : pe.multiplier, 0)
|
|
2112
2005
|
}
|
|
2113
2006
|
};
|
|
2114
2007
|
}
|
|
@@ -2128,6 +2021,7 @@ class At {
|
|
|
2128
2021
|
validId: e.validId ?? void 0,
|
|
2129
2022
|
verificationStatus: e.verificationStatus,
|
|
2130
2023
|
transactionPassword: e.transactionPassword,
|
|
2024
|
+
secretAnswerSubmitted: e.secretAnswerSubmitted ?? !1,
|
|
2131
2025
|
dateTimeLastActive: e.dateTimeLastActive ? new Date(e.dateTimeLastActive) : void 0,
|
|
2132
2026
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2133
2027
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
@@ -2136,7 +2030,7 @@ class At {
|
|
|
2136
2030
|
wallet(e) {
|
|
2137
2031
|
return {
|
|
2138
2032
|
...e,
|
|
2139
|
-
balance:
|
|
2033
|
+
balance: n(e.balance, 0),
|
|
2140
2034
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2141
2035
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
2142
2036
|
};
|
|
@@ -2159,7 +2053,7 @@ class At {
|
|
|
2159
2053
|
profileCompletion(e) {
|
|
2160
2054
|
return {
|
|
2161
2055
|
...e,
|
|
2162
|
-
completionPercentage:
|
|
2056
|
+
completionPercentage: n(e, 0)
|
|
2163
2057
|
};
|
|
2164
2058
|
}
|
|
2165
2059
|
announcement(e) {
|
|
@@ -2174,9 +2068,9 @@ class At {
|
|
|
2174
2068
|
withdrawalRecord(e) {
|
|
2175
2069
|
return {
|
|
2176
2070
|
...e,
|
|
2177
|
-
amount:
|
|
2178
|
-
netAmount:
|
|
2179
|
-
fee:
|
|
2071
|
+
amount: n(e.amount, 0),
|
|
2072
|
+
netAmount: n(e.netAmount, 0),
|
|
2073
|
+
fee: n(e.fee, 0),
|
|
2180
2074
|
reference: e.reference ?? void 0,
|
|
2181
2075
|
bank: e.bank ?? void 0,
|
|
2182
2076
|
recipientMobileNumber: e.recipientMobileNumber ?? void 0,
|
|
@@ -2188,9 +2082,9 @@ class At {
|
|
|
2188
2082
|
deposit(e) {
|
|
2189
2083
|
return {
|
|
2190
2084
|
...e,
|
|
2191
|
-
fee:
|
|
2192
|
-
amount:
|
|
2193
|
-
netAmount:
|
|
2085
|
+
fee: n(e.fee, 0),
|
|
2086
|
+
amount: n(e.amount, 0),
|
|
2087
|
+
netAmount: n(e.netAmount, 0),
|
|
2194
2088
|
reference: e.reference ?? void 0,
|
|
2195
2089
|
checkoutUrl: e.checkoutUrl ?? void 0,
|
|
2196
2090
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
@@ -2200,9 +2094,9 @@ class At {
|
|
|
2200
2094
|
depositRecord(e) {
|
|
2201
2095
|
return {
|
|
2202
2096
|
...e,
|
|
2203
|
-
amount:
|
|
2204
|
-
fee:
|
|
2205
|
-
netAmount:
|
|
2097
|
+
amount: n(e.amount, 0),
|
|
2098
|
+
fee: n(e.fee, 0),
|
|
2099
|
+
netAmount: n(e.netAmount, 0),
|
|
2206
2100
|
reference: e.reference ?? void 0,
|
|
2207
2101
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2208
2102
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
@@ -2212,12 +2106,12 @@ class At {
|
|
|
2212
2106
|
var t;
|
|
2213
2107
|
return {
|
|
2214
2108
|
...e,
|
|
2215
|
-
bet:
|
|
2216
|
-
payout:
|
|
2217
|
-
jackpotContribution:
|
|
2218
|
-
jackpotPayout:
|
|
2219
|
-
winloss:
|
|
2220
|
-
validBet:
|
|
2109
|
+
bet: n(e.bet, 0),
|
|
2110
|
+
payout: n(e.payout, 0),
|
|
2111
|
+
jackpotContribution: n(e.jackpotContribution, 0),
|
|
2112
|
+
jackpotPayout: n(e.jackpotPayout, 0),
|
|
2113
|
+
winloss: n(e.winloss),
|
|
2114
|
+
validBet: n(e.validBet, 0),
|
|
2221
2115
|
vendorRoundId: e.vendorRoundId ?? void 0,
|
|
2222
2116
|
game: this.game(e.game),
|
|
2223
2117
|
dateTimeSettled: e.dateTimeSettled ? new Date(e.dateTimeSettled) : void 0,
|
|
@@ -2235,9 +2129,9 @@ class At {
|
|
|
2235
2129
|
return {
|
|
2236
2130
|
...e,
|
|
2237
2131
|
game: this.game(e.game),
|
|
2238
|
-
bet:
|
|
2239
|
-
payout:
|
|
2240
|
-
validBet:
|
|
2132
|
+
bet: n(e.bet, 0),
|
|
2133
|
+
payout: n(e.payout, 0),
|
|
2134
|
+
validBet: n(e.validBet, 0),
|
|
2241
2135
|
dateTimeSettled: new Date(e.dateTimeSettled),
|
|
2242
2136
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2243
2137
|
};
|
|
@@ -2245,9 +2139,9 @@ class At {
|
|
|
2245
2139
|
transactionRecord(e) {
|
|
2246
2140
|
return {
|
|
2247
2141
|
...e,
|
|
2248
|
-
amount:
|
|
2142
|
+
amount: n(e.amount, 0),
|
|
2249
2143
|
content: e.content ?? void 0,
|
|
2250
|
-
currentBalance:
|
|
2144
|
+
currentBalance: n(e.currentBalance, 0),
|
|
2251
2145
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2252
2146
|
};
|
|
2253
2147
|
}
|
|
@@ -2273,8 +2167,8 @@ class At {
|
|
|
2273
2167
|
...e.banner,
|
|
2274
2168
|
dateTimeCreated: new Date(e.banner.dateTimeCreated)
|
|
2275
2169
|
},
|
|
2276
|
-
maximumBonusAmount:
|
|
2277
|
-
minimumBonusAmount:
|
|
2170
|
+
maximumBonusAmount: n(e.maximumBonusAmount),
|
|
2171
|
+
minimumBonusAmount: n(e.minimumBonusAmount),
|
|
2278
2172
|
activationEndDateTime: new Date(e.activationEndDateTime),
|
|
2279
2173
|
activationStartDateTime: new Date(e.activationStartDateTime),
|
|
2280
2174
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
@@ -2301,22 +2195,22 @@ class At {
|
|
|
2301
2195
|
/* deposit here does not have an id and depositNumber field */
|
|
2302
2196
|
deposit: e.deposit ? {
|
|
2303
2197
|
...e.deposit,
|
|
2304
|
-
fee:
|
|
2305
|
-
amount:
|
|
2306
|
-
netAmount:
|
|
2198
|
+
fee: n(e.deposit.fee, 0),
|
|
2199
|
+
amount: n(e.deposit.amount, 0),
|
|
2200
|
+
netAmount: n(e.deposit.netAmount, 0),
|
|
2307
2201
|
reference: e.deposit.reference ?? void 0,
|
|
2308
2202
|
dateTimeCreated: new Date(e.deposit.dateTimeCreated),
|
|
2309
2203
|
dateTimeLastUpdated: new Date(e.deposit.dateTimeLastUpdated)
|
|
2310
2204
|
} : void 0,
|
|
2311
|
-
balance:
|
|
2312
|
-
amount:
|
|
2205
|
+
balance: n(e.balance, 0),
|
|
2206
|
+
amount: n(e.amount, 0),
|
|
2313
2207
|
expiration: new Date(e.expiration),
|
|
2314
|
-
turnoverRequirement:
|
|
2315
|
-
currentTurnoverRequirementContribution:
|
|
2208
|
+
turnoverRequirement: n(e.turnoverRequirement, 0),
|
|
2209
|
+
currentTurnoverRequirementContribution: n(
|
|
2316
2210
|
e.currentTurnoverRequirementContribution,
|
|
2317
2211
|
0
|
|
2318
2212
|
),
|
|
2319
|
-
currentTurnoverRequirementContributionPercentage:
|
|
2213
|
+
currentTurnoverRequirementContributionPercentage: n(
|
|
2320
2214
|
e.currentTurnoverRequirementContributionPercentage,
|
|
2321
2215
|
0
|
|
2322
2216
|
),
|
|
@@ -2327,7 +2221,7 @@ class At {
|
|
|
2327
2221
|
cashbackBonus(e) {
|
|
2328
2222
|
return {
|
|
2329
2223
|
id: e.id,
|
|
2330
|
-
balance:
|
|
2224
|
+
balance: n(e.balance, 0),
|
|
2331
2225
|
cashback: this.cashback(e.cashback),
|
|
2332
2226
|
dateTimeCreated: new Date(e.dateTimeCreated),
|
|
2333
2227
|
dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
|
|
@@ -2343,7 +2237,7 @@ class At {
|
|
|
2343
2237
|
pointsWallet(e) {
|
|
2344
2238
|
return {
|
|
2345
2239
|
id: e.id,
|
|
2346
|
-
points:
|
|
2240
|
+
points: n(e.points, 0),
|
|
2347
2241
|
account: e.account,
|
|
2348
2242
|
dateTimeCreated: new Date(e.dateTimeCreated)
|
|
2349
2243
|
};
|
|
@@ -2351,17 +2245,17 @@ class At {
|
|
|
2351
2245
|
}
|
|
2352
2246
|
class Ct {
|
|
2353
2247
|
constructor(e) {
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2248
|
+
m(this, "gameService");
|
|
2249
|
+
m(this, "fileService");
|
|
2250
|
+
m(this, "walletService");
|
|
2251
|
+
m(this, "reportService");
|
|
2252
|
+
m(this, "portalService");
|
|
2253
|
+
m(this, "accountService");
|
|
2254
|
+
m(this, "sessionManager");
|
|
2255
|
+
m(this, "transformer");
|
|
2256
|
+
m(this, "logger");
|
|
2363
2257
|
const t = e.environment === "development";
|
|
2364
|
-
this.sessionManager = new
|
|
2258
|
+
this.sessionManager = new Et({
|
|
2365
2259
|
...e,
|
|
2366
2260
|
url: t ? "https://auth.development.opexa.io" : "https://auth.opexa.io"
|
|
2367
2261
|
});
|
|
@@ -2374,37 +2268,37 @@ class Ct {
|
|
|
2374
2268
|
}
|
|
2375
2269
|
}
|
|
2376
2270
|
};
|
|
2377
|
-
this.gameService = new
|
|
2378
|
-
new
|
|
2271
|
+
this.gameService = new ye(
|
|
2272
|
+
new b(
|
|
2379
2273
|
t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
|
|
2380
2274
|
a
|
|
2381
2275
|
)
|
|
2382
2276
|
), this.fileService = new ht(
|
|
2383
|
-
new
|
|
2277
|
+
new b(
|
|
2384
2278
|
t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
|
|
2385
2279
|
a
|
|
2386
2280
|
)
|
|
2387
|
-
), this.walletService = new
|
|
2388
|
-
new
|
|
2281
|
+
), this.walletService = new yt(
|
|
2282
|
+
new b(
|
|
2389
2283
|
t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
|
|
2390
2284
|
a
|
|
2391
2285
|
)
|
|
2392
|
-
), this.reportService = new
|
|
2393
|
-
new
|
|
2286
|
+
), this.reportService = new ft(
|
|
2287
|
+
new b(
|
|
2394
2288
|
t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
|
|
2395
2289
|
a
|
|
2396
2290
|
)
|
|
2397
|
-
), this.accountService = new
|
|
2398
|
-
new
|
|
2291
|
+
), this.accountService = new lt(
|
|
2292
|
+
new b(
|
|
2399
2293
|
t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
|
|
2400
2294
|
a
|
|
2401
2295
|
)
|
|
2402
|
-
), this.portalService = new
|
|
2403
|
-
new
|
|
2296
|
+
), this.portalService = new bt(
|
|
2297
|
+
new b(
|
|
2404
2298
|
t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
|
|
2405
2299
|
a
|
|
2406
2300
|
)
|
|
2407
|
-
), this.transformer = new At(e), this.logger = new
|
|
2301
|
+
), this.transformer = new At(e), this.logger = new be({
|
|
2408
2302
|
enabled: e.log ?? !1
|
|
2409
2303
|
});
|
|
2410
2304
|
}
|
|
@@ -2420,7 +2314,7 @@ class Ct {
|
|
|
2420
2314
|
case "NAME_AND_PASSWORD": {
|
|
2421
2315
|
const t = await this.sessionManager.create({
|
|
2422
2316
|
...e,
|
|
2423
|
-
password: await
|
|
2317
|
+
password: await f(e.password)
|
|
2424
2318
|
});
|
|
2425
2319
|
return t.data ? {
|
|
2426
2320
|
ok: !0,
|
|
@@ -2480,13 +2374,13 @@ class Ct {
|
|
|
2480
2374
|
return await this.sessionManager.createFromAuthenticator({
|
|
2481
2375
|
type: "SECURITY_QUESTION",
|
|
2482
2376
|
token: e.token,
|
|
2483
|
-
secretAnswer: await
|
|
2377
|
+
secretAnswer: await f(e.secretAnswer)
|
|
2484
2378
|
});
|
|
2485
2379
|
default:
|
|
2486
2380
|
return {
|
|
2487
2381
|
ok: !1,
|
|
2488
2382
|
error: {
|
|
2489
|
-
|
|
2383
|
+
name: "HttpBadRequest",
|
|
2490
2384
|
message: "Invalid input 'type'"
|
|
2491
2385
|
}
|
|
2492
2386
|
};
|
|
@@ -2522,10 +2416,10 @@ class Ct {
|
|
|
2522
2416
|
watchSession(e) {
|
|
2523
2417
|
const t = e.interval ?? 3e4, a = e.onInvalid;
|
|
2524
2418
|
let r = null;
|
|
2525
|
-
const
|
|
2526
|
-
await this.sessionManager.verify() || await a(), r =
|
|
2419
|
+
const s = () => setTimeout(async () => {
|
|
2420
|
+
await this.sessionManager.verify() || await a(), r = s();
|
|
2527
2421
|
}, t);
|
|
2528
|
-
return r =
|
|
2422
|
+
return r = s(), function() {
|
|
2529
2423
|
r && clearTimeout(r);
|
|
2530
2424
|
};
|
|
2531
2425
|
}
|
|
@@ -2591,12 +2485,12 @@ class Ct {
|
|
|
2591
2485
|
* ```
|
|
2592
2486
|
*/
|
|
2593
2487
|
async createAccount(e) {
|
|
2594
|
-
const t = e.id ?? w.generate(
|
|
2488
|
+
const t = e.id ?? w.generate(y.Account).toString(), a = await this.accountService.registerMemberAccount({
|
|
2595
2489
|
input: {
|
|
2596
2490
|
id: t,
|
|
2597
2491
|
name: e.name,
|
|
2598
2492
|
birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
|
|
2599
|
-
password: await
|
|
2493
|
+
password: await f(e.password),
|
|
2600
2494
|
mobileNumber: this.addAreaCode(e.mobileNumber),
|
|
2601
2495
|
domain: e.domain,
|
|
2602
2496
|
btag: e.btag
|
|
@@ -2627,12 +2521,12 @@ class Ct {
|
|
|
2627
2521
|
id: e,
|
|
2628
2522
|
data: {
|
|
2629
2523
|
...t,
|
|
2630
|
-
password: t.password ? await
|
|
2631
|
-
transactionPassword: t.transactionPassword ? await
|
|
2524
|
+
password: t.password ? await f(t.password) : void 0,
|
|
2525
|
+
transactionPassword: t.transactionPassword ? await f(t.transactionPassword) : void 0,
|
|
2632
2526
|
...t.mobileNumber && {
|
|
2633
2527
|
mobileNumber: this.addAreaCode(t.mobileNumber)
|
|
2634
2528
|
},
|
|
2635
|
-
secretAnswer: t.secretAnswer ? await
|
|
2529
|
+
secretAnswer: t.secretAnswer ? await f(t.secretAnswer) : void 0
|
|
2636
2530
|
}
|
|
2637
2531
|
}
|
|
2638
2532
|
});
|
|
@@ -2673,7 +2567,7 @@ class Ct {
|
|
|
2673
2567
|
* ```
|
|
2674
2568
|
*/
|
|
2675
2569
|
async submitVerificationDetails(e) {
|
|
2676
|
-
const t = e.id ?? w.generate(
|
|
2570
|
+
const t = e.id ?? w.generate(y.Verification).toString(), a = await this.accountService.createMemberVerification({
|
|
2677
2571
|
input: {
|
|
2678
2572
|
id: t,
|
|
2679
2573
|
...e
|
|
@@ -2710,7 +2604,7 @@ class Ct {
|
|
|
2710
2604
|
return await this.accountService.resetPassword({
|
|
2711
2605
|
input: {
|
|
2712
2606
|
mobileNumber: this.addAreaCode(e.mobileNumber),
|
|
2713
|
-
newPassword: await
|
|
2607
|
+
newPassword: await f(e.newPassword)
|
|
2714
2608
|
},
|
|
2715
2609
|
verificationCode: e.verificationCode
|
|
2716
2610
|
});
|
|
@@ -2797,13 +2691,13 @@ class Ct {
|
|
|
2797
2691
|
* ```
|
|
2798
2692
|
*/
|
|
2799
2693
|
async createWithdrawal(e) {
|
|
2800
|
-
const t = e.id ?? w.generate(
|
|
2694
|
+
const t = e.id ?? w.generate(y.Withdrawal).toString();
|
|
2801
2695
|
if (e.type === "BANK") {
|
|
2802
2696
|
const a = await this.walletService.createBankWithdrawal({
|
|
2803
2697
|
input: {
|
|
2804
2698
|
id: t,
|
|
2805
2699
|
amount: e.amount.toString(),
|
|
2806
|
-
transactionPassword: await
|
|
2700
|
+
transactionPassword: await f(e.transactionPassword)
|
|
2807
2701
|
}
|
|
2808
2702
|
});
|
|
2809
2703
|
if (!a.ok) return a;
|
|
@@ -2813,7 +2707,7 @@ class Ct {
|
|
|
2813
2707
|
input: {
|
|
2814
2708
|
id: t,
|
|
2815
2709
|
amount: e.amount.toString(),
|
|
2816
|
-
transactionPassword: await
|
|
2710
|
+
transactionPassword: await f(e.transactionPassword),
|
|
2817
2711
|
recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
|
|
2818
2712
|
}
|
|
2819
2713
|
});
|
|
@@ -2824,7 +2718,7 @@ class Ct {
|
|
|
2824
2718
|
input: {
|
|
2825
2719
|
id: t,
|
|
2826
2720
|
amount: e.amount.toString(),
|
|
2827
|
-
transactionPassword: await
|
|
2721
|
+
transactionPassword: await f(e.transactionPassword),
|
|
2828
2722
|
recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
|
|
2829
2723
|
}
|
|
2830
2724
|
});
|
|
@@ -2835,7 +2729,7 @@ class Ct {
|
|
|
2835
2729
|
input: {
|
|
2836
2730
|
id: t,
|
|
2837
2731
|
amount: e.amount.toString(),
|
|
2838
|
-
transactionPassword: await
|
|
2732
|
+
transactionPassword: await f(e.transactionPassword)
|
|
2839
2733
|
}
|
|
2840
2734
|
});
|
|
2841
2735
|
if (!a.ok) return a;
|
|
@@ -2883,7 +2777,7 @@ class Ct {
|
|
|
2883
2777
|
* ```
|
|
2884
2778
|
*/
|
|
2885
2779
|
async createDeposit(e) {
|
|
2886
|
-
const t = e.id ?? w.generate(
|
|
2780
|
+
const t = e.id ?? w.generate(y.Deposit).toString();
|
|
2887
2781
|
if (e.type === "MAYA") {
|
|
2888
2782
|
const a = await this.walletService.createMayaDeposit({
|
|
2889
2783
|
input: {
|
|
@@ -3096,7 +2990,7 @@ class Ct {
|
|
|
3096
2990
|
* ```
|
|
3097
2991
|
*/
|
|
3098
2992
|
async createGameSession(e) {
|
|
3099
|
-
const t = e.id ?? w.generate(
|
|
2993
|
+
const t = e.id ?? w.generate(y.GameSession).toString(), a = await this.gameService.createGameSession({
|
|
3100
2994
|
input: {
|
|
3101
2995
|
id: t,
|
|
3102
2996
|
game: e.game
|
|
@@ -3120,7 +3014,7 @@ class Ct {
|
|
|
3120
3014
|
* ```
|
|
3121
3015
|
*/
|
|
3122
3016
|
async createGameSession__next(e) {
|
|
3123
|
-
const t = e.id ?? w.generate(
|
|
3017
|
+
const t = e.id ?? w.generate(y.GameSession).toString(), a = await this.walletService.createGameSession({
|
|
3124
3018
|
input: {
|
|
3125
3019
|
id: t,
|
|
3126
3020
|
game: e.game
|
|
@@ -3176,7 +3070,7 @@ class Ct {
|
|
|
3176
3070
|
* ```
|
|
3177
3071
|
*/
|
|
3178
3072
|
async uploadImageFile(e) {
|
|
3179
|
-
const t = e.id ?? w.generate(
|
|
3073
|
+
const t = e.id ?? w.generate(y.File).toString(), a = await this.fileService.uploadPrivateImageFile({
|
|
3180
3074
|
input: {
|
|
3181
3075
|
id: t,
|
|
3182
3076
|
file: e.file
|
|
@@ -3209,7 +3103,7 @@ class Ct {
|
|
|
3209
3103
|
}
|
|
3210
3104
|
export {
|
|
3211
3105
|
vt as ObjectId,
|
|
3212
|
-
|
|
3106
|
+
y as ObjectType,
|
|
3213
3107
|
Ct as Sdk
|
|
3214
3108
|
};
|
|
3215
3109
|
//# sourceMappingURL=index.mjs.map
|