@chrt-inc/typescript-sdk 1.320.0 → 1.321.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 +36 -31
- package/dist/cjs/api/resources/drivers/client/Client.d.ts +59 -61
- package/dist/cjs/api/resources/drivers/client/Client.js +140 -139
- package/dist/cjs/api/resources/drivers/client/requests/DriverClientCreate1.d.ts +20 -0
- package/dist/cjs/api/resources/drivers/client/requests/{UpdateDriverDetailsReq.d.ts → DriverClientUpdate1.d.ts} +4 -5
- package/dist/cjs/api/resources/drivers/client/requests/DriverLastSeenReq.d.ts +1 -0
- package/dist/cjs/api/resources/drivers/client/requests/index.d.ts +2 -3
- package/dist/cjs/api/resources/index.d.ts +4 -1
- package/dist/cjs/api/resources/index.js +5 -2
- package/dist/cjs/api/resources/orders/client/Client.d.ts +13 -0
- package/dist/cjs/api/resources/orders/client/Client.js +59 -0
- package/dist/cjs/api/resources/taskArtifacts/client/Client.d.ts +79 -6
- package/dist/cjs/api/resources/taskArtifacts/client/Client.js +308 -6
- package/dist/cjs/api/resources/taskArtifacts/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskArtifacts/client/index.js +15 -0
- package/dist/cjs/api/resources/taskArtifacts/client/requests/AddTaskArtifactReq.d.ts +19 -0
- package/dist/cjs/api/resources/taskArtifacts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/index.d.ts +2 -2
- package/dist/cjs/api/resources/taskArtifacts/resources/index.js +3 -3
- package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.js +11 -11
- package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.d.ts +47 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.js +127 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.js +2 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +79 -33
- package/dist/cjs/api/resources/taskGroups/client/Client.js +220 -67
- package/dist/cjs/api/resources/taskGroups/client/requests/AddMessageReq.d.ts +13 -0
- package/dist/cjs/api/resources/taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.d.ts +13 -0
- package/dist/cjs/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/client/requests/SetTaskOrderingReq.d.ts +3 -2
- package/dist/cjs/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.d.ts +13 -0
- package/dist/cjs/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.js +5 -0
- package/dist/cjs/api/resources/taskGroups/client/requests/UpdateDriverReq.d.ts +13 -0
- package/dist/cjs/api/resources/taskGroups/client/requests/UpdateDriverReq.js +5 -0
- package/dist/cjs/api/resources/taskGroups/client/requests/index.d.ts +4 -2
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/Client.d.ts +4 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/Client.js +18 -2
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.ts +4 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.ts +4 -0
- package/dist/cjs/api/resources/taskGroups/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/taskGroups/resources/index.js +4 -1
- package/dist/cjs/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.d.ts +14 -7
- package/dist/cjs/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.js +16 -10
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/index.js +2 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/index.js +17 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.d.ts +47 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.js +127 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.js +2 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/index.js +17 -0
- package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/Client.d.ts +59 -0
- package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/Client.js +186 -0
- package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/index.js +2 -0
- package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/index.js +17 -0
- package/dist/cjs/api/resources/tasks/client/Client.d.ts +107 -0
- package/dist/cjs/api/resources/tasks/client/Client.js +377 -0
- package/dist/cjs/api/resources/tasks/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/tasks/client/index.js +17 -0
- package/dist/cjs/api/resources/tasks/client/requests/AddTaskToGroupReq.d.ts +21 -0
- package/dist/cjs/api/resources/tasks/client/requests/AddTaskToGroupReq.js +5 -0
- package/dist/cjs/api/resources/tasks/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tasks/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tasks/index.d.ts +1 -0
- package/dist/cjs/api/resources/tasks/index.js +17 -0
- package/dist/cjs/api/types/Cargo1.d.ts +1 -0
- package/dist/cjs/api/types/CargoStatusEnum1.d.ts +2 -1
- package/dist/cjs/api/types/CargoStatusEnum1.js +1 -0
- package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.d.ts +2 -2
- package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.js +1 -1
- package/dist/cjs/api/types/Driver1.d.ts +6 -4
- package/dist/cjs/api/types/DriverStatusEnum.d.ts +3 -3
- package/dist/cjs/api/types/DriverStatusEnum.js +2 -2
- package/dist/cjs/api/types/DriverUpdateAvailabilityReq.d.ts +6 -0
- package/dist/cjs/api/types/DriverUpdateAvailabilityReq.js +5 -0
- package/dist/cjs/api/types/Task1.d.ts +1 -0
- package/dist/cjs/api/types/TaskArtifact1.d.ts +1 -0
- package/dist/cjs/api/types/TaskArtifactClientCreate1.d.ts +8 -0
- package/dist/cjs/api/types/TaskArtifactClientCreate1.js +5 -0
- package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.d.ts +15 -0
- package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.js +5 -0
- package/dist/cjs/api/types/TaskArtifactStatusEnum1.d.ts +2 -1
- package/dist/cjs/api/types/TaskArtifactStatusEnum1.js +1 -0
- package/dist/cjs/api/types/TaskClientUpdate1.d.ts +0 -1
- package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
- package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.d.ts +15 -0
- package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.js +5 -0
- package/dist/cjs/api/types/TaskGroupSortByEnum.d.ts +2 -1
- package/dist/cjs/api/types/TaskGroupSortByEnum.js +1 -0
- package/dist/cjs/api/types/TaskGroupStatusEnum1.d.ts +2 -1
- package/dist/cjs/api/types/TaskGroupStatusEnum1.js +1 -0
- package/dist/cjs/api/types/TaskStatusEnum1.d.ts +2 -1
- package/dist/cjs/api/types/TaskStatusEnum1.js +1 -0
- package/dist/cjs/api/types/index.d.ts +4 -0
- package/dist/cjs/api/types/index.js +4 -0
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/core/exports.js +17 -0
- package/dist/cjs/core/file/exports.d.ts +1 -0
- package/dist/cjs/core/file/exports.js +2 -0
- package/dist/cjs/core/file/file.d.ts +5 -0
- package/dist/cjs/core/file/file.js +203 -0
- package/dist/cjs/core/file/index.d.ts +2 -0
- package/dist/cjs/core/file/index.js +18 -0
- package/dist/cjs/core/file/types.d.ts +66 -0
- package/dist/cjs/core/file/types.js +2 -0
- package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +16 -0
- package/dist/cjs/core/form-data-utils/FormDataWrapper.js +208 -0
- package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
- package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +12 -0
- package/dist/cjs/core/form-data-utils/index.d.ts +2 -0
- package/dist/cjs/core/form-data-utils/index.js +20 -0
- package/dist/cjs/core/index.d.ts +2 -0
- package/dist/cjs/core/index.js +3 -1
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +4 -0
- 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 +12 -7
- package/dist/esm/api/resources/drivers/client/Client.d.mts +59 -61
- package/dist/esm/api/resources/drivers/client/Client.mjs +140 -139
- package/dist/esm/api/resources/drivers/client/requests/DriverClientCreate1.d.mts +20 -0
- package/dist/esm/api/resources/drivers/client/requests/{UpdateDriverDetailsReq.d.mts → DriverClientUpdate1.d.mts} +4 -5
- package/dist/esm/api/resources/drivers/client/requests/DriverLastSeenReq.d.mts +1 -0
- package/dist/esm/api/resources/drivers/client/requests/index.d.mts +2 -3
- package/dist/esm/api/resources/index.d.mts +4 -1
- package/dist/esm/api/resources/index.mjs +4 -1
- package/dist/esm/api/resources/orders/client/Client.d.mts +13 -0
- package/dist/esm/api/resources/orders/client/Client.mjs +59 -0
- package/dist/esm/api/resources/taskArtifacts/client/Client.d.mts +79 -6
- package/dist/esm/api/resources/taskArtifacts/client/Client.mjs +275 -6
- package/dist/esm/api/resources/taskArtifacts/client/index.d.mts +1 -0
- package/dist/esm/api/resources/taskArtifacts/client/index.mjs +1 -1
- package/dist/esm/api/resources/taskArtifacts/client/requests/AddTaskArtifactReq.d.mts +19 -0
- package/dist/esm/api/resources/taskArtifacts/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/taskArtifacts/resources/index.d.mts +2 -2
- package/dist/esm/api/resources/taskArtifacts/resources/index.mjs +2 -2
- package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.mjs +9 -9
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.d.mts +1 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.mjs +1 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.d.mts +47 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.mjs +90 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.d.mts +1 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.mjs +1 -0
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +79 -33
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +218 -65
- package/dist/esm/api/resources/taskGroups/client/requests/AddMessageReq.d.mts +13 -0
- package/dist/esm/api/resources/taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.d.mts +13 -0
- package/dist/esm/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/client/requests/SetTaskOrderingReq.d.mts +3 -2
- package/dist/esm/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.d.mts +13 -0
- package/dist/esm/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.mjs +4 -0
- package/dist/esm/api/resources/taskGroups/client/requests/UpdateDriverReq.d.mts +13 -0
- package/dist/esm/api/resources/taskGroups/client/requests/UpdateDriverReq.mjs +4 -0
- package/dist/esm/api/resources/taskGroups/client/requests/index.d.mts +4 -2
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.d.mts +4 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.mjs +18 -2
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.mts +4 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.mts +4 -0
- package/dist/esm/api/resources/taskGroups/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/taskGroups/resources/index.mjs +3 -0
- package/dist/esm/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.d.mts +14 -7
- package/dist/esm/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.mjs +14 -8
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.mjs +1 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/index.mjs +1 -0
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.d.mts +47 -0
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.mjs +90 -0
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.mjs +1 -0
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/index.mjs +1 -0
- package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/Client.d.mts +59 -0
- package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/Client.mjs +149 -0
- package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/index.mjs +1 -0
- package/dist/esm/api/resources/taskGroups/resources/taskGroupId/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/resources/taskGroupId/index.mjs +1 -0
- package/dist/esm/api/resources/tasks/client/Client.d.mts +107 -0
- package/dist/esm/api/resources/tasks/client/Client.mjs +340 -0
- package/dist/esm/api/resources/tasks/client/index.d.mts +2 -0
- package/dist/esm/api/resources/tasks/client/index.mjs +1 -0
- package/dist/esm/api/resources/tasks/client/requests/AddTaskToGroupReq.d.mts +21 -0
- package/dist/esm/api/resources/tasks/client/requests/AddTaskToGroupReq.mjs +4 -0
- package/dist/esm/api/resources/tasks/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tasks/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tasks/index.d.mts +1 -0
- package/dist/esm/api/resources/tasks/index.mjs +1 -0
- package/dist/esm/api/types/Cargo1.d.mts +1 -0
- package/dist/esm/api/types/CargoStatusEnum1.d.mts +2 -1
- package/dist/esm/api/types/CargoStatusEnum1.mjs +1 -0
- package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.d.mts +2 -2
- package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.mjs +1 -1
- package/dist/esm/api/types/Driver1.d.mts +6 -4
- package/dist/esm/api/types/DriverStatusEnum.d.mts +3 -3
- package/dist/esm/api/types/DriverStatusEnum.mjs +2 -2
- package/dist/esm/api/types/DriverUpdateAvailabilityReq.d.mts +6 -0
- package/dist/esm/api/types/DriverUpdateAvailabilityReq.mjs +4 -0
- package/dist/esm/api/types/Task1.d.mts +1 -0
- package/dist/esm/api/types/TaskArtifact1.d.mts +1 -0
- package/dist/esm/api/types/TaskArtifactClientCreate1.d.mts +8 -0
- package/dist/esm/api/types/TaskArtifactClientCreate1.mjs +4 -0
- package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.d.mts +15 -0
- package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.mjs +4 -0
- package/dist/esm/api/types/TaskArtifactStatusEnum1.d.mts +2 -1
- package/dist/esm/api/types/TaskArtifactStatusEnum1.mjs +1 -0
- package/dist/esm/api/types/TaskClientUpdate1.d.mts +0 -1
- package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
- package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.d.mts +15 -0
- package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.mjs +4 -0
- package/dist/esm/api/types/TaskGroupSortByEnum.d.mts +2 -1
- package/dist/esm/api/types/TaskGroupSortByEnum.mjs +1 -0
- package/dist/esm/api/types/TaskGroupStatusEnum1.d.mts +2 -1
- package/dist/esm/api/types/TaskGroupStatusEnum1.mjs +1 -0
- package/dist/esm/api/types/TaskStatusEnum1.d.mts +2 -1
- package/dist/esm/api/types/TaskStatusEnum1.mjs +1 -0
- package/dist/esm/api/types/index.d.mts +4 -0
- package/dist/esm/api/types/index.mjs +4 -0
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/file/exports.d.mts +1 -0
- package/dist/esm/core/file/exports.mjs +1 -0
- package/dist/esm/core/file/file.d.mts +5 -0
- package/dist/esm/core/file/file.mjs +167 -0
- package/dist/esm/core/file/index.d.mts +2 -0
- package/dist/esm/core/file/index.mjs +2 -0
- package/dist/esm/core/file/types.d.mts +66 -0
- package/dist/esm/core/file/types.mjs +1 -0
- package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +16 -0
- package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +170 -0
- package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +1 -0
- package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +9 -0
- package/dist/esm/core/form-data-utils/index.d.mts +2 -0
- package/dist/esm/core/form-data-utils/index.mjs +2 -0
- package/dist/esm/core/index.d.mts +2 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1300 -206
- package/dist/cjs/api/resources/drivers/client/requests/DriverCreateReq.d.ts +0 -17
- package/dist/cjs/api/resources/drivers/client/requests/SetDriverActivationReq.d.ts +0 -14
- package/dist/cjs/api/resources/taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.d.ts +0 -12
- package/dist/cjs/api/resources/taskGroups/client/requests/UpdateTaskGroupDriverReq.d.ts +0 -11
- package/dist/esm/api/resources/drivers/client/requests/DriverCreateReq.d.mts +0 -17
- package/dist/esm/api/resources/drivers/client/requests/SetDriverActivationReq.d.mts +0 -14
- package/dist/esm/api/resources/taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.d.mts +0 -12
- package/dist/esm/api/resources/taskGroups/client/requests/UpdateTaskGroupDriverReq.d.mts +0 -11
- /package/dist/cjs/api/resources/drivers/client/requests/{DriverCreateReq.js → DriverClientCreate1.js} +0 -0
- /package/dist/cjs/api/resources/drivers/client/requests/{SetDriverActivationReq.js → DriverClientUpdate1.js} +0 -0
- /package/dist/cjs/api/resources/{drivers/client/requests/UpdateDriverDetailsReq.js → taskArtifacts/client/requests/AddTaskArtifactReq.js} +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/{resources/blurhash/client → client/requests}/index.js +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3Object}/client/index.js +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.js +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.js +0 -0
- /package/dist/cjs/api/resources/taskGroups/client/requests/{UpdateTaskGroupCourierOrgReq.js → AddMessageReq.js} +0 -0
- /package/dist/cjs/api/resources/taskGroups/client/requests/{UpdateTaskGroupDriverReq.js → BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.js} +0 -0
- /package/dist/{esm/api/resources/taskArtifacts/resources/blurhash/client/index.d.mts → cjs/api/resources/taskGroups/resources/s3Object/client/index.d.ts} +0 -0
- /package/dist/{esm/api/resources/taskArtifacts/resources/blurhash/client/index.mjs → cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.d.ts} +0 -0
- /package/dist/{esm/api/resources/taskArtifacts/resources/images/client/index.d.mts → cjs/api/resources/taskGroups/resources/taskGroupId/client/index.d.ts} +0 -0
- /package/dist/esm/api/resources/drivers/client/requests/{DriverCreateReq.mjs → DriverClientCreate1.mjs} +0 -0
- /package/dist/esm/api/resources/drivers/client/requests/{SetDriverActivationReq.mjs → DriverClientUpdate1.mjs} +0 -0
- /package/dist/esm/api/resources/{drivers/client/requests/UpdateDriverDetailsReq.mjs → taskArtifacts/client/requests/AddTaskArtifactReq.mjs} +0 -0
- /package/dist/esm/api/resources/taskArtifacts/{resources/images/client → client/requests}/index.mjs +0 -0
- /package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.d.mts +0 -0
- /package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.mjs +0 -0
- /package/dist/esm/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.d.mts +0 -0
- /package/dist/esm/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.mjs +0 -0
- /package/dist/esm/api/resources/taskGroups/client/requests/{UpdateTaskGroupCourierOrgReq.mjs → AddMessageReq.mjs} +0 -0
- /package/dist/esm/api/resources/taskGroups/client/requests/{UpdateTaskGroupDriverReq.mjs → BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.mjs} +0 -0
|
@@ -17,7 +17,9 @@ export * as dev from "./dev/index.js";
|
|
|
17
17
|
export * as taskArtifactNotifications from "./taskArtifactNotifications/index.js";
|
|
18
18
|
export * as drivers from "./drivers/index.js";
|
|
19
19
|
export * as cargos from "./cargos/index.js";
|
|
20
|
+
export * as taskArtifacts from "./taskArtifacts/index.js";
|
|
20
21
|
export * as offChrtShipperOrg from "./offChrtShipperOrg/index.js";
|
|
22
|
+
export * as tasks from "./tasks/index.js";
|
|
21
23
|
export * as shipperContactInfo from "./shipperContactInfo/index.js";
|
|
22
24
|
export * as orgs from "./orgs/index.js";
|
|
23
25
|
export * as root from "./root/index.js";
|
|
@@ -25,7 +27,6 @@ export * as users from "./users/index.js";
|
|
|
25
27
|
export * as utils from "./utils/index.js";
|
|
26
28
|
export * as notifications from "./notifications/index.js";
|
|
27
29
|
export * as orgInfoForConnections from "./orgInfoForConnections/index.js";
|
|
28
|
-
export * as taskArtifacts from "./taskArtifacts/index.js";
|
|
29
30
|
export * as tracking from "./tracking/index.js";
|
|
30
31
|
export * from "./payments/client/requests/index.js";
|
|
31
32
|
export * from "./courierPayDriverRateSheets/client/requests/index.js";
|
|
@@ -36,9 +37,11 @@ export * from "./orgProfiles/client/requests/index.js";
|
|
|
36
37
|
export * from "./dev/client/requests/index.js";
|
|
37
38
|
export * from "./taskArtifactNotifications/client/requests/index.js";
|
|
38
39
|
export * from "./drivers/client/requests/index.js";
|
|
40
|
+
export * from "./taskArtifacts/client/requests/index.js";
|
|
39
41
|
export * from "./offChrtShipperOrg/client/requests/index.js";
|
|
40
42
|
export * from "./orderDrafts/client/requests/index.js";
|
|
41
43
|
export * from "./taskGroups/client/requests/index.js";
|
|
44
|
+
export * from "./tasks/client/requests/index.js";
|
|
42
45
|
export * from "./shipperContactInfo/client/requests/index.js";
|
|
43
46
|
export * from "./orgs/client/requests/index.js";
|
|
44
47
|
export * from "./utils/client/requests/index.js";
|
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.tracking = exports.
|
|
39
|
+
exports.tracking = exports.orgInfoForConnections = exports.notifications = exports.utils = exports.users = exports.root = exports.orgs = exports.shipperContactInfo = exports.tasks = exports.offChrtShipperOrg = exports.taskArtifacts = exports.cargos = exports.drivers = exports.taskArtifactNotifications = exports.dev = exports.orgProfiles = exports.shipperPayCourierStatements = exports.shipperPayCourierRateSheets = exports.shipperPayCourierPayments = exports.shipperPayCourierLineItemGroups = exports.courierPayDriverStatements = exports.courierPayDriverRateSheets = exports.courierPayDriverPayouts = exports.courierPayDriverLineItemGroups = exports.payments = exports.taskGroups = exports.orders = exports.orderDrafts = exports.connections = void 0;
|
|
40
40
|
exports.connections = __importStar(require("./connections/index.js"));
|
|
41
41
|
__exportStar(require("./connections/types/index.js"), exports);
|
|
42
42
|
exports.orderDrafts = __importStar(require("./orderDrafts/index.js"));
|
|
@@ -56,7 +56,9 @@ exports.dev = __importStar(require("./dev/index.js"));
|
|
|
56
56
|
exports.taskArtifactNotifications = __importStar(require("./taskArtifactNotifications/index.js"));
|
|
57
57
|
exports.drivers = __importStar(require("./drivers/index.js"));
|
|
58
58
|
exports.cargos = __importStar(require("./cargos/index.js"));
|
|
59
|
+
exports.taskArtifacts = __importStar(require("./taskArtifacts/index.js"));
|
|
59
60
|
exports.offChrtShipperOrg = __importStar(require("./offChrtShipperOrg/index.js"));
|
|
61
|
+
exports.tasks = __importStar(require("./tasks/index.js"));
|
|
60
62
|
exports.shipperContactInfo = __importStar(require("./shipperContactInfo/index.js"));
|
|
61
63
|
exports.orgs = __importStar(require("./orgs/index.js"));
|
|
62
64
|
exports.root = __importStar(require("./root/index.js"));
|
|
@@ -64,7 +66,6 @@ exports.users = __importStar(require("./users/index.js"));
|
|
|
64
66
|
exports.utils = __importStar(require("./utils/index.js"));
|
|
65
67
|
exports.notifications = __importStar(require("./notifications/index.js"));
|
|
66
68
|
exports.orgInfoForConnections = __importStar(require("./orgInfoForConnections/index.js"));
|
|
67
|
-
exports.taskArtifacts = __importStar(require("./taskArtifacts/index.js"));
|
|
68
69
|
exports.tracking = __importStar(require("./tracking/index.js"));
|
|
69
70
|
__exportStar(require("./payments/client/requests/index.js"), exports);
|
|
70
71
|
__exportStar(require("./courierPayDriverRateSheets/client/requests/index.js"), exports);
|
|
@@ -75,9 +76,11 @@ __exportStar(require("./orgProfiles/client/requests/index.js"), exports);
|
|
|
75
76
|
__exportStar(require("./dev/client/requests/index.js"), exports);
|
|
76
77
|
__exportStar(require("./taskArtifactNotifications/client/requests/index.js"), exports);
|
|
77
78
|
__exportStar(require("./drivers/client/requests/index.js"), exports);
|
|
79
|
+
__exportStar(require("./taskArtifacts/client/requests/index.js"), exports);
|
|
78
80
|
__exportStar(require("./offChrtShipperOrg/client/requests/index.js"), exports);
|
|
79
81
|
__exportStar(require("./orderDrafts/client/requests/index.js"), exports);
|
|
80
82
|
__exportStar(require("./taskGroups/client/requests/index.js"), exports);
|
|
83
|
+
__exportStar(require("./tasks/client/requests/index.js"), exports);
|
|
81
84
|
__exportStar(require("./shipperContactInfo/client/requests/index.js"), exports);
|
|
82
85
|
__exportStar(require("./orgs/client/requests/index.js"), exports);
|
|
83
86
|
__exportStar(require("./utils/client/requests/index.js"), exports);
|
|
@@ -45,5 +45,18 @@ export declare class Orders {
|
|
|
45
45
|
*/
|
|
46
46
|
stageV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
47
47
|
private __stageV1;
|
|
48
|
+
/**
|
|
49
|
+
* Cancels an order and all related task groups and tasks in a transaction. | authz_personas=[lig_org_operators] | () -> (bool)
|
|
50
|
+
*
|
|
51
|
+
* @param {string} orderId
|
|
52
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await client.orders.cancelV1("order_id")
|
|
58
|
+
*/
|
|
59
|
+
cancelV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
60
|
+
private __cancelV1;
|
|
48
61
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
49
62
|
}
|
|
@@ -119,6 +119,65 @@ class Orders {
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Cancels an order and all related task groups and tasks in a transaction. | authz_personas=[lig_org_operators] | () -> (bool)
|
|
124
|
+
*
|
|
125
|
+
* @param {string} orderId
|
|
126
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
|
+
*
|
|
128
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* await client.orders.cancelV1("order_id")
|
|
132
|
+
*/
|
|
133
|
+
cancelV1(orderId, requestOptions) {
|
|
134
|
+
return core.HttpResponsePromise.fromPromise(this.__cancelV1(orderId, requestOptions));
|
|
135
|
+
}
|
|
136
|
+
__cancelV1(orderId, requestOptions) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
var _a, _b, _c, _d;
|
|
139
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
140
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
141
|
+
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/orders/cancel/v1/${encodeURIComponent(orderId)}`),
|
|
142
|
+
method: "PUT",
|
|
143
|
+
headers: _headers,
|
|
144
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
145
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
146
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
147
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
148
|
+
});
|
|
149
|
+
if (_response.ok) {
|
|
150
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
151
|
+
}
|
|
152
|
+
if (_response.error.reason === "status-code") {
|
|
153
|
+
switch (_response.error.statusCode) {
|
|
154
|
+
case 422:
|
|
155
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
156
|
+
default:
|
|
157
|
+
throw new errors.ChrtError({
|
|
158
|
+
statusCode: _response.error.statusCode,
|
|
159
|
+
body: _response.error.body,
|
|
160
|
+
rawResponse: _response.rawResponse,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
switch (_response.error.reason) {
|
|
165
|
+
case "non-json":
|
|
166
|
+
throw new errors.ChrtError({
|
|
167
|
+
statusCode: _response.error.statusCode,
|
|
168
|
+
body: _response.error.rawBody,
|
|
169
|
+
rawResponse: _response.rawResponse,
|
|
170
|
+
});
|
|
171
|
+
case "timeout":
|
|
172
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/orders/cancel/v1/{order_id}.");
|
|
173
|
+
case "unknown":
|
|
174
|
+
throw new errors.ChrtError({
|
|
175
|
+
message: _response.error.errorMessage,
|
|
176
|
+
rawResponse: _response.rawResponse,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
122
181
|
_getAuthorizationHeader() {
|
|
123
182
|
return __awaiter(this, void 0, void 0, function* () {
|
|
124
183
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../core/index.js";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
6
|
+
import * as Chrt from "../../../index.js";
|
|
7
|
+
import { S3ObjectMetadata } from "../resources/s3ObjectMetadata/client/Client.js";
|
|
8
|
+
import { S3Object } from "../resources/s3Object/client/Client.js";
|
|
8
9
|
export declare namespace TaskArtifacts {
|
|
9
10
|
interface Options {
|
|
10
11
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -15,12 +16,84 @@ export declare namespace TaskArtifacts {
|
|
|
15
16
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
16
17
|
fetcher?: core.FetchFunction;
|
|
17
18
|
}
|
|
19
|
+
interface RequestOptions {
|
|
20
|
+
/** The maximum time to wait for a response in seconds. */
|
|
21
|
+
timeoutInSeconds?: number;
|
|
22
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
23
|
+
maxRetries?: number;
|
|
24
|
+
/** A hook to abort the request. */
|
|
25
|
+
abortSignal?: AbortSignal;
|
|
26
|
+
/** Additional query string parameters to include in the request. */
|
|
27
|
+
queryParams?: Record<string, unknown>;
|
|
28
|
+
/** Additional headers to include in the request. */
|
|
29
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
30
|
+
}
|
|
18
31
|
}
|
|
19
32
|
export declare class TaskArtifacts {
|
|
20
33
|
protected readonly _options: TaskArtifacts.Options;
|
|
21
|
-
protected
|
|
22
|
-
protected
|
|
34
|
+
protected _s3ObjectMetadata: S3ObjectMetadata | undefined;
|
|
35
|
+
protected _s3Object: S3Object | undefined;
|
|
23
36
|
constructor(_options?: TaskArtifacts.Options);
|
|
24
|
-
get
|
|
25
|
-
get
|
|
37
|
+
get s3ObjectMetadata(): S3ObjectMetadata;
|
|
38
|
+
get s3Object(): S3Object;
|
|
39
|
+
/**
|
|
40
|
+
* Adds a new task artifact to a task. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | (AddTaskArtifactReq) -> (PydanticObjectId)
|
|
41
|
+
*
|
|
42
|
+
* @param {string} taskId
|
|
43
|
+
* @param {Chrt.AddTaskArtifactReq} request
|
|
44
|
+
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
+
*
|
|
46
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.taskArtifacts.addToTaskV1("task_id", {
|
|
50
|
+
* task_artifact: {
|
|
51
|
+
* schema_version: 1,
|
|
52
|
+
* type: "image"
|
|
53
|
+
* },
|
|
54
|
+
* status: "draft"
|
|
55
|
+
* })
|
|
56
|
+
*/
|
|
57
|
+
addToTaskV1(taskId: string, request: Chrt.AddTaskArtifactReq, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<string>;
|
|
58
|
+
private __addToTaskV1;
|
|
59
|
+
/**
|
|
60
|
+
* Marks a task artifact as COMPLETED. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | () -> (bool)
|
|
61
|
+
*
|
|
62
|
+
* @param {string} taskArtifactId
|
|
63
|
+
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.taskArtifacts.completeV1("task_artifact_id")
|
|
69
|
+
*/
|
|
70
|
+
completeV1(taskArtifactId: string, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
71
|
+
private __completeV1;
|
|
72
|
+
/**
|
|
73
|
+
* Marks a task artifact as SKIPPED. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | () -> (bool)
|
|
74
|
+
*
|
|
75
|
+
* @param {string} taskArtifactId
|
|
76
|
+
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* await client.taskArtifacts.skipV1("task_artifact_id")
|
|
82
|
+
*/
|
|
83
|
+
skipV1(taskArtifactId: string, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
84
|
+
private __skipV1;
|
|
85
|
+
/**
|
|
86
|
+
* Deletes a task artifact. | authz_personas=[lig_org_operators] | () -> (bool)
|
|
87
|
+
*
|
|
88
|
+
* @param {string} taskArtifactId
|
|
89
|
+
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
|
+
*
|
|
91
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* await client.taskArtifacts.deleteV1("task_artifact_id")
|
|
95
|
+
*/
|
|
96
|
+
deleteV1(taskArtifactId: string, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
97
|
+
private __deleteV1;
|
|
98
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
26
99
|
}
|
|
@@ -2,21 +2,323 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
5
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
48
|
exports.TaskArtifacts = void 0;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
50
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
51
|
+
const Chrt = __importStar(require("../../../index.js"));
|
|
52
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
53
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
54
|
+
const Client_js_1 = require("../resources/s3ObjectMetadata/client/Client.js");
|
|
55
|
+
const Client_js_2 = require("../resources/s3Object/client/Client.js");
|
|
9
56
|
class TaskArtifacts {
|
|
10
57
|
constructor(_options = {}) {
|
|
11
58
|
this._options = _options;
|
|
12
59
|
}
|
|
13
|
-
get
|
|
60
|
+
get s3ObjectMetadata() {
|
|
14
61
|
var _a;
|
|
15
|
-
return ((_a = this.
|
|
62
|
+
return ((_a = this._s3ObjectMetadata) !== null && _a !== void 0 ? _a : (this._s3ObjectMetadata = new Client_js_1.S3ObjectMetadata(this._options)));
|
|
16
63
|
}
|
|
17
|
-
get
|
|
64
|
+
get s3Object() {
|
|
18
65
|
var _a;
|
|
19
|
-
return ((_a = this.
|
|
66
|
+
return ((_a = this._s3Object) !== null && _a !== void 0 ? _a : (this._s3Object = new Client_js_2.S3Object(this._options)));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Adds a new task artifact to a task. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | (AddTaskArtifactReq) -> (PydanticObjectId)
|
|
70
|
+
*
|
|
71
|
+
* @param {string} taskId
|
|
72
|
+
* @param {Chrt.AddTaskArtifactReq} request
|
|
73
|
+
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.taskArtifacts.addToTaskV1("task_id", {
|
|
79
|
+
* task_artifact: {
|
|
80
|
+
* schema_version: 1,
|
|
81
|
+
* type: "image"
|
|
82
|
+
* },
|
|
83
|
+
* status: "draft"
|
|
84
|
+
* })
|
|
85
|
+
*/
|
|
86
|
+
addToTaskV1(taskId, request, requestOptions) {
|
|
87
|
+
return core.HttpResponsePromise.fromPromise(this.__addToTaskV1(taskId, request, requestOptions));
|
|
88
|
+
}
|
|
89
|
+
__addToTaskV1(taskId, request, requestOptions) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
var _a, _b, _c, _d;
|
|
92
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
93
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
94
|
+
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/${encodeURIComponent(taskId)}`),
|
|
95
|
+
method: "PUT",
|
|
96
|
+
headers: _headers,
|
|
97
|
+
contentType: "application/json",
|
|
98
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
99
|
+
requestType: "json",
|
|
100
|
+
body: request,
|
|
101
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
102
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
103
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
104
|
+
});
|
|
105
|
+
if (_response.ok) {
|
|
106
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
107
|
+
}
|
|
108
|
+
if (_response.error.reason === "status-code") {
|
|
109
|
+
switch (_response.error.statusCode) {
|
|
110
|
+
case 422:
|
|
111
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
112
|
+
default:
|
|
113
|
+
throw new errors.ChrtError({
|
|
114
|
+
statusCode: _response.error.statusCode,
|
|
115
|
+
body: _response.error.body,
|
|
116
|
+
rawResponse: _response.rawResponse,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
switch (_response.error.reason) {
|
|
121
|
+
case "non-json":
|
|
122
|
+
throw new errors.ChrtError({
|
|
123
|
+
statusCode: _response.error.statusCode,
|
|
124
|
+
body: _response.error.rawBody,
|
|
125
|
+
rawResponse: _response.rawResponse,
|
|
126
|
+
});
|
|
127
|
+
case "timeout":
|
|
128
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/task_artifacts/add_to_task/v1/{task_id}.");
|
|
129
|
+
case "unknown":
|
|
130
|
+
throw new errors.ChrtError({
|
|
131
|
+
message: _response.error.errorMessage,
|
|
132
|
+
rawResponse: _response.rawResponse,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Marks a task artifact as COMPLETED. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | () -> (bool)
|
|
139
|
+
*
|
|
140
|
+
* @param {string} taskArtifactId
|
|
141
|
+
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
142
|
+
*
|
|
143
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* await client.taskArtifacts.completeV1("task_artifact_id")
|
|
147
|
+
*/
|
|
148
|
+
completeV1(taskArtifactId, requestOptions) {
|
|
149
|
+
return core.HttpResponsePromise.fromPromise(this.__completeV1(taskArtifactId, requestOptions));
|
|
150
|
+
}
|
|
151
|
+
__completeV1(taskArtifactId, requestOptions) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
var _a, _b, _c, _d;
|
|
154
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
155
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
156
|
+
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)}`),
|
|
157
|
+
method: "PUT",
|
|
158
|
+
headers: _headers,
|
|
159
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
160
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
161
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
162
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
163
|
+
});
|
|
164
|
+
if (_response.ok) {
|
|
165
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
166
|
+
}
|
|
167
|
+
if (_response.error.reason === "status-code") {
|
|
168
|
+
switch (_response.error.statusCode) {
|
|
169
|
+
case 422:
|
|
170
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
171
|
+
default:
|
|
172
|
+
throw new errors.ChrtError({
|
|
173
|
+
statusCode: _response.error.statusCode,
|
|
174
|
+
body: _response.error.body,
|
|
175
|
+
rawResponse: _response.rawResponse,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
switch (_response.error.reason) {
|
|
180
|
+
case "non-json":
|
|
181
|
+
throw new errors.ChrtError({
|
|
182
|
+
statusCode: _response.error.statusCode,
|
|
183
|
+
body: _response.error.rawBody,
|
|
184
|
+
rawResponse: _response.rawResponse,
|
|
185
|
+
});
|
|
186
|
+
case "timeout":
|
|
187
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/task_artifacts/complete/v1/{task_artifact_id}.");
|
|
188
|
+
case "unknown":
|
|
189
|
+
throw new errors.ChrtError({
|
|
190
|
+
message: _response.error.errorMessage,
|
|
191
|
+
rawResponse: _response.rawResponse,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Marks a task artifact as SKIPPED. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | () -> (bool)
|
|
198
|
+
*
|
|
199
|
+
* @param {string} taskArtifactId
|
|
200
|
+
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
201
|
+
*
|
|
202
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* await client.taskArtifacts.skipV1("task_artifact_id")
|
|
206
|
+
*/
|
|
207
|
+
skipV1(taskArtifactId, requestOptions) {
|
|
208
|
+
return core.HttpResponsePromise.fromPromise(this.__skipV1(taskArtifactId, requestOptions));
|
|
209
|
+
}
|
|
210
|
+
__skipV1(taskArtifactId, requestOptions) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
var _a, _b, _c, _d;
|
|
213
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
214
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
215
|
+
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/skip/v1/${encodeURIComponent(taskArtifactId)}`),
|
|
216
|
+
method: "PUT",
|
|
217
|
+
headers: _headers,
|
|
218
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
219
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
220
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
221
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
222
|
+
});
|
|
223
|
+
if (_response.ok) {
|
|
224
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
225
|
+
}
|
|
226
|
+
if (_response.error.reason === "status-code") {
|
|
227
|
+
switch (_response.error.statusCode) {
|
|
228
|
+
case 422:
|
|
229
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
230
|
+
default:
|
|
231
|
+
throw new errors.ChrtError({
|
|
232
|
+
statusCode: _response.error.statusCode,
|
|
233
|
+
body: _response.error.body,
|
|
234
|
+
rawResponse: _response.rawResponse,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
switch (_response.error.reason) {
|
|
239
|
+
case "non-json":
|
|
240
|
+
throw new errors.ChrtError({
|
|
241
|
+
statusCode: _response.error.statusCode,
|
|
242
|
+
body: _response.error.rawBody,
|
|
243
|
+
rawResponse: _response.rawResponse,
|
|
244
|
+
});
|
|
245
|
+
case "timeout":
|
|
246
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/task_artifacts/skip/v1/{task_artifact_id}.");
|
|
247
|
+
case "unknown":
|
|
248
|
+
throw new errors.ChrtError({
|
|
249
|
+
message: _response.error.errorMessage,
|
|
250
|
+
rawResponse: _response.rawResponse,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Deletes a task artifact. | authz_personas=[lig_org_operators] | () -> (bool)
|
|
257
|
+
*
|
|
258
|
+
* @param {string} taskArtifactId
|
|
259
|
+
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
260
|
+
*
|
|
261
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* await client.taskArtifacts.deleteV1("task_artifact_id")
|
|
265
|
+
*/
|
|
266
|
+
deleteV1(taskArtifactId, requestOptions) {
|
|
267
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteV1(taskArtifactId, requestOptions));
|
|
268
|
+
}
|
|
269
|
+
__deleteV1(taskArtifactId, requestOptions) {
|
|
270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
271
|
+
var _a, _b, _c, _d;
|
|
272
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
273
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
274
|
+
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/delete/v1/${encodeURIComponent(taskArtifactId)}`),
|
|
275
|
+
method: "DELETE",
|
|
276
|
+
headers: _headers,
|
|
277
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
278
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
279
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
280
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
281
|
+
});
|
|
282
|
+
if (_response.ok) {
|
|
283
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
284
|
+
}
|
|
285
|
+
if (_response.error.reason === "status-code") {
|
|
286
|
+
switch (_response.error.statusCode) {
|
|
287
|
+
case 422:
|
|
288
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
289
|
+
default:
|
|
290
|
+
throw new errors.ChrtError({
|
|
291
|
+
statusCode: _response.error.statusCode,
|
|
292
|
+
body: _response.error.body,
|
|
293
|
+
rawResponse: _response.rawResponse,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
switch (_response.error.reason) {
|
|
298
|
+
case "non-json":
|
|
299
|
+
throw new errors.ChrtError({
|
|
300
|
+
statusCode: _response.error.statusCode,
|
|
301
|
+
body: _response.error.rawBody,
|
|
302
|
+
rawResponse: _response.rawResponse,
|
|
303
|
+
});
|
|
304
|
+
case "timeout":
|
|
305
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /oort/task_artifacts/delete/v1/{task_artifact_id}.");
|
|
306
|
+
case "unknown":
|
|
307
|
+
throw new errors.ChrtError({
|
|
308
|
+
message: _response.error.errorMessage,
|
|
309
|
+
rawResponse: _response.rawResponse,
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
_getAuthorizationHeader() {
|
|
315
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
316
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
317
|
+
if (bearer != null) {
|
|
318
|
+
return `Bearer ${bearer}`;
|
|
319
|
+
}
|
|
320
|
+
return undefined;
|
|
321
|
+
});
|
|
20
322
|
}
|
|
21
323
|
}
|
|
22
324
|
exports.TaskArtifacts = TaskArtifacts;
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* task_artifact: {
|
|
9
|
+
* schema_version: 1,
|
|
10
|
+
* type: "image"
|
|
11
|
+
* },
|
|
12
|
+
* status: "draft"
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface AddTaskArtifactReq {
|
|
16
|
+
task_artifact: Chrt.TaskArtifactClientCreate1;
|
|
17
|
+
/** Initial status of the task artifact. */
|
|
18
|
+
status: Chrt.TaskArtifactStatusEnum1;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type AddTaskArtifactReq } from "./AddTaskArtifactReq.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as
|
|
1
|
+
export * as s3ObjectMetadata from "./s3ObjectMetadata/index.js";
|
|
2
|
+
export * as s3Object from "./s3Object/index.js";
|
|
@@ -33,6 +33,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
36
|
+
exports.s3Object = exports.s3ObjectMetadata = void 0;
|
|
37
|
+
exports.s3ObjectMetadata = __importStar(require("./s3ObjectMetadata/index.js"));
|
|
38
|
+
exports.s3Object = __importStar(require("./s3Object/index.js"));
|