@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
|
@@ -20,22 +20,22 @@ export class Drivers {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Retrieves driver information for the caller within their organization. | () -> (Driver1)
|
|
24
24
|
*
|
|
25
25
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
|
-
* await client.drivers.
|
|
28
|
+
* await client.drivers.getForCallerV1()
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
30
|
+
getForCallerV1(requestOptions) {
|
|
31
|
+
return core.HttpResponsePromise.fromPromise(this.__getForCallerV1(requestOptions));
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
__getForCallerV1(requestOptions) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
var _a, _b, _c, _d;
|
|
36
36
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
37
37
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
38
|
-
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/
|
|
38
|
+
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"),
|
|
39
39
|
method: "GET",
|
|
40
40
|
headers: _headers,
|
|
41
41
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -61,7 +61,7 @@ export class Drivers {
|
|
|
61
61
|
rawResponse: _response.rawResponse,
|
|
62
62
|
});
|
|
63
63
|
case "timeout":
|
|
64
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/
|
|
64
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/for_caller/v1.");
|
|
65
65
|
case "unknown":
|
|
66
66
|
throw new errors.ChrtError({
|
|
67
67
|
message: _response.error.errorMessage,
|
|
@@ -71,22 +71,25 @@ export class Drivers {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
74
|
+
* Retrieves detailed driver information by driver ID within the organization. | () -> (Driver1)
|
|
75
75
|
*
|
|
76
|
+
* @param {string} driverId
|
|
76
77
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
78
|
*
|
|
79
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
80
|
+
*
|
|
78
81
|
* @example
|
|
79
|
-
* await client.drivers.
|
|
82
|
+
* await client.drivers.getByDriverIdV1("driver_id")
|
|
80
83
|
*/
|
|
81
|
-
|
|
82
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
84
|
+
getByDriverIdV1(driverId, requestOptions) {
|
|
85
|
+
return core.HttpResponsePromise.fromPromise(this.__getByDriverIdV1(driverId, requestOptions));
|
|
83
86
|
}
|
|
84
|
-
|
|
87
|
+
__getByDriverIdV1(driverId, requestOptions) {
|
|
85
88
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86
89
|
var _a, _b, _c, _d;
|
|
87
90
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
88
91
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
89
|
-
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,
|
|
92
|
+
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)}`),
|
|
90
93
|
method: "GET",
|
|
91
94
|
headers: _headers,
|
|
92
95
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -98,11 +101,16 @@ export class Drivers {
|
|
|
98
101
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
102
|
}
|
|
100
103
|
if (_response.error.reason === "status-code") {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
switch (_response.error.statusCode) {
|
|
105
|
+
case 422:
|
|
106
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
107
|
+
default:
|
|
108
|
+
throw new errors.ChrtError({
|
|
109
|
+
statusCode: _response.error.statusCode,
|
|
110
|
+
body: _response.error.body,
|
|
111
|
+
rawResponse: _response.rawResponse,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
106
114
|
}
|
|
107
115
|
switch (_response.error.reason) {
|
|
108
116
|
case "non-json":
|
|
@@ -112,7 +120,7 @@ export class Drivers {
|
|
|
112
120
|
rawResponse: _response.rawResponse,
|
|
113
121
|
});
|
|
114
122
|
case "timeout":
|
|
115
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/
|
|
123
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/v1/{driver_id}.");
|
|
116
124
|
case "unknown":
|
|
117
125
|
throw new errors.ChrtError({
|
|
118
126
|
message: _response.error.errorMessage,
|
|
@@ -122,36 +130,25 @@ export class Drivers {
|
|
|
122
130
|
});
|
|
123
131
|
}
|
|
124
132
|
/**
|
|
125
|
-
*
|
|
133
|
+
* Lists all organization members paired with their driver information if they are drivers. | () -> (list[OrgMembersAndDrivers])
|
|
126
134
|
*
|
|
127
|
-
* @param {Chrt.DriverCreateReq} request
|
|
128
135
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
136
|
*
|
|
130
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
131
|
-
*
|
|
132
137
|
* @example
|
|
133
|
-
* await client.drivers.
|
|
134
|
-
* org_member: {
|
|
135
|
-
* role: "owner",
|
|
136
|
-
* user_id: "user_id"
|
|
137
|
-
* }
|
|
138
|
-
* })
|
|
138
|
+
* await client.drivers.listOrgMembersAndDriversV1()
|
|
139
139
|
*/
|
|
140
|
-
|
|
141
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
140
|
+
listOrgMembersAndDriversV1(requestOptions) {
|
|
141
|
+
return core.HttpResponsePromise.fromPromise(this.__listOrgMembersAndDriversV1(requestOptions));
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
__listOrgMembersAndDriversV1(requestOptions) {
|
|
144
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
145
|
var _a, _b, _c, _d;
|
|
146
146
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
147
147
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
148
|
-
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/
|
|
149
|
-
method: "
|
|
148
|
+
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"),
|
|
149
|
+
method: "GET",
|
|
150
150
|
headers: _headers,
|
|
151
|
-
contentType: "application/json",
|
|
152
151
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
153
|
-
requestType: "json",
|
|
154
|
-
body: request,
|
|
155
152
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
156
153
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
157
154
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -160,16 +157,11 @@ export class Drivers {
|
|
|
160
157
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
161
158
|
}
|
|
162
159
|
if (_response.error.reason === "status-code") {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
statusCode: _response.error.statusCode,
|
|
169
|
-
body: _response.error.body,
|
|
170
|
-
rawResponse: _response.rawResponse,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
160
|
+
throw new errors.ChrtError({
|
|
161
|
+
statusCode: _response.error.statusCode,
|
|
162
|
+
body: _response.error.body,
|
|
163
|
+
rawResponse: _response.rawResponse,
|
|
164
|
+
});
|
|
173
165
|
}
|
|
174
166
|
switch (_response.error.reason) {
|
|
175
167
|
case "non-json":
|
|
@@ -179,7 +171,7 @@ export class Drivers {
|
|
|
179
171
|
rawResponse: _response.rawResponse,
|
|
180
172
|
});
|
|
181
173
|
case "timeout":
|
|
182
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
174
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/org_members_and_drivers/list/v1.");
|
|
183
175
|
case "unknown":
|
|
184
176
|
throw new errors.ChrtError({
|
|
185
177
|
message: _response.error.errorMessage,
|
|
@@ -189,22 +181,22 @@ export class Drivers {
|
|
|
189
181
|
});
|
|
190
182
|
}
|
|
191
183
|
/**
|
|
192
|
-
*
|
|
184
|
+
* Lists all drivers belonging to the caller's organization. | () -> (list[Driver1])
|
|
193
185
|
*
|
|
194
186
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
195
187
|
*
|
|
196
188
|
* @example
|
|
197
|
-
* await client.drivers.
|
|
189
|
+
* await client.drivers.listV1()
|
|
198
190
|
*/
|
|
199
|
-
|
|
200
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
191
|
+
listV1(requestOptions) {
|
|
192
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(requestOptions));
|
|
201
193
|
}
|
|
202
|
-
|
|
194
|
+
__listV1(requestOptions) {
|
|
203
195
|
return __awaiter(this, void 0, void 0, function* () {
|
|
204
196
|
var _a, _b, _c, _d;
|
|
205
197
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
206
198
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
207
|
-
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/
|
|
199
|
+
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"),
|
|
208
200
|
method: "GET",
|
|
209
201
|
headers: _headers,
|
|
210
202
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -230,7 +222,7 @@ export class Drivers {
|
|
|
230
222
|
rawResponse: _response.rawResponse,
|
|
231
223
|
});
|
|
232
224
|
case "timeout":
|
|
233
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/
|
|
225
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/list/v1.");
|
|
234
226
|
case "unknown":
|
|
235
227
|
throw new errors.ChrtError({
|
|
236
228
|
message: _response.error.errorMessage,
|
|
@@ -240,28 +232,33 @@ export class Drivers {
|
|
|
240
232
|
});
|
|
241
233
|
}
|
|
242
234
|
/**
|
|
243
|
-
*
|
|
235
|
+
* Creates a new driver profile for the caller. Returns existing driver ID if one already exists. Courier orgs only, min role: operator. | (DriverClientCreate1) -> (PydanticObjectId)
|
|
244
236
|
*
|
|
245
|
-
* @param {
|
|
237
|
+
* @param {Chrt.DriverClientCreate1} request
|
|
246
238
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
247
239
|
*
|
|
248
240
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
249
241
|
*
|
|
250
242
|
* @example
|
|
251
|
-
* await client.drivers.
|
|
243
|
+
* await client.drivers.createV1({
|
|
244
|
+
* schema_version: 1
|
|
245
|
+
* })
|
|
252
246
|
*/
|
|
253
|
-
|
|
254
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
247
|
+
createV1(request, requestOptions) {
|
|
248
|
+
return core.HttpResponsePromise.fromPromise(this.__createV1(request, requestOptions));
|
|
255
249
|
}
|
|
256
|
-
|
|
250
|
+
__createV1(request, requestOptions) {
|
|
257
251
|
return __awaiter(this, void 0, void 0, function* () {
|
|
258
252
|
var _a, _b, _c, _d;
|
|
259
253
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
260
254
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
261
|
-
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,
|
|
262
|
-
method: "
|
|
255
|
+
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"),
|
|
256
|
+
method: "POST",
|
|
263
257
|
headers: _headers,
|
|
258
|
+
contentType: "application/json",
|
|
264
259
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
260
|
+
requestType: "json",
|
|
261
|
+
body: request,
|
|
265
262
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
266
263
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
267
264
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -289,7 +286,7 @@ export class Drivers {
|
|
|
289
286
|
rawResponse: _response.rawResponse,
|
|
290
287
|
});
|
|
291
288
|
case "timeout":
|
|
292
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
289
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/create/v1.");
|
|
293
290
|
case "unknown":
|
|
294
291
|
throw new errors.ChrtError({
|
|
295
292
|
message: _response.error.errorMessage,
|
|
@@ -299,28 +296,32 @@ export class Drivers {
|
|
|
299
296
|
});
|
|
300
297
|
}
|
|
301
298
|
/**
|
|
302
|
-
*
|
|
299
|
+
* Updates driver contact details and vehicle type assignments. Courier orgs only; caller must be the driver (self) or an operator+. | (DriverClientUpdate1) -> (bool)
|
|
303
300
|
*
|
|
304
301
|
* @param {string} driverId
|
|
302
|
+
* @param {Chrt.DriverClientUpdate1} request
|
|
305
303
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
306
304
|
*
|
|
307
305
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
308
306
|
*
|
|
309
307
|
* @example
|
|
310
|
-
* await client.drivers.
|
|
308
|
+
* await client.drivers.updateV1("driver_id")
|
|
311
309
|
*/
|
|
312
|
-
|
|
313
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
310
|
+
updateV1(driverId, request = {}, requestOptions) {
|
|
311
|
+
return core.HttpResponsePromise.fromPromise(this.__updateV1(driverId, request, requestOptions));
|
|
314
312
|
}
|
|
315
|
-
|
|
316
|
-
return __awaiter(this,
|
|
313
|
+
__updateV1(driverId_1) {
|
|
314
|
+
return __awaiter(this, arguments, void 0, function* (driverId, request = {}, requestOptions) {
|
|
317
315
|
var _a, _b, _c, _d;
|
|
318
316
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
319
317
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
320
|
-
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)}`),
|
|
321
|
-
method: "
|
|
318
|
+
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)}`),
|
|
319
|
+
method: "PATCH",
|
|
322
320
|
headers: _headers,
|
|
321
|
+
contentType: "application/json",
|
|
323
322
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
323
|
+
requestType: "json",
|
|
324
|
+
body: request,
|
|
324
325
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
325
326
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
326
327
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -348,7 +349,7 @@ export class Drivers {
|
|
|
348
349
|
rawResponse: _response.rawResponse,
|
|
349
350
|
});
|
|
350
351
|
case "timeout":
|
|
351
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
352
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/update/v1/{driver_id}.");
|
|
352
353
|
case "unknown":
|
|
353
354
|
throw new errors.ChrtError({
|
|
354
355
|
message: _response.error.errorMessage,
|
|
@@ -358,28 +359,36 @@ export class Drivers {
|
|
|
358
359
|
});
|
|
359
360
|
}
|
|
360
361
|
/**
|
|
361
|
-
*
|
|
362
|
+
* 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)
|
|
362
363
|
*
|
|
363
|
-
* @param {Chrt.
|
|
364
|
+
* @param {Chrt.DriverLastSeenReq} request
|
|
364
365
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
365
366
|
*
|
|
366
367
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
367
368
|
*
|
|
368
369
|
* @example
|
|
369
|
-
* await client.drivers.
|
|
370
|
-
*
|
|
371
|
-
*
|
|
370
|
+
* await client.drivers.updateLastSeenV1({
|
|
371
|
+
* location: {
|
|
372
|
+
* type: "Feature",
|
|
373
|
+
* geometry: {
|
|
374
|
+
* type: "GeometryCollection",
|
|
375
|
+
* geometries: [{
|
|
376
|
+
* type: "LineString",
|
|
377
|
+
* coordinates: [[]]
|
|
378
|
+
* }]
|
|
379
|
+
* }
|
|
380
|
+
* }
|
|
372
381
|
* })
|
|
373
382
|
*/
|
|
374
|
-
|
|
375
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
383
|
+
updateLastSeenV1(request, requestOptions) {
|
|
384
|
+
return core.HttpResponsePromise.fromPromise(this.__updateLastSeenV1(request, requestOptions));
|
|
376
385
|
}
|
|
377
|
-
|
|
386
|
+
__updateLastSeenV1(request, requestOptions) {
|
|
378
387
|
return __awaiter(this, void 0, void 0, function* () {
|
|
379
388
|
var _a, _b, _c, _d;
|
|
380
389
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
381
390
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
382
|
-
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/
|
|
391
|
+
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"),
|
|
383
392
|
method: "POST",
|
|
384
393
|
headers: _headers,
|
|
385
394
|
contentType: "application/json",
|
|
@@ -413,7 +422,7 @@ export class Drivers {
|
|
|
413
422
|
rawResponse: _response.rawResponse,
|
|
414
423
|
});
|
|
415
424
|
case "timeout":
|
|
416
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/
|
|
425
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/update/v1.");
|
|
417
426
|
case "unknown":
|
|
418
427
|
throw new errors.ChrtError({
|
|
419
428
|
message: _response.error.errorMessage,
|
|
@@ -423,42 +432,25 @@ export class Drivers {
|
|
|
423
432
|
});
|
|
424
433
|
}
|
|
425
434
|
/**
|
|
426
|
-
*
|
|
435
|
+
* Clears the driver's last known location and timestamp. | () -> (bool)
|
|
427
436
|
*
|
|
428
|
-
* @param {Chrt.DriverLastSeenReq} request
|
|
429
437
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
430
438
|
*
|
|
431
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
432
|
-
*
|
|
433
439
|
* @example
|
|
434
|
-
* await client.drivers.
|
|
435
|
-
* location: {
|
|
436
|
-
* type: "Feature",
|
|
437
|
-
* geometry: {
|
|
438
|
-
* type: "GeometryCollection",
|
|
439
|
-
* geometries: [{
|
|
440
|
-
* type: "LineString",
|
|
441
|
-
* coordinates: [[]]
|
|
442
|
-
* }]
|
|
443
|
-
* }
|
|
444
|
-
* }
|
|
445
|
-
* })
|
|
440
|
+
* await client.drivers.clearLastSeenV1()
|
|
446
441
|
*/
|
|
447
|
-
|
|
448
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
442
|
+
clearLastSeenV1(requestOptions) {
|
|
443
|
+
return core.HttpResponsePromise.fromPromise(this.__clearLastSeenV1(requestOptions));
|
|
449
444
|
}
|
|
450
|
-
|
|
445
|
+
__clearLastSeenV1(requestOptions) {
|
|
451
446
|
return __awaiter(this, void 0, void 0, function* () {
|
|
452
447
|
var _a, _b, _c, _d;
|
|
453
448
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
454
449
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
455
|
-
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"),
|
|
450
|
+
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"),
|
|
456
451
|
method: "POST",
|
|
457
452
|
headers: _headers,
|
|
458
|
-
contentType: "application/json",
|
|
459
453
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
460
|
-
requestType: "json",
|
|
461
|
-
body: request,
|
|
462
454
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
463
455
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
464
456
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -467,16 +459,11 @@ export class Drivers {
|
|
|
467
459
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
468
460
|
}
|
|
469
461
|
if (_response.error.reason === "status-code") {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
statusCode: _response.error.statusCode,
|
|
476
|
-
body: _response.error.body,
|
|
477
|
-
rawResponse: _response.rawResponse,
|
|
478
|
-
});
|
|
479
|
-
}
|
|
462
|
+
throw new errors.ChrtError({
|
|
463
|
+
statusCode: _response.error.statusCode,
|
|
464
|
+
body: _response.error.body,
|
|
465
|
+
rawResponse: _response.rawResponse,
|
|
466
|
+
});
|
|
480
467
|
}
|
|
481
468
|
switch (_response.error.reason) {
|
|
482
469
|
case "non-json":
|
|
@@ -486,7 +473,7 @@ export class Drivers {
|
|
|
486
473
|
rawResponse: _response.rawResponse,
|
|
487
474
|
});
|
|
488
475
|
case "timeout":
|
|
489
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/v1.");
|
|
476
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/clear/v1.");
|
|
490
477
|
case "unknown":
|
|
491
478
|
throw new errors.ChrtError({
|
|
492
479
|
message: _response.error.errorMessage,
|
|
@@ -496,25 +483,33 @@ export class Drivers {
|
|
|
496
483
|
});
|
|
497
484
|
}
|
|
498
485
|
/**
|
|
499
|
-
*
|
|
486
|
+
* 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)
|
|
500
487
|
*
|
|
488
|
+
* @param {Chrt.DriverUpdateAvailabilityReq} request
|
|
501
489
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
502
490
|
*
|
|
491
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
492
|
+
*
|
|
503
493
|
* @example
|
|
504
|
-
* await client.drivers.
|
|
494
|
+
* await client.drivers.updateAvailabilityAccordingToDriverV1({
|
|
495
|
+
* available: true
|
|
496
|
+
* })
|
|
505
497
|
*/
|
|
506
|
-
|
|
507
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
498
|
+
updateAvailabilityAccordingToDriverV1(request, requestOptions) {
|
|
499
|
+
return core.HttpResponsePromise.fromPromise(this.__updateAvailabilityAccordingToDriverV1(request, requestOptions));
|
|
508
500
|
}
|
|
509
|
-
|
|
501
|
+
__updateAvailabilityAccordingToDriverV1(request, requestOptions) {
|
|
510
502
|
return __awaiter(this, void 0, void 0, function* () {
|
|
511
503
|
var _a, _b, _c, _d;
|
|
512
504
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
513
505
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
514
|
-
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/
|
|
515
|
-
method: "
|
|
506
|
+
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"),
|
|
507
|
+
method: "PATCH",
|
|
516
508
|
headers: _headers,
|
|
509
|
+
contentType: "application/json",
|
|
517
510
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
511
|
+
requestType: "json",
|
|
512
|
+
body: request,
|
|
518
513
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
519
514
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
520
515
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -523,11 +518,16 @@ export class Drivers {
|
|
|
523
518
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
524
519
|
}
|
|
525
520
|
if (_response.error.reason === "status-code") {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
521
|
+
switch (_response.error.statusCode) {
|
|
522
|
+
case 422:
|
|
523
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
524
|
+
default:
|
|
525
|
+
throw new errors.ChrtError({
|
|
526
|
+
statusCode: _response.error.statusCode,
|
|
527
|
+
body: _response.error.body,
|
|
528
|
+
rawResponse: _response.rawResponse,
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
531
|
}
|
|
532
532
|
switch (_response.error.reason) {
|
|
533
533
|
case "non-json":
|
|
@@ -537,7 +537,7 @@ export class Drivers {
|
|
|
537
537
|
rawResponse: _response.rawResponse,
|
|
538
538
|
});
|
|
539
539
|
case "timeout":
|
|
540
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
540
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/update_availability/according_to_driver/v1.");
|
|
541
541
|
case "unknown":
|
|
542
542
|
throw new errors.ChrtError({
|
|
543
543
|
message: _response.error.errorMessage,
|
|
@@ -547,27 +547,28 @@ export class Drivers {
|
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
549
|
/**
|
|
550
|
-
* Updates driver
|
|
550
|
+
* 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)
|
|
551
551
|
*
|
|
552
|
-
* @param {
|
|
552
|
+
* @param {string} driverId
|
|
553
|
+
* @param {Chrt.DriverUpdateAvailabilityReq} request
|
|
553
554
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
554
555
|
*
|
|
555
556
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
556
557
|
*
|
|
557
558
|
* @example
|
|
558
|
-
* await client.drivers.
|
|
559
|
-
*
|
|
559
|
+
* await client.drivers.updateAvailabilityAccordingToOperatorsV1("driver_id", {
|
|
560
|
+
* available: true
|
|
560
561
|
* })
|
|
561
562
|
*/
|
|
562
|
-
|
|
563
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
563
|
+
updateAvailabilityAccordingToOperatorsV1(driverId, request, requestOptions) {
|
|
564
|
+
return core.HttpResponsePromise.fromPromise(this.__updateAvailabilityAccordingToOperatorsV1(driverId, request, requestOptions));
|
|
564
565
|
}
|
|
565
|
-
|
|
566
|
+
__updateAvailabilityAccordingToOperatorsV1(driverId, request, requestOptions) {
|
|
566
567
|
return __awaiter(this, void 0, void 0, function* () {
|
|
567
568
|
var _a, _b, _c, _d;
|
|
568
569
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
569
570
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
570
|
-
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,
|
|
571
|
+
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)}`),
|
|
571
572
|
method: "PATCH",
|
|
572
573
|
headers: _headers,
|
|
573
574
|
contentType: "application/json",
|
|
@@ -601,7 +602,7 @@ export class Drivers {
|
|
|
601
602
|
rawResponse: _response.rawResponse,
|
|
602
603
|
});
|
|
603
604
|
case "timeout":
|
|
604
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/
|
|
605
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/update_availability/according_to_operators/v1/{driver_id}.");
|
|
605
606
|
case "unknown":
|
|
606
607
|
throw new errors.ChrtError({
|
|
607
608
|
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.mjs";
|
|
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.mjs";
|
|
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.mjs";
|
|
2
|
+
export { type DriverClientUpdate1 } from "./DriverClientUpdate1.mjs";
|
|
3
3
|
export { type DriverLastSeenReq } from "./DriverLastSeenReq.mjs";
|
|
4
|
-
export { type UpdateDriverDetailsReq } from "./UpdateDriverDetailsReq.mjs";
|