raccoonai 0.1.0a7__py3-none-any.whl → 0.1.0a9__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 +1 -96
- raccoonai/_client.py +18 -1
- 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 +173 -2
- raccoonai/resources/lam.py +151 -347
- 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 -2
- 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_sessions_params.py +42 -0
- raccoonai/types/fleet_sessions_response.py +58 -0
- 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.0a7.dist-info → raccoonai-0.1.0a9.dist-info}/METADATA +18 -1
- raccoonai-0.1.0a9.dist-info/RECORD +61 -0
- raccoonai/types/lam_integration_run_params.py +0 -78
- raccoonai/types/lam_integration_run_response.py +0 -53
- raccoonai-0.1.0a7.dist-info/RECORD +0 -42
- {raccoonai-0.1.0a7.dist-info → raccoonai-0.1.0a9.dist-info}/WHEEL +0 -0
- {raccoonai-0.1.0a7.dist-info → raccoonai-0.1.0a9.dist-info}/licenses/LICENSE +0 -0
raccoonai/resources/lam.py
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import List, Iterable, Optional
|
|
6
6
|
from typing_extensions import Literal, overload
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ..types import lam_run_params,
|
|
10
|
+
from ..types import lam_run_params, lam_tasks_params
|
|
11
11
|
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
12
12
|
from .._utils import (
|
|
13
13
|
required_args,
|
|
@@ -25,7 +25,7 @@ from .._response import (
|
|
|
25
25
|
from .._streaming import Stream, AsyncStream
|
|
26
26
|
from .._base_client import make_request_options
|
|
27
27
|
from ..types.lam_run_response import LamRunResponse
|
|
28
|
-
from ..types.
|
|
28
|
+
from ..types.lam_tasks_response import LamTasksResponse
|
|
29
29
|
|
|
30
30
|
__all__ = ["LamResource", "AsyncLamResource"]
|
|
31
31
|
|
|
@@ -50,179 +50,6 @@ class LamResource(SyncAPIResource):
|
|
|
50
50
|
"""
|
|
51
51
|
return LamResourceWithStreamingResponse(self)
|
|
52
52
|
|
|
53
|
-
@overload
|
|
54
|
-
def integration_run(
|
|
55
|
-
self,
|
|
56
|
-
app_name: str,
|
|
57
|
-
*,
|
|
58
|
-
raccoon_passcode: str,
|
|
59
|
-
advanced: Optional[lam_integration_run_params.Advanced] | NotGiven = NOT_GIVEN,
|
|
60
|
-
integration_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
61
|
-
properties: Optional[object] | NotGiven = NOT_GIVEN,
|
|
62
|
-
stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
|
|
63
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
64
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
65
|
-
extra_headers: Headers | None = None,
|
|
66
|
-
extra_query: Query | None = None,
|
|
67
|
-
extra_body: Body | None = None,
|
|
68
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
69
|
-
) -> LamIntegrationRunResponse:
|
|
70
|
-
"""
|
|
71
|
-
Lam Integrations Endpoint
|
|
72
|
-
|
|
73
|
-
Args:
|
|
74
|
-
raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
|
|
75
|
-
being made.
|
|
76
|
-
|
|
77
|
-
advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
|
|
78
|
-
solving.
|
|
79
|
-
|
|
80
|
-
integration_id: The unique identifier for the integration being called.
|
|
81
|
-
|
|
82
|
-
properties: Additional properties or data related to the particular integration.
|
|
83
|
-
|
|
84
|
-
stream: Whether the response should be streamed back or not.
|
|
85
|
-
|
|
86
|
-
extra_headers: Send extra headers
|
|
87
|
-
|
|
88
|
-
extra_query: Add additional query parameters to the request
|
|
89
|
-
|
|
90
|
-
extra_body: Add additional JSON properties to the request
|
|
91
|
-
|
|
92
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
93
|
-
"""
|
|
94
|
-
...
|
|
95
|
-
|
|
96
|
-
@overload
|
|
97
|
-
def integration_run(
|
|
98
|
-
self,
|
|
99
|
-
app_name: str,
|
|
100
|
-
*,
|
|
101
|
-
raccoon_passcode: str,
|
|
102
|
-
stream: Literal[True],
|
|
103
|
-
advanced: Optional[lam_integration_run_params.Advanced] | NotGiven = NOT_GIVEN,
|
|
104
|
-
integration_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
105
|
-
properties: Optional[object] | NotGiven = NOT_GIVEN,
|
|
106
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
107
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
108
|
-
extra_headers: Headers | None = None,
|
|
109
|
-
extra_query: Query | None = None,
|
|
110
|
-
extra_body: Body | None = None,
|
|
111
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
112
|
-
) -> Stream[LamIntegrationRunResponse]:
|
|
113
|
-
"""
|
|
114
|
-
Lam Integrations Endpoint
|
|
115
|
-
|
|
116
|
-
Args:
|
|
117
|
-
raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
|
|
118
|
-
being made.
|
|
119
|
-
|
|
120
|
-
stream: Whether the response should be streamed back or not.
|
|
121
|
-
|
|
122
|
-
advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
|
|
123
|
-
solving.
|
|
124
|
-
|
|
125
|
-
integration_id: The unique identifier for the integration being called.
|
|
126
|
-
|
|
127
|
-
properties: Additional properties or data related to the particular integration.
|
|
128
|
-
|
|
129
|
-
extra_headers: Send extra headers
|
|
130
|
-
|
|
131
|
-
extra_query: Add additional query parameters to the request
|
|
132
|
-
|
|
133
|
-
extra_body: Add additional JSON properties to the request
|
|
134
|
-
|
|
135
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
136
|
-
"""
|
|
137
|
-
...
|
|
138
|
-
|
|
139
|
-
@overload
|
|
140
|
-
def integration_run(
|
|
141
|
-
self,
|
|
142
|
-
app_name: str,
|
|
143
|
-
*,
|
|
144
|
-
raccoon_passcode: str,
|
|
145
|
-
stream: bool,
|
|
146
|
-
advanced: Optional[lam_integration_run_params.Advanced] | NotGiven = NOT_GIVEN,
|
|
147
|
-
integration_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
148
|
-
properties: Optional[object] | 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
|
-
) -> LamIntegrationRunResponse | Stream[LamIntegrationRunResponse]:
|
|
156
|
-
"""
|
|
157
|
-
Lam Integrations Endpoint
|
|
158
|
-
|
|
159
|
-
Args:
|
|
160
|
-
raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
|
|
161
|
-
being made.
|
|
162
|
-
|
|
163
|
-
stream: Whether the response should be streamed back or not.
|
|
164
|
-
|
|
165
|
-
advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
|
|
166
|
-
solving.
|
|
167
|
-
|
|
168
|
-
integration_id: The unique identifier for the integration being called.
|
|
169
|
-
|
|
170
|
-
properties: Additional properties or data related to the particular integration.
|
|
171
|
-
|
|
172
|
-
extra_headers: Send extra headers
|
|
173
|
-
|
|
174
|
-
extra_query: Add additional query parameters to the request
|
|
175
|
-
|
|
176
|
-
extra_body: Add additional JSON properties to the request
|
|
177
|
-
|
|
178
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
179
|
-
"""
|
|
180
|
-
...
|
|
181
|
-
|
|
182
|
-
@required_args(["raccoon_passcode"], ["raccoon_passcode", "stream"])
|
|
183
|
-
def integration_run(
|
|
184
|
-
self,
|
|
185
|
-
app_name: str,
|
|
186
|
-
*,
|
|
187
|
-
raccoon_passcode: str,
|
|
188
|
-
advanced: Optional[lam_integration_run_params.Advanced] | NotGiven = NOT_GIVEN,
|
|
189
|
-
integration_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
190
|
-
properties: Optional[object] | NotGiven = NOT_GIVEN,
|
|
191
|
-
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
|
|
192
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
193
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
194
|
-
extra_headers: Headers | None = None,
|
|
195
|
-
extra_query: Query | None = None,
|
|
196
|
-
extra_body: Body | None = None,
|
|
197
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
198
|
-
) -> LamIntegrationRunResponse | Stream[LamIntegrationRunResponse]:
|
|
199
|
-
if not app_name:
|
|
200
|
-
raise ValueError(f"Expected a non-empty value for `app_name` but received {app_name!r}")
|
|
201
|
-
return cast(
|
|
202
|
-
LamIntegrationRunResponse,
|
|
203
|
-
self._post(
|
|
204
|
-
f"/lam/{app_name}/run",
|
|
205
|
-
body=maybe_transform(
|
|
206
|
-
{
|
|
207
|
-
"raccoon_passcode": raccoon_passcode,
|
|
208
|
-
"advanced": advanced,
|
|
209
|
-
"integration_id": integration_id,
|
|
210
|
-
"properties": properties,
|
|
211
|
-
"stream": stream,
|
|
212
|
-
},
|
|
213
|
-
lam_integration_run_params.LamIntegrationRunParams,
|
|
214
|
-
),
|
|
215
|
-
options=make_request_options(
|
|
216
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
217
|
-
),
|
|
218
|
-
cast_to=cast(
|
|
219
|
-
Any, LamIntegrationRunResponse
|
|
220
|
-
), # Union types cannot be passed in as arguments in the type system
|
|
221
|
-
stream=stream or False,
|
|
222
|
-
stream_cls=Stream[LamIntegrationRunResponse],
|
|
223
|
-
),
|
|
224
|
-
)
|
|
225
|
-
|
|
226
53
|
@overload
|
|
227
54
|
def run(
|
|
228
55
|
self,
|
|
@@ -438,145 +265,47 @@ class LamResource(SyncAPIResource):
|
|
|
438
265
|
stream_cls=Stream[LamRunResponse],
|
|
439
266
|
)
|
|
440
267
|
|
|
441
|
-
|
|
442
|
-
class AsyncLamResource(AsyncAPIResource):
|
|
443
|
-
@cached_property
|
|
444
|
-
def with_raw_response(self) -> AsyncLamResourceWithRawResponse:
|
|
445
|
-
"""
|
|
446
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
447
|
-
the raw response object instead of the parsed content.
|
|
448
|
-
|
|
449
|
-
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
450
|
-
"""
|
|
451
|
-
return AsyncLamResourceWithRawResponse(self)
|
|
452
|
-
|
|
453
|
-
@cached_property
|
|
454
|
-
def with_streaming_response(self) -> AsyncLamResourceWithStreamingResponse:
|
|
455
|
-
"""
|
|
456
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
457
|
-
|
|
458
|
-
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
459
|
-
"""
|
|
460
|
-
return AsyncLamResourceWithStreamingResponse(self)
|
|
461
|
-
|
|
462
|
-
@overload
|
|
463
|
-
async def integration_run(
|
|
464
|
-
self,
|
|
465
|
-
app_name: str,
|
|
466
|
-
*,
|
|
467
|
-
raccoon_passcode: str,
|
|
468
|
-
advanced: Optional[lam_integration_run_params.Advanced] | NotGiven = NOT_GIVEN,
|
|
469
|
-
integration_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
470
|
-
properties: Optional[object] | NotGiven = NOT_GIVEN,
|
|
471
|
-
stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
|
|
472
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
473
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
474
|
-
extra_headers: Headers | None = None,
|
|
475
|
-
extra_query: Query | None = None,
|
|
476
|
-
extra_body: Body | None = None,
|
|
477
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
478
|
-
) -> LamIntegrationRunResponse:
|
|
479
|
-
"""
|
|
480
|
-
Lam Integrations Endpoint
|
|
481
|
-
|
|
482
|
-
Args:
|
|
483
|
-
raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
|
|
484
|
-
being made.
|
|
485
|
-
|
|
486
|
-
advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
|
|
487
|
-
solving.
|
|
488
|
-
|
|
489
|
-
integration_id: The unique identifier for the integration being called.
|
|
490
|
-
|
|
491
|
-
properties: Additional properties or data related to the particular integration.
|
|
492
|
-
|
|
493
|
-
stream: Whether the response should be streamed back or not.
|
|
494
|
-
|
|
495
|
-
extra_headers: Send extra headers
|
|
496
|
-
|
|
497
|
-
extra_query: Add additional query parameters to the request
|
|
498
|
-
|
|
499
|
-
extra_body: Add additional JSON properties to the request
|
|
500
|
-
|
|
501
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
502
|
-
"""
|
|
503
|
-
...
|
|
504
|
-
|
|
505
|
-
@overload
|
|
506
|
-
async def integration_run(
|
|
268
|
+
def tasks(
|
|
507
269
|
self,
|
|
508
|
-
app_name: str,
|
|
509
270
|
*,
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
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,
|
|
515
281
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
516
282
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
517
283
|
extra_headers: Headers | None = None,
|
|
518
284
|
extra_query: Query | None = None,
|
|
519
285
|
extra_body: Body | None = None,
|
|
520
286
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
521
|
-
) ->
|
|
287
|
+
) -> LamTasksResponse:
|
|
522
288
|
"""
|
|
523
|
-
|
|
289
|
+
Get Tasks Endpoint
|
|
524
290
|
|
|
525
291
|
Args:
|
|
526
|
-
|
|
527
|
-
being made.
|
|
292
|
+
end_time: Filter tasks created before this Unix timestamp (in milliseconds).
|
|
528
293
|
|
|
529
|
-
|
|
294
|
+
execution_type: Filter tasks by execution type (e.g., 'run', 'extract').
|
|
530
295
|
|
|
531
|
-
|
|
532
|
-
solving.
|
|
296
|
+
limit: Number of tasks per page (maximum 100).
|
|
533
297
|
|
|
534
|
-
|
|
298
|
+
page: Page number for pagination.
|
|
535
299
|
|
|
536
|
-
|
|
300
|
+
raccoon_passcode: Filter tasks by Raccoon passcode.
|
|
537
301
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
extra_query: Add additional query parameters to the request
|
|
541
|
-
|
|
542
|
-
extra_body: Add additional JSON properties to the request
|
|
543
|
-
|
|
544
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
545
|
-
"""
|
|
546
|
-
...
|
|
547
|
-
|
|
548
|
-
@overload
|
|
549
|
-
async def integration_run(
|
|
550
|
-
self,
|
|
551
|
-
app_name: str,
|
|
552
|
-
*,
|
|
553
|
-
raccoon_passcode: str,
|
|
554
|
-
stream: bool,
|
|
555
|
-
advanced: Optional[lam_integration_run_params.Advanced] | NotGiven = NOT_GIVEN,
|
|
556
|
-
integration_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
557
|
-
properties: Optional[object] | NotGiven = NOT_GIVEN,
|
|
558
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
559
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
560
|
-
extra_headers: Headers | None = None,
|
|
561
|
-
extra_query: Query | None = None,
|
|
562
|
-
extra_body: Body | None = None,
|
|
563
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
564
|
-
) -> LamIntegrationRunResponse | AsyncStream[LamIntegrationRunResponse]:
|
|
565
|
-
"""
|
|
566
|
-
Lam Integrations Endpoint
|
|
567
|
-
|
|
568
|
-
Args:
|
|
569
|
-
raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
|
|
570
|
-
being made.
|
|
571
|
-
|
|
572
|
-
stream: Whether the response should be streamed back or not.
|
|
302
|
+
sort_by: Field to sort tasks by (e.g., 'timestamp', 'executionTime').
|
|
573
303
|
|
|
574
|
-
|
|
575
|
-
solving.
|
|
304
|
+
sort_order: Sort order ('ascend' or 'descend').
|
|
576
305
|
|
|
577
|
-
|
|
306
|
+
start_time: Filter tasks created after this Unix timestamp (in milliseconds).
|
|
578
307
|
|
|
579
|
-
|
|
308
|
+
task_id: Filter tasks by a specific task ID.
|
|
580
309
|
|
|
581
310
|
extra_headers: Send extra headers
|
|
582
311
|
|
|
@@ -586,52 +315,52 @@ class AsyncLamResource(AsyncAPIResource):
|
|
|
586
315
|
|
|
587
316
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
588
317
|
"""
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
advanced: Optional[lam_integration_run_params.Advanced] | NotGiven = NOT_GIVEN,
|
|
598
|
-
integration_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
599
|
-
properties: Optional[object] | NotGiven = NOT_GIVEN,
|
|
600
|
-
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
|
|
601
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
602
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
603
|
-
extra_headers: Headers | None = None,
|
|
604
|
-
extra_query: Query | None = None,
|
|
605
|
-
extra_body: Body | None = None,
|
|
606
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
607
|
-
) -> LamIntegrationRunResponse | AsyncStream[LamIntegrationRunResponse]:
|
|
608
|
-
if not app_name:
|
|
609
|
-
raise ValueError(f"Expected a non-empty value for `app_name` but received {app_name!r}")
|
|
610
|
-
return cast(
|
|
611
|
-
LamIntegrationRunResponse,
|
|
612
|
-
await self._post(
|
|
613
|
-
f"/lam/{app_name}/run",
|
|
614
|
-
body=await async_maybe_transform(
|
|
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(
|
|
615
326
|
{
|
|
327
|
+
"end_time": end_time,
|
|
328
|
+
"execution_type": execution_type,
|
|
329
|
+
"limit": limit,
|
|
330
|
+
"page": page,
|
|
616
331
|
"raccoon_passcode": raccoon_passcode,
|
|
617
|
-
"
|
|
618
|
-
"
|
|
619
|
-
"
|
|
620
|
-
"
|
|
332
|
+
"sort_by": sort_by,
|
|
333
|
+
"sort_order": sort_order,
|
|
334
|
+
"start_time": start_time,
|
|
335
|
+
"task_id": task_id,
|
|
621
336
|
},
|
|
622
|
-
|
|
623
|
-
),
|
|
624
|
-
options=make_request_options(
|
|
625
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
337
|
+
lam_tasks_params.LamTasksParams,
|
|
626
338
|
),
|
|
627
|
-
cast_to=cast(
|
|
628
|
-
Any, LamIntegrationRunResponse
|
|
629
|
-
), # Union types cannot be passed in as arguments in the type system
|
|
630
|
-
stream=stream or False,
|
|
631
|
-
stream_cls=AsyncStream[LamIntegrationRunResponse],
|
|
632
339
|
),
|
|
340
|
+
cast_to=LamTasksResponse,
|
|
633
341
|
)
|
|
634
342
|
|
|
343
|
+
|
|
344
|
+
class AsyncLamResource(AsyncAPIResource):
|
|
345
|
+
@cached_property
|
|
346
|
+
def with_raw_response(self) -> AsyncLamResourceWithRawResponse:
|
|
347
|
+
"""
|
|
348
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
349
|
+
the raw response object instead of the parsed content.
|
|
350
|
+
|
|
351
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
352
|
+
"""
|
|
353
|
+
return AsyncLamResourceWithRawResponse(self)
|
|
354
|
+
|
|
355
|
+
@cached_property
|
|
356
|
+
def with_streaming_response(self) -> AsyncLamResourceWithStreamingResponse:
|
|
357
|
+
"""
|
|
358
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
359
|
+
|
|
360
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
361
|
+
"""
|
|
362
|
+
return AsyncLamResourceWithStreamingResponse(self)
|
|
363
|
+
|
|
635
364
|
@overload
|
|
636
365
|
async def run(
|
|
637
366
|
self,
|
|
@@ -847,50 +576,125 @@ class AsyncLamResource(AsyncAPIResource):
|
|
|
847
576
|
stream_cls=AsyncStream[LamRunResponse],
|
|
848
577
|
)
|
|
849
578
|
|
|
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
|
+
|
|
850
654
|
|
|
851
655
|
class LamResourceWithRawResponse:
|
|
852
656
|
def __init__(self, lam: LamResource) -> None:
|
|
853
657
|
self._lam = lam
|
|
854
658
|
|
|
855
|
-
self.integration_run = to_raw_response_wrapper(
|
|
856
|
-
lam.integration_run,
|
|
857
|
-
)
|
|
858
659
|
self.run = to_raw_response_wrapper(
|
|
859
660
|
lam.run,
|
|
860
661
|
)
|
|
662
|
+
self.tasks = to_raw_response_wrapper(
|
|
663
|
+
lam.tasks,
|
|
664
|
+
)
|
|
861
665
|
|
|
862
666
|
|
|
863
667
|
class AsyncLamResourceWithRawResponse:
|
|
864
668
|
def __init__(self, lam: AsyncLamResource) -> None:
|
|
865
669
|
self._lam = lam
|
|
866
670
|
|
|
867
|
-
self.integration_run = async_to_raw_response_wrapper(
|
|
868
|
-
lam.integration_run,
|
|
869
|
-
)
|
|
870
671
|
self.run = async_to_raw_response_wrapper(
|
|
871
672
|
lam.run,
|
|
872
673
|
)
|
|
674
|
+
self.tasks = async_to_raw_response_wrapper(
|
|
675
|
+
lam.tasks,
|
|
676
|
+
)
|
|
873
677
|
|
|
874
678
|
|
|
875
679
|
class LamResourceWithStreamingResponse:
|
|
876
680
|
def __init__(self, lam: LamResource) -> None:
|
|
877
681
|
self._lam = lam
|
|
878
682
|
|
|
879
|
-
self.integration_run = to_streamed_response_wrapper(
|
|
880
|
-
lam.integration_run,
|
|
881
|
-
)
|
|
882
683
|
self.run = to_streamed_response_wrapper(
|
|
883
684
|
lam.run,
|
|
884
685
|
)
|
|
686
|
+
self.tasks = to_streamed_response_wrapper(
|
|
687
|
+
lam.tasks,
|
|
688
|
+
)
|
|
885
689
|
|
|
886
690
|
|
|
887
691
|
class AsyncLamResourceWithStreamingResponse:
|
|
888
692
|
def __init__(self, lam: AsyncLamResource) -> None:
|
|
889
693
|
self._lam = lam
|
|
890
694
|
|
|
891
|
-
self.integration_run = async_to_streamed_response_wrapper(
|
|
892
|
-
lam.integration_run,
|
|
893
|
-
)
|
|
894
695
|
self.run = async_to_streamed_response_wrapper(
|
|
895
696
|
lam.run,
|
|
896
697
|
)
|
|
698
|
+
self.tasks = async_to_streamed_response_wrapper(
|
|
699
|
+
lam.tasks,
|
|
700
|
+
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .apps import (
|
|
4
|
+
AppsResource,
|
|
5
|
+
AsyncAppsResource,
|
|
6
|
+
AppsResourceWithRawResponse,
|
|
7
|
+
AsyncAppsResourceWithRawResponse,
|
|
8
|
+
AppsResourceWithStreamingResponse,
|
|
9
|
+
AsyncAppsResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .auth import (
|
|
12
|
+
AuthResource,
|
|
13
|
+
AsyncAuthResource,
|
|
14
|
+
AuthResourceWithRawResponse,
|
|
15
|
+
AsyncAuthResourceWithRawResponse,
|
|
16
|
+
AuthResourceWithStreamingResponse,
|
|
17
|
+
AsyncAuthResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .tail import (
|
|
20
|
+
TailResource,
|
|
21
|
+
AsyncTailResource,
|
|
22
|
+
TailResourceWithRawResponse,
|
|
23
|
+
AsyncTailResourceWithRawResponse,
|
|
24
|
+
TailResourceWithStreamingResponse,
|
|
25
|
+
AsyncTailResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"AppsResource",
|
|
30
|
+
"AsyncAppsResource",
|
|
31
|
+
"AppsResourceWithRawResponse",
|
|
32
|
+
"AsyncAppsResourceWithRawResponse",
|
|
33
|
+
"AppsResourceWithStreamingResponse",
|
|
34
|
+
"AsyncAppsResourceWithStreamingResponse",
|
|
35
|
+
"AuthResource",
|
|
36
|
+
"AsyncAuthResource",
|
|
37
|
+
"AuthResourceWithRawResponse",
|
|
38
|
+
"AsyncAuthResourceWithRawResponse",
|
|
39
|
+
"AuthResourceWithStreamingResponse",
|
|
40
|
+
"AsyncAuthResourceWithStreamingResponse",
|
|
41
|
+
"TailResource",
|
|
42
|
+
"AsyncTailResource",
|
|
43
|
+
"TailResourceWithRawResponse",
|
|
44
|
+
"AsyncTailResourceWithRawResponse",
|
|
45
|
+
"TailResourceWithStreamingResponse",
|
|
46
|
+
"AsyncTailResourceWithStreamingResponse",
|
|
47
|
+
]
|