smplkit 3.0.66 → 3.0.67

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5625133c3c3fc48e8d783211e3ccfee90572775dbad53141ea6f809e8e79f0d
4
- data.tar.gz: c06c855003e82bfd116fcdec13430b64d199ef00a81e84b6b176d2bda42e104c
3
+ metadata.gz: 8ab0384b5d86bc72b6296269b6d818abd0530d67794d226aaffde6a7b58c029a
4
+ data.tar.gz: 257fca4a0040ff63072b55b12eabd68307e148a2da1512a73c0fc3d5455e5456
5
5
  SHA512:
6
- metadata.gz: e3483d8514c812a512d857eef02a591eb023e65c38c4408ffbbeba6be650ce9c058c42b6421934bdb37eb6a40730cc5a2659c5e042067edc54c604691601595f
7
- data.tar.gz: 065be639582028946d863d675b4000c49c34a96e377a15d4b23a484eb05bd95f812cc4815258c788fd68e233e71d8abe834655e70c8e575b9fb96c5cee5cbe73
6
+ metadata.gz: 3cc06e58e06ac7291bff7fe94faf83075d8e7de1039adddd38f006b0726237649fec024287d5a477bd7579fcef8af9ad45490f52263df5a774a7dc1ced993eb5
7
+ data.tar.gz: 206618c2701c02acfa3b542c7d33608097955e2f81fd60fb6880bcc77ea75f060568266eb8d94a848c48b136be72efa43418a786af1dfdf6ca6aadbfe76faa18
@@ -83,7 +83,7 @@ module SmplkitGeneratedClient::Audit
83
83
  end
84
84
 
85
85
  # List Events
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.
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
88
  # @option opts [String] :filter_occurred_at
89
89
  # @option opts [String] :filter_actor_type
@@ -95,6 +95,7 @@ module SmplkitGeneratedClient::Audit
95
95
  # @option opts [Boolean] :filter_do_not_forward When set, restrict to events whose `do_not_forward` flag matches the given boolean. Forwarder previews typically pass `false` to match live-pipeline semantics (events flagged `do_not_forward=true` are skipped by the forwarder pipeline).
96
96
  # @option opts [Integer] :page_size
97
97
  # @option opts [String] :page_after
98
+ # @option opts [String] :format When set, stream a download of the full filtered result set in the chosen format instead of returning a paginated JSON:API response. `page[size]` and `page[after]` are ignored in this mode; every event matching the supplied filters is emitted. `CSV` writes one row per event with the event payload (`data`) serialized as a single JSON-encoded cell. `JSONL` writes one JSON object per line with the event payload nested as a JSON object. Omit this parameter to receive the paginated JSON:API response.
98
99
  # @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-occurred_at`. Allowed values: `created_at`, `-created_at`, `occurred_at`, `-occurred_at`. (default to '-occurred_at')
99
100
  # @return [EventListResponse]
100
101
  def list_events(opts = {})
@@ -103,7 +104,7 @@ module SmplkitGeneratedClient::Audit
103
104
  end
104
105
 
105
106
  # List Events
106
- # 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.
107
+ # 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]`.
107
108
  # @param [Hash] opts the optional parameters
108
109
  # @option opts [String] :filter_occurred_at
109
110
  # @option opts [String] :filter_actor_type
@@ -115,6 +116,7 @@ module SmplkitGeneratedClient::Audit
115
116
  # @option opts [Boolean] :filter_do_not_forward When set, restrict to events whose `do_not_forward` flag matches the given boolean. Forwarder previews typically pass `false` to match live-pipeline semantics (events flagged `do_not_forward=true` are skipped by the forwarder pipeline).
116
117
  # @option opts [Integer] :page_size
117
118
  # @option opts [String] :page_after
119
+ # @option opts [String] :format When set, stream a download of the full filtered result set in the chosen format instead of returning a paginated JSON:API response. `page[size]` and `page[after]` are ignored in this mode; every event matching the supplied filters is emitted. `CSV` writes one row per event with the event payload (`data`) serialized as a single JSON-encoded cell. `JSONL` writes one JSON object per line with the event payload nested as a JSON object. Omit this parameter to receive the paginated JSON:API response.
118
120
  # @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-occurred_at`. Allowed values: `created_at`, `-created_at`, `occurred_at`, `-occurred_at`. (default to '-occurred_at')
