samsara-api 4.2.0__py3-none-any.whl → 4.3.0__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 +69 -9
- samsara/addresses/client.py +7 -14
- samsara/addresses/raw_client.py +7 -11
- samsara/alerts/client.py +2 -10
- samsara/alerts/raw_client.py +180 -180
- samsara/assets/__init__.py +3 -3
- samsara/assets/client.py +14 -45
- samsara/assets/raw_client.py +156 -160
- samsara/assets/types/__init__.py +3 -3
- samsara/assets/types/{assets_list_request_type.py → list_assets_request_type.py} +1 -1
- samsara/attributes/client.py +0 -4
- samsara/beta_ap_is/client.py +137 -187
- samsara/beta_ap_is/raw_client.py +2035 -1702
- samsara/carrier_proposed_assignments/client.py +2 -10
- samsara/client.py +5 -0
- samsara/coaching/client.py +2 -22
- samsara/coaching/raw_client.py +108 -108
- samsara/contacts/client.py +2 -8
- samsara/core/__init__.py +5 -0
- samsara/core/client_wrapper.py +18 -10
- samsara/core/custom_pagination.py +152 -0
- samsara/core/http_client.py +176 -90
- samsara/core/http_sse/__init__.py +42 -0
- samsara/core/http_sse/_api.py +112 -0
- samsara/core/http_sse/_decoders.py +61 -0
- samsara/core/http_sse/_exceptions.py +7 -0
- samsara/core/http_sse/_models.py +17 -0
- samsara/core/pagination.py +14 -14
- samsara/core/pydantic_utilities.py +3 -1
- samsara/documents/client.py +2 -12
- samsara/documents/raw_client.py +180 -180
- samsara/driver_qr_codes/raw_client.py +108 -108
- samsara/driver_vehicle_assignments/client.py +0 -12
- samsara/driver_vehicle_assignments/raw_client.py +144 -144
- samsara/drivers/__init__.py +3 -3
- samsara/drivers/client.py +12 -23
- samsara/drivers/raw_client.py +48 -52
- samsara/drivers/types/__init__.py +3 -3
- samsara/drivers/types/{drivers_list_request_driver_activation_status.py → list_drivers_request_driver_activation_status.py} +1 -1
- samsara/equipment/client.py +6 -22
- samsara/errors/bad_gateway_error.py +1 -1
- samsara/errors/gateway_timeout_error.py +1 -1
- samsara/errors/internal_server_error.py +1 -1
- samsara/errors/method_not_allowed_error.py +1 -1
- samsara/errors/not_found_error.py +1 -1
- samsara/errors/not_implemented_error.py +1 -1
- samsara/errors/service_unavailable_error.py +1 -1
- samsara/errors/too_many_requests_error.py +1 -1
- samsara/errors/unauthorized_error.py +1 -1
- samsara/forms/__init__.py +9 -3
- samsara/forms/client.py +17 -10
- samsara/forms/raw_client.py +265 -254
- samsara/forms/types/__init__.py +6 -2
- samsara/forms/types/form_submissions_post_form_submission_request_body_status.py +5 -0
- samsara/fuel_and_energy/client.py +0 -30
- samsara/fuel_and_energy/raw_client.py +180 -180
- samsara/gateways/client.py +2 -6
- samsara/gateways/raw_client.py +108 -108
- samsara/hours_of_service/__init__.py +6 -3
- samsara/hours_of_service/client.py +13 -52
- samsara/hours_of_service/raw_client.py +77 -76
- samsara/hours_of_service/types/__init__.py +4 -2
- samsara/hours_of_service/types/get_hos_daily_logs_request_expand.py +5 -0
- samsara/hubs/client.py +2 -94
- samsara/hubs/raw_client.py +216 -216
- samsara/idling/client.py +0 -18
- samsara/idling/raw_client.py +36 -36
- samsara/ifta/client.py +4 -34
- samsara/ifta/raw_client.py +144 -144
- samsara/industrial/client.py +12 -56
- samsara/industrial/raw_client.py +40 -48
- samsara/issues/client.py +0 -4
- samsara/issues/raw_client.py +108 -108
- samsara/legacy_ap_is/client.py +4 -56
- samsara/legacy_ap_is/raw_client.py +108 -108
- samsara/live_sharing_links/client.py +2 -10
- samsara/live_sharing_links/raw_client.py +144 -144
- samsara/location_and_speed/client.py +2 -20
- samsara/location_and_speed/raw_client.py +36 -36
- samsara/maintenance/__init__.py +3 -3
- samsara/maintenance/client.py +15 -30
- samsara/maintenance/raw_client.py +191 -182
- samsara/maintenance/types/__init__.py +6 -2
- samsara/maintenance/types/create_dvir_request_type.py +5 -0
- samsara/media/client.py +0 -4
- samsara/media/raw_client.py +108 -108
- samsara/messages/client.py +2 -8
- samsara/plans/client.py +0 -21
- samsara/plans/raw_client.py +72 -72
- samsara/preview_ap_is/client.py +0 -140
- samsara/preview_ap_is/raw_client.py +72 -430
- samsara/route_events/client.py +2 -12
- samsara/route_events/raw_client.py +36 -36
- samsara/routes/__init__.py +30 -0
- samsara/routes/client.py +7 -35
- samsara/routes/raw_client.py +257 -256
- samsara/routes/types/__init__.py +34 -0
- samsara/routes/types/get_routes_feed_request_expand.py +5 -0
- samsara/safety/client.py +2 -10
- samsara/safety/raw_client.py +36 -36
- samsara/settings/raw_client.py +180 -180
- samsara/speeding_intervals/raw_client.py +36 -36
- samsara/tachograph_eu_only/client.py +0 -6
- samsara/tags/client.py +2 -8
- samsara/trailer_assignments/client.py +2 -18
- samsara/trailers/client.py +2 -12
- samsara/trailers/raw_client.py +180 -180
- samsara/types/__init__.py +54 -0
- samsara/types/create_routes_stop_request_object_request_body.py +7 -0
- samsara/types/driver_assignment_object_response_body.py +2 -1
- samsara/types/driver_assignment_object_response_body_assignment_type.py +5 -0
- samsara/types/driver_external_ids.py +1 -1
- samsara/types/forms_approval_config_object_response_body.py +2 -1
- samsara/types/forms_approval_config_object_response_body_type.py +5 -0
- samsara/types/fuel_level_trigger_details_object_request_body.py +2 -1
- samsara/types/fuel_level_trigger_details_object_request_body_operation.py +5 -0
- samsara/types/fuel_level_trigger_details_object_response_body.py +4 -1
- samsara/types/fuel_level_trigger_details_object_response_body_operation.py +5 -0
- samsara/types/idling_event_object_v_20251023_response_body.py +4 -3
- samsara/types/idling_event_object_v_20251023_response_body_pto_state.py +5 -0
- samsara/types/patch_issue_request_body_assigned_to_request_body.py +2 -1
- samsara/types/patch_issue_request_body_assigned_to_request_body_type.py +5 -0
- samsara/types/reading_datapoint_request_body.py +5 -4
- samsara/types/reading_datapoint_request_body_entity_type.py +5 -0
- samsara/types/reading_history_response_body.py +1 -1
- samsara/types/reading_snapshot_response_body.py +1 -1
- samsara/types/resolved_by.py +2 -1
- samsara/types/resolved_by_type.py +5 -0
- samsara/types/route_feed_object_response_body.py +2 -1
- samsara/types/route_feed_object_response_body_type.py +5 -0
- samsara/types/route_settings_request_body.py +8 -0
- samsara/types/route_settings_request_body_sequencing_method.py +7 -0
- samsara/types/route_settings_response_body.py +8 -0
- samsara/types/route_settings_response_body_sequencing_method.py +7 -0
- samsara/types/route_stop_details_object_response_body.py +2 -1
- samsara/types/route_stop_details_object_response_body_type.py +5 -0
- samsara/types/routes_stop_response_object_response_body.py +7 -0
- samsara/types/training_learner_object_response_body.py +2 -1
- samsara/types/training_learner_object_response_body_type.py +5 -0
- samsara/types/update_routes_stop_request_object_request_body.py +7 -0
- samsara/types/vehicle_assignment_object_response_body.py +4 -3
- samsara/types/vehicle_assignment_object_response_body_assignment_type.py +5 -0
- samsara/types/vehicle_external_ids.py +1 -1
- samsara/types/work_order_money_object_request_body.py +2 -1
- samsara/types/work_order_money_object_request_body_currency.py +5 -0
- samsara/types/work_order_money_object_response_body.py +2 -1
- samsara/types/work_order_money_object_response_body_currency.py +5 -0
- samsara/users/client.py +4 -16
- samsara/vehicle_locations/client.py +4 -16
- samsara/vehicles/client.py +7 -22
- samsara/vehicles/raw_client.py +43 -47
- samsara/webhooks/client.py +2 -10
- samsara/webhooks/raw_client.py +180 -180
- samsara/work_orders/client.py +4 -18
- samsara/work_orders/raw_client.py +216 -216
- {samsara_api-4.2.0.dist-info → samsara_api-4.3.0.dist-info}/METADATA +2 -1
- {samsara_api-4.2.0.dist-info → samsara_api-4.3.0.dist-info}/RECORD +159 -132
- {samsara_api-4.2.0.dist-info → samsara_api-4.3.0.dist-info}/LICENSE +0 -0
- {samsara_api-4.2.0.dist-info → samsara_api-4.3.0.dist-info}/WHEEL +0 -0
samsara/hubs/client.py
CHANGED
|
@@ -89,8 +89,6 @@ class HubsClient:
|
|
|
89
89
|
|
|
90
90
|
Examples
|
|
91
91
|
--------
|
|
92
|
-
import datetime
|
|
93
|
-
|
|
94
92
|
from samsara import Samsara
|
|
95
93
|
|
|
96
94
|
client = Samsara(
|
|
@@ -98,16 +96,6 @@ class HubsClient:
|
|
|
98
96
|
)
|
|
99
97
|
client.hubs.list_hub_capacities(
|
|
100
98
|
hub_id="hubId",
|
|
101
|
-
capacity_ids="capacityIds",
|
|
102
|
-
capacity_names="capacityNames",
|
|
103
|
-
start_time=datetime.datetime.fromisoformat(
|
|
104
|
-
"2024-01-15 09:30:00+00:00",
|
|
105
|
-
),
|
|
106
|
-
end_time=datetime.datetime.fromisoformat(
|
|
107
|
-
"2024-01-15 09:30:00+00:00",
|
|
108
|
-
),
|
|
109
|
-
after="after",
|
|
110
|
-
limit=1,
|
|
111
99
|
)
|
|
112
100
|
"""
|
|
113
101
|
_response = self._raw_client.list_hub_capacities(
|
|
@@ -252,8 +240,6 @@ class HubsClient:
|
|
|
252
240
|
|
|
253
241
|
Examples
|
|
254
242
|
--------
|
|
255
|
-
import datetime
|
|
256
|
-
|
|
257
243
|
from samsara import Samsara
|
|
258
244
|
|
|
259
245
|
client = Samsara(
|
|
@@ -261,16 +247,6 @@ class HubsClient:
|
|
|
261
247
|
)
|
|
262
248
|
client.hubs.list_hub_locations(
|
|
263
249
|
hub_id="hubId",
|
|
264
|
-
location_ids="locationIds",
|
|
265
|
-
customer_location_ids="customerLocationIds",
|
|
266
|
-
start_time=datetime.datetime.fromisoformat(
|
|
267
|
-
"2024-01-15 09:30:00+00:00",
|
|
268
|
-
),
|
|
269
|
-
end_time=datetime.datetime.fromisoformat(
|
|
270
|
-
"2024-01-15 09:30:00+00:00",
|
|
271
|
-
),
|
|
272
|
-
after="after",
|
|
273
|
-
limit=1,
|
|
274
250
|
)
|
|
275
251
|
"""
|
|
276
252
|
_response = self._raw_client.list_hub_locations(
|
|
@@ -414,8 +390,6 @@ class HubsClient:
|
|
|
414
390
|
|
|
415
391
|
Examples
|
|
416
392
|
--------
|
|
417
|
-
import datetime
|
|
418
|
-
|
|
419
393
|
from samsara import Samsara
|
|
420
394
|
|
|
421
395
|
client = Samsara(
|
|
@@ -423,16 +397,6 @@ class HubsClient:
|
|
|
423
397
|
)
|
|
424
398
|
client.hubs.list_hub_skills(
|
|
425
399
|
hub_id="hubId",
|
|
426
|
-
skill_ids="skillIds",
|
|
427
|
-
skill_names="skillNames",
|
|
428
|
-
start_time=datetime.datetime.fromisoformat(
|
|
429
|
-
"2024-01-15 09:30:00+00:00",
|
|
430
|
-
),
|
|
431
|
-
end_time=datetime.datetime.fromisoformat(
|
|
432
|
-
"2024-01-15 09:30:00+00:00",
|
|
433
|
-
),
|
|
434
|
-
after="after",
|
|
435
|
-
limit=1,
|
|
436
400
|
)
|
|
437
401
|
"""
|
|
438
402
|
_response = self._raw_client.list_hub_skills(
|
|
@@ -494,24 +458,12 @@ class HubsClient:
|
|
|
494
458
|
|
|
495
459
|
Examples
|
|
496
460
|
--------
|
|
497
|
-
import datetime
|
|
498
|
-
|
|
499
461
|
from samsara import Samsara
|
|
500
462
|
|
|
501
463
|
client = Samsara(
|
|
502
464
|
token="YOUR_TOKEN",
|
|
503
465
|
)
|
|
504
|
-
client.hubs.list_hubs(
|
|
505
|
-
hub_ids="hubIds",
|
|
506
|
-
start_time=datetime.datetime.fromisoformat(
|
|
507
|
-
"2024-01-15 09:30:00+00:00",
|
|
508
|
-
),
|
|
509
|
-
end_time=datetime.datetime.fromisoformat(
|
|
510
|
-
"2024-01-15 09:30:00+00:00",
|
|
511
|
-
),
|
|
512
|
-
after="after",
|
|
513
|
-
limit=1,
|
|
514
|
-
)
|
|
466
|
+
client.hubs.list_hubs()
|
|
515
467
|
"""
|
|
516
468
|
_response = self._raw_client.list_hubs(
|
|
517
469
|
hub_ids=hub_ids,
|
|
@@ -595,7 +547,6 @@ class AsyncHubsClient:
|
|
|
595
547
|
Examples
|
|
596
548
|
--------
|
|
597
549
|
import asyncio
|
|
598
|
-
import datetime
|
|
599
550
|
|
|
600
551
|
from samsara import AsyncSamsara
|
|
601
552
|
|
|
@@ -607,16 +558,6 @@ class AsyncHubsClient:
|
|
|
607
558
|
async def main() -> None:
|
|
608
559
|
await client.hubs.list_hub_capacities(
|
|
609
560
|
hub_id="hubId",
|
|
610
|
-
capacity_ids="capacityIds",
|
|
611
|
-
capacity_names="capacityNames",
|
|
612
|
-
start_time=datetime.datetime.fromisoformat(
|
|
613
|
-
"2024-01-15 09:30:00+00:00",
|
|
614
|
-
),
|
|
615
|
-
end_time=datetime.datetime.fromisoformat(
|
|
616
|
-
"2024-01-15 09:30:00+00:00",
|
|
617
|
-
),
|
|
618
|
-
after="after",
|
|
619
|
-
limit=1,
|
|
620
561
|
)
|
|
621
562
|
|
|
622
563
|
|
|
@@ -773,7 +714,6 @@ class AsyncHubsClient:
|
|
|
773
714
|
Examples
|
|
774
715
|
--------
|
|
775
716
|
import asyncio
|
|
776
|
-
import datetime
|
|
777
717
|
|
|
778
718
|
from samsara import AsyncSamsara
|
|
779
719
|
|
|
@@ -785,16 +725,6 @@ class AsyncHubsClient:
|
|
|
785
725
|
async def main() -> None:
|
|
786
726
|
await client.hubs.list_hub_locations(
|
|
787
727
|
hub_id="hubId",
|
|
788
|
-
location_ids="locationIds",
|
|
789
|
-
customer_location_ids="customerLocationIds",
|
|
790
|
-
start_time=datetime.datetime.fromisoformat(
|
|
791
|
-
"2024-01-15 09:30:00+00:00",
|
|
792
|
-
),
|
|
793
|
-
end_time=datetime.datetime.fromisoformat(
|
|
794
|
-
"2024-01-15 09:30:00+00:00",
|
|
795
|
-
),
|
|
796
|
-
after="after",
|
|
797
|
-
limit=1,
|
|
798
728
|
)
|
|
799
729
|
|
|
800
730
|
|
|
@@ -950,7 +880,6 @@ class AsyncHubsClient:
|
|
|
950
880
|
Examples
|
|
951
881
|
--------
|
|
952
882
|
import asyncio
|
|
953
|
-
import datetime
|
|
954
883
|
|
|
955
884
|
from samsara import AsyncSamsara
|
|
956
885
|
|
|
@@ -962,16 +891,6 @@ class AsyncHubsClient:
|
|
|
962
891
|
async def main() -> None:
|
|
963
892
|
await client.hubs.list_hub_skills(
|
|
964
893
|
hub_id="hubId",
|
|
965
|
-
skill_ids="skillIds",
|
|
966
|
-
skill_names="skillNames",
|
|
967
|
-
start_time=datetime.datetime.fromisoformat(
|
|
968
|
-
"2024-01-15 09:30:00+00:00",
|
|
969
|
-
),
|
|
970
|
-
end_time=datetime.datetime.fromisoformat(
|
|
971
|
-
"2024-01-15 09:30:00+00:00",
|
|
972
|
-
),
|
|
973
|
-
after="after",
|
|
974
|
-
limit=1,
|
|
975
894
|
)
|
|
976
895
|
|
|
977
896
|
|
|
@@ -1037,7 +956,6 @@ class AsyncHubsClient:
|
|
|
1037
956
|
Examples
|
|
1038
957
|
--------
|
|
1039
958
|
import asyncio
|
|
1040
|
-
import datetime
|
|
1041
959
|
|
|
1042
960
|
from samsara import AsyncSamsara
|
|
1043
961
|
|
|
@@ -1047,17 +965,7 @@ class AsyncHubsClient:
|
|
|
1047
965
|
|
|
1048
966
|
|
|
1049
967
|
async def main() -> None:
|
|
1050
|
-
await client.hubs.list_hubs(
|
|
1051
|
-
hub_ids="hubIds",
|
|
1052
|
-
start_time=datetime.datetime.fromisoformat(
|
|
1053
|
-
"2024-01-15 09:30:00+00:00",
|
|
1054
|
-
),
|
|
1055
|
-
end_time=datetime.datetime.fromisoformat(
|
|
1056
|
-
"2024-01-15 09:30:00+00:00",
|
|
1057
|
-
),
|
|
1058
|
-
after="after",
|
|
1059
|
-
limit=1,
|
|
1060
|
-
)
|
|
968
|
+
await client.hubs.list_hubs()
|
|
1061
969
|
|
|
1062
970
|
|
|
1063
971
|
asyncio.run(main())
|