@orderingstack/ordering-types 1.0.17 → 1.0.19

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.
@@ -70,6 +70,16 @@ export interface IProductAvailability {
70
70
  SAT?: [string, string];
71
71
  SUN?: [string, string];
72
72
  }
73
+ /**
74
+ * IProductExtra interface
75
+ *
76
+ * @interface IProductExtra
77
+ * @related {string} comma separated related products IDs
78
+ */
79
+ export interface IProductExtra extends Partial<Record<string, string>> {
80
+ related?: string;
81
+ category?: string;
82
+ }
73
83
  export interface IProduct {
74
84
  availability?: IProductAvailability;
75
85
  id: string;
@@ -93,7 +103,7 @@ export interface IProduct {
93
103
  emit?: IProductEmit;
94
104
  qtyMin?: string;
95
105
  qtyMax?: string;
96
- _?: Record<string, string>;
106
+ _?: IProductExtra;
97
107
  bom?: Record<string, {
98
108
  unit: string;
99
109
  qty: string;
@@ -314,7 +324,7 @@ export interface ITaxSummary {
314
324
  * @x-agg-id {string} order ID from aggregator
315
325
  * @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
316
326
  */
317
- export interface IOrderExtra {
327
+ export interface IOrderExtra extends Partial<Record<string, string>> {
318
328
  "x-source"?: OrderSource;
319
329
  "x-source-type"?: "INTEGRATOR";
320
330
  "manual-verify"?: string;
@@ -328,6 +338,7 @@ export interface IOrderExtra {
328
338
  "x-agg-id"?: string;
329
339
  "support-order-id"?: string;
330
340
  "x-pos-id"?: string;
341
+ "company-tax-id"?: string;
331
342
  }
332
343
  export interface IOrderLog {
333
344
  timestamp?: string;
@@ -89,6 +89,13 @@ export interface IMenuBottomNavProps {
89
89
  fallbackImg?: string;
90
90
  changeQuantity: (line: IOrderLine, quantity: number) => void;
91
91
  }
92
+ export interface IMenuUpsizeProps {
93
+ show: boolean;
94
+ onClose: () => void;
95
+ products?: IProduct[];
96
+ onProductClicked: (prod: IProduct) => void;
97
+ currency: string;
98
+ }
92
99
  export interface IMenuComponents {
93
100
  TopNav?: React.FC<IMenuTopNavProps>;
94
101
  BottomNav?: React.FC<IMenuBottomNavProps>;
@@ -96,6 +103,7 @@ export interface IMenuComponents {
96
103
  CategorySection?: React.FC<IMenuCategorySectionProps>;
97
104
  Header?: ReactElement;
98
105
  Logo?: ReactElement;
106
+ Upsize?: React.FC<IMenuUpsizeProps>;
99
107
  }
100
108
  export interface IProductConfiguratorProps {
101
109
  product: IProduct;
@@ -70,6 +70,16 @@ export interface IProductAvailability {
70
70
  SAT?: [string, string];
71
71
  SUN?: [string, string];
72
72
  }
73
+ /**
74
+ * IProductExtra interface
75
+ *
76
+ * @interface IProductExtra
77
+ * @related {string} comma separated related products IDs
78
+ */
79
+ export interface IProductExtra extends Partial<Record<string, string>> {
80
+ related?: string;
81
+ category?: string;
82
+ }
73
83
  export interface IProduct {
74
84
  availability?: IProductAvailability;
75
85
  id: string;
@@ -93,7 +103,7 @@ export interface IProduct {
93
103
  emit?: IProductEmit;
94
104
  qtyMin?: string;
95
105
  qtyMax?: string;
96
- _?: Record<string, string>;
106
+ _?: IProductExtra;
97
107
  bom?: Record<string, {
98
108
  unit: string;
99
109
  qty: string;
@@ -314,7 +324,7 @@ export interface ITaxSummary {
314
324
  * @x-agg-id {string} order ID from aggregator
315
325
  * @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
316
326
  */
317
- export interface IOrderExtra {
327
+ export interface IOrderExtra extends Partial<Record<string, string>> {
318
328
  "x-source"?: OrderSource;
319
329
  "x-source-type"?: "INTEGRATOR";
320
330
  "manual-verify"?: string;
@@ -328,6 +338,7 @@ export interface IOrderExtra {
328
338
  "x-agg-id"?: string;
329
339
  "support-order-id"?: string;
330
340
  "x-pos-id"?: string;
341
+ "company-tax-id"?: string;
331
342
  }
332
343
  export interface IOrderLog {
333
344
  timestamp?: string;
@@ -89,6 +89,13 @@ export interface IMenuBottomNavProps {
89
89
  fallbackImg?: string;
90
90
  changeQuantity: (line: IOrderLine, quantity: number) => void;
91
91
  }
92
+ export interface IMenuUpsizeProps {
93
+ show: boolean;
94
+ onClose: () => void;
95
+ products?: IProduct[];
96
+ onProductClicked: (prod: IProduct) => void;
97
+ currency: string;
98
+ }
92
99
  export interface IMenuComponents {
93
100
  TopNav?: React.FC<IMenuTopNavProps>;
94
101
  BottomNav?: React.FC<IMenuBottomNavProps>;
@@ -96,6 +103,7 @@ export interface IMenuComponents {
96
103
  CategorySection?: React.FC<IMenuCategorySectionProps>;
97
104
  Header?: ReactElement;
98
105
  Logo?: ReactElement;
106
+ Upsize?: React.FC<IMenuUpsizeProps>;
99
107
  }
100
108
  export interface IProductConfiguratorProps {
101
109
  product: IProduct;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",