@kiminix/tp-client 1.34.0 → 1.36.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.
Files changed (69) hide show
  1. package/dist/business/types/get-all.d.ts +3 -19
  2. package/dist/business/types/get-id.d.ts +7 -16
  3. package/dist/business/types/shared.d.ts +3 -13
  4. package/dist/cashback/index.d.ts +0 -2
  5. package/dist/cashback/index.js +0 -3
  6. package/dist/cashback/user/types/resp-get-cashback.d.ts +14 -2
  7. package/dist/cashback/user/user-apis.d.ts +7 -2
  8. package/dist/cashback/user/user-apis.js +14 -36
  9. package/dist/deals/apis.d.ts +0 -1
  10. package/dist/deals/apis.js +12 -39
  11. package/dist/deals/index.d.ts +1 -0
  12. package/dist/deals/index.js +2 -0
  13. package/dist/deals/types.d.ts +7 -15
  14. package/dist/discounts/admin/admin-apis.d.ts +36 -0
  15. package/dist/{menus/preset/apis.js → discounts/admin/admin-apis.js} +57 -24
  16. package/dist/discounts/admin/types/get-available-datetimes.d.ts +7 -0
  17. package/dist/discounts/index.d.ts +2 -0
  18. package/dist/discounts/index.js +3 -0
  19. package/dist/index.d.ts +3 -3
  20. package/dist/index.js +5 -4
  21. package/dist/reservations/admin/admin-apis.d.ts +55 -18
  22. package/dist/reservations/admin/admin-apis.js +91 -48
  23. package/dist/reservations/admin/types.d.ts +19 -0
  24. package/dist/reservations/index.d.ts +3 -5
  25. package/dist/reservations/index.js +3 -5
  26. package/dist/reservations/shared/reservation-deal.d.ts +6 -5
  27. package/dist/reservations/shared/reservation.d.ts +7 -19
  28. package/dist/reservations/user/guest-apis.d.ts +84 -0
  29. package/dist/reservations/user/guest-apis.js +199 -0
  30. package/dist/reservations/user/types/response-api.d.ts +32 -0
  31. package/dist/reservations/user/user-apis.d.ts +43 -59
  32. package/dist/reservations/user/user-apis.js +58 -235
  33. package/dist/types.d.ts +1 -0
  34. package/dist/utils/date-utils.d.ts +2 -0
  35. package/dist/utils/date-utils.js +7 -1
  36. package/dist/utils/reservation-utils.d.ts +2 -0
  37. package/dist/utils/reservation-utils.js +6 -0
  38. package/package.json +2 -2
  39. package/dist/cashback/admin/admin-apis.d.ts +0 -7
  40. package/dist/cashback/admin/admin-apis.js +0 -85
  41. package/dist/cashback/admin/types/resp-get-cashback.d.ts +0 -12
  42. package/dist/menus/preset/admin-apis.d.ts +0 -8
  43. package/dist/menus/preset/admin-apis.js +0 -146
  44. package/dist/menus/preset/apis.d.ts +0 -11
  45. package/dist/menus/preset/discounts/admin-apis.d.ts +0 -7
  46. package/dist/menus/preset/discounts/admin-apis.js +0 -90
  47. package/dist/menus/preset/discounts/types/update-discount.d.ts +0 -9
  48. package/dist/menus/preset/index.d.ts +0 -7
  49. package/dist/menus/preset/index.js +0 -9
  50. package/dist/menus/preset/types/preset-menu.d.ts +0 -19
  51. package/dist/menus/preset/types/preset-menu.js +0 -1
  52. package/dist/menus/preset/types/special-discounts.d.ts +0 -12
  53. package/dist/menus/preset/types/special-discounts.js +0 -1
  54. package/dist/menus/preset/types/types.d.ts +0 -4
  55. package/dist/menus/preset/types/update-preset-menu.d.ts +0 -12
  56. package/dist/menus/preset/types/update-preset-menu.js +0 -1
  57. package/dist/reservations/admin/types/get-available-transitions.d.ts +0 -4
  58. package/dist/reservations/admin/types/get-available-transitions.js +0 -1
  59. package/dist/reservations/admin/types/get-id.d.ts +0 -4
  60. package/dist/reservations/admin/types/get-id.js +0 -1
  61. package/dist/reservations/user/types/resp-reservation-settings.d.ts +0 -22
  62. package/dist/reservations/user/types/resp-reservation-settings.js +0 -1
  63. package/dist/reservations/user/types/resp-save-reservation.d.ts +0 -3
  64. package/dist/reservations/user/types/resp-save-reservation.js +0 -1
  65. package/dist/utils/menu-utils.d.ts +0 -10
  66. package/dist/utils/menu-utils.js +0 -49
  67. /package/dist/{cashback/admin/types/resp-get-cashback.js → discounts/admin/types/get-available-datetimes.js} +0 -0
  68. /package/dist/{menus/preset/types → reservations/admin}/types.js +0 -0
  69. /package/dist/{menus/preset/discounts/types/update-discount.js → reservations/user/types/response-api.js} +0 -0
