@opexa/portal-sdk 0.34.3 → 0.34.5
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 +62 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -5
- package/dist/index.d.ts +10 -5
- package/dist/index.js +62 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -562,6 +562,36 @@ var CREATE_GCASH_DEPOSIT_MUTATION = gql`
|
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
564
|
`;
|
|
565
|
+
var CREATE_GCASH_DIRECT_WEBPAY_DEPOSIT_MUTATION = gql`
|
|
566
|
+
mutation CreateGCashDirectWebpayDeposit($input: CreateGCashDirectWebpayDepositInput!) {
|
|
567
|
+
createGCashDirectWebpayDeposit(input: $input) {
|
|
568
|
+
... on DepositPromoMaximumAmountExceededError {
|
|
569
|
+
__typename
|
|
570
|
+
}
|
|
571
|
+
... on DepositPromoMinimumAmountNotMetError {
|
|
572
|
+
__typename
|
|
573
|
+
}
|
|
574
|
+
... on MaximumDepositAmountExceededError {
|
|
575
|
+
__typename
|
|
576
|
+
}
|
|
577
|
+
... on MinimumDepositAmountNotMetError {
|
|
578
|
+
__typename
|
|
579
|
+
}
|
|
580
|
+
... on MinimumFirstDepositAmountNotMetError {
|
|
581
|
+
__typename
|
|
582
|
+
}
|
|
583
|
+
... on PromoNotEnabledError {
|
|
584
|
+
__typename
|
|
585
|
+
}
|
|
586
|
+
... on WalletDoesNotExistError {
|
|
587
|
+
__typename
|
|
588
|
+
}
|
|
589
|
+
... on GCashDirectApiRequestError {
|
|
590
|
+
__typename
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
`;
|
|
565
595
|
var CREATE_MAYA_DEPOSIT_MUTATION = gql`
|
|
566
596
|
mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
|
|
567
597
|
createMayaDeposit(input: $input) {
|
|
@@ -3363,6 +3393,26 @@ var WalletService = class {
|
|
|
3363
3393
|
ok: true
|
|
3364
3394
|
};
|
|
3365
3395
|
}
|
|
3396
|
+
async createGCashDirectWebpayDeposit(variables) {
|
|
3397
|
+
const { reCAPTCHAResponse, ...others } = variables;
|
|
3398
|
+
const res = await this.client.request(CREATE_GCASH_DIRECT_WEBPAY_DEPOSIT_MUTATION, others, {
|
|
3399
|
+
headers: {
|
|
3400
|
+
...reCAPTCHAResponse && {
|
|
3401
|
+
"google-recaptcha-response": reCAPTCHAResponse
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
});
|
|
3405
|
+
if (!res.ok) return res;
|
|
3406
|
+
if (res.data.createGCashDirectWebpayDeposit) {
|
|
3407
|
+
return {
|
|
3408
|
+
ok: false,
|
|
3409
|
+
error: createOperationError(res.data.createGCashDirectWebpayDeposit.__typename)
|
|
3410
|
+
};
|
|
3411
|
+
}
|
|
3412
|
+
return {
|
|
3413
|
+
ok: true
|
|
3414
|
+
};
|
|
3415
|
+
}
|
|
3366
3416
|
async createMayaDeposit(variables) {
|
|
3367
3417
|
const { reCAPTCHAResponse, ...others } = variables;
|
|
3368
3418
|
const res = await this.client.request(CREATE_MAYA_DEPOSIT_MUTATION, others, {
|
|
@@ -4192,7 +4242,7 @@ var DomainManager = class {
|
|
|
4192
4242
|
) || navigator.userAgent.includes("Mac") && "ontouchend" in window) && this.isNative;
|
|
4193
4243
|
}
|
|
4194
4244
|
get isAndroidApp() {
|
|
4195
|
-
return /Android/i.test(navigator.userAgent) && (window.Capacitor?.isNativePlatform?.() || window.cordova !== undefined || /(wv|Version\/)/i.test(navigator.userAgent));
|
|
4245
|
+
return this.isNative && /Android/i.test(navigator.userAgent) && (window.Capacitor?.isNativePlatform?.() || window.cordova !== undefined || /(wv|Version\/)/i.test(navigator.userAgent));
|
|
4196
4246
|
}
|
|
4197
4247
|
};
|
|
4198
4248
|
|
|
@@ -6317,6 +6367,17 @@ var Sdk = class {
|
|
|
6317
6367
|
});
|
|
6318
6368
|
if (!res.ok) return res;
|
|
6319
6369
|
}
|
|
6370
|
+
if (input.type === "GCASH_DIRECT_WEBPAY") {
|
|
6371
|
+
const res = await this.walletService.createGCashDirectWebpayDeposit({
|
|
6372
|
+
input: {
|
|
6373
|
+
id,
|
|
6374
|
+
amount: input.amount.toString(),
|
|
6375
|
+
promo: input.promo
|
|
6376
|
+
},
|
|
6377
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
6378
|
+
});
|
|
6379
|
+
if (!res.ok) return res;
|
|
6380
|
+
}
|
|
6320
6381
|
return { ok: true, data: { id } };
|
|
6321
6382
|
}
|
|
6322
6383
|
async deposit(id) {
|