@open-tender/cloud 0.1.6 → 0.1.7
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/slices/customer/account.d.ts +8 -8
- package/dist/cjs/slices/customer/account.js +8 -8
- package/dist/cjs/slices/customer/communicationPreferences.d.ts +2 -2
- package/dist/cjs/slices/customer/giftCards.d.ts +10 -10
- package/dist/cjs/slices/customer/giftCards.js +21 -21
- package/dist/cjs/slices/giftCards.d.ts +5 -5
- package/dist/cjs/slices/groupOrder.js +1 -1
- package/dist/esm/slices/customer/account.d.ts +8 -8
- package/dist/esm/slices/customer/account.js +8 -8
- package/dist/esm/slices/customer/communicationPreferences.d.ts +2 -2
- package/dist/esm/slices/customer/giftCards.d.ts +10 -10
- package/dist/esm/slices/customer/giftCards.js +21 -21
- package/dist/esm/slices/giftCards.d.ts +5 -5
- package/dist/esm/slices/groupOrder.js +1 -1
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AnyAction, ThunkDispatch } from '@reduxjs/toolkit';
|
|
2
2
|
import { AppState } from '../../app';
|
|
3
|
-
import { Auth,
|
|
3
|
+
import { Auth, Customer, CustomerCreate, LoginData, RequestError, RequestStatus } from '@open-tender/types';
|
|
4
4
|
export interface AccountState {
|
|
5
5
|
auth: Auth | null;
|
|
6
|
-
profile:
|
|
6
|
+
profile: Customer | null;
|
|
7
7
|
loading: RequestStatus;
|
|
8
8
|
error: any;
|
|
9
9
|
}
|
|
@@ -17,7 +17,7 @@ export declare enum AccountActionType {
|
|
|
17
17
|
DeleteCustomer = "customer/deleteCustomer"
|
|
18
18
|
}
|
|
19
19
|
export declare const checkAuth: (err: RequestError, dispatch: ThunkDispatch<AppState, unknown, AnyAction>, rejectWithValue: () => any) => Promise<any>;
|
|
20
|
-
export declare const fetchCustomer: import("@reduxjs/toolkit").AsyncThunk<
|
|
20
|
+
export declare const fetchCustomer: import("@reduxjs/toolkit").AsyncThunk<Customer, void, {
|
|
21
21
|
state: AppState;
|
|
22
22
|
rejectValue: RequestError;
|
|
23
23
|
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
@@ -57,9 +57,9 @@ export declare const linkPosToken: import("@reduxjs/toolkit").AsyncThunk<void, s
|
|
|
57
57
|
fulfilledMeta?: unknown;
|
|
58
58
|
rejectedMeta?: unknown;
|
|
59
59
|
}>;
|
|
60
|
-
export declare const updateCustomer: import("@reduxjs/toolkit").AsyncThunk<
|
|
61
|
-
data:
|
|
62
|
-
callback?: ((data:
|
|
60
|
+
export declare const updateCustomer: import("@reduxjs/toolkit").AsyncThunk<Customer, {
|
|
61
|
+
data: CustomerCreate;
|
|
62
|
+
callback?: ((data: CustomerCreate) => void) | undefined;
|
|
63
63
|
}, {
|
|
64
64
|
state: AppState;
|
|
65
65
|
rejectValue: RequestError;
|
|
@@ -108,8 +108,8 @@ export declare const authCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<Au
|
|
|
108
108
|
rejectedMeta?: unknown;
|
|
109
109
|
}>;
|
|
110
110
|
export declare const deleteCustomer: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
111
|
-
data?:
|
|
112
|
-
callback?: ((data?:
|
|
111
|
+
data?: CustomerCreate | undefined;
|
|
112
|
+
callback?: ((data?: CustomerCreate) => void) | undefined;
|
|
113
113
|
}, {
|
|
114
114
|
state: AppState;
|
|
115
115
|
rejectValue: RequestError;
|
|
@@ -6,6 +6,7 @@ const tslib_1 = require("tslib");
|
|
|
6
6
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
const types_1 = require("../types");
|
|
8
8
|
const types_2 = require("@open-tender/types");
|
|
9
|
+
const utils_1 = require("@open-tender/utils");
|
|
9
10
|
const notifications_1 = require("../notifications");
|
|
10
11
|
const allergens_1 = require("./allergens");
|
|
11
12
|
const allergens_2 = require("../allergens");
|
|
@@ -21,7 +22,6 @@ const communicationPreferences_1 = require("./communicationPreferences");
|
|
|
21
22
|
const giftCards_1 = require("./giftCards");
|
|
22
23
|
const levelup_1 = require("./levelup");
|
|
23
24
|
const order_2 = require("../order");
|
|
24
|
-
const utils_1 = require("@open-tender/utils");
|
|
25
25
|
const checkout_1 = require("../checkout");
|
|
26
26
|
const groupOrder_1 = require("../groupOrder");
|
|
27
27
|
const guest_1 = require("../guest");
|
|
@@ -138,17 +138,17 @@ exports.linkPosToken = (0, toolkit_1.createAsyncThunk)(AccountActionType.LinkPos
|
|
|
138
138
|
return rejectWithValue(error);
|
|
139
139
|
}
|
|
140
140
|
}));
|
|
141
|
-
exports.updateCustomer = (0, toolkit_1.createAsyncThunk)(AccountActionType.UpdateCustomer, (data, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
141
|
+
exports.updateCustomer = (0, toolkit_1.createAsyncThunk)(AccountActionType.UpdateCustomer, ({ data, callback }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
142
142
|
try {
|
|
143
143
|
const token = (0, exports.selectToken)(getState());
|
|
144
144
|
const api = getState().config.api;
|
|
145
145
|
if (!token)
|
|
146
146
|
throw new Error(types_2.MISSING_CUSTOMER);
|
|
147
|
-
const customer = yield api.putCustomer(token, data
|
|
147
|
+
const customer = yield api.putCustomer(token, data);
|
|
148
148
|
const profile = (0, utils_1.makeCustomerProfile)(customer);
|
|
149
149
|
dispatch((0, notifications_1.showNotification)('Account updated!'));
|
|
150
|
-
if (
|
|
151
|
-
|
|
150
|
+
if (callback)
|
|
151
|
+
callback(data);
|
|
152
152
|
return profile;
|
|
153
153
|
}
|
|
154
154
|
catch (err) {
|
|
@@ -204,7 +204,7 @@ exports.authCustomerThanx = (0, toolkit_1.createAsyncThunk)(AccountActionType.Lo
|
|
|
204
204
|
return rejectWithValue(err);
|
|
205
205
|
}
|
|
206
206
|
}));
|
|
207
|
-
exports.deleteCustomer = (0, toolkit_1.createAsyncThunk)(AccountActionType.DeleteCustomer, (
|
|
207
|
+
exports.deleteCustomer = (0, toolkit_1.createAsyncThunk)(AccountActionType.DeleteCustomer, ({ data, callback }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
208
208
|
try {
|
|
209
209
|
const token = (0, exports.selectToken)(getState());
|
|
210
210
|
const api = getState().config.api;
|
|
@@ -228,8 +228,8 @@ exports.deleteCustomer = (0, toolkit_1.createAsyncThunk)(AccountActionType.Delet
|
|
|
228
228
|
dispatch((0, communicationPreferences_1.resetCustomerCommunicationPreferences)());
|
|
229
229
|
dispatch((0, guest_1.resetGuest)());
|
|
230
230
|
dispatch((0, notifications_1.showNotification)('Account deleted!'));
|
|
231
|
-
if (
|
|
232
|
-
|
|
231
|
+
if (callback)
|
|
232
|
+
callback(data);
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
235
|
catch (err) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppState } from '../../app';
|
|
2
|
-
import { CustomerNotificationPrefs, NotificationArea, NotificationChannel, RequestError, RequestStatus } from '@open-tender/types';
|
|
2
|
+
import { CustomerNotificationPrefs, CustomerNotificationPrefsCreate, NotificationArea, NotificationChannel, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface CustomerCommunicationPrefsState {
|
|
4
4
|
entities: CustomerNotificationPrefs;
|
|
5
5
|
error: RequestError;
|
|
@@ -52,7 +52,7 @@ export declare const removeCustomerCommunicationPreference: import("@reduxjs/too
|
|
|
52
52
|
rejectedMeta?: unknown;
|
|
53
53
|
}>;
|
|
54
54
|
export declare const setCustomerCommunicationDefaultPreferences: import("@reduxjs/toolkit").AsyncThunk<CustomerNotificationPrefs, {
|
|
55
|
-
prefs:
|
|
55
|
+
prefs: CustomerNotificationPrefsCreate;
|
|
56
56
|
callback?: (() => void) | undefined;
|
|
57
57
|
}, {
|
|
58
58
|
state: AppState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppState } from '../../app';
|
|
2
|
-
import {
|
|
2
|
+
import { GiftCard, GiftCardPurchase, GiftCards, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface CustomerGiftCardsState {
|
|
4
|
-
entities:
|
|
4
|
+
entities: GiftCards;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
loading: RequestStatus;
|
|
7
7
|
lookup: {
|
|
@@ -16,7 +16,7 @@ export declare enum CustomerGiftCardsActionType {
|
|
|
16
16
|
AssignCustomerGiftCardOther = "customer/assignCustomerGiftCardOther",
|
|
17
17
|
UpdateCustomerGiftCard = "customer/updateCustomerGiftCard"
|
|
18
18
|
}
|
|
19
|
-
export declare const fetchCustomerGiftCards: import("@reduxjs/toolkit").AsyncThunk<
|
|
19
|
+
export declare const fetchCustomerGiftCards: import("@reduxjs/toolkit").AsyncThunk<GiftCards, void, {
|
|
20
20
|
state: AppState;
|
|
21
21
|
rejectValue: RequestError;
|
|
22
22
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -26,9 +26,9 @@ export declare const fetchCustomerGiftCards: import("@reduxjs/toolkit").AsyncThu
|
|
|
26
26
|
fulfilledMeta?: unknown;
|
|
27
27
|
rejectedMeta?: unknown;
|
|
28
28
|
}>;
|
|
29
|
-
export declare const updateCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<
|
|
29
|
+
export declare const updateCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
30
30
|
giftCardId: number;
|
|
31
|
-
data:
|
|
31
|
+
data: GiftCard;
|
|
32
32
|
callback?: (() => void) | undefined;
|
|
33
33
|
}, {
|
|
34
34
|
state: AppState;
|
|
@@ -40,7 +40,7 @@ export declare const updateCustomerGiftCard: import("@reduxjs/toolkit").AsyncThu
|
|
|
40
40
|
fulfilledMeta?: unknown;
|
|
41
41
|
rejectedMeta?: unknown;
|
|
42
42
|
}>;
|
|
43
|
-
export declare const removeCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<
|
|
43
|
+
export declare const removeCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
44
44
|
giftCardId: number;
|
|
45
45
|
callback?: (() => void) | undefined;
|
|
46
46
|
}, {
|
|
@@ -53,8 +53,8 @@ export declare const removeCustomerGiftCard: import("@reduxjs/toolkit").AsyncThu
|
|
|
53
53
|
fulfilledMeta?: unknown;
|
|
54
54
|
rejectedMeta?: unknown;
|
|
55
55
|
}>;
|
|
56
|
-
export declare const addCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<
|
|
57
|
-
data:
|
|
56
|
+
export declare const addCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
57
|
+
data: GiftCardPurchase;
|
|
58
58
|
callback?: (() => void) | undefined;
|
|
59
59
|
}, {
|
|
60
60
|
state: AppState;
|
|
@@ -66,7 +66,7 @@ export declare const addCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
66
66
|
fulfilledMeta?: unknown;
|
|
67
67
|
rejectedMeta?: unknown;
|
|
68
68
|
}>;
|
|
69
|
-
export declare const assignCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<
|
|
69
|
+
export declare const assignCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
70
70
|
cardNumber: number;
|
|
71
71
|
callback?: (() => void) | undefined;
|
|
72
72
|
}, {
|
|
@@ -79,7 +79,7 @@ export declare const assignCustomerGiftCard: import("@reduxjs/toolkit").AsyncThu
|
|
|
79
79
|
fulfilledMeta?: unknown;
|
|
80
80
|
rejectedMeta?: unknown;
|
|
81
81
|
}>;
|
|
82
|
-
export declare const assignCustomerGiftCardOther: import("@reduxjs/toolkit").AsyncThunk<
|
|
82
|
+
export declare const assignCustomerGiftCardOther: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
83
83
|
giftCardId: number;
|
|
84
84
|
email: string;
|
|
85
85
|
callback?: (() => void) | undefined;
|
|
@@ -36,17 +36,17 @@ exports.fetchCustomerGiftCards = (0, toolkit_1.createAsyncThunk)(CustomerGiftCar
|
|
|
36
36
|
return (0, account_1.checkAuth)(error, dispatch, () => rejectWithValue(error));
|
|
37
37
|
}
|
|
38
38
|
}));
|
|
39
|
-
exports.updateCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsActionType.UpdateCustomerGiftCard, (
|
|
39
|
+
exports.updateCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsActionType.UpdateCustomerGiftCard, ({ giftCardId, data, callback }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
40
40
|
try {
|
|
41
41
|
const api = getState().config.api;
|
|
42
42
|
const token = (0, account_1.selectToken)(getState());
|
|
43
43
|
if (!token)
|
|
44
44
|
throw new Error(types_2.MISSING_CUSTOMER);
|
|
45
|
-
yield api.putCustomerGiftCard(token,
|
|
45
|
+
yield api.putCustomerGiftCard(token, giftCardId, data);
|
|
46
46
|
const giftCards = yield api.getCustomerGiftCards(token);
|
|
47
47
|
dispatch((0, notifications_1.showNotification)('Gift card balance updated!'));
|
|
48
|
-
if (
|
|
49
|
-
|
|
48
|
+
if (callback)
|
|
49
|
+
callback();
|
|
50
50
|
return giftCards;
|
|
51
51
|
}
|
|
52
52
|
catch (err) {
|
|
@@ -54,17 +54,17 @@ exports.updateCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCar
|
|
|
54
54
|
return (0, account_1.checkAuth)(error, dispatch, () => rejectWithValue(error));
|
|
55
55
|
}
|
|
56
56
|
}));
|
|
57
|
-
exports.removeCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsActionType.RemoveCustomerGiftCard, (
|
|
57
|
+
exports.removeCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsActionType.RemoveCustomerGiftCard, ({ giftCardId, callback }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
58
58
|
try {
|
|
59
59
|
const api = getState().config.api;
|
|
60
60
|
const token = (0, account_1.selectToken)(getState());
|
|
61
61
|
if (!token)
|
|
62
62
|
throw new Error(types_2.MISSING_CUSTOMER);
|
|
63
|
-
yield api.deleteCustomerGiftCard(token,
|
|
63
|
+
yield api.deleteCustomerGiftCard(token, giftCardId);
|
|
64
64
|
const giftCards = yield api.getCustomerGiftCards(token);
|
|
65
65
|
dispatch((0, notifications_1.showNotification)('Gift card removed!'));
|
|
66
|
-
if (
|
|
67
|
-
|
|
66
|
+
if (callback)
|
|
67
|
+
callback();
|
|
68
68
|
return giftCards;
|
|
69
69
|
}
|
|
70
70
|
catch (err) {
|
|
@@ -72,17 +72,17 @@ exports.removeCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCar
|
|
|
72
72
|
return (0, account_1.checkAuth)(error, dispatch, () => rejectWithValue(error));
|
|
73
73
|
}
|
|
74
74
|
}));
|
|
75
|
-
exports.addCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsActionType.AddCustomerGiftCard, (
|
|
75
|
+
exports.addCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsActionType.AddCustomerGiftCard, ({ data, callback }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
76
76
|
try {
|
|
77
77
|
const api = getState().config.api;
|
|
78
78
|
const token = (0, account_1.selectToken)(getState());
|
|
79
79
|
if (!token)
|
|
80
80
|
throw new Error(types_2.MISSING_CUSTOMER);
|
|
81
|
-
yield api.postCustomerGiftCard(token,
|
|
81
|
+
yield api.postCustomerGiftCard(token, data);
|
|
82
82
|
const giftCards = yield api.getCustomerGiftCards(token);
|
|
83
83
|
dispatch((0, notifications_1.showNotification)('Gift card added!'));
|
|
84
|
-
if (
|
|
85
|
-
|
|
84
|
+
if (callback)
|
|
85
|
+
callback();
|
|
86
86
|
return giftCards;
|
|
87
87
|
}
|
|
88
88
|
catch (err) {
|
|
@@ -90,17 +90,17 @@ exports.addCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsA
|
|
|
90
90
|
return (0, account_1.checkAuth)(error, dispatch, () => rejectWithValue(error));
|
|
91
91
|
}
|
|
92
92
|
}));
|
|
93
|
-
exports.assignCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsActionType.AssignCustomerGiftCard, (
|
|
93
|
+
exports.assignCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsActionType.AssignCustomerGiftCard, ({ cardNumber, callback }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
94
94
|
try {
|
|
95
95
|
const api = getState().config.api;
|
|
96
96
|
const token = (0, account_1.selectToken)(getState());
|
|
97
97
|
if (!token)
|
|
98
98
|
throw new Error(types_2.MISSING_CUSTOMER);
|
|
99
|
-
yield api.postCustomerGiftCardAssign(token,
|
|
99
|
+
yield api.postCustomerGiftCardAssign(token, cardNumber);
|
|
100
100
|
const giftCards = yield api.getCustomerGiftCards(token);
|
|
101
101
|
dispatch((0, notifications_1.showNotification)('Gift card added to your account!'));
|
|
102
|
-
if (
|
|
103
|
-
|
|
102
|
+
if (callback)
|
|
103
|
+
callback();
|
|
104
104
|
return giftCards;
|
|
105
105
|
}
|
|
106
106
|
catch (err) {
|
|
@@ -108,17 +108,17 @@ exports.assignCustomerGiftCard = (0, toolkit_1.createAsyncThunk)(CustomerGiftCar
|
|
|
108
108
|
return (0, account_1.checkAuth)(error, dispatch, () => rejectWithValue(error));
|
|
109
109
|
}
|
|
110
110
|
}));
|
|
111
|
-
exports.assignCustomerGiftCardOther = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsActionType.AssignCustomerGiftCardOther, (
|
|
111
|
+
exports.assignCustomerGiftCardOther = (0, toolkit_1.createAsyncThunk)(CustomerGiftCardsActionType.AssignCustomerGiftCardOther, ({ giftCardId, email, callback }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
112
112
|
try {
|
|
113
113
|
const api = getState().config.api;
|
|
114
114
|
const token = (0, account_1.selectToken)(getState());
|
|
115
115
|
if (!token)
|
|
116
116
|
throw new Error(types_2.MISSING_CUSTOMER);
|
|
117
|
-
yield api.postCustomerGiftCardAssignOther(token,
|
|
117
|
+
yield api.postCustomerGiftCardAssignOther(token, giftCardId, email);
|
|
118
118
|
const giftCards = yield api.getCustomerGiftCards(token);
|
|
119
|
-
dispatch((0, notifications_1.showNotification)(`Gift card assigned to ${
|
|
120
|
-
if (
|
|
121
|
-
|
|
119
|
+
dispatch((0, notifications_1.showNotification)(`Gift card assigned to ${email}`));
|
|
120
|
+
if (callback)
|
|
121
|
+
callback();
|
|
122
122
|
return giftCards;
|
|
123
123
|
}
|
|
124
124
|
catch (err) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
|
-
import {
|
|
2
|
+
import { GiftCard, GiftCards, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface GiftCardsState {
|
|
4
4
|
loading: RequestStatus;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
success: boolean;
|
|
7
|
-
giftCards:
|
|
7
|
+
giftCards: GiftCards;
|
|
8
8
|
}
|
|
9
9
|
export declare enum GiftCardsActionType {
|
|
10
10
|
PurchaseGiftCards = "giftCards/purchaseGiftCards"
|
|
11
11
|
}
|
|
12
|
-
export declare const purchaseGiftCards: import("@reduxjs/toolkit").AsyncThunk<
|
|
13
|
-
data: Partial<
|
|
12
|
+
export declare const purchaseGiftCards: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
13
|
+
data: Partial<GiftCard>;
|
|
14
14
|
callback?: (() => void) | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
state: AppState;
|
|
@@ -27,6 +27,6 @@ export declare const selectGiftCards: (state: AppState) => {
|
|
|
27
27
|
success: boolean;
|
|
28
28
|
loading: RequestStatus;
|
|
29
29
|
error: RequestError;
|
|
30
|
-
giftCards:
|
|
30
|
+
giftCards: GiftCards;
|
|
31
31
|
};
|
|
32
32
|
export declare const giftCardsReducer: import("redux").Reducer<GiftCardsState, import("redux").AnyAction>;
|
|
@@ -5,8 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const types_1 = require("./types");
|
|
7
7
|
const types_2 = require("@open-tender/types");
|
|
8
|
-
const order_1 = require("./order");
|
|
9
8
|
const utils_1 = require("@open-tender/utils");
|
|
9
|
+
const order_1 = require("./order");
|
|
10
10
|
const customer_1 = require("./customer");
|
|
11
11
|
const initialState = {
|
|
12
12
|
cart: [],
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AnyAction, ThunkDispatch } from '@reduxjs/toolkit';
|
|
2
2
|
import { AppState } from '../../app';
|
|
3
|
-
import { Auth,
|
|
3
|
+
import { Auth, Customer, CustomerCreate, LoginData, RequestError, RequestStatus } from '@open-tender/types';
|
|
4
4
|
export interface AccountState {
|
|
5
5
|
auth: Auth | null;
|
|
6
|
-
profile:
|
|
6
|
+
profile: Customer | null;
|
|
7
7
|
loading: RequestStatus;
|
|
8
8
|
error: any;
|
|
9
9
|
}
|
|
@@ -17,7 +17,7 @@ export declare enum AccountActionType {
|
|
|
17
17
|
DeleteCustomer = "customer/deleteCustomer"
|
|
18
18
|
}
|
|
19
19
|
export declare const checkAuth: (err: RequestError, dispatch: ThunkDispatch<AppState, unknown, AnyAction>, rejectWithValue: () => any) => Promise<any>;
|
|
20
|
-
export declare const fetchCustomer: import("@reduxjs/toolkit").AsyncThunk<
|
|
20
|
+
export declare const fetchCustomer: import("@reduxjs/toolkit").AsyncThunk<Customer, void, {
|
|
21
21
|
state: AppState;
|
|
22
22
|
rejectValue: RequestError;
|
|
23
23
|
dispatch?: import("redux").Dispatch<AnyAction> | undefined;
|
|
@@ -57,9 +57,9 @@ export declare const linkPosToken: import("@reduxjs/toolkit").AsyncThunk<void, s
|
|
|
57
57
|
fulfilledMeta?: unknown;
|
|
58
58
|
rejectedMeta?: unknown;
|
|
59
59
|
}>;
|
|
60
|
-
export declare const updateCustomer: import("@reduxjs/toolkit").AsyncThunk<
|
|
61
|
-
data:
|
|
62
|
-
callback?: ((data:
|
|
60
|
+
export declare const updateCustomer: import("@reduxjs/toolkit").AsyncThunk<Customer, {
|
|
61
|
+
data: CustomerCreate;
|
|
62
|
+
callback?: ((data: CustomerCreate) => void) | undefined;
|
|
63
63
|
}, {
|
|
64
64
|
state: AppState;
|
|
65
65
|
rejectValue: RequestError;
|
|
@@ -108,8 +108,8 @@ export declare const authCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<Au
|
|
|
108
108
|
rejectedMeta?: unknown;
|
|
109
109
|
}>;
|
|
110
110
|
export declare const deleteCustomer: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
111
|
-
data?:
|
|
112
|
-
callback?: ((data?:
|
|
111
|
+
data?: CustomerCreate | undefined;
|
|
112
|
+
callback?: ((data?: CustomerCreate) => void) | undefined;
|
|
113
113
|
}, {
|
|
114
114
|
state: AppState;
|
|
115
115
|
rejectValue: RequestError;
|
|
@@ -2,6 +2,7 @@ import { __awaiter } from "tslib";
|
|
|
2
2
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
3
3
|
import { ReducerType } from '../types';
|
|
4
4
|
import { MISSING_CUSTOMER, MISSING_CUSTOMER_TOKEN } from '@open-tender/types';
|
|
5
|
+
import { makeCustomerProfile, makeFavoritesLookup, makeFormErrors } from '@open-tender/utils';
|
|
5
6
|
import { showNotification } from '../notifications';
|
|
6
7
|
import { resetCustomerAllergens, setCustomerAllergens } from './allergens';
|
|
7
8
|
import { setSelectedAllergens } from '../allergens';
|
|
@@ -17,7 +18,6 @@ import { resetCustomerCommunicationPreferences } from './communicationPreference
|
|
|
17
18
|
import { resetCustomerGiftCards, setCustomerGiftCards } from './giftCards';
|
|
18
19
|
import { resetCustomerLevelUp, setCustomerLevelUp } from './levelup';
|
|
19
20
|
import { addMessage, resetOrder, setAlert } from '../order';
|
|
20
|
-
import { makeCustomerProfile, makeFavoritesLookup, makeFormErrors } from '@open-tender/utils';
|
|
21
21
|
import { resetCheckout, updateCheckoutCustomer } from '../checkout';
|
|
22
22
|
import { resetGroupOrder } from '../groupOrder';
|
|
23
23
|
import { resetGuest } from '../guest';
|
|
@@ -133,17 +133,17 @@ export const linkPosToken = createAsyncThunk(AccountActionType.LinkPosToken, (po
|
|
|
133
133
|
return rejectWithValue(error);
|
|
134
134
|
}
|
|
135
135
|
}));
|
|
136
|
-
export const updateCustomer = createAsyncThunk(AccountActionType.UpdateCustomer, (data, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
136
|
+
export const updateCustomer = createAsyncThunk(AccountActionType.UpdateCustomer, ({ data, callback }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
137
137
|
try {
|
|
138
138
|
const token = selectToken(getState());
|
|
139
139
|
const api = getState().config.api;
|
|
140
140
|
if (!token)
|
|
141
141
|
throw new Error(MISSING_CUSTOMER);
|
|
142
|
-
const customer = yield api.putCustomer(token, data
|
|
142
|
+
const customer = yield api.putCustomer(token, data);
|
|
143
143
|
const profile = makeCustomerProfile(customer);
|
|
144
144
|
dispatch(showNotification('Account updated!'));
|
|
145
|
-
if (
|
|
146
|
-
|
|
145
|
+
if (callback)
|
|
146
|
+
callback(data);
|
|
147
147
|
return profile;
|
|
148
148
|
}
|
|
149
149
|
catch (err) {
|
|
@@ -199,7 +199,7 @@ export const authCustomerThanx = createAsyncThunk(AccountActionType.LoginCustome
|
|
|
199
199
|
return rejectWithValue(err);
|
|
200
200
|
}
|
|
201
201
|
}));
|
|
202
|
-
export const deleteCustomer = createAsyncThunk(AccountActionType.DeleteCustomer, (
|
|
202
|
+
export const deleteCustomer = createAsyncThunk(AccountActionType.DeleteCustomer, ({ data, callback }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
203
203
|
try {
|
|
204
204
|
const token = selectToken(getState());
|
|
205
205
|
const api = getState().config.api;
|
|
@@ -223,8 +223,8 @@ export const deleteCustomer = createAsyncThunk(AccountActionType.DeleteCustomer,
|
|
|
223
223
|
dispatch(resetCustomerCommunicationPreferences());
|
|
224
224
|
dispatch(resetGuest());
|
|
225
225
|
dispatch(showNotification('Account deleted!'));
|
|
226
|
-
if (
|
|
227
|
-
|
|
226
|
+
if (callback)
|
|
227
|
+
callback(data);
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
230
|
catch (err) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppState } from '../../app';
|
|
2
|
-
import { CustomerNotificationPrefs, NotificationArea, NotificationChannel, RequestError, RequestStatus } from '@open-tender/types';
|
|
2
|
+
import { CustomerNotificationPrefs, CustomerNotificationPrefsCreate, NotificationArea, NotificationChannel, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface CustomerCommunicationPrefsState {
|
|
4
4
|
entities: CustomerNotificationPrefs;
|
|
5
5
|
error: RequestError;
|
|
@@ -52,7 +52,7 @@ export declare const removeCustomerCommunicationPreference: import("@reduxjs/too
|
|
|
52
52
|
rejectedMeta?: unknown;
|
|
53
53
|
}>;
|
|
54
54
|
export declare const setCustomerCommunicationDefaultPreferences: import("@reduxjs/toolkit").AsyncThunk<CustomerNotificationPrefs, {
|
|
55
|
-
prefs:
|
|
55
|
+
prefs: CustomerNotificationPrefsCreate;
|
|
56
56
|
callback?: (() => void) | undefined;
|
|
57
57
|
}, {
|
|
58
58
|
state: AppState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppState } from '../../app';
|
|
2
|
-
import {
|
|
2
|
+
import { GiftCard, GiftCardPurchase, GiftCards, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface CustomerGiftCardsState {
|
|
4
|
-
entities:
|
|
4
|
+
entities: GiftCards;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
loading: RequestStatus;
|
|
7
7
|
lookup: {
|
|
@@ -16,7 +16,7 @@ export declare enum CustomerGiftCardsActionType {
|
|
|
16
16
|
AssignCustomerGiftCardOther = "customer/assignCustomerGiftCardOther",
|
|
17
17
|
UpdateCustomerGiftCard = "customer/updateCustomerGiftCard"
|
|
18
18
|
}
|
|
19
|
-
export declare const fetchCustomerGiftCards: import("@reduxjs/toolkit").AsyncThunk<
|
|
19
|
+
export declare const fetchCustomerGiftCards: import("@reduxjs/toolkit").AsyncThunk<GiftCards, void, {
|
|
20
20
|
state: AppState;
|
|
21
21
|
rejectValue: RequestError;
|
|
22
22
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -26,9 +26,9 @@ export declare const fetchCustomerGiftCards: import("@reduxjs/toolkit").AsyncThu
|
|
|
26
26
|
fulfilledMeta?: unknown;
|
|
27
27
|
rejectedMeta?: unknown;
|
|
28
28
|
}>;
|
|
29
|
-
export declare const updateCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<
|
|
29
|
+
export declare const updateCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
30
30
|
giftCardId: number;
|
|
31
|
-
data:
|
|
31
|
+
data: GiftCard;
|
|
32
32
|
callback?: (() => void) | undefined;
|
|
33
33
|
}, {
|
|
34
34
|
state: AppState;
|
|
@@ -40,7 +40,7 @@ export declare const updateCustomerGiftCard: import("@reduxjs/toolkit").AsyncThu
|
|
|
40
40
|
fulfilledMeta?: unknown;
|
|
41
41
|
rejectedMeta?: unknown;
|
|
42
42
|
}>;
|
|
43
|
-
export declare const removeCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<
|
|
43
|
+
export declare const removeCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
44
44
|
giftCardId: number;
|
|
45
45
|
callback?: (() => void) | undefined;
|
|
46
46
|
}, {
|
|
@@ -53,8 +53,8 @@ export declare const removeCustomerGiftCard: import("@reduxjs/toolkit").AsyncThu
|
|
|
53
53
|
fulfilledMeta?: unknown;
|
|
54
54
|
rejectedMeta?: unknown;
|
|
55
55
|
}>;
|
|
56
|
-
export declare const addCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<
|
|
57
|
-
data:
|
|
56
|
+
export declare const addCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
57
|
+
data: GiftCardPurchase;
|
|
58
58
|
callback?: (() => void) | undefined;
|
|
59
59
|
}, {
|
|
60
60
|
state: AppState;
|
|
@@ -66,7 +66,7 @@ export declare const addCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
66
66
|
fulfilledMeta?: unknown;
|
|
67
67
|
rejectedMeta?: unknown;
|
|
68
68
|
}>;
|
|
69
|
-
export declare const assignCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<
|
|
69
|
+
export declare const assignCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
70
70
|
cardNumber: number;
|
|
71
71
|
callback?: (() => void) | undefined;
|
|
72
72
|
}, {
|
|
@@ -79,7 +79,7 @@ export declare const assignCustomerGiftCard: import("@reduxjs/toolkit").AsyncThu
|
|
|
79
79
|
fulfilledMeta?: unknown;
|
|
80
80
|
rejectedMeta?: unknown;
|
|
81
81
|
}>;
|
|
82
|
-
export declare const assignCustomerGiftCardOther: import("@reduxjs/toolkit").AsyncThunk<
|
|
82
|
+
export declare const assignCustomerGiftCardOther: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
83
83
|
giftCardId: number;
|
|
84
84
|
email: string;
|
|
85
85
|
callback?: (() => void) | undefined;
|
|
@@ -32,17 +32,17 @@ export const fetchCustomerGiftCards = createAsyncThunk(CustomerGiftCardsActionTy
|
|
|
32
32
|
return checkAuth(error, dispatch, () => rejectWithValue(error));
|
|
33
33
|
}
|
|
34
34
|
}));
|
|
35
|
-
export const updateCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionType.UpdateCustomerGiftCard, (
|
|
35
|
+
export const updateCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionType.UpdateCustomerGiftCard, ({ giftCardId, data, callback }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
36
|
try {
|
|
37
37
|
const api = getState().config.api;
|
|
38
38
|
const token = selectToken(getState());
|
|
39
39
|
if (!token)
|
|
40
40
|
throw new Error(MISSING_CUSTOMER);
|
|
41
|
-
yield api.putCustomerGiftCard(token,
|
|
41
|
+
yield api.putCustomerGiftCard(token, giftCardId, data);
|
|
42
42
|
const giftCards = yield api.getCustomerGiftCards(token);
|
|
43
43
|
dispatch(showNotification('Gift card balance updated!'));
|
|
44
|
-
if (
|
|
45
|
-
|
|
44
|
+
if (callback)
|
|
45
|
+
callback();
|
|
46
46
|
return giftCards;
|
|
47
47
|
}
|
|
48
48
|
catch (err) {
|
|
@@ -50,17 +50,17 @@ export const updateCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionTy
|
|
|
50
50
|
return checkAuth(error, dispatch, () => rejectWithValue(error));
|
|
51
51
|
}
|
|
52
52
|
}));
|
|
53
|
-
export const removeCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionType.RemoveCustomerGiftCard, (
|
|
53
|
+
export const removeCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionType.RemoveCustomerGiftCard, ({ giftCardId, callback }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
54
|
try {
|
|
55
55
|
const api = getState().config.api;
|
|
56
56
|
const token = selectToken(getState());
|
|
57
57
|
if (!token)
|
|
58
58
|
throw new Error(MISSING_CUSTOMER);
|
|
59
|
-
yield api.deleteCustomerGiftCard(token,
|
|
59
|
+
yield api.deleteCustomerGiftCard(token, giftCardId);
|
|
60
60
|
const giftCards = yield api.getCustomerGiftCards(token);
|
|
61
61
|
dispatch(showNotification('Gift card removed!'));
|
|
62
|
-
if (
|
|
63
|
-
|
|
62
|
+
if (callback)
|
|
63
|
+
callback();
|
|
64
64
|
return giftCards;
|
|
65
65
|
}
|
|
66
66
|
catch (err) {
|
|
@@ -68,17 +68,17 @@ export const removeCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionTy
|
|
|
68
68
|
return checkAuth(error, dispatch, () => rejectWithValue(error));
|
|
69
69
|
}
|
|
70
70
|
}));
|
|
71
|
-
export const addCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionType.AddCustomerGiftCard, (
|
|
71
|
+
export const addCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionType.AddCustomerGiftCard, ({ data, callback }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
72
72
|
try {
|
|
73
73
|
const api = getState().config.api;
|
|
74
74
|
const token = selectToken(getState());
|
|
75
75
|
if (!token)
|
|
76
76
|
throw new Error(MISSING_CUSTOMER);
|
|
77
|
-
yield api.postCustomerGiftCard(token,
|
|
77
|
+
yield api.postCustomerGiftCard(token, data);
|
|
78
78
|
const giftCards = yield api.getCustomerGiftCards(token);
|
|
79
79
|
dispatch(showNotification('Gift card added!'));
|
|
80
|
-
if (
|
|
81
|
-
|
|
80
|
+
if (callback)
|
|
81
|
+
callback();
|
|
82
82
|
return giftCards;
|
|
83
83
|
}
|
|
84
84
|
catch (err) {
|
|
@@ -86,17 +86,17 @@ export const addCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionType.
|
|
|
86
86
|
return checkAuth(error, dispatch, () => rejectWithValue(error));
|
|
87
87
|
}
|
|
88
88
|
}));
|
|
89
|
-
export const assignCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionType.AssignCustomerGiftCard, (
|
|
89
|
+
export const assignCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionType.AssignCustomerGiftCard, ({ cardNumber, callback }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
90
90
|
try {
|
|
91
91
|
const api = getState().config.api;
|
|
92
92
|
const token = selectToken(getState());
|
|
93
93
|
if (!token)
|
|
94
94
|
throw new Error(MISSING_CUSTOMER);
|
|
95
|
-
yield api.postCustomerGiftCardAssign(token,
|
|
95
|
+
yield api.postCustomerGiftCardAssign(token, cardNumber);
|
|
96
96
|
const giftCards = yield api.getCustomerGiftCards(token);
|
|
97
97
|
dispatch(showNotification('Gift card added to your account!'));
|
|
98
|
-
if (
|
|
99
|
-
|
|
98
|
+
if (callback)
|
|
99
|
+
callback();
|
|
100
100
|
return giftCards;
|
|
101
101
|
}
|
|
102
102
|
catch (err) {
|
|
@@ -104,17 +104,17 @@ export const assignCustomerGiftCard = createAsyncThunk(CustomerGiftCardsActionTy
|
|
|
104
104
|
return checkAuth(error, dispatch, () => rejectWithValue(error));
|
|
105
105
|
}
|
|
106
106
|
}));
|
|
107
|
-
export const assignCustomerGiftCardOther = createAsyncThunk(CustomerGiftCardsActionType.AssignCustomerGiftCardOther, (
|
|
107
|
+
export const assignCustomerGiftCardOther = createAsyncThunk(CustomerGiftCardsActionType.AssignCustomerGiftCardOther, ({ giftCardId, email, callback }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
108
108
|
try {
|
|
109
109
|
const api = getState().config.api;
|
|
110
110
|
const token = selectToken(getState());
|
|
111
111
|
if (!token)
|
|
112
112
|
throw new Error(MISSING_CUSTOMER);
|
|
113
|
-
yield api.postCustomerGiftCardAssignOther(token,
|
|
113
|
+
yield api.postCustomerGiftCardAssignOther(token, giftCardId, email);
|
|
114
114
|
const giftCards = yield api.getCustomerGiftCards(token);
|
|
115
|
-
dispatch(showNotification(`Gift card assigned to ${
|
|
116
|
-
if (
|
|
117
|
-
|
|
115
|
+
dispatch(showNotification(`Gift card assigned to ${email}`));
|
|
116
|
+
if (callback)
|
|
117
|
+
callback();
|
|
118
118
|
return giftCards;
|
|
119
119
|
}
|
|
120
120
|
catch (err) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
|
-
import {
|
|
2
|
+
import { GiftCard, GiftCards, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface GiftCardsState {
|
|
4
4
|
loading: RequestStatus;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
success: boolean;
|
|
7
|
-
giftCards:
|
|
7
|
+
giftCards: GiftCards;
|
|
8
8
|
}
|
|
9
9
|
export declare enum GiftCardsActionType {
|
|
10
10
|
PurchaseGiftCards = "giftCards/purchaseGiftCards"
|
|
11
11
|
}
|
|
12
|
-
export declare const purchaseGiftCards: import("@reduxjs/toolkit").AsyncThunk<
|
|
13
|
-
data: Partial<
|
|
12
|
+
export declare const purchaseGiftCards: import("@reduxjs/toolkit").AsyncThunk<GiftCards, {
|
|
13
|
+
data: Partial<GiftCard>;
|
|
14
14
|
callback?: (() => void) | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
state: AppState;
|
|
@@ -27,6 +27,6 @@ export declare const selectGiftCards: (state: AppState) => {
|
|
|
27
27
|
success: boolean;
|
|
28
28
|
loading: RequestStatus;
|
|
29
29
|
error: RequestError;
|
|
30
|
-
giftCards:
|
|
30
|
+
giftCards: GiftCards;
|
|
31
31
|
};
|
|
32
32
|
export declare const giftCardsReducer: import("redux").Reducer<GiftCardsState, import("redux").AnyAction>;
|
|
@@ -2,8 +2,8 @@ import { __awaiter } from "tslib";
|
|
|
2
2
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
3
3
|
import { ReducerType } from './types';
|
|
4
4
|
import { MISSING_CUSTOMER } from '@open-tender/types';
|
|
5
|
-
import { resetOrder, selectTimezone, setCart, setMenuVars } from './order';
|
|
6
5
|
import { isoToDate, makeSimpleCart, rehydrateCart } from '@open-tender/utils';
|
|
6
|
+
import { resetOrder, selectTimezone, setCart, setMenuVars } from './order';
|
|
7
7
|
import { checkAuth, makeCartData, selectToken } from './customer';
|
|
8
8
|
const initialState = {
|
|
9
9
|
cart: [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
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.6",
|
|
53
|
+
"@open-tender/utils": "^0.1.27",
|
|
54
54
|
"@reduxjs/toolkit": "^1.8.5",
|
|
55
55
|
"react": "^18.2.0"
|
|
56
56
|
},
|