murf 1.2.3__py3-none-any.whl → 2.0.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.

Potentially problematic release.


This version of murf might be problematic. Click here for more details.

Files changed (57) hide show
  1. murf/__init__.py +31 -1
  2. murf/auth/client.py +11 -9
  3. murf/base_client.py +3 -20
  4. murf/client.py +0 -8
  5. murf/core/__init__.py +4 -0
  6. murf/core/client_wrapper.py +18 -17
  7. murf/core/unchecked_base_model.py +305 -0
  8. murf/dubbing/jobs/client.py +37 -31
  9. murf/dubbing/languages/client.py +25 -21
  10. murf/dubbing/projects/client.py +37 -31
  11. murf/dubbing_client.py +0 -8
  12. murf/environment.py +10 -3
  13. murf/stream_input/__init__.py +5 -0
  14. murf/stream_input/types/__init__.py +6 -0
  15. murf/stream_input/types/receive_message.py +7 -0
  16. murf/stream_input/types/send_message.py +9 -0
  17. murf/text/client.py +15 -13
  18. murf/text_to_speech/client.py +39 -33
  19. murf/types/__init__.py +34 -0
  20. murf/types/api_job_response.py +2 -2
  21. murf/types/api_project_response.py +2 -2
  22. murf/types/api_voice.py +2 -2
  23. murf/types/audio_output.py +27 -0
  24. murf/types/auth_token_response.py +2 -2
  25. murf/types/character_count.py +2 -2
  26. murf/types/clear_context.py +20 -0
  27. murf/types/dub_api_detail_response.py +2 -2
  28. murf/types/dub_job_status_response.py +2 -2
  29. murf/types/final_output.py +27 -0
  30. murf/types/form_data_content_disposition.py +2 -2
  31. murf/types/generate_speech_response.py +2 -2
  32. murf/types/group_api_project_response.py +2 -2
  33. murf/types/locale_response.py +2 -2
  34. murf/types/metadata.py +2 -2
  35. murf/types/murf_api_translation_response.py +2 -2
  36. murf/types/pronunciation_detail.py +2 -2
  37. murf/types/send_text.py +32 -0
  38. murf/types/set_advanced_settings.py +20 -0
  39. murf/types/set_voice_configuration.py +20 -0
  40. murf/types/set_voice_configuration_voice_config.py +57 -0
  41. murf/types/set_voice_configuration_voice_config_pronunciation_dictionary_value.py +30 -0
  42. murf/types/set_voice_configuration_voice_config_pronunciation_dictionary_value_type.py +7 -0
  43. murf/types/source_locale_response.py +2 -2
  44. murf/types/speech_to_speech_response.py +2 -2
  45. murf/types/style_details.py +2 -2
  46. murf/types/translation.py +2 -2
  47. murf/types/tts_request_both_payload.py +29 -0
  48. murf/types/tts_request_both_payload_voice_config.py +44 -0
  49. murf/types/tts_request_both_payload_voice_config_pronunciation_dictionary.py +22 -0
  50. murf/types/tts_request_both_payload_voice_config_pronunciation_dictionary_guess.py +20 -0
  51. murf/types/word_duration_response.py +2 -2
  52. murf/voice_changer/client.py +15 -13
  53. {murf-1.2.3.dist-info → murf-2.0.0.dist-info}/METADATA +1 -1
  54. murf-2.0.0.dist-info/RECORD +98 -0
  55. murf-1.2.3.dist-info/RECORD +0 -80
  56. {murf-1.2.3.dist-info → murf-2.0.0.dist-info}/LICENSE +0 -0
  57. {murf-1.2.3.dist-info → murf-2.0.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,305 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import inspect
5
+ import typing
6
+ import uuid
7
+
8
+ import typing_extensions
9
+ from pydantic_core import PydanticUndefined
10
+
11
+ import pydantic
12
+
13
+ from .pydantic_utilities import (
14
+ IS_PYDANTIC_V2,
15
+ ModelField,
16
+ UniversalBaseModel,
17
+ get_args,
18
+ get_origin,
19
+ is_literal_type,
20
+ is_union,
21
+ parse_date,
22
+ parse_datetime,
23
+ parse_obj_as,
24
+ )
25
+ from .serialization import get_field_to_alias_mapping
26
+
27
+
28
+ class UnionMetadata:
29
+ discriminant: str
30
+
31
+ def __init__(self, *, discriminant: str) -> None:
32
+ self.discriminant = discriminant
33
+
34
+
35
+ Model = typing.TypeVar("Model", bound=pydantic.BaseModel)
36
+
37
+
38
+ class UncheckedBaseModel(UniversalBaseModel):
39
+ if IS_PYDANTIC_V2:
40
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2
41
+ else:
42
+
43
+ class Config:
44
+ extra = pydantic.Extra.allow
45
+
46
+ @classmethod
47
+ def model_construct(
48
+ cls: typing.Type["Model"],
49
+ _fields_set: typing.Optional[typing.Set[str]] = None,
50
+ **values: typing.Any,
51
+ ) -> "Model":
52
+ # Fallback construct function to the specified override below.
53
+ return cls.construct(_fields_set=_fields_set, **values)
54
+
55
+ # Allow construct to not validate model
56
+ # Implementation taken from: https://github.com/pydantic/pydantic/issues/1168#issuecomment-817742836
57
+ @classmethod
58
+ def construct(
59
+ cls: typing.Type["Model"],
60
+ _fields_set: typing.Optional[typing.Set[str]] = None,
61
+ **values: typing.Any,
62
+ ) -> "Model":
63
+ m = cls.__new__(cls)
64
+ fields_values = {}
65
+
66
+ if _fields_set is None:
67
+ _fields_set = set(values.keys())
68
+
69
+ fields = _get_model_fields(cls)
70
+ populate_by_name = _get_is_populate_by_name(cls)
71
+ field_aliases = get_field_to_alias_mapping(cls)
72
+
73
+ for name, field in fields.items():
74
+ # Key here is only used to pull data from the values dict
75
+ # you should always use the NAME of the field to for field_values, etc.
76
+ # because that's how the object is constructed from a pydantic perspective
77
+ key = field.alias
78
+ if (key is None or field.alias == name) and name in field_aliases:
79
+ key = field_aliases[name]
80
+
81
+ if key is None or (key not in values and populate_by_name): # Added this to allow population by field name
82
+ key = name
83
+
84
+ if key in values:
85
+ if IS_PYDANTIC_V2:
86
+ type_ = field.annotation # type: ignore # Pydantic v2
87
+ else:
88
+ type_ = typing.cast(typing.Type, field.outer_type_) # type: ignore # Pydantic < v1.10.15
89
+
90
+ fields_values[name] = (
91
+ construct_type(object_=values[key], type_=type_) if type_ is not None else values[key]
92
+ )
93
+ _fields_set.add(name)
94
+ else:
95
+ default = _get_field_default(field)
96
+ fields_values[name] = default
97
+
98
+ # If the default values are non-null act like they've been set
99
+ # This effectively allows exclude_unset to work like exclude_none where
100
+ # the latter passes through intentionally set none values.
101
+ if default != None and default != PydanticUndefined:
102
+ _fields_set.add(name)
103
+
104
+ # Add extras back in
105
+ extras = {}
106
+ pydantic_alias_fields = [field.alias for field in fields.values()]
107
+ internal_alias_fields = list(field_aliases.values())
108
+ for key, value in values.items():
109
+ # If the key is not a field by name, nor an alias to a field, then it's extra
110
+ if (key not in pydantic_alias_fields and key not in internal_alias_fields) and key not in fields:
111
+ if IS_PYDANTIC_V2:
112
+ extras[key] = value
113
+ else:
114
+ _fields_set.add(key)
115
+ fields_values[key] = value
116
+
117
+ object.__setattr__(m, "__dict__", fields_values)
118
+
119
+ if IS_PYDANTIC_V2:
120
+ object.__setattr__(m, "__pydantic_private__", None)
121
+ object.__setattr__(m, "__pydantic_extra__", extras)
122
+ object.__setattr__(m, "__pydantic_fields_set__", _fields_set)
123
+ else:
124
+ object.__setattr__(m, "__fields_set__", _fields_set)
125
+ m._init_private_attributes() # type: ignore # Pydantic v1
126
+ return m
127
+
128
+
129
+ def _convert_undiscriminated_union_type(union_type: typing.Type[typing.Any], object_: typing.Any) -> typing.Any:
130
+ inner_types = get_args(union_type)
131
+ if typing.Any in inner_types:
132
+ return object_
133
+
134
+ for inner_type in inner_types:
135
+ try:
136
+ if inspect.isclass(inner_type) and issubclass(inner_type, pydantic.BaseModel):
137
+ # Attempt a validated parse until one works
138
+ return parse_obj_as(inner_type, object_)
139
+ except Exception:
140
+ continue
141
+
142
+ # If none of the types work, just return the first successful cast
143
+ for inner_type in inner_types:
144
+ try:
145
+ return construct_type(object_=object_, type_=inner_type)
146
+ except Exception:
147
+ continue
148
+
149
+
150
+ def _convert_union_type(type_: typing.Type[typing.Any], object_: typing.Any) -> typing.Any:
151
+ base_type = get_origin(type_) or type_
152
+ union_type = type_
153
+ if base_type == typing_extensions.Annotated:
154
+ union_type = get_args(type_)[0]
155
+ annotated_metadata = get_args(type_)[1:]
156
+ for metadata in annotated_metadata:
157
+ if isinstance(metadata, UnionMetadata):
158
+ try:
159
+ # Cast to the correct type, based on the discriminant
160
+ for inner_type in get_args(union_type):
161
+ try:
162
+ objects_discriminant = getattr(object_, metadata.discriminant)
163
+ except:
164
+ objects_discriminant = object_[metadata.discriminant]
165
+ if inner_type.__fields__[metadata.discriminant].default == objects_discriminant:
166
+ return construct_type(object_=object_, type_=inner_type)
167
+ except Exception:
168
+ # Allow to fall through to our regular union handling
169
+ pass
170
+ return _convert_undiscriminated_union_type(union_type, object_)
171
+
172
+
173
+ def construct_type(*, type_: typing.Type[typing.Any], object_: typing.Any) -> typing.Any:
174
+ """
175
+ Here we are essentially creating the same `construct` method in spirit as the above, but for all types, not just
176
+ Pydantic models.
177
+ The idea is to essentially attempt to coerce object_ to type_ (recursively)
178
+ """
179
+ # Short circuit when dealing with optionals, don't try to coerces None to a type
180
+ if object_ is None:
181
+ return None
182
+
183
+ base_type = get_origin(type_) or type_
184
+ is_annotated = base_type == typing_extensions.Annotated
185
+ maybe_annotation_members = get_args(type_)
186
+ is_annotated_union = is_annotated and is_union(get_origin(maybe_annotation_members[0]))
187
+
188
+ if base_type == typing.Any:
189
+ return object_
190
+
191
+ if base_type == dict:
192
+ if not isinstance(object_, typing.Mapping):
193
+ return object_
194
+
195
+ key_type, items_type = get_args(type_)
196
+ d = {
197
+ construct_type(object_=key, type_=key_type): construct_type(object_=item, type_=items_type)
198
+ for key, item in object_.items()
199
+ }
200
+ return d
201
+
202
+ if base_type == list:
203
+ if not isinstance(object_, list):
204
+ return object_
205
+
206
+ inner_type = get_args(type_)[0]
207
+ return [construct_type(object_=entry, type_=inner_type) for entry in object_]
208
+
209
+ if base_type == set:
210
+ if not isinstance(object_, set) and not isinstance(object_, list):
211
+ return object_
212
+
213
+ inner_type = get_args(type_)[0]
214
+ return {construct_type(object_=entry, type_=inner_type) for entry in object_}
215
+
216
+ if is_union(base_type) or is_annotated_union:
217
+ return _convert_union_type(type_, object_)
218
+
219
+ # Cannot do an `issubclass` with a literal type, let's also just confirm we have a class before this call
220
+ if (
221
+ object_ is not None
222
+ and not is_literal_type(type_)
223
+ and (
224
+ (inspect.isclass(base_type) and issubclass(base_type, pydantic.BaseModel))
225
+ or (
226
+ is_annotated
227
+ and inspect.isclass(maybe_annotation_members[0])
228
+ and issubclass(maybe_annotation_members[0], pydantic.BaseModel)
229
+ )
230
+ )
231
+ ):
232
+ if IS_PYDANTIC_V2:
233
+ return type_.model_construct(**object_)
234
+ else:
235
+ return type_.construct(**object_)
236
+
237
+ if base_type == dt.datetime:
238
+ try:
239
+ return parse_datetime(object_)
240
+ except Exception:
241
+ return object_
242
+
243
+ if base_type == dt.date:
244
+ try:
245
+ return parse_date(object_)
246
+ except Exception:
247
+ return object_
248
+
249
+ if base_type == uuid.UUID:
250
+ try:
251
+ return uuid.UUID(object_)
252
+ except Exception:
253
+ return object_
254
+
255
+ if base_type == int:
256
+ try:
257
+ return int(object_)
258
+ except Exception:
259
+ return object_
260
+
261
+ if base_type == bool:
262
+ try:
263
+ if isinstance(object_, str):
264
+ stringified_object = object_.lower()
265
+ return stringified_object == "true" or stringified_object == "1"
266
+
267
+ return bool(object_)
268
+ except Exception:
269
+ return object_
270
+
271
+ return object_
272
+
273
+
274
+ def _get_is_populate_by_name(model: typing.Type["Model"]) -> bool:
275
+ if IS_PYDANTIC_V2:
276
+ return model.model_config.get("populate_by_name", False) # type: ignore # Pydantic v2
277
+ return model.__config__.allow_population_by_field_name # type: ignore # Pydantic v1
278
+
279
+
280
+ PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo]
281
+
282
+
283
+ # Pydantic V1 swapped the typing of __fields__'s values from ModelField to FieldInfo
284
+ # And so we try to handle both V1 cases, as well as V2 (FieldInfo from model.model_fields)
285
+ def _get_model_fields(
286
+ model: typing.Type["Model"],
287
+ ) -> typing.Mapping[str, PydanticField]:
288
+ if IS_PYDANTIC_V2:
289
+ return model.model_fields # type: ignore # Pydantic v2
290
+ else:
291
+ return model.__fields__ # type: ignore # Pydantic v1
292
+
293
+
294
+ def _get_field_default(field: PydanticField) -> typing.Any:
295
+ try:
296
+ value = field.get_default() # type: ignore # Pydantic < v1.10.15
297
+ except:
298
+ value = field.default
299
+ if IS_PYDANTIC_V2:
300
+ from pydantic_core import PydanticUndefined
301
+
302
+ if value == PydanticUndefined:
303
+ return None
304
+ return value
305
+ return value
@@ -6,7 +6,7 @@ from ... import core
6
6
  from .types.jobs_create_request_priority import JobsCreateRequestPriority
