smplkit 3.0.93 → 3.0.95
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 +2 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/event_types_api.rb +2 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/events_api.rb +4 -4
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/resource_types_api.rb +2 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_search_request.rb +1 -1
- data/lib/smplkit/_generated/audit/spec/api/categories_api_spec.rb +1 -1
- data/lib/smplkit/_generated/audit/spec/api/event_types_api_spec.rb +1 -1
- data/lib/smplkit/_generated/audit/spec/api/events_api_spec.rb +2 -2
- data/lib/smplkit/_generated/audit/spec/api/resource_types_api_spec.rb +1 -1
- data/lib/smplkit/audit/client.rb +1 -0
- data/lib/smplkit/http_pool.rb +39 -0
- data/lib/smplkit/management/client.rb +1 -0
- data/lib/smplkit.rb +1 -0
- metadata +22 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: daa3b1ae6cdf8922badb57509c04e16d007372f82b95661de9f223602f174a2b
|
|
4
|
+
data.tar.gz: d03104fec0c8f27c9d5942821b8c49143d6321f4b9790da7be91f7a2aef55ddf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86ef3645c6d7c44b4afd90ac2948762a3ff4d2d2df6076fb524f6f636cac2d0b0335d55e4bd3a6fac974933f65f332a2754eac9ac417d2aff91ab4b7bc57c874
|
|
7
|
+
data.tar.gz: 786ad2e7704b39d79090c51b6fc4663e6072fda4e1e3d51fb70abbb272f951a17246351a7a0600c4e56d9c696c82f486f2fda490398a9e0e4aa0e1be4c728c1e
|
|
@@ -22,7 +22,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
22
22
|
# List Categories
|
|
23
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
|
|
25
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
26
26
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
27
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)
|
|
28
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)
|
|
@@ -36,7 +36,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
36
36
|
# List Categories
|
|
37
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
|
|
39
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
40
40
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
41
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)
|
|
42
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)
|
|
@@ -22,7 +22,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
22
22
|
# List Event Types
|
|
23
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
|
|
25
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
26
26
|
# @option opts [String] :filter_resource_type
|
|
27
27
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
28
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)
|
|
@@ -37,7 +37,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
37
37
|
# List Event Types
|
|
38
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.
|
|
39
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
|
|
40
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
41
41
|
# @option opts [String] :filter_resource_type
|
|
42
42
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
43
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)
|
|
@@ -85,7 +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
|
|
88
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
89
89
|
# @option opts [String] :filter_occurred_at
|
|
90
90
|
# @option opts [String] :filter_actor_type
|
|
91
91
|
# @option opts [String] :filter_actor_id
|
|
@@ -109,7 +109,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
109
109
|
# List Events
|
|
110
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]`.
|
|
111
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
|
|
112
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
113
113
|
# @option opts [String] :filter_occurred_at
|
|
114
114
|
# @option opts [String] :filter_actor_type
|
|
115
115
|
# @option opts [String] :filter_actor_id
|
|
@@ -268,7 +268,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
268
268
|
end
|
|
269
269
|
|
|
270
270
|
# Search Events
|
|
271
|
-
# Search audit events with column filters and an optional JSON Logic expression. Scoped by `filter[environment]` (a comma-separated set). When omitted,
|
|
271
|
+
# Search audit events with column filters and an optional JSON Logic expression. Scoped by `filter[environment]` (a comma-separated set). When omitted, results cover every environment you can access. The reserved `smplkit` value selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402. 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.\"
|
|
272
272
|
# @param event_search_request [EventSearchRequest]
|
|
273
273
|
# @param [Hash] opts the optional parameters
|
|
274
274
|
# @return [EventSearchResponse]
|
|
@@ -278,7 +278,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
278
278
|
end
|
|
279
279
|
|
|
280
280
|
# Search Events
|
|
281
|
-
# Search audit events with column filters and an optional JSON Logic expression. Scoped by `filter[environment]` (a comma-separated set). When omitted,
|
|
281
|
+
# Search audit events with column filters and an optional JSON Logic expression. Scoped by `filter[environment]` (a comma-separated set). When omitted, results cover every environment you can access. The reserved `smplkit` value selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402. 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.\"
|
|
282
282
|
# @param event_search_request [EventSearchRequest]
|
|
283
283
|
# @param [Hash] opts the optional parameters
|
|
284
284
|
# @return [Array<(EventSearchResponse, Integer, Hash)>] EventSearchResponse data, response status code and response headers
|
|
@@ -22,7 +22,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
22
22
|
# List Resource Types
|
|
23
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
|
|
25
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
26
26
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
27
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)
|
|
28
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)
|
|
@@ -36,7 +36,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
36
36
|
# List Resource Types
|
|
37
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
|
|
39
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
40
40
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
|
|
41
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)
|
|
42
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)
|
|
@@ -19,7 +19,7 @@ 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
|
|
22
|
+
# Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
23
23
|
attr_accessor :filter_environment
|
|
24
24
|
|
|
25
25
|
# Exact match on the event's `event_type` field.
|
|
@@ -36,7 +36,7 @@ describe 'CategoriesApi' do
|
|
|
36
36
|
# List Categories
|
|
37
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
|
|
39
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
40
40
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`.
|
|
41
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.
|
|
42
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.
|
|
@@ -36,7 +36,7 @@ describe 'EventTypesApi' do
|
|
|
36
36
|
# List Event Types
|
|
37
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
|
|
39
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
40
40
|
# @option opts [String] :filter_resource_type
|
|
41
41
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`.
|
|
42
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,7 +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
|
|
51
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
52
52
|
# @option opts [String] :filter_occurred_at
|
|
53
53
|
# @option opts [String] :filter_actor_type
|
|
54
54
|
# @option opts [String] :filter_actor_id
|
|
@@ -85,7 +85,7 @@ describe 'EventsApi' do
|
|
|
85
85
|
|
|
86
86
|
# unit tests for search_events
|
|
87
87
|
# Search Events
|
|
88
|
-
# Search audit events with column filters and an optional JSON Logic expression. Scoped by `filter[environment]` (a comma-separated set). When omitted,
|
|
88
|
+
# Search audit events with column filters and an optional JSON Logic expression. Scoped by `filter[environment]` (a comma-separated set). When omitted, results cover every environment you can access. The reserved `smplkit` value selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402. 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.\"
|
|
89
89
|
# @param event_search_request
|
|
90
90
|
# @param [Hash] opts the optional parameters
|
|
91
91
|
# @return [EventSearchResponse]
|
|
@@ -36,7 +36,7 @@ describe 'ResourceTypesApi' do
|
|
|
36
36
|
# List Resource Types
|
|
37
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
|
|
39
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope results to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects platform change events smplkit records about your own resources; it is included by default when your plan grants change history, and requesting it explicitly without that entitlement returns 402.
|
|
40
40
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`.
|
|
41
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.
|
|
42
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.
|
data/lib/smplkit/audit/client.rb
CHANGED
|
@@ -23,6 +23,7 @@ module Smplkit
|
|
|
23
23
|
cfg.scheme = URI.parse(base_url).scheme
|
|
24
24
|
cfg.access_token = api_key
|
|
25
25
|
cfg.timeout = timeout
|
|
26
|
+
HttpPool.configure(cfg)
|
|
26
27
|
api_client = SmplkitGeneratedClient::Audit::ApiClient.new(cfg)
|
|
27
28
|
api_client.default_headers["User-Agent"] = "smplkit-ruby-sdk/#{Smplkit::VERSION}"
|
|
28
29
|
# Runtime audit ops are environment-scoped: record / list / get /
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "faraday/net_http_persistent"
|
|
4
|
+
|
|
5
|
+
module Smplkit
|
|
6
|
+
# Keepalive connection pooling shared by every generated client.
|
|
7
|
+
#
|
|
8
|
+
# The openapi-generator Ruby/Faraday template builds each client's Faraday
|
|
9
|
+
# connection with the default +net/http+ adapter. That adapter
|
|
10
|
+
# (faraday-net_http) drives every request through the block form of
|
|
11
|
+
# +Net::HTTP#start+, which opens the socket — including the TLS handshake
|
|
12
|
+
# for https — runs a single request, then closes the socket on block exit.
|
|
13
|
+
# A long-lived SDK client making many calls would therefore pay a fresh
|
|
14
|
+
# DNS + TCP + TLS setup on *every* call, even though the
|
|
15
|
+
# +Faraday::Connection+ object itself is memoized
|
|
16
|
+
# (+@connection_regular ||= build_connection+).
|
|
17
|
+
#
|
|
18
|
+
# We swap in the +net_http_persistent+ adapter, which holds a keepalive
|
|
19
|
+
# connection pool open and reuses sockets across requests. The generated
|
|
20
|
+
# +ApiClient#build_connection+ runs +config.configure_connection(conn)+
|
|
21
|
+
# *after* it sets the default adapter, and Faraday's builder lets +adapter+
|
|
22
|
+
# be called again to replace the previous one — so registering a
|
|
23
|
+
# +configure_faraday_connection+ block is enough to override the adapter
|
|
24
|
+
# without editing generated code (which is overwritten on regeneration).
|
|
25
|
+
# The memoized connection means the pool is built once per client and
|
|
26
|
+
# reused for its lifetime.
|
|
27
|
+
module HttpPool
|
|
28
|
+
module_function
|
|
29
|
+
|
|
30
|
+
# Register the keepalive-pooling adapter on a generated client
|
|
31
|
+
# +Configuration+. Returns the configuration so callers can chain.
|
|
32
|
+
def configure(configuration)
|
|
33
|
+
configuration.configure_faraday_connection do |conn|
|
|
34
|
+
conn.adapter :net_http_persistent
|
|
35
|
+
end
|
|
36
|
+
configuration
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -97,6 +97,7 @@ module Smplkit
|
|
|
97
97
|
configuration.base_path = ""
|
|
98
98
|
configuration.access_token = cfg.api_key
|
|
99
99
|
configuration.debugging = cfg.debug
|
|
100
|
+
HttpPool.configure(configuration)
|
|
100
101
|
generated_module::ApiClient.new(configuration).tap do |client|
|
|
101
102
|
client.default_headers["User-Agent"] = "smplkit-ruby-sdk/#{Smplkit::VERSION}"
|
|
102
103
|
@extra_headers&.each do |k, v|
|
data/lib/smplkit.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smplkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.95
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Smpl Solutions LLC
|
|
@@ -111,6 +111,26 @@ dependencies:
|
|
|
111
111
|
- - "~>"
|
|
112
112
|
- !ruby/object:Gem::Version
|
|
113
113
|
version: '1.0'
|
|
114
|
+
- !ruby/object:Gem::Dependency
|
|
115
|
+
name: faraday-net_http_persistent
|
|
116
|
+
requirement: !ruby/object:Gem::Requirement
|
|
117
|
+
requirements:
|
|
118
|
+
- - ">="
|
|
119
|
+
- !ruby/object:Gem::Version
|
|
120
|
+
version: '2.0'
|
|
121
|
+
- - "<"
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: '3'
|
|
124
|
+
type: :runtime
|
|
125
|
+
prerelease: false
|
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
- - ">="
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
version: '2.0'
|
|
131
|
+
- - "<"
|
|
132
|
+
- !ruby/object:Gem::Version
|
|
133
|
+
version: '3'
|
|
114
134
|
- !ruby/object:Gem::Dependency
|
|
115
135
|
name: json_logic
|
|
116
136
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -880,6 +900,7 @@ files:
|
|
|
880
900
|
- lib/smplkit/flags/types.rb
|
|
881
901
|
- lib/smplkit/generators/install_generator.rb
|
|
882
902
|
- lib/smplkit/helpers.rb
|
|
903
|
+
- lib/smplkit/http_pool.rb
|
|
883
904
|
- lib/smplkit/jobs/models.rb
|
|
884
905
|
- lib/smplkit/log_level.rb
|
|
885
906
|
- lib/smplkit/logging/adapters/base.rb
|