@open-tender/cloud 0.0.53 → 0.0.55
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/confirmation.d.ts +1 -1
- package/dist/cjs/slices/confirmation.js +3 -2
- package/dist/cjs/slices/customer/account.d.ts +4 -1
- package/dist/cjs/slices/customer/account.js +2 -2
- package/dist/esm/slices/confirmation.d.ts +1 -1
- package/dist/esm/slices/confirmation.js +1 -1
- package/dist/esm/slices/customer/account.d.ts +4 -1
- package/dist/esm/slices/customer/account.js +2 -2
- package/package.json +2 -2
|
@@ -3,6 +3,6 @@ import { AppState } from '../app';
|
|
|
3
3
|
export interface ConfirmationState {
|
|
4
4
|
order: Order | null;
|
|
5
5
|
}
|
|
6
|
-
export declare const resetConfirmation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
6
|
+
export declare const resetConfirmation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setConfirmationOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
|
|
7
7
|
export declare const selectConfirmationOrder: (state: AppState) => Order | null;
|
|
8
8
|
export declare const confirmationReducer: import("redux").Reducer<ConfirmationState, import("redux").AnyAction>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.confirmationReducer = exports.selectConfirmationOrder = exports.resetConfirmation = void 0;
|
|
4
|
+
exports.confirmationReducer = exports.selectConfirmationOrder = exports.setConfirmationOrder = exports.resetConfirmation = void 0;
|
|
4
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
6
|
const types_1 = require("./types");
|
|
6
7
|
const initialState = {
|
|
@@ -16,7 +17,7 @@ const confirmationSlice = (0, toolkit_1.createSlice)({
|
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
});
|
|
19
|
-
exports.resetConfirmation =
|
|
20
|
+
_a = confirmationSlice.actions, exports.resetConfirmation = _a.resetConfirmation, exports.setConfirmationOrder = _a.setConfirmationOrder;
|
|
20
21
|
const selectConfirmationOrder = (state) => state.confirmation.order;
|
|
21
22
|
exports.selectConfirmationOrder = selectConfirmationOrder;
|
|
22
23
|
exports.confirmationReducer = confirmationSlice.reducer;
|
|
@@ -44,7 +44,10 @@ export declare const sendCustomerVerificationEmail: import("@reduxjs/toolkit").A
|
|
|
44
44
|
state: AppState;
|
|
45
45
|
rejectValue: RequestError;
|
|
46
46
|
}>;
|
|
47
|
-
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<null,
|
|
47
|
+
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<null, {
|
|
48
|
+
email: string;
|
|
49
|
+
origin: any;
|
|
50
|
+
}, {
|
|
48
51
|
state: AppState;
|
|
49
52
|
rejectValue: RequestError;
|
|
50
53
|
}>;
|
|
@@ -175,10 +175,10 @@ exports.sendCustomerVerificationEmail = (0, toolkit_1.createAsyncThunk)(AccountA
|
|
|
175
175
|
return rejectWithValue(err);
|
|
176
176
|
}
|
|
177
177
|
}));
|
|
178
|
-
exports.loginCustomerThanx = (0, toolkit_1.createAsyncThunk)(AccountActionType.LoginCustomer, (
|
|
178
|
+
exports.loginCustomerThanx = (0, toolkit_1.createAsyncThunk)(AccountActionType.LoginCustomer, (requestData, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
179
179
|
try {
|
|
180
180
|
const api = getState().config.api;
|
|
181
|
-
yield api.postThanxLogin(email);
|
|
181
|
+
yield api.postThanxLogin(requestData.email, requestData.origin);
|
|
182
182
|
dispatch((0, order_2.setAlert)({ type: 'close' }));
|
|
183
183
|
dispatch((0, order_2.addMessage)('Thanks! Please check your email on this device.'));
|
|
184
184
|
return null;
|
|
@@ -3,6 +3,6 @@ import { AppState } from '../app';
|
|
|
3
3
|
export interface ConfirmationState {
|
|
4
4
|
order: Order | null;
|
|
5
5
|
}
|
|
6
|
-
export declare const resetConfirmation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
6
|
+
export declare const resetConfirmation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setConfirmationOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
|
|
7
7
|
export declare const selectConfirmationOrder: (state: AppState) => Order | null;
|
|
8
8
|
export declare const confirmationReducer: import("redux").Reducer<ConfirmationState, import("redux").AnyAction>;
|
|
@@ -13,6 +13,6 @@ const confirmationSlice = createSlice({
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
export const { resetConfirmation } = confirmationSlice.actions;
|
|
16
|
+
export const { resetConfirmation, setConfirmationOrder } = confirmationSlice.actions;
|
|
17
17
|
export const selectConfirmationOrder = (state) => state.confirmation.order;
|
|
18
18
|
export const confirmationReducer = confirmationSlice.reducer;
|
|
@@ -44,7 +44,10 @@ export declare const sendCustomerVerificationEmail: import("@reduxjs/toolkit").A
|
|
|
44
44
|
state: AppState;
|
|
45
45
|
rejectValue: RequestError;
|
|
46
46
|
}>;
|
|
47
|
-
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<null,
|
|
47
|
+
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<null, {
|
|
48
|
+
email: string;
|
|
49
|
+
origin: any;
|
|
50
|
+
}, {
|
|
48
51
|
state: AppState;
|
|
49
52
|
rejectValue: RequestError;
|
|
50
53
|
}>;
|
|
@@ -170,10 +170,10 @@ export const sendCustomerVerificationEmail = createAsyncThunk(AccountActionType.
|
|
|
170
170
|
return rejectWithValue(err);
|
|
171
171
|
}
|
|
172
172
|
}));
|
|
173
|
-
export const loginCustomerThanx = createAsyncThunk(AccountActionType.LoginCustomer, (
|
|
173
|
+
export const loginCustomerThanx = createAsyncThunk(AccountActionType.LoginCustomer, (requestData, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
174
174
|
try {
|
|
175
175
|
const api = getState().config.api;
|
|
176
|
-
yield api.postThanxLogin(email);
|
|
176
|
+
yield api.postThanxLogin(requestData.email, requestData.origin);
|
|
177
177
|
dispatch(setAlert({ type: 'close' }));
|
|
178
178
|
dispatch(addMessage('Thanks! Please check your email on this device.'));
|
|
179
179
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.55",
|
|
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",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react": "^18.2.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@open-tender/types": "^0.0.
|
|
58
|
+
"@open-tender/types": "^0.0.89",
|
|
59
59
|
"@open-tender/utils": "^0.0.23"
|
|
60
60
|
}
|
|
61
61
|
}
|