anchorbrowser 0.1.1__py3-none-any.whl → 0.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.
- anchorbrowser/_client.py +17 -1
- anchorbrowser/_models.py +3 -0
- anchorbrowser/_version.py +1 -1
- anchorbrowser/resources/__init__.py +28 -0
- anchorbrowser/resources/batch_sessions.py +288 -0
- anchorbrowser/resources/profiles.py +1 -115
- anchorbrowser/resources/sessions/__init__.py +14 -0
- anchorbrowser/resources/sessions/agent/__init__.py +33 -0
- anchorbrowser/resources/sessions/agent/agent.py +273 -0
- anchorbrowser/resources/sessions/agent/files.py +280 -0
- anchorbrowser/resources/sessions/mouse.py +1 -233
- anchorbrowser/resources/sessions/sessions.py +39 -1
- anchorbrowser/resources/task.py +465 -0
- anchorbrowser/types/__init__.py +7 -1
- anchorbrowser/types/batch_session_create_params.py +487 -0
- anchorbrowser/types/batch_session_create_response.py +27 -0
- anchorbrowser/types/batch_session_retrieve_response.py +90 -0
- anchorbrowser/types/session_create_params.py +52 -9
- anchorbrowser/types/sessions/__init__.py +0 -4
- anchorbrowser/types/sessions/agent/__init__.py +7 -0
- anchorbrowser/types/sessions/agent/file_list_response.py +32 -0
- anchorbrowser/types/sessions/agent/file_upload_params.py +14 -0
- anchorbrowser/types/sessions/agent/file_upload_response.py +17 -0
- anchorbrowser/types/task/__init__.py +6 -0
- anchorbrowser/types/task/run_execute_params.py +324 -0
- anchorbrowser/types/task/run_execute_response.py +33 -0
- anchorbrowser/types/task_create_params.py +317 -0
- anchorbrowser/types/task_create_response.py +345 -0
- anchorbrowser/types/task_list_params.py +15 -0
- anchorbrowser/types/task_list_response.py +361 -0
- {anchorbrowser-0.1.1.dist-info → anchorbrowser-0.3.0.dist-info}/METADATA +6 -6
- {anchorbrowser-0.1.1.dist-info → anchorbrowser-0.3.0.dist-info}/RECORD +34 -20
- anchorbrowser/types/profile_update_params.py +0 -21
- anchorbrowser/types/sessions/mouse_down_params.py +0 -18
- anchorbrowser/types/sessions/mouse_down_response.py +0 -11
- anchorbrowser/types/sessions/mouse_up_params.py +0 -18
- anchorbrowser/types/sessions/mouse_up_response.py +0 -11
- {anchorbrowser-0.1.1.dist-info → anchorbrowser-0.3.0.dist-info}/WHEEL +0 -0
- {anchorbrowser-0.1.1.dist-info → anchorbrowser-0.3.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ..types import task_list_params, task_create_params
|
|
11
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
12
|
+
from .._utils import maybe_transform, async_maybe_transform
|
|
13
|
+
from .._compat import cached_property
|
|
14
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
from .._response import (
|
|
16
|
+
to_raw_response_wrapper,
|
|
17
|
+
to_streamed_response_wrapper,
|
|
18
|
+
async_to_raw_response_wrapper,
|
|
19
|
+
async_to_streamed_response_wrapper,
|
|
20
|
+
)
|
|
21
|
+
from ..types.task import run_execute_params
|
|
22
|
+
from .._base_client import make_request_options
|
|
23
|
+
from ..types.task_list_response import TaskListResponse
|
|
24
|
+
from ..types.task_create_response import TaskCreateResponse
|
|
25
|
+
from ..types.task.run_execute_response import RunExecuteResponse
|
|
26
|
+
|
|
27
|
+
__all__ = ["TaskResource", "AsyncTaskResource"]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class TaskResource(SyncAPIResource):
|
|
31
|
+
@cached_property
|
|
32
|
+
def with_raw_response(self) -> TaskResourceWithRawResponse:
|
|
33
|
+
"""
|
|
34
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
35
|
+
the raw response object instead of the parsed content.
|
|
36
|
+
|
|
37
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
|
|
38
|
+
"""
|
|
39
|
+
return TaskResourceWithRawResponse(self)
|
|
40
|
+
|
|
41
|
+
@cached_property
|
|
42
|
+
def with_streaming_response(self) -> TaskResourceWithStreamingResponse:
|
|
43
|
+
"""
|
|
44
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
45
|
+
|
|
46
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
|
|
47
|
+
"""
|
|
48
|
+
return TaskResourceWithStreamingResponse(self)
|
|
49
|
+
|
|
50
|
+
def create(
|
|
51
|
+
self,
|
|
52
|
+
*,
|
|
53
|
+
language: Literal["typescript"],
|
|
54
|
+
name: str,
|
|
55
|
+
browser_configuration: task_create_params.BrowserConfiguration | Omit = omit,
|
|
56
|
+
code: str | Omit = omit,
|
|
57
|
+
description: str | Omit = omit,
|
|
58
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
59
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
60
|
+
extra_headers: Headers | None = None,
|
|
61
|
+
extra_query: Query | None = None,
|
|
62
|
+
extra_body: Body | None = None,
|
|
63
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
64
|
+
) -> TaskCreateResponse:
|
|
65
|
+
"""Creates a new task or updates an existing task with the same name.
|
|
66
|
+
|
|
67
|
+
Tasks are
|
|
68
|
+
reusable code snippets that can be executed in browser sessions. Tasks support
|
|
69
|
+
versioning with draft and published versions.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
language: Programming language for the task
|
|
73
|
+
|
|
74
|
+
name: Task name (letters, numbers, hyphens, and underscores only)
|
|
75
|
+
|
|
76
|
+
browser_configuration: Browser configuration for task execution
|
|
77
|
+
|
|
78
|
+
code: Base64 encoded task code (optional)
|
|
79
|
+
|
|
80
|
+
description: Optional description of the task
|
|
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/task",
|
|
92
|
+
body=maybe_transform(
|
|
93
|
+
{
|
|
94
|
+
"language": language,
|
|
95
|
+
"name": name,
|
|
96
|
+
"browser_configuration": browser_configuration,
|
|
97
|
+
"code": code,
|
|
98
|
+
"description": description,
|
|
99
|
+
},
|
|
100
|
+
task_create_params.TaskCreateParams,
|
|
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=TaskCreateResponse,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
def list(
|
|
109
|
+
self,
|
|
110
|
+
*,
|
|
111
|
+
limit: str | Omit = omit,
|
|
112
|
+
page: str | Omit = omit,
|
|
113
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
114
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
115
|
+
extra_headers: Headers | None = None,
|
|
116
|
+
extra_query: Query | None = None,
|
|
117
|
+
extra_body: Body | None = None,
|
|
118
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
119
|
+
) -> TaskListResponse:
|
|
120
|
+
"""Retrieves a paginated list of all tasks for the authenticated team.
|
|
121
|
+
|
|
122
|
+
Tasks are
|
|
123
|
+
returned with their latest version information and metadata.
|
|
124
|
+
|
|
125
|
+
Args:
|
|
126
|
+
limit: Number of tasks per page
|
|
127
|
+
|
|
128
|
+
page: Page number
|
|
129
|
+
|
|
130
|
+
extra_headers: Send extra headers
|
|
131
|
+
|
|
132
|
+
extra_query: Add additional query parameters to the request
|
|
133
|
+
|
|
134
|
+
extra_body: Add additional JSON properties to the request
|
|
135
|
+
|
|
136
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
137
|
+
"""
|
|
138
|
+
return self._get(
|
|
139
|
+
"/v1/task",
|
|
140
|
+
options=make_request_options(
|
|
141
|
+
extra_headers=extra_headers,
|
|
142
|
+
extra_query=extra_query,
|
|
143
|
+
extra_body=extra_body,
|
|
144
|
+
timeout=timeout,
|
|
145
|
+
query=maybe_transform(
|
|
146
|
+
{
|
|
147
|
+
"limit": limit,
|
|
148
|
+
"page": page,
|
|
149
|
+
},
|
|
150
|
+
task_list_params.TaskListParams,
|
|
151
|
+
),
|
|
152
|
+
),
|
|
153
|
+
cast_to=TaskListResponse,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
def run(
|
|
157
|
+
self,
|
|
158
|
+
*,
|
|
159
|
+
task_id: str,
|
|
160
|
+
inputs: Dict[str, str] | Omit = omit,
|
|
161
|
+
override_browser_configuration: run_execute_params.OverrideBrowserConfiguration | Omit = omit,
|
|
162
|
+
session_id: str | Omit = omit,
|
|
163
|
+
task_session_id: str | Omit = omit,
|
|
164
|
+
version: str | Omit = omit,
|
|
165
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
166
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
167
|
+
extra_headers: Headers | None = None,
|
|
168
|
+
extra_query: Query | None = None,
|
|
169
|
+
extra_body: Body | None = None,
|
|
170
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
171
|
+
) -> RunExecuteResponse:
|
|
172
|
+
"""Executes a task in a browser session.
|
|
173
|
+
|
|
174
|
+
The task can be run with a specific
|
|
175
|
+
version or the latest version. Optionally, you can provide an existing session
|
|
176
|
+
ID or let the system create a new one.
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
task_id: Task identifier
|
|
180
|
+
|
|
181
|
+
inputs: Environment variables for task execution (keys must start with ANCHOR\\__)
|
|
182
|
+
|
|
183
|
+
override_browser_configuration: Override browser configuration for this execution
|
|
184
|
+
|
|
185
|
+
session_id: Optional existing session ID to use
|
|
186
|
+
|
|
187
|
+
task_session_id: Optional task-specific session ID
|
|
188
|
+
|
|
189
|
+
version: Version to run (draft, latest, or version number)
|
|
190
|
+
|
|
191
|
+
extra_headers: Send extra headers
|
|
192
|
+
|
|
193
|
+
extra_query: Add additional query parameters to the request
|
|
194
|
+
|
|
195
|
+
extra_body: Add additional JSON properties to the request
|
|
196
|
+
|
|
197
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
198
|
+
"""
|
|
199
|
+
return self._post(
|
|
200
|
+
"/v1/task/run",
|
|
201
|
+
body=maybe_transform(
|
|
202
|
+
{
|
|
203
|
+
"task_id": task_id,
|
|
204
|
+
"inputs": inputs,
|
|
205
|
+
"override_browser_configuration": override_browser_configuration,
|
|
206
|
+
"session_id": session_id,
|
|
207
|
+
"task_session_id": task_session_id,
|
|
208
|
+
"version": version,
|
|
209
|
+
},
|
|
210
|
+
run_execute_params.RunExecuteParams,
|
|
211
|
+
),
|
|
212
|
+
options=make_request_options(
|
|
213
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
214
|
+
),
|
|
215
|
+
cast_to=RunExecuteResponse,
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class AsyncTaskResource(AsyncAPIResource):
|
|
220
|
+
@cached_property
|
|
221
|
+
def with_raw_response(self) -> AsyncTaskResourceWithRawResponse:
|
|
222
|
+
"""
|
|
223
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
224
|
+
the raw response object instead of the parsed content.
|
|
225
|
+
|
|
226
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
|
|
227
|
+
"""
|
|
228
|
+
return AsyncTaskResourceWithRawResponse(self)
|
|
229
|
+
|
|
230
|
+
@cached_property
|
|
231
|
+
def with_streaming_response(self) -> AsyncTaskResourceWithStreamingResponse:
|
|
232
|
+
"""
|
|
233
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
234
|
+
|
|
235
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
|
|
236
|
+
"""
|
|
237
|
+
return AsyncTaskResourceWithStreamingResponse(self)
|
|
238
|
+
|
|
239
|
+
async def create(
|
|
240
|
+
self,
|
|
241
|
+
*,
|
|
242
|
+
language: Literal["typescript"],
|
|
243
|
+
name: str,
|
|
244
|
+
browser_configuration: task_create_params.BrowserConfiguration | Omit = omit,
|
|
245
|
+
code: str | Omit = omit,
|
|
246
|
+
description: str | Omit = omit,
|
|
247
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
248
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
249
|
+
extra_headers: Headers | None = None,
|
|
250
|
+
extra_query: Query | None = None,
|
|
251
|
+
extra_body: Body | None = None,
|
|
252
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
253
|
+
) -> TaskCreateResponse:
|
|
254
|
+
"""Creates a new task or updates an existing task with the same name.
|
|
255
|
+
|
|
256
|
+
Tasks are
|
|
257
|
+
reusable code snippets that can be executed in browser sessions. Tasks support
|
|
258
|
+
versioning with draft and published versions.
|
|
259
|
+
|
|
260
|
+
Args:
|
|
261
|
+
language: Programming language for the task
|
|
262
|
+
|
|
263
|
+
name: Task name (letters, numbers, hyphens, and underscores only)
|
|
264
|
+
|
|
265
|
+
browser_configuration: Browser configuration for task execution
|
|
266
|
+
|
|
267
|
+
code: Base64 encoded task code (optional)
|
|
268
|
+
|
|
269
|
+
description: Optional description of the task
|
|
270
|
+
|
|
271
|
+
extra_headers: Send extra headers
|
|
272
|
+
|
|
273
|
+
extra_query: Add additional query parameters to the request
|
|
274
|
+
|
|
275
|
+
extra_body: Add additional JSON properties to the request
|
|
276
|
+
|
|
277
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
278
|
+
"""
|
|
279
|
+
return await self._post(
|
|
280
|
+
"/v1/task",
|
|
281
|
+
body=await async_maybe_transform(
|
|
282
|
+
{
|
|
283
|
+
"language": language,
|
|
284
|
+
"name": name,
|
|
285
|
+
"browser_configuration": browser_configuration,
|
|
286
|
+
"code": code,
|
|
287
|
+
"description": description,
|
|
288
|
+
},
|
|
289
|
+
task_create_params.TaskCreateParams,
|
|
290
|
+
),
|
|
291
|
+
options=make_request_options(
|
|
292
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
293
|
+
),
|
|
294
|
+
cast_to=TaskCreateResponse,
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
async def list(
|
|
298
|
+
self,
|
|
299
|
+
*,
|
|
300
|
+
limit: str | Omit = omit,
|
|
301
|
+
page: str | Omit = omit,
|
|
302
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
303
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
304
|
+
extra_headers: Headers | None = None,
|
|
305
|
+
extra_query: Query | None = None,
|
|
306
|
+
extra_body: Body | None = None,
|
|
307
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
308
|
+
) -> TaskListResponse:
|
|
309
|
+
"""Retrieves a paginated list of all tasks for the authenticated team.
|
|
310
|
+
|
|
311
|
+
Tasks are
|
|
312
|
+
returned with their latest version information and metadata.
|
|
313
|
+
|
|
314
|
+
Args:
|
|
315
|
+
limit: Number of tasks per page
|
|
316
|
+
|
|
317
|
+
page: Page number
|
|
318
|
+
|
|
319
|
+
extra_headers: Send extra headers
|
|
320
|
+
|
|
321
|
+
extra_query: Add additional query parameters to the request
|
|
322
|
+
|
|
323
|
+
extra_body: Add additional JSON properties to the request
|
|
324
|
+
|
|
325
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
326
|
+
"""
|
|
327
|
+
return await self._get(
|
|
328
|
+
"/v1/task",
|
|
329
|
+
options=make_request_options(
|
|
330
|
+
extra_headers=extra_headers,
|
|
331
|
+
extra_query=extra_query,
|
|
332
|
+
extra_body=extra_body,
|
|
333
|
+
timeout=timeout,
|
|
334
|
+
query=await async_maybe_transform(
|
|
335
|
+
{
|
|
336
|
+
"limit": limit,
|
|
337
|
+
"page": page,
|
|
338
|
+
},
|
|
339
|
+
task_list_params.TaskListParams,
|
|
340
|
+
),
|
|
341
|
+
),
|
|
342
|
+
cast_to=TaskListResponse,
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
async def run(
|
|
346
|
+
self,
|
|
347
|
+
*,
|
|
348
|
+
task_id: str,
|
|
349
|
+
inputs: Dict[str, str] | Omit = omit,
|
|
350
|
+
override_browser_configuration: run_execute_params.OverrideBrowserConfiguration | Omit = omit,
|
|
351
|
+
session_id: str | Omit = omit,
|
|
352
|
+
task_session_id: str | Omit = omit,
|
|
353
|
+
version: str | Omit = omit,
|
|
354
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
355
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
356
|
+
extra_headers: Headers | None = None,
|
|
357
|
+
extra_query: Query | None = None,
|
|
358
|
+
extra_body: Body | None = None,
|
|
359
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
360
|
+
) -> RunExecuteResponse:
|
|
361
|
+
"""Executes a task in a browser session.
|
|
362
|
+
|
|
363
|
+
The task can be run with a specific
|
|
364
|
+
version or the latest version. Optionally, you can provide an existing session
|
|
365
|
+
ID or let the system create a new one.
|
|
366
|
+
|
|
367
|
+
Args:
|
|
368
|
+
task_id: Task identifier
|
|
369
|
+
|
|
370
|
+
inputs: Environment variables for task execution (keys must start with ANCHOR\\__)
|
|
371
|
+
|
|
372
|
+
override_browser_configuration: Override browser configuration for this execution
|
|
373
|
+
|
|
374
|
+
session_id: Optional existing session ID to use
|
|
375
|
+
|
|
376
|
+
task_session_id: Optional task-specific session ID
|
|
377
|
+
|
|
378
|
+
version: Version to run (draft, latest, or version number)
|
|
379
|
+
|
|
380
|
+
extra_headers: Send extra headers
|
|
381
|
+
|
|
382
|
+
extra_query: Add additional query parameters to the request
|
|
383
|
+
|
|
384
|
+
extra_body: Add additional JSON properties to the request
|
|
385
|
+
|
|
386
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
387
|
+
"""
|
|
388
|
+
return await self._post(
|
|
389
|
+
"/v1/task/run",
|
|
390
|
+
body=await async_maybe_transform(
|
|
391
|
+
{
|
|
392
|
+
"task_id": task_id,
|
|
393
|
+
"inputs": inputs,
|
|
394
|
+
"override_browser_configuration": override_browser_configuration,
|
|
395
|
+
"session_id": session_id,
|
|
396
|
+
"task_session_id": task_session_id,
|
|
397
|
+
"version": version,
|
|
398
|
+
},
|
|
399
|
+
run_execute_params.RunExecuteParams,
|
|
400
|
+
),
|
|
401
|
+
options=make_request_options(
|
|
402
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
403
|
+
),
|
|
404
|
+
cast_to=RunExecuteResponse,
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
class TaskResourceWithRawResponse:
|
|
409
|
+
def __init__(self, task: TaskResource) -> None:
|
|
410
|
+
self._task = task
|
|
411
|
+
|
|
412
|
+
self.create = to_raw_response_wrapper(
|
|
413
|
+
task.create,
|
|
414
|
+
)
|
|
415
|
+
self.list = to_raw_response_wrapper(
|
|
416
|
+
task.list,
|
|
417
|
+
)
|
|
418
|
+
self.run = to_raw_response_wrapper(
|
|
419
|
+
task.run,
|
|
420
|
+
)
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
class AsyncTaskResourceWithRawResponse:
|
|
424
|
+
def __init__(self, task: AsyncTaskResource) -> None:
|
|
425
|
+
self._task = task
|
|
426
|
+
|
|
427
|
+
self.create = async_to_raw_response_wrapper(
|
|
428
|
+
task.create,
|
|
429
|
+
)
|
|
430
|
+
self.list = async_to_raw_response_wrapper(
|
|
431
|
+
task.list,
|
|
432
|
+
)
|
|
433
|
+
self.run = async_to_raw_response_wrapper(
|
|
434
|
+
task.run,
|
|
435
|
+
)
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
class TaskResourceWithStreamingResponse:
|
|
439
|
+
def __init__(self, task: TaskResource) -> None:
|
|
440
|
+
self._task = task
|
|
441
|
+
|
|
442
|
+
self.create = to_streamed_response_wrapper(
|
|
443
|
+
task.create,
|
|
444
|
+
)
|
|
445
|
+
self.list = to_streamed_response_wrapper(
|
|
446
|
+
task.list,
|
|
447
|
+
)
|
|
448
|
+
self.run = to_streamed_response_wrapper(
|
|
449
|
+
task.run,
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
class AsyncTaskResourceWithStreamingResponse:
|
|
454
|
+
def __init__(self, task: AsyncTaskResource) -> None:
|
|
455
|
+
self._task = task
|
|
456
|
+
|
|
457
|
+
self.create = async_to_streamed_response_wrapper(
|
|
458
|
+
task.create,
|
|
459
|
+
)
|
|
460
|
+
self.list = async_to_streamed_response_wrapper(
|
|
461
|
+
task.list,
|
|
462
|
+
)
|
|
463
|
+
self.run = async_to_streamed_response_wrapper(
|
|
464
|
+
task.run,
|
|
465
|
+
)
|
anchorbrowser/types/__init__.py
CHANGED
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from .shared import SuccessResponse as SuccessResponse
|
|
6
|
+
from .task_list_params import TaskListParams as TaskListParams
|
|
6
7
|
from .extension_manifest import ExtensionManifest as ExtensionManifest
|
|
8
|
+
from .task_create_params import TaskCreateParams as TaskCreateParams
|
|
9
|
+
from .task_list_response import TaskListResponse as TaskListResponse
|
|
7
10
|
from .event_signal_params import EventSignalParams as EventSignalParams
|
|
8
11
|
from .session_goto_params import SessionGotoParams as SessionGotoParams
|
|
9
12
|
from .session_paste_params import SessionPasteParams as SessionPasteParams
|
|
13
|
+
from .task_create_response import TaskCreateResponse as TaskCreateResponse
|
|
10
14
|
from .event_wait_for_params import EventWaitForParams as EventWaitForParams
|
|
11
15
|
from .profile_create_params import ProfileCreateParams as ProfileCreateParams
|
|
12
16
|
from .profile_list_response import ProfileListResponse as ProfileListResponse
|
|
13
|
-
from .profile_update_params import ProfileUpdateParams as ProfileUpdateParams
|
|
14
17
|
from .session_copy_response import SessionCopyResponse as SessionCopyResponse
|
|
15
18
|
from .session_create_params import SessionCreateParams as SessionCreateParams
|
|
16
19
|
from .session_goto_response import SessionGotoResponse as SessionGotoResponse
|
|
@@ -27,13 +30,16 @@ from .profile_retrieve_response import ProfileRetrieveResponse as ProfileRetriev
|
|
|
27
30
|
from .session_retrieve_response import SessionRetrieveResponse as SessionRetrieveResponse
|
|
28
31
|
from .tool_fetch_webpage_params import ToolFetchWebpageParams as ToolFetchWebpageParams
|
|
29
32
|
from .session_upload_file_params import SessionUploadFileParams as SessionUploadFileParams
|
|
33
|
+
from .batch_session_create_params import BatchSessionCreateParams as BatchSessionCreateParams
|
|
30
34
|
from .extension_retrieve_response import ExtensionRetrieveResponse as ExtensionRetrieveResponse
|
|
31
35
|
from .session_list_pages_response import SessionListPagesResponse as SessionListPagesResponse
|
|
32
36
|
from .tool_fetch_webpage_response import ToolFetchWebpageResponse as ToolFetchWebpageResponse
|
|
33
37
|
from .session_drag_and_drop_params import SessionDragAndDropParams as SessionDragAndDropParams
|
|
34
38
|
from .session_upload_file_response import SessionUploadFileResponse as SessionUploadFileResponse
|
|
35
39
|
from .tool_perform_web_task_params import ToolPerformWebTaskParams as ToolPerformWebTaskParams
|
|
40
|
+
from .batch_session_create_response import BatchSessionCreateResponse as BatchSessionCreateResponse
|
|
36
41
|
from .session_drag_and_drop_response import SessionDragAndDropResponse as SessionDragAndDropResponse
|
|
37
42
|
from .tool_perform_web_task_response import ToolPerformWebTaskResponse as ToolPerformWebTaskResponse
|
|
38
43
|
from .tool_screenshot_webpage_params import ToolScreenshotWebpageParams as ToolScreenshotWebpageParams
|
|
44
|
+
from .batch_session_retrieve_response import BatchSessionRetrieveResponse as BatchSessionRetrieveResponse
|
|
39
45
|
from .session_retrieve_downloads_response import SessionRetrieveDownloadsResponse as SessionRetrieveDownloadsResponse
|