samsara-api 4.0.1__py3-none-any.whl → 4.1.1__py3-none-any.whl
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.
- samsara/__init__.py +138 -0
- samsara/client.py +19 -0
- samsara/core/client_wrapper.py +2 -2
- samsara/route_events/__init__.py +4 -0
- samsara/route_events/client.py +176 -0
- samsara/route_events/raw_client.py +362 -0
- samsara/types/__init__.py +155 -0
- samsara/types/door_open_response_body.py +28 -0
- samsara/types/route_event_details_response_body.py +36 -0
- samsara/types/route_event_response_response_body.py +56 -0
- samsara/types/route_event_response_response_body_event_type.py +17 -0
- samsara/types/route_event_route_response_response_body.py +35 -0
- samsara/types/route_event_stop_response_response_body.py +35 -0
- samsara/types/routes_get_route_events_stream_bad_gateway_error_response_body.py +33 -0
- samsara/types/routes_get_route_events_stream_gateway_timeout_error_response_body.py +33 -0
- samsara/types/routes_get_route_events_stream_internal_server_error_response_body.py +33 -0
- samsara/types/routes_get_route_events_stream_method_not_allowed_error_response_body.py +33 -0
- samsara/types/routes_get_route_events_stream_not_found_error_response_body.py +33 -0
- samsara/types/routes_get_route_events_stream_not_implemented_error_response_body.py +33 -0
- samsara/types/routes_get_route_events_stream_response_body.py +26 -0
- samsara/types/routes_get_route_events_stream_service_unavailable_error_response_body.py +33 -0
- samsara/types/routes_get_route_events_stream_too_many_requests_error_response_body.py +33 -0
- samsara/types/routes_get_route_events_stream_unauthorized_error_response_body.py +33 -0
- samsara/types/safety_event.py +6 -6
- samsara/types/safety_event_driver.py +5 -0
- samsara/types/safety_event_location.py +5 -0
- samsara/types/safety_event_vehicle.py +5 -0
- samsara/types/stop_eta_updated_event_details_response_body.py +33 -0
- samsara/types/stop_task_completed_event_details_response_body.py +36 -0
- samsara/types/stop_task_completed_event_details_response_body_task_type.py +5 -0
- samsara/types/stop_task_skipped_event_details_response_body.py +36 -0
- samsara/types/stop_task_skipped_event_details_response_body_task_type.py +5 -0
- samsara/types/vehicle.py +28 -16
- samsara/types/vehicle_aux_input_type_1.py +5 -0
- samsara/types/vehicle_aux_input_type_10.py +5 -0
- samsara/types/vehicle_aux_input_type_11.py +5 -0
- samsara/types/vehicle_aux_input_type_12.py +5 -0
- samsara/types/vehicle_aux_input_type_13.py +5 -0
- samsara/types/vehicle_aux_input_type_2.py +5 -0
- samsara/types/vehicle_aux_input_type_3.py +5 -0
- samsara/types/vehicle_aux_input_type_4.py +5 -0
- samsara/types/vehicle_aux_input_type_5.py +5 -0
- samsara/types/vehicle_aux_input_type_6.py +5 -0
- samsara/types/vehicle_aux_input_type_7.py +5 -0
- samsara/types/vehicle_aux_input_type_8.py +5 -0
- samsara/types/vehicle_aux_input_type_9.py +5 -0
- samsara/types/vehicle_location.py +6 -4
- samsara/types/vehicle_location_reverse_geo.py +5 -0
- samsara/types/vehicle_location_time.py +5 -0
- samsara/types/vehicle_static_assigned_driver.py +5 -0
- samsara/types/vehicle_stats_ambient_air_temp_milli_c.py +2 -2
- samsara/types/vehicle_stats_ambient_air_temp_milli_c_with_decoration.py +2 -2
- samsara/types/vehicle_stats_barometric_pressure_pa.py +2 -2
- samsara/types/vehicle_stats_barometric_pressure_pa_with_decoration.py +2 -2
- samsara/types/vehicle_stats_battery_voltage.py +2 -2
- samsara/types/vehicle_stats_battery_voltage_with_decoration.py +2 -2
- samsara/types/vehicle_stats_decorations.py +4 -0
- samsara/types/vehicle_stats_decorations_gps.py +4 -2
- samsara/types/vehicle_stats_def_level_milli_percent.py +2 -2
- samsara/types/vehicle_stats_def_level_milli_percent_with_decoration.py +2 -2
- samsara/types/vehicle_stats_ecu_door_status.py +29 -0
- samsara/types/vehicle_stats_ecu_door_status_value.py +5 -0
- samsara/types/vehicle_stats_ecu_speed_mph.py +2 -2
- samsara/types/vehicle_stats_ecu_speed_mph_with_decoration.py +2 -2
- samsara/types/vehicle_stats_engine_coolant_temp_milli_c.py +2 -2
- samsara/types/vehicle_stats_engine_coolant_temp_milli_c_with_decoration.py +2 -2
- samsara/types/vehicle_stats_engine_load_percent.py +2 -2
- samsara/types/vehicle_stats_engine_load_percent_with_decoration.py +2 -2
- samsara/types/vehicle_stats_engine_oil_pressure_k_pa.py +2 -2
- samsara/types/vehicle_stats_engine_oil_pressure_k_pa_with_decoration.py +2 -2
- samsara/types/vehicle_stats_engine_rpm.py +2 -2
- samsara/types/vehicle_stats_engine_rpm_with_decoration.py +2 -2
- samsara/types/vehicle_stats_engine_state.py +2 -2
- samsara/types/vehicle_stats_engine_state_with_decoration.py +2 -2
- samsara/types/vehicle_stats_ev_average_battery_temperature_milli_celsius.py +2 -2
- samsara/types/vehicle_stats_ev_battery_current_milli_amp.py +2 -2
- samsara/types/vehicle_stats_ev_battery_state_of_health_milli_percent.py +2 -2
- samsara/types/vehicle_stats_ev_battery_voltage_milli_volt.py +2 -2
- samsara/types/vehicle_stats_ev_charging_current_milli_amp.py +2 -2
- samsara/types/vehicle_stats_ev_charging_energy_micro_wh.py +2 -2
- samsara/types/vehicle_stats_ev_charging_status.py +2 -2
- samsara/types/vehicle_stats_ev_charging_voltage_milli_volt.py +2 -2
- samsara/types/vehicle_stats_ev_consumed_energy_micro_wh.py +2 -2
- samsara/types/vehicle_stats_ev_distance_driven_meters.py +2 -2
- samsara/types/vehicle_stats_ev_regenerated_energy_micro_wh.py +2 -2
- samsara/types/vehicle_stats_ev_state_of_charge_milli_percent.py +2 -2
- samsara/types/vehicle_stats_fault_codes_with_decoration.py +2 -2
- samsara/types/vehicle_stats_fuel_consumed_milliliters.py +2 -2
- samsara/types/vehicle_stats_fuel_consumed_milliliters_with_decoration.py +2 -2
- samsara/types/vehicle_stats_fuel_percent.py +2 -2
- samsara/types/vehicle_stats_fuel_percent_with_decoration.py +2 -2
- samsara/types/vehicle_stats_gps.py +6 -4
- samsara/types/vehicle_stats_gps_distance_meters.py +2 -2
- samsara/types/vehicle_stats_gps_distance_meters_with_decoration.py +2 -2
- samsara/types/vehicle_stats_gps_odometer_meters.py +2 -2
- samsara/types/vehicle_stats_gps_odometer_meters_with_decoration.py +2 -2
- samsara/types/vehicle_stats_idling_duration_milliseconds.py +2 -2
- samsara/types/vehicle_stats_idling_duration_milliseconds_with_decoration.py +2 -2
- samsara/types/vehicle_stats_intake_manifold_temp_milli_c.py +2 -2
- samsara/types/vehicle_stats_intake_manifold_temp_milli_c_with_decoration.py +2 -2
- samsara/types/vehicle_stats_list_gps.py +6 -4
- samsara/types/vehicle_stats_list_response_data.py +8 -0
- samsara/types/vehicle_stats_obd_engine_seconds.py +2 -2
- samsara/types/vehicle_stats_obd_engine_seconds_with_decoration.py +2 -2
- samsara/types/vehicle_stats_obd_odometer_meters.py +2 -2
- samsara/types/vehicle_stats_obd_odometer_meters_with_decoration.py +2 -2
- samsara/types/vehicle_stats_response_data.py +4 -0
- samsara/types/vehicle_stats_response_ecu_door_status.py +32 -0
- samsara/types/vehicle_stats_response_ecu_door_status_value.py +5 -0
- samsara/types/vehicle_stats_seatbelt_driver.py +2 -2
- samsara/types/vehicle_stats_spreader_active.py +2 -2
- samsara/types/vehicle_stats_spreader_air_temp.py +2 -2
- samsara/types/vehicle_stats_spreader_blast_state.py +2 -2
- samsara/types/vehicle_stats_spreader_granular_name.py +2 -2
- samsara/types/vehicle_stats_spreader_granular_rate.py +2 -2
- samsara/types/vehicle_stats_spreader_liquid_name.py +2 -2
- samsara/types/vehicle_stats_spreader_liquid_rate.py +2 -2
- samsara/types/vehicle_stats_spreader_on_state.py +2 -2
- samsara/types/vehicle_stats_spreader_plow_status.py +2 -2
- samsara/types/vehicle_stats_spreader_prewet_name.py +2 -2
- samsara/types/vehicle_stats_spreader_prewet_rate.py +2 -2
- samsara/types/vehicle_stats_spreader_road_temp.py +2 -2
- samsara/types/vehicle_stats_time.py +5 -0
- samsara/types/workflow_incident_details_object_response_body.py +4 -0
- samsara/vehicle_stats/client.py +10 -0
- samsara/vehicle_stats/raw_client.py +10 -0
- samsara/vehicle_stats/types/get_vehicle_stats_feed_request_decorations_item.py +1 -0
- samsara/vehicle_stats/types/get_vehicle_stats_feed_request_types_item.py +1 -0
- samsara/vehicle_stats/types/get_vehicle_stats_history_request_decorations_item.py +1 -0
- samsara/vehicle_stats/types/get_vehicle_stats_history_request_types_item.py +1 -0
- samsara/vehicle_stats/types/get_vehicle_stats_request_types_item.py +1 -0
- samsara/work_orders/client.py +30 -0
- samsara/work_orders/raw_client.py +30 -0
- {samsara_api-4.0.1.dist-info → samsara_api-4.1.1.dist-info}/METADATA +1 -1
- {samsara_api-4.0.1.dist-info → samsara_api-4.1.1.dist-info}/RECORD +137 -89
- {samsara_api-4.0.1.dist-info → samsara_api-4.1.1.dist-info}/LICENSE +0 -0
- {samsara_api-4.0.1.dist-info → samsara_api-4.1.1.dist-info}/WHEEL +0 -0
samsara/__init__.py
CHANGED
|
@@ -413,6 +413,7 @@ if typing.TYPE_CHECKING:
|
|
|
413
413
|
DocumentsPostDocumentServiceUnavailableErrorResponseBody,
|
|
414
414
|
DocumentsPostDocumentTooManyRequestsErrorResponseBody,
|
|
415
415
|
DocumentsPostDocumentUnauthorizedErrorResponseBody,
|
|
416
|
+
DoorOpenResponseBody,
|
|
416
417
|
DriveTimeDurationMs,
|
|
417
418
|
Driver,
|
|
418
419
|
DriverActivationStatus,
|
|
@@ -1840,6 +1841,11 @@ if typing.TYPE_CHECKING:
|
|
|
1840
1841
|
ReverseGeoObjectResponseBody,
|
|
1841
1842
|
RollingStopDetectionAlertSettingsObjectResponseBody,
|
|
1842
1843
|
RouteChangesResponseBody,
|
|
1844
|
+
RouteEventDetailsResponseBody,
|
|
1845
|
+
RouteEventResponseResponseBody,
|
|
1846
|
+
RouteEventResponseResponseBodyEventType,
|
|
1847
|
+
RouteEventRouteResponseResponseBody,
|
|
1848
|
+
RouteEventStopResponseResponseBody,
|
|
1843
1849
|
RouteFeedObjectResponseBody,
|
|
1844
1850
|
RouteFeedObjectResponseBodyOperation,
|
|
1845
1851
|
RouteFeedObjectResponseBodySource,
|
|
@@ -1895,6 +1901,16 @@ if typing.TYPE_CHECKING:
|
|
|
1895
1901
|
RoutesFetchRoutesServiceUnavailableErrorResponseBody,
|
|
1896
1902
|
RoutesFetchRoutesTooManyRequestsErrorResponseBody,
|
|
1897
1903
|
RoutesFetchRoutesUnauthorizedErrorResponseBody,
|
|
1904
|
+
RoutesGetRouteEventsStreamBadGatewayErrorResponseBody,
|
|
1905
|
+
RoutesGetRouteEventsStreamGatewayTimeoutErrorResponseBody,
|
|
1906
|
+
RoutesGetRouteEventsStreamInternalServerErrorResponseBody,
|
|
1907
|
+
RoutesGetRouteEventsStreamMethodNotAllowedErrorResponseBody,
|
|
1908
|
+
RoutesGetRouteEventsStreamNotFoundErrorResponseBody,
|
|
1909
|
+
RoutesGetRouteEventsStreamNotImplementedErrorResponseBody,
|
|
1910
|
+
RoutesGetRouteEventsStreamResponseBody,
|
|
1911
|
+
RoutesGetRouteEventsStreamServiceUnavailableErrorResponseBody,
|
|
1912
|
+
RoutesGetRouteEventsStreamTooManyRequestsErrorResponseBody,
|
|
1913
|
+
RoutesGetRouteEventsStreamUnauthorizedErrorResponseBody,
|
|
1898
1914
|
RoutesGetRoutesFeedBadGatewayErrorResponseBody,
|
|
1899
1915
|
RoutesGetRoutesFeedGatewayTimeoutErrorResponseBody,
|
|
1900
1916
|
RoutesGetRoutesFeedInternalServerErrorResponseBody,
|
|
@@ -1935,8 +1951,10 @@ if typing.TYPE_CHECKING:
|
|
|
1935
1951
|
SafetyEventDownloadForwardVideoUrl,
|
|
1936
1952
|
SafetyEventDownloadInwardVideoUrl,
|
|
1937
1953
|
SafetyEventDownloadTrackedInwardVideoUrl,
|
|
1954
|
+
SafetyEventDriver,
|
|
1938
1955
|
SafetyEventDriverObjectResponseBody,
|
|
1939
1956
|
SafetyEventId,
|
|
1957
|
+
SafetyEventLocation,
|
|
1940
1958
|
SafetyEventMaxAccelerationGForce,
|
|
1941
1959
|
SafetyEventObjectResponseBody,
|
|
1942
1960
|
SafetyEventTime,
|
|
@@ -1949,6 +1967,7 @@ if typing.TYPE_CHECKING:
|
|
|
1949
1967
|
SafetyEventV2DriverObjectResponseBody,
|
|
1950
1968
|
SafetyEventV2ObjectResponseBody,
|
|
1951
1969
|
SafetyEventV2ObjectResponseBodyEventState,
|
|
1970
|
+
SafetyEventVehicle,
|
|
1952
1971
|
SafetyEventVehicleObjectResponseBody,
|
|
1953
1972
|
SafetyEventsGetSafetyActivityEventFeedBadGatewayErrorResponseBody,
|
|
1954
1973
|
SafetyEventsGetSafetyActivityEventFeedGatewayTimeoutErrorResponseBody,
|
|
@@ -2164,6 +2183,11 @@ if typing.TYPE_CHECKING:
|
|
|
2164
2183
|
SpeedingSeverityLevelResponseBodySeverityLevel,
|
|
2165
2184
|
StandardDeleteResponse,
|
|
2166
2185
|
StartFunctionRunResponseBodyResponseBody,
|
|
2186
|
+
StopEtaUpdatedEventDetailsResponseBody,
|
|
2187
|
+
StopTaskCompletedEventDetailsResponseBody,
|
|
2188
|
+
StopTaskCompletedEventDetailsResponseBodyTaskType,
|
|
2189
|
+
StopTaskSkippedEventDetailsResponseBody,
|
|
2190
|
+
StopTaskSkippedEventDetailsResponseBodyTaskType,
|
|
2167
2191
|
StringDataPoint,
|
|
2168
2192
|
SuddenFuelLevelDropResponseBody,
|
|
2169
2193
|
SuddenFuelLevelDropTriggerDetailsObjectRequestBody,
|
|
@@ -2635,6 +2659,19 @@ if typing.TYPE_CHECKING:
|
|
|
2635
2659
|
VehicleAssignmentObjectResponseBody,
|
|
2636
2660
|
VehicleAuxInputName,
|
|
2637
2661
|
VehicleAuxInputType,
|
|
2662
|
+
VehicleAuxInputType1,
|
|
2663
|
+
VehicleAuxInputType10,
|
|
2664
|
+
VehicleAuxInputType11,
|
|
2665
|
+
VehicleAuxInputType12,
|
|
2666
|
+
VehicleAuxInputType13,
|
|
2667
|
+
VehicleAuxInputType2,
|
|
2668
|
+
VehicleAuxInputType3,
|
|
2669
|
+
VehicleAuxInputType4,
|
|
2670
|
+
VehicleAuxInputType5,
|
|
2671
|
+
VehicleAuxInputType6,
|
|
2672
|
+
VehicleAuxInputType7,
|
|
2673
|
+
VehicleAuxInputType8,
|
|
2674
|
+
VehicleAuxInputType9,
|
|
2638
2675
|
VehicleBatterVoltageDetailsObjectRequestBody,
|
|
2639
2676
|
VehicleBatterVoltageDetailsObjectRequestBodyOperation,
|
|
2640
2677
|
VehicleBatterVoltageDetailsObjectResponseBody,
|
|
@@ -2657,7 +2694,9 @@ if typing.TYPE_CHECKING:
|
|
|
2657
2694
|
VehicleLocationIsEcuSpeed,
|
|
2658
2695
|
VehicleLocationLatitude,
|
|
2659
2696
|
VehicleLocationLongitude,
|
|
2697
|
+
VehicleLocationReverseGeo,
|
|
2660
2698
|
VehicleLocationSpeed,
|
|
2699
|
+
VehicleLocationTime,
|
|
2661
2700
|
VehicleLocationsListResponse,
|
|
2662
2701
|
VehicleLocationsListResponseData,
|
|
2663
2702
|
VehicleLocationsResponse,
|
|
@@ -2684,6 +2723,7 @@ if typing.TYPE_CHECKING:
|
|
|
2684
2723
|
VehicleSensorConfigurationDoorResponseBody,
|
|
2685
2724
|
VehicleSensorConfigurationDoorResponseBodyPosition,
|
|
2686
2725
|
VehicleSensorConfigurationResponseBody,
|
|
2726
|
+
VehicleStaticAssignedDriver,
|
|
2687
2727
|
VehicleStatsAmbientAirTempMilliC,
|
|
2688
2728
|
VehicleStatsAmbientAirTempMilliCValue,
|
|
2689
2729
|
VehicleStatsAmbientAirTempMilliCWithDecoration,
|
|
@@ -2722,6 +2762,8 @@ if typing.TYPE_CHECKING:
|
|
|
2722
2762
|
VehicleStatsDefLevelMilliPercent,
|
|
2723
2763
|
VehicleStatsDefLevelMilliPercentValue,
|
|
2724
2764
|
VehicleStatsDefLevelMilliPercentWithDecoration,
|
|
2765
|
+
VehicleStatsEcuDoorStatus,
|
|
2766
|
+
VehicleStatsEcuDoorStatusValue,
|
|
2725
2767
|
VehicleStatsEcuSpeedMph,
|
|
2726
2768
|
VehicleStatsEcuSpeedMphValue,
|
|
2727
2769
|
VehicleStatsEcuSpeedMphWithDecoration,
|
|
@@ -2831,6 +2873,8 @@ if typing.TYPE_CHECKING:
|
|
|
2831
2873
|
VehicleStatsObdOdometerMetersWithDecoration,
|
|
2832
2874
|
VehicleStatsResponse,
|
|
2833
2875
|
VehicleStatsResponseData,
|
|
2876
|
+
VehicleStatsResponseEcuDoorStatus,
|
|
2877
|
+
VehicleStatsResponseEcuDoorStatusValue,
|
|
2834
2878
|
VehicleStatsResponseEvAverageBatteryTemperatureMilliCelsius,
|
|
2835
2879
|
VehicleStatsResponseEvBatteryCurrentMilliAmp,
|
|
2836
2880
|
VehicleStatsResponseEvBatteryStateOfHealthMilliPercent,
|
|
@@ -2881,6 +2925,7 @@ if typing.TYPE_CHECKING:
|
|
|
2881
2925
|
VehicleStatsSpreaderRoadTemp,
|
|
2882
2926
|
VehicleStatsSyntheticEngineSeconds,
|
|
2883
2927
|
VehicleStatsSyntheticEngineSecondsValue,
|
|
2928
|
+
VehicleStatsTime,
|
|
2884
2929
|
VehicleStatsTirePressures,
|
|
2885
2930
|
VehicleSummary,
|
|
2886
2931
|
VehicleTags,
|
|
@@ -3136,6 +3181,7 @@ if typing.TYPE_CHECKING:
|
|
|
3136
3181
|
organization_info,
|
|
3137
3182
|
plans,
|
|
3138
3183
|
preview_ap_is,
|
|
3184
|
+
route_events,
|
|
3139
3185
|
routes,
|
|
3140
3186
|
safety,
|
|
3141
3187
|
sensors,
|
|
@@ -3693,6 +3739,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
3693
3739
|
"DocumentsPostDocumentServiceUnavailableErrorResponseBody": ".types",
|
|
3694
3740
|
"DocumentsPostDocumentTooManyRequestsErrorResponseBody": ".types",
|
|
3695
3741
|
"DocumentsPostDocumentUnauthorizedErrorResponseBody": ".types",
|
|
3742
|
+
"DoorOpenResponseBody": ".types",
|
|
3696
3743
|
"DriveTimeDurationMs": ".types",
|
|
3697
3744
|
"Driver": ".types",
|
|
3698
3745
|
"DriverActivationStatus": ".types",
|
|
@@ -5173,6 +5220,11 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
5173
5220
|
"ReverseGeoObjectResponseBody": ".types",
|
|
5174
5221
|
"RollingStopDetectionAlertSettingsObjectResponseBody": ".types",
|
|
5175
5222
|
"RouteChangesResponseBody": ".types",
|
|
5223
|
+
"RouteEventDetailsResponseBody": ".types",
|
|
5224
|
+
"RouteEventResponseResponseBody": ".types",
|
|
5225
|
+
"RouteEventResponseResponseBodyEventType": ".types",
|
|
5226
|
+
"RouteEventRouteResponseResponseBody": ".types",
|
|
5227
|
+
"RouteEventStopResponseResponseBody": ".types",
|
|
5176
5228
|
"RouteFeedObjectResponseBody": ".types",
|
|
5177
5229
|
"RouteFeedObjectResponseBodyOperation": ".types",
|
|
5178
5230
|
"RouteFeedObjectResponseBodySource": ".types",
|
|
@@ -5228,6 +5280,16 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
5228
5280
|
"RoutesFetchRoutesServiceUnavailableErrorResponseBody": ".types",
|
|
5229
5281
|
"RoutesFetchRoutesTooManyRequestsErrorResponseBody": ".types",
|
|
5230
5282
|
"RoutesFetchRoutesUnauthorizedErrorResponseBody": ".types",
|
|
5283
|
+
"RoutesGetRouteEventsStreamBadGatewayErrorResponseBody": ".types",
|
|
5284
|
+
"RoutesGetRouteEventsStreamGatewayTimeoutErrorResponseBody": ".types",
|
|
5285
|
+
"RoutesGetRouteEventsStreamInternalServerErrorResponseBody": ".types",
|
|
5286
|
+
"RoutesGetRouteEventsStreamMethodNotAllowedErrorResponseBody": ".types",
|
|
5287
|
+
"RoutesGetRouteEventsStreamNotFoundErrorResponseBody": ".types",
|
|
5288
|
+
"RoutesGetRouteEventsStreamNotImplementedErrorResponseBody": ".types",
|
|
5289
|
+
"RoutesGetRouteEventsStreamResponseBody": ".types",
|
|
5290
|
+
"RoutesGetRouteEventsStreamServiceUnavailableErrorResponseBody": ".types",
|
|
5291
|
+
"RoutesGetRouteEventsStreamTooManyRequestsErrorResponseBody": ".types",
|
|
5292
|
+
"RoutesGetRouteEventsStreamUnauthorizedErrorResponseBody": ".types",
|
|
5231
5293
|
"RoutesGetRoutesFeedBadGatewayErrorResponseBody": ".types",
|
|
5232
5294
|
"RoutesGetRoutesFeedGatewayTimeoutErrorResponseBody": ".types",
|
|
5233
5295
|
"RoutesGetRoutesFeedInternalServerErrorResponseBody": ".types",
|
|
@@ -5268,8 +5330,10 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
5268
5330
|
"SafetyEventDownloadForwardVideoUrl": ".types",
|
|
5269
5331
|
"SafetyEventDownloadInwardVideoUrl": ".types",
|
|
5270
5332
|
"SafetyEventDownloadTrackedInwardVideoUrl": ".types",
|
|
5333
|
+
"SafetyEventDriver": ".types",
|
|
5271
5334
|
"SafetyEventDriverObjectResponseBody": ".types",
|
|
5272
5335
|
"SafetyEventId": ".types",
|
|
5336
|
+
"SafetyEventLocation": ".types",
|
|
5273
5337
|
"SafetyEventMaxAccelerationGForce": ".types",
|
|
5274
5338
|
"SafetyEventObjectResponseBody": ".types",
|
|
5275
5339
|
"SafetyEventTime": ".types",
|
|
@@ -5282,6 +5346,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
5282
5346
|
"SafetyEventV2DriverObjectResponseBody": ".types",
|
|
5283
5347
|
"SafetyEventV2ObjectResponseBody": ".types",
|
|
5284
5348
|
"SafetyEventV2ObjectResponseBodyEventState": ".types",
|
|
5349
|
+
"SafetyEventVehicle": ".types",
|
|
5285
5350
|
"SafetyEventVehicleObjectResponseBody": ".types",
|
|
5286
5351
|
"SafetyEventsGetSafetyActivityEventFeedBadGatewayErrorResponseBody": ".types",
|
|
5287
5352
|
"SafetyEventsGetSafetyActivityEventFeedGatewayTimeoutErrorResponseBody": ".types",
|
|
@@ -5500,6 +5565,11 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
5500
5565
|
"SpeedingSeverityLevelResponseBodySeverityLevel": ".types",
|
|
5501
5566
|
"StandardDeleteResponse": ".types",
|
|
5502
5567
|
"StartFunctionRunResponseBodyResponseBody": ".types",
|
|
5568
|
+
"StopEtaUpdatedEventDetailsResponseBody": ".types",
|
|
5569
|
+
"StopTaskCompletedEventDetailsResponseBody": ".types",
|
|
5570
|
+
"StopTaskCompletedEventDetailsResponseBodyTaskType": ".types",
|
|
5571
|
+
"StopTaskSkippedEventDetailsResponseBody": ".types",
|
|
5572
|
+
"StopTaskSkippedEventDetailsResponseBodyTaskType": ".types",
|
|
5503
5573
|
"StreamWorkOrdersRequestWorkOrderStatusesItem": ".work_orders",
|
|
5504
5574
|
"StringDataPoint": ".types",
|
|
5505
5575
|
"SuddenFuelLevelDropResponseBody": ".types",
|
|
@@ -5994,6 +6064,19 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
5994
6064
|
"VehicleAssignmentObjectResponseBody": ".types",
|
|
5995
6065
|
"VehicleAuxInputName": ".types",
|
|
5996
6066
|
"VehicleAuxInputType": ".types",
|
|
6067
|
+
"VehicleAuxInputType1": ".types",
|
|
6068
|
+
"VehicleAuxInputType10": ".types",
|
|
6069
|
+
"VehicleAuxInputType11": ".types",
|
|
6070
|
+
"VehicleAuxInputType12": ".types",
|
|
6071
|
+
"VehicleAuxInputType13": ".types",
|
|
6072
|
+
"VehicleAuxInputType2": ".types",
|
|
6073
|
+
"VehicleAuxInputType3": ".types",
|
|
6074
|
+
"VehicleAuxInputType4": ".types",
|
|
6075
|
+
"VehicleAuxInputType5": ".types",
|
|
6076
|
+
"VehicleAuxInputType6": ".types",
|
|
6077
|
+
"VehicleAuxInputType7": ".types",
|
|
6078
|
+
"VehicleAuxInputType8": ".types",
|
|
6079
|
+
"VehicleAuxInputType9": ".types",
|
|
5997
6080
|
"VehicleBatterVoltageDetailsObjectRequestBody": ".types",
|
|
5998
6081
|
"VehicleBatterVoltageDetailsObjectRequestBodyOperation": ".types",
|
|
5999
6082
|
"VehicleBatterVoltageDetailsObjectResponseBody": ".types",
|
|
@@ -6016,7 +6099,9 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
6016
6099
|
"VehicleLocationIsEcuSpeed": ".types",
|
|
6017
6100
|
"VehicleLocationLatitude": ".types",
|
|
6018
6101
|
"VehicleLocationLongitude": ".types",
|
|
6102
|
+
"VehicleLocationReverseGeo": ".types",
|
|
6019
6103
|
"VehicleLocationSpeed": ".types",
|
|
6104
|
+
"VehicleLocationTime": ".types",
|
|
6020
6105
|
"VehicleLocationsListResponse": ".types",
|
|
6021
6106
|
"VehicleLocationsListResponseData": ".types",
|
|
6022
6107
|
"VehicleLocationsResponse": ".types",
|
|
@@ -6043,6 +6128,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
6043
6128
|
"VehicleSensorConfigurationDoorResponseBody": ".types",
|
|
6044
6129
|
"VehicleSensorConfigurationDoorResponseBodyPosition": ".types",
|
|
6045
6130
|
"VehicleSensorConfigurationResponseBody": ".types",
|
|
6131
|
+
"VehicleStaticAssignedDriver": ".types",
|
|
6046
6132
|
"VehicleStatsAmbientAirTempMilliC": ".types",
|
|
6047
6133
|
"VehicleStatsAmbientAirTempMilliCValue": ".types",
|
|
6048
6134
|
"VehicleStatsAmbientAirTempMilliCWithDecoration": ".types",
|
|
@@ -6081,6 +6167,8 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
6081
6167
|
"VehicleStatsDefLevelMilliPercent": ".types",
|
|
6082
6168
|
"VehicleStatsDefLevelMilliPercentValue": ".types",
|
|
6083
6169
|
"VehicleStatsDefLevelMilliPercentWithDecoration": ".types",
|
|
6170
|
+
"VehicleStatsEcuDoorStatus": ".types",
|
|
6171
|
+
"VehicleStatsEcuDoorStatusValue": ".types",
|
|
6084
6172
|
"VehicleStatsEcuSpeedMph": ".types",
|
|
6085
6173
|
"VehicleStatsEcuSpeedMphValue": ".types",
|
|
6086
6174
|
"VehicleStatsEcuSpeedMphWithDecoration": ".types",
|
|
@@ -6190,6 +6278,8 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
6190
6278
|
"VehicleStatsObdOdometerMetersWithDecoration": ".types",
|
|
6191
6279
|
"VehicleStatsResponse": ".types",
|
|
6192
6280
|
"VehicleStatsResponseData": ".types",
|
|
6281
|
+
"VehicleStatsResponseEcuDoorStatus": ".types",
|
|
6282
|
+
"VehicleStatsResponseEcuDoorStatusValue": ".types",
|
|
6193
6283
|
"VehicleStatsResponseEvAverageBatteryTemperatureMilliCelsius": ".types",
|
|
6194
6284
|
"VehicleStatsResponseEvBatteryCurrentMilliAmp": ".types",
|
|
6195
6285
|
"VehicleStatsResponseEvBatteryStateOfHealthMilliPercent": ".types",
|
|
@@ -6240,6 +6330,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
6240
6330
|
"VehicleStatsSpreaderRoadTemp": ".types",
|
|
6241
6331
|
"VehicleStatsSyntheticEngineSeconds": ".types",
|
|
6242
6332
|
"VehicleStatsSyntheticEngineSecondsValue": ".types",
|
|
6333
|
+
"VehicleStatsTime": ".types",
|
|
6243
6334
|
"VehicleStatsTirePressures": ".types",
|
|
6244
6335
|
"VehicleSummary": ".types",
|
|
6245
6336
|
"VehicleTags": ".types",
|
|
@@ -6491,6 +6582,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
6491
6582
|
"organization_info": ".organization_info",
|
|
6492
6583
|
"plans": ".plans",
|
|
6493
6584
|
"preview_ap_is": ".preview_ap_is",
|
|
6585
|
+
"route_events": ".route_events",
|
|
6494
6586
|
"routes": ".routes",
|
|
6495
6587
|
"safety": ".safety",
|
|
6496
6588
|
"sensors": ".sensors",
|
|
@@ -6954,6 +7046,7 @@ __all__ = [
|
|
|
6954
7046
|
"DocumentsPostDocumentServiceUnavailableErrorResponseBody",
|
|
6955
7047
|
"DocumentsPostDocumentTooManyRequestsErrorResponseBody",
|
|
6956
7048
|
"DocumentsPostDocumentUnauthorizedErrorResponseBody",
|
|
7049
|
+
"DoorOpenResponseBody",
|
|
6957
7050
|
"DriveTimeDurationMs",
|
|
6958
7051
|
"Driver",
|
|
6959
7052
|
"DriverActivationStatus",
|
|
@@ -8434,6 +8527,11 @@ __all__ = [
|
|
|
8434
8527
|
"ReverseGeoObjectResponseBody",
|
|
8435
8528
|
"RollingStopDetectionAlertSettingsObjectResponseBody",
|
|
8436
8529
|
"RouteChangesResponseBody",
|
|
8530
|
+
"RouteEventDetailsResponseBody",
|
|
8531
|
+
"RouteEventResponseResponseBody",
|
|
8532
|
+
"RouteEventResponseResponseBodyEventType",
|
|
8533
|
+
"RouteEventRouteResponseResponseBody",
|
|
8534
|
+
"RouteEventStopResponseResponseBody",
|
|
8437
8535
|
"RouteFeedObjectResponseBody",
|
|
8438
8536
|
"RouteFeedObjectResponseBodyOperation",
|
|
8439
8537
|
"RouteFeedObjectResponseBodySource",
|
|
@@ -8489,6 +8587,16 @@ __all__ = [
|
|
|
8489
8587
|
"RoutesFetchRoutesServiceUnavailableErrorResponseBody",
|
|
8490
8588
|
"RoutesFetchRoutesTooManyRequestsErrorResponseBody",
|
|
8491
8589
|
"RoutesFetchRoutesUnauthorizedErrorResponseBody",
|
|
8590
|
+
"RoutesGetRouteEventsStreamBadGatewayErrorResponseBody",
|
|
8591
|
+
"RoutesGetRouteEventsStreamGatewayTimeoutErrorResponseBody",
|
|
8592
|
+
"RoutesGetRouteEventsStreamInternalServerErrorResponseBody",
|
|
8593
|
+
"RoutesGetRouteEventsStreamMethodNotAllowedErrorResponseBody",
|
|
8594
|
+
"RoutesGetRouteEventsStreamNotFoundErrorResponseBody",
|
|
8595
|
+
"RoutesGetRouteEventsStreamNotImplementedErrorResponseBody",
|
|
8596
|
+
"RoutesGetRouteEventsStreamResponseBody",
|
|
8597
|
+
"RoutesGetRouteEventsStreamServiceUnavailableErrorResponseBody",
|
|
8598
|
+
"RoutesGetRouteEventsStreamTooManyRequestsErrorResponseBody",
|
|
8599
|
+
"RoutesGetRouteEventsStreamUnauthorizedErrorResponseBody",
|
|
8492
8600
|
"RoutesGetRoutesFeedBadGatewayErrorResponseBody",
|
|
8493
8601
|
"RoutesGetRoutesFeedGatewayTimeoutErrorResponseBody",
|
|
8494
8602
|
"RoutesGetRoutesFeedInternalServerErrorResponseBody",
|
|
@@ -8529,8 +8637,10 @@ __all__ = [
|
|
|
8529
8637
|
"SafetyEventDownloadForwardVideoUrl",
|
|
8530
8638
|
"SafetyEventDownloadInwardVideoUrl",
|
|
8531
8639
|
"SafetyEventDownloadTrackedInwardVideoUrl",
|
|
8640
|
+
"SafetyEventDriver",
|
|
8532
8641
|
"SafetyEventDriverObjectResponseBody",
|
|
8533
8642
|
"SafetyEventId",
|
|
8643
|
+
"SafetyEventLocation",
|
|
8534
8644
|
"SafetyEventMaxAccelerationGForce",
|
|
8535
8645
|
"SafetyEventObjectResponseBody",
|
|
8536
8646
|
"SafetyEventTime",
|
|
@@ -8543,6 +8653,7 @@ __all__ = [
|
|
|
8543
8653
|
"SafetyEventV2DriverObjectResponseBody",
|
|
8544
8654
|
"SafetyEventV2ObjectResponseBody",
|
|
8545
8655
|
"SafetyEventV2ObjectResponseBodyEventState",
|
|
8656
|
+
"SafetyEventVehicle",
|
|
8546
8657
|
"SafetyEventVehicleObjectResponseBody",
|
|
8547
8658
|
"SafetyEventsGetSafetyActivityEventFeedBadGatewayErrorResponseBody",
|
|
8548
8659
|
"SafetyEventsGetSafetyActivityEventFeedGatewayTimeoutErrorResponseBody",
|
|
@@ -8761,6 +8872,11 @@ __all__ = [
|
|
|
8761
8872
|
"SpeedingSeverityLevelResponseBodySeverityLevel",
|
|
8762
8873
|
"StandardDeleteResponse",
|
|
8763
8874
|
"StartFunctionRunResponseBodyResponseBody",
|
|
8875
|
+
"StopEtaUpdatedEventDetailsResponseBody",
|
|
8876
|
+
"StopTaskCompletedEventDetailsResponseBody",
|
|
8877
|
+
"StopTaskCompletedEventDetailsResponseBodyTaskType",
|
|
8878
|
+
"StopTaskSkippedEventDetailsResponseBody",
|
|
8879
|
+
"StopTaskSkippedEventDetailsResponseBodyTaskType",
|
|
8764
8880
|
"StreamWorkOrdersRequestWorkOrderStatusesItem",
|
|
8765
8881
|
"StringDataPoint",
|
|
8766
8882
|
"SuddenFuelLevelDropResponseBody",
|
|
@@ -9255,6 +9371,19 @@ __all__ = [
|
|
|
9255
9371
|
"VehicleAssignmentObjectResponseBody",
|
|
9256
9372
|
"VehicleAuxInputName",
|
|
9257
9373
|
"VehicleAuxInputType",
|
|
9374
|
+
"VehicleAuxInputType1",
|
|
9375
|
+
"VehicleAuxInputType10",
|
|
9376
|
+
"VehicleAuxInputType11",
|
|
9377
|
+
"VehicleAuxInputType12",
|
|
9378
|
+
"VehicleAuxInputType13",
|
|
9379
|
+
"VehicleAuxInputType2",
|
|
9380
|
+
"VehicleAuxInputType3",
|
|
9381
|
+
"VehicleAuxInputType4",
|
|
9382
|
+
"VehicleAuxInputType5",
|
|
9383
|
+
"VehicleAuxInputType6",
|
|
9384
|
+
"VehicleAuxInputType7",
|
|
9385
|
+
"VehicleAuxInputType8",
|
|
9386
|
+
"VehicleAuxInputType9",
|
|
9258
9387
|
"VehicleBatterVoltageDetailsObjectRequestBody",
|
|
9259
9388
|
"VehicleBatterVoltageDetailsObjectRequestBodyOperation",
|
|
9260
9389
|
"VehicleBatterVoltageDetailsObjectResponseBody",
|
|
@@ -9277,7 +9406,9 @@ __all__ = [
|
|
|
9277
9406
|
"VehicleLocationIsEcuSpeed",
|
|
9278
9407
|
"VehicleLocationLatitude",
|
|
9279
9408
|
"VehicleLocationLongitude",
|
|
9409
|
+
"VehicleLocationReverseGeo",
|
|
9280
9410
|
"VehicleLocationSpeed",
|
|
9411
|
+
"VehicleLocationTime",
|
|
9281
9412
|
"VehicleLocationsListResponse",
|
|
9282
9413
|
"VehicleLocationsListResponseData",
|
|
9283
9414
|
"VehicleLocationsResponse",
|
|
@@ -9304,6 +9435,7 @@ __all__ = [
|
|
|
9304
9435
|
"VehicleSensorConfigurationDoorResponseBody",
|
|
9305
9436
|
"VehicleSensorConfigurationDoorResponseBodyPosition",
|
|
9306
9437
|
"VehicleSensorConfigurationResponseBody",
|
|
9438
|
+
"VehicleStaticAssignedDriver",
|
|
9307
9439
|
"VehicleStatsAmbientAirTempMilliC",
|
|
9308
9440
|
"VehicleStatsAmbientAirTempMilliCValue",
|
|
9309
9441
|
"VehicleStatsAmbientAirTempMilliCWithDecoration",
|
|
@@ -9342,6 +9474,8 @@ __all__ = [
|
|
|
9342
9474
|
"VehicleStatsDefLevelMilliPercent",
|
|
9343
9475
|
"VehicleStatsDefLevelMilliPercentValue",
|
|
9344
9476
|
"VehicleStatsDefLevelMilliPercentWithDecoration",
|
|
9477
|
+
"VehicleStatsEcuDoorStatus",
|
|
9478
|
+
"VehicleStatsEcuDoorStatusValue",
|
|
9345
9479
|
"VehicleStatsEcuSpeedMph",
|
|
9346
9480
|
"VehicleStatsEcuSpeedMphValue",
|
|
9347
9481
|
"VehicleStatsEcuSpeedMphWithDecoration",
|
|
@@ -9451,6 +9585,8 @@ __all__ = [
|
|
|
9451
9585
|
"VehicleStatsObdOdometerMetersWithDecoration",
|
|
9452
9586
|
"VehicleStatsResponse",
|
|
9453
9587
|
"VehicleStatsResponseData",
|
|
9588
|
+
"VehicleStatsResponseEcuDoorStatus",
|
|
9589
|
+
"VehicleStatsResponseEcuDoorStatusValue",
|
|
9454
9590
|
"VehicleStatsResponseEvAverageBatteryTemperatureMilliCelsius",
|
|
9455
9591
|
"VehicleStatsResponseEvBatteryCurrentMilliAmp",
|
|
9456
9592
|
"VehicleStatsResponseEvBatteryStateOfHealthMilliPercent",
|
|
@@ -9501,6 +9637,7 @@ __all__ = [
|
|
|
9501
9637
|
"VehicleStatsSpreaderRoadTemp",
|
|
9502
9638
|
"VehicleStatsSyntheticEngineSeconds",
|
|
9503
9639
|
"VehicleStatsSyntheticEngineSecondsValue",
|
|
9640
|
+
"VehicleStatsTime",
|
|
9504
9641
|
"VehicleStatsTirePressures",
|
|
9505
9642
|
"VehicleSummary",
|
|
9506
9643
|
"VehicleTags",
|
|
@@ -9752,6 +9889,7 @@ __all__ = [
|
|
|
9752
9889
|
"organization_info",
|
|
9753
9890
|
"plans",
|
|
9754
9891
|
"preview_ap_is",
|
|
9892
|
+
"route_events",
|
|
9755
9893
|
"routes",
|
|
9756
9894
|
"safety",
|
|
9757
9895
|
"sensors",
|
samsara/client.py
CHANGED
|
@@ -46,6 +46,7 @@ if typing.TYPE_CHECKING:
|
|
|
46
46
|
from .organization_info.client import AsyncOrganizationInfoClient, OrganizationInfoClient
|
|
47
47
|
from .plans.client import AsyncPlansClient, PlansClient
|
|
48
48
|
from .preview_ap_is.client import AsyncPreviewApIsClient, PreviewApIsClient
|
|
49
|
+
from .route_events.client import AsyncRouteEventsClient, RouteEventsClient
|
|
49
50
|
from .routes.client import AsyncRoutesClient, RoutesClient
|
|
50
51
|
from .safety.client import AsyncSafetyClient, SafetyClient
|
|
51
52
|
from .sensors.client import AsyncSensorsClient, SensorsClient
|
|
@@ -168,6 +169,7 @@ class Samsara:
|
|
|
168
169
|
self._work_orders: typing.Optional[WorkOrdersClient] = None
|
|
169
170
|
self._organization_info: typing.Optional[OrganizationInfoClient] = None
|
|
170
171
|
self._preview_ap_is: typing.Optional[PreviewApIsClient] = None
|
|
172
|
+
self._route_events: typing.Optional[RouteEventsClient] = None
|
|
171
173
|
self._speeding_intervals: typing.Optional[SpeedingIntervalsClient] = None
|
|
172
174
|
self._tags: typing.Optional[TagsClient] = None
|
|
173
175
|
self._users: typing.Optional[UsersClient] = None
|
|
@@ -491,6 +493,14 @@ class Samsara:
|
|
|
491
493
|
self._preview_ap_is = PreviewApIsClient(client_wrapper=self._client_wrapper)
|
|
492
494
|
return self._preview_ap_is
|
|
493
495
|
|
|
496
|
+
@property
|
|
497
|
+
def route_events(self):
|
|
498
|
+
if self._route_events is None:
|
|
499
|
+
from .route_events.client import RouteEventsClient # noqa: E402
|
|
500
|
+
|
|
501
|
+
self._route_events = RouteEventsClient(client_wrapper=self._client_wrapper)
|
|
502
|
+
return self._route_events
|
|
503
|
+
|
|
494
504
|
@property
|
|
495
505
|
def speeding_intervals(self):
|
|
496
506
|
if self._speeding_intervals is None:
|
|
@@ -676,6 +686,7 @@ class AsyncSamsara:
|
|
|
676
686
|
self._work_orders: typing.Optional[AsyncWorkOrdersClient] = None
|
|
677
687
|
self._organization_info: typing.Optional[AsyncOrganizationInfoClient] = None
|
|
678
688
|
self._preview_ap_is: typing.Optional[AsyncPreviewApIsClient] = None
|
|
689
|
+
self._route_events: typing.Optional[AsyncRouteEventsClient] = None
|
|
679
690
|
self._speeding_intervals: typing.Optional[AsyncSpeedingIntervalsClient] = None
|
|
680
691
|
self._tags: typing.Optional[AsyncTagsClient] = None
|
|
681
692
|
self._users: typing.Optional[AsyncUsersClient] = None
|
|
@@ -1001,6 +1012,14 @@ class AsyncSamsara:
|
|
|
1001
1012
|
self._preview_ap_is = AsyncPreviewApIsClient(client_wrapper=self._client_wrapper)
|
|
1002
1013
|
return self._preview_ap_is
|
|
1003
1014
|
|
|
1015
|
+
@property
|
|
1016
|
+
def route_events(self):
|
|
1017
|
+
if self._route_events is None:
|
|
1018
|
+
from .route_events.client import AsyncRouteEventsClient # noqa: E402
|
|
1019
|
+
|
|
1020
|
+
self._route_events = AsyncRouteEventsClient(client_wrapper=self._client_wrapper)
|
|
1021
|
+
return self._route_events
|
|
1022
|
+
|
|
1004
1023
|
@property
|
|
1005
1024
|
def speeding_intervals(self):
|
|
1006
1025
|
if self._speeding_intervals is None:
|
samsara/core/client_wrapper.py
CHANGED
|
@@ -22,10 +22,10 @@ class BaseClientWrapper:
|
|
|
22
22
|
|
|
23
23
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
24
24
|
headers: typing.Dict[str, str] = {
|
|
25
|
-
"User-Agent": "samsara-api/4.
|
|
25
|
+
"User-Agent": "samsara-api/4.1.1",
|
|
26
26
|
"X-Fern-Language": "Python",
|
|
27
27
|
"X-Fern-SDK-Name": "samsara-api",
|
|
28
|
-
"X-Fern-SDK-Version": "4.
|
|
28
|
+
"X-Fern-SDK-Version": "4.1.1",
|
|
29
29
|
**(self.get_custom_headers() or {}),
|
|
30
30
|
}
|
|
31
31
|
token = self._get_token()
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.routes_get_route_events_stream_response_body import RoutesGetRouteEventsStreamResponseBody
|
|
8
|
+
from .raw_client import AsyncRawRouteEventsClient, RawRouteEventsClient
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RouteEventsClient:
|
|
12
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
13
|
+
self._raw_client = RawRouteEventsClient(client_wrapper=client_wrapper)
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def with_raw_response(self) -> RawRouteEventsClient:
|
|
17
|
+
"""
|
|
18
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
19
|
+
|
|
20
|
+
Returns
|
|
21
|
+
-------
|
|
22
|
+
RawRouteEventsClient
|
|
23
|
+
"""
|
|
24
|
+
return self._raw_client
|
|
25
|
+
|
|
26
|
+
def get_route_events_stream(
|
|
27
|
+
self,
|
|
28
|
+
*,
|
|
29
|
+
after: typing.Optional[str] = None,
|
|
30
|
+
start_time: typing.Optional[str] = None,
|
|
31
|
+
limit: typing.Optional[int] = None,
|
|
32
|
+
include_external_ids: typing.Optional[bool] = None,
|
|
33
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
34
|
+
) -> RoutesGetRouteEventsStreamResponseBody:
|
|
35
|
+
"""
|
|
36
|
+
Subscribes to a feed of immutable, append-only updates for routes. The initial request to this feed endpoint returns a cursor, which can be used in subsequent requests to fetch events on all routes that occurred after the last retrieved event. An initial request (with empty after and startTime parameters) will return events from the past 24 hours.
|
|
37
|
+
|
|
38
|
+
<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
39
|
+
|
|
40
|
+
To use this endpoint, select **Read Routes** under the Driver Workflow 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>
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
44
|
+
|
|
45
|
+
Parameters
|
|
46
|
+
----------
|
|
47
|
+
after : typing.Optional[str]
|
|
48
|
+
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
49
|
+
|
|
50
|
+
start_time : typing.Optional[str]
|
|
51
|
+
A start time in RFC 3339 format. Defaults to 24 hours ago if not provided. Millisecond precision and timezones are supported. (Examples: 2025-07-01T19:08:25Z, 2025-07-01T19:08:25.455Z, OR 2025-07-01T14:00:12-04:00). Cannot be more than 7 days in the past.
|
|
52
|
+
|
|
53
|
+
limit : typing.Optional[int]
|
|
54
|
+
The limit for how many events will be in the response. Default and max for this value is 200 events.
|
|
55
|
+
|
|
56
|
+
include_external_ids : typing.Optional[bool]
|
|
57
|
+
Optional boolean indicating whether to return external IDs on supported entities
|
|
58
|
+
|
|
59
|
+
request_options : typing.Optional[RequestOptions]
|
|
60
|
+
Request-specific configuration.
|
|
61
|
+
|
|
62
|
+
Returns
|
|
63
|
+
-------
|
|
64
|
+
RoutesGetRouteEventsStreamResponseBody
|
|
65
|
+
OK response.
|
|
66
|
+
|
|
67
|
+
Examples
|
|
68
|
+
--------
|
|
69
|
+
from samsara import Samsara
|
|
70
|
+
|
|
71
|
+
client = Samsara(
|
|
72
|
+
token="YOUR_TOKEN",
|
|
73
|
+
)
|
|
74
|
+
client.route_events.get_route_events_stream(
|
|
75
|
+
after="after",
|
|
76
|
+
start_time="startTime",
|
|
77
|
+
limit=1,
|
|
78
|
+
include_external_ids=True,
|
|
79
|
+
)
|
|
80
|
+
"""
|
|
81
|
+
_response = self._raw_client.get_route_events_stream(
|
|
82
|
+
after=after,
|
|
83
|
+
start_time=start_time,
|
|
84
|
+
limit=limit,
|
|
85
|
+
include_external_ids=include_external_ids,
|
|
86
|
+
request_options=request_options,
|
|
87
|
+
)
|
|
88
|
+
return _response.data
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class AsyncRouteEventsClient:
|
|
92
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
93
|
+
self._raw_client = AsyncRawRouteEventsClient(client_wrapper=client_wrapper)
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def with_raw_response(self) -> AsyncRawRouteEventsClient:
|
|
97
|
+
"""
|
|
98
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
99
|
+
|
|
100
|
+
Returns
|
|
101
|
+
-------
|
|
102
|
+
AsyncRawRouteEventsClient
|
|
103
|
+
"""
|
|
104
|
+
return self._raw_client
|
|
105
|
+
|
|
106
|
+
async def get_route_events_stream(
|
|
107
|
+
self,
|
|
108
|
+
*,
|
|
109
|
+
after: typing.Optional[str] = None,
|
|
110
|
+
start_time: typing.Optional[str] = None,
|
|
111
|
+
limit: typing.Optional[int] = None,
|
|
112
|
+
include_external_ids: typing.Optional[bool] = None,
|
|
113
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
114
|
+
) -> RoutesGetRouteEventsStreamResponseBody:
|
|
115
|
+
"""
|
|
116
|
+
Subscribes to a feed of immutable, append-only updates for routes. The initial request to this feed endpoint returns a cursor, which can be used in subsequent requests to fetch events on all routes that occurred after the last retrieved event. An initial request (with empty after and startTime parameters) will return events from the past 24 hours.
|
|
117
|
+
|
|
118
|
+
<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
119
|
+
|
|
120
|
+
To use this endpoint, select **Read Routes** under the Driver Workflow 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>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
124
|
+
|
|
125
|
+
Parameters
|
|
126
|
+
----------
|
|
127
|
+
after : typing.Optional[str]
|
|
128
|
+
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
129
|
+
|
|
130
|
+
start_time : typing.Optional[str]
|
|
131
|
+
A start time in RFC 3339 format. Defaults to 24 hours ago if not provided. Millisecond precision and timezones are supported. (Examples: 2025-07-01T19:08:25Z, 2025-07-01T19:08:25.455Z, OR 2025-07-01T14:00:12-04:00). Cannot be more than 7 days in the past.
|
|
132
|
+
|
|
133
|
+
limit : typing.Optional[int]
|
|
134
|
+
The limit for how many events will be in the response. Default and max for this value is 200 events.
|
|
135
|
+
|
|
136
|
+
include_external_ids : typing.Optional[bool]
|
|
137
|
+
Optional boolean indicating whether to return external IDs on supported entities
|
|
138
|
+
|
|
139
|
+
request_options : typing.Optional[RequestOptions]
|
|
140
|
+
Request-specific configuration.
|
|
141
|
+
|
|
142
|
+
Returns
|
|
143
|
+
-------
|
|
144
|
+
RoutesGetRouteEventsStreamResponseBody
|
|
145
|
+
OK response.
|
|
146
|
+
|
|
147
|
+
Examples
|
|
148
|
+
--------
|
|
149
|
+
import asyncio
|
|
150
|
+
|
|
151
|
+
from samsara import AsyncSamsara
|
|
152
|
+
|
|
153
|
+
client = AsyncSamsara(
|
|
154
|
+
token="YOUR_TOKEN",
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
async def main() -> None:
|
|
159
|
+
await client.route_events.get_route_events_stream(
|
|
160
|
+
after="after",
|
|
161
|
+
start_time="startTime",
|
|
162
|
+
limit=1,
|
|
163
|
+
include_external_ids=True,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
asyncio.run(main())
|
|
168
|
+
"""
|
|
169
|
+
_response = await self._raw_client.get_route_events_stream(
|
|
170
|
+
after=after,
|
|
171
|
+
start_time=start_time,
|
|
172
|
+
limit=limit,
|
|
173
|
+
include_external_ids=include_external_ids,
|
|
174
|
+
request_options=request_options,
|
|
175
|
+
)
|
|
176
|
+
return _response.data
|