@open-tender/cloud 0.1.29 → 0.1.31
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.
|
@@ -12,9 +12,9 @@ const alertsSlice = (0, toolkit_1.createSlice)({
|
|
|
12
12
|
reducers: {
|
|
13
13
|
clearAlerts: () => initialState,
|
|
14
14
|
addAlert: (state, action) => {
|
|
15
|
-
const remaining = state.reverse().slice(0, 4).reverse()
|
|
15
|
+
// const remaining = state.reverse().slice(0, 4).reverse()
|
|
16
16
|
return [
|
|
17
|
-
...
|
|
17
|
+
...state,
|
|
18
18
|
{ message: action.payload, id: (0, utils_1.makeRandomNumberString)() }
|
|
19
19
|
];
|
|
20
20
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppState } from '../../app';
|
|
2
|
-
import {
|
|
2
|
+
import { Discounts, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface CustomerRewardsState {
|
|
4
|
-
entities:
|
|
4
|
+
entities: Discounts;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
loading: RequestStatus;
|
|
7
7
|
lookup: {
|
|
@@ -11,7 +11,7 @@ export interface CustomerRewardsState {
|
|
|
11
11
|
export declare enum CustomerRewardsActionType {
|
|
12
12
|
FetchCustomerRewards = "customer/fetchCustomerRewards"
|
|
13
13
|
}
|
|
14
|
-
export declare const fetchCustomerRewards: import("@reduxjs/toolkit").AsyncThunk<
|
|
14
|
+
export declare const fetchCustomerRewards: import("@reduxjs/toolkit").AsyncThunk<Discounts, void, {
|
|
15
15
|
state: AppState;
|
|
16
16
|
rejectValue: RequestError;
|
|
17
17
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
|
-
import {
|
|
2
|
+
import { Discounts, Discount, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface DealState {
|
|
4
|
-
entities:
|
|
4
|
+
entities: Discounts;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
loading: RequestStatus;
|
|
7
|
-
selected:
|
|
7
|
+
selected: Discount | null;
|
|
8
8
|
}
|
|
9
9
|
export declare enum DealActionType {
|
|
10
10
|
FetchDeals = "deals/fetchDeals"
|
|
11
11
|
}
|
|
12
|
-
export declare const fetchDeals: import("@reduxjs/toolkit").AsyncThunk<
|
|
12
|
+
export declare const fetchDeals: import("@reduxjs/toolkit").AsyncThunk<Discounts, void, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
15
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -21,5 +21,5 @@ export declare const fetchDeals: import("@reduxjs/toolkit").AsyncThunk<Deals, vo
|
|
|
21
21
|
}>;
|
|
22
22
|
export declare const resetDeals: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"deals/resetDeals">, setSelectedDeals: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "deals/setSelectedDeals">;
|
|
23
23
|
export declare const selectDeals: (state: AppState) => DealState;
|
|
24
|
-
export declare const selectEligibleDeals: (state: AppState) =>
|
|
24
|
+
export declare const selectEligibleDeals: (state: AppState) => Discounts;
|
|
25
25
|
export declare const dealsReducer: import("redux").Reducer<DealState, import("redux").AnyAction>;
|
|
@@ -8,9 +8,9 @@ const alertsSlice = createSlice({
|
|
|
8
8
|
reducers: {
|
|
9
9
|
clearAlerts: () => initialState,
|
|
10
10
|
addAlert: (state, action) => {
|
|
11
|
-
const remaining = state.reverse().slice(0, 4).reverse()
|
|
11
|
+
// const remaining = state.reverse().slice(0, 4).reverse()
|
|
12
12
|
return [
|
|
13
|
-
...
|
|
13
|
+
...state,
|
|
14
14
|
{ message: action.payload, id: makeRandomNumberString() }
|
|
15
15
|
];
|
|
16
16
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppState } from '../../app';
|
|
2
|
-
import {
|
|
2
|
+
import { Discounts, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface CustomerRewardsState {
|
|
4
|
-
entities:
|
|
4
|
+
entities: Discounts;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
loading: RequestStatus;
|
|
7
7
|
lookup: {
|
|
@@ -11,7 +11,7 @@ export interface CustomerRewardsState {
|
|
|
11
11
|
export declare enum CustomerRewardsActionType {
|
|
12
12
|
FetchCustomerRewards = "customer/fetchCustomerRewards"
|
|
13
13
|
}
|
|
14
|
-
export declare const fetchCustomerRewards: import("@reduxjs/toolkit").AsyncThunk<
|
|
14
|
+
export declare const fetchCustomerRewards: import("@reduxjs/toolkit").AsyncThunk<Discounts, void, {
|
|
15
15
|
state: AppState;
|
|
16
16
|
rejectValue: RequestError;
|
|
17
17
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
|
-
import {
|
|
2
|
+
import { Discounts, Discount, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface DealState {
|
|
4
|
-
entities:
|
|
4
|
+
entities: Discounts;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
loading: RequestStatus;
|
|
7
|
-
selected:
|
|
7
|
+
selected: Discount | null;
|
|
8
8
|
}
|
|
9
9
|
export declare enum DealActionType {
|
|
10
10
|
FetchDeals = "deals/fetchDeals"
|
|
11
11
|
}
|
|
12
|
-
export declare const fetchDeals: import("@reduxjs/toolkit").AsyncThunk<
|
|
12
|
+
export declare const fetchDeals: import("@reduxjs/toolkit").AsyncThunk<Discounts, void, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
15
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -21,5 +21,5 @@ export declare const fetchDeals: import("@reduxjs/toolkit").AsyncThunk<Deals, vo
|
|
|
21
21
|
}>;
|
|
22
22
|
export declare const resetDeals: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"deals/resetDeals">, setSelectedDeals: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "deals/setSelectedDeals">;
|
|
23
23
|
export declare const selectDeals: (state: AppState) => DealState;
|
|
24
|
-
export declare const selectEligibleDeals: (state: AppState) =>
|
|
24
|
+
export declare const selectEligibleDeals: (state: AppState) => Discounts;
|
|
25
25
|
export declare const dealsReducer: import("redux").Reducer<DealState, import("redux").AnyAction>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
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",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"typescript": "^4.8.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@open-tender/types": "^0.2.
|
|
53
|
-
"@open-tender/utils": "^0.1.
|
|
52
|
+
"@open-tender/types": "^0.2.18",
|
|
53
|
+
"@open-tender/utils": "^0.1.80",
|
|
54
54
|
"@reduxjs/toolkit": "^1.8.5",
|
|
55
55
|
"react": "^18.2.0"
|
|
56
56
|
},
|