Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 127
configured_endpoints: 134
38 changes: 36 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,18 @@ Methods:

# Auth

## Context

Types:

```python
from kernel.types.auth import AuthContext
```

Methods:

- <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>

## Connections

Types:
Expand Down Expand Up @@ -458,8 +470,30 @@ from kernel.types import AuditLogEntry

Methods:

- <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>
- <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>
- <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>
- <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>

## ExportDestinations

Types:

```python
from kernel.types.audit_logs import (
AuditLogExportDestination,
AuditLogExportDestinationTestResult,
CreateAuditLogExportDestinationRequest,
UpdateAuditLogExportDestinationRequest,
)
```

Methods:

- <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>
- <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>
- <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>
- <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>
- <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>
- <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>

# APIKeys

Expand Down
22 changes: 2 additions & 20 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,15 @@ async-timeout==5.0.1
attrs==25.4.0
# via aiohttp
# via nox
# via standardwebhooks
backports-asyncio-runner==1.2.0
# via pytest-asyncio
certifi==2026.1.4
# via httpcore
# via httpx
colorama==0.4.6
# via griffe
colorlog==6.10.1
# via nox
dependency-groups==1.3.1
# via nox
deprecated==1.3.1
# via standardwebhooks
dirty-equals==0.11
distlib==0.4.0
# via virtualenv
Expand All @@ -58,16 +53,14 @@ filelock==3.19.1
frozenlist==1.8.0
# via aiohttp
# via aiosignal
griffe==1.14.0
h11==0.16.0
# via httpcore
httpcore==1.0.9
# via httpx
httpx==0.28.1
# via httpx-aiohttp
# via respx
# via standardwebhooks
# via kernel
# via respx
httpx-aiohttp==0.1.12
# via kernel
humanize==4.13.0
Expand Down Expand Up @@ -119,7 +112,6 @@ pytest==8.4.2
pytest-asyncio==1.2.0
pytest-xdist==3.8.0
python-dateutil==2.9.0.post0
# via standardwebhooks
# via time-machine
respx==0.22.0
rich==14.2.0
Expand All @@ -128,39 +120,29 @@ six==1.17.0
# via python-dateutil
sniffio==1.3.1
# via kernel
standardwebhooks==1.0.1
# via kernel
time-machine==2.19.0
tomli==2.4.0
# via dependency-groups
# via mypy
# via nox
# via pytest
types-deprecated==1.3.1.20251101
# via standardwebhooks
types-python-dateutil==2.9.0.20251115
# via standardwebhooks
typing-extensions==4.15.0
# via aiosignal
# via anyio
# via exceptiongroup
# via kernel
# via multidict
# via mypy
# via pydantic
# via pydantic-core
# via pyright
# via pytest-asyncio
# via kernel
# via typing-inspection
# via virtualenv
typing-inspection==0.4.2
# via pydantic
virtualenv==20.36.1
# via nox
websockets==15.0.1
# via kernel
wrapt==2.0.1
# via deprecated
yarl==1.22.0
# via aiohttp
zipp==3.23.0
Expand Down
20 changes: 1 addition & 19 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ async-timeout==5.0.1
# via aiohttp
attrs==25.4.0
# via aiohttp
# via standardwebhooks
certifi==2026.1.4
# via httpcore
# via httpx
deprecated==1.3.1
# via standardwebhooks
distro==1.9.0
# via kernel
exceptiongroup==1.3.1
Expand All @@ -45,7 +42,6 @@ httpcore==1.0.9
# via httpx
httpx==0.28.1
# via httpx-aiohttp
# via standardwebhooks
# via kernel
httpx-aiohttp==0.1.12
# via kernel
Expand All @@ -63,32 +59,18 @@ pydantic==2.12.5
# via kernel
pydantic-core==2.41.5
# via pydantic
python-dateutil==2.9.0.post0
# via standardwebhooks
six==1.17.0
# via python-dateutil
sniffio==1.3.1
# via kernel
standardwebhooks==1.0.1
# via kernel
types-deprecated==1.3.1.20251101
# via standardwebhooks
types-python-dateutil==2.9.0.20251115
# via standardwebhooks
typing-extensions==4.15.0
# via aiosignal
# via anyio
# via exceptiongroup
# via kernel
# via multidict
# via pydantic
# via pydantic-core
# via kernel
# via typing-inspection
typing-inspection==0.4.2
# via pydantic
websockets==15.0.1
# via kernel
wrapt==2.0.1
# via deprecated
yarl==1.22.0
# via aiohttp
2 changes: 1 addition & 1 deletion src/kernel/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
from .resources.api_keys import APIKeysResource, AsyncAPIKeysResource
from .resources.profiles import ProfilesResource, AsyncProfilesResource
from .resources.auth.auth import AuthResource, AsyncAuthResource
from .resources.audit_logs import AuditLogsResource, AsyncAuditLogsResource
from .resources.extensions import ExtensionsResource, AsyncExtensionsResource
from .resources.credentials import CredentialsResource, AsyncCredentialsResource
from .resources.deployments import DeploymentsResource, AsyncDeploymentsResource
Expand All @@ -77,6 +76,7 @@
from .resources.browsers.browsers import BrowsersResource, AsyncBrowsersResource
from .resources.projects.projects import ProjectsResource, AsyncProjectsResource
from .resources.credential_providers import CredentialProvidersResource, AsyncCredentialProvidersResource
from .resources.audit_logs.audit_logs import AuditLogsResource, AsyncAuditLogsResource
from .resources.organization.organization import OrganizationResource, AsyncOrganizationResource

