@chrt-inc/typescript-sdk 1.983.0 → 1.990.0
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/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/listing/resources/bidThreads/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/listing/resources/bidThreads/client/Client.js +6 -6
- package/dist/cjs/api/resources/listing/resources/driverBiddingGroups/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/listing/resources/driverBiddingGroups/client/Client.js +1 -1
- package/dist/cjs/api/resources/listing/resources/orgBiddingGroups/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/listing/resources/orgBiddingGroups/client/Client.js +1 -1
- package/dist/cjs/api/resources/operations/resources/departments/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/operations/resources/departments/client/Client.js +6 -2
- package/dist/cjs/api/resources/operations/resources/departments/client/requests/DepartmentsListV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.d.ts +5 -3
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.js +13 -5
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListsApplyToOrderV1Request.d.ts +4 -1
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListsListV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.d.ts +19 -2
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.js +79 -4
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientCreate1.d.ts +1 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksExpandedListV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/{shipping/resources/orders/client/requests/OrdersUpdateDepartmentReq.d.ts → operations/resources/operationsTasks/client/requests/OperationsTasksUpdateDepartmentManyReq.d.ts} +5 -2
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/orgs/client/Client.js +11 -2
- package/dist/cjs/api/resources/orgs/client/requests/OrgsListMembersV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +29 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +146 -16
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListOrgMembersAndDriversV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.ts +6 -0
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/requests/OrderTemplateNewClientCreate1.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/requests/OrderTemplateNewClientUpdate1.d.ts +1 -2
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +7 -6
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +14 -10
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersUpdateDepartmentsReq.d.ts +10 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersUpdateDepartmentsReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/OrdersOpenDraftReq.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +17 -7
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.ts +6 -5
- package/dist/cjs/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.d.ts +3 -5
- package/dist/cjs/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.js +5 -7
- package/dist/cjs/api/resources/shipping/resources/orders/resources/taskGroup/client/requests/OrdersSetTaskGroupVehicleTypeReq.d.ts +3 -4
- package/dist/cjs/api/types/Driver1.d.ts +1 -0
- package/dist/cjs/api/types/DriverBiddingGroupListItemRes.d.ts +17 -0
- package/dist/cjs/api/types/DriverBiddingGroupListItemRes.js +5 -0
- package/dist/cjs/api/types/DriverBiddingGroupListRes.d.ts +1 -1
- package/dist/cjs/api/types/DriverWithActiveTaskGroupIds1.d.ts +1 -0
- package/dist/cjs/api/types/InvoiceLineItemExportListItem.d.ts +4 -0
- package/dist/cjs/api/types/OperationsTask1.d.ts +1 -0
- package/dist/cjs/api/types/OperationsTasksUpdateDepartmentManyRes.d.ts +7 -0
- package/dist/cjs/api/types/OperationsTasksUpdateDepartmentManyRes.js +5 -0
- package/dist/cjs/api/types/Order1.d.ts +1 -1
- package/dist/cjs/api/types/OrderAndTaskGroupExpandedReq.d.ts +2 -2
- package/dist/cjs/api/types/OrderExpandedForProvider.d.ts +1 -1
- package/dist/cjs/api/types/OrderLimitedForProvider1.d.ts +1 -1
- package/dist/cjs/api/types/OrderTaskGroupExecutorDetails1.d.ts +1 -1
- package/dist/cjs/api/types/OrderTemplateNew1.d.ts +1 -1
- package/dist/cjs/api/types/OrderTemplateNewCore1.d.ts +1 -1
- package/dist/cjs/api/types/OrderTemplateNewExpanded1.d.ts +1 -1
- package/dist/cjs/api/types/OrgBiddingGroupListItemRes.d.ts +17 -0
- package/dist/cjs/api/types/OrgBiddingGroupListItemRes.js +5 -0
- package/dist/cjs/api/types/OrgBiddingGroupListRes.d.ts +1 -1
- package/dist/cjs/api/types/TaskGroup1.d.ts +1 -1
- package/dist/cjs/api/types/TaskGroupExpanded.d.ts +1 -1
- package/dist/cjs/api/types/TaskListToApplyToOrder1.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/listing/resources/bidThreads/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/listing/resources/bidThreads/client/Client.mjs +6 -6
- package/dist/esm/api/resources/listing/resources/driverBiddingGroups/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/listing/resources/driverBiddingGroups/client/Client.mjs +1 -1
- package/dist/esm/api/resources/listing/resources/orgBiddingGroups/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/listing/resources/orgBiddingGroups/client/Client.mjs +1 -1
- package/dist/esm/api/resources/operations/resources/departments/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/operations/resources/departments/client/Client.mjs +6 -2
- package/dist/esm/api/resources/operations/resources/departments/client/requests/DepartmentsListV1Request.d.mts +3 -0
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.d.mts +5 -3
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.mjs +13 -5
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListsApplyToOrderV1Request.d.mts +4 -1
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListsListV1Request.d.mts +3 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.d.mts +19 -2
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.mjs +79 -4
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientCreate1.d.mts +1 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksExpandedListV1Request.d.mts +3 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.d.mts +3 -0
- package/dist/esm/api/resources/{shipping/resources/orders/client/requests/OrdersUpdateDepartmentReq.d.mts → operations/resources/operationsTasks/client/requests/OperationsTasksUpdateDepartmentManyReq.d.mts} +5 -2
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/orgs/client/Client.mjs +11 -2
- package/dist/esm/api/resources/orgs/client/requests/OrgsListMembersV1Request.d.mts +3 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +29 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +146 -16
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListOrgMembersAndDriversV1Request.d.mts +3 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.mts +6 -0
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/requests/OrderTemplateNewClientCreate1.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/requests/OrderTemplateNewClientUpdate1.d.mts +1 -2
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +7 -6
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +14 -10
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.mts +3 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersUpdateDepartmentsReq.d.mts +10 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersUpdateDepartmentsReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/OrdersOpenDraftReq.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +17 -7
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.mts +6 -5
- package/dist/esm/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.d.mts +3 -5
- package/dist/esm/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.mjs +5 -7
- package/dist/esm/api/resources/shipping/resources/orders/resources/taskGroup/client/requests/OrdersSetTaskGroupVehicleTypeReq.d.mts +3 -4
- package/dist/esm/api/types/Driver1.d.mts +1 -0
- package/dist/esm/api/types/DriverBiddingGroupListItemRes.d.mts +17 -0
- package/dist/esm/api/types/DriverBiddingGroupListItemRes.mjs +4 -0
- package/dist/esm/api/types/DriverBiddingGroupListRes.d.mts +1 -1
- package/dist/esm/api/types/DriverWithActiveTaskGroupIds1.d.mts +1 -0
- package/dist/esm/api/types/InvoiceLineItemExportListItem.d.mts +4 -0
- package/dist/esm/api/types/OperationsTask1.d.mts +1 -0
- package/dist/esm/api/types/OperationsTasksUpdateDepartmentManyRes.d.mts +7 -0
- package/dist/esm/api/types/OperationsTasksUpdateDepartmentManyRes.mjs +4 -0
- package/dist/esm/api/types/Order1.d.mts +1 -1
- package/dist/esm/api/types/OrderAndTaskGroupExpandedReq.d.mts +2 -2
- package/dist/esm/api/types/OrderExpandedForProvider.d.mts +1 -1
- package/dist/esm/api/types/OrderLimitedForProvider1.d.mts +1 -1
- package/dist/esm/api/types/OrderTaskGroupExecutorDetails1.d.mts +1 -1
- package/dist/esm/api/types/OrderTemplateNew1.d.mts +1 -1
- package/dist/esm/api/types/OrderTemplateNewCore1.d.mts +1 -1
- package/dist/esm/api/types/OrderTemplateNewExpanded1.d.mts +1 -1
- package/dist/esm/api/types/OrgBiddingGroupListItemRes.d.mts +17 -0
- package/dist/esm/api/types/OrgBiddingGroupListItemRes.mjs +4 -0
- package/dist/esm/api/types/OrgBiddingGroupListRes.d.mts +1 -1
- package/dist/esm/api/types/TaskGroup1.d.mts +1 -1
- package/dist/esm/api/types/TaskGroupExpanded.d.mts +1 -1
- package/dist/esm/api/types/TaskListToApplyToOrder1.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +225 -26
- /package/dist/cjs/api/resources/{shipping/resources/orders/client/requests/OrdersUpdateDepartmentReq.js → operations/resources/operationsTasks/client/requests/OperationsTasksUpdateDepartmentManyReq.js} +0 -0
- /package/dist/esm/api/resources/{shipping/resources/orders/client/requests/OrdersUpdateDepartmentReq.mjs → operations/resources/operationsTasks/client/requests/OperationsTasksUpdateDepartmentManyReq.mjs} +0 -0
|
@@ -18,6 +18,7 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
18
18
|
* filter_status: ["not_started"],
|
|
19
19
|
* filter_assigned_user_id: "filter_assigned_user_id",
|
|
20
20
|
* filter_source_task_list_id: "filter_source_task_list_id",
|
|
21
|
+
* filter_entry_tag: "filter_entry_tag",
|
|
21
22
|
* filter_deadline_gte: "2024-01-15T09:30:00Z",
|
|
22
23
|
* filter_deadline_lte: "2024-01-15T09:30:00Z"
|
|
23
24
|
* }
|
|
@@ -47,6 +48,8 @@ export interface OperationsTasksListV1Request {
|
|
|
47
48
|
filter_assigned_user_id?: string | null;
|
|
48
49
|
/** Filter to tasks created from this OperationsTaskList */
|
|
49
50
|
filter_source_task_list_id?: string | null;
|
|
51
|
+
/** Filter by exact entry tag (case-sensitive) */
|
|
52
|
+
filter_entry_tag?: string | null;
|
|
50
53
|
/** Filter to tasks with deadline >= this timestamp */
|
|
51
54
|
filter_deadline_gte?: string | null;
|
|
52
55
|
/** Filter to tasks with deadline <= this timestamp */
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
|
-
* {
|
|
6
|
+
* {
|
|
7
|
+
* operations_task_ids: ["operations_task_ids"]
|
|
8
|
+
* }
|
|
7
9
|
*/
|
|
8
|
-
export interface
|
|
10
|
+
export interface OperationsTasksUpdateDepartmentManyReq {
|
|
9
11
|
department_id?: string | null;
|
|
10
12
|
department_id__set_to_None?: boolean;
|
|
13
|
+
operations_task_ids: string[];
|
|
11
14
|
}
|
package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export { type OperationsTasksExpandedListV1Request } from "./OperationsTasksExpa
|
|
|
4
4
|
export { type OperationsTasksListV1Request } from "./OperationsTasksListV1Request.js";
|
|
5
5
|
export { type OperationsTasksSetDeadlineTimestampsReq1 } from "./OperationsTasksSetDeadlineTimestampsReq1.js";
|
|
6
6
|
export { type OperationsTasksSetStatusReq1 } from "./OperationsTasksSetStatusReq1.js";
|
|
7
|
+
export { type OperationsTasksUpdateDepartmentManyReq } from "./OperationsTasksUpdateDepartmentManyReq.js";
|
|
7
8
|
export { type OperationsTaskClientCreate1 } from "./OperationsTaskClientCreate1.js";
|
|
8
9
|
export { type OperationsTaskClientUpdate1 } from "./OperationsTaskClientUpdate1.js";
|
|
@@ -62,7 +62,7 @@ export declare class Orgs {
|
|
|
62
62
|
getInfoV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgInfoResponse>;
|
|
63
63
|
private __getInfoV1;
|
|
64
64
|
/**
|
|
65
|
-
* Lists all members of the caller's organization with their roles and details. Supports search by name, filtering by role, sorting, and pagination. | () -> (OrgMemberListRes)
|
|
65
|
+
* Lists all members of the caller's organization with their roles and details. Supports search by name, filtering by role and user IDs, sorting, and pagination. | () -> (OrgMemberListRes)
|
|
66
66
|
*
|
|
67
67
|
* @param {Chrt.OrgsListMembersV1Request} request
|
|
68
68
|
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -72,6 +72,7 @@ export declare class Orgs {
|
|
|
72
72
|
* @example
|
|
73
73
|
* await client.orgs.listMembersV1({
|
|
74
74
|
* filter_role: ["owner"],
|
|
75
|
+
* filter_user_ids: ["filter_user_ids"],
|
|
75
76
|
* sort_by: "first_name",
|
|
76
77
|
* sort_order: "asc",
|
|
77
78
|
* page: 1,
|
|
@@ -142,7 +142,7 @@ class Orgs {
|
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
|
-
* Lists all members of the caller's organization with their roles and details. Supports search by name, filtering by role, sorting, and pagination. | () -> (OrgMemberListRes)
|
|
145
|
+
* Lists all members of the caller's organization with their roles and details. Supports search by name, filtering by role and user IDs, sorting, and pagination. | () -> (OrgMemberListRes)
|
|
146
146
|
*
|
|
147
147
|
* @param {Chrt.OrgsListMembersV1Request} request
|
|
148
148
|
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -152,6 +152,7 @@ class Orgs {
|
|
|
152
152
|
* @example
|
|
153
153
|
* await client.orgs.listMembersV1({
|
|
154
154
|
* filter_role: ["owner"],
|
|
155
|
+
* filter_user_ids: ["filter_user_ids"],
|
|
155
156
|
* sort_by: "first_name",
|
|
156
157
|
* sort_order: "asc",
|
|
157
158
|
* page: 1,
|
|
@@ -165,7 +166,7 @@ class Orgs {
|
|
|
165
166
|
__listMembersV1() {
|
|
166
167
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
167
168
|
var _a, _b, _c, _d, _e, _f;
|
|
168
|
-
const { filter_role: filterRole, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, } = request;
|
|
169
|
+
const { filter_role: filterRole, filter_user_ids: filterUserIds, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, } = request;
|
|
169
170
|
const _queryParams = {};
|
|
170
171
|
if (filterRole !== undefined) {
|
|
171
172
|
if (Array.isArray(filterRole)) {
|
|
@@ -175,6 +176,14 @@ class Orgs {
|
|
|
175
176
|
_queryParams["filter_role"] = filterRole;
|
|
176
177
|
}
|
|
177
178
|
}
|
|
179
|
+
if (filterUserIds !== undefined) {
|
|
180
|
+
if (Array.isArray(filterUserIds)) {
|
|
181
|
+
_queryParams["filter_user_ids"] = filterUserIds.map((item) => item);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
_queryParams["filter_user_ids"] = filterUserIds;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
178
187
|
if (sortBy !== undefined) {
|
|
179
188
|
_queryParams["sort_by"] = sortBy;
|
|
180
189
|
}
|
|
@@ -6,6 +6,7 @@ import * as Chrt from "../../../../index.js";
|
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
8
|
* filter_role: ["owner"],
|
|
9
|
+
* filter_user_ids: ["filter_user_ids"],
|
|
9
10
|
* sort_by: "first_name",
|
|
10
11
|
* sort_order: "asc",
|
|
11
12
|
* page: 1,
|
|
@@ -16,6 +17,8 @@ import * as Chrt from "../../../../index.js";
|
|
|
16
17
|
export interface OrgsListMembersV1Request {
|
|
17
18
|
/** Filter by organization role(s) */
|
|
18
19
|
filter_role?: (Chrt.OrgRoleEnum | null) | (Chrt.OrgRoleEnum | null)[];
|
|
20
|
+
/** Filter by user ID(s) */
|
|
21
|
+
filter_user_ids?: (string | null) | (string | null)[];
|
|
19
22
|
/** Field to sort by */
|
|
20
23
|
sort_by?: Chrt.OrgMemberSortByEnum | null;
|
|
21
24
|
/** Sort order (asc or desc) */
|
|
@@ -33,6 +33,19 @@ export declare class Drivers {
|
|
|
33
33
|
protected _complianceDocuments: ComplianceDocuments | undefined;
|
|
34
34
|
constructor(_options?: Drivers.Options);
|
|
35
35
|
get complianceDocuments(): ComplianceDocuments;
|
|
36
|
+
/**
|
|
37
|
+
* Archives a driver after draft, staged, and in-progress assignments are resolved, and denies their open bid threads. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
|
|
38
|
+
*
|
|
39
|
+
* @param {string} driverId
|
|
40
|
+
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.shipping.drivers.archiveV1("driver_id")
|
|
46
|
+
*/
|
|
47
|
+
archiveV1(driverId: string, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
48
|
+
private __archiveV1;
|
|
36
49
|
/**
|
|
37
50
|
* Creates a new driver profile for the target user (defaults to caller). Drivers can create themselves; operators+ can create any org member. Provider orgs only. | (DriverClientCreate1) -> (PydanticObjectId)
|
|
38
51
|
*
|
|
@@ -83,6 +96,8 @@ export declare class Drivers {
|
|
|
83
96
|
* page: 1,
|
|
84
97
|
* page_size: 1,
|
|
85
98
|
* search: "search",
|
|
99
|
+
* filter_by_driver_id: "filter_by_driver_id",
|
|
100
|
+
* filter_archived: true,
|
|
86
101
|
* filter_available_according_to_driver: true,
|
|
87
102
|
* filter_available_according_to_operators: true,
|
|
88
103
|
* filter_status: ["unassigned"]
|
|
@@ -101,6 +116,7 @@ export declare class Drivers {
|
|
|
101
116
|
* @example
|
|
102
117
|
* await client.shipping.drivers.listOrgMembersAndDriversV1({
|
|
103
118
|
* search: "search",
|
|
119
|
+
* filter_archived: true,
|
|
104
120
|
* filter_role: ["owner"],
|
|
105
121
|
* filter_available_according_to_driver: true,
|
|
106
122
|
* filter_available_according_to_operators: true,
|
|
@@ -230,6 +246,19 @@ export declare class Drivers {
|
|
|
230
246
|
*/
|
|
231
247
|
getStatsV1(driverId: string, request: Chrt.shipping.DriverStatsReq, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.DriverStatsRes>;
|
|
232
248
|
private __getStatsV1;
|
|
249
|
+
/**
|
|
250
|
+
* Restores an archived driver with active organization membership. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
|
|
251
|
+
*
|
|
252
|
+
* @param {string} driverId
|
|
253
|
+
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
254
|
+
*
|
|
255
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* await client.shipping.drivers.unarchiveV1("driver_id")
|
|
259
|
+
*/
|
|
260
|
+
unarchiveV1(driverId: string, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
261
|
+
private __unarchiveV1;
|
|
233
262
|
/**
|
|
234
263
|
* Updates driver contact details and vehicle type assignments. Provider orgs only; caller must be the driver (self) or an operator+. | (DriverClientUpdate1) -> (bool)
|
|
235
264
|
*
|
|
@@ -71,6 +71,65 @@ class Drivers {
|
|
|
71
71
|
var _a;
|
|
72
72
|
return ((_a = this._complianceDocuments) !== null && _a !== void 0 ? _a : (this._complianceDocuments = new Client_js_1.ComplianceDocuments(this._options)));
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Archives a driver after draft, staged, and in-progress assignments are resolved, and denies their open bid threads. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
|
|
76
|
+
*
|
|
77
|
+
* @param {string} driverId
|
|
78
|
+
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await client.shipping.drivers.archiveV1("driver_id")
|
|
84
|
+
*/
|
|
85
|
+
archiveV1(driverId, requestOptions) {
|
|
86
|
+
return core.HttpResponsePromise.fromPromise(this.__archiveV1(driverId, requestOptions));
|
|
87
|
+
}
|
|
88
|
+
__archiveV1(driverId, requestOptions) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
var _a, _b, _c, _d;
|
|
91
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
92
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
93
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/drivers/archive/v1/${encodeURIComponent(driverId)}`),
|
|
94
|
+
method: "POST",
|
|
95
|
+
headers: _headers,
|
|
96
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
97
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
98
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
99
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
100
|
+
});
|
|
101
|
+
if (_response.ok) {
|
|
102
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
103
|
+
}
|
|
104
|
+
if (_response.error.reason === "status-code") {
|
|
105
|
+
switch (_response.error.statusCode) {
|
|
106
|
+
case 422:
|
|
107
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
108
|
+
default:
|
|
109
|
+
throw new errors.ChrtError({
|
|
110
|
+
statusCode: _response.error.statusCode,
|
|
111
|
+
body: _response.error.body,
|
|
112
|
+
rawResponse: _response.rawResponse,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
switch (_response.error.reason) {
|
|
117
|
+
case "non-json":
|
|
118
|
+
throw new errors.ChrtError({
|
|
119
|
+
statusCode: _response.error.statusCode,
|
|
120
|
+
body: _response.error.rawBody,
|
|
121
|
+
rawResponse: _response.rawResponse,
|
|
122
|
+
});
|
|
123
|
+
case "timeout":
|
|
124
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/drivers/archive/v1/{driver_id}.");
|
|
125
|
+
case "unknown":
|
|
126
|
+
throw new errors.ChrtError({
|
|
127
|
+
message: _response.error.errorMessage,
|
|
128
|
+
rawResponse: _response.rawResponse,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
74
133
|
/**
|
|
75
134
|
* Creates a new driver profile for the target user (defaults to caller). Drivers can create themselves; operators+ can create any org member. Provider orgs only. | (DriverClientCreate1) -> (PydanticObjectId)
|
|
76
135
|
*
|
|
@@ -257,6 +316,8 @@ class Drivers {
|
|
|
257
316
|
* page: 1,
|
|
258
317
|
* page_size: 1,
|
|
259
318
|
* search: "search",
|
|
319
|
+
* filter_by_driver_id: "filter_by_driver_id",
|
|
320
|
+
* filter_archived: true,
|
|
260
321
|
* filter_available_according_to_driver: true,
|
|
261
322
|
* filter_available_according_to_operators: true,
|
|
262
323
|
* filter_status: ["unassigned"]
|
|
@@ -267,8 +328,8 @@ class Drivers {
|
|
|
267
328
|
}
|
|
268
329
|
__listV1() {
|
|
269
330
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
270
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
271
|
-
const { sort_order: sortOrder, page, page_size: pageSize, search, filter_available_according_to_driver: filterAvailableAccordingToDriver, filter_available_according_to_operators: filterAvailableAccordingToOperators, filter_status: filterStatus, } = request;
|
|
331
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
332
|
+
const { sort_order: sortOrder, page, page_size: pageSize, search, filter_by_driver_id: filterByDriverId, filter_archived: filterArchived, filter_available_according_to_driver: filterAvailableAccordingToDriver, filter_available_according_to_operators: filterAvailableAccordingToOperators, filter_status: filterStatus, } = request;
|
|
272
333
|
const _queryParams = {};
|
|
273
334
|
if (sortOrder !== undefined) {
|
|
274
335
|
_queryParams["sort_order"] = sortOrder;
|
|
@@ -282,12 +343,18 @@ class Drivers {
|
|
|
282
343
|
if (search !== undefined) {
|
|
283
344
|
_queryParams["search"] = search;
|
|
284
345
|
}
|
|
346
|
+
if (filterByDriverId !== undefined) {
|
|
347
|
+
_queryParams["filter_by_driver_id"] = filterByDriverId;
|
|
348
|
+
}
|
|
349
|
+
if (filterArchived !== undefined) {
|
|
350
|
+
_queryParams["filter_archived"] = (_c = filterArchived === null || filterArchived === void 0 ? void 0 : filterArchived.toString()) !== null && _c !== void 0 ? _c : null;
|
|
351
|
+
}
|
|
285
352
|
if (filterAvailableAccordingToDriver !== undefined) {
|
|
286
|
-
_queryParams["filter_available_according_to_driver"] = (
|
|
353
|
+
_queryParams["filter_available_according_to_driver"] = (_d = filterAvailableAccordingToDriver === null || filterAvailableAccordingToDriver === void 0 ? void 0 : filterAvailableAccordingToDriver.toString()) !== null && _d !== void 0 ? _d : null;
|
|
287
354
|
}
|
|
288
355
|
if (filterAvailableAccordingToOperators !== undefined) {
|
|
289
356
|
_queryParams["filter_available_according_to_operators"] =
|
|
290
|
-
(
|
|
357
|
+
(_e = filterAvailableAccordingToOperators === null || filterAvailableAccordingToOperators === void 0 ? void 0 : filterAvailableAccordingToOperators.toString()) !== null && _e !== void 0 ? _e : null;
|
|
291
358
|
}
|
|
292
359
|
if (filterStatus !== undefined) {
|
|
293
360
|
if (Array.isArray(filterStatus)) {
|
|
@@ -297,9 +364,9 @@ class Drivers {
|
|
|
297
364
|
_queryParams["filter_status"] = filterStatus;
|
|
298
365
|
}
|
|
299
366
|
}
|
|
300
|
-
let _headers = (0, headers_js_1.mergeHeaders)((
|
|
301
|
-
const _response = yield ((
|
|
302
|
-
url: core.url.join((
|
|
367
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_f = this._options) === null || _f === void 0 ? void 0 : _f.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
368
|
+
const _response = yield ((_g = this._options.fetcher) !== null && _g !== void 0 ? _g : core.fetcher)({
|
|
369
|
+
url: core.url.join((_j = (_h = (yield core.Supplier.get(this._options.baseUrl))) !== null && _h !== void 0 ? _h : (yield core.Supplier.get(this._options.environment))) !== null && _j !== void 0 ? _j : environments.ChrtEnvironment.Local, "shipping/drivers/list/v1"),
|
|
303
370
|
method: "GET",
|
|
304
371
|
headers: _headers,
|
|
305
372
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -350,6 +417,7 @@ class Drivers {
|
|
|
350
417
|
* @example
|
|
351
418
|
* await client.shipping.drivers.listOrgMembersAndDriversV1({
|
|
352
419
|
* search: "search",
|
|
420
|
+
* filter_archived: true,
|
|
353
421
|
* filter_role: ["owner"],
|
|
354
422
|
* filter_available_according_to_driver: true,
|
|
355
423
|
* filter_available_according_to_operators: true,
|
|
@@ -364,12 +432,15 @@ class Drivers {
|
|
|
364
432
|
}
|
|
365
433
|
__listOrgMembersAndDriversV1() {
|
|
366
434
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
367
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
368
|
-
const { search, filter_role: filterRole, filter_available_according_to_driver: filterAvailableAccordingToDriver, filter_available_according_to_operators: filterAvailableAccordingToOperators, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, } = request;
|
|
435
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
436
|
+
const { search, filter_archived: filterArchived, filter_role: filterRole, filter_available_according_to_driver: filterAvailableAccordingToDriver, filter_available_according_to_operators: filterAvailableAccordingToOperators, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, } = request;
|
|
369
437
|
const _queryParams = {};
|
|
370
438
|
if (search !== undefined) {
|
|
371
439
|
_queryParams["search"] = search;
|
|
372
440
|
}
|
|
441
|
+
if (filterArchived !== undefined) {
|
|
442
|
+
_queryParams["filter_archived"] = (_a = filterArchived === null || filterArchived === void 0 ? void 0 : filterArchived.toString()) !== null && _a !== void 0 ? _a : null;
|
|
443
|
+
}
|
|
373
444
|
if (filterRole !== undefined) {
|
|
374
445
|
if (Array.isArray(filterRole)) {
|
|
375
446
|
_queryParams["filter_role"] = filterRole.map((item) => item);
|
|
@@ -379,11 +450,11 @@ class Drivers {
|
|
|
379
450
|
}
|
|
380
451
|
}
|
|
381
452
|
if (filterAvailableAccordingToDriver !== undefined) {
|
|
382
|
-
_queryParams["filter_available_according_to_driver"] = (
|
|
453
|
+
_queryParams["filter_available_according_to_driver"] = (_b = filterAvailableAccordingToDriver === null || filterAvailableAccordingToDriver === void 0 ? void 0 : filterAvailableAccordingToDriver.toString()) !== null && _b !== void 0 ? _b : null;
|
|
383
454
|
}
|
|
384
455
|
if (filterAvailableAccordingToOperators !== undefined) {
|
|
385
456
|
_queryParams["filter_available_according_to_operators"] =
|
|
386
|
-
(
|
|
457
|
+
(_c = filterAvailableAccordingToOperators === null || filterAvailableAccordingToOperators === void 0 ? void 0 : filterAvailableAccordingToOperators.toString()) !== null && _c !== void 0 ? _c : null;
|
|
387
458
|
}
|
|
388
459
|
if (sortBy !== undefined) {
|
|
389
460
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -392,14 +463,14 @@ class Drivers {
|
|
|
392
463
|
_queryParams["sort_order"] = sortOrder;
|
|
393
464
|
}
|
|
394
465
|
if (page !== undefined) {
|
|
395
|
-
_queryParams["page"] = (
|
|
466
|
+
_queryParams["page"] = (_d = page === null || page === void 0 ? void 0 : page.toString()) !== null && _d !== void 0 ? _d : null;
|
|
396
467
|
}
|
|
397
468
|
if (pageSize !== undefined) {
|
|
398
|
-
_queryParams["page_size"] = (
|
|
469
|
+
_queryParams["page_size"] = (_e = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _e !== void 0 ? _e : null;
|
|
399
470
|
}
|
|
400
|
-
let _headers = (0, headers_js_1.mergeHeaders)((
|
|
401
|
-
const _response = yield ((
|
|
402
|
-
url: core.url.join((
|
|
471
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_f = this._options) === null || _f === void 0 ? void 0 : _f.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
472
|
+
const _response = yield ((_g = this._options.fetcher) !== null && _g !== void 0 ? _g : core.fetcher)({
|
|
473
|
+
url: core.url.join((_j = (_h = (yield core.Supplier.get(this._options.baseUrl))) !== null && _h !== void 0 ? _h : (yield core.Supplier.get(this._options.environment))) !== null && _j !== void 0 ? _j : environments.ChrtEnvironment.Local, "shipping/drivers/org_members_and_drivers/list/v1"),
|
|
403
474
|
method: "GET",
|
|
404
475
|
headers: _headers,
|
|
405
476
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -943,6 +1014,65 @@ class Drivers {
|
|
|
943
1014
|
}
|
|
944
1015
|
});
|
|
945
1016
|
}
|
|
1017
|
+
/**
|
|
1018
|
+
* Restores an archived driver with active organization membership. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
|
|
1019
|
+
*
|
|
1020
|
+
* @param {string} driverId
|
|
1021
|
+
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
1022
|
+
*
|
|
1023
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
1024
|
+
*
|
|
1025
|
+
* @example
|
|
1026
|
+
* await client.shipping.drivers.unarchiveV1("driver_id")
|
|
1027
|
+
*/
|
|
1028
|
+
unarchiveV1(driverId, requestOptions) {
|
|
1029
|
+
return core.HttpResponsePromise.fromPromise(this.__unarchiveV1(driverId, requestOptions));
|
|
1030
|
+
}
|
|
1031
|
+
__unarchiveV1(driverId, requestOptions) {
|
|
1032
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1033
|
+
var _a, _b, _c, _d;
|
|
1034
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1035
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1036
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/drivers/unarchive/v1/${encodeURIComponent(driverId)}`),
|
|
1037
|
+
method: "POST",
|
|
1038
|
+
headers: _headers,
|
|
1039
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1040
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1041
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1042
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1043
|
+
});
|
|
1044
|
+
if (_response.ok) {
|
|
1045
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1046
|
+
}
|
|
1047
|
+
if (_response.error.reason === "status-code") {
|
|
1048
|
+
switch (_response.error.statusCode) {
|
|
1049
|
+
case 422:
|
|
1050
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1051
|
+
default:
|
|
1052
|
+
throw new errors.ChrtError({
|
|
1053
|
+
statusCode: _response.error.statusCode,
|
|
1054
|
+
body: _response.error.body,
|
|
1055
|
+
rawResponse: _response.rawResponse,
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
switch (_response.error.reason) {
|
|
1060
|
+
case "non-json":
|
|
1061
|
+
throw new errors.ChrtError({
|
|
1062
|
+
statusCode: _response.error.statusCode,
|
|
1063
|
+
body: _response.error.rawBody,
|
|
1064
|
+
rawResponse: _response.rawResponse,
|
|
1065
|
+
});
|
|
1066
|
+
case "timeout":
|
|
1067
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/drivers/unarchive/v1/{driver_id}.");
|
|
1068
|
+
case "unknown":
|
|
1069
|
+
throw new errors.ChrtError({
|
|
1070
|
+
message: _response.error.errorMessage,
|
|
1071
|
+
rawResponse: _response.rawResponse,
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
946
1076
|
/**
|
|
947
1077
|
* Updates driver contact details and vehicle type assignments. Provider orgs only; caller must be the driver (self) or an operator+. | (DriverClientUpdate1) -> (bool)
|
|
948
1078
|
*
|
|
@@ -6,6 +6,7 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
8
|
* search: "search",
|
|
9
|
+
* filter_archived: true,
|
|
9
10
|
* filter_role: ["owner"],
|
|
10
11
|
* filter_available_according_to_driver: true,
|
|
11
12
|
* filter_available_according_to_operators: true,
|
|
@@ -18,6 +19,8 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
18
19
|
export interface DriversListOrgMembersAndDriversV1Request {
|
|
19
20
|
/** Search by first or last name */
|
|
20
21
|
search?: string | null;
|
|
22
|
+
/** Select archived driver profiles */
|
|
23
|
+
filter_archived?: boolean | null;
|
|
21
24
|
/** Filter by organization role(s) */
|
|
22
25
|
filter_role?: (Chrt.OrgRoleEnum | null) | (Chrt.OrgRoleEnum | null)[];
|
|
23
26
|
/** Filter by driver's self-reported availability. */
|
package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
9
9
|
* page: 1,
|
|
10
10
|
* page_size: 1,
|
|
11
11
|
* search: "search",
|
|
12
|
+
* filter_by_driver_id: "filter_by_driver_id",
|
|
13
|
+
* filter_archived: true,
|
|
12
14
|
* filter_available_according_to_driver: true,
|
|
13
15
|
* filter_available_according_to_operators: true,
|
|
14
16
|
* filter_status: ["unassigned"]
|
|
@@ -21,6 +23,10 @@ export interface DriversListV1Request {
|
|
|
21
23
|
page_size?: number | null;
|
|
22
24
|
/** Full-text search query */
|
|
23
25
|
search?: string | null;
|
|
26
|
+
/** Filter by driver ID */
|
|
27
|
+
filter_by_driver_id?: string | null;
|
|
28
|
+
/** Select archived drivers instead of active drivers */
|
|
29
|
+
filter_archived?: boolean | null;
|
|
24
30
|
/** Filter by driver's self-reported availability */
|
|
25
31
|
filter_available_according_to_driver?: boolean | null;
|
|
26
32
|
/** Filter by operator-set availability */
|
|
@@ -12,7 +12,7 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
12
12
|
export interface OrderTemplateNewClientCreate1 {
|
|
13
13
|
cargos?: Chrt.OrderTemplateNewCargo1[];
|
|
14
14
|
coordinator_assigned_user_ids?: string[];
|
|
15
|
-
|
|
15
|
+
coordinator_department_ids?: string[];
|
|
16
16
|
coordinator_label?: string | null;
|
|
17
17
|
/** Must be a string starting with `org_` */
|
|
18
18
|
coordinator_org_id?: string | null;
|
|
@@ -8,8 +8,7 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export interface OrderTemplateNewClientUpdate1 {
|
|
10
10
|
coordinator_assigned_user_ids?: string[];
|
|
11
|
-
|
|
12
|
-
coordinator_department_id__set_to_None?: boolean;
|
|
11
|
+
coordinator_department_ids?: string[];
|
|
13
12
|
coordinator_label?: string | null;
|
|
14
13
|
coordinator_label__set_to_None?: boolean;
|
|
15
14
|
/** Must be a string starting with `org_` */
|
|
@@ -111,6 +111,7 @@ export declare class Orders {
|
|
|
111
111
|
* @example
|
|
112
112
|
* await client.shipping.orders.addCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id", {
|
|
113
113
|
* department_id: "department_id",
|
|
114
|
+
* entry_tag: "entry_tag",
|
|
114
115
|
* body: "2024-01-15T09:30:00Z"
|
|
115
116
|
* })
|
|
116
117
|
*/
|
|
@@ -172,7 +173,7 @@ export declare class Orders {
|
|
|
172
173
|
stageV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
173
174
|
private __stageV1;
|
|
174
175
|
/**
|
|
175
|
-
* Returns the coordinator's account-level default department for the order's shipper. |
|
|
176
|
+
* Returns the coordinator's account-level default department for the order's shipper. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | () -> (PydanticObjectId | None)
|
|
176
177
|
*
|
|
177
178
|
* @param {string} orderId
|
|
178
179
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -262,19 +263,19 @@ export declare class Orders {
|
|
|
262
263
|
undoCancelV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
263
264
|
private __undoCancelV1;
|
|
264
265
|
/**
|
|
265
|
-
*
|
|
266
|
+
* Replaces department_ids for the caller's role on the order. Coordinator writes coordinator_department_ids; executor writes executor_department_ids on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateDepartmentsReq) -> (bool)
|
|
266
267
|
*
|
|
267
268
|
* @param {string} orderId
|
|
268
|
-
* @param {Chrt.shipping.
|
|
269
|
+
* @param {Chrt.shipping.OrdersUpdateDepartmentsReq} request
|
|
269
270
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
270
271
|
*
|
|
271
272
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
272
273
|
*
|
|
273
274
|
* @example
|
|
274
|
-
* await client.shipping.orders.
|
|
275
|
+
* await client.shipping.orders.updateDepartmentsV1("order_id")
|
|
275
276
|
*/
|
|
276
|
-
|
|
277
|
-
private
|
|
277
|
+
updateDepartmentsV1(orderId: string, request?: Chrt.shipping.OrdersUpdateDepartmentsReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
278
|
+
private __updateDepartmentsV1;
|
|
278
279
|
/**
|
|
279
280
|
* Updates service-line and organization assignments on a draft order. | authz_personas=[draft_creator_org_operator] | (OrdersUpdateDraftReq) -> (OrdersUpdateDraftRes)
|
|
280
281
|
*
|
|
@@ -296,6 +296,7 @@ class Orders {
|
|
|
296
296
|
* @example
|
|
297
297
|
* await client.shipping.orders.addCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id", {
|
|
298
298
|
* department_id: "department_id",
|
|
299
|
+
* entry_tag: "entry_tag",
|
|
299
300
|
* body: "2024-01-15T09:30:00Z"
|
|
300
301
|
* })
|
|
301
302
|
*/
|
|
@@ -305,11 +306,14 @@ class Orders {
|
|
|
305
306
|
__addCoordinatorTaskListToApplyAtOrderStagingV1(orderId_1, taskListId_1) {
|
|
306
307
|
return __awaiter(this, arguments, void 0, function* (orderId, taskListId, request = {}, requestOptions) {
|
|
307
308
|
var _a, _b, _c, _d;
|
|
308
|
-
const { department_id: departmentId, body: _body } = request;
|
|
309
|
+
const { department_id: departmentId, entry_tag: entryTag, body: _body } = request;
|
|
309
310
|
const _queryParams = {};
|
|
310
311
|
if (departmentId !== undefined) {
|
|
311
312
|
_queryParams["department_id"] = departmentId;
|
|
312
313
|
}
|
|
314
|
+
if (entryTag !== undefined) {
|
|
315
|
+
_queryParams["entry_tag"] = entryTag;
|
|
316
|
+
}
|
|
313
317
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
314
318
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
315
319
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/coordinator_task_lists_to_apply_at_order_staging/add/v1/${encodeURIComponent(orderId)}/${encodeURIComponent(taskListId)}`),
|
|
@@ -598,7 +602,7 @@ class Orders {
|
|
|
598
602
|
});
|
|
599
603
|
}
|
|
600
604
|
/**
|
|
601
|
-
* Returns the coordinator's account-level default department for the order's shipper. |
|
|
605
|
+
* Returns the coordinator's account-level default department for the order's shipper. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | () -> (PydanticObjectId | None)
|
|
602
606
|
*
|
|
603
607
|
* @param {string} orderId
|
|
604
608
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -982,26 +986,26 @@ class Orders {
|
|
|
982
986
|
});
|
|
983
987
|
}
|
|
984
988
|
/**
|
|
985
|
-
*
|
|
989
|
+
* Replaces department_ids for the caller's role on the order. Coordinator writes coordinator_department_ids; executor writes executor_department_ids on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateDepartmentsReq) -> (bool)
|
|
986
990
|
*
|
|
987
991
|
* @param {string} orderId
|
|
988
|
-
* @param {Chrt.shipping.
|
|
992
|
+
* @param {Chrt.shipping.OrdersUpdateDepartmentsReq} request
|
|
989
993
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
990
994
|
*
|
|
991
995
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
992
996
|
*
|
|
993
997
|
* @example
|
|
994
|
-
* await client.shipping.orders.
|
|
998
|
+
* await client.shipping.orders.updateDepartmentsV1("order_id")
|
|
995
999
|
*/
|
|
996
|
-
|
|
997
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1000
|
+
updateDepartmentsV1(orderId, request = {}, requestOptions) {
|
|
1001
|
+
return core.HttpResponsePromise.fromPromise(this.__updateDepartmentsV1(orderId, request, requestOptions));
|
|
998
1002
|
}
|
|
999
|
-
|
|
1003
|
+
__updateDepartmentsV1(orderId_1) {
|
|
1000
1004
|
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
1001
1005
|
var _a, _b, _c, _d;
|
|
1002
1006
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1003
1007
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1004
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/
|
|
1008
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/update_departments/v1/${encodeURIComponent(orderId)}`),
|
|
1005
1009
|
method: "PATCH",
|
|
1006
1010
|
headers: _headers,
|
|
1007
1011
|
contentType: "application/json",
|
|
@@ -1035,7 +1039,7 @@ class Orders {
|
|
|
1035
1039
|
rawResponse: _response.rawResponse,
|
|
1036
1040
|
});
|
|
1037
1041
|
case "timeout":
|
|
1038
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/
|
|
1042
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/update_departments/v1/{order_id}.");
|
|
1039
1043
|
case "unknown":
|
|
1040
1044
|
throw new errors.ChrtError({
|
|
1041
1045
|
message: _response.error.errorMessage,
|
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
7
|
* department_id: "department_id",
|
|
8
|
+
* entry_tag: "entry_tag",
|
|
8
9
|
* body: "2024-01-15T09:30:00Z"
|
|
9
10
|
* }
|
|
10
11
|
*/
|
|
11
12
|
export interface OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request {
|
|
12
13
|
department_id?: string | null;
|
|
14
|
+
/** Context tag for the generated tasks */
|
|
15
|
+
entry_tag?: string | null;
|
|
13
16
|
body?: string | null;
|
|
14
17
|
}
|