smplkit 3.0.90 → 3.0.91
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.
- checksums.yaml +4 -4
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/categories_api.rb +5 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/event_types_api.rb +5 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/events_api.rb +5 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/resource_types_api.rb +5 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_search_request.rb +12 -1
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder.rb +13 -1
- data/lib/smplkit/_generated/audit/spec/api/categories_api_spec.rb +2 -1
- data/lib/smplkit/_generated/audit/spec/api/event_types_api_spec.rb +2 -1
- data/lib/smplkit/_generated/audit/spec/api/events_api_spec.rb +2 -1
- data/lib/smplkit/_generated/audit/spec/api/resource_types_api_spec.rb +2 -1
- data/lib/smplkit/_generated/audit/spec/models/event_search_request_spec.rb +6 -0
- data/lib/smplkit/_generated/audit/spec/models/forwarder_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 301ddc72ec1ff5b4553afe63a79d4261f17e77e14d1ac7c983f55f7198a180ea
|
|
4
|
+
data.tar.gz: 1cb536c2f6741ec074f5655d73af264c27ff5f77f71a099f87259e69c525c79b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6adb6bdd03c07571e9aca3f8532114005ef7eb29a986f1b301d7af991e3301f4fcc0300a44671675b45a7ea5fa139080ee6f7fccda9fc21fb286304d9d6a92df
|
|
7
|
+
data.tar.gz: 4857e66bd1eed6dfe98cc510e47e0f6ff109cbe8273e85c44a599d1a97ca6c9c3b2b56bed5400f6a7ea7526dbfc7671c65b097f4e3eaf64bfb94dd6b227e97dc
|
|
@@ -20,8 +20,9 @@ module SmplkitGeneratedClient::Audit
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# List Categories
|
|
23
|
-
# List the distinct `category` values recorded for this account. The resource `id` is the category value itself. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the
|
|
23
|
+
# List the distinct `category` values recorded for this account. The resource `id` is the category value itself. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the selected environments (see `filter[environment]`). Useful for populating filter dropdowns in a UI.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
25
26
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
26
27
|
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
27
28
|
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
@@ -33,8 +34,9 @@ module SmplkitGeneratedClient::Audit
|
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
# List Categories
|
|
36
|
-
# List the distinct `category` values recorded for this account. The resource `id` is the category value itself. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the
|
|
37
|
+
# List the distinct `category` values recorded for this account. The resource `id` is the category value itself. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the selected environments (see `filter[environment]`). Useful for populating filter dropdowns in a UI.
|
|
37
38
|
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
38
40
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
39
41
|
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
40
42
|
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
@@ -53,6 +55,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
53
55
|
|
|
54
56
|
# query parameters
|
|
55
57
|
query_params = opts[:query_params] || {}
|
|
58
|
+
query_params[:'filter[environment]'] = opts[:'filter_environment'] if !opts[:'filter_environment'].nil?
|
|
56
59
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
57
60
|
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
58
61
|
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
@@ -20,8 +20,9 @@ module SmplkitGeneratedClient::Audit
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# List Event Types
|
|
23
|
-
# List the distinct `event_type` slugs recorded for this account. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the
|
|
23
|
+
# List the distinct `event_type` slugs recorded for this account. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the selected environments (see `filter[environment]`). Without `filter[resource_type]`, returns one row per distinct event_type. With `filter[resource_type]`, returns the event_types recorded for that specific resource type.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
25
26
|
# @option opts [String] :filter_resource_type
|
|
26
27
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
27
28
|
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
@@ -34,8 +35,9 @@ module SmplkitGeneratedClient::Audit
|
|
|
34
35
|
end
|
|
35
36
|
|
|
36
37
|
# List Event Types
|
|
37
|
-
# List the distinct `event_type` slugs recorded for this account. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the
|
|
38
|
+
# List the distinct `event_type` slugs recorded for this account. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the selected environments (see `filter[environment]`). Without `filter[resource_type]`, returns one row per distinct event_type. With `filter[resource_type]`, returns the event_types recorded for that specific resource type.
|
|
38
39
|
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
39
41
|
# @option opts [String] :filter_resource_type
|
|
40
42
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
41
43
|
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
@@ -55,6 +57,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
55
57
|
|
|
56
58
|
# query parameters
|
|
57
59
|
query_params = opts[:query_params] || {}
|
|
60
|
+
query_params[:'filter[environment]'] = opts[:'filter_environment'] if !opts[:'filter_environment'].nil?
|
|
58
61
|
query_params[:'filter[resource_type]'] = opts[:'filter_resource_type'] if !opts[:'filter_resource_type'].nil?
|
|
59
62
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
60
63
|
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
@@ -85,6 +85,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
85
85
|
# List Events
|
|
86
86
|
# List audit events for this account. Default sort is `-occurred_at` (newest occurrence first). Sort by `occurred_at` or `created_at`, ascending or descending — keep the same `sort` value across paginated requests so the cursor stays consistent. Filters are exact-match except `filter[occurred_at]`, which uses interval notation (e.g. `[2026-01-01T00:00:00Z,2026-01-31T00:00:00Z)`), and `filter[search]`, which is a case-insensitive substring match against `resource_id` or `description`. Two filter-combination rules: - `filter[resource_id]` must be accompanied by `filter[resource_type]` (the index is keyed on the pair). - `filter[search]` must be accompanied by either `filter[occurred_at]` or `filter[resource_type]` + `filter[resource_id]` (substring matching has no index, so an unbounded substring scan is rejected). No other filter combinations are required — calling the endpoint with no query parameters returns the latest events for the account, paginated. `page[size]` defaults to 1000 and must not exceed 1000. Pass `format=CSV` or `format=JSONL` to stream a download of the full filtered result set instead of a paginated JSON:API response. The download honors every supplied filter and ignores `page[size]` and `page[after]`.
|
|
87
87
|
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
88
89
|
# @option opts [String] :filter_occurred_at
|
|
89
90
|
# @option opts [String] :filter_actor_type
|
|
90
91
|
# @option opts [String] :filter_actor_id
|
|
@@ -108,6 +109,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
108
109
|
# List Events
|
|
109
110
|
# List audit events for this account. Default sort is `-occurred_at` (newest occurrence first). Sort by `occurred_at` or `created_at`, ascending or descending — keep the same `sort` value across paginated requests so the cursor stays consistent. Filters are exact-match except `filter[occurred_at]`, which uses interval notation (e.g. `[2026-01-01T00:00:00Z,2026-01-31T00:00:00Z)`), and `filter[search]`, which is a case-insensitive substring match against `resource_id` or `description`. Two filter-combination rules: - `filter[resource_id]` must be accompanied by `filter[resource_type]` (the index is keyed on the pair). - `filter[search]` must be accompanied by either `filter[occurred_at]` or `filter[resource_type]` + `filter[resource_id]` (substring matching has no index, so an unbounded substring scan is rejected). No other filter combinations are required — calling the endpoint with no query parameters returns the latest events for the account, paginated. `page[size]` defaults to 1000 and must not exceed 1000. Pass `format=CSV` or `format=JSONL` to stream a download of the full filtered result set instead of a paginated JSON:API response. The download honors every supplied filter and ignores `page[size]` and `page[after]`.
|
|
110
111
|
# @param [Hash] opts the optional parameters
|
|
112
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
111
113
|
# @option opts [String] :filter_occurred_at
|
|
112
114
|
# @option opts [String] :filter_actor_type
|
|
113
115
|
# @option opts [String] :filter_actor_id
|
|
@@ -144,6 +146,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
144
146
|
|
|
145
147
|
# query parameters
|
|
146
148
|
query_params = opts[:query_params] || {}
|
|
149
|
+
query_params[:'filter[environment]'] = opts[:'filter_environment'] if !opts[:'filter_environment'].nil?
|
|
147
150
|
query_params[:'filter[occurred_at]'] = opts[:'filter_occurred_at'] if !opts[:'filter_occurred_at'].nil?
|
|
148
151
|
query_params[:'filter[actor_type]'] = opts[:'filter_actor_type'] if !opts[:'filter_actor_type'].nil?
|
|
149
152
|
query_params[:'filter[actor_id]'] = opts[:'filter_actor_id'] if !opts[:'filter_actor_id'].nil?
|
|
@@ -265,7 +268,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
265
268
|
end
|
|
266
269
|
|
|
267
270
|
# Search Events
|
|
268
|
-
# Search audit events with column filters and an optional JSON Logic expression. Scoped
|
|
271
|
+
# Search audit events with column filters and an optional JSON Logic expression. Scoped by `filter[environment]` (a comma-separated set). When omitted, a single-environment credential is implied; otherwise send the `X-Smplkit-Environment` header. The reserved `smplkit` value selects platform change events smplkit records about your own resources. Without a JSON Logic `filter`: behaves like `GET /api/v1/events` with the same column filters. With a JSON Logic `filter`: the search is silently capped to the last 30 days by `occurred_at` (intersected with any explicit `filter[occurred_at]` the caller supplied), the column filters narrow the candidate set in SQL, and the JSON Logic expression runs in memory against each candidate row using the same `json-logic-qubit` evaluator the forwarder pipeline uses. Up to 50,000 rows are scanned per request; the response's `meta.scan` block reports the scan stats so a selective filter doesn't look like \"0 matches\" when the truth is \"ceiling reached.\"
|
|
269
272
|
# @param event_search_request [EventSearchRequest]
|
|
270
273
|
# @param [Hash] opts the optional parameters
|
|
271
274
|
# @return [EventSearchResponse]
|
|
@@ -275,7 +278,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
275
278
|
end
|
|
276
279
|
|
|
277
280
|
# Search Events
|
|
278
|
-
# Search audit events with column filters and an optional JSON Logic expression. Scoped
|
|
281
|
+
# Search audit events with column filters and an optional JSON Logic expression. Scoped by `filter[environment]` (a comma-separated set). When omitted, a single-environment credential is implied; otherwise send the `X-Smplkit-Environment` header. The reserved `smplkit` value selects platform change events smplkit records about your own resources. Without a JSON Logic `filter`: behaves like `GET /api/v1/events` with the same column filters. With a JSON Logic `filter`: the search is silently capped to the last 30 days by `occurred_at` (intersected with any explicit `filter[occurred_at]` the caller supplied), the column filters narrow the candidate set in SQL, and the JSON Logic expression runs in memory against each candidate row using the same `json-logic-qubit` evaluator the forwarder pipeline uses. Up to 50,000 rows are scanned per request; the response's `meta.scan` block reports the scan stats so a selective filter doesn't look like \"0 matches\" when the truth is \"ceiling reached.\"
|
|
279
282
|
# @param event_search_request [EventSearchRequest]
|
|
280
283
|
# @param [Hash] opts the optional parameters
|
|
281
284
|
# @return [Array<(EventSearchResponse, Integer, Hash)>] EventSearchResponse data, response status code and response headers
|
|
@@ -20,8 +20,9 @@ module SmplkitGeneratedClient::Audit
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# List Resource Types
|
|
23
|
-
# List the distinct `resource_type` slugs recorded for this account. The resource `id` is the slug itself. Default sort is `key` ascending; pass `sort=-key` for descending. Useful for populating filter dropdowns in a UI. Results are scoped to the
|
|
23
|
+
# List the distinct `resource_type` slugs recorded for this account. The resource `id` is the slug itself. Default sort is `key` ascending; pass `sort=-key` for descending. Useful for populating filter dropdowns in a UI. Results are scoped to the selected environments (see `filter[environment]`); platform resource types appear under the reserved `smplkit` value.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
25
26
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
26
27
|
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
27
28
|
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
@@ -33,8 +34,9 @@ module SmplkitGeneratedClient::Audit
|
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
# List Resource Types
|
|
36
|
-
# List the distinct `resource_type` slugs recorded for this account. The resource `id` is the slug itself. Default sort is `key` ascending; pass `sort=-key` for descending. Useful for populating filter dropdowns in a UI. Results are scoped to the
|
|
37
|
+
# List the distinct `resource_type` slugs recorded for this account. The resource `id` is the slug itself. Default sort is `key` ascending; pass `sort=-key` for descending. Useful for populating filter dropdowns in a UI. Results are scoped to the selected environments (see `filter[environment]`); platform resource types appear under the reserved `smplkit` value.
|
|
37
38
|
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
38
40
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
39
41
|
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
40
42
|
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
@@ -53,6 +55,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
53
55
|
|
|
54
56
|
# query parameters
|
|
55
57
|
query_params = opts[:query_params] || {}
|
|
58
|
+
query_params[:'filter[environment]'] = opts[:'filter_environment'] if !opts[:'filter_environment'].nil?
|
|
56
59
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
57
60
|
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
58
61
|
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
@@ -19,6 +19,9 @@ module SmplkitGeneratedClient::Audit
|
|
|
19
19
|
# Optional JSON Logic expression evaluated against each row after column filters narrow the candidate set. Null, absent, or an empty object disables JSON Logic filtering. When present, the search is silently capped to the last 30 days by `occurred_at` (intersected with any explicit `filter[occurred_at]` the caller supplied).
|
|
20
20
|
attr_accessor :filter
|
|
21
21
|
|
|
22
|
+
# Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
23
|
+
attr_accessor :filter_environment
|
|
24
|
+
|
|
22
25
|
# Exact match on the event's `event_type` field.
|
|
23
26
|
attr_accessor :filter_event_type
|
|
24
27
|
|
|
@@ -62,6 +65,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
62
65
|
def self.attribute_map
|
|
63
66
|
{
|
|
64
67
|
:'filter' => :'filter',
|
|
68
|
+
:'filter_environment' => :'filter[environment]',
|
|
65
69
|
:'filter_event_type' => :'filter[event_type]',
|
|
66
70
|
:'filter_resource_type' => :'filter[resource_type]',
|
|
67
71
|
:'filter_resource_id' => :'filter[resource_id]',
|
|
@@ -92,6 +96,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
92
96
|
def self.openapi_types
|
|
93
97
|
{
|
|
94
98
|
:'filter' => :'Hash<String, Object>',
|
|
99
|
+
:'filter_environment' => :'String',
|
|
95
100
|
:'filter_event_type' => :'String',
|
|
96
101
|
:'filter_resource_type' => :'String',
|
|
97
102
|
:'filter_resource_id' => :'String',
|
|
@@ -112,6 +117,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
112
117
|
def self.openapi_nullable
|
|
113
118
|
Set.new([
|
|
114
119
|
:'filter',
|
|
120
|
+
:'filter_environment',
|
|
115
121
|
:'filter_event_type',
|
|
116
122
|
:'filter_resource_type',
|
|
117
123
|
:'filter_resource_id',
|
|
@@ -148,6 +154,10 @@ module SmplkitGeneratedClient::Audit
|
|
|
148
154
|
end
|
|
149
155
|
end
|
|
150
156
|
|
|
157
|
+
if attributes.key?(:'filter_environment')
|
|
158
|
+
self.filter_environment = attributes[:'filter_environment']
|
|
159
|
+
end
|
|
160
|
+
|
|
151
161
|
if attributes.key?(:'filter_event_type')
|
|
152
162
|
self.filter_event_type = attributes[:'filter_event_type']
|
|
153
163
|
end
|
|
@@ -254,6 +264,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
254
264
|
return true if self.equal?(o)
|
|
255
265
|
self.class == o.class &&
|
|
256
266
|
filter == o.filter &&
|
|
267
|
+
filter_environment == o.filter_environment &&
|
|
257
268
|
filter_event_type == o.filter_event_type &&
|
|
258
269
|
filter_resource_type == o.filter_resource_type &&
|
|
259
270
|
filter_resource_id == o.filter_resource_id &&
|
|
@@ -278,7 +289,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
278
289
|
# Calculates hash code according to all attributes.
|
|
279
290
|
# @return [Integer] Hash code
|
|
280
291
|
def hash
|
|
281
|
-
[filter, filter_event_type, filter_resource_type, filter_resource_id, filter_severity, filter_category, filter_actor_type, filter_actor_id, filter_occurred_at, filter_search, filter_do_not_forward, page_size, page_after, sort].hash
|
|
292
|
+
[filter, filter_environment, filter_event_type, filter_resource_type, filter_resource_id, filter_severity, filter_category, filter_actor_type, filter_actor_id, filter_occurred_at, filter_search, filter_do_not_forward, page_size, page_after, sort].hash
|
|
282
293
|
end
|
|
283
294
|
|
|
284
295
|
# Builds the object from hash
|
|
@@ -28,6 +28,9 @@ module SmplkitGeneratedClient::Audit
|
|
|
28
28
|
# Always false. Enablement is per-environment: a forwarder delivers in an environment only when `environments[<env>].enabled` is true. The base value is pinned false and cannot be set.
|
|
29
29
|
attr_accessor :enabled
|
|
30
30
|
|
|
31
|
+
# When true, this forwarder also receives platform change events that smplkit records about your own resources (flag, configuration, and similar changes). Each such event is delivered through every environment this forwarder is enabled in, using that environment's resolved configuration. Defaults to false — platform change events are not forwarded unless you opt in. Independent of the per-environment `enabled` settings, since platform change events are not tied to a deployment environment.
|
|
32
|
+
attr_accessor :forward_smplkit_events
|
|
33
|
+
|
|
31
34
|
# JSON Logic expression evaluated against each event. The event is delivered only if the expression returns truthy. Omit to deliver every event.
|
|
32
35
|
attr_accessor :filter
|
|
33
36
|
|
|
@@ -84,6 +87,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
84
87
|
:'description' => :'description',
|
|
85
88
|
:'forwarder_type' => :'forwarder_type',
|
|
86
89
|
:'enabled' => :'enabled',
|
|
90
|
+
:'forward_smplkit_events' => :'forward_smplkit_events',
|
|
87
91
|
:'filter' => :'filter',
|
|
88
92
|
:'transform_type' => :'transform_type',
|
|
89
93
|
:'transform' => :'transform',
|
|
@@ -113,6 +117,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
113
117
|
:'description' => :'String',
|
|
114
118
|
:'forwarder_type' => :'ForwarderType',
|
|
115
119
|
:'enabled' => :'Boolean',
|
|
120
|
+
:'forward_smplkit_events' => :'Boolean',
|
|
116
121
|
:'filter' => :'Hash<String, Object>',
|
|
117
122
|
:'transform_type' => :'String',
|
|
118
123
|
:'transform' => :'Object',
|
|
@@ -177,6 +182,12 @@ module SmplkitGeneratedClient::Audit
|
|
|
177
182
|
self.enabled = false
|
|
178
183
|
end
|
|
179
184
|
|
|
185
|
+
if attributes.key?(:'forward_smplkit_events')
|
|
186
|
+
self.forward_smplkit_events = attributes[:'forward_smplkit_events']
|
|
187
|
+
else
|
|
188
|
+
self.forward_smplkit_events = false
|
|
189
|
+
end
|
|
190
|
+
|
|
180
191
|
if attributes.key?(:'filter')
|
|
181
192
|
if (value = attributes[:'filter']).is_a?(Hash)
|
|
182
193
|
self.filter = value
|
|
@@ -334,6 +345,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
334
345
|
description == o.description &&
|
|
335
346
|
forwarder_type == o.forwarder_type &&
|
|
336
347
|
enabled == o.enabled &&
|
|
348
|
+
forward_smplkit_events == o.forward_smplkit_events &&
|
|
337
349
|
filter == o.filter &&
|
|
338
350
|
transform_type == o.transform_type &&
|
|
339
351
|
transform == o.transform &&
|
|
@@ -354,7 +366,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
354
366
|
# Calculates hash code according to all attributes.
|
|
355
367
|
# @return [Integer] Hash code
|
|
356
368
|
def hash
|
|
357
|
-
[name, description, forwarder_type, enabled, filter, transform_type, transform, configuration, environments, created_at, updated_at, deleted_at, version].hash
|
|
369
|
+
[name, description, forwarder_type, enabled, forward_smplkit_events, filter, transform_type, transform, configuration, environments, created_at, updated_at, deleted_at, version].hash
|
|
358
370
|
end
|
|
359
371
|
|
|
360
372
|
# Builds the object from hash
|
|
@@ -34,8 +34,9 @@ describe 'CategoriesApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for list_categories
|
|
36
36
|
# List Categories
|
|
37
|
-
# List the distinct `category` values recorded for this account. The resource `id` is the category value itself. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the
|
|
37
|
+
# List the distinct `category` values recorded for this account. The resource `id` is the category value itself. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the selected environments (see `filter[environment]`). Useful for populating filter dropdowns in a UI.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
39
40
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`.
|
|
40
41
|
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
|
|
41
42
|
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
|
|
@@ -34,8 +34,9 @@ describe 'EventTypesApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for list_event_types
|
|
36
36
|
# List Event Types
|
|
37
|
-
# List the distinct `event_type` slugs recorded for this account. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the
|
|
37
|
+
# List the distinct `event_type` slugs recorded for this account. Default sort is `key` ascending; pass `sort=-key` for descending. Scoped to the selected environments (see `filter[environment]`). Without `filter[resource_type]`, returns one row per distinct event_type. With `filter[resource_type]`, returns the event_types recorded for that specific resource type.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
39
40
|
# @option opts [String] :filter_resource_type
|
|
40
41
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`.
|
|
41
42
|
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
|
|
@@ -48,6 +48,7 @@ describe 'EventsApi' do
|
|
|
48
48
|
# List Events
|
|
49
49
|
# List audit events for this account. Default sort is `-occurred_at` (newest occurrence first). Sort by `occurred_at` or `created_at`, ascending or descending — keep the same `sort` value across paginated requests so the cursor stays consistent. Filters are exact-match except `filter[occurred_at]`, which uses interval notation (e.g. `[2026-01-01T00:00:00Z,2026-01-31T00:00:00Z)`), and `filter[search]`, which is a case-insensitive substring match against `resource_id` or `description`. Two filter-combination rules: - `filter[resource_id]` must be accompanied by `filter[resource_type]` (the index is keyed on the pair). - `filter[search]` must be accompanied by either `filter[occurred_at]` or `filter[resource_type]` + `filter[resource_id]` (substring matching has no index, so an unbounded substring scan is rejected). No other filter combinations are required — calling the endpoint with no query parameters returns the latest events for the account, paginated. `page[size]` defaults to 1000 and must not exceed 1000. Pass `format=CSV` or `format=JSONL` to stream a download of the full filtered result set instead of a paginated JSON:API response. The download honors every supplied filter and ignores `page[size]` and `page[after]`.
|
|
50
50
|
# @param [Hash] opts the optional parameters
|
|
51
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
51
52
|
# @option opts [String] :filter_occurred_at
|
|
52
53
|
# @option opts [String] :filter_actor_type
|
|
53
54
|
# @option opts [String] :filter_actor_id
|
|
@@ -84,7 +85,7 @@ describe 'EventsApi' do
|
|
|
84
85
|
|
|
85
86
|
# unit tests for search_events
|
|
86
87
|
# Search Events
|
|
87
|
-
# Search audit events with column filters and an optional JSON Logic expression. Scoped
|
|
88
|
+
# Search audit events with column filters and an optional JSON Logic expression. Scoped by `filter[environment]` (a comma-separated set). When omitted, a single-environment credential is implied; otherwise send the `X-Smplkit-Environment` header. The reserved `smplkit` value selects platform change events smplkit records about your own resources. Without a JSON Logic `filter`: behaves like `GET /api/v1/events` with the same column filters. With a JSON Logic `filter`: the search is silently capped to the last 30 days by `occurred_at` (intersected with any explicit `filter[occurred_at]` the caller supplied), the column filters narrow the candidate set in SQL, and the JSON Logic expression runs in memory against each candidate row using the same `json-logic-qubit` evaluator the forwarder pipeline uses. Up to 50,000 rows are scanned per request; the response's `meta.scan` block reports the scan stats so a selective filter doesn't look like \"0 matches\" when the truth is \"ceiling reached.\"
|
|
88
89
|
# @param event_search_request
|
|
89
90
|
# @param [Hash] opts the optional parameters
|
|
90
91
|
# @return [EventSearchResponse]
|
|
@@ -34,8 +34,9 @@ describe 'ResourceTypesApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for list_resource_types
|
|
36
36
|
# List Resource Types
|
|
37
|
-
# List the distinct `resource_type` slugs recorded for this account. The resource `id` is the slug itself. Default sort is `key` ascending; pass `sort=-key` for descending. Useful for populating filter dropdowns in a UI. Results are scoped to the
|
|
37
|
+
# List the distinct `resource_type` slugs recorded for this account. The resource `id` is the slug itself. Default sort is `key` ascending; pass `sort=-key` for descending. Useful for populating filter dropdowns in a UI. Results are scoped to the selected environments (see `filter[environment]`); platform resource types appear under the reserved `smplkit` value.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results are scoped to your single accessible environment; send the `X-Smplkit-Environment` header instead if you can access more than one. The reserved value `smplkit` selects platform change events that smplkit records about your own resources (flags, configuration, and so on); these are not tied to a deployment environment and are readable regardless of which environments you manage.
|
|
39
40
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`.
|
|
40
41
|
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
|
|
41
42
|
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
|
|
@@ -33,6 +33,12 @@ describe SmplkitGeneratedClient::Audit::EventSearchRequest do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "filter_environment"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
describe 'test attribute "filter_event_type"' do
|
|
37
43
|
it 'should work' do
|
|
38
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -51,6 +51,12 @@ describe SmplkitGeneratedClient::Audit::Forwarder do
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
describe 'test attribute "forward_smplkit_events"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
54
60
|
describe 'test attribute "filter"' do
|
|
55
61
|
it 'should work' do
|
|
56
62
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|