@open-tender/cloud 0.4.16 → 0.4.17

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.
@@ -20,7 +20,7 @@ export declare const fetchPointsShop: import("@reduxjs/toolkit").AsyncThunk<Disc
20
20
  fulfilledMeta?: unknown;
21
21
  rejectedMeta?: unknown;
22
22
  }>;
23
- export declare const exchangePointsShopRewardV2: import("@reduxjs/toolkit").AsyncThunk<{
23
+ export declare const exchangePointsShopReward: import("@reduxjs/toolkit").AsyncThunk<{
24
24
  data: Discount;
25
25
  entities: Discounts;
26
26
  }, string, {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pointsShopReducer = exports.selectPointsShop = exports.resetPointsShop = exports.exchangePointsShopRewardV2 = exports.fetchPointsShop = exports.PointsShopActionType = void 0;
3
+ exports.pointsShopReducer = exports.selectPointsShop = exports.resetPointsShop = exports.exchangePointsShopReward = exports.fetchPointsShop = exports.PointsShopActionType = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const types_1 = require("../types");
@@ -31,7 +31,7 @@ exports.fetchPointsShop = (0, toolkit_1.createAsyncThunk)(PointsShopActionType.F
31
31
  return rejectWithValue(err);
32
32
  }
33
33
  }));
34
- exports.exchangePointsShopRewardV2 = (0, toolkit_1.createAsyncThunk)(PointsShopActionType.ExchangePointsShopReward, (rewardId, { getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
34
+ exports.exchangePointsShopReward = (0, toolkit_1.createAsyncThunk)(PointsShopActionType.ExchangePointsShopReward, (rewardId, { getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
35
35
  try {
36
36
  const { api } = getState().config;
37
37
  if (!api)
@@ -67,16 +67,16 @@ const pointsShopSlice = (0, toolkit_1.createSlice)({
67
67
  state.error = action.payload;
68
68
  state.loading = 'idle';
69
69
  })
70
- .addCase(exports.exchangePointsShopRewardV2.fulfilled, (state, action) => {
70
+ .addCase(exports.exchangePointsShopReward.fulfilled, (state, action) => {
71
71
  state.entities = action.payload.entities;
72
72
  state.data = action.payload.data;
73
73
  state.loading = 'idle';
74
74
  state.error = null;
75
75
  })
76
- .addCase(exports.exchangePointsShopRewardV2.pending, state => {
76
+ .addCase(exports.exchangePointsShopReward.pending, state => {
77
77
  state.loading = 'pending';
78
78
  })
79
- .addCase(exports.exchangePointsShopRewardV2.rejected, (state, action) => {
79
+ .addCase(exports.exchangePointsShopReward.rejected, (state, action) => {
80
80
  state.error = action.payload;
81
81
  state.loading = 'idle';
82
82
  });
@@ -20,7 +20,7 @@ export declare const fetchPointsShop: import("@reduxjs/toolkit").AsyncThunk<Disc
20
20
  fulfilledMeta?: unknown;
21
21
  rejectedMeta?: unknown;
22
22
  }>;
23
- export declare const exchangePointsShopRewardV2: import("@reduxjs/toolkit").AsyncThunk<{
23
+ export declare const exchangePointsShopReward: import("@reduxjs/toolkit").AsyncThunk<{
24
24
  data: Discount;
25
25
  entities: Discounts;
26
26
  }, string, {
@@ -28,7 +28,7 @@ export const fetchPointsShop = createAsyncThunk(PointsShopActionType.FetchPoints
28
28
  return rejectWithValue(err);
29
29
  }
30
30
  }));
31
- export const exchangePointsShopRewardV2 = createAsyncThunk(PointsShopActionType.ExchangePointsShopReward, (rewardId, { getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
31
+ export const exchangePointsShopReward = createAsyncThunk(PointsShopActionType.ExchangePointsShopReward, (rewardId, { getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
32
32
  try {
33
33
  const { api } = getState().config;
34
34
  if (!api)
@@ -64,16 +64,16 @@ const pointsShopSlice = createSlice({
64
64
  state.error = action.payload;
65
65
  state.loading = 'idle';
66
66
  })
67
- .addCase(exchangePointsShopRewardV2.fulfilled, (state, action) => {
67
+ .addCase(exchangePointsShopReward.fulfilled, (state, action) => {
68
68
  state.entities = action.payload.entities;
69
69
  state.data = action.payload.data;
70
70
  state.loading = 'idle';
71
71
  state.error = null;
72
72
  })
73
- .addCase(exchangePointsShopRewardV2.pending, state => {
73
+ .addCase(exchangePointsShopReward.pending, state => {
74
74
  state.loading = 'pending';
75
75
  })
76
- .addCase(exchangePointsShopRewardV2.rejected, (state, action) => {
76
+ .addCase(exchangePointsShopReward.rejected, (state, action) => {
77
77
  state.error = action.payload;
78
78
  state.loading = 'idle';
79
79
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/cloud",
3
- "version": "0.4.16",
3
+ "version": "0.4.17",
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",