starta.apiclient 1.37.952 → 1.37.969
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.
|
@@ -16,12 +16,13 @@ export default class Organizations {
|
|
|
16
16
|
index({ searchTerm }: {
|
|
17
17
|
searchTerm?: string;
|
|
18
18
|
}): Promise<import("../../types").StartaResponse>;
|
|
19
|
-
create(account: any, { login, name, currency, timeZone, orgType }: {
|
|
19
|
+
create(account: any, { login, name, currency, timeZone, orgType, country }: {
|
|
20
20
|
login: any;
|
|
21
21
|
name: any;
|
|
22
22
|
currency: any;
|
|
23
23
|
timeZone: any;
|
|
24
24
|
orgType: any;
|
|
25
|
+
country: any;
|
|
25
26
|
}): Promise<import("../../types").StartaResponse>;
|
|
26
27
|
update(account: any, { name, timeZone }: {
|
|
27
28
|
name: any;
|
|
@@ -24,11 +24,11 @@ var Organizations = /** @class */ (function () {
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
Organizations.prototype.create = function (account, _a) {
|
|
27
|
-
var login = _a.login, name = _a.name, currency = _a.currency, timeZone = _a.timeZone, orgType = _a.orgType;
|
|
27
|
+
var login = _a.login, name = _a.name, currency = _a.currency, timeZone = _a.timeZone, orgType = _a.orgType, country = _a.country;
|
|
28
28
|
return this._requestRunner.performRequest({
|
|
29
29
|
url: "accounts/".concat(account, "/organizations"),
|
|
30
30
|
method: 'POST',
|
|
31
|
-
body: { login: login, name: name, currency: currency, timeZone: timeZone, orgType: orgType },
|
|
31
|
+
body: { login: login, name: name, currency: currency, timeZone: timeZone, orgType: orgType, country: country },
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Organizations.prototype.update = function (account, _a) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { StartaRequestRunner } from '../../types';
|
|
2
|
-
export declare type OrderStatus = 'new' | 'inprogress' | 'canceled' | 'completed';
|
|
1
|
+
import { StartaRequestRunner, OrderStatus, OrderRepeatSettings } from '../../types';
|
|
3
2
|
export default class Orders {
|
|
4
3
|
private _requestRunner;
|
|
5
4
|
constructor(requestRunner: StartaRequestRunner);
|
|
@@ -21,7 +20,7 @@ export default class Orders {
|
|
|
21
20
|
scheduleId: any;
|
|
22
21
|
}): Promise<import("../../types").StartaResponse>;
|
|
23
22
|
get(organizationLogin: any, orderId: any): Promise<import("../../types").StartaResponse>;
|
|
24
|
-
add(organizationLogin: any, { product: { type, id, executor }, starttime, endtime, customerId, scheduleId, status }: {
|
|
23
|
+
add(organizationLogin: any, { product: { type, id, executor }, starttime, endtime, customerId, scheduleId, status, repeatSettings }: {
|
|
25
24
|
product: {
|
|
26
25
|
type: any;
|
|
27
26
|
id: any;
|
|
@@ -32,8 +31,9 @@ export default class Orders {
|
|
|
32
31
|
customerId: any;
|
|
33
32
|
scheduleId?: any;
|
|
34
33
|
status?: OrderStatus;
|
|
34
|
+
repeatSettings?: OrderRepeatSettings;
|
|
35
35
|
}): Promise<import("../../types").StartaResponse>;
|
|
36
|
-
update(organizationLogin: any, orderId: any, { product: { type, id, executor }, starttime, endtime, customerId, scheduleId, status }: {
|
|
36
|
+
update(organizationLogin: any, orderId: any, { product: { type, id, executor }, starttime, endtime, customerId, scheduleId, status, repeatSettings }: {
|
|
37
37
|
product: {
|
|
38
38
|
type: any;
|
|
39
39
|
id: any;
|
|
@@ -44,6 +44,7 @@ export default class Orders {
|
|
|
44
44
|
customerId: any;
|
|
45
45
|
scheduleId?: any;
|
|
46
46
|
status?: OrderStatus;
|
|
47
|
+
repeatSettings?: OrderRepeatSettings;
|
|
47
48
|
}): Promise<import("../../types").StartaResponse>;
|
|
48
49
|
delete(organizationLogin: any, orderId: any): Promise<import("../../types").StartaResponse>;
|
|
49
50
|
}
|
|
@@ -37,7 +37,7 @@ var Orders = /** @class */ (function () {
|
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
Orders.prototype.add = function (organizationLogin, _a) {
|
|
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
|
+
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, repeatSettings = _a.repeatSettings;
|
|
41
41
|
return this._requestRunner.performRequest({
|
|
42
42
|
url: "accounts/".concat(organizationLogin, "/orders"),
|
|
43
43
|
method: 'POST',
|
|
@@ -48,11 +48,12 @@ var Orders = /** @class */ (function () {
|
|
|
48
48
|
customerId: customerId,
|
|
49
49
|
scheduleId: scheduleId,
|
|
50
50
|
status: status,
|
|
51
|
+
repeatSettings: repeatSettings,
|
|
51
52
|
},
|
|
52
53
|
});
|
|
53
54
|
};
|
|
54
55
|
Orders.prototype.update = function (organizationLogin, orderId, _a) {
|
|
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;
|
|
56
|
+
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, repeatSettings = _a.repeatSettings;
|
|
56
57
|
return this._requestRunner.performRequest({
|
|
57
58
|
url: "accounts/".concat(organizationLogin, "/orders/").concat(orderId),
|
|
58
59
|
method: 'PUT',
|
|
@@ -63,6 +64,7 @@ var Orders = /** @class */ (function () {
|
|
|
63
64
|
customerId: customerId,
|
|
64
65
|
scheduleId: scheduleId,
|
|
65
66
|
status: status,
|
|
67
|
+
repeatSettings: repeatSettings,
|
|
66
68
|
},
|
|
67
69
|
});
|
|
68
70
|
};
|
package/lib/types.d.ts
CHANGED
|
@@ -73,3 +73,15 @@ export declare type OrganizationSchedule = {
|
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
+
export declare type OrderStatus = 'new' | 'inprogress' | 'canceled' | 'completed';
|
|
77
|
+
export declare type OrderRepeatSettings = {
|
|
78
|
+
interval: {
|
|
79
|
+
every: number;
|
|
80
|
+
unit: 'day' | 'week' | 'month';
|
|
81
|
+
};
|
|
82
|
+
filter?: Array<number>;
|
|
83
|
+
finish: {
|
|
84
|
+
type: 'never' | 'date' | 'times';
|
|
85
|
+
value?: Date | Number;
|
|
86
|
+
};
|
|
87
|
+
};
|