starta.apiclient 1.112.12824 → 1.112.12825
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StartaRequestRunner, OrderStatus, OrderData } from '../../types';
|
|
1
|
+
import { StartaRequestRunner, OrderStatus, OrderData, PaymentStatus, ComparisonOperator, SortDirection } from '../../types';
|
|
2
2
|
export default class Orders {
|
|
3
3
|
private _requestRunner;
|
|
4
4
|
constructor(requestRunner: StartaRequestRunner);
|
|
@@ -14,8 +14,8 @@ export default class Orders {
|
|
|
14
14
|
id?: string;
|
|
15
15
|
executors?: Array<string>;
|
|
16
16
|
};
|
|
17
|
-
statusOperator?:
|
|
18
|
-
sortDirection?:
|
|
17
|
+
statusOperator?: ComparisonOperator;
|
|
18
|
+
sortDirection?: SortDirection;
|
|
19
19
|
sortColumn?: 'incrementId' | 'starttime' | 'price' | 'createdAt';
|
|
20
20
|
needsToBeConfirmedByOrganization?: boolean;
|
|
21
21
|
needsToBeApprovedByCustomer?: boolean;
|
|
@@ -23,8 +23,8 @@ export default class Orders {
|
|
|
23
23
|
searchQuery?: string;
|
|
24
24
|
reviewFilter?: 'with' | 'without';
|
|
25
25
|
customerId?: string;
|
|
26
|
-
paymentStatusOperator?:
|
|
27
|
-
paymentStatus?:
|
|
26
|
+
paymentStatusOperator?: ComparisonOperator;
|
|
27
|
+
paymentStatus?: PaymentStatus | PaymentStatus[];
|
|
28
28
|
}): Promise<import("../../types").StartaResponse>;
|
|
29
29
|
isTimeSlotAvailable(organizationLogin: string, { executor, starttime, endtime, skipOrderId, scheduleId, resources, }: {
|
|
30
30
|
scheduleId: string;
|
|
@@ -10,6 +10,7 @@ export default class Techcards {
|
|
|
10
10
|
isEnabled?: boolean;
|
|
11
11
|
type?: TechcardType;
|
|
12
12
|
}): Promise<import("../../types").StartaResponse>;
|
|
13
|
+
get(organizationLogin: string, techcardId: string): Promise<import("../../types").StartaResponse>;
|
|
13
14
|
update(organizationLogin: string, techcardId: string, techcard: Techcard): Promise<import("../../types").StartaResponse>;
|
|
14
15
|
delete(organizationLogin: string, techcardId: string): Promise<import("../../types").StartaResponse>;
|
|
15
16
|
}
|
|
@@ -18,6 +18,12 @@ class Techcards {
|
|
|
18
18
|
method: 'GET',
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
get(organizationLogin, techcardId) {
|
|
22
|
+
return this._requestRunner.performRequest({
|
|
23
|
+
url: `accounts/${organizationLogin}/techcards/${techcardId}`,
|
|
24
|
+
method: 'GET',
|
|
25
|
+
});
|
|
26
|
+
}
|
|
21
27
|
update(organizationLogin, techcardId, techcard) {
|
|
22
28
|
return this._requestRunner.performRequest({
|
|
23
29
|
url: `accounts/${organizationLogin}/techcards/${techcardId}`,
|
package/lib/types.d.ts
CHANGED
|
@@ -192,7 +192,10 @@ export type OrganizationSchedule = {
|
|
|
192
192
|
enabled: boolean;
|
|
193
193
|
}>;
|
|
194
194
|
};
|
|
195
|
+
export type SortDirection = 'asc' | 'desc';
|
|
196
|
+
export type ComparisonOperator = '$eq' | '$ne' | '$in' | '$nin';
|
|
195
197
|
export type OrderStatus = 'new' | 'inprogress' | 'canceled' | 'completed';
|
|
198
|
+
export type PaymentStatus = 'paid' | 'not_paid' | 'partially_paid';
|
|
196
199
|
export type OrderRepeatSettings = {
|
|
197
200
|
enabled: boolean;
|
|
198
201
|
interval: {
|