119
121
  # @return [Array<(EventListResponse, Integer, Hash)>] EventListResponse data, response status code and response headers
120
122
  def list_events_with_http_info(opts = {})
@@ -125,6 +127,10 @@ module SmplkitGeneratedClient::Audit
125
127
  fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling EventsApi.list_events, must be greater than or equal to 1.'
126
128
  end
127
129
 
130
+ allowable_values = ["CSV", "JSONL"]
131
+ if @api_client.config.client_side_validation && opts[:'format'] && !allowable_values.include?(opts[:'format'])
132
+ fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
133
+ end
128
134
  allowable_values = ["created_at", "-created_at", "occurred_at", "-occurred_at"]
129
135
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
130
136
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -144,6 +150,7 @@ module SmplkitGeneratedClient::Audit
144
150
  query_params[:'filter[do_not_forward]'] = opts[:'filter_do_not_forward'] if !opts[:'filter_do_not_forward'].nil?
145
151
  query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
146
152
  query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
153
+ query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
147
154
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
148
155
 
149
156
  # header parameters
@@ -250,5 +257,73 @@ module SmplkitGeneratedClient::Audit
250
257
  end
251
258
  return data, status_code, headers
252
259
  end
260
+
261
+ # Search Events
262
+ # Search audit events with column filters and an optional JSON Logic expression. 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.\"
263
+ # @param event_search_request [EventSearchRequest]
264
+ # @param [Hash] opts the optional parameters
265
+ # @return [EventSearchResponse]
266
+ def search_events(event_search_request, opts = {})
267
+ data, _status_code, _headers = search_events_with_http_info(event_search_request, opts)
268
+ data
269
+ end
270
+
271
+ # Search Events
272
+ # Search audit events with column filters and an optional JSON Logic expression. Without a JSON Logic &#x60;filter&#x60;: behaves like &#x60;GET /api/v1/events&#x60; with the same column filters. With a JSON Logic &#x60;filter&#x60;: the search is silently capped to the last 30 days by &#x60;occurred_at&#x60; (intersected with any explicit &#x60;filter[occurred_at]&#x60; 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 &#x60;json-logic-qubit&#x60; evaluator the forwarder pipeline uses. Up to 50,000 rows are scanned per request; the response&#39;s &#x60;meta.scan&#x60; block reports the scan stats so a selective filter doesn&#39;t look like \&quot;0 matches\&quot; when the truth is \&quot;ceiling reached.\&quot;
273
+ # @param event_search_request [EventSearchRequest]
274
+ # @param [Hash] opts the optional parameters
275
+ # @return [Array<(EventSearchResponse, Integer, Hash)>] EventSearchResponse data, response status code and response headers
276
+ def search_events_with_http_info(event_search_request, opts = {})
277
+ if @api_client.config.debugging
278
+ @api_client.config.logger.debug 'Calling API: EventsApi.search_events ...'
279
+ end
280
+ # verify the required parameter 'event_search_request' is set
281
+ if @api_client.config.client_side_validation && event_search_request.nil?
282
+ fail ArgumentError, "Missing the required parameter 'event_search_request' when calling EventsApi.search_events"
283
+ end
284
+ # resource path
285
+ local_var_path = '/api/v1/events/search'
286
+
287
+ # query parameters
288
+ query_params = opts[:query_params] || {}
289
+
290
+ # header parameters
291
+ header_params = opts[:header_params] || {}
292
+ # HTTP header 'Accept' (if needed)
293
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
294
+ # HTTP header 'Content-Type'
295
+ content_type = @api_client.select_header_content_type(['application/json'])
296
+ if !content_type.nil?
297
+ header_params['Content-Type'] = content_type
298
+ end
299
+
300
+ # form parameters
301
+ form_params = opts[:form_params] || {}
302
+
303
+ # http body (model)
304
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(event_search_request)
305
+
306
+ # return_type
307
+ return_type = opts[:debug_return_type] || 'EventSearchResponse'
308
+
309
+ # auth_names
310
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
311
+
312
+ new_options = opts.merge(
313
+ :operation => :"EventsApi.search_events",
314
+ :header_params => header_params,
315
+ :query_params => query_params,
316
+ :form_params => form_params,
317
+ :body => post_body,
318
+ :auth_names => auth_names,
319
+ :return_type => return_type
320
+ )
321
+
322
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
323
+ if @api_client.config.debugging
324
+ @api_client.config.logger.debug "API called: EventsApi#search_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
325
+ end
326
+ return data, status_code, headers
327
+ end
253
328
  end
