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
|
@@ -93,16 +93,7 @@ class LocationAndSpeedClient:
|
|
|
93
93
|
client = Samsara(
|
|
94
94
|
token="YOUR_TOKEN",
|
|
95
95
|
)
|
|
96
|
-
client.location_and_speed.get_location_and_speed(
|
|
97
|
-
after="after",
|
|
98
|
-
limit=1,
|
|
99
|
-
start_time="startTime",
|
|
100
|
-
end_time="endTime",
|
|
101
|
-
include_speed=True,
|
|
102
|
-
include_reverse_geo=True,
|
|
103
|
-
include_geofence_lookup=True,
|
|
104
|
-
include_external_ids=True,
|
|
105
|
-
)
|
|
96
|
+
client.location_and_speed.get_location_and_speed()
|
|
106
97
|
"""
|
|
107
98
|
_response = self._raw_client.get_location_and_speed(
|
|
108
99
|
after=after,
|
|
@@ -207,16 +198,7 @@ class AsyncLocationAndSpeedClient:
|
|
|
207
198
|
|
|
208
199
|
|
|
209
200
|
async def main() -> None:
|
|
210
|
-
await client.location_and_speed.get_location_and_speed(
|
|
211
|
-
after="after",
|
|
212
|
-
limit=1,
|
|
213
|
-
start_time="startTime",
|
|
214
|
-
end_time="endTime",
|
|
215
|
-
include_speed=True,
|
|
216
|
-
include_reverse_geo=True,
|
|
217
|
-
include_geofence_lookup=True,
|
|
218
|
-
include_external_ids=True,
|
|
219
|
-
)
|
|
201
|
+
await client.location_and_speed.get_location_and_speed()
|
|
220
202
|
|
|
221
203
|
|
|
222
204
|
asyncio.run(main())
|
|
@@ -117,9 +117,9 @@ class RawLocationAndSpeedClient:
|
|
|
117
117
|
raise UnauthorizedError(
|
|
118
118
|
headers=dict(_response.headers),
|
|
119
119
|
body=typing.cast(
|
|
120
|
-
typing.
|
|
120
|
+
typing.Any,
|
|
121
121
|
parse_obj_as(
|
|
122
|
-
type_=typing.
|
|
122
|
+
type_=typing.Any, # type: ignore
|
|
123
123
|
object_=_response.json(),
|
|
124
124
|
),
|
|
125
125
|
),
|
|
@@ -128,9 +128,9 @@ class RawLocationAndSpeedClient:
|
|
|
128
128
|
raise NotFoundError(
|
|
129
129
|
headers=dict(_response.headers),
|
|
130
130
|
body=typing.cast(
|
|
131
|
-
typing.
|
|
131
|
+
typing.Any,
|
|
132
132
|
parse_obj_as(
|
|
133
|
-
type_=typing.
|
|
133
|
+
type_=typing.Any, # type: ignore
|
|
134
134
|
object_=_response.json(),
|
|
135
135
|
),
|
|
136
136
|
),
|
|
@@ -139,9 +139,9 @@ class RawLocationAndSpeedClient:
|
|
|
139
139
|
raise MethodNotAllowedError(
|
|
140
140
|
headers=dict(_response.headers),
|
|
141
141
|
body=typing.cast(
|
|
142
|
-
typing.
|
|
142
|
+
typing.Any,
|
|
143
143
|
parse_obj_as(
|
|
144
|
-
type_=typing.
|
|
144
|
+
type_=typing.Any, # type: ignore
|
|
145
145
|
object_=_response.json(),
|
|
146
146
|
),
|
|
147
147
|
),
|
|
@@ -150,9 +150,9 @@ class RawLocationAndSpeedClient:
|
|
|
150
150
|
raise TooManyRequestsError(
|
|
151
151
|
headers=dict(_response.headers),
|
|
152
152
|
body=typing.cast(
|
|
153
|
-
typing.
|
|
153
|
+
typing.Any,
|
|
154
154
|
parse_obj_as(
|
|
155
|
-
type_=typing.
|
|
155
|
+
type_=typing.Any, # type: ignore
|
|
156
156
|
object_=_response.json(),
|
|
157
157
|
),
|
|
158
158
|
),
|
|
@@ -161,9 +161,9 @@ class RawLocationAndSpeedClient:
|
|
|
161
161
|
raise InternalServerError(
|
|
162
162
|
headers=dict(_response.headers),
|
|
163
163
|
body=typing.cast(
|
|
164
|
-
typing.
|
|
164
|
+
typing.Any,
|
|
165
165
|
parse_obj_as(
|
|
166
|
-
type_=typing.
|
|
166
|
+
type_=typing.Any, # type: ignore
|
|
167
167
|
object_=_response.json(),
|
|
168
168
|
),
|
|
169
169
|
),
|
|
@@ -172,9 +172,9 @@ class RawLocationAndSpeedClient:
|
|
|
172
172
|
raise NotImplementedError(
|
|
173
173
|
headers=dict(_response.headers),
|
|
174
174
|
body=typing.cast(
|
|
175
|
-
typing.
|
|
175
|
+
typing.Any,
|
|
176
176
|
parse_obj_as(
|
|
177
|
-
type_=typing.
|
|
177
|
+
type_=typing.Any, # type: ignore
|
|
178
178
|
object_=_response.json(),
|
|
179
179
|
),
|
|
180
180
|
),
|
|
@@ -183,9 +183,9 @@ class RawLocationAndSpeedClient:
|
|
|
183
183
|
raise BadGatewayError(
|
|
184
184
|
headers=dict(_response.headers),
|
|
185
185
|
body=typing.cast(
|
|
186
|
-
typing.
|
|
186
|
+
typing.Any,
|
|
187
187
|
parse_obj_as(
|
|
188
|
-
type_=typing.
|
|
188
|
+
type_=typing.Any, # type: ignore
|
|
189
189
|
object_=_response.json(),
|
|
190
190
|
),
|
|
191
191
|
),
|
|
@@ -194,9 +194,9 @@ class RawLocationAndSpeedClient:
|
|
|
194
194
|
raise ServiceUnavailableError(
|
|
195
195
|
headers=dict(_response.headers),
|
|
196
196
|
body=typing.cast(
|
|
197
|
-
typing.
|
|
197
|
+
typing.Any,
|
|
198
198
|
parse_obj_as(
|
|
199
|
-
type_=typing.
|
|
199
|
+
type_=typing.Any, # type: ignore
|
|
200
200
|
object_=_response.json(),
|
|
201
201
|
),
|
|
202
202
|
),
|
|
@@ -205,9 +205,9 @@ class RawLocationAndSpeedClient:
|
|
|
205
205
|
raise GatewayTimeoutError(
|
|
206
206
|
headers=dict(_response.headers),
|
|
207
207
|
body=typing.cast(
|
|
208
|
-
typing.
|
|
208
|
+
typing.Any,
|
|
209
209
|
parse_obj_as(
|
|
210
|
-
type_=typing.
|
|
210
|
+
type_=typing.Any, # type: ignore
|
|
211
211
|
object_=_response.json(),
|
|
212
212
|
),
|
|
213
213
|
),
|
|
@@ -313,9 +313,9 @@ class AsyncRawLocationAndSpeedClient:
|
|
|
313
313
|
raise UnauthorizedError(
|
|
314
314
|
headers=dict(_response.headers),
|
|
315
315
|
body=typing.cast(
|
|
316
|
-
typing.
|
|
316
|
+
typing.Any,
|
|
317
317
|
parse_obj_as(
|
|
318
|
-
type_=typing.
|
|
318
|
+
type_=typing.Any, # type: ignore
|
|
319
319
|
object_=_response.json(),
|
|
320
320
|
),
|
|
321
321
|
),
|
|
@@ -324,9 +324,9 @@ class AsyncRawLocationAndSpeedClient:
|
|
|
324
324
|
raise NotFoundError(
|
|
325
325
|
headers=dict(_response.headers),
|
|
326
326
|
body=typing.cast(
|
|
327
|
-
typing.
|
|
327
|
+
typing.Any,
|
|
328
328
|
parse_obj_as(
|
|
329
|
-
type_=typing.
|
|
329
|
+
type_=typing.Any, # type: ignore
|
|
330
330
|
object_=_response.json(),
|
|
331
331
|
),
|
|
332
332
|
),
|
|
@@ -335,9 +335,9 @@ class AsyncRawLocationAndSpeedClient:
|
|
|
335
335
|
raise MethodNotAllowedError(
|
|
336
336
|
headers=dict(_response.headers),
|
|
337
337
|
body=typing.cast(
|
|
338
|
-
typing.
|
|
338
|
+
typing.Any,
|
|
339
339
|
parse_obj_as(
|
|
340
|
-
type_=typing.
|
|
340
|
+
type_=typing.Any, # type: ignore
|
|
341
341
|
object_=_response.json(),
|
|
342
342
|
),
|
|
343
343
|
),
|
|
@@ -346,9 +346,9 @@ class AsyncRawLocationAndSpeedClient:
|
|
|
346
346
|
raise TooManyRequestsError(
|
|
347
347
|
headers=dict(_response.headers),
|
|
348
348
|
body=typing.cast(
|
|
349
|
-
typing.
|
|
349
|
+
typing.Any,
|
|
350
350
|
parse_obj_as(
|
|
351
|
-
type_=typing.
|
|
351
|
+
type_=typing.Any, # type: ignore
|
|
352
352
|
object_=_response.json(),
|
|
353
353
|
),
|
|
354
354
|
),
|
|
@@ -357,9 +357,9 @@ class AsyncRawLocationAndSpeedClient:
|
|
|
357
357
|
raise InternalServerError(
|
|
358
358
|
headers=dict(_response.headers),
|
|
359
359
|
body=typing.cast(
|
|
360
|
-
typing.
|
|
360
|
+
typing.Any,
|
|
361
361
|
parse_obj_as(
|
|
362
|
-
type_=typing.
|
|
362
|
+
type_=typing.Any, # type: ignore
|
|
363
363
|
object_=_response.json(),
|
|
364
364
|
),
|
|
365
365
|
),
|
|
@@ -368,9 +368,9 @@ class AsyncRawLocationAndSpeedClient:
|
|
|
368
368
|
raise NotImplementedError(
|
|
369
369
|
headers=dict(_response.headers),
|
|
370
370
|
body=typing.cast(
|
|
371
|
-
typing.
|
|
371
|
+
typing.Any,
|
|
372
372
|
parse_obj_as(
|
|
373
|
-
type_=typing.
|
|
373
|
+
type_=typing.Any, # type: ignore
|
|
374
374
|
object_=_response.json(),
|
|
375
375
|
),
|
|
376
376
|
),
|
|
@@ -379,9 +379,9 @@ class AsyncRawLocationAndSpeedClient:
|
|
|
379
379
|
raise BadGatewayError(
|
|
380
380
|
headers=dict(_response.headers),
|
|
381
381
|
body=typing.cast(
|
|
382
|
-
typing.
|
|
382
|
+
typing.Any,
|
|
383
383
|
parse_obj_as(
|
|
384
|
-
type_=typing.
|
|
384
|
+
type_=typing.Any, # type: ignore
|
|
385
385
|
object_=_response.json(),
|
|
386
386
|
),
|
|
387
387
|
),
|
|
@@ -390,9 +390,9 @@ class AsyncRawLocationAndSpeedClient:
|
|
|
390
390
|
raise ServiceUnavailableError(
|
|
391
391
|
headers=dict(_response.headers),
|
|
392
392
|
body=typing.cast(
|
|
393
|
-
typing.
|
|
393
|
+
typing.Any,
|
|
394
394
|
parse_obj_as(
|
|
395
|
-
type_=typing.
|
|
395
|
+
type_=typing.Any, # type: ignore
|
|
396
396
|
object_=_response.json(),
|
|
397
397
|
),
|
|
398
398
|
),
|
|
@@ -401,9 +401,9 @@ class AsyncRawLocationAndSpeedClient:
|
|
|
401
401
|
raise GatewayTimeoutError(
|
|
402
402
|
headers=dict(_response.headers),
|
|
403
403
|
body=typing.cast(
|
|
404
|
-
typing.
|
|
404
|
+
typing.Any,
|
|
405
405
|
parse_obj_as(
|
|
406
|
-
type_=typing.
|
|
406
|
+
type_=typing.Any, # type: ignore
|
|
407
407
|
object_=_response.json(),
|
|
408
408
|
),
|
|
409
409
|
),
|
samsara/maintenance/__init__.py
CHANGED
|
@@ -6,8 +6,8 @@ import typing
|
|
|
6
6
|
from importlib import import_module
|
|
7
7
|
|
|
8
8
|
if typing.TYPE_CHECKING:
|
|
9
|
-
from .types import CreateDvirRequestSafetyStatus
|
|
10
|
-
_dynamic_imports: typing.Dict[str, str] = {"CreateDvirRequestSafetyStatus": ".types"}
|
|
9
|
+
from .types import CreateDvirRequestSafetyStatus, CreateDvirRequestType
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {"CreateDvirRequestSafetyStatus": ".types", "CreateDvirRequestType": ".types"}
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def __getattr__(attr_name: str) -> typing.Any:
|
|
@@ -31,4 +31,4 @@ def __dir__():
|
|
|
31
31
|
return sorted(lazy_attrs)
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
__all__ = ["CreateDvirRequestSafetyStatus"]
|
|
34
|
+
__all__ = ["CreateDvirRequestSafetyStatus", "CreateDvirRequestType"]
|
samsara/maintenance/client.py
CHANGED
|
@@ -15,6 +15,7 @@ from ..types.inline_response_2004 import InlineResponse2004
|
|
|
15
15
|
from ..types.resolved_by import ResolvedBy
|
|
16
16
|
from .raw_client import AsyncRawMaintenanceClient, RawMaintenanceClient
|
|
17
17
|
from .types.create_dvir_request_safety_status import CreateDvirRequestSafetyStatus
|
|
18
|
+
from .types.create_dvir_request_type import CreateDvirRequestType
|
|
18
19
|
|
|
19
20
|
# this is used as the default value for optional parameters
|
|
20
21
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -79,10 +80,7 @@ class MaintenanceClient:
|
|
|
79
80
|
client = Samsara(
|
|
80
81
|
token="YOUR_TOKEN",
|
|
81
82
|
)
|
|
82
|
-
client.maintenance.get_defect_types(
|
|
83
|
-
after="after",
|
|
84
|
-
limit=1,
|
|
85
|
-
)
|
|
83
|
+
client.maintenance.get_defect_types()
|
|
86
84
|
"""
|
|
87
85
|
_response = self._raw_client.get_defect_types(
|
|
88
86
|
after=after, limit=limit, ids=ids, request_options=request_options
|
|
@@ -146,12 +144,7 @@ class MaintenanceClient:
|
|
|
146
144
|
token="YOUR_TOKEN",
|
|
147
145
|
)
|
|
148
146
|
client.maintenance.stream_defects(
|
|
149
|
-
after="after",
|
|
150
|
-
limit=1,
|
|
151
147
|
start_time="startTime",
|
|
152
|
-
end_time="endTime",
|
|
153
|
-
include_external_ids=True,
|
|
154
|
-
is_resolved=True,
|
|
155
148
|
)
|
|
156
149
|
"""
|
|
157
150
|
_response = self._raw_client.stream_defects(
|
|
@@ -207,7 +200,6 @@ class MaintenanceClient:
|
|
|
207
200
|
)
|
|
208
201
|
client.maintenance.get_defect(
|
|
209
202
|
id="id",
|
|
210
|
-
include_external_ids=True,
|
|
211
203
|
)
|
|
212
204
|
"""
|
|
213
205
|
_response = self._raw_client.get_defect(
|
|
@@ -272,11 +264,7 @@ class MaintenanceClient:
|
|
|
272
264
|
token="YOUR_TOKEN",
|
|
273
265
|
)
|
|
274
266
|
client.maintenance.get_dvirs(
|
|
275
|
-
after="after",
|
|
276
|
-
limit=1,
|
|
277
|
-
include_external_ids=True,
|
|
278
267
|
start_time="startTime",
|
|
279
|
-
end_time="endTime",
|
|
280
268
|
)
|
|
281
269
|
"""
|
|
282
270
|
_response = self._raw_client.get_dvirs(
|
|
@@ -332,7 +320,6 @@ class MaintenanceClient:
|
|
|
332
320
|
)
|
|
333
321
|
client.maintenance.get_dvir(
|
|
334
322
|
id="id",
|
|
335
|
-
include_external_ids=True,
|
|
336
323
|
)
|
|
337
324
|
"""
|
|
338
325
|
_response = self._raw_client.get_dvir(
|
|
@@ -407,6 +394,7 @@ class MaintenanceClient:
|
|
|
407
394
|
*,
|
|
408
395
|
author_id: str,
|
|
409
396
|
safety_status: CreateDvirRequestSafetyStatus,
|
|
397
|
+
type: CreateDvirRequestType,
|
|
410
398
|
license_plate: typing.Optional[str] = OMIT,
|
|
411
399
|
location: typing.Optional[str] = OMIT,
|
|
412
400
|
mechanic_notes: typing.Optional[str] = OMIT,
|
|
@@ -431,6 +419,9 @@ class MaintenanceClient:
|
|
|
431
419
|
safety_status : CreateDvirRequestSafetyStatus
|
|
432
420
|
Whether or not this vehicle or trailer is safe to drive.
|
|
433
421
|
|
|
422
|
+
type : CreateDvirRequestType
|
|
423
|
+
Only type 'mechanic' is currently accepted.
|
|
424
|
+
|
|
434
425
|
license_plate : typing.Optional[str]
|
|
435
426
|
The license plate of this vehicle.
|
|
436
427
|
|
|
@@ -470,11 +461,13 @@ class MaintenanceClient:
|
|
|
470
461
|
client.maintenance.create_dvir(
|
|
471
462
|
author_id="11",
|
|
472
463
|
safety_status="safe",
|
|
464
|
+
type="mechanic",
|
|
473
465
|
)
|
|
474
466
|
"""
|
|
475
467
|
_response = self._raw_client.create_dvir(
|
|
476
468
|
author_id=author_id,
|
|
477
469
|
safety_status=safety_status,
|
|
470
|
+
type=type,
|
|
478
471
|
license_plate=license_plate,
|
|
479
472
|
location=location,
|
|
480
473
|
mechanic_notes=mechanic_notes,
|
|
@@ -655,10 +648,7 @@ class AsyncMaintenanceClient:
|
|
|
655
648
|
|
|
656
649
|
|
|
657
650
|
async def main() -> None:
|
|
658
|
-
await client.maintenance.get_defect_types(
|
|
659
|
-
after="after",
|
|
660
|
-
limit=1,
|
|
661
|
-
)
|
|
651
|
+
await client.maintenance.get_defect_types()
|
|
662
652
|
|
|
663
653
|
|
|
664
654
|
asyncio.run(main())
|
|
@@ -730,12 +720,7 @@ class AsyncMaintenanceClient:
|
|
|
730
720
|
|
|
731
721
|
async def main() -> None:
|
|
732
722
|
await client.maintenance.stream_defects(
|
|
733
|
-
after="after",
|
|
734
|
-
limit=1,
|
|
735
723
|
start_time="startTime",
|
|
736
|
-
end_time="endTime",
|
|
737
|
-
include_external_ids=True,
|
|
738
|
-
is_resolved=True,
|
|
739
724
|
)
|
|
740
725
|
|
|
741
726
|
|
|
@@ -799,7 +784,6 @@ class AsyncMaintenanceClient:
|
|
|
799
784
|
async def main() -> None:
|
|
800
785
|
await client.maintenance.get_defect(
|
|
801
786
|
id="id",
|
|
802
|
-
include_external_ids=True,
|
|
803
787
|
)
|
|
804
788
|
|
|
805
789
|
|
|
@@ -872,11 +856,7 @@ class AsyncMaintenanceClient:
|
|
|
872
856
|
|
|
873
857
|
async def main() -> None:
|
|
874
858
|
await client.maintenance.get_dvirs(
|
|
875
|
-
after="after",
|
|
876
|
-
limit=1,
|
|
877
|
-
include_external_ids=True,
|
|
878
859
|
start_time="startTime",
|
|
879
|
-
end_time="endTime",
|
|
880
860
|
)
|
|
881
861
|
|
|
882
862
|
|
|
@@ -940,7 +920,6 @@ class AsyncMaintenanceClient:
|
|
|
940
920
|
async def main() -> None:
|
|
941
921
|
await client.maintenance.get_dvir(
|
|
942
922
|
id="id",
|
|
943
|
-
include_external_ids=True,
|
|
944
923
|
)
|
|
945
924
|
|
|
946
925
|
|
|
@@ -1026,6 +1005,7 @@ class AsyncMaintenanceClient:
|
|
|
1026
1005
|
*,
|
|
1027
1006
|
author_id: str,
|
|
1028
1007
|
safety_status: CreateDvirRequestSafetyStatus,
|
|
1008
|
+
type: CreateDvirRequestType,
|
|
1029
1009
|
license_plate: typing.Optional[str] = OMIT,
|
|
1030
1010
|
location: typing.Optional[str] = OMIT,
|
|
1031
1011
|
mechanic_notes: typing.Optional[str] = OMIT,
|
|
@@ -1050,6 +1030,9 @@ class AsyncMaintenanceClient:
|
|
|
1050
1030
|
safety_status : CreateDvirRequestSafetyStatus
|
|
1051
1031
|
Whether or not this vehicle or trailer is safe to drive.
|
|
1052
1032
|
|
|
1033
|
+
type : CreateDvirRequestType
|
|
1034
|
+
Only type 'mechanic' is currently accepted.
|
|
1035
|
+
|
|
1053
1036
|
license_plate : typing.Optional[str]
|
|
1054
1037
|
The license plate of this vehicle.
|
|
1055
1038
|
|
|
@@ -1094,6 +1077,7 @@ class AsyncMaintenanceClient:
|
|
|
1094
1077
|
await client.maintenance.create_dvir(
|
|
1095
1078
|
author_id="11",
|
|
1096
1079
|
safety_status="safe",
|
|
1080
|
+
type="mechanic",
|
|
1097
1081
|
)
|
|
1098
1082
|
|
|
1099
1083
|
|
|
@@ -1102,6 +1086,7 @@ class AsyncMaintenanceClient:
|
|
|
1102
1086
|
_response = await self._raw_client.create_dvir(
|
|
1103
1087
|
author_id=author_id,
|
|
1104
1088
|
safety_status=safety_status,
|
|
1089
|
+
type=type,
|
|
1105
1090
|
license_plate=license_plate,
|
|
1106
1091
|
location=location,
|
|
1107
1092
|
mechanic_notes=mechanic_notes,
|