@kiminix/tp-client 2.30.0 → 2.32.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 (34) hide show
  1. package/dist/business/admin/api/patch-business-api.d.ts +32 -0
  2. package/dist/{menus/admin/api/update-template-api.js → business/admin/api/patch-business-api.js} +22 -14
  3. package/dist/business/apis.d.ts +0 -5
  4. package/dist/business/apis.js +1 -20
  5. package/dist/business/index.d.ts +1 -0
  6. package/dist/business/index.js +2 -0
  7. package/dist/business/types/shared.d.ts +4 -2
  8. package/dist/menus/admin/admin-apis.d.ts +1 -1
  9. package/dist/menus/admin/admin-apis.js +1 -1
  10. package/dist/menus/admin/api/create-orders-api.d.ts +2 -2
  11. package/dist/menus/admin/api/create-orders-api.js +1 -1
  12. package/dist/menus/admin/api/{create-qrcodes-api.d.ts → create-tables-api.d.ts} +3 -3
  13. package/dist/menus/admin/api/{create-qrcodes-api.js → create-tables-api.js} +6 -6
  14. package/dist/menus/admin/api/get-tables-api.d.ts +11 -0
  15. package/dist/menus/admin/api/{get-qrcodes-api.js → get-tables-api.js} +6 -6
  16. package/dist/menus/admin/api/{patch-qrcodes-api.d.ts → patch-tables-api.d.ts} +4 -4
  17. package/dist/menus/admin/api/{patch-qrcodes-api.js → patch-tables-api.js} +7 -7
  18. package/dist/menus/admin/api/search-orders-api.d.ts +1 -1
  19. package/dist/menus/admin/api/update-order-api.d.ts +1 -1
  20. package/dist/menus/admin/types/get-calls-response.d.ts +2 -2
  21. package/dist/menus/index.d.ts +3 -4
  22. package/dist/menus/index.js +3 -4
  23. package/dist/menus/shared/types.d.ts +2 -2
  24. package/dist/menus/user/guest-apis.d.ts +2 -2
  25. package/dist/menus/user/guest-apis.js +2 -2
  26. package/dist/menus/user/types/post-call-waiter-request.d.ts +1 -1
  27. package/dist/menus/user/types/post-order.d.ts +1 -1
  28. package/dist/styles/background-patterns.d.ts +2 -1
  29. package/dist/styles/background-patterns.js +9 -5
  30. package/package.json +2 -2
  31. package/dist/business/types/update-business.d.ts +0 -12
  32. package/dist/business/types/update-business.js +0 -1
  33. package/dist/menus/admin/api/get-qrcodes-api.d.ts +0 -11
  34. package/dist/menus/admin/api/update-template-api.d.ts +0 -19
@@ -0,0 +1,32 @@
1
+ import { Patch } from "../../../utils/patch-utils";
2
+ import { OpeningHours, SocialLinks, TemplateLayout } from "../../types/shared";
3
+ /**
4
+ * patch order fields
5
+ *
6
+ * @param token
7
+ * @param id
8
+ * @param status
9
+ */
10
+ export declare class PatchBusinessAdminAPI {
11
+ static patch(props: {
12
+ token: string;
13
+ request: PatchBusinessAdminAPI.Request;
14
+ }): Promise<void>;
15
+ }
16
+ export declare namespace PatchBusinessAdminAPI {
17
+ interface Request {
18
+ name?: Patch<string> | undefined;
19
+ identifier?: Patch<string> | undefined;
20
+ address?: Patch<string> | undefined;
21
+ phones?: Patch<string[]> | undefined;
22
+ openingHours?: Patch<OpeningHours> | undefined;
23
+ socialLinks?: Patch<SocialLinks> | undefined;
24
+ googleMapsUrl?: Patch<string> | undefined;
25
+ googleMapsReviewLink?: Patch<string> | undefined;
26
+ logo?: Patch<string> | undefined;
27
+ coverPhoto?: Patch<string> | undefined;
28
+ templateLayout?: Patch<TemplateLayout> | undefined;
29
+ templateThemeColors?: Patch<string> | undefined;
30
+ templateBackgroundPatterns?: Patch<string> | undefined;
31
+ }
32
+ }
@@ -38,27 +38,35 @@ import axios from "axios";
38
38
  import { base } from "../../../constants";
39
39
  import { RequestUtils } from "../../../utils/request-utils";