254
329
  end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::Audit
17
- # Request body for ``POST /api/v1/search/events``. Mirrors every column filter accepted by ``GET /api/v1/events`` with identical semantics, and adds a top-level ``filter`` field carrying a JSON Logic expression. When ``filter`` is present the search is silently capped to the last 30 days by ``occurred_at``; the expression is then evaluated in memory against each row that passes the column filters using the same ``json-logic-qubit`` evaluator that runs in the forwarder pipeline (so search results match what would be forwarded). Filter-combination rules match ``GET /api/v1/events`` exactly: - ``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.
17
+ # Request body for ``POST /api/v1/events/search``. Mirrors every column filter accepted by ``GET /api/v1/events`` with identical semantics, and adds a top-level ``filter`` field carrying a JSON Logic expression. When ``filter`` is present the search is silently capped to the last 30 days by ``occurred_at``; the expression is then evaluated in memory against each row that passes the column filters using the same ``json-logic-qubit`` evaluator that runs in the forwarder pipeline (so search results match what would be forwarded). Filter-combination rules match ``GET /api/v1/events`` exactly: - ``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.
18
18
  class EventSearchRequest < ApiModelBase
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
@@ -75,7 +75,6 @@ require 'smplkit_audit_client/api/events_api'
75
75
  require 'smplkit_audit_client/api/forwarder_types_api'
76
76
  require 'smplkit_audit_client/api/forwarders_api'
77
77
  require 'smplkit_audit_client/api/resource_types_api'
78
- require 'smplkit_audit_client/api/search_api'
79
78
  require 'smplkit_audit_client/api/usage_api'
80
79
 
81
80
  module SmplkitGeneratedClient::Audit
@@ -46,7 +46,7 @@ describe 'EventsApi' do
46
46
 
47
47
  # unit tests for list_events
48
48
  # List Events
49
- # List audit events for this account. Default sort is &#x60;-occurred_at&#x60; (newest occurrence first). Sort by &#x60;occurred_at&#x60; or &#x60;created_at&#x60;, ascending or descending — keep the same &#x60;sort&#x60; value across paginated requests so the cursor stays consistent. Filters are exact-match except &#x60;filter[occurred_at]&#x60;, which uses interval notation (e.g. &#x60;[2026-01-01T00:00:00Z,2026-01-31T00:00:00Z)&#x60;), and &#x60;filter[search]&#x60;, which is a case-insensitive substring match against &#x60;resource_id&#x60; or &#x60;description&#x60;. Two filter-combination rules: - &#x60;filter[resource_id]&#x60; must be accompanied by &#x60;filter[resource_type]&#x60; (the index is keyed on the pair). - &#x60;filter[search]&#x60; must be accompanied by either &#x60;filter[occurred_at]&#x60; or &#x60;filter[resource_type]&#x60; + &#x60;filter[resource_id]&#x60; (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. &#x60;page[size]&#x60; defaults to 1000 and must not exceed 1000.
49
+ # List audit events for this account. Default sort is &#x60;-occurred_at&#x60; (newest occurrence first). Sort by &#x60;occurred_at&#x60; or &#x60;created_at&#x60;, ascending or descending — keep the same &#x60;sort&#x60; value across paginated requests so the cursor stays consistent. Filters are exact-match except &#x60;filter[occurred_at]&#x60;, which uses interval notation (e.g. &#x60;[2026-01-01T00:00:00Z,2026-01-31T00:00:00Z)&#x60;), and &#x60;filter[search]&#x60;, which is a case-insensitive substring match against &#x60;resource_id&#x60; or &#x60;description&#x60;. Two filter-combination rules: - &#x60;filter[resource_id]&#x60; must be accompanied by &#x60;filter[resource_type]&#x60; (the index is keyed on the pair). - &#x60;filter[search]&#x60; must be accompanied by either &#x60;filter[occurred_at]&#x60; or &#x60;filter[resource_type]&#x60; + &#x60;filter[resource_id]&#x60; (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. &#x60;page[size]&#x60; defaults to 1000 and must not exceed 1000. Pass &#x60;format&#x3D;CSV&#x60; or &#x60;format&#x3D;JSONL&#x60; 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 &#x60;page[size]&#x60; and &#x60;page[after]&#x60;.
50
50
  # @param [Hash] opts the optional parameters
