anchorbrowser 0.1.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 (100) hide show
  1. anchorbrowser/__init__.py +100 -0
  2. anchorbrowser/_base_client.py +1995 -0
  3. anchorbrowser/_client.py +440 -0
  4. anchorbrowser/_compat.py +219 -0
  5. anchorbrowser/_constants.py +14 -0
  6. anchorbrowser/_exceptions.py +108 -0
  7. anchorbrowser/_files.py +123 -0
  8. anchorbrowser/_models.py +829 -0
  9. anchorbrowser/_qs.py +150 -0
  10. anchorbrowser/_resource.py +43 -0
  11. anchorbrowser/_response.py +832 -0
  12. anchorbrowser/_streaming.py +333 -0
  13. anchorbrowser/_types.py +219 -0
  14. anchorbrowser/_utils/__init__.py +57 -0
  15. anchorbrowser/_utils/_logs.py +25 -0
  16. anchorbrowser/_utils/_proxy.py +65 -0
  17. anchorbrowser/_utils/_reflection.py +42 -0
  18. anchorbrowser/_utils/_resources_proxy.py +24 -0
  19. anchorbrowser/_utils/_streams.py +12 -0
  20. anchorbrowser/_utils/_sync.py +86 -0
  21. anchorbrowser/_utils/_transform.py +447 -0
  22. anchorbrowser/_utils/_typing.py +151 -0
  23. anchorbrowser/_utils/_utils.py +422 -0
  24. anchorbrowser/_version.py +4 -0
  25. anchorbrowser/lib/.keep +4 -0
  26. anchorbrowser/lib/agent.py +69 -0
  27. anchorbrowser/lib/browser.py +186 -0
  28. anchorbrowser/py.typed +0 -0
  29. anchorbrowser/resources/__init__.py +61 -0
  30. anchorbrowser/resources/agent.py +305 -0
  31. anchorbrowser/resources/browser.py +152 -0
  32. anchorbrowser/resources/extensions.py +412 -0
  33. anchorbrowser/resources/profiles.py +553 -0
  34. anchorbrowser/resources/sessions/__init__.py +89 -0
  35. anchorbrowser/resources/sessions/all.py +192 -0
  36. anchorbrowser/resources/sessions/clipboard.py +252 -0
  37. anchorbrowser/resources/sessions/keyboard.py +298 -0
  38. anchorbrowser/resources/sessions/mouse.py +651 -0
  39. anchorbrowser/resources/sessions/recordings/__init__.py +33 -0
  40. anchorbrowser/resources/sessions/recordings/primary.py +176 -0
  41. anchorbrowser/resources/sessions/recordings/recordings.py +357 -0
  42. anchorbrowser/resources/sessions/sessions.py +1122 -0
  43. anchorbrowser/resources/tools.py +529 -0
  44. anchorbrowser/types/__init__.py +32 -0
  45. anchorbrowser/types/extension_delete_response.py +12 -0
  46. anchorbrowser/types/extension_list_response.py +31 -0
  47. anchorbrowser/types/extension_manifest.py +28 -0
  48. anchorbrowser/types/extension_retrieve_response.py +27 -0
  49. anchorbrowser/types/extension_upload_params.py +17 -0
  50. anchorbrowser/types/extension_upload_response.py +31 -0
  51. anchorbrowser/types/profile_create_params.py +31 -0
  52. anchorbrowser/types/profile_list_response.py +43 -0
  53. anchorbrowser/types/profile_retrieve_response.py +36 -0
  54. anchorbrowser/types/profile_update_params.py +27 -0
  55. anchorbrowser/types/session_copy_response.py +12 -0
  56. anchorbrowser/types/session_create_params.py +196 -0
  57. anchorbrowser/types/session_create_response.py +22 -0
  58. anchorbrowser/types/session_drag_and_drop_params.py +26 -0
  59. anchorbrowser/types/session_drag_and_drop_response.py +11 -0
  60. anchorbrowser/types/session_goto_params.py +12 -0
  61. anchorbrowser/types/session_goto_response.py +11 -0
  62. anchorbrowser/types/session_paste_params.py +12 -0
  63. anchorbrowser/types/session_paste_response.py +11 -0
  64. anchorbrowser/types/session_retrieve_downloads_response.py +51 -0
  65. anchorbrowser/types/session_scroll_params.py +26 -0
  66. anchorbrowser/types/session_scroll_response.py +11 -0
  67. anchorbrowser/types/sessions/__init__.py +25 -0
  68. anchorbrowser/types/sessions/all_status_response.py +30 -0
  69. anchorbrowser/types/sessions/clipboard_get_response.py +16 -0
  70. anchorbrowser/types/sessions/clipboard_set_params.py +12 -0
  71. anchorbrowser/types/sessions/clipboard_set_response.py +11 -0
  72. anchorbrowser/types/sessions/keyboard_shortcut_params.py +18 -0
  73. anchorbrowser/types/sessions/keyboard_shortcut_response.py +11 -0
  74. anchorbrowser/types/sessions/keyboard_type_params.py +15 -0
  75. anchorbrowser/types/sessions/keyboard_type_response.py +11 -0
  76. anchorbrowser/types/sessions/mouse_click_params.py +18 -0
  77. anchorbrowser/types/sessions/mouse_click_response.py +11 -0
  78. anchorbrowser/types/sessions/mouse_double_click_params.py +18 -0
  79. anchorbrowser/types/sessions/mouse_double_click_response.py +11 -0
  80. anchorbrowser/types/sessions/mouse_down_params.py +18 -0
  81. anchorbrowser/types/sessions/mouse_down_response.py +11 -0
  82. anchorbrowser/types/sessions/mouse_move_params.py +15 -0
  83. anchorbrowser/types/sessions/mouse_move_response.py +11 -0
  84. anchorbrowser/types/sessions/mouse_up_params.py +18 -0
  85. anchorbrowser/types/sessions/mouse_up_response.py +11 -0
  86. anchorbrowser/types/sessions/recording_list_response.py +46 -0
  87. anchorbrowser/types/sessions/recording_pause_response.py +12 -0
  88. anchorbrowser/types/sessions/recording_resume_response.py +12 -0
  89. anchorbrowser/types/sessions/recordings/__init__.py +3 -0
  90. anchorbrowser/types/shared/__init__.py +3 -0
  91. anchorbrowser/types/shared/success_response.py +15 -0
  92. anchorbrowser/types/tool_fetch_webpage_params.py +26 -0
  93. anchorbrowser/types/tool_fetch_webpage_response.py +7 -0
  94. anchorbrowser/types/tool_perform_web_task_params.py +30 -0
  95. anchorbrowser/types/tool_perform_web_task_response.py +16 -0
  96. anchorbrowser/types/tool_screenshot_webpage_params.py +48 -0
  97. anchorbrowser-0.1.0.dist-info/METADATA +449 -0
  98. anchorbrowser-0.1.0.dist-info/RECORD +100 -0
  99. anchorbrowser-0.1.0.dist-info/WHEEL +4 -0
  100. anchorbrowser-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,553 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal
