@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.
- package/dist/cjs/api.d.ts +38 -0
- package/dist/cjs/api.js +12 -0
- package/dist/cjs/index.d.ts +5 -4
- package/dist/cjs/index.js +1 -0
- package/dist/esm/api.d.ts +38 -0
- package/dist/esm/api.js +9 -0
- package/dist/esm/index.d.ts +5 -4
- package/dist/esm/index.js +1 -0
- package/package.json +1 -1
|
@@ -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 {};
|
package/dist/cjs/api.js
ADDED
package/dist/cjs/index.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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 {};
|
package/dist/esm/api.js
ADDED
package/dist/esm/index.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
446
|
+
img?: string;
|
|
446
447
|
quantity: string;
|
|
447
448
|
price: string;
|
|
448
449
|
vat: string;
|
package/dist/esm/index.js
CHANGED