@open-tender/cloud 0.0.138 → 0.1.0
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/cjs/app/hooks.d.ts +1 -1
- package/dist/cjs/app/store.d.ts +9 -9
- package/dist/cjs/app/store.js +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/services/api.d.ts +7 -7
- package/dist/cjs/services/api.js +70 -69
- package/dist/cjs/slices/alerts.d.ts +1 -1
- package/dist/cjs/slices/allergens.d.ts +7 -1
- package/dist/cjs/slices/announcements.d.ts +7 -1
- package/dist/cjs/slices/checkout.d.ts +20 -1
- package/dist/cjs/slices/completedOrders.d.ts +7 -1
- package/dist/cjs/slices/config.d.ts +7 -1
- package/dist/cjs/slices/config.js +18 -4
- package/dist/cjs/slices/confirmation.d.ts +1 -1
- package/dist/cjs/slices/customer/account.d.ts +55 -1
- package/dist/cjs/slices/customer/account.js +1 -1
- package/dist/cjs/slices/customer/addresses.d.ts +19 -1
- package/dist/cjs/slices/customer/allergens.d.ts +13 -1
- package/dist/cjs/slices/customer/communicationPreferences.d.ts +25 -1
- package/dist/cjs/slices/customer/creditCards.d.ts +25 -1
- package/dist/cjs/slices/customer/favorites.d.ts +28 -3
- package/dist/cjs/slices/customer/favorites.js +5 -6
- package/dist/cjs/slices/customer/fcmToken.d.ts +19 -1
- package/dist/cjs/slices/customer/giftCards.d.ts +37 -1
- package/dist/cjs/slices/customer/groupOrders.d.ts +65 -41
- package/dist/cjs/slices/customer/groupOrders.js +54 -54
- package/dist/cjs/slices/customer/houseAccounts.d.ts +7 -1
- package/dist/cjs/slices/customer/levelup.d.ts +19 -1
- package/dist/cjs/slices/customer/levelup.js +3 -3
- package/dist/cjs/slices/customer/loyalty.d.ts +7 -1
- package/dist/cjs/slices/customer/order.d.ts +13 -1
- package/dist/cjs/slices/customer/orders.d.ts +7 -1
- package/dist/cjs/slices/customer/qrCode.d.ts +7 -1
- package/dist/cjs/slices/customer/rewards.d.ts +7 -1
- package/dist/cjs/slices/customer/thanx.d.ts +7 -1
- package/dist/cjs/slices/deals.d.ts +7 -1
- package/dist/cjs/slices/donations.d.ts +7 -1
- package/dist/cjs/slices/geolocation.d.ts +1 -1
- package/dist/cjs/slices/geolocation.js +3 -3
- package/dist/cjs/slices/giftCards.d.ts +7 -1
- package/dist/cjs/slices/groupOrder.d.ts +42 -12
- package/dist/cjs/slices/groupOrder.js +23 -19
- package/dist/cjs/slices/guest.d.ts +13 -1
- package/dist/cjs/slices/levelup.d.ts +7 -1
- package/dist/cjs/slices/levelup.js +1 -1
- package/dist/cjs/slices/loader.d.ts +1 -1
- package/dist/cjs/slices/loader.js +3 -3
- package/dist/cjs/slices/menu.d.ts +7 -1
- package/dist/cjs/slices/menu.js +1 -1
- package/dist/cjs/slices/menuDisplay.d.ts +7 -1
- package/dist/cjs/slices/menuItems.d.ts +7 -1
- package/dist/cjs/slices/misc.d.ts +1 -1
- package/dist/cjs/slices/misc.js +2 -2
- package/dist/cjs/slices/modalSlice.d.ts +1 -1
- package/dist/cjs/slices/modalSlice.js +4 -4
- package/dist/cjs/slices/navSiteSlice.d.ts +1 -1
- package/dist/cjs/slices/navSiteSlice.js +4 -4
- package/dist/cjs/slices/navSlice.d.ts +1 -1
- package/dist/cjs/slices/navSlice.js +4 -4
- package/dist/cjs/slices/notifications.d.ts +1 -1
- package/dist/cjs/slices/order.d.ts +51 -15
- package/dist/cjs/slices/order.js +22 -14
- package/dist/cjs/slices/orderFulfillment.d.ts +13 -1
- package/dist/cjs/slices/orderRating.d.ts +19 -1
- package/dist/cjs/slices/orders.d.ts +43 -1
- package/dist/cjs/slices/postsSlice.d.ts +7 -1
- package/dist/cjs/slices/postsSlice.js +3 -3
- package/dist/cjs/slices/qr.d.ts +1 -1
- package/dist/cjs/slices/qr.js +3 -3
- package/dist/cjs/slices/resetPassword.d.ts +13 -1
- package/dist/cjs/slices/revenueCenters.d.ts +13 -1
- package/dist/cjs/slices/sidebarModalSlice.d.ts +1 -1
- package/dist/cjs/slices/sidebarModalSlice.js +4 -4
- package/dist/cjs/slices/sidebarSlice.d.ts +1 -1
- package/dist/cjs/slices/sidebarSlice.js +4 -4
- package/dist/cjs/slices/signUp.d.ts +7 -1
- package/dist/cjs/slices/signUp.js +4 -1
- package/dist/cjs/slices/validTimes.d.ts +7 -1
- package/dist/cjs/slices/verifyAccount.d.ts +7 -1
- package/dist/esm/app/hooks.d.ts +1 -1
- package/dist/esm/app/store.d.ts +9 -9
- package/dist/esm/app/store.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/services/api.d.ts +7 -7
- package/dist/esm/services/api.js +70 -69
- package/dist/esm/slices/alerts.d.ts +1 -1
- package/dist/esm/slices/allergens.d.ts +7 -1
- package/dist/esm/slices/announcements.d.ts +7 -1
- package/dist/esm/slices/checkout.d.ts +20 -1
- package/dist/esm/slices/checkout.js +1 -1
- package/dist/esm/slices/completedOrders.d.ts +7 -1
- package/dist/esm/slices/config.d.ts +7 -1
- package/dist/esm/slices/config.js +18 -4
- package/dist/esm/slices/confirmation.d.ts +1 -1
- package/dist/esm/slices/customer/account.d.ts +55 -1
- package/dist/esm/slices/customer/account.js +1 -1
- package/dist/esm/slices/customer/addresses.d.ts +19 -1
- package/dist/esm/slices/customer/allergens.d.ts +13 -1
- package/dist/esm/slices/customer/communicationPreferences.d.ts +25 -1
- package/dist/esm/slices/customer/creditCards.d.ts +25 -1
- package/dist/esm/slices/customer/favorites.d.ts +28 -3
- package/dist/esm/slices/customer/favorites.js +5 -6
- package/dist/esm/slices/customer/fcmToken.d.ts +19 -1
- package/dist/esm/slices/customer/giftCards.d.ts +37 -1
- package/dist/esm/slices/customer/groupOrders.d.ts +65 -41
- package/dist/esm/slices/customer/groupOrders.js +54 -54
- package/dist/esm/slices/customer/houseAccounts.d.ts +7 -1
- package/dist/esm/slices/customer/levelup.d.ts +19 -1
- package/dist/esm/slices/customer/levelup.js +3 -3
- package/dist/esm/slices/customer/loyalty.d.ts +7 -1
- package/dist/esm/slices/customer/order.d.ts +13 -1
- package/dist/esm/slices/customer/orders.d.ts +7 -1
- package/dist/esm/slices/customer/qrCode.d.ts +7 -1
- package/dist/esm/slices/customer/rewards.d.ts +7 -1
- package/dist/esm/slices/customer/thanx.d.ts +7 -1
- package/dist/esm/slices/deals.d.ts +7 -1
- package/dist/esm/slices/donations.d.ts +7 -1
- package/dist/esm/slices/geolocation.d.ts +1 -1
- package/dist/esm/slices/geolocation.js +3 -3
- package/dist/esm/slices/giftCards.d.ts +7 -1
- package/dist/esm/slices/groupOrder.d.ts +42 -12
- package/dist/esm/slices/groupOrder.js +24 -23
- package/dist/esm/slices/guest.d.ts +13 -1
- package/dist/esm/slices/levelup.d.ts +7 -1
- package/dist/esm/slices/levelup.js +1 -1
- package/dist/esm/slices/loader.d.ts +1 -1
- package/dist/esm/slices/loader.js +3 -3
- package/dist/esm/slices/menu.d.ts +7 -1
- package/dist/esm/slices/menu.js +1 -1
- package/dist/esm/slices/menuDisplay.d.ts +7 -1
- package/dist/esm/slices/menuItems.d.ts +7 -1
- package/dist/esm/slices/misc.d.ts +1 -1
- package/dist/esm/slices/misc.js +3 -3
- package/dist/esm/slices/modalSlice.d.ts +1 -1
- package/dist/esm/slices/modalSlice.js +4 -4
- package/dist/esm/slices/navSiteSlice.d.ts +1 -1
- package/dist/esm/slices/navSiteSlice.js +4 -4
- package/dist/esm/slices/navSlice.d.ts +1 -1
- package/dist/esm/slices/navSlice.js +4 -4
- package/dist/esm/slices/notifications.d.ts +1 -1
- package/dist/esm/slices/order.d.ts +51 -15
- package/dist/esm/slices/order.js +23 -15
- package/dist/esm/slices/orderFulfillment.d.ts +13 -1
- package/dist/esm/slices/orderRating.d.ts +19 -1
- package/dist/esm/slices/orders.d.ts +43 -1
- package/dist/esm/slices/postsSlice.d.ts +7 -1
- package/dist/esm/slices/postsSlice.js +3 -3
- package/dist/esm/slices/qr.d.ts +1 -1
- package/dist/esm/slices/qr.js +3 -3
- package/dist/esm/slices/resetPassword.d.ts +13 -1
- package/dist/esm/slices/revenueCenters.d.ts +13 -1
- package/dist/esm/slices/sidebarModalSlice.d.ts +1 -1
- package/dist/esm/slices/sidebarModalSlice.js +4 -4
- package/dist/esm/slices/sidebarSlice.d.ts +1 -1
- package/dist/esm/slices/sidebarSlice.js +4 -4
- package/dist/esm/slices/signUp.d.ts +7 -1
- package/dist/esm/slices/signUp.js +4 -1
- package/dist/esm/slices/validTimes.d.ts +7 -1
- package/dist/esm/slices/verifyAccount.d.ts +7 -1
- package/package.json +4 -7
package/dist/cjs/app/hooks.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<i
|
|
|
28
28
|
revenueCenters: import("..").RevenueCentersState;
|
|
29
29
|
completedOrders: import("..").CompletedOrdersState;
|
|
30
30
|
checkout: import("..").CheckoutState;
|
|
31
|
-
order: import("
|
|
31
|
+
order: import("..").OrderState;
|
|
32
32
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
33
33
|
orderRating: import("..").OrderRatingState;
|
|
34
34
|
orders: import("..").OrdersState;
|
package/dist/cjs/app/store.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare const appReducer: import("redux").Reducer<import("redux").Combine
|
|
|
27
27
|
revenueCenters: import("../slices").RevenueCentersState;
|
|
28
28
|
completedOrders: import("../slices").CompletedOrdersState;
|
|
29
29
|
checkout: import("../slices").CheckoutState;
|
|
30
|
-
order: import("
|
|
30
|
+
order: import("../slices").OrderState;
|
|
31
31
|
orderFulfillment: import("../slices").OrderFulfillmentState;
|
|
32
32
|
orderRating: import("../slices").OrderRatingState;
|
|
33
33
|
orders: import("../slices").OrdersState;
|
|
@@ -56,8 +56,8 @@ export declare const appReducer: import("redux").Reducer<import("redux").Combine
|
|
|
56
56
|
sidebarModal: import("../slices").SidebarModalState;
|
|
57
57
|
sidebar: import("../slices").SidebarState;
|
|
58
58
|
}>, import("redux").AnyAction>;
|
|
59
|
-
export
|
|
60
|
-
declare const store: import("@reduxjs/toolkit").
|
|
59
|
+
export type AppState = ReturnType<typeof appReducer>;
|
|
60
|
+
declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
|
|
61
61
|
alerts: import("@open-tender/types").Alerts;
|
|
62
62
|
notifications: import("@open-tender/types").Notifications;
|
|
63
63
|
allergens: import("../slices").AllergensState;
|
|
@@ -85,7 +85,7 @@ declare const store: import("@reduxjs/toolkit").EnhancedStore<import("redux").Co
|
|
|
85
85
|
revenueCenters: import("../slices").RevenueCentersState;
|
|
86
86
|
completedOrders: import("../slices").CompletedOrdersState;
|
|
87
87
|
checkout: import("../slices").CheckoutState;
|
|
88
|
-
order: import("
|
|
88
|
+
order: import("../slices").OrderState;
|
|
89
89
|
orderFulfillment: import("../slices").OrderFulfillmentState;
|
|
90
90
|
orderRating: import("../slices").OrderRatingState;
|
|
91
91
|
orders: import("../slices").OrdersState;
|
|
@@ -113,7 +113,7 @@ declare const store: import("@reduxjs/toolkit").EnhancedStore<import("redux").Co
|
|
|
113
113
|
posts: import("../slices").PostsSlice;
|
|
114
114
|
sidebarModal: import("../slices").SidebarModalState;
|
|
115
115
|
sidebar: import("../slices").SidebarState;
|
|
116
|
-
}
|
|
116
|
+
}, Action<any>, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
117
117
|
alerts: import("@open-tender/types").Alerts;
|
|
118
118
|
notifications: import("@open-tender/types").Notifications;
|
|
119
119
|
allergens: import("../slices").AllergensState;
|
|
@@ -141,7 +141,7 @@ declare const store: import("@reduxjs/toolkit").EnhancedStore<import("redux").Co
|
|
|
141
141
|
revenueCenters: import("../slices").RevenueCentersState;
|
|
142
142
|
completedOrders: import("../slices").CompletedOrdersState;
|
|
143
143
|
checkout: import("../slices").CheckoutState;
|
|
144
|
-
order: import("
|
|
144
|
+
order: import("../slices").OrderState;
|
|
145
145
|
orderFulfillment: import("../slices").OrderFulfillmentState;
|
|
146
146
|
orderRating: import("../slices").OrderRatingState;
|
|
147
147
|
orders: import("../slices").OrdersState;
|
|
@@ -170,7 +170,7 @@ declare const store: import("@reduxjs/toolkit").EnhancedStore<import("redux").Co
|
|
|
170
170
|
sidebarModal: import("../slices").SidebarModalState;
|
|
171
171
|
sidebar: import("../slices").SidebarState;
|
|
172
172
|
}>, import("redux").AnyAction, undefined>]>>;
|
|
173
|
-
export
|
|
174
|
-
export
|
|
175
|
-
export
|
|
173
|
+
export type AppDispatch = typeof store.dispatch;
|
|
174
|
+
export type RootState = ReturnType<typeof store.getState>;
|
|
175
|
+
export type AppThunk<ReturnType = void> = ThunkAction<ReturnType, RootState, unknown, Action<string>>;
|
|
176
176
|
export {};
|
package/dist/cjs/app/store.js
CHANGED
|
@@ -41,7 +41,7 @@ exports.appReducer = (0, toolkit_1.combineReducers)({
|
|
|
41
41
|
[types_1.ReducerType.Nav]: slices_1.navReducer,
|
|
42
42
|
[types_1.ReducerType.Posts]: slices_1.postsReducer,
|
|
43
43
|
[types_1.ReducerType.SidebarModal]: slices_1.sidebarModalReducer,
|
|
44
|
-
[types_1.ReducerType.Sidebar]: slices_1.sidebarReducer
|
|
44
|
+
[types_1.ReducerType.Sidebar]: slices_1.sidebarReducer
|
|
45
45
|
});
|
|
46
46
|
const rootReducer = (state, action) => {
|
|
47
47
|
if (action.type === 'clearState') {
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { appReducer } from './app/store';
|
|
1
|
+
import { appReducer, AppState } from './app/store';
|
|
2
2
|
import { useAppDispatch, useAppSelector } from './app/hooks';
|
|
3
3
|
export * from './slices';
|
|
4
4
|
export * from './services';
|
|
5
|
-
export { appReducer, useAppDispatch, useAppSelector };
|
|
5
|
+
export { appReducer, AppState, useAppDispatch, useAppSelector };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ConfigApp, OrderType, RevenueCenterType, ServiceType, Weekday } from '@open-tender/types';
|
|
1
|
+
import { ConfigApp, GroupOrder, GroupOrders, OrderType, RevenueCenterType, ServiceType, Weekday } from '@open-tender/types';
|
|
2
2
|
declare class OpenTenderAPI {
|
|
3
3
|
brandId?: string;
|
|
4
4
|
clientId?: string;
|
|
5
5
|
baseUrl?: string;
|
|
6
6
|
authUrl?: string;
|
|
7
7
|
constructor(config: Partial<ConfigApp> | null);
|
|
8
|
-
request(endpoint: string, method?: string, data?: any, timeout?: number | null, token?: string | null)
|
|
9
|
-
authRequest(endpoint: string, data: any)
|
|
8
|
+
request: <T>(endpoint: string, method?: string, data?: any, timeout?: number | null, token?: string | null) => Promise<T | null | undefined>;
|
|
9
|
+
authRequest: <T>(endpoint: string, data: any) => Promise<T | null | undefined>;
|
|
10
10
|
post(endpoint: string, data: Record<string, unknown>): Promise<unknown>;
|
|
11
11
|
getHttpResponse(code: string): Promise<unknown>;
|
|
12
12
|
postSettings(entityType: string): Promise<unknown>;
|
|
@@ -118,10 +118,10 @@ declare class OpenTenderAPI {
|
|
|
118
118
|
getCustomerRewards(token: string): Promise<unknown>;
|
|
119
119
|
getCustomerOrders(token: string, limit: number, timing: string): Promise<unknown>;
|
|
120
120
|
getCustomerOrder(token: string, orderId: number): Promise<unknown>;
|
|
121
|
-
postCustomerGroupOrder(token: string, data: any): Promise<
|
|
122
|
-
getCustomerGroupOrders(token: string): Promise<
|
|
123
|
-
getCustomerGroupOrder(token: string, cartId: number): Promise<
|
|
124
|
-
putCustomerGroupOrder(token: string, cartId: number, data: any): Promise<
|
|
121
|
+
postCustomerGroupOrder(token: string, data: any): Promise<GroupOrder | null | undefined>;
|
|
122
|
+
getCustomerGroupOrders(token: string): Promise<GroupOrders | null | undefined>;
|
|
123
|
+
getCustomerGroupOrder(token: string, cartId: number): Promise<GroupOrder | null | undefined>;
|
|
124
|
+
putCustomerGroupOrder(token: string, cartId: number, data: any): Promise<GroupOrder | null | undefined>;
|
|
125
125
|
putCustomerGroupOrderStatus(token: string, cartId: number, data: any): Promise<unknown>;
|
|
126
126
|
deleteCustomerGroupOrder(token: string, cartId: number): Promise<unknown>;
|
|
127
127
|
getCustomerAllergens(token: string): Promise<unknown>;
|
package/dist/cjs/services/api.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
3
4
|
const utils_1 = require("@open-tender/utils");
|
|
4
5
|
class requestException extends Error {
|
|
5
6
|
constructor(message, response, exception, extracted) {
|
|
@@ -15,13 +16,13 @@ const fiveHundredError = (status = 500, statusText = 'Unknown 500 error') => ({
|
|
|
15
16
|
status: status,
|
|
16
17
|
code: 'errors.server.internal',
|
|
17
18
|
title: 'Internal Server Error',
|
|
18
|
-
detail: statusText
|
|
19
|
+
detail: statusText
|
|
19
20
|
});
|
|
20
21
|
const unauthorizedError = {
|
|
21
22
|
status: 401,
|
|
22
23
|
code: 'errors.unauthorized',
|
|
23
24
|
title: 'Unauthorized',
|
|
24
|
-
detail: 'Provided token is not valid'
|
|
25
|
+
detail: 'Provided token is not valid'
|
|
25
26
|
};
|
|
26
27
|
const handleResponse = (response) => {
|
|
27
28
|
const { status, statusText } = response;
|
|
@@ -54,74 +55,74 @@ const handleResponse = (response) => {
|
|
|
54
55
|
};
|
|
55
56
|
class OpenTenderAPI {
|
|
56
57
|
constructor(config) {
|
|
57
|
-
this.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
})
|
|
100
|
-
.finally(() => {
|
|
101
|
-
if (timeout)
|
|
102
|
-
clearTimeout(timer);
|
|
58
|
+
this.request = (endpoint, method = 'GET', data = null, timeout = null, token = null) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
let didTimeOut = false;
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
let timer;
|
|
62
|
+
if (timeout) {
|
|
63
|
+
timer = setTimeout(() => {
|
|
64
|
+
didTimeOut = true;
|
|
65
|
+
reject(new Error('Request timed out'));
|
|
66
|
+
}, timeout);
|
|
67
|
+
}
|
|
68
|
+
const headers = {
|
|
69
|
+
Accept: 'application/json',
|
|
70
|
+
'Content-Type': 'application/json'
|
|
71
|
+
};
|
|
72
|
+
if (this.clientId)
|
|
73
|
+
headers['client-id'] = `${this.clientId}`;
|
|
74
|
+
if (this.brandId)
|
|
75
|
+
headers['brand-id'] = `${this.brandId}`;
|
|
76
|
+
if (token)
|
|
77
|
+
headers.Authorization = `Bearer ${token}`;
|
|
78
|
+
const options = {
|
|
79
|
+
method: method,
|
|
80
|
+
headers: headers
|
|
81
|
+
};
|
|
82
|
+
if (data)
|
|
83
|
+
options.body = JSON.stringify(data);
|
|
84
|
+
fetch(`${this.baseUrl}${endpoint}`, options)
|
|
85
|
+
.then(handleResponse)
|
|
86
|
+
.then(json => {
|
|
87
|
+
if (didTimeOut)
|
|
88
|
+
return;
|
|
89
|
+
resolve(json);
|
|
90
|
+
})
|
|
91
|
+
.catch(err => {
|
|
92
|
+
if (didTimeOut)
|
|
93
|
+
return;
|
|
94
|
+
err.code ? reject(err) : reject(fiveHundredError());
|
|
95
|
+
})
|
|
96
|
+
.finally(() => {
|
|
97
|
+
if (timeout)
|
|
98
|
+
clearTimeout(timer);
|
|
99
|
+
});
|
|
103
100
|
});
|
|
104
101
|
});
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
102
|
+
this.authRequest = (endpoint, data) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
return new Promise((resolve, reject) => {
|
|
104
|
+
data.client_id = this.clientId;
|
|
105
|
+
const options = {
|
|
106
|
+
method: 'POST',
|
|
107
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
108
|
+
body: (0, utils_1.serialize)(data)
|
|
109
|
+
};
|
|
110
|
+
fetch(`${this.authUrl}/oauth2${endpoint}`, options)
|
|
111
|
+
.then(res => res.json())
|
|
112
|
+
.then(json => {
|
|
113
|
+
if (json.error)
|
|
114
|
+
throw new Error(json.error_description);
|
|
115
|
+
resolve(json);
|
|
116
|
+
})
|
|
117
|
+
.catch(err => {
|
|
118
|
+
reject(err);
|
|
119
|
+
});
|
|
123
120
|
});
|
|
124
121
|
});
|
|
122
|
+
this.brandId = config === null || config === void 0 ? void 0 : config.brandId;
|
|
123
|
+
this.clientId = config === null || config === void 0 ? void 0 : config.clientId;
|
|
124
|
+
this.baseUrl = config === null || config === void 0 ? void 0 : config.baseUrl;
|
|
125
|
+
this.authUrl = config === null || config === void 0 ? void 0 : config.authUrl;
|
|
125
126
|
}
|
|
126
127
|
post(endpoint, data) {
|
|
127
128
|
return this.request(`/${endpoint}`, 'POST', data);
|
|
@@ -418,11 +419,11 @@ class OpenTenderAPI {
|
|
|
418
419
|
params = [
|
|
419
420
|
`prep_status=TODO,IN_PROGRESS,DONE`,
|
|
420
421
|
`sort_by=fire_at`,
|
|
421
|
-
`sort_direction=ASC
|
|
422
|
+
`sort_direction=ASC`
|
|
422
423
|
];
|
|
423
424
|
}
|
|
424
425
|
else {
|
|
425
|
-
const { business_date, channel_type, prep_status, receipt_type, parent_receipt_uuid, search, sort_by, sort_direction
|
|
426
|
+
const { business_date, channel_type, prep_status, receipt_type, parent_receipt_uuid, search, sort_by, sort_direction } = args;
|
|
426
427
|
if (business_date)
|
|
427
428
|
params.push(`business_date=${business_date}`);
|
|
428
429
|
if (channel_type)
|
|
@@ -511,7 +512,7 @@ class OpenTenderAPI {
|
|
|
511
512
|
const data = {
|
|
512
513
|
grant_type: 'password',
|
|
513
514
|
username: email,
|
|
514
|
-
password: password
|
|
515
|
+
password: password
|
|
515
516
|
};
|
|
516
517
|
return this.authRequest('/token', data);
|
|
517
518
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Alerts } from '@open-tender/types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
|
-
export declare const clearAlerts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
3
|
+
export declare const clearAlerts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"alerts/clearAlerts">, addAlert: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "alerts/addAlert">, dismissAlert: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "alerts/dismissAlert">;
|
|
4
4
|
export declare const selectAlerts: (state: AppState) => Alerts;
|
|
5
5
|
export declare const alertsReducer: import("redux").Reducer<Alerts, import("redux").AnyAction>;
|
|
@@ -12,8 +12,14 @@ export declare enum AllergensActionType {
|
|
|
12
12
|
export declare const fetchAllergens: import("@reduxjs/toolkit").AsyncThunk<Allergens, void, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
16
|
+
extra?: unknown;
|
|
17
|
+
serializedErrorType?: unknown;
|
|
18
|
+
pendingMeta?: unknown;
|
|
19
|
+
fulfilledMeta?: unknown;
|
|
20
|
+
rejectedMeta?: unknown;
|
|
15
21
|
}>;
|
|
16
|
-
export declare const resetAllergens: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
22
|
+
export declare const resetAllergens: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"allergens/resetAllergens">, setSelectedAllergens: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "allergens/setSelectedAllergens">;
|
|
17
23
|
export declare const selectAllergens: (state: AppState) => AllergensState;
|
|
18
24
|
export declare const selectSelectedAllergenNames: (state: AppState) => string[];
|
|
19
25
|
export declare const allergensReducer: import("redux").Reducer<AllergensState, import("redux").AnyAction>;
|
|
@@ -15,8 +15,14 @@ export declare const fetchAnnouncementPage: import("@reduxjs/toolkit").AsyncThun
|
|
|
15
15
|
error: RequestError;
|
|
16
16
|
page: AuthType;
|
|
17
17
|
};
|
|
18
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
19
|
+
extra?: unknown;
|
|
20
|
+
serializedErrorType?: unknown;
|
|
21
|
+
pendingMeta?: unknown;
|
|
22
|
+
fulfilledMeta?: unknown;
|
|
23
|
+
rejectedMeta?: unknown;
|
|
18
24
|
}>;
|
|
19
|
-
export declare const resetAnnouncements: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
25
|
+
export declare const resetAnnouncements: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"announcements/resetAnnouncements">;
|
|
20
26
|
export declare const selectAnnouncements: (state: AppState) => AnnouncementsState;
|
|
21
27
|
export declare const selectAnnouncementsPage: (page: AuthType) => (state: AppState) => {
|
|
22
28
|
settings: import("@open-tender/types").AnnouncementSettings | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Dispatch } from '@reduxjs/toolkit';
|
|
1
2
|
import { AppState } from '../app';
|
|
2
3
|
import { CheckoutCheck, CheckoutForm, CompletedOrder, Order, RequestStatus } from '@open-tender/types';
|
|
3
4
|
export interface CheckoutState {
|
|
@@ -21,16 +22,34 @@ export declare const validateOrder: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
21
22
|
}, Partial<Order> | undefined, {
|
|
22
23
|
state: AppState;
|
|
23
24
|
rejectValue: any;
|
|
25
|
+
dispatch?: Dispatch<import("redux").AnyAction> | undefined;
|
|
26
|
+
extra?: unknown;
|
|
27
|
+
serializedErrorType?: unknown;
|
|
28
|
+
pendingMeta?: unknown;
|
|
29
|
+
fulfilledMeta?: unknown;
|
|
30
|
+
rejectedMeta?: unknown;
|
|
24
31
|
}>;
|
|
25
32
|
export declare const submitOrder: import("@reduxjs/toolkit").AsyncThunk<CompletedOrder, void, {
|
|
26
33
|
state: AppState;
|
|
27
34
|
rejectValue: any;
|
|
35
|
+
dispatch?: Dispatch<import("redux").AnyAction> | undefined;
|
|
36
|
+
extra?: unknown;
|
|
37
|
+
serializedErrorType?: unknown;
|
|
38
|
+
pendingMeta?: unknown;
|
|
39
|
+
fulfilledMeta?: unknown;
|
|
40
|
+
rejectedMeta?: unknown;
|
|
28
41
|
}>;
|
|
29
42
|
export declare const submitOrderPay: import("@reduxjs/toolkit").AsyncThunk<CompletedOrder, boolean | undefined, {
|
|
30
43
|
state: AppState;
|
|
31
44
|
rejectValue: any;
|
|
45
|
+
dispatch?: Dispatch<import("redux").AnyAction> | undefined;
|
|
46
|
+
extra?: unknown;
|
|
47
|
+
serializedErrorType?: unknown;
|
|
48
|
+
pendingMeta?: unknown;
|
|
49
|
+
fulfilledMeta?: unknown;
|
|
50
|
+
rejectedMeta?: unknown;
|
|
32
51
|
}>;
|
|
33
|
-
export declare const resetCheckout: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
52
|
+
export declare const resetCheckout: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"checkout/resetCheckout">, resetCheck: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"checkout/resetCheck">, resetCompletedOrder: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"checkout/resetCompletedOrder">, resetErrors: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"checkout/resetErrors">, resetTip: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"checkout/resetTip">, setCompletedOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "checkout/setCompletedOrder">, setGuest: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "checkout/setGuest">, setSubmitting: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "checkout/setSubmitting">, updateCheckoutCustomer: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "checkout/updateCheckoutCustomer">, updateForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "checkout/updateForm">;
|
|
34
53
|
export declare const selectCheckout: (state: AppState) => CheckoutState;
|
|
35
54
|
export declare const selectCheck: (state: AppState) => CheckoutCheck | null;
|
|
36
55
|
export declare const selectCompletedOrder: (state: AppState) => CompletedOrder | null;
|
|
@@ -15,8 +15,14 @@ export declare const fetchCompletedOrders: import("@reduxjs/toolkit").AsyncThunk
|
|
|
15
15
|
}, {
|
|
16
16
|
state: AppState;
|
|
17
17
|
rejectValue: RequestError;
|
|
18
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
19
|
+
extra?: unknown;
|
|
20
|
+
serializedErrorType?: unknown;
|
|
21
|
+
pendingMeta?: unknown;
|
|
22
|
+
fulfilledMeta?: unknown;
|
|
23
|
+
rejectedMeta?: unknown;
|
|
18
24
|
}>;
|
|
19
|
-
export declare const resetCompletedOrders: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
25
|
+
export declare const resetCompletedOrders: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"completedOrders/resetCompletedOrders">;
|
|
20
26
|
export declare const selectCompletedOrders: (state: AppState) => {
|
|
21
27
|
orders: CompletedOrders;
|
|
22
28
|
loading: RequestStatus;
|
|
@@ -26,8 +26,14 @@ export declare const fetchConfig: import("@reduxjs/toolkit").AsyncThunk<ConfigSt
|
|
|
26
26
|
}, {
|
|
27
27
|
state: AppState;
|
|
28
28
|
rejectValue: RequestError;
|
|
29
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
30
|
+
extra?: unknown;
|
|
31
|
+
serializedErrorType?: unknown;
|
|
32
|
+
pendingMeta?: unknown;
|
|
33
|
+
fulfilledMeta?: unknown;
|
|
34
|
+
rejectedMeta?: unknown;
|
|
29
35
|
}>;
|
|
30
|
-
export declare const resetConfig: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
36
|
+
export declare const resetConfig: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"config/resetConfig">, resetRetries: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"config/resetRetries">, incrementRetries: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"config/incrementRetries">;
|
|
31
37
|
export declare const selectCateringOnly: (state: AppState) => boolean;
|
|
32
38
|
export declare const selectConfig: (state: AppState) => ConfigState;
|
|
33
39
|
export declare const selectBrand: (state: AppState) => ConfigBrand | null;
|
|
@@ -28,7 +28,12 @@ exports.fetchConfig = (0, toolkit_1.createAsyncThunk)(ConfigActionType.FetchConf
|
|
|
28
28
|
try {
|
|
29
29
|
const api = new api_1.default(options);
|
|
30
30
|
const response = yield api.getConfig();
|
|
31
|
-
const app = {
|
|
31
|
+
const app = {
|
|
32
|
+
baseUrl: options.baseUrl,
|
|
33
|
+
authUrl: options.authUrl,
|
|
34
|
+
clientId: options.clientId,
|
|
35
|
+
brandId: options.brandId
|
|
36
|
+
};
|
|
32
37
|
options.callback && options.callback();
|
|
33
38
|
return Object.assign(Object.assign({}, response), { app });
|
|
34
39
|
}
|
|
@@ -46,7 +51,7 @@ const configSlice = (0, toolkit_1.createSlice)({
|
|
|
46
51
|
},
|
|
47
52
|
incrementRetries: state => {
|
|
48
53
|
state.retries = state.retries + 1;
|
|
49
|
-
}
|
|
54
|
+
}
|
|
50
55
|
},
|
|
51
56
|
extraReducers: builder => {
|
|
52
57
|
builder
|
|
@@ -55,7 +60,11 @@ const configSlice = (0, toolkit_1.createSlice)({
|
|
|
55
60
|
state.app = app;
|
|
56
61
|
state.brand = brand;
|
|
57
62
|
state.content = content;
|
|
58
|
-
state.theme = theme
|
|
63
|
+
state.theme = theme
|
|
64
|
+
? action.meta.arg.isMobile
|
|
65
|
+
? (0, utils_1.decorateTheme)(theme)
|
|
66
|
+
: theme
|
|
67
|
+
: null;
|
|
59
68
|
state.settings = settings;
|
|
60
69
|
state.loading = 'idle';
|
|
61
70
|
state.api = new api_1.default(app);
|
|
@@ -128,7 +137,12 @@ const selectHeaderHeight = (state) => (isBrowser) => {
|
|
|
128
137
|
return parseInt(height.replace('rem', '')) * 10;
|
|
129
138
|
};
|
|
130
139
|
exports.selectHeaderHeight = selectHeaderHeight;
|
|
131
|
-
const selectOutpostName = (state) => {
|
|
140
|
+
const selectOutpostName = (state) => {
|
|
141
|
+
var _a, _b, _c;
|
|
142
|
+
return ((_a = state.config.settings) === null || _a === void 0 ? void 0 : _a.locationName.OUTPOST)
|
|
143
|
+
? (0, utils_1.capitalize)((_c = (_b = state.config.settings) === null || _b === void 0 ? void 0 : _b.locationName.OUTPOST[0]) !== null && _c !== void 0 ? _c : '')
|
|
144
|
+
: undefined;
|
|
145
|
+
};
|
|
132
146
|
exports.selectOutpostName = selectOutpostName;
|
|
133
147
|
const selectHasCatering = (state) => {
|
|
134
148
|
var _a;
|
|
@@ -3,6 +3,6 @@ import { AppState } from '../app';
|
|
|
3
3
|
export interface ConfirmationState {
|
|
4
4
|
order: Order | null;
|
|
5
5
|
}
|
|
6
|
-
export declare const resetConfirmation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
6
|
+
export declare const resetConfirmation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"confirmation/resetConfirmation">, setConfirmationOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "confirmation/setConfirmationOrder">;
|
|
7
7
|
export declare const selectConfirmationOrder: (state: AppState) => Order | null;
|
|
8
8
|
export declare const confirmationReducer: import("redux").Reducer<ConfirmationState, import("redux").AnyAction>;
|
|
@@ -20,18 +20,42 @@ export declare const checkAuth: (err: RequestError, dispatch: ThunkDispatch<AppS
|
|
|
20
20
|
export declare const fetchCustomer: import("@reduxjs/toolkit").AsyncThunk<Partial<Profile>, void, {
|
|
21
21
|
state: AppState;
|
|
22
22
|
rejectValue: RequestError;
|
|
23
|
+
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
24
|
+
extra?: unknown;
|
|
25
|
+
serializedErrorType?: unknown;
|
|
26
|
+
pendingMeta?: unknown;
|
|
27
|
+
fulfilledMeta?: unknown;
|
|
28
|
+
rejectedMeta?: unknown;
|
|
23
29
|
}>;
|
|
24
30
|
export declare const loginCustomer: import("@reduxjs/toolkit").AsyncThunk<Auth, LoginData, {
|
|
25
31
|
state: AppState;
|
|
26
32
|
rejectValue: RequestError;
|
|
33
|
+
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
34
|
+
extra?: unknown;
|
|
35
|
+
serializedErrorType?: unknown;
|
|
36
|
+
pendingMeta?: unknown;
|
|
37
|
+
fulfilledMeta?: unknown;
|
|
38
|
+
rejectedMeta?: unknown;
|
|
27
39
|
}>;
|
|
28
40
|
export declare const logoutCustomer: import("@reduxjs/toolkit").AsyncThunk<null, boolean | undefined, {
|
|
29
41
|
state: AppState;
|
|
30
42
|
rejectValue: RequestError;
|
|
43
|
+
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
44
|
+
extra?: unknown;
|
|
45
|
+
serializedErrorType?: unknown;
|
|
46
|
+
pendingMeta?: unknown;
|
|
47
|
+
fulfilledMeta?: unknown;
|
|
48
|
+
rejectedMeta?: unknown;
|
|
31
49
|
}>;
|
|
32
50
|
export declare const linkPosToken: import("@reduxjs/toolkit").AsyncThunk<void, string, {
|
|
33
51
|
state: AppState;
|
|
34
52
|
rejectValue: RequestError;
|
|
53
|
+
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
54
|
+
extra?: unknown;
|
|
55
|
+
serializedErrorType?: unknown;
|
|
56
|
+
pendingMeta?: unknown;
|
|
57
|
+
fulfilledMeta?: unknown;
|
|
58
|
+
rejectedMeta?: unknown;
|
|
35
59
|
}>;
|
|
36
60
|
export declare const updateCustomer: import("@reduxjs/toolkit").AsyncThunk<Partial<Profile>, {
|
|
37
61
|
data: Partial<Profile>;
|
|
@@ -39,10 +63,22 @@ export declare const updateCustomer: import("@reduxjs/toolkit").AsyncThunk<Parti
|
|
|
39
63
|
}, {
|
|
40
64
|
state: AppState;
|
|
41
65
|
rejectValue: RequestError;
|
|
66
|
+
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
67
|
+
extra?: unknown;
|
|
68
|
+
serializedErrorType?: unknown;
|
|
69
|
+
pendingMeta?: unknown;
|
|
70
|
+
fulfilledMeta?: unknown;
|
|
71
|
+
rejectedMeta?: unknown;
|
|
42
72
|
}>;
|
|
43
73
|
export declare const sendCustomerVerificationEmail: import("@reduxjs/toolkit").AsyncThunk<void, string, {
|
|
44
74
|
state: AppState;
|
|
45
75
|
rejectValue: RequestError;
|
|
76
|
+
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
77
|
+
extra?: unknown;
|
|
78
|
+
serializedErrorType?: unknown;
|
|
79
|
+
pendingMeta?: unknown;
|
|
80
|
+
fulfilledMeta?: unknown;
|
|
81
|
+
rejectedMeta?: unknown;
|
|
46
82
|
}>;
|
|
47
83
|
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<null, {
|
|
48
84
|
email: string;
|
|
@@ -50,6 +86,12 @@ export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<n
|
|
|
50
86
|
}, {
|
|
51
87
|
state: AppState;
|
|
52
88
|
rejectValue: RequestError;
|
|
89
|
+
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
90
|
+
extra?: unknown;
|
|
91
|
+
serializedErrorType?: unknown;
|
|
92
|
+
pendingMeta?: unknown;
|
|
93
|
+
fulfilledMeta?: unknown;
|
|
94
|
+
rejectedMeta?: unknown;
|
|
53
95
|
}>;
|
|
54
96
|
export declare const authCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<Auth, {
|
|
55
97
|
code: any;
|
|
@@ -58,6 +100,12 @@ export declare const authCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<Au
|
|
|
58
100
|
}, {
|
|
59
101
|
state: AppState;
|
|
60
102
|
rejectValue: RequestError;
|
|
103
|
+
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
104
|
+
extra?: unknown;
|
|
105
|
+
serializedErrorType?: unknown;
|
|
106
|
+
pendingMeta?: unknown;
|
|
107
|
+
fulfilledMeta?: unknown;
|
|
108
|
+
rejectedMeta?: unknown;
|
|
61
109
|
}>;
|
|
62
110
|
export declare const deleteCustomer: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
63
111
|
data?: Partial<Profile> | undefined;
|
|
@@ -65,8 +113,14 @@ export declare const deleteCustomer: import("@reduxjs/toolkit").AsyncThunk<void,
|
|
|
65
113
|
}, {
|
|
66
114
|
state: AppState;
|
|
67
115
|
rejectValue: RequestError;
|
|
116
|
+
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
117
|
+
extra?: unknown;
|
|
118
|
+
serializedErrorType?: unknown;
|
|
119
|
+
pendingMeta?: unknown;
|
|
120
|
+
fulfilledMeta?: unknown;
|
|
121
|
+
rejectedMeta?: unknown;
|
|
68
122
|
}>;
|
|
69
|
-
export declare const resetCustomer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
123
|
+
export declare const resetCustomer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"account/resetCustomer">, resetLoginError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"account/resetLoginError">, fulfillLoginCustomer: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "account/fulfillLoginCustomer">;
|
|
70
124
|
export declare const selectToken: (state: AppState) => string | null;
|
|
71
125
|
export declare const selectCustomer: (state: AppState) => AccountState;
|
|
72
126
|
export declare const accountReducer: import("redux").Reducer<AccountState, AnyAction>;
|
|
@@ -314,7 +314,7 @@ const accountSlice = (0, toolkit_1.createSlice)({
|
|
|
314
314
|
//do nothing
|
|
315
315
|
})
|
|
316
316
|
.addCase(exports.deleteCustomer.fulfilled, () => initialState)
|
|
317
|
-
.addCase(exports.deleteCustomer.pending,
|
|
317
|
+
.addCase(exports.deleteCustomer.pending, state => {
|
|
318
318
|
state.loading = 'pending';
|
|
319
319
|
})
|
|
320
320
|
.addCase(exports.deleteCustomer.rejected, () => initialState);
|