@orderingstack/ordering-types 1.10.2 → 1.11.1
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 +36 -0
- package/dist/cjs/api.js +12 -0
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +1 -0
- package/dist/esm/api.d.ts +36 -0
- package/dist/esm/api.js +9 -0
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
_sort?: string[];
|
|
13
|
+
_order?: Array<TOrderDir>;
|
|
14
|
+
_start?: number;
|
|
15
|
+
_end?: number;
|
|
16
|
+
id?: string;
|
|
17
|
+
extId?: string;
|
|
18
|
+
status?: EOrderStatus;
|
|
19
|
+
type?: EOrderType;
|
|
20
|
+
completed?: boolean;
|
|
21
|
+
closed?: boolean;
|
|
22
|
+
phone?: string;
|
|
23
|
+
mail?: string;
|
|
24
|
+
createdFrom?: string;
|
|
25
|
+
createdTo?: string;
|
|
26
|
+
completedFrom?: string;
|
|
27
|
+
completedTo?: string;
|
|
28
|
+
venue?: string;
|
|
29
|
+
aggregator?: TAggregator;
|
|
30
|
+
payment?: EOrderPaymentType;
|
|
31
|
+
};
|
|
32
|
+
headers: {
|
|
33
|
+
"x-tenant"?: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
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;
|
|
@@ -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 {
|
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,36 @@
|
|
|
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
|
+
_sort?: string[];
|
|
13
|
+
_order?: Array<TOrderDir>;
|
|
14
|
+
_start?: number;
|
|
15
|
+
_end?: number;
|
|
16
|
+
id?: string;
|
|
17
|
+
extId?: string;
|
|
18
|
+
status?: EOrderStatus;
|
|
19
|
+
type?: EOrderType;
|
|
20
|
+
completed?: boolean;
|
|
21
|
+
closed?: boolean;
|
|
22
|
+
phone?: string;
|
|
23
|
+
mail?: string;
|
|
24
|
+
createdFrom?: string;
|
|
25
|
+
createdTo?: string;
|
|
26
|
+
completedFrom?: string;
|
|
27
|
+
completedTo?: string;
|
|
28
|
+
venue?: string;
|
|
29
|
+
aggregator?: TAggregator;
|
|
30
|
+
payment?: EOrderPaymentType;
|
|
31
|
+
};
|
|
32
|
+
headers: {
|
|
33
|
+
"x-tenant"?: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
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;
|
|
@@ -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 {
|
package/dist/esm/index.js
CHANGED