Skip to content

Commit 47af38d

Browse files
authored
Merge pull request #145 from kernel/stainless/release
Release SDK updates
2 parents 357c892 + 9da2570 commit 47af38d

29 files changed

Lines changed: 1996 additions & 1574 deletions

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 127
1+
configured_endpoints: 134

api.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,18 @@ Methods:
294294

295295
# Auth
296296

297+
## Context
298+
299+
Types:
300+
301+
```python
302+
from kernel.types.auth import AuthContext
303+
```
304+
305+
Methods:
306+
307+
- <code title="get /auth/context">client.auth.context.<a href="./src/kernel/resources/auth/context.py">retrieve</a>() -> <a href="./src/kernel/types/auth/auth_context.py">AuthContext</a></code>
308+
297309
## Connections
298310

299311
Types:
@@ -458,8 +470,30 @@ from kernel.types import AuditLogEntry
458470

459471
Methods:
460472

461-
- <code title="get /audit-logs">client.audit_logs.<a href="./src/kernel/resources/audit_logs.py">list</a>(\*\*<a href="src/kernel/types/audit_log_list_params.py">params</a>) -> <a href="./src/kernel/types/audit_log_entry.py">SyncPageTokenPagination[AuditLogEntry]</a></code>
462-
- <code title="get /audit-logs/export/chunk">client.audit_logs.<a href="./src/kernel/resources/audit_logs.py">export_chunk</a>(\*\*<a href="src/kernel/types/audit_log_export_chunk_params.py">params</a>) -> BinaryAPIResponse</code>
473+
- <code title="get /audit-logs">client.audit_logs.<a href="./src/kernel/resources/audit_logs/audit_logs.py">list</a>(\*\*<a href="src/kernel/types/audit_log_list_params.py">params</a>) -> <a href="./src/kernel/types/audit_log_entry.py">SyncPageTokenPagination[AuditLogEntry]</a></code>
474+
- <code title="get /audit-logs/export/chunk">client.audit_logs.<a href="./src/kernel/resources/audit_logs/audit_logs.py">export_chunk</a>(\*\*<a href="src/kernel/types/audit_log_export_chunk_params.py">params</a>) -> BinaryAPIResponse</code>
475+
476+
## ExportDestinations
477+
478+
Types:
479+
480+
```python
481+
from kernel.types.audit_logs import (
482+
AuditLogExportDestination,
483+
AuditLogExportDestinationTestResult,
484+
CreateAuditLogExportDestinationRequest,
485+
UpdateAuditLogExportDestinationRequest,
486+
)
487+
```
488+
489+
Methods:
490+
491+
- <code title="post /audit-logs/export/destinations">client.audit_logs.export_destinations.<a href="./src/kernel/resources/audit_logs/export_destinations.py">create</a>(\*\*<a href="src/kernel/types/audit_logs/export_destination_create_params.py">params</a>) -> <a href="./src/kernel/types/audit_logs/audit_log_export_destination.py">AuditLogExportDestination</a></code>
492+
- <code title="get /audit-logs/export/destinations/{id}">client.audit_logs.export_destinations.<a href="./src/kernel/resources/audit_logs/export_destinations.py">retrieve</a>(id) -> <a href="./src/kernel/types/audit_logs/audit_log_export_destination.py">AuditLogExportDestination</a></code>
493+
- <code title="patch /audit-logs/export/destinations/{id}">client.audit_logs.export_destinations.<a href="./src/kernel/resources/audit_logs/export_destinations.py">update</a>(id, \*\*<a href="src/kernel/types/audit_logs/export_destination_update_params.py">params</a>) -> <a href="./src/kernel/types/audit_logs/audit_log_export_destination.py">AuditLogExportDestination</a></code>
494+
- <code title="get /audit-logs/export/destinations">client.audit_logs.export_destinations.<a href="./src/kernel/resources/audit_logs/export_destinations.py">list</a>(\*\*<a href="src/kernel/types/audit_logs/export_destination_list_params.py">params</a>) -> <a href="./src/kernel/types/audit_logs/audit_log_export_destination.py">SyncOffsetPagination[AuditLogExportDestination]</a></code>
495+
- <code title="delete /audit-logs/export/destinations/{id}">client.audit_logs.export_destinations.<a href="./src/kernel/resources/audit_logs/export_destinations.py">delete</a>(id) -> None</code>
496+
- <code title="post /audit-logs/export/destinations/{id}/test">client.audit_logs.export_destinations.<a href="./src/kernel/resources/audit_logs/export_destinations.py">test</a>(id) -> <a href="./src/kernel/types/audit_logs/audit_log_export_destination_test_result.py">AuditLogExportDestinationTestResult</a></code>
463497

