starta.apiclient 1.37.3201 → 1.37.3202
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.
- package/lib/services/accounts.d.ts +4 -4
- package/lib/services/accounts.js +2 -2
- package/lib/services/organizations/index.d.ts +0 -1
- package/lib/services/organizations/index.js +0 -7
- package/lib/services/organizations/orders.d.ts +20 -12
- package/lib/services/organizations/orders.js +6 -6
- package/lib/services/organizations/public.d.ts +8 -2
- package/lib/services/organizations/public.js +2 -2
- package/package.json +1 -1
|
@@ -91,16 +91,16 @@ export default class Accounts {
|
|
|
91
91
|
getAllKeys(): Promise<import("../types").StartaResponse>;
|
|
92
92
|
getAddressSuggestions(login: string, term: string, language?: string): Promise<import("../types").StartaResponse>;
|
|
93
93
|
setStatus(login: string, status: 'client' | 'potentialOrganization' | 'hasOrganization' | 'onboarding' | 'trial' | 'license'): Promise<import("../types").StartaResponse>;
|
|
94
|
-
orders(login: string, { organizationLogin, from, to, status,
|
|
94
|
+
orders(login: string, { organizationLogin, from, to, status, products, sortColumn, sortDirection, statusOperator }: {
|
|
95
95
|
organizationLogin?: any;
|
|
96
96
|
from?: string;
|
|
97
97
|
to?: string;
|
|
98
98
|
status?: OrderStatus | OrderStatus[];
|
|
99
|
-
|
|
99
|
+
products?: Array<{
|
|
100
100
|
type?: string;
|
|
101
101
|
id?: string;
|
|
102
|
-
|
|
103
|
-
}
|
|
102
|
+
executors?: Array<string>;
|
|
103
|
+
}>;
|
|
104
104
|
statusOperator?: '$eq' | '$ne' | '$in' | '$nin';
|
|
105
105
|
sortDirection?: 'asc' | 'desc';
|
|
106
106
|
sortColumn?: 'starttime';
|
package/lib/services/accounts.js
CHANGED
|
@@ -221,14 +221,14 @@ class Accounts {
|
|
|
221
221
|
body: { status },
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
|
-
orders(login, { organizationLogin, from, to, status,
|
|
224
|
+
orders(login, { organizationLogin, from, to, status, products, sortColumn, sortDirection, statusOperator }) {
|
|
225
225
|
return this._requestRunner.performRequest({
|
|
226
226
|
url: `accounts/${login}/orders${(0, _helpers_1.buildQuery)({
|
|
227
227
|
organizationLogin,
|
|
228
228
|
from,
|
|
229
229
|
to,
|
|
230
230
|
status,
|
|
231
|
-
|
|
231
|
+
products,
|
|
232
232
|
sortColumn,
|
|
233
233
|
sortDirection,
|
|
234
234
|
statusOperator
|
|
@@ -89,7 +89,6 @@ export default class Organizations {
|
|
|
89
89
|
setForYearBonus(organizationLogin: string, bonusForYearUntil: string): Promise<import("../../types").StartaResponse>;
|
|
90
90
|
getBillingInfo(organizationLogin: string, month?: string): Promise<import("../../types").StartaResponse>;
|
|
91
91
|
setTariff(organizationLogin: string, { tariff, period, successUrl, cancelUrl }: TariffDetails): Promise<import("../../types").StartaResponse>;
|
|
92
|
-
getSMSCreditsPaymentLink(organizationLogin: string, creditsPackage: 'lite250' | 'pro250'): Promise<import("../../types").StartaResponse>;
|
|
93
92
|
get orders(): Orders;
|
|
94
93
|
get customers(): Customers;
|
|
95
94
|
get rooms(): Rooms;
|
|
@@ -202,13 +202,6 @@ class Organizations {
|
|
|
202
202
|
body: { tariff, period, successUrl, cancelUrl },
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
-
getSMSCreditsPaymentLink(organizationLogin, creditsPackage) {
|
|
206
|
-
return this._requestRunner.performRequest({
|
|
207
|
-
url: `accounts/${organizationLogin}/smsCreditsPaymentLink`,
|
|
208
|
-
method: 'GET',
|
|
209
|
-
body: { creditsPackage },
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
205
|
get orders() {
|
|
213
206
|
return new orders_1.default(this._requestRunner);
|
|
214
207
|
}
|
|
@@ -2,7 +2,7 @@ import { StartaRequestRunner, OrderStatus, OrderRepeatSettings } from '../../typ
|
|
|
2
2
|
export default class Orders {
|
|
3
3
|
private _requestRunner;
|
|
4
4
|
constructor(requestRunner: StartaRequestRunner);
|
|
5
|
-
index(organizationLogin:
|
|
5
|
+
index(organizationLogin: string, { from, to, status, startaCommissionMonth, product, sortColumn, sortDirection, statusOperator, needsToBeConfirmedByOrganization, needsToBeApprovedByCustomer, }: {
|
|
6
6
|
from?: string;
|
|
7
7
|
to?: string;
|
|
8
8
|
status?: OrderStatus | OrderStatus[];
|
|
@@ -10,7 +10,7 @@ export default class Orders {
|
|
|
10
10
|
product?: {
|
|
11
11
|
type?: string;
|
|
12
12
|
id?: string;
|
|
13
|
-
|
|
13
|
+
executors?: Array<string>;
|
|
14
14
|
};
|
|
15
15
|
statusOperator?: '$eq' | '$ne' | '$in' | '$nin';
|
|
16
16
|
sortDirection?: 'asc' | 'desc';
|
|
@@ -18,20 +18,24 @@ export default class Orders {
|
|
|
18
18
|
needsToBeConfirmedByOrganization?: boolean;
|
|
19
19
|
needsToBeApprovedByCustomer?: boolean;
|
|
20
20
|
}): Promise<import("../../types").StartaResponse>;
|
|
21
|
-
isTimeSlotAvailable(organizationLogin:
|
|
21
|
+
isTimeSlotAvailable(organizationLogin: string, { executor, starttime, endtime, skipOrderId, scheduleId }: {
|
|
22
22
|
executor: any;
|
|
23
23
|
starttime: any;
|
|
24
24
|
endtime: any;
|
|
25
25
|
skipOrderId: any;
|
|
26
26
|
scheduleId: any;
|
|
27
27
|
}): Promise<import("../../types").StartaResponse>;
|
|
28
|
-
get(organizationOrCustomerLogin:
|
|
29
|
-
add(organizationLogin:
|
|
30
|
-
|
|
28
|
+
get(organizationOrCustomerLogin: string, orderId: any): Promise<import("../../types").StartaResponse>;
|
|
29
|
+
add(organizationLogin: string, { products, starttime, endtime, customerId, price, duration, scheduleId, status, repeatSettings, discountType }: {
|
|
30
|
+
products: Array<{
|
|
31
31
|
type: any;
|
|
32
32
|
id: any;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
executors?: Array<string>;
|
|
34
|
+
amount?: number;
|
|
35
|
+
timeOffset?: number;
|
|
36
|
+
price?: number;
|
|
37
|
+
duration?: number;
|
|
38
|
+
}>;
|
|
35
39
|
starttime?: any;
|
|
36
40
|
endtime?: any;
|
|
37
41
|
customerId: any;
|
|
@@ -42,12 +46,16 @@ export default class Orders {
|
|
|
42
46
|
repeatSettings?: OrderRepeatSettings;
|
|
43
47
|
discountType?: 'relative' | 'absolute';
|
|
44
48
|
}): Promise<import("../../types").StartaResponse>;
|
|
45
|
-
update(organizationLogin: any, orderId: any, {
|
|
46
|
-
|
|
49
|
+
update(organizationLogin: any, orderId: any, { products, starttime, endtime, price, duration, scheduleId, status, repeatSettings, discountType }: {
|
|
50
|
+
products: Array<{
|
|
47
51
|
type: any;
|
|
48
52
|
id: any;
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
executors?: Array<string>;
|
|
54
|
+
amount?: number;
|
|
55
|
+
timeOffset?: number;
|
|
56
|
+
price?: number;
|
|
57
|
+
duration?: number;
|
|
58
|
+
}>;
|
|
51
59
|
starttime?: any;
|
|
52
60
|
endtime?: any;
|
|
53
61
|
price?: any;
|
|
@@ -5,14 +5,14 @@ class Orders {
|
|
|
5
5
|
constructor(requestRunner) {
|
|
6
6
|
this._requestRunner = requestRunner;
|
|
7
7
|
}
|
|
8
|
-
index(organizationLogin, { from, to, status, startaCommissionMonth, product
|
|
8
|
+
index(organizationLogin, { from, to, status, startaCommissionMonth, product, sortColumn, sortDirection, statusOperator, needsToBeConfirmedByOrganization, needsToBeApprovedByCustomer, }) {
|
|
9
9
|
return this._requestRunner.performRequest({
|
|
10
10
|
url: `accounts/${organizationLogin}/orders${(0, _helpers_1.buildQuery)({
|
|
11
11
|
from,
|
|
12
12
|
to,
|
|
13
13
|
status,
|
|
14
14
|
startaCommissionMonth,
|
|
15
|
-
product
|
|
15
|
+
product,
|
|
16
16
|
sortColumn,
|
|
17
17
|
sortDirection,
|
|
18
18
|
statusOperator,
|
|
@@ -40,12 +40,12 @@ class Orders {
|
|
|
40
40
|
method: 'GET',
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
add(organizationLogin, {
|
|
43
|
+
add(organizationLogin, { products, starttime, endtime, customerId, price, duration, scheduleId, status = 'new', repeatSettings, discountType }) {
|
|
44
44
|
return this._requestRunner.performRequest({
|
|
45
45
|
url: `accounts/${organizationLogin}/orders`,
|
|
46
46
|
method: 'POST',
|
|
47
47
|
body: {
|
|
48
|
-
|
|
48
|
+
products,
|
|
49
49
|
starttime,
|
|
50
50
|
endtime,
|
|
51
51
|
customerId,
|
|
@@ -58,12 +58,12 @@ class Orders {
|
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
update(organizationLogin, orderId, {
|
|
61
|
+
update(organizationLogin, orderId, { products, starttime, endtime, price, duration, scheduleId, status, repeatSettings, discountType }) {
|
|
62
62
|
return this._requestRunner.performRequest({
|
|
63
63
|
url: `accounts/${organizationLogin}/orders/${orderId}`,
|
|
64
64
|
method: 'PUT',
|
|
65
65
|
body: {
|
|
66
|
-
|
|
66
|
+
products,
|
|
67
67
|
starttime,
|
|
68
68
|
endtime,
|
|
69
69
|
price,
|
|
@@ -14,8 +14,14 @@ export default class Public {
|
|
|
14
14
|
rating: number;
|
|
15
15
|
text: string;
|
|
16
16
|
}): Promise<import("../../types").StartaResponse>;
|
|
17
|
-
createOrder(organizationLogin: any, {
|
|
18
|
-
|
|
17
|
+
createOrder(organizationLogin: any, { products, starttime, scheduleId, customerInfo }: {
|
|
18
|
+
products: Array<{
|
|
19
|
+
type: any;
|
|
20
|
+
id: any;
|
|
21
|
+
executors?: Array<string>;
|
|
22
|
+
amount?: number;
|
|
23
|
+
timeOffset?: number;
|
|
24
|
+
}>;
|
|
19
25
|
starttime: any;
|
|
20
26
|
scheduleId: any;
|
|
21
27
|
customerInfo?: {
|
|
@@ -36,11 +36,11 @@ class Public {
|
|
|
36
36
|
body: { rating, text },
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
createOrder(organizationLogin, {
|
|
39
|
+
createOrder(organizationLogin, { products, starttime, scheduleId, customerInfo }) {
|
|
40
40
|
return this._requestRunner.performRequest({
|
|
41
41
|
url: `accounts/${organizationLogin}/public/orders`,
|
|
42
42
|
method: 'POST',
|
|
43
|
-
body: {
|
|
43
|
+
body: { products, starttime, scheduleId, customerInfo },
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
}
|