@kiminix/tp-client 2.9.9 → 2.10.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.
@@ -7,6 +7,7 @@ import { UpdateProductRequest } from "./types/update-product-request";
7
7
  import { Bill } from "./types/get-bills-response";
8
8
  import { QrCode } from "./types/get-qrcodes-response";
9
9
  import { SearchOrdersApi } from "./types/search-orders-request";
10
+ import { CreateBillRequest } from "./types/create-bill-request";
10
11
  export declare class MenuAdminAPIs {
11
12
  static updateOrders(props: {
12
13
  token?: string;
@@ -22,6 +23,10 @@ export declare class MenuAdminAPIs {
22
23
  token?: string;
23
24
  request: SearchOrdersApi;
24
25
  }): Promise<Order[]>;
26
+ static createBill(props: {
27
+ token?: string;
28
+ request: CreateBillRequest;
29
+ }): Promise<void>;
25
30
  static getBills(props: {
26
31
  token?: string;
27
32
  timestamp: number;
@@ -89,6 +89,20 @@ var MenuAdminAPIs = /** @class */ (function () {
89
89
  });
90
90
  });
91
91
  };
92
+ MenuAdminAPIs.createBill = function (props) {
93
+ return __awaiter(this, void 0, void 0, function () {
94
+ return __generator(this, function (_a) {
95
+ return [2 /*return*/, RequestUtils.send(function () {
96
+ return axios.post(base + "/menus/admin/bills", props.request, {
97
+ headers: {
98
+ 'Authorization': "".concat(props.token)
99
+ }
100
+ })
101
+ .then(function (_) { return undefined; });
102
+ })];
103
+ });
104
+ });
105
+ };
92
106
  MenuAdminAPIs.getBills = function (props) {
93
107
  return __awaiter(this, void 0, void 0, function () {
94
108
  return __generator(this, function (_a) {
@@ -0,0 +1,5 @@
1
+ export interface CreateBillRequest {
2
+ orders: string[];
3
+ discount?: number;
4
+ name?: string;
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -5,6 +5,7 @@ export interface Bill {
5
5
  total: number;
6
6
  ordersRef: string[];
7
7
  ordersCount: number;
8
+ name?: string | undefined;
8
9
  createdAt: string;
9
10
  updatedAt?: string | undefined;
10
11
  }
@@ -3,7 +3,8 @@ export interface SearchOrdersApi {
3
3
  timestamp: number;
4
4
  status: OrderStatus[];
5
5
  qrcodes: string[];
6
+ isLinkedToBill?: boolean | undefined;
6
7
  page: number;
7
- size?: number;
8
+ size?: number | undefined;
8
9
  sort: "asc" | "desc";
9
10
  }
@@ -5,7 +5,7 @@ export interface Order {
5
5
  qrCodeId: string;
6
6
  deviceId: string;
7
7
  status: OrderStatus;
8
- price: number;
8
+ total: number;
9
9
  createdAt: string;
10
10
  items: OrderItem[];
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "2.9.9",
3
+ "version": "2.10.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [