raccoonai 0.1.0a9__py3-none-any.whl → 0.1.0a10__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/_client.py +2 -9
- raccoonai/_version.py +1 -1
- raccoonai/resources/__init__.py +0 -14
- raccoonai/resources/fleet/__init__.py +47 -0
- raccoonai/resources/{extensions.py → fleet/extensions.py} +10 -10
- raccoonai/resources/fleet/fleet.py +134 -0
- raccoonai/resources/{fleet.py → fleet/sessions.py} +234 -151
- raccoonai/resources/lam/__init__.py +33 -0
- raccoonai/resources/{lam.py → lam/lam.py} +42 -173
- raccoonai/resources/lam/tasks.py +338 -0
- raccoonai/resources/tail/__init__.py +14 -14
- raccoonai/resources/tail/tail.py +27 -166
- raccoonai/resources/tail/users.py +405 -0
- raccoonai/types/__init__.py +0 -15
- raccoonai/types/fleet/__init__.py +16 -0
- raccoonai/types/{extension_all_response.py → fleet/extension_all_response.py} +1 -1
- raccoonai/types/{extension_get_response.py → fleet/extension_get_response.py} +1 -1
- raccoonai/types/{extension_upload_params.py → fleet/extension_upload_params.py} +1 -1
- raccoonai/types/{extension_upload_response.py → fleet/extension_upload_response.py} +1 -1
- raccoonai/types/{fleet_sessions_params.py → fleet/session_all_params.py} +3 -3
- raccoonai/types/{fleet_sessions_response.py → fleet/session_all_response.py} +3 -3
- raccoonai/types/{fleet_create_params.py → fleet/session_create_params.py} +2 -2
- raccoonai/types/{fleet_create_response.py → fleet/session_create_response.py} +3 -3
- raccoonai/types/{fleet_logs_response.py → fleet/session_logs_response.py} +3 -3
- raccoonai/types/fleet/session_media_response.py +42 -0
- raccoonai/types/{fleet_status_response.py → fleet/session_status_response.py} +3 -3
- raccoonai/types/{fleet_terminate_response.py → fleet/session_terminate_response.py} +3 -3
- raccoonai/types/lam/__init__.py +7 -0
- raccoonai/types/{lam_tasks_params.py → lam/task_all_params.py} +3 -3
- raccoonai/types/{lam_tasks_response.py → lam/task_all_response.py} +3 -3
- raccoonai/types/lam/task_media_response.py +50 -0
- raccoonai/types/tail/__init__.py +6 -2
- raccoonai/types/{tail_users_params.py → tail/user_all_params.py} +3 -3
- raccoonai/types/{tail_users_response.py → tail/user_all_response.py} +3 -3
- raccoonai/types/tail/user_create_params.py +15 -0
- raccoonai/types/tail/user_create_response.py +22 -0
- raccoonai/types/tail/{auth_status_params.py → user_status_params.py} +2 -2
- raccoonai/types/tail/{auth_status_response.py → user_status_response.py} +2 -2
- {raccoonai-0.1.0a9.dist-info → raccoonai-0.1.0a10.dist-info}/METADATA +2 -2
- raccoonai-0.1.0a10.dist-info/RECORD +71 -0
- raccoonai/resources/tail/auth.py +0 -186
- raccoonai-0.1.0a9.dist-info/RECORD +0 -61
- {raccoonai-0.1.0a9.dist-info → raccoonai-0.1.0a10.dist-info}/WHEEL +0 -0
- {raccoonai-0.1.0a9.dist-info → raccoonai-0.1.0a10.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,35 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Iterable, Optional
|
|
6
6
|
from typing_extensions import Literal, overload
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
from .tasks import (
|
|
11
|
+
TasksResource,
|
|
12
|
+
AsyncTasksResource,
|
|
13
|
+
TasksResourceWithRawResponse,
|
|
14
|
+
AsyncTasksResourceWithRawResponse,
|
|
15
|
+
TasksResourceWithStreamingResponse,
|
|
16
|
+
AsyncTasksResourceWithStreamingResponse,
|
|
17
|
+
)
|
|
18
|
+
from ...types import lam_run_params
|
|
19
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
20
|
+
from ..._utils import (
|
|
13
21
|
required_args,
|
|
14
22
|
maybe_transform,
|
|
15
23
|
async_maybe_transform,
|
|
16
24
|
)
|
|
17
|
-
from
|
|
18
|
-
from
|
|
19
|
-
from
|
|
25
|
+
from ..._compat import cached_property
|
|
26
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
27
|
+
from ..._response import (
|
|
20
28
|
to_raw_response_wrapper,
|
|
21
29
|
to_streamed_response_wrapper,
|
|
22
30
|
async_to_raw_response_wrapper,
|
|
23
31
|
async_to_streamed_response_wrapper,
|
|
24
32
|
)
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from ..types.lam_tasks_response import LamTasksResponse
|
|
33
|
+
from ..._streaming import Stream, AsyncStream
|
|
34
|
+
from ..._base_client import make_request_options
|
|
35
|
+
from ...types.lam_run_response import LamRunResponse
|
|
29
36
|
|
|
30
37
|
__all__ = ["LamResource", "AsyncLamResource"]
|
|
31
38
|
|
|
32
39
|
|
|
33
40
|
class LamResource(SyncAPIResource):
|
|
41
|
+
@cached_property
|
|
42
|
+
def tasks(self) -> TasksResource:
|
|
43
|
+
return TasksResource(self._client)
|
|
44
|
+
|
|
34
45
|
@cached_property
|
|
35
46
|
def with_raw_response(self) -> LamResourceWithRawResponse:
|
|
36
47
|
"""
|
|
@@ -265,83 +276,12 @@ class LamResource(SyncAPIResource):
|
|
|
265
276
|
stream_cls=Stream[LamRunResponse],
|
|
266
277
|
)
|
|
267
278
|
|
|
268
|
-
def tasks(
|
|
269
|
-
self,
|
|
270
|
-
*,
|
|
271
|
-
end_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
272
|
-
execution_type: Optional[List[Literal["run", "extract", "fleet"]]] | NotGiven = NOT_GIVEN,
|
|
273
|
-
limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
274
|
-
page: Optional[int] | NotGiven = NOT_GIVEN,
|
|
275
|
-
raccoon_passcode: Optional[str] | NotGiven = NOT_GIVEN,
|
|
276
|
-
sort_by: Optional[Literal["timestamp", "executionTime", "taskId", "status", "executionType"]]
|
|
277
|
-
| NotGiven = NOT_GIVEN,
|
|
278
|
-
sort_order: Optional[Literal["ascend", "descend"]] | NotGiven = NOT_GIVEN,
|
|
279
|
-
start_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
280
|
-
task_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
281
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
282
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
283
|
-
extra_headers: Headers | None = None,
|
|
284
|
-
extra_query: Query | None = None,
|
|
285
|
-
extra_body: Body | None = None,
|
|
286
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
287
|
-
) -> LamTasksResponse:
|
|
288
|
-
"""
|
|
289
|
-
Get Tasks Endpoint
|
|
290
|
-
|
|
291
|
-
Args:
|
|
292
|
-
end_time: Filter tasks created before this Unix timestamp (in milliseconds).
|
|
293
|
-
|
|
294
|
-
execution_type: Filter tasks by execution type (e.g., 'run', 'extract').
|
|
295
|
-
|
|
296
|
-
limit: Number of tasks per page (maximum 100).
|
|
297
|
-
|
|
298
|
-
page: Page number for pagination.
|
|
299
|
-
|
|
300
|
-
raccoon_passcode: Filter tasks by Raccoon passcode.
|
|
301
|
-
|
|
302
|
-
sort_by: Field to sort tasks by (e.g., 'timestamp', 'executionTime').
|
|
303
|
-
|
|
304
|
-
sort_order: Sort order ('ascend' or 'descend').
|
|
305
|
-
|
|
306
|
-
start_time: Filter tasks created after this Unix timestamp (in milliseconds).
|
|
307
|
-
|
|
308
|
-
task_id: Filter tasks by a specific task ID.
|
|
309
|
-
|
|
310
|
-
extra_headers: Send extra headers
|
|
311
|
-
|
|
312
|
-
extra_query: Add additional query parameters to the request
|
|
313
|
-
|
|
314
|
-
extra_body: Add additional JSON properties to the request
|
|
315
|
-
|
|
316
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
317
|
-
"""
|
|
318
|
-
return self._get(
|
|
319
|
-
"/lam/tasks",
|
|
320
|
-
options=make_request_options(
|
|
321
|
-
extra_headers=extra_headers,
|
|
322
|
-
extra_query=extra_query,
|
|
323
|
-
extra_body=extra_body,
|
|
324
|
-
timeout=timeout,
|
|
325
|
-
query=maybe_transform(
|
|
326
|
-
{
|
|
327
|
-
"end_time": end_time,
|
|
328
|
-
"execution_type": execution_type,
|
|
329
|
-
"limit": limit,
|
|
330
|
-
"page": page,
|
|
331
|
-
"raccoon_passcode": raccoon_passcode,
|
|
332
|
-
"sort_by": sort_by,
|
|
333
|
-
"sort_order": sort_order,
|
|
334
|
-
"start_time": start_time,
|
|
335
|
-
"task_id": task_id,
|
|
336
|
-
},
|
|
337
|
-
lam_tasks_params.LamTasksParams,
|
|
338
|
-
),
|
|
339
|
-
),
|
|
340
|
-
cast_to=LamTasksResponse,
|
|
341
|
-
)
|
|
342
|
-
|
|
343
279
|
|
|
344
280
|
class AsyncLamResource(AsyncAPIResource):
|
|
281
|
+
@cached_property
|
|
282
|
+
def tasks(self) -> AsyncTasksResource:
|
|
283
|
+
return AsyncTasksResource(self._client)
|
|
284
|
+
|
|
345
285
|
@cached_property
|
|
346
286
|
def with_raw_response(self) -> AsyncLamResourceWithRawResponse:
|
|
347
287
|
"""
|
|
@@ -576,81 +516,6 @@ class AsyncLamResource(AsyncAPIResource):
|
|
|
576
516
|
stream_cls=AsyncStream[LamRunResponse],
|
|
577
517
|
)
|
|
578
518
|
|
|
579
|
-
async def tasks(
|
|
580
|
-
self,
|
|
581
|
-
*,
|
|
582
|
-
end_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
583
|
-
execution_type: Optional[List[Literal["run", "extract", "fleet"]]] | NotGiven = NOT_GIVEN,
|
|
584
|
-
limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
585
|
-
page: Optional[int] | NotGiven = NOT_GIVEN,
|
|
586
|
-
raccoon_passcode: Optional[str] | NotGiven = NOT_GIVEN,
|
|
587
|
-
sort_by: Optional[Literal["timestamp", "executionTime", "taskId", "status", "executionType"]]
|
|
588
|
-
| NotGiven = NOT_GIVEN,
|
|
589
|
-
sort_order: Optional[Literal["ascend", "descend"]] | NotGiven = NOT_GIVEN,
|
|
590
|
-
start_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
591
|
-
task_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
592
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
593
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
594
|
-
extra_headers: Headers | None = None,
|
|
595
|
-
extra_query: Query | None = None,
|
|
596
|
-
extra_body: Body | None = None,
|
|
597
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
598
|
-
) -> LamTasksResponse:
|
|
599
|
-
"""
|
|
600
|
-
Get Tasks Endpoint
|
|
601
|
-
|
|
602
|
-
Args:
|
|
603
|
-
end_time: Filter tasks created before this Unix timestamp (in milliseconds).
|
|
604
|
-
|
|
605
|
-
execution_type: Filter tasks by execution type (e.g., 'run', 'extract').
|
|
606
|
-
|
|
607
|
-
limit: Number of tasks per page (maximum 100).
|
|
608
|
-
|
|
609
|
-
page: Page number for pagination.
|
|
610
|
-
|
|
611
|
-
raccoon_passcode: Filter tasks by Raccoon passcode.
|
|
612
|
-
|
|
613
|
-
sort_by: Field to sort tasks by (e.g., 'timestamp', 'executionTime').
|
|
614
|
-
|
|
615
|
-
sort_order: Sort order ('ascend' or 'descend').
|
|
616
|
-
|
|
617
|
-
start_time: Filter tasks created after this Unix timestamp (in milliseconds).
|
|
618
|
-
|
|
619
|
-
task_id: Filter tasks by a specific task ID.
|
|
620
|
-
|
|
621
|
-
extra_headers: Send extra headers
|
|
622
|
-
|
|
623
|
-
extra_query: Add additional query parameters to the request
|
|
624
|
-
|
|
625
|
-
extra_body: Add additional JSON properties to the request
|
|
626
|
-
|
|
627
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
628
|
-
"""
|
|
629
|
-
return await self._get(
|
|
630
|
-
"/lam/tasks",
|
|
631
|
-
options=make_request_options(
|
|
632
|
-
extra_headers=extra_headers,
|
|
633
|
-
extra_query=extra_query,
|
|
634
|
-
extra_body=extra_body,
|
|
635
|
-
timeout=timeout,
|
|
636
|
-
query=await async_maybe_transform(
|
|
637
|
-
{
|
|
638
|
-
"end_time": end_time,
|
|
639
|
-
"execution_type": execution_type,
|
|
640
|
-
"limit": limit,
|
|
641
|
-
"page": page,
|
|
642
|
-
"raccoon_passcode": raccoon_passcode,
|
|
643
|
-
"sort_by": sort_by,
|
|
644
|
-
"sort_order": sort_order,
|
|
645
|
-
"start_time": start_time,
|
|
646
|
-
"task_id": task_id,
|
|
647
|
-
},
|
|
648
|
-
lam_tasks_params.LamTasksParams,
|
|
649
|
-
),
|
|
650
|
-
),
|
|
651
|
-
cast_to=LamTasksResponse,
|
|
652
|
-
)
|
|
653
|
-
|
|
654
519
|
|
|
655
520
|
class LamResourceWithRawResponse:
|
|
656
521
|
def __init__(self, lam: LamResource) -> None:
|
|
@@ -659,9 +524,10 @@ class LamResourceWithRawResponse:
|
|
|
659
524
|
self.run = to_raw_response_wrapper(
|
|
660
525
|
lam.run,
|
|
661
526
|
)
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
527
|
+
|
|
528
|
+
@cached_property
|
|
529
|
+
def tasks(self) -> TasksResourceWithRawResponse:
|
|
530
|
+
return TasksResourceWithRawResponse(self._lam.tasks)
|
|
665
531
|
|
|
666
532
|
|
|
667
533
|
class AsyncLamResourceWithRawResponse:
|
|
@@ -671,9 +537,10 @@ class AsyncLamResourceWithRawResponse:
|
|
|
671
537
|
self.run = async_to_raw_response_wrapper(
|
|
672
538
|
lam.run,
|
|
673
539
|
)
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
540
|
+
|
|
541
|
+
@cached_property
|
|
542
|
+
def tasks(self) -> AsyncTasksResourceWithRawResponse:
|
|
543
|
+
return AsyncTasksResourceWithRawResponse(self._lam.tasks)
|
|
677
544
|
|
|
678
545
|
|
|
679
546
|
class LamResourceWithStreamingResponse:
|
|
@@ -683,9 +550,10 @@ class LamResourceWithStreamingResponse:
|
|
|
683
550
|
self.run = to_streamed_response_wrapper(
|
|
684
551
|
lam.run,
|
|
685
552
|
)
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
553
|
+
|
|
554
|
+
@cached_property
|
|
555
|
+
def tasks(self) -> TasksResourceWithStreamingResponse:
|
|
556
|
+
return TasksResourceWithStreamingResponse(self._lam.tasks)
|
|
689
557
|
|
|
690
558
|
|
|
691
559
|
class AsyncLamResourceWithStreamingResponse:
|
|
@@ -695,6 +563,7 @@ class AsyncLamResourceWithStreamingResponse:
|
|
|
695
563
|
self.run = async_to_streamed_response_wrapper(
|
|
696
564
|
lam.run,
|
|
697
565
|
)
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
566
|
+
|
|
567
|
+
@cached_property
|
|
568
|
+
def tasks(self) -> AsyncTasksResourceWithStreamingResponse:
|
|
569
|
+
return AsyncTasksResourceWithStreamingResponse(self._lam.tasks)
|
|
@@ -0,0 +1,338 @@
|
|
|
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 List, Optional
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
11
|
+
from ..._utils import (
|
|
12
|
+
maybe_transform,
|
|
13
|
+
async_maybe_transform,
|
|
14
|
+
)
|
|
15
|
+
from ..._compat import cached_property
|
|
16
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
17
|
+
from ..._response import (
|
|
18
|
+
to_raw_response_wrapper,
|
|
19
|
+
to_streamed_response_wrapper,
|
|
20
|
+
async_to_raw_response_wrapper,
|
|
21
|
+
async_to_streamed_response_wrapper,
|
|
22
|
+
)
|
|
23
|
+
from ...types.lam import task_all_params
|
|
24
|
+
from ..._base_client import make_request_options
|
|
25
|
+
from ...types.lam.task_all_response import TaskAllResponse
|
|
26
|
+
from ...types.lam.task_media_response import TaskMediaResponse
|
|
27
|
+
|
|
28
|
+
__all__ = ["TasksResource", "AsyncTasksResource"]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class TasksResource(SyncAPIResource):
|
|
32
|
+
@cached_property
|
|
33
|
+
def with_raw_response(self) -> TasksResourceWithRawResponse:
|
|
34
|
+
"""
|
|
35
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
36
|
+
the raw response object instead of the parsed content.
|
|
37
|
+
|
|
38
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
39
|
+
"""
|
|
40
|
+
return TasksResourceWithRawResponse(self)
|
|
41
|
+
|
|
42
|
+
@cached_property
|
|
43
|
+
def with_streaming_response(self) -> TasksResourceWithStreamingResponse:
|
|
44
|
+
"""
|
|
45
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
46
|
+
|
|
47
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
48
|
+
"""
|
|
49
|
+
return TasksResourceWithStreamingResponse(self)
|
|
50
|
+
|
|
51
|
+
def all(
|
|
52
|
+
self,
|
|
53
|
+
*,
|
|
54
|
+
end_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
55
|
+
execution_type: Optional[List[Literal["run", "extract", "fleet"]]] | NotGiven = NOT_GIVEN,
|
|
56
|
+
limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
57
|
+
page: Optional[int] | NotGiven = NOT_GIVEN,
|
|
58
|
+
raccoon_passcode: Optional[str] | NotGiven = NOT_GIVEN,
|
|
59
|
+
sort_by: Optional[Literal["timestamp", "executionTime", "taskId", "status", "executionType"]]
|
|
60
|
+
| NotGiven = NOT_GIVEN,
|
|
61
|
+
sort_order: Optional[Literal["ascend", "descend"]] | NotGiven = NOT_GIVEN,
|
|
62
|
+
start_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
63
|
+
task_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
64
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
65
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
66
|
+
extra_headers: Headers | None = None,
|
|
67
|
+
extra_query: Query | None = None,
|
|
68
|
+
extra_body: Body | None = None,
|
|
69
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
70
|
+
) -> TaskAllResponse:
|
|
71
|
+
"""
|
|
72
|
+
Get Tasks Endpoint
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
end_time: Filter tasks created before this Unix timestamp (in milliseconds).
|
|
76
|
+
|
|
77
|
+
execution_type: Filter tasks by execution type (e.g., 'run', 'extract').
|
|
78
|
+
|
|
79
|
+
limit: Number of tasks per page (maximum 100).
|
|
80
|
+
|
|
81
|
+
page: Page number for pagination.
|
|
82
|
+
|
|
83
|
+
raccoon_passcode: Filter tasks by Raccoon passcode.
|
|
84
|
+
|
|
85
|
+
sort_by: Field to sort tasks by (e.g., 'timestamp', 'executionTime').
|
|
86
|
+
|
|
87
|
+
sort_order: Sort order ('ascend' or 'descend').
|
|
88
|
+
|
|
89
|
+
start_time: Filter tasks created after this Unix timestamp (in milliseconds).
|
|
90
|
+
|
|
91
|
+
task_id: Filter tasks by a specific task ID.
|
|
92
|
+
|
|
93
|
+
extra_headers: Send extra headers
|
|
94
|
+
|
|
95
|
+
extra_query: Add additional query parameters to the request
|
|
96
|
+
|
|
97
|
+
extra_body: Add additional JSON properties to the request
|
|
98
|
+
|
|
99
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
100
|
+
"""
|
|
101
|
+
return self._get(
|
|
102
|
+
"/lam/tasks",
|
|
103
|
+
options=make_request_options(
|
|
104
|
+
extra_headers=extra_headers,
|
|
105
|
+
extra_query=extra_query,
|
|
106
|
+
extra_body=extra_body,
|
|
107
|
+
timeout=timeout,
|
|
108
|
+
query=maybe_transform(
|
|
109
|
+
{
|
|
110
|
+
"end_time": end_time,
|
|
111
|
+
"execution_type": execution_type,
|
|
112
|
+
"limit": limit,
|
|
113
|
+
"page": page,
|
|
114
|
+
"raccoon_passcode": raccoon_passcode,
|
|
115
|
+
"sort_by": sort_by,
|
|
116
|
+
"sort_order": sort_order,
|
|
117
|
+
"start_time": start_time,
|
|
118
|
+
"task_id": task_id,
|
|
119
|
+
},
|
|
120
|
+
task_all_params.TaskAllParams,
|
|
121
|
+
),
|
|
122
|
+
),
|
|
123
|
+
cast_to=TaskAllResponse,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
def media(
|
|
127
|
+
self,
|
|
128
|
+
task_id: str,
|
|
129
|
+
*,
|
|
130
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
131
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
132
|
+
extra_headers: Headers | None = None,
|
|
133
|
+
extra_query: Query | None = None,
|
|
134
|
+
extra_body: Body | None = None,
|
|
135
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
136
|
+
) -> TaskMediaResponse:
|
|
137
|
+
"""
|
|
138
|
+
Get Task Media Endpoint
|
|
139
|
+
|
|
140
|
+
Args:
|
|
141
|
+
task_id: The ID of the task
|
|
142
|
+
|
|
143
|
+
extra_headers: Send extra headers
|
|
144
|
+
|
|
145
|
+
extra_query: Add additional query parameters to the request
|
|
146
|
+
|
|
147
|
+
extra_body: Add additional JSON properties to the request
|
|
148
|
+
|
|
149
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
150
|
+
"""
|
|
151
|
+
if not task_id:
|
|
152
|
+
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
153
|
+
return self._get(
|
|
154
|
+
f"/lam/tasks/{task_id}/media",
|
|
155
|
+
options=make_request_options(
|
|
156
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
157
|
+
),
|
|
158
|
+
cast_to=TaskMediaResponse,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class AsyncTasksResource(AsyncAPIResource):
|
|
163
|
+
@cached_property
|
|
164
|
+
def with_raw_response(self) -> AsyncTasksResourceWithRawResponse:
|
|
165
|
+
"""
|
|
166
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
167
|
+
the raw response object instead of the parsed content.
|
|
168
|
+
|
|
169
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
170
|
+
"""
|
|
171
|
+
return AsyncTasksResourceWithRawResponse(self)
|
|
172
|
+
|
|
173
|
+
@cached_property
|
|
174
|
+
def with_streaming_response(self) -> AsyncTasksResourceWithStreamingResponse:
|
|
175
|
+
"""
|
|
176
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
177
|
+
|
|
178
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
179
|
+
"""
|
|
180
|
+
return AsyncTasksResourceWithStreamingResponse(self)
|
|
181
|
+
|
|
182
|
+
async def all(
|
|
183
|
+
self,
|
|
184
|
+
*,
|
|
185
|
+
end_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
186
|
+
execution_type: Optional[List[Literal["run", "extract", "fleet"]]] | NotGiven = NOT_GIVEN,
|
|
187
|
+
limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
188
|
+
page: Optional[int] | NotGiven = NOT_GIVEN,
|
|
189
|
+
raccoon_passcode: Optional[str] | NotGiven = NOT_GIVEN,
|
|
190
|
+
sort_by: Optional[Literal["timestamp", "executionTime", "taskId", "status", "executionType"]]
|
|
191
|
+
| NotGiven = NOT_GIVEN,
|
|
192
|
+
sort_order: Optional[Literal["ascend", "descend"]] | NotGiven = NOT_GIVEN,
|
|
193
|
+
start_time: Optional[int] | NotGiven = NOT_GIVEN,
|
|
194
|
+
task_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
195
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
196
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
197
|
+
extra_headers: Headers | None = None,
|
|
198
|
+
extra_query: Query | None = None,
|
|
199
|
+
extra_body: Body | None = None,
|
|
200
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
201
|
+
) -> TaskAllResponse:
|
|
202
|
+
"""
|
|
203
|
+
Get Tasks Endpoint
|
|
204
|
+
|
|
205
|
+
Args:
|
|
206
|
+
end_time: Filter tasks created before this Unix timestamp (in milliseconds).
|
|
207
|
+
|
|
208
|
+
execution_type: Filter tasks by execution type (e.g., 'run', 'extract').
|
|
209
|
+
|
|
210
|
+
limit: Number of tasks per page (maximum 100).
|
|
211
|
+
|
|
212
|
+
page: Page number for pagination.
|
|
213
|
+
|
|
214
|
+
raccoon_passcode: Filter tasks by Raccoon passcode.
|
|
215
|
+
|
|
216
|
+
sort_by: Field to sort tasks by (e.g., 'timestamp', 'executionTime').
|
|
217
|
+
|
|
218
|
+
sort_order: Sort order ('ascend' or 'descend').
|
|
219
|
+
|
|
220
|
+
start_time: Filter tasks created after this Unix timestamp (in milliseconds).
|
|
221
|
+
|
|
222
|
+
task_id: Filter tasks by a specific task ID.
|
|
223
|
+
|
|
224
|
+
extra_headers: Send extra headers
|
|
225
|
+
|
|
226
|
+
extra_query: Add additional query parameters to the request
|
|
227
|
+
|
|
228
|
+
extra_body: Add additional JSON properties to the request
|
|
229
|
+
|
|
230
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
231
|
+
"""
|
|
232
|
+
return await self._get(
|
|
233
|
+
"/lam/tasks",
|
|
234
|
+
options=make_request_options(
|
|
235
|
+
extra_headers=extra_headers,
|
|
236
|
+
extra_query=extra_query,
|
|
237
|
+
extra_body=extra_body,
|
|
238
|
+
timeout=timeout,
|
|
239
|
+
query=await async_maybe_transform(
|
|
240
|
+
{
|
|
241
|
+
"end_time": end_time,
|
|
242
|
+
"execution_type": execution_type,
|
|
243
|
+
"limit": limit,
|
|
244
|
+
"page": page,
|
|
245
|
+
"raccoon_passcode": raccoon_passcode,
|
|
246
|
+
"sort_by": sort_by,
|
|
247
|
+
"sort_order": sort_order,
|
|
248
|
+
"start_time": start_time,
|
|
249
|
+
"task_id": task_id,
|
|
250
|
+
},
|
|
251
|
+
task_all_params.TaskAllParams,
|
|
252
|
+
),
|
|
253
|
+
),
|
|
254
|
+
cast_to=TaskAllResponse,
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
async def media(
|
|
258
|
+
self,
|
|
259
|
+
task_id: str,
|
|
260
|
+
*,
|
|
261
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
262
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
263
|
+
extra_headers: Headers | None = None,
|
|
264
|
+
extra_query: Query | None = None,
|
|
265
|
+
extra_body: Body | None = None,
|
|
266
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
267
|
+
) -> TaskMediaResponse:
|
|
268
|
+
"""
|
|
269
|
+
Get Task Media Endpoint
|
|
270
|
+
|
|
271
|
+
Args:
|
|
272
|
+
task_id: The ID of the task
|
|
273
|
+
|
|
274
|
+
extra_headers: Send extra headers
|
|
275
|
+
|
|
276
|
+
extra_query: Add additional query parameters to the request
|
|
277
|
+
|
|
278
|
+
extra_body: Add additional JSON properties to the request
|
|
279
|
+
|
|
280
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
281
|
+
"""
|
|
282
|
+
if not task_id:
|
|
283
|
+
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
|
284
|
+
return await self._get(
|
|
285
|
+
f"/lam/tasks/{task_id}/media",
|
|
286
|
+
options=make_request_options(
|
|
287
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
288
|
+
),
|
|
289
|
+
cast_to=TaskMediaResponse,
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
class TasksResourceWithRawResponse:
|
|
294
|
+
def __init__(self, tasks: TasksResource) -> None:
|
|
295
|
+
self._tasks = tasks
|
|
296
|
+
|
|
297
|
+
self.all = to_raw_response_wrapper(
|
|
298
|
+
tasks.all,
|
|
299
|
+
)
|
|
300
|
+
self.media = to_raw_response_wrapper(
|
|
301
|
+
tasks.media,
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
class AsyncTasksResourceWithRawResponse:
|
|
306
|
+
def __init__(self, tasks: AsyncTasksResource) -> None:
|
|
307
|
+
self._tasks = tasks
|
|
308
|
+
|
|
309
|
+
self.all = async_to_raw_response_wrapper(
|
|
310
|
+
tasks.all,
|
|
311
|
+
)
|
|
312
|
+
self.media = async_to_raw_response_wrapper(
|
|
313
|
+
tasks.media,
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
class TasksResourceWithStreamingResponse:
|
|
318
|
+
def __init__(self, tasks: TasksResource) -> None:
|
|
319
|
+
self._tasks = tasks
|
|
320
|
+
|
|
321
|
+
self.all = to_streamed_response_wrapper(
|
|
322
|
+
tasks.all,
|
|
323
|
+
)
|
|
324
|
+
self.media = to_streamed_response_wrapper(
|
|
325
|
+
tasks.media,
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
class AsyncTasksResourceWithStreamingResponse:
|
|
330
|
+
def __init__(self, tasks: AsyncTasksResource) -> None:
|
|
331
|
+
self._tasks = tasks
|
|
332
|
+
|
|
333
|
+
self.all = async_to_streamed_response_wrapper(
|
|
334
|
+
tasks.all,
|
|
335
|
+
)
|
|
336
|
+
self.media = async_to_streamed_response_wrapper(
|
|
337
|
+
tasks.media,
|
|
338
|
+
)
|
|
@@ -8,14 +8,6 @@ from .apps import (
|
|
|
8
8
|
AppsResourceWithStreamingResponse,
|
|
9
9
|
AsyncAppsResourceWithStreamingResponse,
|
|
10
10
|
)
|
|
11
|
-
from .auth import (
|
|
12
|
-
AuthResource,
|
|
13
|
-
AsyncAuthResource,
|
|
14
|
-
AuthResourceWithRawResponse,
|
|
15
|
-
AsyncAuthResourceWithRawResponse,
|
|
16
|
-
AuthResourceWithStreamingResponse,
|
|
17
|
-
AsyncAuthResourceWithStreamingResponse,
|
|
18
|
-
)
|
|
19
11
|
from .tail import (
|
|
20
12
|
TailResource,
|
|
21
13
|
AsyncTailResource,
|
|
@@ -24,20 +16,28 @@ from .tail import (
|
|
|
24
16
|
TailResourceWithStreamingResponse,
|
|
25
17
|
AsyncTailResourceWithStreamingResponse,
|
|
26
18
|
)
|
|
19
|
+
from .users import (
|
|
20
|
+
UsersResource,
|
|
21
|
+
AsyncUsersResource,
|
|
22
|
+
UsersResourceWithRawResponse,
|
|
23
|
+
AsyncUsersResourceWithRawResponse,
|
|
24
|
+
UsersResourceWithStreamingResponse,
|
|
25
|
+
AsyncUsersResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
27
|
|
|
28
28
|
__all__ = [
|
|
29
|
+
"UsersResource",
|
|
30
|
+
"AsyncUsersResource",
|
|
31
|
+
"UsersResourceWithRawResponse",
|
|
32
|
+
"AsyncUsersResourceWithRawResponse",
|
|
33
|
+
"UsersResourceWithStreamingResponse",
|
|
34
|
+
"AsyncUsersResourceWithStreamingResponse",
|
|
29
35
|
"AppsResource",
|
|
30
36
|
"AsyncAppsResource",
|
|
31
37
|
"AppsResourceWithRawResponse",
|
|
32
38
|
"AsyncAppsResourceWithRawResponse",
|
|
33
39
|
"AppsResourceWithStreamingResponse",
|
|
34
40
|
"AsyncAppsResourceWithStreamingResponse",
|
|
35
|
-
"AuthResource",
|
|
36
|
-
"AsyncAuthResource",
|
|
37
|
-
"AuthResourceWithRawResponse",
|
|
38
|
-
"AsyncAuthResourceWithRawResponse",
|
|
39
|
-
"AuthResourceWithStreamingResponse",
|
|
40
|
-
"AsyncAuthResourceWithStreamingResponse",
|
|
41
41
|
"TailResource",
|
|
42
42
|
"AsyncTailResource",
|
|
43
43
|
"TailResourceWithRawResponse",
|