@kiminix/tp-client 2.9.0 → 2.9.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.
@@ -2,6 +2,11 @@ import { Order } from "../shared/types";
2
2
  import { OrderStatus } from "../../enum";
3
3
  import { CallWaiter, CallWaiterStatus } from "./types/get-calls-response";
4
4
  export declare class MenuAdminAPIs {
5
+ static updateOrders(props: {
6
+ token?: string;
7
+ id: string;
8
+ status?: OrderStatus;
9
+ }): Promise<Order[]>;
5
10
  static getOrders(props: {
6
11
  token?: string;
7
12
  status: OrderStatus[];
@@ -41,6 +41,23 @@ import { RequestUtils } from "../../utils/request-utils";
41
41
  var MenuAdminAPIs = /** @class */ (function () {
42
42
  function MenuAdminAPIs() {
43
43
  }
44
+ MenuAdminAPIs.updateOrders = function (props) {
45
+ return __awaiter(this, void 0, void 0, function () {
46
+ return __generator(this, function (_a) {
47
+ return [2 /*return*/, RequestUtils.send(function () {
48
+ return axios.patch(base + "/menus/admin/orders", {
49
+ id: props.id,
50
+ status: props.status
51
+ }, {
52
+ headers: {
53
+ 'Authorization': "".concat(props.token)
54
+ }
55
+ })
56
+ .then(function (_) { return undefined; });
57
+ })];
58
+ });
59
+ });
60
+ };
44
61
  MenuAdminAPIs.getOrders = function (props) {
45
62
  return __awaiter(this, void 0, void 0, function () {
46
63
  return __generator(this, function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -27,4 +27,4 @@
27
27
  "date-fns": "^3.3.1",
28
28
  "purify-ts": "^2.1.0"
29
29
  }
30
- }
30
+ }