464498
# APIKeys
465499

requirements-dev.lock

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,15 @@ async-timeout==5.0.1
2929
attrs==25.4.0
3030
# via aiohttp
3131
# via nox
32-
# via standardwebhooks
3332
backports-asyncio-runner==1.2.0
3433
# via pytest-asyncio
3534
certifi==2026.1.4
3635
# via httpcore
3736
# via httpx
38-
colorama==0.4.6
39-
# via griffe
4037
colorlog==6.10.1
4138
# via nox
4239
dependency-groups==1.3.1
4340
# via nox
44-
deprecated==1.3.1
45-
# via standardwebhooks
4641
dirty-equals==0.11
4742
distlib==0.4.0
4843
# via virtualenv
@@ -58,16 +53,14 @@ filelock==3.19.1
5853
frozenlist==1.8.0
5954
# via aiohttp
6055
# via aiosignal
61-
griffe==1.14.0
6256
h11==0.16.0
6357
# via httpcore
6458
httpcore==1.0.9
6559
# via httpx
6660
httpx==0.28.1
6761
# via httpx-aiohttp
68-
# via respx
69-
# via standardwebhooks
7062
# via kernel
63+
# via respx
7164
httpx-aiohttp==0.1.12
7265
# via kernel
7366
humanize==4.13.0
@@ -119,7 +112,6 @@ pytest==8.4.2
119112
pytest-asyncio==1.2.0
120113
pytest-xdist==3.8.0
121114
python-dateutil==2.9.0.post0
122-
# via standardwebhooks
123115
# via time-machine
124116
respx==0.22.0
125117
rich==14.2.0
@@ -128,39 +120,29 @@ six==1.17.0
128120
# via python-dateutil
129121
sniffio==1.3.1
130122
# via kernel
131-
standardwebhooks==1.0.1
132-
# via kernel
133123
time-machine==2.19.0
134124
tomli==2.4.0
135125
# via dependency-groups
136126
# via mypy
137127
# via nox
138128
# via pytest
139-
types-deprecated==1.3.1.20251101
140-
# via standardwebhooks
141-
types-python-dateutil==2.9.0.20251115
142-
# via standardwebhooks
143129
typing-extensions==4.15.0
144130
# via aiosignal
145131
# via anyio
146132
# via exceptiongroup
133+
# via kernel
147134
# via multidict
148135
# via mypy
149136
# via pydantic
150137
# via pydantic-core
151138
# via pyright
152139
# via pytest-asyncio
153-
# via kernel
154140
# via typing-inspection
155141
# via virtualenv
156142
typing-inspection==0.4.2
157143
# via pydantic
158144
virtualenv==20.36.1
159145
# via nox
160-
websockets==15.0.1
161-
# via kernel
162-
wrapt==2.0.1
163-
# via deprecated
164146
yarl==1.22.0
165147
# via aiohttp
166148
zipp==3.23.0

requirements.lock

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ async-timeout==5.0.1
2626
# via aiohttp
2727
attrs==25.4.0
2828
# via aiohttp
29-
# via standardwebhooks
3029
certifi==2026.1.4
3130
# via httpcore
3231
# via httpx
33-
deprecated==1.3.1
34-
# via standardwebhooks
3532
distro==1.9.0
3633
# via kernel
3734
exceptiongroup==1.3.1
@@ -45,7 +42,6 @@ httpcore==1.0.9
4542
# via httpx
4643
httpx==0.28.1
4744
# via httpx-aiohttp
48-
# via standardwebhooks
4945
# via kernel
5046
httpx-aiohttp==0.1.12
5147
# via kernel
@@ -63,32 +59,18 @@ pydantic==2.12.5
6359
# via kernel
6460
pydantic-core==2.41.5
6561
# via pydantic
66-
python-dateutil==2.9.0.post0
67-
# via standardwebhooks
68-
six==1.17.0
69-
# via python-dateutil
7062
sniffio==1.3.1
7163
# via kernel
72-
standardwebhooks==1.0.1
73-
# via kernel
74-
types-deprecated==1.3.1.20251101
75-
# via standardwebhooks
76-
types-python-dateutil==2.9.0.20251115
77-
# via standardwebhooks
7864
typing-extensions==4.15.0
7965
# via aiosignal
8066
# via anyio
8167
# via exceptiongroup
68+
# via kernel
8269
# via multidict
8370
# via pydantic
8471
# via pydantic-core
85-
# via kernel
8672
# via typing-inspection
8773
typing-inspection==0.4.2
8874
# via pydantic
89-
websockets==15.0.1
90-
# via kernel
91-
wrapt==2.0.1
92-
# via deprecated
9375
yarl==1.22.0
9476
# via aiohttp

