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.
Files changed (39) hide show
  1. anchorbrowser/_client.py +17 -1
  2. anchorbrowser/_models.py +3 -0
  3. anchorbrowser/_version.py +1 -1
  4. anchorbrowser/resources/__init__.py +28 -0
  5. anchorbrowser/resources/batch_sessions.py +288 -0
  6. anchorbrowser/resources/profiles.py +1 -115
  7. anchorbrowser/resources/sessions/__init__.py +14 -0
  8. anchorbrowser/resources/sessions/agent/__init__.py +33 -0
  9. anchorbrowser/resources/sessions/agent/agent.py +273 -0
  10. anchorbrowser/resources/sessions/agent/files.py +280 -0
  11. anchorbrowser/resources/sessions/mouse.py +1 -233
  12. anchorbrowser/resources/sessions/sessions.py +39 -1
  13. anchorbrowser/resources/task.py +465 -0
  14. anchorbrowser/types/__init__.py +7 -1
  15. anchorbrowser/types/batch_session_create_params.py +487 -0
  16. anchorbrowser/types/batch_session_create_response.py +27 -0
  17. anchorbrowser/types/batch_session_retrieve_response.py +90 -0
  18. anchorbrowser/types/session_create_params.py +52 -9
  19. anchorbrowser/types/sessions/__init__.py +0 -4
  20. anchorbrowser/types/sessions/agent/__init__.py +7 -0
  21. anchorbrowser/types/sessions/agent/file_list_response.py +32 -0
  22. anchorbrowser/types/sessions/agent/file_upload_params.py +14 -0
  23. anchorbrowser/types/sessions/agent/file_upload_response.py +17 -0
  24. anchorbrowser/types/task/__init__.py +6 -0
  25. anchorbrowser/types/task/run_execute_params.py +324 -0
  26. anchorbrowser/types/task/run_execute_response.py +33 -0
  27. anchorbrowser/types/task_create_params.py +317 -0
  28. anchorbrowser/types/task_create_response.py +345 -0
  29. anchorbrowser/types/task_list_params.py +15 -0
  30. anchorbrowser/types/task_list_response.py +361 -0
  31. {anchorbrowser-0.1.1.dist-info → anchorbrowser-0.3.0.dist-info}/METADATA +6 -6
  32. {anchorbrowser-0.1.1.dist-info → anchorbrowser-0.3.0.dist-info}/RECORD +34 -20
  33. anchorbrowser/types/profile_update_params.py +0 -21
  34. anchorbrowser/types/sessions/mouse_down_params.py +0 -18
  35. anchorbrowser/types/sessions/mouse_down_response.py +0 -11
  36. anchorbrowser/types/sessions/mouse_up_params.py +0 -18
  37. anchorbrowser/types/sessions/mouse_up_response.py +0 -11
  38. {anchorbrowser-0.1.1.dist-info → anchorbrowser-0.3.0.dist-info}/WHEEL +0 -0
  39. {anchorbrowser-0.1.1.dist-info → anchorbrowser-0.3.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,317 @@
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 Union
6
+ from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7
+
8
+ from .._utils import PropertyInfo
9
+
10
+ __all__ = [
11
+ "TaskCreateParams",
12
+ "BrowserConfiguration",
13
+ "BrowserConfigurationLiveView",
14
+ "BrowserConfigurationProxy",
15
+ "BrowserConfigurationProxyAnchorProxy",
16
+ "BrowserConfigurationProxyCustomProxy",
17
+ "BrowserConfigurationRecording",
18
+ "BrowserConfigurationTimeout",
19
+ ]
20
+
21
+
22
+ class TaskCreateParams(TypedDict, total=False):
23
+ language: Required[Literal["typescript"]]
24
+ """Programming language for the task"""
25
+
26
+ name: Required[str]
27
+ """Task name (letters, numbers, hyphens, and underscores only)"""
28
+
29
+ browser_configuration: Annotated[BrowserConfiguration, PropertyInfo(alias="browserConfiguration")]
30
+ """Browser configuration for task execution"""
31
+
32
+ code: str
33
+ """Base64 encoded task code (optional)"""
34
+
35
+ description: str
36
+ """Optional description of the task"""
37
+
38
+
39
+ class BrowserConfigurationLiveView(TypedDict, total=False):
40
+ read_only: bool
41
+ """Enable or disable read-only mode for live viewing. Defaults to `false`."""
42
+
43
+
44
+ class BrowserConfigurationProxyAnchorProxy(TypedDict, total=False):
45
+ active: Required[bool]
46
+
47
+ city: str
48
+ """City name for precise geographic targeting.
49
+
50
+ Supported for anchor_proxy only. Can only be used when region is also provided.
51
+ """
52
+
53
+ country_code: Literal[
54
+ "af",
55
+ "al",
56
+ "dz",
57
+ "ad",
58
+ "ao",
59
+ "as",
60
+ "ag",
61
+ "ar",
62
+ "am",
63
+ "aw",
64
+ "au",
65
+ "at",
66
+ "az",
67
+ "bs",
68
+ "bh",
69
+ "bb",
70
+ "by",
71
+ "be",
72
+ "bz",
73
+ "bj",
74
+ "bm",
75
+ "bo",
76
+ "ba",
77
+ "br",
78
+ "bg",
79
+ "bf",
80
+ "cm",
81
+ "ca",
82
+ "cv",
83
+ "td",
84
+ "cl",
85
+ "co",
86
+ "cg",
87
+ "cr",
88
+ "ci",
89
+ "hr",
90
+ "cu",
91
+ "cy",
92
+ "cz",
93
+ "dk",
94
+ "dm",
95
+ "do",
96
+ "ec",
97
+ "eg",
98
+ "sv",
99
+ "ee",
100
+ "et",
101
+ "fo",
102
+ "fi",
103
+ "fr",
104
+ "gf",
105
+ "pf",
106
+ "ga",
107
+ "gm",
108
+ "ge",
109
+ "de",
110
+ "gh",
111
+ "gi",
112
+ "gr",
113
+ "gd",
114
+ "gp",
115
+ "gt",
116
+ "gg",
117
+ "gn",
118
+ "gw",
119
+ "gy",
120
+ "ht",
121
+ "hn",
122
+ "hu",
123
+ "is",
124
+ "in",
125
+ "ir",
126
+ "iq",
127
+ "ie",
128
+ "il",
129
+ "it",
130
+ "jm",
131
+ "jp",
132
+ "jo",
133
+ "kz",
134
+ "kw",
135
+ "kg",
136
+ "lv",
137
+ "lb",
138
+ "ly",
139
+ "li",
140
+ "lt",
141
+ "lu",
142
+ "mk",
143
+ "ml",
144
+ "mt",
145
+ "mq",
146
+ "mr",
147
+ "mx",
148
+ "md",
149
+ "mc",
150
+ "me",
151
+ "ma",
152
+ "nl",
153
+ "nz",
154
+ "ni",
155
+ "ng",
156
+ "no",
157
+ "pk",
158
+ "pa",
159
+ "py",
160
+ "pe",
161
+ "ph",
162
+ "pl",
163
+ "pt",
164
+ "pr",
165
+ "qa",
166
+ "ro",
167
+ "lc",
168
+ "sm",
169
+ "sa",
170
+ "sn",
171
+ "rs",
172
+ "sc",
173
+ "sl",
174
+ "sk",
175
+ "si",
176
+ "so",
177
+ "za",
178
+ "kr",
179
+ "es",
180
+ "sr",
181
+ "se",
182
+ "ch",
183
+ "sy",
184
+ "st",
185
+ "tw",
186
+ "tj",
187
+ "tg",
188
+ "tt",
189
+ "tn",
190
+ "tr",
191
+ "tc",
192
+ "ua",
193
+ "ae",
194
+ "us",
195
+ "uy",
196
+ "uz",
197
+ "ve",
198
+ "ye",
199
+ "bd",
200
+ "bw",
201
+ "bn",
202
+ "bi",
203
+ "kh",
204
+ "cn",
205
+ "dj",
206
+ "gq",
207
+ "sz",
208
+ "fj",
209
+ "hk",
210
+ "id",
211
+ "ke",
212
+ "la",
213
+ "ls",
214
+ "lr",
215
+ "mg",
216
+ "mw",
217
+ "my",
218
+ "mv",
219
+ "mn",
220
+ "mz",
221
+ "mm",
222
+ "na",
223
+ "np",
224
+ "nc",
225
+ "ne",
226
+ "om",
227
+ "pg",
228
+ "ru",
229
+ "rw",
230
+ "ws",
231
+ "sg",
232
+ "ss",
233
+ "lk",
234
+ "sd",
235
+ "tz",
236
+ "th",
237
+ "tl",
238
+ "tm",
239
+ "ug",
240
+ "gb",
241
+ "vu",
242
+ "vn",
243
+ "zm",
244
+ "zw",
245
+ "bt",
246
+ "mu",
247
+ ]
248
+ """Supported country codes ISO 2 lowercase
249
+
250
+ **On change make sure to update the Proxy type.**
251
+ """
252
+
253
+ region: str
254
+ """
255
+ Region code for more specific geographic targeting. The city parameter can only
256
+ be used when region is also provided.
257
+ """
258
+
259
+ type: Literal["anchor_proxy", "anchor_residential", "anchor_mobile", "anchor_gov"]
260
+ """**On change make sure to update the country_code.**"""
261
+
262
+
263
+ class BrowserConfigurationProxyCustomProxy(TypedDict, total=False):
264
+ active: Required[bool]
265
+
266
+ password: Required[str]
267
+ """Proxy password"""
268
+
269
+ server: Required[str]
270
+ """Proxy server address"""
271
+
272
+ type: Required[Literal["custom"]]
273
+
274
+ username: Required[str]
275
+ """Proxy username"""
276
+
277
+
278
+ BrowserConfigurationProxy: TypeAlias = Union[BrowserConfigurationProxyAnchorProxy, BrowserConfigurationProxyCustomProxy]
279
+
280
+
281
+ class BrowserConfigurationRecording(TypedDict, total=False):
282
+ active: bool
283
+ """Enable or disable video recording of the browser session. Defaults to `true`."""
284
+
285
+
286
+ class BrowserConfigurationTimeout(TypedDict, total=False):
287
+ idle_timeout: int
288
+ """
289
+ The amount of time (in minutes) the browser session waits for new connections
290
+ after all others are closed before stopping. Defaults to `5`.
291
+ """
292
+
293
+ max_duration: int
294
+ """Maximum amount of time (in minutes) for the browser to run before terminating.
295
+
296
+ Defaults to `20`.
297
+ """
298
+
299
+
300
+ class BrowserConfiguration(TypedDict, total=False):
301
+ initial_url: str
302
+ """The URL to navigate to when the browser session starts.
303
+
304
+ If not provided, the browser will load an empty page.
305
+ """
306
+
307
+ live_view: BrowserConfigurationLiveView
308
+ """Configuration for live viewing the browser session."""
309
+
310
+ proxy: BrowserConfigurationProxy
311
+ """Proxy Documentation available at [Proxy Documentation](/advanced/proxy)"""
312
+
313
+ recording: BrowserConfigurationRecording
314
+ """Configuration for session recording."""
315
+
316
+ timeout: BrowserConfigurationTimeout
317
+ """Timeout configurations for the browser session."""
@@ -0,0 +1,345 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Union, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal, TypeAlias
6
+
7
+ from pydantic import Field as FieldInfo
8
+
9
+ from .._models import BaseModel
10
+
11
+ __all__ = [
12
+ "TaskCreateResponse",
13
+ "Data",
14
+ "DataBrowserConfiguration",
15
+ "DataBrowserConfigurationLiveView",
16
+ "DataBrowserConfigurationProxy",
17
+ "DataBrowserConfigurationProxyAnchorProxy",
18
+ "DataBrowserConfigurationProxyCustomProxy",
19
+ "DataBrowserConfigurationRecording",
20
+ "DataBrowserConfigurationTimeout",
21
+ ]
22
+
23
+
24
+ class DataBrowserConfigurationLiveView(BaseModel):
25
+ read_only: Optional[bool] = None
26
+ """Enable or disable read-only mode for live viewing. Defaults to `false`."""
27
+
28
+
29
+ class DataBrowserConfigurationProxyAnchorProxy(BaseModel):
30
+ active: bool
31
+
32
+ city: Optional[str] = None
33
+ """City name for precise geographic targeting.
34
+
35
+ Supported for anchor_proxy only. Can only be used when region is also provided.
36
+ """
37
+
38
+ country_code: Optional[
39
+ Literal[
40
+ "af",
41
+ "al",
42
+ "dz",
43
+ "ad",
44
+ "ao",
45
+ "as",
46
+ "ag",
47
+ "ar",
48
+ "am",
49
+ "aw",
50
+ "au",
51
+ "at",
52
+ "az",
53
+ "bs",
54
+ "bh",
55
+ "bb",
56
+ "by",
57
+ "be",
58
+ "bz",
59
+ "bj",
60
+ "bm",
61
+ "bo",
62
+ "ba",
63
+ "br",
64
+ "bg",
65
+ "bf",
66
+ "cm",
67
+ "ca",
68
+ "cv",
69
+ "td",
70
+ "cl",
71
+ "co",
72
+ "cg",
73
+ "cr",
74
+ "ci",
75
+ "hr",
76
+ "cu",
77
+ "cy",
78
+ "cz",
79
+ "dk",
80
+ "dm",
81
+ "do",
82
+ "ec",
83
+ "eg",
84
+ "sv",
85
+ "ee",
86
+ "et",
87
+ "fo",
88
+ "fi",
89
+ "fr",
90
+ "gf",
91
+ "pf",
92
+ "ga",
93
+ "gm",
94
+ "ge",
95
+ "de",
96
+ "gh",
97
+ "gi",
98
+ "gr",
99
+ "gd",
100
+ "gp",
101
+ "gt",
102
+ "gg",
103
+ "gn",
104
+ "gw",
105
+ "gy",
106
+ "ht",
107
+ "hn",
108
+ "hu",
109
+ "is",
110
+ "in",
111
+ "ir",
112
+ "iq",
113
+ "ie",
114
+ "il",
115
+ "it",
116
+ "jm",
117
+ "jp",
118
+ "jo",
119
+ "kz",
120
+ "kw",
121
+ "kg",
122
+ "lv",
123
+ "lb",
124
+ "ly",
125
+ "li",
126
+ "lt",
127
+ "lu",
128
+ "mk",
129
+ "ml",
130
+ "mt",
131
+ "mq",
132
+ "mr",
133
+ "mx",
134
+ "md",
135
+ "mc",
136
+ "me",
137
+ "ma",
138
+ "nl",
139
+ "nz",
140
+ "ni",
141
+ "ng",
142
+ "no",
143
+ "pk",
144
+ "pa",
145
+ "py",
146
+ "pe",
147
+ "ph",
148
+ "pl",
149
+ "pt",
150
+ "pr",
151
+ "qa",
152
+ "ro",
153
+ "lc",
154
+ "sm",
155
+ "sa",
156
+ "sn",
157
+ "rs",
158
+ "sc",
159
+ "sl",
160
+ "sk",
161
+ "si",
162
+ "so",
163
+ "za",
164
+ "kr",
165
+ "es",
166
+ "sr",
167
+ "se",
168
+ "ch",
169
+ "sy",
170
+ "st",
171
+ "tw",
172
+ "tj",
173
+ "tg",
174
+ "tt",
175
+ "tn",
176
+ "tr",
177
+ "tc",
178
+ "ua",
179
+ "ae",
180
+ "us",
181
+ "uy",
182
+ "uz",
183
+ "ve",
184
+ "ye",
185
+ "bd",
186
+ "bw",
187
+ "bn",
188
+ "bi",
189
+ "kh",
190
+ "cn",
191
+ "dj",
192
+ "gq",
193
+ "sz",
194
+ "fj",
195
+ "hk",
196
+ "id",
197
+ "ke",
198
+ "la",
199
+ "ls",
200
+ "lr",
201
+ "mg",
202
+ "mw",
203
+ "my",
204
+ "mv",
205
+ "mn",
206
+ "mz",
207
+ "mm",
208
+ "na",
209
+ "np",
210
+ "nc",
211
+ "ne",
212
+ "om",
213
+ "pg",
214
+ "ru",
215
+ "rw",
216
+ "ws",
217
+ "sg",
218
+ "ss",
219
+ "lk",
220
+ "sd",
221
+ "tz",
222
+ "th",
223
+ "tl",
224
+ "tm",
225
+ "ug",
226
+ "gb",
227
+ "vu",
228
+ "vn",
229
+ "zm",
230
+ "zw",
231
+ "bt",
232
+ "mu",
233
+ ]
234
+ ] = None
235
+ """Supported country codes ISO 2 lowercase
236
+
237
+ **On change make sure to update the Proxy type.**
238
+ """
239
+
240
+ region: Optional[str] = None
241
+ """
242
+ Region code for more specific geographic targeting. The city parameter can only
243
+ be used when region is also provided.
244
+ """
245
+
246
+ type: Optional[Literal["anchor_proxy", "anchor_residential", "anchor_mobile", "anchor_gov"]] = None
247
+ """**On change make sure to update the country_code.**"""
248
+
249
+
250
+ class DataBrowserConfigurationProxyCustomProxy(BaseModel):
251
+ active: bool
252
+
253
+ password: str
254
+ """Proxy password"""
255
+
256
+ server: str
257
+ """Proxy server address"""
258
+
259
+ type: Literal["custom"]
260
+
261
+ username: str
262
+ """Proxy username"""
263
+
264
+
265
+ DataBrowserConfigurationProxy: TypeAlias = Union[
266
+ DataBrowserConfigurationProxyAnchorProxy, DataBrowserConfigurationProxyCustomProxy
267
+ ]
268
+
269
+
270
+ class DataBrowserConfigurationRecording(BaseModel):
271
+ active: Optional[bool] = None
272
+ """Enable or disable video recording of the browser session. Defaults to `true`."""
273
+
274
+
275
+ class DataBrowserConfigurationTimeout(BaseModel):
276
+ idle_timeout: Optional[int] = None
277
+ """
278
+ The amount of time (in minutes) the browser session waits for new connections
279
+ after all others are closed before stopping. Defaults to `5`.
280
+ """
281
+
282
+ max_duration: Optional[int] = None
283
+ """Maximum amount of time (in minutes) for the browser to run before terminating.
284
+
285
+ Defaults to `20`.
286
+ """
287
+
288
+
289
+ class DataBrowserConfiguration(BaseModel):
290
+ initial_url: Optional[str] = None
291
+ """The URL to navigate to when the browser session starts.
292
+
293
+ If not provided, the browser will load an empty page.
294
+ """
295
+
296
+ live_view: Optional[DataBrowserConfigurationLiveView] = None
297
+ """Configuration for live viewing the browser session."""
298
+
299
+ proxy: Optional[DataBrowserConfigurationProxy] = None
300
+ """Proxy Documentation available at [Proxy Documentation](/advanced/proxy)"""
301
+
302
+ recording: Optional[DataBrowserConfigurationRecording] = None
303
+ """Configuration for session recording."""
304
+
305
+ timeout: Optional[DataBrowserConfigurationTimeout] = None
306
+ """Timeout configurations for the browser session."""
307
+
308
+
309
+ class Data(BaseModel):
310
+ id: str
311
+ """Unique identifier for the task"""
312
+
313
+ code: str
314
+ """Base64 encoded task code"""
315
+
316
+ created_at: datetime = FieldInfo(alias="createdAt")
317
+ """Task creation timestamp"""
318
+
319
+ deleted: bool
320
+ """Whether the task is soft deleted"""
321
+
322
+ language: Literal["typescript"]
323
+ """Programming language for the task"""
324
+
325
+ latest_version: str = FieldInfo(alias="latestVersion")
326
+ """Latest version identifier (draft, latest, or version number)"""
327
+
328
+ name: str
329
+ """Task name (letters, numbers, hyphens, and underscores only)"""
330
+
331
+ team_id: str = FieldInfo(alias="teamId")
332
+ """Team identifier that owns this task"""
333
+
334
+ updated_at: datetime = FieldInfo(alias="updatedAt")
335
+ """Task last update timestamp"""
336
+
337
+ browser_configuration: Optional[DataBrowserConfiguration] = FieldInfo(alias="browserConfiguration", default=None)
338
+ """Browser configuration for task execution"""
339
+
340
+ description: Optional[str] = None
341
+ """Optional description of the task"""
342
+
343
+
344
+ class TaskCreateResponse(BaseModel):
345
+ data: Optional[Data] = None
@@ -0,0 +1,15 @@
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 TypedDict
6
+
7
+ __all__ = ["TaskListParams"]
8
+
9
+
10
+ class TaskListParams(TypedDict, total=False):
11
+ limit: str
12
+ """Number of tasks per page"""
13
+
14
+ page: str
15
+ """Page number"""