40
40
  /**
41
- * update template
42
- * @error internal_error
41
+ * patch order fields
42
+ *
43
43
  * @param token
44
+ * @param id
45
+ * @param status
44
46
  */
45
- var UpdateTemplateAdminAPI = /** @class */ (function () {
46
- function UpdateTemplateAdminAPI() {
47
+ var PatchBusinessAdminAPI = /** @class */ (function () {
48
+ function PatchBusinessAdminAPI() {
47
49
  }
48
- UpdateTemplateAdminAPI.update = function (props) {
50
+ PatchBusinessAdminAPI.patch = function (props) {
49
51
  return __awaiter(this, void 0, void 0, function () {
52
+ var _this = this;
50
53
  return __generator(this, function (_a) {
51
- return [2 /*return*/, RequestUtils.send(function () {
52
- return axios.patch(base + "/menus/admin/templates", props.request, {
53
- headers: {
54
- 'Authorization': "".concat(props.token)
54
+ return [2 /*return*/, RequestUtils.send(function () { return __awaiter(_this, void 0, void 0, function () {
55
+ return __generator(this, function (_a) {
56
+ switch (_a.label) {
57
+ case 0: return [4 /*yield*/, axios.patch(base + "/business", props.request, {
58
+ headers: {
59
+ 'Authorization': "".concat(props.token)
60
+ }
61
+ })
62
+ .then(function (_) { return undefined; })];
63
+ case 1: return [2 /*return*/, _a.sent()];
55
64
  }
56
- })
57
- .then(function (_) { return undefined; });
58
- })];
65
+ });
66
+ }); })];
59
67
  });
60
68
  });
61
69
  };
62
- return UpdateTemplateAdminAPI;
70
+ return PatchBusinessAdminAPI;
63
71
  }());
64
- export { UpdateTemplateAdminAPI };
72
+ export { PatchBusinessAdminAPI };
@@ -1,11 +1,6 @@
1
1
  import { AllBusiness } from "./types/get-all";
2
2
  import { Business } from "./types/get-id";
3
- import { PatchBusinessRequest } from "./types/update-business";
4
3
  export declare class BusinessAPIs {
5
4
  static getAll(timestamp: number, page?: number, size?: number): Promise<AllBusiness[]>;
6
5
  static get(identifier: string): Promise<Business | undefined>;
7
- static patch(props: {
8
- token: string;
9
- request: PatchBusinessRequest;
10
- }): Promise<void>;
11
6
  }
@@ -39,6 +39,7 @@ import { parseISO } from "date-fns";
39
39
  import { base } from "../constants";
40
40
  import { RequestUtils } from "../utils/request-utils";
41
41
  // business module APIs
42
+ //TODO to be refactored into multiple api files in admin/api folder
42
43
  var BusinessAPIs = /** @class */ (function () {
43
44
  function BusinessAPIs() {
44
45
  }
@@ -87,26 +88,6 @@ var BusinessAPIs = /** @class */ (function () {
87
88
  });
88
89
  });
89
90
  };
90
- BusinessAPIs.patch = function (props) {
91
- return __awaiter(this, void 0, void 0, function () {
92
- var _this = this;
93
- return __generator(this, function (_a) {
94
- return [2 /*return*/, RequestUtils.send(function () { return __awaiter(_this, void 0, void 0, function () {
95
- return __generator(this, function (_a) {
96
- switch (_a.label) {
97
- case 0: return [4 /*yield*/, axios.patch(base + "/business", props.request, {
98
- headers: {
99
- 'Authorization': "".concat(props.token)
100
- }
101
- })
102
- .then(function (_) { return undefined; })];
103
- case 1: return [2 /*return*/, _a.sent()];
104
- }
105
- });
106
- }); })];
107
- });
108
- });
109
- };
110
91
  return BusinessAPIs;
111
92
  }());
112
93
  export { BusinessAPIs };
@@ -2,3 +2,4 @@ export * from "./types/get-all";
2
2
  export * from "./types/get-id";
3
3
  export { BusinessAPIs } from './apis';
4
4
  export { BusinessAdminAPIs } from './admin-apis';
5
+ export * from "./admin/api/patch-business-api";
@@ -2,3 +2,5 @@ export * from "./types/get-all";
2
2
  export * from "./types/get-id";
3
3
  export { BusinessAPIs } from './apis';
4
4
  export { BusinessAdminAPIs } from './admin-apis';
5
+ // admin apis
6
+ export * from "./admin/api/patch-business-api";
@@ -24,7 +24,9 @@ export interface SocialLinks {
24
24
  youtube?: string | undefined;
25
25
  website?: string | undefined;
26
26
  }
27
+ export type TemplateLayout = "slider" | "list";
27
28
  export interface Template {
28
- id: string;
29
- theme?: string | undefined;
29
+ layout: TemplateLayout;
30
+ themeColors?: string | undefined;
31
+ backgroundPattern?: string | undefined;
30
32
  }
@@ -16,6 +16,6 @@ export declare class MenuAdminAPIs {
16
16
  static setUnauthorizedDevice(props: {
17
17
  token?: string;
18
18
  deviceId: string;
19
- qrCodeId: string;
19
+ tableId: string;
20
20
  }): Promise<undefined>;
21
21
  }
@@ -87,7 +87,7 @@ var MenuAdminAPIs = /** @class */ (function () {
87
87
  return [2 /*return*/, RequestUtils.send(function () {
88
88
  return axios.post(base + "/menus/admin/unauthorized", {
89
89
  deviceId: props.deviceId,
90
- qrCodeId: props.qrCodeId
90
+ tableId: props.tableId
91
91
  }, {
92
92
  headers: {
93
93
  'Authorization': "".concat(props.token)
@@ -2,7 +2,7 @@ export declare class CreateOrdersAdminAPI {
2
2
  /**
3
3
  *
4
4
  * @param props
5
- * @throws unauthorized_action, item_unavailable, item_not_found,variant_not_found, qrcode_not_found, internal_error
5
+ * @throws unauthorized_action, item_unavailable, item_not_found,variant_not_found, table_not_found, internal_error
6
6
  *
7
7
  * @returns
8
8
  */
@@ -13,7 +13,7 @@ export declare class CreateOrdersAdminAPI {
13
13
  }
14
14
  export declare namespace CreateOrdersAdminAPI {
15
15
  interface Request {
16
- qrCodeId?: string | undefined;
16
+ tableId?: string | undefined;
17
17
  items: OrderItem[];
18
18
  }
19
19
  interface OrderItem {
@@ -43,7 +43,7 @@ var CreateOrdersAdminAPI = /** @class */ (function () {
43
43
  /**
44
44
  *
45
45
  * @param props
46
- * @throws unauthorized_action, item_unavailable, item_not_found,variant_not_found, qrcode_not_found, internal_error
46
+ * @throws unauthorized_action, item_unavailable, item_not_found,variant_not_found, table_not_found, internal_error
47
47
  *
48
48
  * @returns
49
49
  */
@@ -1,4 +1,4 @@
1
- export declare class CreateQRCodeAdminAPI {
1
+ export declare class CreateTableAdminAPI {
2
2
  /**
3
3
  *
4
4
  * @param props
@@ -8,10 +8,10 @@ export declare class CreateQRCodeAdminAPI {
8
8
  */
9
9
  static create(props: {
10
10
  token?: string;
11
- request: CreateQRCodeAdminAPI.Request;
11
+ request: CreateTableAdminAPI.Request;
12
12
  }): Promise<void>;
13
13
  }
14
- export declare namespace CreateQRCodeAdminAPI {
14
+ export declare namespace CreateTableAdminAPI {
15
15
  interface Request {
16
16
  label: string;
17
17
  }
@@ -37,8 +37,8 @@ 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
- var CreateQRCodeAdminAPI = /** @class */ (function () {
41
- function CreateQRCodeAdminAPI() {
40
+ var CreateTableAdminAPI = /** @class */ (function () {
41
+ function CreateTableAdminAPI() {
42
42
  }
43
43
  /**
44
44
  *
@@ -47,11 +47,11 @@ var CreateQRCodeAdminAPI = /** @class */ (function () {
47
47
  *
48
48
  * @returns
49
49
  */
50
- CreateQRCodeAdminAPI.create = function (props) {
50
+ CreateTableAdminAPI.create = function (props) {
51
51
  return __awaiter(this, void 0, void 0, function () {
52
52
  return __generator(this, function (_a) {
53
53
  return [2 /*return*/, RequestUtils.send(function () {
54
- return axios.post(base + "/menus/admin/qrcodes", props.request, {
54
+ return axios.post(base + "/menus/admin/tables", props.request, {
55
55
  headers: {
56
56
  'Authorization': "".concat(props.token)
57
57
  }
@@ -61,6 +61,6 @@ var CreateQRCodeAdminAPI = /** @class */ (function () {
61
61
  });
62
62
  });
63
63
  };
64
- return CreateQRCodeAdminAPI;
64
+ return CreateTableAdminAPI;
65
65
  }());
66
- export { CreateQRCodeAdminAPI };
66
+ export { CreateTableAdminAPI };
@@ -0,0 +1,11 @@
1
+ export declare class GetTablesAdminAPI {
2
+ static get(props: {
3
+ token?: string;
4
+ }): Promise<GetTablesAdminAPI.Table[]>;
5
+ }
6
+ export declare namespace GetTablesAdminAPI {
7
+ interface Table {
8
+ id: string;
9
+ label: string;
10
+ }
11
+ }
@@ -37,14 +37,14 @@ 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
- var GetQrCodesAdminAPI = /** @class */ (function () {
41
- function GetQrCodesAdminAPI() {
40
+ var GetTablesAdminAPI = /** @class */ (function () {
41
+ function GetTablesAdminAPI() {
42
42
  }
43
- GetQrCodesAdminAPI.get = function (props) {
43
+ GetTablesAdminAPI.get = function (props) {
44
44
  return __awaiter(this, void 0, void 0, function () {
45
45
  return __generator(this, function (_a) {
46
46
  return [2 /*return*/, RequestUtils.send(function () {
47
- return axios.get(base + "/menus/admin/qrcodes", {
47
+ return axios.get(base + "/menus/admin/tables", {
48
48
  headers: {
49
49
  'Authorization': "".concat(props.token)
50
50
  }
@@ -54,6 +54,6 @@ var GetQrCodesAdminAPI = /** @class */ (function () {
54
54
  });
55
55
  });
56
56
  };
57
- return GetQrCodesAdminAPI;
57
+ return GetTablesAdminAPI;
58
58
  }());
59
- export { GetQrCodesAdminAPI };
59
+ export { GetTablesAdminAPI };
@@ -1,17 +1,17 @@
1
- export declare class PatchQRCodeAdminAPI {
1
+ export declare class PatchTableAdminAPI {
2
2
  /**
3
3
  *
4
4
  * @param props
5
- * @throws unauthorized_action, internal_error, qrcode_not_found
5
+ * @throws unauthorized_action, internal_error, table_not_found
6
6
  *
7
7
  * @returns
8
8
  */
9
9
  static patch(props: {
10
10
  token?: string;
11
- request: PatchQRCodeAdminAPI.Request;
11
+ request: PatchTableAdminAPI.Request;
12
12
  }): Promise<void>;
13
13
  }
14
- export declare namespace PatchQRCodeAdminAPI {
14
+ export declare namespace PatchTableAdminAPI {
15
15
  interface Request {
16
16
  id: string;
17
17
  label?: string | undefined;
@@ -37,21 +37,21 @@ 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
- var PatchQRCodeAdminAPI = /** @class */ (function () {
41
- function PatchQRCodeAdminAPI() {
40
+ var PatchTableAdminAPI = /** @class */ (function () {
41
+ function PatchTableAdminAPI() {
42
42
  }
43
43
  /**
44
44
  *
45
45
  * @param props
46
- * @throws unauthorized_action, internal_error, qrcode_not_found
46
+ * @throws unauthorized_action, internal_error, table_not_found
47
47
  *
48
48
  * @returns
49
49
  */
50
- PatchQRCodeAdminAPI.patch = function (props) {
50
+ PatchTableAdminAPI.patch = function (props) {
51
51
  return __awaiter(this, void 0, void 0, function () {
52
52
  return __generator(this, function (_a) {
53
53
  return [2 /*return*/, RequestUtils.send(function () {
54
- return axios.patch(base + "/menus/admin/qrcodes", props.request, {
54
+ return axios.patch(base + "/menus/admin/tables", props.request, {
55
55
  headers: {
56
56
  'Authorization': "".concat(props.token)
57
57
  }
@@ -61,6 +61,6 @@ var PatchQRCodeAdminAPI = /** @class */ (function () {
61
61
  });
62
62
  });
63
63
  };
64
- return PatchQRCodeAdminAPI;
64
+ return PatchTableAdminAPI;
65
65
  }());
66
- export { PatchQRCodeAdminAPI };
66
+ export { PatchTableAdminAPI };
@@ -10,7 +10,7 @@ export declare namespace SearchOrdersAdminAPI {
10
10
  interface Request {
11
11
  timestamp: number;
12
12
  status: OrderStatus[];
13
- qrcodes?: string[] | undefined;
13
+ tables?: string[] | undefined;
14
14
  isLinkedToBill?: boolean | undefined;
15
15
  page: number;
16
16
  size?: number | undefined;
@@ -14,7 +14,7 @@ export declare namespace UpdateOrderAdminAPI {
14
14
  interface Request {
15
15
  id: string;
16
16
  status: OrderStatus;
17
- qrcodeId?: string | undefined;
17
+ tableId?: string | undefined;
18
18
  items: OrderItem[];
19
19
  }
20
20
  interface OrderItem {
@@ -1,7 +1,7 @@
1
1
  export interface CallWaiter {
2
2
  id: string;
3
- qrCodeLabel: string;
4
- qrCodeId: string;
3
+ tableLabel: string;
4
+ tableId: string;
5
5
  deviceId: string;
6
6
  status: CallWaiterStatus;
7
7
  createdAt: string;
@@ -3,23 +3,22 @@ export * from "./user/types/get-menu-response";
3
3
  export * from "./user/types/post-call-waiter-request";
4
4
  export * from "./user/types/post-order";
5
5
  export * from "./admin/api/create-orders-api";
6
- export * from "./admin/api/create-qrcodes-api";
6
+ export * from "./admin/api/create-tables-api";
7
7
  export * from "./admin/api/delete-categories-api";
8
8
  export * from "./admin/api/delete-products-api";
9
9
  export * from "./admin/api/get-menu-api";
10
10
  export * from "./admin/api/get-order-by-id-api";
11
11
  export * from "./admin/api/get-product-api";
12
- export * from "./admin/api/get-qrcodes-api";
12
+ export * from "./admin/api/get-tables-api";
13
13
  export * from "./admin/api/patch-categories-indices-api";
14
14
  export * from "./admin/api/patch-order-api";
15
15
  export * from "./admin/api/patch-product-api";
16
16
  export * from "./admin/api/patch-product-indices-api";
17
- export * from "./admin/api/patch-qrcodes-api";
17
+ export * from "./admin/api/patch-tables-api";
18
18
  export * from "./admin/api/search-orders-api";
19
19
  export * from "./admin/api/statistic/bills-recap-api";
20
20
  export * from "./admin/api/statistic/products-recap-api";
21
21
  export * from "./admin/api/update-order-api";
22
- export * from "./admin/api/update-template-api";
23
22
  export * from "./admin/api/upsert-categories-api";
24
23
  export * from "./admin/api/upsert-product-api";
25
24
  export * from "./admin/types/get-calls-response";
@@ -5,23 +5,22 @@ export * from "./user/types/post-call-waiter-request";
5
5
  export * from "./user/types/post-order";
6
6
  // admin module
7
7
  export * from "./admin/api/create-orders-api";
8
- export * from "./admin/api/create-qrcodes-api";
8
+ export * from "./admin/api/create-tables-api";
9
9
  export * from "./admin/api/delete-categories-api";
10
10
  export * from "./admin/api/delete-products-api";
11
11
  export * from "./admin/api/get-menu-api";
12
12
  export * from "./admin/api/get-order-by-id-api";
13
13
  export * from "./admin/api/get-product-api";
14
- export * from "./admin/api/get-qrcodes-api";
14
+ export * from "./admin/api/get-tables-api";
15
15
  export * from "./admin/api/patch-categories-indices-api";
16
16
  export * from "./admin/api/patch-order-api";
17
17
  export * from "./admin/api/patch-product-api";
18
18
  export * from "./admin/api/patch-product-indices-api";
19
- export * from "./admin/api/patch-qrcodes-api";
19
+ export * from "./admin/api/patch-tables-api";
20
20
  export * from "./admin/api/search-orders-api";
21
21
  export * from "./admin/api/statistic/bills-recap-api";
22
22
  export * from "./admin/api/statistic/products-recap-api";
23
23
  export * from "./admin/api/update-order-api";
24
- export * from "./admin/api/update-template-api";
25
24
  export * from "./admin/api/upsert-categories-api";
26
25
  export * from "./admin/api/upsert-product-api";
27
26
  export * from "./admin/types/get-calls-response";
@@ -1,7 +1,7 @@
1
1
  import { OrderStatus } from "../../enum";
2
2
  export interface Order {
3
3
  id: string;
4
- qrcode?: Order.Qrcode | undefined;
4
+ table?: Order.Table | undefined;
5
5
  deviceId?: string | undefined;
6
6
  billId?: string | undefined;
7
7
  status: OrderStatus;
@@ -10,7 +10,7 @@ export interface Order {
10
10
  items: Order.Item[];
11
11
  }
12
12
  export declare namespace Order {
13
- interface Qrcode {
13
+ interface Table {
14
14
  id: string;
15
15
  label: string;
16
16
  }
@@ -8,7 +8,7 @@ export declare class MenuGuestAPIs {
8
8
  /**
9
9
  *
10
10
  * @param props
11
- * @throws unauthorized_action, pending_limit_exceeded, item_unavailable, item_not_found, variant_not_found , qrcode_not_found, internal_error
11
+ * @throws unauthorized_action, pending_limit_exceeded, item_unavailable, item_not_found, variant_not_found , table_not_found, internal_error
12
12
  *
13
13
  * @returns
14
14
  */
@@ -36,7 +36,7 @@ export declare class MenuGuestAPIs {
36
36
  /**
37
37
  *
38
38
  * @param data
39
- * @throws unauthorized_action, pending_limit_exceeded, qrcode_not_found, internal_error
39
+ * @throws unauthorized_action, pending_limit_exceeded, table_not_found, internal_error
40
40
  * @returns
41
41
  */
42
42
  static callWaiter(data: PostCallWaiter): Promise<void>;
@@ -67,7 +67,7 @@ var MenuGuestAPIs = /** @class */ (function () {
67
67
  /**
68
68
  *
69
69
  * @param props
70
- * @throws unauthorized_action, pending_limit_exceeded, item_unavailable, item_not_found, variant_not_found , qrcode_not_found, internal_error
70
+ * @throws unauthorized_action, pending_limit_exceeded, item_unavailable, item_not_found, variant_not_found , table_not_found, internal_error
71
71
  *
72
72
  * @returns
73
73
  */
@@ -140,7 +140,7 @@ var MenuGuestAPIs = /** @class */ (function () {
140
140
  /**
141
141
  *
142
142
  * @param data
143
- * @throws unauthorized_action, pending_limit_exceeded, qrcode_not_found, internal_error
143
+ * @throws unauthorized_action, pending_limit_exceeded, table_not_found, internal_error
144
144
  * @returns
145
145
  */
146
146
  MenuGuestAPIs.callWaiter = function (data) {
@@ -1,4 +1,4 @@
1
1
  export interface PostCallWaiter {
2
2
  deviceId: string;
3
- qrCodeId: string;
3
+ tableId: string;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  export interface OrderRequest {
2
- qrCodeId: string;
2
+ tableId: string;
3
3
  deviceId: string;
4
4
  name?: string | undefined;
5
5
  items: OrderRequestItem[];
@@ -4,7 +4,7 @@ export interface BackgroundProps {
4
4
  name: string;
5
5
  style: () => CSSProperties;
6
6
  }
7
- export declare namespace BackgroundStyle {
7
+ export declare namespace BackgroundPatterns {
8
8
  export const registry: {
9
9
  foods: {
10
10
  name: string;
@@ -156,6 +156,7 @@ export declare namespace BackgroundStyle {
156
156
  };
157
157
  };
158
158
  export const all: BackgroundProps[];
159
+ export function get(id: string): BackgroundProps | undefined;
159
160
  function foods(): React.CSSProperties;
160
161
  function bubbles(): React.CSSProperties;
161
162
  function dots(): React.CSSProperties;
@@ -13,9 +13,9 @@ function readThemeColor(cssVar, fallback) {
13
13
  }
14
14
  // all patterns functions are inspired from :
15
15
  // https://heropatterns.com/
16
- export var BackgroundStyle;
17
- (function (BackgroundStyle) {
18
- BackgroundStyle.registry = {
16
+ export var BackgroundPatterns;
17
+ (function (BackgroundPatterns) {
18
+ BackgroundPatterns.registry = {
19
19
  foods: { name: 'Foods', style: foods },
20
20
  bubbles: { name: 'Bubbles', style: bubbles },
21
21
  dots: { name: 'Dots', style: dots },
@@ -54,10 +54,14 @@ export var BackgroundStyle;
54
54
  topography: { name: 'Topography', style: topography },
55
55
  pieFactory: { name: 'Pie Factory', style: pieFactory },
56
56
  };
57
- BackgroundStyle.all = Object.entries(BackgroundStyle.registry).map(function (_a) {
57
+ BackgroundPatterns.all = Object.entries(BackgroundPatterns.registry).map(function (_a) {
58
58
  var id = _a[0], _b = _a[1], name = _b.name, style = _b.style;
59
59
  return ({ id: id, name: name, style: style });
60
60
  });
61
+ function get(id) {
62
+ return BackgroundPatterns.all.find(function (p) { return p.id === id; });
63
+ }
64
+ BackgroundPatterns.get = get;
61
65
  function foods() {
62
66
  var fg = readThemeColor('--c-primary-300');
63
67
  return {
@@ -317,4 +321,4 @@ export var BackgroundStyle;
317
321
  backgroundImage: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='".concat(fg, "' fill-opacity='0.3' fill-rule='nonzero'%3E%3Cpath d='M29 58.58l7.38-7.39A30.95 30.95 0 0 1 29 37.84a30.95 30.95 0 0 1-7.38 13.36l7.37 7.38zm1.4 1.41l.01.01h-2.84l-7.37-7.38A30.95 30.95 0 0 1 6.84 60H0v-1.02a28.9 28.9 0 0 0 18.79-7.78L0 32.41v-4.84L18.78 8.79A28.9 28.9 0 0 0 0 1.02V0h6.84a30.95 30.95 0 0 1 13.35 7.38L27.57 0h2.84l7.39 7.38A30.95 30.95 0 0 1 51.16 0H60v27.58-.01V60h-8.84a30.95 30.95 0 0 1-13.37-7.4L30.4 60zM29 1.41l-7.4 7.38A30.95 30.95 0 0 1 29 22.16 30.95 30.95 0 0 1 36.38 8.8L29 1.4zM58 1A28.9 28.9 0 0 0 39.2 8.8L58 27.58V1.02zm-20.2 9.2A28.9 28.9 0 0 0 30.02 29h26.56L37.8 10.21zM30.02 31a28.9 28.9 0 0 0 7.77 18.79l18.79-18.79H30.02zm9.18 20.2A28.9 28.9 0 0 0 58 59V32.4L39.2 51.19zm-19-1.4a28.9 28.9 0 0 0 7.78-18.8H1.41l18.8 18.8zm7.78-20.8A28.9 28.9 0 0 0 20.2 10.2L1.41 29h26.57z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")"),
318
322
  };
319
323
  }
320
- })(BackgroundStyle || (BackgroundStyle = {}));
324
+ })(BackgroundPatterns || (BackgroundPatterns = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "2.30.0",
3
+ "version": "2.32.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -28,4 +28,4 @@
28
28
  "date-fns": "^4.1.0",
29
29
  "purify-ts": "^2.1.0"
30
30
  }
31
- }
31
+ }
@@ -1,12 +0,0 @@
1
- import { Patch } from "../../utils/patch-utils";
2
- import { OpeningHours, SocialLinks } from "./shared";
3
- export interface PatchBusinessRequest {
4
- name?: Patch<string> | undefined;
5
- identifier?: Patch<string> | undefined;
6
- address?: Patch<string> | undefined;
7
- phones?: Patch<string[]> | undefined;
8
- openingHours?: Patch<OpeningHours> | undefined;
9
- socialLinks?: Patch<SocialLinks> | undefined;
10
- googleMapsUrl?: Patch<string> | undefined;
11
- googleMapsReviewLink?: Patch<string> | undefined;
12
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- export declare class GetQrCodesAdminAPI {
2
- static get(props: {
3
- token?: string;
4
- }): Promise<GetQrCodesAdminAPI.QrCode[]>;
5
- }
6
- export declare namespace GetQrCodesAdminAPI {
7
- interface QrCode {
8
- id: string;
9
- label: string;
10
- }
11
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * update template
3
- * @error internal_error
4
- * @param token
5
- */
6
- export declare class UpdateTemplateAdminAPI {
7
- static update(props: {
8
- token?: string;
9
- request: UpdateTemplateAdminAPI.Request;
10
- }): Promise<undefined>;
11
- }
12
- export declare namespace UpdateTemplateAdminAPI {
13
- interface Request {
14
- id?: string | undefined;
15
- theme?: string | undefined;
16
- logo?: string | undefined;
17
- coverPhoto?: string | undefined;
18
- }
19
- }