|
7 | 7 | import httpx |
8 | 8 |
|
9 | 9 | from ..types import profile_create_params, profile_update_params |
| 10 | +from .._files import deepcopy_with_paths |
10 | 11 | from .._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given |
11 | | -from .._utils import extract_files, path_template, maybe_transform, deepcopy_minimal, async_maybe_transform |
| 12 | +from .._utils import extract_files, path_template, maybe_transform, async_maybe_transform |
12 | 13 | from .._compat import cached_property |
13 | 14 | from .._resource import SyncAPIResource, AsyncAPIResource |
14 | 15 | from .._response import ( |
@@ -80,13 +81,14 @@ def create( |
80 | 81 |
|
81 | 82 | timeout: Override the client-level default timeout for this request, in seconds |
82 | 83 | """ |
83 | | - body = deepcopy_minimal( |
| 84 | + body = deepcopy_with_paths( |
84 | 85 | { |
85 | 86 | "user_data_dir": user_data_dir, |
86 | 87 | "dimensions": dimensions, |
87 | 88 | "proxy_url": proxy_url, |
88 | 89 | "user_agent": user_agent, |
89 | | - } |
| 90 | + }, |
| 91 | + [["userDataDir"]], |
90 | 92 | ) |
91 | 93 | files = extract_files(cast(Mapping[str, object], body), paths=[["userDataDir"]]) |
92 | 94 | # It should be noted that the actual Content-Type header that will be |
@@ -140,13 +142,14 @@ def update( |
140 | 142 | """ |
141 | 143 | if not id: |
142 | 144 | raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") |
143 | | - body = deepcopy_minimal( |
| 145 | + body = deepcopy_with_paths( |
144 | 146 | { |
145 | 147 | "user_data_dir": user_data_dir, |
146 | 148 | "dimensions": dimensions, |
147 | 149 | "proxy_url": proxy_url, |
148 | 150 | "user_agent": user_agent, |
149 | | - } |
| 151 | + }, |
| 152 | + [["userDataDir"]], |
150 | 153 | ) |
151 | 154 | files = extract_files(cast(Mapping[str, object], body), paths=[["userDataDir"]]) |
152 | 155 | # It should be noted that the actual Content-Type header that will be |
@@ -270,13 +273,14 @@ async def create( |
270 | 273 |
|
271 | 274 | timeout: Override the client-level default timeout for this request, in seconds |
272 | 275 | """ |
273 | | - body = deepcopy_minimal( |
| 276 | + body = deepcopy_with_paths( |
274 | 277 | { |
275 | 278 | "user_data_dir": user_data_dir, |
276 | 279 | "dimensions": dimensions, |
277 | 280 | "proxy_url": proxy_url, |
278 | 281 | "user_agent": user_agent, |
279 | | - } |
| 282 | + }, |
| 283 | + [["userDataDir"]], |
280 | 284 | ) |
281 | 285 | files = extract_files(cast(Mapping[str, object], body), paths=[["userDataDir"]]) |
282 | 286 | # It should be noted that the actual Content-Type header that will be |
@@ -330,13 +334,14 @@ async def update( |
330 | 334 | """ |
331 | 335 | if not id: |
332 | 336 | raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") |
333 | | - body = deepcopy_minimal( |
| 337 | + body = deepcopy_with_paths( |
334 | 338 | { |
335 | 339 | "user_data_dir": user_data_dir, |
336 | 340 | "dimensions": dimensions, |
337 | 341 | "proxy_url": proxy_url, |
338 | 342 | "user_agent": user_agent, |
339 | | - } |
| 343 | + }, |
| 344 | + [["userDataDir"]], |
340 | 345 | ) |
341 | 346 | files = extract_files(cast(Mapping[str, object], body), paths=[["userDataDir"]]) |
342 | 347 | # It should be noted that the actual Content-Type header that will be |
|
0 commit comments