@open-tender/cloud 0.5.28 → 0.5.30

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.
@@ -167,7 +167,7 @@ declare class OpenTenderAPI {
167
167
  postCustomerTplsVerify(token: string): Promise<unknown>;
168
168
  getCustomerTpls(token: string): Promise<unknown>;
169
169
  getCustomerTplsHistory(token: string): Promise<unknown>;
170
- retroClaimPoints(token: string, receiptId: string): Promise<unknown>;
170
+ retroClaimPoints(token: string, receiptId: string, subtotal: string): Promise<unknown>;
171
171
  getCustomerHouseAccounts(token: string): Promise<unknown>;
172
172
  putCustomerOrderRating(token: string, orderId: number, data: any): Promise<unknown>;
173
173
  postClaimRewardCode(token: string, rewardCode: string): Promise<unknown>;
@@ -738,8 +738,8 @@ class OpenTenderAPI {
738
738
  getCustomerTplsHistory(token) {
739
739
  return this.request(`/customer/tpls/history`, 'GET', null, null, token);
740
740
  }
741
- retroClaimPoints(token, receiptId) {
742
- return this.request(`/customer/tpls/retro-claim`, 'POST', { receipt_id: receiptId }, null, token);
741
+ retroClaimPoints(token, receiptId, subtotal) {
742
+ return this.request(`/customer/tpls/retro-claim`, 'POST', { receipt_id: receiptId, subtotal }, null, token);
743
743
  }
744
744
  getCustomerHouseAccounts(token) {
745
745
  return this.request(`/customer/house-accounts`, 'GET', null, null, token);
@@ -34,7 +34,10 @@ export declare const exchangeTplsPointsShopReward: import("@reduxjs/toolkit").As
34
34
  fulfilledMeta?: unknown;
35
35
  rejectedMeta?: unknown;
36
36
  }>;
37
- export declare const retroClaimTplsPointsShop: import("@reduxjs/toolkit").AsyncThunk<void, string, {
37
+ export declare const retroClaimTplsPointsShop: import("@reduxjs/toolkit").AsyncThunk<void, {
38
+ receiptId: string;
39
+ subtotal: string;
40
+ }, {
38
41
  state: AppState;
39
42
  rejectValue: RequestError;
40
43
  dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
@@ -50,7 +50,7 @@ exports.exchangeTplsPointsShopReward = (0, toolkit_1.createAsyncThunk)(TplsPoint
50
50
  return rejectWithValue(err);
51
51
  }
52
52
  }));
53
- exports.retroClaimTplsPointsShop = (0, toolkit_1.createAsyncThunk)(TplsPointsShopActionType.RetroClaimTplsPointsShop, (receiptId, { getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
53
+ exports.retroClaimTplsPointsShop = (0, toolkit_1.createAsyncThunk)(TplsPointsShopActionType.RetroClaimTplsPointsShop, ({ receiptId, subtotal }, { getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
54
54
  try {
55
55
  const { api } = getState().config;
56
56
  if (!api)
@@ -58,7 +58,7 @@ exports.retroClaimTplsPointsShop = (0, toolkit_1.createAsyncThunk)(TplsPointsSho
58
58
  const token = (0, account_1.selectToken)(getState());
59
59
  if (!token)
60
60
  throw new Error(types_2.MISSING_CUSTOMER);
61
- yield api.retroClaimPoints(token, receiptId);
61
+ yield api.retroClaimPoints(token, receiptId, subtotal);
62
62
  return;
63
63
  }
64
64
  catch (err) {
@@ -167,7 +167,7 @@ declare class OpenTenderAPI {
167
167
  postCustomerTplsVerify(token: string): Promise<unknown>;
168
168
  getCustomerTpls(token: string): Promise<unknown>;
169
169
  getCustomerTplsHistory(token: string): Promise<unknown>;
170
- retroClaimPoints(token: string, receiptId: string): Promise<unknown>;
170
+ retroClaimPoints(token: string, receiptId: string, subtotal: string): Promise<unknown>;
171
171
  getCustomerHouseAccounts(token: string): Promise<unknown>;
172
172
  putCustomerOrderRating(token: string, orderId: number, data: any): Promise<unknown>;
173
173
  postClaimRewardCode(token: string, rewardCode: string): Promise<unknown>;
@@ -736,8 +736,8 @@ class OpenTenderAPI {
736
736
  getCustomerTplsHistory(token) {
737
737
  return this.request(`/customer/tpls/history`, 'GET', null, null, token);
738
738
  }
739
- retroClaimPoints(token, receiptId) {
740
- return this.request(`/customer/tpls/retro-claim`, 'POST', { receipt_id: receiptId }, null, token);
739
+ retroClaimPoints(token, receiptId, subtotal) {
740
+ return this.request(`/customer/tpls/retro-claim`, 'POST', { receipt_id: receiptId, subtotal }, null, token);
741
741
  }
742
742
  getCustomerHouseAccounts(token) {
743
743
  return this.request(`/customer/house-accounts`, 'GET', null, null, token);
@@ -34,7 +34,10 @@ export declare const exchangeTplsPointsShopReward: import("@reduxjs/toolkit").As
34
34
  fulfilledMeta?: unknown;
35
35
  rejectedMeta?: unknown;
36
36
  }>;
37
- export declare const retroClaimTplsPointsShop: import("@reduxjs/toolkit").AsyncThunk<void, string, {
37
+ export declare const retroClaimTplsPointsShop: import("@reduxjs/toolkit").AsyncThunk<void, {
38
+ receiptId: string;
39
+ subtotal: string;
40
+ }, {
38
41
  state: AppState;
39
42
  rejectValue: RequestError;
40
43
  dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
@@ -47,7 +47,7 @@ export const exchangeTplsPointsShopReward = createAsyncThunk(TplsPointsShopActio
47
47
  return rejectWithValue(err);
48
48
  }
49
49
  }));
50
- export const retroClaimTplsPointsShop = createAsyncThunk(TplsPointsShopActionType.RetroClaimTplsPointsShop, (receiptId, { getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
50
+ export const retroClaimTplsPointsShop = createAsyncThunk(TplsPointsShopActionType.RetroClaimTplsPointsShop, ({ receiptId, subtotal }, { getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
51
51
  try {
52
52
  const { api } = getState().config;
53
53
  if (!api)
@@ -55,7 +55,7 @@ export const retroClaimTplsPointsShop = createAsyncThunk(TplsPointsShopActionTyp
55
55
  const token = selectToken(getState());
56
56
  if (!token)
57
57
  throw new Error(MISSING_CUSTOMER);
58
- yield api.retroClaimPoints(token, receiptId);
58
+ yield api.retroClaimPoints(token, receiptId, subtotal);
59
59
  return;
60
60
  }
61
61
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/cloud",
3
- "version": "0.5.28",
3
+ "version": "0.5.30",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",