Skip to content

Commit de83d75

Browse files
feat: Support multiple audit log method exclusions
1 parent b74cae1 commit de83d75

3 files changed

Lines changed: 8 additions & 8 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

auditlog.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ type AuditLogListParams struct {
132132
Start time.Time `query:"start" api:"required" format:"date-time" json:"-"`
133133
// Filter by authentication strategy.
134134
AuthStrategy param.Opt[string] `query:"auth_strategy,omitzero" json:"-"`
135-
// Filter out results by HTTP method.
136-
ExcludeMethod param.Opt[string] `query:"exclude_method,omitzero" json:"-"`
137135
// Maximum number of results to return.
138136
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
139137
// Filter by HTTP method.
@@ -144,6 +142,8 @@ type AuditLogListParams struct {
144142
Search param.Opt[string] `query:"search,omitzero" json:"-"`
145143
// Filter by service name.
146144
Service param.Opt[string] `query:"service,omitzero" json:"-"`
145+
// Filter out results by HTTP method.
146+
ExcludeMethod []string `query:"exclude_method,omitzero" json:"-"`
147147
// Additional user IDs to OR into free-text search.
148148
SearchUserID []string `query:"search_user_id,omitzero" json:"-"`
149149
paramObj
@@ -166,8 +166,6 @@ type AuditLogExportChunkParams struct {
166166
AuthStrategy param.Opt[string] `query:"auth_strategy,omitzero" json:"-"`
167167
// Opaque cursor from X-Next-Cursor for the next chunk of older records.
168168
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
169-
// Filter out results by HTTP method.
170-
ExcludeMethod param.Opt[string] `query:"exclude_method,omitzero" json:"-"`
171169
// Maximum number of records to return in this chunk.
172170
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
173171
// Filter by HTTP method.
@@ -176,6 +174,8 @@ type AuditLogExportChunkParams struct {
176174
Search param.Opt[string] `query:"search,omitzero" json:"-"`
177175
// Filter by service name.
178176
Service param.Opt[string] `query:"service,omitzero" json:"-"`
177+
// Filter out results by HTTP method.
178+
ExcludeMethod []string `query:"exclude_method,omitzero" json:"-"`
179179
// Encoding for the returned chunk.
180180
//
181181
// Any of "jsonl", "jsonl.gz".

auditlog_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func TestAuditLogListWithOptionalParams(t *testing.T) {
3535
End: time.Now(),
3636
Start: time.Now(),
3737
AuthStrategy: kernel.String("auth_strategy"),
38-
ExcludeMethod: kernel.String("exclude_method"),
38+
ExcludeMethod: []string{"string"},
3939
Limit: kernel.Int(1),
4040
Method: kernel.String("method"),
4141
PageToken: kernel.String("page_token"),
@@ -68,7 +68,7 @@ func TestAuditLogExportChunkWithOptionalParams(t *testing.T) {
6868
Start: time.Now(),
6969
AuthStrategy: kernel.String("auth_strategy"),
7070
Cursor: kernel.String("cursor"),
71-
ExcludeMethod: kernel.String("exclude_method"),
71+
ExcludeMethod: []string{"string"},
7272
Format: kernel.AuditLogExportChunkParamsFormatJSONL,
7373
Limit: kernel.Int(1),
7474
Method: kernel.String("method"),

0 commit comments

Comments
 (0)