@kiminix/tp-client 2.9.7 → 2.9.8

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.
@@ -4,6 +4,7 @@ import { CallWaiter, CallWaiterStatus } from "./types/get-calls-response";
4
4
  import { Category } from "./types/get-menu-response";
5
5
  import { Product } from "./types/get-product-response";
6
6
  import { UpdateProductRequest } from "./types/update-product-request";
7
+ import { Bill } from "./types/get-bills-response";
7
8
  export declare class MenuAdminAPIs {
8
9
  static updateOrders(props: {
9
10
  token?: string;
@@ -23,6 +24,13 @@ export declare class MenuAdminAPIs {
23
24
  size: number;
24
25
  sort: "asc" | "desc";
25
26
  }): Promise<Order[]>;
27
+ static getBills(props: {
28
+ token?: string;
29
+ timestamp: number;
30
+ page: number;
31
+ size: number;
32
+ sort: "asc" | "desc";
33
+ }): Promise<Bill[]>;
26
34
  static getCalls(props: {
27
35
  token?: string;
28
36
  status: CallWaiterStatus[];
@@ -98,6 +98,28 @@ var MenuAdminAPIs = /** @class */ (function () {
98
98
  });
99
99
  });
100
100
  };
101
+ MenuAdminAPIs.getBills = function (props) {
102
+ return __awaiter(this, void 0, void 0, function () {
103
+ return __generator(this, function (_a) {
104
+ return [2 /*return*/, RequestUtils.send(function () {
105
+ var queryParams = [
106
+ "timestamp=".concat(props.timestamp),
107
+ "page=".concat(props.page),
108
+ "size=".concat(props.size),
109
+ "sort=".concat(props.sort)
110
+ ]
111
+ .filter(function (value) { return value; })
112
+ .join("&");
113
+ return axios.get(base + "/menus/admin/bills?".concat(queryParams), {
114
+ headers: {
115
+ 'Authorization': "".concat(props.token)
116
+ }
117
+ })
118
+ .then(function (response) { return response.data; });
119
+ })];
120
+ });
121
+ });
122
+ };
101
123
  MenuAdminAPIs.getCalls = function (props) {
102
124
  return __awaiter(this, void 0, void 0, function () {
103
125
  return __generator(this, function (_a) {
@@ -0,0 +1,10 @@
1
+ export interface Bill {
2
+ id: string;
3
+ businessId: string;
4
+ number: number;
5
+ total: number;
6
+ ordersRef: string[];
7
+ ordersCount: number;
8
+ createdAt: string;
9
+ updatedAt?: string | undefined;
10
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "2.9.7",
3
+ "version": "2.9.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [