starta.apiclient 1.35.842 → 1.35.849

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.
@@ -12,12 +12,10 @@ import Integrations from './integrations';
12
12
  export default class Organizations {
13
13
  private _requestRunner;
14
14
  constructor(requestRunner: StartaRequestRunner);
15
- create(account: any, { login, name, currency, isPrivate, description, timeZone, orgType }: {
15
+ create(account: any, { login, name, currency, timeZone, orgType }: {
16
16
  login: any;
17
17
  name: any;
18
18
  currency: any;
19
- isPrivate: any;
20
- description: any;
21
19
  timeZone: any;
22
20
  orgType: any;
23
21
  }): Promise<import("../../types").StartaResponse>;
@@ -29,12 +27,12 @@ export default class Organizations {
29
27
  getPermissionGroups(organizationLogin: any): Promise<import("../../types").StartaResponse>;
30
28
  changeBanner(login: any, file: any): Promise<import("../../types").StartaResponse>;
31
29
  addMember(organizationLogin: any, { account, login }: {
32
- account: any;
33
- login: any;
30
+ account?: any;
31
+ login?: any;
34
32
  }): Promise<import("../../types").StartaResponse>;
35
33
  deleteMember(organizationLogin: any, memberLogin: any): Promise<import("../../types").StartaResponse>;
36
34
  setCategories(organizationLogin: any, { categories }: {
37
- categories?: never[] | undefined;
35
+ categories: string[];
38
36
  }): Promise<import("../../types").StartaResponse>;
39
37
  setOrgType(organizationLogin: any, { orgType }: {
40
38
  orgType: 'individual' | 'corporate';
@@ -16,11 +16,11 @@ var Organizations = /** @class */ (function () {
16
16
  this._requestRunner = requestRunner;
17
17
  }
18
18
  Organizations.prototype.create = function (account, _a) {
19
- var login = _a.login, name = _a.name, currency = _a.currency, isPrivate = _a.isPrivate, description = _a.description, timeZone = _a.timeZone, orgType = _a.orgType;
19
+ var login = _a.login, name = _a.name, currency = _a.currency, timeZone = _a.timeZone, orgType = _a.orgType;
20
20
  return this._requestRunner.performRequest({
21
21
  url: "accounts/".concat(account, "/organizations"),
22
22
  method: 'POST',
23
- body: { login: login, name: name, currency: currency, isPrivate: isPrivate, description: description, timeZone: timeZone, orgType: orgType },
23
+ body: { login: login, name: name, currency: currency, timeZone: timeZone, orgType: orgType },
24
24
  });
25
25
  };
26
26
  Organizations.prototype.update = function (account, _a) {
@@ -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.849",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",