51
51
  # @option opts [String] :filter_occurred_at
52
52
  # @option opts [String] :filter_actor_type
@@ -58,6 +58,7 @@ describe 'EventsApi' do
58
58
  # @option opts [Boolean] :filter_do_not_forward When set, restrict to events whose &#x60;do_not_forward&#x60; flag matches the given boolean. Forwarder previews typically pass &#x60;false&#x60; to match live-pipeline semantics (events flagged &#x60;do_not_forward&#x3D;true&#x60; are skipped by the forwarder pipeline).
59
59
  # @option opts [Integer] :page_size
60
60
  # @option opts [String] :page_after
61
+ # @option opts [String] :format When set, stream a download of the full filtered result set in the chosen format instead of returning a paginated JSON:API response. &#x60;page[size]&#x60; and &#x60;page[after]&#x60; are ignored in this mode; every event matching the supplied filters is emitted. &#x60;CSV&#x60; writes one row per event with the event payload (&#x60;data&#x60;) serialized as a single JSON-encoded cell. &#x60;JSONL&#x60; writes one JSON object per line with the event payload nested as a JSON object. Omit this parameter to receive the paginated JSON:API response.
61
62
  # @option opts [String] :sort Field to sort by. Prefix with &#x60;-&#x60; for descending order. Default: &#x60;-occurred_at&#x60;. Allowed values: &#x60;created_at&#x60;, &#x60;-created_at&#x60;, &#x60;occurred_at&#x60;, &#x60;-occurred_at&#x60;.
62
63
  # @return [EventListResponse]
63
64
  describe 'list_events test' do
@@ -79,4 +80,16 @@ describe 'EventsApi' do
79
80
  end
80
81
  end
81
82
 
83
+ # unit tests for search_events
84
+ # Search Events
85
+ # Search audit events with column filters and an optional JSON Logic expression. Without a JSON Logic &#x60;filter&#x60;: behaves like &#x60;GET /api/v1/events&#x60; with the same column filters. With a JSON Logic &#x60;filter&#x60;: the search is silently capped to the last 30 days by &#x60;occurred_at&#x60; (intersected with any explicit &#x60;filter[occurred_at]&#x60; 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 &#x60;json-logic-qubit&#x60; evaluator the forwarder pipeline uses. Up to 50,000 rows are scanned per request; the response&#39;s &#x60;meta.scan&#x60; block reports the scan stats so a selective filter doesn&#39;t look like \&quot;0 matches\&quot; when the truth is \&quot;ceiling reached.\&quot;
86
+ # @param event_search_request
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [EventSearchResponse]
89
+ describe 'search_events test' do
90
+ it 'should work' do
91
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
92
+ end
93
+ end
94
+
82
95
  end
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.66
4
+ version: 3.0.67
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smpl Solutions LLC
@@ -488,7 +488,6 @@ files:
488
488
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/forwarder_types_api.rb
489
489
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/forwarders_api.rb
490
490
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/resource_types_api.rb
491
- - lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/search_api.rb
492
491
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/usage_api.rb
493
492
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/api_client.rb
494
493
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/api_error.rb
@@ -550,7 +549,6 @@ files:
550
549
  - lib/smplkit/_generated/audit/spec/api/forwarder_types_api_spec.rb
551
550
  - lib/smplkit/_generated/audit/spec/api/forwarders_api_spec.rb
552
551
  - lib/smplkit/_generated/audit/spec/api/resource_types_api_spec.rb
553
- - lib/smplkit/_generated/audit/spec/api/search_api_spec.rb
554
552
  - lib/smplkit/_generated/audit/spec/api/usage_api_spec.rb
555
553
  - lib/smplkit/_generated/audit/spec/models/event_list_links_spec.rb
556
554
  - lib/smplkit/_generated/audit/spec/models/event_list_meta_spec.rb