7
7
  from ...core.request_options import RequestOptions
8
8
  from ...types.api_job_response import ApiJobResponse
9
- from ...core.pydantic_utilities import parse_obj_as
9
+ from ...core.unchecked_base_model import construct_type
10
10
  from ...errors.bad_request_error import BadRequestError
11
11
  from ...errors.forbidden_error import ForbiddenError
12
12
  from ...errors.internal_server_error import InternalServerError
@@ -83,6 +83,7 @@ class JobsClient:
83
83
  """
84
84
  _response = self._client_wrapper.httpx_client.request(
85
85
  "v1/murfdub/jobs/create",
86
+ base_url=self._client_wrapper.get_environment().base,
86
87
  method="POST",
87
88
  data={
88
89
  "file_url": file_url,
@@ -103,7 +104,7 @@ class JobsClient:
103
104
  if 200 <= _response.status_code < 300:
104
105
  return typing.cast(
105
106
  ApiJobResponse,
106
- parse_obj_as(
107
+ construct_type(
107
108
  type_=ApiJobResponse, # type: ignore
108
109
  object_=_response.json(),
109
110
  ),
@@ -112,7 +113,7 @@ class JobsClient:
112
113
  raise BadRequestError(
113
114
  typing.cast(
114
115
  typing.Optional[typing.Any],
115
- parse_obj_as(
116
+ construct_type(
116
117
  type_=typing.Optional[typing.Any], # type: ignore
117
118
  object_=_response.json(),
118
119
  ),
@@ -122,7 +123,7 @@ class JobsClient:
122
123
  raise ForbiddenError(
123
124
  typing.cast(
124
125
  typing.Optional[typing.Any],
125
- parse_obj_as(
126
+ construct_type(
126
127
  type_=typing.Optional[typing.Any], # type: ignore
127
128
  object_=_response.json(),
128
129
  ),
@@ -132,7 +133,7 @@ class JobsClient:
132
133
  raise InternalServerError(
133
134
  typing.cast(
134
135
  typing.Optional[typing.Any],
135
- parse_obj_as(
136
+ construct_type(
136
137
  type_=typing.Optional[typing.Any], # type: ignore
137
138
  object_=_response.json(),
138
139
  ),
@@ -142,7 +143,7 @@ class JobsClient:
142
143
  raise ServiceUnavailableError(
143
144
  typing.cast(
144
145
  typing.Optional[typing.Any],
145
- parse_obj_as(
146
+ construct_type(
146
147
  type_=typing.Optional[typing.Any], # type: ignore
147
148
  object_=_response.json(),
148
149
  ),
@@ -206,6 +207,7 @@ class JobsClient:
206
207
  """
