@open-tender/cloud 0.1.19 → 0.1.20
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,7 +1,7 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
2
|
import { OrderFulfillment, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface OrderFulfillmentState {
|
|
4
|
-
orderFulfillment:
|
|
4
|
+
orderFulfillment: OrderFulfillment | null;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
loading: RequestStatus;
|
|
7
7
|
}
|
|
@@ -19,9 +19,9 @@ export declare const fetchOrderFulfillment: import("@reduxjs/toolkit").AsyncThun
|
|
|
19
19
|
fulfilledMeta?: unknown;
|
|
20
20
|
rejectedMeta?: unknown;
|
|
21
21
|
}>;
|
|
22
|
-
export declare const updateOrderFulfillment: import("@reduxjs/toolkit").AsyncThunk<
|
|
22
|
+
export declare const updateOrderFulfillment: import("@reduxjs/toolkit").AsyncThunk<OrderFulfillment, {
|
|
23
23
|
orderId: number;
|
|
24
|
-
data:
|
|
24
|
+
data: OrderFulfillment;
|
|
25
25
|
}, {
|
|
26
26
|
state: AppState;
|
|
27
27
|
rejectValue: RequestError;
|
|
@@ -34,7 +34,7 @@ export declare const updateOrderFulfillment: import("@reduxjs/toolkit").AsyncThu
|
|
|
34
34
|
}>;
|
|
35
35
|
export declare const resetOrderFulfillment: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"orderFulfillment/resetOrderFulfillment">;
|
|
36
36
|
export declare const selectOrderFulfillment: (state: AppState) => {
|
|
37
|
-
orderFulfillment:
|
|
37
|
+
orderFulfillment: OrderFulfillment | null;
|
|
38
38
|
loading: RequestStatus;
|
|
39
39
|
error: RequestError;
|
|
40
40
|
};
|
|
@@ -26,13 +26,12 @@ exports.fetchOrderFulfillment = (0, toolkit_1.createAsyncThunk)(OrderFulfillment
|
|
|
26
26
|
return rejectWithValue(err);
|
|
27
27
|
}
|
|
28
28
|
}));
|
|
29
|
-
exports.updateOrderFulfillment = (0, toolkit_1.createAsyncThunk)(OrderFulfillmentActionType.UpdateOrderFulfillment, (
|
|
29
|
+
exports.updateOrderFulfillment = (0, toolkit_1.createAsyncThunk)(OrderFulfillmentActionType.UpdateOrderFulfillment, ({ orderId, data }, { getState, rejectWithValue }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
30
30
|
const { api } = getState().config;
|
|
31
31
|
if (!api)
|
|
32
32
|
return;
|
|
33
33
|
try {
|
|
34
|
-
|
|
35
|
-
return response;
|
|
34
|
+
return yield api.putOrderFulfillment(orderId, data);
|
|
36
35
|
}
|
|
37
36
|
catch (err) {
|
|
38
37
|
return rejectWithValue(err);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
2
|
import { OrderFulfillment, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface OrderFulfillmentState {
|
|
4
|
-
orderFulfillment:
|
|
4
|
+
orderFulfillment: OrderFulfillment | null;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
loading: RequestStatus;
|
|
7
7
|
}
|
|
@@ -19,9 +19,9 @@ export declare const fetchOrderFulfillment: import("@reduxjs/toolkit").AsyncThun
|
|
|
19
19
|
fulfilledMeta?: unknown;
|
|
20
20
|
rejectedMeta?: unknown;
|
|
21
21
|
}>;
|
|
22
|
-
export declare const updateOrderFulfillment: import("@reduxjs/toolkit").AsyncThunk<
|
|
22
|
+
export declare const updateOrderFulfillment: import("@reduxjs/toolkit").AsyncThunk<OrderFulfillment, {
|
|
23
23
|
orderId: number;
|
|
24
|
-
data:
|
|
24
|
+
data: OrderFulfillment;
|
|
25
25
|
}, {
|
|
26
26
|
state: AppState;
|
|
27
27
|
rejectValue: RequestError;
|
|
@@ -34,7 +34,7 @@ export declare const updateOrderFulfillment: import("@reduxjs/toolkit").AsyncThu
|
|
|
34
34
|
}>;
|
|
35
35
|
export declare const resetOrderFulfillment: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"orderFulfillment/resetOrderFulfillment">;
|
|
36
36
|
export declare const selectOrderFulfillment: (state: AppState) => {
|
|
37
|
-
orderFulfillment:
|
|
37
|
+
orderFulfillment: OrderFulfillment | null;
|
|
38
38
|
loading: RequestStatus;
|
|
39
39
|
error: RequestError;
|
|
40
40
|
};
|
|
@@ -23,13 +23,12 @@ export const fetchOrderFulfillment = createAsyncThunk(OrderFulfillmentActionType
|
|
|
23
23
|
return rejectWithValue(err);
|
|
24
24
|
}
|
|
25
25
|
}));
|
|
26
|
-
export const updateOrderFulfillment = createAsyncThunk(OrderFulfillmentActionType.UpdateOrderFulfillment, (
|
|
26
|
+
export const updateOrderFulfillment = createAsyncThunk(OrderFulfillmentActionType.UpdateOrderFulfillment, ({ orderId, data }, { getState, rejectWithValue }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
27
|
const { api } = getState().config;
|
|
28
28
|
if (!api)
|
|
29
29
|
return;
|
|
30
30
|
try {
|
|
31
|
-
|
|
32
|
-
return response;
|
|
31
|
+
return yield api.putOrderFulfillment(orderId, data);
|
|
33
32
|
}
|
|
34
33
|
catch (err) {
|
|
35
34
|
return rejectWithValue(err);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
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",
|