@chrt-inc/typescript-sdk 1.318.0 → 1.320.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.d.ts +6 -3
- package/dist/cjs/Client.js +12 -7
- package/dist/cjs/api/resources/cargos/client/Client.d.ts +48 -0
- package/dist/cjs/api/resources/cargos/client/Client.js +131 -0
- package/dist/cjs/api/resources/cargos/index.d.ts +1 -0
- package/dist/cjs/{exports.js → api/resources/cargos/index.js} +1 -1
- package/dist/cjs/api/resources/connections/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/connections/client/Client.js +4 -4
- package/dist/cjs/api/resources/courierPayDriverPayouts/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverPayouts/client/Client.js +2 -2
- package/dist/cjs/api/resources/courierPayDriverRateSheets/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/courierPayDriverRateSheets/client/Client.js +3 -3
- package/dist/cjs/api/resources/courierPayDriverStatements/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverStatements/client/Client.js +2 -2
- package/dist/cjs/api/resources/dev/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/dev/client/Client.js +4 -4
- package/dist/cjs/api/resources/drivers/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/drivers/client/Client.js +2 -2
- package/dist/cjs/api/resources/index.d.ts +3 -3
- package/dist/cjs/api/resources/index.js +4 -4
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.js +2 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.js +2 -2
- package/dist/cjs/api/resources/offChrtShipperOrg/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/offChrtShipperOrg/client/Client.js +3 -3
- package/dist/cjs/api/resources/orderDrafts/client/Client.d.ts +7 -17
- package/dist/cjs/api/resources/orderDrafts/client/Client.js +11 -68
- package/dist/cjs/api/resources/orderDrafts/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/orderDrafts/index.d.ts +1 -1
- package/dist/cjs/api/resources/orderDrafts/index.js +1 -1
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/Client.d.ts +55 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/Client.js +158 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/index.d.ts +2 -0
- package/dist/cjs/{core/exports.js → api/resources/orderDrafts/resources/expanded/client/index.js} +1 -1
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/requests/ExpandedListV1Request.d.ts +25 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/index.d.ts +2 -0
- package/dist/cjs/{core/form-data-utils → api/resources/orderDrafts/resources/expanded}/index.js +2 -4
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.d.ts +8 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.js +10 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/types/index.d.ts +1 -0
- package/dist/cjs/{core/file → api/resources/orderDrafts/resources/expanded/types}/index.js +1 -2
- package/dist/cjs/api/resources/orderDrafts/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/orderDrafts/resources/index.js +4 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/courier/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/courier/client/Client.js +1 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/Client.js +1 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/Client.js +1 -1
- package/dist/cjs/api/resources/orgProfiles/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/orgProfiles/client/Client.js +1 -1
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/orgs/client/Client.js +5 -5
- package/dist/cjs/api/resources/shipperContactInfo/client/Client.d.ts +36 -23
- package/dist/cjs/api/resources/shipperContactInfo/client/Client.js +94 -35
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/client/Client.js +2 -2
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.js +3 -3
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.js +2 -2
- package/dist/cjs/api/resources/taskArtifacts/client/Client.d.ts +0 -60
- package/dist/cjs/api/resources/taskArtifacts/client/Client.js +0 -246
- package/dist/cjs/api/resources/taskArtifacts/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskArtifacts/client/index.js +0 -15
- package/dist/cjs/api/resources/taskArtifacts/resources/images/client/Client.d.ts +0 -31
- package/dist/cjs/api/resources/taskArtifacts/resources/images/client/Client.js +0 -128
- package/dist/cjs/api/resources/taskArtifacts/resources/images/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskArtifacts/resources/images/client/index.js +0 -15
- package/dist/cjs/api/resources/taskArtifacts/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskArtifacts/resources/index.js +0 -4
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +3 -3
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +3 -3
- package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/Client.js +1 -1
- package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.d.ts +2 -2
- package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.js +1 -1
- package/dist/cjs/api/types/{OrderDraftExpandedRes.d.ts → OrderDraftExpanded.d.ts} +5 -6
- package/dist/cjs/api/types/OrderDraftExpandedListRes.d.ts +1 -4
- package/dist/{esm/api/resources/taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.mjs → cjs/api/types/OrderDraftSortByEnum.d.ts} +1 -1
- package/dist/cjs/api/types/index.d.ts +2 -3
- package/dist/cjs/api/types/index.js +2 -3
- package/dist/cjs/core/index.d.ts +0 -2
- package/dist/cjs/core/index.js +1 -3
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +6 -3
- package/dist/esm/Client.mjs +10 -5
- package/dist/esm/api/resources/cargos/client/Client.d.mts +48 -0
- package/dist/esm/api/resources/cargos/client/Client.mjs +94 -0
- package/dist/esm/api/resources/cargos/index.d.mts +1 -0
- package/dist/esm/api/resources/cargos/index.mjs +1 -0
- package/dist/esm/api/resources/connections/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/connections/client/Client.mjs +4 -4
- package/dist/esm/api/resources/courierPayDriverPayouts/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverPayouts/client/Client.mjs +2 -2
- package/dist/esm/api/resources/courierPayDriverRateSheets/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/courierPayDriverRateSheets/client/Client.mjs +3 -3
- package/dist/esm/api/resources/courierPayDriverStatements/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverStatements/client/Client.mjs +2 -2
- package/dist/esm/api/resources/dev/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/dev/client/Client.mjs +4 -4
- package/dist/esm/api/resources/drivers/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/drivers/client/Client.mjs +2 -2
- package/dist/esm/api/resources/index.d.mts +3 -3
- package/dist/esm/api/resources/index.mjs +3 -3
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +2 -2
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.mjs +2 -2
- package/dist/esm/api/resources/offChrtShipperOrg/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/offChrtShipperOrg/client/Client.mjs +3 -3
- package/dist/esm/api/resources/orderDrafts/client/Client.d.mts +7 -17
- package/dist/esm/api/resources/orderDrafts/client/Client.mjs +11 -68
- package/dist/esm/api/resources/orderDrafts/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/orderDrafts/index.d.mts +1 -1
- package/dist/esm/api/resources/orderDrafts/index.mjs +1 -1
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/Client.d.mts +55 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/Client.mjs +121 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/requests/ExpandedListV1Request.d.mts +25 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/index.d.mts +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/index.mjs +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.d.mts +8 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.mjs +7 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/types/index.d.mts +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/types/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/orderDrafts/resources/index.mjs +3 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/courier/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/orgInfoForConnections/resources/courier/client/Client.mjs +1 -1
- package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/Client.mjs +1 -1
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/Client.mjs +1 -1
- package/dist/esm/api/resources/orgProfiles/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/orgProfiles/client/Client.mjs +1 -1
- package/dist/esm/api/resources/orgs/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/orgs/client/Client.mjs +5 -5
- package/dist/esm/api/resources/shipperContactInfo/client/Client.d.mts +36 -23
- package/dist/esm/api/resources/shipperContactInfo/client/Client.mjs +94 -35
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/client/Client.mjs +2 -2
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.mjs +3 -3
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.mjs +2 -2
- package/dist/esm/api/resources/taskArtifacts/client/Client.d.mts +0 -60
- package/dist/esm/api/resources/taskArtifacts/client/Client.mjs +0 -213
- package/dist/esm/api/resources/taskArtifacts/client/index.d.mts +0 -1
- package/dist/esm/api/resources/taskArtifacts/client/index.mjs +1 -1
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/Client.d.mts +0 -31
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/Client.mjs +0 -128
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/index.d.mts +0 -1
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/index.mjs +1 -1
- package/dist/esm/api/resources/taskArtifacts/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/taskArtifacts/resources/index.mjs +0 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +3 -3
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +3 -3
- package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/users/client/Client.mjs +1 -1
- package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.d.mts +2 -2
- package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.mjs +1 -1
- package/dist/esm/api/types/{OrderDraftExpandedRes.d.mts → OrderDraftExpanded.d.mts} +5 -6
- package/dist/esm/api/types/OrderDraftExpandedListRes.d.mts +1 -4
- package/dist/esm/api/types/OrderDraftSortByEnum.d.mts +4 -0
- package/dist/esm/api/types/index.d.mts +2 -3
- package/dist/esm/api/types/index.mjs +2 -3
- package/dist/esm/core/index.d.mts +0 -2
- package/dist/esm/core/index.mjs +0 -2
- package/dist/esm/index.d.mts +0 -1
- package/dist/esm/index.mjs +0 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +208 -396
- package/dist/cjs/api/resources/orderDrafts/client/requests/OrderDraftExpandedListReq.d.ts +0 -21
- package/dist/cjs/api/resources/orderDrafts/client/requests/OrderDraftExpandedReq.d.ts +0 -21
- package/dist/cjs/api/resources/taskArtifacts/client/requests/TaskArtifactAddToTaskReq.d.ts +0 -19
- package/dist/cjs/api/resources/taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.d.ts +0 -14
- package/dist/cjs/api/resources/taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.js +0 -5
- package/dist/cjs/api/resources/taskArtifacts/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.d.ts +0 -13
- package/dist/cjs/api/resources/taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.js +0 -5
- package/dist/cjs/api/resources/taskArtifacts/resources/images/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/types/OrderDraftExpandedRes.js +0 -5
- package/dist/cjs/api/types/TaskDraftExpanded.d.ts +0 -10
- package/dist/cjs/api/types/TaskDraftExpanded.js +0 -5
- package/dist/cjs/api/types/TaskGroupDraftExpanded.d.ts +0 -10
- package/dist/cjs/api/types/TaskGroupDraftExpanded.js +0 -5
- package/dist/cjs/core/exports.d.ts +0 -1
- package/dist/cjs/core/file/exports.d.ts +0 -1
- package/dist/cjs/core/file/exports.js +0 -2
- package/dist/cjs/core/file/file.d.ts +0 -5
- package/dist/cjs/core/file/file.js +0 -203
- package/dist/cjs/core/file/index.d.ts +0 -2
- package/dist/cjs/core/file/types.d.ts +0 -66
- package/dist/cjs/core/file/types.js +0 -2
- package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +0 -16
- package/dist/cjs/core/form-data-utils/FormDataWrapper.js +0 -208
- package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +0 -1
- package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +0 -12
- package/dist/cjs/core/form-data-utils/index.d.ts +0 -2
- package/dist/cjs/exports.d.ts +0 -1
- package/dist/esm/api/resources/orderDrafts/client/requests/OrderDraftExpandedListReq.d.mts +0 -21
- package/dist/esm/api/resources/orderDrafts/client/requests/OrderDraftExpandedReq.d.mts +0 -21
- package/dist/esm/api/resources/taskArtifacts/client/requests/TaskArtifactAddToTaskReq.d.mts +0 -19
- package/dist/esm/api/resources/taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.d.mts +0 -14
- package/dist/esm/api/resources/taskArtifacts/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.d.mts +0 -13
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.mjs +0 -4
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/requests/index.d.mts +0 -1
- package/dist/esm/api/types/OrderDraftExpandedRes.mjs +0 -4
- package/dist/esm/api/types/TaskDraftExpanded.d.mts +0 -10
- package/dist/esm/api/types/TaskDraftExpanded.mjs +0 -4
- package/dist/esm/api/types/TaskGroupDraftExpanded.d.mts +0 -10
- package/dist/esm/api/types/TaskGroupDraftExpanded.mjs +0 -4
- package/dist/esm/core/exports.d.mts +0 -1
- package/dist/esm/core/exports.mjs +0 -1
- package/dist/esm/core/file/exports.d.mts +0 -1
- package/dist/esm/core/file/file.d.mts +0 -5
- package/dist/esm/core/file/file.mjs +0 -167
- package/dist/esm/core/file/index.d.mts +0 -2
- package/dist/esm/core/file/index.mjs +0 -2
- package/dist/esm/core/file/types.d.mts +0 -66
- package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +0 -16
- package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +0 -170
- package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +0 -1
- package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +0 -9
- package/dist/esm/core/form-data-utils/index.d.mts +0 -2
- package/dist/esm/core/form-data-utils/index.mjs +0 -2
- package/dist/esm/exports.d.mts +0 -1
- package/dist/esm/exports.mjs +0 -1
- /package/dist/{esm/api/resources/taskArtifacts/client/requests/index.mjs → cjs/api/resources/cargos/client/index.d.ts} +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/client/requests → cargos/client}/index.js +0 -0
- /package/dist/cjs/api/resources/orderDrafts/{client/requests/OrderDraftExpandedListReq.js → resources/expanded/client/requests/ExpandedListV1Request.js} +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/resources/images → orderDrafts/resources/expanded}/client/requests/index.js +0 -0
- /package/dist/cjs/api/{resources/orderDrafts/client/requests/OrderDraftExpandedReq.js → types/OrderDraftExpanded.js} +0 -0
- /package/dist/cjs/api/{resources/taskArtifacts/client/requests/TaskArtifactAddToTaskReq.js → types/OrderDraftSortByEnum.js} +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/resources/images/client/requests/index.mjs → cargos/client/index.d.mts} +0 -0
- /package/dist/esm/{core/file/exports.mjs → api/resources/cargos/client/index.mjs} +0 -0
- /package/dist/esm/api/resources/orderDrafts/{client/requests/OrderDraftExpandedListReq.mjs → resources/expanded/client/requests/ExpandedListV1Request.mjs} +0 -0
- /package/dist/esm/{core/file/types.mjs → api/resources/orderDrafts/resources/expanded/client/requests/index.mjs} +0 -0
- /package/dist/esm/api/{resources/orderDrafts/client/requests/OrderDraftExpandedReq.mjs → types/OrderDraftExpanded.mjs} +0 -0
- /package/dist/esm/api/{resources/taskArtifacts/client/requests/TaskArtifactAddToTaskReq.mjs → types/OrderDraftSortByEnum.mjs} +0 -0
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
import * as environments from "../../../../environments.mjs";
|
|
14
|
-
import * as core from "../../../../core/index.mjs";
|
|
15
|
-
import * as Chrt from "../../../index.mjs";
|
|
16
|
-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
17
|
-
import * as errors from "../../../../errors/index.mjs";
|
|
18
4
|
import { Images } from "../resources/images/client/Client.mjs";
|
|
19
5
|
import { Blurhash } from "../resources/blurhash/client/Client.mjs";
|
|
20
6
|
export class TaskArtifacts {
|
|
@@ -29,203 +15,4 @@ export class TaskArtifacts {
|
|
|
29
15
|
var _a;
|
|
30
16
|
return ((_a = this._blurhash) !== null && _a !== void 0 ? _a : (this._blurhash = new Blurhash(this._options)));
|
|
31
17
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Completes a task_artifact and updates all related task, cargo, task group, and order statuses. | () -> (bool)
|
|
34
|
-
*
|
|
35
|
-
* @param {string} taskArtifactId
|
|
36
|
-
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
-
*
|
|
38
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* await client.taskArtifacts.completeV1("task_artifact_id")
|
|
42
|
-
*/
|
|
43
|
-
completeV1(taskArtifactId, requestOptions) {
|
|
44
|
-
return core.HttpResponsePromise.fromPromise(this.__completeV1(taskArtifactId, requestOptions));
|
|
45
|
-
}
|
|
46
|
-
__completeV1(taskArtifactId, requestOptions) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
var _a, _b, _c, _d;
|
|
49
|
-
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);
|
|
50
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
51
|
-
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, `oort/task_artifacts/complete/v1/${encodeURIComponent(taskArtifactId)}`),
|
|
52
|
-
method: "POST",
|
|
53
|
-
headers: _headers,
|
|
54
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
55
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
56
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
57
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
58
|
-
});
|
|
59
|
-
if (_response.ok) {
|
|
60
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
61
|
-
}
|
|
62
|
-
if (_response.error.reason === "status-code") {
|
|
63
|
-
switch (_response.error.statusCode) {
|
|
64
|
-
case 422:
|
|
65
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
66
|
-
default:
|
|
67
|
-
throw new errors.ChrtError({
|
|
68
|
-
statusCode: _response.error.statusCode,
|
|
69
|
-
body: _response.error.body,
|
|
70
|
-
rawResponse: _response.rawResponse,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
switch (_response.error.reason) {
|
|
75
|
-
case "non-json":
|
|
76
|
-
throw new errors.ChrtError({
|
|
77
|
-
statusCode: _response.error.statusCode,
|
|
78
|
-
body: _response.error.rawBody,
|
|
79
|
-
rawResponse: _response.rawResponse,
|
|
80
|
-
});
|
|
81
|
-
case "timeout":
|
|
82
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_artifacts/complete/v1/{task_artifact_id}.");
|
|
83
|
-
case "unknown":
|
|
84
|
-
throw new errors.ChrtError({
|
|
85
|
-
message: _response.error.errorMessage,
|
|
86
|
-
rawResponse: _response.rawResponse,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Updates the completor comments on a task_artifact without affecting completion status. | (TaskArtifactUpdateCommentsReq) -> (bool)
|
|
93
|
-
*
|
|
94
|
-
* @param {Chrt.TaskArtifactUpdateCommentsReq} request
|
|
95
|
-
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
96
|
-
*
|
|
97
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* await client.taskArtifacts.updateCommentsV1({
|
|
101
|
-
* task_artifact_id: "task_artifact_id",
|
|
102
|
-
* completor_comments: "completor_comments"
|
|
103
|
-
* })
|
|
104
|
-
*/
|
|
105
|
-
updateCommentsV1(request, requestOptions) {
|
|
106
|
-
return core.HttpResponsePromise.fromPromise(this.__updateCommentsV1(request, requestOptions));
|
|
107
|
-
}
|
|
108
|
-
__updateCommentsV1(request, requestOptions) {
|
|
109
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
-
var _a, _b, _c, _d;
|
|
111
|
-
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);
|
|
112
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
113
|
-
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, "oort/task_artifacts/update_comments/v1"),
|
|
114
|
-
method: "POST",
|
|
115
|
-
headers: _headers,
|
|
116
|
-
contentType: "application/json",
|
|
117
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
118
|
-
requestType: "json",
|
|
119
|
-
body: request,
|
|
120
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
121
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
122
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
123
|
-
});
|
|
124
|
-
if (_response.ok) {
|
|
125
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
126
|
-
}
|
|
127
|
-
if (_response.error.reason === "status-code") {
|
|
128
|
-
switch (_response.error.statusCode) {
|
|
129
|
-
case 422:
|
|
130
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
131
|
-
default:
|
|
132
|
-
throw new errors.ChrtError({
|
|
133
|
-
statusCode: _response.error.statusCode,
|
|
134
|
-
body: _response.error.body,
|
|
135
|
-
rawResponse: _response.rawResponse,
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
switch (_response.error.reason) {
|
|
140
|
-
case "non-json":
|
|
141
|
-
throw new errors.ChrtError({
|
|
142
|
-
statusCode: _response.error.statusCode,
|
|
143
|
-
body: _response.error.rawBody,
|
|
144
|
-
rawResponse: _response.rawResponse,
|
|
145
|
-
});
|
|
146
|
-
case "timeout":
|
|
147
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_artifacts/update_comments/v1.");
|
|
148
|
-
case "unknown":
|
|
149
|
-
throw new errors.ChrtError({
|
|
150
|
-
message: _response.error.errorMessage,
|
|
151
|
-
rawResponse: _response.rawResponse,
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Adds a new task_artifact to an existing task. | (TaskArtifactAddToTaskReq) -> (PydanticObjectId)
|
|
158
|
-
*
|
|
159
|
-
* @param {Chrt.TaskArtifactAddToTaskReq} request
|
|
160
|
-
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
161
|
-
*
|
|
162
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
163
|
-
*
|
|
164
|
-
* @example
|
|
165
|
-
* await client.taskArtifacts.addToTaskV1({
|
|
166
|
-
* task_id: "task_id",
|
|
167
|
-
* task_artifact_type: "image",
|
|
168
|
-
* task_artifact_is_completed: true
|
|
169
|
-
* })
|
|
170
|
-
*/
|
|
171
|
-
addToTaskV1(request, requestOptions) {
|
|
172
|
-
return core.HttpResponsePromise.fromPromise(this.__addToTaskV1(request, requestOptions));
|
|
173
|
-
}
|
|
174
|
-
__addToTaskV1(request, requestOptions) {
|
|
175
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
-
var _a, _b, _c, _d;
|
|
177
|
-
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);
|
|
178
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
179
|
-
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, "oort/task_artifacts/add_to_task/v1"),
|
|
180
|
-
method: "POST",
|
|
181
|
-
headers: _headers,
|
|
182
|
-
contentType: "application/json",
|
|
183
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
184
|
-
requestType: "json",
|
|
185
|
-
body: request,
|
|
186
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
187
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
188
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
189
|
-
});
|
|
190
|
-
if (_response.ok) {
|
|
191
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
192
|
-
}
|
|
193
|
-
if (_response.error.reason === "status-code") {
|
|
194
|
-
switch (_response.error.statusCode) {
|
|
195
|
-
case 422:
|
|
196
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
197
|
-
default:
|
|
198
|
-
throw new errors.ChrtError({
|
|
199
|
-
statusCode: _response.error.statusCode,
|
|
200
|
-
body: _response.error.body,
|
|
201
|
-
rawResponse: _response.rawResponse,
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
switch (_response.error.reason) {
|
|
206
|
-
case "non-json":
|
|
207
|
-
throw new errors.ChrtError({
|
|
208
|
-
statusCode: _response.error.statusCode,
|
|
209
|
-
body: _response.error.rawBody,
|
|
210
|
-
rawResponse: _response.rawResponse,
|
|
211
|
-
});
|
|
212
|
-
case "timeout":
|
|
213
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_artifacts/add_to_task/v1.");
|
|
214
|
-
case "unknown":
|
|
215
|
-
throw new errors.ChrtError({
|
|
216
|
-
message: _response.error.errorMessage,
|
|
217
|
-
rawResponse: _response.rawResponse,
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
_getAuthorizationHeader() {
|
|
223
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
-
const bearer = yield core.Supplier.get(this._options.token);
|
|
225
|
-
if (bearer != null) {
|
|
226
|
-
return `Bearer ${bearer}`;
|
|
227
|
-
}
|
|
228
|
-
return undefined;
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../../../core/index.mjs";
|
|
6
|
-
import * as Chrt from "../../../../../index.mjs";
|
|
7
6
|
export declare namespace Images {
|
|
8
7
|
interface Options {
|
|
9
8
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -36,35 +35,5 @@ export declare class Images {
|
|
|
36
35
|
*/
|
|
37
36
|
getByMetadataIdV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: Images.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
38
37
|
private __getByMetadataIdV1;
|
|
39
|
-
/**
|
|
40
|
-
* Uploads an image file to a task_artifact with automatic blurhash generation. | (UploadFile) -> (bool)
|
|
41
|
-
*
|
|
42
|
-
* @param {string} taskArtifactId
|
|
43
|
-
* @param {Chrt.taskArtifacts.BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost} request
|
|
44
|
-
* @param {Images.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
-
*
|
|
46
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* import { createReadStream } from "fs";
|
|
50
|
-
* await client.taskArtifacts.images.uploadByTaskArtifactIdV1("task_artifact_id", {
|
|
51
|
-
* image: fs.createReadStream("/path/to/your/file")
|
|
52
|
-
* })
|
|
53
|
-
*/
|
|
54
|
-
uploadByTaskArtifactIdV1(taskArtifactId: string, request: Chrt.taskArtifacts.BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost, requestOptions?: Images.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
55
|
-
private __uploadByTaskArtifactIdV1;
|
|
56
|
-
/**
|
|
57
|
-
* Deletes a task_artifact image from both S3 storage and database metadata. | () -> (bool)
|
|
58
|
-
*
|
|
59
|
-
* @param {string} taskArtifactS3ObjectMetadataId
|
|
60
|
-
* @param {Images.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
-
*
|
|
62
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* await client.taskArtifacts.images.deleteByMetadataIdV1("task_artifact_s3_object_metadata_id")
|
|
66
|
-
*/
|
|
67
|
-
deleteByMetadataIdV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: Images.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
68
|
-
private __deleteByMetadataIdV1;
|
|
69
38
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
70
39
|
}
|
|
@@ -72,134 +72,6 @@ export class Images {
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Uploads an image file to a task_artifact with automatic blurhash generation. | (UploadFile) -> (bool)
|
|
77
|
-
*
|
|
78
|
-
* @param {string} taskArtifactId
|
|
79
|
-
* @param {Chrt.taskArtifacts.BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost} request
|
|
80
|
-
* @param {Images.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
-
*
|
|
82
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* import { createReadStream } from "fs";
|
|
86
|
-
* await client.taskArtifacts.images.uploadByTaskArtifactIdV1("task_artifact_id", {
|
|
87
|
-
* image: fs.createReadStream("/path/to/your/file")
|
|
88
|
-
* })
|
|
89
|
-
*/
|
|
90
|
-
uploadByTaskArtifactIdV1(taskArtifactId, request, requestOptions) {
|
|
91
|
-
return core.HttpResponsePromise.fromPromise(this.__uploadByTaskArtifactIdV1(taskArtifactId, request, requestOptions));
|
|
92
|
-
}
|
|
93
|
-
__uploadByTaskArtifactIdV1(taskArtifactId, request, requestOptions) {
|
|
94
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
var _a, _b, _c, _d;
|
|
96
|
-
const _request = yield core.newFormData();
|
|
97
|
-
yield _request.appendFile("image", request.image);
|
|
98
|
-
const _maybeEncodedRequest = yield _request.getRequest();
|
|
99
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ Authorization: yield this._getAuthorizationHeader() }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
100
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
101
|
-
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, `oort/task_artifacts/images/upload/v1/${encodeURIComponent(taskArtifactId)}`),
|
|
102
|
-
method: "POST",
|
|
103
|
-
headers: _headers,
|
|
104
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
105
|
-
requestType: "file",
|
|
106
|
-
duplex: _maybeEncodedRequest.duplex,
|
|
107
|
-
body: _maybeEncodedRequest.body,
|
|
108
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
109
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
110
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
-
});
|
|
112
|
-
if (_response.ok) {
|
|
113
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
114
|
-
}
|
|
115
|
-
if (_response.error.reason === "status-code") {
|
|
116
|
-
switch (_response.error.statusCode) {
|
|
117
|
-
case 422:
|
|
118
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
119
|
-
default:
|
|
120
|
-
throw new errors.ChrtError({
|
|
121
|
-
statusCode: _response.error.statusCode,
|
|
122
|
-
body: _response.error.body,
|
|
123
|
-
rawResponse: _response.rawResponse,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
switch (_response.error.reason) {
|
|
128
|
-
case "non-json":
|
|
129
|
-
throw new errors.ChrtError({
|
|
130
|
-
statusCode: _response.error.statusCode,
|
|
131
|
-
body: _response.error.rawBody,
|
|
132
|
-
rawResponse: _response.rawResponse,
|
|
133
|
-
});
|
|
134
|
-
case "timeout":
|
|
135
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_artifacts/images/upload/v1/{task_artifact_id}.");
|
|
136
|
-
case "unknown":
|
|
137
|
-
throw new errors.ChrtError({
|
|
138
|
-
message: _response.error.errorMessage,
|
|
139
|
-
rawResponse: _response.rawResponse,
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Deletes a task_artifact image from both S3 storage and database metadata. | () -> (bool)
|
|
146
|
-
*
|
|
147
|
-
* @param {string} taskArtifactS3ObjectMetadataId
|
|
148
|
-
* @param {Images.RequestOptions} requestOptions - Request-specific configuration.
|
|
149
|
-
*
|
|
150
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* await client.taskArtifacts.images.deleteByMetadataIdV1("task_artifact_s3_object_metadata_id")
|
|
154
|
-
*/
|
|
155
|
-
deleteByMetadataIdV1(taskArtifactS3ObjectMetadataId, requestOptions) {
|
|
156
|
-
return core.HttpResponsePromise.fromPromise(this.__deleteByMetadataIdV1(taskArtifactS3ObjectMetadataId, requestOptions));
|
|
157
|
-
}
|
|
158
|
-
__deleteByMetadataIdV1(taskArtifactS3ObjectMetadataId, requestOptions) {
|
|
159
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
-
var _a, _b, _c, _d;
|
|
161
|
-
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);
|
|
162
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
163
|
-
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, `oort/task_artifacts/images/delete/v1/${encodeURIComponent(taskArtifactS3ObjectMetadataId)}`),
|
|
164
|
-
method: "DELETE",
|
|
165
|
-
headers: _headers,
|
|
166
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
167
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
168
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
169
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
170
|
-
});
|
|
171
|
-
if (_response.ok) {
|
|
172
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
173
|
-
}
|
|
174
|
-
if (_response.error.reason === "status-code") {
|
|
175
|
-
switch (_response.error.statusCode) {
|
|
176
|
-
case 422:
|
|
177
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
178
|
-
default:
|
|
179
|
-
throw new errors.ChrtError({
|
|
180
|
-
statusCode: _response.error.statusCode,
|
|
181
|
-
body: _response.error.body,
|
|
182
|
-
rawResponse: _response.rawResponse,
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
switch (_response.error.reason) {
|
|
187
|
-
case "non-json":
|
|
188
|
-
throw new errors.ChrtError({
|
|
189
|
-
statusCode: _response.error.statusCode,
|
|
190
|
-
body: _response.error.rawBody,
|
|
191
|
-
rawResponse: _response.rawResponse,
|
|
192
|
-
});
|
|
193
|
-
case "timeout":
|
|
194
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /oort/task_artifacts/images/delete/v1/{task_artifact_s3_object_metadata_id}.");
|
|
195
|
-
case "unknown":
|
|
196
|
-
throw new errors.ChrtError({
|
|
197
|
-
message: _response.error.errorMessage,
|
|
198
|
-
rawResponse: _response.rawResponse,
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
75
|
_getAuthorizationHeader() {
|
|
204
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
205
77
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -31,7 +31,7 @@ export declare class Devices {
|
|
|
31
31
|
protected readonly _options: Devices.Options;
|
|
32
32
|
constructor(_options?: Devices.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Registers a tracking device to the
|
|
34
|
+
* Registers a tracking device to the caller's organization. If device is already registered to a different organization, registration is blocked. | (DevicesRegisterToOrgReq1) -> (PydanticObjectId)
|
|
35
35
|
*
|
|
36
36
|
* @param {Chrt.tracking.DevicesRegisterToOrgReq1} request
|
|
37
37
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -75,7 +75,7 @@ export declare class Devices {
|
|
|
75
75
|
deleteV1(request?: Chrt.tracking.DevicesDeleteV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
76
76
|
private __deleteV1;
|
|
77
77
|
/**
|
|
78
|
-
* Retrieves a single device by its MAC address or ID. Access restricted to the
|
|
78
|
+
* Retrieves a single device by its MAC address or ID. Access restricted to the caller's organization. | () -> (Device1)
|
|
79
79
|
*
|
|
80
80
|
* @param {Chrt.tracking.DevicesGetV1Request} request
|
|
81
81
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -91,7 +91,7 @@ export declare class Devices {
|
|
|
91
91
|
getV1(request?: Chrt.tracking.DevicesGetV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<Chrt.Device1>;
|
|
92
92
|
private __getV1;
|
|
93
93
|
/**
|
|
94
|
-
* Returns all tracking devices registered to the
|
|
94
|
+
* Returns all tracking devices registered to the caller's organization. | () -> (list[Device1])
|
|
95
95
|
*
|
|
96
96
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
97
97
|
*
|
|
@@ -20,7 +20,7 @@ export class Devices {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Registers a tracking device to the
|
|
23
|
+
* Registers a tracking device to the caller's organization. If device is already registered to a different organization, registration is blocked. | (DevicesRegisterToOrgReq1) -> (PydanticObjectId)
|
|
24
24
|
*
|
|
25
25
|
* @param {Chrt.tracking.DevicesRegisterToOrgReq1} request
|
|
26
26
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -216,7 +216,7 @@ export class Devices {
|
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
|
-
* Retrieves a single device by its MAC address or ID. Access restricted to the
|
|
219
|
+
* Retrieves a single device by its MAC address or ID. Access restricted to the caller's organization. | () -> (Device1)
|
|
220
220
|
*
|
|
221
221
|
* @param {Chrt.tracking.DevicesGetV1Request} request
|
|
222
222
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -286,7 +286,7 @@ export class Devices {
|
|
|
286
286
|
});
|
|
287
287
|
}
|
|
288
288
|
/**
|
|
289
|
-
* Returns all tracking devices registered to the
|
|
289
|
+
* Returns all tracking devices registered to the caller's organization. | () -> (list[Device1])
|
|
290
290
|
*
|
|
291
291
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
292
292
|
*
|
|
@@ -31,7 +31,7 @@ export declare class SessionByDevice {
|
|
|
31
31
|
protected readonly _options: SessionByDevice.Options;
|
|
32
32
|
constructor(_options?: SessionByDevice.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Returns all tracking sessions for the
|
|
34
|
+
* Returns all tracking sessions for the caller's organization. | () -> (list[Session1])
|
|
35
35
|
*
|
|
36
36
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
37
|
*
|
|
@@ -41,7 +41,7 @@ export declare class SessionByDevice {
|
|
|
41
41
|
listV1(requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.Session1[]>;
|
|
42
42
|
private __listV1;
|
|
43
43
|
/**
|
|
44
|
-
* Retrieves a single session by its ID. Access restricted to the
|
|
44
|
+
* Retrieves a single session by its ID. Access restricted to the caller's organization. | () -> (Session1)
|
|
45
45
|
*
|
|
46
46
|
* @param {Chrt.tracking.SessionByDeviceGetV1Request} request
|
|
47
47
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -56,7 +56,7 @@ export declare class SessionByDevice {
|
|
|
56
56
|
getV1(request: Chrt.tracking.SessionByDeviceGetV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.Session1>;
|
|
57
57
|
private __getV1;
|
|
58
58
|
/**
|
|
59
|
-
* Returns the most recent data point for a session, excluding outliers. Access restricted to the
|
|
59
|
+
* Returns the most recent data point for a session, excluding outliers. Access restricted to the caller's organization. | () -> (TrackingSessionByDeviceDataPoint1 | None)
|
|
60
60
|
*
|
|
61
61
|
* @param {Chrt.tracking.SessionByDeviceLastSeenV1Request} request
|
|
62
62
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -20,7 +20,7 @@ export class SessionByDevice {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Returns all tracking sessions for the
|
|
23
|
+
* Returns all tracking sessions for the caller's organization. | () -> (list[Session1])
|
|
24
24
|
*
|
|
25
25
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
26
|
*
|
|
@@ -71,7 +71,7 @@ export class SessionByDevice {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* Retrieves a single session by its ID. Access restricted to the
|
|
74
|
+
* Retrieves a single session by its ID. Access restricted to the caller's organization. | () -> (Session1)
|
|
75
75
|
*
|
|
76
76
|
* @param {Chrt.tracking.SessionByDeviceGetV1Request} request
|
|
77
77
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -135,7 +135,7 @@ export class SessionByDevice {
|
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
|
-
* Returns the most recent data point for a session, excluding outliers. Access restricted to the
|
|
138
|
+
* Returns the most recent data point for a session, excluding outliers. Access restricted to the caller's organization. | () -> (TrackingSessionByDeviceDataPoint1 | None)
|
|
139
139
|
*
|
|
140
140
|
* @param {Chrt.tracking.SessionByDeviceLastSeenV1Request} request
|
|
141
141
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -31,7 +31,7 @@ export declare class Users {
|
|
|
31
31
|
protected readonly _options: Users.Options;
|
|
32
32
|
constructor(_options?: Users.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Retrieves public user data for the
|
|
34
|
+
* Retrieves public user data for the caller. | () -> (UserPublicData1)
|
|
35
35
|
*
|
|
36
36
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
37
|
*
|
|
@@ -19,7 +19,7 @@ export class Users {
|
|
|
19
19
|
this._options = _options;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Retrieves public user data for the
|
|
22
|
+
* Retrieves public user data for the caller. | () -> (UserPublicData1)
|
|
23
23
|
*
|
|
24
24
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
25
|
*
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
* - OTHER then PICKUP then no more tasks (because the cargo is not released after PICKUP)
|
|
19
19
|
* - DELIVER then OTHER (because the cargo is not obtained before DELIVER)
|
|
20
20
|
*/
|
|
21
|
-
export type ChrtGroundCourierTaskActionEnum1 = "chrt_ground_courier__pickup" | "chrt_ground_courier__recover_from_airline" | "chrt_ground_courier__deliver" | "
|
|
21
|
+
export type ChrtGroundCourierTaskActionEnum1 = "chrt_ground_courier__pickup" | "chrt_ground_courier__recover_from_airline" | "chrt_ground_courier__deliver" | "chrt_ground_courier__tender_to_airline" | "chrt_ground_courier__consolidate" | "chrt_ground_courier__hold" | "chrt_ground_courier__other";
|
|
22
22
|
export declare const ChrtGroundCourierTaskActionEnum1: {
|
|
23
23
|
readonly ChrtGroundCourierPickup: "chrt_ground_courier__pickup";
|
|
24
24
|
readonly ChrtGroundCourierRecoverFromAirline: "chrt_ground_courier__recover_from_airline";
|
|
25
25
|
readonly ChrtGroundCourierDeliver: "chrt_ground_courier__deliver";
|
|
26
|
-
readonly
|
|
26
|
+
readonly ChrtGroundCourierTenderToAirline: "chrt_ground_courier__tender_to_airline";
|
|
27
27
|
readonly ChrtGroundCourierConsolidate: "chrt_ground_courier__consolidate";
|
|
28
28
|
readonly ChrtGroundCourierHold: "chrt_ground_courier__hold";
|
|
29
29
|
readonly ChrtGroundCourierOther: "chrt_ground_courier__other";
|
|
@@ -5,7 +5,7 @@ export const ChrtGroundCourierTaskActionEnum1 = {
|
|
|
5
5
|
ChrtGroundCourierPickup: "chrt_ground_courier__pickup",
|
|
6
6
|
ChrtGroundCourierRecoverFromAirline: "chrt_ground_courier__recover_from_airline",
|
|
7
7
|
ChrtGroundCourierDeliver: "chrt_ground_courier__deliver",
|
|
8
|
-
|
|
8
|
+
ChrtGroundCourierTenderToAirline: "chrt_ground_courier__tender_to_airline",
|
|
9
9
|
ChrtGroundCourierConsolidate: "chrt_ground_courier__consolidate",
|
|
10
10
|
ChrtGroundCourierHold: "chrt_ground_courier__hold",
|
|
11
11
|
ChrtGroundCourierOther: "chrt_ground_courier__other",
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Chrt from "../index.mjs";
|
|
5
|
-
export interface
|
|
5
|
+
export interface OrderDraftExpanded {
|
|
6
6
|
order: Chrt.Order1;
|
|
7
|
-
task_groups_expanded?: Chrt.TaskGroupDraftExpanded[] | null;
|
|
8
|
-
cargos?: Chrt.Cargo1[] | null;
|
|
9
|
-
shipper_org_company_name?: string | null;
|
|
10
|
-
shipper_org_handle?: string | null;
|
|
11
|
-
off_chrt_shipper_org_company_name?: string | null;
|
|
12
7
|
forwarder_org_company_name?: string | null;
|
|
13
8
|
forwarder_org_handle?: string | null;
|
|
9
|
+
shipper_org_company_name?: string | null;
|
|
10
|
+
off_chrt_shipper_org_company_name?: string | null;
|
|
11
|
+
task_groups_expanded?: Chrt.TaskGroupExpanded[] | null;
|
|
12
|
+
cargos?: Chrt.Cargo1[] | null;
|
|
14
13
|
}
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Chrt from "../index.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Response model for listing draft orders.
|
|
7
|
-
*/
|
|
8
5
|
export interface OrderDraftExpandedListRes {
|
|
9
|
-
|
|
6
|
+
order_drafts_expanded: Chrt.OrderDraftExpanded[];
|
|
10
7
|
total_count: number;
|
|
11
8
|
}
|