@orderingstack/ordering-types 1.8.5 → 1.8.6

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.
@@ -58,7 +58,7 @@ export type TLiterals = {
58
58
  fiscal?: string;
59
59
  "target-product-id"?: string;
60
60
  description?: string;
61
- } & Record<string, string>;
61
+ } & IStringKeyRecord<string | undefined>;
62
62
  export type TMedia = {
63
63
  url: string;
64
64
  name: string;
@@ -78,7 +78,7 @@ export interface IProductAvailability {
78
78
  * @interface IProductExtra
79
79
  * @related {string} comma separated related products IDs
80
80
  */
81
- export interface IProductExtra extends Partial<Record<string, string>> {
81
+ export interface IProductExtra extends IStringKeyRecord<string | undefined> {
82
82
  related?: string;
83
83
  category?: string;
84
84
  }
@@ -115,11 +115,11 @@ export interface IProduct {
115
115
  qtyMin?: string;
116
116
  qtyMax?: string;
117
117
  _?: IProductExtra;
118
- bom?: Record<string, {
118
+ bom?: IStringKeyRecord<{
119
119
  unit: string;
120
120
  qty: string;
121
121
  }>;
122
- attrs?: Record<string, string | boolean>;
122
+ attrs?: IStringKeyRecord<string | boolean>;
123
123
  __?: IProductFrontAttributes;
124
124
  }
125
125
  export interface IProductState {
@@ -148,7 +148,7 @@ export interface IUser {
148
148
  name?: string;
149
149
  phone?: string;
150
150
  email?: string;
151
- extra?: Record<string, string>;
151
+ extra?: IStringKeyRecord<string>;
152
152
  }
153
153
  export declare enum EOrderType {
154
154
  TAKE_AWAY = "TAKE_AWAY",
@@ -249,7 +249,7 @@ export interface IOrderComment {
249
249
  creator: string;
250
250
  timestamp?: string;
251
251
  comment: string;
252
- extra?: Record<string, string>;
252
+ extra?: IStringKeyRecord<string>;
253
253
  }
254
254
  export interface IOrderInBucket {
255
255
  venue: string;
@@ -261,7 +261,7 @@ export interface IOrderInBucket {
261
261
  priceList?: string;
262
262
  warehouse?: string;
263
263
  queuePos?: string;
264
- extra?: Record<string, string>;
264
+ extra?: IStringKeyRecord<string>;
265
265
  }
266
266
  export interface IOrderPayment {
267
267
  id: string;
@@ -271,7 +271,7 @@ export interface IOrderPayment {
271
271
  initialAmount?: number;
272
272
  user: string;
273
273
  timestamp?: string;
274
- extra?: Record<string, string>;
274
+ extra?: IStringKeyRecord<string>;
275
275
  }
276
276
  export declare enum EOrderPaymentType {
277
277
  CASH = "CASH",
@@ -325,7 +325,7 @@ export interface ITaxSummary {
325
325
  * @x-agg-id {string} order ID from aggregator
326
326
  * @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
327
327
  */
328
- export interface IOrderExtra extends Partial<Record<string, string>> {
328
+ export interface IOrderExtra extends IStringKeyRecord<string | undefined> {
329
329
  "x-source"?: EOrderSource;
330
330
  "x-source-type"?: "INTEGRATOR";
331
331
  "manual-verify"?: string;
@@ -340,6 +340,10 @@ export interface IOrderExtra extends Partial<Record<string, string>> {
340
340
  "support-order-id"?: string;
341
341
  "x-pos-id"?: string;
342
342
  "company-tax-id"?: string;
343
+ "x-kiosk-id"?: string;
344
+ }
345
+ interface IStringKeyRecord<T> {
346
+ [key: string]: T;
343
347
  }
344
348
  export interface IOrderLog {
345
349
  timestamp?: string;
@@ -349,12 +353,12 @@ export interface IOrderLog {
349
353
  lines?: string[];
350
354
  }
351
355
  export interface IOrderLine {
352
- bom?: Record<string, unknown>;
356
+ bom?: IStringKeyRecord<unknown | undefined>;
353
357
  comments?: IOrderComment[];
354
358
  created: string;
355
359
  creator?: string;
356
360
  discounts?: IDiscount[];
357
- extra: Record<string, string>;
361
+ extra: IStringKeyRecord<string>;
358
362
  hash: string;
359
363
  id: string;
360
364
  price: string;
@@ -400,7 +404,7 @@ export interface IOrderProduct {
400
404
  quantity: string;
401
405
  price: string;
402
406
  vat: string;
403
- extra: Record<string, string>;
407
+ extra: IStringKeyRecord<string>;
404
408
  }
405
409
  export declare enum EOrderLineStatus {
406
410
  NEW = "NEW",
@@ -459,8 +463,8 @@ export interface IVenueConfig {
459
463
  street: string;
460
464
  };
461
465
  channelConstraints: Partial<Record<EChannelName, ISaleChannel>>;
462
- device: Record<string, Record<string, string>>;
463
- extra: Record<string, string>;
466
+ device: IStringKeyRecord<IStringKeyRecord<string>>;
467
+ extra: IStringKeyRecord<string>;
464
468
  geoPosition: IGeoPosition;
465
469
  id: string;
466
470
  menu: string;
@@ -513,7 +517,7 @@ export declare enum ENotificationType {
513
517
  export type TUpsellKind = "ANY" | "POPUP" | "SIDE" | "BASKET";
514
518
  export interface IUpsellNotification {
515
519
  details: {
516
- literals?: Record<string, string>;
520
+ literals?: IStringKeyRecord<string>;
517
521
  media?: {
518
522
  url?: string;
519
523
  name: string;
@@ -58,7 +58,7 @@ export type TLiterals = {
58
58
  fiscal?: string;
59
59
  "target-product-id"?: string;
60
60
  description?: string;
61
- } & Record<string, string>;
61
+ } & IStringKeyRecord<string | undefined>;
62
62
  export type TMedia = {
63
63
  url: string;
64
64
  name: string;
@@ -78,7 +78,7 @@ export interface IProductAvailability {
78
78
  * @interface IProductExtra
79
79
  * @related {string} comma separated related products IDs
80
80
  */
81
- export interface IProductExtra extends Partial<Record<string, string>> {
81
+ export interface IProductExtra extends IStringKeyRecord<string | undefined> {
82
82
  related?: string;
83
83
  category?: string;
84
84
  }
@@ -115,11 +115,11 @@ export interface IProduct {
115
115
  qtyMin?: string;
116
116
  qtyMax?: string;
117
117
  _?: IProductExtra;
118
- bom?: Record<string, {
118
+ bom?: IStringKeyRecord<{
119
119
  unit: string;
120
120
  qty: string;
121
121
  }>;
122
- attrs?: Record<string, string | boolean>;
122
+ attrs?: IStringKeyRecord<string | boolean>;
123
123
  __?: IProductFrontAttributes;
124
124
  }
125
125
  export interface IProductState {
@@ -148,7 +148,7 @@ export interface IUser {
148
148
  name?: string;
149
149
  phone?: string;
150
150
  email?: string;
151
- extra?: Record<string, string>;
151
+ extra?: IStringKeyRecord<string>;
152
152
  }
153
153
  export declare enum EOrderType {
154
154
  TAKE_AWAY = "TAKE_AWAY",
@@ -249,7 +249,7 @@ export interface IOrderComment {
249
249
  creator: string;
250
250
  timestamp?: string;
251
251
  comment: string;
252
- extra?: Record<string, string>;
252
+ extra?: IStringKeyRecord<string>;
253
253
  }
254
254
  export interface IOrderInBucket {
255
255
  venue: string;
@@ -261,7 +261,7 @@ export interface IOrderInBucket {
261
261
  priceList?: string;
262
262
  warehouse?: string;
263
263
  queuePos?: string;
264
- extra?: Record<string, string>;
264
+ extra?: IStringKeyRecord<string>;
265
265
  }
266
266
  export interface IOrderPayment {
267
267
  id: string;
@@ -271,7 +271,7 @@ export interface IOrderPayment {
271
271
  initialAmount?: number;
272
272
  user: string;
273
273
  timestamp?: string;
274
- extra?: Record<string, string>;
274
+ extra?: IStringKeyRecord<string>;
275
275
  }
276
276
  export declare enum EOrderPaymentType {
277
277
  CASH = "CASH",
@@ -325,7 +325,7 @@ export interface ITaxSummary {
325
325
  * @x-agg-id {string} order ID from aggregator
326
326
  * @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
327
327
  */
328
- export interface IOrderExtra extends Partial<Record<string, string>> {
328
+ export interface IOrderExtra extends IStringKeyRecord<string | undefined> {
329
329
  "x-source"?: EOrderSource;
330
330
  "x-source-type"?: "INTEGRATOR";
331
331
  "manual-verify"?: string;
@@ -340,6 +340,10 @@ export interface IOrderExtra extends Partial<Record<string, string>> {
340
340
  "support-order-id"?: string;
341
341
  "x-pos-id"?: string;
342
342
  "company-tax-id"?: string;
343
+ "x-kiosk-id"?: string;
344
+ }
345
+ interface IStringKeyRecord<T> {
346
+ [key: string]: T;
343
347
  }
344
348
  export interface IOrderLog {
345
349
  timestamp?: string;
@@ -349,12 +353,12 @@ export interface IOrderLog {
349
353
  lines?: string[];
350
354
  }
351
355
  export interface IOrderLine {
352
- bom?: Record<string, unknown>;
356
+ bom?: IStringKeyRecord<unknown | undefined>;
353
357
  comments?: IOrderComment[];
354
358
  created: string;
355
359
  creator?: string;
356
360
  discounts?: IDiscount[];
357
- extra: Record<string, string>;
361
+ extra: IStringKeyRecord<string>;
358
362
  hash: string;
359
363
  id: string;
360
364
  price: string;
@@ -400,7 +404,7 @@ export interface IOrderProduct {
400
404
  quantity: string;
401
405
  price: string;
402
406
  vat: string;
403
- extra: Record<string, string>;
407
+ extra: IStringKeyRecord<string>;
404
408
  }
405
409
  export declare enum EOrderLineStatus {
406
410
  NEW = "NEW",
@@ -459,8 +463,8 @@ export interface IVenueConfig {
459
463
  street: string;
460
464
  };
461
465
  channelConstraints: Partial<Record<EChannelName, ISaleChannel>>;
462
- device: Record<string, Record<string, string>>;
463
- extra: Record<string, string>;
466
+ device: IStringKeyRecord<IStringKeyRecord<string>>;
467
+ extra: IStringKeyRecord<string>;
464
468
  geoPosition: IGeoPosition;
465
469
  id: string;
466
470
  menu: string;
@@ -513,7 +517,7 @@ export declare enum ENotificationType {
513
517
  export type TUpsellKind = "ANY" | "POPUP" | "SIDE" | "BASKET";
514
518
  export interface IUpsellNotification {
515
519
  details: {
516
- literals?: Record<string, string>;
520
+ literals?: IStringKeyRecord<string>;
517
521
  media?: {
518
522
  url?: string;
519
523
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",