@orderingstack/ordering-types 1.10.1 → 1.11.0

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.
@@ -0,0 +1,38 @@
1
+ import { EOrderPaymentType, EOrderStatus, EOrderType, IStringKeyRecord } from "./index";
2
+ export declare const aggregators: readonly ["GLOVO", "JUSTEAT", "UBER", "WOLT", "BOLT", "TAZZ", "_ANY_"];
3
+ export type TAggregator = typeof aggregators[number];
4
+ type TOrderDir = "DESC" | "ASC";
5
+ interface ApiParams {
6
+ query?: any;
7
+ headers?: IStringKeyRecord<string>;
8
+ data?: any;
9
+ }
10
+ export interface IOrderApiGetListParams extends ApiParams {
11
+ query: {
12
+ filter: {
13
+ _sort?: string[];
14
+ _order?: Array<TOrderDir>;
15
+ _start?: number;
16
+ _end?: number;
17
+ id?: string;
18
+ extId?: string;
19
+ status?: EOrderStatus;
20
+ type?: EOrderType;
21
+ completed?: boolean;
22
+ closed?: boolean;
23
+ phone?: string;
24
+ mail?: string;
25
+ createdFrom?: string;
26
+ createdTo?: string;
27
+ completedFrom?: string;
28
+ completedTo?: string;
29
+ venue?: string;
30
+ aggregator?: TAggregator;
31
+ payment?: EOrderPaymentType;
32
+ };
33
+ };
34
+ headers: {
35
+ "x-tenant"?: string;
36
+ };
37
+ }
38
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.aggregators = void 0;
4
+ exports.aggregators = [
5
+ "GLOVO",
6
+ "JUSTEAT",
7
+ "UBER",
8
+ "WOLT",
9
+ "BOLT",
10
+ "TAZZ",
11
+ "_ANY_",
12
+ ];
@@ -1,5 +1,6 @@
1
1
  export * from "./kiosk";
2
2
  export * from "./kioskErrors";
