@opexa/portal-sdk 0.50.1 → 0.50.3
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 +108 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +108 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -762,6 +762,33 @@ var CREATE_GCASH_WEBPAY_DEPOSIT_MUTATION = gql`
|
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
764
|
`;
|
|
765
|
+
var CREATE_MAYA_WEBPAY_DEPOSIT_MUTATION = gql`
|
|
766
|
+
mutation CreateMayaWebpayDeposit($input: CreateMayaWebpayDepositInput!) {
|
|
767
|
+
createMayaWebpayDeposit(input: $input) {
|
|
768
|
+
... on DepositPromoMaximumAmountExceededError {
|
|
769
|
+
__typename
|
|
770
|
+
}
|
|
771
|
+
... on DepositPromoMinimumAmountNotMetError {
|
|
772
|
+
__typename
|
|
773
|
+
}
|
|
774
|
+
... on MaximumDepositAmountExceededError {
|
|
775
|
+
__typename
|
|
776
|
+
}
|
|
777
|
+
... on MinimumDepositAmountNotMetError {
|
|
778
|
+
__typename
|
|
779
|
+
}
|
|
780
|
+
... on MinimumFirstDepositAmountNotMetError {
|
|
781
|
+
__typename
|
|
782
|
+
}
|
|
783
|
+
... on PromoNotEnabledError {
|
|
784
|
+
__typename
|
|
785
|
+
}
|
|
786
|
+
... on WalletDoesNotExistError {
|
|
787
|
+
__typename
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
`;
|
|
765
792
|
var CREATE_MAYA_DEPOSIT_MUTATION = gql`
|
|
766
793
|
mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
|
|
767
794
|
createMayaDeposit(input: $input) {
|
|
@@ -1131,6 +1158,13 @@ var DEPOSIT_QUERY = gql`
|
|
|
1131
1158
|
checkoutUrl
|
|
1132
1159
|
error
|
|
1133
1160
|
}
|
|
1161
|
+
... on MayaWebpayDeposit {
|
|
1162
|
+
id
|
|
1163
|
+
type
|
|
1164
|
+
status
|
|
1165
|
+
checkoutUrl
|
|
1166
|
+
error
|
|
1167
|
+
}
|
|
1134
1168
|
}
|
|
1135
1169
|
}
|
|
1136
1170
|
`;
|
|
@@ -2133,6 +2167,9 @@ var PAYMENT_SETTINGS_QUERY = gql`
|
|
|
2133
2167
|
mayaAppDepositGatewaySettings: depositGatewaySettings(gateway: MAYA_APP) {
|
|
2134
2168
|
...DepositGatewaySettingsCoreData
|
|
2135
2169
|
}
|
|
2170
|
+
mayaWebpayDepositGatewaySettings: depositGatewaySettings(gateway: MAYA_WEBPAY) {
|
|
2171
|
+
...DepositGatewaySettingsCoreData
|
|
2172
|
+
}
|
|
2136
2173
|
onlineBankDepositGatewaySettings: depositGatewaySettings(
|
|
2137
2174
|
gateway: ONLINE_BANK
|
|
2138
2175
|
) {
|
|
@@ -4277,6 +4314,28 @@ var WalletService = class {
|
|
|
4277
4314
|
ok: true
|
|
4278
4315
|
};
|
|
4279
4316
|
}
|
|
4317
|
+
async createMayaWebpayDeposit(variables) {
|
|
4318
|
+
const { reCAPTCHAResponse, ...others } = variables;
|
|
4319
|
+
const res = await this.client.request(CREATE_MAYA_WEBPAY_DEPOSIT_MUTATION, others, {
|
|
4320
|
+
headers: {
|
|
4321
|
+
...reCAPTCHAResponse && {
|
|
4322
|
+
"google-recaptcha-response": reCAPTCHAResponse
|
|
4323
|
+
}
|
|
4324
|
+
}
|
|
4325
|
+
});
|
|
4326
|
+
if (!res.ok) return res;
|
|
4327
|
+
if (res.data.createMayaWebpayDeposit) {
|
|
4328
|
+
return {
|
|
4329
|
+
ok: false,
|
|
4330
|
+
error: createOperationError(
|
|
4331
|
+
res.data.createMayaWebpayDeposit.__typename
|
|
4332
|
+
)
|
|
4333
|
+
};
|
|
4334
|
+
}
|
|
4335
|
+
return {
|
|
4336
|
+
ok: true
|
|
4337
|
+
};
|
|
4338
|
+
}
|
|
4280
4339
|
async createMayaDeposit(variables) {
|
|
4281
4340
|
const { reCAPTCHAResponse, ...others } = variables;
|
|
4282
4341
|
const res = await this.client.request(CREATE_MAYA_DEPOSIT_MUTATION, others, {
|
|
@@ -4350,7 +4409,9 @@ var WalletService = class {
|
|
|
4350
4409
|
if (res.data.createAiOPayMayaDeposit) {
|
|
4351
4410
|
return {
|
|
4352
4411
|
ok: false,
|
|
4353
|
-
error: createOperationError(
|
|
4412
|
+
error: createOperationError(
|
|
4413
|
+
res.data.createAiOPayMayaDeposit.__typename
|
|
4414
|
+
)
|
|
4354
4415
|
};
|
|
4355
4416
|
}
|
|
4356
4417
|
return {
|
|
@@ -4370,7 +4431,9 @@ var WalletService = class {
|
|
|
4370
4431
|
if (res.data.createAiOGrabPayDeposit) {
|
|
4371
4432
|
return {
|
|
4372
4433
|
ok: false,
|
|
4373
|
-
error: createOperationError(
|
|
4434
|
+
error: createOperationError(
|
|
4435
|
+
res.data.createAiOGrabPayDeposit.__typename
|
|
4436
|
+
)
|
|
4374
4437
|
};
|
|
4375
4438
|
}
|
|
4376
4439
|
return {
|
|
@@ -4390,7 +4453,9 @@ var WalletService = class {
|
|
|
4390
4453
|
if (res.data.createAiOPalawanPayDeposit) {
|
|
4391
4454
|
return {
|
|
4392
4455
|
ok: false,
|
|
4393
|
-
error: createOperationError(
|
|
4456
|
+
error: createOperationError(
|
|
4457
|
+
res.data.createAiOPalawanPayDeposit.__typename
|
|
4458
|
+
)
|
|
4394
4459
|
};
|
|
4395
4460
|
}
|
|
4396
4461
|
return {
|
|
@@ -4534,7 +4599,9 @@ var WalletService = class {
|
|
|
4534
4599
|
if (res.data.createGCashStandardCashInWithdrawal) {
|
|
4535
4600
|
return {
|
|
4536
4601
|
ok: false,
|
|
4537
|
-
error: createOperationError(
|
|
4602
|
+
error: createOperationError(
|
|
4603
|
+
res.data.createGCashStandardCashInWithdrawal.__typename
|
|
4604
|
+
)
|
|
4538
4605
|
};
|
|
4539
4606
|
}
|
|
4540
4607
|
return {
|
|
@@ -6358,6 +6425,18 @@ var Transformer = class {
|
|
|
6358
6425
|
data.mayaAppDepositGatewaySettings?.maximumAmount
|
|
6359
6426
|
)
|
|
6360
6427
|
},
|
|
6428
|
+
mayaWebpay: {
|
|
6429
|
+
androidEnabled: data.mayaWebpayDepositGatewaySettings?.androidEnabled ?? false,
|
|
6430
|
+
iosEnabled: data.mayaWebpayDepositGatewaySettings?.iosEnabled ?? false,
|
|
6431
|
+
webEnabled: data.mayaWebpayDepositGatewaySettings?.webEnabled ?? false,
|
|
6432
|
+
mobileWebEnabled: data.mayaWebpayDepositGatewaySettings?.mobileWebEnabled ?? false,
|
|
6433
|
+
minimumAmount: parseDecimal(
|
|
6434
|
+
data.mayaWebpayDepositGatewaySettings?.minimumAmount
|
|
6435
|
+
),
|
|
6436
|
+
maximumAmount: parseDecimal(
|
|
6437
|
+
data.mayaWebpayDepositGatewaySettings?.maximumAmount
|
|
6438
|
+
)
|
|
6439
|
+
},
|
|
6361
6440
|
onlineBank: {
|
|
6362
6441
|
androidEnabled: data.onlineBankDepositGatewaySettings?.androidEnabled ?? false,
|
|
6363
6442
|
iosEnabled: data.onlineBankDepositGatewaySettings?.iosEnabled ?? false,
|
|
@@ -6833,6 +6912,18 @@ var Transformer = class {
|
|
|
6833
6912
|
data.mayaAppDepositGatewaySettings?.maximumAmount
|
|
6834
6913
|
)
|
|
6835
6914
|
},
|
|
6915
|
+
mayaWebpay: {
|
|
6916
|
+
androidEnabled: data.mayaWebpayDepositGatewaySettings?.androidEnabled ?? false,
|
|
6917
|
+
iosEnabled: data.mayaWebpayDepositGatewaySettings?.iosEnabled ?? false,
|
|
6918
|
+
webEnabled: data.mayaWebpayDepositGatewaySettings?.webEnabled ?? false,
|
|
6919
|
+
mobileWebEnabled: data.mayaWebpayDepositGatewaySettings?.mobileWebEnabled ?? false,
|
|
6920
|
+
minimumAmount: parseDecimal(
|
|
6921
|
+
data.mayaWebpayDepositGatewaySettings?.minimumAmount
|
|
6922
|
+
),
|
|
6923
|
+
maximumAmount: parseDecimal(
|
|
6924
|
+
data.mayaWebpayDepositGatewaySettings?.maximumAmount
|
|
6925
|
+
)
|
|
6926
|
+
},
|
|
6836
6927
|
onlineBank: {
|
|
6837
6928
|
androidEnabled: data.onlineBankDepositGatewaySettings?.androidEnabled ?? false,
|
|
6838
6929
|
iosEnabled: data.onlineBankDepositGatewaySettings?.iosEnabled ?? false,
|
|
@@ -8703,6 +8794,18 @@ var Sdk = class {
|
|
|
8703
8794
|
});
|
|
8704
8795
|
if (!res.ok) return res;
|
|
8705
8796
|
}
|
|
8797
|
+
if (input.type === "MAYA_WEBPAY") {
|
|
8798
|
+
const res = await this.walletService.createMayaWebpayDeposit({
|
|
8799
|
+
input: {
|
|
8800
|
+
id,
|
|
8801
|
+
amount: input.amount.toString(),
|
|
8802
|
+
promo: input.promo,
|
|
8803
|
+
redirectUrl: input.redirectUrl
|
|
8804
|
+
},
|
|
8805
|
+
reCAPTCHAResponse: input.reCAPTCHAResponse
|
|
8806
|
+
});
|
|
8807
|
+
if (!res.ok) return res;
|
|
8808
|
+
}
|
|
8706
8809
|
return { ok: true, data: { id } };
|
|
8707
8810
|
}
|
|
8708
8811
|
async deposit(id) {
|
|
@@ -9549,7 +9652,7 @@ var NEW_GAME_PROVIDERS = [
|
|
|
9549
9652
|
"NO_LIMIT_CITY",
|
|
9550
9653
|
"BIG_TIME_GAMING",
|
|
9551
9654
|
"SAGAMING",
|
|
9552
|
-
"
|
|
9655
|
+
"JK8"
|
|
9553
9656
|
];
|
|
9554
9657
|
var ENDPOINTS = {
|
|
9555
9658
|
development: {
|