6
+
7
+ import httpx
8
+
9
+ from ..types import profile_create_params, profile_update_params
10
+ from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
+ from .._utils import maybe_transform, async_maybe_transform
12
+ from .._compat import cached_property
13
+ from .._resource import SyncAPIResource, AsyncAPIResource
14
+ from .._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from .._base_client import make_request_options
21
+ from ..types.profile_list_response import ProfileListResponse
22
+ from ..types.shared.success_response import SuccessResponse
23
+ from ..types.profile_retrieve_response import ProfileRetrieveResponse
24
+
25
+ __all__ = ["ProfilesResource", "AsyncProfilesResource"]
26
+
27
+
28
+ class ProfilesResource(SyncAPIResource):
29
+ @cached_property
30
+ def with_raw_response(self) -> ProfilesResourceWithRawResponse:
31
+ """
32
+ This property can be used as a prefix for any HTTP method call to return
33
+ the raw response object instead of the parsed content.
34
+
35
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
36
+ """
37
+ return ProfilesResourceWithRawResponse(self)
38
+
39
+ @cached_property
40
+ def with_streaming_response(self) -> ProfilesResourceWithStreamingResponse:
41
+ """
42
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
43
+
44
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
45
+ """
46
+ return ProfilesResourceWithStreamingResponse(self)
47
+
48
+ def create(
49
+ self,
50
+ *,
51
+ name: str,
52
+ description: str | NotGiven = NOT_GIVEN,
53
+ session_id: str | NotGiven = NOT_GIVEN,
54
+ source: Literal["session"] | NotGiven = NOT_GIVEN,
55
+ store_cache: bool | NotGiven = NOT_GIVEN,
56
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57
+ # The extra values given here take precedence over values defined on the client or passed to this method.
58
+ extra_headers: Headers | None = None,
59
+ extra_query: Query | None = None,
60
+ extra_body: Body | None = None,
61
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
62
+ ) -> SuccessResponse:
63
+ """Creates a new profile from a browser session.
64
+
65
+ A Profile stores cookies, local
66
+ storage, and cache.
67
+
68
+ Args:
69
+ name: The name of the profile.
70
+
71
+ description: A description of the profile.
72
+
73
+ session_id: The browser session ID is required if the source is set to `session`. The
74
+ browser session must be running, and the profile will be stored once the browser
75
+ session terminates.
76
+
77
+ source: The source of the profile data. currently only `session` is supported.
78
+
79
+ store_cache: Indicates whether the browser session cache should be saved when the browser
80
+ session ends. Defaults to `false`.
81
+
82
+ extra_headers: Send extra headers
83
+
84
+ extra_query: Add additional query parameters to the request
85
+
86
+ extra_body: Add additional JSON properties to the request
87
+
88
+ timeout: Override the client-level default timeout for this request, in seconds
89
+ """
90
+ return self._post(
91
+ "/v1/profiles",
92
+ body=maybe_transform(
93
+ {
94
+ "name": name,
95
+ "description": description,
96
+ "session_id": session_id,
97
+ "source": source,
98
+ "store_cache": store_cache,
99
+ },
100
+ profile_create_params.ProfileCreateParams,
101
+ ),
102
+ options=make_request_options(
103
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
104
+ ),
105
+ cast_to=SuccessResponse,
106
+ )
107
+
108
+ def retrieve(
109
+ self,
110
+ name: str,
111
+ *,
112
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
113
+ # The extra values given here take precedence over values defined on the client or passed to this method.
114
+ extra_headers: Headers | None = None,
115
+ extra_query: Query | None = None,
116
+ extra_body: Body | None = None,
117
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
118
+ ) -> ProfileRetrieveResponse:
119
+ """
120
+ Retrieves details of a specific profile by its name.
121
+
122
+ Args:
123
+ extra_headers: Send extra headers
124
+
125
+ extra_query: Add additional query parameters to the request
126
+
127
+ extra_body: Add additional JSON properties to the request
128
+
129
+ timeout: Override the client-level default timeout for this request, in seconds
130
+ """
131
+ if not name:
132
+ raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
133
+ return self._get(
134
+ f"/v1/profiles/{name}",
135
+ options=make_request_options(
136
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
137
+ ),
138
+ cast_to=ProfileRetrieveResponse,
139
+ )
140
+
141
+ def update(
142
+ self,
143
+ name: str,
144
+ *,
145
+ description: str | NotGiven = NOT_GIVEN,
146
+ session_id: str | NotGiven = NOT_GIVEN,
147
+ source: Literal["session"] | NotGiven = NOT_GIVEN,
148
+ store_cache: bool | NotGiven = NOT_GIVEN,
149
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
150
+ # The extra values given here take precedence over values defined on the client or passed to this method.
151
+ extra_headers: Headers | None = None,
152
+ extra_query: Query | None = None,
153
+ extra_body: Body | None = None,
154
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
155
+ ) -> SuccessResponse:
156
+ """
157
+ Updates the description or data of an existing profile using a browser session.
158
+
159
+ Args:
160
+ description: The new description for the profile.
161
+
162
+ session_id: The browser session ID is required if the source is set to `session`. The
163
+ browser session must belong to the user and be active.
164
+
165
+ source: The source of the profile data. Currently, only `session` is supported.
166
+
167
+ store_cache: Indicates whether the browser session cache should be saved when the browser
168
+ session ends. Defaults to `false`.
169
+
170
+ extra_headers: Send extra headers
171
+
172
+ extra_query: Add additional query parameters to the request
173
+
174
+ extra_body: Add additional JSON properties to the request
175
+
176
+ timeout: Override the client-level default timeout for this request, in seconds
177
+ """
178
+ if not name:
179
+ raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
180
+ return self._put(
181
+ f"/v1/profiles/{name}",
182
+ body=maybe_transform(
183
+ {
184
+ "description": description,
185
+ "session_id": session_id,
186
+ "source": source,
187
+ "store_cache": store_cache,
188
+ },
189
+ profile_update_params.ProfileUpdateParams,
190
+ ),
191
+ options=make_request_options(
192
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
193
+ ),
194
+ cast_to=SuccessResponse,
195
+ )
196
+
197
+ def list(
198
+ self,
199
+ *,
200
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
201
+ # The extra values given here take precedence over values defined on the client or passed to this method.
202
+ extra_headers: Headers | None = None,
203
+ extra_query: Query | None = None,
204
+ extra_body: Body | None = None,
205
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
206
+ ) -> ProfileListResponse:
207
+ """Fetches all stored profiles."""
208
+ return self._get(
209
+ "/v1/profiles",
210
+ options=make_request_options(
211
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
212
+ ),
213
+ cast_to=ProfileListResponse,
214
+ )
215
+
216
+ def delete(
217
+ self,
218
+ name: str,
219
+ *,
220
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
221
+ # The extra values given here take precedence over values defined on the client or passed to this method.
222
+ extra_headers: Headers | None = None,
223
+ extra_query: Query | None = None,
224
+ extra_body: Body | None = None,
225
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
226
+ ) -> SuccessResponse:
227
+ """
228
+ Deletes an existing profile by its name.
229
+
230
+ Args:
231
+ extra_headers: Send extra headers
232
+
233
+ extra_query: Add additional query parameters to the request
234
+
235
+ extra_body: Add additional JSON properties to the request
236
+
237
+ timeout: Override the client-level default timeout for this request, in seconds
238
+ """
239
+ if not name:
240
+ raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
241
+ return self._delete(
242
+ f"/v1/profiles/{name}",
243
+ options=make_request_options(
244
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
245
+ ),
246
+ cast_to=SuccessResponse,
247
+ )
248
+
249
+
250
+ class AsyncProfilesResource(AsyncAPIResource):
251
+ @cached_property
252
+ def with_raw_response(self) -> AsyncProfilesResourceWithRawResponse:
253
+ """
254
+ This property can be used as a prefix for any HTTP method call to return
255
+ the raw response object instead of the parsed content.
256
+
257
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
258
+ """
259
+ return AsyncProfilesResourceWithRawResponse(self)
260
+
261
+ @cached_property
262
+ def with_streaming_response(self) -> AsyncProfilesResourceWithStreamingResponse:
263
+ """
264
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
265
+
266
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
267
+ """
268
+ return AsyncProfilesResourceWithStreamingResponse(self)
269
+
270
+ async def create(
271
+ self,
272
+ *,
273
+ name: str,
274
+ description: str | NotGiven = NOT_GIVEN,
275
+ session_id: str | NotGiven = NOT_GIVEN,
276
+ source: Literal["session"] | NotGiven = NOT_GIVEN,
277
+ store_cache: bool | NotGiven = NOT_GIVEN,
278
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
279
+ # The extra values given here take precedence over values defined on the client or passed to this method.
280
+ extra_headers: Headers | None = None,
281
+ extra_query: Query | None = None,
282
+ extra_body: Body | None = None,
283
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
284
+ ) -> SuccessResponse:
285
+ """Creates a new profile from a browser session.
286
+
287
+ A Profile stores cookies, local
288
+ storage, and cache.
289
+
290
+ Args:
291
+ name: The name of the profile.
292
+
293
+ description: A description of the profile.
294
+
295
+ session_id: The browser session ID is required if the source is set to `session`. The
296
+ browser session must be running, and the profile will be stored once the browser
297
+ session terminates.
298
+
299
+ source: The source of the profile data. currently only `session` is supported.
300
+
301
+ store_cache: Indicates whether the browser session cache should be saved when the browser
302
+ session ends. Defaults to `false`.
303
+
304
+ extra_headers: Send extra headers
305
+
306
+ extra_query: Add additional query parameters to the request
307
+
308
+ extra_body: Add additional JSON properties to the request
309
+
310
+ timeout: Override the client-level default timeout for this request, in seconds
311
+ """
312
+ return await self._post(
313
+ "/v1/profiles",
314
+ body=await async_maybe_transform(
315
+ {
316
+ "name": name,
317
+ "description": description,
318
+ "session_id": session_id,
319
+ "source": source,
320
+ "store_cache": store_cache,
321
+ },
322
+ profile_create_params.ProfileCreateParams,
323
+ ),
324
+ options=make_request_options(
325
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
326
+ ),
327
+ cast_to=SuccessResponse,
328
+ )
329
+
330
+ async def retrieve(
331
+ self,
332
+ name: str,
333
+ *,
334
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
335
+ # The extra values given here take precedence over values defined on the client or passed to this method.
336
+ extra_headers: Headers | None = None,
337
+ extra_query: Query | None = None,
338
+ extra_body: Body | None = None,
339
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
340
+ ) -> ProfileRetrieveResponse:
341
+ """
342
+ Retrieves details of a specific profile by its name.
343
+
344
+ Args:
345
+ extra_headers: Send extra headers
346
+
347
+ extra_query: Add additional query parameters to the request
348
+
349
+ extra_body: Add additional JSON properties to the request
350
+
351
+ timeout: Override the client-level default timeout for this request, in seconds
352
+ """
353
+ if not name:
354
+ raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
355
+ return await self._get(
356
+ f"/v1/profiles/{name}",
357
+ options=make_request_options(
358
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
359
+ ),
360
+ cast_to=ProfileRetrieveResponse,
361
+ )
362
+
363
+ async def update(
364
+ self,
365
+ name: str,
366
+ *,
367
+ description: str | NotGiven = NOT_GIVEN,
368
+ session_id: str | NotGiven = NOT_GIVEN,
369
+ source: Literal["session"] | NotGiven = NOT_GIVEN,
370
+ store_cache: bool | NotGiven = NOT_GIVEN,
371
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
372
+ # The extra values given here take precedence over values defined on the client or passed to this method.
373
+ extra_headers: Headers | None = None,
374
+ extra_query: Query | None = None,
375
+ extra_body: Body | None = None,
376
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
377
+ ) -> SuccessResponse:
378
+ """
379
+ Updates the description or data of an existing profile using a browser session.
380
+
381
+ Args:
382
+ description: The new description for the profile.
383
+
384
+ session_id: The browser session ID is required if the source is set to `session`. The
385
+ browser session must belong to the user and be active.
386
+
387
+ source: The source of the profile data. Currently, only `session` is supported.
388
+
389
+ store_cache: Indicates whether the browser session cache should be saved when the browser
390
+ session ends. Defaults to `false`.
391
+
392
+ extra_headers: Send extra headers
393
+
394
+ extra_query: Add additional query parameters to the request
395
+
396
+ extra_body: Add additional JSON properties to the request
397
+
398
+ timeout: Override the client-level default timeout for this request, in seconds
399
+ """
400
+ if not name:
401
+ raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
402
+ return await self._put(
403
+ f"/v1/profiles/{name}",
404
+ body=await async_maybe_transform(
405
+ {
406
+ "description": description,
407
+ "session_id": session_id,
408
+ "source": source,
409
+ "store_cache": store_cache,
410
+ },
411
+ profile_update_params.ProfileUpdateParams,
412
+ ),
413
+ options=make_request_options(
414
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
415
+ ),
416
+ cast_to=SuccessResponse,
417
+ )
418
+
419
+ async def list(
420
+ self,
421
+ *,
422
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
423
+ # The extra values given here take precedence over values defined on the client or passed to this method.
424
+ extra_headers: Headers | None = None,
425
+ extra_query: Query | None = None,
426
+ extra_body: Body | None = None,
427
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
428
+ ) -> ProfileListResponse:
429
+ """Fetches all stored profiles."""
430
+ return await self._get(
431
+ "/v1/profiles",
432
+ options=make_request_options(
433
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
434
+ ),
435
+ cast_to=ProfileListResponse,
436
+ )
437
+
438
+ async def delete(
439
+ self,
440
+ name: str,
441
+ *,
442
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
443
+ # The extra values given here take precedence over values defined on the client or passed to this method.
444
+ extra_headers: Headers | None = None,
445
+ extra_query: Query | None = None,
446
+ extra_body: Body | None = None,
447
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
448
+ ) -> SuccessResponse:
449
+ """
450
+ Deletes an existing profile by its name.
451
+
452
+ Args:
453
+ extra_headers: Send extra headers
454
+
455
+ extra_query: Add additional query parameters to the request
456
+
457
+ extra_body: Add additional JSON properties to the request
458
+
459
+ timeout: Override the client-level default timeout for this request, in seconds
460
+ """
461
+ if not name:
462
+ raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
463
+ return await self._delete(
464
+ f"/v1/profiles/{name}",
465
+ options=make_request_options(
466
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
467
+ ),
468
+ cast_to=SuccessResponse,
469
+ )
470
+
471
+
472
+ class ProfilesResourceWithRawResponse:
473
+ def __init__(self, profiles: ProfilesResource) -> None:
474
+ self._profiles = profiles
475
+
476
+ self.create = to_raw_response_wrapper(
477
+ profiles.create,
478
+ )
479
+ self.retrieve = to_raw_response_wrapper(
480
+ profiles.retrieve,
481
+ )
482
+ self.update = to_raw_response_wrapper(
483
+ profiles.update,
484
+ )
485
+ self.list = to_raw_response_wrapper(
486
+ profiles.list,
487
+ )
488
+ self.delete = to_raw_response_wrapper(
489
+ profiles.delete,
490
+ )
491
+
492
+
493
+ class AsyncProfilesResourceWithRawResponse:
494
+ def __init__(self, profiles: AsyncProfilesResource) -> None:
495
+ self._profiles = profiles
496
+
497
+ self.create = async_to_raw_response_wrapper(
498
+ profiles.create,
499
+ )
500
+ self.retrieve = async_to_raw_response_wrapper(
501
+ profiles.retrieve,
502
+ )
503
+ self.update = async_to_raw_response_wrapper(
504
+ profiles.update,
505
+ )
506
+ self.list = async_to_raw_response_wrapper(
507
+ profiles.list,
508
+ )
509
+ self.delete = async_to_raw_response_wrapper(
510
+ profiles.delete,
511
+ )
512
+
513
+
514
+ class ProfilesResourceWithStreamingResponse:
515
+ def __init__(self, profiles: ProfilesResource) -> None:
516
+ self._profiles = profiles
517
+
518
+ self.create = to_streamed_response_wrapper(
519
+ profiles.create,
520
+ )
521
+ self.retrieve = to_streamed_response_wrapper(
522
+ profiles.retrieve,
523
+ )
524
+ self.update = to_streamed_response_wrapper(
525
+ profiles.update,
526
+ )
527
+ self.list = to_streamed_response_wrapper(
528
+ profiles.list,
529
+ )
530
+ self.delete = to_streamed_response_wrapper(
531
+ profiles.delete,
532
+ )
533
+
534
+
535
+ class AsyncProfilesResourceWithStreamingResponse:
536
+ def __init__(self, profiles: AsyncProfilesResource) -> None:
537
+ self._profiles = profiles
538
+
539
+ self.create = async_to_streamed_response_wrapper(
540
+ profiles.create,
541
+ )
542
+ self.retrieve = async_to_streamed_response_wrapper(
543
+ profiles.retrieve,
544
+ )
545
+ self.update = async_to_streamed_response_wrapper(
546
+ profiles.update,
547
+ )
548
+ self.list = async_to_streamed_response_wrapper(
549
+ profiles.list,
550
+ )
551
+ self.delete = async_to_streamed_response_wrapper(
552
+ profiles.delete,
553
+ )
@@ -0,0 +1,89 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .all import (
4
+ AllResource,
5
+ AsyncAllResource,
6
+ AllResourceWithRawResponse,
7
+ AsyncAllResourceWithRawResponse,
8
+ AllResourceWithStreamingResponse,
9
+ AsyncAllResourceWithStreamingResponse,
10
+ )
11
+ from .mouse import (
12
+ MouseResource,
13
+ AsyncMouseResource,
14
+ MouseResourceWithRawResponse,
15
+ AsyncMouseResourceWithRawResponse,
16
+ MouseResourceWithStreamingResponse,
17
+ AsyncMouseResourceWithStreamingResponse,
18
+ )
19
+ from .keyboard import (
20
+ KeyboardResource,
21
+ AsyncKeyboardResource,
22
+ KeyboardResourceWithRawResponse,
23
+ AsyncKeyboardResourceWithRawResponse,
24
+ KeyboardResourceWithStreamingResponse,
25
+ AsyncKeyboardResourceWithStreamingResponse,
26
+ )
27
+ from .sessions import (
28
+ SessionsResource,
29
+ AsyncSessionsResource,
30
+ SessionsResourceWithRawResponse,
31
+ AsyncSessionsResourceWithRawResponse,
32
+ SessionsResourceWithStreamingResponse,
33
+ AsyncSessionsResourceWithStreamingResponse,
34
+ )
35
+ from .clipboard import (
36
+ ClipboardResource,
37
+ AsyncClipboardResource,
38
+ ClipboardResourceWithRawResponse,
39
+ AsyncClipboardResourceWithRawResponse,
40
+ ClipboardResourceWithStreamingResponse,
41
+ AsyncClipboardResourceWithStreamingResponse,
42
+ )
43
+ from .recordings import (
44
+ RecordingsResource,
45
+ AsyncRecordingsResource,
46
+ RecordingsResourceWithRawResponse,
47
+ AsyncRecordingsResourceWithRawResponse,
48
+ RecordingsResourceWithStreamingResponse,
49
+ AsyncRecordingsResourceWithStreamingResponse,
50
+ )
51
+
52
+ __all__ = [
53
+ "AllResource",
54
+ "AsyncAllResource",
55
+ "AllResourceWithRawResponse",
56
+ "AsyncAllResourceWithRawResponse",
57
+ "AllResourceWithStreamingResponse",
58
+ "AsyncAllResourceWithStreamingResponse",
59
+ "RecordingsResource",
60
+ "AsyncRecordingsResource",
61
+ "RecordingsResourceWithRawResponse",
62
+ "AsyncRecordingsResourceWithRawResponse",
63
+ "RecordingsResourceWithStreamingResponse",
64
+ "AsyncRecordingsResourceWithStreamingResponse",
65
+ "MouseResource",
66
+ "AsyncMouseResource",
67
+ "MouseResourceWithRawResponse",
68
+ "AsyncMouseResourceWithRawResponse",
69
+ "MouseResourceWithStreamingResponse",
70
+ "AsyncMouseResourceWithStreamingResponse",
71
+ "KeyboardResource",
72
+ "AsyncKeyboardResource",
73
+ "KeyboardResourceWithRawResponse",
74
+ "AsyncKeyboardResourceWithRawResponse",
75
+ "KeyboardResourceWithStreamingResponse",
76
+ "AsyncKeyboardResourceWithStreamingResponse",
77
+ "ClipboardResource",
78
+ "AsyncClipboardResource",
79
+ "ClipboardResourceWithRawResponse",
80
+ "AsyncClipboardResourceWithRawResponse",
81
+ "ClipboardResourceWithStreamingResponse",
82
+ "AsyncClipboardResourceWithStreamingResponse",
83
+ "SessionsResource",
84
+ "AsyncSessionsResource",
85
+ "SessionsResourceWithRawResponse",
86
+ "AsyncSessionsResourceWithRawResponse",
87
+ "SessionsResourceWithStreamingResponse",
88
+ "AsyncSessionsResourceWithStreamingResponse",
89
+ ]