207
208
  _response = self._client_wrapper.httpx_client.request(
208
209
  "v1/murfdub/jobs/create-with-project-id",
210
+ base_url=self._client_wrapper.get_environment().base,
209
211
  method="POST",
210
212
  data={
211
213
  "file_url": file_url,
@@ -225,7 +227,7 @@ class JobsClient:
225
227
  if 200 <= _response.status_code < 300:
226
228
  return typing.cast(
227
229
  ApiJobResponse,
228
- parse_obj_as(
230
+ construct_type(
229
231
  type_=ApiJobResponse, # type: ignore
230
232
  object_=_response.json(),
231
233
  ),
@@ -234,7 +236,7 @@ class JobsClient:
234
236
  raise BadRequestError(
235
237
  typing.cast(
236
238
  typing.Optional[typing.Any],
237
- parse_obj_as(
239
+ construct_type(
238
240
  type_=typing.Optional[typing.Any], # type: ignore
239
241
  object_=_response.json(),
240
242
  ),
@@ -244,7 +246,7 @@ class JobsClient:
244
246
  raise ForbiddenError(
245
247
  typing.cast(
246
248
  typing.Optional[typing.Any],
247
- parse_obj_as(
249
+ construct_type(
248
250
  type_=typing.Optional[typing.Any], # type: ignore
249
251
  object_=_response.json(),
250
252
  ),
@@ -254,7 +256,7 @@ class JobsClient:
254
256
  raise InternalServerError(
255
257
  typing.cast(
256
258
  typing.Optional[typing.Any],
257
- parse_obj_as(
259
+ construct_type(
258
260
  type_=typing.Optional[typing.Any], # type: ignore
259
261
  object_=_response.json(),
260
262
  ),
@@ -264,7 +266,7 @@ class JobsClient:
264
266
  raise ServiceUnavailableError(
265
267
  typing.cast(
266
268
  typing.Optional[typing.Any],
267
- parse_obj_as(
269
+ construct_type(
268
270
  type_=typing.Optional[typing.Any], # type: ignore
269
271
  object_=_response.json(),
270
272
  ),
@@ -304,6 +306,7 @@ class JobsClient:
304
306
  """
305
307
  _response = self._client_wrapper.httpx_client.request(
306
308
  f"v1/murfdub/jobs/{jsonable_encoder(job_id)}/status",
309
+ base_url=self._client_wrapper.get_environment().base,
307
310
  method="GET",
308
311
  request_options=request_options,
309
312
  )
@@ -311,7 +314,7 @@ class JobsClient:
311
314
  if 200 <= _response.status_code < 300:
312
315
  return typing.cast(
313
316
  DubJobStatusResponse,
314
- parse_obj_as(
317
+ construct_type(
315
318
  type_=DubJobStatusResponse, # type: ignore
316
319
  object_=_response.json(),
317
320
  ),
@@ -320,7 +323,7 @@ class JobsClient:
320
323
  raise BadRequestError(
321
324
  typing.cast(
322
325
  typing.Optional[typing.Any],
323
- parse_obj_as(
326
+ construct_type(
324
327
  type_=typing.Optional[typing.Any], # type: ignore
325
328
  object_=_response.json(),
326
329
  ),
@@ -330,7 +333,7 @@ class JobsClient:
330
333
  raise ForbiddenError(
331
334
  typing.cast(
332
335
  typing.Optional[typing.Any],
333
- parse_obj_as(
336
+ construct_type(
334
337
  type_=typing.Optional[typing.Any], # type: ignore
335
338
  object_=_response.json(),
336
339
  ),
@@ -340,7 +343,7 @@ class JobsClient:
340
343
  raise InternalServerError(
341
344
  typing.cast(
342
345
  typing.Optional[typing.Any],
343
- parse_obj_as(
346
+ construct_type(
344
347
  type_=typing.Optional[typing.Any], # type: ignore
345
348
  object_=_response.json(),
346
349
  ),
@@ -350,7 +353,7 @@ class JobsClient:
350
353
  raise ServiceUnavailableError(
351
354
  typing.cast(
352
355
  typing.Optional[typing.Any],
353
- parse_obj_as(
356
+ construct_type(
354
357
  type_=typing.Optional[typing.Any], # type: ignore
355
358
  object_=_response.json(),
356
359
  ),
@@ -431,6 +434,7 @@ class AsyncJobsClient:
431
434
  """
432
435
  _response = await self._client_wrapper.httpx_client.request(
433
436
  "v1/murfdub/jobs/create",
437
+ base_url=self._client_wrapper.get_environment().base,
434
438
  method="POST",
435
439
  data={
436
440
  "file_url": file_url,
@@ -451,7 +455,7 @@ class AsyncJobsClient:
451
455
  if 200 <= _response.status_code < 300:
452
456
  return typing.cast(
453
457
  ApiJobResponse,
454
- parse_obj_as(
458
+ construct_type(
455
459
  type_=ApiJobResponse, # type: ignore
456
460
  object_=_response.json(),
457
461
  ),
@@ -460,7 +464,7 @@ class AsyncJobsClient:
460
464
  raise BadRequestError(
461
465
  typing.cast(
462
466
  typing.Optional[typing.Any],
463
- parse_obj_as(
467
+ construct_type(
464
468
  type_=typing.Optional[typing.Any], # type: ignore
465
469
  object_=_response.json(),
466
470
  ),
@@ -470,7 +474,7 @@ class AsyncJobsClient:
470
474
  raise ForbiddenError(
471
475
  typing.cast(
472
476
  typing.Optional[typing.Any],
473
- parse_obj_as(
477
+ construct_type(
474
478
  type_=typing.Optional[typing.Any], # type: ignore
475
479
  object_=_response.json(),
476
480
  ),
@@ -480,7 +484,7 @@ class AsyncJobsClient:
480
484
  raise InternalServerError(
481
485
  typing.cast(
482
486
  typing.Optional[typing.Any],
483
- parse_obj_as(
487
+ construct_type(
484
488
  type_=typing.Optional[typing.Any], # type: ignore
485
489
  object_=_response.json(),
486
490
  ),
@@ -490,7 +494,7 @@ class AsyncJobsClient:
490
494
  raise ServiceUnavailableError(
491
495
  typing.cast(
492
496
  typing.Optional[typing.Any],
493
- parse_obj_as(
497
+ construct_type(
494
498
  type_=typing.Optional[typing.Any], # type: ignore
495
499
  object_=_response.json(),
496
500
  ),
@@ -562,6 +566,7 @@ class AsyncJobsClient:
562
566
  """
563
567
  _response = await self._client_wrapper.httpx_client.request(
564
568
  "v1/murfdub/jobs/create-with-project-id",
569
+ base_url=self._client_wrapper.get_environment().base,
565
570
  method="POST",
566
571
  data={
567
572
  "file_url": file_url,
@@ -581,7 +586,7 @@ class AsyncJobsClient:
581
586
  if 200 <= _response.status_code < 300:
582
587
  return typing.cast(
583
588
  ApiJobResponse,
584
- parse_obj_as(
589
+ construct_type(
585
590
  type_=ApiJobResponse, # type: ignore
586
591
  object_=_response.json(),
587
592
  ),
@@ -590,7 +595,7 @@ class AsyncJobsClient:
590
595
  raise BadRequestError(
591
596
  typing.cast(
592
597
  typing.Optional[typing.Any],
593
- parse_obj_as(
598
+ construct_type(
594
599
  type_=typing.Optional[typing.Any], # type: ignore
595
600
  object_=_response.json(),
596
601
  ),
@@ -600,7 +605,7 @@ class AsyncJobsClient:
600
605
  raise ForbiddenError(
601
606
  typing.cast(
602
607
  typing.Optional[typing.Any],
603
- parse_obj_as(
608
+ construct_type(
604
609
  type_=typing.Optional[typing.Any], # type: ignore
605
610
  object_=_response.json(),
606
611
  ),
@@ -610,7 +615,7 @@ class AsyncJobsClient:
610
615
  raise InternalServerError(
611
616
  typing.cast(
612
617
  typing.Optional[typing.Any],
613
- parse_obj_as(
618
+ construct_type(
614
619
  type_=typing.Optional[typing.Any], # type: ignore
615
620
  object_=_response.json(),
616
621
  ),
@@ -620,7 +625,7 @@ class AsyncJobsClient:
620
625
  raise ServiceUnavailableError(
621
626
  typing.cast(
622
627
  typing.Optional[typing.Any],
623
- parse_obj_as(
628
+ construct_type(
624
629
  type_=typing.Optional[typing.Any], # type: ignore
625
630
  object_=_response.json(),
626
631
  ),
@@ -668,6 +673,7 @@ class AsyncJobsClient:
668
673
  """
669
674
  _response = await self._client_wrapper.httpx_client.request(
670
675
  f"v1/murfdub/jobs/{jsonable_encoder(job_id)}/status",
676
+ base_url=self._client_wrapper.get_environment().base,
671
677
  method="GET",
672
678
  request_options=request_options,
673
679
  )
@@ -675,7 +681,7 @@ class AsyncJobsClient:
675
681
  if 200 <= _response.status_code < 300:
676
682
  return typing.cast(
677
683
  DubJobStatusResponse,
678
- parse_obj_as(
684
+ construct_type(
679
685
  type_=DubJobStatusResponse, # type: ignore
680
686
  object_=_response.json(),
681
687
  ),
@@ -684,7 +690,7 @@ class AsyncJobsClient:
684
690
  raise BadRequestError(
685
691
  typing.cast(
686
692
  typing.Optional[typing.Any],
687
- parse_obj_as(
693
+ construct_type(
688
694
  type_=typing.Optional[typing.Any], # type: ignore
689
695
  object_=_response.json(),
690
696
  ),
@@ -694,7 +700,7 @@ class AsyncJobsClient:
694
700
  raise ForbiddenError(
695
701
  typing.cast(
696
702
  typing.Optional[typing.Any],
697
- parse_obj_as(
703
+ construct_type(
698
704
  type_=typing.Optional[typing.Any], # type: ignore
699
705
  object_=_response.json(),
700
706
  ),
@@ -704,7 +710,7 @@ class AsyncJobsClient:
704
710
  raise InternalServerError(
705
711
  typing.cast(
706
712
  typing.Optional[typing.Any],
707
- parse_obj_as(
713
+ construct_type(
708
714
  type_=typing.Optional[typing.Any], # type: ignore
709
715
  object_=_response.json(),
710
716
  ),
@@ -714,7 +720,7 @@ class AsyncJobsClient:
714
720
  raise ServiceUnavailableError(
715
721
  typing.cast(
716
722
  typing.Optional[typing.Any],
717
- parse_obj_as(
723
+ construct_type(
718
724
  type_=typing.Optional[typing.Any], # type: ignore
719
725
  object_=_response.json(),
720
726
  ),