@opexa/portal-sdk 0.53.2 → 0.53.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 CHANGED
@@ -1249,6 +1249,13 @@ var TOUCH_QRPH_DEPOSIT_MUTATION = gql`
1249
1249
  touchQRPHDeposit(input: $input)
1250
1250
  }
1251
1251
  `;
1252
+ var REDEEM_VOUCHER_MUTATION = gql`
1253
+ mutation RedeemVoucher($input: RedeemVoucherInput!) {
1254
+ redeemVoucher(input: $input) {
1255
+ __typename
1256
+ }
1257
+ }
1258
+ `;
1252
1259
  var BET_RECORDS_QUERY = gql`
1253
1260
  query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
1254
1261
  member {
@@ -5137,6 +5144,24 @@ var WalletService = class {
5137
5144
  );
5138
5145
  return res.ok ? { ok: res.ok, data: res.data.node } : res;
5139
5146
  }
5147
+ async redeemVoucher(variables) {
5148
+ const res = await this.client.request(REDEEM_VOUCHER_MUTATION, variables);
5149
+ if (!res.ok) {
5150
+ return {
5151
+ ok: res.ok,
5152
+ error: res.error
5153
+ };
5154
+ }
5155
+ if (res.data.redeemVoucher) {
5156
+ return {
5157
+ ok: false,
5158
+ error: createOperationError(res.data.redeemVoucher.__typename)
5159
+ };
5160
+ }
5161
+ return {
5162
+ ok: true
5163
+ };
5164
+ }
5140
5165
  };
5141
5166
 
5142
5167
  // src/services/extension.service.ts
@@ -9094,6 +9119,14 @@ var Sdk = class {
9094
9119
  throw new Error(`Unsupported input type: '${input.type}'`);
9095
9120
  }
9096
9121
  }
9122
+ async redeemVoucher(input) {
9123
+ return await this.walletService.redeemVoucher({
9124
+ input: {
9125
+ type: input.type,
9126
+ code: input.code
9127
+ }
9128
+ });
9129
+ }
9097
9130
  /*
9098
9131
  *=============================================
9099
9132
  * BET RECORD