@opexa/portal-sdk 0.54.6 → 0.54.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 CHANGED
@@ -494,8 +494,14 @@ var CREATE_GCASH_STANDARD_CASHIN_WITHDRAWAL_MUTATION = gql`
494
494
  }
495
495
  `;
496
496
  var CREATE_MAYA_WITHDRAWAL_MUTATION = gql`
497
- mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
498
- createMayaWithdrawal(input: $input) {
497
+ mutation CreateMayaWithdrawal(
498
+ $input: CreateMayaWithdrawalInput!
499
+ $transactionPassword: String!
500
+ ) {
501
+ createMayaWithdrawal(
502
+ input: $input
503
+ transactionPassword: $transactionPassword
504
+ ) {
499
505
  ... on AccountNotVerifiedError {
500
506
  __typename
501
507
  }
@@ -1797,6 +1803,22 @@ var REGISTER_MAYA_MEMBER_ACCOUNT_MUTATION = gql`
1797
1803
  }
1798
1804
  }
1799
1805
  `;
1806
+ var REGISTER_AGENT_ACCOUNT_MUTATION = gql`
1807
+ mutation RegisterAgentAccount($input: RegisterAgentAccountInput!) {
1808
+ registerAgentAccount(input: $input) {
1809
+ __typename
1810
+ ... on AccountNameNotAvailableError {
1811
+ message
1812
+ }
1813
+ ... on EmailAddressNotAvailableError {
1814
+ message
1815
+ }
1816
+ ... on MobileNumberNotAvailableError {
1817
+ message
1818
+ }
1819
+ }
1820
+ }
1821
+ `;
1800
1822
  var UPDATE_MEMBER_ACCOUNT_MUTATION = gql`
1801
1823
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
1802
1824
  updateMemberAccount(input: $input) {
@@ -3501,6 +3523,19 @@ var AccountService = class {
3501
3523
  data: res.data.requireFirstDeposit
3502
3524
  };
3503
3525
  }
3526
+ async registerAgentAccount(variables) {
3527
+ const res = await this.client.request(REGISTER_AGENT_ACCOUNT_MUTATION, variables);
3528
+ if (!res.ok) return res;
3529
+ if (res.data?.registerAgentAccount) {
3530
+ return {
3531
+ ok: false,
3532
+ error: createOperationError(
3533
+ res.data.registerAgentAccount.__typename
3534
+ )
3535
+ };
3536
+ }
3537
+ return { ok: true };
3538
+ }
3504
3539
  };
3505
3540
 
3506
3541
  // src/utils/status-code-to-operation-error.ts
@@ -8764,6 +8799,21 @@ var Sdk = class {
8764
8799
  }
8765
8800
  });
8766
8801
  }
8802
+ async registerAgentAccount(input) {
8803
+ return await this.accountService.registerAgentAccount({
8804
+ input: {
8805
+ name: input.name,
8806
+ firstName: input.firstName,
8807
+ lastName: input.lastName,
8808
+ mobileNumber: input.mobileNumber,
8809
+ emailAddress: input.emailAddress,
8810
+ customProperties: input.customProperties
8811
+ },
8812
+ ...this.webDomain && {
8813
+ domain: this.webDomain
8814
+ }
8815
+ });
8816
+ }
8767
8817
  async updateAccount(id, input) {
8768
8818
  const {
8769
8819
  /**/
@@ -9016,12 +9066,12 @@ var Sdk = class {
9016
9066
  input: {
9017
9067
  id,
9018
9068
  amount: input.amount.toString(),
9019
- transactionPassword: await sha256(input.transactionPassword),
9020
- recipientMobileNumber: addAreaCode(
9021
- input.recipientMobileNumber,
9069
+ accountNumber: addAreaCode(
9070
+ input.accountNumber,
9022
9071
  await this.locale
9023
9072
  )
9024
9073
  },
9074
+ transactionPassword: await sha256(input.transactionPassword),
9025
9075
  reCAPTCHAResponse: input.reCAPTCHAResponse,
9026
9076
  ...this.webDomain && {
9027
9077
  domain: this.webDomain