@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
|
@@ -106,7 +106,7 @@ export class Orgs {
|
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
|
-
* Lists all members of the caller's organization with their roles and details. Supports search by name, filtering by role, sorting, and pagination. | () -> (OrgMemberListRes)
|
|
109
|
+
* 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)
|
|
110
110
|
*
|
|
111
111
|
* @param {Chrt.OrgsListMembersV1Request} request
|
|
112
112
|
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -116,6 +116,7 @@ export class Orgs {
|
|
|
116
116
|
* @example
|
|
117
117
|
* await client.orgs.listMembersV1({
|
|
118
118
|
* filter_role: ["owner"],
|
|
119
|
+
* filter_user_ids: ["filter_user_ids"],
|
|
119
120
|
* sort_by: "first_name",
|
|
120
121
|
* sort_order: "asc",
|
|
121
122
|
* page: 1,
|
|
@@ -129,7 +130,7 @@ export class Orgs {
|
|
|
129
130
|
__listMembersV1() {
|
|
130
131
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
131
132
|
var _a, _b, _c, _d, _e, _f;
|
|
132
|
-
const { filter_role: filterRole, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, } = request;
|
|
133
|
+
const { filter_role: filterRole, filter_user_ids: filterUserIds, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, } = request;
|
|
133
134
|
const _queryParams = {};
|
|
134
135
|
if (filterRole !== undefined) {
|
|
135
136
|
if (Array.isArray(filterRole)) {
|
|
@@ -139,6 +140,14 @@ export class Orgs {
|
|
|
139
140
|
_queryParams["filter_role"] = filterRole;
|
|
140
141
|
}
|
|
141
142
|
}
|
|
143
|
+
if (filterUserIds !== undefined) {
|
|
144
|
+
if (Array.isArray(filterUserIds)) {
|
|
145
|
+
_queryParams["filter_user_ids"] = filterUserIds.map((item) => item);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
_queryParams["filter_user_ids"] = filterUserIds;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
142
151
|
if (sortBy !== undefined) {
|
|
143
152
|
_queryParams["sort_by"] = sortBy;
|
|
144
153
|
}
|
|
@@ -6,6 +6,7 @@ import * as Chrt from "../../../../index.mjs";
|
|
|
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.mjs";
|
|
|
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
|
*
|
|
@@ -35,6 +35,65 @@ export class Drivers {
|
|
|
35
35
|
var _a;
|
|
36
36
|
return ((_a = this._complianceDocuments) !== null && _a !== void 0 ? _a : (this._complianceDocuments = new ComplianceDocuments(this._options)));
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* 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)
|
|
40
|
+
*
|
|
41
|
+
* @param {string} driverId
|
|
42
|
+
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
|
+
*
|
|
44
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await client.shipping.drivers.archiveV1("driver_id")
|
|
48
|
+
*/
|
|
49
|
+
archiveV1(driverId, requestOptions) {
|
|
50
|
+
return core.HttpResponsePromise.fromPromise(this.__archiveV1(driverId, requestOptions));
|
|
51
|
+
}
|
|
52
|
+
__archiveV1(driverId, requestOptions) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
var _a, _b, _c, _d;
|
|
55
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
56
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
57
|
+
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)}`),
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers: _headers,
|
|
60
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
61
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
62
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
63
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
64
|
+
});
|
|
65
|
+
if (_response.ok) {
|
|
66
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
67
|
+
}
|
|
68
|
+
if (_response.error.reason === "status-code") {
|
|
69
|
+
switch (_response.error.statusCode) {
|
|
70
|
+
case 422:
|
|
71
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
72
|
+
default:
|
|
73
|
+
throw new errors.ChrtError({
|
|
74
|
+
statusCode: _response.error.statusCode,
|
|
75
|
+
body: _response.error.body,
|
|
76
|
+
rawResponse: _response.rawResponse,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
switch (_response.error.reason) {
|
|
81
|
+
case "non-json":
|
|
82
|
+
throw new errors.ChrtError({
|
|
83
|
+
statusCode: _response.error.statusCode,
|
|
84
|
+
body: _response.error.rawBody,
|
|
85
|
+
rawResponse: _response.rawResponse,
|
|
86
|
+
});
|
|
87
|
+
case "timeout":
|
|
88
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/drivers/archive/v1/{driver_id}.");
|
|
89
|
+
case "unknown":
|
|
90
|
+
throw new errors.ChrtError({
|
|
91
|
+
message: _response.error.errorMessage,
|
|
92
|
+
rawResponse: _response.rawResponse,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
38
97
|
/**
|
|
39
98
|
* 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)
|
|
40
99
|
*
|
|
@@ -221,6 +280,8 @@ export class Drivers {
|
|
|
221
280
|
* page: 1,
|
|
222
281
|
* page_size: 1,
|
|
223
282
|
* search: "search",
|
|
283
|
+
* filter_by_driver_id: "filter_by_driver_id",
|
|
284
|
+
* filter_archived: true,
|
|
224
285
|
* filter_available_according_to_driver: true,
|
|
225
286
|
* filter_available_according_to_operators: true,
|
|
226
287
|
* filter_status: ["unassigned"]
|
|
@@ -231,8 +292,8 @@ export class Drivers {
|
|
|
231
292
|
}
|
|
232
293
|
__listV1() {
|
|
233
294
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
234
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
235
|
-
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;
|
|
295
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
296
|
+
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;
|
|
236
297
|
const _queryParams = {};
|
|
237
298
|
if (sortOrder !== undefined) {
|
|
238
299
|
_queryParams["sort_order"] = sortOrder;
|
|
@@ -246,12 +307,18 @@ export class Drivers {
|
|
|
246
307
|
if (search !== undefined) {
|
|
247
308
|
_queryParams["search"] = search;
|
|
248
309
|
}
|
|
310
|
+
if (filterByDriverId !== undefined) {
|
|
311
|
+
_queryParams["filter_by_driver_id"] = filterByDriverId;
|
|
312
|
+
}
|
|
313
|
+
if (filterArchived !== undefined) {
|
|
314
|
+
_queryParams["filter_archived"] = (_c = filterArchived === null || filterArchived === void 0 ? void 0 : filterArchived.toString()) !== null && _c !== void 0 ? _c : null;
|
|
315
|
+
}
|
|
249
316
|
if (filterAvailableAccordingToDriver !== undefined) {
|
|
250
|
-
_queryParams["filter_available_according_to_driver"] = (
|
|
317
|
+
_queryParams["filter_available_according_to_driver"] = (_d = filterAvailableAccordingToDriver === null || filterAvailableAccordingToDriver === void 0 ? void 0 : filterAvailableAccordingToDriver.toString()) !== null && _d !== void 0 ? _d : null;
|
|
251
318
|
}
|
|
252
319
|
if (filterAvailableAccordingToOperators !== undefined) {
|
|
253
320
|
_queryParams["filter_available_according_to_operators"] =
|
|
254
|
-
(
|
|
321
|
+
(_e = filterAvailableAccordingToOperators === null || filterAvailableAccordingToOperators === void 0 ? void 0 : filterAvailableAccordingToOperators.toString()) !== null && _e !== void 0 ? _e : null;
|
|
255
322
|
}
|
|
256
323
|
if (filterStatus !== undefined) {
|
|
257
324
|
if (Array.isArray(filterStatus)) {
|
|
@@ -261,9 +328,9 @@ export class Drivers {
|
|
|
261
328
|
_queryParams["filter_status"] = filterStatus;
|
|
262
329
|
}
|
|
263
330
|
}
|
|
264
|
-
let _headers = mergeHeaders((
|
|
265
|
-
const _response = yield ((
|
|
266
|
-
url: core.url.join((
|
|
331
|
+
let _headers = mergeHeaders((_f = this._options) === null || _f === void 0 ? void 0 : _f.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
332
|
+
const _response = yield ((_g = this._options.fetcher) !== null && _g !== void 0 ? _g : core.fetcher)({
|
|
333
|
+
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"),
|
|
267
334
|
method: "GET",
|
|
268
335
|
headers: _headers,
|
|
269
336
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -314,6 +381,7 @@ export class Drivers {
|
|
|
314
381
|
* @example
|
|
315
382
|
* await client.shipping.drivers.listOrgMembersAndDriversV1({
|
|
316
383
|
* search: "search",
|
|
384
|
+
* filter_archived: true,
|
|
317
385
|
* filter_role: ["owner"],
|
|
318
386
|
* filter_available_according_to_driver: true,
|
|
319
387
|
* filter_available_according_to_operators: true,
|
|
@@ -328,12 +396,15 @@ export class Drivers {
|
|
|
328
396
|
}
|
|
329
397
|
__listOrgMembersAndDriversV1() {
|
|
330
398
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
331
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
332
|
-
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;
|
|
399
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
400
|
+
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;
|
|
333
401
|
const _queryParams = {};
|
|
334
402
|
if (search !== undefined) {
|
|
335
403
|
_queryParams["search"] = search;
|
|
336
404
|
}
|
|
405
|
+
if (filterArchived !== undefined) {
|
|
406
|
+
_queryParams["filter_archived"] = (_a = filterArchived === null || filterArchived === void 0 ? void 0 : filterArchived.toString()) !== null && _a !== void 0 ? _a : null;
|
|
407
|
+
}
|
|
337
408
|
if (filterRole !== undefined) {
|
|
338
409
|
if (Array.isArray(filterRole)) {
|
|
339
410
|
_queryParams["filter_role"] = filterRole.map((item) => item);
|
|
@@ -343,11 +414,11 @@ export class Drivers {
|
|
|
343
414
|
}
|
|
344
415
|
}
|
|
345
416
|
if (filterAvailableAccordingToDriver !== undefined) {
|
|
346
|
-
_queryParams["filter_available_according_to_driver"] = (
|
|
417
|
+
_queryParams["filter_available_according_to_driver"] = (_b = filterAvailableAccordingToDriver === null || filterAvailableAccordingToDriver === void 0 ? void 0 : filterAvailableAccordingToDriver.toString()) !== null && _b !== void 0 ? _b : null;
|
|
347
418
|
}
|
|
348
419
|
if (filterAvailableAccordingToOperators !== undefined) {
|
|
349
420
|
_queryParams["filter_available_according_to_operators"] =
|
|
350
|
-
(
|
|
421
|
+
(_c = filterAvailableAccordingToOperators === null || filterAvailableAccordingToOperators === void 0 ? void 0 : filterAvailableAccordingToOperators.toString()) !== null && _c !== void 0 ? _c : null;
|
|
351
422
|
}
|
|
352
423
|
if (sortBy !== undefined) {
|
|
353
424
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -356,14 +427,14 @@ export class Drivers {
|
|
|
356
427
|
_queryParams["sort_order"] = sortOrder;
|
|
357
428
|
}
|
|
358
429
|
if (page !== undefined) {
|
|
359
|
-
_queryParams["page"] = (
|
|
430
|
+
_queryParams["page"] = (_d = page === null || page === void 0 ? void 0 : page.toString()) !== null && _d !== void 0 ? _d : null;
|
|
360
431
|
}
|
|
361
432
|
if (pageSize !== undefined) {
|
|
362
|
-
_queryParams["page_size"] = (
|
|
433
|
+
_queryParams["page_size"] = (_e = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _e !== void 0 ? _e : null;
|
|
363
434
|
}
|
|
364
|
-
let _headers = mergeHeaders((
|
|
365
|
-
const _response = yield ((
|
|
366
|
-
url: core.url.join((
|
|
435
|
+
let _headers = mergeHeaders((_f = this._options) === null || _f === void 0 ? void 0 : _f.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
436
|
+
const _response = yield ((_g = this._options.fetcher) !== null && _g !== void 0 ? _g : core.fetcher)({
|
|
437
|
+
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"),
|
|
367
438
|
method: "GET",
|
|
368
439
|
headers: _headers,
|
|
369
440
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -907,6 +978,65 @@ export class Drivers {
|
|
|
907
978
|
}
|
|
908
979
|
});
|
|
909
980
|
}
|
|
981
|
+
/**
|
|
982
|
+
* Restores an archived driver with active organization membership. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
|
|
983
|
+
*
|
|
984
|
+
* @param {string} driverId
|
|
985
|
+
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
986
|
+
*
|
|
987
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
988
|
+
*
|
|
989
|
+
* @example
|
|
990
|
+
* await client.shipping.drivers.unarchiveV1("driver_id")
|
|
991
|
+
*/
|
|
992
|
+
unarchiveV1(driverId, requestOptions) {
|
|
993
|
+
return core.HttpResponsePromise.fromPromise(this.__unarchiveV1(driverId, requestOptions));
|
|
994
|
+
}
|
|
995
|
+
__unarchiveV1(driverId, requestOptions) {
|
|
996
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
997
|
+
var _a, _b, _c, _d;
|
|
998
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
999
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1000
|
+
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)}`),
|
|
1001
|
+
method: "POST",
|
|
1002
|
+
headers: _headers,
|
|
1003
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1004
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1005
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1006
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1007
|
+
});
|
|
1008
|
+
if (_response.ok) {
|
|
1009
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1010
|
+
}
|
|
1011
|
+
if (_response.error.reason === "status-code") {
|
|
1012
|
+
switch (_response.error.statusCode) {
|
|
1013
|
+
case 422:
|
|
1014
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1015
|
+
default:
|
|
1016
|
+
throw new errors.ChrtError({
|
|
1017
|
+
statusCode: _response.error.statusCode,
|
|
1018
|
+
body: _response.error.body,
|
|
1019
|
+
rawResponse: _response.rawResponse,
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
switch (_response.error.reason) {
|
|
1024
|
+
case "non-json":
|
|
1025
|
+
throw new errors.ChrtError({
|
|
1026
|
+
statusCode: _response.error.statusCode,
|
|
1027
|
+
body: _response.error.rawBody,
|
|
1028
|
+
rawResponse: _response.rawResponse,
|
|
1029
|
+
});
|
|
1030
|
+
case "timeout":
|
|
1031
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/drivers/unarchive/v1/{driver_id}.");
|
|
1032
|
+
case "unknown":
|
|
1033
|
+
throw new errors.ChrtError({
|
|
1034
|
+
message: _response.error.errorMessage,
|
|
1035
|
+
rawResponse: _response.rawResponse,
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
910
1040
|
/**
|
|
911
1041
|
* Updates driver contact details and vehicle type assignments. Provider orgs only; caller must be the driver (self) or an operator+. | (DriverClientUpdate1) -> (bool)
|
|
912
1042
|
*
|
|
@@ -6,6 +6,7 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
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.mjs";
|
|
|
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/esm/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.mts
CHANGED
|
@@ -9,6 +9,8 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
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.mjs";
|
|
|
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.mjs";
|
|
|
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
|
*
|
|
@@ -260,6 +260,7 @@ export class Orders {
|
|
|
260
260
|
* @example
|
|
261
261
|
* await client.shipping.orders.addCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id", {
|
|
262
262
|
* department_id: "department_id",
|
|
263
|
+
* entry_tag: "entry_tag",
|
|
263
264
|
* body: "2024-01-15T09:30:00Z"
|
|
264
265
|
* })
|
|
265
266
|
*/
|
|
@@ -269,11 +270,14 @@ export class Orders {
|
|
|
269
270
|
__addCoordinatorTaskListToApplyAtOrderStagingV1(orderId_1, taskListId_1) {
|
|
270
271
|
return __awaiter(this, arguments, void 0, function* (orderId, taskListId, request = {}, requestOptions) {
|
|
271
272
|
var _a, _b, _c, _d;
|
|
272
|
-
const { department_id: departmentId, body: _body } = request;
|
|
273
|
+
const { department_id: departmentId, entry_tag: entryTag, body: _body } = request;
|
|
273
274
|
const _queryParams = {};
|
|
274
275
|
if (departmentId !== undefined) {
|
|
275
276
|
_queryParams["department_id"] = departmentId;
|
|
276
277
|
}
|
|
278
|
+
if (entryTag !== undefined) {
|
|
279
|
+
_queryParams["entry_tag"] = entryTag;
|
|
280
|
+
}
|
|
277
281
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
278
282
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
279
283
|
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)}`),
|
|
@@ -562,7 +566,7 @@ export class Orders {
|
|
|
562
566
|
});
|
|
563
567
|
}
|
|
564
568
|
/**
|
|
565
|
-
* Returns the coordinator's account-level default department for the order's shipper. |
|
|
569
|
+
* Returns the coordinator's account-level default department for the order's shipper. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | () -> (PydanticObjectId | None)
|
|
566
570
|
*
|
|
567
571
|
* @param {string} orderId
|
|
568
572
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -946,26 +950,26 @@ export class Orders {
|
|
|
946
950
|
});
|
|
947
951
|
}
|
|
948
952
|
/**
|
|
949
|
-
*
|
|
953
|
+
* 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)
|
|
950
954
|
*
|
|
951
955
|
* @param {string} orderId
|
|
952
|
-
* @param {Chrt.shipping.
|
|
956
|
+
* @param {Chrt.shipping.OrdersUpdateDepartmentsReq} request
|
|
953
957
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
954
958
|
*
|
|
955
959
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
956
960
|
*
|
|
957
961
|
* @example
|
|
958
|
-
* await client.shipping.orders.
|
|
962
|
+
* await client.shipping.orders.updateDepartmentsV1("order_id")
|
|
959
963
|
*/
|
|
960
|
-
|
|
961
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
964
|
+
updateDepartmentsV1(orderId, request = {}, requestOptions) {
|
|
965
|
+
return core.HttpResponsePromise.fromPromise(this.__updateDepartmentsV1(orderId, request, requestOptions));
|
|
962
966
|
}
|
|
963
|
-
|
|
967
|
+
__updateDepartmentsV1(orderId_1) {
|
|
964
968
|
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
965
969
|
var _a, _b, _c, _d;
|
|
966
970
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
967
971
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
968
|
-
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/
|
|
972
|
+
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)}`),
|
|
969
973
|
method: "PATCH",
|
|
970
974
|
headers: _headers,
|
|
971
975
|
contentType: "application/json",
|
|
@@ -999,7 +1003,7 @@ export class Orders {
|
|
|
999
1003
|
rawResponse: _response.rawResponse,
|
|
1000
1004
|
});
|
|
1001
1005
|
case "timeout":
|
|
1002
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/
|
|
1006
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/update_departments/v1/{order_id}.");
|
|
1003
1007
|
case "unknown":
|
|
1004
1008
|
throw new errors.ChrtError({
|
|
1005
1009
|
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
|
}
|
|
@@ -6,7 +6,7 @@ export { type OrdersTaskGroupOrderingReq } from "./OrdersTaskGroupOrderingReq.mj
|
|
|
6
6
|
export { type OrdersTypeaheadLabelV1Request } from "./OrdersTypeaheadLabelV1Request.mjs";
|
|
7
7
|
export { type OrdersTypeaheadV1Request } from "./OrdersTypeaheadV1Request.mjs";
|
|
8
8
|
export { type OrdersUnassignReq } from "./OrdersUnassignReq.mjs";
|
|
9
|
-
export { type
|
|
9
|
+
export { type OrdersUpdateDepartmentsReq } from "./OrdersUpdateDepartmentsReq.mjs";
|
|
10
10
|
export { type OrdersUpdateDraftReq } from "./OrdersUpdateDraftReq.mjs";
|
|
11
11
|
export { type OrdersUpdateLabelReq } from "./OrdersUpdateLabelReq.mjs";
|
|
12
12
|
export { type OrdersUpdateOffChrtReferenceIdReq } from "./OrdersUpdateOffChrtReferenceIdReq.mjs";
|
|
@@ -11,7 +11,7 @@ export interface OrdersOpenDraftReq {
|
|
|
11
11
|
coordinator_org_id?: string | null;
|
|
12
12
|
/** Optional key, unique per caller org, that makes draft creation idempotent: re-sending the same key returns the already-created draft instead of creating a duplicate. */
|
|
13
13
|
creation_idempotency_key?: string | null;
|
|
14
|
-
|
|
14
|
+
department_ids?: string[];
|
|
15
15
|
label?: string | null;
|
|
16
16
|
/** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
|
|
17
17
|
off_chrt_reference_id?: string | null;
|
package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts
CHANGED
|
@@ -92,13 +92,13 @@ export declare class Expanded {
|
|
|
92
92
|
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
93
93
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
94
94
|
* filter_executor_org_id: "filter_executor_org_id",
|
|
95
|
-
*
|
|
95
|
+
* filter_executor_department_ids: ["filter_executor_department_ids"],
|
|
96
96
|
* filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
|
|
97
97
|
* filter_coordinator_org_id: "filter_coordinator_org_id",
|
|
98
98
|
* filter_shipper_org_id: "filter_shipper_org_id",
|
|
99
99
|
* filter_off_chrt_shipper_org_data_id: "filter_off_chrt_shipper_org_data_id",
|
|
100
100
|
* filter_coordinator_shipper_account_ids: ["filter_coordinator_shipper_account_ids"],
|
|
101
|
-
*
|
|
101
|
+
* filter_coordinator_department_ids: ["filter_coordinator_department_ids"],
|
|
102
102
|
* filter_coordinator_assigned_user_ids: ["filter_coordinator_assigned_user_ids"],
|
|
103
103
|
* filter_coordinator_label: "filter_coordinator_label",
|
|
104
104
|
* body: {}
|