@kiminix/tp-client 2.10.6 → 2.10.7
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.
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
import { OrderStatus } from "../../enum";
|
|
2
2
|
export interface Order {
|
|
3
3
|
id: string;
|
|
4
|
-
|
|
5
|
-
qrCodeId: string;
|
|
4
|
+
qrcode?: Order.Qrcode | undefined;
|
|
6
5
|
deviceId?: string | undefined;
|
|
7
6
|
billingId?: string | undefined;
|
|
8
7
|
status: OrderStatus;
|
|
9
8
|
total: number;
|
|
10
9
|
createdAt: string;
|
|
11
|
-
items:
|
|
10
|
+
items: Order.Item[];
|
|
12
11
|
}
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
export declare namespace Order {
|
|
13
|
+
interface Qrcode {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}
|
|
17
|
+
interface Item {
|
|
18
|
+
categoryId: string;
|
|
19
|
+
categoryLabel: string;
|
|
20
|
+
productId: string;
|
|
21
|
+
productLabel: string;
|
|
22
|
+
variantId: string;
|
|
23
|
+
variantLabel?: string;
|
|
24
|
+
quantity: number;
|
|
25
|
+
price: number;
|
|
26
|
+
discount?: number;
|
|
27
|
+
}
|
|
23
28
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Order } from "./types";
|
|
2
2
|
export declare namespace OrderUtils {
|
|
3
3
|
type OrderItemGroup = {
|
|
4
4
|
id: string;
|
|
5
5
|
label: string;
|
|
6
|
-
items:
|
|
6
|
+
items: Order.Item[];
|
|
7
7
|
};
|
|
8
|
-
function groupByCategory(items:
|
|
9
|
-
function merge(items:
|
|
8
|
+
function groupByCategory(items: Order.Item[]): OrderItemGroup[];
|
|
9
|
+
function merge(items: Order.Item[]): Order.Item[];
|
|
10
10
|
}
|