starta.apiclient 1.35.883 → 1.35.888

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.
@@ -43,7 +43,6 @@ export default class Organizations {
43
43
  }): Promise<import("../../types").StartaResponse>;
44
44
  setPhoneNumbersSettings(organizationLogin: any, phoneNumbersSettings: any): Promise<import("../../types").StartaResponse>;
45
45
  setOnboardingStepComplete(organizationLogin: any, step: any): Promise<import("../../types").StartaResponse>;
46
- setAddressSettings(organizationLogin: any, addressSettings: any): Promise<import("../../types").StartaResponse>;
47
46
  setDescription(organizationLogin: any, description: any): Promise<import("../../types").StartaResponse>;
48
47
  getBookingWidgetSettings(organizationLogin: any): Promise<import("../../types").StartaResponse>;
49
48
  setBookingWidgetSettings(organizationLogin: any, { enabled, bookingInterval, openButtonEnabled, theme }: {
@@ -55,6 +54,10 @@ export default class Organizations {
55
54
  setBookingWidgetStyles(organizationLogin: any, bookingWidgetStyles: any): Promise<import("../../types").StartaResponse>;
56
55
  getMembersSchedule(organizationLogin: any, date: any): Promise<import("../../types").StartaResponse>;
57
56
  getSingleMemberSchedule(organizationLogin: any, member: any, from: any, to: any): Promise<import("../../types").StartaResponse>;
57
+ updateRoles(organizationLogin: any, roles: any): Promise<import("../../types").StartaResponse>;
58
+ setLicense(organizationLogin: any, { maxMembers }: {
59
+ maxMembers: any;
60
+ }): Promise<import("../../types").StartaResponse>;
58
61
  get orders(): Orders;
59
62
  get customers(): Customers;
60
63
  get rooms(): Rooms;
@@ -66,8 +69,4 @@ export default class Organizations {
66
69
  get dashboard(): Dashboard;
67
70
  get integrations(): Integrations;
68
71
  get schedules(): Schedules;
69
- updateRoles(organizationLogin: any, roles: any): Promise<import("../../types").StartaResponse>;
70
- setLicense(organizationLogin: any, { maxMembers }: {
71
- maxMembers: any;
72
- }): Promise<import("../../types").StartaResponse>;
73
72
  }
@@ -101,13 +101,6 @@ var Organizations = /** @class */ (function () {
101
101
  method: 'PUT',
102
102
  });
103
103
  };
104
- Organizations.prototype.setAddressSettings = function (organizationLogin, addressSettings) {
105
- return this._requestRunner.performRequest({
106
- url: "accounts/".concat(organizationLogin, "/addressSettings"),
107
- method: 'PUT',
108
- body: { addressSettings: addressSettings },
109
- });
110
- };
111
104
  Organizations.prototype.setDescription = function (organizationLogin, description) {
112
105
  return this._requestRunner.performRequest({
113
106
  url: "accounts/".concat(organizationLogin, "/description"),
@@ -148,6 +141,21 @@ var Organizations = /** @class */ (function () {
148
141
  method: 'GET',
149
142
  });
150
143
  };
144
+ Organizations.prototype.updateRoles = function (organizationLogin, roles) {
145
+ return this._requestRunner.performRequest({
146
+ url: "accounts/".concat(organizationLogin, "/roles"),
147
+ method: 'PUT',
148
+ body: { roles: roles },
149
+ });
150
+ };
151
+ Organizations.prototype.setLicense = function (organizationLogin, _a) {
152
+ var maxMembers = _a.maxMembers;
153
+ return this._requestRunner.performRequest({
154
+ url: "accounts/".concat(organizationLogin, "/license"),
155
+ method: 'PUT',
156
+ body: { maxMembers: maxMembers },
157
+ });
158
+ };
151
159
  Object.defineProperty(Organizations.prototype, "orders", {
152
160
  get: function () {
153
161
  return new orders_1.default(this._requestRunner);
@@ -225,21 +233,6 @@ var Organizations = /** @class */ (function () {
225
233
  enumerable: false,
226
234
  configurable: true
227
235
  });
228
- Organizations.prototype.updateRoles = function (organizationLogin, roles) {
229
- return this._requestRunner.performRequest({
230
- url: "accounts/".concat(organizationLogin, "/roles"),
231
- method: 'PUT',
232
- body: { roles: roles },
233
- });
234
- };
235
- Organizations.prototype.setLicense = function (organizationLogin, _a) {
236
- var maxMembers = _a.maxMembers;
237
- return this._requestRunner.performRequest({
238
- url: "accounts/".concat(organizationLogin, "/license"),
239
- method: 'PUT',
240
- body: { maxMembers: maxMembers },
241
- });
242
- };
243
236
  return Organizations;
244
237
  }());
245
238
  exports.default = Organizations;
@@ -13,14 +13,15 @@ export default class Orders {
13
13
  executor?: string;
14
14
  };
15
15
  }): Promise<import("../../types").StartaResponse>;
16
- isTimeSlotAvailable(organizationLogin: any, { executor, starttime, endtime, skipOrderId }: {
16
+ isTimeSlotAvailable(organizationLogin: any, { executor, starttime, endtime, skipOrderId, scheduleId }: {
17
17
  executor: any;
18
18
  starttime: any;
19
19
  endtime: any;
20
20
  skipOrderId: any;
21
+ scheduleId: any;
21
22
  }): Promise<import("../../types").StartaResponse>;
22
23
  get(organizationLogin: any, orderId: any): Promise<import("../../types").StartaResponse>;
23
- add(organizationLogin: any, { product: { type, id, executor }, starttime, endtime, customerId, status }: {
24
+ add(organizationLogin: any, { product: { type, id, executor }, starttime, endtime, customerId, scheduleId, status }: {
24
25
  product: {
25
26
  type: any;
26
27
  id: any;
@@ -29,9 +30,10 @@ export default class Orders {
29
30
  starttime: any;
30
31
  endtime?: any;
31
32
  customerId: any;
33
+ scheduleId: any;
32
34
  status?: OrderStatus;
33
35
  }): Promise<import("../../types").StartaResponse>;
34
- update(organizationLogin: any, orderId: any, { product: { type, id, executor }, starttime, endtime, customerId, status }: {
36
+ update(organizationLogin: any, orderId: any, { product: { type, id, executor }, starttime, endtime, customerId, scheduleId, status }: {
35
37
  product: {
36
38
  type: any;
37
39
  id: any;
@@ -40,6 +42,7 @@ export default class Orders {
40
42
  starttime: any;
41
43
  endtime?: any;
42
44
  customerId: any;
45
+ scheduleId: any;
43
46
  status?: OrderStatus;
44
47
  }): Promise<import("../../types").StartaResponse>;
45
48
  delete(organizationLogin: any, orderId: any): Promise<import("../../types").StartaResponse>;
@@ -18,13 +18,14 @@ var Orders = /** @class */ (function () {
18
18
  });
19
19
  };
20
20
  Orders.prototype.isTimeSlotAvailable = function (organizationLogin, _a) {
21
- var executor = _a.executor, starttime = _a.starttime, endtime = _a.endtime, skipOrderId = _a.skipOrderId;
21
+ var executor = _a.executor, starttime = _a.starttime, endtime = _a.endtime, skipOrderId = _a.skipOrderId, scheduleId = _a.scheduleId;
22
22
  return this._requestRunner.performRequest({
23
23
  url: "accounts/".concat(organizationLogin, "/orders/is-time-slot-available").concat((0, _helpers_1.buildQuery)({
24
24
  executor: executor,
25
25
  starttime: starttime,
26
26
  endtime: endtime,
27
27
  skipOrderId: skipOrderId,
28
+ scheduleId: scheduleId,
28
29
  })),
29
30
  method: 'GET',
30
31
  });
@@ -36,7 +37,7 @@ var Orders = /** @class */ (function () {
36
37
  });
37
38
  };
38
39
  Orders.prototype.add = function (organizationLogin, _a) {
39
- var _b = _a.product, type = _b.type, id = _b.id, executor = _b.executor, starttime = _a.starttime, endtime = _a.endtime, customerId = _a.customerId, _c = _a.status, status = _c === void 0 ? 'new' : _c;
40
+ var _b = _a.product, type = _b.type, id = _b.id, executor = _b.executor, starttime = _a.starttime, endtime = _a.endtime, customerId = _a.customerId, scheduleId = _a.scheduleId, _c = _a.status, status = _c === void 0 ? 'new' : _c;
40
41
  return this._requestRunner.performRequest({
41
42
  url: "accounts/".concat(organizationLogin, "/orders"),
42
43
  method: 'POST',
@@ -45,12 +46,13 @@ var Orders = /** @class */ (function () {
45
46
  starttime: starttime,
46
47
  endtime: endtime,
47
48
  customerId: customerId,
49
+ scheduleId: scheduleId,
48
50
  status: status,
49
51
  },
50
52
  });
51
53
  };
52
54
  Orders.prototype.update = function (organizationLogin, orderId, _a) {
53
- var _b = _a.product, type = _b.type, id = _b.id, executor = _b.executor, starttime = _a.starttime, endtime = _a.endtime, customerId = _a.customerId, status = _a.status;
55
+ var _b = _a.product, type = _b.type, id = _b.id, executor = _b.executor, starttime = _a.starttime, endtime = _a.endtime, customerId = _a.customerId, scheduleId = _a.scheduleId, status = _a.status;
54
56
  return this._requestRunner.performRequest({
55
57
  url: "accounts/".concat(organizationLogin, "/orders/").concat(orderId),
56
58
  method: 'PUT',
@@ -59,6 +61,7 @@ var Orders = /** @class */ (function () {
59
61
  starttime: starttime,
60
62
  endtime: endtime,
61
63
  customerId: customerId,
64
+ scheduleId: scheduleId,
62
65
  status: status,
63
66
  },
64
67
  });
@@ -3,13 +3,19 @@ export default class Public {
3
3
  private _requestRunner;
4
4
  constructor(requestRunner: StartaRequestRunner);
5
5
  info(organizationLogin: any): Promise<import("../../types").StartaResponse>;
6
- getAvailableTimeSlots(organizationLogin: any, serviceId: any, executor: any, month: any): Promise<import("../../types").StartaResponse>;
6
+ getAvailableTimeSlots(organizationLogin: any, { serviceId, executor, month, scheduleId }: {
7
+ serviceId: any;
8
+ executor: any;
9
+ month: any;
10
+ scheduleId: any;
11
+ }): Promise<import("../../types").StartaResponse>;
7
12
  getOrder(organizationLogin: any, orderId: any): Promise<import("../../types").StartaResponse>;
8
13
  cancelOrder(organizationLogin: any, orderId: any): Promise<import("../../types").StartaResponse>;
9
14
  getOrders(organizationLogin: any): Promise<import("../../types").StartaResponse>;
10
- createOrder(organizationLogin: any, { customer, product, starttime }: {
15
+ createOrder(organizationLogin: any, { customer, product, starttime, scheduleId }: {
11
16
  customer?: any;
12
17
  product: any;
13
18
  starttime: any;
19
+ scheduleId: any;
14
20
  }): Promise<import("../../types").StartaResponse>;
15
21
  }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ var _helpers_1 = require("../_helpers");
3
4
  var Public = /** @class */ (function () {
4
5
  function Public(requestRunner) {
5
6
  this._requestRunner = requestRunner;
@@ -10,9 +11,15 @@ var Public = /** @class */ (function () {
10
11
  method: 'GET',
11
12
  });
12
13
  };
13
- Public.prototype.getAvailableTimeSlots = function (organizationLogin, serviceId, executor, month) {
14
+ Public.prototype.getAvailableTimeSlots = function (organizationLogin, _a) {
15
+ var serviceId = _a.serviceId, executor = _a.executor, month = _a.month, scheduleId = _a.scheduleId;
14
16
  return this._requestRunner.performRequest({
15
- url: "accounts/".concat(organizationLogin, "/public/availableTimeSlots?serviceId=").concat(serviceId, "&executor=").concat(executor, "&month=").concat(month),
17
+ url: "accounts/".concat(organizationLogin, "/public/availableTimeSlots").concat((0, _helpers_1.buildQuery)({
18
+ serviceId: serviceId,
19
+ executor: executor,
20
+ month: month,
21
+ scheduleId: scheduleId
22
+ })),
16
23
  method: 'GET',
17
24
  });
18
25
  };
@@ -36,11 +43,11 @@ var Public = /** @class */ (function () {
36
43
  });
37
44
  };
38
45
  Public.prototype.createOrder = function (organizationLogin, _a) {
39
- var customer = _a.customer, product = _a.product, starttime = _a.starttime;
46
+ var customer = _a.customer, product = _a.product, starttime = _a.starttime, scheduleId = _a.scheduleId;
40
47
  return this._requestRunner.performRequest({
41
48
  url: "accounts/".concat(organizationLogin, "/public/orders"),
42
49
  method: 'POST',
43
- body: { customer: customer, product: product, starttime: starttime },
50
+ body: { customer: customer, product: product, starttime: starttime, scheduleId: scheduleId },
44
51
  });
45
52
  };
46
53
  return Public;
@@ -2,6 +2,7 @@ import { StartaRequestRunner, OrganizationSchedule } from '../../types';
2
2
  export default class Schedules {
3
3
  private _requestRunner;
4
4
  constructor(requestRunner: StartaRequestRunner);
5
- updateRoles(organizationLogin: any, member: any, roles: any): Promise<import("../../types").StartaResponse>;
6
5
  add(organizationLogin: any, { name, location, schedule }: OrganizationSchedule): Promise<import("../../types").StartaResponse>;
6
+ update(organizationLogin: any, scheduleId: any, { name, location, schedule }: OrganizationSchedule): Promise<import("../../types").StartaResponse>;
7
+ delete(organizationLogin: any, scheduleId: any): Promise<import("../../types").StartaResponse>;
7
8
  }
@@ -4,13 +4,6 @@ var Schedules = /** @class */ (function () {
4
4
  function Schedules(requestRunner) {
5
5
  this._requestRunner = requestRunner;
6
6
  }
7
- Schedules.prototype.updateRoles = function (organizationLogin, member, roles) {
8
- return this._requestRunner.performRequest({
9
- url: "accounts/".concat(organizationLogin, "/members/").concat(member, "/roles"),
10
- method: 'PUT',
11
- body: { roles: roles },
12
- });
13
- };
14
7
  Schedules.prototype.add = function (organizationLogin, _a) {
15
8
  var name = _a.name, location = _a.location, schedule = _a.schedule;
16
9
  return this._requestRunner.performRequest({
@@ -23,6 +16,24 @@ var Schedules = /** @class */ (function () {
23
16
  },
24
17
  });
25
18
  };
19
+ Schedules.prototype.update = function (organizationLogin, scheduleId, _a) {
20
+ var name = _a.name, location = _a.location, schedule = _a.schedule;
21
+ return this._requestRunner.performRequest({
22
+ url: "accounts/".concat(organizationLogin, "/schedules/").concat(scheduleId),
23
+ method: 'PUT',
24
+ body: {
25
+ name: name,
26
+ location: location,
27
+ schedule: schedule,
28
+ },
29
+ });
30
+ };
31
+ Schedules.prototype.delete = function (organizationLogin, scheduleId) {
32
+ return this._requestRunner.performRequest({
33
+ url: "accounts/".concat(organizationLogin, "/schedules/").concat(scheduleId),
34
+ method: 'DELETE'
35
+ });
36
+ };
26
37
  return Schedules;
27
38
  }());
28
39
  exports.default = Schedules;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.35.883",
3
+ "version": "1.35.888",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",