starta.apiclient 1.35.856 → 1.35.871
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.
|
@@ -9,9 +9,45 @@ import Payments from './payments';
|
|
|
9
9
|
import Dashboard from './dashboard';
|
|
10
10
|
import Public from './public';
|
|
11
11
|
import Integrations from './integrations';
|
|
12
|
+
export declare type OrganizationSchedule = {
|
|
13
|
+
name: any;
|
|
14
|
+
location: {
|
|
15
|
+
isOnline: any;
|
|
16
|
+
description: {
|
|
17
|
+
default: any;
|
|
18
|
+
};
|
|
19
|
+
address: {
|
|
20
|
+
id: any;
|
|
21
|
+
formattedAddress: any;
|
|
22
|
+
timezone: any;
|
|
23
|
+
name: any;
|
|
24
|
+
streetNumber: any;
|
|
25
|
+
streetName: any;
|
|
26
|
+
region: any;
|
|
27
|
+
city: any;
|
|
28
|
+
country: any;
|
|
29
|
+
zipCode: any;
|
|
30
|
+
appartment: any;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
schedule: {
|
|
34
|
+
weekly: {
|
|
35
|
+
mon: any;
|
|
36
|
+
tue: any;
|
|
37
|
+
wed: any;
|
|
38
|
+
thu: any;
|
|
39
|
+
fri: any;
|
|
40
|
+
sat: any;
|
|
41
|
+
sun: any;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
12
45
|
export default class Organizations {
|
|
13
46
|
private _requestRunner;
|
|
14
47
|
constructor(requestRunner: StartaRequestRunner);
|
|
48
|
+
index({ searchTerm }: {
|
|
49
|
+
searchTerm?: string;
|
|
50
|
+
}): Promise<import("../../types").StartaResponse>;
|
|
15
51
|
create(account: any, { login, name, currency, timeZone, orgType }: {
|
|
16
52
|
login: any;
|
|
17
53
|
name: any;
|
|
@@ -49,17 +85,7 @@ export default class Organizations {
|
|
|
49
85
|
theme: any;
|
|
50
86
|
}): Promise<import("../../types").StartaResponse>;
|
|
51
87
|
setBookingWidgetStyles(organizationLogin: any, bookingWidgetStyles: any): Promise<import("../../types").StartaResponse>;
|
|
52
|
-
|
|
53
|
-
weekly: {
|
|
54
|
-
mon: any;
|
|
55
|
-
tue: any;
|
|
56
|
-
wed: any;
|
|
57
|
-
thu: any;
|
|
58
|
-
fri: any;
|
|
59
|
-
sat: any;
|
|
60
|
-
sun: any;
|
|
61
|
-
};
|
|
62
|
-
}): Promise<import("../../types").StartaResponse>;
|
|
88
|
+
addSchedule(organizationLogin: any, { name, location: { isOnline, description, address: { id, formattedAddress, timezone, name: addressName, streetNumber, streetName, region, city, country, zipCode, appartment, } }, schedule: { weekly: { mon, tue, wed, thu, fri, sat, sun } } }: OrganizationSchedule): Promise<import("../../types").StartaResponse>;
|
|
63
89
|
getMembersSchedule(organizationLogin: any, date: any): Promise<import("../../types").StartaResponse>;
|
|
64
90
|
getSingleMemberSchedule(organizationLogin: any, member: any, from: any, to: any): Promise<import("../../types").StartaResponse>;
|
|
65
91
|
get orders(): Orders;
|
|
@@ -15,6 +15,13 @@ var Organizations = /** @class */ (function () {
|
|
|
15
15
|
function Organizations(requestRunner) {
|
|
16
16
|
this._requestRunner = requestRunner;
|
|
17
17
|
}
|
|
18
|
+
Organizations.prototype.index = function (_a) {
|
|
19
|
+
var searchTerm = _a.searchTerm;
|
|
20
|
+
return this._requestRunner.performRequest({
|
|
21
|
+
url: "organizations".concat((0, _helpers_1.buildQuery)({ searchTerm: searchTerm })),
|
|
22
|
+
method: 'GET',
|
|
23
|
+
});
|
|
24
|
+
};
|
|
18
25
|
Organizations.prototype.create = function (account, _a) {
|
|
19
26
|
var login = _a.login, name = _a.name, currency = _a.currency, timeZone = _a.timeZone, orgType = _a.orgType;
|
|
20
27
|
return this._requestRunner.performRequest({
|
|
@@ -128,12 +135,34 @@ var Organizations = /** @class */ (function () {
|
|
|
128
135
|
body: bookingWidgetStyles,
|
|
129
136
|
});
|
|
130
137
|
};
|
|
131
|
-
Organizations.prototype.
|
|
132
|
-
var _b = _a.weekly, mon =
|
|
138
|
+
Organizations.prototype.addSchedule = function (organizationLogin, _a) {
|
|
139
|
+
var name = _a.name, _b = _a.location, isOnline = _b.isOnline, description = _b.description, _c = _b.address, id = _c.id, formattedAddress = _c.formattedAddress, timezone = _c.timezone, addressName = _c.name, streetNumber = _c.streetNumber, streetName = _c.streetName, region = _c.region, city = _c.city, country = _c.country, zipCode = _c.zipCode, appartment = _c.appartment, _d = _a.schedule.weekly, mon = _d.mon, tue = _d.tue, wed = _d.wed, thu = _d.thu, fri = _d.fri, sat = _d.sat, sun = _d.sun;
|
|
133
140
|
return this._requestRunner.performRequest({
|
|
134
|
-
url: "accounts/".concat(organizationLogin, "/
|
|
135
|
-
method: '
|
|
136
|
-
body: {
|
|
141
|
+
url: "accounts/".concat(organizationLogin, "/schedules"),
|
|
142
|
+
method: 'POST',
|
|
143
|
+
body: {
|
|
144
|
+
name: name,
|
|
145
|
+
location: {
|
|
146
|
+
isOnline: isOnline,
|
|
147
|
+
description: description,
|
|
148
|
+
address: {
|
|
149
|
+
id: id,
|
|
150
|
+
formattedAddress: formattedAddress,
|
|
151
|
+
timezone: timezone,
|
|
152
|
+
name: addressName,
|
|
153
|
+
streetNumber: streetNumber,
|
|
154
|
+
streetName: streetName,
|
|
155
|
+
region: region,
|
|
156
|
+
city: city,
|
|
157
|
+
country: country,
|
|
158
|
+
zipCode: zipCode,
|
|
159
|
+
appartment: appartment,
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
schedule: {
|
|
163
|
+
weekly: { mon: mon, tue: tue, wed: wed, thu: thu, fri: fri, sat: sat, sun: sun }
|
|
164
|
+
}
|
|
165
|
+
},
|
|
137
166
|
});
|
|
138
167
|
};
|
|
139
168
|
Organizations.prototype.getMembersSchedule = function (organizationLogin, date /* YYYY-MM-DD */) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "starta.apiclient",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.871",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"description": "Wrapper for starta.one api",
|
|
6
6
|
"author": "Collaboracia OÜ",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"lib/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"axios": "^0.
|
|
18
|
+
"axios": "^0.24.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"prettier": "^2.5.1",
|