@opexa/portal-sdk 0.50.7 → 0.50.8
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 +32 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -819,6 +819,15 @@ var CREATE_MAYA_DEPOSIT_MUTATION = gql`
|
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
821
|
`;
|
|
822
|
+
var CREATE_TEST_DEPOSIT_MUTATION = gql`
|
|
823
|
+
mutation CreateTestDeposit($input: CreateTestDepositInput!) {
|
|
824
|
+
createTestDeposit(input: $input) {
|
|
825
|
+
... on WalletDoesNotExistError {
|
|
826
|
+
__typename
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
`;
|
|
822
831
|
var CREATE_MAYA_APP_DEPOSIT_MUTATION = gql`
|
|
823
832
|
mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
|
|
824
833
|
createMayaAppDeposit(input: $input) {
|
|
@@ -4377,6 +4386,19 @@ var WalletService = class {
|
|
|
4377
4386
|
ok: true
|
|
4378
4387
|
};
|
|
4379
4388
|
}
|
|
4389
|
+
async createTestDeposit(variables) {
|
|
4390
|
+
const res = await this.client.request(CREATE_TEST_DEPOSIT_MUTATION, variables);
|
|
4391
|
+
if (!res.ok) return res;
|
|
4392
|
+
if (res.data.createTestDeposit) {
|
|
4393
|
+
return {
|
|
4394
|
+
ok: false,
|
|
4395
|
+
error: createOperationError(res.data.createTestDeposit.__typename)
|
|
4396
|
+
};
|
|
4397
|
+
}
|
|
4398
|
+
return {
|
|
4399
|
+
ok: true
|
|
4400
|
+
};
|
|
4401
|
+
}
|
|
4380
4402
|
async createAIOQRPHDeposit(variables) {
|
|
4381
4403
|
const { reCAPTCHAResponse, ...others } = variables;
|
|
4382
4404
|
const res = await this.client.request(CREATE_AIO_QRPH_DEPOSIT_MUTATION, others, {
|
|
@@ -8678,6 +8700,16 @@ var Sdk = class {
|
|
|
8678
8700
|
async createDeposit(input) {
|
|
8679
8701
|
const id = input.id ?? objectId.ObjectId.generate(ObjectType.Deposit).toString();
|
|
8680
8702
|
const environment = this.config.environment ?? "development";
|
|
8703
|
+
if (input.type === "TEST") {
|
|
8704
|
+
const res = await this.walletService.createTestDeposit({
|
|
8705
|
+
input: {
|
|
8706
|
+
id,
|
|
8707
|
+
amount: input.amount.toString(),
|
|
8708
|
+
promo: input.promo
|
|
8709
|
+
}
|
|
8710
|
+
});
|
|
8711
|
+
if (!res.ok) return res;
|
|
8712
|
+
}
|
|
8681
8713
|
if (input.type === "MAYA") {
|
|
8682
8714
|
const res = await this.walletService.createMayaDeposit({
|
|
8683
8715
|
input: {
|