@open-tender/cloud 0.1.58 → 0.1.59
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/.DS_Store +0 -0
- package/dist/cjs/services/api.d.ts +2 -2
- package/dist/cjs/services/api.js +6 -4
- package/dist/cjs/slices/customer/account.d.ts +1 -0
- package/dist/cjs/slices/customer/account.js +2 -2
- package/dist/cjs/slices/guest.d.ts +1 -0
- package/dist/cjs/slices/guest.js +1 -1
- package/dist/esm/services/api.d.ts +2 -2
- package/dist/esm/services/api.js +6 -4
- package/dist/esm/slices/customer/account.d.ts +1 -0
- package/dist/esm/slices/customer/account.js +2 -2
- package/dist/esm/slices/guest.d.ts +1 -0
- package/dist/esm/slices/guest.js +1 -1
- package/package.json +1 -1
package/dist/.DS_Store
CHANGED
|
Binary file
|
|
@@ -104,8 +104,8 @@ declare class OpenTenderAPI {
|
|
|
104
104
|
postSubscriber(email: string): Promise<unknown>;
|
|
105
105
|
postSignUp(data: CustomerCreate): Promise<Customer | null | undefined>;
|
|
106
106
|
postLevelUp(data: any): Promise<unknown>;
|
|
107
|
-
postThanxLogin(email: string): Promise<unknown>;
|
|
108
|
-
postThanxAuth(code: string, path: string): Promise<unknown>;
|
|
107
|
+
postThanxLogin(email: string, origin?: string): Promise<unknown>;
|
|
108
|
+
postThanxAuth(code: string, path: string, origin?: string): Promise<unknown>;
|
|
109
109
|
postLogin(email: string, password: string): Promise<unknown>;
|
|
110
110
|
postLogout(token: string): Promise<unknown>;
|
|
111
111
|
postSendPasswordResetEmail(email: string, link_url: string): Promise<unknown>;
|
package/dist/cjs/services/api.js
CHANGED
|
@@ -504,12 +504,14 @@ class OpenTenderAPI {
|
|
|
504
504
|
postLevelUp(data) {
|
|
505
505
|
return this.request(`/levelup`, 'POST', data);
|
|
506
506
|
}
|
|
507
|
-
postThanxLogin(email) {
|
|
508
|
-
|
|
507
|
+
postThanxLogin(email, origin) {
|
|
508
|
+
const data = origin ? { email, origin } : { email };
|
|
509
|
+
return this.request('/thanx-login', 'POST', data);
|
|
509
510
|
}
|
|
510
|
-
postThanxAuth(code, path) {
|
|
511
|
+
postThanxAuth(code, path, origin) {
|
|
511
512
|
const data = path ? { code, path } : { code };
|
|
512
|
-
|
|
513
|
+
const withOrigin = origin ? Object.assign(Object.assign({}, data), { origin }) : data;
|
|
514
|
+
return this.request('/thanx-auth', 'POST', withOrigin);
|
|
513
515
|
}
|
|
514
516
|
postLogin(email, password) {
|
|
515
517
|
const data = {
|
|
@@ -82,6 +82,7 @@ export declare const sendCustomerVerificationEmail: import("@reduxjs/toolkit").A
|
|
|
82
82
|
}>;
|
|
83
83
|
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<null, {
|
|
84
84
|
email: string;
|
|
85
|
+
origin?: string | undefined;
|
|
85
86
|
}, {
|
|
86
87
|
state: AppState;
|
|
87
88
|
rejectValue: RequestError;
|
|
@@ -171,10 +171,10 @@ exports.sendCustomerVerificationEmail = (0, toolkit_1.createAsyncThunk)(AccountA
|
|
|
171
171
|
return rejectWithValue(err);
|
|
172
172
|
}
|
|
173
173
|
}));
|
|
174
|
-
exports.loginCustomerThanx = (0, toolkit_1.createAsyncThunk)(AccountActionType.LoginCustomer, ({ email }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
174
|
+
exports.loginCustomerThanx = (0, toolkit_1.createAsyncThunk)(AccountActionType.LoginCustomer, ({ email, origin }, { dispatch, getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
175
175
|
try {
|
|
176
176
|
const api = getState().config.api;
|
|
177
|
-
yield api.postThanxLogin(email);
|
|
177
|
+
yield api.postThanxLogin(email, origin);
|
|
178
178
|
dispatch((0, order_2.setAlert)({ type: 'close' }));
|
|
179
179
|
dispatch((0, order_2.addMessage)('Thanks! Please check your email on this device.'));
|
|
180
180
|
return null;
|
package/dist/cjs/slices/guest.js
CHANGED
|
@@ -104,8 +104,8 @@ declare class OpenTenderAPI {
|
|
|
104
104
|
postSubscriber(email: string): Promise<unknown>;
|
|
105
105
|
postSignUp(data: CustomerCreate): Promise<Customer | null | undefined>;
|
|
106
106
|
postLevelUp(data: any): Promise<unknown>;
|
|
107
|
-
postThanxLogin(email: string): Promise<unknown>;
|
|
108
|
-
postThanxAuth(code: string, path: string): Promise<unknown>;
|
|
107
|
+
postThanxLogin(email: string, origin?: string): Promise<unknown>;
|
|
108
|
+
postThanxAuth(code: string, path: string, origin?: string): Promise<unknown>;
|
|
109
109
|
postLogin(email: string, password: string): Promise<unknown>;
|
|
110
110
|
postLogout(token: string): Promise<unknown>;
|
|
111
111
|
postSendPasswordResetEmail(email: string, link_url: string): Promise<unknown>;
|
package/dist/esm/services/api.js
CHANGED
|
@@ -502,12 +502,14 @@ class OpenTenderAPI {
|
|
|
502
502
|
postLevelUp(data) {
|
|
503
503
|
return this.request(`/levelup`, 'POST', data);
|
|
504
504
|
}
|
|
505
|
-
postThanxLogin(email) {
|
|
506
|
-
|
|
505
|
+
postThanxLogin(email, origin) {
|
|
506
|
+
const data = origin ? { email, origin } : { email };
|
|
507
|
+
return this.request('/thanx-login', 'POST', data);
|
|
507
508
|
}
|
|
508
|
-
postThanxAuth(code, path) {
|
|
509
|
+
postThanxAuth(code, path, origin) {
|
|
509
510
|
const data = path ? { code, path } : { code };
|
|
510
|
-
|
|
511
|
+
const withOrigin = origin ? Object.assign(Object.assign({}, data), { origin }) : data;
|
|
512
|
+
return this.request('/thanx-auth', 'POST', withOrigin);
|
|
511
513
|
}
|
|
512
514
|
postLogin(email, password) {
|
|
513
515
|
const data = {
|
|
@@ -82,6 +82,7 @@ export declare const sendCustomerVerificationEmail: import("@reduxjs/toolkit").A
|
|
|
82
82
|
}>;
|
|
83
83
|
export declare const loginCustomerThanx: import("@reduxjs/toolkit").AsyncThunk<null, {
|
|
84
84
|
email: string;
|
|
85
|
+
origin?: string | undefined;
|
|
85
86
|
}, {
|
|
86
87
|
state: AppState;
|
|
87
88
|
rejectValue: RequestError;
|
|
@@ -166,10 +166,10 @@ export const sendCustomerVerificationEmail = createAsyncThunk(AccountActionType.
|
|
|
166
166
|
return rejectWithValue(err);
|
|
167
167
|
}
|
|
168
168
|
}));
|
|
169
|
-
export const loginCustomerThanx = createAsyncThunk(AccountActionType.LoginCustomer, ({ email }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
169
|
+
export const loginCustomerThanx = createAsyncThunk(AccountActionType.LoginCustomer, ({ email, origin }, { dispatch, getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
170
170
|
try {
|
|
171
171
|
const api = getState().config.api;
|
|
172
|
-
yield api.postThanxLogin(email);
|
|
172
|
+
yield api.postThanxLogin(email, origin);
|
|
173
173
|
dispatch(setAlert({ type: 'close' }));
|
|
174
174
|
dispatch(addMessage('Thanks! Please check your email on this device.'));
|
|
175
175
|
return null;
|
package/dist/esm/slices/guest.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.59",
|
|
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",
|