@@ -1,26 +1,10 @@
1
- import { Review } from "./shared";
2
1
  export interface AllBusiness {
3
2
  id: string;
4
3
  identifier: string;
5
4
  name: string;
6
5
  address: string;
7
- review: Review;
8
6
  images: string[];
9
- cashback: CashbackSettings | undefined;
7
+ maxCashbackRate: number | undefined;
8
+ averagePrice: number | undefined;
9
+ specialities: string[] | undefined;
10
10
  }
11
- export interface CashbackSettings {
12
- isActive: boolean;
13
- rates: CashbackRates;
14
- thresholds: Thresholds;
15
- resetAtSeasonStart: boolean;
16
- }
17
- interface CashbackRates {
18
- bronze: number;
19
- silver: number;
20
- gold: number;
21
- }
22
- interface Thresholds {
23
- silver: number;
24
- gold: number;
25
- }
26
- export {};
@@ -1,15 +1,5 @@
1
1
  import { Licence } from "../../types";
2
- import { CashbackSettings } from "./get-all";
3
- import { Review } from "./shared";
4
- export interface GoogleMap {
5
- link: string;
6
- image: string;
7
- }
8
- export interface SocialNetworks {
9
- facebook?: string;
10
- instagram?: string;
11
- twitter?: string;
12
- }
2
+ import { OpeningHours } from "./shared";
13
3
  export interface Business {
14
4
  id: string;
15
5
  identifier: string;
@@ -17,12 +7,13 @@ export interface Business {
17
7
  licence: Licence | undefined;
18
8
  createdAt: Date;
19
9
  address: string;
20
- googleMap: GoogleMap | undefined;
21
- review: Review;
10
+ googleMapUrl: string;
22
11
  phones: string[];
23
- socialNetworks: SocialNetworks | undefined;
24
12
  images: string[];
25
- email: string | undefined;
13
+ email: string;
26
14
  description: string | undefined;
27
- cashback: CashbackSettings | undefined;
15
+ maxCashbackRate: number | undefined;
16
+ openingHours: OpeningHours[];
17
+ averagePrice: number | undefined;
18
+ specialities: string[] | undefined;
28
19
  }
@@ -1,14 +1,4 @@
1
- export interface GoogleMap {
2
- link: string;
3
- image: string;
4
- }
5
- export interface SocialNetworks {
6
- facebook?: string;
7
- instagram?: string;
8
- twitter?: string;
9
- }
10
- export interface Review {
11
- stars: number;
12
- count: number;
13
- link?: string;
1
+ export interface OpeningHours {
2
+ from: string;
3
+ to: string;
14
4
  }
@@ -1,4 +1,2 @@
1
1
  export * from './user/types/resp-get-cashback';
2
2
  export { CashbackUserAPIs } from './user/user-apis';
3
- export * from './admin/types/resp-get-cashback';
4
- export { CashbackAdminAPIs } from './admin/admin-apis';
@@ -1,6 +1,3 @@
1
1
  // cashback module
2
2
  export * from './user/types/resp-get-cashback';
3
3
  export { CashbackUserAPIs } from './user/user-apis';
4
- // admin module
5
- export * from './admin/types/resp-get-cashback';
6
- export { CashbackAdminAPIs } from './admin/admin-apis';
@@ -1,10 +1,22 @@
1
1
  import { Level } from "../../../enum";
2
+ export interface CashbackSettings {
3
+ rates: CashbackRates;
4
+ thresholds: Thresholds;
5
+ }
6
+ export interface CashbackRates {
7
+ bronze: number;
8
+ silver: number;
9
+ gold: number;
10
+ }
11
+ export interface Thresholds {
12
+ silver: number;
13
+ gold: number;
14
+ }
2
15
  export interface Cashback {
3
- id: string;
4
- businessId: string;
5
16
  value: number;
6
17
  level: Level;
7
18
  score: number;
19
+ settings: CashbackSettings;
8
20
  createdAt: string;
9
21
  lastResetAt: string | undefined;
10
22
  }
@@ -1,7 +1,12 @@
1
1
  import { Cashback } from "./types/resp-get-cashback";
2
2
  export declare class CashbackUserAPIs {
3
+ /**
4
+ *
5
+ * @param props
6
+ * @throws unauthorized, internal_error
7
+ * @returns
8
+ */
3
9
  static get(props: {
4
10
  token: string | undefined;
5
- businessId: string;
6
- }): Promise<Cashback | undefined>;
11
+ }): Promise<Cashback>;
7
12
  }