3
+ export * from "./api";
3
4
  export interface IRestaurant {
4
5
  id: string;
5
6
  name: string;
@@ -316,12 +317,12 @@ export interface IOrderFiscal {
316
317
  slip: string;
317
318
  taxId?: string;
318
319
  message?: string;
319
- entries: ISlipEntry[];
320
+ entries?: ISlipEntry[];
320
321
  payments?: {
321
322
  [propName: string]: number;
322
323
  };
323
324
  subTotalDiscounts?: ISubTotalDiscount[];
324
- extra: {
325
+ extra?: {
325
326
  [propName: string]: number;
326
327
  };
327
328
  }
@@ -383,7 +384,7 @@ interface IOrderExtra {
383
384
  [ERbiOrderExtra.CUSTOMER_NAME]?: string;
384
385
  [key: string]: string | undefined;
385
386
  }
386
- interface IStringKeyRecord<T> {
387
+ export interface IStringKeyRecord<T> {
387
388
  [key: string]: T;
388
389
  }
389
390
  export interface IOrderLog {
@@ -442,7 +443,7 @@ export interface IOrderProduct {
442
443
  kind: EOrderProductKind;
443
444
  literals: IProductLiterals;
444
445
  items?: Array<IOrderProduct | IOrderGroupProduct>;
445
- img: string;
446
+ img?: string;
446
447
  quantity: string;
447
448
  price: string;
448
449
  vat: string;
package/dist/cjs/index.js CHANGED
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.ENotificationType = exports.EChannelName = exports.EOrderProductKind = exports.EOrderLineStatus = exports.EOrderSource = exports.ERbiOrderExtra = exports.EOrderPaymentType = exports.EOrderStatus = exports.EOrderType = exports.EOrderUserRole = exports.EProductKindBucket = exports.EProductKind = exports.ECouponViewType = void 0;
18
18
  __exportStar(require("./kiosk"), exports);
19
19
  __exportStar(require("./kioskErrors"), exports);
20
+ __exportStar(require("./api"), exports);
20
21
  var ECouponViewType;
21
22
  (function (ECouponViewType) {
22
23
  ECouponViewType["CAROUSEL"] = "carousel";
@@ -0,0 +1,38 @@
1
+ import { EOrderPaymentType, EOrderStatus, EOrderType, IStringKeyRecord } from "./index";
2
+ export declare const aggregators: readonly ["GLOVO", "JUSTEAT", "UBER", "WOLT", "BOLT", "TAZZ", "_ANY_"];
3
+ export type TAggregator = typeof aggregators[number];
4
+ type TOrderDir = "DESC" | "ASC";
5
+ interface ApiParams {
6
+ query?: any;
7
+ headers?: IStringKeyRecord<string>;
8
+ data?: any;
9
+ }
10
+ export interface IOrderApiGetListParams extends ApiParams {
11
+ query: {
12
+ filter: {
13
+ _sort?: string[];
14
+ _order?: Array<TOrderDir>;
15
+ _start?: number;
16
+ _end?: number;
17
+ id?: string;
18
+ extId?: string;
19
+ status?: EOrderStatus;
20
+ type?: EOrderType;
21
+ completed?: boolean;
22
+ closed?: boolean;
23
+ phone?: string;
24
+ mail?: string;
25
+ createdFrom?: string;
26
+ createdTo?: string;
27
+ completedFrom?: string;
28
+ completedTo?: string;
29
+ venue?: string;
30
+ aggregator?: TAggregator;
31
+ payment?: EOrderPaymentType;
32
+ };
33
+ };
34
+ headers: {
35
+ "x-tenant"?: string;
36
+ };
37
+ }
38
+ export {};
@@ -0,0 +1,9 @@
1
+ export const aggregators = [
2
+ "GLOVO",
3
+ "JUSTEAT",
4
+ "UBER",
5
+ "WOLT",
6
+ "BOLT",
7
+ "TAZZ",
8
+ "_ANY_",
9
+ ];
@@ -1,5 +1,6 @@
1
1
  export * from "./kiosk";
2
2
  export * from "./kioskErrors";
3
+ export * from "./api";
3
4
  export interface IRestaurant {
4
5
  id: string;
5
6
  name: string;
@@ -316,12 +317,12 @@ export interface IOrderFiscal {
316
317
  slip: string;
317
318
  taxId?: string;
318
319
  message?: string;
319
- entries: ISlipEntry[];
320
+ entries?: ISlipEntry[];
320
321
  payments?: {
321
322
  [propName: string]: number;
322
323
  };
323
324
  subTotalDiscounts?: ISubTotalDiscount[];
324
- extra: {
325
+ extra?: {
325
326
  [propName: string]: number;
326
327
  };
327
328
  }
@@ -383,7 +384,7 @@ interface IOrderExtra {
383
384
  [ERbiOrderExtra.CUSTOMER_NAME]?: string;
384
385
  [key: string]: string | undefined;
385
386
  }
386
- interface IStringKeyRecord<T> {
387
+ export interface IStringKeyRecord<T> {
387
388
  [key: string]: T;
388
389
  }
389
390
  export interface IOrderLog {
@@ -442,7 +443,7 @@ export interface IOrderProduct {
442
443
  kind: EOrderProductKind;
443
444
  literals: IProductLiterals;
444
445
  items?: Array<IOrderProduct | IOrderGroupProduct>;
445
- img: string;
446
+ img?: string;
446
447
  quantity: string;
447
448
  price: string;
448
449
  vat: string;
package/dist/esm/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./kiosk";
2
2
  export * from "./kioskErrors";
3
+ export * from "./api";
3
4
  export var ECouponViewType;
4
5
  (function (ECouponViewType) {
5
6
  ECouponViewType["CAROUSEL"] = "carousel";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",