@open-tender/cloud 0.1.63 → 0.1.64
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 -0
- package/dist/cjs/app/store.d.ts +3 -0
- package/dist/cjs/app/store.js +2 -1
- package/dist/cjs/services/api.d.ts +2 -1
- package/dist/cjs/services/api.js +3 -0
- package/dist/cjs/slices/allergens.d.ts +1 -0
- package/dist/cjs/slices/config.d.ts +1 -0
- package/dist/cjs/slices/customer/account.d.ts +5 -3
- package/dist/cjs/slices/customer/account.js +31 -6
- package/dist/cjs/slices/customer/order.d.ts +1 -0
- package/dist/cjs/slices/index.d.ts +1 -0
- package/dist/cjs/slices/index.js +1 -0
- package/dist/cjs/slices/oneTimePasscode.d.ts +26 -0
- package/dist/cjs/slices/oneTimePasscode.js +65 -0
- package/dist/cjs/slices/order.d.ts +3 -0
- package/dist/cjs/slices/tags.d.ts +1 -0
- package/dist/cjs/slices/types.d.ts +1 -0
- package/dist/cjs/slices/types.js +1 -0
- package/dist/esm/app/hooks.d.ts +1 -0
- package/dist/esm/app/store.d.ts +3 -0
- package/dist/esm/app/store.js +3 -2
- package/dist/esm/services/api.d.ts +2 -1
- package/dist/esm/services/api.js +3 -0
- package/dist/esm/slices/allergens.d.ts +1 -0
- package/dist/esm/slices/config.d.ts +1 -0
- package/dist/esm/slices/customer/account.d.ts +5 -3
- package/dist/esm/slices/customer/account.js +31 -6
- package/dist/esm/slices/customer/order.d.ts +1 -0
- package/dist/esm/slices/index.d.ts +1 -0
- package/dist/esm/slices/index.js +1 -0
- package/dist/esm/slices/oneTimePasscode.d.ts +26 -0
- package/dist/esm/slices/oneTimePasscode.js +60 -0
- package/dist/esm/slices/order.d.ts +3 -0
- package/dist/esm/slices/tags.d.ts +1 -0
- package/dist/esm/slices/types.d.ts +1 -0
- package/dist/esm/slices/types.js +1 -0
- package/package.json +3 -3
package/dist/cjs/app/hooks.d.ts
CHANGED
|
@@ -54,5 +54,6 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<i
|
|
|
54
54
|
sidebarModal: import("..").SidebarModalState;
|
|
55
55
|
sidebar: import("..").SidebarState;
|
|
56
56
|
tags: import("..").TagsState;
|
|
57
|
+
oneTimePasscode: import("..").OneTimePasscodeState;
|
|
57
58
|
}>, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").Action<any>>;
|
|
58
59
|
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
package/dist/cjs/app/store.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export declare const appReducer: import("redux").Reducer<import("redux").Combine
|
|
|
53
53
|
sidebarModal: import("../slices").SidebarModalState;
|
|
54
54
|
sidebar: import("../slices").SidebarState;
|
|
55
55
|
tags: import("../slices").TagsState;
|
|
56
|
+
oneTimePasscode: import("../slices").OneTimePasscodeState;
|
|
56
57
|
}>, import("redux").AnyAction>;
|
|
57
58
|
export type AppState = ReturnType<typeof appReducer>;
|
|
58
59
|
declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
|
|
@@ -109,6 +110,7 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
109
110
|
sidebarModal: import("../slices").SidebarModalState;
|
|
110
111
|
sidebar: import("../slices").SidebarState;
|
|
111
112
|
tags: import("../slices").TagsState;
|
|
113
|
+
oneTimePasscode: import("../slices").OneTimePasscodeState;
|
|
112
114
|
}, Action<any>, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
113
115
|
alerts: import("@open-tender/types").Alerts;
|
|
114
116
|
notifications: import("@open-tender/types").Notifications;
|
|
@@ -163,6 +165,7 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
163
165
|
sidebarModal: import("../slices").SidebarModalState;
|
|
164
166
|
sidebar: import("../slices").SidebarState;
|
|
165
167
|
tags: import("../slices").TagsState;
|
|
168
|
+
oneTimePasscode: import("../slices").OneTimePasscodeState;
|
|
166
169
|
}>, import("redux").AnyAction, undefined>]>>;
|
|
167
170
|
export type AppDispatch = typeof store.dispatch;
|
|
168
171
|
export type RootState = ReturnType<typeof store.getState>;
|
package/dist/cjs/app/store.js
CHANGED
|
@@ -40,7 +40,8 @@ exports.appReducer = (0, toolkit_1.combineReducers)({
|
|
|
40
40
|
[types_1.ReducerType.Posts]: slices_1.postsReducer,
|
|
41
41
|
[types_1.ReducerType.SidebarModal]: slices_1.sidebarModalReducer,
|
|
42
42
|
[types_1.ReducerType.Sidebar]: slices_1.sidebarReducer,
|
|
43
|
-
[types_1.ReducerType.Tags]: slices_1.tagsReducer
|
|
43
|
+
[types_1.ReducerType.Tags]: slices_1.tagsReducer,
|
|
44
|
+
[types_1.ReducerType.OneTimePasscode]: slices_1.oneTimePasscodeReducer
|
|
44
45
|
});
|
|
45
46
|
const rootReducer = (state, action) => {
|
|
46
47
|
if (action.type === 'clearState') {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigApp, Customer, CustomerCreate, GroupOrder, GroupOrdersExpanded, OrderType, RevenueCenterType, ServiceType, Weekday } from '@open-tender/types';
|
|
1
|
+
import { Auth, ConfigApp, Customer, CustomerCreate, GroupOrder, GroupOrdersExpanded, OneTimePasscode, OrderType, RevenueCenterType, ServiceType, Weekday } from '@open-tender/types';
|
|
2
2
|
declare class OpenTenderAPI {
|
|
3
3
|
brandId?: string;
|
|
4
4
|
clientId?: string;
|
|
@@ -102,6 +102,7 @@ declare class OpenTenderAPI {
|
|
|
102
102
|
getSubscriber(email: string): Promise<unknown>;
|
|
103
103
|
postSubscriber(email: string): Promise<unknown>;
|
|
104
104
|
postSignUp(data: CustomerCreate): Promise<Customer | null | undefined>;
|
|
105
|
+
postOneTimePasscode(data: OneTimePasscode): Promise<void | Auth | null | undefined>;
|
|
105
106
|
postThanxLogin(email: string, origin?: string): Promise<unknown>;
|
|
106
107
|
postThanxAuth(code: string, path: string, origin?: string): Promise<unknown>;
|
|
107
108
|
postLogin(email: string, password: string): Promise<unknown>;
|
package/dist/cjs/services/api.js
CHANGED
|
@@ -498,6 +498,9 @@ class OpenTenderAPI {
|
|
|
498
498
|
postSignUp(data) {
|
|
499
499
|
return this.request(`/customer`, 'POST', data);
|
|
500
500
|
}
|
|
501
|
+
postOneTimePasscode(data) {
|
|
502
|
+
return this.request(`/customer/sign-in`, 'POST', data);
|
|
503
|
+
}
|
|
501
504
|
postThanxLogin(email, origin) {
|
|
502
505
|
const data = origin ? { email, origin } : { email };
|
|
503
506
|
return this.request('/thanx-login', 'POST', data);
|
|
@@ -81,6 +81,7 @@ export declare const selectSelectedAllergenNames: ((state: import("redux").Empty
|
|
|
81
81
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
82
82
|
sidebar: import("./sidebar").SidebarState;
|
|
83
83
|
tags: import("./tags").TagsState;
|
|
84
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
84
85
|
}) => string[]) & import("reselect").OutputSelectorFields<(args_0: {
|
|
85
86
|
allergens: Allergens;
|
|
86
87
|
selectedAllergens: Allergens | null;
|
|
@@ -137,6 +137,7 @@ export declare const selectOptIns: ((state: import("redux").EmptyObject & {
|
|
|
137
137
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
138
138
|
sidebar: import("./sidebar").SidebarState;
|
|
139
139
|
tags: import("./tags").TagsState;
|
|
140
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
140
141
|
}) => {
|
|
141
142
|
accepts_marketing: import("@open-tender/types").ConfigAcceptMarketing | null | undefined;
|
|
142
143
|
order_notifications: import("@open-tender/types").ConfigOrderNotifications | null | undefined;
|
|
@@ -14,7 +14,9 @@ export declare enum AccountActionType {
|
|
|
14
14
|
UpdateCustomer = "customer/updateCustomer",
|
|
15
15
|
VerifyCustomer = "customer/verifyCustomer",
|
|
16
16
|
LinkPosToken = "customer/linkPosToken",
|
|
17
|
-
DeleteCustomer = "customer/deleteCustomer"
|
|
17
|
+
DeleteCustomer = "customer/deleteCustomer",
|
|
18
|
+
LoginCustomerThanx = "customer/loginCustomerThanx",
|
|
19
|
+
AuthCustomerThanx = "customer/authCustomerThanx"
|
|
18
20
|
}
|
|
19
21
|
export declare const checkAuth: (err: RequestError, dispatch: ThunkDispatch<AppState, unknown, AnyAction>, rejectWithValue: () => any) => Promise<any>;
|
|
20
22
|
export declare const fetchCustomer: import("@reduxjs/toolkit").AsyncThunk<Customer, void, {
|
|
@@ -80,7 +82,7 @@ export declare const sendCustomerVerificationEmail: import("@reduxjs/toolkit").A
|
|
|
80
82
|
fulfilledMeta?: unknown;
|
|
81
83
|
rejectedMeta?: unknown;
|
|
82
84
|
}>;
|
|
83
|
-
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<
|
|
85
|
+
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
84
86
|
email: string;
|
|
85
87
|
origin?: string | undefined;
|
|
86
88
|
}, {
|
|
@@ -93,7 +95,7 @@ export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<n
|
|
|
93
95
|
fulfilledMeta?: unknown;
|
|
94
96
|
rejectedMeta?: unknown;
|
|
95
97
|
}>;
|
|
96
|
-
export declare const authCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<
|
|
98
|
+
export declare const authCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
97
99
|
code: any;
|
|
98
100
|
path: string | null;
|
|
99
101
|
origin: string | null;
|
|
@@ -39,6 +39,8 @@ var AccountActionType;
|
|
|
39
39
|
AccountActionType["VerifyCustomer"] = "customer/verifyCustomer";
|
|
40
40
|
AccountActionType["LinkPosToken"] = "customer/linkPosToken";
|
|
41
41
|
AccountActionType["DeleteCustomer"] = "customer/deleteCustomer";
|
|
42
|
+
AccountActionType["LoginCustomerThanx"] = "customer/loginCustomerThanx";
|
|
43
|
+
AccountActionType["AuthCustomerThanx"] = "customer/authCustomerThanx";
|
|
42
44
|
})(AccountActionType = exports.AccountActionType || (exports.AccountActionType = {}));
|
|
43
45
|
const checkAuth = (err, dispatch, rejectWithValue) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
44
46
|
if ((err === null || err === void 0 ? void 0 : err.status) === 401) {
|
|
@@ -171,13 +173,13 @@ exports.sendCustomerVerificationEmail = (0, toolkit_1.createAsyncThunk)(AccountA
|
|
|
171
173
|
return rejectWithValue(err);
|
|
172
174
|
}
|
|
173
175
|
}));
|
|
174
|
-
exports.loginCustomerThanx = (0, toolkit_1.createAsyncThunk)(AccountActionType.
|
|
176
|
+
exports.loginCustomerThanx = (0, toolkit_1.createAsyncThunk)(AccountActionType.LoginCustomerThanx, ({ email, origin }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
175
177
|
try {
|
|
176
178
|
const api = getState().config.api;
|
|
177
179
|
yield api.postThanxLogin(email, origin);
|
|
178
180
|
dispatch((0, order_2.setAlert)({ type: 'close' }));
|
|
179
181
|
dispatch((0, order_2.addMessage)('Thanks! Please check your email on this device.'));
|
|
180
|
-
return
|
|
182
|
+
return;
|
|
181
183
|
}
|
|
182
184
|
catch (err) {
|
|
183
185
|
const errr = err;
|
|
@@ -190,12 +192,13 @@ exports.loginCustomerThanx = (0, toolkit_1.createAsyncThunk)(AccountActionType.L
|
|
|
190
192
|
return rejectWithValue(errr);
|
|
191
193
|
}
|
|
192
194
|
}));
|
|
193
|
-
exports.authCustomerThanx = (0, toolkit_1.createAsyncThunk)(AccountActionType.
|
|
195
|
+
exports.authCustomerThanx = (0, toolkit_1.createAsyncThunk)(AccountActionType.AuthCustomerThanx, (data, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
194
196
|
try {
|
|
195
197
|
const api = getState().config.api;
|
|
196
198
|
const auth = yield api.postThanxAuth(data.code, data.path, data.origin);
|
|
197
|
-
dispatch((0, exports.
|
|
198
|
-
|
|
199
|
+
dispatch((0, exports.setCustomerAuth)(auth));
|
|
200
|
+
yield dispatch((0, exports.fetchCustomer)());
|
|
201
|
+
return;
|
|
199
202
|
}
|
|
200
203
|
catch (err) {
|
|
201
204
|
return rejectWithValue(err);
|
|
@@ -313,7 +316,29 @@ const accountSlice = (0, toolkit_1.createSlice)({
|
|
|
313
316
|
.addCase(exports.deleteCustomer.pending, state => {
|
|
314
317
|
state.loading = 'pending';
|
|
315
318
|
})
|
|
316
|
-
.addCase(exports.deleteCustomer.rejected, () => initialState)
|
|
319
|
+
.addCase(exports.deleteCustomer.rejected, () => initialState)
|
|
320
|
+
.addCase(exports.loginCustomerThanx.fulfilled, state => {
|
|
321
|
+
state.loading = 'idle';
|
|
322
|
+
state.error = null;
|
|
323
|
+
})
|
|
324
|
+
.addCase(exports.loginCustomerThanx.pending, state => {
|
|
325
|
+
state.loading = 'pending';
|
|
326
|
+
})
|
|
327
|
+
.addCase(exports.loginCustomerThanx.rejected, (state, action) => {
|
|
328
|
+
state.loading = 'idle';
|
|
329
|
+
state.error = action.payload;
|
|
330
|
+
})
|
|
331
|
+
.addCase(exports.authCustomerThanx.fulfilled, state => {
|
|
332
|
+
state.loading = 'idle';
|
|
333
|
+
state.error = null;
|
|
334
|
+
})
|
|
335
|
+
.addCase(exports.authCustomerThanx.pending, state => {
|
|
336
|
+
state.loading = 'pending';
|
|
337
|
+
})
|
|
338
|
+
.addCase(exports.authCustomerThanx.rejected, (state, action) => {
|
|
339
|
+
state.loading = 'idle';
|
|
340
|
+
state.error = action.payload;
|
|
341
|
+
});
|
|
317
342
|
}
|
|
318
343
|
});
|
|
319
344
|
_a = accountSlice.actions, exports.resetCustomer = _a.resetCustomer, exports.resetLoginError = _a.resetLoginError, exports.setCustomerAuth = _a.setCustomerAuth;
|
|
@@ -87,6 +87,7 @@ export declare const selectCustomerOrder: ((state: import("redux").EmptyObject &
|
|
|
87
87
|
sidebarModal: import("..").SidebarModalState;
|
|
88
88
|
sidebar: import("..").SidebarState;
|
|
89
89
|
tags: import("..").TagsState;
|
|
90
|
+
oneTimePasscode: import("..").OneTimePasscodeState;
|
|
90
91
|
}) => {
|
|
91
92
|
order: Order | null;
|
|
92
93
|
loading: RequestStatus;
|
package/dist/cjs/slices/index.js
CHANGED
|
@@ -24,6 +24,7 @@ tslib_1.__exportStar(require("./modal"), exports);
|
|
|
24
24
|
tslib_1.__exportStar(require("./nav"), exports);
|
|
25
25
|
tslib_1.__exportStar(require("./navSite"), exports);
|
|
26
26
|
tslib_1.__exportStar(require("./notifications"), exports);
|
|
27
|
+
tslib_1.__exportStar(require("./oneTimePasscode"), exports);
|
|
27
28
|
tslib_1.__exportStar(require("./order"), exports);
|
|
28
29
|
tslib_1.__exportStar(require("./orderFulfillment"), exports);
|
|
29
30
|
tslib_1.__exportStar(require("./orderRating"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AppState } from '../app';
|
|
2
|
+
import { OneTimePasscode, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
|
+
export interface OneTimePasscodeState {
|
|
4
|
+
otpSent: boolean;
|
|
5
|
+
loading: RequestStatus;
|
|
6
|
+
error: RequestError;
|
|
7
|
+
}
|
|
8
|
+
export declare enum OneTimePasscodeActionType {
|
|
9
|
+
OneTimePasscodeCustomer = "oneTimePasscode/oneTimePasscodeCustomer"
|
|
10
|
+
}
|
|
11
|
+
export declare const sendOneTimePasscode: import("@reduxjs/toolkit").AsyncThunk<boolean, {
|
|
12
|
+
data: OneTimePasscode;
|
|
13
|
+
callback?: (() => void) | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
state: AppState;
|
|
16
|
+
rejectValue: RequestError;
|
|
17
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
18
|
+
extra?: unknown;
|
|
19
|
+
serializedErrorType?: unknown;
|
|
20
|
+
pendingMeta?: unknown;
|
|
21
|
+
fulfilledMeta?: unknown;
|
|
22
|
+
rejectedMeta?: unknown;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const resetOneTimePasscode: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"oneTimePasscode/resetOneTimePasscode">, toggleOtpSent: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "oneTimePasscode/toggleOtpSent">;
|
|
25
|
+
export declare const selectOneTimePasscode: (state: AppState) => OneTimePasscodeState;
|
|
26
|
+
export declare const oneTimePasscodeReducer: import("redux").Reducer<OneTimePasscodeState, import("redux").AnyAction>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.oneTimePasscodeReducer = exports.selectOneTimePasscode = exports.toggleOtpSent = exports.resetOneTimePasscode = exports.sendOneTimePasscode = exports.OneTimePasscodeActionType = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
|
+
const types_1 = require("./types");
|
|
8
|
+
const customer_1 = require("./customer");
|
|
9
|
+
const initialState = {
|
|
10
|
+
otpSent: false,
|
|
11
|
+
loading: 'idle',
|
|
12
|
+
error: null
|
|
13
|
+
};
|
|
14
|
+
var OneTimePasscodeActionType;
|
|
15
|
+
(function (OneTimePasscodeActionType) {
|
|
16
|
+
OneTimePasscodeActionType["OneTimePasscodeCustomer"] = "oneTimePasscode/oneTimePasscodeCustomer";
|
|
17
|
+
})(OneTimePasscodeActionType = exports.OneTimePasscodeActionType || (exports.OneTimePasscodeActionType = {}));
|
|
18
|
+
exports.sendOneTimePasscode = (0, toolkit_1.createAsyncThunk)(OneTimePasscodeActionType.OneTimePasscodeCustomer, ({ data, callback }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
+
try {
|
|
20
|
+
const api = getState().config.api;
|
|
21
|
+
const response = yield api.postOneTimePasscode(data);
|
|
22
|
+
if (data.one_time_passcode) {
|
|
23
|
+
dispatch((0, customer_1.setCustomerAuth)(response));
|
|
24
|
+
yield dispatch((0, customer_1.fetchCustomer)());
|
|
25
|
+
if (callback)
|
|
26
|
+
callback();
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
return rejectWithValue(err);
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
const oneTimePasscodeSlice = (0, toolkit_1.createSlice)({
|
|
38
|
+
name: types_1.ReducerType.OneTimePasscode,
|
|
39
|
+
initialState,
|
|
40
|
+
reducers: {
|
|
41
|
+
resetOneTimePasscode: () => initialState,
|
|
42
|
+
toggleOtpSent: (state, action) => {
|
|
43
|
+
state.otpSent = action.payload;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
extraReducers: builder => {
|
|
47
|
+
builder
|
|
48
|
+
.addCase(exports.sendOneTimePasscode.fulfilled, (state, action) => {
|
|
49
|
+
state.otpSent = action.payload;
|
|
50
|
+
state.loading = 'idle';
|
|
51
|
+
state.error = null;
|
|
52
|
+
})
|
|
53
|
+
.addCase(exports.sendOneTimePasscode.pending, state => {
|
|
54
|
+
state.loading = 'pending';
|
|
55
|
+
})
|
|
56
|
+
.addCase(exports.sendOneTimePasscode.rejected, (state, action) => {
|
|
57
|
+
state.loading = 'idle';
|
|
58
|
+
state.error = action.payload;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
_a = oneTimePasscodeSlice.actions, exports.resetOneTimePasscode = _a.resetOneTimePasscode, exports.toggleOtpSent = _a.toggleOtpSent;
|
|
63
|
+
const selectOneTimePasscode = (state) => state.oneTimePasscode;
|
|
64
|
+
exports.selectOneTimePasscode = selectOneTimePasscode;
|
|
65
|
+
exports.oneTimePasscodeReducer = oneTimePasscodeSlice.reducer;
|
|
@@ -172,6 +172,7 @@ export declare const selectOrderLimits: ((state: import("redux").EmptyObject & {
|
|
|
172
172
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
173
173
|
sidebar: import("./sidebar").SidebarState;
|
|
174
174
|
tags: import("./tags").TagsState;
|
|
175
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
175
176
|
}) => {
|
|
176
177
|
orderMinimum: number | null;
|
|
177
178
|
orderMaximum: number | null;
|
|
@@ -242,6 +243,7 @@ export declare const selectCartIds: ((state: import("redux").EmptyObject & {
|
|
|
242
243
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
243
244
|
sidebar: import("./sidebar").SidebarState;
|
|
244
245
|
tags: import("./tags").TagsState;
|
|
246
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
245
247
|
}) => number[]) & import("reselect").OutputSelectorFields<(args_0: Cart | null) => number[], {
|
|
246
248
|
clearCache: () => void;
|
|
247
249
|
}> & {
|
|
@@ -307,6 +309,7 @@ export declare const selectMenuVars: ((state: import("redux").EmptyObject & {
|
|
|
307
309
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
308
310
|
sidebar: import("./sidebar").SidebarState;
|
|
309
311
|
tags: import("./tags").TagsState;
|
|
312
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
310
313
|
}) => {
|
|
311
314
|
revenueCenterId: number | null;
|
|
312
315
|
serviceType: ServiceType | null;
|
|
@@ -81,6 +81,7 @@ export declare const selectSelectedTagNames: ((state: import("redux").EmptyObjec
|
|
|
81
81
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
82
82
|
sidebar: import("./sidebar").SidebarState;
|
|
83
83
|
tags: TagsState;
|
|
84
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
84
85
|
}) => string[]) & import("reselect").OutputSelectorFields<(args_0: {
|
|
85
86
|
tags: Tags;
|
|
86
87
|
selectedTags: Tags;
|
package/dist/cjs/slices/types.js
CHANGED
|
@@ -36,6 +36,7 @@ var ReducerType;
|
|
|
36
36
|
ReducerType["Nav"] = "nav";
|
|
37
37
|
ReducerType["NavSite"] = "navSite";
|
|
38
38
|
ReducerType["Notifications"] = "notifications";
|
|
39
|
+
ReducerType["OneTimePasscode"] = "oneTimePasscode";
|
|
39
40
|
ReducerType["Order"] = "order";
|
|
40
41
|
ReducerType["OrderFulfillment"] = "orderFulfillment";
|
|
41
42
|
ReducerType["OrderRating"] = "orderRating";
|
package/dist/esm/app/hooks.d.ts
CHANGED
|
@@ -54,5 +54,6 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<i
|
|
|
54
54
|
sidebarModal: import("..").SidebarModalState;
|
|
55
55
|
sidebar: import("..").SidebarState;
|
|
56
56
|
tags: import("..").TagsState;
|
|
57
|
+
oneTimePasscode: import("..").OneTimePasscodeState;
|
|
57
58
|
}>, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").Action<any>>;
|
|
58
59
|
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
package/dist/esm/app/store.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export declare const appReducer: import("redux").Reducer<import("redux").Combine
|
|
|
53
53
|
sidebarModal: import("../slices").SidebarModalState;
|
|
54
54
|
sidebar: import("../slices").SidebarState;
|
|
55
55
|
tags: import("../slices").TagsState;
|
|
56
|
+
oneTimePasscode: import("../slices").OneTimePasscodeState;
|
|
56
57
|
}>, import("redux").AnyAction>;
|
|
57
58
|
export type AppState = ReturnType<typeof appReducer>;
|
|
58
59
|
declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
|
|
@@ -109,6 +110,7 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
109
110
|
sidebarModal: import("../slices").SidebarModalState;
|
|
110
111
|
sidebar: import("../slices").SidebarState;
|
|
111
112
|
tags: import("../slices").TagsState;
|
|
113
|
+
oneTimePasscode: import("../slices").OneTimePasscodeState;
|
|
112
114
|
}, Action<any>, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
113
115
|
alerts: import("@open-tender/types").Alerts;
|
|
114
116
|
notifications: import("@open-tender/types").Notifications;
|
|
@@ -163,6 +165,7 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
163
165
|
sidebarModal: import("../slices").SidebarModalState;
|
|
164
166
|
sidebar: import("../slices").SidebarState;
|
|
165
167
|
tags: import("../slices").TagsState;
|
|
168
|
+
oneTimePasscode: import("../slices").OneTimePasscodeState;
|
|
166
169
|
}>, import("redux").AnyAction, undefined>]>>;
|
|
167
170
|
export type AppDispatch = typeof store.dispatch;
|
|
168
171
|
export type RootState = ReturnType<typeof store.getState>;
|
package/dist/esm/app/store.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
2
|
-
import { alertsReducer,
|
|
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, validTimesReducer, verifyAccountReducer } from '../slices';
|
|
3
3
|
import { ReducerType } from '../slices/types';
|
|
4
4
|
export const appReducer = combineReducers({
|
|
5
5
|
[ReducerType.Alerts]: alertsReducer,
|
|
@@ -37,7 +37,8 @@ export const appReducer = combineReducers({
|
|
|
37
37
|
[ReducerType.Posts]: postsReducer,
|
|
38
38
|
[ReducerType.SidebarModal]: sidebarModalReducer,
|
|
39
39
|
[ReducerType.Sidebar]: sidebarReducer,
|
|
40
|
-
[ReducerType.Tags]: tagsReducer
|
|
40
|
+
[ReducerType.Tags]: tagsReducer,
|
|
41
|
+
[ReducerType.OneTimePasscode]: oneTimePasscodeReducer
|
|
41
42
|
});
|
|
42
43
|
const rootReducer = (state, action) => {
|
|
43
44
|
if (action.type === 'clearState') {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigApp, Customer, CustomerCreate, GroupOrder, GroupOrdersExpanded, OrderType, RevenueCenterType, ServiceType, Weekday } from '@open-tender/types';
|
|
1
|
+
import { Auth, ConfigApp, Customer, CustomerCreate, GroupOrder, GroupOrdersExpanded, OneTimePasscode, OrderType, RevenueCenterType, ServiceType, Weekday } from '@open-tender/types';
|
|
2
2
|
declare class OpenTenderAPI {
|
|
3
3
|
brandId?: string;
|
|
4
4
|
clientId?: string;
|
|
@@ -102,6 +102,7 @@ declare class OpenTenderAPI {
|
|
|
102
102
|
getSubscriber(email: string): Promise<unknown>;
|
|
103
103
|
postSubscriber(email: string): Promise<unknown>;
|
|
104
104
|
postSignUp(data: CustomerCreate): Promise<Customer | null | undefined>;
|
|
105
|
+
postOneTimePasscode(data: OneTimePasscode): Promise<void | Auth | null | undefined>;
|
|
105
106
|
postThanxLogin(email: string, origin?: string): Promise<unknown>;
|
|
106
107
|
postThanxAuth(code: string, path: string, origin?: string): Promise<unknown>;
|
|
107
108
|
postLogin(email: string, password: string): Promise<unknown>;
|
package/dist/esm/services/api.js
CHANGED
|
@@ -496,6 +496,9 @@ class OpenTenderAPI {
|
|
|
496
496
|
postSignUp(data) {
|
|
497
497
|
return this.request(`/customer`, 'POST', data);
|
|
498
498
|
}
|
|
499
|
+
postOneTimePasscode(data) {
|
|
500
|
+
return this.request(`/customer/sign-in`, 'POST', data);
|
|
501
|
+
}
|
|
499
502
|
postThanxLogin(email, origin) {
|
|
500
503
|
const data = origin ? { email, origin } : { email };
|
|
501
504
|
return this.request('/thanx-login', 'POST', data);
|
|
@@ -81,6 +81,7 @@ export declare const selectSelectedAllergenNames: ((state: import("redux").Empty
|
|
|
81
81
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
82
82
|
sidebar: import("./sidebar").SidebarState;
|
|
83
83
|
tags: import("./tags").TagsState;
|
|
84
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
84
85
|
}) => string[]) & import("reselect").OutputSelectorFields<(args_0: {
|
|
85
86
|
allergens: Allergens;
|
|
86
87
|
selectedAllergens: Allergens | null;
|
|
@@ -137,6 +137,7 @@ export declare const selectOptIns: ((state: import("redux").EmptyObject & {
|
|
|
137
137
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
138
138
|
sidebar: import("./sidebar").SidebarState;
|
|
139
139
|
tags: import("./tags").TagsState;
|
|
140
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
140
141
|
}) => {
|
|
141
142
|
accepts_marketing: import("@open-tender/types").ConfigAcceptMarketing | null | undefined;
|
|
142
143
|
order_notifications: import("@open-tender/types").ConfigOrderNotifications | null | undefined;
|
|
@@ -14,7 +14,9 @@ export declare enum AccountActionType {
|
|
|
14
14
|
UpdateCustomer = "customer/updateCustomer",
|
|
15
15
|
VerifyCustomer = "customer/verifyCustomer",
|
|
16
16
|
LinkPosToken = "customer/linkPosToken",
|
|
17
|
-
DeleteCustomer = "customer/deleteCustomer"
|
|
17
|
+
DeleteCustomer = "customer/deleteCustomer",
|
|
18
|
+
LoginCustomerThanx = "customer/loginCustomerThanx",
|
|
19
|
+
AuthCustomerThanx = "customer/authCustomerThanx"
|
|
18
20
|
}
|
|
19
21
|
export declare const checkAuth: (err: RequestError, dispatch: ThunkDispatch<AppState, unknown, AnyAction>, rejectWithValue: () => any) => Promise<any>;
|
|
20
22
|
export declare const fetchCustomer: import("@reduxjs/toolkit").AsyncThunk<Customer, void, {
|
|
@@ -80,7 +82,7 @@ export declare const sendCustomerVerificationEmail: import("@reduxjs/toolkit").A
|
|
|
80
82
|
fulfilledMeta?: unknown;
|
|
81
83
|
rejectedMeta?: unknown;
|
|
82
84
|
}>;
|
|
83
|
-
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<
|
|
85
|
+
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
84
86
|
email: string;
|
|
85
87
|
origin?: string | undefined;
|
|
86
88
|
}, {
|
|
@@ -93,7 +95,7 @@ export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<n
|
|
|
93
95
|
fulfilledMeta?: unknown;
|
|
94
96
|
rejectedMeta?: unknown;
|
|
95
97
|
}>;
|
|
96
|
-
export declare const authCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<
|
|
98
|
+
export declare const authCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
97
99
|
code: any;
|
|
98
100
|
path: string | null;
|
|
99
101
|
origin: string | null;
|
|
@@ -35,6 +35,8 @@ export var AccountActionType;
|
|
|
35
35
|
AccountActionType["VerifyCustomer"] = "customer/verifyCustomer";
|
|
36
36
|
AccountActionType["LinkPosToken"] = "customer/linkPosToken";
|
|
37
37
|
AccountActionType["DeleteCustomer"] = "customer/deleteCustomer";
|
|
38
|
+
AccountActionType["LoginCustomerThanx"] = "customer/loginCustomerThanx";
|
|
39
|
+
AccountActionType["AuthCustomerThanx"] = "customer/authCustomerThanx";
|
|
38
40
|
})(AccountActionType || (AccountActionType = {}));
|
|
39
41
|
export const checkAuth = (err, dispatch, rejectWithValue) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
42
|
if ((err === null || err === void 0 ? void 0 : err.status) === 401) {
|
|
@@ -166,13 +168,13 @@ export const sendCustomerVerificationEmail = createAsyncThunk(AccountActionType.
|
|
|
166
168
|
return rejectWithValue(err);
|
|
167
169
|
}
|
|
168
170
|
}));
|
|
169
|
-
export const loginCustomerThanx = createAsyncThunk(AccountActionType.
|
|
171
|
+
export const loginCustomerThanx = createAsyncThunk(AccountActionType.LoginCustomerThanx, ({ email, origin }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
170
172
|
try {
|
|
171
173
|
const api = getState().config.api;
|
|
172
174
|
yield api.postThanxLogin(email, origin);
|
|
173
175
|
dispatch(setAlert({ type: 'close' }));
|
|
174
176
|
dispatch(addMessage('Thanks! Please check your email on this device.'));
|
|
175
|
-
return
|
|
177
|
+
return;
|
|
176
178
|
}
|
|
177
179
|
catch (err) {
|
|
178
180
|
const errr = err;
|
|
@@ -185,12 +187,13 @@ export const loginCustomerThanx = createAsyncThunk(AccountActionType.LoginCustom
|
|
|
185
187
|
return rejectWithValue(errr);
|
|
186
188
|
}
|
|
187
189
|
}));
|
|
188
|
-
export const authCustomerThanx = createAsyncThunk(AccountActionType.
|
|
190
|
+
export const authCustomerThanx = createAsyncThunk(AccountActionType.AuthCustomerThanx, (data, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
189
191
|
try {
|
|
190
192
|
const api = getState().config.api;
|
|
191
193
|
const auth = yield api.postThanxAuth(data.code, data.path, data.origin);
|
|
192
|
-
dispatch(
|
|
193
|
-
|
|
194
|
+
dispatch(setCustomerAuth(auth));
|
|
195
|
+
yield dispatch(fetchCustomer());
|
|
196
|
+
return;
|
|
194
197
|
}
|
|
195
198
|
catch (err) {
|
|
196
199
|
return rejectWithValue(err);
|
|
@@ -308,7 +311,29 @@ const accountSlice = createSlice({
|
|
|
308
311
|
.addCase(deleteCustomer.pending, state => {
|
|
309
312
|
state.loading = 'pending';
|
|
310
313
|
})
|
|
311
|
-
.addCase(deleteCustomer.rejected, () => initialState)
|
|
314
|
+
.addCase(deleteCustomer.rejected, () => initialState)
|
|
315
|
+
.addCase(loginCustomerThanx.fulfilled, state => {
|
|
316
|
+
state.loading = 'idle';
|
|
317
|
+
state.error = null;
|
|
318
|
+
})
|
|
319
|
+
.addCase(loginCustomerThanx.pending, state => {
|
|
320
|
+
state.loading = 'pending';
|
|
321
|
+
})
|
|
322
|
+
.addCase(loginCustomerThanx.rejected, (state, action) => {
|
|
323
|
+
state.loading = 'idle';
|
|
324
|
+
state.error = action.payload;
|
|
325
|
+
})
|
|
326
|
+
.addCase(authCustomerThanx.fulfilled, state => {
|
|
327
|
+
state.loading = 'idle';
|
|
328
|
+
state.error = null;
|
|
329
|
+
})
|
|
330
|
+
.addCase(authCustomerThanx.pending, state => {
|
|
331
|
+
state.loading = 'pending';
|
|
332
|
+
})
|
|
333
|
+
.addCase(authCustomerThanx.rejected, (state, action) => {
|
|
334
|
+
state.loading = 'idle';
|
|
335
|
+
state.error = action.payload;
|
|
336
|
+
});
|
|
312
337
|
}
|
|
313
338
|
});
|
|
314
339
|
export const { resetCustomer, resetLoginError, setCustomerAuth } = accountSlice.actions;
|
|
@@ -87,6 +87,7 @@ export declare const selectCustomerOrder: ((state: import("redux").EmptyObject &
|
|
|
87
87
|
sidebarModal: import("..").SidebarModalState;
|
|
88
88
|
sidebar: import("..").SidebarState;
|
|
89
89
|
tags: import("..").TagsState;
|
|
90
|
+
oneTimePasscode: import("..").OneTimePasscodeState;
|
|
90
91
|
}) => {
|
|
91
92
|
order: Order | null;
|
|
92
93
|
loading: RequestStatus;
|
package/dist/esm/slices/index.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AppState } from '../app';
|
|
2
|
+
import { OneTimePasscode, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
|
+
export interface OneTimePasscodeState {
|
|
4
|
+
otpSent: boolean;
|
|
5
|
+
loading: RequestStatus;
|
|
6
|
+
error: RequestError;
|
|
7
|
+
}
|
|
8
|
+
export declare enum OneTimePasscodeActionType {
|
|
9
|
+
OneTimePasscodeCustomer = "oneTimePasscode/oneTimePasscodeCustomer"
|
|
10
|
+
}
|
|
11
|
+
export declare const sendOneTimePasscode: import("@reduxjs/toolkit").AsyncThunk<boolean, {
|
|
12
|
+
data: OneTimePasscode;
|
|
13
|
+
callback?: (() => void) | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
state: AppState;
|
|
16
|
+
rejectValue: RequestError;
|
|
17
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
18
|
+
extra?: unknown;
|
|
19
|
+
serializedErrorType?: unknown;
|
|
20
|
+
pendingMeta?: unknown;
|
|
21
|
+
fulfilledMeta?: unknown;
|
|
22
|
+
rejectedMeta?: unknown;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const resetOneTimePasscode: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"oneTimePasscode/resetOneTimePasscode">, toggleOtpSent: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "oneTimePasscode/toggleOtpSent">;
|
|
25
|
+
export declare const selectOneTimePasscode: (state: AppState) => OneTimePasscodeState;
|
|
26
|
+
export declare const oneTimePasscodeReducer: import("redux").Reducer<OneTimePasscodeState, import("redux").AnyAction>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
3
|
+
import { ReducerType } from './types';
|
|
4
|
+
import { fetchCustomer, setCustomerAuth } from './customer';
|
|
5
|
+
const initialState = {
|
|
6
|
+
otpSent: false,
|
|
7
|
+
loading: 'idle',
|
|
8
|
+
error: null
|
|
9
|
+
};
|
|
10
|
+
export var OneTimePasscodeActionType;
|
|
11
|
+
(function (OneTimePasscodeActionType) {
|
|
12
|
+
OneTimePasscodeActionType["OneTimePasscodeCustomer"] = "oneTimePasscode/oneTimePasscodeCustomer";
|
|
13
|
+
})(OneTimePasscodeActionType || (OneTimePasscodeActionType = {}));
|
|
14
|
+
export const sendOneTimePasscode = createAsyncThunk(OneTimePasscodeActionType.OneTimePasscodeCustomer, ({ data, callback }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
try {
|
|
16
|
+
const api = getState().config.api;
|
|
17
|
+
const response = yield api.postOneTimePasscode(data);
|
|
18
|
+
if (data.one_time_passcode) {
|
|
19
|
+
dispatch(setCustomerAuth(response));
|
|
20
|
+
yield dispatch(fetchCustomer());
|
|
21
|
+
if (callback)
|
|
22
|
+
callback();
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
return rejectWithValue(err);
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
const oneTimePasscodeSlice = createSlice({
|
|
34
|
+
name: ReducerType.OneTimePasscode,
|
|
35
|
+
initialState,
|
|
36
|
+
reducers: {
|
|
37
|
+
resetOneTimePasscode: () => initialState,
|
|
38
|
+
toggleOtpSent: (state, action) => {
|
|
39
|
+
state.otpSent = action.payload;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
extraReducers: builder => {
|
|
43
|
+
builder
|
|
44
|
+
.addCase(sendOneTimePasscode.fulfilled, (state, action) => {
|
|
45
|
+
state.otpSent = action.payload;
|
|
46
|
+
state.loading = 'idle';
|
|
47
|
+
state.error = null;
|
|
48
|
+
})
|
|
49
|
+
.addCase(sendOneTimePasscode.pending, state => {
|
|
50
|
+
state.loading = 'pending';
|
|
51
|
+
})
|
|
52
|
+
.addCase(sendOneTimePasscode.rejected, (state, action) => {
|
|
53
|
+
state.loading = 'idle';
|
|
54
|
+
state.error = action.payload;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export const { resetOneTimePasscode, toggleOtpSent } = oneTimePasscodeSlice.actions;
|
|
59
|
+
export const selectOneTimePasscode = (state) => state.oneTimePasscode;
|
|
60
|
+
export const oneTimePasscodeReducer = oneTimePasscodeSlice.reducer;
|
|
@@ -172,6 +172,7 @@ export declare const selectOrderLimits: ((state: import("redux").EmptyObject & {
|
|
|
172
172
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
173
173
|
sidebar: import("./sidebar").SidebarState;
|
|
174
174
|
tags: import("./tags").TagsState;
|
|
175
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
175
176
|
}) => {
|
|
176
177
|
orderMinimum: number | null;
|
|
177
178
|
orderMaximum: number | null;
|
|
@@ -242,6 +243,7 @@ export declare const selectCartIds: ((state: import("redux").EmptyObject & {
|
|
|
242
243
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
243
244
|
sidebar: import("./sidebar").SidebarState;
|
|
244
245
|
tags: import("./tags").TagsState;
|
|
246
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
245
247
|
}) => number[]) & import("reselect").OutputSelectorFields<(args_0: Cart | null) => number[], {
|
|
246
248
|
clearCache: () => void;
|
|
247
249
|
}> & {
|
|
@@ -307,6 +309,7 @@ export declare const selectMenuVars: ((state: import("redux").EmptyObject & {
|
|
|
307
309
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
308
310
|
sidebar: import("./sidebar").SidebarState;
|
|
309
311
|
tags: import("./tags").TagsState;
|
|
312
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
310
313
|
}) => {
|
|
311
314
|
revenueCenterId: number | null;
|
|
312
315
|
serviceType: ServiceType | null;
|
|
@@ -81,6 +81,7 @@ export declare const selectSelectedTagNames: ((state: import("redux").EmptyObjec
|
|
|
81
81
|
sidebarModal: import("./sidebarModal").SidebarModalState;
|
|
82
82
|
sidebar: import("./sidebar").SidebarState;
|
|
83
83
|
tags: TagsState;
|
|
84
|
+
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
|
|
84
85
|
}) => string[]) & import("reselect").OutputSelectorFields<(args_0: {
|
|
85
86
|
tags: Tags;
|
|
86
87
|
selectedTags: Tags;
|
package/dist/esm/slices/types.js
CHANGED
|
@@ -33,6 +33,7 @@ export var ReducerType;
|
|
|
33
33
|
ReducerType["Nav"] = "nav";
|
|
34
34
|
ReducerType["NavSite"] = "navSite";
|
|
35
35
|
ReducerType["Notifications"] = "notifications";
|
|
36
|
+
ReducerType["OneTimePasscode"] = "oneTimePasscode";
|
|
36
37
|
ReducerType["Order"] = "order";
|
|
37
38
|
ReducerType["OrderFulfillment"] = "orderFulfillment";
|
|
38
39
|
ReducerType["OrderRating"] = "orderRating";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.64",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"typescript": "^4.8.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@open-tender/types": "^0.2.
|
|
53
|
-
"@open-tender/utils": "^0.1.
|
|
52
|
+
"@open-tender/types": "^0.2.57",
|
|
53
|
+
"@open-tender/utils": "^0.1.126",
|
|
54
54
|
"@reduxjs/toolkit": "^1.8.5",
|
|
55
55
|
"react": "^18.2.0"
|
|
56
56
|
},
|