__all__ = [
Expand Down
33 changes: 33 additions & 0 deletions src/kernel/resources/audit_logs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .audit_logs import (
AuditLogsResource,
AsyncAuditLogsResource,
AuditLogsResourceWithRawResponse,
AsyncAuditLogsResourceWithRawResponse,
AuditLogsResourceWithStreamingResponse,
AsyncAuditLogsResourceWithStreamingResponse,
)
from .export_destinations import (
ExportDestinationsResource,
AsyncExportDestinationsResource,
ExportDestinationsResourceWithRawResponse,
AsyncExportDestinationsResourceWithRawResponse,
ExportDestinationsResourceWithStreamingResponse,
AsyncExportDestinationsResourceWithStreamingResponse,
)

__all__ = [
"ExportDestinationsResource",
"AsyncExportDestinationsResource",
"ExportDestinationsResourceWithRawResponse",
"AsyncExportDestinationsResourceWithRawResponse",
"ExportDestinationsResourceWithStreamingResponse",
"AsyncExportDestinationsResourceWithStreamingResponse",
"AuditLogsResource",
"AsyncAuditLogsResource",
"AuditLogsResourceWithRawResponse",
"AsyncAuditLogsResourceWithRawResponse",
"AuditLogsResourceWithStreamingResponse",
"AsyncAuditLogsResourceWithStreamingResponse",
]
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import httpx

from ..types import audit_log_list_params, audit_log_export_chunk_params
from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import (
from ...types import audit_log_list_params, audit_log_export_chunk_params
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
BinaryAPIResponse,
AsyncBinaryAPIResponse,
StreamedBinaryAPIResponse,
Expand All @@ -27,10 +27,18 @@
async_to_custom_raw_response_wrapper,
async_to_custom_streamed_response_wrapper,
)
from ..pagination import SyncPageTokenPagination, AsyncPageTokenPagination
from .._base_client import AsyncPaginator, make_request_options
from ..types.audit_log_entry import AuditLogEntry
from ..lib.audit_log_download import (
from ...pagination import SyncPageTokenPagination, AsyncPageTokenPagination
from ..._base_client import AsyncPaginator, make_request_options
from .export_destinations import (
ExportDestinationsResource,
AsyncExportDestinationsResource,
ExportDestinationsResourceWithRawResponse,
AsyncExportDestinationsResourceWithRawResponse,
ExportDestinationsResourceWithStreamingResponse,
AsyncExportDestinationsResourceWithStreamingResponse,
)
from ...types.audit_log_entry import AuditLogEntry
from ...lib.audit_log_download import (
ProgressCallback,
AsyncProgressCallback,
AuditLogDownloadResult,
Expand All @@ -44,6 +52,11 @@
class AuditLogsResource(SyncAPIResource):
"""Read audit log records for the authenticated organization."""

@cached_property
def export_destinations(self) -> ExportDestinationsResource:
"""Read audit log records for the authenticated organization."""
return ExportDestinationsResource(self._client)

@cached_property
def with_raw_response(self) -> AuditLogsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -287,6 +300,11 @@ def fetch_chunk(cursor: str | None) -> ContextManager[StreamedBinaryAPIResponse]
class AsyncAuditLogsResource(AsyncAPIResource):
"""Read audit log records for the authenticated organization."""

@cached_property
def export_destinations(self) -> AsyncExportDestinationsResource:
"""Read audit log records for the authenticated organization."""
return AsyncExportDestinationsResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncAuditLogsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -539,6 +557,11 @@ def __init__(self, audit_logs: AuditLogsResource) -> None:
BinaryAPIResponse,
)

@cached_property
def export_destinations(self) -> ExportDestinationsResourceWithRawResponse:
"""Read audit log records for the authenticated organization."""
return ExportDestinationsResourceWithRawResponse(self._audit_logs.export_destinations)


class AsyncAuditLogsResourceWithRawResponse:
def __init__(self, audit_logs: AsyncAuditLogsResource) -> None:
Expand All @@ -552,6 +575,11 @@ def __init__(self, audit_logs: AsyncAuditLogsResource) -> None:
AsyncBinaryAPIResponse,
)

@cached_property
def export_destinations(self) -> AsyncExportDestinationsResourceWithRawResponse:
"""Read audit log records for the authenticated organization."""
return AsyncExportDestinationsResourceWithRawResponse(self._audit_logs.export_destinations)


class AuditLogsResourceWithStreamingResponse:
def __init__(self, audit_logs: AuditLogsResource) -> None:
Expand All @@ -565,6 +593,11 @@ def __init__(self, audit_logs: AuditLogsResource) -> None:
StreamedBinaryAPIResponse,
)

@cached_property
def export_destinations(self) -> ExportDestinationsResourceWithStreamingResponse:
"""Read audit log records for the authenticated organization."""
return ExportDestinationsResourceWithStreamingResponse(self._audit_logs.export_destinations)


class AsyncAuditLogsResourceWithStreamingResponse:
def __init__(self, audit_logs: AsyncAuditLogsResource) -> None:
Expand All @@ -577,3 +610,8 @@ def __init__(self, audit_logs: AsyncAuditLogsResource) -> None:
audit_logs.export_chunk,
AsyncStreamedBinaryAPIResponse,
)

@cached_property
def export_destinations(self) -> AsyncExportDestinationsResourceWithStreamingResponse:
"""Read audit log records for the authenticated organization."""
return AsyncExportDestinationsResourceWithStreamingResponse(self._audit_logs.export_destinations)
Loading
Loading