@chrt-inc/typescript-sdk 1.319.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 -0
- package/dist/cjs/Client.js +38 -28
- package/dist/cjs/api/resources/cargos/client/Client.d.ts +48 -0
- package/dist/cjs/api/resources/cargos/client/Client.js +131 -0
- package/dist/cjs/api/resources/connections/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/connections/client/Client.js +4 -4
- package/dist/cjs/api/resources/courierPayDriverPayouts/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverPayouts/client/Client.js +2 -2
- package/dist/cjs/api/resources/courierPayDriverRateSheets/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/courierPayDriverRateSheets/client/Client.js +3 -3
- package/dist/cjs/api/resources/courierPayDriverStatements/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverStatements/client/Client.js +2 -2
- package/dist/cjs/api/resources/dev/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/dev/client/Client.js +4 -4
- package/dist/cjs/api/resources/drivers/client/Client.d.ts +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 +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.js +2 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.js +2 -2
- package/dist/cjs/api/resources/offChrtShipperOrg/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/offChrtShipperOrg/client/Client.js +3 -3
- package/dist/cjs/api/resources/orders/client/Client.d.ts +13 -0
- package/dist/cjs/api/resources/orders/client/Client.js +59 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/courier/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/courier/client/Client.js +1 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/Client.js +1 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/Client.js +1 -1
- package/dist/cjs/api/resources/orgProfiles/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/orgProfiles/client/Client.js +1 -1
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/orgs/client/Client.js +5 -5
- package/dist/cjs/api/resources/shipperContactInfo/client/Client.d.ts +36 -23
- package/dist/cjs/api/resources/shipperContactInfo/client/Client.js +94 -35
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/client/Client.js +2 -2
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.js +3 -3
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.js +2 -2
- package/dist/cjs/api/resources/taskArtifacts/client/Client.d.ts +37 -24
- package/dist/cjs/api/resources/taskArtifacts/client/Client.js +96 -40
- 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 -2
- package/dist/cjs/api/resources/taskArtifacts/resources/index.d.ts +2 -3
- package/dist/cjs/api/resources/taskArtifacts/resources/index.js +3 -7
- 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/taskArtifacts/resources/s3ObjectMetadata/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/index.js +17 -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/{taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.d.ts → taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.d.ts} +2 -2
- 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/UpdateDriverReq.d.ts +13 -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/taskGroups/resources/s3Object/client/Client.d.ts +46 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/Client.js +127 -0
- 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.d.ts +1 -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/{taskArtifacts/resources/images → taskGroups/resources/taskGroupId}/client/Client.js +24 -87
- package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/index.d.ts +1 -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/requests/AddTaskToGroupReq.d.ts +21 -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/resources/tracking/resources/devices/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +3 -3
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +3 -3
- package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/Client.js +1 -1
- package/dist/cjs/api/types/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 +3 -3
- package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.js +2 -2
- 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/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +6 -0
- package/dist/esm/Client.mjs +12 -2
- package/dist/esm/api/resources/cargos/client/Client.d.mts +48 -0
- package/dist/esm/api/resources/cargos/client/Client.mjs +94 -0
- package/dist/esm/api/resources/cargos/client/index.d.mts +1 -0
- package/dist/esm/api/resources/cargos/client/index.mjs +1 -0
- package/dist/esm/api/resources/connections/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/connections/client/Client.mjs +4 -4
- package/dist/esm/api/resources/courierPayDriverPayouts/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverPayouts/client/Client.mjs +2 -2
- package/dist/esm/api/resources/courierPayDriverRateSheets/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/courierPayDriverRateSheets/client/Client.mjs +3 -3
- package/dist/esm/api/resources/courierPayDriverStatements/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverStatements/client/Client.mjs +2 -2
- package/dist/esm/api/resources/dev/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/dev/client/Client.mjs +4 -4
- package/dist/esm/api/resources/drivers/client/Client.d.mts +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 +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +2 -2
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.mjs +2 -2
- package/dist/esm/api/resources/offChrtShipperOrg/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/offChrtShipperOrg/client/Client.mjs +3 -3
- package/dist/esm/api/resources/orders/client/Client.d.mts +13 -0
- package/dist/esm/api/resources/orders/client/Client.mjs +59 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/courier/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/orgInfoForConnections/resources/courier/client/Client.mjs +1 -1
- package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/Client.mjs +1 -1
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/Client.mjs +1 -1
- package/dist/esm/api/resources/orgProfiles/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/orgProfiles/client/Client.mjs +1 -1
- package/dist/esm/api/resources/orgs/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/orgs/client/Client.mjs +5 -5
- package/dist/esm/api/resources/shipperContactInfo/client/Client.d.mts +36 -23
- package/dist/esm/api/resources/shipperContactInfo/client/Client.mjs +94 -35
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/client/Client.mjs +2 -2
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.mjs +3 -3
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.mjs +2 -2
- package/dist/esm/api/resources/taskArtifacts/client/Client.d.mts +37 -24
- package/dist/esm/api/resources/taskArtifacts/client/Client.mjs +96 -40
- 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 -2
- package/dist/esm/api/resources/taskArtifacts/resources/index.d.mts +2 -3
- package/dist/esm/api/resources/taskArtifacts/resources/index.mjs +2 -3
- 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/taskArtifacts/resources/s3ObjectMetadata/index.d.mts +1 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/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/{taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.d.mts → taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.d.mts} +2 -2
- 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/UpdateDriverReq.d.mts +13 -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/taskGroups/resources/s3Object/client/Client.d.mts +46 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/Client.mjs +90 -0
- 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/{taskArtifacts/resources/images → taskGroups/resources/taskGroupId}/client/Client.mjs +22 -85
- 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/requests/AddTaskToGroupReq.d.mts +21 -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/resources/tracking/resources/devices/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +3 -3
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +3 -3
- package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/users/client/Client.mjs +1 -1
- package/dist/esm/api/types/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 +3 -3
- package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.mjs +2 -2
- 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/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1163 -267
- 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/client/requests/TaskArtifactAddToTaskReq.d.ts +0 -19
- package/dist/cjs/api/resources/taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.d.ts +0 -14
- package/dist/cjs/api/resources/taskArtifacts/resources/images/client/Client.d.ts +0 -70
- package/dist/cjs/api/resources/taskArtifacts/resources/images/client/requests/index.d.ts +0 -1
- 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/client/requests/TaskArtifactAddToTaskReq.d.mts +0 -19
- package/dist/esm/api/resources/taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.d.mts +0 -14
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/Client.d.mts +0 -70
- package/dist/esm/api/resources/taskArtifacts/resources/images/client/requests/index.d.mts +0 -1
- 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/{taskArtifacts/resources/blurhash → cargos}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/resources/blurhash → cargos}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/resources/blurhash → cargos}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/resources/blurhash → cargos}/index.js +0 -0
- /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/{esm/api/resources/taskArtifacts/resources/blurhash/client/index.d.mts → cjs/api/resources/taskArtifacts/resources/s3Object/client/index.d.ts} +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{images/client/requests → s3Object/client}/index.js +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3Object}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3Object}/index.js +0 -0
- /package/dist/{esm/api/resources/taskArtifacts/resources/blurhash/client/index.mjs → cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.d.ts} +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/client/requests/TaskArtifactAddToTaskReq.js → taskGroups/client/requests/AddMessageReq.js} +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.js → taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.js} +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.js → taskGroups/client/requests/UpdateCourierOrgReq.js} +0 -0
- /package/dist/cjs/api/resources/taskGroups/client/requests/{UpdateTaskGroupCourierOrgReq.js → UpdateDriverReq.js} +0 -0
- /package/dist/{esm/api/resources/taskArtifacts/resources/images/client/requests/index.mjs → cjs/api/resources/taskGroups/resources/s3Object/client/index.d.ts} +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/resources/images → tasks}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{taskArtifacts/resources/images → tasks}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{taskGroups/client/requests/UpdateTaskGroupDriverReq.js → tasks/client/requests/AddTaskToGroupReq.js} +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/resources/blurhash → cargos}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/resources/blurhash → cargos}/index.mjs +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 → s3Object}/index.d.mts +0 -0
- /package/dist/esm/api/resources/taskArtifacts/resources/{images → s3Object}/index.mjs +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/client/requests/TaskArtifactAddToTaskReq.mjs → taskGroups/client/requests/AddMessageReq.mjs} +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.mjs → taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.mjs} +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.mjs → taskGroups/client/requests/UpdateCourierOrgReq.mjs} +0 -0
- /package/dist/esm/api/resources/taskGroups/client/requests/{UpdateTaskGroupCourierOrgReq.mjs → UpdateDriverReq.mjs} +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/resources/images → tasks}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{taskArtifacts/resources/images → tasks}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{taskGroups/client/requests/UpdateTaskGroupDriverReq.mjs → tasks/client/requests/AddTaskToGroupReq.mjs} +0 -0
|
@@ -56,22 +56,22 @@ class Drivers {
|
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Retrieves driver information for the caller within their organization. | () -> (Driver1)
|
|
60
60
|
*
|
|
61
61
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
|
-
* await client.drivers.
|
|
64
|
+
* await client.drivers.getForCallerV1()
|
|
65
65
|
*/
|
|
66
|
-
|
|
67
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
66
|
+
getForCallerV1(requestOptions) {
|
|
67
|
+
return core.HttpResponsePromise.fromPromise(this.__getForCallerV1(requestOptions));
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
__getForCallerV1(requestOptions) {
|
|
70
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
71
|
var _a, _b, _c, _d;
|
|
72
72
|
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);
|
|
73
73
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
74
|
-
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/drivers/
|
|
74
|
+
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/drivers/for_caller/v1"),
|
|
75
75
|
method: "GET",
|
|
76
76
|
headers: _headers,
|
|
77
77
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -97,7 +97,7 @@ class Drivers {
|
|
|
97
97
|
rawResponse: _response.rawResponse,
|
|
98
98
|
});
|
|
99
99
|
case "timeout":
|
|
100
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/
|
|
100
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/for_caller/v1.");
|
|
101
101
|
case "unknown":
|
|
102
102
|
throw new errors.ChrtError({
|
|
103
103
|
message: _response.error.errorMessage,
|
|
@@ -107,22 +107,25 @@ class Drivers {
|
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* Retrieves detailed driver information by driver ID within the organization. | () -> (Driver1)
|
|
111
111
|
*
|
|
112
|
+
* @param {string} driverId
|
|
112
113
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
113
114
|
*
|
|
115
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
116
|
+
*
|
|
114
117
|
* @example
|
|
115
|
-
* await client.drivers.
|
|
118
|
+
* await client.drivers.getByDriverIdV1("driver_id")
|
|
116
119
|
*/
|
|
117
|
-
|
|
118
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
120
|
+
getByDriverIdV1(driverId, requestOptions) {
|
|
121
|
+
return core.HttpResponsePromise.fromPromise(this.__getByDriverIdV1(driverId, requestOptions));
|
|
119
122
|
}
|
|
120
|
-
|
|
123
|
+
__getByDriverIdV1(driverId, requestOptions) {
|
|
121
124
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
125
|
var _a, _b, _c, _d;
|
|
123
126
|
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);
|
|
124
127
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
125
|
-
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,
|
|
128
|
+
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/drivers/v1/${encodeURIComponent(driverId)}`),
|
|
126
129
|
method: "GET",
|
|
127
130
|
headers: _headers,
|
|
128
131
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -134,11 +137,16 @@ class Drivers {
|
|
|
134
137
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
135
138
|
}
|
|
136
139
|
if (_response.error.reason === "status-code") {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
switch (_response.error.statusCode) {
|
|
141
|
+
case 422:
|
|
142
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
143
|
+
default:
|
|
144
|
+
throw new errors.ChrtError({
|
|
145
|
+
statusCode: _response.error.statusCode,
|
|
146
|
+
body: _response.error.body,
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
142
150
|
}
|
|
143
151
|
switch (_response.error.reason) {
|
|
144
152
|
case "non-json":
|
|
@@ -148,7 +156,7 @@ class Drivers {
|
|
|
148
156
|
rawResponse: _response.rawResponse,
|
|
149
157
|
});
|
|
150
158
|
case "timeout":
|
|
151
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/
|
|
159
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/v1/{driver_id}.");
|
|
152
160
|
case "unknown":
|
|
153
161
|
throw new errors.ChrtError({
|
|
154
162
|
message: _response.error.errorMessage,
|
|
@@ -158,36 +166,25 @@ class Drivers {
|
|
|
158
166
|
});
|
|
159
167
|
}
|
|
160
168
|
/**
|
|
161
|
-
*
|
|
169
|
+
* Lists all organization members paired with their driver information if they are drivers. | () -> (list[OrgMembersAndDrivers])
|
|
162
170
|
*
|
|
163
|
-
* @param {Chrt.DriverCreateReq} request
|
|
164
171
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
165
172
|
*
|
|
166
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
167
|
-
*
|
|
168
173
|
* @example
|
|
169
|
-
* await client.drivers.
|
|
170
|
-
* org_member: {
|
|
171
|
-
* role: "owner",
|
|
172
|
-
* user_id: "user_id"
|
|
173
|
-
* }
|
|
174
|
-
* })
|
|
174
|
+
* await client.drivers.listOrgMembersAndDriversV1()
|
|
175
175
|
*/
|
|
176
|
-
|
|
177
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
176
|
+
listOrgMembersAndDriversV1(requestOptions) {
|
|
177
|
+
return core.HttpResponsePromise.fromPromise(this.__listOrgMembersAndDriversV1(requestOptions));
|
|
178
178
|
}
|
|
179
|
-
|
|
179
|
+
__listOrgMembersAndDriversV1(requestOptions) {
|
|
180
180
|
return __awaiter(this, void 0, void 0, function* () {
|
|
181
181
|
var _a, _b, _c, _d;
|
|
182
182
|
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);
|
|
183
183
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
184
|
-
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/drivers/
|
|
185
|
-
method: "
|
|
184
|
+
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/drivers/org_members_and_drivers/list/v1"),
|
|
185
|
+
method: "GET",
|
|
186
186
|
headers: _headers,
|
|
187
|
-
contentType: "application/json",
|
|
188
187
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
189
|
-
requestType: "json",
|
|
190
|
-
body: request,
|
|
191
188
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
192
189
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
193
190
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -196,16 +193,11 @@ class Drivers {
|
|
|
196
193
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
197
194
|
}
|
|
198
195
|
if (_response.error.reason === "status-code") {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
statusCode: _response.error.statusCode,
|
|
205
|
-
body: _response.error.body,
|
|
206
|
-
rawResponse: _response.rawResponse,
|
|
207
|
-
});
|
|
208
|
-
}
|
|
196
|
+
throw new errors.ChrtError({
|
|
197
|
+
statusCode: _response.error.statusCode,
|
|
198
|
+
body: _response.error.body,
|
|
199
|
+
rawResponse: _response.rawResponse,
|
|
200
|
+
});
|
|
209
201
|
}
|
|
210
202
|
switch (_response.error.reason) {
|
|
211
203
|
case "non-json":
|
|
@@ -215,7 +207,7 @@ class Drivers {
|
|
|
215
207
|
rawResponse: _response.rawResponse,
|
|
216
208
|
});
|
|
217
209
|
case "timeout":
|
|
218
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
210
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/org_members_and_drivers/list/v1.");
|
|
219
211
|
case "unknown":
|
|
220
212
|
throw new errors.ChrtError({
|
|
221
213
|
message: _response.error.errorMessage,
|
|
@@ -225,22 +217,22 @@ class Drivers {
|
|
|
225
217
|
});
|
|
226
218
|
}
|
|
227
219
|
/**
|
|
228
|
-
*
|
|
220
|
+
* Lists all drivers belonging to the caller's organization. | () -> (list[Driver1])
|
|
229
221
|
*
|
|
230
222
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
231
223
|
*
|
|
232
224
|
* @example
|
|
233
|
-
* await client.drivers.
|
|
225
|
+
* await client.drivers.listV1()
|
|
234
226
|
*/
|
|
235
|
-
|
|
236
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
227
|
+
listV1(requestOptions) {
|
|
228
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(requestOptions));
|
|
237
229
|
}
|
|
238
|
-
|
|
230
|
+
__listV1(requestOptions) {
|
|
239
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
240
232
|
var _a, _b, _c, _d;
|
|
241
233
|
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);
|
|
242
234
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
243
|
-
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/drivers/
|
|
235
|
+
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/drivers/list/v1"),
|
|
244
236
|
method: "GET",
|
|
245
237
|
headers: _headers,
|
|
246
238
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -266,7 +258,7 @@ class Drivers {
|
|
|
266
258
|
rawResponse: _response.rawResponse,
|
|
267
259
|
});
|
|
268
260
|
case "timeout":
|
|
269
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/
|
|
261
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/list/v1.");
|
|
270
262
|
case "unknown":
|
|
271
263
|
throw new errors.ChrtError({
|
|
272
264
|
message: _response.error.errorMessage,
|
|
@@ -276,28 +268,33 @@ class Drivers {
|
|
|
276
268
|
});
|
|
277
269
|
}
|
|
278
270
|
/**
|
|
279
|
-
*
|
|
271
|
+
* Creates a new driver profile for the caller. Returns existing driver ID if one already exists. Courier orgs only, min role: operator. | (DriverClientCreate1) -> (PydanticObjectId)
|
|
280
272
|
*
|
|
281
|
-
* @param {
|
|
273
|
+
* @param {Chrt.DriverClientCreate1} request
|
|
282
274
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
283
275
|
*
|
|
284
276
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
285
277
|
*
|
|
286
278
|
* @example
|
|
287
|
-
* await client.drivers.
|
|
279
|
+
* await client.drivers.createV1({
|
|
280
|
+
* schema_version: 1
|
|
281
|
+
* })
|
|
288
282
|
*/
|
|
289
|
-
|
|
290
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
283
|
+
createV1(request, requestOptions) {
|
|
284
|
+
return core.HttpResponsePromise.fromPromise(this.__createV1(request, requestOptions));
|
|
291
285
|
}
|
|
292
|
-
|
|
286
|
+
__createV1(request, requestOptions) {
|
|
293
287
|
return __awaiter(this, void 0, void 0, function* () {
|
|
294
288
|
var _a, _b, _c, _d;
|
|
295
289
|
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);
|
|
296
290
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
297
|
-
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,
|
|
298
|
-
method: "
|
|
291
|
+
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/drivers/create/v1"),
|
|
292
|
+
method: "POST",
|
|
299
293
|
headers: _headers,
|
|
294
|
+
contentType: "application/json",
|
|
300
295
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
296
|
+
requestType: "json",
|
|
297
|
+
body: request,
|
|
301
298
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
302
299
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
303
300
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -325,7 +322,7 @@ class Drivers {
|
|
|
325
322
|
rawResponse: _response.rawResponse,
|
|
326
323
|
});
|
|
327
324
|
case "timeout":
|
|
328
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
325
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/create/v1.");
|
|
329
326
|
case "unknown":
|
|
330
327
|
throw new errors.ChrtError({
|
|
331
328
|
message: _response.error.errorMessage,
|
|
@@ -335,28 +332,32 @@ class Drivers {
|
|
|
335
332
|
});
|
|
336
333
|
}
|
|
337
334
|
/**
|
|
338
|
-
*
|
|
335
|
+
* Updates driver contact details and vehicle type assignments. Courier orgs only; caller must be the driver (self) or an operator+. | (DriverClientUpdate1) -> (bool)
|
|
339
336
|
*
|
|
340
337
|
* @param {string} driverId
|
|
338
|
+
* @param {Chrt.DriverClientUpdate1} request
|
|
341
339
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
342
340
|
*
|
|
343
341
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
344
342
|
*
|
|
345
343
|
* @example
|
|
346
|
-
* await client.drivers.
|
|
344
|
+
* await client.drivers.updateV1("driver_id")
|
|
347
345
|
*/
|
|
348
|
-
|
|
349
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
346
|
+
updateV1(driverId, request = {}, requestOptions) {
|
|
347
|
+
return core.HttpResponsePromise.fromPromise(this.__updateV1(driverId, request, requestOptions));
|
|
350
348
|
}
|
|
351
|
-
|
|
352
|
-
return __awaiter(this,
|
|
349
|
+
__updateV1(driverId_1) {
|
|
350
|
+
return __awaiter(this, arguments, void 0, function* (driverId, request = {}, requestOptions) {
|
|
353
351
|
var _a, _b, _c, _d;
|
|
354
352
|
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);
|
|
355
353
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
356
|
-
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/drivers/v1/${encodeURIComponent(driverId)}`),
|
|
357
|
-
method: "
|
|
354
|
+
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/drivers/update/v1/${encodeURIComponent(driverId)}`),
|
|
355
|
+
method: "PATCH",
|
|
358
356
|
headers: _headers,
|
|
357
|
+
contentType: "application/json",
|
|
359
358
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
359
|
+
requestType: "json",
|
|
360
|
+
body: request,
|
|
360
361
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
361
362
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
362
363
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -384,7 +385,7 @@ class Drivers {
|
|
|
384
385
|
rawResponse: _response.rawResponse,
|
|
385
386
|
});
|
|
386
387
|
case "timeout":
|
|
387
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
388
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/update/v1/{driver_id}.");
|
|
388
389
|
case "unknown":
|
|
389
390
|
throw new errors.ChrtError({
|
|
390
391
|
message: _response.error.errorMessage,
|
|
@@ -394,28 +395,36 @@ class Drivers {
|
|
|
394
395
|
});
|
|
395
396
|
}
|
|
396
397
|
/**
|
|
397
|
-
*
|
|
398
|
+
* Updates the caller's driver last known location and timestamp for tracking. Only updates if timestamp is newer than existing (DB-side validation). Returns False if driver not found or timestamp is stale. | (DriverLastSeenReq) -> (bool)
|
|
398
399
|
*
|
|
399
|
-
* @param {Chrt.
|
|
400
|
+
* @param {Chrt.DriverLastSeenReq} request
|
|
400
401
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
401
402
|
*
|
|
402
403
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
403
404
|
*
|
|
404
405
|
* @example
|
|
405
|
-
* await client.drivers.
|
|
406
|
-
*
|
|
407
|
-
*
|
|
406
|
+
* await client.drivers.updateLastSeenV1({
|
|
407
|
+
* location: {
|
|
408
|
+
* type: "Feature",
|
|
409
|
+
* geometry: {
|
|
410
|
+
* type: "GeometryCollection",
|
|
411
|
+
* geometries: [{
|
|
412
|
+
* type: "LineString",
|
|
413
|
+
* coordinates: [[]]
|
|
414
|
+
* }]
|
|
415
|
+
* }
|
|
416
|
+
* }
|
|
408
417
|
* })
|
|
409
418
|
*/
|
|
410
|
-
|
|
411
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
419
|
+
updateLastSeenV1(request, requestOptions) {
|
|
420
|
+
return core.HttpResponsePromise.fromPromise(this.__updateLastSeenV1(request, requestOptions));
|
|
412
421
|
}
|
|
413
|
-
|
|
422
|
+
__updateLastSeenV1(request, requestOptions) {
|
|
414
423
|
return __awaiter(this, void 0, void 0, function* () {
|
|
415
424
|
var _a, _b, _c, _d;
|
|
416
425
|
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);
|
|
417
426
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
418
|
-
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/drivers/
|
|
427
|
+
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/drivers/last_seen/update/v1"),
|
|
419
428
|
method: "POST",
|
|
420
429
|
headers: _headers,
|
|
421
430
|
contentType: "application/json",
|
|
@@ -449,7 +458,7 @@ class Drivers {
|
|
|
449
458
|
rawResponse: _response.rawResponse,
|
|
450
459
|
});
|
|
451
460
|
case "timeout":
|
|
452
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/
|
|
461
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/update/v1.");
|
|
453
462
|
case "unknown":
|
|
454
463
|
throw new errors.ChrtError({
|
|
455
464
|
message: _response.error.errorMessage,
|
|
@@ -459,42 +468,25 @@ class Drivers {
|
|
|
459
468
|
});
|
|
460
469
|
}
|
|
461
470
|
/**
|
|
462
|
-
*
|
|
471
|
+
* Clears the driver's last known location and timestamp. | () -> (bool)
|
|
463
472
|
*
|
|
464
|
-
* @param {Chrt.DriverLastSeenReq} request
|
|
465
473
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
466
474
|
*
|
|
467
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
468
|
-
*
|
|
469
475
|
* @example
|
|
470
|
-
* await client.drivers.
|
|
471
|
-
* location: {
|
|
472
|
-
* type: "Feature",
|
|
473
|
-
* geometry: {
|
|
474
|
-
* type: "GeometryCollection",
|
|
475
|
-
* geometries: [{
|
|
476
|
-
* type: "LineString",
|
|
477
|
-
* coordinates: [[]]
|
|
478
|
-
* }]
|
|
479
|
-
* }
|
|
480
|
-
* }
|
|
481
|
-
* })
|
|
476
|
+
* await client.drivers.clearLastSeenV1()
|
|
482
477
|
*/
|
|
483
|
-
|
|
484
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
478
|
+
clearLastSeenV1(requestOptions) {
|
|
479
|
+
return core.HttpResponsePromise.fromPromise(this.__clearLastSeenV1(requestOptions));
|
|
485
480
|
}
|
|
486
|
-
|
|
481
|
+
__clearLastSeenV1(requestOptions) {
|
|
487
482
|
return __awaiter(this, void 0, void 0, function* () {
|
|
488
483
|
var _a, _b, _c, _d;
|
|
489
484
|
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);
|
|
490
485
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
491
|
-
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/drivers/last_seen/v1"),
|
|
486
|
+
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/drivers/last_seen/clear/v1"),
|
|
492
487
|
method: "POST",
|
|
493
488
|
headers: _headers,
|
|
494
|
-
contentType: "application/json",
|
|
495
489
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
496
|
-
requestType: "json",
|
|
497
|
-
body: request,
|
|
498
490
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
499
491
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
500
492
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -503,16 +495,11 @@ class Drivers {
|
|
|
503
495
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
504
496
|
}
|
|
505
497
|
if (_response.error.reason === "status-code") {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
statusCode: _response.error.statusCode,
|
|
512
|
-
body: _response.error.body,
|
|
513
|
-
rawResponse: _response.rawResponse,
|
|
514
|
-
});
|
|
515
|
-
}
|
|
498
|
+
throw new errors.ChrtError({
|
|
499
|
+
statusCode: _response.error.statusCode,
|
|
500
|
+
body: _response.error.body,
|
|
501
|
+
rawResponse: _response.rawResponse,
|
|
502
|
+
});
|
|
516
503
|
}
|
|
517
504
|
switch (_response.error.reason) {
|
|
518
505
|
case "non-json":
|
|
@@ -522,7 +509,7 @@ class Drivers {
|
|
|
522
509
|
rawResponse: _response.rawResponse,
|
|
523
510
|
});
|
|
524
511
|
case "timeout":
|
|
525
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/v1.");
|
|
512
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/clear/v1.");
|
|
526
513
|
case "unknown":
|
|
527
514
|
throw new errors.ChrtError({
|
|
528
515
|
message: _response.error.errorMessage,
|
|
@@ -532,25 +519,33 @@ class Drivers {
|
|
|
532
519
|
});
|
|
533
520
|
}
|
|
534
521
|
/**
|
|
535
|
-
*
|
|
522
|
+
* Updates the caller's driver availability status. Must have status UNASSIGNED to set availability to False; always allows setting to True. Courier orgs only. | (DriverUpdateAvailabilityReq) -> (bool)
|
|
536
523
|
*
|
|
524
|
+
* @param {Chrt.DriverUpdateAvailabilityReq} request
|
|
537
525
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
538
526
|
*
|
|
527
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
528
|
+
*
|
|
539
529
|
* @example
|
|
540
|
-
* await client.drivers.
|
|
530
|
+
* await client.drivers.updateAvailabilityAccordingToDriverV1({
|
|
531
|
+
* available: true
|
|
532
|
+
* })
|
|
541
533
|
*/
|
|
542
|
-
|
|
543
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
534
|
+
updateAvailabilityAccordingToDriverV1(request, requestOptions) {
|
|
535
|
+
return core.HttpResponsePromise.fromPromise(this.__updateAvailabilityAccordingToDriverV1(request, requestOptions));
|
|
544
536
|
}
|
|
545
|
-
|
|
537
|
+
__updateAvailabilityAccordingToDriverV1(request, requestOptions) {
|
|
546
538
|
return __awaiter(this, void 0, void 0, function* () {
|
|
547
539
|
var _a, _b, _c, _d;
|
|
548
540
|
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);
|
|
549
541
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
550
|
-
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/drivers/
|
|
551
|
-
method: "
|
|
542
|
+
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/drivers/update_availability/according_to_driver/v1"),
|
|
543
|
+
method: "PATCH",
|
|
552
544
|
headers: _headers,
|
|
545
|
+
contentType: "application/json",
|
|
553
546
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
547
|
+
requestType: "json",
|
|
548
|
+
body: request,
|
|
554
549
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
555
550
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
556
551
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -559,11 +554,16 @@ class Drivers {
|
|
|
559
554
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
560
555
|
}
|
|
561
556
|
if (_response.error.reason === "status-code") {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
557
|
+
switch (_response.error.statusCode) {
|
|
558
|
+
case 422:
|
|
559
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
560
|
+
default:
|
|
561
|
+
throw new errors.ChrtError({
|
|
562
|
+
statusCode: _response.error.statusCode,
|
|
563
|
+
body: _response.error.body,
|
|
564
|
+
rawResponse: _response.rawResponse,
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
567
|
}
|
|
568
568
|
switch (_response.error.reason) {
|
|
569
569
|
case "non-json":
|
|
@@ -573,7 +573,7 @@ class Drivers {
|
|
|
573
573
|
rawResponse: _response.rawResponse,
|
|
574
574
|
});
|
|
575
575
|
case "timeout":
|
|
576
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
576
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/update_availability/according_to_driver/v1.");
|
|
577
577
|
case "unknown":
|
|
578
578
|
throw new errors.ChrtError({
|
|
579
579
|
message: _response.error.errorMessage,
|
|
@@ -583,27 +583,28 @@ class Drivers {
|
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
585
|
/**
|
|
586
|
-
* Updates driver
|
|
586
|
+
* Updates a driver's availability status. Must have status UNASSIGNED to set availability to False; always allows setting to True. Courier orgs only, min role: operator. | (DriverUpdateAvailabilityReq) -> (bool)
|
|
587
587
|
*
|
|
588
|
-
* @param {
|
|
588
|
+
* @param {string} driverId
|
|
589
|
+
* @param {Chrt.DriverUpdateAvailabilityReq} request
|
|
589
590
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
590
591
|
*
|
|
591
592
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
592
593
|
*
|
|
593
594
|
* @example
|
|
594
|
-
* await client.drivers.
|
|
595
|
-
*
|
|
595
|
+
* await client.drivers.updateAvailabilityAccordingToOperatorsV1("driver_id", {
|
|
596
|
+
* available: true
|
|
596
597
|
* })
|
|
597
598
|
*/
|
|
598
|
-
|
|
599
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
599
|
+
updateAvailabilityAccordingToOperatorsV1(driverId, request, requestOptions) {
|
|
600
|
+
return core.HttpResponsePromise.fromPromise(this.__updateAvailabilityAccordingToOperatorsV1(driverId, request, requestOptions));
|
|
600
601
|
}
|
|
601
|
-
|
|
602
|
+
__updateAvailabilityAccordingToOperatorsV1(driverId, request, requestOptions) {
|
|
602
603
|
return __awaiter(this, void 0, void 0, function* () {
|
|
603
604
|
var _a, _b, _c, _d;
|
|
604
605
|
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);
|
|
605
606
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
606
|
-
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,
|
|
607
|
+
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/drivers/update_availability/according_to_operators/v1/${encodeURIComponent(driverId)}`),
|
|
607
608
|
method: "PATCH",
|
|
608
609
|
headers: _headers,
|
|
609
610
|
contentType: "application/json",
|
|
@@ -637,7 +638,7 @@ class Drivers {
|
|
|
637
638
|
rawResponse: _response.rawResponse,
|
|
638
639
|
});
|
|
639
640
|
case "timeout":
|
|
640
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/
|
|
641
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/update_availability/according_to_operators/v1/{driver_id}.");
|
|
641
642
|
case "unknown":
|
|
642
643
|
throw new errors.ChrtError({
|
|
643
644
|
message: _response.error.errorMessage,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* schema_version: 1
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface DriverClientCreate1 {
|
|
12
|
+
schema_version: number;
|
|
13
|
+
email_address_primary?: string | null;
|
|
14
|
+
email_address_secondary?: string | null;
|
|
15
|
+
phone_number_primary?: string | null;
|
|
16
|
+
phone_number_secondary?: string | null;
|
|
17
|
+
first_name?: string | null;
|
|
18
|
+
last_name?: string | null;
|
|
19
|
+
vehicle_types?: Chrt.VehicleTypeEnum[];
|
|
20
|
+
}
|
|
@@ -4,15 +4,14 @@
|
|
|
4
4
|
import * as Chrt from "../../../../index.js";
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
|
-
* {
|
|
8
|
-
* driver_object_id: "driver_object_id"
|
|
9
|
-
* }
|
|
7
|
+
* {}
|
|
10
8
|
*/
|
|
11
|
-
export interface
|
|
12
|
-
driver_object_id: string;
|
|
9
|
+
export interface DriverClientUpdate1 {
|
|
13
10
|
email_address_primary?: string | null;
|
|
14
11
|
email_address_secondary?: string | null;
|
|
15
12
|
phone_number_primary?: string | null;
|
|
16
13
|
phone_number_secondary?: string | null;
|
|
14
|
+
first_name?: string | null;
|
|
15
|
+
last_name?: string | null;
|
|
17
16
|
vehicle_types?: Chrt.VehicleTypeEnum[] | null;
|
|
18
17
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { type
|
|
2
|
-
export { type
|
|
1
|
+
export { type DriverClientCreate1 } from "./DriverClientCreate1.js";
|
|
2
|
+
export { type DriverClientUpdate1 } from "./DriverClientUpdate1.js";
|
|
3
3
|
export { type DriverLastSeenReq } from "./DriverLastSeenReq.js";
|
|
4
|
-
export { type UpdateDriverDetailsReq } from "./UpdateDriverDetailsReq.js";
|