@chrt-inc/typescript-sdk 1.990.0 → 1.997.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/errors/ForbiddenError.d.ts +9 -0
- package/dist/cjs/api/errors/ForbiddenError.js +52 -0
- package/dist/cjs/api/errors/LockedError.d.ts +9 -0
- package/dist/cjs/api/errors/LockedError.js +52 -0
- package/dist/cjs/api/errors/NotFoundError.d.ts +9 -0
- package/dist/cjs/api/errors/NotFoundError.js +52 -0
- package/dist/cjs/api/errors/ServiceUnavailableError.d.ts +9 -0
- package/dist/cjs/api/errors/ServiceUnavailableError.js +52 -0
- package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -2
- package/dist/cjs/api/errors/index.d.ts +4 -0
- package/dist/cjs/api/errors/index.js +4 -0
- package/dist/cjs/api/resources/billingNew/resources/orders/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/billingNew/resources/orders/client/Client.js +9 -4
- package/dist/cjs/api/resources/billingNew/resources/orders/client/requests/OrderBillingExpandedListReq.d.ts +3 -3
- package/dist/cjs/api/resources/listing/resources/bidThreads/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/listing/resources/bidThreads/client/Client.js +1 -1
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.d.ts +19 -3
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.js +87 -9
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientUpdate1.d.ts +4 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksExpandedListV1Request.d.ts +3 -3
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.d.ts +3 -3
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksTypeaheadV1Request.d.ts +16 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/operations/resources/orderInternalMessages/resources/s3Objects/client/Client.d.ts +5 -1
- package/dist/cjs/api/resources/operations/resources/orderInternalMessages/resources/s3Objects/client/Client.js +13 -1
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/resources/s3Object/client/Client.d.ts +5 -1
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/resources/s3Object/client/Client.js +13 -1
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +25 -8
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.ts +9 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/resources/s3Object/client/Client.d.ts +5 -1
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/resources/s3Object/client/Client.js +13 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/Client.js +10 -5
- 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/orderTemplatesNew/client/requests/OrderTemplatesNewListV1Request.d.ts +3 -3
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +9 -9
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/{OrdersUpdateLabelReq.d.ts → OrdersUpdateLabelsReq.d.ts} +2 -3
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersUpdateLabelsReq.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 +1 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +9 -4
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.ts +3 -2
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +5 -1
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.js +13 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.ts +5 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.js +13 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +9 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesListV1Request.d.ts +6 -0
- package/dist/cjs/api/types/BidThreadForListing1.d.ts +19 -0
- package/dist/cjs/api/types/BidThreadForListing1.js +5 -0
- package/dist/cjs/api/types/BidThreadForListingListRes.d.ts +8 -0
- package/dist/cjs/api/types/BidThreadForListingListRes.js +5 -0
- package/dist/cjs/api/types/FileDownloadErrorRes.d.ts +27 -0
- package/dist/cjs/api/types/FileDownloadErrorRes.js +19 -0
- package/dist/cjs/api/types/FileDownloadRequestErrorRes.d.ts +13 -0
- package/dist/cjs/api/types/FileDownloadRequestErrorRes.js +5 -0
- package/dist/cjs/api/types/NotFoundErrorBody.d.ts +5 -0
- package/dist/cjs/api/types/NotFoundErrorBody.js +5 -0
- package/dist/cjs/api/types/OperationsTaskStatusEnum.d.ts +2 -1
- package/dist/cjs/api/types/OperationsTaskStatusEnum.js +1 -0
- package/dist/cjs/api/types/OperationsTaskTypeEnum.d.ts +2 -1
- package/dist/cjs/api/types/OperationsTaskTypeEnum.js +1 -0
- package/dist/cjs/api/types/OperationsTaskTypeaheadFieldEnum.d.ts +4 -0
- package/dist/cjs/api/types/OperationsTaskTypeaheadFieldEnum.js +5 -0
- package/dist/cjs/api/types/OperationsTaskTypeaheadResult.d.ts +8 -0
- package/dist/cjs/api/types/OperationsTaskTypeaheadResult.js +5 -0
- package/dist/cjs/api/types/Order1.d.ts +1 -1
- package/dist/cjs/api/types/OrderBillingExecutor1.d.ts +1 -1
- package/dist/cjs/api/types/OrderBillingExpandedListItem1.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 +2 -1
- package/dist/cjs/api/types/TaskArtifactTypeEnum1.d.ts +2 -1
- package/dist/cjs/api/types/TaskArtifactTypeEnum1.js +1 -0
- package/dist/cjs/api/types/UnprocessableEntityErrorBody.d.ts +5 -0
- package/dist/cjs/api/types/UnprocessableEntityErrorBody.js +5 -0
- package/dist/cjs/api/types/index.d.ts +8 -0
- package/dist/cjs/api/types/index.js +8 -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/errors/ForbiddenError.d.mts +9 -0
- package/dist/esm/api/errors/ForbiddenError.mjs +15 -0
- package/dist/esm/api/errors/LockedError.d.mts +9 -0
- package/dist/esm/api/errors/LockedError.mjs +15 -0
- package/dist/esm/api/errors/NotFoundError.d.mts +9 -0
- package/dist/esm/api/errors/NotFoundError.mjs +15 -0
- package/dist/esm/api/errors/ServiceUnavailableError.d.mts +9 -0
- package/dist/esm/api/errors/ServiceUnavailableError.mjs +15 -0
- package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -2
- package/dist/esm/api/errors/index.d.mts +4 -0
- package/dist/esm/api/errors/index.mjs +4 -0
- package/dist/esm/api/resources/billingNew/resources/orders/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/billingNew/resources/orders/client/Client.mjs +9 -4
- package/dist/esm/api/resources/billingNew/resources/orders/client/requests/OrderBillingExpandedListReq.d.mts +3 -3
- package/dist/esm/api/resources/listing/resources/bidThreads/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/listing/resources/bidThreads/client/Client.mjs +1 -1
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.d.mts +19 -3
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.mjs +87 -9
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientUpdate1.d.mts +4 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksExpandedListV1Request.d.mts +3 -3
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.d.mts +3 -3
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksTypeaheadV1Request.d.mts +16 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/operations/resources/orderInternalMessages/resources/s3Objects/client/Client.d.mts +5 -1
- package/dist/esm/api/resources/operations/resources/orderInternalMessages/resources/s3Objects/client/Client.mjs +13 -1
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/resources/s3Object/client/Client.d.mts +5 -1
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/resources/s3Object/client/Client.mjs +13 -1
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +25 -8
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.mts +9 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/resources/s3Object/client/Client.d.mts +5 -1
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/resources/s3Object/client/Client.mjs +13 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/Client.mjs +10 -5
- 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/orderTemplatesNew/client/requests/OrderTemplatesNewListV1Request.d.mts +3 -3
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +9 -9
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/{OrdersUpdateLabelReq.d.mts → OrdersUpdateLabelsReq.d.mts} +2 -3
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersUpdateLabelsReq.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 +1 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +9 -4
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.mts +3 -2
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.mts +5 -1
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.mjs +13 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.mts +5 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.mjs +13 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +9 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesListV1Request.d.mts +6 -0
- package/dist/esm/api/types/BidThreadForListing1.d.mts +19 -0
- package/dist/esm/api/types/BidThreadForListing1.mjs +4 -0
- package/dist/esm/api/types/BidThreadForListingListRes.d.mts +8 -0
- package/dist/esm/api/types/BidThreadForListingListRes.mjs +4 -0
- package/dist/esm/api/types/FileDownloadErrorRes.d.mts +27 -0
- package/dist/esm/api/types/FileDownloadErrorRes.mjs +16 -0
- package/dist/esm/api/types/FileDownloadRequestErrorRes.d.mts +13 -0
- package/dist/esm/api/types/FileDownloadRequestErrorRes.mjs +4 -0
- package/dist/esm/api/types/NotFoundErrorBody.d.mts +5 -0
- package/dist/esm/api/types/NotFoundErrorBody.mjs +4 -0
- package/dist/esm/api/types/OperationsTaskStatusEnum.d.mts +2 -1
- package/dist/esm/api/types/OperationsTaskStatusEnum.mjs +1 -0
- package/dist/esm/api/types/OperationsTaskTypeEnum.d.mts +2 -1
- package/dist/esm/api/types/OperationsTaskTypeEnum.mjs +1 -0
- package/dist/esm/api/types/OperationsTaskTypeaheadFieldEnum.d.mts +4 -0
- package/dist/esm/api/types/OperationsTaskTypeaheadFieldEnum.mjs +4 -0
- package/dist/esm/api/types/OperationsTaskTypeaheadResult.d.mts +8 -0
- package/dist/esm/api/types/OperationsTaskTypeaheadResult.mjs +4 -0
- package/dist/esm/api/types/Order1.d.mts +1 -1
- package/dist/esm/api/types/OrderBillingExecutor1.d.mts +1 -1
- package/dist/esm/api/types/OrderBillingExpandedListItem1.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 +2 -1
- package/dist/esm/api/types/TaskArtifactTypeEnum1.d.mts +2 -1
- package/dist/esm/api/types/TaskArtifactTypeEnum1.mjs +1 -0
- package/dist/esm/api/types/UnprocessableEntityErrorBody.d.mts +5 -0
- package/dist/esm/api/types/UnprocessableEntityErrorBody.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +8 -0
- package/dist/esm/api/types/index.mjs +8 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +90 -19
- /package/dist/cjs/api/resources/{shipping/resources/orders/client/requests/OrdersUpdateLabelReq.js → operations/resources/operationsTasks/client/requests/OperationsTasksTypeaheadV1Request.js} +0 -0
- /package/dist/esm/api/resources/{shipping/resources/orders/client/requests/OrdersUpdateLabelReq.mjs → operations/resources/operationsTasks/client/requests/OperationsTasksTypeaheadV1Request.mjs} +0 -0
|
@@ -20,7 +20,7 @@ export class S3Objects {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Uploads a file to the caller's OrderInternalMessages for this order (lazy-creates the messages doc).
|
|
23
|
+
* Uploads a file to the caller's OrderInternalMessages for this order (lazy-creates the messages doc). Retains uploaded files; previews require a clean malware scan. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (UploadFile) -> (OrderInternalMessageS3ObjectMetadata1)
|
|
24
24
|
*
|
|
25
25
|
* @param {string} orderId
|
|
26
26
|
* @param {Chrt.operations.orderInternalMessages.BodyPostOrderInternalMessagesS3ObjectsAddV1} request
|
|
@@ -214,7 +214,11 @@ export class S3Objects {
|
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* Streams an order internal messages S3 object file from storage. | authz: min_org_role=operator | () -> (binary)
|
|
217
|
+
* @throws {@link Chrt.ForbiddenError}
|
|
218
|
+
* @throws {@link Chrt.NotFoundError}
|
|
217
219
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
220
|
+
* @throws {@link Chrt.LockedError}
|
|
221
|
+
* @throws {@link Chrt.ServiceUnavailableError}
|
|
218
222
|
*/
|
|
219
223
|
getV1(orderInternalMessageS3ObjectMetadataId, requestOptions) {
|
|
220
224
|
return core.HttpResponsePromise.fromPromise(this.__getV1(orderInternalMessageS3ObjectMetadataId, requestOptions));
|
|
@@ -238,8 +242,16 @@ export class S3Objects {
|
|
|
238
242
|
}
|
|
239
243
|
if (_response.error.reason === "status-code") {
|
|
240
244
|
switch (_response.error.statusCode) {
|
|
245
|
+
case 403:
|
|
246
|
+
throw new Chrt.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
247
|
+
case 404:
|
|
248
|
+
throw new Chrt.NotFoundError(_response.error.body, _response.rawResponse);
|
|
241
249
|
case 422:
|
|
242
250
|
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
251
|
+
case 423:
|
|
252
|
+
throw new Chrt.LockedError(_response.error.body, _response.rawResponse);
|
|
253
|
+
case 503:
|
|
254
|
+
throw new Chrt.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
243
255
|
default:
|
|
244
256
|
throw new errors.ChrtError({
|
|
245
257
|
statusCode: _response.error.statusCode,
|
|
@@ -31,7 +31,7 @@ export declare class S3Object {
|
|
|
31
31
|
protected readonly _options: S3Object.Options;
|
|
32
32
|
constructor(_options?: S3Object.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Uploads a file to an organization compliance document.
|
|
34
|
+
* Uploads a file to an organization compliance document. Retains uploaded files; previews require a clean malware scan. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (OrgComplianceDocumentS3ObjectMetadata1)
|
|
35
35
|
*
|
|
36
36
|
* @param {string} orgComplianceDocumentId
|
|
37
37
|
* @param {Chrt.orgs.complianceDocuments.BodyPostOrgComplianceDocumentsS3ObjectAddV1} request
|
|
@@ -75,7 +75,11 @@ export declare class S3Object {
|
|
|
75
75
|
private __getS3ObjectMetadataV1;
|
|
76
76
|
/**
|
|
77
77
|
* Streams an organization compliance document S3 object file from storage. | authz: allowed_org_types=[provider], min_org_role=administrator | () -> (binary)
|
|
78
|
+
* @throws {@link Chrt.ForbiddenError}
|
|
79
|
+
* @throws {@link Chrt.NotFoundError}
|
|
78
80
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
81
|
+
* @throws {@link Chrt.LockedError}
|
|
82
|
+
* @throws {@link Chrt.ServiceUnavailableError}
|
|
79
83
|
*/
|
|
80
84
|
getV1(orgComplianceDocumentS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
81
85
|
private __getV1;
|
|
@@ -20,7 +20,7 @@ export class S3Object {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Uploads a file to an organization compliance document.
|
|
23
|
+
* Uploads a file to an organization compliance document. Retains uploaded files; previews require a clean malware scan. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (OrgComplianceDocumentS3ObjectMetadata1)
|
|
24
24
|
*
|
|
25
25
|
* @param {string} orgComplianceDocumentId
|
|
26
26
|
* @param {Chrt.orgs.complianceDocuments.BodyPostOrgComplianceDocumentsS3ObjectAddV1} request
|
|
@@ -214,7 +214,11 @@ export class S3Object {
|
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* Streams an organization compliance document S3 object file from storage. | authz: allowed_org_types=[provider], min_org_role=administrator | () -> (binary)
|
|
217
|
+
* @throws {@link Chrt.ForbiddenError}
|
|
218
|
+
* @throws {@link Chrt.NotFoundError}
|
|
217
219
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
220
|
+
* @throws {@link Chrt.LockedError}
|
|
221
|
+
* @throws {@link Chrt.ServiceUnavailableError}
|
|
218
222
|
*/
|
|
219
223
|
getV1(orgComplianceDocumentS3ObjectMetadataId, requestOptions) {
|
|
220
224
|
return core.HttpResponsePromise.fromPromise(this.__getV1(orgComplianceDocumentS3ObjectMetadataId, requestOptions));
|
|
@@ -238,8 +242,16 @@ export class S3Object {
|
|
|
238
242
|
}
|
|
239
243
|
if (_response.error.reason === "status-code") {
|
|
240
244
|
switch (_response.error.statusCode) {
|
|
245
|
+
case 403:
|
|
246
|
+
throw new Chrt.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
247
|
+
case 404:
|
|
248
|
+
throw new Chrt.NotFoundError(_response.error.body, _response.rawResponse);
|
|
241
249
|
case 422:
|
|
242
250
|
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
251
|
+
case 423:
|
|
252
|
+
throw new Chrt.LockedError(_response.error.body, _response.rawResponse);
|
|
253
|
+
case 503:
|
|
254
|
+
throw new Chrt.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
243
255
|
default:
|
|
244
256
|
throw new errors.ChrtError({
|
|
245
257
|
statusCode: _response.error.statusCode,
|
|
@@ -96,6 +96,9 @@ export declare class Drivers {
|
|
|
96
96
|
* page: 1,
|
|
97
97
|
* page_size: 1,
|
|
98
98
|
* search: "search",
|
|
99
|
+
* filter_waiting: true,
|
|
100
|
+
* filter_auto_assign_enabled: true,
|
|
101
|
+
* filter_vehicle_type: ["sedan"],
|
|
99
102
|
* filter_by_driver_id: "filter_by_driver_id",
|
|
100
103
|
* filter_archived: true,
|
|
101
104
|
* filter_available_according_to_driver: true,
|
|
@@ -280,6 +280,9 @@ export class Drivers {
|
|
|
280
280
|
* page: 1,
|
|
281
281
|
* page_size: 1,
|
|
282
282
|
* search: "search",
|
|
283
|
+
* filter_waiting: true,
|
|
284
|
+
* filter_auto_assign_enabled: true,
|
|
285
|
+
* filter_vehicle_type: ["sedan"],
|
|
283
286
|
* filter_by_driver_id: "filter_by_driver_id",
|
|
284
287
|
* filter_archived: true,
|
|
285
288
|
* filter_available_according_to_driver: true,
|
|
@@ -292,8 +295,8 @@ export class Drivers {
|
|
|
292
295
|
}
|
|
293
296
|
__listV1() {
|
|
294
297
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
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;
|
|
298
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
299
|
+
const { sort_order: sortOrder, page, page_size: pageSize, search, filter_waiting: filterWaiting, filter_auto_assign_enabled: filterAutoAssignEnabled, filter_vehicle_type: filterVehicleType, filter_by_driver_id: filterByDriverId, filter_archived: filterArchived, filter_available_according_to_driver: filterAvailableAccordingToDriver, filter_available_according_to_operators: filterAvailableAccordingToOperators, filter_status: filterStatus, } = request;
|
|
297
300
|
const _queryParams = {};
|
|
298
301
|
if (sortOrder !== undefined) {
|
|
299
302
|
_queryParams["sort_order"] = sortOrder;
|
|
@@ -307,18 +310,32 @@ export class Drivers {
|
|
|
307
310
|
if (search !== undefined) {
|
|
308
311
|
_queryParams["search"] = search;
|
|
309
312
|
}
|
|
313
|
+
if (filterWaiting !== undefined) {
|
|
314
|
+
_queryParams["filter_waiting"] = (_c = filterWaiting === null || filterWaiting === void 0 ? void 0 : filterWaiting.toString()) !== null && _c !== void 0 ? _c : null;
|
|
315
|
+
}
|
|
316
|
+
if (filterAutoAssignEnabled !== undefined) {
|
|
317
|
+
_queryParams["filter_auto_assign_enabled"] = (_d = filterAutoAssignEnabled === null || filterAutoAssignEnabled === void 0 ? void 0 : filterAutoAssignEnabled.toString()) !== null && _d !== void 0 ? _d : null;
|
|
318
|
+
}
|
|
319
|
+
if (filterVehicleType !== undefined) {
|
|
320
|
+
if (Array.isArray(filterVehicleType)) {
|
|
321
|
+
_queryParams["filter_vehicle_type"] = filterVehicleType.map((item) => item);
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
_queryParams["filter_vehicle_type"] = filterVehicleType;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
310
327
|
if (filterByDriverId !== undefined) {
|
|
311
328
|
_queryParams["filter_by_driver_id"] = filterByDriverId;
|
|
312
329
|
}
|
|
313
330
|
if (filterArchived !== undefined) {
|
|
314
|
-
_queryParams["filter_archived"] = (
|
|
331
|
+
_queryParams["filter_archived"] = (_e = filterArchived === null || filterArchived === void 0 ? void 0 : filterArchived.toString()) !== null && _e !== void 0 ? _e : null;
|
|
315
332
|
}
|
|
316
333
|
if (filterAvailableAccordingToDriver !== undefined) {
|
|
317
|
-
_queryParams["filter_available_according_to_driver"] = (
|
|
334
|
+
_queryParams["filter_available_according_to_driver"] = (_f = filterAvailableAccordingToDriver === null || filterAvailableAccordingToDriver === void 0 ? void 0 : filterAvailableAccordingToDriver.toString()) !== null && _f !== void 0 ? _f : null;
|
|
318
335
|
}
|
|
319
336
|
if (filterAvailableAccordingToOperators !== undefined) {
|
|
320
337
|
_queryParams["filter_available_according_to_operators"] =
|
|
321
|
-
(
|
|
338
|
+
(_g = filterAvailableAccordingToOperators === null || filterAvailableAccordingToOperators === void 0 ? void 0 : filterAvailableAccordingToOperators.toString()) !== null && _g !== void 0 ? _g : null;
|
|
322
339
|
}
|
|
323
340
|
if (filterStatus !== undefined) {
|
|
324
341
|
if (Array.isArray(filterStatus)) {
|
|
@@ -328,9 +345,9 @@ export class Drivers {
|
|
|
328
345
|
_queryParams["filter_status"] = filterStatus;
|
|
329
346
|
}
|
|
330
347
|
}
|
|
331
|
-
let _headers = mergeHeaders((
|
|
332
|
-
const _response = yield ((
|
|
333
|
-
url: core.url.join((
|
|
348
|
+
let _headers = mergeHeaders((_h = this._options) === null || _h === void 0 ? void 0 : _h.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
349
|
+
const _response = yield ((_j = this._options.fetcher) !== null && _j !== void 0 ? _j : core.fetcher)({
|
|
350
|
+
url: core.url.join((_l = (_k = (yield core.Supplier.get(this._options.baseUrl))) !== null && _k !== void 0 ? _k : (yield core.Supplier.get(this._options.environment))) !== null && _l !== void 0 ? _l : environments.ChrtEnvironment.Local, "shipping/drivers/list/v1"),
|
|
334
351
|
method: "GET",
|
|
335
352
|
headers: _headers,
|
|
336
353
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.mts
CHANGED
|
@@ -9,6 +9,9 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
9
9
|
* page: 1,
|
|
10
10
|
* page_size: 1,
|
|
11
11
|
* search: "search",
|
|
12
|
+
* filter_waiting: true,
|
|
13
|
+
* filter_auto_assign_enabled: true,
|
|
14
|
+
* filter_vehicle_type: ["sedan"],
|
|
12
15
|
* filter_by_driver_id: "filter_by_driver_id",
|
|
13
16
|
* filter_archived: true,
|
|
14
17
|
* filter_available_according_to_driver: true,
|
|
@@ -23,6 +26,12 @@ export interface DriversListV1Request {
|
|
|
23
26
|
page_size?: number | null;
|
|
24
27
|
/** Full-text search query */
|
|
25
28
|
search?: string | null;
|
|
29
|
+
/** Filter by waiting status */
|
|
30
|
+
filter_waiting?: boolean | null;
|
|
31
|
+
/** Filter by automatic assignment consent */
|
|
32
|
+
filter_auto_assign_enabled?: boolean | null;
|
|
33
|
+
/** Filter by any matching vehicle type */
|
|
34
|
+
filter_vehicle_type?: (Chrt.VehicleTypeEnum | null) | (Chrt.VehicleTypeEnum | null)[];
|
|
26
35
|
/** Filter by driver ID */
|
|
27
36
|
filter_by_driver_id?: string | null;
|
|
28
37
|
/** Select archived drivers instead of active drivers */
|
|
@@ -31,7 +31,7 @@ export declare class S3Object {
|
|
|
31
31
|
protected readonly _options: S3Object.Options;
|
|
32
32
|
constructor(_options?: S3Object.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Uploads a file to a driver compliance document.
|
|
34
|
+
* Uploads a file to a driver compliance document. Retains uploaded files; previews require a clean malware scan. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (DriverComplianceDocumentS3ObjectMetadata1)
|
|
35
35
|
*
|
|
36
36
|
* @param {string} driverComplianceDocumentId
|
|
37
37
|
* @param {Chrt.shipping.drivers.complianceDocuments.BodyPostDriverComplianceDocumentsS3ObjectAddV1} request
|
|
@@ -75,7 +75,11 @@ export declare class S3Object {
|
|
|
75
75
|
private __getS3ObjectMetadataV1;
|
|
76
76
|
/**
|
|
77
77
|
* Streams a driver compliance document S3 object file from storage. | authz: allowed_org_types=[provider], min_org_role=administrator | () -> (binary)
|
|
78
|
+
* @throws {@link Chrt.ForbiddenError}
|
|
79
|
+
* @throws {@link Chrt.NotFoundError}
|
|
78
80
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
81
|
+
* @throws {@link Chrt.LockedError}
|
|
82
|
+
* @throws {@link Chrt.ServiceUnavailableError}
|
|
79
83
|
*/
|
|
80
84
|
getV1(driverComplianceDocumentS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
81
85
|
private __getV1;
|
|
@@ -20,7 +20,7 @@ export class S3Object {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Uploads a file to a driver compliance document.
|
|
23
|
+
* Uploads a file to a driver compliance document. Retains uploaded files; previews require a clean malware scan. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (DriverComplianceDocumentS3ObjectMetadata1)
|
|
24
24
|
*
|
|
25
25
|
* @param {string} driverComplianceDocumentId
|
|
26
26
|
* @param {Chrt.shipping.drivers.complianceDocuments.BodyPostDriverComplianceDocumentsS3ObjectAddV1} request
|
|
@@ -214,7 +214,11 @@ export class S3Object {
|
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* Streams a driver compliance document S3 object file from storage. | authz: allowed_org_types=[provider], min_org_role=administrator | () -> (binary)
|
|
217
|
+
* @throws {@link Chrt.ForbiddenError}
|
|
218
|
+
* @throws {@link Chrt.NotFoundError}
|
|
217
219
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
220
|
+
* @throws {@link Chrt.LockedError}
|
|
221
|
+
* @throws {@link Chrt.ServiceUnavailableError}
|
|
218
222
|
*/
|
|
219
223
|
getV1(driverComplianceDocumentS3ObjectMetadataId, requestOptions) {
|
|
220
224
|
return core.HttpResponsePromise.fromPromise(this.__getV1(driverComplianceDocumentS3ObjectMetadataId, requestOptions));
|
|
@@ -238,8 +242,16 @@ export class S3Object {
|
|
|
238
242
|
}
|
|
239
243
|
if (_response.error.reason === "status-code") {
|
|
240
244
|
switch (_response.error.statusCode) {
|
|
245
|
+
case 403:
|
|
246
|
+
throw new Chrt.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
247
|
+
case 404:
|
|
248
|
+
throw new Chrt.NotFoundError(_response.error.body, _response.rawResponse);
|
|
241
249
|
case 422:
|
|
242
250
|
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
251
|
+
case 423:
|
|
252
|
+
throw new Chrt.LockedError(_response.error.body, _response.rawResponse);
|
|
253
|
+
case 503:
|
|
254
|
+
throw new Chrt.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
243
255
|
default:
|
|
244
256
|
throw new errors.ChrtError({
|
|
245
257
|
statusCode: _response.error.statusCode,
|
|
@@ -88,7 +88,7 @@ export declare class OrderTemplatesNew {
|
|
|
88
88
|
resolveDateparserV1(request: Chrt.shipping.OrderTemplateNewDateparserResolveReq, requestOptions?: OrderTemplatesNew.RequestOptions): core.HttpResponsePromise<Chrt.OrderTemplateNewDateparserResolveRes>;
|
|
89
89
|
private __resolveDateparserV1;
|
|
90
90
|
/**
|
|
91
|
-
* Lists order templates with filtering, sorting, pagination, full-text search, and party/account expansion. | authz: min_org_role=operator | () -> (OrderTemplateNewListRes)
|
|
91
|
+
* Lists order templates with filtering, sorting, pagination, full-text search, and party/account/department expansion. | authz: min_org_role=operator | () -> (OrderTemplateNewListRes)
|
|
92
92
|
*
|
|
93
93
|
* @param {Chrt.shipping.OrderTemplatesNewListV1Request} request
|
|
94
94
|
* @param {OrderTemplatesNew.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -104,7 +104,7 @@ export declare class OrderTemplatesNew {
|
|
|
104
104
|
* search: "search",
|
|
105
105
|
* filter_archived: true,
|
|
106
106
|
* filter_owned_by_user_id: "filter_owned_by_user_id",
|
|
107
|
-
*
|
|
107
|
+
* filter_coordinator_labels: ["filter_coordinator_labels"],
|
|
108
108
|
* filter_executor_org_id: "filter_executor_org_id",
|
|
109
109
|
* filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
|
|
110
110
|
* filter_shipper_org_id: "filter_shipper_org_id",
|
|
@@ -232,7 +232,7 @@ export class OrderTemplatesNew {
|
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
|
-
* Lists order templates with filtering, sorting, pagination, full-text search, and party/account expansion. | authz: min_org_role=operator | () -> (OrderTemplateNewListRes)
|
|
235
|
+
* Lists order templates with filtering, sorting, pagination, full-text search, and party/account/department expansion. | authz: min_org_role=operator | () -> (OrderTemplateNewListRes)
|
|
236
236
|
*
|
|
237
237
|
* @param {Chrt.shipping.OrderTemplatesNewListV1Request} request
|
|
238
238
|
* @param {OrderTemplatesNew.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -248,7 +248,7 @@ export class OrderTemplatesNew {
|
|
|
248
248
|
* search: "search",
|
|
249
249
|
* filter_archived: true,
|
|
250
250
|
* filter_owned_by_user_id: "filter_owned_by_user_id",
|
|
251
|
-
*
|
|
251
|
+
* filter_coordinator_labels: ["filter_coordinator_labels"],
|
|
252
252
|
* filter_executor_org_id: "filter_executor_org_id",
|
|
253
253
|
* filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
|
|
254
254
|
* filter_shipper_org_id: "filter_shipper_org_id",
|
|
@@ -268,7 +268,7 @@ export class OrderTemplatesNew {
|
|
|
268
268
|
__listV1() {
|
|
269
269
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
270
270
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
271
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_archived: filterArchived, filter_owned_by_user_id: filterOwnedByUserId,
|
|
271
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_archived: filterArchived, filter_owned_by_user_id: filterOwnedByUserId, filter_coordinator_labels: filterCoordinatorLabels, filter_executor_org_id: filterExecutorOrgId, filter_off_chrt_executor_org_data_id: filterOffChrtExecutorOrgDataId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, filter_created_at_timestamp_gte: filterCreatedAtTimestampGte, filter_created_at_timestamp_lte: filterCreatedAtTimestampLte, filter_last_edited_at_timestamp_gte: filterLastEditedAtTimestampGte, filter_last_edited_at_timestamp_lte: filterLastEditedAtTimestampLte, filter_last_used_at_timestamp_gte: filterLastUsedAtTimestampGte, filter_last_used_at_timestamp_lte: filterLastUsedAtTimestampLte, } = request;
|
|
272
272
|
const _queryParams = {};
|
|
273
273
|
if (sortBy !== undefined) {
|
|
274
274
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -291,8 +291,13 @@ export class OrderTemplatesNew {
|
|
|
291
291
|
if (filterOwnedByUserId !== undefined) {
|
|
292
292
|
_queryParams["filter_owned_by_user_id"] = filterOwnedByUserId;
|
|
293
293
|
}
|
|
294
|
-
if (
|
|
295
|
-
|
|
294
|
+
if (filterCoordinatorLabels !== undefined) {
|
|
295
|
+
if (Array.isArray(filterCoordinatorLabels)) {
|
|
296
|
+
_queryParams["filter_coordinator_labels"] = filterCoordinatorLabels.map((item) => item);
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
_queryParams["filter_coordinator_labels"] = filterCoordinatorLabels;
|
|
300
|
+
}
|
|
296
301
|
}
|
|
297
302
|
if (filterExecutorOrgId !== undefined) {
|
|
298
303
|
_queryParams["filter_executor_org_id"] = filterExecutorOrgId;
|
|
@@ -13,7 +13,7 @@ export interface OrderTemplateNewClientCreate1 {
|
|
|
13
13
|
cargos?: Chrt.OrderTemplateNewCargo1[];
|
|
14
14
|
coordinator_assigned_user_ids?: string[];
|
|
15
15
|
coordinator_department_ids?: string[];
|
|
16
|
-
|
|
16
|
+
coordinator_labels?: string[];
|
|
17
17
|
/** Must be a string starting with `org_` */
|
|
18
18
|
coordinator_org_id?: string | null;
|
|
19
19
|
description?: string | null;
|
|
@@ -9,8 +9,7 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
9
9
|
export interface OrderTemplateNewClientUpdate1 {
|
|
10
10
|
coordinator_assigned_user_ids?: string[];
|
|
11
11
|
coordinator_department_ids?: string[];
|
|
12
|
-
|
|
13
|
-
coordinator_label__set_to_None?: boolean;
|
|
12
|
+
coordinator_labels?: string[];
|
|
14
13
|
/** Must be a string starting with `org_` */
|
|
15
14
|
coordinator_org_id?: string | null;
|
|
16
15
|
coordinator_org_id__set_to_None?: boolean;
|
|
@@ -12,7 +12,7 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
12
12
|
* search: "search",
|
|
13
13
|
* filter_archived: true,
|
|
14
14
|
* filter_owned_by_user_id: "filter_owned_by_user_id",
|
|
15
|
-
*
|
|
15
|
+
* filter_coordinator_labels: ["filter_coordinator_labels"],
|
|
16
16
|
* filter_executor_org_id: "filter_executor_org_id",
|
|
17
17
|
* filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
|
|
18
18
|
* filter_shipper_org_id: "filter_shipper_org_id",
|
|
@@ -39,8 +39,8 @@ export interface OrderTemplatesNewListV1Request {
|
|
|
39
39
|
filter_archived?: boolean | null;
|
|
40
40
|
/** Filter by the user that created the template. */
|
|
41
41
|
filter_owned_by_user_id?: string | null;
|
|
42
|
-
/** Filter by coordinator
|
|
43
|
-
|
|
42
|
+
/** Filter by any of the supplied coordinator labels (exact match). */
|
|
43
|
+
filter_coordinator_labels?: (string | null) | (string | null)[];
|
|
44
44
|
/** Filter by an on-CHRT executor organization ID. */
|
|
45
45
|
filter_executor_org_id?: string | null;
|
|
46
46
|
/** Filter by an off-CHRT executor organization data ID. */
|
|
@@ -202,7 +202,7 @@ export declare class Orders {
|
|
|
202
202
|
taskGroupOrderingV1(orderId: string, request: Chrt.shipping.OrdersTaskGroupOrderingReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
203
203
|
private __taskGroupOrderingV1;
|
|
204
204
|
/**
|
|
205
|
-
* Returns distinct label values matching the query for orders where the caller is coordinator (
|
|
205
|
+
* Returns distinct label values matching the query for orders where the caller is coordinator (coordinator_labels) or executor (task_group_details.executor_labels). | authz: allowed_org_types=[provider], min_org_role=operator | () -> (list[str])
|
|
206
206
|
*
|
|
207
207
|
* @param {Chrt.shipping.OrdersTypeaheadLabelV1Request} request
|
|
208
208
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -291,19 +291,19 @@ export declare class Orders {
|
|
|
291
291
|
updateDraftV1(orderId: string, request?: Chrt.shipping.OrdersUpdateDraftReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OrdersUpdateDraftRes>;
|
|
292
292
|
private __updateDraftV1;
|
|
293
293
|
/**
|
|
294
|
-
*
|
|
294
|
+
* Replaces labels for the caller's role on the order. Coordinator writes coordinator_labels; executor writes executor_labels on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateLabelsReq) -> (bool)
|
|
295
295
|
*
|
|
296
296
|
* @param {string} orderId
|
|
297
|
-
* @param {Chrt.shipping.
|
|
297
|
+
* @param {Chrt.shipping.OrdersUpdateLabelsReq} request
|
|
298
298
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
299
299
|
*
|
|
300
300
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
301
301
|
*
|
|
302
302
|
* @example
|
|
303
|
-
* await client.shipping.orders.
|
|
303
|
+
* await client.shipping.orders.updateLabelsV1("order_id")
|
|
304
304
|
*/
|
|
305
|
-
|
|
306
|
-
private
|
|
305
|
+
updateLabelsV1(orderId: string, request?: Chrt.shipping.OrdersUpdateLabelsReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
306
|
+
private __updateLabelsV1;
|
|
307
307
|
/**
|
|
308
308
|
* Updates off_chrt_reference_id on an order. Drafts require the creating org's operator; operational orders require the order creator org's operator. | authz_personas=[draft_creator_org_operator, order_creator_org_operators] | (OrdersUpdateOffChrtReferenceIdReq) -> (OrdersUpdateOffChrtReferenceIdRes)
|
|
309
309
|
*
|
|
@@ -690,7 +690,7 @@ export class Orders {
|
|
|
690
690
|
});
|
|
691
691
|
}
|
|
692
692
|
/**
|
|
693
|
-
* Returns distinct label values matching the query for orders where the caller is coordinator (
|
|
693
|
+
* Returns distinct label values matching the query for orders where the caller is coordinator (coordinator_labels) or executor (task_group_details.executor_labels). | authz: allowed_org_types=[provider], min_org_role=operator | () -> (list[str])
|
|
694
694
|
*
|
|
695
695
|
* @param {Chrt.shipping.OrdersTypeaheadLabelV1Request} request
|
|
696
696
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1076,26 +1076,26 @@ export class Orders {
|
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
1078
|
/**
|
|
1079
|
-
*
|
|
1079
|
+
* Replaces labels for the caller's role on the order. Coordinator writes coordinator_labels; executor writes executor_labels on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateLabelsReq) -> (bool)
|
|
1080
1080
|
*
|
|
1081
1081
|
* @param {string} orderId
|
|
1082
|
-
* @param {Chrt.shipping.
|
|
1082
|
+
* @param {Chrt.shipping.OrdersUpdateLabelsReq} request
|
|
1083
1083
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
1084
1084
|
*
|
|
1085
1085
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
1086
1086
|
*
|
|
1087
1087
|
* @example
|
|
1088
|
-
* await client.shipping.orders.
|
|
1088
|
+
* await client.shipping.orders.updateLabelsV1("order_id")
|
|
1089
1089
|
*/
|
|
1090
|
-
|
|
1091
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1090
|
+
updateLabelsV1(orderId, request = {}, requestOptions) {
|
|
1091
|
+
return core.HttpResponsePromise.fromPromise(this.__updateLabelsV1(orderId, request, requestOptions));
|
|
1092
1092
|
}
|
|
1093
|
-
|
|
1093
|
+
__updateLabelsV1(orderId_1) {
|
|
1094
1094
|
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
1095
1095
|
var _a, _b, _c, _d;
|
|
1096
1096
|
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);
|
|
1097
1097
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1098
|
-
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/
|
|
1098
|
+
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_labels/v1/${encodeURIComponent(orderId)}`),
|
|
1099
1099
|
method: "PATCH",
|
|
1100
1100
|
headers: _headers,
|
|
1101
1101
|
contentType: "application/json",
|
|
@@ -1129,7 +1129,7 @@ export class Orders {
|
|
|
1129
1129
|
rawResponse: _response.rawResponse,
|
|
1130
1130
|
});
|
|
1131
1131
|
case "timeout":
|
|
1132
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/
|
|
1132
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/update_labels/v1/{order_id}.");
|
|
1133
1133
|
case "unknown":
|
|
1134
1134
|
throw new errors.ChrtError({
|
|
1135
1135
|
message: _response.error.errorMessage,
|
|
@@ -8,5 +8,5 @@ export { type OrdersTypeaheadV1Request } from "./OrdersTypeaheadV1Request.mjs";
|
|
|
8
8
|
export { type OrdersUnassignReq } from "./OrdersUnassignReq.mjs";
|
|
9
9
|
export { type OrdersUpdateDepartmentsReq } from "./OrdersUpdateDepartmentsReq.mjs";
|
|
10
10
|
export { type OrdersUpdateDraftReq } from "./OrdersUpdateDraftReq.mjs";
|
|
11
|
-
export { type
|
|
11
|
+
export { type OrdersUpdateLabelsReq } from "./OrdersUpdateLabelsReq.mjs";
|
|
12
12
|
export { type OrdersUpdateOffChrtReferenceIdReq } from "./OrdersUpdateOffChrtReferenceIdReq.mjs";
|
|
@@ -12,7 +12,7 @@ export interface OrdersOpenDraftReq {
|
|
|
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
|
+
labels?: string[];
|
|
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;
|
|
18
18
|
off_chrt_shipper_org_data_id?: string | null;
|
package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts
CHANGED
|
@@ -100,7 +100,7 @@ export declare class Expanded {
|
|
|
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_labels: ["filter_coordinator_labels"],
|
|
104
104
|
* body: {}
|
|
105
105
|
* })
|
|
106
106
|
*/
|
package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs
CHANGED
|
@@ -187,7 +187,7 @@ export class Expanded {
|
|
|
187
187
|
* filter_coordinator_shipper_account_ids: ["filter_coordinator_shipper_account_ids"],
|
|
188
188
|
* filter_coordinator_department_ids: ["filter_coordinator_department_ids"],
|
|
189
189
|
* filter_coordinator_assigned_user_ids: ["filter_coordinator_assigned_user_ids"],
|
|
190
|
-
*
|
|
190
|
+
* filter_coordinator_labels: ["filter_coordinator_labels"],
|
|
191
191
|
* body: {}
|
|
192
192
|
* })
|
|
193
193
|
*/
|
|
@@ -197,7 +197,7 @@ export class Expanded {
|
|
|
197
197
|
__listForProviderOperatorsV1(request, requestOptions) {
|
|
198
198
|
return __awaiter(this, void 0, void 0, function* () {
|
|
199
199
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
200
|
-
const { provider_role: providerRole, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_service_line: filterServiceLine, filter_order_classification_by_task_group_type: filterOrderClassificationByTaskGroupType, filter_awb_number: filterAwbNumber, filter_has_invoice: filterHasInvoice, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_cancelled_at_timestamp_lte: filterCancelledAtTimestampLte, filter_cancelled_at_timestamp_gte: filterCancelledAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_executor_org_id: filterExecutorOrgId, filter_executor_department_ids: filterExecutorDepartmentIds, filter_off_chrt_executor_org_data_id: filterOffChrtExecutorOrgDataId, filter_coordinator_org_id: filterCoordinatorOrgId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, filter_coordinator_department_ids: filterCoordinatorDepartmentIds, filter_coordinator_assigned_user_ids: filterCoordinatorAssignedUserIds,
|
|
200
|
+
const { provider_role: providerRole, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_service_line: filterServiceLine, filter_order_classification_by_task_group_type: filterOrderClassificationByTaskGroupType, filter_awb_number: filterAwbNumber, filter_has_invoice: filterHasInvoice, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_cancelled_at_timestamp_lte: filterCancelledAtTimestampLte, filter_cancelled_at_timestamp_gte: filterCancelledAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_executor_org_id: filterExecutorOrgId, filter_executor_department_ids: filterExecutorDepartmentIds, filter_off_chrt_executor_org_data_id: filterOffChrtExecutorOrgDataId, filter_coordinator_org_id: filterCoordinatorOrgId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, filter_coordinator_department_ids: filterCoordinatorDepartmentIds, filter_coordinator_assigned_user_ids: filterCoordinatorAssignedUserIds, filter_coordinator_labels: filterCoordinatorLabels, body: _body, } = request;
|
|
201
201
|
const _queryParams = {};
|
|
202
202
|
if (providerRole !== undefined) {
|
|
203
203
|
_queryParams["provider_role"] = providerRole;
|
|
@@ -332,8 +332,13 @@ export class Expanded {
|
|
|
332
332
|
_queryParams["filter_coordinator_assigned_user_ids"] = filterCoordinatorAssignedUserIds;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
if (
|
|
336
|
-
|
|
335
|
+
if (filterCoordinatorLabels !== undefined) {
|
|
336
|
+
if (Array.isArray(filterCoordinatorLabels)) {
|
|
337
|
+
_queryParams["filter_coordinator_labels"] = filterCoordinatorLabels.map((item) => item);
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
_queryParams["filter_coordinator_labels"] = filterCoordinatorLabels;
|
|
341
|
+
}
|
|
337
342
|
}
|
|
338
343
|
let _headers = mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
339
344
|
const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
|
|
@@ -37,7 +37,7 @@ import * as Chrt from "../../../../../../../../index.mjs";
|
|
|
37
37
|
* filter_coordinator_shipper_account_ids: ["filter_coordinator_shipper_account_ids"],
|
|
38
38
|
* filter_coordinator_department_ids: ["filter_coordinator_department_ids"],
|
|
39
39
|
* filter_coordinator_assigned_user_ids: ["filter_coordinator_assigned_user_ids"],
|
|
40
|
-
*
|
|
40
|
+
* filter_coordinator_labels: ["filter_coordinator_labels"],
|
|
41
41
|
* body: {}
|
|
42
42
|
* }
|
|
43
43
|
*/
|
|
@@ -84,6 +84,7 @@ export interface ExpandedListForProviderOperatorsV1Request {
|
|
|
84
84
|
/** Filter by coordinator department IDs */
|
|
85
85
|
filter_coordinator_department_ids?: (string | null) | (string | null)[];
|
|
86
86
|
filter_coordinator_assigned_user_ids?: (string | null) | (string | null)[];
|
|
87
|
-
|
|
87
|
+
/** Filter by any of the supplied coordinator labels (exact match). */
|
|
88
|
+
filter_coordinator_labels?: (string | null) | (string | null)[];
|
|
88
89
|
body: Chrt.OrderAndTaskGroupExpandedReq;
|
|
89
90
|
}
|
|
@@ -31,7 +31,7 @@ export declare class S3Object {
|
|
|
31
31
|
protected readonly _options: S3Object.Options;
|
|
32
32
|
constructor(_options?: S3Object.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Uploads a file (image, PDF, etc.) to a task artifact.
|
|
34
|
+
* Uploads a file (image, PDF, etc.) to a task artifact. Retains uploaded files; previews require a clean malware scan. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (UploadFile) -> (TaskArtifactS3ObjectMetadata1)
|
|
35
35
|
*
|
|
36
36
|
* @param {string} taskArtifactId
|
|
37
37
|
* @param {Chrt.shipping.taskArtifacts.BodyPostTaskArtifactsS3ObjectAddV1} request
|
|
@@ -101,7 +101,11 @@ export declare class S3Object {
|
|
|
101
101
|
private __getS3ObjectMetadataV1;
|
|
102
102
|
/**
|
|
103
103
|
* Streams a task artifact S3 object file from storage. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | () -> (binary)
|
|
104
|
+
* @throws {@link Chrt.ForbiddenError}
|
|
105
|
+
* @throws {@link Chrt.NotFoundError}
|
|
104
106
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
107
|
+
* @throws {@link Chrt.LockedError}
|
|
108
|
+
* @throws {@link Chrt.ServiceUnavailableError}
|
|
105
109
|
*/
|
|
106
110
|
getV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
107
111
|
private __getV1;
|