starta.apiclient 1.35.842 → 1.35.846

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,21 +2,35 @@ import { StartaRequestRunner } from '../../types';
2
2
  export default class Services {
3
3
  private _requestRunner;
4
4
  constructor(requestRunner: StartaRequestRunner);
5
- add(organizationLogin: any, { name, image, price, duration, executors, translations }: {
6
- name: any;
7
- image: any;
8
- price: any;
9
- duration: any;
10
- executors: any;
11
- translations: any;
5
+ add(organizationLogin: any, { name, image, price, allowCancellationByCustomer, disableCancellationByCustomerPriorHours, duration, executors }: {
6
+ name: string;
7
+ image?: string;
8
+ price: string;
9
+ allowCancellationByCustomer?: boolean;
10
+ disableCancellationByCustomerPriorHours?: number;
11
+ duration: number;
12
+ executors: [
13
+ {
14
+ login: string;
15
+ price?: number;
16
+ duration?: number;
17
+ }
18
+ ];
12
19
  }): Promise<import("../../types").StartaResponse>;
13
- update(organizationLogin: any, serviceId: any, { name, image, price, duration, executors, translations }: {
14
- name: any;
15
- image: any;
16
- price: any;
17
- duration: any;
18
- executors: any;
19
- translations: any;
20
+ update(organizationLogin: any, serviceId: any, { name, image, price, allowCancellationByCustomer, disableCancellationByCustomerPriorHours, duration, executors }: {
21
+ name: string;
22
+ image?: string;
23
+ price: string;
24
+ allowCancellationByCustomer?: boolean;
25
+ disableCancellationByCustomerPriorHours?: number;
26
+ duration: number;
27
+ executors: [
28
+ {
29
+ login: string;
30
+ price?: number;
31
+ duration?: number;
32
+ }
33
+ ];
20
34
  }): Promise<import("../../types").StartaResponse>;
21
35
  delete(organizationLogin: any, serviceId: any): Promise<import("../../types").StartaResponse>;
22
36
  }
@@ -5,19 +5,35 @@ var Services = /** @class */ (function () {
5
5
  this._requestRunner = requestRunner;
6
6
  }
7
7
  Services.prototype.add = function (organizationLogin, _a) {
8
- var name = _a.name, image = _a.image, price = _a.price, duration = _a.duration, executors = _a.executors, translations = _a.translations;
8
+ var name = _a.name, image = _a.image, price = _a.price, allowCancellationByCustomer = _a.allowCancellationByCustomer, disableCancellationByCustomerPriorHours = _a.disableCancellationByCustomerPriorHours, duration = _a.duration, executors = _a.executors;
9
9
  return this._requestRunner.performRequest({
10
10
  url: "accounts/".concat(organizationLogin, "/services"),
11
11
  method: 'POST',
12
- body: { name: name, image: image, price: price, duration: duration, executors: executors, translations: translations },
12
+ body: {
13
+ name: name,
14
+ image: image,
15
+ price: price,
16
+ duration: duration,
17
+ executors: executors,
18
+ allowCancellationByCustomer: allowCancellationByCustomer,
19
+ disableCancellationByCustomerPriorHours: disableCancellationByCustomerPriorHours,
20
+ },
13
21
  });
14
22
  };
15
23
  Services.prototype.update = function (organizationLogin, serviceId, _a) {
16
- var name = _a.name, image = _a.image, price = _a.price, duration = _a.duration, executors = _a.executors, translations = _a.translations;
24
+ var name = _a.name, image = _a.image, price = _a.price, allowCancellationByCustomer = _a.allowCancellationByCustomer, disableCancellationByCustomerPriorHours = _a.disableCancellationByCustomerPriorHours, duration = _a.duration, executors = _a.executors;
17
25
  return this._requestRunner.performRequest({
18
26
  url: "accounts/".concat(organizationLogin, "/services/").concat(serviceId),
19
27
  method: 'PUT',
20
- body: { name: name, image: image, price: price, duration: duration, executors: executors, translations: translations },
28
+ body: {
29
+ name: name,
30
+ image: image,
31
+ price: price,
32
+ duration: duration,
33
+ executors: executors,
34
+ allowCancellationByCustomer: allowCancellationByCustomer,
35
+ disableCancellationByCustomerPriorHours: disableCancellationByCustomerPriorHours,
36
+ },
21
37
  });
22
38
  };
23
39
  Services.prototype.delete = function (organizationLogin, serviceId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.35.842",
3
+ "version": "1.35.846",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",