@open-tender/cloud 0.1.104 → 0.1.106
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 +2 -0
- package/dist/cjs/app/store.d.ts +6 -0
- package/dist/cjs/app/store.js +2 -0
- package/dist/cjs/services/api.d.ts +1 -0
- package/dist/cjs/services/api.js +3 -0
- package/dist/cjs/slices/allergens.d.ts +2 -0
- package/dist/cjs/slices/announcements.d.ts +4 -0
- package/dist/cjs/slices/config.d.ts +2 -0
- package/dist/cjs/slices/customer/creditCards.d.ts +2 -0
- package/dist/cjs/slices/customer/loyalty.d.ts +4 -0
- package/dist/cjs/slices/customer/order.d.ts +2 -0
- package/dist/cjs/slices/customer/tpls.d.ts +6 -0
- package/dist/cjs/slices/groupOrder.d.ts +8 -0
- package/dist/cjs/slices/index.d.ts +2 -0
- package/dist/cjs/slices/index.js +2 -0
- package/dist/cjs/slices/order.d.ts +6 -0
- package/dist/cjs/slices/pushNotifications.d.ts +9 -0
- package/dist/cjs/slices/pushNotifications.js +29 -0
- package/dist/cjs/slices/quote.d.ts +99 -0
- package/dist/cjs/slices/quote.js +65 -0
- package/dist/cjs/slices/tags.d.ts +2 -0
- package/dist/cjs/slices/types.d.ts +2 -0
- package/dist/cjs/slices/types.js +2 -0
- package/dist/esm/app/hooks.d.ts +2 -0
- package/dist/esm/app/store.d.ts +6 -0
- package/dist/esm/app/store.js +3 -1
- package/dist/esm/services/api.d.ts +1 -0
- package/dist/esm/services/api.js +3 -0
- package/dist/esm/slices/allergens.d.ts +2 -0
- package/dist/esm/slices/announcements.d.ts +4 -0
- package/dist/esm/slices/config.d.ts +2 -0
- package/dist/esm/slices/customer/creditCards.d.ts +2 -0
- package/dist/esm/slices/customer/loyalty.d.ts +4 -0
- package/dist/esm/slices/customer/order.d.ts +2 -0
- package/dist/esm/slices/customer/tpls.d.ts +6 -0
- package/dist/esm/slices/groupOrder.d.ts +8 -0
- package/dist/esm/slices/index.d.ts +2 -0
- package/dist/esm/slices/index.js +2 -0
- package/dist/esm/slices/order.d.ts +6 -0
- package/dist/esm/slices/pushNotifications.d.ts +9 -0
- package/dist/esm/slices/pushNotifications.js +23 -0
- package/dist/esm/slices/quote.d.ts +99 -0
- package/dist/esm/slices/quote.js +61 -0
- package/dist/esm/slices/tags.d.ts +2 -0
- package/dist/esm/slices/types.d.ts +2 -0
- package/dist/esm/slices/types.js +2 -0
- package/package.json +1 -1
package/dist/cjs/app/hooks.d.ts
CHANGED
|
@@ -48,7 +48,9 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<i
|
|
|
48
48
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
49
49
|
orderRating: import("..").OrderRatingState;
|
|
50
50
|
posts: import("..").PostsSlice;
|
|
51
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
51
52
|
qr: import("..").QrState;
|
|
53
|
+
quote: import("..").QuoteState;
|
|
52
54
|
resetPassword: import("..").ResetPasswordState;
|
|
53
55
|
revenueCenters: import("..").RevenueCentersState;
|
|
54
56
|
sidebar: import("..").SidebarState;
|
package/dist/cjs/app/store.d.ts
CHANGED
|
@@ -47,7 +47,9 @@ export declare const appReducer: import("redux").Reducer<import("redux").Combine
|
|
|
47
47
|
orderFulfillment: import("../slices").OrderFulfillmentState;
|
|
48
48
|
orderRating: import("../slices").OrderRatingState;
|
|
49
49
|
posts: import("../slices").PostsSlice;
|
|
50
|
+
pushNotifications: import("../slices").PushNotificationsState;
|
|
50
51
|
qr: import("../slices").QrState;
|
|
52
|
+
quote: import("../slices").QuoteState;
|
|
51
53
|
resetPassword: import("../slices").ResetPasswordState;
|
|
52
54
|
revenueCenters: import("../slices").RevenueCentersState;
|
|
53
55
|
sidebar: import("../slices").SidebarState;
|
|
@@ -107,7 +109,9 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
107
109
|
orderFulfillment: import("../slices").OrderFulfillmentState;
|
|
108
110
|
orderRating: import("../slices").OrderRatingState;
|
|
109
111
|
posts: import("../slices").PostsSlice;
|
|
112
|
+
pushNotifications: import("../slices").PushNotificationsState;
|
|
110
113
|
qr: import("../slices").QrState;
|
|
114
|
+
quote: import("../slices").QuoteState;
|
|
111
115
|
resetPassword: import("../slices").ResetPasswordState;
|
|
112
116
|
revenueCenters: import("../slices").RevenueCentersState;
|
|
113
117
|
sidebar: import("../slices").SidebarState;
|
|
@@ -165,7 +169,9 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
165
169
|
orderFulfillment: import("../slices").OrderFulfillmentState;
|
|
166
170
|
orderRating: import("../slices").OrderRatingState;
|
|
167
171
|
posts: import("../slices").PostsSlice;
|
|
172
|
+
pushNotifications: import("../slices").PushNotificationsState;
|
|
168
173
|
qr: import("../slices").QrState;
|
|
174
|
+
quote: import("../slices").QuoteState;
|
|
169
175
|
resetPassword: import("../slices").ResetPasswordState;
|
|
170
176
|
revenueCenters: import("../slices").RevenueCentersState;
|
|
171
177
|
sidebar: import("../slices").SidebarState;
|
package/dist/cjs/app/store.js
CHANGED
|
@@ -33,7 +33,9 @@ exports.appReducer = (0, toolkit_1.combineReducers)({
|
|
|
33
33
|
[types_1.ReducerType.OrderFulfillment]: slices_1.orderFulfillmentReducer,
|
|
34
34
|
[types_1.ReducerType.OrderRating]: slices_1.orderRatingReducer,
|
|
35
35
|
[types_1.ReducerType.Posts]: slices_1.postsReducer,
|
|
36
|
+
[types_1.ReducerType.PushNotifications]: slices_1.pushNotificationsReducer,
|
|
36
37
|
[types_1.ReducerType.Qr]: slices_1.qrReducer,
|
|
38
|
+
[types_1.ReducerType.Quote]: slices_1.quoteReducer,
|
|
37
39
|
[types_1.ReducerType.ResetPassword]: slices_1.resetPasswordReducer,
|
|
38
40
|
[types_1.ReducerType.RevenueCenters]: slices_1.revenueCentersReducer,
|
|
39
41
|
[types_1.ReducerType.Sidebar]: slices_1.sidebarReducer,
|
|
@@ -122,6 +122,7 @@ declare class OpenTenderAPI {
|
|
|
122
122
|
postPointsShopReward(token: string, rewardId: string): Promise<unknown>;
|
|
123
123
|
getCustomerOrders(token: string, limit: number, timing: string): Promise<unknown>;
|
|
124
124
|
getCustomerOrder(token: string, orderId: number): Promise<unknown>;
|
|
125
|
+
getQuote(token: string | null, orderUuid: string): Promise<unknown>;
|
|
125
126
|
postCustomerGroupOrder(token: string, data: any): Promise<GroupOrder | null | undefined>;
|
|
126
127
|
getCustomerGroupOrders(token: string): Promise<GroupOrdersExpanded | null | undefined>;
|
|
127
128
|
getCustomerGroupOrder(token: string, cartId: number): Promise<GroupOrder | null | undefined>;
|
package/dist/cjs/services/api.js
CHANGED
|
@@ -577,6 +577,9 @@ class OpenTenderAPI {
|
|
|
577
577
|
getCustomerOrder(token, orderId) {
|
|
578
578
|
return this.request(`/customer/orders/${orderId}`, 'GET', null, null, token);
|
|
579
579
|
}
|
|
580
|
+
getQuote(token, orderUuid) {
|
|
581
|
+
return this.request(`/orders/uuid/${orderUuid}`, 'GET', null, null, token);
|
|
582
|
+
}
|
|
580
583
|
postCustomerGroupOrder(token, data) {
|
|
581
584
|
return this.request(`/customer/carts`, 'POST', data, null, token);
|
|
582
585
|
}
|
|
@@ -75,7 +75,9 @@ export declare const selectSelectedAllergenNames: ((state: import("redux").Empty
|
|
|
75
75
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
76
76
|
orderRating: import("./orderRating").OrderRatingState;
|
|
77
77
|
posts: import("./posts").PostsSlice;
|
|
78
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
78
79
|
qr: import("./qr").QrState;
|
|
80
|
+
quote: import("./quote").QuoteState;
|
|
79
81
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
80
82
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
81
83
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -72,7 +72,9 @@ export declare const selectAnnouncementsPage: (page: AnnouncementPageType) => ((
|
|
|
72
72
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
73
73
|
orderRating: import("./orderRating").OrderRatingState;
|
|
74
74
|
posts: import("./posts").PostsSlice;
|
|
75
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
75
76
|
qr: import("./qr").QrState;
|
|
77
|
+
quote: import("./quote").QuoteState;
|
|
76
78
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
77
79
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
78
80
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -149,7 +151,9 @@ export declare const selectHasAnnouncementsPage: (page: AnnouncementPageType) =>
|
|
|
149
151
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
150
152
|
orderRating: import("./orderRating").OrderRatingState;
|
|
151
153
|
posts: import("./posts").PostsSlice;
|
|
154
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
152
155
|
qr: import("./qr").QrState;
|
|
156
|
+
quote: import("./quote").QuoteState;
|
|
153
157
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
154
158
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
155
159
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -131,7 +131,9 @@ export declare const selectOptIns: ((state: import("redux").EmptyObject & {
|
|
|
131
131
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
132
132
|
orderRating: import("./orderRating").OrderRatingState;
|
|
133
133
|
posts: import("./posts").PostsSlice;
|
|
134
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
134
135
|
qr: import("./qr").QrState;
|
|
136
|
+
quote: import("./quote").QuoteState;
|
|
135
137
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
136
138
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
137
139
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -114,7 +114,9 @@ export declare const selectCustomerCreditCardsForPayment: ((state: import("redux
|
|
|
114
114
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
115
115
|
orderRating: import("..").OrderRatingState;
|
|
116
116
|
posts: import("..").PostsSlice;
|
|
117
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
117
118
|
qr: import("..").QrState;
|
|
119
|
+
quote: import("..").QuoteState;
|
|
118
120
|
resetPassword: import("..").ResetPasswordState;
|
|
119
121
|
revenueCenters: import("..").RevenueCentersState;
|
|
120
122
|
sidebar: import("..").SidebarState;
|
|
@@ -71,7 +71,9 @@ export declare const selectCustomerLoyaltyProgram: ((state: import("redux").Empt
|
|
|
71
71
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
72
72
|
orderRating: import("..").OrderRatingState;
|
|
73
73
|
posts: import("..").PostsSlice;
|
|
74
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
74
75
|
qr: import("..").QrState;
|
|
76
|
+
quote: import("..").QuoteState;
|
|
75
77
|
resetPassword: import("..").ResetPasswordState;
|
|
76
78
|
revenueCenters: import("..").RevenueCentersState;
|
|
77
79
|
sidebar: import("..").SidebarState;
|
|
@@ -146,7 +148,9 @@ export declare const selectCustomerPointsProgram: (orderType: OrderType | null)
|
|
|
146
148
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
147
149
|
orderRating: import("..").OrderRatingState;
|
|
148
150
|
posts: import("..").PostsSlice;
|
|
151
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
149
152
|
qr: import("..").QrState;
|
|
153
|
+
quote: import("..").QuoteState;
|
|
150
154
|
resetPassword: import("..").ResetPasswordState;
|
|
151
155
|
revenueCenters: import("..").RevenueCentersState;
|
|
152
156
|
sidebar: import("..").SidebarState;
|
|
@@ -81,7 +81,9 @@ export declare const selectCustomerOrder: ((state: import("redux").EmptyObject &
|
|
|
81
81
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
82
82
|
orderRating: import("..").OrderRatingState;
|
|
83
83
|
posts: import("..").PostsSlice;
|
|
84
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
84
85
|
qr: import("..").QrState;
|
|
86
|
+
quote: import("..").QuoteState;
|
|
85
87
|
resetPassword: import("..").ResetPasswordState;
|
|
86
88
|
revenueCenters: import("..").RevenueCentersState;
|
|
87
89
|
sidebar: import("..").SidebarState;
|
|
@@ -68,7 +68,9 @@ export declare const selectCustomerTplsPoints: ((state: import("redux").EmptyObj
|
|
|
68
68
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
69
69
|
orderRating: import("..").OrderRatingState;
|
|
70
70
|
posts: import("..").PostsSlice;
|
|
71
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
71
72
|
qr: import("..").QrState;
|
|
73
|
+
quote: import("..").QuoteState;
|
|
72
74
|
resetPassword: import("..").ResetPasswordState;
|
|
73
75
|
revenueCenters: import("..").RevenueCentersState;
|
|
74
76
|
sidebar: import("..").SidebarState;
|
|
@@ -131,7 +133,9 @@ export declare const selectCustomerTplsRewards: ((state: import("redux").EmptyOb
|
|
|
131
133
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
132
134
|
orderRating: import("..").OrderRatingState;
|
|
133
135
|
posts: import("..").PostsSlice;
|
|
136
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
134
137
|
qr: import("..").QrState;
|
|
138
|
+
quote: import("..").QuoteState;
|
|
135
139
|
resetPassword: import("..").ResetPasswordState;
|
|
136
140
|
revenueCenters: import("..").RevenueCentersState;
|
|
137
141
|
sidebar: import("..").SidebarState;
|
|
@@ -194,7 +198,9 @@ export declare const selectCustomerTplsProgress: ((state: import("redux").EmptyO
|
|
|
194
198
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
195
199
|
orderRating: import("..").OrderRatingState;
|
|
196
200
|
posts: import("..").PostsSlice;
|
|
201
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
197
202
|
qr: import("..").QrState;
|
|
203
|
+
quote: import("..").QuoteState;
|
|
198
204
|
resetPassword: import("..").ResetPasswordState;
|
|
199
205
|
revenueCenters: import("..").RevenueCentersState;
|
|
200
206
|
sidebar: import("..").SidebarState;
|
|
@@ -154,7 +154,9 @@ export declare const selectSpendingLimit: ((state: import("redux").EmptyObject &
|
|
|
154
154
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
155
155
|
orderRating: import("./orderRating").OrderRatingState;
|
|
156
156
|
posts: import("./posts").PostsSlice;
|
|
157
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
157
158
|
qr: import("./qr").QrState;
|
|
159
|
+
quote: import("./quote").QuoteState;
|
|
158
160
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
159
161
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
160
162
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -220,7 +222,9 @@ export declare const selectGroupOrderClosed: ((state: import("redux").EmptyObjec
|
|
|
220
222
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
221
223
|
orderRating: import("./orderRating").OrderRatingState;
|
|
222
224
|
posts: import("./posts").PostsSlice;
|
|
225
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
223
226
|
qr: import("./qr").QrState;
|
|
227
|
+
quote: import("./quote").QuoteState;
|
|
224
228
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
225
229
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
226
230
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -288,7 +292,9 @@ export declare const selectGroupOrderTests: ((state: import("redux").EmptyObject
|
|
|
288
292
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
289
293
|
orderRating: import("./orderRating").OrderRatingState;
|
|
290
294
|
posts: import("./posts").PostsSlice;
|
|
295
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
291
296
|
qr: import("./qr").QrState;
|
|
297
|
+
quote: import("./quote").QuoteState;
|
|
292
298
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
293
299
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
294
300
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -365,7 +371,9 @@ export declare const selectGroupOrderPrepTimes: ((state: import("redux").EmptyOb
|
|
|
365
371
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
366
372
|
orderRating: import("./orderRating").OrderRatingState;
|
|
367
373
|
posts: import("./posts").PostsSlice;
|
|
374
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
368
375
|
qr: import("./qr").QrState;
|
|
376
|
+
quote: import("./quote").QuoteState;
|
|
369
377
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
370
378
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
371
379
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -26,7 +26,9 @@ export * from './order';
|
|
|
26
26
|
export * from './orderFulfillment';
|
|
27
27
|
export * from './orderRating';
|
|
28
28
|
export * from './posts';
|
|
29
|
+
export * from './pushNotifications';
|
|
29
30
|
export * from './qr';
|
|
31
|
+
export * from './quote';
|
|
30
32
|
export * from './resetPassword';
|
|
31
33
|
export * from './revenueCenters';
|
|
32
34
|
export * from './sidebar';
|
package/dist/cjs/slices/index.js
CHANGED
|
@@ -29,7 +29,9 @@ tslib_1.__exportStar(require("./order"), exports);
|
|
|
29
29
|
tslib_1.__exportStar(require("./orderFulfillment"), exports);
|
|
30
30
|
tslib_1.__exportStar(require("./orderRating"), exports);
|
|
31
31
|
tslib_1.__exportStar(require("./posts"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./pushNotifications"), exports);
|
|
32
33
|
tslib_1.__exportStar(require("./qr"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./quote"), exports);
|
|
33
35
|
tslib_1.__exportStar(require("./resetPassword"), exports);
|
|
34
36
|
tslib_1.__exportStar(require("./revenueCenters"), exports);
|
|
35
37
|
tslib_1.__exportStar(require("./sidebar"), exports);
|
|
@@ -176,7 +176,9 @@ export declare const selectOrderLimits: ((state: import("redux").EmptyObject & {
|
|
|
176
176
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
177
177
|
orderRating: import("./orderRating").OrderRatingState;
|
|
178
178
|
posts: import("./posts").PostsSlice;
|
|
179
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
179
180
|
qr: import("./qr").QrState;
|
|
181
|
+
quote: import("./quote").QuoteState;
|
|
180
182
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
181
183
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
182
184
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -250,7 +252,9 @@ export declare const selectCartIds: ((state: import("redux").EmptyObject & {
|
|
|
250
252
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
251
253
|
orderRating: import("./orderRating").OrderRatingState;
|
|
252
254
|
posts: import("./posts").PostsSlice;
|
|
255
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
253
256
|
qr: import("./qr").QrState;
|
|
257
|
+
quote: import("./quote").QuoteState;
|
|
254
258
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
255
259
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
256
260
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -319,7 +323,9 @@ export declare const selectMenuVars: ((state: import("redux").EmptyObject & {
|
|
|
319
323
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
320
324
|
orderRating: import("./orderRating").OrderRatingState;
|
|
321
325
|
posts: import("./posts").PostsSlice;
|
|
326
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
322
327
|
qr: import("./qr").QrState;
|
|
328
|
+
quote: import("./quote").QuoteState;
|
|
323
329
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
324
330
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
325
331
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AppState } from '../app';
|
|
2
|
+
export interface PushNotificationsState {
|
|
3
|
+
orderId: string | number | null;
|
|
4
|
+
fcmToken: string | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const setPushNotificationsOrderId: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "pushNotifications/setPushNotificationsOrderId">, setFcmToken: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "pushNotifications/setFcmToken">;
|
|
7
|
+
export declare const selectOrderId: (state: AppState) => string | number | null;
|
|
8
|
+
export declare const selectFcmToken: (state: AppState) => string | null;
|
|
9
|
+
export declare const pushNotificationsReducer: import("redux").Reducer<PushNotificationsState, import("redux").AnyAction>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.pushNotificationsReducer = exports.selectFcmToken = exports.selectOrderId = exports.setFcmToken = exports.setPushNotificationsOrderId = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const initialState = {
|
|
7
|
+
orderId: null,
|
|
8
|
+
fcmToken: null
|
|
9
|
+
};
|
|
10
|
+
const pushNotificationsSlice = (0, toolkit_1.createSlice)({
|
|
11
|
+
name: 'pushNotifications',
|
|
12
|
+
initialState: initialState,
|
|
13
|
+
reducers: {
|
|
14
|
+
setPushNotificationsOrderId(state, action) {
|
|
15
|
+
const { orderId } = action.payload;
|
|
16
|
+
state.orderId = orderId;
|
|
17
|
+
},
|
|
18
|
+
setFcmToken(state, action) {
|
|
19
|
+
const { fcmToken } = action.payload;
|
|
20
|
+
state.fcmToken = fcmToken;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
_a = pushNotificationsSlice.actions, exports.setPushNotificationsOrderId = _a.setPushNotificationsOrderId, exports.setFcmToken = _a.setFcmToken;
|
|
25
|
+
const selectOrderId = (state) => state.pushNotifications.orderId;
|
|
26
|
+
exports.selectOrderId = selectOrderId;
|
|
27
|
+
const selectFcmToken = (state) => state.pushNotifications.fcmToken;
|
|
28
|
+
exports.selectFcmToken = selectFcmToken;
|
|
29
|
+
exports.pushNotificationsReducer = pushNotificationsSlice.reducer;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Order, RequestError, RequestStatus } from '@open-tender/types';
|
|
2
|
+
import { AppState } from '../app';
|
|
3
|
+
export interface QuoteState {
|
|
4
|
+
entity: Order | null;
|
|
5
|
+
error: RequestError;
|
|
6
|
+
loading: RequestStatus;
|
|
7
|
+
}
|
|
8
|
+
export declare enum QuoteActionType {
|
|
9
|
+
FetchQuote = "customer/fetchQuote"
|
|
10
|
+
}
|
|
11
|
+
export declare const fetchQuote: import("@reduxjs/toolkit").AsyncThunk<Order, string, {
|
|
12
|
+
state: AppState;
|
|
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;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const resetQuote: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"quote/resetQuote">, resetQuoteError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"quote/resetQuoteError">, setQuote: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "quote/setQuote">;
|
|
22
|
+
export declare const selectQuote: ((state: import("redux").EmptyObject & {
|
|
23
|
+
alerts: import("@open-tender/types").Alerts;
|
|
24
|
+
allergens: import("./allergens").AllergensState;
|
|
25
|
+
announcements: import("./announcements").AnnouncementsState;
|
|
26
|
+
checkout: import("./checkout").CheckoutState;
|
|
27
|
+
completedOrders: import("./completedOrders").CompletedOrdersState;
|
|
28
|
+
config: import("./config").ConfigState;
|
|
29
|
+
confirmation: import("./confirmation").ConfirmationState;
|
|
30
|
+
customer: import("redux").CombinedState<{
|
|
31
|
+
account: import("./customer").AccountState;
|
|
32
|
+
communicationPreferences: import("./customer").CustomerCommunicationPrefsState;
|
|
33
|
+
creditCards: import("./customer").CustomerCreditCardsState;
|
|
34
|
+
allergens: import("./customer").CustomerAllergensState;
|
|
35
|
+
addresses: import("./customer").CustomerAddressesState;
|
|
36
|
+
favorites: import("./customer").CustomerFavoritesState;
|
|
37
|
+
fcmToken: import("./customer").CustomerFcmTokenState;
|
|
38
|
+
giftCards: import("./customer").CustomerGiftCardsState;
|
|
39
|
+
groupOrders: import("./customer").CustomerGroupOrdersState;
|
|
40
|
+
houseAccounts: import("./customer").CustomerHouseAccountsState;
|
|
41
|
+
loyalty: import("./customer").CustomerLoyaltyState;
|
|
42
|
+
order: import("./customer").CustomerOrderState;
|
|
43
|
+
orders: import("./customer").CustomerOrdersState;
|
|
44
|
+
pointsShop: import("./customer").PointsShopState;
|
|
45
|
+
qrcode: import("./customer").CustomerQRCodeState;
|
|
46
|
+
rewards: import("./customer").CustomerRewardsState;
|
|
47
|
+
thanx: import("./customer").CustomerThanxState;
|
|
48
|
+
tpls: import("./customer").CustomerTplsState;
|
|
49
|
+
}>;
|
|
50
|
+
deals: import("./deals").DealsState;
|
|
51
|
+
donations: import("./donations").DonationState;
|
|
52
|
+
geolocation: import("./geolocation").GeoLocationState;
|
|
53
|
+
giftCards: import("./giftCards").GiftCardsState;
|
|
54
|
+
groupOrder: import("./groupOrder").GroupOrderState;
|
|
55
|
+
guest: import("./guest").GuestState;
|
|
56
|
+
loader: import("./loader").LoaderState;
|
|
57
|
+
menu: import("./menu").MenuState;
|
|
58
|
+
menuDisplay: import("./menuDisplay").MenuDisplayState;
|
|
59
|
+
menuItems: import("./menuItems").MenuItemsState;
|
|
60
|
+
modal: import("@open-tender/types").Modal;
|
|
61
|
+
misc: import("./misc").MiscState;
|
|
62
|
+
nav: import("./nav").NavState;
|
|
63
|
+
navSite: import("./navSite").NavSiteState;
|
|
64
|
+
notifications: import("@open-tender/types").Notifications;
|
|
65
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
66
|
+
order: import("./order").OrderState;
|
|
67
|
+
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
68
|
+
orderRating: import("./orderRating").OrderRatingState;
|
|
69
|
+
posts: import("./posts").PostsSlice;
|
|
70
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
71
|
+
qr: import("./qr").QrState;
|
|
72
|
+
quote: QuoteState;
|
|
73
|
+
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
74
|
+
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
75
|
+
sidebar: import("./sidebar").SidebarState;
|
|
76
|
+
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
77
|
+
signUp: import("./signUp").SignUpState;
|
|
78
|
+
tags: import("./tags").TagsState;
|
|
79
|
+
terms: import("./terms").TermsSlice;
|
|
80
|
+
validTimes: import("./validTimes").ValidTimesState;
|
|
81
|
+
verifyAccount: import("./verifyAccount").VerifyAccountState;
|
|
82
|
+
}) => {
|
|
83
|
+
order: Order | null;
|
|
84
|
+
loading: RequestStatus;
|
|
85
|
+
error: RequestError;
|
|
86
|
+
}) & import("reselect").OutputSelectorFields<(args_0: {
|
|
87
|
+
order: Order | null;
|
|
88
|
+
loading: RequestStatus;
|
|
89
|
+
error: RequestError;
|
|
90
|
+
}) => {
|
|
91
|
+
order: Order | null;
|
|
92
|
+
loading: RequestStatus;
|
|
93
|
+
error: RequestError;
|
|
94
|
+
}, {
|
|
95
|
+
clearCache: () => void;
|
|
96
|
+
}> & {
|
|
97
|
+
clearCache: () => void;
|
|
98
|
+
};
|
|
99
|
+
export declare const quoteReducer: import("redux").Reducer<QuoteState, import("redux").AnyAction>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.quoteReducer = exports.selectQuote = exports.setQuote = exports.resetQuoteError = exports.resetQuote = exports.fetchQuote = exports.QuoteActionType = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
|
+
const customer_1 = require("./customer");
|
|
8
|
+
const types_1 = require("./types");
|
|
9
|
+
const initialState = {
|
|
10
|
+
entity: null,
|
|
11
|
+
error: null,
|
|
12
|
+
loading: 'idle'
|
|
13
|
+
};
|
|
14
|
+
var QuoteActionType;
|
|
15
|
+
(function (QuoteActionType) {
|
|
16
|
+
QuoteActionType["FetchQuote"] = "customer/fetchQuote";
|
|
17
|
+
})(QuoteActionType = exports.QuoteActionType || (exports.QuoteActionType = {}));
|
|
18
|
+
exports.fetchQuote = (0, toolkit_1.createAsyncThunk)(QuoteActionType.FetchQuote, (orderUuid, { getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
+
try {
|
|
20
|
+
const api = getState().config.api;
|
|
21
|
+
const token = (0, customer_1.selectToken)(getState());
|
|
22
|
+
return yield api.getQuote(token, orderUuid);
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
return rejectWithValue(err);
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
const quoteSlice = (0, toolkit_1.createSlice)({
|
|
29
|
+
name: types_1.ReducerType.Quote,
|
|
30
|
+
initialState,
|
|
31
|
+
reducers: {
|
|
32
|
+
resetQuote: () => initialState,
|
|
33
|
+
resetQuoteError: state => {
|
|
34
|
+
state.error = null;
|
|
35
|
+
state.loading = 'idle';
|
|
36
|
+
},
|
|
37
|
+
setQuote: (state, action) => {
|
|
38
|
+
state.entity = action.payload;
|
|
39
|
+
state.error = null;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
extraReducers: builder => {
|
|
43
|
+
builder
|
|
44
|
+
.addCase(exports.fetchQuote.fulfilled, (state, action) => {
|
|
45
|
+
state.entity = action.payload;
|
|
46
|
+
state.loading = 'idle';
|
|
47
|
+
state.error = null;
|
|
48
|
+
})
|
|
49
|
+
.addCase(exports.fetchQuote.pending, state => {
|
|
50
|
+
state.loading = 'pending';
|
|
51
|
+
})
|
|
52
|
+
.addCase(exports.fetchQuote.rejected, (state, action) => {
|
|
53
|
+
state.error = action.payload;
|
|
54
|
+
state.loading = 'idle';
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
_a = quoteSlice.actions, exports.resetQuote = _a.resetQuote, exports.resetQuoteError = _a.resetQuoteError, exports.setQuote = _a.setQuote;
|
|
59
|
+
exports.selectQuote = (0, toolkit_1.createSelector)((state) => {
|
|
60
|
+
const { entity: order, loading, error } = state.quote;
|
|
61
|
+
return { order, loading, error };
|
|
62
|
+
}, ({ order, loading, error }) => {
|
|
63
|
+
return { order, loading, error };
|
|
64
|
+
});
|
|
65
|
+
exports.quoteReducer = quoteSlice.reducer;
|
|
@@ -75,7 +75,9 @@ export declare const selectSelectedTagNames: ((state: import("redux").EmptyObjec
|
|
|
75
75
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
76
76
|
orderRating: import("./orderRating").OrderRatingState;
|
|
77
77
|
posts: import("./posts").PostsSlice;
|
|
78
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
78
79
|
qr: import("./qr").QrState;
|
|
80
|
+
quote: import("./quote").QuoteState;
|
|
79
81
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
80
82
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
81
83
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -39,8 +39,10 @@ export declare enum ReducerType {
|
|
|
39
39
|
Orders = "orders",
|
|
40
40
|
Posts = "posts",
|
|
41
41
|
PointsShop = "pointsShop",
|
|
42
|
+
PushNotifications = "pushNotifications",
|
|
42
43
|
Qr = "qr",
|
|
43
44
|
QRCode = "qrcode",
|
|
45
|
+
Quote = "quote",
|
|
44
46
|
ResetPassword = "resetPassword",
|
|
45
47
|
RevenueCenters = "revenueCenters",
|
|
46
48
|
Rewards = "rewards",
|
package/dist/cjs/slices/types.js
CHANGED
|
@@ -43,8 +43,10 @@ var ReducerType;
|
|
|
43
43
|
ReducerType["Orders"] = "orders";
|
|
44
44
|
ReducerType["Posts"] = "posts";
|
|
45
45
|
ReducerType["PointsShop"] = "pointsShop";
|
|
46
|
+
ReducerType["PushNotifications"] = "pushNotifications";
|
|
46
47
|
ReducerType["Qr"] = "qr";
|
|
47
48
|
ReducerType["QRCode"] = "qrcode";
|
|
49
|
+
ReducerType["Quote"] = "quote";
|
|
48
50
|
ReducerType["ResetPassword"] = "resetPassword";
|
|
49
51
|
ReducerType["RevenueCenters"] = "revenueCenters";
|
|
50
52
|
ReducerType["Rewards"] = "rewards";
|
package/dist/esm/app/hooks.d.ts
CHANGED
|
@@ -48,7 +48,9 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<i
|
|
|
48
48
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
49
49
|
orderRating: import("..").OrderRatingState;
|
|
50
50
|
posts: import("..").PostsSlice;
|
|
51
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
51
52
|
qr: import("..").QrState;
|
|
53
|
+
quote: import("..").QuoteState;
|
|
52
54
|
resetPassword: import("..").ResetPasswordState;
|
|
53
55
|
revenueCenters: import("..").RevenueCentersState;
|
|
54
56
|
sidebar: import("..").SidebarState;
|
package/dist/esm/app/store.d.ts
CHANGED
|
@@ -47,7 +47,9 @@ export declare const appReducer: import("redux").Reducer<import("redux").Combine
|
|
|
47
47
|
orderFulfillment: import("../slices").OrderFulfillmentState;
|
|
48
48
|
orderRating: import("../slices").OrderRatingState;
|
|
49
49
|
posts: import("../slices").PostsSlice;
|
|
50
|
+
pushNotifications: import("../slices").PushNotificationsState;
|
|
50
51
|
qr: import("../slices").QrState;
|
|
52
|
+
quote: import("../slices").QuoteState;
|
|
51
53
|
resetPassword: import("../slices").ResetPasswordState;
|
|
52
54
|
revenueCenters: import("../slices").RevenueCentersState;
|
|
53
55
|
sidebar: import("../slices").SidebarState;
|
|
@@ -107,7 +109,9 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
107
109
|
orderFulfillment: import("../slices").OrderFulfillmentState;
|
|
108
110
|
orderRating: import("../slices").OrderRatingState;
|
|
109
111
|
posts: import("../slices").PostsSlice;
|
|
112
|
+
pushNotifications: import("../slices").PushNotificationsState;
|
|
110
113
|
qr: import("../slices").QrState;
|
|
114
|
+
quote: import("../slices").QuoteState;
|
|
111
115
|
resetPassword: import("../slices").ResetPasswordState;
|
|
112
116
|
revenueCenters: import("../slices").RevenueCentersState;
|
|
113
117
|
sidebar: import("../slices").SidebarState;
|
|
@@ -165,7 +169,9 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
165
169
|
orderFulfillment: import("../slices").OrderFulfillmentState;
|
|
166
170
|
orderRating: import("../slices").OrderRatingState;
|
|
167
171
|
posts: import("../slices").PostsSlice;
|
|
172
|
+
pushNotifications: import("../slices").PushNotificationsState;
|
|
168
173
|
qr: import("../slices").QrState;
|
|
174
|
+
quote: import("../slices").QuoteState;
|
|
169
175
|
resetPassword: import("../slices").ResetPasswordState;
|
|
170
176
|
revenueCenters: import("../slices").RevenueCentersState;
|
|
171
177
|
sidebar: import("../slices").SidebarState;
|
package/dist/esm/app/store.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
2
|
-
import { alertsReducer, allergensReducer, announcementsReducer, checkoutReducer, completedOrdersReducer, configReducer, confirmationReducer, customerReducer, dealsReducer, donationsReducer, geolocationReducer, giftCardsReducer, groupOrderReducer, guestReducer, loaderReducer, menuDisplayReducer, menuItemsReducer, menuReducer, miscReducer, modalReducer, navReducer, navSiteReducer, notificationsReducer, oneTimePasscodeReducer, orderFulfillmentReducer, orderRatingReducer, orderReducer, postsReducer, qrReducer, resetPasswordReducer, revenueCentersReducer, sidebarModalReducer, sidebarReducer, signUpReducer, tagsReducer, termsReducer, validTimesReducer, verifyAccountReducer } from '../slices';
|
|
2
|
+
import { alertsReducer, allergensReducer, announcementsReducer, checkoutReducer, completedOrdersReducer, configReducer, confirmationReducer, customerReducer, dealsReducer, donationsReducer, geolocationReducer, giftCardsReducer, groupOrderReducer, guestReducer, loaderReducer, menuDisplayReducer, menuItemsReducer, menuReducer, miscReducer, modalReducer, navReducer, navSiteReducer, notificationsReducer, oneTimePasscodeReducer, orderFulfillmentReducer, orderRatingReducer, orderReducer, postsReducer, pushNotificationsReducer, qrReducer, quoteReducer, resetPasswordReducer, revenueCentersReducer, sidebarModalReducer, sidebarReducer, signUpReducer, tagsReducer, termsReducer, validTimesReducer, verifyAccountReducer } from '../slices';
|
|
3
3
|
import { ReducerType } from '../slices/types';
|
|
4
4
|
export const appReducer = combineReducers({
|
|
5
5
|
[ReducerType.Alerts]: alertsReducer,
|
|
@@ -30,7 +30,9 @@ export const appReducer = combineReducers({
|
|
|
30
30
|
[ReducerType.OrderFulfillment]: orderFulfillmentReducer,
|
|
31
31
|
[ReducerType.OrderRating]: orderRatingReducer,
|
|
32
32
|
[ReducerType.Posts]: postsReducer,
|
|
33
|
+
[ReducerType.PushNotifications]: pushNotificationsReducer,
|
|
33
34
|
[ReducerType.Qr]: qrReducer,
|
|
35
|
+
[ReducerType.Quote]: quoteReducer,
|
|
34
36
|
[ReducerType.ResetPassword]: resetPasswordReducer,
|
|
35
37
|
[ReducerType.RevenueCenters]: revenueCentersReducer,
|
|
36
38
|
[ReducerType.Sidebar]: sidebarReducer,
|
|
@@ -122,6 +122,7 @@ declare class OpenTenderAPI {
|
|
|
122
122
|
postPointsShopReward(token: string, rewardId: string): Promise<unknown>;
|
|
123
123
|
getCustomerOrders(token: string, limit: number, timing: string): Promise<unknown>;
|
|
124
124
|
getCustomerOrder(token: string, orderId: number): Promise<unknown>;
|
|
125
|
+
getQuote(token: string | null, orderUuid: string): Promise<unknown>;
|
|
125
126
|
postCustomerGroupOrder(token: string, data: any): Promise<GroupOrder | null | undefined>;
|
|
126
127
|
getCustomerGroupOrders(token: string): Promise<GroupOrdersExpanded | null | undefined>;
|
|
127
128
|
getCustomerGroupOrder(token: string, cartId: number): Promise<GroupOrder | null | undefined>;
|
package/dist/esm/services/api.js
CHANGED
|
@@ -575,6 +575,9 @@ class OpenTenderAPI {
|
|
|
575
575
|
getCustomerOrder(token, orderId) {
|
|
576
576
|
return this.request(`/customer/orders/${orderId}`, 'GET', null, null, token);
|
|
577
577
|
}
|
|
578
|
+
getQuote(token, orderUuid) {
|
|
579
|
+
return this.request(`/orders/uuid/${orderUuid}`, 'GET', null, null, token);
|
|
580
|
+
}
|
|
578
581
|
postCustomerGroupOrder(token, data) {
|
|
579
582
|
return this.request(`/customer/carts`, 'POST', data, null, token);
|
|
580
583
|
}
|
|
@@ -75,7 +75,9 @@ export declare const selectSelectedAllergenNames: ((state: import("redux").Empty
|
|
|
75
75
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
76
76
|
orderRating: import("./orderRating").OrderRatingState;
|
|
77
77
|
posts: import("./posts").PostsSlice;
|
|
78
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
78
79
|
qr: import("./qr").QrState;
|
|
80
|
+
quote: import("./quote").QuoteState;
|
|
79
81
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
80
82
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
81
83
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -72,7 +72,9 @@ export declare const selectAnnouncementsPage: (page: AnnouncementPageType) => ((
|
|
|
72
72
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
73
73
|
orderRating: import("./orderRating").OrderRatingState;
|
|
74
74
|
posts: import("./posts").PostsSlice;
|
|
75
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
75
76
|
qr: import("./qr").QrState;
|
|
77
|
+
quote: import("./quote").QuoteState;
|
|
76
78
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
77
79
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
78
80
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -149,7 +151,9 @@ export declare const selectHasAnnouncementsPage: (page: AnnouncementPageType) =>
|
|
|
149
151
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
150
152
|
orderRating: import("./orderRating").OrderRatingState;
|
|
151
153
|
posts: import("./posts").PostsSlice;
|
|
154
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
152
155
|
qr: import("./qr").QrState;
|
|
156
|
+
quote: import("./quote").QuoteState;
|
|
153
157
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
154
158
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
155
159
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -131,7 +131,9 @@ export declare const selectOptIns: ((state: import("redux").EmptyObject & {
|
|
|
131
131
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
132
132
|
orderRating: import("./orderRating").OrderRatingState;
|
|
133
133
|
posts: import("./posts").PostsSlice;
|
|
134
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
134
135
|
qr: import("./qr").QrState;
|
|
136
|
+
quote: import("./quote").QuoteState;
|
|
135
137
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
136
138
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
137
139
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -114,7 +114,9 @@ export declare const selectCustomerCreditCardsForPayment: ((state: import("redux
|
|
|
114
114
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
115
115
|
orderRating: import("..").OrderRatingState;
|
|
116
116
|
posts: import("..").PostsSlice;
|
|
117
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
117
118
|
qr: import("..").QrState;
|
|
119
|
+
quote: import("..").QuoteState;
|
|
118
120
|
resetPassword: import("..").ResetPasswordState;
|
|
119
121
|
revenueCenters: import("..").RevenueCentersState;
|
|
120
122
|
sidebar: import("..").SidebarState;
|
|
@@ -71,7 +71,9 @@ export declare const selectCustomerLoyaltyProgram: ((state: import("redux").Empt
|
|
|
71
71
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
72
72
|
orderRating: import("..").OrderRatingState;
|
|
73
73
|
posts: import("..").PostsSlice;
|
|
74
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
74
75
|
qr: import("..").QrState;
|
|
76
|
+
quote: import("..").QuoteState;
|
|
75
77
|
resetPassword: import("..").ResetPasswordState;
|
|
76
78
|
revenueCenters: import("..").RevenueCentersState;
|
|
77
79
|
sidebar: import("..").SidebarState;
|
|
@@ -146,7 +148,9 @@ export declare const selectCustomerPointsProgram: (orderType: OrderType | null)
|
|
|
146
148
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
147
149
|
orderRating: import("..").OrderRatingState;
|
|
148
150
|
posts: import("..").PostsSlice;
|
|
151
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
149
152
|
qr: import("..").QrState;
|
|
153
|
+
quote: import("..").QuoteState;
|
|
150
154
|
resetPassword: import("..").ResetPasswordState;
|
|
151
155
|
revenueCenters: import("..").RevenueCentersState;
|
|
152
156
|
sidebar: import("..").SidebarState;
|
|
@@ -81,7 +81,9 @@ export declare const selectCustomerOrder: ((state: import("redux").EmptyObject &
|
|
|
81
81
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
82
82
|
orderRating: import("..").OrderRatingState;
|
|
83
83
|
posts: import("..").PostsSlice;
|
|
84
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
84
85
|
qr: import("..").QrState;
|
|
86
|
+
quote: import("..").QuoteState;
|
|
85
87
|
resetPassword: import("..").ResetPasswordState;
|
|
86
88
|
revenueCenters: import("..").RevenueCentersState;
|
|
87
89
|
sidebar: import("..").SidebarState;
|
|
@@ -68,7 +68,9 @@ export declare const selectCustomerTplsPoints: ((state: import("redux").EmptyObj
|
|
|
68
68
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
69
69
|
orderRating: import("..").OrderRatingState;
|
|
70
70
|
posts: import("..").PostsSlice;
|
|
71
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
71
72
|
qr: import("..").QrState;
|
|
73
|
+
quote: import("..").QuoteState;
|
|
72
74
|
resetPassword: import("..").ResetPasswordState;
|
|
73
75
|
revenueCenters: import("..").RevenueCentersState;
|
|
74
76
|
sidebar: import("..").SidebarState;
|
|
@@ -131,7 +133,9 @@ export declare const selectCustomerTplsRewards: ((state: import("redux").EmptyOb
|
|
|
131
133
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
132
134
|
orderRating: import("..").OrderRatingState;
|
|
133
135
|
posts: import("..").PostsSlice;
|
|
136
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
134
137
|
qr: import("..").QrState;
|
|
138
|
+
quote: import("..").QuoteState;
|
|
135
139
|
resetPassword: import("..").ResetPasswordState;
|
|
136
140
|
revenueCenters: import("..").RevenueCentersState;
|
|
137
141
|
sidebar: import("..").SidebarState;
|
|
@@ -194,7 +198,9 @@ export declare const selectCustomerTplsProgress: ((state: import("redux").EmptyO
|
|
|
194
198
|
orderFulfillment: import("..").OrderFulfillmentState;
|
|
195
199
|
orderRating: import("..").OrderRatingState;
|
|
196
200
|
posts: import("..").PostsSlice;
|
|
201
|
+
pushNotifications: import("..").PushNotificationsState;
|
|
197
202
|
qr: import("..").QrState;
|
|
203
|
+
quote: import("..").QuoteState;
|
|
198
204
|
resetPassword: import("..").ResetPasswordState;
|
|
199
205
|
revenueCenters: import("..").RevenueCentersState;
|
|
200
206
|
sidebar: import("..").SidebarState;
|
|
@@ -154,7 +154,9 @@ export declare const selectSpendingLimit: ((state: import("redux").EmptyObject &
|
|
|
154
154
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
155
155
|
orderRating: import("./orderRating").OrderRatingState;
|
|
156
156
|
posts: import("./posts").PostsSlice;
|
|
157
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
157
158
|
qr: import("./qr").QrState;
|
|
159
|
+
quote: import("./quote").QuoteState;
|
|
158
160
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
159
161
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
160
162
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -220,7 +222,9 @@ export declare const selectGroupOrderClosed: ((state: import("redux").EmptyObjec
|
|
|
220
222
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
221
223
|
orderRating: import("./orderRating").OrderRatingState;
|
|
222
224
|
posts: import("./posts").PostsSlice;
|
|
225
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
223
226
|
qr: import("./qr").QrState;
|
|
227
|
+
quote: import("./quote").QuoteState;
|
|
224
228
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
225
229
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
226
230
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -288,7 +292,9 @@ export declare const selectGroupOrderTests: ((state: import("redux").EmptyObject
|
|
|
288
292
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
289
293
|
orderRating: import("./orderRating").OrderRatingState;
|
|
290
294
|
posts: import("./posts").PostsSlice;
|
|
295
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
291
296
|
qr: import("./qr").QrState;
|
|
297
|
+
quote: import("./quote").QuoteState;
|
|
292
298
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
293
299
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
294
300
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -365,7 +371,9 @@ export declare const selectGroupOrderPrepTimes: ((state: import("redux").EmptyOb
|
|
|
365
371
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
366
372
|
orderRating: import("./orderRating").OrderRatingState;
|
|
367
373
|
posts: import("./posts").PostsSlice;
|
|
374
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
368
375
|
qr: import("./qr").QrState;
|
|
376
|
+
quote: import("./quote").QuoteState;
|
|
369
377
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
370
378
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
371
379
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -26,7 +26,9 @@ export * from './order';
|
|
|
26
26
|
export * from './orderFulfillment';
|
|
27
27
|
export * from './orderRating';
|
|
28
28
|
export * from './posts';
|
|
29
|
+
export * from './pushNotifications';
|
|
29
30
|
export * from './qr';
|
|
31
|
+
export * from './quote';
|
|
30
32
|
export * from './resetPassword';
|
|
31
33
|
export * from './revenueCenters';
|
|
32
34
|
export * from './sidebar';
|
package/dist/esm/slices/index.js
CHANGED
|
@@ -26,7 +26,9 @@ export * from './order';
|
|
|
26
26
|
export * from './orderFulfillment';
|
|
27
27
|
export * from './orderRating';
|
|
28
28
|
export * from './posts';
|
|
29
|
+
export * from './pushNotifications';
|
|
29
30
|
export * from './qr';
|
|
31
|
+
export * from './quote';
|
|
30
32
|
export * from './resetPassword';
|
|
31
33
|
export * from './revenueCenters';
|
|
32
34
|
export * from './sidebar';
|
|
@@ -176,7 +176,9 @@ export declare const selectOrderLimits: ((state: import("redux").EmptyObject & {
|
|
|
176
176
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
177
177
|
orderRating: import("./orderRating").OrderRatingState;
|
|
178
178
|
posts: import("./posts").PostsSlice;
|
|
179
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
179
180
|
qr: import("./qr").QrState;
|
|
181
|
+
quote: import("./quote").QuoteState;
|
|
180
182
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
181
183
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
182
184
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -250,7 +252,9 @@ export declare const selectCartIds: ((state: import("redux").EmptyObject & {
|
|
|
250
252
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
251
253
|
orderRating: import("./orderRating").OrderRatingState;
|
|
252
254
|
posts: import("./posts").PostsSlice;
|
|
255
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
253
256
|
qr: import("./qr").QrState;
|
|
257
|
+
quote: import("./quote").QuoteState;
|
|
254
258
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
255
259
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
256
260
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -319,7 +323,9 @@ export declare const selectMenuVars: ((state: import("redux").EmptyObject & {
|
|
|
319
323
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
320
324
|
orderRating: import("./orderRating").OrderRatingState;
|
|
321
325
|
posts: import("./posts").PostsSlice;
|
|
326
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
322
327
|
qr: import("./qr").QrState;
|
|
328
|
+
quote: import("./quote").QuoteState;
|
|
323
329
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
324
330
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
325
331
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AppState } from '../app';
|
|
2
|
+
export interface PushNotificationsState {
|
|
3
|
+
orderId: string | number | null;
|
|
4
|
+
fcmToken: string | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const setPushNotificationsOrderId: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "pushNotifications/setPushNotificationsOrderId">, setFcmToken: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "pushNotifications/setFcmToken">;
|
|
7
|
+
export declare const selectOrderId: (state: AppState) => string | number | null;
|
|
8
|
+
export declare const selectFcmToken: (state: AppState) => string | null;
|
|
9
|
+
export declare const pushNotificationsReducer: import("redux").Reducer<PushNotificationsState, import("redux").AnyAction>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
const initialState = {
|
|
3
|
+
orderId: null,
|
|
4
|
+
fcmToken: null
|
|
5
|
+
};
|
|
6
|
+
const pushNotificationsSlice = createSlice({
|
|
7
|
+
name: 'pushNotifications',
|
|
8
|
+
initialState: initialState,
|
|
9
|
+
reducers: {
|
|
10
|
+
setPushNotificationsOrderId(state, action) {
|
|
11
|
+
const { orderId } = action.payload;
|
|
12
|
+
state.orderId = orderId;
|
|
13
|
+
},
|
|
14
|
+
setFcmToken(state, action) {
|
|
15
|
+
const { fcmToken } = action.payload;
|
|
16
|
+
state.fcmToken = fcmToken;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export const { setPushNotificationsOrderId, setFcmToken } = pushNotificationsSlice.actions;
|
|
21
|
+
export const selectOrderId = (state) => state.pushNotifications.orderId;
|
|
22
|
+
export const selectFcmToken = (state) => state.pushNotifications.fcmToken;
|
|
23
|
+
export const pushNotificationsReducer = pushNotificationsSlice.reducer;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Order, RequestError, RequestStatus } from '@open-tender/types';
|
|
2
|
+
import { AppState } from '../app';
|
|
3
|
+
export interface QuoteState {
|
|
4
|
+
entity: Order | null;
|
|
5
|
+
error: RequestError;
|
|
6
|
+
loading: RequestStatus;
|
|
7
|
+
}
|
|
8
|
+
export declare enum QuoteActionType {
|
|
9
|
+
FetchQuote = "customer/fetchQuote"
|
|
10
|
+
}
|
|
11
|
+
export declare const fetchQuote: import("@reduxjs/toolkit").AsyncThunk<Order, string, {
|
|
12
|
+
state: AppState;
|
|
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;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const resetQuote: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"quote/resetQuote">, resetQuoteError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"quote/resetQuoteError">, setQuote: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "quote/setQuote">;
|
|
22
|
+
export declare const selectQuote: ((state: import("redux").EmptyObject & {
|
|
23
|
+
alerts: import("@open-tender/types").Alerts;
|
|
24
|
+
allergens: import("./allergens").AllergensState;
|
|
25
|
+
announcements: import("./announcements").AnnouncementsState;
|
|
26
|
+
checkout: import("./checkout").CheckoutState;
|
|
27
|
+
completedOrders: import("./completedOrders").CompletedOrdersState;
|
|
28
|
+
config: import("./config").ConfigState;
|
|
29
|
+
confirmation: import("./confirmation").ConfirmationState;
|
|
30
|
+
customer: import("redux").CombinedState<{
|
|
31
|
+
account: import("./customer").AccountState;
|
|
32
|
+
communicationPreferences: import("./customer").CustomerCommunicationPrefsState;
|
|
33
|
+
creditCards: import("./customer").CustomerCreditCardsState;
|
|
34
|
+
allergens: import("./customer").CustomerAllergensState;
|
|
35
|
+
addresses: import("./customer").CustomerAddressesState;
|
|
36
|
+
favorites: import("./customer").CustomerFavoritesState;
|
|
37
|
+
fcmToken: import("./customer").CustomerFcmTokenState;
|
|
38
|
+
giftCards: import("./customer").CustomerGiftCardsState;
|
|
39
|
+
groupOrders: import("./customer").CustomerGroupOrdersState;
|
|
40
|
+
houseAccounts: import("./customer").CustomerHouseAccountsState;
|
|
41
|
+
loyalty: import("./customer").CustomerLoyaltyState;
|
|
42
|
+
order: import("./customer").CustomerOrderState;
|
|
43
|
+
orders: import("./customer").CustomerOrdersState;
|
|
44
|
+
pointsShop: import("./customer").PointsShopState;
|
|
45
|
+
qrcode: import("./customer").CustomerQRCodeState;
|
|
46
|
+
rewards: import("./customer").CustomerRewardsState;
|
|
47
|
+
thanx: import("./customer").CustomerThanxState;
|
|
48
|
+
tpls: import("./customer").CustomerTplsState;
|
|
49
|
+
}>;
|
|
50
|
+
deals: import("./deals").DealsState;
|
|
51
|
+
donations: import("./donations").DonationState;
|
|
52
|
+
geolocation: import("./geolocation").GeoLocationState;
|
|
53
|
+
giftCards: import("./giftCards").GiftCardsState;
|
|
54
|
+
groupOrder: import("./groupOrder").GroupOrderState;
|
|
55
|
+
guest: import("./guest").GuestState;
|
|
56
|
+
loader: import("./loader").LoaderState;
|
|
57
|
+
menu: import("./menu").MenuState;
|
|
58
|
+
menuDisplay: import("./menuDisplay").MenuDisplayState;
|
|
59
|
+
menuItems: import("./menuItems").MenuItemsState;
|
|
60
|
+
modal: import("@open-tender/types").Modal;
|
|
61
|
+
misc: import("./misc").MiscState;
|
|
62
|
+
nav: import("./nav").NavState;
|
|
63
|
+
navSite: import("./navSite").NavSiteState;
|
|
64
|
+
notifications: import("@open-tender/types").Notifications;
|
|
65
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
66
|
+
order: import("./order").OrderState;
|
|
67
|
+
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
68
|
+
orderRating: import("./orderRating").OrderRatingState;
|
|
69
|
+
posts: import("./posts").PostsSlice;
|
|
70
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
71
|
+
qr: import("./qr").QrState;
|
|
72
|
+
quote: QuoteState;
|
|
73
|
+
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
74
|
+
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
75
|
+
sidebar: import("./sidebar").SidebarState;
|
|
76
|
+
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
77
|
+
signUp: import("./signUp").SignUpState;
|
|
78
|
+
tags: import("./tags").TagsState;
|
|
79
|
+
terms: import("./terms").TermsSlice;
|
|
80
|
+
validTimes: import("./validTimes").ValidTimesState;
|
|
81
|
+
verifyAccount: import("./verifyAccount").VerifyAccountState;
|
|
82
|
+
}) => {
|
|
83
|
+
order: Order | null;
|
|
84
|
+
loading: RequestStatus;
|
|
85
|
+
error: RequestError;
|
|
86
|
+
}) & import("reselect").OutputSelectorFields<(args_0: {
|
|
87
|
+
order: Order | null;
|
|
88
|
+
loading: RequestStatus;
|
|
89
|
+
error: RequestError;
|
|
90
|
+
}) => {
|
|
91
|
+
order: Order | null;
|
|
92
|
+
loading: RequestStatus;
|
|
93
|
+
error: RequestError;
|
|
94
|
+
}, {
|
|
95
|
+
clearCache: () => void;
|
|
96
|
+
}> & {
|
|
97
|
+
clearCache: () => void;
|
|
98
|
+
};
|
|
99
|
+
export declare const quoteReducer: import("redux").Reducer<QuoteState, import("redux").AnyAction>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { createAsyncThunk, createSelector, createSlice } from '@reduxjs/toolkit';
|
|
3
|
+
import { selectToken } from './customer';
|
|
4
|
+
import { ReducerType } from './types';
|
|
5
|
+
const initialState = {
|
|
6
|
+
entity: null,
|
|
7
|
+
error: null,
|
|
8
|
+
loading: 'idle'
|
|
9
|
+
};
|
|
10
|
+
export var QuoteActionType;
|
|
11
|
+
(function (QuoteActionType) {
|
|
12
|
+
QuoteActionType["FetchQuote"] = "customer/fetchQuote";
|
|
13
|
+
})(QuoteActionType || (QuoteActionType = {}));
|
|
14
|
+
export const fetchQuote = createAsyncThunk(QuoteActionType.FetchQuote, (orderUuid, { getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
try {
|
|
16
|
+
const api = getState().config.api;
|
|
17
|
+
const token = selectToken(getState());
|
|
18
|
+
return yield api.getQuote(token, orderUuid);
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
return rejectWithValue(err);
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
const quoteSlice = createSlice({
|
|
25
|
+
name: ReducerType.Quote,
|
|
26
|
+
initialState,
|
|
27
|
+
reducers: {
|
|
28
|
+
resetQuote: () => initialState,
|
|
29
|
+
resetQuoteError: state => {
|
|
30
|
+
state.error = null;
|
|
31
|
+
state.loading = 'idle';
|
|
32
|
+
},
|
|
33
|
+
setQuote: (state, action) => {
|
|
34
|
+
state.entity = action.payload;
|
|
35
|
+
state.error = null;
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
extraReducers: builder => {
|
|
39
|
+
builder
|
|
40
|
+
.addCase(fetchQuote.fulfilled, (state, action) => {
|
|
41
|
+
state.entity = action.payload;
|
|
42
|
+
state.loading = 'idle';
|
|
43
|
+
state.error = null;
|
|
44
|
+
})
|
|
45
|
+
.addCase(fetchQuote.pending, state => {
|
|
46
|
+
state.loading = 'pending';
|
|
47
|
+
})
|
|
48
|
+
.addCase(fetchQuote.rejected, (state, action) => {
|
|
49
|
+
state.error = action.payload;
|
|
50
|
+
state.loading = 'idle';
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export const { resetQuote, resetQuoteError, setQuote } = quoteSlice.actions;
|
|
55
|
+
export const selectQuote = createSelector((state) => {
|
|
56
|
+
const { entity: order, loading, error } = state.quote;
|
|
57
|
+
return { order, loading, error };
|
|
58
|
+
}, ({ order, loading, error }) => {
|
|
59
|
+
return { order, loading, error };
|
|
60
|
+
});
|
|
61
|
+
export const quoteReducer = quoteSlice.reducer;
|
|
@@ -75,7 +75,9 @@ export declare const selectSelectedTagNames: ((state: import("redux").EmptyObjec
|
|
|
75
75
|
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
|
|
76
76
|
orderRating: import("./orderRating").OrderRatingState;
|
|
77
77
|
posts: import("./posts").PostsSlice;
|
|
78
|
+
pushNotifications: import("./pushNotifications").PushNotificationsState;
|
|
78
79
|
qr: import("./qr").QrState;
|
|
80
|
+
quote: import("./quote").QuoteState;
|
|
79
81
|
resetPassword: import("./resetPassword").ResetPasswordState;
|
|
80
82
|
revenueCenters: import("./revenueCenters").RevenueCentersState;
|
|
81
83
|
sidebar: import("./sidebar").SidebarState;
|
|
@@ -39,8 +39,10 @@ export declare enum ReducerType {
|
|
|
39
39
|
Orders = "orders",
|
|
40
40
|
Posts = "posts",
|
|
41
41
|
PointsShop = "pointsShop",
|
|
42
|
+
PushNotifications = "pushNotifications",
|
|
42
43
|
Qr = "qr",
|
|
43
44
|
QRCode = "qrcode",
|
|
45
|
+
Quote = "quote",
|
|
44
46
|
ResetPassword = "resetPassword",
|
|
45
47
|
RevenueCenters = "revenueCenters",
|
|
46
48
|
Rewards = "rewards",
|
package/dist/esm/slices/types.js
CHANGED
|
@@ -40,8 +40,10 @@ export var ReducerType;
|
|
|
40
40
|
ReducerType["Orders"] = "orders";
|
|
41
41
|
ReducerType["Posts"] = "posts";
|
|
42
42
|
ReducerType["PointsShop"] = "pointsShop";
|
|
43
|
+
ReducerType["PushNotifications"] = "pushNotifications";
|
|
43
44
|
ReducerType["Qr"] = "qr";
|
|
44
45
|
ReducerType["QRCode"] = "qrcode";
|
|
46
|
+
ReducerType["Quote"] = "quote";
|
|
45
47
|
ReducerType["ResetPassword"] = "resetPassword";
|
|
46
48
|
ReducerType["RevenueCenters"] = "revenueCenters";
|
|
47
49
|
ReducerType["Rewards"] = "rewards";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.106",
|
|
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",
|