raccoonai 0.1.0a6__py3-none-any.whl → 0.1.0a8__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 raccoonai might be problematic. Click here for more details.
- raccoonai/_base_client.py +7 -1
- raccoonai/_client.py +20 -3
- raccoonai/_files.py +1 -1
- raccoonai/_version.py +1 -1
- raccoonai/resources/__init__.py +28 -0
- raccoonai/resources/extensions.py +400 -0
- raccoonai/resources/fleet.py +176 -14
- raccoonai/resources/lam.py +219 -764
- raccoonai/resources/tail/__init__.py +47 -0
- raccoonai/resources/tail/apps.py +225 -0
- raccoonai/resources/tail/auth.py +186 -0
- raccoonai/resources/tail/tail.py +273 -0
- raccoonai/types/__init__.py +10 -4
- raccoonai/types/extension_all_response.py +22 -0
- raccoonai/types/extension_get_response.py +16 -0
- raccoonai/types/extension_upload_params.py +13 -0
- raccoonai/types/extension_upload_response.py +16 -0
- raccoonai/types/fleet_create_params.py +26 -12
- raccoonai/types/fleet_create_response.py +3 -5
- raccoonai/types/fleet_sessions_params.py +42 -0
- raccoonai/types/fleet_sessions_response.py +58 -0
- raccoonai/types/fleet_status_response.py +3 -5
- raccoonai/types/fleet_terminate_response.py +3 -5
- raccoonai/types/lam_run_params.py +36 -3
- raccoonai/types/lam_run_response.py +9 -1
- raccoonai/types/lam_tasks_params.py +39 -0
- raccoonai/types/lam_tasks_response.py +52 -0
- raccoonai/types/tail/__init__.py +9 -0
- raccoonai/types/tail/app_all_response.py +38 -0
- raccoonai/types/tail/app_linked_params.py +13 -0
- raccoonai/types/tail/app_linked_response.py +14 -0
- raccoonai/types/tail/auth_status_params.py +15 -0
- raccoonai/types/tail/auth_status_response.py +17 -0
- raccoonai/types/tail_users_params.py +26 -0
- raccoonai/types/tail_users_response.py +48 -0
- {raccoonai-0.1.0a6.dist-info → raccoonai-0.1.0a8.dist-info}/METADATA +33 -16
- raccoonai-0.1.0a8.dist-info/RECORD +61 -0
- raccoonai/types/lam_extract_params.py +0 -68
- raccoonai/types/lam_extract_response.py +0 -31
- raccoonai/types/lam_integration_run_params.py +0 -57
- raccoonai/types/lam_integration_run_response.py +0 -53
- raccoonai-0.1.0a6.dist-info/RECORD +0 -44
- {raccoonai-0.1.0a6.dist-info → raccoonai-0.1.0a8.dist-info}/WHEEL +0 -0
- {raccoonai-0.1.0a6.dist-info → raccoonai-0.1.0a8.dist-info}/licenses/LICENSE +0 -0
raccoonai/resources/fleet.py
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
5
|
+
from typing import List, Optional
|
|
6
|
+
from typing_extensions import Literal
|
|
6
7
|
|
|
7
8
|
import httpx
|
|
8
9
|
|
|
9
|
-
from ..types import fleet_create_params
|
|
10
|
+
from ..types import fleet_create_params, fleet_sessions_params
|
|
10
11
|
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
11
12
|
from .._utils import (
|
|
12
13
|
maybe_transform,
|
|
@@ -24,6 +25,7 @@ from .._base_client import make_request_options
|
|
|
24
25
|
from ..types.fleet_logs_response import FleetLogsResponse
|
|
25
26
|
from ..types.fleet_create_response import FleetCreateResponse
|
|
26
27
|
from ..types.fleet_status_response import FleetStatusResponse
|
|
28
|
+
from ..types.fleet_sessions_response import FleetSessionsResponse
|
|
27
29
|
from ..types.fleet_terminate_response import FleetTerminateResponse
|
|
28
30
|
|
|
29
31
|
__all__ = ["FleetResource", "AsyncFleetResource"]
|
|
@@ -53,8 +55,7 @@ class FleetResource(SyncAPIResource):
|
|
|
53
55
|
self,
|
|
54
56
|
*,
|
|
55
57
|
advanced: Optional[fleet_create_params.Advanced] | NotGiven = NOT_GIVEN,
|
|
56
|
-
|
|
57
|
-
browser_type: Optional[str] | NotGiven = NOT_GIVEN,
|
|
58
|
+
browser_type: Optional[Literal["chromium", "firefox", "webkit"]] | NotGiven = NOT_GIVEN,
|
|
58
59
|
headless: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
59
60
|
raccoon_passcode: Optional[str] | NotGiven = NOT_GIVEN,
|
|
60
61
|
session_timeout: Optional[int] | NotGiven = NOT_GIVEN,
|
|
@@ -74,9 +75,6 @@ class FleetResource(SyncAPIResource):
|
|
|
74
75
|
advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
|
|
75
76
|
solving.
|
|
76
77
|
|
|
77
|
-
app_name: The name of the app for which the session is going to run for, used for
|
|
78
|
-
streamlining authentication.
|
|
79
|
-
|
|
80
78
|
browser_type: The type of browser to use. Supported values include 'chromium', 'firefox', and
|
|
81
79
|
'webkit'.
|
|
82
80
|
|
|
@@ -105,7 +103,6 @@ class FleetResource(SyncAPIResource):
|
|
|
105
103
|
body=maybe_transform(
|
|
106
104
|
{
|
|
107
105
|
"advanced": advanced,
|
|
108
|
-
"app_name": app_name,
|
|
109
106
|
"browser_type": browser_type,
|
|
110
107
|
"headless": headless,
|
|
111
108
|
"raccoon_passcode": raccoon_passcode,
|
|
@@ -154,6 +151,85 @@ class FleetResource(SyncAPIResource):
|
|
|
154
151
|
cast_to=FleetLogsResponse,
|
|
155
152
|
)
|
|
156
153
|
|
|
154
|
+
def sessions(
|
|
155
|
+
self,
|
|
156
|
+
*,
|
|
157
|
+
end_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
158
|
+
execution_type: Optional[List[Literal["run", "extract", "fleet"]]] | NotGiven = NOT_GIVEN,
|
|
159
|
+
limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
160
|
+
page: Optional[int] | NotGiven = NOT_GIVEN,
|
|
161
|
+
raccoon_passcode: Optional[str] | NotGiven = NOT_GIVEN,
|
|
162
|
+
session_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
163
|
+
sort_by: Optional[Literal["timestamp", "executionTime", "taskId", "status", "executionType"]]
|
|
164
|
+
| NotGiven = NOT_GIVEN,
|
|
165
|
+
sort_order: Optional[Literal["ascend", "descend"]] | NotGiven = NOT_GIVEN,
|
|
166
|
+
start_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
167
|
+
task_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
168
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
169
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
170
|
+
extra_headers: Headers | None = None,
|
|
171
|
+
extra_query: Query | None = None,
|
|
172
|
+
extra_body: Body | None = None,
|
|
173
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
174
|
+
) -> FleetSessionsResponse:
|
|
175
|
+
"""
|
|
176
|
+
Get Sessions Endpoint
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
end_time: Filter sessions created before this Unix timestamp (in milliseconds).
|
|
180
|
+
|
|
181
|
+
execution_type: Filter sessions by execution type (e.g., 'run', 'extract').
|
|
182
|
+
|
|
183
|
+
limit: Number of sessions per page (maximum 100).
|
|
184
|
+
|
|
185
|
+
page: Page number for pagination.
|
|
186
|
+
|
|
187
|
+
raccoon_passcode: Filter sessions by Raccoon passcode.
|
|
188
|
+
|
|
189
|
+
session_id: Filter sessions by a specific session ID.
|
|
190
|
+
|
|
191
|
+
sort_by: Field to sort sessions by (e.g., 'timestamp', 'executionTime').
|
|
192
|
+
|
|
193
|
+
sort_order: Sort order ('ascend' or 'descend').
|
|
194
|
+
|
|
195
|
+
start_time: Filter sessions created after this Unix timestamp (in milliseconds).
|
|
196
|
+
|
|
197
|
+
task_id: Filter sessions by a specific task ID.
|
|
198
|
+
|
|
199
|
+
extra_headers: Send extra headers
|
|
200
|
+
|
|
201
|
+
extra_query: Add additional query parameters to the request
|
|
202
|
+
|
|
203
|
+
extra_body: Add additional JSON properties to the request
|
|
204
|
+
|
|
205
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
206
|
+
"""
|
|
207
|
+
return self._get(
|
|
208
|
+
"/sessions",
|
|
209
|
+
options=make_request_options(
|
|
210
|
+
extra_headers=extra_headers,
|
|
211
|
+
extra_query=extra_query,
|
|
212
|
+
extra_body=extra_body,
|
|
213
|
+
timeout=timeout,
|
|
214
|
+
query=maybe_transform(
|
|
215
|
+
{
|
|
216
|
+
"end_time": end_time,
|
|
217
|
+
"execution_type": execution_type,
|
|
218
|
+
"limit": limit,
|
|
219
|
+
"page": page,
|
|
220
|
+
"raccoon_passcode": raccoon_passcode,
|
|
221
|
+
"session_id": session_id,
|
|
222
|
+
"sort_by": sort_by,
|
|
223
|
+
"sort_order": sort_order,
|
|
224
|
+
"start_time": start_time,
|
|
225
|
+
"task_id": task_id,
|
|
226
|
+
},
|
|
227
|
+
fleet_sessions_params.FleetSessionsParams,
|
|
228
|
+
),
|
|
229
|
+
),
|
|
230
|
+
cast_to=FleetSessionsResponse,
|
|
231
|
+
)
|
|
232
|
+
|
|
157
233
|
def status(
|
|
158
234
|
self,
|
|
159
235
|
session_id: str,
|
|
@@ -245,8 +321,7 @@ class AsyncFleetResource(AsyncAPIResource):
|
|
|
245
321
|
self,
|
|
246
322
|
*,
|
|
247
323
|
advanced: Optional[fleet_create_params.Advanced] | NotGiven = NOT_GIVEN,
|
|
248
|
-
|
|
249
|
-
browser_type: Optional[str] | NotGiven = NOT_GIVEN,
|
|
324
|
+
browser_type: Optional[Literal["chromium", "firefox", "webkit"]] | NotGiven = NOT_GIVEN,
|
|
250
325
|
headless: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
251
326
|
raccoon_passcode: Optional[str] | NotGiven = NOT_GIVEN,
|
|
252
327
|
session_timeout: Optional[int] | NotGiven = NOT_GIVEN,
|
|
@@ -266,9 +341,6 @@ class AsyncFleetResource(AsyncAPIResource):
|
|
|
266
341
|
advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
|
|
267
342
|
solving.
|
|
268
343
|
|
|
269
|
-
app_name: The name of the app for which the session is going to run for, used for
|
|
270
|
-
streamlining authentication.
|
|
271
|
-
|
|
272
344
|
browser_type: The type of browser to use. Supported values include 'chromium', 'firefox', and
|
|
273
345
|
'webkit'.
|
|
274
346
|
|
|
@@ -297,7 +369,6 @@ class AsyncFleetResource(AsyncAPIResource):
|
|
|
297
369
|
body=await async_maybe_transform(
|
|
298
370
|
{
|
|
299
371
|
"advanced": advanced,
|
|
300
|
-
"app_name": app_name,
|
|
301
372
|
"browser_type": browser_type,
|
|
302
373
|
"headless": headless,
|
|
303
374
|
"raccoon_passcode": raccoon_passcode,
|
|
@@ -346,6 +417,85 @@ class AsyncFleetResource(AsyncAPIResource):
|
|
|
346
417
|
cast_to=FleetLogsResponse,
|
|
347
418
|
)
|
|
348
419
|
|
|
420
|
+
async def sessions(
|
|
421
|
+
self,
|
|
422
|
+
*,
|
|
423
|
+
end_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
424
|
+
execution_type: Optional[List[Literal["run", "extract", "fleet"]]] | NotGiven = NOT_GIVEN,
|
|
425
|
+
limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
426
|
+
page: Optional[int] | NotGiven = NOT_GIVEN,
|
|
427
|
+
raccoon_passcode: Optional[str] | NotGiven = NOT_GIVEN,
|
|
428
|
+
session_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
429
|
+
sort_by: Optional[Literal["timestamp", "executionTime", "taskId", "status", "executionType"]]
|
|
430
|
+
| NotGiven = NOT_GIVEN,
|
|
431
|
+
sort_order: Optional[Literal["ascend", "descend"]] | NotGiven = NOT_GIVEN,
|
|
432
|
+
start_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
433
|
+
task_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
434
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
435
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
436
|
+
extra_headers: Headers | None = None,
|
|
437
|
+
extra_query: Query | None = None,
|
|
438
|
+
extra_body: Body | None = None,
|
|
439
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
440
|
+
) -> FleetSessionsResponse:
|
|
441
|
+
"""
|
|
442
|
+
Get Sessions Endpoint
|
|
443
|
+
|
|
444
|
+
Args:
|
|
445
|
+
end_time: Filter sessions created before this Unix timestamp (in milliseconds).
|
|
446
|
+
|
|
447
|
+
execution_type: Filter sessions by execution type (e.g., 'run', 'extract').
|
|
448
|
+
|
|
449
|
+
limit: Number of sessions per page (maximum 100).
|
|
450
|
+
|
|
451
|
+
page: Page number for pagination.
|
|
452
|
+
|
|
453
|
+
raccoon_passcode: Filter sessions by Raccoon passcode.
|
|
454
|
+
|
|
455
|
+
session_id: Filter sessions by a specific session ID.
|
|
456
|
+
|
|
457
|
+
sort_by: Field to sort sessions by (e.g., 'timestamp', 'executionTime').
|
|
458
|
+
|
|
459
|
+
sort_order: Sort order ('ascend' or 'descend').
|
|
460
|
+
|
|
461
|
+
start_time: Filter sessions created after this Unix timestamp (in milliseconds).
|
|
462
|
+
|
|
463
|
+
task_id: Filter sessions by a specific task ID.
|
|
464
|
+
|
|
465
|
+
extra_headers: Send extra headers
|
|
466
|
+
|
|
467
|
+
extra_query: Add additional query parameters to the request
|
|
468
|
+
|
|
469
|
+
extra_body: Add additional JSON properties to the request
|
|
470
|
+
|
|
471
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
472
|
+
"""
|
|
473
|
+
return await self._get(
|
|
474
|
+
"/sessions",
|
|
475
|
+
options=make_request_options(
|
|
476
|
+
extra_headers=extra_headers,
|
|
477
|
+
extra_query=extra_query,
|
|
478
|
+
extra_body=extra_body,
|
|
479
|
+
timeout=timeout,
|
|
480
|
+
query=await async_maybe_transform(
|
|
481
|
+
{
|
|
482
|
+
"end_time": end_time,
|
|
483
|
+
"execution_type": execution_type,
|
|
484
|
+
"limit": limit,
|
|
485
|
+
"page": page,
|
|
486
|
+
"raccoon_passcode": raccoon_passcode,
|
|
487
|
+
"session_id": session_id,
|
|
488
|
+
"sort_by": sort_by,
|
|
489
|
+
"sort_order": sort_order,
|
|
490
|
+
"start_time": start_time,
|
|
491
|
+
"task_id": task_id,
|
|
492
|
+
},
|
|
493
|
+
fleet_sessions_params.FleetSessionsParams,
|
|
494
|
+
),
|
|
495
|
+
),
|
|
496
|
+
cast_to=FleetSessionsResponse,
|
|
497
|
+
)
|
|
498
|
+
|
|
349
499
|
async def status(
|
|
350
500
|
self,
|
|
351
501
|
session_id: str,
|
|
@@ -423,6 +573,9 @@ class FleetResourceWithRawResponse:
|
|
|
423
573
|
self.logs = to_raw_response_wrapper(
|
|
424
574
|
fleet.logs,
|
|
425
575
|
)
|
|
576
|
+
self.sessions = to_raw_response_wrapper(
|
|
577
|
+
fleet.sessions,
|
|
578
|
+
)
|
|
426
579
|
self.status = to_raw_response_wrapper(
|
|
427
580
|
fleet.status,
|
|
428
581
|
)
|
|
@@ -441,6 +594,9 @@ class AsyncFleetResourceWithRawResponse:
|
|
|
441
594
|
self.logs = async_to_raw_response_wrapper(
|
|
442
595
|
fleet.logs,
|
|
443
596
|
)
|
|
597
|
+
self.sessions = async_to_raw_response_wrapper(
|
|
598
|
+
fleet.sessions,
|
|
599
|
+
)
|
|
444
600
|
self.status = async_to_raw_response_wrapper(
|
|
445
601
|
fleet.status,
|
|
446
602
|
)
|
|
@@ -459,6 +615,9 @@ class FleetResourceWithStreamingResponse:
|
|
|
459
615
|
self.logs = to_streamed_response_wrapper(
|
|
460
616
|
fleet.logs,
|
|
461
617
|
)
|
|
618
|
+
self.sessions = to_streamed_response_wrapper(
|
|
619
|
+
fleet.sessions,
|
|
620
|
+
)
|
|
462
621
|
self.status = to_streamed_response_wrapper(
|
|
463
622
|
fleet.status,
|
|
464
623
|
)
|
|
@@ -477,6 +636,9 @@ class AsyncFleetResourceWithStreamingResponse:
|
|
|
477
636
|
self.logs = async_to_streamed_response_wrapper(
|
|
478
637
|
fleet.logs,
|
|
479
638
|
)
|
|
639
|
+
self.sessions = async_to_streamed_response_wrapper(
|
|
640
|
+
fleet.sessions,
|
|
641
|
+
)
|
|
480
642
|
self.status = async_to_streamed_response_wrapper(
|
|
481
643
|
fleet.status,
|
|
482
644
|
)
|