starta.apiclient 1.37.3187 → 1.37.3201
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 +1 -0
- package/lib/services/organizations/index.js +7 -0
- package/lib/services/organizations/orders.d.ts +10 -10
- package/lib/services/organizations/orders.js +6 -6
- package/lib/services/organizations/public.d.ts +2 -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, product: { type, id, executor }, sortColumn, sortDirection, statusOperator }: {
|
|
95
95
|
organizationLogin?: any;
|
|
96
96
|
from?: string;
|
|
97
97
|
to?: string;
|
|
98
98
|
status?: OrderStatus | OrderStatus[];
|
|
99
|
-
|
|
99
|
+
product?: {
|
|
100
100
|
type?: string;
|
|
101
101
|
id?: string;
|
|
102
|
-
|
|
103
|
-
}
|
|
102
|
+
executor?: 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, product: { type, id, executor } = {}, 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
|
+
product: { type, id, executor },
|
|
232
232
|
sortColumn,
|
|
233
233
|
sortDirection,
|
|
234
234
|
statusOperator
|
|
@@ -89,6 +89,7 @@ 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>;
|
|
92
93
|
get orders(): Orders;
|
|
93
94
|
get customers(): Customers;
|
|
94
95
|
get rooms(): Rooms;
|
|
@@ -202,6 +202,13 @@ 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
|
+
}
|
|
205
212
|
get orders() {
|
|
206
213
|
return new orders_1.default(this._requestRunner);
|
|
207
214
|
}
|
|
@@ -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: any, { from, to, status, startaCommissionMonth, product, sortColumn, sortDirection, statusOperator, needsToBeConfirmedByOrganization, needsToBeApprovedByCustomer, }: {
|
|
5
|
+
index(organizationLogin: any, { from, to, status, startaCommissionMonth, product: { type, id, executor }, 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
|
+
executor?: string;
|
|
14
14
|
};
|
|
15
15
|
statusOperator?: '$eq' | '$ne' | '$in' | '$nin';
|
|
16
16
|
sortDirection?: 'asc' | 'desc';
|
|
@@ -26,12 +26,12 @@ export default class Orders {
|
|
|
26
26
|
scheduleId: any;
|
|
27
27
|
}): Promise<import("../../types").StartaResponse>;
|
|
28
28
|
get(organizationOrCustomerLogin: any, orderId: any): Promise<import("../../types").StartaResponse>;
|
|
29
|
-
add(organizationLogin: any, {
|
|
30
|
-
|
|
29
|
+
add(organizationLogin: any, { product: { type, id, executor }, starttime, endtime, customerId, price, duration, scheduleId, status, repeatSettings, discountType }: {
|
|
30
|
+
product: {
|
|
31
31
|
type: any;
|
|
32
32
|
id: any;
|
|
33
|
-
|
|
34
|
-
}
|
|
33
|
+
executor?: any;
|
|
34
|
+
};
|
|
35
35
|
starttime?: any;
|
|
36
36
|
endtime?: any;
|
|
37
37
|
customerId: any;
|
|
@@ -42,12 +42,12 @@ export default class Orders {
|
|
|
42
42
|
repeatSettings?: OrderRepeatSettings;
|
|
43
43
|
discountType?: 'relative' | 'absolute';
|
|
44
44
|
}): Promise<import("../../types").StartaResponse>;
|
|
45
|
-
update(organizationLogin: any, orderId: any, {
|
|
46
|
-
|
|
45
|
+
update(organizationLogin: any, orderId: any, { product: { type, id, executor }, starttime, endtime, price, duration, scheduleId, status, repeatSettings, discountType }: {
|
|
46
|
+
product: {
|
|
47
47
|
type: any;
|
|
48
48
|
id: any;
|
|
49
|
-
|
|
50
|
-
}
|
|
49
|
+
executor?: any;
|
|
50
|
+
};
|
|
51
51
|
starttime?: any;
|
|
52
52
|
endtime?: any;
|
|
53
53
|
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, sortColumn, sortDirection, statusOperator, needsToBeConfirmedByOrganization, needsToBeApprovedByCustomer, }) {
|
|
8
|
+
index(organizationLogin, { from, to, status, startaCommissionMonth, product: { type, id, executor } = {}, 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: { type, id, executor },
|
|
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, { product: { type, id, executor }, 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
|
+
product: { type, id, executor },
|
|
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, { product: { type, id, executor }, 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
|
+
product: { type, id, executor },
|
|
67
67
|
starttime,
|
|
68
68
|
endtime,
|
|
69
69
|
price,
|
|
@@ -14,8 +14,8 @@ 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, { product, starttime, scheduleId, customerInfo }: {
|
|
18
|
+
product: any;
|
|
19
19
|
starttime: any;
|
|
20
20
|
scheduleId: any;
|
|
21
21
|
customerInfo?: {
|
|
@@ -36,11 +36,11 @@ class Public {
|
|
|
36
36
|
body: { rating, text },
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
createOrder(organizationLogin, {
|
|
39
|
+
createOrder(organizationLogin, { product, starttime, scheduleId, customerInfo }) {
|
|
40
40
|
return this._requestRunner.performRequest({
|
|
41
41
|
url: `accounts/${organizationLogin}/public/orders`,
|
|
42
42
|
method: 'POST',
|
|
43
|
-
body: {
|
|
43
|
+
body: { product, starttime, scheduleId, customerInfo },
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
}
|