@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.
@@ -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: RequestError, asMessages?: boolean) => {};
14
+ export declare const handleCheckoutErrors: (errors: any, asMessages?: boolean) => any;
15
15
  export declare const errMessages: {
16
16
  unknown: string;
17
17
  forbidden: string;
@@ -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: RequestError, asMessages?: boolean) => {};
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
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",