@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
|
@@ -51,36 +51,51 @@ const core = __importStar(require("../../../../core/index.js"));
|
|
|
51
51
|
const Chrt = __importStar(require("../../../index.js"));
|
|
52
52
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
54
|
-
const Client_js_1 = require("../resources/
|
|
54
|
+
const Client_js_1 = require("../resources/taskGroupId/client/Client.js");
|
|
55
|
+
const Client_js_2 = require("../resources/s3ObjectMetadata/client/Client.js");
|
|
56
|
+
const Client_js_3 = require("../resources/s3Object/client/Client.js");
|
|
57
|
+
const Client_js_4 = require("../resources/expanded/client/Client.js");
|
|
55
58
|
class TaskGroups {
|
|
56
59
|
constructor(_options = {}) {
|
|
57
60
|
this._options = _options;
|
|
58
61
|
}
|
|
62
|
+
get taskGroupId() {
|
|
63
|
+
var _a;
|
|
64
|
+
return ((_a = this._taskGroupId) !== null && _a !== void 0 ? _a : (this._taskGroupId = new Client_js_1.TaskGroupId(this._options)));
|
|
65
|
+
}
|
|
66
|
+
get s3ObjectMetadata() {
|
|
67
|
+
var _a;
|
|
68
|
+
return ((_a = this._s3ObjectMetadata) !== null && _a !== void 0 ? _a : (this._s3ObjectMetadata = new Client_js_2.S3ObjectMetadata(this._options)));
|
|
69
|
+
}
|
|
70
|
+
get s3Object() {
|
|
71
|
+
var _a;
|
|
72
|
+
return ((_a = this._s3Object) !== null && _a !== void 0 ? _a : (this._s3Object = new Client_js_3.S3Object(this._options)));
|
|
73
|
+
}
|
|
59
74
|
get expanded() {
|
|
60
75
|
var _a;
|
|
61
|
-
return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new
|
|
76
|
+
return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new Client_js_4.Expanded(this._options)));
|
|
62
77
|
}
|
|
63
78
|
/**
|
|
64
|
-
*
|
|
79
|
+
* 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)
|
|
65
80
|
*
|
|
66
|
-
* @param {string}
|
|
81
|
+
* @param {string} taskGroupId
|
|
67
82
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
83
|
*
|
|
69
84
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
70
85
|
*
|
|
71
86
|
* @example
|
|
72
|
-
* await client.taskGroups.
|
|
87
|
+
* await client.taskGroups.startV1("task_group_id")
|
|
73
88
|
*/
|
|
74
|
-
|
|
75
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
89
|
+
startV1(taskGroupId, requestOptions) {
|
|
90
|
+
return core.HttpResponsePromise.fromPromise(this.__startV1(taskGroupId, requestOptions));
|
|
76
91
|
}
|
|
77
|
-
|
|
92
|
+
__startV1(taskGroupId, requestOptions) {
|
|
78
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79
94
|
var _a, _b, _c, _d;
|
|
80
95
|
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);
|
|
81
96
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
82
|
-
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_groups/
|
|
83
|
-
method: "
|
|
97
|
+
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_groups/start/v1/${encodeURIComponent(taskGroupId)}`),
|
|
98
|
+
method: "PUT",
|
|
84
99
|
headers: _headers,
|
|
85
100
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
86
101
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -110,7 +125,7 @@ class TaskGroups {
|
|
|
110
125
|
rawResponse: _response.rawResponse,
|
|
111
126
|
});
|
|
112
127
|
case "timeout":
|
|
113
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
128
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/task_groups/start/v1/{task_group_id}.");
|
|
114
129
|
case "unknown":
|
|
115
130
|
throw new errors.ChrtError({
|
|
116
131
|
message: _response.error.errorMessage,
|
|
@@ -120,28 +135,34 @@ class TaskGroups {
|
|
|
120
135
|
});
|
|
121
136
|
}
|
|
122
137
|
/**
|
|
123
|
-
*
|
|
138
|
+
* 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)
|
|
124
139
|
*
|
|
125
|
-
* @param {string}
|
|
140
|
+
* @param {string} taskGroupId
|
|
141
|
+
* @param {Chrt.SetTaskOrderingReq} request
|
|
126
142
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
143
|
*
|
|
128
144
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
129
145
|
*
|
|
130
146
|
* @example
|
|
131
|
-
* await client.taskGroups.
|
|
147
|
+
* await client.taskGroups.setTaskOrderingV1("task_group_id", {
|
|
148
|
+
* task_ids: ["task_ids"]
|
|
149
|
+
* })
|
|
132
150
|
*/
|
|
133
|
-
|
|
134
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
151
|
+
setTaskOrderingV1(taskGroupId, request, requestOptions) {
|
|
152
|
+
return core.HttpResponsePromise.fromPromise(this.__setTaskOrderingV1(taskGroupId, request, requestOptions));
|
|
135
153
|
}
|
|
136
|
-
|
|
154
|
+
__setTaskOrderingV1(taskGroupId, request, requestOptions) {
|
|
137
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
156
|
var _a, _b, _c, _d;
|
|
139
157
|
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
158
|
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/task_groups/
|
|
142
|
-
method: "
|
|
159
|
+
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_groups/set_task_ordering/v1/${encodeURIComponent(taskGroupId)}`),
|
|
160
|
+
method: "PUT",
|
|
143
161
|
headers: _headers,
|
|
162
|
+
contentType: "application/json",
|
|
144
163
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
164
|
+
requestType: "json",
|
|
165
|
+
body: request,
|
|
145
166
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
146
167
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
147
168
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -169,7 +190,7 @@ class TaskGroups {
|
|
|
169
190
|
rawResponse: _response.rawResponse,
|
|
170
191
|
});
|
|
171
192
|
case "timeout":
|
|
172
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
193
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/task_groups/set_task_ordering/v1/{task_group_id}.");
|
|
173
194
|
case "unknown":
|
|
174
195
|
throw new errors.ChrtError({
|
|
175
196
|
message: _response.error.errorMessage,
|
|
@@ -179,29 +200,29 @@ class TaskGroups {
|
|
|
179
200
|
});
|
|
180
201
|
}
|
|
181
202
|
/**
|
|
182
|
-
*
|
|
203
|
+
* 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)
|
|
183
204
|
*
|
|
184
205
|
* @param {string} taskGroupId
|
|
185
|
-
* @param {Chrt.
|
|
206
|
+
* @param {Chrt.SetFlightNumberReq} request
|
|
186
207
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
187
208
|
*
|
|
188
209
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
189
210
|
*
|
|
190
211
|
* @example
|
|
191
|
-
* await client.taskGroups.
|
|
192
|
-
*
|
|
212
|
+
* await client.taskGroups.setFlightNumberV1("task_group_id", {
|
|
213
|
+
* flight_number: "flight_number"
|
|
193
214
|
* })
|
|
194
215
|
*/
|
|
195
|
-
|
|
196
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
216
|
+
setFlightNumberV1(taskGroupId, request, requestOptions) {
|
|
217
|
+
return core.HttpResponsePromise.fromPromise(this.__setFlightNumberV1(taskGroupId, request, requestOptions));
|
|
197
218
|
}
|
|
198
|
-
|
|
219
|
+
__setFlightNumberV1(taskGroupId, request, requestOptions) {
|
|
199
220
|
return __awaiter(this, void 0, void 0, function* () {
|
|
200
221
|
var _a, _b, _c, _d;
|
|
201
222
|
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);
|
|
202
223
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
203
|
-
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_groups/
|
|
204
|
-
method: "
|
|
224
|
+
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_groups/set_flight_number/v1/${encodeURIComponent(taskGroupId)}`),
|
|
225
|
+
method: "PATCH",
|
|
205
226
|
headers: _headers,
|
|
206
227
|
contentType: "application/json",
|
|
207
228
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -234,7 +255,7 @@ class TaskGroups {
|
|
|
234
255
|
rawResponse: _response.rawResponse,
|
|
235
256
|
});
|
|
236
257
|
case "timeout":
|
|
237
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
258
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/task_groups/set_flight_number/v1/{task_group_id}.");
|
|
238
259
|
case "unknown":
|
|
239
260
|
throw new errors.ChrtError({
|
|
240
261
|
message: _response.error.errorMessage,
|
|
@@ -244,29 +265,29 @@ class TaskGroups {
|
|
|
244
265
|
});
|
|
245
266
|
}
|
|
246
267
|
/**
|
|
247
|
-
* Updates the
|
|
268
|
+
* Updates the driver assigned to a task group. | authz_personas=[courier_org_operators] | (UpdateDriverReq) -> (bool)
|
|
248
269
|
*
|
|
249
270
|
* @param {string} taskGroupId
|
|
250
|
-
* @param {Chrt.
|
|
271
|
+
* @param {Chrt.UpdateDriverReq} request
|
|
251
272
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
252
273
|
*
|
|
253
274
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
254
275
|
*
|
|
255
276
|
* @example
|
|
256
|
-
* await client.taskGroups.
|
|
257
|
-
*
|
|
277
|
+
* await client.taskGroups.updateDriverV1("task_group_id", {
|
|
278
|
+
* driver_id: "driver_id"
|
|
258
279
|
* })
|
|
259
280
|
*/
|
|
260
|
-
|
|
261
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
281
|
+
updateDriverV1(taskGroupId, request, requestOptions) {
|
|
282
|
+
return core.HttpResponsePromise.fromPromise(this.__updateDriverV1(taskGroupId, request, requestOptions));
|
|
262
283
|
}
|
|
263
|
-
|
|
284
|
+
__updateDriverV1(taskGroupId, request, requestOptions) {
|
|
264
285
|
return __awaiter(this, void 0, void 0, function* () {
|
|
265
286
|
var _a, _b, _c, _d;
|
|
266
287
|
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);
|
|
267
288
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
268
|
-
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_groups/
|
|
269
|
-
method: "
|
|
289
|
+
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_groups/update_driver/v1/${encodeURIComponent(taskGroupId)}`),
|
|
290
|
+
method: "PATCH",
|
|
270
291
|
headers: _headers,
|
|
271
292
|
contentType: "application/json",
|
|
272
293
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -299,7 +320,7 @@ class TaskGroups {
|
|
|
299
320
|
rawResponse: _response.rawResponse,
|
|
300
321
|
});
|
|
301
322
|
case "timeout":
|
|
302
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
323
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/task_groups/update_driver/v1/{task_group_id}.");
|
|
303
324
|
case "unknown":
|
|
304
325
|
throw new errors.ChrtError({
|
|
305
326
|
message: _response.error.errorMessage,
|
|
@@ -309,27 +330,88 @@ class TaskGroups {
|
|
|
309
330
|
});
|
|
310
331
|
}
|
|
311
332
|
/**
|
|
312
|
-
*
|
|
333
|
+
* Removes the driver from a task group (sets driver_id to null). | authz_personas=[courier_org_operators, courier_driver] | () -> (bool)
|
|
313
334
|
*
|
|
314
335
|
* @param {string} taskGroupId
|
|
315
|
-
* @param {Chrt.UpdateTaskGroupDriverReq} request
|
|
316
336
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
317
337
|
*
|
|
318
338
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
319
339
|
*
|
|
320
340
|
* @example
|
|
321
|
-
* await client.taskGroups.
|
|
341
|
+
* await client.taskGroups.removeDriverV1("task_group_id")
|
|
322
342
|
*/
|
|
323
|
-
|
|
324
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
343
|
+
removeDriverV1(taskGroupId, requestOptions) {
|
|
344
|
+
return core.HttpResponsePromise.fromPromise(this.__removeDriverV1(taskGroupId, requestOptions));
|
|
325
345
|
}
|
|
326
|
-
|
|
327
|
-
return __awaiter(this,
|
|
346
|
+
__removeDriverV1(taskGroupId, requestOptions) {
|
|
347
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
328
348
|
var _a, _b, _c, _d;
|
|
329
349
|
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);
|
|
330
350
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
331
|
-
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_groups/
|
|
332
|
-
method: "
|
|
351
|
+
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_groups/remove_driver/v1/${encodeURIComponent(taskGroupId)}`),
|
|
352
|
+
method: "PATCH",
|
|
353
|
+
headers: _headers,
|
|
354
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
355
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
356
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
357
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
358
|
+
});
|
|
359
|
+
if (_response.ok) {
|
|
360
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
361
|
+
}
|
|
362
|
+
if (_response.error.reason === "status-code") {
|
|
363
|
+
switch (_response.error.statusCode) {
|
|
364
|
+
case 422:
|
|
365
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
366
|
+
default:
|
|
367
|
+
throw new errors.ChrtError({
|
|
368
|
+
statusCode: _response.error.statusCode,
|
|
369
|
+
body: _response.error.body,
|
|
370
|
+
rawResponse: _response.rawResponse,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
switch (_response.error.reason) {
|
|
375
|
+
case "non-json":
|
|
376
|
+
throw new errors.ChrtError({
|
|
377
|
+
statusCode: _response.error.statusCode,
|
|
378
|
+
body: _response.error.rawBody,
|
|
379
|
+
rawResponse: _response.rawResponse,
|
|
380
|
+
});
|
|
381
|
+
case "timeout":
|
|
382
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/task_groups/remove_driver/v1/{task_group_id}.");
|
|
383
|
+
case "unknown":
|
|
384
|
+
throw new errors.ChrtError({
|
|
385
|
+
message: _response.error.errorMessage,
|
|
386
|
+
rawResponse: _response.rawResponse,
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Updates the courier organization assigned to a task group. | authz_personas=[forwarder_org_operators] | (UpdateCourierOrgReq) -> (bool)
|
|
393
|
+
*
|
|
394
|
+
* @param {string} taskGroupId
|
|
395
|
+
* @param {Chrt.UpdateCourierOrgReq} request
|
|
396
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
397
|
+
*
|
|
398
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* await client.taskGroups.updateCourierOrgV1("task_group_id", {
|
|
402
|
+
* courier_org_id: "courier_org_id"
|
|
403
|
+
* })
|
|
404
|
+
*/
|
|
405
|
+
updateCourierOrgV1(taskGroupId, request, requestOptions) {
|
|
406
|
+
return core.HttpResponsePromise.fromPromise(this.__updateCourierOrgV1(taskGroupId, request, requestOptions));
|
|
407
|
+
}
|
|
408
|
+
__updateCourierOrgV1(taskGroupId, request, requestOptions) {
|
|
409
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
410
|
+
var _a, _b, _c, _d;
|
|
411
|
+
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);
|
|
412
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
413
|
+
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_groups/update_courier_org/v1/${encodeURIComponent(taskGroupId)}`),
|
|
414
|
+
method: "PATCH",
|
|
333
415
|
headers: _headers,
|
|
334
416
|
contentType: "application/json",
|
|
335
417
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -362,7 +444,7 @@ class TaskGroups {
|
|
|
362
444
|
rawResponse: _response.rawResponse,
|
|
363
445
|
});
|
|
364
446
|
case "timeout":
|
|
365
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
447
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/task_groups/update_courier_org/v1/{task_group_id}.");
|
|
366
448
|
case "unknown":
|
|
367
449
|
throw new errors.ChrtError({
|
|
368
450
|
message: _response.error.errorMessage,
|
|
@@ -372,26 +454,28 @@ class TaskGroups {
|
|
|
372
454
|
});
|
|
373
455
|
}
|
|
374
456
|
/**
|
|
375
|
-
*
|
|
457
|
+
* 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)
|
|
376
458
|
*
|
|
377
459
|
* @param {string} taskGroupId
|
|
378
|
-
* @param {Chrt.
|
|
460
|
+
* @param {Chrt.AddMessageReq} request
|
|
379
461
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
380
462
|
*
|
|
381
463
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
382
464
|
*
|
|
383
465
|
* @example
|
|
384
|
-
* await client.taskGroups.
|
|
466
|
+
* await client.taskGroups.addMessageV1("task_group_id", {
|
|
467
|
+
* message: "message"
|
|
468
|
+
* })
|
|
385
469
|
*/
|
|
386
|
-
|
|
387
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
470
|
+
addMessageV1(taskGroupId, request, requestOptions) {
|
|
471
|
+
return core.HttpResponsePromise.fromPromise(this.__addMessageV1(taskGroupId, request, requestOptions));
|
|
388
472
|
}
|
|
389
|
-
|
|
390
|
-
return __awaiter(this,
|
|
473
|
+
__addMessageV1(taskGroupId, request, requestOptions) {
|
|
474
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
391
475
|
var _a, _b, _c, _d;
|
|
392
476
|
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);
|
|
393
477
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
394
|
-
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_groups/
|
|
478
|
+
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_groups/add_message/v1/${encodeURIComponent(taskGroupId)}`),
|
|
395
479
|
method: "POST",
|
|
396
480
|
headers: _headers,
|
|
397
481
|
contentType: "application/json",
|
|
@@ -425,7 +509,7 @@ class TaskGroups {
|
|
|
425
509
|
rawResponse: _response.rawResponse,
|
|
426
510
|
});
|
|
427
511
|
case "timeout":
|
|
428
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/
|
|
512
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/add_message/v1/{task_group_id}.");
|
|
429
513
|
case "unknown":
|
|
430
514
|
throw new errors.ChrtError({
|
|
431
515
|
message: _response.error.errorMessage,
|
|
@@ -435,26 +519,95 @@ class TaskGroups {
|
|
|
435
519
|
});
|
|
436
520
|
}
|
|
437
521
|
/**
|
|
438
|
-
*
|
|
522
|
+
* Uploads an image file to a task group with automatic blurhash generation. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators, shipper_org_operators] | (UploadFile) -> (bool)
|
|
439
523
|
*
|
|
440
524
|
* @param {string} taskGroupId
|
|
525
|
+
* @param {Chrt.BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost} request
|
|
441
526
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
442
527
|
*
|
|
443
528
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
444
529
|
*
|
|
445
530
|
* @example
|
|
446
|
-
*
|
|
531
|
+
* import { createReadStream } from "fs";
|
|
532
|
+
* await client.taskGroups.addS3ObjectV1("task_group_id", {
|
|
533
|
+
* image: fs.createReadStream("/path/to/your/file")
|
|
534
|
+
* })
|
|
447
535
|
*/
|
|
448
|
-
|
|
449
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
536
|
+
addS3ObjectV1(taskGroupId, request, requestOptions) {
|
|
537
|
+
return core.HttpResponsePromise.fromPromise(this.__addS3ObjectV1(taskGroupId, request, requestOptions));
|
|
450
538
|
}
|
|
451
|
-
|
|
539
|
+
__addS3ObjectV1(taskGroupId, request, requestOptions) {
|
|
540
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
541
|
+
var _a, _b, _c, _d;
|
|
542
|
+
const _request = yield core.newFormData();
|
|
543
|
+
yield _request.appendFile("image", request.image);
|
|
544
|
+
const _maybeEncodedRequest = yield _request.getRequest();
|
|
545
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ Authorization: yield this._getAuthorizationHeader() }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
546
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
547
|
+
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_groups/add_s3_object/v1/${encodeURIComponent(taskGroupId)}`),
|
|
548
|
+
method: "POST",
|
|
549
|
+
headers: _headers,
|
|
550
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
551
|
+
requestType: "file",
|
|
552
|
+
duplex: _maybeEncodedRequest.duplex,
|
|
553
|
+
body: _maybeEncodedRequest.body,
|
|
554
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
555
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
556
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
557
|
+
});
|
|
558
|
+
if (_response.ok) {
|
|
559
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
560
|
+
}
|
|
561
|
+
if (_response.error.reason === "status-code") {
|
|
562
|
+
switch (_response.error.statusCode) {
|
|
563
|
+
case 422:
|
|
564
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
565
|
+
default:
|
|
566
|
+
throw new errors.ChrtError({
|
|
567
|
+
statusCode: _response.error.statusCode,
|
|
568
|
+
body: _response.error.body,
|
|
569
|
+
rawResponse: _response.rawResponse,
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
switch (_response.error.reason) {
|
|
574
|
+
case "non-json":
|
|
575
|
+
throw new errors.ChrtError({
|
|
576
|
+
statusCode: _response.error.statusCode,
|
|
577
|
+
body: _response.error.rawBody,
|
|
578
|
+
rawResponse: _response.rawResponse,
|
|
579
|
+
});
|
|
580
|
+
case "timeout":
|
|
581
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/add_s3_object/v1/{task_group_id}.");
|
|
582
|
+
case "unknown":
|
|
583
|
+
throw new errors.ChrtError({
|
|
584
|
+
message: _response.error.errorMessage,
|
|
585
|
+
rawResponse: _response.rawResponse,
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Deletes an S3 object metadata and the associated S3 object from a task group. Only the uploader or an operator from the uploading org can delete. | () -> (bool)
|
|
592
|
+
*
|
|
593
|
+
* @param {string} taskGroupS3ObjectMetadataId
|
|
594
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
595
|
+
*
|
|
596
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
597
|
+
*
|
|
598
|
+
* @example
|
|
599
|
+
* await client.taskGroups.deleteS3ObjectV1("task_group_s3_object_metadata_id")
|
|
600
|
+
*/
|
|
601
|
+
deleteS3ObjectV1(taskGroupS3ObjectMetadataId, requestOptions) {
|
|
602
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteS3ObjectV1(taskGroupS3ObjectMetadataId, requestOptions));
|
|
603
|
+
}
|
|
604
|
+
__deleteS3ObjectV1(taskGroupS3ObjectMetadataId, requestOptions) {
|
|
452
605
|
return __awaiter(this, void 0, void 0, function* () {
|
|
453
606
|
var _a, _b, _c, _d;
|
|
454
607
|
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);
|
|
455
608
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
456
|
-
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_groups/
|
|
457
|
-
method: "
|
|
609
|
+
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_groups/delete_s3_object/v1/${encodeURIComponent(taskGroupS3ObjectMetadataId)}`),
|
|
610
|
+
method: "DELETE",
|
|
458
611
|
headers: _headers,
|
|
459
612
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
460
613
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -484,7 +637,7 @@ class TaskGroups {
|
|
|
484
637
|
rawResponse: _response.rawResponse,
|
|
485
638
|
});
|
|
486
639
|
case "timeout":
|
|
487
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
640
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /oort/task_groups/delete_s3_object/v1/{task_group_s3_object_metadata_id}.");
|
|
488
641
|
case "unknown":
|
|
489
642
|
throw new errors.ChrtError({
|
|
490
643
|
message: _response.error.errorMessage,
|
|
@@ -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.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* image: fs.createReadStream("/path/to/your/file")
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost {
|
|
12
|
+
image: core.file.Uploadable.FileLike;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* courier_org_id: "courier_org_id"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface UpdateCourierOrgReq {
|
|
11
|
+
/** ID of the courier organization to assign to the task group */
|
|
12
|
+
courier_org_id: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* driver_id: "driver_id"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface UpdateDriverReq {
|
|
11
|
+
/** ID of the driver to assign to the task group */
|
|
12
|
+
driver_id: string;
|
|
13
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { type SetTaskOrderingReq } from "./SetTaskOrderingReq.js";
|
|
2
2
|
export { type SetFlightNumberReq } from "./SetFlightNumberReq.js";
|
|
3
|
-
export { type
|
|
4
|
-
export { type
|
|
3
|
+
export { type UpdateDriverReq } from "./UpdateDriverReq.js";
|
|
4
|
+
export { type UpdateCourierOrgReq } from "./UpdateCourierOrgReq.js";
|
|
5
|
+
export { type AddMessageReq } from "./AddMessageReq.js";
|
|
6
|
+
export { type BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost } from "./BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.js";
|
|
@@ -108,6 +108,8 @@ export declare class Expanded {
|
|
|
108
108
|
* filter_in_progress_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
109
109
|
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
110
110
|
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
111
|
+
* filter_skipped_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
112
|
+
* filter_skipped_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
111
113
|
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
112
114
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
113
115
|
* body: {}
|
|
@@ -137,6 +139,8 @@ export declare class Expanded {
|
|
|
137
139
|
* filter_in_progress_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
138
140
|
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
139
141
|
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
142
|
+
* filter_skipped_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
143
|
+
* filter_skipped_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
140
144
|
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
141
145
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
142
146
|
* body: {}
|