@opexa/portal-sdk 0.59.16 → 0.59.18
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 +38 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +38 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1636,6 +1636,18 @@ var CLAIM_CASHBACK_BONUS_MUTATION = gql`
|
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
1638
|
`;
|
|
1639
|
+
var CLAIM_REBATE_MUTATION = gql`
|
|
1640
|
+
mutation ClaimRebate($input: ClaimRebateInput!) {
|
|
1641
|
+
claimRebate(input: $input) {
|
|
1642
|
+
... on RebateDoesNotExistError {
|
|
1643
|
+
__typename
|
|
1644
|
+
}
|
|
1645
|
+
... on RebateNotClaimableError {
|
|
1646
|
+
__typename
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
`;
|
|
1639
1651
|
var MEMBER_QUERY = gql`
|
|
1640
1652
|
query Member {
|
|
1641
1653
|
member {
|
|
@@ -1675,6 +1687,7 @@ var MEMBER_ACCOUNT_FRAGMENT = gql`
|
|
|
1675
1687
|
domain
|
|
1676
1688
|
branchCode
|
|
1677
1689
|
partition
|
|
1690
|
+
bonusBlocked
|
|
1678
1691
|
}
|
|
1679
1692
|
`;
|
|
1680
1693
|
var MEMBER_ACCOUNT_QUERY = gql`
|
|
@@ -3485,6 +3498,8 @@ function createOperationError(code) {
|
|
|
3485
3498
|
AccountNotFoundError: "Account does not exist",
|
|
3486
3499
|
AccountNotVerifiedError: "Account is not verified",
|
|
3487
3500
|
CashbackBonusDoesNotExistError: "Cashback bonus does not exists",
|
|
3501
|
+
RebateDoesNotExistError: "Rebate does not exist",
|
|
3502
|
+
RebateNotClaimableError: "This rebate cannot be claimed",
|
|
3488
3503
|
DepositPromoMaximumAmountExceededError: "Deposit amount exceeds maximum amount for selected promo",
|
|
3489
3504
|
DepositPromoMinimumAmountNotMetError: "Deposit amount does not meet minimum amount for selected promo",
|
|
3490
3505
|
EmailAddressNotAvailableError: "Email is no longer available",
|
|
@@ -5143,6 +5158,24 @@ var WalletService = class {
|
|
|
5143
5158
|
ok: true
|
|
5144
5159
|
};
|
|
5145
5160
|
}
|
|
5161
|
+
async claimRebate(variables) {
|
|
5162
|
+
const res = await this.client.request(CLAIM_REBATE_MUTATION, variables);
|
|
5163
|
+
if (!res.ok) {
|
|
5164
|
+
return {
|
|
5165
|
+
ok: res.ok,
|
|
5166
|
+
error: res.error
|
|
5167
|
+
};
|
|
5168
|
+
}
|
|
5169
|
+
if (res.data.claimRebate) {
|
|
5170
|
+
return {
|
|
5171
|
+
ok: false,
|
|
5172
|
+
error: createOperationError(res.data.claimRebate.__typename)
|
|
5173
|
+
};
|
|
5174
|
+
}
|
|
5175
|
+
return {
|
|
5176
|
+
ok: true
|
|
5177
|
+
};
|
|
5178
|
+
}
|
|
5146
5179
|
async bonus() {
|
|
5147
5180
|
const res = await this.client.request(BONUS_QUERY);
|
|
5148
5181
|
return res.ok ? { ok: res.ok, data: res.data.bonus } : res;
|
|
@@ -8275,7 +8308,8 @@ var Transformer = class {
|
|
|
8275
8308
|
level: data.level ?? 0,
|
|
8276
8309
|
dateTimeLastActive: data.dateTimeLastActive ? new Date(data.dateTimeLastActive) : void 0,
|
|
8277
8310
|
partition: data.partition,
|
|
8278
|
-
gigRewardsQuestDetails: data.gigRewardsQuestDetails ?? void 0
|
|
8311
|
+
gigRewardsQuestDetails: data.gigRewardsQuestDetails ?? void 0,
|
|
8312
|
+
bonusBlocked: data.bonusBlocked ?? false
|
|
8279
8313
|
};
|
|
8280
8314
|
return compact(o);
|
|
8281
8315
|
}
|
|
@@ -10635,6 +10669,9 @@ var Sdk = class {
|
|
|
10635
10669
|
async claimCashbackBonus(id) {
|
|
10636
10670
|
return await this.walletService.claimCashbackBonus({ input: { id } });
|
|
10637
10671
|
}
|
|
10672
|
+
async claimRebate(id) {
|
|
10673
|
+
return await this.walletService.claimRebate({ input: { id } });
|
|
10674
|
+
}
|
|
10638
10675
|
async claimSpotBonus(code) {
|
|
10639
10676
|
return await this.walletService.claimSpotBonus({ code });
|
|
10640
10677
|
}
|