@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
|
@@ -22,6 +22,12 @@ export declare enum OrdersActionType {
|
|
|
22
22
|
export declare const fetchOrders: import("@reduxjs/toolkit").AsyncThunk<any, any, {
|
|
23
23
|
state: AppState;
|
|
24
24
|
rejectValue: RequestError;
|
|
25
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
26
|
+
extra?: unknown;
|
|
27
|
+
serializedErrorType?: unknown;
|
|
28
|
+
pendingMeta?: unknown;
|
|
29
|
+
fulfilledMeta?: unknown;
|
|
30
|
+
rejectedMeta?: unknown;
|
|
25
31
|
}>;
|
|
26
32
|
export declare const printTicket: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
27
33
|
order_uuid: number;
|
|
@@ -30,6 +36,12 @@ export declare const printTicket: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
|
30
36
|
}, {
|
|
31
37
|
state: AppState;
|
|
32
38
|
rejectValue: RequestError;
|
|
39
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
40
|
+
extra?: unknown;
|
|
41
|
+
serializedErrorType?: unknown;
|
|
42
|
+
pendingMeta?: unknown;
|
|
43
|
+
fulfilledMeta?: unknown;
|
|
44
|
+
rejectedMeta?: unknown;
|
|
33
45
|
}>;
|
|
34
46
|
export declare const updateTicket: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
35
47
|
order_uuid: number;
|
|
@@ -38,6 +50,12 @@ export declare const updateTicket: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
|
38
50
|
}, {
|
|
39
51
|
state: AppState;
|
|
40
52
|
rejectValue: RequestError;
|
|
53
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
54
|
+
extra?: unknown;
|
|
55
|
+
serializedErrorType?: unknown;
|
|
56
|
+
pendingMeta?: unknown;
|
|
57
|
+
fulfilledMeta?: unknown;
|
|
58
|
+
rejectedMeta?: unknown;
|
|
41
59
|
}>;
|
|
42
60
|
export declare const printTickets: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
43
61
|
order_uuid: number;
|
|
@@ -45,10 +63,22 @@ export declare const printTickets: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
|
45
63
|
}, {
|
|
46
64
|
state: AppState;
|
|
47
65
|
rejectValue: RequestError;
|
|
66
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
67
|
+
extra?: unknown;
|
|
68
|
+
serializedErrorType?: unknown;
|
|
69
|
+
pendingMeta?: unknown;
|
|
70
|
+
fulfilledMeta?: unknown;
|
|
71
|
+
rejectedMeta?: unknown;
|
|
48
72
|
}>;
|
|
49
73
|
export declare const resetTickets: import("@reduxjs/toolkit").AsyncThunk<void, number, {
|
|
50
74
|
state: AppState;
|
|
51
75
|
rejectValue: RequestError;
|
|
76
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
77
|
+
extra?: unknown;
|
|
78
|
+
serializedErrorType?: unknown;
|
|
79
|
+
pendingMeta?: unknown;
|
|
80
|
+
fulfilledMeta?: unknown;
|
|
81
|
+
rejectedMeta?: unknown;
|
|
52
82
|
}>;
|
|
53
83
|
export declare const updateOrderPrep: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
54
84
|
order_uuid: number;
|
|
@@ -56,12 +86,24 @@ export declare const updateOrderPrep: import("@reduxjs/toolkit").AsyncThunk<void
|
|
|
56
86
|
}, {
|
|
57
87
|
state: AppState;
|
|
58
88
|
rejectValue: RequestError;
|
|
89
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
90
|
+
extra?: unknown;
|
|
91
|
+
serializedErrorType?: unknown;
|
|
92
|
+
pendingMeta?: unknown;
|
|
93
|
+
fulfilledMeta?: unknown;
|
|
94
|
+
rejectedMeta?: unknown;
|
|
59
95
|
}>;
|
|
60
96
|
export declare const printReceipt: import("@reduxjs/toolkit").AsyncThunk<void, number, {
|
|
61
97
|
state: AppState;
|
|
62
98
|
rejectValue: RequestError;
|
|
99
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
100
|
+
extra?: unknown;
|
|
101
|
+
serializedErrorType?: unknown;
|
|
102
|
+
pendingMeta?: unknown;
|
|
103
|
+
fulfilledMeta?: unknown;
|
|
104
|
+
rejectedMeta?: unknown;
|
|
63
105
|
}>;
|
|
64
|
-
export declare const resetOrders: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
106
|
+
export declare const resetOrders: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"orders/resetOrders">, setCurrentOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "orders/setCurrentOrder">, skipFetchOrders: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"orders/skipFetchOrders">, updateOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "orders/updateOrder">;
|
|
65
107
|
export declare const selectOrders: (state: AppState) => {
|
|
66
108
|
orders: Orders;
|
|
67
109
|
loading: RequestStatus;
|
|
@@ -8,8 +8,14 @@ export interface PostsSlice {
|
|
|
8
8
|
export declare const fetchPosts: import("@reduxjs/toolkit").AsyncThunk<any, string, {
|
|
9
9
|
state: AppState;
|
|
10
10
|
rejectValue: RequestError;
|
|
11
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
12
|
+
extra?: unknown;
|
|
13
|
+
serializedErrorType?: unknown;
|
|
14
|
+
pendingMeta?: unknown;
|
|
15
|
+
fulfilledMeta?: unknown;
|
|
16
|
+
rejectedMeta?: unknown;
|
|
11
17
|
}>;
|
|
12
|
-
export declare const resetPosts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
18
|
+
export declare const resetPosts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"posts/resetPosts">;
|
|
13
19
|
export declare const selectPosts: (state: AppState) => {
|
|
14
20
|
posts: any[];
|
|
15
21
|
loading: RequestStatus;
|
|
@@ -6,7 +6,7 @@ const toolkit_1 = require("@reduxjs/toolkit");
|
|
|
6
6
|
const initialState = {
|
|
7
7
|
posts: [],
|
|
8
8
|
loading: 'idle',
|
|
9
|
-
error: null
|
|
9
|
+
error: null
|
|
10
10
|
};
|
|
11
11
|
exports.fetchPosts = (0, toolkit_1.createAsyncThunk)('posts/getPosts', (slug, { getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
12
12
|
const { api } = getState().config;
|
|
@@ -28,7 +28,7 @@ const postsSlice = (0, toolkit_1.createSlice)({
|
|
|
28
28
|
name: 'posts',
|
|
29
29
|
initialState: initialState,
|
|
30
30
|
reducers: {
|
|
31
|
-
resetPosts: () => initialState
|
|
31
|
+
resetPosts: () => initialState
|
|
32
32
|
},
|
|
33
33
|
extraReducers: builder => {
|
|
34
34
|
builder
|
|
@@ -37,7 +37,7 @@ const postsSlice = (0, toolkit_1.createSlice)({
|
|
|
37
37
|
state.loading = 'idle';
|
|
38
38
|
state.error = null;
|
|
39
39
|
})
|
|
40
|
-
.addCase(exports.fetchPosts.pending,
|
|
40
|
+
.addCase(exports.fetchPosts.pending, state => {
|
|
41
41
|
state.loading = 'pending';
|
|
42
42
|
})
|
|
43
43
|
.addCase(exports.fetchPosts.rejected, (state, action) => {
|
package/dist/cjs/slices/qr.d.ts
CHANGED
|
@@ -6,6 +6,6 @@ export interface QrState {
|
|
|
6
6
|
table: number | null;
|
|
7
7
|
service_type: ServiceType | null;
|
|
8
8
|
}
|
|
9
|
-
export declare const setQrParams: import("@reduxjs/toolkit").ActionCreatorWithPayload<any,
|
|
9
|
+
export declare const setQrParams: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "qr/setQrParams">, resetQrParams: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"qr/resetQrParams">;
|
|
10
10
|
export declare const selectQrParams: (state: AppState) => QrState;
|
|
11
11
|
export declare const qrReducer: import("redux").Reducer<QrState, import("redux").AnyAction>;
|
package/dist/cjs/slices/qr.js
CHANGED
|
@@ -7,7 +7,7 @@ const initialState = {
|
|
|
7
7
|
locationId: null,
|
|
8
8
|
prep_type: null,
|
|
9
9
|
table: null,
|
|
10
|
-
service_type: null
|
|
10
|
+
service_type: null
|
|
11
11
|
};
|
|
12
12
|
const qrSlice = (0, toolkit_1.createSlice)({
|
|
13
13
|
name: 'qr',
|
|
@@ -25,8 +25,8 @@ const qrSlice = (0, toolkit_1.createSlice)({
|
|
|
25
25
|
state.prep_type = null;
|
|
26
26
|
state.table = null;
|
|
27
27
|
state.service_type = null;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
30
|
});
|
|
31
31
|
_a = qrSlice.actions, exports.setQrParams = _a.setQrParams, exports.resetQrParams = _a.resetQrParams;
|
|
32
32
|
const selectQrParams = (state) => state.qr;
|
|
@@ -16,6 +16,12 @@ export declare const sendPasswordResetEmail: import("@reduxjs/toolkit").AsyncThu
|
|
|
16
16
|
}, {
|
|
17
17
|
state: AppState;
|
|
18
18
|
rejectValue: RequestError;
|
|
19
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
20
|
+
extra?: unknown;
|
|
21
|
+
serializedErrorType?: unknown;
|
|
22
|
+
pendingMeta?: unknown;
|
|
23
|
+
fulfilledMeta?: unknown;
|
|
24
|
+
rejectedMeta?: unknown;
|
|
19
25
|
}>;
|
|
20
26
|
export declare const resetPassword: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
21
27
|
new_password: string;
|
|
@@ -23,7 +29,13 @@ export declare const resetPassword: import("@reduxjs/toolkit").AsyncThunk<void,
|
|
|
23
29
|
}, {
|
|
24
30
|
state: AppState;
|
|
25
31
|
rejectValue: RequestError;
|
|
32
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
33
|
+
extra?: unknown;
|
|
34
|
+
serializedErrorType?: unknown;
|
|
35
|
+
pendingMeta?: unknown;
|
|
36
|
+
fulfilledMeta?: unknown;
|
|
37
|
+
rejectedMeta?: unknown;
|
|
26
38
|
}>;
|
|
27
|
-
export declare const resetPasswordReset: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
39
|
+
export declare const resetPasswordReset: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"resetPassword/resetPasswordReset">;
|
|
28
40
|
export declare const selectResetPassword: (state: AppState) => ResetPasswordState;
|
|
29
41
|
export declare const resetPasswordReducer: import("redux").Reducer<ResetPasswordState, import("redux").AnyAction>;
|
|
@@ -18,6 +18,12 @@ export declare const fetchRevenueCenters: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
18
18
|
}, {
|
|
19
19
|
state: AppState;
|
|
20
20
|
rejectValue: RequestError;
|
|
21
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
22
|
+
extra?: unknown;
|
|
23
|
+
serializedErrorType?: unknown;
|
|
24
|
+
pendingMeta?: unknown;
|
|
25
|
+
fulfilledMeta?: unknown;
|
|
26
|
+
rejectedMeta?: unknown;
|
|
21
27
|
}>;
|
|
22
28
|
export declare const fetchLocations: import("@reduxjs/toolkit").AsyncThunk<CustomerRevenueCenters, {
|
|
23
29
|
type: string;
|
|
@@ -28,8 +34,14 @@ export declare const fetchLocations: import("@reduxjs/toolkit").AsyncThunk<Custo
|
|
|
28
34
|
}, {
|
|
29
35
|
state: AppState;
|
|
30
36
|
rejectValue: RequestError;
|
|
37
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
38
|
+
extra?: unknown;
|
|
39
|
+
serializedErrorType?: unknown;
|
|
40
|
+
pendingMeta?: unknown;
|
|
41
|
+
fulfilledMeta?: unknown;
|
|
42
|
+
rejectedMeta?: unknown;
|
|
31
43
|
}>;
|
|
32
|
-
export declare const resetRevenueCenters: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
44
|
+
export declare const resetRevenueCenters: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"revenueCenters/resetRevenueCenters">, setRevenueCenters: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "revenueCenters/setRevenueCenters">;
|
|
33
45
|
export declare const selectRevenueCenters: (state: AppState) => RevenueCentersState;
|
|
34
46
|
export declare const selectRevenueCenterCount: (state: AppState) => number;
|
|
35
47
|
export declare const revenueCentersReducer: import("redux").Reducer<RevenueCentersState, import("redux").AnyAction>;
|
|
@@ -2,6 +2,6 @@ import { AppState } from '../app';
|
|
|
2
2
|
export interface SidebarModalState {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const toggleSidebarModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
5
|
+
export declare const toggleSidebarModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"sidebarModal/toggleSidebarModal">;
|
|
6
6
|
export declare const selectSidebarModal: (state: AppState) => SidebarModalState;
|
|
7
7
|
export declare const sidebarModalReducer: import("redux").Reducer<SidebarModalState, import("redux").AnyAction>;
|
|
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.sidebarModalReducer = exports.selectSidebarModal = exports.toggleSidebarModal = void 0;
|
|
4
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
5
|
const initialState = {
|
|
6
|
-
isOpen: false
|
|
6
|
+
isOpen: false
|
|
7
7
|
};
|
|
8
8
|
const sidebarModalSlice = (0, toolkit_1.createSlice)({
|
|
9
9
|
name: 'sidebarModal',
|
|
10
10
|
initialState,
|
|
11
11
|
reducers: {
|
|
12
|
-
toggleSidebarModal:
|
|
12
|
+
toggleSidebarModal: state => {
|
|
13
13
|
state.isOpen = !state.isOpen;
|
|
14
14
|
state.isOpen
|
|
15
15
|
? document.body.classList.add('has-modal')
|
|
16
16
|
: document.body.classList.remove('has-modal');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
19
|
});
|
|
20
20
|
exports.toggleSidebarModal = sidebarModalSlice.actions.toggleSidebarModal;
|
|
21
21
|
const selectSidebarModal = (state) => state.sidebarModal;
|
|
@@ -2,6 +2,6 @@ import { AppState } from '../app';
|
|
|
2
2
|
export interface SidebarState {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const toggleSidebar: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
5
|
+
export declare const toggleSidebar: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"sidebar/toggleSidebar">;
|
|
6
6
|
export declare const selectSidebar: (state: AppState) => SidebarState;
|
|
7
7
|
export declare const sidebarReducer: import("redux").Reducer<SidebarState, import("redux").AnyAction>;
|
|
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.sidebarReducer = exports.selectSidebar = exports.toggleSidebar = void 0;
|
|
4
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
5
|
const initialState = {
|
|
6
|
-
isOpen: false
|
|
6
|
+
isOpen: false
|
|
7
7
|
};
|
|
8
8
|
const sidebarSlice = (0, toolkit_1.createSlice)({
|
|
9
9
|
name: 'sidebar',
|
|
10
10
|
initialState,
|
|
11
11
|
reducers: {
|
|
12
|
-
toggleSidebar:
|
|
12
|
+
toggleSidebar: state => {
|
|
13
13
|
state.isOpen = !state.isOpen;
|
|
14
14
|
state.isOpen
|
|
15
15
|
? document.body.classList.add('has-modal')
|
|
16
16
|
: document.body.classList.remove('has-modal');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
19
|
});
|
|
20
20
|
exports.toggleSidebar = sidebarSlice.actions.toggleSidebar;
|
|
21
21
|
const selectSidebar = (state) => state.sidebar;
|
|
@@ -13,7 +13,13 @@ export declare const signUpCustomer: import("@reduxjs/toolkit").AsyncThunk<void,
|
|
|
13
13
|
}, {
|
|
14
14
|
state: AppState;
|
|
15
15
|
rejectValue: RequestError;
|
|
16
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
17
|
+
extra?: unknown;
|
|
18
|
+
serializedErrorType?: unknown;
|
|
19
|
+
pendingMeta?: unknown;
|
|
20
|
+
fulfilledMeta?: unknown;
|
|
21
|
+
rejectedMeta?: unknown;
|
|
16
22
|
}>;
|
|
17
|
-
export declare const resetSignUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
23
|
+
export declare const resetSignUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"signUp/resetSignUp">;
|
|
18
24
|
export declare const selectSignUp: (state: AppState) => SignUpState;
|
|
19
25
|
export declare const signUpReducer: import("redux").Reducer<SignUpState, import("redux").AnyAction>;
|
|
@@ -19,7 +19,10 @@ exports.signUpCustomer = (0, toolkit_1.createAsyncThunk)(SignUpActionType.SignUp
|
|
|
19
19
|
try {
|
|
20
20
|
const api = getState().config.api;
|
|
21
21
|
const response = yield api.postSignUp(data);
|
|
22
|
-
dispatch((0, customer_1.loginCustomer)({
|
|
22
|
+
dispatch((0, customer_1.loginCustomer)({
|
|
23
|
+
email: (_a = data.data.email) !== null && _a !== void 0 ? _a : '',
|
|
24
|
+
password: (_b = data.data.password) !== null && _b !== void 0 ? _b : ''
|
|
25
|
+
}));
|
|
23
26
|
if (data.callback)
|
|
24
27
|
data.callback(response);
|
|
25
28
|
return;
|
|
@@ -11,7 +11,13 @@ export declare enum ValidTimesActionType {
|
|
|
11
11
|
export declare const fetchValidTimes: import("@reduxjs/toolkit").AsyncThunk<ValidTimes, OrderType, {
|
|
12
12
|
state: AppState;
|
|
13
13
|
rejectValue: RequestError;
|
|
14
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
15
|
+
extra?: unknown;
|
|
16
|
+
serializedErrorType?: unknown;
|
|
17
|
+
pendingMeta?: unknown;
|
|
18
|
+
fulfilledMeta?: unknown;
|
|
19
|
+
rejectedMeta?: unknown;
|
|
14
20
|
}>;
|
|
15
|
-
export declare const resetValidTimes: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
21
|
+
export declare const resetValidTimes: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"validTimes/resetValidTimes">, setValidTimes: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "validTimes/setValidTimes">;
|
|
16
22
|
export declare const selectValidTimes: (state: AppState) => ValidTimesState;
|
|
17
23
|
export declare const validTimesReducer: import("redux").Reducer<ValidTimesState, import("redux").AnyAction>;
|
|
@@ -11,7 +11,13 @@ export declare enum VerifyAccountActionType {
|
|
|
11
11
|
export declare const verifyAccount: import("@reduxjs/toolkit").AsyncThunk<void, string, {
|
|
12
12
|
state: AppState;
|
|
13
13
|
rejectValue: RequestError;
|
|
14
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
15
|
+
extra?: unknown;
|
|
16
|
+
serializedErrorType?: unknown;
|
|
17
|
+
pendingMeta?: unknown;
|
|
18
|
+
fulfilledMeta?: unknown;
|
|
19
|
+
rejectedMeta?: unknown;
|
|
14
20
|
}>;
|
|
15
|
-
export declare const resetVerifyAccount: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
21
|
+
export declare const resetVerifyAccount: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"verifyAccount/resetVerifyAccount">;
|
|
16
22
|
export declare const selectVerifyAccount: (state: AppState) => VerifyAccountState;
|
|
17
23
|
export declare const verifyAccountReducer: import("redux").Reducer<VerifyAccountState, import("redux").AnyAction>;
|
package/dist/esm/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/esm/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/esm/app/store.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
2
|
-
import { alertsReducer, notificationsReducer, allergensReducer, announcementsReducer, customerReducer, signUpReducer, revenueCentersReducer, checkoutReducer, completedOrdersReducer, orderReducer, orderFulfillmentReducer, orderRatingReducer, ordersReducer, dealsReducer, confirmationReducer, donationsReducer, guestReducer, verifyAccountReducer, menuReducer, resetPasswordReducer, validTimesReducer, menuItemsReducer, menuDisplayReducer, giftCardsReducer, groupOrderReducer, levelupReducer, configReducer, geolocationReducer, loaderReducer, qrReducer, miscReducer, modalReducer, navSiteReducer, navReducer, postsReducer, sidebarModalReducer, sidebarReducer
|
|
2
|
+
import { alertsReducer, notificationsReducer, allergensReducer, announcementsReducer, customerReducer, signUpReducer, revenueCentersReducer, checkoutReducer, completedOrdersReducer, orderReducer, orderFulfillmentReducer, orderRatingReducer, ordersReducer, dealsReducer, confirmationReducer, donationsReducer, guestReducer, verifyAccountReducer, menuReducer, resetPasswordReducer, validTimesReducer, menuItemsReducer, menuDisplayReducer, giftCardsReducer, groupOrderReducer, levelupReducer, configReducer, geolocationReducer, loaderReducer, qrReducer, miscReducer, modalReducer, navSiteReducer, navReducer, postsReducer, sidebarModalReducer, sidebarReducer } from '../slices';
|
|
3
3
|
import { ReducerType } from '../slices/types';
|
|
4
4
|
export const appReducer = combineReducers({
|
|
5
5
|
[ReducerType.Alerts]: alertsReducer,
|
|
@@ -38,7 +38,7 @@ export const appReducer = combineReducers({
|
|
|
38
38
|
[ReducerType.Nav]: navReducer,
|
|
39
39
|
[ReducerType.Posts]: postsReducer,
|
|
40
40
|
[ReducerType.SidebarModal]: sidebarModalReducer,
|
|
41
|
-
[ReducerType.Sidebar]: sidebarReducer
|
|
41
|
+
[ReducerType.Sidebar]: sidebarReducer
|
|
42
42
|
});
|
|
43
43
|
const rootReducer = (state, action) => {
|
|
44
44
|
if (action.type === 'clearState') {
|
package/dist/esm/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>;
|