@chrt-inc/typescript-sdk 0.0.162 → 0.1.0-beta0
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/Client.d.ts +30 -24
- package/Client.js +55 -45
- package/README.md +10 -6
- package/api/resources/dev/client/Client.d.ts +7 -7
- package/api/resources/dev/client/Client.js +48 -48
- package/api/resources/directory/client/Client.js +1 -1
- package/api/resources/directory/client/requests/DbQueryParams.d.ts +2 -2
- package/api/resources/index.d.ts +16 -14
- package/api/resources/index.js +17 -15
- package/api/resources/{oortNotificationPreferences → messages}/client/Client.d.ts +20 -12
- package/api/resources/messages/client/Client.js +191 -0
- package/api/resources/messages/client/requests/ShipperToCourierCreate1.d.ts +27 -0
- package/api/resources/messages/client/requests/index.d.ts +1 -0
- package/api/resources/mirror/client/Client.d.ts +0 -25
- package/api/resources/mirror/client/Client.js +10 -119
- package/api/resources/oortCourierPayDriverRate/client/Client.d.ts +8 -38
- package/api/resources/oortCourierPayDriverRate/client/Client.js +24 -65
- package/api/resources/oortCourierPayDriverRate/client/index.d.ts +1 -1
- package/api/resources/oortCourierPayDriverRate/client/index.js +0 -15
- package/api/resources/oortDrivers/client/Client.d.ts +36 -48
- package/api/resources/oortDrivers/client/Client.js +93 -146
- package/api/resources/oortDrivers/client/requests/SetDriverActivationReq.d.ts +3 -3
- package/api/resources/oortDrivers/client/requests/UpdateDriverDetailsReq.d.ts +0 -2
- package/api/resources/oortDrivers/client/requests/index.d.ts +1 -2
- package/api/resources/{oortConnections → oortHandles}/client/Client.d.ts +22 -15
- package/api/resources/{oortConnections → oortHandles}/client/Client.js +40 -28
- package/api/resources/{oortOrgProfiles/client/requests/GetAvatarRequest.d.ts → oortHandles/client/requests/HandlesReq.d.ts} +1 -1
- package/api/resources/oortHandles/client/requests/index.d.ts +1 -0
- package/api/resources/oortMilestones/client/Client.d.ts +15 -28
- package/api/resources/oortMilestones/client/Client.js +41 -96
- package/api/resources/oortMilestones/client/requests/MilestoneUpdateReq.d.ts +1 -1
- package/api/resources/oortMilestones/client/requests/index.d.ts +0 -1
- package/api/resources/oortOrders/client/Client.d.ts +35 -45
- package/api/resources/oortOrders/client/Client.js +89 -140
- package/api/resources/oortOrders/client/requests/CreateOrderReq.d.ts +14 -14
- package/api/resources/oortOrgProfiles/client/Client.d.ts +3 -15
- package/api/resources/oortOrgProfiles/client/Client.js +8 -65
- package/api/resources/oortOrgProfiles/client/requests/CourierOrgProfileClientCreate3.d.ts +7 -6
- package/api/resources/oortOrgProfiles/client/requests/index.d.ts +0 -1
- package/api/resources/oortRateSheets/client/Client.d.ts +66 -0
- package/api/resources/{oortNotificationPreferences → oortRateSheets}/client/Client.js +52 -35
- package/{dist/api/resources/oortCourierPayDriverRate/client/requests/CourierPayDriverRateSheetClientCreate1.d.ts → api/resources/oortRateSheets/client/requests/RateSheetClientCreate1.d.ts} +25 -26
- package/api/resources/oortRateSheets/client/requests/index.d.ts +1 -0
- package/api/resources/oortRoutes/client/Client.d.ts +103 -0
- package/{dist/api/resources/oortOrgConnectionInfos → api/resources/oortRoutes}/client/Client.js +134 -71
- package/api/resources/oortRoutes/client/requests/GetOortRoutesByIdRequest.d.ts +29 -0
- package/api/resources/{orgs/client/requests/UpdateOrgPublicDataReq.d.ts → oortRoutes/client/requests/RouteCreateReq.d.ts} +3 -3
- package/{dist/api/resources/oortTaskGroups/client/requests/UpdateTaskGroupReq.d.ts → api/resources/oortRoutes/client/requests/UpdateRouteReq.d.ts} +6 -4
- package/api/resources/oortRoutes/client/requests/index.d.ts +3 -0
- package/api/resources/oortShippers/client/Client.d.ts +44 -0
- package/api/resources/oortShippers/client/Client.js +156 -0
- package/api/resources/oortShippers/client/index.d.ts +1 -0
- package/api/resources/oortTaskGroups/client/Client.d.ts +6 -56
- package/api/resources/oortTaskGroups/client/Client.js +6 -222
- package/api/resources/oortTaskGroups/client/index.d.ts +1 -1
- package/api/resources/oortTaskGroups/client/index.js +0 -15
- package/api/resources/orgs/client/Client.d.ts +2 -52
- package/api/resources/orgs/client/Client.js +5 -215
- package/api/resources/{oortConnections/client/requests/CreateConnectionReq.d.ts → orgs/client/requests/PostOrgPublicDataReq.d.ts} +1 -1
- package/api/resources/orgs/client/requests/index.d.ts +1 -2
- package/api/resources/payments/client/Client.js +3 -3
- package/api/resources/profiles/client/Client.d.ts +67 -0
- package/{dist/api/resources/oortShipperUserInfo → api/resources/profiles}/client/Client.js +49 -79
- package/api/resources/profiles/client/requests/CourierProfileCreate2.d.ts +32 -0
- package/api/resources/profiles/client/requests/GetCourierProfileRequest.d.ts +12 -0
- package/api/resources/profiles/client/requests/GetHandleIsAvailableRequest.d.ts +15 -0
- package/api/resources/profiles/client/requests/index.d.ts +3 -0
- package/api/resources/profiles/index.d.ts +2 -0
- package/api/resources/profiles/index.js +18 -0
- package/api/resources/profiles/types/Type.d.ts +8 -0
- package/api/resources/profiles/types/Type.js +10 -0
- package/api/resources/profiles/types/index.d.ts +1 -0
- package/api/resources/profiles/types/index.js +17 -0
- package/api/resources/root/client/Client.d.ts +12 -12
- package/api/resources/root/client/Client.js +31 -31
- package/api/resources/root/types/PydanticResponse.d.ts +1 -1
- package/api/resources/users/client/Client.js +1 -1
- package/api/types/Action.d.ts +1 -1
- package/{dist/api/types/Vehicle1.d.ts → api/types/AppModelsDbOortVehicle1Vehicle1.d.ts} +2 -2
- package/api/types/AppModelsDbProfilesCourierOrgProfile2Vehicle1.d.ts +10 -0
- package/api/types/Cargo1.d.ts +6 -6
- package/api/types/CargoClientCreate1.d.ts +3 -3
- package/api/types/CourierAvailabilityEnum.d.ts +9 -0
- package/api/types/CourierAvailabilityEnum.js +11 -0
- package/api/types/CourierCity.d.ts +9 -0
- package/{dist/api/types/CourierOrgConnectionInfo1.d.ts → api/types/CourierOrgInfo1.d.ts} +12 -11
- package/api/types/CourierOrgProfile3.d.ts +3 -4
- package/api/types/CourierProfile2.d.ts +28 -0
- package/{dist/api/types/MultipleTaskGroupsWithTasks.d.ts → api/types/CourierProfileRes2.d.ts} +3 -2
- package/api/types/CourierServiceEnum.d.ts +20 -0
- package/api/types/CourierServiceEnum.js +22 -0
- package/api/types/CourierState.d.ts +8 -0
- package/api/types/DecodedJwtWithOrgAndUserId.d.ts +8 -8
- package/api/types/Driver1.d.ts +8 -10
- package/api/types/EmailAddress1.d.ts +8 -0
- package/api/types/Expense1.d.ts +3 -3
- package/api/types/Feature.d.ts +2 -2
- package/api/types/GetOrderFullRes.d.ts +2 -2
- package/{dist/api/types/TaskGroupWithDetails.d.ts → api/types/GetTaskGroupWithFullTaskInfoRes.d.ts} +2 -2
- package/api/types/{TaskGroupWithTasks.d.ts → GetTaskGroupWithTasksRes.d.ts} +1 -1
- package/api/types/GetTaskGroupsWithFullTaskInfoListRes.d.ts +7 -0
- package/api/types/GetTaskGroupsWithTasksListRes.d.ts +7 -0
- package/api/types/{TaskGroupWithDetails.d.ts → GetTaskInfoListRes.d.ts} +2 -2
- package/api/types/Incident1.d.ts +1 -1
- package/api/types/IndustryEnum.d.ts +21 -0
- package/api/types/IndustryEnum.js +23 -0
- package/api/types/Insurance1.d.ts +1 -1
- package/api/types/LineItem1.d.ts +1 -1
- package/api/types/Milestone1.d.ts +12 -16
- package/api/types/MilestoneClientCreate1.d.ts +1 -1
- package/api/types/MilestoneTypeEnum1.d.ts +2 -3
- package/api/types/MilestoneTypeEnum1.js +1 -2
- package/api/types/Order1.d.ts +9 -11
- package/api/types/OrgMemberDetails.d.ts +2 -2
- package/api/types/OrgMembersAndDrivers.d.ts +1 -1
- package/api/types/OrgPublicData2.d.ts +3 -4
- package/api/types/PayablesInvoice1.d.ts +11 -11
- package/api/types/PhoneNumber1.d.ts +8 -0
- package/api/types/{CourierPayDriverRateSheet1.d.ts → RateSheet1.d.ts} +18 -18
- package/api/types/ReceivablesInvoice1.d.ts +7 -7
- package/api/types/Route1.d.ts +13 -0
- package/api/types/RouteByIdEnum.d.ts +8 -0
- package/api/types/RouteByIdEnum.js +10 -0
- package/api/types/RouteDetailRes.d.ts +9 -0
- package/api/types/Shipper2.d.ts +8 -8
- package/api/types/ShipperCourierConnection1.d.ts +4 -4
- package/api/types/{ShipperOrgConnectionInfo1.d.ts → ShipperOrgInfo1.d.ts} +8 -7
- package/api/types/ShipperToCourier1.d.ts +16 -0
- package/api/types/ShipperUserInfo1.d.ts +7 -7
- package/api/types/SocialLinks.d.ts +8 -0
- package/api/types/StreetAddress1.d.ts +3 -3
- package/api/types/StripeConnectInvoice1.d.ts +5 -5
- package/api/types/Task1.d.ts +13 -14
- package/api/types/TaskClientCreate1.d.ts +5 -6
- package/api/types/TaskCreateBundle.d.ts +2 -4
- package/api/types/TaskDetailRes.d.ts +9 -0
- package/api/types/TaskGroup1.d.ts +6 -12
- package/api/types/TaskGroupDetailRes.d.ts +8 -0
- package/{dist/api/types/TaskWithDetails.d.ts → api/types/TaskInfo.d.ts} +3 -3
- package/api/types/Tracker1.d.ts +1 -1
- package/api/types/TrackerSession1.d.ts +1 -1
- package/api/types/{UpdateTaskGroupRes.d.ts → UpdateRouteRes.d.ts} +1 -1
- package/api/types/UsStatesEnum.d.ts +58 -0
- package/api/types/UsStatesEnum.js +60 -0
- package/api/types/UserPublicData5.d.ts +6 -6
- package/api/types/Vehicle1Input.d.ts +10 -0
- package/api/types/VehicleRate1.d.ts +9 -0
- package/api/types/index.d.ts +32 -19
- package/api/types/index.js +32 -19
- package/dist/Client.d.ts +30 -24
- package/dist/Client.js +55 -45
- package/dist/api/resources/dev/client/Client.d.ts +7 -7
- package/dist/api/resources/dev/client/Client.js +48 -48
- package/dist/api/resources/directory/client/Client.js +1 -1
- package/dist/api/resources/directory/client/requests/DbQueryParams.d.ts +2 -2
- package/dist/api/resources/index.d.ts +16 -14
- package/dist/api/resources/index.js +17 -15
- package/dist/api/resources/{oortNotificationPreferences → messages}/client/Client.d.ts +20 -12
- package/dist/api/resources/messages/client/Client.js +191 -0
- package/dist/api/resources/messages/client/requests/ShipperToCourierCreate1.d.ts +27 -0
- package/dist/api/resources/messages/client/requests/index.d.ts +1 -0
- package/dist/api/resources/mirror/client/Client.d.ts +0 -25
- package/dist/api/resources/mirror/client/Client.js +10 -119
- package/dist/api/resources/oortCourierPayDriverRate/client/Client.d.ts +8 -38
- package/dist/api/resources/oortCourierPayDriverRate/client/Client.js +24 -65
- package/dist/api/resources/oortCourierPayDriverRate/client/index.d.ts +1 -1
- package/dist/api/resources/oortCourierPayDriverRate/client/index.js +0 -15
- package/dist/api/resources/oortDrivers/client/Client.d.ts +36 -48
- package/dist/api/resources/oortDrivers/client/Client.js +93 -146
- package/dist/api/resources/oortDrivers/client/requests/SetDriverActivationReq.d.ts +3 -3
- package/dist/api/resources/oortDrivers/client/requests/UpdateDriverDetailsReq.d.ts +0 -2
- package/dist/api/resources/oortDrivers/client/requests/index.d.ts +1 -2
- package/dist/api/resources/{oortConnections → oortHandles}/client/Client.d.ts +22 -15
- package/dist/api/resources/{oortConnections → oortHandles}/client/Client.js +40 -28
- package/dist/api/resources/{oortOrgProfiles/client/requests/GetAvatarRequest.d.ts → oortHandles/client/requests/HandlesReq.d.ts} +1 -1
- package/dist/api/resources/oortHandles/client/requests/index.d.ts +1 -0
- package/dist/api/resources/oortMilestones/client/Client.d.ts +15 -28
- package/dist/api/resources/oortMilestones/client/Client.js +41 -96
- package/dist/api/resources/oortMilestones/client/requests/MilestoneUpdateReq.d.ts +1 -1
- package/dist/api/resources/oortMilestones/client/requests/index.d.ts +0 -1
- package/dist/api/resources/oortOrders/client/Client.d.ts +35 -45
- package/dist/api/resources/oortOrders/client/Client.js +89 -140
- package/dist/api/resources/oortOrders/client/requests/CreateOrderReq.d.ts +14 -14
- package/dist/api/resources/oortOrgProfiles/client/Client.d.ts +3 -15
- package/dist/api/resources/oortOrgProfiles/client/Client.js +8 -65
- package/dist/api/resources/oortOrgProfiles/client/requests/CourierOrgProfileClientCreate3.d.ts +7 -6
- package/dist/api/resources/oortOrgProfiles/client/requests/index.d.ts +0 -1
- package/dist/api/resources/oortRateSheets/client/Client.d.ts +66 -0
- package/dist/api/resources/{oortNotificationPreferences → oortRateSheets}/client/Client.js +52 -35
- package/{api/resources/oortCourierPayDriverRate/client/requests/CourierPayDriverRateSheetClientCreate1.d.ts → dist/api/resources/oortRateSheets/client/requests/RateSheetClientCreate1.d.ts} +25 -26
- package/dist/api/resources/oortRateSheets/client/requests/index.d.ts +1 -0
- package/dist/api/resources/oortRoutes/client/Client.d.ts +103 -0
- package/{api/resources/oortOrgConnectionInfos → dist/api/resources/oortRoutes}/client/Client.js +134 -71
- package/dist/api/resources/oortRoutes/client/index.d.ts +1 -0
- package/dist/api/resources/oortRoutes/client/index.js +17 -0
- package/dist/api/resources/oortRoutes/client/requests/GetOortRoutesByIdRequest.d.ts +29 -0
- package/dist/api/resources/{orgs/client/requests/UpdateOrgPublicDataReq.d.ts → oortRoutes/client/requests/RouteCreateReq.d.ts} +3 -3
- package/{api/resources/oortTaskGroups/client/requests/UpdateTaskGroupReq.d.ts → dist/api/resources/oortRoutes/client/requests/UpdateRouteReq.d.ts} +6 -4
- package/dist/api/resources/oortRoutes/client/requests/index.d.ts +3 -0
- package/dist/api/resources/oortRoutes/index.d.ts +1 -0
- package/dist/api/resources/oortRoutes/index.js +17 -0
- package/dist/api/resources/oortShippers/client/Client.d.ts +44 -0
- package/dist/api/resources/oortShippers/client/Client.js +156 -0
- package/dist/api/resources/oortShippers/client/index.d.ts +1 -0
- package/dist/api/resources/oortShippers/index.d.ts +1 -0
- package/dist/api/resources/oortShippers/index.js +17 -0
- package/dist/api/resources/oortTaskGroups/client/Client.d.ts +6 -56
- package/dist/api/resources/oortTaskGroups/client/Client.js +6 -222
- package/dist/api/resources/oortTaskGroups/client/index.d.ts +1 -1
- package/dist/api/resources/oortTaskGroups/client/index.js +0 -15
- package/dist/api/resources/orgs/client/Client.d.ts +2 -52
- package/dist/api/resources/orgs/client/Client.js +5 -215
- package/dist/api/resources/{oortConnections/client/requests/CreateConnectionReq.d.ts → orgs/client/requests/PostOrgPublicDataReq.d.ts} +1 -1
- package/dist/api/resources/orgs/client/requests/index.d.ts +1 -2
- package/dist/api/resources/payments/client/Client.js +3 -3
- package/dist/api/resources/profiles/client/Client.d.ts +67 -0
- package/{api/resources/oortShipperUserInfo → dist/api/resources/profiles}/client/Client.js +49 -79
- package/dist/api/resources/profiles/client/index.d.ts +1 -0
- package/dist/api/resources/profiles/client/index.js +17 -0
- package/dist/api/resources/profiles/client/requests/CourierProfileCreate2.d.ts +32 -0
- package/dist/api/resources/profiles/client/requests/GetCourierProfileRequest.d.ts +12 -0
- package/dist/api/resources/profiles/client/requests/GetHandleIsAvailableRequest.d.ts +15 -0
- package/dist/api/resources/profiles/client/requests/index.d.ts +3 -0
- package/dist/api/resources/profiles/index.d.ts +2 -0
- package/dist/api/resources/profiles/index.js +18 -0
- package/dist/api/resources/profiles/types/Type.d.ts +8 -0
- package/dist/api/resources/profiles/types/Type.js +10 -0
- package/dist/api/resources/profiles/types/index.d.ts +1 -0
- package/dist/api/resources/profiles/types/index.js +17 -0
- package/dist/api/resources/root/client/Client.d.ts +12 -12
- package/dist/api/resources/root/client/Client.js +31 -31
- package/dist/api/resources/root/types/PydanticResponse.d.ts +1 -1
- package/dist/api/resources/users/client/Client.js +1 -1
- package/dist/api/types/Action.d.ts +1 -1
- package/{api/types/Vehicle1.d.ts → dist/api/types/AppModelsDbOortVehicle1Vehicle1.d.ts} +2 -2
- package/dist/api/types/AppModelsDbProfilesCourierOrgProfile2Vehicle1.d.ts +10 -0
- package/dist/api/types/Cargo1.d.ts +6 -6
- package/dist/api/types/CargoClientCreate1.d.ts +3 -3
- package/dist/api/types/CourierAvailabilityEnum.d.ts +9 -0
- package/dist/api/types/CourierAvailabilityEnum.js +11 -0
- package/dist/api/types/CourierCity.d.ts +9 -0
- package/{api/types/CourierOrgConnectionInfo1.d.ts → dist/api/types/CourierOrgInfo1.d.ts} +12 -11
- package/dist/api/types/CourierOrgProfile3.d.ts +3 -4
- package/dist/api/types/CourierProfile2.d.ts +28 -0
- package/{api/types/MultipleTaskGroupsWithTasks.d.ts → dist/api/types/CourierProfileRes2.d.ts} +3 -2
- package/dist/api/types/CourierServiceEnum.d.ts +20 -0
- package/dist/api/types/CourierServiceEnum.js +22 -0
- package/dist/api/types/CourierState.d.ts +8 -0
- package/dist/api/types/DecodedJwtWithOrgAndUserId.d.ts +8 -8
- package/dist/api/types/Driver1.d.ts +8 -10
- package/dist/api/types/EmailAddress1.d.ts +8 -0
- package/dist/api/types/Expense1.d.ts +3 -3
- package/dist/api/types/Feature.d.ts +2 -2
- package/dist/api/types/GetOrderFullRes.d.ts +2 -2
- package/dist/api/types/GetTaskGroupWithFullTaskInfoRes.d.ts +8 -0
- package/dist/api/types/{TaskGroupWithTasks.d.ts → GetTaskGroupWithTasksRes.d.ts} +1 -1
- package/dist/api/types/GetTaskGroupsWithFullTaskInfoListRes.d.ts +7 -0
- package/dist/api/types/GetTaskGroupsWithTasksListRes.d.ts +7 -0
- package/dist/api/types/GetTaskInfoListRes.d.ts +8 -0
- package/dist/api/types/Incident1.d.ts +1 -1
- package/dist/api/types/IndustryEnum.d.ts +21 -0
- package/dist/api/types/IndustryEnum.js +23 -0
- package/dist/api/types/Insurance1.d.ts +1 -1
- package/dist/api/types/LineItem1.d.ts +1 -1
- package/dist/api/types/Milestone1.d.ts +12 -16
- package/dist/api/types/MilestoneClientCreate1.d.ts +1 -1
- package/dist/api/types/MilestoneTypeEnum1.d.ts +2 -3
- package/dist/api/types/MilestoneTypeEnum1.js +1 -2
- package/dist/api/types/Order1.d.ts +9 -11
- package/dist/api/types/OrgMemberDetails.d.ts +2 -2
- package/dist/api/types/OrgMembersAndDrivers.d.ts +1 -1
- package/dist/api/types/OrgPublicData2.d.ts +3 -4
- package/dist/api/types/PayablesInvoice1.d.ts +11 -11
- package/dist/api/types/PhoneNumber1.d.ts +8 -0
- package/dist/api/types/{CourierPayDriverRateSheet1.d.ts → RateSheet1.d.ts} +18 -18
- package/dist/api/types/RateSheet1.js +5 -0
- package/dist/api/types/ReceivablesInvoice1.d.ts +7 -7
- package/dist/api/types/Route1.d.ts +13 -0
- package/dist/api/types/Route1.js +5 -0
- package/dist/api/types/RouteByIdEnum.d.ts +8 -0
- package/dist/api/types/RouteByIdEnum.js +10 -0
- package/dist/api/types/RouteDetailRes.d.ts +9 -0
- package/dist/api/types/RouteDetailRes.js +5 -0
- package/dist/api/types/Shipper2.d.ts +8 -8
- package/dist/api/types/ShipperCourierConnection1.d.ts +4 -4
- package/dist/api/types/{ShipperOrgConnectionInfo1.d.ts → ShipperOrgInfo1.d.ts} +8 -7
- package/dist/api/types/ShipperOrgInfo1.js +5 -0
- package/dist/api/types/ShipperToCourier1.d.ts +16 -0
- package/dist/api/types/ShipperToCourier1.js +5 -0
- package/dist/api/types/ShipperUserInfo1.d.ts +7 -7
- package/dist/api/types/SocialLinks.d.ts +8 -0
- package/dist/api/types/SocialLinks.js +5 -0
- package/dist/api/types/StreetAddress1.d.ts +3 -3
- package/dist/api/types/StripeConnectInvoice1.d.ts +5 -5
- package/dist/api/types/Task1.d.ts +13 -14
- package/dist/api/types/TaskClientCreate1.d.ts +5 -6
- package/dist/api/types/TaskCreateBundle.d.ts +2 -4
- package/dist/api/types/TaskDetailRes.d.ts +9 -0
- package/dist/api/types/TaskDetailRes.js +5 -0
- package/dist/api/types/TaskGroup1.d.ts +6 -12
- package/dist/api/types/TaskGroupDetailRes.d.ts +8 -0
- package/dist/api/types/TaskGroupDetailRes.js +5 -0
- package/{api/types/TaskWithDetails.d.ts → dist/api/types/TaskInfo.d.ts} +3 -3
- package/dist/api/types/TaskInfo.js +5 -0
- package/dist/api/types/Tracker1.d.ts +1 -1
- package/dist/api/types/TrackerSession1.d.ts +1 -1
- package/dist/api/types/{UpdateTaskGroupRes.d.ts → UpdateRouteRes.d.ts} +1 -1
- package/dist/api/types/UpdateRouteRes.js +5 -0
- package/dist/api/types/UsStatesEnum.d.ts +58 -0
- package/dist/api/types/UsStatesEnum.js +60 -0
- package/dist/api/types/UserPublicData5.d.ts +6 -6
- package/dist/api/types/Vehicle1Input.d.ts +10 -0
- package/dist/api/types/Vehicle1Input.js +5 -0
- package/dist/api/types/VehicleRate1.d.ts +9 -0
- package/dist/api/types/VehicleRate1.js +5 -0
- package/dist/api/types/index.d.ts +32 -19
- package/dist/api/types/index.js +32 -19
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +759 -1435
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/oortConnections/client/requests/index.d.ts +0 -1
- package/api/resources/oortCourierPayDriverRate/client/requests/index.d.ts +0 -1
- package/api/resources/oortDrivers/client/requests/DriverCreateReq.d.ts +0 -17
- package/api/resources/oortMilestones/client/requests/MilestoneAddToTaskReq.d.ts +0 -16
- package/api/resources/oortNotificationPreferences/client/requests/NotificationPreferencesClientCreate1.d.ts +0 -18
- package/api/resources/oortNotificationPreferences/client/requests/index.d.ts +0 -1
- package/api/resources/oortOrgConnectionInfos/client/Client.d.ts +0 -102
- package/api/resources/oortOrgConnectionInfos/client/requests/CourierOrgConnectionInfoClientCreate1.d.ts +0 -24
- package/api/resources/oortOrgConnectionInfos/client/requests/CourierOrgConnectionInfoUpdate.d.ts +0 -18
- package/api/resources/oortOrgConnectionInfos/client/requests/ShipperOrgConnectionInfoClientCreate1.d.ts +0 -24
- package/api/resources/oortOrgConnectionInfos/client/requests/ShipperOrgConnectionInfoClientUpdate1.d.ts +0 -20
- package/api/resources/oortOrgConnectionInfos/client/requests/index.d.ts +0 -4
- package/api/resources/oortShipperUserInfo/client/Client.d.ts +0 -73
- package/api/resources/oortShipperUserInfo/client/requests/ShipperUserInfoClientCreate1.d.ts +0 -24
- package/api/resources/oortShipperUserInfo/client/requests/ShipperUserInfoClientUpdate1.d.ts +0 -21
- package/api/resources/oortShipperUserInfo/client/requests/index.d.ts +0 -2
- package/api/resources/oortTaskGroups/client/requests/SetTaskGroupPauseReq.d.ts +0 -14
- package/api/resources/oortTaskGroups/client/requests/index.d.ts +0 -2
- package/api/resources/orgs/client/requests/CreateOrgPublicDataReq.d.ts +0 -14
- package/api/types/DriverStatusEnum.d.ts +0 -9
- package/api/types/DriverStatusEnum.js +0 -11
- package/api/types/EmailReq.d.ts +0 -6
- package/api/types/EmailRes.d.ts +0 -7
- package/api/types/MultipleTaskGroupsDetailsResponse.d.ts +0 -7
- package/api/types/NotificationChannelEnum.d.ts +0 -10
- package/api/types/NotificationChannelEnum.js +0 -12
- package/api/types/NotificationPreferences1.d.ts +0 -18
- package/api/types/OrderStatusEnum1.d.ts +0 -10
- package/api/types/OrderStatusEnum1.js +0 -12
- package/api/types/TaskGroupDetailsResponse.d.ts +0 -8
- package/api/types/TaskGroupStatusEnum1.d.ts +0 -9
- package/api/types/TaskGroupStatusEnum1.js +0 -11
- package/dist/api/resources/oortConnections/client/requests/index.d.ts +0 -1
- package/dist/api/resources/oortCourierPayDriverRate/client/requests/index.d.ts +0 -1
- package/dist/api/resources/oortDrivers/client/requests/DriverCreateReq.d.ts +0 -17
- package/dist/api/resources/oortMilestones/client/requests/MilestoneAddToTaskReq.d.ts +0 -16
- package/dist/api/resources/oortNotificationPreferences/client/requests/NotificationPreferencesClientCreate1.d.ts +0 -18
- package/dist/api/resources/oortNotificationPreferences/client/requests/index.d.ts +0 -1
- package/dist/api/resources/oortOrgConnectionInfos/client/Client.d.ts +0 -102
- package/dist/api/resources/oortOrgConnectionInfos/client/requests/CourierOrgConnectionInfoClientCreate1.d.ts +0 -24
- package/dist/api/resources/oortOrgConnectionInfos/client/requests/CourierOrgConnectionInfoUpdate.d.ts +0 -18
- package/dist/api/resources/oortOrgConnectionInfos/client/requests/ShipperOrgConnectionInfoClientCreate1.d.ts +0 -24
- package/dist/api/resources/oortOrgConnectionInfos/client/requests/ShipperOrgConnectionInfoClientUpdate1.d.ts +0 -20
- package/dist/api/resources/oortOrgConnectionInfos/client/requests/index.d.ts +0 -4
- package/dist/api/resources/oortShipperUserInfo/client/Client.d.ts +0 -73
- package/dist/api/resources/oortShipperUserInfo/client/requests/ShipperUserInfoClientCreate1.d.ts +0 -24
- package/dist/api/resources/oortShipperUserInfo/client/requests/ShipperUserInfoClientUpdate1.d.ts +0 -21
- package/dist/api/resources/oortShipperUserInfo/client/requests/index.d.ts +0 -2
- package/dist/api/resources/oortTaskGroups/client/requests/SetTaskGroupPauseReq.d.ts +0 -14
- package/dist/api/resources/oortTaskGroups/client/requests/index.d.ts +0 -2
- package/dist/api/resources/orgs/client/requests/CreateOrgPublicDataReq.d.ts +0 -14
- package/dist/api/types/DriverStatusEnum.d.ts +0 -9
- package/dist/api/types/DriverStatusEnum.js +0 -11
- package/dist/api/types/EmailReq.d.ts +0 -6
- package/dist/api/types/EmailRes.d.ts +0 -7
- package/dist/api/types/MultipleTaskGroupsDetailsResponse.d.ts +0 -7
- package/dist/api/types/NotificationChannelEnum.d.ts +0 -10
- package/dist/api/types/NotificationChannelEnum.js +0 -12
- package/dist/api/types/NotificationPreferences1.d.ts +0 -18
- package/dist/api/types/OrderStatusEnum1.d.ts +0 -10
- package/dist/api/types/OrderStatusEnum1.js +0 -12
- package/dist/api/types/TaskGroupDetailsResponse.d.ts +0 -8
- package/dist/api/types/TaskGroupStatusEnum1.d.ts +0 -9
- package/dist/api/types/TaskGroupStatusEnum1.js +0 -11
- /package/api/resources/{oortConnections → messages}/client/index.d.ts +0 -0
- /package/api/resources/{oortConnections → messages}/client/index.js +0 -0
- /package/api/resources/{oortConnections/client/requests/CreateConnectionReq.js → messages/client/requests/ShipperToCourierCreate1.js} +0 -0
- /package/api/resources/{oortConnections → messages}/client/requests/index.js +0 -0
- /package/api/resources/{oortConnections → messages}/index.d.ts +0 -0
- /package/api/resources/{oortConnections → messages}/index.js +0 -0
- /package/api/resources/{oortNotificationPreferences → oortHandles}/client/index.d.ts +0 -0
- /package/api/resources/{oortNotificationPreferences → oortHandles}/client/index.js +0 -0
- /package/api/resources/{oortCourierPayDriverRate/client/requests/CourierPayDriverRateSheetClientCreate1.js → oortHandles/client/requests/HandlesReq.js} +0 -0
- /package/api/resources/{oortCourierPayDriverRate → oortHandles}/client/requests/index.js +0 -0
- /package/api/resources/{oortNotificationPreferences → oortHandles}/index.d.ts +0 -0
- /package/api/resources/{oortNotificationPreferences → oortHandles}/index.js +0 -0
- /package/api/resources/{oortOrgConnectionInfos → oortRateSheets}/client/index.d.ts +0 -0
- /package/api/resources/{oortOrgConnectionInfos → oortRateSheets}/client/index.js +0 -0
- /package/api/resources/{oortDrivers/client/requests/DriverCreateReq.js → oortRateSheets/client/requests/RateSheetClientCreate1.js} +0 -0
- /package/api/resources/{oortNotificationPreferences → oortRateSheets}/client/requests/index.js +0 -0
- /package/api/resources/{oortOrgConnectionInfos → oortRateSheets}/index.d.ts +0 -0
- /package/api/resources/{oortOrgConnectionInfos → oortRateSheets}/index.js +0 -0
- /package/api/resources/{oortShipperUserInfo → oortRoutes}/client/index.d.ts +0 -0
- /package/api/resources/{oortShipperUserInfo → oortRoutes}/client/index.js +0 -0
- /package/api/resources/{oortMilestones/client/requests/MilestoneAddToTaskReq.js → oortRoutes/client/requests/GetOortRoutesByIdRequest.js} +0 -0
- /package/api/resources/{oortNotificationPreferences/client/requests/NotificationPreferencesClientCreate1.js → oortRoutes/client/requests/RouteCreateReq.js} +0 -0
- /package/api/resources/{oortOrgConnectionInfos/client/requests/CourierOrgConnectionInfoClientCreate1.js → oortRoutes/client/requests/UpdateRouteReq.js} +0 -0
- /package/api/resources/{oortOrgConnectionInfos → oortRoutes}/client/requests/index.js +0 -0
- /package/api/resources/{oortShipperUserInfo → oortRoutes}/index.d.ts +0 -0
- /package/api/resources/{oortShipperUserInfo → oortRoutes}/index.js +0 -0
- /package/api/resources/{oortShipperUserInfo/client/requests → oortShippers/client}/index.js +0 -0
- /package/{dist/api/resources/oortConnections → api/resources/oortShippers}/index.d.ts +0 -0
- /package/{dist/api/resources/oortConnections → api/resources/oortShippers}/index.js +0 -0
- /package/api/resources/{oortOrgConnectionInfos/client/requests/CourierOrgConnectionInfoUpdate.js → orgs/client/requests/PostOrgPublicDataReq.js} +0 -0
- /package/{dist/api/resources/oortConnections → api/resources/profiles}/client/index.d.ts +0 -0
- /package/{dist/api/resources/oortConnections → api/resources/profiles}/client/index.js +0 -0
- /package/api/resources/{oortOrgConnectionInfos/client/requests/ShipperOrgConnectionInfoClientCreate1.js → profiles/client/requests/CourierProfileCreate2.js} +0 -0
- /package/api/resources/{oortOrgConnectionInfos/client/requests/ShipperOrgConnectionInfoClientUpdate1.js → profiles/client/requests/GetCourierProfileRequest.js} +0 -0
- /package/api/resources/{oortOrgProfiles/client/requests/GetAvatarRequest.js → profiles/client/requests/GetHandleIsAvailableRequest.js} +0 -0
- /package/api/resources/{oortTaskGroups → profiles}/client/requests/index.js +0 -0
- /package/api/{resources/oortShipperUserInfo/client/requests/ShipperUserInfoClientCreate1.js → types/AppModelsDbOortVehicle1Vehicle1.js} +0 -0
- /package/api/{resources/oortShipperUserInfo/client/requests/ShipperUserInfoClientUpdate1.js → types/AppModelsDbProfilesCourierOrgProfile2Vehicle1.js} +0 -0
- /package/api/{resources/oortTaskGroups/client/requests/SetTaskGroupPauseReq.js → types/CourierCity.js} +0 -0
- /package/api/{resources/oortTaskGroups/client/requests/UpdateTaskGroupReq.js → types/CourierOrgInfo1.js} +0 -0
- /package/api/{resources/orgs/client/requests/CreateOrgPublicDataReq.js → types/CourierProfile2.js} +0 -0
- /package/api/{resources/orgs/client/requests/UpdateOrgPublicDataReq.js → types/CourierProfileRes2.js} +0 -0
- /package/api/types/{CourierOrgConnectionInfo1.js → CourierState.js} +0 -0
- /package/api/types/{CourierPayDriverRateSheet1.js → EmailAddress1.js} +0 -0
- /package/api/types/{EmailReq.js → GetTaskGroupWithFullTaskInfoRes.js} +0 -0
- /package/api/types/{EmailRes.js → GetTaskGroupWithTasksRes.js} +0 -0
- /package/api/types/{MultipleTaskGroupsDetailsResponse.js → GetTaskGroupsWithFullTaskInfoListRes.js} +0 -0
- /package/api/types/{MultipleTaskGroupsWithTasks.js → GetTaskGroupsWithTasksListRes.js} +0 -0
- /package/api/types/{NotificationPreferences1.js → GetTaskInfoListRes.js} +0 -0
- /package/api/types/{ShipperOrgConnectionInfo1.js → PhoneNumber1.js} +0 -0
- /package/api/types/{TaskGroupDetailsResponse.js → RateSheet1.js} +0 -0
- /package/api/types/{TaskGroupWithDetails.js → Route1.js} +0 -0
- /package/api/types/{TaskGroupWithTasks.js → RouteDetailRes.js} +0 -0
- /package/api/types/{TaskWithDetails.js → ShipperOrgInfo1.js} +0 -0
- /package/api/types/{UpdateTaskGroupRes.js → ShipperToCourier1.js} +0 -0
- /package/api/types/{Vehicle1.js → SocialLinks.js} +0 -0
- /package/{dist/api/resources/oortConnections/client/requests/CreateConnectionReq.js → api/types/TaskDetailRes.js} +0 -0
- /package/{dist/api/resources/oortCourierPayDriverRate/client/requests/CourierPayDriverRateSheetClientCreate1.js → api/types/TaskGroupDetailRes.js} +0 -0
- /package/{dist/api/resources/oortDrivers/client/requests/DriverCreateReq.js → api/types/TaskInfo.js} +0 -0
- /package/{dist/api/resources/oortMilestones/client/requests/MilestoneAddToTaskReq.js → api/types/UpdateRouteRes.js} +0 -0
- /package/{dist/api/resources/oortNotificationPreferences/client/requests/NotificationPreferencesClientCreate1.js → api/types/Vehicle1Input.js} +0 -0
- /package/{dist/api/resources/oortOrgConnectionInfos/client/requests/CourierOrgConnectionInfoClientCreate1.js → api/types/VehicleRate1.js} +0 -0
- /package/dist/api/resources/{oortNotificationPreferences → messages}/client/index.d.ts +0 -0
- /package/dist/api/resources/{oortNotificationPreferences → messages}/client/index.js +0 -0
- /package/dist/api/resources/{oortOrgConnectionInfos/client/requests/CourierOrgConnectionInfoUpdate.js → messages/client/requests/ShipperToCourierCreate1.js} +0 -0
- /package/dist/api/resources/{oortConnections → messages}/client/requests/index.js +0 -0
- /package/dist/api/resources/{oortNotificationPreferences → messages}/index.d.ts +0 -0
- /package/dist/api/resources/{oortNotificationPreferences → messages}/index.js +0 -0
- /package/dist/api/resources/{oortOrgConnectionInfos → oortHandles}/client/index.d.ts +0 -0
- /package/dist/api/resources/{oortOrgConnectionInfos → oortHandles}/client/index.js +0 -0
- /package/dist/api/resources/{oortOrgConnectionInfos/client/requests/ShipperOrgConnectionInfoClientCreate1.js → oortHandles/client/requests/HandlesReq.js} +0 -0
- /package/dist/api/resources/{oortCourierPayDriverRate → oortHandles}/client/requests/index.js +0 -0
- /package/dist/api/resources/{oortOrgConnectionInfos → oortHandles}/index.d.ts +0 -0
- /package/dist/api/resources/{oortOrgConnectionInfos → oortHandles}/index.js +0 -0
- /package/dist/api/resources/{oortShipperUserInfo → oortRateSheets}/client/index.d.ts +0 -0
- /package/dist/api/resources/{oortShipperUserInfo → oortRateSheets}/client/index.js +0 -0
- /package/dist/api/resources/{oortOrgConnectionInfos/client/requests/ShipperOrgConnectionInfoClientUpdate1.js → oortRateSheets/client/requests/RateSheetClientCreate1.js} +0 -0
- /package/dist/api/resources/{oortNotificationPreferences → oortRateSheets}/client/requests/index.js +0 -0
- /package/dist/api/resources/{oortShipperUserInfo → oortRateSheets}/index.d.ts +0 -0
- /package/dist/api/resources/{oortShipperUserInfo → oortRateSheets}/index.js +0 -0
- /package/dist/api/resources/{oortOrgProfiles/client/requests/GetAvatarRequest.js → oortRoutes/client/requests/GetOortRoutesByIdRequest.js} +0 -0
- /package/dist/api/resources/{oortShipperUserInfo/client/requests/ShipperUserInfoClientCreate1.js → oortRoutes/client/requests/RouteCreateReq.js} +0 -0
- /package/dist/api/resources/{oortShipperUserInfo/client/requests/ShipperUserInfoClientUpdate1.js → oortRoutes/client/requests/UpdateRouteReq.js} +0 -0
- /package/dist/api/resources/{oortOrgConnectionInfos → oortRoutes}/client/requests/index.js +0 -0
- /package/dist/api/resources/{oortShipperUserInfo/client/requests → oortShippers/client}/index.js +0 -0
- /package/dist/api/resources/{oortTaskGroups/client/requests/SetTaskGroupPauseReq.js → orgs/client/requests/PostOrgPublicDataReq.js} +0 -0
- /package/dist/api/resources/{oortTaskGroups/client/requests/UpdateTaskGroupReq.js → profiles/client/requests/CourierProfileCreate2.js} +0 -0
- /package/dist/api/resources/{orgs/client/requests/CreateOrgPublicDataReq.js → profiles/client/requests/GetCourierProfileRequest.js} +0 -0
- /package/dist/api/resources/{orgs/client/requests/UpdateOrgPublicDataReq.js → profiles/client/requests/GetHandleIsAvailableRequest.js} +0 -0
- /package/dist/api/resources/{oortTaskGroups → profiles}/client/requests/index.js +0 -0
- /package/dist/api/types/{CourierOrgConnectionInfo1.js → AppModelsDbOortVehicle1Vehicle1.js} +0 -0
- /package/dist/api/types/{CourierPayDriverRateSheet1.js → AppModelsDbProfilesCourierOrgProfile2Vehicle1.js} +0 -0
- /package/dist/api/types/{EmailReq.js → CourierCity.js} +0 -0
- /package/dist/api/types/{EmailRes.js → CourierOrgInfo1.js} +0 -0
- /package/dist/api/types/{MultipleTaskGroupsDetailsResponse.js → CourierProfile2.js} +0 -0
- /package/dist/api/types/{MultipleTaskGroupsWithTasks.js → CourierProfileRes2.js} +0 -0
- /package/dist/api/types/{NotificationPreferences1.js → CourierState.js} +0 -0
- /package/dist/api/types/{ShipperOrgConnectionInfo1.js → EmailAddress1.js} +0 -0
- /package/dist/api/types/{TaskGroupDetailsResponse.js → GetTaskGroupWithFullTaskInfoRes.js} +0 -0
- /package/dist/api/types/{TaskGroupWithDetails.js → GetTaskGroupWithTasksRes.js} +0 -0
- /package/dist/api/types/{TaskGroupWithTasks.js → GetTaskGroupsWithFullTaskInfoListRes.js} +0 -0
- /package/dist/api/types/{TaskWithDetails.js → GetTaskGroupsWithTasksListRes.js} +0 -0
- /package/dist/api/types/{UpdateTaskGroupRes.js → GetTaskInfoListRes.js} +0 -0
- /package/dist/api/types/{Vehicle1.js → PhoneNumber1.js} +0 -0
|
@@ -59,21 +59,20 @@ class OortDrivers {
|
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
63
|
-
* @param {OortDrivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
+
* Uses user_id from the JWT. (originally included for use by Pytest)
|
|
64
63
|
*
|
|
65
|
-
* @
|
|
64
|
+
* @param {OortDrivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
65
|
*
|
|
67
66
|
* @example
|
|
68
|
-
* await client.oortDrivers.
|
|
67
|
+
* await client.oortDrivers.getOortDriversByUserId()
|
|
69
68
|
*/
|
|
70
|
-
|
|
69
|
+
getOortDriversByUserId(requestOptions) {
|
|
71
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
71
|
var _a, _b, _c;
|
|
73
72
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
74
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local,
|
|
73
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/by_user_id"),
|
|
75
74
|
method: "GET",
|
|
76
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.0
|
|
75
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.1.0-beta0", "User-Agent": "@chrt-inc/typescript-sdk/0.1.0-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
77
76
|
contentType: "application/json",
|
|
78
77
|
requestType: "json",
|
|
79
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -84,15 +83,10 @@ class OortDrivers {
|
|
|
84
83
|
return _response.body;
|
|
85
84
|
}
|
|
86
85
|
if (_response.error.reason === "status-code") {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
throw new errors.ChrtError({
|
|
92
|
-
statusCode: _response.error.statusCode,
|
|
93
|
-
body: _response.error.body,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
86
|
+
throw new errors.ChrtError({
|
|
87
|
+
statusCode: _response.error.statusCode,
|
|
88
|
+
body: _response.error.body,
|
|
89
|
+
});
|
|
96
90
|
}
|
|
97
91
|
switch (_response.error.reason) {
|
|
98
92
|
case "non-json":
|
|
@@ -101,7 +95,7 @@ class OortDrivers {
|
|
|
101
95
|
body: _response.error.rawBody,
|
|
102
96
|
});
|
|
103
97
|
case "timeout":
|
|
104
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/
|
|
98
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/by_user_id.");
|
|
105
99
|
case "unknown":
|
|
106
100
|
throw new errors.ChrtError({
|
|
107
101
|
message: _response.error.errorMessage,
|
|
@@ -110,20 +104,23 @@ class OortDrivers {
|
|
|
110
104
|
});
|
|
111
105
|
}
|
|
112
106
|
/**
|
|
113
|
-
*
|
|
107
|
+
* Can be used e.g. if a driver is removed from an org
|
|
114
108
|
*
|
|
109
|
+
* @param {string} driverId
|
|
115
110
|
* @param {OortDrivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
116
111
|
*
|
|
112
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
113
|
+
*
|
|
117
114
|
* @example
|
|
118
|
-
* await client.oortDrivers.
|
|
115
|
+
* await client.oortDrivers.deleteOortDrivers("driver_id")
|
|
119
116
|
*/
|
|
120
|
-
|
|
117
|
+
deleteOortDrivers(driverId, requestOptions) {
|
|
121
118
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
119
|
var _a, _b, _c;
|
|
123
120
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
124
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local,
|
|
125
|
-
method: "
|
|
126
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.0
|
|
121
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, `oort/drivers/${encodeURIComponent(driverId)}`),
|
|
122
|
+
method: "DELETE",
|
|
123
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.1.0-beta0", "User-Agent": "@chrt-inc/typescript-sdk/0.1.0-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
127
124
|
contentType: "application/json",
|
|
128
125
|
requestType: "json",
|
|
129
126
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -134,10 +131,15 @@ class OortDrivers {
|
|
|
134
131
|
return _response.body;
|
|
135
132
|
}
|
|
136
133
|
if (_response.error.reason === "status-code") {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
134
|
+
switch (_response.error.statusCode) {
|
|
135
|
+
case 422:
|
|
136
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body);
|
|
137
|
+
default:
|
|
138
|
+
throw new errors.ChrtError({
|
|
139
|
+
statusCode: _response.error.statusCode,
|
|
140
|
+
body: _response.error.body,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
141
143
|
}
|
|
142
144
|
switch (_response.error.reason) {
|
|
143
145
|
case "non-json":
|
|
@@ -146,7 +148,7 @@ class OortDrivers {
|
|
|
146
148
|
body: _response.error.rawBody,
|
|
147
149
|
});
|
|
148
150
|
case "timeout":
|
|
149
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
151
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /oort/drivers/{driver_id}.");
|
|
150
152
|
case "unknown":
|
|
151
153
|
throw new errors.ChrtError({
|
|
152
154
|
message: _response.error.errorMessage,
|
|
@@ -155,26 +157,27 @@ class OortDrivers {
|
|
|
155
157
|
});
|
|
156
158
|
}
|
|
157
159
|
/**
|
|
158
|
-
*
|
|
160
|
+
* Set a driver's activation status (active=true/false).
|
|
161
|
+
* This route is idempotent - setting a driver to their current status is allowed.
|
|
162
|
+
*
|
|
163
|
+
* @param {Chrt.SetDriverActivationReq} request
|
|
159
164
|
* @param {OortDrivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
160
165
|
*
|
|
161
166
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
162
167
|
*
|
|
163
168
|
* @example
|
|
164
|
-
* await client.oortDrivers.
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
* user_id: "user_id"
|
|
168
|
-
* }
|
|
169
|
+
* await client.oortDrivers.postOortDriversSetActivation({
|
|
170
|
+
* driver_object_id: "driver_object_id",
|
|
171
|
+
* active: true
|
|
169
172
|
* })
|
|
170
173
|
*/
|
|
171
|
-
|
|
174
|
+
postOortDriversSetActivation(request, requestOptions) {
|
|
172
175
|
return __awaiter(this, void 0, void 0, function* () {
|
|
173
176
|
var _a, _b, _c;
|
|
174
177
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
175
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/
|
|
178
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/set_activation"),
|
|
176
179
|
method: "POST",
|
|
177
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.0
|
|
180
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.1.0-beta0", "User-Agent": "@chrt-inc/typescript-sdk/0.1.0-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
178
181
|
contentType: "application/json",
|
|
179
182
|
requestType: "json",
|
|
180
183
|
body: request,
|
|
@@ -203,7 +206,7 @@ class OortDrivers {
|
|
|
203
206
|
body: _response.error.rawBody,
|
|
204
207
|
});
|
|
205
208
|
case "timeout":
|
|
206
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/
|
|
209
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/set_activation.");
|
|
207
210
|
case "unknown":
|
|
208
211
|
throw new errors.ChrtError({
|
|
209
212
|
message: _response.error.errorMessage,
|
|
@@ -230,7 +233,7 @@ class OortDrivers {
|
|
|
230
233
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
231
234
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/last_seen"),
|
|
232
235
|
method: "POST",
|
|
233
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.0
|
|
236
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.1.0-beta0", "User-Agent": "@chrt-inc/typescript-sdk/0.1.0-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
234
237
|
contentType: "application/json",
|
|
235
238
|
requestType: "json",
|
|
236
239
|
body: request,
|
|
@@ -268,67 +271,26 @@ class OortDrivers {
|
|
|
268
271
|
});
|
|
269
272
|
}
|
|
270
273
|
/**
|
|
271
|
-
*
|
|
272
|
-
*
|
|
274
|
+
* @param {Chrt.UpdateDriverDetailsReq} request
|
|
273
275
|
* @param {OortDrivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
274
276
|
*
|
|
275
|
-
* @
|
|
276
|
-
* await client.oortDrivers.getOortDriversByOrgId()
|
|
277
|
-
*/
|
|
278
|
-
getOortDriversByOrgId(requestOptions) {
|
|
279
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
280
|
-
var _a, _b, _c;
|
|
281
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
282
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/list/by_org_id"),
|
|
283
|
-
method: "GET",
|
|
284
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.0.162", "User-Agent": "@chrt-inc/typescript-sdk/0.0.162", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
285
|
-
contentType: "application/json",
|
|
286
|
-
requestType: "json",
|
|
287
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
288
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
289
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
290
|
-
});
|
|
291
|
-
if (_response.ok) {
|
|
292
|
-
return _response.body;
|
|
293
|
-
}
|
|
294
|
-
if (_response.error.reason === "status-code") {
|
|
295
|
-
throw new errors.ChrtError({
|
|
296
|
-
statusCode: _response.error.statusCode,
|
|
297
|
-
body: _response.error.body,
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
switch (_response.error.reason) {
|
|
301
|
-
case "non-json":
|
|
302
|
-
throw new errors.ChrtError({
|
|
303
|
-
statusCode: _response.error.statusCode,
|
|
304
|
-
body: _response.error.rawBody,
|
|
305
|
-
});
|
|
306
|
-
case "timeout":
|
|
307
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/list/by_org_id.");
|
|
308
|
-
case "unknown":
|
|
309
|
-
throw new errors.ChrtError({
|
|
310
|
-
message: _response.error.errorMessage,
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Uses the org_id from the JWT
|
|
317
|
-
*
|
|
318
|
-
* @param {OortDrivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
277
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
319
278
|
*
|
|
320
279
|
* @example
|
|
321
|
-
* await client.oortDrivers.
|
|
280
|
+
* await client.oortDrivers.putOortDriversUpdateDriverDetails({
|
|
281
|
+
* driver_object_id: "driver_object_id"
|
|
282
|
+
* })
|
|
322
283
|
*/
|
|
323
|
-
|
|
284
|
+
putOortDriversUpdateDriverDetails(request, requestOptions) {
|
|
324
285
|
return __awaiter(this, void 0, void 0, function* () {
|
|
325
286
|
var _a, _b, _c;
|
|
326
287
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
327
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/
|
|
328
|
-
method: "
|
|
329
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.0
|
|
288
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/update_driver_details"),
|
|
289
|
+
method: "PUT",
|
|
290
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.1.0-beta0", "User-Agent": "@chrt-inc/typescript-sdk/0.1.0-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
330
291
|
contentType: "application/json",
|
|
331
292
|
requestType: "json",
|
|
293
|
+
body: request,
|
|
332
294
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
333
295
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
334
296
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -337,10 +299,15 @@ class OortDrivers {
|
|
|
337
299
|
return _response.body;
|
|
338
300
|
}
|
|
339
301
|
if (_response.error.reason === "status-code") {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
302
|
+
switch (_response.error.statusCode) {
|
|
303
|
+
case 422:
|
|
304
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body);
|
|
305
|
+
default:
|
|
306
|
+
throw new errors.ChrtError({
|
|
307
|
+
statusCode: _response.error.statusCode,
|
|
308
|
+
body: _response.error.body,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
344
311
|
}
|
|
345
312
|
switch (_response.error.reason) {
|
|
346
313
|
case "non-json":
|
|
@@ -349,7 +316,7 @@ class OortDrivers {
|
|
|
349
316
|
body: _response.error.rawBody,
|
|
350
317
|
});
|
|
351
318
|
case "timeout":
|
|
352
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
319
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/drivers/update_driver_details.");
|
|
353
320
|
case "unknown":
|
|
354
321
|
throw new errors.ChrtError({
|
|
355
322
|
message: _response.error.errorMessage,
|
|
@@ -358,27 +325,24 @@ class OortDrivers {
|
|
|
358
325
|
});
|
|
359
326
|
}
|
|
360
327
|
/**
|
|
361
|
-
*
|
|
362
|
-
* This route is idempotent - setting a driver to their current status is allowed.
|
|
363
|
-
*
|
|
364
|
-
* @param {Chrt.SetDriverActivationReq} request
|
|
328
|
+
* @param {Chrt.OrgMemberDetails} request
|
|
365
329
|
* @param {OortDrivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
366
330
|
*
|
|
367
331
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
368
332
|
*
|
|
369
333
|
* @example
|
|
370
|
-
* await client.oortDrivers.
|
|
371
|
-
*
|
|
372
|
-
*
|
|
334
|
+
* await client.oortDrivers.postOortDriversCreate({
|
|
335
|
+
* role: "role",
|
|
336
|
+
* user_id: "user_id"
|
|
373
337
|
* })
|
|
374
338
|
*/
|
|
375
|
-
|
|
339
|
+
postOortDriversCreate(request, requestOptions) {
|
|
376
340
|
return __awaiter(this, void 0, void 0, function* () {
|
|
377
341
|
var _a, _b, _c;
|
|
378
342
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
379
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/
|
|
343
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/create"),
|
|
380
344
|
method: "POST",
|
|
381
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.0
|
|
345
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.1.0-beta0", "User-Agent": "@chrt-inc/typescript-sdk/0.1.0-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
382
346
|
contentType: "application/json",
|
|
383
347
|
requestType: "json",
|
|
384
348
|
body: request,
|
|
@@ -407,7 +371,7 @@ class OortDrivers {
|
|
|
407
371
|
body: _response.error.rawBody,
|
|
408
372
|
});
|
|
409
373
|
case "timeout":
|
|
410
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/
|
|
374
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/create.");
|
|
411
375
|
case "unknown":
|
|
412
376
|
throw new errors.ChrtError({
|
|
413
377
|
message: _response.error.errorMessage,
|
|
@@ -416,26 +380,22 @@ class OortDrivers {
|
|
|
416
380
|
});
|
|
417
381
|
}
|
|
418
382
|
/**
|
|
419
|
-
*
|
|
420
|
-
* @param {OortDrivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
383
|
+
* Uses the org_id from the JWT
|
|
421
384
|
*
|
|
422
|
-
* @
|
|
385
|
+
* @param {OortDrivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
423
386
|
*
|
|
424
387
|
* @example
|
|
425
|
-
* await client.oortDrivers.
|
|
426
|
-
* driver_object_id: "driver_object_id"
|
|
427
|
-
* })
|
|
388
|
+
* await client.oortDrivers.getOortDriversListOrgMembersAndDrivers()
|
|
428
389
|
*/
|
|
429
|
-
|
|
390
|
+
getOortDriversListOrgMembersAndDrivers(requestOptions) {
|
|
430
391
|
return __awaiter(this, void 0, void 0, function* () {
|
|
431
392
|
var _a, _b, _c;
|
|
432
393
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
433
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/
|
|
434
|
-
method: "
|
|
435
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.0
|
|
394
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/list/org_members_and_drivers"),
|
|
395
|
+
method: "GET",
|
|
396
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.1.0-beta0", "User-Agent": "@chrt-inc/typescript-sdk/0.1.0-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
436
397
|
contentType: "application/json",
|
|
437
398
|
requestType: "json",
|
|
438
|
-
body: request,
|
|
439
399
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
440
400
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
441
401
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -444,15 +404,10 @@ class OortDrivers {
|
|
|
444
404
|
return _response.body;
|
|
445
405
|
}
|
|
446
406
|
if (_response.error.reason === "status-code") {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
throw new errors.ChrtError({
|
|
452
|
-
statusCode: _response.error.statusCode,
|
|
453
|
-
body: _response.error.body,
|
|
454
|
-
});
|
|
455
|
-
}
|
|
407
|
+
throw new errors.ChrtError({
|
|
408
|
+
statusCode: _response.error.statusCode,
|
|
409
|
+
body: _response.error.body,
|
|
410
|
+
});
|
|
456
411
|
}
|
|
457
412
|
switch (_response.error.reason) {
|
|
458
413
|
case "non-json":
|
|
@@ -461,7 +416,7 @@ class OortDrivers {
|
|
|
461
416
|
body: _response.error.rawBody,
|
|
462
417
|
});
|
|
463
418
|
case "timeout":
|
|
464
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
419
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/list/org_members_and_drivers.");
|
|
465
420
|
case "unknown":
|
|
466
421
|
throw new errors.ChrtError({
|
|
467
422
|
message: _response.error.errorMessage,
|
|
@@ -470,23 +425,20 @@ class OortDrivers {
|
|
|
470
425
|
});
|
|
471
426
|
}
|
|
472
427
|
/**
|
|
473
|
-
*
|
|
428
|
+
* Used org_id from the JWT
|
|
474
429
|
*
|
|
475
|
-
* @param {string} driverId
|
|
476
430
|
* @param {OortDrivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
477
431
|
*
|
|
478
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
479
|
-
*
|
|
480
432
|
* @example
|
|
481
|
-
* await client.oortDrivers.
|
|
433
|
+
* await client.oortDrivers.getOortDriversByOrgId()
|
|
482
434
|
*/
|
|
483
|
-
|
|
435
|
+
getOortDriversByOrgId(requestOptions) {
|
|
484
436
|
return __awaiter(this, void 0, void 0, function* () {
|
|
485
437
|
var _a, _b, _c;
|
|
486
438
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
487
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local,
|
|
488
|
-
method: "
|
|
489
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.0
|
|
439
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/drivers/list/by_org_id"),
|
|
440
|
+
method: "GET",
|
|
441
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk", "X-Fern-SDK-Version": "0.1.0-beta0", "User-Agent": "@chrt-inc/typescript-sdk/0.1.0-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
490
442
|
contentType: "application/json",
|
|
491
443
|
requestType: "json",
|
|
492
444
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -497,15 +449,10 @@ class OortDrivers {
|
|
|
497
449
|
return _response.body;
|
|
498
450
|
}
|
|
499
451
|
if (_response.error.reason === "status-code") {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
throw new errors.ChrtError({
|
|
505
|
-
statusCode: _response.error.statusCode,
|
|
506
|
-
body: _response.error.body,
|
|
507
|
-
});
|
|
508
|
-
}
|
|
452
|
+
throw new errors.ChrtError({
|
|
453
|
+
statusCode: _response.error.statusCode,
|
|
454
|
+
body: _response.error.body,
|
|
455
|
+
});
|
|
509
456
|
}
|
|
510
457
|
switch (_response.error.reason) {
|
|
511
458
|
case "non-json":
|
|
@@ -514,7 +461,7 @@ class OortDrivers {
|
|
|
514
461
|
body: _response.error.rawBody,
|
|
515
462
|
});
|
|
516
463
|
case "timeout":
|
|
517
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
464
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/list/by_org_id.");
|
|
518
465
|
case "unknown":
|
|
519
466
|
throw new errors.ChrtError({
|
|
520
467
|
message: _response.error.errorMessage,
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* driver_object_id: "driver_object_id",
|
|
8
|
+
* active: true
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export interface SetDriverActivationReq {
|
|
12
|
-
active: boolean;
|
|
13
12
|
driver_object_id: string;
|
|
13
|
+
active: boolean;
|
|
14
14
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Chrt from "../../../../index";
|
|
5
4
|
/**
|
|
6
5
|
* @example
|
|
7
6
|
* {
|
|
@@ -14,5 +13,4 @@ export interface UpdateDriverDetailsReq {
|
|
|
14
13
|
email_address_secondary?: string;
|
|
15
14
|
phone_number_primary?: string;
|
|
16
15
|
phone_number_secondary?: string;
|
|
17
|
-
vehicle_types?: Chrt.VehicleTypeEnum[];
|
|
18
16
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { type DriverCreateReq } from "./DriverCreateReq";
|
|
2
|
-
export { type DriverLastSeenReq } from "./DriverLastSeenReq";
|
|
3
1
|
export { type SetDriverActivationReq } from "./SetDriverActivationReq";
|
|
2
|
+
export { type DriverLastSeenReq } from "./DriverLastSeenReq";
|
|
4
3
|
export { type UpdateDriverDetailsReq } from "./UpdateDriverDetailsReq";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../environments";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
6
|
import * as Chrt from "../../../index";
|
|
7
|
-
export declare namespace
|
|
7
|
+
export declare namespace OortHandles {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
@@ -23,36 +23,43 @@ export declare namespace OortConnections {
|
|
|
23
23
|
headers?: Record<string, string>;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
export declare class
|
|
27
|
-
protected readonly _options:
|
|
28
|
-
constructor(_options?:
|
|
26
|
+
export declare class OortHandles {
|
|
27
|
+
protected readonly _options: OortHandles.Options;
|
|
28
|
+
constructor(_options?: OortHandles.Options);
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* This uses the org_id from the JWT
|
|
31
|
+
*
|
|
32
|
+
* @param {OortHandles.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
33
|
*
|
|
32
34
|
* @example
|
|
33
|
-
* await client.
|
|
35
|
+
* await client.oortHandles.getHandlesByOrgId()
|
|
34
36
|
*/
|
|
35
|
-
|
|
37
|
+
getHandlesByOrgId(requestOptions?: OortHandles.RequestOptions): Promise<string>;
|
|
36
38
|
/**
|
|
37
|
-
*
|
|
39
|
+
* Check if a handle is available, returns true if it is, false if it is not
|
|
40
|
+
*
|
|
41
|
+
* @param {string} handle
|
|
42
|
+
* @param {OortHandles.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
|
+
*
|
|
44
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
38
45
|
*
|
|
39
46
|
* @example
|
|
40
|
-
* await client.
|
|
47
|
+
* await client.oortHandles.getAvailability("handle")
|
|
41
48
|
*/
|
|
42
|
-
|
|
49
|
+
getAvailability(handle: string, requestOptions?: OortHandles.RequestOptions): Promise<boolean>;
|
|
43
50
|
/**
|
|
44
|
-
*
|
|
51
|
+
* Create a new handle for an org
|
|
45
52
|
*
|
|
46
|
-
* @param {Chrt.
|
|
47
|
-
* @param {
|
|
53
|
+
* @param {Chrt.HandlesReq} request
|
|
54
|
+
* @param {OortHandles.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
55
|
*
|
|
49
56
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
50
57
|
*
|
|
51
58
|
* @example
|
|
52
|
-
* await client.
|
|
59
|
+
* await client.oortHandles.createHandle({
|
|
53
60
|
* handle: "handle"
|
|
54
61
|
* })
|
|
55
62
|
*/
|
|
56
|
-
|
|
63
|
+
createHandle(request: Chrt.HandlesReq, requestOptions?: OortHandles.RequestOptions): Promise<boolean>;
|
|
57
64
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
58
65
|
}
|