@open-tender/utils 0.0.3 → 0.0.5
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.d.ts
CHANGED
|
@@ -418,5 +418,5 @@ export declare const validateCart: (cart: OrderCart, categories: MenuCategories,
|
|
|
418
418
|
} | null;
|
|
419
419
|
};
|
|
420
420
|
export declare const getDefaultTip: (config: CheckoutConfig) => string | null;
|
|
421
|
-
export declare const prepareOrder: (data: UnpreparedOrderData) => Partial<Order>;
|
|
421
|
+
export declare const prepareOrder: (data: Partial<UnpreparedOrderData>) => Partial<Order>;
|
|
422
422
|
export declare const checkAmountRemaining: (total: Money, tenders: Array<Tender>) => number;
|
|
@@ -11,7 +11,7 @@ export declare const handleRespError: (err: RequestError) => {
|
|
|
11
11
|
export declare const processError: (msg: string | null) => string;
|
|
12
12
|
export declare const handleFormErrors: (params: Record<string, string | null>) => Record<string, string>;
|
|
13
13
|
export declare const makeFormErrors: (error: RequestError) => Record<string, string>;
|
|
14
|
-
export declare const handleCheckoutErrors: (errors:
|
|
14
|
+
export declare const handleCheckoutErrors: (errors: any, asMessages?: boolean) => any;
|
|
15
15
|
export declare const errMessages: {
|
|
16
16
|
unknown: string;
|
|
17
17
|
forbidden: string;
|
package/dist/esm/utils/cart.d.ts
CHANGED
|
@@ -418,5 +418,5 @@ export declare const validateCart: (cart: OrderCart, categories: MenuCategories,
|
|
|
418
418
|
} | null;
|
|
419
419
|
};
|
|
420
420
|
export declare const getDefaultTip: (config: CheckoutConfig) => string | null;
|
|
421
|
-
export declare const prepareOrder: (data: UnpreparedOrderData) => Partial<Order>;
|
|
421
|
+
export declare const prepareOrder: (data: Partial<UnpreparedOrderData>) => Partial<Order>;
|
|
422
422
|
export declare const checkAmountRemaining: (total: Money, tenders: Array<Tender>) => number;
|
|
@@ -11,7 +11,7 @@ export declare const handleRespError: (err: RequestError) => {
|
|
|
11
11
|
export declare const processError: (msg: string | null) => string;
|
|
12
12
|
export declare const handleFormErrors: (params: Record<string, string | null>) => Record<string, string>;
|
|
13
13
|
export declare const makeFormErrors: (error: RequestError) => Record<string, string>;
|
|
14
|
-
export declare const handleCheckoutErrors: (errors:
|
|
14
|
+
export declare const handleCheckoutErrors: (errors: any, asMessages?: boolean) => any;
|
|
15
15
|
export declare const errMessages: {
|
|
16
16
|
unknown: string;
|
|
17
17
|
forbidden: string;
|
package/package.json
CHANGED