starta.apiclient 1.36.919 → 1.37.930

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.
@@ -10,27 +10,26 @@ export default class Accounts {
10
10
  }): Promise<import("../types").StartaResponse>;
11
11
  getMainData(login: string): Promise<import("../types").StartaResponse>;
12
12
  serviceProviders(login: string): Promise<import("../types").StartaResponse>;
13
- createViaSocialNetwork({ email, login, socialNetworksKey, authMethod, acceptedTermsAndConditions, reffererId }: {
13
+ createViaSocialNetwork({ email, login, socialNetworksKey, authMethod, acceptedTermsAndConditions, referralId }: {
14
14
  email: any;
15
15
  login: any;
16
16
  socialNetworksKey: any;
17
- authMethod?: string | undefined;
17
+ authMethod: 'cookie' | 'header';
18
18
  acceptedTermsAndConditions: any;
19
- reffererId: any;
19
+ referralId?: any;
20
20
  }): Promise<import("../types").StartaResponse>;
21
- create({ email, login, password, passwordConfirm, firstName, lastName, key, phone, authMethod, recaptchaToken, acceptedTermsAndConditions, reffererId, }: {
21
+ create({ email, login, password, passwordConfirm, firstName, lastName, phone, authMethod, recaptchaToken, acceptedTermsAndConditions, referralId, }: {
22
22
  email: any;
23
23
  login: any;
24
24
  password: any;
25
25
  passwordConfirm: any;
26
- firstName: any;
27
- lastName: any;
28
- key: any;
29
- phone: any;
30
- authMethod?: string | undefined;
26
+ firstName?: any;
27
+ lastName?: any;
28
+ phone?: any;
29
+ authMethod: 'cookie' | 'header';
31
30
  recaptchaToken: any;
32
31
  acceptedTermsAndConditions: any;
33
- reffererId: any;
32
+ referralId?: any;
34
33
  }): Promise<import("../types").StartaResponse>;
35
34
  changePassword(login: string, { currentPassword, newPassword }: {
36
35
  currentPassword: any;
@@ -26,7 +26,7 @@ var Accounts = /** @class */ (function () {
26
26
  });
27
27
  };
28
28
  Accounts.prototype.createViaSocialNetwork = function (_a) {
29
- var email = _a.email, login = _a.login, socialNetworksKey = _a.socialNetworksKey, _b = _a.authMethod, authMethod = _b === void 0 ? 'cookie' : _b, acceptedTermsAndConditions = _a.acceptedTermsAndConditions, reffererId = _a.reffererId;
29
+ var email = _a.email, login = _a.login, socialNetworksKey = _a.socialNetworksKey, _b = _a.authMethod, authMethod = _b === void 0 ? 'cookie' : _b, acceptedTermsAndConditions = _a.acceptedTermsAndConditions, referralId = _a.referralId;
30
30
  return this._requestRunner.performRequest({
31
31
  url: "accounts/sn",
32
32
  method: 'POST',
@@ -36,12 +36,12 @@ var Accounts = /** @class */ (function () {
36
36
  socialNetworksKey: socialNetworksKey,
37
37
  authMethod: authMethod,
38
38
  acceptedTermsAndConditions: acceptedTermsAndConditions,
39
- reffererId: reffererId,
39
+ referralId: referralId,
40
40
  },
41
41
  });
42
42
  };
43
43
  Accounts.prototype.create = function (_a) {
44
- var email = _a.email, login = _a.login, password = _a.password, passwordConfirm = _a.passwordConfirm, firstName = _a.firstName, lastName = _a.lastName, key = _a.key, phone = _a.phone, _b = _a.authMethod, authMethod = _b === void 0 ? 'cookie' : _b, recaptchaToken = _a.recaptchaToken, acceptedTermsAndConditions = _a.acceptedTermsAndConditions, reffererId = _a.reffererId;
44
+ var email = _a.email, login = _a.login, password = _a.password, passwordConfirm = _a.passwordConfirm, firstName = _a.firstName, lastName = _a.lastName, phone = _a.phone, _b = _a.authMethod, authMethod = _b === void 0 ? 'cookie' : _b, recaptchaToken = _a.recaptchaToken, acceptedTermsAndConditions = _a.acceptedTermsAndConditions, referralId = _a.referralId;
45
45
  return this._requestRunner.performRequest({
46
46
  url: "accounts",
47
47
  method: 'POST',
@@ -52,12 +52,11 @@ var Accounts = /** @class */ (function () {
52
52
  passwordConfirm: passwordConfirm,
53
53
  firstName: firstName,
54
54
  lastName: lastName,
55
- key: key,
56
55
  phone: phone,
57
56
  authMethod: authMethod,
58
57
  recaptchaToken: recaptchaToken,
59
58
  acceptedTermsAndConditions: acceptedTermsAndConditions,
60
- reffererId: reffererId,
59
+ referralId: referralId,
61
60
  },
62
61
  });
63
62
  };
@@ -6,9 +6,8 @@ export default class Payments {
6
6
  signature: any;
7
7
  data: any;
8
8
  }): Promise<import("../../types").StartaResponse>;
9
- addManual(organizationLogin: any, { orderId, currency, date, amount, method }: {
9
+ addManual(organizationLogin: any, { orderId, date, amount, method }: {
10
10
  orderId: any;
11
- currency: any;
12
11
  date: any;
13
12
  amount: any;
14
13
  method: any;
@@ -16,7 +16,7 @@ var Payments = /** @class */ (function () {
16
16
  });
17
17
  };
18
18
  Payments.prototype.addManual = function (organizationLogin, _a) {
19
- var orderId = _a.orderId, currency = _a.currency, date = _a.date, amount = _a.amount, method = _a.method;
19
+ var orderId = _a.orderId, date = _a.date, amount = _a.amount, method = _a.method;
20
20
  return this._requestRunner.performRequest({
21
21
  url: "accounts/".concat(organizationLogin, "/payments/manual"),
22
22
  method: 'POST',
@@ -1,8 +1,8 @@
1
- import { StartaRequestRunner } from '../../types';
1
+ import { StartaRequestRunner, DraftjsObject } from '../../types';
2
2
  export default class Services {
3
3
  private _requestRunner;
4
4
  constructor(requestRunner: StartaRequestRunner);
5
- add(organizationLogin: any, { name, image, price, allowCancellationByCustomer, disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours, duration, executors }: {
5
+ add(organizationLogin: any, { name, image, price, allowCancellationByCustomer, disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours, duration, executors, description, }: {
6
6
  name: {
7
7
  default: string;
8
8
  [key: string]: string;
@@ -20,8 +20,14 @@ export default class Services {
20
20
  duration?: number;
21
21
  }
22
22
  ];
23
+ description: {
24
+ default?: DraftjsObject;
25
+ 'en-us'?: DraftjsObject;
26
+ 'uk-ua'?: DraftjsObject;
27
+ 'ru-ru'?: DraftjsObject;
28
+ };
23
29
  }): Promise<import("../../types").StartaResponse>;
24
- update(organizationLogin: any, serviceId: any, { name, image, price, allowCancellationByCustomer, disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours, duration, executors }: {
30
+ update(organizationLogin: any, serviceId: any, { name, image, price, allowCancellationByCustomer, disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours, duration, executors, description, }: {
25
31
  name: {
26
32
  default: string;
27
33
  [key: string]: string;
@@ -39,6 +45,12 @@ export default class Services {
39
45
  duration?: number;
40
46
  }
41
47
  ];
48
+ description: {
49
+ default?: DraftjsObject;
50
+ 'en-us'?: DraftjsObject;
51
+ 'uk-ua'?: DraftjsObject;
52
+ 'ru-ru'?: DraftjsObject;
53
+ };
42
54
  }): Promise<import("../../types").StartaResponse>;
43
55
  delete(organizationLogin: any, serviceId: any): Promise<import("../../types").StartaResponse>;
44
56
  }
@@ -5,7 +5,7 @@ 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, allowCancellationByCustomer = _a.allowCancellationByCustomer, disableCancellationByCustomerPriorHours = _a.disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours = _a.disableBookingByCustomerPriorHours, duration = _a.duration, executors = _a.executors;
8
+ var name = _a.name, image = _a.image, price = _a.price, allowCancellationByCustomer = _a.allowCancellationByCustomer, disableCancellationByCustomerPriorHours = _a.disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours = _a.disableBookingByCustomerPriorHours, duration = _a.duration, executors = _a.executors, description = _a.description;
9
9
  return this._requestRunner.performRequest({
10
10
  url: "accounts/".concat(organizationLogin, "/services"),
11
11
  method: 'POST',
@@ -18,11 +18,12 @@ var Services = /** @class */ (function () {
18
18
  allowCancellationByCustomer: allowCancellationByCustomer,
19
19
  disableCancellationByCustomerPriorHours: disableCancellationByCustomerPriorHours,
20
20
  disableBookingByCustomerPriorHours: disableBookingByCustomerPriorHours,
21
+ description: description,
21
22
  },
22
23
  });
23
24
  };
24
25
  Services.prototype.update = function (organizationLogin, serviceId, _a) {
25
- var name = _a.name, image = _a.image, price = _a.price, allowCancellationByCustomer = _a.allowCancellationByCustomer, disableCancellationByCustomerPriorHours = _a.disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours = _a.disableBookingByCustomerPriorHours, duration = _a.duration, executors = _a.executors;
26
+ var name = _a.name, image = _a.image, price = _a.price, allowCancellationByCustomer = _a.allowCancellationByCustomer, disableCancellationByCustomerPriorHours = _a.disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours = _a.disableBookingByCustomerPriorHours, duration = _a.duration, executors = _a.executors, description = _a.description;
26
27
  return this._requestRunner.performRequest({
27
28
  url: "accounts/".concat(organizationLogin, "/services/").concat(serviceId),
28
29
  method: 'PUT',
@@ -35,6 +36,7 @@ var Services = /** @class */ (function () {
35
36
  allowCancellationByCustomer: allowCancellationByCustomer,
36
37
  disableCancellationByCustomerPriorHours: disableCancellationByCustomerPriorHours,
37
38
  disableBookingByCustomerPriorHours: disableBookingByCustomerPriorHours,
39
+ description: description,
38
40
  },
39
41
  });
40
42
  };
package/lib/types.d.ts CHANGED
@@ -3,6 +3,10 @@ export interface StartaRequestRunner {
3
3
  performRequest: (requestData: StartaRequestData) => Promise<StartaResponse>;
4
4
  setAuthHeaderToken: (token: string) => void;
5
5
  }
6
+ export declare type DraftjsObject = {
7
+ blocks: any;
8
+ entityMap: any;
9
+ };
6
10
  export declare type StartaRequestData = {
7
11
  url: string;
8
12
  method: Method;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.36.919",
3
+ "version": "1.37.930",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",