@open-tender/cloud 0.1.84 → 0.1.85
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch } from '@reduxjs/toolkit';
|
|
2
|
-
import { CheckoutCheck, CheckoutErrorMessages, CheckoutForm, Order, OrderCreate, RequestStatus } from '@open-tender/types';
|
|
2
|
+
import { CheckoutCheck, CheckoutErrorMessages, CheckoutForm, Order, OrderCreate, RecordInterface, RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { AppState } from '../app';
|
|
4
4
|
export interface CheckoutState {
|
|
5
5
|
check: CheckoutCheck | null;
|
|
@@ -21,7 +21,7 @@ export declare const validateOrder: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
21
21
|
errors: any;
|
|
22
22
|
}, OrderCreate | null | undefined, {
|
|
23
23
|
state: AppState;
|
|
24
|
-
rejectValue:
|
|
24
|
+
rejectValue: RecordInterface;
|
|
25
25
|
dispatch?: Dispatch<import("redux").AnyAction> | undefined;
|
|
26
26
|
extra?: unknown;
|
|
27
27
|
serializedErrorType?: unknown;
|
|
@@ -137,7 +137,7 @@ exports.validateOrder = (0, toolkit_1.createAsyncThunk)(CheckoutActionType.Fetch
|
|
|
137
137
|
return { check, errors };
|
|
138
138
|
}
|
|
139
139
|
catch (err) {
|
|
140
|
-
const errors = (0, utils_1.
|
|
140
|
+
const errors = (0, utils_1.makeFormErrorsNested)(err);
|
|
141
141
|
return rejectWithValue(errors);
|
|
142
142
|
}
|
|
143
143
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch } from '@reduxjs/toolkit';
|
|
2
|
-
import { CheckoutCheck, CheckoutErrorMessages, CheckoutForm, Order, OrderCreate, RequestStatus } from '@open-tender/types';
|
|
2
|
+
import { CheckoutCheck, CheckoutErrorMessages, CheckoutForm, Order, OrderCreate, RecordInterface, RequestStatus } from '@open-tender/types';
|
|
3
3
|
import { AppState } from '../app';
|
|
4
4
|
export interface CheckoutState {
|
|
5
5
|
check: CheckoutCheck | null;
|
|
@@ -21,7 +21,7 @@ export declare const validateOrder: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
21
21
|
errors: any;
|
|
22
22
|
}, OrderCreate | null | undefined, {
|
|
23
23
|
state: AppState;
|
|
24
|
-
rejectValue:
|
|
24
|
+
rejectValue: RecordInterface;
|
|
25
25
|
dispatch?: Dispatch<import("redux").AnyAction> | undefined;
|
|
26
26
|
extra?: unknown;
|
|
27
27
|
serializedErrorType?: unknown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
3
|
-
import { contains, handleCheckoutError, isEmpty, isString, makeCheckError, prepareOrder } from '@open-tender/utils';
|
|
3
|
+
import { contains, handleCheckoutError, isEmpty, isString, makeCheckError, makeFormErrorsNested, prepareOrder } from '@open-tender/utils';
|
|
4
4
|
import { ReducerType } from './types';
|
|
5
5
|
import { loginCustomer, selectToken } from './customer';
|
|
6
6
|
import { fetchMenu } from './menu';
|
|
@@ -133,7 +133,7 @@ export const validateOrder = createAsyncThunk(CheckoutActionType.FetchCheckout,
|
|
|
133
133
|
return { check, errors };
|
|
134
134
|
}
|
|
135
135
|
catch (err) {
|
|
136
|
-
const errors =
|
|
136
|
+
const errors = makeFormErrorsNested(err);
|
|
137
137
|
return rejectWithValue(errors);
|
|
138
138
|
}
|
|
139
139
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.85",
|
|
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,12 +49,9 @@
|
|
|
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.78",
|
|
53
|
+
"@open-tender/utils": "^0.1.144",
|
|
54
54
|
"@reduxjs/toolkit": "^1.8.5",
|
|
55
55
|
"react": "^18.2.0"
|
|
56
|
-
},
|
|
57
|
-
"dependencies": {
|
|
58
|
-
"@open-tender/types": "^0.2.77"
|
|
59
56
|
}
|
|
60
57
|
}
|