src/kernel/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
from .resources.api_keys import APIKeysResource, AsyncAPIKeysResource
6969
from .resources.profiles import ProfilesResource, AsyncProfilesResource
7070
from .resources.auth.auth import AuthResource, AsyncAuthResource
71-
from .resources.audit_logs import AuditLogsResource, AsyncAuditLogsResource
7271
from .resources.extensions import ExtensionsResource, AsyncExtensionsResource
7372
from .resources.credentials import CredentialsResource, AsyncCredentialsResource
7473
from .resources.deployments import DeploymentsResource, AsyncDeploymentsResource
@@ -77,6 +76,7 @@
7776
from .resources.browsers.browsers import BrowsersResource, AsyncBrowsersResource
7877
from .resources.projects.projects import ProjectsResource, AsyncProjectsResource
7978
from .resources.credential_providers import CredentialProvidersResource, AsyncCredentialProvidersResource
79+
from .resources.audit_logs.audit_logs import AuditLogsResource, AsyncAuditLogsResource
8080
from .resources.organization.organization import OrganizationResource, AsyncOrganizationResource
8181

8282
__all__ = [
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .audit_logs import (
4+
AuditLogsResource,
5+
AsyncAuditLogsResource,
6+
AuditLogsResourceWithRawResponse,
7+
AsyncAuditLogsResourceWithRawResponse,
8+
AuditLogsResourceWithStreamingResponse,
9+
AsyncAuditLogsResourceWithStreamingResponse,
10+
)
11+
from .export_destinations import (
12+
ExportDestinationsResource,
13+
AsyncExportDestinationsResource,
14+
ExportDestinationsResourceWithRawResponse,
15+
AsyncExportDestinationsResourceWithRawResponse,
16+
ExportDestinationsResourceWithStreamingResponse,
17+
AsyncExportDestinationsResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"ExportDestinationsResource",
22+
"AsyncExportDestinationsResource",
23+
"ExportDestinationsResourceWithRawResponse",
24+
"AsyncExportDestinationsResourceWithRawResponse",
25+
"ExportDestinationsResourceWithStreamingResponse",
26+
"AsyncExportDestinationsResourceWithStreamingResponse",
27+
"AuditLogsResource",
28+
"AsyncAuditLogsResource",
29+
"AuditLogsResourceWithRawResponse",
30+
"AsyncAuditLogsResourceWithRawResponse",
31+
"AuditLogsResourceWithStreamingResponse",
32+
"AsyncAuditLogsResourceWithStreamingResponse",
33+
]

src/kernel/resources/audit_logs.py renamed to src/kernel/resources/audit_logs/audit_logs.py

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
import httpx
1010

11-
from ..types import audit_log_list_params, audit_log_export_chunk_params
12-
from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
13-
from .._utils import maybe_transform, async_maybe_transform
14-
from .._compat import cached_property
15-
from .._resource import SyncAPIResource, AsyncAPIResource
16-
from .._response import (
11+
from ...types import audit_log_list_params, audit_log_export_chunk_params
12+
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
13+
from ..._utils import maybe_transform, async_maybe_transform
14+
from ..._compat import cached_property
15+
from ..._resource import SyncAPIResource, AsyncAPIResource
16+
from ..._response import (
1717
BinaryAPIResponse,
1818
AsyncBinaryAPIResponse,
1919
StreamedBinaryAPIResponse,
@@ -27,10 +27,18 @@
2727
async_to_custom_raw_response_wrapper,
2828
async_to_custom_streamed_response_wrapper,
2929
)
30-
from ..pagination import SyncPageTokenPagination, AsyncPageTokenPagination
31-
from .._base_client import AsyncPaginator, make_request_options
32-
from ..types.audit_log_entry import AuditLogEntry
33-
from ..lib.audit_log_download import (
30+
from ...pagination import SyncPageTokenPagination, AsyncPageTokenPagination
31+
from ..._base_client import AsyncPaginator, make_request_options
32+
from .export_destinations import (
33+
ExportDestinationsResource,
34+
AsyncExportDestinationsResource,
35+
ExportDestinationsResourceWithRawResponse,
36+
AsyncExportDestinationsResourceWithRawResponse,
37+
ExportDestinationsResourceWithStreamingResponse,
38+
AsyncExportDestinationsResourceWithStreamingResponse,
39+
)
40+
from ...types.audit_log_entry import AuditLogEntry
41+
from ...lib.audit_log_download import (
3442
ProgressCallback,
3543
AsyncProgressCallback,
3644
AuditLogDownloadResult,
@@ -44,6 +52,11 @@
4452
class AuditLogsResource(SyncAPIResource):
4553
"""Read audit log records for the authenticated organization."""
4654

55+
@cached_property
56+
def export_destinations(self) -> ExportDestinationsResource:
57+
"""Read audit log records for the authenticated organization."""
58+
return ExportDestinationsResource(self._client)
59+
4760
@cached_property
4861
def with_raw_response(self) -> AuditLogsResourceWithRawResponse:
4962
"""
@@ -287,6 +300,11 @@ def fetch_chunk(cursor: str | None) -> ContextManager[StreamedBinaryAPIResponse]
287300
class AsyncAuditLogsResource(AsyncAPIResource):
288301
"""Read audit log records for the authenticated organization."""
289302

303+
@cached_property
304+
def export_destinations(self) -> AsyncExportDestinationsResource:
305+
"""Read audit log records for the authenticated organization."""
306+
return AsyncExportDestinationsResource(self._client)
307+
290308
@cached_property
291309
def with_raw_response(self) -> AsyncAuditLogsResourceWithRawResponse:
292310
"""
@@ -539,6 +557,11 @@ def __init__(self, audit_logs: AuditLogsResource) -> None:
539557
BinaryAPIResponse,
540558
)
541559

560+
@cached_property
561+
def export_destinations(self) -> ExportDestinationsResourceWithRawResponse:
562+
"""Read audit log records for the authenticated organization."""
563+
return ExportDestinationsResourceWithRawResponse(self._audit_logs.export_destinations)
564+
542565

543566
class AsyncAuditLogsResourceWithRawResponse:
544567
def __init__(self, audit_logs: AsyncAuditLogsResource) -> None:
@@ -552,6 +575,11 @@ def __init__(self, audit_logs: AsyncAuditLogsResource) -> None:
552575
AsyncBinaryAPIResponse,
553576
)
554577

578+
@cached_property
579+
def export_destinations(self) -> AsyncExportDestinationsResourceWithRawResponse:
580+
"""Read audit log records for the authenticated organization."""
581+
return AsyncExportDestinationsResourceWithRawResponse(self._audit_logs.export_destinations)
582+
555583

556584
class AuditLogsResourceWithStreamingResponse:
557585
def __init__(self, audit_logs: AuditLogsResource) -> None:
@@ -565,6 +593,11 @@ def __init__(self, audit_logs: AuditLogsResource) -> None:
565593
StreamedBinaryAPIResponse,
566594
)
567595

596+
@cached_property
597+
def export_destinations(self) -> ExportDestinationsResourceWithStreamingResponse:
598+
"""Read audit log records for the authenticated organization."""
599+
return ExportDestinationsResourceWithStreamingResponse(self._audit_logs.export_destinations)
600+
568601

569602
class AsyncAuditLogsResourceWithStreamingResponse:
570603
def __init__(self, audit_logs: AsyncAuditLogsResource) -> None:
@@ -577,3 +610,8 @@ def __init__(self, audit_logs: AsyncAuditLogsResource) -> None:
577610
audit_logs.export_chunk,
578611
AsyncStreamedBinaryAPIResponse,
579612
)
613+
614+
@cached_property
615+
def export_destinations(self) -> AsyncExportDestinationsResourceWithStreamingResponse:
616+
"""Read audit log records for the authenticated organization."""
617+
return AsyncExportDestinationsResourceWithStreamingResponse(self._audit_logs.export_destinations)

0 commit comments

Comments
 (0)