codeset 0.1.0a1__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.
- codeset/__init__.py +90 -0
- codeset/_base_client.py +1985 -0
- codeset/_client.py +430 -0
- codeset/_compat.py +219 -0
- codeset/_constants.py +14 -0
- codeset/_exceptions.py +108 -0
- codeset/_files.py +123 -0
- codeset/_models.py +805 -0
- codeset/_qs.py +150 -0
- codeset/_resource.py +43 -0
- codeset/_response.py +830 -0
- codeset/_streaming.py +333 -0
- codeset/_types.py +219 -0
- codeset/_utils/__init__.py +57 -0
- codeset/_utils/_logs.py +25 -0
- codeset/_utils/_proxy.py +65 -0
- codeset/_utils/_reflection.py +42 -0
- codeset/_utils/_resources_proxy.py +24 -0
- codeset/_utils/_streams.py +12 -0
- codeset/_utils/_sync.py +86 -0
- codeset/_utils/_transform.py +447 -0
- codeset/_utils/_typing.py +151 -0
- codeset/_utils/_utils.py +422 -0
- codeset/_version.py +4 -0
- codeset/lib/.keep +4 -0
- codeset/py.typed +0 -0
- codeset/resources/__init__.py +47 -0
- codeset/resources/health.py +135 -0
- codeset/resources/samples.py +233 -0
- codeset/resources/sessions/__init__.py +33 -0
- codeset/resources/sessions/sessions.py +618 -0
- codeset/resources/sessions/verify.py +248 -0
- codeset/types/__init__.py +19 -0
- codeset/types/container_info.py +30 -0
- codeset/types/error_info.py +13 -0
- codeset/types/health_check_response.py +19 -0
- codeset/types/sample_download_params.py +14 -0
- codeset/types/sample_list_response.py +41 -0
- codeset/types/session.py +37 -0
- codeset/types/session_apply_diff_params.py +12 -0
- codeset/types/session_apply_diff_response.py +13 -0
- codeset/types/session_close_response.py +10 -0
- codeset/types/session_create_params.py +15 -0
- codeset/types/session_create_response.py +19 -0
- codeset/types/session_execute_command_params.py +15 -0
- codeset/types/session_execute_command_response.py +19 -0
- codeset/types/session_list_response.py +18 -0
- codeset/types/session_status.py +7 -0
- codeset/types/sessions/__init__.py +7 -0
- codeset/types/sessions/job_status.py +7 -0
- codeset/types/sessions/verify_start_response.py +19 -0
- codeset/types/sessions/verify_status_response.py +66 -0
- codeset-0.1.0a1.dist-info/METADATA +397 -0
- codeset-0.1.0a1.dist-info/RECORD +56 -0
- codeset-0.1.0a1.dist-info/WHEEL +4 -0
- codeset-0.1.0a1.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,248 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import httpx
|
6
|
+
|
7
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
8
|
+
from ..._compat import cached_property
|
9
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
10
|
+
from ..._response import (
|
11
|
+
to_raw_response_wrapper,
|
12
|
+
to_streamed_response_wrapper,
|
13
|
+
async_to_raw_response_wrapper,
|
14
|
+
async_to_streamed_response_wrapper,
|
15
|
+
)
|
16
|
+
from ..._base_client import make_request_options
|
17
|
+
from ...types.sessions.verify_start_response import VerifyStartResponse
|
18
|
+
from ...types.sessions.verify_status_response import VerifyStatusResponse
|
19
|
+
|
20
|
+
__all__ = ["VerifyResource", "AsyncVerifyResource"]
|
21
|
+
|
22
|
+
|
23
|
+
class VerifyResource(SyncAPIResource):
|
24
|
+
@cached_property
|
25
|
+
def with_raw_response(self) -> VerifyResourceWithRawResponse:
|
26
|
+
"""
|
27
|
+
This property can be used as a prefix for any HTTP method call to return
|
28
|
+
the raw response object instead of the parsed content.
|
29
|
+
|
30
|
+
For more information, see https://www.github.com/codeset-ai/codeset-sdk#accessing-raw-response-data-eg-headers
|
31
|
+
"""
|
32
|
+
return VerifyResourceWithRawResponse(self)
|
33
|
+
|
34
|
+
@cached_property
|
35
|
+
def with_streaming_response(self) -> VerifyResourceWithStreamingResponse:
|
36
|
+
"""
|
37
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
38
|
+
|
39
|
+
For more information, see https://www.github.com/codeset-ai/codeset-sdk#with_streaming_response
|
40
|
+
"""
|
41
|
+
return VerifyResourceWithStreamingResponse(self)
|
42
|
+
|
43
|
+
def start(
|
44
|
+
self,
|
45
|
+
session_id: str,
|
46
|
+
*,
|
47
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
48
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
49
|
+
extra_headers: Headers | None = None,
|
50
|
+
extra_query: Query | None = None,
|
51
|
+
extra_body: Body | None = None,
|
52
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
53
|
+
) -> VerifyStartResponse:
|
54
|
+
"""
|
55
|
+
Start verification (oracle) in a session - async
|
56
|
+
|
57
|
+
Args:
|
58
|
+
extra_headers: Send extra headers
|
59
|
+
|
60
|
+
extra_query: Add additional query parameters to the request
|
61
|
+
|
62
|
+
extra_body: Add additional JSON properties to the request
|
63
|
+
|
64
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
65
|
+
"""
|
66
|
+
if not session_id:
|
67
|
+
raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
|
68
|
+
return self._post(
|
69
|
+
f"/sessions/{session_id}/verify",
|
70
|
+
options=make_request_options(
|
71
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
72
|
+
),
|
73
|
+
cast_to=VerifyStartResponse,
|
74
|
+
)
|
75
|
+
|
76
|
+
def status(
|
77
|
+
self,
|
78
|
+
job_id: str,
|
79
|
+
*,
|
80
|
+
session_id: str,
|
81
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
82
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
83
|
+
extra_headers: Headers | None = None,
|
84
|
+
extra_query: Query | None = None,
|
85
|
+
extra_body: Body | None = None,
|
86
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
87
|
+
) -> VerifyStatusResponse:
|
88
|
+
"""
|
89
|
+
Get a verification job, including the result if it's completed
|
90
|
+
|
91
|
+
Args:
|
92
|
+
extra_headers: Send extra headers
|
93
|
+
|
94
|
+
extra_query: Add additional query parameters to the request
|
95
|
+
|
96
|
+
extra_body: Add additional JSON properties to the request
|
97
|
+
|
98
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
99
|
+
"""
|
100
|
+
if not session_id:
|
101
|
+
raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
|
102
|
+
if not job_id:
|
103
|
+
raise ValueError(f"Expected a non-empty value for `job_id` but received {job_id!r}")
|
104
|
+
return self._get(
|
105
|
+
f"/sessions/{session_id}/verify/{job_id}",
|
106
|
+
options=make_request_options(
|
107
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
108
|
+
),
|
109
|
+
cast_to=VerifyStatusResponse,
|
110
|
+
)
|
111
|
+
|
112
|
+
|
113
|
+
class AsyncVerifyResource(AsyncAPIResource):
|
114
|
+
@cached_property
|
115
|
+
def with_raw_response(self) -> AsyncVerifyResourceWithRawResponse:
|
116
|
+
"""
|
117
|
+
This property can be used as a prefix for any HTTP method call to return
|
118
|
+
the raw response object instead of the parsed content.
|
119
|
+
|
120
|
+
For more information, see https://www.github.com/codeset-ai/codeset-sdk#accessing-raw-response-data-eg-headers
|
121
|
+
"""
|
122
|
+
return AsyncVerifyResourceWithRawResponse(self)
|
123
|
+
|
124
|
+
@cached_property
|
125
|
+
def with_streaming_response(self) -> AsyncVerifyResourceWithStreamingResponse:
|
126
|
+
"""
|
127
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
128
|
+
|
129
|
+
For more information, see https://www.github.com/codeset-ai/codeset-sdk#with_streaming_response
|
130
|
+
"""
|
131
|
+
return AsyncVerifyResourceWithStreamingResponse(self)
|
132
|
+
|
133
|
+
async def start(
|
134
|
+
self,
|
135
|
+
session_id: str,
|
136
|
+
*,
|
137
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
138
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
139
|
+
extra_headers: Headers | None = None,
|
140
|
+
extra_query: Query | None = None,
|
141
|
+
extra_body: Body | None = None,
|
142
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
143
|
+
) -> VerifyStartResponse:
|
144
|
+
"""
|
145
|
+
Start verification (oracle) in a session - async
|
146
|
+
|
147
|
+
Args:
|
148
|
+
extra_headers: Send extra headers
|
149
|
+
|
150
|
+
extra_query: Add additional query parameters to the request
|
151
|
+
|
152
|
+
extra_body: Add additional JSON properties to the request
|
153
|
+
|
154
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
155
|
+
"""
|
156
|
+
if not session_id:
|
157
|
+
raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
|
158
|
+
return await self._post(
|
159
|
+
f"/sessions/{session_id}/verify",
|
160
|
+
options=make_request_options(
|
161
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
162
|
+
),
|
163
|
+
cast_to=VerifyStartResponse,
|
164
|
+
)
|
165
|
+
|
166
|
+
async def status(
|
167
|
+
self,
|
168
|
+
job_id: str,
|
169
|
+
*,
|
170
|
+
session_id: str,
|
171
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
172
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
173
|
+
extra_headers: Headers | None = None,
|
174
|
+
extra_query: Query | None = None,
|
175
|
+
extra_body: Body | None = None,
|
176
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
177
|
+
) -> VerifyStatusResponse:
|
178
|
+
"""
|
179
|
+
Get a verification job, including the result if it's completed
|
180
|
+
|
181
|
+
Args:
|
182
|
+
extra_headers: Send extra headers
|
183
|
+
|
184
|
+
extra_query: Add additional query parameters to the request
|
185
|
+
|
186
|
+
extra_body: Add additional JSON properties to the request
|
187
|
+
|
188
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
189
|
+
"""
|
190
|
+
if not session_id:
|
191
|
+
raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
|
192
|
+
if not job_id:
|
193
|
+
raise ValueError(f"Expected a non-empty value for `job_id` but received {job_id!r}")
|
194
|
+
return await self._get(
|
195
|
+
f"/sessions/{session_id}/verify/{job_id}",
|
196
|
+
options=make_request_options(
|
197
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
198
|
+
),
|
199
|
+
cast_to=VerifyStatusResponse,
|
200
|
+
)
|
201
|
+
|
202
|
+
|
203
|
+
class VerifyResourceWithRawResponse:
|
204
|
+
def __init__(self, verify: VerifyResource) -> None:
|
205
|
+
self._verify = verify
|
206
|
+
|
207
|
+
self.start = to_raw_response_wrapper(
|
208
|
+
verify.start,
|
209
|
+
)
|
210
|
+
self.status = to_raw_response_wrapper(
|
211
|
+
verify.status,
|
212
|
+
)
|
213
|
+
|
214
|
+
|
215
|
+
class AsyncVerifyResourceWithRawResponse:
|
216
|
+
def __init__(self, verify: AsyncVerifyResource) -> None:
|
217
|
+
self._verify = verify
|
218
|
+
|
219
|
+
self.start = async_to_raw_response_wrapper(
|
220
|
+
verify.start,
|
221
|
+
)
|
222
|
+
self.status = async_to_raw_response_wrapper(
|
223
|
+
verify.status,
|
224
|
+
)
|
225
|
+
|
226
|
+
|
227
|
+
class VerifyResourceWithStreamingResponse:
|
228
|
+
def __init__(self, verify: VerifyResource) -> None:
|
229
|
+
self._verify = verify
|
230
|
+
|
231
|
+
self.start = to_streamed_response_wrapper(
|
232
|
+
verify.start,
|
233
|
+
)
|
234
|
+
self.status = to_streamed_response_wrapper(
|
235
|
+
verify.status,
|
236
|
+
)
|
237
|
+
|
238
|
+
|
239
|
+
class AsyncVerifyResourceWithStreamingResponse:
|
240
|
+
def __init__(self, verify: AsyncVerifyResource) -> None:
|
241
|
+
self._verify = verify
|
242
|
+
|
243
|
+
self.start = async_to_streamed_response_wrapper(
|
244
|
+
verify.start,
|
245
|
+
)
|
246
|
+
self.status = async_to_streamed_response_wrapper(
|
247
|
+
verify.status,
|
248
|
+
)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from .session import Session as Session
|
6
|
+
from .error_info import ErrorInfo as ErrorInfo
|
7
|
+
from .container_info import ContainerInfo as ContainerInfo
|
8
|
+
from .session_status import SessionStatus as SessionStatus
|
9
|
+
from .sample_list_response import SampleListResponse as SampleListResponse
|
10
|
+
from .health_check_response import HealthCheckResponse as HealthCheckResponse
|
11
|
+
from .session_create_params import SessionCreateParams as SessionCreateParams
|
12
|
+
from .session_list_response import SessionListResponse as SessionListResponse
|
13
|
+
from .sample_download_params import SampleDownloadParams as SampleDownloadParams
|
14
|
+
from .session_close_response import SessionCloseResponse as SessionCloseResponse
|
15
|
+
from .session_create_response import SessionCreateResponse as SessionCreateResponse
|
16
|
+
from .session_apply_diff_params import SessionApplyDiffParams as SessionApplyDiffParams
|
17
|
+
from .session_apply_diff_response import SessionApplyDiffResponse as SessionApplyDiffResponse
|
18
|
+
from .session_execute_command_params import SessionExecuteCommandParams as SessionExecuteCommandParams
|
19
|
+
from .session_execute_command_response import SessionExecuteCommandResponse as SessionExecuteCommandResponse
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from datetime import datetime
|
4
|
+
|
5
|
+
from .._models import BaseModel
|
6
|
+
|
7
|
+
__all__ = ["ContainerInfo"]
|
8
|
+
|
9
|
+
|
10
|
+
class ContainerInfo(BaseModel):
|
11
|
+
api_url: str
|
12
|
+
"""URL of the container API."""
|
13
|
+
|
14
|
+
container_ip: str
|
15
|
+
"""IP address of the container."""
|
16
|
+
|
17
|
+
container_name: str
|
18
|
+
"""Name of the container."""
|
19
|
+
|
20
|
+
created_at: datetime
|
21
|
+
"""Timestamp when the container was created (UTC)."""
|
22
|
+
|
23
|
+
expires_at: datetime
|
24
|
+
"""Timestamp when the container will expire (UTC)."""
|
25
|
+
|
26
|
+
sample_id: str
|
27
|
+
"""Sample ID of the container."""
|
28
|
+
|
29
|
+
status: str
|
30
|
+
"""Status of the container."""
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from .._models import BaseModel
|
4
|
+
|
5
|
+
__all__ = ["ErrorInfo"]
|
6
|
+
|
7
|
+
|
8
|
+
class ErrorInfo(BaseModel):
|
9
|
+
code: str
|
10
|
+
"""A unique error code for programmatic handling."""
|
11
|
+
|
12
|
+
message: str
|
13
|
+
"""A human-readable error message."""
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from .._models import BaseModel
|
4
|
+
|
5
|
+
__all__ = ["HealthCheckResponse"]
|
6
|
+
|
7
|
+
|
8
|
+
class HealthCheckResponse(BaseModel):
|
9
|
+
service: str
|
10
|
+
"""Name of the service"""
|
11
|
+
|
12
|
+
status: str
|
13
|
+
"""Health status of the service"""
|
14
|
+
|
15
|
+
timestamp: str
|
16
|
+
"""Timestamp when the health check was performed (ISO format)"""
|
17
|
+
|
18
|
+
version: str
|
19
|
+
"""Version of the service"""
|
@@ -0,0 +1,14 @@
|
|
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 Optional
|
6
|
+
from typing_extensions import Required, TypedDict
|
7
|
+
|
8
|
+
__all__ = ["SampleDownloadParams"]
|
9
|
+
|
10
|
+
|
11
|
+
class SampleDownloadParams(TypedDict, total=False):
|
12
|
+
dataset: Required[str]
|
13
|
+
|
14
|
+
version: Optional[int]
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import List, Optional
|
4
|
+
from datetime import datetime
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
6
|
+
|
7
|
+
from .._models import BaseModel
|
8
|
+
|
9
|
+
__all__ = ["SampleListResponse", "SampleListResponseItem"]
|
10
|
+
|
11
|
+
|
12
|
+
class SampleListResponseItem(BaseModel):
|
13
|
+
language: str
|
14
|
+
"""Primary programming language of the sample."""
|
15
|
+
|
16
|
+
sample_id: str
|
17
|
+
"""Unique identifier for the sample (e.g., 'traccar-1')."""
|
18
|
+
|
19
|
+
verifier: Literal["test_suite", "static_analysis", "linter", "custom"]
|
20
|
+
"""The type of verifier used for this sample."""
|
21
|
+
|
22
|
+
created_at: Optional[datetime] = None
|
23
|
+
"""Timestamp when the sample was created (UTC)."""
|
24
|
+
|
25
|
+
dataset: Optional[str] = None
|
26
|
+
"""Dataset name for the sample."""
|
27
|
+
|
28
|
+
description: Optional[str] = None
|
29
|
+
"""A brief description of the sample."""
|
30
|
+
|
31
|
+
latest: Optional[bool] = None
|
32
|
+
"""Whether this is the latest version."""
|
33
|
+
|
34
|
+
version: Optional[int] = None
|
35
|
+
"""Version number of the sample."""
|
36
|
+
|
37
|
+
version_description: Optional[str] = None
|
38
|
+
"""Description of this version."""
|
39
|
+
|
40
|
+
|
41
|
+
SampleListResponse: TypeAlias = List[SampleListResponseItem]
|
codeset/types/session.py
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from datetime import datetime
|
5
|
+
|
6
|
+
from .._models import BaseModel
|
7
|
+
from .error_info import ErrorInfo
|
8
|
+
from .container_info import ContainerInfo
|
9
|
+
from .session_status import SessionStatus
|
10
|
+
|
11
|
+
__all__ = ["Session"]
|
12
|
+
|
13
|
+
|
14
|
+
class Session(BaseModel):
|
15
|
+
created_at: datetime
|
16
|
+
"""Timestamp when the session was created (UTC)."""
|
17
|
+
|
18
|
+
expires_at: datetime
|
19
|
+
"""Timestamp when the session will expire (UTC)."""
|
20
|
+
|
21
|
+
last_activity_at: datetime
|
22
|
+
"""Timestamp of last activity in the session (UTC)."""
|
23
|
+
|
24
|
+
sample_id: str
|
25
|
+
"""Identifier of the sample being used for the session."""
|
26
|
+
|
27
|
+
session_id: str
|
28
|
+
"""Unique identifier for the session."""
|
29
|
+
|
30
|
+
status: SessionStatus
|
31
|
+
"""Current status of the session."""
|
32
|
+
|
33
|
+
container_info: Optional[ContainerInfo] = None
|
34
|
+
"""Information about a container."""
|
35
|
+
|
36
|
+
error: Optional[ErrorInfo] = None
|
37
|
+
"""Details about an error that occurred during job processing."""
|
@@ -0,0 +1,12 @@
|
|
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 Required, TypedDict
|
6
|
+
|
7
|
+
__all__ = ["SessionApplyDiffParams"]
|
8
|
+
|
9
|
+
|
10
|
+
class SessionApplyDiffParams(TypedDict, total=False):
|
11
|
+
diff: Required[str]
|
12
|
+
"""The diff to be applied, in unified format."""
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from .._models import BaseModel
|
4
|
+
|
5
|
+
__all__ = ["SessionApplyDiffResponse"]
|
6
|
+
|
7
|
+
|
8
|
+
class SessionApplyDiffResponse(BaseModel):
|
9
|
+
message: str
|
10
|
+
"""Details about the diff application."""
|
11
|
+
|
12
|
+
success: bool
|
13
|
+
"""Whether the diff was applied successfully."""
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from .._models import BaseModel
|
4
|
+
|
5
|
+
__all__ = ["SessionCloseResponse"]
|
6
|
+
|
7
|
+
|
8
|
+
class SessionCloseResponse(BaseModel):
|
9
|
+
message: str
|
10
|
+
"""Success message confirming session deletion"""
|
@@ -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 Required, TypedDict
|
6
|
+
|
7
|
+
__all__ = ["SessionCreateParams"]
|
8
|
+
|
9
|
+
|
10
|
+
class SessionCreateParams(TypedDict, total=False):
|
11
|
+
sample_id: Required[str]
|
12
|
+
"""Identifier of the sample to use for this session."""
|
13
|
+
|
14
|
+
ttl_minutes: int
|
15
|
+
"""Time to live for the session in minutes (default: 30)."""
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from datetime import datetime
|
4
|
+
|
5
|
+
from .._models import BaseModel
|
6
|
+
from .session_status import SessionStatus
|
7
|
+
|
8
|
+
__all__ = ["SessionCreateResponse"]
|
9
|
+
|
10
|
+
|
11
|
+
class SessionCreateResponse(BaseModel):
|
12
|
+
expires_at: datetime
|
13
|
+
"""Timestamp when the session will expire (UTC)."""
|
14
|
+
|
15
|
+
session_id: str
|
16
|
+
"""Unique identifier for the created session."""
|
17
|
+
|
18
|
+
status: SessionStatus
|
19
|
+
"""Initial status of the session."""
|
@@ -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 Required, TypedDict
|
6
|
+
|
7
|
+
__all__ = ["SessionExecuteCommandParams"]
|
8
|
+
|
9
|
+
|
10
|
+
class SessionExecuteCommandParams(TypedDict, total=False):
|
11
|
+
command: Required[str]
|
12
|
+
"""The bash command to execute."""
|
13
|
+
|
14
|
+
command_timeout: int
|
15
|
+
"""Timeout for command execution in seconds (default: 300)."""
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from .._models import BaseModel
|
4
|
+
|
5
|
+
__all__ = ["SessionExecuteCommandResponse"]
|
6
|
+
|
7
|
+
|
8
|
+
class SessionExecuteCommandResponse(BaseModel):
|
9
|
+
execution_time_seconds: float
|
10
|
+
"""Execution time in seconds."""
|
11
|
+
|
12
|
+
exit_code: int
|
13
|
+
"""Exit code of the executed command."""
|
14
|
+
|
15
|
+
stderr: str
|
16
|
+
"""Standard error from the command."""
|
17
|
+
|
18
|
+
stdout: str
|
19
|
+
"""Standard output from the command."""
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import List
|
4
|
+
|
5
|
+
from .session import Session
|
6
|
+
from .._models import BaseModel
|
7
|
+
|
8
|
+
__all__ = ["SessionListResponse"]
|
9
|
+
|
10
|
+
|
11
|
+
class SessionListResponse(BaseModel):
|
12
|
+
has_more: bool
|
13
|
+
"""Indicates if more pages of results are available."""
|
14
|
+
|
15
|
+
sessions: List[Session]
|
16
|
+
|
17
|
+
total_count: int
|
18
|
+
"""Total number of sessions returned."""
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from .job_status import JobStatus as JobStatus
|
6
|
+
from .verify_start_response import VerifyStartResponse as VerifyStartResponse
|
7
|
+
from .verify_status_response import VerifyStatusResponse as VerifyStatusResponse
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing_extensions import Literal, TypeAlias
|
4
|
+
|
5
|
+
__all__ = ["JobStatus"]
|
6
|
+
|
7
|
+
JobStatus: TypeAlias = Literal["pending", "starting", "applying_diff", "running", "completed", "error", "cancelled"]
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from datetime import datetime
|
4
|
+
|
5
|
+
from ..._models import BaseModel
|
6
|
+
from .job_status import JobStatus
|
7
|
+
|
8
|
+
__all__ = ["VerifyStartResponse"]
|
9
|
+
|
10
|
+
|
11
|
+
class VerifyStartResponse(BaseModel):
|
12
|
+
job_id: str
|
13
|
+
"""Unique identifier for the verification job."""
|
14
|
+
|
15
|
+
started_at: datetime
|
16
|
+
"""Timestamp when verification started (UTC)."""
|
17
|
+
|
18
|
+
status: JobStatus
|
19
|
+
"""Initial status of the verification job."""
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from datetime import datetime
|
5
|
+
from typing_extensions import Literal
|
6
|
+
|
7
|
+
from ..._models import BaseModel
|
8
|
+
from .job_status import JobStatus
|
9
|
+
from ..error_info import ErrorInfo
|
10
|
+
from ..container_info import ContainerInfo
|
11
|
+
|
12
|
+
__all__ = ["VerifyStatusResponse", "Result"]
|
13
|
+
|
14
|
+
|
15
|
+
class Result(BaseModel):
|
16
|
+
execution_duration_seconds: float
|
17
|
+
"""Total execution time for the verification step."""
|
18
|
+
|
19
|
+
failed: int
|
20
|
+
"""Number of tests that failed."""
|
21
|
+
|
22
|
+
is_success: bool
|
23
|
+
"""Overall success status of the verification."""
|
24
|
+
|
25
|
+
passed: int
|
26
|
+
"""Number of tests that passed."""
|
27
|
+
|
28
|
+
skipped: int
|
29
|
+
"""Number of tests that were skipped."""
|
30
|
+
|
31
|
+
total: int
|
32
|
+
"""Total number of tests executed."""
|
33
|
+
|
34
|
+
tool: Optional[Literal["test_suite"]] = None
|
35
|
+
|
36
|
+
|
37
|
+
class VerifyStatusResponse(BaseModel):
|
38
|
+
created_at: datetime
|
39
|
+
"""Timestamp when the job was created (UTC)."""
|
40
|
+
|
41
|
+
job_id: str
|
42
|
+
"""Unique identifier for the job."""
|
43
|
+
|
44
|
+
sample_id: str
|
45
|
+
"""Identifier of the sample being used for verification."""
|
46
|
+
|
47
|
+
session_id: str
|
48
|
+
"""Session identifier for this job."""
|
49
|
+
|
50
|
+
status: JobStatus
|
51
|
+
"""Current status of the job."""
|
52
|
+
|
53
|
+
completed_at: Optional[datetime] = None
|
54
|
+
"""Timestamp when the job completed (UTC)."""
|
55
|
+
|
56
|
+
container_info: Optional[ContainerInfo] = None
|
57
|
+
"""Information about a container."""
|
58
|
+
|
59
|
+
error: Optional[ErrorInfo] = None
|
60
|
+
"""Details about an error that occurred during job processing."""
|
61
|
+
|
62
|
+
result: Optional[Result] = None
|
63
|
+
"""Result from a test suite verifier."""
|
64
|
+
|
65
|
+
started_at: Optional[datetime] = None
|
66
|
+
"""Timestamp when the job processing started (UTC)."""
|