@samsarahq/samsara 5.5.2 → 5.5.3
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/README.md +12 -20
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/addresses/client/Client.d.ts +9 -14
- package/dist/cjs/api/resources/addresses/client/Client.js +17 -36
- package/dist/cjs/api/resources/addresses/client/requests/UpdateAddressRequest.d.ts +1 -5
- package/dist/cjs/api/resources/addresses/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/assets/client/Client.d.ts +12 -16
- package/dist/cjs/api/resources/assets/client/Client.js +24 -30
- package/dist/cjs/api/resources/assets/client/requests/V1GetAssetLocationRequest.d.ts +0 -3
- package/dist/cjs/api/resources/assets/client/requests/V1GetAssetReeferRequest.d.ts +0 -3
- package/dist/cjs/api/resources/assets/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/attributes/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/attributes/client/Client.js +18 -30
- package/dist/cjs/api/resources/attributes/client/requests/DeleteAttributesRequest.d.ts +0 -3
- package/dist/cjs/api/resources/attributes/client/requests/GetAttributeRequest.d.ts +0 -3
- package/dist/cjs/api/resources/attributes/client/requests/UpdateAttributeRequest.d.ts +0 -3
- package/dist/cjs/api/resources/betaApIs/client/Client.d.ts +12 -15
- package/dist/cjs/api/resources/betaApIs/client/Client.js +24 -31
- package/dist/cjs/api/resources/betaApIs/client/requests/EngineImmobilizerUpdateEngineImmobilizerStateRequestBody.d.ts +0 -3
- package/dist/cjs/api/resources/betaApIs/client/requests/EquipmentPatchEquipmentRequestBody.d.ts +1 -5
- package/dist/cjs/api/resources/betaApIs/client/requests/FunctionsStartFunctionRunRequestBody.d.ts +0 -3
- package/dist/cjs/api/resources/betaApIs/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +9 -14
- package/dist/cjs/api/resources/contacts/client/Client.js +17 -36
- package/dist/cjs/api/resources/contacts/client/requests/UpdateContactRequest.d.ts +1 -5
- package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/documents/client/Client.d.ts +9 -15
- package/dist/cjs/api/resources/documents/client/Client.js +15 -24
- package/dist/cjs/api/resources/documents/client/requests/index.d.ts +0 -3
- package/dist/cjs/api/resources/drivers/client/Client.d.ts +9 -14
- package/dist/cjs/api/resources/drivers/client/Client.js +17 -36
- package/dist/cjs/api/resources/drivers/client/requests/UpdateDriverRequest.d.ts +1 -5
- package/dist/cjs/api/resources/drivers/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/equipment/client/Client.d.ts +3 -5
- package/dist/cjs/api/resources/equipment/client/Client.js +5 -8
- package/dist/cjs/api/resources/equipment/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/fleet/resources/attributes/client/Client.d.ts +3 -6
- package/dist/cjs/api/resources/fleet/resources/attributes/client/Client.js +5 -8
- package/dist/cjs/api/resources/fleet/resources/attributes/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/fleet/resources/attributes/client/index.js +0 -15
- package/dist/cjs/api/resources/fleet/resources/carrierProposedAssignments/client/Client.d.ts +3 -5
- package/dist/cjs/api/resources/fleet/resources/carrierProposedAssignments/client/Client.js +5 -8
- package/dist/cjs/api/resources/fleet/resources/carrierProposedAssignments/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/fleet/resources/carrierProposedAssignments/client/index.js +0 -15
- package/dist/cjs/api/resources/fleet/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/fleet/resources/index.js +0 -5
- package/dist/cjs/api/resources/forms/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/forms/client/Client.js +2 -3
- package/dist/cjs/api/resources/forms/client/requests/FormSubmissionsPostFormSubmissionRequestBody.d.ts +1 -11
- package/dist/cjs/api/resources/forms/client/requests/FormSubmissionsPostFormSubmissionRequestBody.js +0 -8
- package/dist/cjs/api/resources/forms/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/forms/client/requests/index.js +1 -3
- package/dist/cjs/api/resources/gateways/client/Client.d.ts +3 -5
- package/dist/cjs/api/resources/gateways/client/Client.js +5 -8
- package/dist/cjs/api/resources/gateways/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/hoursOfService/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/hoursOfService/client/Client.js +7 -19
- package/dist/cjs/api/resources/hoursOfService/client/requests/GetHosDailyLogsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/hoursOfService/client/requests/InlineObject1.d.ts +0 -3
- package/dist/cjs/api/resources/hoursOfService/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/hoursOfService/types/index.js +0 -1
- package/dist/cjs/api/resources/hubs/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/hubs/client/Client.js +6 -18
- package/dist/cjs/api/resources/hubs/client/requests/HubLocationsUpdateHubLocationRequestBody.d.ts +0 -3
- package/dist/cjs/api/resources/ifta/client/Client.d.ts +3 -5
- package/dist/cjs/api/resources/ifta/client/Client.js +5 -8
- package/dist/cjs/api/resources/ifta/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/index.js +0 -1
- package/dist/cjs/api/resources/industrial/client/Client.d.ts +20 -25
- package/dist/cjs/api/resources/industrial/client/Client.js +44 -63
- package/dist/cjs/api/resources/industrial/client/requests/AssetDataOutputsPatchAssetDataOutputsRequestBody.d.ts +0 -3
- package/dist/cjs/api/resources/industrial/client/requests/AssetPatch.d.ts +1 -5
- package/dist/cjs/api/resources/industrial/client/requests/GetVisionRunsByCameraRequest.d.ts +0 -3
- package/dist/cjs/api/resources/industrial/client/requests/V1GetVisionLatestRunCameraRequest.d.ts +1 -5
- package/dist/cjs/api/resources/industrial/client/requests/V1GetVisionRunsByCameraAndProgramRequest.d.ts +1 -11
- package/dist/cjs/api/resources/industrial/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/industrial/resources/assets/client/Client.d.ts +3 -5
- package/dist/cjs/api/resources/industrial/resources/assets/client/Client.js +5 -8
- package/dist/cjs/api/resources/industrial/resources/assets/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/industrial/resources/assets/client/index.js +0 -15
- package/dist/cjs/api/resources/industrial/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/industrial/resources/index.js +0 -4
- package/dist/cjs/api/resources/legacyApIs/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/legacyApIs/client/Client.js +6 -6
- package/dist/cjs/api/resources/legacyApIs/client/requests/V1GetVehicleHarshEventRequest.d.ts +0 -3
- package/dist/cjs/api/resources/maintenance/client/Client.d.ts +13 -17
- package/dist/cjs/api/resources/maintenance/client/Client.js +29 -46
- package/dist/cjs/api/resources/maintenance/client/requests/CreateDvirRequest.d.ts +1 -9
- package/dist/cjs/api/resources/maintenance/client/requests/CreateDvirRequest.js +0 -4
- package/dist/cjs/api/resources/maintenance/client/requests/DefectPatch.d.ts +1 -5
- package/dist/cjs/api/resources/maintenance/client/requests/GetDefectRequest.d.ts +1 -5
- package/dist/cjs/api/resources/maintenance/client/requests/GetDvirRequest.d.ts +1 -5
- package/dist/cjs/api/resources/maintenance/client/requests/UpdateDvirRequest.d.ts +0 -3
- package/dist/cjs/api/resources/previewApIs/client/Client.d.ts +6 -10
- package/dist/cjs/api/resources/previewApIs/client/Client.js +10 -16
- package/dist/cjs/api/resources/previewApIs/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/routes/client/Client.d.ts +12 -17
- package/dist/cjs/api/resources/routes/client/Client.js +27 -46
- package/dist/cjs/api/resources/routes/client/requests/FetchRouteRequest.d.ts +1 -5
- package/dist/cjs/api/resources/routes/client/requests/GetRoutesFeedRequest.d.ts +1 -2
- package/dist/cjs/api/resources/routes/client/requests/InlineObject.d.ts +1 -5
- package/dist/cjs/api/resources/routes/client/requests/RoutesPatchRouteRequestBody.d.ts +1 -5
- package/dist/cjs/api/resources/routes/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/routes/index.d.ts +0 -1
- package/dist/cjs/api/resources/routes/index.js +0 -1
- package/dist/cjs/api/resources/safety/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/safety/client/Client.js +12 -12
- package/dist/cjs/api/resources/safety/client/requests/V1GetDriverSafetyScoreRequest.d.ts +0 -3
- package/dist/cjs/api/resources/safety/client/requests/V1GetVehicleSafetyScoreRequest.d.ts +0 -3
- package/dist/cjs/api/resources/tags/client/Client.d.ts +12 -18
- package/dist/cjs/api/resources/tags/client/Client.js +24 -45
- package/dist/cjs/api/resources/tags/client/requests/PatchTagRequest.d.ts +1 -5
- package/dist/cjs/api/resources/tags/client/requests/ReplaceTagRequest.d.ts +1 -5
- package/dist/cjs/api/resources/tags/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/trailerAssignments/client/Client.d.ts +3 -4
- package/dist/cjs/api/resources/trailerAssignments/client/Client.js +7 -8
- package/dist/cjs/api/resources/trailerAssignments/client/requests/V1GetFleetTrailerAssignmentsRequest.d.ts +1 -5
- package/dist/cjs/api/resources/trailers/client/Client.d.ts +9 -14
- package/dist/cjs/api/resources/trailers/client/Client.js +17 -36
- package/dist/cjs/api/resources/trailers/client/requests/TrailersUpdateTrailerRequestBody.d.ts +1 -5
- package/dist/cjs/api/resources/trailers/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/users/client/Client.d.ts +9 -14
- package/dist/cjs/api/resources/users/client/Client.js +17 -36
- package/dist/cjs/api/resources/users/client/requests/UpdateUserRequest.d.ts +1 -5
- package/dist/cjs/api/resources/users/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/vehicles/client/Client.d.ts +6 -9
- package/dist/cjs/api/resources/vehicles/client/Client.js +12 -28
- package/dist/cjs/api/resources/vehicles/client/requests/UpdateVehicleRequest.d.ts +1 -5
- package/dist/cjs/api/resources/vehicles/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +9 -14
- package/dist/cjs/api/resources/webhooks/client/Client.js +17 -36
- package/dist/cjs/api/resources/webhooks/client/requests/WebhooksPatchWebhookRequestBody.d.ts +1 -5
- package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/types/DriverAssignmentObjectResponseBody.d.ts +1 -8
- package/dist/cjs/api/types/DriverAssignmentObjectResponseBody.js +0 -8
- package/dist/cjs/api/types/FormsApprovalConfigObjectResponseBody.d.ts +1 -8
- package/dist/cjs/api/types/FormsApprovalConfigObjectResponseBody.js +0 -8
- package/dist/cjs/api/types/FuelLevelTriggerDetailsObjectRequestBody.d.ts +1 -8
- package/dist/cjs/api/types/FuelLevelTriggerDetailsObjectRequestBody.js +0 -8
- package/dist/cjs/api/types/FuelLevelTriggerDetailsObjectResponseBody.d.ts +1 -8
- package/dist/cjs/api/types/FuelLevelTriggerDetailsObjectResponseBody.js +0 -8
- package/dist/cjs/api/types/IdlingEventObjectV20251023ResponseBody.d.ts +1 -8
- package/dist/cjs/api/types/IdlingEventObjectV20251023ResponseBody.js +0 -8
- package/dist/cjs/api/types/PatchIssueRequestBodyAssignedToRequestBody.d.ts +1 -8
- package/dist/cjs/api/types/PatchIssueRequestBodyAssignedToRequestBody.js +0 -8
- package/dist/cjs/api/types/ReadingDatapointRequestBody.d.ts +1 -8
- package/dist/cjs/api/types/ReadingDatapointRequestBody.js +0 -8
- package/dist/cjs/api/types/ResolvedBy.d.ts +1 -8
- package/dist/cjs/api/types/ResolvedBy.js +0 -8
- package/dist/cjs/api/types/RouteFeedObjectResponseBody.d.ts +1 -6
- package/dist/cjs/api/types/RouteFeedObjectResponseBody.js +0 -4
- package/dist/cjs/api/types/RouteStopDetailsObjectResponseBody.d.ts +1 -6
- package/dist/cjs/api/types/RouteStopDetailsObjectResponseBody.js +0 -4
- package/dist/cjs/api/types/TrainingLearnerObjectResponseBody.d.ts +1 -8
- package/dist/cjs/api/types/TrainingLearnerObjectResponseBody.js +0 -8
- package/dist/cjs/api/types/VehicleAssignmentObjectResponseBody.d.ts +1 -8
- package/dist/cjs/api/types/VehicleAssignmentObjectResponseBody.js +0 -8
- package/dist/cjs/api/types/WorkOrderMoneyObjectRequestBody.d.ts +1 -8
- package/dist/cjs/api/types/WorkOrderMoneyObjectRequestBody.js +0 -8
- package/dist/cjs/api/types/WorkOrderMoneyObjectResponseBody.d.ts +1 -8
- package/dist/cjs/api/types/WorkOrderMoneyObjectResponseBody.js +0 -8
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/addresses/client/Client.d.mts +9 -14
- package/dist/esm/api/resources/addresses/client/Client.mjs +17 -36
- package/dist/esm/api/resources/addresses/client/requests/UpdateAddressRequest.d.mts +1 -5
- package/dist/esm/api/resources/addresses/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/assets/client/Client.d.mts +12 -16
- package/dist/esm/api/resources/assets/client/Client.mjs +24 -30
- package/dist/esm/api/resources/assets/client/requests/V1GetAssetLocationRequest.d.mts +0 -3
- package/dist/esm/api/resources/assets/client/requests/V1GetAssetReeferRequest.d.mts +0 -3
- package/dist/esm/api/resources/assets/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/attributes/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/attributes/client/Client.mjs +18 -30
- package/dist/esm/api/resources/attributes/client/requests/DeleteAttributesRequest.d.mts +0 -3
- package/dist/esm/api/resources/attributes/client/requests/GetAttributeRequest.d.mts +0 -3
- package/dist/esm/api/resources/attributes/client/requests/UpdateAttributeRequest.d.mts +0 -3
- package/dist/esm/api/resources/betaApIs/client/Client.d.mts +12 -15
- package/dist/esm/api/resources/betaApIs/client/Client.mjs +24 -31
- package/dist/esm/api/resources/betaApIs/client/requests/EngineImmobilizerUpdateEngineImmobilizerStateRequestBody.d.mts +0 -3
- package/dist/esm/api/resources/betaApIs/client/requests/EquipmentPatchEquipmentRequestBody.d.mts +1 -5
- package/dist/esm/api/resources/betaApIs/client/requests/FunctionsStartFunctionRunRequestBody.d.mts +0 -3
- package/dist/esm/api/resources/betaApIs/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/contacts/client/Client.d.mts +9 -14
- package/dist/esm/api/resources/contacts/client/Client.mjs +17 -36
- package/dist/esm/api/resources/contacts/client/requests/UpdateContactRequest.d.mts +1 -5
- package/dist/esm/api/resources/contacts/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/documents/client/Client.d.mts +9 -15
- package/dist/esm/api/resources/documents/client/Client.mjs +15 -24
- package/dist/esm/api/resources/documents/client/requests/index.d.mts +0 -3
- package/dist/esm/api/resources/drivers/client/Client.d.mts +9 -14
- package/dist/esm/api/resources/drivers/client/Client.mjs +17 -36
- package/dist/esm/api/resources/drivers/client/requests/UpdateDriverRequest.d.mts +1 -5
- package/dist/esm/api/resources/drivers/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/equipment/client/Client.d.mts +3 -5
- package/dist/esm/api/resources/equipment/client/Client.mjs +5 -8
- package/dist/esm/api/resources/equipment/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/fleet/resources/attributes/client/Client.d.mts +3 -6
- package/dist/esm/api/resources/fleet/resources/attributes/client/Client.mjs +5 -8
- package/dist/esm/api/resources/fleet/resources/attributes/client/index.d.mts +1 -1
- package/dist/esm/api/resources/fleet/resources/attributes/client/index.mjs +1 -1
- package/dist/esm/api/resources/fleet/resources/carrierProposedAssignments/client/Client.d.mts +3 -5
- package/dist/esm/api/resources/fleet/resources/carrierProposedAssignments/client/Client.mjs +5 -8
- package/dist/esm/api/resources/fleet/resources/carrierProposedAssignments/client/index.d.mts +1 -1
- package/dist/esm/api/resources/fleet/resources/carrierProposedAssignments/client/index.mjs +1 -1
- package/dist/esm/api/resources/fleet/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/fleet/resources/index.mjs +0 -2
- package/dist/esm/api/resources/forms/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/forms/client/Client.mjs +2 -3
- package/dist/esm/api/resources/forms/client/requests/FormSubmissionsPostFormSubmissionRequestBody.d.mts +1 -11
- package/dist/esm/api/resources/forms/client/requests/FormSubmissionsPostFormSubmissionRequestBody.mjs +1 -7
- package/dist/esm/api/resources/forms/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/forms/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/gateways/client/Client.d.mts +3 -5
- package/dist/esm/api/resources/gateways/client/Client.mjs +5 -8
- package/dist/esm/api/resources/gateways/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/hoursOfService/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/hoursOfService/client/Client.mjs +7 -19
- package/dist/esm/api/resources/hoursOfService/client/requests/GetHosDailyLogsRequest.d.mts +1 -1
- package/dist/esm/api/resources/hoursOfService/client/requests/InlineObject1.d.mts +0 -3
- package/dist/esm/api/resources/hoursOfService/types/index.d.mts +0 -1
- package/dist/esm/api/resources/hoursOfService/types/index.mjs +0 -1
- package/dist/esm/api/resources/hubs/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/hubs/client/Client.mjs +6 -18
- package/dist/esm/api/resources/hubs/client/requests/HubLocationsUpdateHubLocationRequestBody.d.mts +0 -3
- package/dist/esm/api/resources/ifta/client/Client.d.mts +3 -5
- package/dist/esm/api/resources/ifta/client/Client.mjs +5 -8
- package/dist/esm/api/resources/ifta/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/index.mjs +0 -1
- package/dist/esm/api/resources/industrial/client/Client.d.mts +20 -25
- package/dist/esm/api/resources/industrial/client/Client.mjs +44 -63
- package/dist/esm/api/resources/industrial/client/requests/AssetDataOutputsPatchAssetDataOutputsRequestBody.d.mts +0 -3
- package/dist/esm/api/resources/industrial/client/requests/AssetPatch.d.mts +1 -5
- package/dist/esm/api/resources/industrial/client/requests/GetVisionRunsByCameraRequest.d.mts +0 -3
- package/dist/esm/api/resources/industrial/client/requests/V1GetVisionLatestRunCameraRequest.d.mts +1 -5
- package/dist/esm/api/resources/industrial/client/requests/V1GetVisionRunsByCameraAndProgramRequest.d.mts +1 -11
- package/dist/esm/api/resources/industrial/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/industrial/resources/assets/client/Client.d.mts +3 -5
- package/dist/esm/api/resources/industrial/resources/assets/client/Client.mjs +5 -8
- package/dist/esm/api/resources/industrial/resources/assets/client/index.d.mts +1 -1
- package/dist/esm/api/resources/industrial/resources/assets/client/index.mjs +1 -1
- package/dist/esm/api/resources/industrial/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/industrial/resources/index.mjs +0 -1
- package/dist/esm/api/resources/legacyApIs/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/legacyApIs/client/Client.mjs +6 -6
- package/dist/esm/api/resources/legacyApIs/client/requests/V1GetVehicleHarshEventRequest.d.mts +0 -3
- package/dist/esm/api/resources/maintenance/client/Client.d.mts +13 -17
- package/dist/esm/api/resources/maintenance/client/Client.mjs +29 -46
- package/dist/esm/api/resources/maintenance/client/requests/CreateDvirRequest.d.mts +1 -9
- package/dist/esm/api/resources/maintenance/client/requests/CreateDvirRequest.mjs +0 -4
- package/dist/esm/api/resources/maintenance/client/requests/DefectPatch.d.mts +1 -5
- package/dist/esm/api/resources/maintenance/client/requests/GetDefectRequest.d.mts +1 -5
- package/dist/esm/api/resources/maintenance/client/requests/GetDvirRequest.d.mts +1 -5
- package/dist/esm/api/resources/maintenance/client/requests/UpdateDvirRequest.d.mts +0 -3
- package/dist/esm/api/resources/previewApIs/client/Client.d.mts +6 -10
- package/dist/esm/api/resources/previewApIs/client/Client.mjs +10 -16
- package/dist/esm/api/resources/previewApIs/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/routes/client/Client.d.mts +12 -17
- package/dist/esm/api/resources/routes/client/Client.mjs +27 -46
- package/dist/esm/api/resources/routes/client/requests/FetchRouteRequest.d.mts +1 -5
- package/dist/esm/api/resources/routes/client/requests/GetRoutesFeedRequest.d.mts +1 -2
- package/dist/esm/api/resources/routes/client/requests/InlineObject.d.mts +1 -5
- package/dist/esm/api/resources/routes/client/requests/RoutesPatchRouteRequestBody.d.mts +1 -5
- package/dist/esm/api/resources/routes/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/routes/index.d.mts +0 -1
- package/dist/esm/api/resources/routes/index.mjs +0 -1
- package/dist/esm/api/resources/safety/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/safety/client/Client.mjs +12 -12
- package/dist/esm/api/resources/safety/client/requests/V1GetDriverSafetyScoreRequest.d.mts +0 -3
- package/dist/esm/api/resources/safety/client/requests/V1GetVehicleSafetyScoreRequest.d.mts +0 -3
- package/dist/esm/api/resources/tags/client/Client.d.mts +12 -18
- package/dist/esm/api/resources/tags/client/Client.mjs +24 -45
- package/dist/esm/api/resources/tags/client/requests/PatchTagRequest.d.mts +1 -5
- package/dist/esm/api/resources/tags/client/requests/ReplaceTagRequest.d.mts +1 -5
- package/dist/esm/api/resources/tags/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/trailerAssignments/client/Client.d.mts +3 -4
- package/dist/esm/api/resources/trailerAssignments/client/Client.mjs +7 -8
- package/dist/esm/api/resources/trailerAssignments/client/requests/V1GetFleetTrailerAssignmentsRequest.d.mts +1 -5
- package/dist/esm/api/resources/trailers/client/Client.d.mts +9 -14
- package/dist/esm/api/resources/trailers/client/Client.mjs +17 -36
- package/dist/esm/api/resources/trailers/client/requests/TrailersUpdateTrailerRequestBody.d.mts +1 -5
- package/dist/esm/api/resources/trailers/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/users/client/Client.d.mts +9 -14
- package/dist/esm/api/resources/users/client/Client.mjs +17 -36
- package/dist/esm/api/resources/users/client/requests/UpdateUserRequest.d.mts +1 -5
- package/dist/esm/api/resources/users/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/vehicles/client/Client.d.mts +6 -9
- package/dist/esm/api/resources/vehicles/client/Client.mjs +12 -28
- package/dist/esm/api/resources/vehicles/client/requests/UpdateVehicleRequest.d.mts +1 -5
- package/dist/esm/api/resources/vehicles/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +9 -14
- package/dist/esm/api/resources/webhooks/client/Client.mjs +17 -36
- package/dist/esm/api/resources/webhooks/client/requests/WebhooksPatchWebhookRequestBody.d.mts +1 -5
- package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +0 -2
- package/dist/esm/api/types/DriverAssignmentObjectResponseBody.d.mts +1 -8
- package/dist/esm/api/types/DriverAssignmentObjectResponseBody.mjs +1 -7
- package/dist/esm/api/types/FormsApprovalConfigObjectResponseBody.d.mts +1 -8
- package/dist/esm/api/types/FormsApprovalConfigObjectResponseBody.mjs +1 -7
- package/dist/esm/api/types/FuelLevelTriggerDetailsObjectRequestBody.d.mts +1 -8
- package/dist/esm/api/types/FuelLevelTriggerDetailsObjectRequestBody.mjs +1 -7
- package/dist/esm/api/types/FuelLevelTriggerDetailsObjectResponseBody.d.mts +1 -8
- package/dist/esm/api/types/FuelLevelTriggerDetailsObjectResponseBody.mjs +1 -7
- package/dist/esm/api/types/IdlingEventObjectV20251023ResponseBody.d.mts +1 -8
- package/dist/esm/api/types/IdlingEventObjectV20251023ResponseBody.mjs +1 -7
- package/dist/esm/api/types/PatchIssueRequestBodyAssignedToRequestBody.d.mts +1 -8
- package/dist/esm/api/types/PatchIssueRequestBodyAssignedToRequestBody.mjs +1 -7
- package/dist/esm/api/types/ReadingDatapointRequestBody.d.mts +1 -8
- package/dist/esm/api/types/ReadingDatapointRequestBody.mjs +1 -7
- package/dist/esm/api/types/ResolvedBy.d.mts +1 -8
- package/dist/esm/api/types/ResolvedBy.mjs +1 -7
- package/dist/esm/api/types/RouteFeedObjectResponseBody.d.mts +1 -6
- package/dist/esm/api/types/RouteFeedObjectResponseBody.mjs +0 -4
- package/dist/esm/api/types/RouteStopDetailsObjectResponseBody.d.mts +1 -6
- package/dist/esm/api/types/RouteStopDetailsObjectResponseBody.mjs +0 -4
- package/dist/esm/api/types/TrainingLearnerObjectResponseBody.d.mts +1 -8
- package/dist/esm/api/types/TrainingLearnerObjectResponseBody.mjs +1 -7
- package/dist/esm/api/types/VehicleAssignmentObjectResponseBody.d.mts +1 -8
- package/dist/esm/api/types/VehicleAssignmentObjectResponseBody.mjs +1 -7
- package/dist/esm/api/types/WorkOrderMoneyObjectRequestBody.d.mts +1 -8
- package/dist/esm/api/types/WorkOrderMoneyObjectRequestBody.mjs +1 -7
- package/dist/esm/api/types/WorkOrderMoneyObjectResponseBody.d.mts +1 -8
- package/dist/esm/api/types/WorkOrderMoneyObjectResponseBody.mjs +1 -7
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +461 -286
- package/dist/cjs/api/resources/addresses/client/requests/DeleteAddressesRequest.d.ts +0 -10
- package/dist/cjs/api/resources/addresses/client/requests/DeleteAddressesRequest.js +0 -3
- package/dist/cjs/api/resources/addresses/client/requests/GetAddressesRequest.d.ts +0 -10
- package/dist/cjs/api/resources/addresses/client/requests/GetAddressesRequest.js +0 -3
- package/dist/cjs/api/resources/assets/client/requests/GetAssetsRequest.d.ts +0 -9
- package/dist/cjs/api/resources/assets/client/requests/GetAssetsRequest.js +0 -3
- package/dist/cjs/api/resources/assets/client/requests/UpdateAssetsRequest.d.ts +0 -9
- package/dist/cjs/api/resources/assets/client/requests/UpdateAssetsRequest.js +0 -3
- package/dist/cjs/api/resources/betaApIs/client/requests/GetAempEquipmentListRequest.d.ts +0 -10
- package/dist/cjs/api/resources/betaApIs/client/requests/GetAempEquipmentListRequest.js +0 -3
- package/dist/cjs/api/resources/contacts/client/requests/DeleteContactsRequest.d.ts +0 -10
- package/dist/cjs/api/resources/contacts/client/requests/DeleteContactsRequest.js +0 -3
- package/dist/cjs/api/resources/contacts/client/requests/GetContactRequest.d.ts +0 -10
- package/dist/cjs/api/resources/contacts/client/requests/GetContactRequest.js +0 -3
- package/dist/cjs/api/resources/documents/client/requests/DeleteDocumentRequest.d.ts +0 -10
- package/dist/cjs/api/resources/documents/client/requests/DeleteDocumentRequest.js +0 -3
- package/dist/cjs/api/resources/documents/client/requests/GetDocumentPdfRequest.d.ts +0 -10
- package/dist/cjs/api/resources/documents/client/requests/GetDocumentPdfRequest.js +0 -3
- package/dist/cjs/api/resources/documents/client/requests/GetDocumentRequest.d.ts +0 -10
- package/dist/cjs/api/resources/documents/client/requests/GetDocumentRequest.js +0 -3
- package/dist/cjs/api/resources/drivers/client/requests/DeleteDriversRequest.d.ts +0 -9
- package/dist/cjs/api/resources/drivers/client/requests/DeleteDriversRequest.js +0 -3
- package/dist/cjs/api/resources/drivers/client/requests/GetDriversRequest.d.ts +0 -10
- package/dist/cjs/api/resources/drivers/client/requests/GetDriversRequest.js +0 -3
- package/dist/cjs/api/resources/equipment/client/requests/GetEquipmentRequest.d.ts +0 -10
- package/dist/cjs/api/resources/equipment/client/requests/GetEquipmentRequest.js +0 -3
- package/dist/cjs/api/resources/fleet/resources/attributes/client/requests/UpdateAttributesRequest.d.ts +0 -9
- package/dist/cjs/api/resources/fleet/resources/attributes/client/requests/UpdateAttributesRequest.js +0 -3
- package/dist/cjs/api/resources/fleet/resources/attributes/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/fleet/resources/attributes/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/fleet/resources/carrierProposedAssignments/client/requests/DeleteCarrierProposedAssignmentsRequest.d.ts +0 -10
- package/dist/cjs/api/resources/fleet/resources/carrierProposedAssignments/client/requests/DeleteCarrierProposedAssignmentsRequest.js +0 -3
- package/dist/cjs/api/resources/fleet/resources/carrierProposedAssignments/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/fleet/resources/carrierProposedAssignments/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/gateways/client/requests/DeleteGatewayRequest.d.ts +0 -10
- package/dist/cjs/api/resources/gateways/client/requests/DeleteGatewayRequest.js +0 -3
- package/dist/cjs/api/resources/hoursOfService/types/GetHosDailyLogsRequestExpand.d.ts +0 -4
- package/dist/cjs/api/resources/hoursOfService/types/GetHosDailyLogsRequestExpand.js +0 -7
- package/dist/cjs/api/resources/ifta/client/requests/GetIftaDetailJobRequest.d.ts +0 -10
- package/dist/cjs/api/resources/ifta/client/requests/GetIftaDetailJobRequest.js +0 -3
- package/dist/cjs/api/resources/industrial/client/requests/V1GetVisionProgramsByCameraRequest.d.ts +0 -10
- package/dist/cjs/api/resources/industrial/client/requests/V1GetVisionProgramsByCameraRequest.js +0 -3
- package/dist/cjs/api/resources/industrial/resources/assets/client/requests/DeleteAssetsRequest.d.ts +0 -10
- package/dist/cjs/api/resources/industrial/resources/assets/client/requests/DeleteAssetsRequest.js +0 -3
- package/dist/cjs/api/resources/industrial/resources/assets/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/industrial/resources/assets/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/previewApIs/client/requests/LockVehicleRequest.d.ts +0 -10
- package/dist/cjs/api/resources/previewApIs/client/requests/LockVehicleRequest.js +0 -3
- package/dist/cjs/api/resources/previewApIs/client/requests/UnlockVehicleRequest.d.ts +0 -10
- package/dist/cjs/api/resources/previewApIs/client/requests/UnlockVehicleRequest.js +0 -3
- package/dist/cjs/api/resources/routes/client/requests/DeleteRouteRequest.d.ts +0 -10
- package/dist/cjs/api/resources/routes/client/requests/DeleteRouteRequest.js +0 -3
- package/dist/cjs/api/resources/routes/types/GetRoutesFeedRequestExpand.d.ts +0 -4
- package/dist/cjs/api/resources/routes/types/GetRoutesFeedRequestExpand.js +0 -7
- package/dist/cjs/api/resources/routes/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/routes/types/index.js +0 -17
- package/dist/cjs/api/resources/tags/client/requests/DeleteTagsRequest.d.ts +0 -10
- package/dist/cjs/api/resources/tags/client/requests/DeleteTagsRequest.js +0 -3
- package/dist/cjs/api/resources/tags/client/requests/GetTagRequest.d.ts +0 -10
- package/dist/cjs/api/resources/tags/client/requests/GetTagRequest.js +0 -3
- package/dist/cjs/api/resources/trailers/client/requests/DeleteTrailerRequest.d.ts +0 -10
- package/dist/cjs/api/resources/trailers/client/requests/DeleteTrailerRequest.js +0 -3
- package/dist/cjs/api/resources/trailers/client/requests/GetTrailerRequest.d.ts +0 -10
- package/dist/cjs/api/resources/trailers/client/requests/GetTrailerRequest.js +0 -3
- package/dist/cjs/api/resources/users/client/requests/DeleteUsersRequest.d.ts +0 -10
- package/dist/cjs/api/resources/users/client/requests/DeleteUsersRequest.js +0 -3
- package/dist/cjs/api/resources/users/client/requests/GetUserRequest.d.ts +0 -10
- package/dist/cjs/api/resources/users/client/requests/GetUserRequest.js +0 -3
- package/dist/cjs/api/resources/vehicles/client/requests/GetVehiclesRequest.d.ts +0 -10
- package/dist/cjs/api/resources/vehicles/client/requests/GetVehiclesRequest.js +0 -3
- package/dist/cjs/api/resources/webhooks/client/requests/DeleteWebhookRequest.d.ts +0 -10
- package/dist/cjs/api/resources/webhooks/client/requests/DeleteWebhookRequest.js +0 -3
- package/dist/cjs/api/resources/webhooks/client/requests/GetWebhookRequest.d.ts +0 -10
- package/dist/cjs/api/resources/webhooks/client/requests/GetWebhookRequest.js +0 -3
- package/dist/esm/api/resources/addresses/client/requests/DeleteAddressesRequest.d.mts +0 -10
- package/dist/esm/api/resources/addresses/client/requests/DeleteAddressesRequest.mjs +0 -2
- package/dist/esm/api/resources/addresses/client/requests/GetAddressesRequest.d.mts +0 -10
- package/dist/esm/api/resources/addresses/client/requests/GetAddressesRequest.mjs +0 -2
- package/dist/esm/api/resources/assets/client/requests/GetAssetsRequest.d.mts +0 -9
- package/dist/esm/api/resources/assets/client/requests/GetAssetsRequest.mjs +0 -2
- package/dist/esm/api/resources/assets/client/requests/UpdateAssetsRequest.d.mts +0 -9
- package/dist/esm/api/resources/assets/client/requests/UpdateAssetsRequest.mjs +0 -2
- package/dist/esm/api/resources/betaApIs/client/requests/GetAempEquipmentListRequest.d.mts +0 -10
- package/dist/esm/api/resources/betaApIs/client/requests/GetAempEquipmentListRequest.mjs +0 -2
- package/dist/esm/api/resources/contacts/client/requests/DeleteContactsRequest.d.mts +0 -10
- package/dist/esm/api/resources/contacts/client/requests/DeleteContactsRequest.mjs +0 -2
- package/dist/esm/api/resources/contacts/client/requests/GetContactRequest.d.mts +0 -10
- package/dist/esm/api/resources/contacts/client/requests/GetContactRequest.mjs +0 -2
- package/dist/esm/api/resources/documents/client/requests/DeleteDocumentRequest.d.mts +0 -10
- package/dist/esm/api/resources/documents/client/requests/DeleteDocumentRequest.mjs +0 -2
- package/dist/esm/api/resources/documents/client/requests/GetDocumentPdfRequest.d.mts +0 -10
- package/dist/esm/api/resources/documents/client/requests/GetDocumentPdfRequest.mjs +0 -2
- package/dist/esm/api/resources/documents/client/requests/GetDocumentRequest.d.mts +0 -10
- package/dist/esm/api/resources/documents/client/requests/GetDocumentRequest.mjs +0 -2
- package/dist/esm/api/resources/drivers/client/requests/DeleteDriversRequest.d.mts +0 -9
- package/dist/esm/api/resources/drivers/client/requests/DeleteDriversRequest.mjs +0 -2
- package/dist/esm/api/resources/drivers/client/requests/GetDriversRequest.d.mts +0 -10
- package/dist/esm/api/resources/drivers/client/requests/GetDriversRequest.mjs +0 -2
- package/dist/esm/api/resources/equipment/client/requests/GetEquipmentRequest.d.mts +0 -10
- package/dist/esm/api/resources/equipment/client/requests/GetEquipmentRequest.mjs +0 -2
- package/dist/esm/api/resources/fleet/resources/attributes/client/requests/UpdateAttributesRequest.d.mts +0 -9
- package/dist/esm/api/resources/fleet/resources/attributes/client/requests/UpdateAttributesRequest.mjs +0 -2
- package/dist/esm/api/resources/fleet/resources/attributes/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/fleet/resources/attributes/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/fleet/resources/carrierProposedAssignments/client/requests/DeleteCarrierProposedAssignmentsRequest.d.mts +0 -10
- package/dist/esm/api/resources/fleet/resources/carrierProposedAssignments/client/requests/DeleteCarrierProposedAssignmentsRequest.mjs +0 -2
- package/dist/esm/api/resources/fleet/resources/carrierProposedAssignments/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/fleet/resources/carrierProposedAssignments/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/gateways/client/requests/DeleteGatewayRequest.d.mts +0 -10
- package/dist/esm/api/resources/gateways/client/requests/DeleteGatewayRequest.mjs +0 -2
- package/dist/esm/api/resources/hoursOfService/types/GetHosDailyLogsRequestExpand.d.mts +0 -4
- package/dist/esm/api/resources/hoursOfService/types/GetHosDailyLogsRequestExpand.mjs +0 -4
- package/dist/esm/api/resources/ifta/client/requests/GetIftaDetailJobRequest.d.mts +0 -10
- package/dist/esm/api/resources/ifta/client/requests/GetIftaDetailJobRequest.mjs +0 -2
- package/dist/esm/api/resources/industrial/client/requests/V1GetVisionProgramsByCameraRequest.d.mts +0 -10
- package/dist/esm/api/resources/industrial/client/requests/V1GetVisionProgramsByCameraRequest.mjs +0 -2
- package/dist/esm/api/resources/industrial/resources/assets/client/requests/DeleteAssetsRequest.d.mts +0 -10
- package/dist/esm/api/resources/industrial/resources/assets/client/requests/DeleteAssetsRequest.mjs +0 -2
- package/dist/esm/api/resources/industrial/resources/assets/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/industrial/resources/assets/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/previewApIs/client/requests/LockVehicleRequest.d.mts +0 -10
- package/dist/esm/api/resources/previewApIs/client/requests/LockVehicleRequest.mjs +0 -2
- package/dist/esm/api/resources/previewApIs/client/requests/UnlockVehicleRequest.d.mts +0 -10
- package/dist/esm/api/resources/previewApIs/client/requests/UnlockVehicleRequest.mjs +0 -2
- package/dist/esm/api/resources/routes/client/requests/DeleteRouteRequest.d.mts +0 -10
- package/dist/esm/api/resources/routes/client/requests/DeleteRouteRequest.mjs +0 -2
- package/dist/esm/api/resources/routes/types/GetRoutesFeedRequestExpand.d.mts +0 -4
- package/dist/esm/api/resources/routes/types/GetRoutesFeedRequestExpand.mjs +0 -4
- package/dist/esm/api/resources/routes/types/index.d.mts +0 -1
- package/dist/esm/api/resources/routes/types/index.mjs +0 -1
- package/dist/esm/api/resources/tags/client/requests/DeleteTagsRequest.d.mts +0 -10
- package/dist/esm/api/resources/tags/client/requests/DeleteTagsRequest.mjs +0 -2
- package/dist/esm/api/resources/tags/client/requests/GetTagRequest.d.mts +0 -10
- package/dist/esm/api/resources/tags/client/requests/GetTagRequest.mjs +0 -2
- package/dist/esm/api/resources/trailers/client/requests/DeleteTrailerRequest.d.mts +0 -10
- package/dist/esm/api/resources/trailers/client/requests/DeleteTrailerRequest.mjs +0 -2
- package/dist/esm/api/resources/trailers/client/requests/GetTrailerRequest.d.mts +0 -10
- package/dist/esm/api/resources/trailers/client/requests/GetTrailerRequest.mjs +0 -2
- package/dist/esm/api/resources/users/client/requests/DeleteUsersRequest.d.mts +0 -10
- package/dist/esm/api/resources/users/client/requests/DeleteUsersRequest.mjs +0 -2
- package/dist/esm/api/resources/users/client/requests/GetUserRequest.d.mts +0 -10
- package/dist/esm/api/resources/users/client/requests/GetUserRequest.mjs +0 -2
- package/dist/esm/api/resources/vehicles/client/requests/GetVehiclesRequest.d.mts +0 -10
- package/dist/esm/api/resources/vehicles/client/requests/GetVehiclesRequest.mjs +0 -2
- package/dist/esm/api/resources/webhooks/client/requests/DeleteWebhookRequest.d.mts +0 -10
- package/dist/esm/api/resources/webhooks/client/requests/DeleteWebhookRequest.mjs +0 -2
- package/dist/esm/api/resources/webhooks/client/requests/GetWebhookRequest.d.mts +0 -10
- package/dist/esm/api/resources/webhooks/client/requests/GetWebhookRequest.mjs +0 -2
package/README.md
CHANGED
|
@@ -47,19 +47,11 @@ Instantiate and use the client with the following:
|
|
|
47
47
|
import { SamsaraClient } from "@samsarahq/samsara";
|
|
48
48
|
|
|
49
49
|
const client = new SamsaraClient({ token: "YOUR_TOKEN" });
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// Or you can manually iterate page-by-page
|
|
56
|
-
let page = await client.vehicles.list();
|
|
57
|
-
while (page.hasNextPage()) {
|
|
58
|
-
page = page.getNextPage();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// You can also access the underlying response
|
|
62
|
-
const response = page.response;
|
|
50
|
+
await client.addresses.create({
|
|
51
|
+
formattedAddress: "350 Rhode Island St, San Francisco, CA",
|
|
52
|
+
geofence: {},
|
|
53
|
+
name: "Samsara HQ"
|
|
54
|
+
});
|
|
63
55
|
```
|
|
64
56
|
|
|
65
57
|
## Request and Response Types
|
|
@@ -84,7 +76,7 @@ will be thrown.
|
|
|
84
76
|
import { SamsaraError } from "@samsarahq/samsara";
|
|
85
77
|
|
|
86
78
|
try {
|
|
87
|
-
await client.
|
|
79
|
+
await client.addresses.create(...);
|
|
88
80
|
} catch (err) {
|
|
89
81
|
if (err instanceof SamsaraError) {
|
|
90
82
|
console.log(err.statusCode);
|
|
@@ -134,7 +126,7 @@ const client = new SamsaraClient({
|
|
|
134
126
|
}
|
|
135
127
|
});
|
|
136
128
|
|
|
137
|
-
const response = await client.
|
|
129
|
+
const response = await client.addresses.create(..., {
|
|
138
130
|
headers: {
|
|
139
131
|
'X-Custom-Header': 'custom value'
|
|
140
132
|
}
|
|
@@ -146,7 +138,7 @@ const response = await client.vehicles.list(..., {
|
|
|
146
138
|
If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
|
|
147
139
|
|
|
148
140
|
```typescript
|
|
149
|
-
const response = await client.
|
|
141
|
+
const response = await client.addresses.create(..., {
|
|
150
142
|
queryParams: {
|
|
151
143
|
'customQueryParamKey': 'custom query param value'
|
|
152
144
|
}
|
|
@@ -168,7 +160,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
|
|
|
168
160
|
Use the `maxRetries` request option to configure this behavior.
|
|
169
161
|
|
|
170
162
|
```typescript
|
|
171
|
-
const response = await client.
|
|
163
|
+
const response = await client.addresses.create(..., {
|
|
172
164
|
maxRetries: 0 // override maxRetries at the request level
|
|
173
165
|
});
|
|
174
166
|
```
|
|
@@ -178,7 +170,7 @@ const response = await client.vehicles.list(..., {
|
|
|
178
170
|
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
179
171
|
|
|
180
172
|
```typescript
|
|
181
|
-
const response = await client.
|
|
173
|
+
const response = await client.addresses.create(..., {
|
|
182
174
|
timeoutInSeconds: 30 // override timeout to 30s
|
|
183
175
|
});
|
|
184
176
|
```
|
|
@@ -189,7 +181,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
|
|
|
189
181
|
|
|
190
182
|
```typescript
|
|
191
183
|
const controller = new AbortController();
|
|
192
|
-
const response = await client.
|
|
184
|
+
const response = await client.addresses.create(..., {
|
|
193
185
|
abortSignal: controller.signal
|
|
194
186
|
});
|
|
195
187
|
controller.abort(); // aborts the request
|
|
@@ -201,7 +193,7 @@ The SDK provides access to raw response data, including headers, through the `.w
|
|
|
201
193
|
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
|
|
202
194
|
|
|
203
195
|
```typescript
|
|
204
|
-
const { data, rawResponse } = await client.
|
|
196
|
+
const { data, rawResponse } = await client.addresses.create(...).withRawResponse();
|
|
205
197
|
|
|
206
198
|
console.log(data);
|
|
207
199
|
console.log(rawResponse.headers['X-My-Header']);
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -44,8 +44,8 @@ function normalizeClientOptions(options) {
|
|
|
44
44
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
45
45
|
"X-Fern-Language": "JavaScript",
|
|
46
46
|
"X-Fern-SDK-Name": "@samsarahq/samsara",
|
|
47
|
-
"X-Fern-SDK-Version": "5.5.
|
|
48
|
-
"User-Agent": "@samsarahq/samsara/5.5.
|
|
47
|
+
"X-Fern-SDK-Version": "5.5.3",
|
|
48
|
+
"User-Agent": "@samsarahq/samsara/5.5.3",
|
|
49
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
51
|
"X-Samsara-Version": (_a = options === null || options === void 0 ? void 0 : options.version) !== null && _a !== void 0 ? _a : "2025-06-11",
|
|
@@ -50,15 +50,13 @@ export declare class AddressesClient {
|
|
|
50
50
|
*
|
|
51
51
|
* To use this endpoint, select **Read Addresses** under the Addresses category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
52
52
|
*
|
|
53
|
-
* @param {Samsara.
|
|
53
|
+
* @param {string} id - ID of the Address. This can either be the Samsara-provided ID or an external ID. External IDs are customer-specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `crmId:abc123`
|
|
54
54
|
* @param {AddressesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
57
|
-
* await client.addresses.get(
|
|
58
|
-
* id: "id"
|
|
59
|
-
* })
|
|
57
|
+
* await client.addresses.get("id")
|
|
60
58
|
*/
|
|
61
|
-
get(
|
|
59
|
+
get(id: string, requestOptions?: AddressesClient.RequestOptions): core.HttpResponsePromise<Samsara.AddressResponse>;
|
|
62
60
|
private __get;
|
|
63
61
|
/**
|
|
64
62
|
* Delete a specific address.
|
|
@@ -67,15 +65,13 @@ export declare class AddressesClient {
|
|
|
67
65
|
*
|
|
68
66
|
* To use this endpoint, select **Write Addresses** under the Addresses category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
69
67
|
*
|
|
70
|
-
* @param {Samsara.
|
|
68
|
+
* @param {string} id - ID of the Address. This can either be the Samsara-provided ID or an external ID. External IDs are customer-specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `crmId:abc123`
|
|
71
69
|
* @param {AddressesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
70
|
*
|
|
73
71
|
* @example
|
|
74
|
-
* await client.addresses.delete(
|
|
75
|
-
* id: "id"
|
|
76
|
-
* })
|
|
72
|
+
* await client.addresses.delete("id")
|
|
77
73
|
*/
|
|
78
|
-
delete(
|
|
74
|
+
delete(id: string, requestOptions?: AddressesClient.RequestOptions): core.HttpResponsePromise<Samsara.StandardDeleteResponse>;
|
|
79
75
|
private __delete;
|
|
80
76
|
/**
|
|
81
77
|
* Update a specific address.
|
|
@@ -84,14 +80,13 @@ export declare class AddressesClient {
|
|
|
84
80
|
*
|
|
85
81
|
* To use this endpoint, select **Write Addresses** under the Addresses category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
86
82
|
*
|
|
83
|
+
* @param {string} id - ID of the Address. This can either be the Samsara-provided ID or an external ID. External IDs are customer-specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `crmId:abc123`
|
|
87
84
|
* @param {Samsara.UpdateAddressRequest} request
|
|
88
85
|
* @param {AddressesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
86
|
*
|
|
90
87
|
* @example
|
|
91
|
-
* await client.addresses.update(
|
|
92
|
-
* id: "id"
|
|
93
|
-
* })
|
|
88
|
+
* await client.addresses.update("id")
|
|
94
89
|
*/
|
|
95
|
-
update(
|
|
90
|
+
update(id: string, request?: Samsara.UpdateAddressRequest, requestOptions?: AddressesClient.RequestOptions): core.HttpResponsePromise<Samsara.AddressResponse>;
|
|
96
91
|
private __update;
|
|
97
92
|
}
|
|
@@ -42,17 +42,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
-
var t = {};
|
|
47
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
-
t[p] = s[p];
|
|
49
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
-
t[p[i]] = s[p[i]];
|
|
53
|
-
}
|
|
54
|
-
return t;
|
|
55
|
-
};
|
|
56
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
46
|
exports.AddressesClient = void 0;
|
|
58
47
|
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
@@ -190,21 +179,18 @@ class AddressesClient {
|
|
|
190
179
|
*
|
|
191
180
|
* To use this endpoint, select **Read Addresses** under the Addresses category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
192
181
|
*
|
|
193
|
-
* @param {Samsara.
|
|
182
|
+
* @param {string} id - ID of the Address. This can either be the Samsara-provided ID or an external ID. External IDs are customer-specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `crmId:abc123`
|
|
194
183
|
* @param {AddressesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
195
184
|
*
|
|
196
185
|
* @example
|
|
197
|
-
* await client.addresses.get(
|
|
198
|
-
* id: "id"
|
|
199
|
-
* })
|
|
186
|
+
* await client.addresses.get("id")
|
|
200
187
|
*/
|
|
201
|
-
get(
|
|
202
|
-
return core.HttpResponsePromise.fromPromise(this.__get(
|
|
188
|
+
get(id, requestOptions) {
|
|
189
|
+
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
|
|
203
190
|
}
|
|
204
|
-
__get(
|
|
191
|
+
__get(id, requestOptions) {
|
|
205
192
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
193
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
207
|
-
const { id } = request;
|
|
208
194
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
209
195
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Samsara-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
210
196
|
const _response = yield core.fetcher({
|
|
@@ -238,21 +224,18 @@ class AddressesClient {
|
|
|
238
224
|
*
|
|
239
225
|
* To use this endpoint, select **Write Addresses** under the Addresses category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
240
226
|
*
|
|
241
|
-
* @param {Samsara.
|
|
227
|
+
* @param {string} id - ID of the Address. This can either be the Samsara-provided ID or an external ID. External IDs are customer-specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `crmId:abc123`
|
|
242
228
|
* @param {AddressesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
243
229
|
*
|
|
244
230
|
* @example
|
|
245
|
-
* await client.addresses.delete(
|
|
246
|
-
* id: "id"
|
|
247
|
-
* })
|
|
231
|
+
* await client.addresses.delete("id")
|
|
248
232
|
*/
|
|
249
|
-
delete(
|
|
250
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(
|
|
233
|
+
delete(id, requestOptions) {
|
|
234
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
|
|
251
235
|
}
|
|
252
|
-
__delete(
|
|
236
|
+
__delete(id, requestOptions) {
|
|
253
237
|
return __awaiter(this, void 0, void 0, function* () {
|
|
254
238
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
255
|
-
const { id } = request;
|
|
256
239
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
257
240
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Samsara-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
258
241
|
const _response = yield core.fetcher({
|
|
@@ -286,21 +269,19 @@ class AddressesClient {
|
|
|
286
269
|
*
|
|
287
270
|
* To use this endpoint, select **Write Addresses** under the Addresses category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
288
271
|
*
|
|
272
|
+
* @param {string} id - ID of the Address. This can either be the Samsara-provided ID or an external ID. External IDs are customer-specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `crmId:abc123`
|
|
289
273
|
* @param {Samsara.UpdateAddressRequest} request
|
|
290
274
|
* @param {AddressesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
291
275
|
*
|
|
292
276
|
* @example
|
|
293
|
-
* await client.addresses.update(
|
|
294
|
-
* id: "id"
|
|
295
|
-
* })
|
|
277
|
+
* await client.addresses.update("id")
|
|
296
278
|
*/
|
|
297
|
-
update(request, requestOptions) {
|
|
298
|
-
return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
|
|
279
|
+
update(id, request = {}, requestOptions) {
|
|
280
|
+
return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
|
|
299
281
|
}
|
|
300
|
-
__update(
|
|
301
|
-
return __awaiter(this,
|
|
282
|
+
__update(id_1) {
|
|
283
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
302
284
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
303
|
-
const { id } = request, _body = __rest(request, ["id"]);
|
|
304
285
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
305
286
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Samsara-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
306
287
|
const _response = yield core.fetcher({
|
|
@@ -310,7 +291,7 @@ class AddressesClient {
|
|
|
310
291
|
contentType: "application/json",
|
|
311
292
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
312
293
|
requestType: "json",
|
|
313
|
-
body:
|
|
294
|
+
body: request,
|
|
314
295
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
315
296
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
316
297
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import type * as Samsara from "../../../../index.js";
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
|
-
* {
|
|
5
|
-
* id: "id"
|
|
6
|
-
* }
|
|
4
|
+
* {}
|
|
7
5
|
*/
|
|
8
6
|
export interface UpdateAddressRequest {
|
|
9
|
-
/** ID of the Address. This can either be the Samsara-provided ID or an external ID. External IDs are customer-specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `crmId:abc123` */
|
|
10
|
-
id: string;
|
|
11
7
|
/** Reporting location type associated with the address (used for ELD reporting purposes). Valid values: `yard`, `shortHaul`, `workforceSite`, `riskZone`, `industrialSite`, `alertsOnly`, `agricultureSource`, `avoidanceZone`, `knownGPSJammingZone`, `authorizedZone`, `unauthorizedZone`. */
|
|
12
8
|
addressTypes?: UpdateAddressRequest.AddressTypes.Item[];
|
|
13
9
|
/** An array of Contact IDs associated with this Address. */
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export { CreateAddressRequest } from "./CreateAddressRequest.js";
|
|
2
|
-
export type { DeleteAddressesRequest } from "./DeleteAddressesRequest.js";
|
|
3
|
-
export type { GetAddressesRequest } from "./GetAddressesRequest.js";
|
|
4
2
|
export type { ListAddressesRequest } from "./ListAddressesRequest.js";
|
|
5
3
|
export { UpdateAddressRequest } from "./UpdateAddressRequest.js";
|
|
@@ -186,17 +186,17 @@ export declare class AssetsClient {
|
|
|
186
186
|
*
|
|
187
187
|
* To use this endpoint, select **Read Equipment Statistics** under the Equipment category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
188
188
|
*
|
|
189
|
+
* @param {number} asset_id - ID of the asset. Must contain only digits 0-9.
|
|
189
190
|
* @param {Samsara.V1GetAssetLocationRequest} request
|
|
190
191
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
191
192
|
*
|
|
192
193
|
* @example
|
|
193
|
-
* await client.assets.v1GetAssetLocation({
|
|
194
|
-
* asset_id: 1000000,
|
|
194
|
+
* await client.assets.v1GetAssetLocation(1000000, {
|
|
195
195
|
* startMs: 1000000,
|
|
196
196
|
* endMs: 1000000
|
|
197
197
|
* })
|
|
198
198
|
*/
|
|
199
|
-
v1GetAssetLocation(request: Samsara.V1GetAssetLocationRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Samsara.V1AssetLocationResponse>;
|
|
199
|
+
v1GetAssetLocation(asset_id: number, request: Samsara.V1GetAssetLocationRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Samsara.V1AssetLocationResponse>;
|
|
200
200
|
private __v1GetAssetLocation;
|
|
201
201
|
/**
|
|
202
202
|
* <n class="warning">
|
|
@@ -212,38 +212,34 @@ export declare class AssetsClient {
|
|
|
212
212
|
*
|
|
213
213
|
* To use this endpoint, select **Read Trailers** under the Trailers category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
214
214
|
*
|
|
215
|
+
* @param {number} asset_id - ID of the asset. Must contain only digits 0-9.
|
|
215
216
|
* @param {Samsara.V1GetAssetReeferRequest} request
|
|
216
217
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
217
218
|
*
|
|
218
219
|
* @example
|
|
219
|
-
* await client.assets.v1GetAssetReefer({
|
|
220
|
-
* asset_id: 1000000,
|
|
220
|
+
* await client.assets.v1GetAssetReefer(1000000, {
|
|
221
221
|
* startMs: 1000000,
|
|
222
222
|
* endMs: 1000000
|
|
223
223
|
* })
|
|
224
224
|
*/
|
|
225
|
-
v1GetAssetReefer(request: Samsara.V1GetAssetReeferRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Samsara.V1AssetReeferResponse>;
|
|
225
|
+
v1GetAssetReefer(asset_id: number, request: Samsara.V1GetAssetReeferRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Samsara.V1AssetReeferResponse>;
|
|
226
226
|
private __v1GetAssetReefer;
|
|
227
227
|
/**
|
|
228
|
-
* @param {
|
|
228
|
+
* @param {string} id
|
|
229
229
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
230
230
|
*
|
|
231
231
|
* @example
|
|
232
|
-
* await client.assets.get(
|
|
233
|
-
* id: "id"
|
|
234
|
-
* })
|
|
232
|
+
* await client.assets.get("id")
|
|
235
233
|
*/
|
|
236
|
-
get(
|
|
234
|
+
get(id: string, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
237
235
|
private __get;
|
|
238
236
|
/**
|
|
239
|
-
* @param {
|
|
237
|
+
* @param {string} id
|
|
240
238
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
241
239
|
*
|
|
242
240
|
* @example
|
|
243
|
-
* await client.assets.update(
|
|
244
|
-
* id: "id"
|
|
245
|
-
* })
|
|
241
|
+
* await client.assets.update("id")
|
|
246
242
|
*/
|
|
247
|
-
update(
|
|
243
|
+
update(id: string, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
248
244
|
private __update;
|
|
249
245
|
}
|
|
@@ -567,23 +567,23 @@ class AssetsClient {
|
|
|
567
567
|
*
|
|
568
568
|
* To use this endpoint, select **Read Equipment Statistics** under the Equipment category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
569
569
|
*
|
|
570
|
+
* @param {number} asset_id - ID of the asset. Must contain only digits 0-9.
|
|
570
571
|
* @param {Samsara.V1GetAssetLocationRequest} request
|
|
571
572
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
572
573
|
*
|
|
573
574
|
* @example
|
|
574
|
-
* await client.assets.v1GetAssetLocation({
|
|
575
|
-
* asset_id: 1000000,
|
|
575
|
+
* await client.assets.v1GetAssetLocation(1000000, {
|
|
576
576
|
* startMs: 1000000,
|
|
577
577
|
* endMs: 1000000
|
|
578
578
|
* })
|
|
579
579
|
*/
|
|
580
|
-
v1GetAssetLocation(request, requestOptions) {
|
|
581
|
-
return core.HttpResponsePromise.fromPromise(this.__v1GetAssetLocation(request, requestOptions));
|
|
580
|
+
v1GetAssetLocation(asset_id, request, requestOptions) {
|
|
581
|
+
return core.HttpResponsePromise.fromPromise(this.__v1GetAssetLocation(asset_id, request, requestOptions));
|
|
582
582
|
}
|
|
583
|
-
__v1GetAssetLocation(request, requestOptions) {
|
|
583
|
+
__v1GetAssetLocation(asset_id, request, requestOptions) {
|
|
584
584
|
return __awaiter(this, void 0, void 0, function* () {
|
|
585
585
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
586
|
-
const {
|
|
586
|
+
const { startMs, endMs } = request;
|
|
587
587
|
const _queryParams = {
|
|
588
588
|
startMs,
|
|
589
589
|
endMs,
|
|
@@ -591,7 +591,7 @@ class AssetsClient {
|
|
|
591
591
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
592
592
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Samsara-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
593
593
|
const _response = yield core.fetcher({
|
|
594
|
-
url: core.url.join((_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.SamsaraEnvironment.ProductionApi, `v1/fleet/assets/${core.url.encodePathParam(
|
|
594
|
+
url: core.url.join((_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.SamsaraEnvironment.ProductionApi, `v1/fleet/assets/${core.url.encodePathParam(asset_id)}/locations`),
|
|
595
595
|
method: "GET",
|
|
596
596
|
headers: _headers,
|
|
597
597
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -628,23 +628,23 @@ class AssetsClient {
|
|
|
628
628
|
*
|
|
629
629
|
* To use this endpoint, select **Read Trailers** under the Trailers category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
630
630
|
*
|
|
631
|
+
* @param {number} asset_id - ID of the asset. Must contain only digits 0-9.
|
|
631
632
|
* @param {Samsara.V1GetAssetReeferRequest} request
|
|
632
633
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
633
634
|
*
|
|
634
635
|
* @example
|
|
635
|
-
* await client.assets.v1GetAssetReefer({
|
|
636
|
-
* asset_id: 1000000,
|
|
636
|
+
* await client.assets.v1GetAssetReefer(1000000, {
|
|
637
637
|
* startMs: 1000000,
|
|
638
638
|
* endMs: 1000000
|
|
639
639
|
* })
|
|
640
640
|
*/
|
|
641
|
-
v1GetAssetReefer(request, requestOptions) {
|
|
642
|
-
return core.HttpResponsePromise.fromPromise(this.__v1GetAssetReefer(request, requestOptions));
|
|
641
|
+
v1GetAssetReefer(asset_id, request, requestOptions) {
|
|
642
|
+
return core.HttpResponsePromise.fromPromise(this.__v1GetAssetReefer(asset_id, request, requestOptions));
|
|
643
643
|
}
|
|
644
|
-
__v1GetAssetReefer(request, requestOptions) {
|
|
644
|
+
__v1GetAssetReefer(asset_id, request, requestOptions) {
|
|
645
645
|
return __awaiter(this, void 0, void 0, function* () {
|
|
646
646
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
647
|
-
const {
|
|
647
|
+
const { startMs, endMs } = request;
|
|
648
648
|
const _queryParams = {
|
|
649
649
|
startMs,
|
|
650
650
|
endMs,
|
|
@@ -652,7 +652,7 @@ class AssetsClient {
|
|
|
652
652
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
653
653
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Samsara-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
654
654
|
const _response = yield core.fetcher({
|
|
655
|
-
url: core.url.join((_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.SamsaraEnvironment.ProductionApi, `v1/fleet/assets/${core.url.encodePathParam(
|
|
655
|
+
url: core.url.join((_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.SamsaraEnvironment.ProductionApi, `v1/fleet/assets/${core.url.encodePathParam(asset_id)}/reefer`),
|
|
656
656
|
method: "GET",
|
|
657
657
|
headers: _headers,
|
|
658
658
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -676,21 +676,18 @@ class AssetsClient {
|
|
|
676
676
|
});
|
|
677
677
|
}
|
|
678
678
|
/**
|
|
679
|
-
* @param {
|
|
679
|
+
* @param {string} id
|
|
680
680
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
681
681
|
*
|
|
682
682
|
* @example
|
|
683
|
-
* await client.assets.get(
|
|
684
|
-
* id: "id"
|
|
685
|
-
* })
|
|
683
|
+
* await client.assets.get("id")
|
|
686
684
|
*/
|
|
687
|
-
get(
|
|
688
|
-
return core.HttpResponsePromise.fromPromise(this.__get(
|
|
685
|
+
get(id, requestOptions) {
|
|
686
|
+
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
|
|
689
687
|
}
|
|
690
|
-
__get(
|
|
688
|
+
__get(id, requestOptions) {
|
|
691
689
|
return __awaiter(this, void 0, void 0, function* () {
|
|
692
690
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
693
|
-
const { id } = request;
|
|
694
691
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
695
692
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Samsara-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
696
693
|
const _response = yield core.fetcher({
|
|
@@ -718,21 +715,18 @@ class AssetsClient {
|
|
|
718
715
|
});
|
|
719
716
|
}
|
|
720
717
|
/**
|
|
721
|
-
* @param {
|
|
718
|
+
* @param {string} id
|
|
722
719
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
723
720
|
*
|
|
724
721
|
* @example
|
|
725
|
-
* await client.assets.update(
|
|
726
|
-
* id: "id"
|
|
727
|
-
* })
|
|
722
|
+
* await client.assets.update("id")
|
|
728
723
|
*/
|
|
729
|
-
update(
|
|
730
|
-
return core.HttpResponsePromise.fromPromise(this.__update(
|
|
724
|
+
update(id, requestOptions) {
|
|
725
|
+
return core.HttpResponsePromise.fromPromise(this.__update(id, requestOptions));
|
|
731
726
|
}
|
|
732
|
-
__update(
|
|
727
|
+
__update(id, requestOptions) {
|
|
733
728
|
return __awaiter(this, void 0, void 0, function* () {
|
|
734
729
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
735
|
-
const { id } = request;
|
|
736
730
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
737
731
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Samsara-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
738
732
|
const _response = yield core.fetcher({
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* asset_id: 1000000,
|
|
5
4
|
* startMs: 1000000,
|
|
6
5
|
* endMs: 1000000
|
|
7
6
|
* }
|
|
8
7
|
*/
|
|
9
8
|
export interface V1GetAssetLocationRequest {
|
|
10
|
-
/** ID of the asset. Must contain only digits 0-9. */
|
|
11
|
-
asset_id: number;
|
|
12
9
|
/** Timestamp in milliseconds representing the start of the period to fetch, inclusive. Used in combination with endMs. */
|
|
13
10
|
startMs: number;
|
|
14
11
|
/** Timestamp in milliseconds representing the end of the period to fetch, inclusive. Used in combination with startMs. */
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* asset_id: 1000000,
|
|
5
4
|
* startMs: 1000000,
|
|
6
5
|
* endMs: 1000000
|
|
7
6
|
* }
|
|
8
7
|
*/
|
|
9
8
|
export interface V1GetAssetReeferRequest {
|
|
10
|
-
/** ID of the asset. Must contain only digits 0-9. */
|
|
11
|
-
asset_id: number;
|
|
12
9
|
/** Timestamp in milliseconds representing the start of the period to fetch, inclusive. Used in combination with endMs. */
|
|
13
10
|
startMs: number;
|
|
14
11
|
/** Timestamp in milliseconds representing the end of the period to fetch, inclusive. Used in combination with startMs. */
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export { AssetsCreateAssetRequestBody } from "./AssetsCreateAssetRequestBody.js";
|
|
2
2
|
export { AssetsUpdateAssetRequestBody } from "./AssetsUpdateAssetRequestBody.js";
|
|
3
3
|
export type { DeleteAssetRequest } from "./DeleteAssetRequest.js";
|
|
4
|
-
export type { GetAssetsRequest } from "./GetAssetsRequest.js";
|
|
5
4
|
export type { ListAssetsRequest } from "./ListAssetsRequest.js";
|
|
6
|
-
export type { UpdateAssetsRequest } from "./UpdateAssetsRequest.js";
|
|
7
5
|
export type { V1GetAllAssetCurrentLocationsRequest } from "./V1GetAllAssetCurrentLocationsRequest.js";
|
|
8
6
|
export type { V1GetAssetLocationRequest } from "./V1GetAssetLocationRequest.js";
|
|
9
7
|
export type { V1GetAssetReeferRequest } from "./V1GetAssetReeferRequest.js";
|
|
@@ -53,16 +53,16 @@ export declare class AttributesClient {
|
|
|
53
53
|
*
|
|
54
54
|
* To use this endpoint, select **Read Attributes** under the Setup & Administration category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
55
55
|
*
|
|
56
|
+
* @param {string} id - Samsara-provided UUID of the attribute.
|
|
56
57
|
* @param {Samsara.GetAttributeRequest} request
|
|
57
58
|
* @param {AttributesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
59
|
*
|
|
59
60
|
* @example
|
|
60
|
-
* await client.attributes.getAttribute({
|
|
61
|
-
* id: "id",
|
|
61
|
+
* await client.attributes.getAttribute("id", {
|
|
62
62
|
* entityType: "driver"
|
|
63
63
|
* })
|
|
64
64
|
*/
|
|
65
|
-
getAttribute(request: Samsara.GetAttributeRequest, requestOptions?: AttributesClient.RequestOptions): core.HttpResponsePromise<Samsara.AttributeExpandedResponse>;
|
|
65
|
+
getAttribute(id: string, request: Samsara.GetAttributeRequest, requestOptions?: AttributesClient.RequestOptions): core.HttpResponsePromise<Samsara.AttributeExpandedResponse>;
|
|
66
66
|
private __getAttribute;
|
|
67
67
|
/**
|
|
68
68
|
* Delete an attribute by id, including all of its applications.
|
|
@@ -71,16 +71,16 @@ export declare class AttributesClient {
|
|
|
71
71
|
*
|
|
72
72
|
* To use this endpoint, select **Write Attributes** under the Setup & Administration category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
73
73
|
*
|
|
74
|
+
* @param {string} id - Samsara-provided UUID of the attribute.
|
|
74
75
|
* @param {Samsara.DeleteAttributesRequest} request
|
|
75
76
|
* @param {AttributesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
77
|
*
|
|
77
78
|
* @example
|
|
78
|
-
* await client.attributes.delete({
|
|
79
|
-
* id: "id",
|
|
79
|
+
* await client.attributes.delete("id", {
|
|
80
80
|
* entityType: "driver"
|
|
81
81
|
* })
|
|
82
82
|
*/
|
|
83
|
-
delete(request: Samsara.DeleteAttributesRequest, requestOptions?: AttributesClient.RequestOptions): core.HttpResponsePromise<Samsara.StandardDeleteResponse>;
|
|
83
|
+
delete(id: string, request: Samsara.DeleteAttributesRequest, requestOptions?: AttributesClient.RequestOptions): core.HttpResponsePromise<Samsara.StandardDeleteResponse>;
|
|
84
84
|
private __delete;
|
|
85
85
|
/**
|
|
86
86
|
* Updates an attribute in the organization.
|
|
@@ -89,15 +89,15 @@ export declare class AttributesClient {
|
|
|
89
89
|
*
|
|
90
90
|
* To use this endpoint, select **Write Attributes** under the Setup & Administration category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
91
91
|
*
|
|
92
|
+
* @param {string} id - Samsara-provided UUID of the attribute.
|
|
92
93
|
* @param {Samsara.UpdateAttributeRequest} request
|
|
93
94
|
* @param {AttributesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
95
|
*
|
|
95
96
|
* @example
|
|
96
|
-
* await client.attributes.updateAttribute({
|
|
97
|
-
* id: "id",
|
|
97
|
+
* await client.attributes.updateAttribute("id", {
|
|
98
98
|
* entityType: "driver"
|
|
99
99
|
* })
|
|
100
100
|
*/
|
|
101
|
-
updateAttribute(request: Samsara.UpdateAttributeRequest, requestOptions?: AttributesClient.RequestOptions): core.HttpResponsePromise<Samsara.AttributeExpandedResponse>;
|
|
101
|
+
updateAttribute(id: string, request: Samsara.UpdateAttributeRequest, requestOptions?: AttributesClient.RequestOptions): core.HttpResponsePromise<Samsara.AttributeExpandedResponse>;
|
|
102
102
|
private __updateAttribute;
|
|
103
103
|
}
|