@open-tender/utils 0.1.173 → 0.1.175
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/utils/cart.js
CHANGED
|
@@ -806,6 +806,8 @@ const prepareOrder = (data) => {
|
|
|
806
806
|
order.surcharges = data.surcharges;
|
|
807
807
|
if (data.discounts)
|
|
808
808
|
order.discounts = data.discounts;
|
|
809
|
+
if (data.discountsInternal)
|
|
810
|
+
order.discounts_internal = data.discountsInternal;
|
|
809
811
|
if (data.promoCodes)
|
|
810
812
|
order.promo_codes = data.promoCodes;
|
|
811
813
|
if (data.points)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckoutError,
|
|
1
|
+
import { CheckoutError, CheckoutErrorParams, CheckoutErrorMessages, RequestError } from '@open-tender/types';
|
|
2
2
|
export declare const handleRespError: (err: RequestError) => {
|
|
3
3
|
title: string;
|
|
4
4
|
detail: string | undefined;
|
|
@@ -9,8 +9,8 @@ export declare const handleRespError: (err: RequestError) => {
|
|
|
9
9
|
err: RequestError;
|
|
10
10
|
};
|
|
11
11
|
export declare const processError: (msg: string | null) => string;
|
|
12
|
-
export declare const handleFormErrorsNested: (params: Record<string, string | null>) =>
|
|
13
|
-
export declare const makeFormErrorsNested: (error: RequestError) =>
|
|
12
|
+
export declare const handleFormErrorsNested: (params: Record<string, string | null>) => CheckoutErrorMessages;
|
|
13
|
+
export declare const makeFormErrorsNested: (error: RequestError) => CheckoutErrorMessages;
|
|
14
14
|
export declare const handleFormErrors: (params: Record<string, string | null>) => Record<string, string>;
|
|
15
15
|
export declare const makeFormErrors: (error: RequestError) => Record<string, string>;
|
|
16
16
|
export declare const handleCheckoutError: (error: CheckoutError) => CheckoutErrorMessages;
|
package/dist/esm/utils/cart.js
CHANGED
|
@@ -771,6 +771,8 @@ export const prepareOrder = (data) => {
|
|
|
771
771
|
order.surcharges = data.surcharges;
|
|
772
772
|
if (data.discounts)
|
|
773
773
|
order.discounts = data.discounts;
|
|
774
|
+
if (data.discountsInternal)
|
|
775
|
+
order.discounts_internal = data.discountsInternal;
|
|
774
776
|
if (data.promoCodes)
|
|
775
777
|
order.promo_codes = data.promoCodes;
|
|
776
778
|
if (data.points)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckoutError,
|
|
1
|
+
import { CheckoutError, CheckoutErrorParams, CheckoutErrorMessages, RequestError } from '@open-tender/types';
|
|
2
2
|
export declare const handleRespError: (err: RequestError) => {
|
|
3
3
|
title: string;
|
|
4
4
|
detail: string | undefined;
|
|
@@ -9,8 +9,8 @@ export declare const handleRespError: (err: RequestError) => {
|
|
|
9
9
|
err: RequestError;
|
|
10
10
|
};
|
|
11
11
|
export declare const processError: (msg: string | null) => string;
|
|
12
|
-
export declare const handleFormErrorsNested: (params: Record<string, string | null>) =>
|
|
13
|
-
export declare const makeFormErrorsNested: (error: RequestError) =>
|
|
12
|
+
export declare const handleFormErrorsNested: (params: Record<string, string | null>) => CheckoutErrorMessages;
|
|
13
|
+
export declare const makeFormErrorsNested: (error: RequestError) => CheckoutErrorMessages;
|
|
14
14
|
export declare const handleFormErrors: (params: Record<string, string | null>) => Record<string, string>;
|
|
15
15
|
export declare const makeFormErrors: (error: RequestError) => Record<string, string>;
|
|
16
16
|
export declare const handleCheckoutError: (error: CheckoutError) => CheckoutErrorMessages;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.175",
|
|
4
4
|
"description": "A library of utils 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",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"typescript": "^4.8.2"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@open-tender/types": "^0.2.
|
|
57
|
+
"@open-tender/types": "^0.2.115",
|
|
58
58
|
"@reduxjs/toolkit": "^1.8.5",
|
|
59
59
|
"react": "^18.2.0"
|
|
60
60
|
},
|