@opexa/portal-sdk 0.54.4 → 0.54.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.cjs +383 -155
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +383 -155
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3103,11 +3103,14 @@ var AccountService = class {
|
|
|
3103
3103
|
};
|
|
3104
3104
|
}
|
|
3105
3105
|
async registerMemberAccount(variables) {
|
|
3106
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
3106
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
3107
3107
|
const res = await this.client.request(REGISTER_MEMBER_ACCOUNT_MUTATION, others, {
|
|
3108
3108
|
headers: {
|
|
3109
3109
|
...reCAPTCHAResponse && {
|
|
3110
3110
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
3111
|
+
},
|
|
3112
|
+
...domain && {
|
|
3113
|
+
Domain: domain
|
|
3111
3114
|
}
|
|
3112
3115
|
}
|
|
3113
3116
|
});
|
|
@@ -3123,7 +3126,7 @@ var AccountService = class {
|
|
|
3123
3126
|
};
|
|
3124
3127
|
}
|
|
3125
3128
|
async registerMemberAccountViaMobile(variables) {
|
|
3126
|
-
const { reCAPTCHAResponse, testPass, ...others } = variables;
|
|
3129
|
+
const { reCAPTCHAResponse, domain, testPass, ...others } = variables;
|
|
3127
3130
|
const res = await this.client.request(REGISTER_MEMBER_ACCOUNT_VIA_MOBILE_MUTATION, others, {
|
|
3128
3131
|
headers: {
|
|
3129
3132
|
...reCAPTCHAResponse && {
|
|
@@ -3131,6 +3134,9 @@ var AccountService = class {
|
|
|
3131
3134
|
},
|
|
3132
3135
|
...testPass && {
|
|
3133
3136
|
"test-pass": testPass
|
|
3137
|
+
},
|
|
3138
|
+
...domain && {
|
|
3139
|
+
Domain: domain
|
|
3134
3140
|
}
|
|
3135
3141
|
}
|
|
3136
3142
|
});
|
|
@@ -3148,11 +3154,14 @@ var AccountService = class {
|
|
|
3148
3154
|
};
|
|
3149
3155
|
}
|
|
3150
3156
|
async registerMemberAccount__next(variables) {
|
|
3151
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
3157
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
3152
3158
|
const res = await this.client.request(REGISTER_MEMBER_ACCOUNT_MUTATION__NEXT, others, {
|
|
3153
3159
|
headers: {
|
|
3154
3160
|
...reCAPTCHAResponse && {
|
|
3155
3161
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
3162
|
+
},
|
|
3163
|
+
...domain && {
|
|
3164
|
+
Domain: domain
|
|
3156
3165
|
}
|
|
3157
3166
|
}
|
|
3158
3167
|
});
|
|
@@ -3168,10 +3177,14 @@ var AccountService = class {
|
|
|
3168
3177
|
};
|
|
3169
3178
|
}
|
|
3170
3179
|
async registerMemberAccountByName(variables) {
|
|
3171
|
-
const
|
|
3180
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
3181
|
+
const res = await this.client.request(REGISTER_MEMBER_ACCOUNT_BY_NAME_MUTATION, others, {
|
|
3172
3182
|
headers: {
|
|
3173
|
-
...
|
|
3174
|
-
"google-recaptcha-response":
|
|
3183
|
+
...reCAPTCHAResponse && {
|
|
3184
|
+
"google-recaptcha-response": reCAPTCHAResponse
|
|
3185
|
+
},
|
|
3186
|
+
...domain && {
|
|
3187
|
+
Domain: domain
|
|
3175
3188
|
}
|
|
3176
3189
|
}
|
|
3177
3190
|
});
|
|
@@ -3392,7 +3405,14 @@ var AccountService = class {
|
|
|
3392
3405
|
};
|
|
3393
3406
|
}
|
|
3394
3407
|
async registerMayaMemberAccount(variables) {
|
|
3395
|
-
const
|
|
3408
|
+
const { domain, ...others } = variables;
|
|
3409
|
+
const res = await this.client.request(REGISTER_MAYA_MEMBER_ACCOUNT_MUTATION, others, {
|
|
3410
|
+
headers: {
|
|
3411
|
+
...domain && {
|
|
3412
|
+
Domain: domain
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
});
|
|
3396
3416
|
if (!res.ok) return res;
|
|
3397
3417
|
if (res.data.registerMayaMemberAccount) {
|
|
3398
3418
|
return {
|
|
@@ -3434,7 +3454,7 @@ var AccountService = class {
|
|
|
3434
3454
|
return res.ok ? { ok: true, data: res.data.pointsClubSettings } : res;
|
|
3435
3455
|
}
|
|
3436
3456
|
async registerMemberAccountByMobileNumber(variables) {
|
|
3437
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
3457
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
3438
3458
|
const res = await this.client.request(REGISTER_MEMBER_ACCOUNT_BY_MOBILE_NUMBER_MUTATION, others, {
|
|
3439
3459
|
headers: {
|
|
3440
3460
|
...variables.reCAPTCHAResponse && {
|
|
@@ -3442,6 +3462,9 @@ var AccountService = class {
|
|
|
3442
3462
|
},
|
|
3443
3463
|
...variables.testPass && {
|
|
3444
3464
|
"test-pass": "true"
|
|
3465
|
+
},
|
|
3466
|
+
...domain && {
|
|
3467
|
+
Domain: domain
|
|
3445
3468
|
}
|
|
3446
3469
|
}
|
|
3447
3470
|
});
|
|
@@ -4063,7 +4086,14 @@ var GameService = class {
|
|
|
4063
4086
|
};
|
|
4064
4087
|
}
|
|
4065
4088
|
async createGameSession(variables) {
|
|
4066
|
-
const
|
|
4089
|
+
const { domain, ...others } = variables;
|
|
4090
|
+
const res = await this.client.request(CREATE_GAME_SESSION_MUTATION, others, {
|
|
4091
|
+
headers: {
|
|
4092
|
+
...domain && {
|
|
4093
|
+
Domain: domain
|
|
4094
|
+
}
|
|
4095
|
+
}
|
|
4096
|
+
});
|
|
4067
4097
|
if (!res.ok) return res;
|
|
4068
4098
|
if (res.data.createGameSession) {
|
|
4069
4099
|
return {
|
|
@@ -4480,11 +4510,14 @@ var WalletService = class {
|
|
|
4480
4510
|
return res.ok ? { ok: res.ok, data: res.data.node } : res;
|
|
4481
4511
|
}
|
|
4482
4512
|
async createGCashDeposit(variables) {
|
|
4483
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4513
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4484
4514
|
const res = await this.client.request(CREATE_GCASH_DEPOSIT_MUTATION, others, {
|
|
4485
4515
|
headers: {
|
|
4486
4516
|
...reCAPTCHAResponse && {
|
|
4487
4517
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4518
|
+
},
|
|
4519
|
+
...domain && {
|
|
4520
|
+
Domain: domain
|
|
4488
4521
|
}
|
|
4489
4522
|
}
|
|
4490
4523
|
});
|
|
@@ -4500,11 +4533,14 @@ var WalletService = class {
|
|
|
4500
4533
|
};
|
|
4501
4534
|
}
|
|
4502
4535
|
async createGCashWebpayDeposit(variables) {
|
|
4503
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4536
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4504
4537
|
const res = await this.client.request(CREATE_GCASH_WEBPAY_DEPOSIT_MUTATION, others, {
|
|
4505
4538
|
headers: {
|
|
4506
4539
|
...reCAPTCHAResponse && {
|
|
4507
4540
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4541
|
+
},
|
|
4542
|
+
...domain && {
|
|
4543
|
+
Domain: domain
|
|
4508
4544
|
}
|
|
4509
4545
|
}
|
|
4510
4546
|
});
|
|
@@ -4522,11 +4558,14 @@ var WalletService = class {
|
|
|
4522
4558
|
};
|
|
4523
4559
|
}
|
|
4524
4560
|
async createMayaWebpayDeposit(variables) {
|
|
4525
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4561
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4526
4562
|
const res = await this.client.request(CREATE_MAYA_WEBPAY_DEPOSIT_MUTATION, others, {
|
|
4527
4563
|
headers: {
|
|
4528
4564
|
...reCAPTCHAResponse && {
|
|
4529
4565
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4566
|
+
},
|
|
4567
|
+
...domain && {
|
|
4568
|
+
Domain: domain
|
|
4530
4569
|
}
|
|
4531
4570
|
}
|
|
4532
4571
|
});
|
|
@@ -4544,11 +4583,14 @@ var WalletService = class {
|
|
|
4544
4583
|
};
|
|
4545
4584
|
}
|
|
4546
4585
|
async createMayaDeposit(variables) {
|
|
4547
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4586
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4548
4587
|
const res = await this.client.request(CREATE_MAYA_DEPOSIT_MUTATION, others, {
|
|
4549
4588
|
headers: {
|
|
4550
4589
|
...reCAPTCHAResponse && {
|
|
4551
4590
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4591
|
+
},
|
|
4592
|
+
...domain && {
|
|
4593
|
+
Domain: domain
|
|
4552
4594
|
}
|
|
4553
4595
|
}
|
|
4554
4596
|
});
|
|
@@ -4564,7 +4606,14 @@ var WalletService = class {
|
|
|
4564
4606
|
};
|
|
4565
4607
|
}
|
|
4566
4608
|
async createTestDeposit(variables) {
|
|
4567
|
-
const
|
|
4609
|
+
const { domain, ...others } = variables;
|
|
4610
|
+
const res = await this.client.request(CREATE_TEST_DEPOSIT_MUTATION, others, {
|
|
4611
|
+
headers: {
|
|
4612
|
+
...domain && {
|
|
4613
|
+
Domain: domain
|
|
4614
|
+
}
|
|
4615
|
+
}
|
|
4616
|
+
});
|
|
4568
4617
|
if (!res.ok) return res;
|
|
4569
4618
|
if (res.data.createTestDeposit) {
|
|
4570
4619
|
return {
|
|
@@ -4577,11 +4626,14 @@ var WalletService = class {
|
|
|
4577
4626
|
};
|
|
4578
4627
|
}
|
|
4579
4628
|
async createAIOQRPHDeposit(variables) {
|
|
4580
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4629
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4581
4630
|
const res = await this.client.request(CREATE_AIO_QRPH_DEPOSIT_MUTATION, others, {
|
|
4582
4631
|
headers: {
|
|
4583
4632
|
...reCAPTCHAResponse && {
|
|
4584
4633
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4634
|
+
},
|
|
4635
|
+
...domain && {
|
|
4636
|
+
Domain: domain
|
|
4585
4637
|
}
|
|
4586
4638
|
}
|
|
4587
4639
|
});
|
|
@@ -4597,11 +4649,14 @@ var WalletService = class {
|
|
|
4597
4649
|
};
|
|
4598
4650
|
}
|
|
4599
4651
|
async createAiOGCashDeposit(variables) {
|
|
4600
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4652
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4601
4653
|
const res = await this.client.request(CREATE_AIO_GCASH_DEPOSIT_MUTATION, others, {
|
|
4602
4654
|
headers: {
|
|
4603
4655
|
...reCAPTCHAResponse && {
|
|
4604
4656
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4657
|
+
},
|
|
4658
|
+
...domain && {
|
|
4659
|
+
Domain: domain
|
|
4605
4660
|
}
|
|
4606
4661
|
}
|
|
4607
4662
|
});
|
|
@@ -4617,11 +4672,14 @@ var WalletService = class {
|
|
|
4617
4672
|
};
|
|
4618
4673
|
}
|
|
4619
4674
|
async createAiOPayMayaDeposit(variables) {
|
|
4620
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4675
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4621
4676
|
const res = await this.client.request(CREATE_AIO_PAY_MAYA_DEPOSIT_MUTATION, others, {
|
|
4622
4677
|
headers: {
|
|
4623
4678
|
...reCAPTCHAResponse && {
|
|
4624
4679
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4680
|
+
},
|
|
4681
|
+
...domain && {
|
|
4682
|
+
Domain: domain
|
|
4625
4683
|
}
|
|
4626
4684
|
}
|
|
4627
4685
|
});
|
|
@@ -4639,11 +4697,14 @@ var WalletService = class {
|
|
|
4639
4697
|
};
|
|
4640
4698
|
}
|
|
4641
4699
|
async createAiOGrabPayDeposit(variables) {
|
|
4642
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4700
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4643
4701
|
const res = await this.client.request(CREATE_AIO_GRAB_PAY_DEPOSIT_MUTATION, others, {
|
|
4644
4702
|
headers: {
|
|
4645
4703
|
...reCAPTCHAResponse && {
|
|
4646
4704
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4705
|
+
},
|
|
4706
|
+
...domain && {
|
|
4707
|
+
Domain: domain
|
|
4647
4708
|
}
|
|
4648
4709
|
}
|
|
4649
4710
|
});
|
|
@@ -4661,11 +4722,14 @@ var WalletService = class {
|
|
|
4661
4722
|
};
|
|
4662
4723
|
}
|
|
4663
4724
|
async createAiOPalawanPayDeposit(variables) {
|
|
4664
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4725
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4665
4726
|
const res = await this.client.request(CREATE_AIO_PALAWAN_PAY_DEPOSIT_MUTATION, others, {
|
|
4666
4727
|
headers: {
|
|
4667
4728
|
...reCAPTCHAResponse && {
|
|
4668
4729
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4730
|
+
},
|
|
4731
|
+
...domain && {
|
|
4732
|
+
Domain: domain
|
|
4669
4733
|
}
|
|
4670
4734
|
}
|
|
4671
4735
|
});
|
|
@@ -4683,11 +4747,14 @@ var WalletService = class {
|
|
|
4683
4747
|
};
|
|
4684
4748
|
}
|
|
4685
4749
|
async createAIOOnlineBankDeposit(variables) {
|
|
4686
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4750
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4687
4751
|
const res = await this.client.request(CREATE_AIO_ONLINE_BANK_DEPOSIT_MUTATION, others, {
|
|
4688
4752
|
headers: {
|
|
4689
4753
|
...reCAPTCHAResponse && {
|
|
4690
4754
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4755
|
+
},
|
|
4756
|
+
...domain && {
|
|
4757
|
+
Domain: domain
|
|
4691
4758
|
}
|
|
4692
4759
|
}
|
|
4693
4760
|
});
|
|
@@ -4705,11 +4772,14 @@ var WalletService = class {
|
|
|
4705
4772
|
};
|
|
4706
4773
|
}
|
|
4707
4774
|
async createManualBankDeposit(variables) {
|
|
4708
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4775
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4709
4776
|
const res = await this.client.request(CREATE_MANUAL_BANK_DEPOSIT_MUTATION, others, {
|
|
4710
4777
|
headers: {
|
|
4711
4778
|
...reCAPTCHAResponse && {
|
|
4712
4779
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4780
|
+
},
|
|
4781
|
+
...domain && {
|
|
4782
|
+
Domain: domain
|
|
4713
4783
|
}
|
|
4714
4784
|
}
|
|
4715
4785
|
});
|
|
@@ -4727,11 +4797,14 @@ var WalletService = class {
|
|
|
4727
4797
|
};
|
|
4728
4798
|
}
|
|
4729
4799
|
async createManualUPIDeposit(variables) {
|
|
4730
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4800
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4731
4801
|
const res = await this.client.request(CREATE_MANUAL_UPI_DEPOSIT_MUTATION, others, {
|
|
4732
4802
|
headers: {
|
|
4733
4803
|
...reCAPTCHAResponse && {
|
|
4734
4804
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4805
|
+
},
|
|
4806
|
+
...domain && {
|
|
4807
|
+
Domain: domain
|
|
4735
4808
|
}
|
|
4736
4809
|
}
|
|
4737
4810
|
});
|
|
@@ -4747,11 +4820,14 @@ var WalletService = class {
|
|
|
4747
4820
|
};
|
|
4748
4821
|
}
|
|
4749
4822
|
async createMayaAppDeposit(variables) {
|
|
4750
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4823
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4751
4824
|
const res = await this.client.request(CREATE_MAYA_APP_DEPOSIT_MUTATION, others, {
|
|
4752
4825
|
headers: {
|
|
4753
4826
|
...reCAPTCHAResponse && {
|
|
4754
4827
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4828
|
+
},
|
|
4829
|
+
...domain && {
|
|
4830
|
+
Domain: domain
|
|
4755
4831
|
}
|
|
4756
4832
|
}
|
|
4757
4833
|
});
|
|
@@ -4767,11 +4843,14 @@ var WalletService = class {
|
|
|
4767
4843
|
};
|
|
4768
4844
|
}
|
|
4769
4845
|
async createManualUpiDeposit(variables) {
|
|
4770
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4846
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4771
4847
|
const res = await this.client.request(CREATE_MANUAL_UPI_DEPOSIT_MUTATION, others, {
|
|
4772
4848
|
headers: {
|
|
4773
4849
|
...reCAPTCHAResponse && {
|
|
4774
4850
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4851
|
+
},
|
|
4852
|
+
...domain && {
|
|
4853
|
+
Domain: domain
|
|
4775
4854
|
}
|
|
4776
4855
|
}
|
|
4777
4856
|
});
|
|
@@ -4787,11 +4866,14 @@ var WalletService = class {
|
|
|
4787
4866
|
};
|
|
4788
4867
|
}
|
|
4789
4868
|
async createGCashWithdrawal(variables) {
|
|
4790
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4869
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4791
4870
|
const res = await this.client.request(CREATE_GCASH_WITHDRAWAL_MUTATION, others, {
|
|
4792
4871
|
headers: {
|
|
4793
4872
|
...reCAPTCHAResponse && {
|
|
4794
4873
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4874
|
+
},
|
|
4875
|
+
...domain && {
|
|
4876
|
+
Domain: domain
|
|
4795
4877
|
}
|
|
4796
4878
|
}
|
|
4797
4879
|
});
|
|
@@ -4807,11 +4889,14 @@ var WalletService = class {
|
|
|
4807
4889
|
};
|
|
4808
4890
|
}
|
|
4809
4891
|
async createGCashStandardCashInWithdrawal(variables) {
|
|
4810
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4892
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4811
4893
|
const res = await this.client.request(CREATE_GCASH_STANDARD_CASHIN_WITHDRAWAL_MUTATION, others, {
|
|
4812
4894
|
headers: {
|
|
4813
4895
|
...reCAPTCHAResponse && {
|
|
4814
4896
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4897
|
+
},
|
|
4898
|
+
...domain && {
|
|
4899
|
+
Domain: domain
|
|
4815
4900
|
}
|
|
4816
4901
|
}
|
|
4817
4902
|
});
|
|
@@ -4829,11 +4914,14 @@ var WalletService = class {
|
|
|
4829
4914
|
};
|
|
4830
4915
|
}
|
|
4831
4916
|
async createMayaWithdrawal(variables) {
|
|
4832
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4917
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4833
4918
|
const res = await this.client.request(CREATE_MAYA_WITHDRAWAL_MUTATION, others, {
|
|
4834
4919
|
headers: {
|
|
4835
4920
|
...reCAPTCHAResponse && {
|
|
4836
4921
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4922
|
+
},
|
|
4923
|
+
...domain && {
|
|
4924
|
+
Domain: domain
|
|
4837
4925
|
}
|
|
4838
4926
|
}
|
|
4839
4927
|
});
|
|
@@ -4849,11 +4937,14 @@ var WalletService = class {
|
|
|
4849
4937
|
};
|
|
4850
4938
|
}
|
|
4851
4939
|
async createMayaAppWithdrawal(variables) {
|
|
4852
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4940
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4853
4941
|
const res = await this.client.request(CREATE_MAYA_APP_WITHDRAWAL_MUTATION, others, {
|
|
4854
4942
|
headers: {
|
|
4855
4943
|
...reCAPTCHAResponse && {
|
|
4856
4944
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4945
|
+
},
|
|
4946
|
+
...domain && {
|
|
4947
|
+
Domain: domain
|
|
4857
4948
|
}
|
|
4858
4949
|
}
|
|
4859
4950
|
});
|
|
@@ -4871,11 +4962,14 @@ var WalletService = class {
|
|
|
4871
4962
|
};
|
|
4872
4963
|
}
|
|
4873
4964
|
async createBankWithdrawal(variables) {
|
|
4874
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4965
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4875
4966
|
const res = await this.client.request(CREATE_BANK_WITHDRAWAL_MUTATION, others, {
|
|
4876
4967
|
headers: {
|
|
4877
4968
|
...reCAPTCHAResponse && {
|
|
4878
4969
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4970
|
+
},
|
|
4971
|
+
...domain && {
|
|
4972
|
+
Domain: domain
|
|
4879
4973
|
}
|
|
4880
4974
|
}
|
|
4881
4975
|
});
|
|
@@ -4891,11 +4985,14 @@ var WalletService = class {
|
|
|
4891
4985
|
};
|
|
4892
4986
|
}
|
|
4893
4987
|
async createAIOInstapayWithdrawal(variables) {
|
|
4894
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
4988
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4895
4989
|
const res = await this.client.request(CREATE_AIO_INSTAPAY_WITHDRAWAL_MUTATION, others, {
|
|
4896
4990
|
headers: {
|
|
4897
4991
|
...reCAPTCHAResponse && {
|
|
4898
4992
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
4993
|
+
},
|
|
4994
|
+
...domain && {
|
|
4995
|
+
Domain: domain
|
|
4899
4996
|
}
|
|
4900
4997
|
}
|
|
4901
4998
|
});
|
|
@@ -4913,11 +5010,14 @@ var WalletService = class {
|
|
|
4913
5010
|
};
|
|
4914
5011
|
}
|
|
4915
5012
|
async createAIOInstapayWithdrawal_next(variables) {
|
|
4916
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
5013
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4917
5014
|
const res = await this.client.request(CREATE_AIO_INSTAPAY_WITHDRAWAL_MUTATION_NEXT, others, {
|
|
4918
5015
|
headers: {
|
|
4919
5016
|
...reCAPTCHAResponse && {
|
|
4920
5017
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
5018
|
+
},
|
|
5019
|
+
...domain && {
|
|
5020
|
+
Domain: domain
|
|
4921
5021
|
}
|
|
4922
5022
|
}
|
|
4923
5023
|
});
|
|
@@ -4935,11 +5035,14 @@ var WalletService = class {
|
|
|
4935
5035
|
};
|
|
4936
5036
|
}
|
|
4937
5037
|
async createManualUpiWithdrawal(variables) {
|
|
4938
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
5038
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4939
5039
|
const res = await this.client.request(CREATE_MANUAL_UPI_WITHDRAWAL_MUTATION, others, {
|
|
4940
5040
|
headers: {
|
|
4941
5041
|
...reCAPTCHAResponse && {
|
|
4942
5042
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
5043
|
+
},
|
|
5044
|
+
...domain && {
|
|
5045
|
+
Domain: domain
|
|
4943
5046
|
}
|
|
4944
5047
|
}
|
|
4945
5048
|
});
|
|
@@ -4957,11 +5060,14 @@ var WalletService = class {
|
|
|
4957
5060
|
};
|
|
4958
5061
|
}
|
|
4959
5062
|
async createManualBankWithdrawal(variables) {
|
|
4960
|
-
const { reCAPTCHAResponse, ...others } = variables;
|
|
5063
|
+
const { reCAPTCHAResponse, domain, ...others } = variables;
|
|
4961
5064
|
const res = await this.client.request(CREATE_MANUAL_BANK_WITHDRAWAL_MUTATION, others, {
|
|
4962
5065
|
headers: {
|
|
4963
5066
|
...reCAPTCHAResponse && {
|
|
4964
5067
|
"google-recaptcha-response": reCAPTCHAResponse
|
|
5068
|
+
},
|
|
5069
|
+
...domain && {
|
|
5070
|
+
Domain: domain
|
|
4965
5071
|
}
|
|
4966
5072
|
}
|
|
4967
5073
|
});
|
|
@@ -5016,7 +5122,14 @@ var WalletService = class {
|
|
|
5016
5122
|
return res.ok ? { ok: true, data: res.data.node } : res;
|
|
5017
5123
|
}
|
|
5018
5124
|
async createGameSession(variables) {
|
|
5019
|
-
const
|
|
5125
|
+
const { domain, ...others } = variables;
|
|
5126
|
+
const res = await this.client.request(CREATE_GAME_SESSION_MUTATION, others, {
|
|
5127
|
+
headers: {
|
|
5128
|
+
...domain && {
|
|
5129
|
+
Domain: domain
|
|
5130
|
+
}
|
|
5131
|
+
}
|
|
5132
|
+
});
|
|
5020
5133
|
if (!res.ok) return res;
|
|
5021
5134
|
if (res.data.createGameSession) {
|
|
5022
5135
|
return {
|
|
@@ -5183,10 +5296,7 @@ var WalletService = class {
|
|
|
5183
5296
|
};
|
|
5184
5297
|
}
|
|
5185
5298
|
async cabinetWithdrawal(variables) {
|
|
5186
|
-
const res = await this.client.request(
|
|
5187
|
-
CABINET_WITHDRAWAL_QUERY,
|
|
5188
|
-
variables
|
|
5189
|
-
);
|
|
5299
|
+
const res = await this.client.request(CABINET_WITHDRAWAL_QUERY, variables);
|
|
5190
5300
|
return res.ok ? { ok: res.ok, data: res.data.node } : res;
|
|
5191
5301
|
}
|
|
5192
5302
|
async redeemVoucher(variables) {
|
|
@@ -5710,8 +5820,8 @@ function pollable(func, config) {
|
|
|
5710
5820
|
};
|
|
5711
5821
|
}
|
|
5712
5822
|
|
|
5713
|
-
// src/sdk/session-manager.ts
|
|
5714
|
-
var
|
|
5823
|
+
// src/sdk/session-manager-cookie.ts
|
|
5824
|
+
var SessionManagerCookie = class {
|
|
5715
5825
|
logger;
|
|
5716
5826
|
storageKey = "session";
|
|
5717
5827
|
platformStorageKey = "session/platform";
|
|
@@ -5722,10 +5832,6 @@ var SessionManager = class {
|
|
|
5722
5832
|
this.authService = config.authService;
|
|
5723
5833
|
this.walletService = config.walletService;
|
|
5724
5834
|
this.logger = config.logger;
|
|
5725
|
-
if (config.sessionPrefix) {
|
|
5726
|
-
this.storageKey = `${config.sessionPrefix}/${this.storageKey}`;
|
|
5727
|
-
this.platformStorageKey = `${config.sessionPrefix}/${this.platformStorageKey}`;
|
|
5728
|
-
}
|
|
5729
5835
|
}
|
|
5730
5836
|
get refreshing() {
|
|
5731
5837
|
return this._refreshing;
|
|
@@ -5734,16 +5840,6 @@ var SessionManager = class {
|
|
|
5734
5840
|
this._refreshing = value;
|
|
5735
5841
|
}
|
|
5736
5842
|
async create(input) {
|
|
5737
|
-
if (this.isServer) {
|
|
5738
|
-
this.logger.warn("'localStorage' is not available on the server.");
|
|
5739
|
-
return {
|
|
5740
|
-
ok: false,
|
|
5741
|
-
error: {
|
|
5742
|
-
name: "UnknownError",
|
|
5743
|
-
message: "Server sign in is not supported."
|
|
5744
|
-
}
|
|
5745
|
-
};
|
|
5746
|
-
}
|
|
5747
5843
|
if (input.type === "MAYA") {
|
|
5748
5844
|
localStorage.setItem(this.platformStorageKey, "MAYA");
|
|
5749
5845
|
const f0 = () => this.walletService.mayaSession({ id: input.sessionId });
|
|
@@ -5770,13 +5866,14 @@ var SessionManager = class {
|
|
|
5770
5866
|
})();
|
|
5771
5867
|
if (!r1.ok) return r1;
|
|
5772
5868
|
const now2 = /* @__PURE__ */ new Date();
|
|
5773
|
-
|
|
5869
|
+
cookies__default.default.set(
|
|
5774
5870
|
this.storageKey,
|
|
5775
5871
|
JSON.stringify({
|
|
5776
5872
|
...r1.data,
|
|
5777
5873
|
accessTokenExpiresAt: addMinutes(now2, 8).getTime(),
|
|
5778
5874
|
refreshTokenExpiresAt: subMinutes(addDays(now2, 30), 2).getTime()
|
|
5779
|
-
})
|
|
5875
|
+
}),
|
|
5876
|
+
{ expires: subMinutes(addDays(now2, 30), 2).getTime() }
|
|
5780
5877
|
);
|
|
5781
5878
|
return {
|
|
5782
5879
|
ok: true,
|
|
@@ -5787,13 +5884,16 @@ var SessionManager = class {
|
|
|
5787
5884
|
const res2 = await this.authService.createSession(input);
|
|
5788
5885
|
if (res2.ok) {
|
|
5789
5886
|
const now2 = /* @__PURE__ */ new Date();
|
|
5790
|
-
|
|
5887
|
+
cookies__default.default.set(
|
|
5791
5888
|
this.storageKey,
|
|
5792
5889
|
JSON.stringify({
|
|
5793
5890
|
...res2.data,
|
|
5794
5891
|
accessTokenExpiresAt: addMinutes(now2, 8).getTime(),
|
|
5795
5892
|
refreshTokenExpiresAt: subMinutes(addDays(now2, 30), 2).getTime()
|
|
5796
|
-
})
|
|
5893
|
+
}),
|
|
5894
|
+
{
|
|
5895
|
+
expires: subMinutes(addDays(now2, 30), 2).getTime()
|
|
5896
|
+
}
|
|
5797
5897
|
);
|
|
5798
5898
|
return {
|
|
5799
5899
|
ok: true,
|
|
@@ -5805,18 +5905,18 @@ var SessionManager = class {
|
|
|
5805
5905
|
if (input.type === "SOCIALS" || input.type === "TOKEN") {
|
|
5806
5906
|
const res2 = await this.authService.createSession({
|
|
5807
5907
|
type: "SOCIALS",
|
|
5808
|
-
token: input.token
|
|
5809
|
-
channel: input.channel
|
|
5908
|
+
token: input.token
|
|
5810
5909
|
});
|
|
5811
5910
|
if (res2.ok) {
|
|
5812
5911
|
const now2 = /* @__PURE__ */ new Date();
|
|
5813
|
-
|
|
5912
|
+
cookies__default.default.set(
|
|
5814
5913
|
this.storageKey,
|
|
5815
5914
|
JSON.stringify({
|
|
5816
5915
|
...res2.data,
|
|
5817
5916
|
accessTokenExpiresAt: addMinutes(now2, 8).getTime(),
|
|
5818
5917
|
refreshTokenExpiresAt: subMinutes(addDays(now2, 30), 2).getTime()
|
|
5819
|
-
})
|
|
5918
|
+
}),
|
|
5919
|
+
{ expires: subMinutes(addDays(now2, 30), 2).getTime() }
|
|
5820
5920
|
);
|
|
5821
5921
|
return {
|
|
5822
5922
|
ok: true,
|
|
@@ -5830,13 +5930,14 @@ var SessionManager = class {
|
|
|
5830
5930
|
const res2 = await this.authService.createSession(input);
|
|
5831
5931
|
if (res2.ok) {
|
|
5832
5932
|
const now2 = /* @__PURE__ */ new Date();
|
|
5833
|
-
|
|
5933
|
+
cookies__default.default.set(
|
|
5834
5934
|
this.storageKey,
|
|
5835
5935
|
JSON.stringify({
|
|
5836
5936
|
...res2.data,
|
|
5837
5937
|
accessTokenExpiresAt: addMinutes(now2, 8).getTime(),
|
|
5838
5938
|
refreshTokenExpiresAt: subMinutes(addDays(now2, 30), 2).getTime()
|
|
5839
|
-
})
|
|
5939
|
+
}),
|
|
5940
|
+
{ expires: subMinutes(addDays(now2, 30), 2).getTime() }
|
|
5840
5941
|
);
|
|
5841
5942
|
return {
|
|
5842
5943
|
ok: true,
|
|
@@ -5856,13 +5957,14 @@ var SessionManager = class {
|
|
|
5856
5957
|
};
|
|
5857
5958
|
}
|
|
5858
5959
|
const now = /* @__PURE__ */ new Date();
|
|
5859
|
-
|
|
5960
|
+
cookies__default.default.set(
|
|
5860
5961
|
this.storageKey,
|
|
5861
5962
|
JSON.stringify({
|
|
5862
5963
|
...res.data,
|
|
5863
5964
|
accessTokenExpiresAt: addMinutes(now, 8).getTime(),
|
|
5864
5965
|
refreshTokenExpiresAt: subMinutes(addDays(now, 30), 2).getTime()
|
|
5865
|
-
})
|
|
5966
|
+
}),
|
|
5967
|
+
{}
|
|
5866
5968
|
);
|
|
5867
5969
|
return {
|
|
5868
5970
|
ok: true,
|
|
@@ -5874,15 +5976,18 @@ var SessionManager = class {
|
|
|
5874
5976
|
if (res.ok) {
|
|
5875
5977
|
const now = /* @__PURE__ */ new Date();
|
|
5876
5978
|
if (this.isServer) {
|
|
5877
|
-
this.logger.warn("'
|
|
5979
|
+
this.logger.warn("'client cookies' is not available on the server.");
|
|
5878
5980
|
} else {
|
|
5879
|
-
|
|
5981
|
+
cookies__default.default.set(
|
|
5880
5982
|
this.storageKey,
|
|
5881
5983
|
JSON.stringify({
|
|
5882
5984
|
...res.data,
|
|
5883
5985
|
accessTokenExpiresAt: addMinutes(now, 8).getTime(),
|
|
5884
5986
|
refreshTokenExpiresAt: subMinutes(addDays(now, 30), 2).getTime()
|
|
5885
|
-
})
|
|
5987
|
+
}),
|
|
5988
|
+
{
|
|
5989
|
+
expires: subMinutes(addDays(now, 30), 2).getTime()
|
|
5990
|
+
}
|
|
5886
5991
|
);
|
|
5887
5992
|
}
|
|
5888
5993
|
return { ok: true };
|
|
@@ -5892,7 +5997,7 @@ var SessionManager = class {
|
|
|
5892
5997
|
}
|
|
5893
5998
|
async get() {
|
|
5894
5999
|
if (this.isServer) {
|
|
5895
|
-
this.logger.warn("'
|
|
6000
|
+
this.logger.warn("'client cookies' is not available on the server.");
|
|
5896
6001
|
return {
|
|
5897
6002
|
ok: true,
|
|
5898
6003
|
data: null
|
|
@@ -5902,7 +6007,7 @@ var SessionManager = class {
|
|
|
5902
6007
|
await sleep(1e3);
|
|
5903
6008
|
return await this.get();
|
|
5904
6009
|
}
|
|
5905
|
-
const val =
|
|
6010
|
+
const val = cookies__default.default.get(this.storageKey);
|
|
5906
6011
|
if (!val) {
|
|
5907
6012
|
return {
|
|
5908
6013
|
ok: true,
|
|
@@ -5916,7 +6021,7 @@ var SessionManager = class {
|
|
|
5916
6021
|
const refreshTokenExpiresAt = new Date(obj.refreshTokenExpiresAt);
|
|
5917
6022
|
if (isAfter(now, refreshTokenExpiresAt)) {
|
|
5918
6023
|
this.logger.warn("Session expired. Logging out..");
|
|
5919
|
-
|
|
6024
|
+
cookies__default.default.remove(this.storageKey);
|
|
5920
6025
|
return {
|
|
5921
6026
|
ok: false,
|
|
5922
6027
|
error: {
|
|
@@ -5933,7 +6038,7 @@ var SessionManager = class {
|
|
|
5933
6038
|
if (!res.ok) {
|
|
5934
6039
|
this.logger.error(`Failed to refresh session: ${res.error.message}`);
|
|
5935
6040
|
if (res.error.name === "InvalidTokenError" || res.error.name === "AccountBlacklistedError" || res.error.name === "VerificationLockedError") {
|
|
5936
|
-
|
|
6041
|
+
cookies__default.default.remove(this.storageKey);
|
|
5937
6042
|
return {
|
|
5938
6043
|
ok: false,
|
|
5939
6044
|
error: res.error
|
|
@@ -5954,7 +6059,9 @@ var SessionManager = class {
|
|
|
5954
6059
|
accessTokenExpiresAt: addMinutes(now, 8).getTime(),
|
|
5955
6060
|
refreshTokenExpiresAt: subMinutes(addDays(now, 30), 2).getTime()
|
|
5956
6061
|
};
|
|
5957
|
-
|
|
6062
|
+
cookies__default.default.set(this.storageKey, JSON.stringify(obj), {
|
|
6063
|
+
expires: subMinutes(addDays(now, 30), 2).getTime()
|
|
6064
|
+
});
|
|
5958
6065
|
}
|
|
5959
6066
|
return {
|
|
5960
6067
|
ok: true,
|
|
@@ -5972,13 +6079,13 @@ var SessionManager = class {
|
|
|
5972
6079
|
}
|
|
5973
6080
|
async refresh() {
|
|
5974
6081
|
if (this.isServer) {
|
|
5975
|
-
this.logger.warn("'
|
|
6082
|
+
this.logger.warn("'client cookies' is not available on the server.");
|
|
5976
6083
|
return {
|
|
5977
6084
|
ok: true,
|
|
5978
6085
|
data: null
|
|
5979
6086
|
};
|
|
5980
6087
|
}
|
|
5981
|
-
const val =
|
|
6088
|
+
const val = cookies__default.default.get(this.storageKey);
|
|
5982
6089
|
if (!val) {
|
|
5983
6090
|
return {
|
|
5984
6091
|
ok: true,
|
|
@@ -5995,7 +6102,7 @@ var SessionManager = class {
|
|
|
5995
6102
|
if (!res.ok) {
|
|
5996
6103
|
this.logger.error(`Failed to refresh session: ${res.error.message}`);
|
|
5997
6104
|
if (res.error.name === "InvalidTokenError" || res.error.name === "AccountBlacklistedError" || res.error.name === "VerificationLockedError") {
|
|
5998
|
-
|
|
6105
|
+
cookies__default.default.remove(this.storageKey);
|
|
5999
6106
|
return {
|
|
6000
6107
|
ok: false,
|
|
6001
6108
|
error: res.error
|
|
@@ -6016,7 +6123,9 @@ var SessionManager = class {
|
|
|
6016
6123
|
accessTokenExpiresAt: addMinutes(now, 8).getTime(),
|
|
6017
6124
|
refreshTokenExpiresAt: subMinutes(addDays(now, 30), 2).getTime()
|
|
6018
6125
|
};
|
|
6019
|
-
|
|
6126
|
+
cookies__default.default.set(this.storageKey, JSON.stringify(obj), {
|
|
6127
|
+
expires: subMinutes(addDays(now, 30), 2).getTime()
|
|
6128
|
+
});
|
|
6020
6129
|
return {
|
|
6021
6130
|
ok: true,
|
|
6022
6131
|
data: obj
|
|
@@ -6033,18 +6142,18 @@ var SessionManager = class {
|
|
|
6033
6142
|
}
|
|
6034
6143
|
async destroy() {
|
|
6035
6144
|
if (this.isServer) {
|
|
6036
|
-
this.logger.warn("'
|
|
6145
|
+
this.logger.warn("'client cookies' is not available on the server.");
|
|
6037
6146
|
return;
|
|
6038
6147
|
}
|
|
6039
6148
|
const res = await this.get();
|
|
6040
6149
|
if (res.data?.accessToken) {
|
|
6041
6150
|
await this.authService.destroySession(res.data.accessToken);
|
|
6042
6151
|
}
|
|
6043
|
-
|
|
6152
|
+
cookies__default.default.remove(this.storageKey);
|
|
6044
6153
|
}
|
|
6045
6154
|
async verify() {
|
|
6046
6155
|
if (this.isServer) {
|
|
6047
|
-
this.logger.warn("'
|
|
6156
|
+
this.logger.warn("'client cookies' is not available on the server.");
|
|
6048
6157
|
return true;
|
|
6049
6158
|
}
|
|
6050
6159
|
const s = await this.get();
|
|
@@ -6054,13 +6163,13 @@ var SessionManager = class {
|
|
|
6054
6163
|
if (!s.data) return true;
|
|
6055
6164
|
const v = await this.authService.verifySession(s.data.accessToken);
|
|
6056
6165
|
if (!v) {
|
|
6057
|
-
|
|
6166
|
+
cookies__default.default.remove(this.storageKey);
|
|
6058
6167
|
}
|
|
6059
6168
|
return v;
|
|
6060
6169
|
}
|
|
6061
6170
|
get onMaya() {
|
|
6062
6171
|
if (this.isServer) {
|
|
6063
|
-
this.logger.warn("'
|
|
6172
|
+
this.logger.warn("'client cookies' is not available on the server.");
|
|
6064
6173
|
return false;
|
|
6065
6174
|
}
|
|
6066
6175
|
return localStorage.getItem(this.platformStorageKey) === "MAYA";
|
|
@@ -6076,7 +6185,9 @@ var SessionManager = class {
|
|
|
6076
6185
|
return typeof window === "undefined";
|
|
6077
6186
|
}
|
|
6078
6187
|
};
|
|
6079
|
-
|
|
6188
|
+
|
|
6189
|
+
// src/sdk/session-manager.ts
|
|
6190
|
+
var SessionManager = class {
|
|
6080
6191
|
logger;
|
|
6081
6192
|
storageKey = "session";
|
|
6082
6193
|
platformStorageKey = "session/platform";
|
|
@@ -6087,6 +6198,10 @@ var SessionManagerCookie = class {
|
|
|
6087
6198
|
this.authService = config.authService;
|
|
6088
6199
|
this.walletService = config.walletService;
|
|
6089
6200
|
this.logger = config.logger;
|
|
6201
|
+
if (config.sessionPrefix) {
|
|
6202
|
+
this.storageKey = `${config.sessionPrefix}/${this.storageKey}`;
|
|
6203
|
+
this.platformStorageKey = `${config.sessionPrefix}/${this.platformStorageKey}`;
|
|
6204
|
+
}
|
|
6090
6205
|
}
|
|
6091
6206
|
get refreshing() {
|
|
6092
6207
|
return this._refreshing;
|
|
@@ -6095,6 +6210,16 @@ var SessionManagerCookie = class {
|
|
|
6095
6210
|
this._refreshing = value;
|
|
6096
6211
|
}
|
|
6097
6212
|
async create(input) {
|
|
6213
|
+
if (this.isServer) {
|
|
6214
|
+
this.logger.warn("'localStorage' is not available on the server.");
|
|
6215
|
+
return {
|
|
6216
|
+
ok: false,
|
|
6217
|
+
error: {
|
|
6218
|
+
name: "UnknownError",
|
|
6219
|
+
message: "Server sign in is not supported."
|
|
6220
|
+
}
|
|
6221
|
+
};
|
|
6222
|
+
}
|
|
6098
6223
|
if (input.type === "MAYA") {
|
|
6099
6224
|
localStorage.setItem(this.platformStorageKey, "MAYA");
|
|
6100
6225
|
const f0 = () => this.walletService.mayaSession({ id: input.sessionId });
|
|
@@ -6121,14 +6246,13 @@ var SessionManagerCookie = class {
|
|
|
6121
6246
|
})();
|
|
6122
6247
|
if (!r1.ok) return r1;
|
|
6123
6248
|
const now2 = /* @__PURE__ */ new Date();
|
|
6124
|
-
|
|
6249
|
+
localStorage.setItem(
|
|
6125
6250
|
this.storageKey,
|
|
6126
6251
|
JSON.stringify({
|
|
6127
6252
|
...r1.data,
|
|
6128
6253
|
accessTokenExpiresAt: addMinutes(now2, 8).getTime(),
|
|
6129
6254
|
refreshTokenExpiresAt: subMinutes(addDays(now2, 30), 2).getTime()
|
|
6130
|
-
})
|
|
6131
|
-
{ expires: subMinutes(addDays(now2, 30), 2).getTime() }
|
|
6255
|
+
})
|
|
6132
6256
|
);
|
|
6133
6257
|
return {
|
|
6134
6258
|
ok: true,
|
|
@@ -6139,16 +6263,13 @@ var SessionManagerCookie = class {
|
|
|
6139
6263
|
const res2 = await this.authService.createSession(input);
|
|
6140
6264
|
if (res2.ok) {
|
|
6141
6265
|
const now2 = /* @__PURE__ */ new Date();
|
|
6142
|
-
|
|
6266
|
+
localStorage.setItem(
|
|
6143
6267
|
this.storageKey,
|
|
6144
6268
|
JSON.stringify({
|
|
6145
6269
|
...res2.data,
|
|
6146
6270
|
accessTokenExpiresAt: addMinutes(now2, 8).getTime(),
|
|
6147
6271
|
refreshTokenExpiresAt: subMinutes(addDays(now2, 30), 2).getTime()
|
|
6148
|
-
})
|
|
6149
|
-
{
|
|
6150
|
-
expires: subMinutes(addDays(now2, 30), 2).getTime()
|
|
6151
|
-
}
|
|
6272
|
+
})
|
|
6152
6273
|
);
|
|
6153
6274
|
return {
|
|
6154
6275
|
ok: true,
|
|
@@ -6160,18 +6281,18 @@ var SessionManagerCookie = class {
|
|
|
6160
6281
|
if (input.type === "SOCIALS" || input.type === "TOKEN") {
|
|
6161
6282
|
const res2 = await this.authService.createSession({
|
|
6162
6283
|
type: "SOCIALS",
|
|
6163
|
-
token: input.token
|
|
6284
|
+
token: input.token,
|
|
6285
|
+
channel: input.channel
|
|
6164
6286
|
});
|
|
6165
6287
|
if (res2.ok) {
|
|
6166
6288
|
const now2 = /* @__PURE__ */ new Date();
|
|
6167
|
-
|
|
6289
|
+
localStorage.setItem(
|
|
6168
6290
|
this.storageKey,
|
|
6169
6291
|
JSON.stringify({
|
|
6170
6292
|
...res2.data,
|
|
6171
6293
|
accessTokenExpiresAt: addMinutes(now2, 8).getTime(),
|
|
6172
6294
|
refreshTokenExpiresAt: subMinutes(addDays(now2, 30), 2).getTime()
|
|
6173
|
-
})
|
|
6174
|
-
{ expires: subMinutes(addDays(now2, 30), 2).getTime() }
|
|
6295
|
+
})
|
|
6175
6296
|
);
|
|
6176
6297
|
return {
|
|
6177
6298
|
ok: true,
|
|
@@ -6185,14 +6306,13 @@ var SessionManagerCookie = class {
|
|
|
6185
6306
|
const res2 = await this.authService.createSession(input);
|
|
6186
6307
|
if (res2.ok) {
|
|
6187
6308
|
const now2 = /* @__PURE__ */ new Date();
|
|
6188
|
-
|
|
6309
|
+
localStorage.setItem(
|
|
6189
6310
|
this.storageKey,
|
|
6190
6311
|
JSON.stringify({
|
|
6191
6312
|
...res2.data,
|
|
6192
6313
|
accessTokenExpiresAt: addMinutes(now2, 8).getTime(),
|
|
6193
6314
|
refreshTokenExpiresAt: subMinutes(addDays(now2, 30), 2).getTime()
|
|
6194
|
-
})
|
|
6195
|
-
{ expires: subMinutes(addDays(now2, 30), 2).getTime() }
|
|
6315
|
+
})
|
|
6196
6316
|
);
|
|
6197
6317
|
return {
|
|
6198
6318
|
ok: true,
|
|
@@ -6212,14 +6332,13 @@ var SessionManagerCookie = class {
|
|
|
6212
6332
|
};
|
|
6213
6333
|
}
|
|
6214
6334
|
const now = /* @__PURE__ */ new Date();
|
|
6215
|
-
|
|
6335
|
+
localStorage.setItem(
|
|
6216
6336
|
this.storageKey,
|
|
6217
6337
|
JSON.stringify({
|
|
6218
6338
|
...res.data,
|
|
6219
6339
|
accessTokenExpiresAt: addMinutes(now, 8).getTime(),
|
|
6220
6340
|
refreshTokenExpiresAt: subMinutes(addDays(now, 30), 2).getTime()
|
|
6221
|
-
})
|
|
6222
|
-
{}
|
|
6341
|
+
})
|
|
6223
6342
|
);
|
|
6224
6343
|
return {
|
|
6225
6344
|
ok: true,
|
|
@@ -6231,18 +6350,15 @@ var SessionManagerCookie = class {
|
|
|
6231
6350
|
if (res.ok) {
|
|
6232
6351
|
const now = /* @__PURE__ */ new Date();
|
|
6233
6352
|
if (this.isServer) {
|
|
6234
|
-
this.logger.warn("'
|
|
6353
|
+
this.logger.warn("'localStorage' is not available on the server.");
|
|
6235
6354
|
} else {
|
|
6236
|
-
|
|
6355
|
+
localStorage.setItem(
|
|
6237
6356
|
this.storageKey,
|
|
6238
6357
|
JSON.stringify({
|
|
6239
6358
|
...res.data,
|
|
6240
6359
|
accessTokenExpiresAt: addMinutes(now, 8).getTime(),
|
|
6241
6360
|
refreshTokenExpiresAt: subMinutes(addDays(now, 30), 2).getTime()
|
|
6242
|
-
})
|
|
6243
|
-
{
|
|
6244
|
-
expires: subMinutes(addDays(now, 30), 2).getTime()
|
|
6245
|
-
}
|
|
6361
|
+
})
|
|
6246
6362
|
);
|
|
6247
6363
|
}
|
|
6248
6364
|
return { ok: true };
|
|
@@ -6252,7 +6368,7 @@ var SessionManagerCookie = class {
|
|
|
6252
6368
|
}
|
|
6253
6369
|
async get() {
|
|
6254
6370
|
if (this.isServer) {
|
|
6255
|
-
this.logger.warn("'
|
|
6371
|
+
this.logger.warn("'localStorage' is not available on the server.");
|
|
6256
6372
|
return {
|
|
6257
6373
|
ok: true,
|
|
6258
6374
|
data: null
|
|
@@ -6262,7 +6378,7 @@ var SessionManagerCookie = class {
|
|
|
6262
6378
|
await sleep(1e3);
|
|
6263
6379
|
return await this.get();
|
|
6264
6380
|
}
|
|
6265
|
-
const val =
|
|
6381
|
+
const val = localStorage.getItem(this.storageKey);
|
|
6266
6382
|
if (!val) {
|
|
6267
6383
|
return {
|
|
6268
6384
|
ok: true,
|
|
@@ -6276,7 +6392,7 @@ var SessionManagerCookie = class {
|
|
|
6276
6392
|
const refreshTokenExpiresAt = new Date(obj.refreshTokenExpiresAt);
|
|
6277
6393
|
if (isAfter(now, refreshTokenExpiresAt)) {
|
|
6278
6394
|
this.logger.warn("Session expired. Logging out..");
|
|
6279
|
-
|
|
6395
|
+
localStorage.removeItem(this.storageKey);
|
|
6280
6396
|
return {
|
|
6281
6397
|
ok: false,
|
|
6282
6398
|
error: {
|
|
@@ -6293,7 +6409,7 @@ var SessionManagerCookie = class {
|
|
|
6293
6409
|
if (!res.ok) {
|
|
6294
6410
|
this.logger.error(`Failed to refresh session: ${res.error.message}`);
|
|
6295
6411
|
if (res.error.name === "InvalidTokenError" || res.error.name === "AccountBlacklistedError" || res.error.name === "VerificationLockedError") {
|
|
6296
|
-
|
|
6412
|
+
localStorage.removeItem(this.storageKey);
|
|
6297
6413
|
return {
|
|
6298
6414
|
ok: false,
|
|
6299
6415
|
error: res.error
|
|
@@ -6314,9 +6430,7 @@ var SessionManagerCookie = class {
|
|
|
6314
6430
|
accessTokenExpiresAt: addMinutes(now, 8).getTime(),
|
|
6315
6431
|
refreshTokenExpiresAt: subMinutes(addDays(now, 30), 2).getTime()
|
|
6316
6432
|
};
|
|
6317
|
-
|
|
6318
|
-
expires: subMinutes(addDays(now, 30), 2).getTime()
|
|
6319
|
-
});
|
|
6433
|
+
localStorage.setItem(this.storageKey, JSON.stringify(obj));
|
|
6320
6434
|
}
|
|
6321
6435
|
return {
|
|
6322
6436
|
ok: true,
|
|
@@ -6334,13 +6448,13 @@ var SessionManagerCookie = class {
|
|
|
6334
6448
|
}
|
|
6335
6449
|
async refresh() {
|
|
6336
6450
|
if (this.isServer) {
|
|
6337
|
-
this.logger.warn("'
|
|
6451
|
+
this.logger.warn("'localStorage' is not available on the server.");
|
|
6338
6452
|
return {
|
|
6339
6453
|
ok: true,
|
|
6340
6454
|
data: null
|
|
6341
6455
|
};
|
|
6342
6456
|
}
|
|
6343
|
-
const val =
|
|
6457
|
+
const val = localStorage.getItem(this.storageKey);
|
|
6344
6458
|
if (!val) {
|
|
6345
6459
|
return {
|
|
6346
6460
|
ok: true,
|
|
@@ -6357,7 +6471,7 @@ var SessionManagerCookie = class {
|
|
|
6357
6471
|
if (!res.ok) {
|
|
6358
6472
|
this.logger.error(`Failed to refresh session: ${res.error.message}`);
|
|
6359
6473
|
if (res.error.name === "InvalidTokenError" || res.error.name === "AccountBlacklistedError" || res.error.name === "VerificationLockedError") {
|
|
6360
|
-
|
|
6474
|
+
localStorage.removeItem(this.storageKey);
|
|
6361
6475
|
return {
|
|
6362
6476
|
ok: false,
|
|
6363
6477
|
error: res.error
|
|
@@ -6378,9 +6492,7 @@ var SessionManagerCookie = class {
|
|
|
6378
6492
|
accessTokenExpiresAt: addMinutes(now, 8).getTime(),
|
|
6379
6493
|
refreshTokenExpiresAt: subMinutes(addDays(now, 30), 2).getTime()
|
|
6380
6494
|
};
|
|
6381
|
-
|
|
6382
|
-
expires: subMinutes(addDays(now, 30), 2).getTime()
|
|
6383
|
-
});
|
|
6495
|
+
localStorage.setItem(this.storageKey, JSON.stringify(obj));
|
|
6384
6496
|
return {
|
|
6385
6497
|
ok: true,
|
|
6386
6498
|
data: obj
|
|
@@ -6397,18 +6509,18 @@ var SessionManagerCookie = class {
|
|
|
6397
6509
|
}
|
|
6398
6510
|
async destroy() {
|
|
6399
6511
|
if (this.isServer) {
|
|
6400
|
-
this.logger.warn("'
|
|
6512
|
+
this.logger.warn("'localStorage' is not available on the server.");
|
|
6401
6513
|
return;
|
|
6402
6514
|
}
|
|
6403
6515
|
const res = await this.get();
|
|
6404
6516
|
if (res.data?.accessToken) {
|
|
6405
6517
|
await this.authService.destroySession(res.data.accessToken);
|
|
6406
6518
|
}
|
|
6407
|
-
|
|
6519
|
+
localStorage.removeItem(this.storageKey);
|
|
6408
6520
|
}
|
|
6409
6521
|
async verify() {
|
|
6410
6522
|
if (this.isServer) {
|
|
6411
|
-
this.logger.warn("'
|
|
6523
|
+
this.logger.warn("'localStorage' is not available on the server.");
|
|
6412
6524
|
return true;
|
|
6413
6525
|
}
|
|
6414
6526
|
const s = await this.get();
|
|
@@ -6418,13 +6530,13 @@ var SessionManagerCookie = class {
|
|
|
6418
6530
|
if (!s.data) return true;
|
|
6419
6531
|
const v = await this.authService.verifySession(s.data.accessToken);
|
|
6420
6532
|
if (!v) {
|
|
6421
|
-
|
|
6533
|
+
localStorage.removeItem(this.storageKey);
|
|
6422
6534
|
}
|
|
6423
6535
|
return v;
|
|
6424
6536
|
}
|
|
6425
6537
|
get onMaya() {
|
|
6426
6538
|
if (this.isServer) {
|
|
6427
|
-
this.logger.warn("'
|
|
6539
|
+
this.logger.warn("'localStorage' is not available on the server.");
|
|
6428
6540
|
return false;
|
|
6429
6541
|
}
|
|
6430
6542
|
return localStorage.getItem(this.platformStorageKey) === "MAYA";
|
|
@@ -8162,6 +8274,23 @@ var Sdk = class {
|
|
|
8162
8274
|
get middleware() {
|
|
8163
8275
|
return this._middleware;
|
|
8164
8276
|
}
|
|
8277
|
+
initWebDomain() {
|
|
8278
|
+
if (typeof window === "undefined") return;
|
|
8279
|
+
if (core.Capacitor.isNativePlatform()) return;
|
|
8280
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
8281
|
+
const hostname = window.location.hostname;
|
|
8282
|
+
const market = searchParams.get("market");
|
|
8283
|
+
if (market) {
|
|
8284
|
+
sessionStorage.setItem("domain", `${hostname}/${market}`);
|
|
8285
|
+
} else if (sessionStorage.getItem("domain") == null) {
|
|
8286
|
+
sessionStorage.setItem("domain", hostname);
|
|
8287
|
+
}
|
|
8288
|
+
}
|
|
8289
|
+
get webDomain() {
|
|
8290
|
+
if (typeof window === "undefined") return null;
|
|
8291
|
+
if (core.Capacitor.isNativePlatform()) return null;
|
|
8292
|
+
return sessionStorage.getItem("domain");
|
|
8293
|
+
}
|
|
8165
8294
|
/*
|
|
8166
8295
|
*=============================================
|
|
8167
8296
|
* ADS
|
|
@@ -8239,7 +8368,7 @@ var Sdk = class {
|
|
|
8239
8368
|
request.headers.set("Domain", this.memberDomain);
|
|
8240
8369
|
return request;
|
|
8241
8370
|
}
|
|
8242
|
-
const domain = typeof window === "undefined" ?
|
|
8371
|
+
const domain = typeof window === "undefined" ? request.headers.get("Domain") : !core.Capacitor.isNativePlatform() ? request.headers.get("Domain") : core.Capacitor.getPlatform() === "ios" ? `ios/${this.config.platform}`.toLowerCase() : core.Capacitor.getPlatform() === "android" ? `android/${this.config.platform}`.toLowerCase() : request.headers.get("Domain");
|
|
8243
8372
|
if (domain) {
|
|
8244
8373
|
request.headers.set("Domain", domain);
|
|
8245
8374
|
return request;
|
|
@@ -8540,7 +8669,10 @@ var Sdk = class {
|
|
|
8540
8669
|
},
|
|
8541
8670
|
referralCode: input.referralCode,
|
|
8542
8671
|
verificationCode: input.verificationCode,
|
|
8543
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
8672
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
8673
|
+
...this.webDomain && {
|
|
8674
|
+
domain: this.webDomain
|
|
8675
|
+
}
|
|
8544
8676
|
});
|
|
8545
8677
|
return res.ok ? { ok: true, data: { id } } : res;
|
|
8546
8678
|
}
|
|
@@ -8564,7 +8696,10 @@ var Sdk = class {
|
|
|
8564
8696
|
referralCode: input.referralCode,
|
|
8565
8697
|
verificationCode: input.verificationCode,
|
|
8566
8698
|
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
8567
|
-
testPass: input.testPass
|
|
8699
|
+
testPass: input.testPass,
|
|
8700
|
+
...this.webDomain && {
|
|
8701
|
+
domain: this.webDomain
|
|
8702
|
+
}
|
|
8568
8703
|
});
|
|
8569
8704
|
return res2.ok ? { ok: true, data: { id } } : res2;
|
|
8570
8705
|
}
|
|
@@ -8579,7 +8714,10 @@ var Sdk = class {
|
|
|
8579
8714
|
},
|
|
8580
8715
|
mobileNumberVerificationCode: input.mobileVerificationCode,
|
|
8581
8716
|
testPass: input.testPass,
|
|
8582
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
8717
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
8718
|
+
...this.webDomain && {
|
|
8719
|
+
domain: this.webDomain
|
|
8720
|
+
}
|
|
8583
8721
|
}
|
|
8584
8722
|
);
|
|
8585
8723
|
return res2.ok ? { ok: true, data: { id } } : res2;
|
|
@@ -8594,7 +8732,10 @@ var Sdk = class {
|
|
|
8594
8732
|
password: await sha256(input.password),
|
|
8595
8733
|
mobileNumber: input.mobileNumber ? addAreaCode(input.mobileNumber, await this.locale) : void 0
|
|
8596
8734
|
},
|
|
8597
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
8735
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
8736
|
+
...this.webDomain && {
|
|
8737
|
+
domain: this.webDomain
|
|
8738
|
+
}
|
|
8598
8739
|
});
|
|
8599
8740
|
return res2.ok ? { ok: true, data: { id } } : res2;
|
|
8600
8741
|
}
|
|
@@ -8604,7 +8745,10 @@ var Sdk = class {
|
|
|
8604
8745
|
name: input.name,
|
|
8605
8746
|
password: await sha256(input.password)
|
|
8606
8747
|
},
|
|
8607
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
8748
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
8749
|
+
...this.webDomain && {
|
|
8750
|
+
domain: this.webDomain
|
|
8751
|
+
}
|
|
8608
8752
|
});
|
|
8609
8753
|
return res.ok ? { ok: true, data: { id } } : res;
|
|
8610
8754
|
}
|
|
@@ -8614,6 +8758,9 @@ var Sdk = class {
|
|
|
8614
8758
|
name: input.name,
|
|
8615
8759
|
password: await sha256(input.password),
|
|
8616
8760
|
domain: input.domain
|
|
8761
|
+
},
|
|
8762
|
+
...this.webDomain && {
|
|
8763
|
+
domain: this.webDomain
|
|
8617
8764
|
}
|
|
8618
8765
|
});
|
|
8619
8766
|
}
|
|
@@ -8812,7 +8959,10 @@ var Sdk = class {
|
|
|
8812
8959
|
amount: input.amount.toString(),
|
|
8813
8960
|
transactionPassword: await sha256(input.transactionPassword)
|
|
8814
8961
|
},
|
|
8815
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
8962
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
8963
|
+
...this.webDomain && {
|
|
8964
|
+
domain: this.webDomain
|
|
8965
|
+
}
|
|
8816
8966
|
});
|
|
8817
8967
|
if (!res.ok) return res;
|
|
8818
8968
|
}
|
|
@@ -8836,7 +8986,10 @@ var Sdk = class {
|
|
|
8836
8986
|
await this.locale
|
|
8837
8987
|
)
|
|
8838
8988
|
},
|
|
8839
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
8989
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
8990
|
+
...this.webDomain && {
|
|
8991
|
+
domain: this.webDomain
|
|
8992
|
+
}
|
|
8840
8993
|
});
|
|
8841
8994
|
if (!res.ok) return res;
|
|
8842
8995
|
}
|
|
@@ -8851,7 +9004,10 @@ var Sdk = class {
|
|
|
8851
9004
|
await this.locale
|
|
8852
9005
|
)
|
|
8853
9006
|
},
|
|
8854
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9007
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9008
|
+
...this.webDomain && {
|
|
9009
|
+
domain: this.webDomain
|
|
9010
|
+
}
|
|
8855
9011
|
});
|
|
8856
9012
|
if (!res.ok) return res;
|
|
8857
9013
|
}
|
|
@@ -8866,7 +9022,10 @@ var Sdk = class {
|
|
|
8866
9022
|
await this.locale
|
|
8867
9023
|
)
|
|
8868
9024
|
},
|
|
8869
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9025
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9026
|
+
...this.webDomain && {
|
|
9027
|
+
domain: this.webDomain
|
|
9028
|
+
}
|
|
8870
9029
|
});
|
|
8871
9030
|
if (!res.ok) return res;
|
|
8872
9031
|
}
|
|
@@ -8877,7 +9036,10 @@ var Sdk = class {
|
|
|
8877
9036
|
amount: input.amount.toString(),
|
|
8878
9037
|
transactionPassword: await sha256(input.transactionPassword)
|
|
8879
9038
|
},
|
|
8880
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9039
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9040
|
+
...this.webDomain && {
|
|
9041
|
+
domain: this.webDomain
|
|
9042
|
+
}
|
|
8881
9043
|
});
|
|
8882
9044
|
if (!res.ok) return res;
|
|
8883
9045
|
}
|
|
@@ -8891,7 +9053,10 @@ var Sdk = class {
|
|
|
8891
9053
|
accountName: input.accountName,
|
|
8892
9054
|
transactionPassword: await sha256(input.transactionPassword)
|
|
8893
9055
|
},
|
|
8894
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9056
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9057
|
+
...this.webDomain && {
|
|
9058
|
+
domain: this.webDomain
|
|
9059
|
+
}
|
|
8895
9060
|
});
|
|
8896
9061
|
if (!res.ok) return res;
|
|
8897
9062
|
}
|
|
@@ -8905,7 +9070,10 @@ var Sdk = class {
|
|
|
8905
9070
|
transactionPassword: await sha256(input.transactionPassword),
|
|
8906
9071
|
accountName: input.accountName
|
|
8907
9072
|
},
|
|
8908
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9073
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9074
|
+
...this.webDomain && {
|
|
9075
|
+
domain: this.webDomain
|
|
9076
|
+
}
|
|
8909
9077
|
});
|
|
8910
9078
|
if (!res.ok) return res;
|
|
8911
9079
|
}
|
|
@@ -8916,7 +9084,10 @@ var Sdk = class {
|
|
|
8916
9084
|
amount: input.amount.toString(),
|
|
8917
9085
|
upiId: input.upiId
|
|
8918
9086
|
},
|
|
8919
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9087
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9088
|
+
...this.webDomain && {
|
|
9089
|
+
domain: this.webDomain
|
|
9090
|
+
}
|
|
8920
9091
|
});
|
|
8921
9092
|
if (!res.ok) return res;
|
|
8922
9093
|
}
|
|
@@ -8929,7 +9100,10 @@ var Sdk = class {
|
|
|
8929
9100
|
bankAccountNumber: input.bankAccountNumber,
|
|
8930
9101
|
bankIFSCCode: input.bankIFSCCode
|
|
8931
9102
|
},
|
|
8932
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9103
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9104
|
+
...this.webDomain && {
|
|
9105
|
+
domain: this.webDomain
|
|
9106
|
+
}
|
|
8933
9107
|
});
|
|
8934
9108
|
if (!res.ok) return res;
|
|
8935
9109
|
}
|
|
@@ -8976,6 +9150,9 @@ var Sdk = class {
|
|
|
8976
9150
|
id,
|
|
8977
9151
|
amount: input.amount.toString(),
|
|
8978
9152
|
promo: input.promo
|
|
9153
|
+
},
|
|
9154
|
+
...this.webDomain && {
|
|
9155
|
+
domain: this.webDomain
|
|
8979
9156
|
}
|
|
8980
9157
|
});
|
|
8981
9158
|
if (!res.ok) return res;
|
|
@@ -8987,7 +9164,10 @@ var Sdk = class {
|
|
|
8987
9164
|
amount: input.amount.toString(),
|
|
8988
9165
|
promo: input.promo
|
|
8989
9166
|
},
|
|
8990
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9167
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9168
|
+
...this.webDomain && {
|
|
9169
|
+
domain: this.webDomain
|
|
9170
|
+
}
|
|
8991
9171
|
});
|
|
8992
9172
|
if (!res.ok) return res;
|
|
8993
9173
|
}
|
|
@@ -8998,7 +9178,10 @@ var Sdk = class {
|
|
|
8998
9178
|
amount: input.amount.toString(),
|
|
8999
9179
|
promo: input.promo
|
|
9000
9180
|
},
|
|
9001
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9181
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9182
|
+
...this.webDomain && {
|
|
9183
|
+
domain: this.webDomain
|
|
9184
|
+
}
|
|
9002
9185
|
});
|
|
9003
9186
|
if (!res.ok) return res;
|
|
9004
9187
|
}
|
|
@@ -9009,7 +9192,10 @@ var Sdk = class {
|
|
|
9009
9192
|
amount: input.amount.toString(),
|
|
9010
9193
|
promo: input.promo
|
|
9011
9194
|
},
|
|
9012
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9195
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9196
|
+
...this.webDomain && {
|
|
9197
|
+
domain: this.webDomain
|
|
9198
|
+
}
|
|
9013
9199
|
});
|
|
9014
9200
|
if (!res.ok) return res;
|
|
9015
9201
|
}
|
|
@@ -9021,7 +9207,10 @@ var Sdk = class {
|
|
|
9021
9207
|
promo: input.promo,
|
|
9022
9208
|
redirectUrl: `${ENDPOINTS[environment].opexapay}/aio/success?redirectUrl=${input.redirectUrl}?deposit=${id}`
|
|
9023
9209
|
},
|
|
9024
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9210
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9211
|
+
...this.webDomain && {
|
|
9212
|
+
domain: this.webDomain
|
|
9213
|
+
}
|
|
9025
9214
|
});
|
|
9026
9215
|
if (!res.ok) return res;
|
|
9027
9216
|
}
|
|
@@ -9033,7 +9222,10 @@ var Sdk = class {
|
|
|
9033
9222
|
promo: input.promo,
|
|
9034
9223
|
redirectUrl: `${ENDPOINTS[environment].opexapay}/aio/success?redirectUrl=${input.redirectUrl}?deposit=${id}`
|
|
9035
9224
|
},
|
|
9036
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9225
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9226
|
+
...this.webDomain && {
|
|
9227
|
+
domain: this.webDomain
|
|
9228
|
+
}
|
|
9037
9229
|
});
|
|
9038
9230
|
if (!res.ok) return res;
|
|
9039
9231
|
}
|
|
@@ -9045,7 +9237,10 @@ var Sdk = class {
|
|
|
9045
9237
|
promo: input.promo,
|
|
9046
9238
|
redirectUrl: `${ENDPOINTS[environment].opexapay}/aio/success?redirectUrl=${input.redirectUrl}?deposit=${id}`
|
|
9047
9239
|
},
|
|
9048
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9240
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9241
|
+
...this.webDomain && {
|
|
9242
|
+
domain: this.webDomain
|
|
9243
|
+
}
|
|
9049
9244
|
});
|
|
9050
9245
|
if (!res.ok) return res;
|
|
9051
9246
|
}
|
|
@@ -9057,7 +9252,10 @@ var Sdk = class {
|
|
|
9057
9252
|
promo: input.promo,
|
|
9058
9253
|
redirectUrl: `${ENDPOINTS[environment].opexapay}/aio/success?redirectUrl=${input.redirectUrl}?deposit=${id}`
|
|
9059
9254
|
},
|
|
9060
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9255
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9256
|
+
...this.webDomain && {
|
|
9257
|
+
domain: this.webDomain
|
|
9258
|
+
}
|
|
9061
9259
|
});
|
|
9062
9260
|
if (!res.ok) return res;
|
|
9063
9261
|
}
|
|
@@ -9068,7 +9266,10 @@ var Sdk = class {
|
|
|
9068
9266
|
amount: input.amount.toString(),
|
|
9069
9267
|
promo: input.promo
|
|
9070
9268
|
},
|
|
9071
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9269
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9270
|
+
...this.webDomain && {
|
|
9271
|
+
domain: this.webDomain
|
|
9272
|
+
}
|
|
9072
9273
|
});
|
|
9073
9274
|
if (!res.ok) return res;
|
|
9074
9275
|
}
|
|
@@ -9079,7 +9280,10 @@ var Sdk = class {
|
|
|
9079
9280
|
amount: input.amount.toString(),
|
|
9080
9281
|
promo: input.promo
|
|
9081
9282
|
},
|
|
9082
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9283
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9284
|
+
...this.webDomain && {
|
|
9285
|
+
domain: this.webDomain
|
|
9286
|
+
}
|
|
9083
9287
|
});
|
|
9084
9288
|
if (!res.ok) return res;
|
|
9085
9289
|
}
|
|
@@ -9092,7 +9296,10 @@ var Sdk = class {
|
|
|
9092
9296
|
referenceImage: input.referenceImage,
|
|
9093
9297
|
promo: input.promo
|
|
9094
9298
|
},
|
|
9095
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9299
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9300
|
+
...this.webDomain && {
|
|
9301
|
+
domain: this.webDomain
|
|
9302
|
+
}
|
|
9096
9303
|
});
|
|
9097
9304
|
if (!res.ok) return res;
|
|
9098
9305
|
}
|
|
@@ -9104,7 +9311,10 @@ var Sdk = class {
|
|
|
9104
9311
|
referenceImage: input.referenceId,
|
|
9105
9312
|
promo: input.promo
|
|
9106
9313
|
},
|
|
9107
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9314
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9315
|
+
...this.webDomain && {
|
|
9316
|
+
domain: this.webDomain
|
|
9317
|
+
}
|
|
9108
9318
|
});
|
|
9109
9319
|
if (!res.ok) return res;
|
|
9110
9320
|
}
|
|
@@ -9117,7 +9327,10 @@ var Sdk = class {
|
|
|
9117
9327
|
cancelRedirectionUrl: input.cancelRedirectionUrl,
|
|
9118
9328
|
successRedirectionUrl: input.successRedirectionUrl
|
|
9119
9329
|
},
|
|
9120
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9330
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9331
|
+
...this.webDomain && {
|
|
9332
|
+
domain: this.webDomain
|
|
9333
|
+
}
|
|
9121
9334
|
});
|
|
9122
9335
|
if (!res.ok) return res;
|
|
9123
9336
|
}
|
|
@@ -9129,7 +9342,10 @@ var Sdk = class {
|
|
|
9129
9342
|
promo: input.promo,
|
|
9130
9343
|
redirectUrl: input.redirectUrl
|
|
9131
9344
|
},
|
|
9132
|
-
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
9345
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9346
|
+
...this.webDomain && {
|
|
9347
|
+
domain: this.webDomain
|
|
9348
|
+
}
|
|
9133
9349
|
});
|
|
9134
9350
|
if (!res.ok) return res;
|
|
9135
9351
|
}
|
|
@@ -9513,12 +9729,18 @@ var Sdk = class {
|
|
|
9513
9729
|
input: {
|
|
9514
9730
|
id,
|
|
9515
9731
|
game: input.reference
|
|
9732
|
+
},
|
|
9733
|
+
...this.webDomain && {
|
|
9734
|
+
domain: this.webDomain
|
|
9516
9735
|
}
|
|
9517
9736
|
}) : await this.gameService.createGameSession({
|
|
9518
9737
|
input: {
|
|
9519
9738
|
id,
|
|
9520
9739
|
game: input.reference,
|
|
9521
9740
|
homepageUrl: typeof window === "undefined" ? void 0 : input.homepageUrl
|
|
9741
|
+
},
|
|
9742
|
+
...this.webDomain && {
|
|
9743
|
+
domain: this.webDomain
|
|
9522
9744
|
}
|
|
9523
9745
|
});
|
|
9524
9746
|
return res.ok ? { ok: true, data: { id } } : res;
|
|
@@ -9551,12 +9773,18 @@ var Sdk = class {
|
|
|
9551
9773
|
}
|
|
9552
9774
|
const { provider, reference } = res0.data;
|
|
9553
9775
|
const res1 = NEW_GAME_PROVIDERS.includes(provider) ? await this.walletService.createGameSession({
|
|
9554
|
-
input: { id, game: reference }
|
|
9776
|
+
input: { id, game: reference },
|
|
9777
|
+
...this.webDomain && {
|
|
9778
|
+
domain: this.webDomain
|
|
9779
|
+
}
|
|
9555
9780
|
}) : await this.gameService.createGameSession({
|
|
9556
9781
|
input: {
|
|
9557
9782
|
id,
|
|
9558
9783
|
game: reference,
|
|
9559
9784
|
homepageUrl: typeof window === "undefined" ? void 0 : input.homepageUrl
|
|
9785
|
+
},
|
|
9786
|
+
...this.webDomain && {
|
|
9787
|
+
domain: this.webDomain
|
|
9560
9788
|
}
|
|
9561
9789
|
});
|
|
9562
9790
|
return res1.ok ? { ok: true, data: { id } } : res1;
|