@@ -1,90 +0,0 @@
1
- =begin
2
- #smplkit Audit API
3
-
4
- #Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
5
-
6
- The version of the OpenAPI document: 0.1.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.22.0
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module SmplkitGeneratedClient::Audit
16
- class SearchApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Search Events
23
- # Search audit events with column filters and an optional JSON Logic expression. 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.\"
24
- # @param event_search_request [EventSearchRequest]
25
- # @param [Hash] opts the optional parameters
26
- # @return [EventSearchResponse]
27
- def search_events(event_search_request, opts = {})
28
- data, _status_code, _headers = search_events_with_http_info(event_search_request, opts)
29
- data
30
- end
31
-
32
- # Search Events
33
- # Search audit events with column filters and an optional JSON Logic expression. Without a JSON Logic &#x60;filter&#x60;: behaves like &#x60;GET /api/v1/events&#x60; with the same column filters. With a JSON Logic &#x60;filter&#x60;: the search is silently capped to the last 30 days by &#x60;occurred_at&#x60; (intersected with any explicit &#x60;filter[occurred_at]&#x60; 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 &#x60;json-logic-qubit&#x60; evaluator the forwarder pipeline uses. Up to 50,000 rows are scanned per request; the response&#39;s &#x60;meta.scan&#x60; block reports the scan stats so a selective filter doesn&#39;t look like \&quot;0 matches\&quot; when the truth is \&quot;ceiling reached.\&quot;
34
- # @param event_search_request [EventSearchRequest]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(EventSearchResponse, Integer, Hash)>] EventSearchResponse data, response status code and response headers
37
- def search_events_with_http_info(event_search_request, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: SearchApi.search_events ...'
40
- end
41
- # verify the required parameter 'event_search_request' is set
42
- if @api_client.config.client_side_validation && event_search_request.nil?
43
- fail ArgumentError, "Missing the required parameter 'event_search_request' when calling SearchApi.search_events"
44
- end
45
- # resource path
46
- local_var_path = '/api/v1/search/events'
47
-
48
- # query parameters
49
- query_params = opts[:query_params] || {}
50
-
51
- # header parameters
52
- header_params = opts[:header_params] || {}
53
- # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
- # HTTP header 'Content-Type'
56
- content_type = @api_client.select_header_content_type(['application/json'])
57
- if !content_type.nil?
58
- header_params['Content-Type'] = content_type
59
- end
60
-
61
- # form parameters
62
- form_params = opts[:form_params] || {}
63
-
64
- # http body (model)
65
- post_body = opts[:debug_body] || @api_client.object_to_http_body(event_search_request)
66
-
67
- # return_type
68
- return_type = opts[:debug_return_type] || 'EventSearchResponse'
69
-
70
- # auth_names
71
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
72
-
73
- new_options = opts.merge(
74
- :operation => :"SearchApi.search_events",
75
- :header_params => header_params,
76
- :query_params => query_params,
77
- :form_params => form_params,
78
- :body => post_body,
79
- :auth_names => auth_names,
80
- :return_type => return_type
81
- )
82
-
83
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
- if @api_client.config.debugging
85
- @api_client.config.logger.debug "API called: SearchApi#search_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
- end
87
- return data, status_code, headers
88
- end
89
- end
90
- end
@@ -1,47 +0,0 @@
1
- =begin
2
- #smplkit Audit API
3
-
4
- #Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
5
-
6
- The version of the OpenAPI document: 0.1.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.22.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for SmplkitGeneratedClient::Audit::SearchApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'SearchApi' do
20
- before do
21
- # run before each test
22
- @api_instance = SmplkitGeneratedClient::Audit::SearchApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of SearchApi' do
30
- it 'should create an instance of SearchApi' do
31
- expect(@api_instance).to be_instance_of(SmplkitGeneratedClient::Audit::SearchApi)
32
- end
33
- end
34
-
35
- # unit tests for search_events
36
- # Search Events
37
- # Search audit events with column filters and an optional JSON Logic expression. Without a JSON Logic &#x60;filter&#x60;: behaves like &#x60;GET /api/v1/events&#x60; with the same column filters. With a JSON Logic &#x60;filter&#x60;: the search is silently capped to the last 30 days by &#x60;occurred_at&#x60; (intersected with any explicit &#x60;filter[occurred_at]&#x60; 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 &#x60;json-logic-qubit&#x60; evaluator the forwarder pipeline uses. Up to 50,000 rows are scanned per request; the response&#39;s &#x60;meta.scan&#x60; block reports the scan stats so a selective filter doesn&#39;t look like \&quot;0 matches\&quot; when the truth is \&quot;ceiling reached.\&quot;
38
- # @param event_search_request
39
- # @param [Hash] opts the optional parameters
40
- # @return [EventSearchResponse]
41
- describe 'search_events test' do
42
- it 'should work' do
43
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
- end
45
- end
46
-
47
- end