samsara-api 4.1.1__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.
Files changed (166) hide show
  1. samsara/__init__.py +84 -15
  2. samsara/addresses/client.py +7 -14
  3. samsara/addresses/raw_client.py +7 -11
  4. samsara/alerts/client.py +2 -10
  5. samsara/alerts/raw_client.py +180 -180
  6. samsara/assets/__init__.py +3 -3
  7. samsara/assets/client.py +14 -45
  8. samsara/assets/raw_client.py +156 -160
  9. samsara/assets/types/__init__.py +3 -3
  10. samsara/assets/types/{assets_list_request_type.py → list_assets_request_type.py} +1 -1
  11. samsara/attributes/client.py +0 -4
  12. samsara/beta_ap_is/client.py +139 -189
  13. samsara/beta_ap_is/raw_client.py +2035 -1702
  14. samsara/carrier_proposed_assignments/client.py +2 -10
  15. samsara/client.py +5 -0
  16. samsara/coaching/client.py +2 -22
  17. samsara/coaching/raw_client.py +108 -108
  18. samsara/contacts/client.py +2 -8
  19. samsara/core/__init__.py +5 -0
  20. samsara/core/client_wrapper.py +18 -10
  21. samsara/core/custom_pagination.py +152 -0
  22. samsara/core/http_client.py +176 -90
  23. samsara/core/http_sse/__init__.py +42 -0
  24. samsara/core/http_sse/_api.py +112 -0
  25. samsara/core/http_sse/_decoders.py +61 -0
  26. samsara/core/http_sse/_exceptions.py +7 -0
  27. samsara/core/http_sse/_models.py +17 -0
  28. samsara/core/pagination.py +14 -14
  29. samsara/core/pydantic_utilities.py +3 -1
  30. samsara/documents/client.py +2 -12
  31. samsara/documents/raw_client.py +180 -180
  32. samsara/driver_qr_codes/raw_client.py +108 -108
  33. samsara/driver_vehicle_assignments/client.py +0 -12
  34. samsara/driver_vehicle_assignments/raw_client.py +144 -144
  35. samsara/drivers/__init__.py +3 -3
  36. samsara/drivers/client.py +12 -23
  37. samsara/drivers/raw_client.py +48 -52
  38. samsara/drivers/types/__init__.py +3 -3
  39. samsara/drivers/types/{drivers_list_request_driver_activation_status.py → list_drivers_request_driver_activation_status.py} +1 -1
  40. samsara/equipment/client.py +6 -22
  41. samsara/errors/bad_gateway_error.py +1 -1
  42. samsara/errors/gateway_timeout_error.py +1 -1
  43. samsara/errors/internal_server_error.py +1 -1
  44. samsara/errors/method_not_allowed_error.py +1 -1
  45. samsara/errors/not_found_error.py +1 -1
  46. samsara/errors/not_implemented_error.py +1 -1
  47. samsara/errors/service_unavailable_error.py +1 -1
  48. samsara/errors/too_many_requests_error.py +1 -1
  49. samsara/errors/unauthorized_error.py +1 -1
  50. samsara/forms/__init__.py +9 -3
  51. samsara/forms/client.py +17 -10
  52. samsara/forms/raw_client.py +265 -254
  53. samsara/forms/types/__init__.py +6 -2
  54. samsara/forms/types/form_submissions_post_form_submission_request_body_status.py +5 -0
  55. samsara/fuel_and_energy/client.py +0 -30
  56. samsara/fuel_and_energy/raw_client.py +180 -180
  57. samsara/gateways/client.py +2 -6
  58. samsara/gateways/raw_client.py +108 -108
  59. samsara/hours_of_service/__init__.py +6 -3
  60. samsara/hours_of_service/client.py +13 -52
  61. samsara/hours_of_service/raw_client.py +77 -76
  62. samsara/hours_of_service/types/__init__.py +4 -2
  63. samsara/hours_of_service/types/get_hos_daily_logs_request_expand.py +5 -0
  64. samsara/hubs/client.py +2 -94
  65. samsara/hubs/raw_client.py +216 -216
  66. samsara/idling/client.py +10 -16
  67. samsara/idling/raw_client.py +46 -36
  68. samsara/ifta/client.py +4 -34
  69. samsara/ifta/raw_client.py +144 -144
  70. samsara/industrial/client.py +12 -56
  71. samsara/industrial/raw_client.py +40 -48
  72. samsara/issues/client.py +0 -4
  73. samsara/issues/raw_client.py +108 -108
  74. samsara/legacy_ap_is/client.py +4 -56
  75. samsara/legacy_ap_is/raw_client.py +108 -108
  76. samsara/live_sharing_links/client.py +2 -10
  77. samsara/live_sharing_links/raw_client.py +144 -144
  78. samsara/location_and_speed/client.py +2 -20
  79. samsara/location_and_speed/raw_client.py +36 -36
  80. samsara/maintenance/__init__.py +3 -3
  81. samsara/maintenance/client.py +15 -30
  82. samsara/maintenance/raw_client.py +191 -182
  83. samsara/maintenance/types/__init__.py +6 -2
  84. samsara/maintenance/types/create_dvir_request_type.py +5 -0
  85. samsara/media/client.py +2 -16
  86. samsara/media/raw_client.py +108 -108
  87. samsara/messages/client.py +2 -8
  88. samsara/plans/client.py +0 -21
  89. samsara/plans/raw_client.py +72 -72
  90. samsara/preview_ap_is/client.py +0 -140
  91. samsara/preview_ap_is/raw_client.py +72 -430
  92. samsara/route_events/client.py +2 -12
  93. samsara/route_events/raw_client.py +36 -36
  94. samsara/routes/__init__.py +30 -0
  95. samsara/routes/client.py +7 -35
  96. samsara/routes/raw_client.py +257 -256
  97. samsara/routes/types/__init__.py +34 -0
  98. samsara/routes/types/get_routes_feed_request_expand.py +5 -0
  99. samsara/safety/client.py +2 -10
  100. samsara/safety/raw_client.py +36 -36
  101. samsara/settings/raw_client.py +180 -180
  102. samsara/speeding_intervals/raw_client.py +36 -36
  103. samsara/tachograph_eu_only/client.py +0 -6
  104. samsara/tags/client.py +2 -8
  105. samsara/trailer_assignments/client.py +2 -18
  106. samsara/trailers/client.py +2 -12
  107. samsara/trailers/raw_client.py +180 -180
  108. samsara/types/__init__.py +71 -6
  109. samsara/types/advanced_idling_get_idling_events_response_body.py +2 -2
  110. samsara/types/create_routes_stop_request_object_request_body.py +7 -0
  111. samsara/types/driver_assignment_object_response_body.py +2 -1
  112. samsara/types/driver_assignment_object_response_body_assignment_type.py +5 -0
  113. samsara/types/driver_external_ids.py +1 -1
  114. samsara/types/forms_approval_config_object_response_body.py +2 -1
  115. samsara/types/forms_approval_config_object_response_body_type.py +5 -0
  116. samsara/types/fuel_level_trigger_details_object_request_body.py +2 -1
  117. samsara/types/fuel_level_trigger_details_object_request_body_operation.py +5 -0
  118. samsara/types/fuel_level_trigger_details_object_response_body.py +4 -1
  119. samsara/types/fuel_level_trigger_details_object_response_body_operation.py +5 -0
  120. samsara/types/harsh_event_trigger_details_object_request_body_types_item.py +1 -0
  121. samsara/types/harsh_event_trigger_details_object_response_body_types_item.py +1 -0
  122. samsara/types/idling_event_address_object_response_body.py +46 -0
  123. samsara/types/{idling_event_object_response_body_address_type.py → idling_event_address_object_response_body_address_types_item.py} +1 -1
  124. samsara/types/idling_event_asset_object_response_body.py +35 -0
  125. samsara/types/{idling_event_object_response_body.py → idling_event_object_v_20251023_response_body.py} +18 -28
  126. samsara/types/idling_event_object_v_20251023_response_body_pto_state.py +5 -0
  127. samsara/types/idling_event_operator_object_response_body.py +35 -0
  128. samsara/types/patch_issue_request_body_assigned_to_request_body.py +2 -1
  129. samsara/types/patch_issue_request_body_assigned_to_request_body_type.py +5 -0
  130. samsara/types/reading_datapoint_request_body.py +5 -4
  131. samsara/types/reading_datapoint_request_body_entity_type.py +5 -0
  132. samsara/types/reading_history_response_body.py +1 -1
  133. samsara/types/reading_snapshot_response_body.py +1 -1
  134. samsara/types/resolved_by.py +2 -1
  135. samsara/types/resolved_by_type.py +5 -0
  136. samsara/types/route_feed_object_response_body.py +2 -1
  137. samsara/types/route_feed_object_response_body_type.py +5 -0
  138. samsara/types/route_settings_request_body.py +8 -0
  139. samsara/types/route_settings_request_body_sequencing_method.py +7 -0
  140. samsara/types/route_settings_response_body.py +8 -0
  141. samsara/types/route_settings_response_body_sequencing_method.py +7 -0
  142. samsara/types/route_stop_details_object_response_body.py +2 -1
  143. samsara/types/route_stop_details_object_response_body_type.py +5 -0
  144. samsara/types/routes_stop_response_object_response_body.py +7 -0
  145. samsara/types/training_learner_object_response_body.py +2 -1
  146. samsara/types/training_learner_object_response_body_type.py +5 -0
  147. samsara/types/update_routes_stop_request_object_request_body.py +7 -0
  148. samsara/types/vehicle_assignment_object_response_body.py +4 -3
  149. samsara/types/vehicle_assignment_object_response_body_assignment_type.py +5 -0
  150. samsara/types/vehicle_external_ids.py +1 -1
  151. samsara/types/work_order_money_object_request_body.py +2 -1
  152. samsara/types/work_order_money_object_request_body_currency.py +5 -0
  153. samsara/types/work_order_money_object_response_body.py +2 -1
  154. samsara/types/work_order_money_object_response_body_currency.py +5 -0
  155. samsara/users/client.py +4 -16
  156. samsara/vehicle_locations/client.py +4 -16
  157. samsara/vehicles/client.py +7 -22
  158. samsara/vehicles/raw_client.py +43 -47
  159. samsara/webhooks/client.py +2 -10
  160. samsara/webhooks/raw_client.py +180 -180
  161. samsara/work_orders/client.py +4 -18
  162. samsara/work_orders/raw_client.py +216 -216
  163. {samsara_api-4.1.1.dist-info → samsara_api-4.3.0.dist-info}/METADATA +2 -1
  164. {samsara_api-4.1.1.dist-info → samsara_api-4.3.0.dist-info}/RECORD +166 -136
  165. {samsara_api-4.1.1.dist-info → samsara_api-4.3.0.dist-info}/LICENSE +0 -0
  166. {samsara_api-4.1.1.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.Optional[typing.Any],
120
+ typing.Any,
121
121
  parse_obj_as(
122
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
131
+ typing.Any,
132
132
  parse_obj_as(
133
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
142
+ typing.Any,
143
143
  parse_obj_as(
144
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
153
+ typing.Any,
154
154
  parse_obj_as(
155
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
164
+ typing.Any,
165
165
  parse_obj_as(
166
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
175
+ typing.Any,
176
176
  parse_obj_as(
177
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
186
+ typing.Any,
187
187
  parse_obj_as(
188
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
197
+ typing.Any,
198
198
  parse_obj_as(
199
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
208
+ typing.Any,
209
209
  parse_obj_as(
210
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
316
+ typing.Any,
317
317
  parse_obj_as(
318
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
327
+ typing.Any,
328
328
  parse_obj_as(
329
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
338
+ typing.Any,
339
339
  parse_obj_as(
340
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
349
+ typing.Any,
350
350
  parse_obj_as(
351
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
360
+ typing.Any,
361
361
  parse_obj_as(
362
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
371
+ typing.Any,
372
372
  parse_obj_as(
373
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
382
+ typing.Any,
383
383
  parse_obj_as(
384
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
393
+ typing.Any,
394
394
  parse_obj_as(
395
- type_=typing.Optional[typing.Any], # type: ignore
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.Optional[typing.Any],
404
+ typing.Any,
405
405
  parse_obj_as(
406
- type_=typing.Optional[typing.Any], # type: ignore
406
+ type_=typing.Any, # type: ignore
407
407
  object_=_response.json(),
408
408
  ),
409
409
  ),
@@ -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"]
@@ -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,