@@ -36,49 +36,27 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  };
37
37
  import axios from "axios";
38
38
  import { base } from "../../constants";
39
+ import { RequestUtils } from "../../utils/request-utils";
39
40
  var CashbackUserAPIs = /** @class */ (function () {
40
41
  function CashbackUserAPIs() {
41
42
  }
43
+ /**
44
+ *
45
+ * @param props
46
+ * @throws unauthorized, internal_error
47
+ * @returns
48
+ */
42
49
  CashbackUserAPIs.get = function (props) {
43
50
  return __awaiter(this, void 0, void 0, function () {
44
- var response, error_1, axiosError;
45
51
  return __generator(this, function (_a) {
46
- switch (_a.label) {
47
- case 0:
48
- _a.trys.push([0, 2, , 3]);
49
- return [4 /*yield*/, axios.get(base + "/cashback/user?businessId=".concat(props.businessId), {
50
- headers: {
51
- 'Authorization': "".concat(props.token)
52
- }
53
- })];
54
- case 1:
55
- response = _a.sent();
56
- return [2 /*return*/, response.data];
57
- case 2:
58
- error_1 = _a.sent();
59
- axiosError = error_1;
60
- // The request was made and the server responded with a status code that falls out of the range of 2xx
61
- if (axiosError && axiosError.response) {
62
- switch (axiosError.response.status) {
63
- case 401:
64
- throw new Error("unauthorized");
65
- case 404:
66
- return [2 /*return*/, undefined];
67
- default:
68
- throw new Error('internal_error');
52
+ return [2 /*return*/, RequestUtils.send(function () {
53
+ return axios.get(base + "/cashback/user", {
54
+ headers: {
55
+ 'Authorization': "".concat(props.token)
69
56
  }
70
- }
71
- // The request was made but no response was received
72
- else if (axiosError && axiosError.request) {
73
- throw new Error('network_error');
74
- }
75
- // Something happened in setting up the request that triggered an Error
76
- else {
77
- throw new Error('client_request_setting_error');
78
- }
79
- return [3 /*break*/, 3];
80
- case 3: return [2 /*return*/];
81
- }
57
+ })
58
+ .then(function (response) { return response.data; });
59
+ })];
82
60
  });
83
61
  });
84
62
  };
@@ -1,5 +1,4 @@
1
1
  import { Deal, GetDealsRequest } from "./types";
2
2
  export declare class DealsAPIs {
3
3
  static getPage({ page, size, tags }: GetDealsRequest): Promise<Deal[]>;
4
- static get(identifier: string): Promise<Deal | undefined>;
5
4
  }
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  };
37
37
  import axios from "axios";
38
38
  import { base } from "../constants";
39
+ import { RequestUtils } from "../utils/request-utils";
39
40
  // deals module APIs
40
41
  var DealsAPIs = /** @class */ (function () {
41
42
  function DealsAPIs() {
@@ -45,45 +46,17 @@ var DealsAPIs = /** @class */ (function () {
45
46
  return __awaiter(this, void 0, void 0, function () {
46
47
  var queryParams;
47
48
  return __generator(this, function (_e) {
48
- switch (_e.label) {
49
- case 0:
50
- queryParams = [
51
- "page=".concat(page),
52
- "size=".concat(size),
53
- ((tags === null || tags === void 0 ? void 0 : tags.length) > 0) ? "tags=".concat(tags.join(',')) : undefined
54
- ]
55
- .filter(function (value) { return value; })
56
- .join("&");
57
- return [4 /*yield*/, axios.get(base + "/deals?".concat(queryParams))
58
- .then(function (response) { return response.data; })
59
- .catch(function (error) {
60
- throw new Error('internal_error', error);
61
- })];
62
- case 1: return [2 /*return*/, _e.sent()];
63
- }
64
- });
65
- });
66
- };
67
- DealsAPIs.get = function (identifier) {
68
- return __awaiter(this, void 0, void 0, function () {
69
- return __generator(this, function (_a) {
70
- switch (_a.label) {
71
- case 0: return [4 /*yield*/, axios.get(base + "/deals/".concat(identifier))
72
- .then(function (response) {
73
- var data = response.data;
74
- data.updatedAt = new Date(data.updatedAt);
75
- return data;
76
- })
77
- .catch(function (error) {
78
- // not fount
79
- if (error.response.status == 404) {
80
- return (undefined);
81
- }
82
- else
83
- throw new Error('internal_error', error);
84
- })];
85
- case 1: return [2 /*return*/, _a.sent()];
86
- }
49
+ queryParams = [
50
+ "page=".concat(page),
51
+ "size=".concat(size),
52
+ ((tags === null || tags === void 0 ? void 0 : tags.length) > 0) ? "tags=".concat(tags.join(',')) : undefined
53
+ ]
54
+ .filter(function (value) { return value; })
55
+ .join("&");
56
+ return [2 /*return*/, RequestUtils.send(function () {
57
+ return axios.get(base + "/deals?".concat(queryParams))
58
+ .then(function (response) { return response.data; });
59
+ })];
87
60
  });
88
61
  });
89
62
  };
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ // cashback module
2
+ export * from './types';
@@ -1,29 +1,21 @@
1
- import { Licence } from "../types";
2
1
  export interface GetDealsRequest {
3
2
  page?: number;
4
3
  size?: number;
5
4
  tags?: string[];
6
5
  }
7
- export interface Price {
8
- reduced: number;
9
- current: number;
10
- }
11
- export interface Business {
6
+ export interface BusinessOfDeal {
12
7
  id: string;
13
8
  identifier: string;
14
9
  name: string;
15
10
  address: string;
16
- licence: Licence | undefined;
17
- maxCashback: number | undefined;
11
+ images: string[];
12
+ maxCashbackRate: number | undefined;
13
+ averagePrice: number | undefined;
14
+ specialities: string[] | undefined;
18
15
  }
19
16
  export interface Deal {
20
- id: string;
21
- identifier: string;
22
- title: string;
23
- isExpired: boolean;
24
17
  discount: number;
25
- price: Price;
26
- images: string[];
27
- business: Business;
18
+ isExpired: boolean;
28
19
  updatedAt: Date;
20
+ business: BusinessOfDeal;
29
21
  }
@@ -0,0 +1,36 @@
1
+ import { AvailableDateTimes } from "./types/get-available-datetimes";
2
+ import { LocalDate, LocalTime } from "../../types";
3
+ export declare class DiscountsAdminAPIs {
4
+ /**
5
+ *
6
+ * @throws closed_business, unauthorized
7
+ * @param props
8
+ * @returns
9
+ */
10
+ static getAvailableDateTimes(props: {
11
+ token?: string;
12
+ }): Promise<AvailableDateTimes>;
13
+ /**
14
+ *
15
+ * @throws closed_business, invalid_discount, unauthorized
16
+ * @param props
17
+ * @returns
18
+ */
19
+ static upsert(props: {
20
+ token?: string;
21
+ dates: LocalDate[];
22
+ times: LocalTime[];
23
+ value: number;
24
+ }): Promise<void>;
25
+ /**
26
+ *
27
+ * @throws closed_business, empty_dates_or_times, unauthorized
28
+ * @param props
29
+ * @returns
30
+ */
31
+ static delete(props: {
32
+ token?: string;
33
+ dates: LocalDate[];
34
+ times: LocalTime[];
35
+ }): Promise<void>;
36
+ }
@@ -37,44 +37,77 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  import axios from "axios";
38
38
  import { base } from "../../constants";
39
39
  import { RequestUtils } from "../../utils/request-utils";
40
- // preset-menus module public APIs
41
- var PresetMenusAPIs = /** @class */ (function () {
42
- function PresetMenusAPIs() {
40
+ var DiscountsAdminAPIs = /** @class */ (function () {
41
+ function DiscountsAdminAPIs() {
43
42
  }
44
- PresetMenusAPIs.getByBusiness = function (businessId) {
43
+ /**
44
+ *
45
+ * @throws closed_business, unauthorized
46
+ * @param props
47
+ * @returns
48
+ */
49
+ DiscountsAdminAPIs.getAvailableDateTimes = function (props) {
45
50
  return __awaiter(this, void 0, void 0, function () {
46
51
  return __generator(this, function (_a) {
47
52
  return [2 /*return*/, RequestUtils.send(function () {
48
- return axios.get(base + "/preset-menus/user?business=".concat(businessId))
49
- .then(function (response) {
50
- return response.data;
51
- });
53
+ return axios.get(base + "/discounts/admin/available-datetimes", {
54
+ headers: {
55
+ 'Authorization': "".concat(props.token)
56
+ }
57
+ })
58
+ .then(function (response) { return response.data; });
59
+ })];
60
+ });
61
+ });
62
+ };
63
+ /**
64
+ *
65
+ * @throws closed_business, invalid_discount, unauthorized
66
+ * @param props
67
+ * @returns
68
+ */
69
+ DiscountsAdminAPIs.upsert = function (props) {
70
+ return __awaiter(this, void 0, void 0, function () {
71
+ return __generator(this, function (_a) {
72
+ return [2 /*return*/, RequestUtils.send(function () {
73
+ return axios.post(base + "/discounts/admin", {
74
+ dates: props.dates,
75
+ times: props.times,
76
+ value: props.value
77
+ }, {
78
+ headers: {
79
+ 'Authorization': "".concat(props.token)
80
+ }
81
+ })
82
+ .then(function (_) { return undefined; });
52
83
  })];
53
84
  });
54
85
  });
55
86
  };
56
- PresetMenusAPIs.getSpecialDiscounts = function (props) {
87
+ /**
88
+ *
89
+ * @throws closed_business, empty_dates_or_times, unauthorized
90
+ * @param props
91
+ * @returns
92
+ */
93
+ DiscountsAdminAPIs.delete = function (props) {
57
94
  return __awaiter(this, void 0, void 0, function () {
58
95
  return __generator(this, function (_a) {
59
96
  return [2 /*return*/, RequestUtils.send(function () {
60
- var queryParams = [
61
- "business=".concat(props.businessId),
62
- "code=".concat(props.code),
63
- "date=".concat(props.date)
64
- ]
65
- .filter(function (value) { return value; })
66
- .join("&");
67
- return axios.get(base + "/preset-menus/user/special-discounts?".concat(queryParams), {
68
- headers: {}
97
+ return axios.delete(base + "/discounts/admin", {
98
+ headers: {
99
+ 'Authorization': "".concat(props.token)
100
+ },
101
+ data: {
102
+ dates: props.dates,
103
+ times: props.times
104
+ }
69
105
  })
70
- .then(function (response) {
71
- var result = response.data;
72
- return result;
73
- });
106
+ .then(function (_) { return undefined; });
74
107
  })];
75
108
  });
76
109
  });
77
110
  };
78
- return PresetMenusAPIs;
111
+ return DiscountsAdminAPIs;
79
112
  }());
80
- export { PresetMenusAPIs };
113
+ export { DiscountsAdminAPIs };
@@ -0,0 +1,7 @@
1
+ import { LocalDate, LocalTime } from "../../../types";
2
+ export interface AvailableDateTimes {
3
+ from: LocalDate;
4
+ to: LocalDate;
5
+ closed: LocalDate[];
6
+ times: LocalTime[];
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./admin/types/get-available-datetimes";
2
+ export { DiscountsAdminAPIs } from './admin/admin-apis';
@@ -0,0 +1,3 @@
1
+ // admin module
2
+ export * from "./admin/types/get-available-datetimes";
3
+ export { DiscountsAdminAPIs } from './admin/admin-apis';
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export { DealsAPIs } from './deals/apis';
2
1
  export { NotifyAPIs } from './notify/apis';
3
2
  export { SitemapAPIs } from './sitemap/apis';
4
3
  export { StatisticsAdminAPIs } from './statistics/admin-apis';
4
+ export { DealsAPIs } from './deals/apis';
5
+ export * from './deals/index';
5
6
  export * from './iam/index';
6
7
  export * from './business/index';
7
- export * from './menus/preset/index';
8
8
  export * from './reservations/index';
9
9
  export * from './cashback/index';
10
- export * from './utils/menu-utils';
10
+ export * from './discounts/index';
11
11
  export * from './utils/business-utils';
12
12
  export * from './utils/date-utils';
13
13
  export * from './enum';
package/dist/index.js CHANGED
@@ -1,19 +1,20 @@
1
- export { DealsAPIs } from './deals/apis';
2
1
  export { NotifyAPIs } from './notify/apis';
3
2
  export { SitemapAPIs } from './sitemap/apis';
4
3
  export { StatisticsAdminAPIs } from './statistics/admin-apis';
4
+ // deals module
5
+ export { DealsAPIs } from './deals/apis';
6
+ export * from './deals/index';
5
7
  // iam module
6
8
  export * from './iam/index';
7
9
  // business module
8
10
  export * from './business/index';
9
- // menus module
10
- export * from './menus/preset/index';
11
11
  // reservations module
12
12
  export * from './reservations/index';
13
13
  // cashback module
14
14
  export * from './cashback/index';
15
+ //discounts module
16
+ export * from './discounts/index';
15
17
  //utils
16
- export * from './utils/menu-utils';
17
18
  export * from './utils/business-utils';
18
19
  export * from './utils/date-utils';
19
20
  export * from './enum';
@@ -1,8 +1,7 @@
1
- import { Either } from "purify-ts";
2
1
  import { CancellationReason, ReservationStatus, TimelineDirection } from "../../enum";
3
2
  import { Reservation } from "../shared/reservation";
4
- import { GetTransitionsRequest } from "./types/get-available-transitions";
5
- import { GetByIdAdminRequest } from "./types/get-id";
3
+ import { LocalDate, LocalTime } from "../../types";
4
+ import { ClosingDays, GetByIdAdminRequest, GetTransitionsRequest, TimeSlot } from "./types";
6
5
  export declare class ReservationsAdminAPIs {
7
6
  static getPage(props: {
8
7
  token?: string;
@@ -19,6 +18,12 @@ export declare class ReservationsAdminAPIs {
19
18
  }): Promise<Reservation[]>;
20
19
  static getById({ token, id }: GetByIdAdminRequest): Promise<Reservation>;
21
20
  static getAvailableTransitions({ token, reservationId }: GetTransitionsRequest): Promise<ReservationStatus[]>;
21
+ /**
22
+ *
23
+ * @param props
24
+ * @throws invalid_total, unauthorized_action, not_found, unauthorized, internal_error
25
+ * @returns
26
+ */
22
27
  static patchStatus(props: {
23
28
  token?: string;
24
29
  id: string;
@@ -27,22 +32,54 @@ export declare class ReservationsAdminAPIs {
27
32
  reason: CancellationReason;
28
33
  notes?: string;
29
34
  };
30
- }): Promise<Either<Error, any>>;
31
- static reserve(props: {
35
+ }): Promise<void>;
36
+ /**
37
+ *
38
+ * @param props
39
+ * @throws unauthorized_action, not_found, unauthorized, internal_error
40
+ * @returns
41
+ */
42
+ static patchTotal(props: {
32
43
  token?: string;
33
- user: {
34
- firstName: string;
35
- lastName: string;
36
- phone?: string;
37
- };
38
- datetime: Date;
39
- notes?: string;
40
- commands: {
41
- menuId: string;
42
- adult: number;
43
- child?: number;
44
- }[];
45
- }): Promise<Either<Error, void>>;
44
+ id: string;
45
+ total: number;
46
+ }): Promise<void>;
47
+ /**
48
+ *
49
+ * @param props
50
+ * @throws unauthorized, internal_error
51
+ * @returns
52
+ */
53
+ static updateClosingDays(props: {
54
+ token?: string;
55
+ date: LocalDate;
56
+ time: LocalTime | "default";
57
+ isOpen: boolean;
58
+ }): Promise<void>;
59
+ /**
60
+ *
61
+ * @param props
62
+ * @throws unauthorized, internal_error
63
+ * @returns
64
+ */
65
+ static getClosingDays(props: {
66
+ token?: string;
67
+ }): Promise<ClosingDays>;
68
+ /**
69
+ *
70
+ * @param props
71
+ * @throws closed_business, unauthorized, internal_error
72
+ * @returns
73
+ */
74
+ static getTimeSlots(props: {
75
+ token?: string;
76
+ date: LocalDate;
77
+ }): Promise<TimeSlot[]>;
78
+ /**
79
+ *
80
+ * API for private admins
81
+ *
82
+ * */
46
83
  static getByIdPrivate(props: {
47
84
  token?: string;
48
85
  id: string;