@kiminix/tp-client 1.21.0 → 1.22.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.
@@ -1,7 +1,7 @@
1
1
  import { Licence } from "../types";
2
2
  export interface GetDealsRequest {
3
- page: number;
4
- size: number;
3
+ page?: number;
4
+ size?: number;
5
5
  tags?: string[];
6
6
  }
7
7
  export interface Price {
@@ -1,7 +1,7 @@
1
1
  import { Either } from "purify-ts";
2
2
  import { PresetMenu } from "../types/preset-menu";
3
- import { UpdateDiscountRequest } from "./types/update-discount";
3
+ import { UpsertDiscountRequest } from "./types/update-discount";
4
4
  export declare class PresetMenusDiscountAdminAPIs {
5
- static update({ token, id, // preset menu id
6
- day, isAvailable, adultPrice, childPrice, minBookingTotal }: UpdateDiscountRequest): Promise<Either<Error, PresetMenu>>;
5
+ static upsert({ token, id, // preset menu id
6
+ days, isAvailable, adultPrice, childPrice, minBookingTotal }: UpsertDiscountRequest): Promise<Either<Error, PresetMenu>>;
7
7
  }
@@ -41,15 +41,15 @@ import { Left, Right } from "purify-ts";
41
41
  var PresetMenusDiscountAdminAPIs = /** @class */ (function () {
42
42
  function PresetMenusDiscountAdminAPIs() {
43
43
  }
44
- PresetMenusDiscountAdminAPIs.update = function (_a) {
44
+ PresetMenusDiscountAdminAPIs.upsert = function (_a) {
45
45
  var token = _a.token, id = _a.id, // preset menu id
46
- day = _a.day, isAvailable = _a.isAvailable, adultPrice = _a.adultPrice, childPrice = _a.childPrice, minBookingTotal = _a.minBookingTotal;
46
+ days = _a.days, isAvailable = _a.isAvailable, adultPrice = _a.adultPrice, childPrice = _a.childPrice, minBookingTotal = _a.minBookingTotal;
47
47
  return __awaiter(this, void 0, void 0, function () {
48
48
  return __generator(this, function (_b) {
49
49
  switch (_b.label) {
50
50
  case 0: return [4 /*yield*/, axios.patch(base + "/preset-menus/admin/discounts", {
51
51
  id: id,
52
- day: day,
52
+ days: days,
53
53
  isAvailable: isAvailable,
54
54
  adultPrice: adultPrice,
55
55
  childPrice: childPrice,
@@ -1,6 +1,6 @@
1
- export interface UpdateDiscountRequest {
1
+ export interface UpsertDiscountRequest {
2
2
  id: string;
3
- day: string;
3
+ days: string[];
4
4
  isAvailable: Boolean;
5
5
  adultPrice: number;
6
6
  childPrice?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [