@kiminix/tp-client 2.9.6 → 2.9.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.
|
@@ -3,6 +3,7 @@ import { OrderStatus } from "../../enum";
|
|
|
3
3
|
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
|
+
import { UpdateProductRequest } from "./types/update-product-request";
|
|
6
7
|
export declare class MenuAdminAPIs {
|
|
7
8
|
static updateOrders(props: {
|
|
8
9
|
token?: string;
|
|
@@ -42,4 +43,8 @@ export declare class MenuAdminAPIs {
|
|
|
42
43
|
token?: string;
|
|
43
44
|
id: string;
|
|
44
45
|
}): Promise<Product>;
|
|
46
|
+
static updateProduct(props: {
|
|
47
|
+
token?: string;
|
|
48
|
+
request: UpdateProductRequest;
|
|
49
|
+
}): Promise<void>;
|
|
45
50
|
}
|
|
@@ -166,6 +166,20 @@ var MenuAdminAPIs = /** @class */ (function () {
|
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
168
|
};
|
|
169
|
+
MenuAdminAPIs.updateProduct = function (props) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
171
|
+
return __generator(this, function (_a) {
|
|
172
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
173
|
+
return axios.patch(base + "/menus/admin/products", props.request, {
|
|
174
|
+
headers: {
|
|
175
|
+
'Authorization': "".concat(props.token)
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
.then(function (_) { return undefined; });
|
|
179
|
+
})];
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
};
|
|
169
183
|
return MenuAdminAPIs;
|
|
170
184
|
}());
|
|
171
185
|
export { MenuAdminAPIs };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface UpdateProductRequest {
|
|
2
|
+
id: string;
|
|
3
|
+
label?: string | undefined;
|
|
4
|
+
description?: string | undefined;
|
|
5
|
+
variant?: VariantUpdate | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface VariantUpdate {
|
|
8
|
+
id: string;
|
|
9
|
+
label?: string | undefined;
|
|
10
|
+
isAvailable?: boolean | undefined;
|
|
11
|
+
price?: number | undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|