@chrt-inc/typescript-sdk 1.320.0 → 1.322.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 +76 -6
- package/dist/cjs/api/resources/taskArtifacts/client/Client.js +304 -7
- 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 +6 -3
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +90 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/Client.js +314 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/index.js +17 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.ts +13 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +46 -33
- package/dist/cjs/api/resources/taskGroups/client/Client.js +89 -69
- package/dist/cjs/api/resources/taskGroups/client/requests/AddMessageReq.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 +3 -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/taskGroups/resources/s3Object/client/Client.d.ts +90 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/Client.js +314 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/index.js +17 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.ts +13 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.js +5 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/{taskArtifacts/resources/blurhash → taskGroups/resources/taskGroupId}/client/Client.d.ts +23 -10
- package/dist/cjs/api/resources/{taskArtifacts/resources/blurhash → taskGroups/resources/taskGroupId}/client/Client.js +71 -12
- 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 +76 -6
- package/dist/esm/api/resources/taskArtifacts/client/Client.mjs +271 -7
- 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/s3Object/client/Client.d.mts +90 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/Client.mjs +277 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.d.mts +2 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.mjs +1 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.mts +13 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +46 -33
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +87 -67
- package/dist/esm/api/resources/taskGroups/client/requests/AddMessageReq.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 +3 -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/taskGroups/resources/s3Object/client/Client.d.mts +90 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/Client.mjs +277 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.d.mts +2 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.mjs +1 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.mts +13 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.mjs +4 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/{taskArtifacts/resources/blurhash → taskGroups/resources/taskGroupId}/client/Client.d.mts +23 -10
- package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/Client.mjs +149 -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 +2047 -821
- 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/taskArtifacts/resources/images/client/Client.d.ts +0 -39
- package/dist/cjs/api/resources/taskArtifacts/resources/images/client/Client.js +0 -121
- 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/taskArtifacts/resources/blurhash/client/Client.mjs +0 -90
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/Client.d.mts +0 -39
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/Client.mjs +0 -84
- 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/{taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.js → taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.js} +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{images/client → s3Object/client/requests}/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/taskGroups/client/requests/{UpdateTaskGroupDriverReq.js → AddMessageReq.js} +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/index.js +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/resources/blurhash → 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/blurhash/client → client/requests}/index.mjs +0 -0
- /package/dist/esm/api/resources/{taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.mjs → taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.mjs} +0 -0
- /package/dist/esm/api/resources/taskArtifacts/resources/{images/client → s3Object/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/taskGroups/client/requests/{UpdateTaskGroupDriverReq.mjs → AddMessageReq.mjs} +0 -0
- /package/dist/{cjs/api/resources/taskArtifacts/resources/images/client/index.d.ts → esm/api/resources/taskGroups/resources/s3Object/client/requests/index.mjs} +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/index.mjs +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/resources/blurhash → taskGroups/resources/taskGroupId}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/resources/images/client/index.d.mts → taskGroups/resources/taskGroupId/client/index.mjs} +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../../../index.mjs";
|
|
7
|
+
export declare namespace S3Object {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class S3Object {
|
|
31
|
+
protected readonly _options: S3Object.Options;
|
|
32
|
+
constructor(_options?: S3Object.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves the metadata for a task artifact S3 object, including blurhash for placeholder loading. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (TaskArtifactS3ObjectMetadata1)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} taskArtifactS3ObjectMetadataId
|
|
37
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.taskArtifacts.s3Object.getS3ObjectMetadataV1("task_artifact_s3_object_metadata_id")
|
|
43
|
+
*/
|
|
44
|
+
getS3ObjectMetadataV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<Chrt.TaskArtifactS3ObjectMetadata1>;
|
|
45
|
+
private __getS3ObjectMetadataV1;
|
|
46
|
+
/**
|
|
47
|
+
* Streams a task artifact S3 object file from storage. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (StreamingResponse)
|
|
48
|
+
*
|
|
49
|
+
* @param {string} taskArtifactS3ObjectMetadataId
|
|
50
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.taskArtifacts.s3Object.getV1("task_artifact_s3_object_metadata_id")
|
|
56
|
+
*/
|
|
57
|
+
getV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
58
|
+
private __getV1;
|
|
59
|
+
/**
|
|
60
|
+
* Uploads an image file to a task artifact with automatic blurhash generation. | authz_personas=[courier_driver, forwarder_org_operators, courier_org_operators, shipper_org_operators] | (UploadFile) -> (bool)
|
|
61
|
+
*
|
|
62
|
+
* @param {string} taskArtifactId
|
|
63
|
+
* @param {Chrt.taskArtifacts.BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost} request
|
|
64
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* import { createReadStream } from "fs";
|
|
70
|
+
* await client.taskArtifacts.s3Object.addV1("task_artifact_id", {
|
|
71
|
+
* image: fs.createReadStream("/path/to/your/file")
|
|
72
|
+
* })
|
|
73
|
+
*/
|
|
74
|
+
addV1(taskArtifactId: string, request: Chrt.taskArtifacts.BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
75
|
+
private __addV1;
|
|
76
|
+
/**
|
|
77
|
+
* Deletes an S3 object metadata and the associated S3 object from a task artifact. Only the uploader or an operator from the uploading org can delete. | () -> (bool)
|
|
78
|
+
*
|
|
79
|
+
* @param {string} taskArtifactS3ObjectMetadataId
|
|
80
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* await client.taskArtifacts.s3Object.deleteV1("task_artifact_s3_object_metadata_id")
|
|
86
|
+
*/
|
|
87
|
+
deleteV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
88
|
+
private __deleteV1;
|
|
89
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
90
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
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
|
+
export class S3Object {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the metadata for a task artifact S3 object, including blurhash for placeholder loading. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (TaskArtifactS3ObjectMetadata1)
|
|
24
|
+
*
|
|
25
|
+
* @param {string} taskArtifactS3ObjectMetadataId
|
|
26
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.taskArtifacts.s3Object.getS3ObjectMetadataV1("task_artifact_s3_object_metadata_id")
|
|
32
|
+
*/
|
|
33
|
+
getS3ObjectMetadataV1(taskArtifactS3ObjectMetadataId, requestOptions) {
|
|
34
|
+
return core.HttpResponsePromise.fromPromise(this.__getS3ObjectMetadataV1(taskArtifactS3ObjectMetadataId, requestOptions));
|
|
35
|
+
}
|
|
36
|
+
__getS3ObjectMetadataV1(taskArtifactS3ObjectMetadataId, requestOptions) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
var _a, _b, _c, _d;
|
|
39
|
+
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);
|
|
40
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
41
|
+
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/s3_object/s3_object_metadata/v1/${encodeURIComponent(taskArtifactS3ObjectMetadataId)}`),
|
|
42
|
+
method: "GET",
|
|
43
|
+
headers: _headers,
|
|
44
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
45
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
46
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
47
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
48
|
+
});
|
|
49
|
+
if (_response.ok) {
|
|
50
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
51
|
+
}
|
|
52
|
+
if (_response.error.reason === "status-code") {
|
|
53
|
+
switch (_response.error.statusCode) {
|
|
54
|
+
case 422:
|
|
55
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
56
|
+
default:
|
|
57
|
+
throw new errors.ChrtError({
|
|
58
|
+
statusCode: _response.error.statusCode,
|
|
59
|
+
body: _response.error.body,
|
|
60
|
+
rawResponse: _response.rawResponse,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
switch (_response.error.reason) {
|
|
65
|
+
case "non-json":
|
|
66
|
+
throw new errors.ChrtError({
|
|
67
|
+
statusCode: _response.error.statusCode,
|
|
68
|
+
body: _response.error.rawBody,
|
|
69
|
+
rawResponse: _response.rawResponse,
|
|
70
|
+
});
|
|
71
|
+
case "timeout":
|
|
72
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_artifacts/s3_object/s3_object_metadata/v1/{task_artifact_s3_object_metadata_id}.");
|
|
73
|
+
case "unknown":
|
|
74
|
+
throw new errors.ChrtError({
|
|
75
|
+
message: _response.error.errorMessage,
|
|
76
|
+
rawResponse: _response.rawResponse,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Streams a task artifact S3 object file from storage. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (StreamingResponse)
|
|
83
|
+
*
|
|
84
|
+
* @param {string} taskArtifactS3ObjectMetadataId
|
|
85
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* await client.taskArtifacts.s3Object.getV1("task_artifact_s3_object_metadata_id")
|
|
91
|
+
*/
|
|
92
|
+
getV1(taskArtifactS3ObjectMetadataId, requestOptions) {
|
|
93
|
+
return core.HttpResponsePromise.fromPromise(this.__getV1(taskArtifactS3ObjectMetadataId, requestOptions));
|
|
94
|
+
}
|
|
95
|
+
__getV1(taskArtifactS3ObjectMetadataId, requestOptions) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
var _a, _b, _c, _d;
|
|
98
|
+
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);
|
|
99
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
100
|
+
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/s3_object/v1/${encodeURIComponent(taskArtifactS3ObjectMetadataId)}`),
|
|
101
|
+
method: "GET",
|
|
102
|
+
headers: _headers,
|
|
103
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
104
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
105
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
106
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
107
|
+
});
|
|
108
|
+
if (_response.ok) {
|
|
109
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
110
|
+
}
|
|
111
|
+
if (_response.error.reason === "status-code") {
|
|
112
|
+
switch (_response.error.statusCode) {
|
|
113
|
+
case 422:
|
|
114
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
115
|
+
default:
|
|
116
|
+
throw new errors.ChrtError({
|
|
117
|
+
statusCode: _response.error.statusCode,
|
|
118
|
+
body: _response.error.body,
|
|
119
|
+
rawResponse: _response.rawResponse,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
switch (_response.error.reason) {
|
|
124
|
+
case "non-json":
|
|
125
|
+
throw new errors.ChrtError({
|
|
126
|
+
statusCode: _response.error.statusCode,
|
|
127
|
+
body: _response.error.rawBody,
|
|
128
|
+
rawResponse: _response.rawResponse,
|
|
129
|
+
});
|
|
130
|
+
case "timeout":
|
|
131
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_artifacts/s3_object/v1/{task_artifact_s3_object_metadata_id}.");
|
|
132
|
+
case "unknown":
|
|
133
|
+
throw new errors.ChrtError({
|
|
134
|
+
message: _response.error.errorMessage,
|
|
135
|
+
rawResponse: _response.rawResponse,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Uploads an image file to a task artifact with automatic blurhash generation. | authz_personas=[courier_driver, forwarder_org_operators, courier_org_operators, shipper_org_operators] | (UploadFile) -> (bool)
|
|
142
|
+
*
|
|
143
|
+
* @param {string} taskArtifactId
|
|
144
|
+
* @param {Chrt.taskArtifacts.BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost} request
|
|
145
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
146
|
+
*
|
|
147
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* import { createReadStream } from "fs";
|
|
151
|
+
* await client.taskArtifacts.s3Object.addV1("task_artifact_id", {
|
|
152
|
+
* image: fs.createReadStream("/path/to/your/file")
|
|
153
|
+
* })
|
|
154
|
+
*/
|
|
155
|
+
addV1(taskArtifactId, request, requestOptions) {
|
|
156
|
+
return core.HttpResponsePromise.fromPromise(this.__addV1(taskArtifactId, request, requestOptions));
|
|
157
|
+
}
|
|
158
|
+
__addV1(taskArtifactId, request, requestOptions) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
var _a, _b, _c, _d;
|
|
161
|
+
const _request = yield core.newFormData();
|
|
162
|
+
yield _request.appendFile("image", request.image);
|
|
163
|
+
const _maybeEncodedRequest = yield _request.getRequest();
|
|
164
|
+
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);
|
|
165
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
166
|
+
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/s3_object/add/v1/${encodeURIComponent(taskArtifactId)}`),
|
|
167
|
+
method: "POST",
|
|
168
|
+
headers: _headers,
|
|
169
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
170
|
+
requestType: "file",
|
|
171
|
+
duplex: _maybeEncodedRequest.duplex,
|
|
172
|
+
body: _maybeEncodedRequest.body,
|
|
173
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
174
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
175
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
176
|
+
});
|
|
177
|
+
if (_response.ok) {
|
|
178
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
179
|
+
}
|
|
180
|
+
if (_response.error.reason === "status-code") {
|
|
181
|
+
switch (_response.error.statusCode) {
|
|
182
|
+
case 422:
|
|
183
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
184
|
+
default:
|
|
185
|
+
throw new errors.ChrtError({
|
|
186
|
+
statusCode: _response.error.statusCode,
|
|
187
|
+
body: _response.error.body,
|
|
188
|
+
rawResponse: _response.rawResponse,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
switch (_response.error.reason) {
|
|
193
|
+
case "non-json":
|
|
194
|
+
throw new errors.ChrtError({
|
|
195
|
+
statusCode: _response.error.statusCode,
|
|
196
|
+
body: _response.error.rawBody,
|
|
197
|
+
rawResponse: _response.rawResponse,
|
|
198
|
+
});
|
|
199
|
+
case "timeout":
|
|
200
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_artifacts/s3_object/add/v1/{task_artifact_id}.");
|
|
201
|
+
case "unknown":
|
|
202
|
+
throw new errors.ChrtError({
|
|
203
|
+
message: _response.error.errorMessage,
|
|
204
|
+
rawResponse: _response.rawResponse,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Deletes an S3 object metadata and the associated S3 object from a task artifact. Only the uploader or an operator from the uploading org can delete. | () -> (bool)
|
|
211
|
+
*
|
|
212
|
+
* @param {string} taskArtifactS3ObjectMetadataId
|
|
213
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
214
|
+
*
|
|
215
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* await client.taskArtifacts.s3Object.deleteV1("task_artifact_s3_object_metadata_id")
|
|
219
|
+
*/
|
|
220
|
+
deleteV1(taskArtifactS3ObjectMetadataId, requestOptions) {
|
|
221
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteV1(taskArtifactS3ObjectMetadataId, requestOptions));
|
|
222
|
+
}
|
|
223
|
+
__deleteV1(taskArtifactS3ObjectMetadataId, requestOptions) {
|
|
224
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
var _a, _b, _c, _d;
|
|
226
|
+
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);
|
|
227
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
228
|
+
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/s3_object/delete/v1/${encodeURIComponent(taskArtifactS3ObjectMetadataId)}`),
|
|
229
|
+
method: "DELETE",
|
|
230
|
+
headers: _headers,
|
|
231
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
232
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
233
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
234
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
235
|
+
});
|
|
236
|
+
if (_response.ok) {
|
|
237
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
238
|
+
}
|
|
239
|
+
if (_response.error.reason === "status-code") {
|
|
240
|
+
switch (_response.error.statusCode) {
|
|
241
|
+
case 422:
|
|
242
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
243
|
+
default:
|
|
244
|
+
throw new errors.ChrtError({
|
|
245
|
+
statusCode: _response.error.statusCode,
|
|
246
|
+
body: _response.error.body,
|
|
247
|
+
rawResponse: _response.rawResponse,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
switch (_response.error.reason) {
|
|
252
|
+
case "non-json":
|
|
253
|
+
throw new errors.ChrtError({
|
|
254
|
+
statusCode: _response.error.statusCode,
|
|
255
|
+
body: _response.error.rawBody,
|
|
256
|
+
rawResponse: _response.rawResponse,
|
|
257
|
+
});
|
|
258
|
+
case "timeout":
|
|
259
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /oort/task_artifacts/s3_object/delete/v1/{task_artifact_s3_object_metadata_id}.");
|
|
260
|
+
case "unknown":
|
|
261
|
+
throw new errors.ChrtError({
|
|
262
|
+
message: _response.error.errorMessage,
|
|
263
|
+
rawResponse: _response.rawResponse,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
_getAuthorizationHeader() {
|
|
269
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
271
|
+
if (bearer != null) {
|
|
272
|
+
return `Bearer ${bearer}`;
|
|
273
|
+
}
|
|
274
|
+
return undefined;
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../../../../core/index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* image: fs.createReadStream("/path/to/your/file")
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost {
|
|
12
|
+
image: core.file.Uploadable.FileLike;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost } from "./BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.mjs";
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
import * as environments from "../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../core/index.mjs";
|
|
6
6
|
import * as Chrt from "../../../index.mjs";
|
|
7
|
+
import { TaskGroupId } from "../resources/taskGroupId/client/Client.mjs";
|
|
8
|
+
import { S3Object } from "../resources/s3Object/client/Client.mjs";
|
|
7
9
|
import { Expanded } from "../resources/expanded/client/Client.mjs";
|
|
8
10
|
export declare namespace TaskGroups {
|
|
9
11
|
interface Options {
|
|
@@ -30,37 +32,28 @@ export declare namespace TaskGroups {
|
|
|
30
32
|
}
|
|
31
33
|
export declare class TaskGroups {
|
|
32
34
|
protected readonly _options: TaskGroups.Options;
|
|
35
|
+
protected _taskGroupId: TaskGroupId | undefined;
|
|
36
|
+
protected _s3Object: S3Object | undefined;
|
|
33
37
|
protected _expanded: Expanded | undefined;
|
|
34
38
|
constructor(_options?: TaskGroups.Options);
|
|
39
|
+
get taskGroupId(): TaskGroupId;
|
|
40
|
+
get s3Object(): S3Object;
|
|
35
41
|
get expanded(): Expanded;
|
|
36
42
|
/**
|
|
37
|
-
*
|
|
43
|
+
* Starts a task group by transitioning it from STAGED to IN_PROGRESS and syncing related order state. | authz_personas=[courier_driver, lig_org_operators] | () -> (bool)
|
|
38
44
|
*
|
|
39
|
-
* @param {string}
|
|
40
|
-
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
-
*
|
|
42
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* await client.taskGroups.getTaskGroupIdForCourierOperatorsV1("by_order_id_or_short_id")
|
|
46
|
-
*/
|
|
47
|
-
getTaskGroupIdForCourierOperatorsV1(byOrderIdOrShortId: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<string>;
|
|
48
|
-
private __getTaskGroupIdForCourierOperatorsV1;
|
|
49
|
-
/**
|
|
50
|
-
* Retrieves the task group ID for the courier driver assigned to an order. | authz_personas=[courier_driver] | () -> (PydanticObjectId)
|
|
51
|
-
*
|
|
52
|
-
* @param {string} byOrderIdOrShortId
|
|
45
|
+
* @param {string} taskGroupId
|
|
53
46
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
47
|
*
|
|
55
48
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
56
49
|
*
|
|
57
50
|
* @example
|
|
58
|
-
* await client.taskGroups.
|
|
51
|
+
* await client.taskGroups.startV1("task_group_id")
|
|
59
52
|
*/
|
|
60
|
-
|
|
61
|
-
private
|
|
53
|
+
startV1(taskGroupId: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
54
|
+
private __startV1;
|
|
62
55
|
/**
|
|
63
|
-
*
|
|
56
|
+
* Sets the ordering of tasks within a task group. Requires complete list of task IDs in desired order. Completed tasks must be before staged tasks. | authz_personas=[lig_org_operators] | (SetTaskOrderingReq) -> (bool)
|
|
64
57
|
*
|
|
65
58
|
* @param {string} taskGroupId
|
|
66
59
|
* @param {Chrt.SetTaskOrderingReq} request
|
|
@@ -70,13 +63,13 @@ export declare class TaskGroups {
|
|
|
70
63
|
*
|
|
71
64
|
* @example
|
|
72
65
|
* await client.taskGroups.setTaskOrderingV1("task_group_id", {
|
|
73
|
-
*
|
|
66
|
+
* task_ids: ["task_ids"]
|
|
74
67
|
* })
|
|
75
68
|
*/
|
|
76
69
|
setTaskOrderingV1(taskGroupId: string, request: Chrt.SetTaskOrderingReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
77
70
|
private __setTaskOrderingV1;
|
|
78
71
|
/**
|
|
79
|
-
*
|
|
72
|
+
* Sets the flight number on a task group, plus any TENDER_TO_AIRLINE tasks in the immediately preceding task group and RECOVER_FROM_AIRLINE tasks in the immediately following task group. | authz_personas=[lig_org_operators] | (SetFlightNumberReq) -> (bool)
|
|
80
73
|
*
|
|
81
74
|
* @param {string} taskGroupId
|
|
82
75
|
* @param {Chrt.SetFlightNumberReq} request
|
|
@@ -92,45 +85,65 @@ export declare class TaskGroups {
|
|
|
92
85
|
setFlightNumberV1(taskGroupId: string, request: Chrt.SetFlightNumberReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
93
86
|
private __setFlightNumberV1;
|
|
94
87
|
/**
|
|
95
|
-
*
|
|
88
|
+
* Updates the driver assigned to a task group. | authz_personas=[courier_org_operators] | (UpdateDriverReq) -> (bool)
|
|
96
89
|
*
|
|
97
90
|
* @param {string} taskGroupId
|
|
98
|
-
* @param {Chrt.
|
|
91
|
+
* @param {Chrt.UpdateDriverReq} request
|
|
99
92
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
100
93
|
*
|
|
101
94
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
102
95
|
*
|
|
103
96
|
* @example
|
|
104
|
-
* await client.taskGroups.updateDriverV1("task_group_id"
|
|
97
|
+
* await client.taskGroups.updateDriverV1("task_group_id", {
|
|
98
|
+
* driver_id: "driver_id"
|
|
99
|
+
* })
|
|
105
100
|
*/
|
|
106
|
-
updateDriverV1(taskGroupId: string, request
|
|
101
|
+
updateDriverV1(taskGroupId: string, request: Chrt.UpdateDriverReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
107
102
|
private __updateDriverV1;
|
|
108
103
|
/**
|
|
109
|
-
*
|
|
104
|
+
* Removes the driver from a task group (sets driver_id to null). | authz_personas=[courier_org_operators, courier_driver] | () -> (bool)
|
|
110
105
|
*
|
|
111
106
|
* @param {string} taskGroupId
|
|
112
|
-
* @param {Chrt.UpdateTaskGroupCourierOrgReq} request
|
|
113
107
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
108
|
*
|
|
115
109
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
116
110
|
*
|
|
117
111
|
* @example
|
|
118
|
-
* await client.taskGroups.
|
|
112
|
+
* await client.taskGroups.removeDriverV1("task_group_id")
|
|
119
113
|
*/
|
|
120
|
-
|
|
114
|
+
removeDriverV1(taskGroupId: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
115
|
+
private __removeDriverV1;
|
|
116
|
+
/**
|
|
117
|
+
* Updates the courier organization assigned to a task group. | authz_personas=[forwarder_org_operators] | (UpdateCourierOrgReq) -> (bool)
|
|
118
|
+
*
|
|
119
|
+
* @param {string} taskGroupId
|
|
120
|
+
* @param {Chrt.UpdateCourierOrgReq} request
|
|
121
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* await client.taskGroups.updateCourierOrgV1("task_group_id", {
|
|
127
|
+
* courier_org_id: "courier_org_id"
|
|
128
|
+
* })
|
|
129
|
+
*/
|
|
130
|
+
updateCourierOrgV1(taskGroupId: string, request: Chrt.UpdateCourierOrgReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
121
131
|
private __updateCourierOrgV1;
|
|
122
132
|
/**
|
|
123
|
-
*
|
|
133
|
+
* Adds a message to a task group's message log. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators, shipper_org_operators] | (AddMessageReq) -> (bool)
|
|
124
134
|
*
|
|
125
135
|
* @param {string} taskGroupId
|
|
136
|
+
* @param {Chrt.AddMessageReq} request
|
|
126
137
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
138
|
*
|
|
128
139
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
129
140
|
*
|
|
130
141
|
* @example
|
|
131
|
-
* await client.taskGroups.
|
|
142
|
+
* await client.taskGroups.addMessageV1("task_group_id", {
|
|
143
|
+
* message: "message"
|
|
144
|
+
* })
|
|
132
145
|
*/
|
|
133
|
-
|
|
134
|
-
private
|
|
146
|
+
addMessageV1(taskGroupId: string, request: Chrt.AddMessageReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
147
|
+
private __addMessageV1;
|
|
135
148
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
136
149
|
}
|