Skip to content

Commit f9decdd

Browse files
feat: Support multiple audit log method exclusions
1 parent 4771197 commit f9decdd

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 127
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-25b48b79d356843aeda41e5e5c3c407c5bd5c12f9548500ffc0a6696e6acd941.yml
3-
openapi_spec_hash: f710169690ab7aca30c91968e752cff7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-f0003e336fc8dc54d9cac4728c847fb80c32d50a9165738c5b70aa83a09bb0f5.yml
3+
openapi_spec_hash: a2099eec27728b1cfd9032dc71b9bb57
44
config_hash: 77ee715aa17061166f9a02b264a21b8d

src/kernel/resources/audit_logs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def list(
6262
end: Union[str, datetime],
6363
start: Union[str, datetime],
6464
auth_strategy: str | Omit = omit,
65-
exclude_method: str | Omit = omit,
65+
exclude_method: SequenceNotStr[str] | Omit = omit,
6666
limit: int | Omit = omit,
6767
method: str | Omit = omit,
6868
page_token: str | Omit = omit,
@@ -144,7 +144,7 @@ def export_chunk(
144144
start: Union[str, datetime],
145145
auth_strategy: str | Omit = omit,
146146
cursor: str | Omit = omit,
147-
exclude_method: str | Omit = omit,
147+
exclude_method: SequenceNotStr[str] | Omit = omit,
148148
format: Literal["jsonl", "jsonl.gz"] | Omit = omit,
149149
limit: int | Omit = omit,
150150
method: str | Omit = omit,
@@ -251,7 +251,7 @@ def list(
251251
end: Union[str, datetime],
252252
start: Union[str, datetime],
253253
auth_strategy: str | Omit = omit,
254-
exclude_method: str | Omit = omit,
254+
exclude_method: SequenceNotStr[str] | Omit = omit,
255255
limit: int | Omit = omit,
256256
method: str | Omit = omit,
257257
page_token: str | Omit = omit,
@@ -333,7 +333,7 @@ async def export_chunk(
333333
start: Union[str, datetime],
334334
auth_strategy: str | Omit = omit,
335335
cursor: str | Omit = omit,
336-
exclude_method: str | Omit = omit,
336+
exclude_method: SequenceNotStr[str] | Omit = omit,
337337
format: Literal["jsonl", "jsonl.gz"] | Omit = omit,
338338
limit: int | Omit = omit,
339339
method: str | Omit = omit,

src/kernel/types/audit_log_export_chunk_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AuditLogExportChunkParams(TypedDict, total=False):
2525
cursor: str
2626
"""Opaque cursor from X-Next-Cursor for the next chunk of older records."""
2727

28-
exclude_method: str
28+
exclude_method: SequenceNotStr[str]
2929
"""Filter out results by HTTP method."""
3030

3131
format: Literal["jsonl", "jsonl.gz"]

src/kernel/types/audit_log_list_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AuditLogListParams(TypedDict, total=False):
2222
auth_strategy: str
2323
"""Filter by authentication strategy."""
2424

25-
exclude_method: str
25+
exclude_method: SequenceNotStr[str]
2626
"""Filter out results by HTTP method."""
2727

2828
limit: int

tests/api_resources/test_audit_logs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_method_list_with_all_params(self, client: Kernel) -> None:
4343
end=parse_datetime("2026-01-02T00:00:00Z"),
4444
start=parse_datetime("2026-01-01T00:00:00Z"),
4545
auth_strategy="auth_strategy",
46-
exclude_method="exclude_method",
46+
exclude_method=["string"],
4747
limit=1,
4848
method="method",
4949
page_token="page_token",
@@ -103,7 +103,7 @@ def test_method_export_chunk_with_all_params(self, client: Kernel, respx_mock: M
103103
start=parse_datetime("2026-01-01T00:00:00Z"),
104104
auth_strategy="auth_strategy",
105105
cursor="cursor",
106-
exclude_method="exclude_method",
106+
exclude_method=["string"],
107107
format="jsonl",
108108
limit=1,
109109
method="method",
@@ -170,7 +170,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncKernel) -> N
170170
end=parse_datetime("2026-01-02T00:00:00Z"),
171171
start=parse_datetime("2026-01-01T00:00:00Z"),
172172
auth_strategy="auth_strategy",
173-
exclude_method="exclude_method",
173+
exclude_method=["string"],
174174
limit=1,
175175
method="method",
176176
page_token="page_token",
@@ -230,7 +230,7 @@ async def test_method_export_chunk_with_all_params(self, async_client: AsyncKern
230230
start=parse_datetime("2026-01-01T00:00:00Z"),
231231
auth_strategy="auth_strategy",
232232
cursor="cursor",
233-
exclude_method="exclude_method",
233+
exclude_method=["string"],
234234
format="jsonl",
235235
limit=1,
236236
method="method",

0 commit comments

Comments
 (0)