smplkit 2.0.14 → 2.0.15

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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/actions_api.rb +2 -69
  3. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/events_api.rb +17 -17
  4. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/forwarders_api.rb +36 -36
  5. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/functions_api.rb +2 -2
  6. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/resource_types_api.rb +2 -72
  7. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/usage_api.rb +4 -4
  8. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event.rb +12 -2
  9. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_list_response.rb +1 -1
  10. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_request.rb +165 -0
  11. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_resource.rb +2 -18
  12. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_response.rb +1 -1
  13. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder.rb +17 -17
  14. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery.rb +11 -1
  15. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_list_response.rb +1 -0
  16. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_resource.rb +1 -0
  17. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_response.rb +1 -0
  18. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_http.rb +40 -1
  19. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_response.rb +1 -0
  20. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_request.rb +165 -0
  21. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_resource.rb +2 -17
  22. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_response.rb +1 -0
  23. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/http_header.rb +3 -1
  24. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/retry_failed_deliveries_summary.rb +4 -0
  25. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_request.rb +41 -1
  26. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_response.rb +7 -1
  27. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/usage_attributes.rb +4 -1
  28. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/wipe_response.rb +3 -0
  29. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/wipe_tables_summary.rb +7 -0
  30. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +2 -0
  31. data/lib/smplkit/_generated/audit/spec/api/actions_api_spec.rb +1 -14
  32. data/lib/smplkit/_generated/audit/spec/api/events_api_spec.rb +5 -5
  33. data/lib/smplkit/_generated/audit/spec/api/forwarders_api_spec.rb +11 -11
  34. data/lib/smplkit/_generated/audit/spec/api/functions_api_spec.rb +1 -1
  35. data/lib/smplkit/_generated/audit/spec/api/resource_types_api_spec.rb +1 -15
  36. data/lib/smplkit/_generated/audit/spec/api/usage_api_spec.rb +2 -2
  37. data/lib/smplkit/_generated/audit/spec/models/event_request_spec.rb +36 -0
  38. data/lib/smplkit/_generated/audit/spec/models/forwarder_http_spec.rb +4 -0
  39. data/lib/smplkit/_generated/audit/spec/models/forwarder_request_spec.rb +36 -0
  40. data/lib/smplkit/_generated/audit/spec/models/forwarder_spec.rb +0 -6
  41. data/lib/smplkit/_generated/audit/spec/models/test_forwarder_request_spec.rb +4 -0
  42. data/lib/smplkit/audit/actions.rb +35 -0
  43. data/lib/smplkit/audit/client.rb +11 -9
  44. data/lib/smplkit/audit/events.rb +8 -45
  45. data/lib/smplkit/audit/models.rb +197 -0
  46. data/lib/smplkit/audit/resource_types.rb +30 -0
  47. data/lib/smplkit/errors.rb +5 -0
  48. data/lib/smplkit/management/audit.rb +111 -0
  49. data/lib/smplkit/management/client.rb +4 -1
  50. data/lib/smplkit.rb +7 -5
  51. metadata +9 -3
  52. data/lib/smplkit/audit/forwarders.rb +0 -282
  53. data/lib/smplkit/audit/functions.rb +0 -58
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cabb5a834e2ad1fbd07f37cec7079c2a2ef5cf34b9df9da510b6379fac0e47c
4
- data.tar.gz: 6d6db271c08f2687eb2c7106be1311567d121e5a1062bc29ecf9ded909c7ddc3
3
+ metadata.gz: '089c3681a2a6ab53ff601a2a7ec6eadf5c2e3fa4caf2237c240f3418d66937bf'
4
+ data.tar.gz: 9e7e76900a0040166abe65247e66444cd22d20162b9e8b5992508959ea4a1e36
5
5
  SHA512:
6
- metadata.gz: 5cc0a9c24c531ec24d3b1d7da6dae7158195e97d4622ac5533cf349a43a7de53a85ac85bc3259e7463a8ab658a2facdf391212636cf9269e79d64132c8b6b59a
7
- data.tar.gz: 731ddca19710d25548ea9c6e02151324a2c3b4ecfa90071e957cbbcfed0547fd3f989793a524a73562782426148b0ce41c43c8898bd68baa5f7b0c244bc0e348
6
+ metadata.gz: e87ac1bc2f4ec363ad06adeb2c24b023b0b64cde4282200716bafc2f010ad8fd9d3393ec58223d263a8aaed451c969ab35e9b876933e61b81f401aacb6a087aa
7
+ data.tar.gz: 1d9e39e3b1d65f82266dae4c1c31f462f2741701f56ae009ecfa06b4234163464f1d99cb38f8f4aa7e90167cce3f1ce5d4977afd1410139816013b2fa0db6196
@@ -20,7 +20,7 @@ module SmplkitGeneratedClient::Audit
20
20
  @api_client = api_client
21
21
  end
22
22
  # List Actions
23
- # List the distinct ``action`` slugs seen in the account. Without ``filter[resource_type]``, returns one row per distinct action — the same action may have been recorded with multiple resource types and the unfiltered dropdown shows it once. With ``filter[resource_type]``, returns the actions seen with that specific resource type, powering the Activity tab's cascading filter behavior.
23
+ # List the distinct `action` slugs recorded for this account. Without `filter[resource_type]`, returns one row per distinct action. With `filter[resource_type]`, returns the actions recorded for that specific resource type.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [String] :filter_resource_type
26
26
  # @option opts [Integer] :page_size
@@ -32,7 +32,7 @@ module SmplkitGeneratedClient::Audit
32
32
  end
33
33
 
34
34
  # List Actions
35
- # List the distinct ``action`` slugs seen in the account. Without ``filter[resource_type]``, returns one row per distinct action — the same action may have been recorded with multiple resource types and the unfiltered dropdown shows it once. With ``filter[resource_type]``, returns the actions seen with that specific resource type, powering the Activity tab's cascading filter behavior.
35
+ # List the distinct `action` slugs recorded for this account. Without `filter[resource_type]`, returns one row per distinct action. With `filter[resource_type]`, returns the actions recorded for that specific resource type.
36
36
  # @param [Hash] opts the optional parameters
37
37
  # @option opts [String] :filter_resource_type
38
38
  # @option opts [Integer] :page_size
@@ -88,72 +88,5 @@ module SmplkitGeneratedClient::Audit
88
88
  end
89
89
  return data, status_code, headers
90
90
  end
91
-
92
- # List Resource Types
93
- # List the distinct ``resource_type`` slugs seen in the account. Each row's ``id`` is the slug itself, mirroring the smplkit convention of using customer-provided identifiers as the public-facing resource id (ADR-014).
94
- # @param [Hash] opts the optional parameters
95
- # @option opts [Integer] :page_size
96
- # @option opts [String] :page_after
97
- # @return [ResourceTypeListResponse]
98
- def list_resource_types(opts = {})
99
- data, _status_code, _headers = list_resource_types_with_http_info(opts)
100
- data
101
- end
102
-
103
- # List Resource Types
104
- # List the distinct ``resource_type`` slugs seen in the account. Each row's ``id`` is the slug itself, mirroring the smplkit convention of using customer-provided identifiers as the public-facing resource id (ADR-014).
105
- # @param [Hash] opts the optional parameters
106
- # @option opts [Integer] :page_size
107
- # @option opts [String] :page_after
108
- # @return [Array<(ResourceTypeListResponse, Integer, Hash)>] ResourceTypeListResponse data, response status code and response headers
109
- def list_resource_types_with_http_info(opts = {})
110
- if @api_client.config.debugging
111
- @api_client.config.logger.debug 'Calling API: ActionsApi.list_resource_types ...'
112
- end
113
- if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
114
- fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ActionsApi.list_resource_types, must be greater than or equal to 1.'
115
- end
116
-
117
- # resource path
118
- local_var_path = '/api/v1/resource_types'
119
-
120
- # query parameters
121
- query_params = opts[:query_params] || {}
122
- query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
123
- query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
124
-
125
- # header parameters
126
- header_params = opts[:header_params] || {}
127
- # HTTP header 'Accept' (if needed)
128
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
129
-
130
- # form parameters
131
- form_params = opts[:form_params] || {}
132
-
133
- # http body (model)
134
- post_body = opts[:debug_body]
135
-
136
- # return_type
137
- return_type = opts[:debug_return_type] || 'ResourceTypeListResponse'
138
-
139
- # auth_names
140
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
141
-
142
- new_options = opts.merge(
143
- :operation => :"ActionsApi.list_resource_types",
144
- :header_params => header_params,
145
- :query_params => query_params,
146
- :form_params => form_params,
147
- :body => post_body,
148
- :auth_names => auth_names,
149
- :return_type => return_type
150
- )
151
-
152
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
153
- if @api_client.config.debugging
154
- @api_client.config.logger.debug "API called: ActionsApi#list_resource_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
155
- end
156
- return data, status_code, headers
157
- end
158
91
  end
159
92
  end
@@ -20,7 +20,7 @@ module SmplkitGeneratedClient::Audit
20
20
  @api_client = api_client
21
21
  end
22
22
  # Get Event
23
- # Retrieve a single audit event by id. Returns 404 if no event with that id exists in the caller's account — RLS enforces tenant isolation; this endpoint never leaks the existence of another tenant's event.
23
+ # Retrieve a single audit event by id.
24
24
  # @param event_id [String]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [EventResponse]
@@ -30,7 +30,7 @@ module SmplkitGeneratedClient::Audit
30
30
  end
31
31
 
32
32
  # Get Event
33
- # Retrieve a single audit event by id. Returns 404 if no event with that id exists in the caller&#39;s account — RLS enforces tenant isolation; this endpoint never leaks the existence of another tenant&#39;s event.
33
+ # Retrieve a single audit event by id.
34
34
  # @param event_id [String]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(EventResponse, Integer, Hash)>] EventResponse data, response status code and response headers
@@ -83,7 +83,7 @@ module SmplkitGeneratedClient::Audit
83
83
  end
84
84
 
85
85
  # List Events
86
- # List audit events for the authenticated account. Default sort is ``-created_at``; cursor pagination via ``page[after]`` (the opaque cursor returned in ``links.next``). Filters are exact-match except ``filter[occurred_at]`` which uses the platform's range notation (``[2026-01-01T00:00:00Z,*)``) and ``filter[search]`` which is a case-insensitive substring match (per ADR-014; targets ``resource_id`` only at this revision).
86
+ # List audit events for this account. Default sort is newest first. Filters are exact-match except `filter[occurred_at]`, which uses interval notation (e.g. `[2026-01-01T00:00:00Z,*)`), and `filter[search]`, which is a case-insensitive substring match against `resource_id`.
87
87
  # @param [Hash] opts the optional parameters
88
88
  # @option opts [String] :filter_occurred_at
89
89
  # @option opts [String] :filter_actor_type
@@ -91,7 +91,7 @@ module SmplkitGeneratedClient::Audit
91
91
  # @option opts [String] :filter_action
92
92
  # @option opts [String] :filter_resource_type
93
93
  # @option opts [String] :filter_resource_id
94
- # @option opts [String] :filter_search Case-insensitive substring match. Searches against &#x60;&#x60;resource_id&#x60;&#x60; only — see ADR-014 for the platform-wide &#x60;&#x60;filter[search]&#x60;&#x60; convention. Use &#x60;&#x60;filter[resource_id]&#x60;&#x60; for an exact match.
94
+ # @option opts [String] :filter_search Case-insensitive substring match against &#x60;resource_id&#x60;. Use &#x60;filter[resource_id]&#x60; for an exact match.
95
95
  # @option opts [Integer] :page_size
96
96
  # @option opts [String] :page_after
97
97
  # @return [EventListResponse]
@@ -101,7 +101,7 @@ module SmplkitGeneratedClient::Audit
101
101
  end
102
102
 
103
103
  # List Events
104
- # List audit events for the authenticated account. Default sort is &#x60;&#x60;-created_at&#x60;&#x60;; cursor pagination via &#x60;&#x60;page[after]&#x60;&#x60; (the opaque cursor returned in &#x60;&#x60;links.next&#x60;&#x60;). Filters are exact-match except &#x60;&#x60;filter[occurred_at]&#x60;&#x60; which uses the platform&#39;s range notation (&#x60;&#x60;[2026-01-01T00:00:00Z,*)&#x60;&#x60;) and &#x60;&#x60;filter[search]&#x60;&#x60; which is a case-insensitive substring match (per ADR-014; targets &#x60;&#x60;resource_id&#x60;&#x60; only at this revision).
104
+ # List audit events for this account. Default sort is newest first. Filters are exact-match except &#x60;filter[occurred_at]&#x60;, which uses interval notation (e.g. &#x60;[2026-01-01T00:00:00Z,*)&#x60;), and &#x60;filter[search]&#x60;, which is a case-insensitive substring match against &#x60;resource_id&#x60;.
105
105
  # @param [Hash] opts the optional parameters
106
106
  # @option opts [String] :filter_occurred_at
107
107
  # @option opts [String] :filter_actor_type
@@ -109,7 +109,7 @@ module SmplkitGeneratedClient::Audit
109
109
  # @option opts [String] :filter_action
110
110
  # @option opts [String] :filter_resource_type
111
111
  # @option opts [String] :filter_resource_id
112
- # @option opts [String] :filter_search Case-insensitive substring match. Searches against &#x60;&#x60;resource_id&#x60;&#x60; only — see ADR-014 for the platform-wide &#x60;&#x60;filter[search]&#x60;&#x60; convention. Use &#x60;&#x60;filter[resource_id]&#x60;&#x60; for an exact match.
112
+ # @option opts [String] :filter_search Case-insensitive substring match against &#x60;resource_id&#x60;. Use &#x60;filter[resource_id]&#x60; for an exact match.
113
113
  # @option opts [Integer] :page_size
114
114
  # @option opts [String] :page_after
115
115
  # @return [Array<(EventListResponse, Integer, Hash)>] EventListResponse data, response status code and response headers
@@ -171,29 +171,29 @@ module SmplkitGeneratedClient::Audit
171
171
  end
172
172
 
173
173
  # Record Event
174
- # Record an audit event for the authenticated account. Returns ``201 Created`` on first write, ``200 OK`` if the request was a duplicate (matched by ``Idempotency-Key`` or auto-derived key). Customers may not emit events whose ``resource_type`` starts with ``smpl.`` that namespace is reserved for smplkit-emitted events about platform resources.
175
- # @param event_response [EventResponse]
174
+ # Record an audit event for this account. Returns `201 Created` on first write, `200 OK` if the request was a duplicate (matched by `Idempotency-Key` or a key derived from the event's content). `resource_type` values beginning with `smpl.` are reserved for events that smplkit emits about its own resources and cannot be used here.
175
+ # @param event_request [EventRequest]
176
176
  # @param [Hash] opts the optional parameters
177
177
  # @option opts [String] :idempotency_key
178
178
  # @return [EventResponse]
179
- def record_event(event_response, opts = {})
180
- data, _status_code, _headers = record_event_with_http_info(event_response, opts)
179
+ def record_event(event_request, opts = {})
180
+ data, _status_code, _headers = record_event_with_http_info(event_request, opts)
181
181
  data
182
182
  end
183
183
 
184
184
  # Record Event
185
- # Record an audit event for the authenticated account. Returns &#x60;&#x60;201 Created&#x60;&#x60; on first write, &#x60;&#x60;200 OK&#x60;&#x60; if the request was a duplicate (matched by &#x60;&#x60;Idempotency-Key&#x60;&#x60; or auto-derived key). Customers may not emit events whose &#x60;&#x60;resource_type&#x60;&#x60; starts with &#x60;&#x60;smpl.&#x60;&#x60; that namespace is reserved for smplkit-emitted events about platform resources.
186
- # @param event_response [EventResponse]
185
+ # Record an audit event for this account. Returns &#x60;201 Created&#x60; on first write, &#x60;200 OK&#x60; if the request was a duplicate (matched by &#x60;Idempotency-Key&#x60; or a key derived from the event&#39;s content). &#x60;resource_type&#x60; values beginning with &#x60;smpl.&#x60; are reserved for events that smplkit emits about its own resources and cannot be used here.
186
+ # @param event_request [EventRequest]
187
187
  # @param [Hash] opts the optional parameters
188
188
  # @option opts [String] :idempotency_key
189
189
  # @return [Array<(EventResponse, Integer, Hash)>] EventResponse data, response status code and response headers
190
- def record_event_with_http_info(event_response, opts = {})
190
+ def record_event_with_http_info(event_request, opts = {})
191
191
  if @api_client.config.debugging
192
192
  @api_client.config.logger.debug 'Calling API: EventsApi.record_event ...'
193
193
  end
194
- # verify the required parameter 'event_response' is set
195
- if @api_client.config.client_side_validation && event_response.nil?
196
- fail ArgumentError, "Missing the required parameter 'event_response' when calling EventsApi.record_event"
194
+ # verify the required parameter 'event_request' is set
195
+ if @api_client.config.client_side_validation && event_request.nil?
196
+ fail ArgumentError, "Missing the required parameter 'event_request' when calling EventsApi.record_event"
197
197
  end
198
198
  # resource path
199
199
  local_var_path = '/api/v1/events'
@@ -216,7 +216,7 @@ module SmplkitGeneratedClient::Audit
216
216
  form_params = opts[:form_params] || {}
217
217
 
218
218
  # http body (model)
219
- post_body = opts[:debug_body] || @api_client.object_to_http_body(event_response)
219
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(event_request)
220
220
 
221
221
  # return_type
222
222
  return_type = opts[:debug_return_type] || 'EventResponse'
@@ -20,27 +20,27 @@ module SmplkitGeneratedClient::Audit
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create Forwarder
23
- # Create a forwarder. Requires the ``audit.siem_streaming`` entitlement on the account; lower-tier accounts get 402.
24
- # @param forwarder_response [ForwarderResponse]
23
+ # Create a forwarder for this account.
24
+ # @param forwarder_request [ForwarderRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [ForwarderResponse]
27
- def create_forwarder(forwarder_response, opts = {})
28
- data, _status_code, _headers = create_forwarder_with_http_info(forwarder_response, opts)
27
+ def create_forwarder(forwarder_request, opts = {})
28
+ data, _status_code, _headers = create_forwarder_with_http_info(forwarder_request, opts)
29
29
  data
30
30
  end
31
31
 
32
32
  # Create Forwarder
33
- # Create a forwarder. Requires the &#x60;&#x60;audit.siem_streaming&#x60;&#x60; entitlement on the account; lower-tier accounts get 402.
34
- # @param forwarder_response [ForwarderResponse]
33
+ # Create a forwarder for this account.
34
+ # @param forwarder_request [ForwarderRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(ForwarderResponse, Integer, Hash)>] ForwarderResponse data, response status code and response headers
37
- def create_forwarder_with_http_info(forwarder_response, opts = {})
37
+ def create_forwarder_with_http_info(forwarder_request, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: ForwardersApi.create_forwarder ...'
40
40
  end
41
- # verify the required parameter 'forwarder_response' is set
42
- if @api_client.config.client_side_validation && forwarder_response.nil?
43
- fail ArgumentError, "Missing the required parameter 'forwarder_response' when calling ForwardersApi.create_forwarder"
41
+ # verify the required parameter 'forwarder_request' is set
42
+ if @api_client.config.client_side_validation && forwarder_request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'forwarder_request' when calling ForwardersApi.create_forwarder"
44
44
  end
45
45
  # resource path
46
46
  local_var_path = '/api/v1/forwarders'
@@ -62,7 +62,7 @@ module SmplkitGeneratedClient::Audit
62
62
  form_params = opts[:form_params] || {}
63
63
 
64
64
  # http body (model)
65
- post_body = opts[:debug_body] || @api_client.object_to_http_body(forwarder_response)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(forwarder_request)
66
66
 
67
67
  # return_type
68
68
  return_type = opts[:debug_return_type] || 'ForwarderResponse'
@@ -88,7 +88,7 @@ module SmplkitGeneratedClient::Audit
88
88
  end
89
89
 
90
90
  # Delete Forwarder
91
- # Soft-delete a forwarder. Delivery rows are retained per the normal forwarder_delivery retention; a future create with the same slug is allowed (the unique index is partial on deleted_at IS NULL).
91
+ # Delete a forwarder. Past delivery log entries are retained. A new forwarder may be created later under the same name.
92
92
  # @param forwarder_id [String]
93
93
  # @param [Hash] opts the optional parameters
94
94
  # @return [nil]
@@ -98,7 +98,7 @@ module SmplkitGeneratedClient::Audit
98
98
  end
99
99
 
100
100
  # Delete Forwarder
101
- # Soft-delete a forwarder. Delivery rows are retained per the normal forwarder_delivery retention; a future create with the same slug is allowed (the unique index is partial on deleted_at IS NULL).
101
+ # Delete a forwarder. Past delivery log entries are retained. A new forwarder may be created later under the same name.
102
102
  # @param forwarder_id [String]
103
103
  # @param [Hash] opts the optional parameters
104
104
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -149,7 +149,7 @@ module SmplkitGeneratedClient::Audit
149
149
  end
150
150
 
151
151
  # Execute Test Forwarder
152
- # Execute a prepared HTTP request server-side and return the response. The same SSRF guard that gates the in-line forwarder loop is applied here internal/private addresses, link-local IPs (including the EC2 metadata service at 169.254.169.254), unique-local IPv6, and ports outside the configured allowlist are all rejected.
152
+ # Send a test HTTP request to a forwarder destination and return the result. Useful for verifying a destination URL, credentials, or transform before saving the forwarder. The same network-safety rules that apply to live deliveries (private/internal address blocking, port allowlist) apply here.
153
153
  # @param test_forwarder_request [TestForwarderRequest]
154
154
  # @param [Hash] opts the optional parameters
155
155
  # @return [TestForwarderResponse]
@@ -159,7 +159,7 @@ module SmplkitGeneratedClient::Audit
159
159
  end
160
160
 
161
161
  # Execute Test Forwarder
162
- # Execute a prepared HTTP request server-side and return the response. The same SSRF guard that gates the in-line forwarder loop is applied here internal/private addresses, link-local IPs (including the EC2 metadata service at 169.254.169.254), unique-local IPv6, and ports outside the configured allowlist are all rejected.
162
+ # Send a test HTTP request to a forwarder destination and return the result. Useful for verifying a destination URL, credentials, or transform before saving the forwarder. The same network-safety rules that apply to live deliveries (private/internal address blocking, port allowlist) apply here.
163
163
  # @param test_forwarder_request [TestForwarderRequest]
164
164
  # @param [Hash] opts the optional parameters
165
165
  # @return [Array<(TestForwarderResponse, Integer, Hash)>] TestForwarderResponse data, response status code and response headers
@@ -217,7 +217,7 @@ module SmplkitGeneratedClient::Audit
217
217
  end
218
218
 
219
219
  # Get Forwarder
220
- # Retrieve a single forwarder by id. Returns 404 if no forwarder with that id exists in the caller's account, including if the forwarder is soft-deleted. Header values in the response are returned in plaintext so callers can perform a GET-modify-PUT round-trip without re-entering secrets (ADR-014). The persisted ``forwarder_delivery.request`` log column is what keeps redaction; that read path is unaffected by this route.
220
+ # Retrieve a single forwarder by id. Header values are returned in plaintext so the resource can be round-tripped with `GET`, mutate, `PUT` without re-entering secrets.
221
221
  # @param forwarder_id [String]
222
222
  # @param [Hash] opts the optional parameters
223
223
  # @return [ForwarderResponse]
@@ -227,7 +227,7 @@ module SmplkitGeneratedClient::Audit
227
227
  end
228
228
 
229
229
  # Get Forwarder
230
- # Retrieve a single forwarder by id. Returns 404 if no forwarder with that id exists in the caller&#39;s account, including if the forwarder is soft-deleted. Header values in the response are returned in plaintext so callers can perform a GET-modify-PUT round-trip without re-entering secrets (ADR-014). The persisted &#x60;&#x60;forwarder_delivery.request&#x60;&#x60; log column is what keeps redaction; that read path is unaffected by this route.
230
+ # Retrieve a single forwarder by id. Header values are returned in plaintext so the resource can be round-tripped with &#x60;GET&#x60;, mutate, &#x60;PUT&#x60; without re-entering secrets.
231
231
  # @param forwarder_id [String]
232
232
  # @param [Hash] opts the optional parameters
233
233
  # @return [Array<(ForwarderResponse, Integer, Hash)>] ForwarderResponse data, response status code and response headers
@@ -280,7 +280,7 @@ module SmplkitGeneratedClient::Audit
280
280
  end
281
281
 
282
282
  # List Forwarder Deliveries
283
- # List delivery rows for a forwarder. Default sort is ``-created_at``. Cursor pagination via ``page[after]``. Filter by status (``SUCCEEDED`` / ``FAILED`` / ``FILTERED_OUT`` / ``SKIPPED_DO_NOT_FORWARD``, case-insensitive) or by a ``created_at`` range using the platform's interval notation (``[2026-01-01T00:00:00Z,*)``). Reads do not require the entitlement — a downgraded account can still inspect historical deliveries from when the forwarder was active.
283
+ # List delivery log entries for a forwarder. Default sort is newest first. Filter by `status` (one of `SUCCEEDED`, `FAILED`, `FILTERED_OUT`, `SKIPPED_DO_NOT_FORWARD` case-insensitive), by `event_id`, or by a `created_at` range using interval notation (e.g. `[2026-01-01T00:00:00Z,*)`).
284
284
  # @param forwarder_id [String]
285
285
  # @param [Hash] opts the optional parameters
286
286
  # @option opts [String] :filter_status
@@ -295,7 +295,7 @@ module SmplkitGeneratedClient::Audit
295
295
  end
296
296
 
297
297
  # List Forwarder Deliveries
298
- # List delivery rows for a forwarder. Default sort is &#x60;&#x60;-created_at&#x60;&#x60;. Cursor pagination via &#x60;&#x60;page[after]&#x60;&#x60;. Filter by status (&#x60;&#x60;SUCCEEDED&#x60;&#x60; / &#x60;&#x60;FAILED&#x60;&#x60; / &#x60;&#x60;FILTERED_OUT&#x60;&#x60; / &#x60;&#x60;SKIPPED_DO_NOT_FORWARD&#x60;&#x60;, case-insensitive) or by a &#x60;&#x60;created_at&#x60;&#x60; range using the platform&#39;s interval notation (&#x60;&#x60;[2026-01-01T00:00:00Z,*)&#x60;&#x60;). Reads do not require the entitlement — a downgraded account can still inspect historical deliveries from when the forwarder was active.
298
+ # List delivery log entries for a forwarder. Default sort is newest first. Filter by &#x60;status&#x60; (one of &#x60;SUCCEEDED&#x60;, &#x60;FAILED&#x60;, &#x60;FILTERED_OUT&#x60;, &#x60;SKIPPED_DO_NOT_FORWARD&#x60; case-insensitive), by &#x60;event_id&#x60;, or by a &#x60;created_at&#x60; range using interval notation (e.g. &#x60;[2026-01-01T00:00:00Z,*)&#x60;).
299
299
  # @param forwarder_id [String]
300
300
  # @param [Hash] opts the optional parameters
301
301
  # @option opts [String] :filter_status
@@ -362,7 +362,7 @@ module SmplkitGeneratedClient::Audit
362
362
  end
363
363
 
364
364
  # List Forwarders
365
- # List forwarders for the authenticated account. Reads do not require the entitlement — a downgraded account can still inspect what they configured, they just can't create new ones.
365
+ # List forwarders for this account.
366
366
  # @param [Hash] opts the optional parameters
367
367
  # @option opts [String] :filter_forwarder_type
368
368
  # @option opts [Boolean] :filter_enabled
@@ -375,7 +375,7 @@ module SmplkitGeneratedClient::Audit
375
375
  end
376
376
 
377
377
  # List Forwarders
378
- # List forwarders for the authenticated account. Reads do not require the entitlement — a downgraded account can still inspect what they configured, they just can&#39;t create new ones.
378
+ # List forwarders for this account.
379
379
  # @param [Hash] opts the optional parameters
380
380
  # @option opts [String] :filter_forwarder_type
381
381
  # @option opts [Boolean] :filter_enabled
@@ -435,7 +435,7 @@ module SmplkitGeneratedClient::Audit
435
435
  end
436
436
 
437
437
  # Retry Failed Forwarder Deliveries
438
- # Retry every failed delivery for the forwarder. For each failed delivery row, re-attempt with the latest forwarder configuration and the original event payload. Returns counts.
438
+ # Retry every failed delivery for this forwarder. Each failed delivery is re-attempted using the forwarder's current configuration and the original event. Returns the counts.
439
439
  # @param forwarder_id [String]
440
440
  # @param [Hash] opts the optional parameters
441
441
  # @return [RetryFailedDeliveriesSummary]
@@ -445,7 +445,7 @@ module SmplkitGeneratedClient::Audit
445
445
  end
446
446
 
447
447
  # Retry Failed Forwarder Deliveries
448
- # Retry every failed delivery for the forwarder. For each failed delivery row, re-attempt with the latest forwarder configuration and the original event payload. Returns counts.
448
+ # Retry every failed delivery for this forwarder. Each failed delivery is re-attempted using the forwarder&#39;s current configuration and the original event. Returns the counts.
449
449
  # @param forwarder_id [String]
450
450
  # @param [Hash] opts the optional parameters
451
451
  # @return [Array<(RetryFailedDeliveriesSummary, Integer, Hash)>] RetryFailedDeliveriesSummary data, response status code and response headers
@@ -498,7 +498,7 @@ module SmplkitGeneratedClient::Audit
498
498
  end
499
499
 
500
500
  # Retry Forwarder Delivery
501
- # Retry a single failed delivery. Returns the new delivery row with its outcome. Prior delivery rows are not modified.
501
+ # Retry a single failed delivery. Returns the new delivery log entry. The prior entry is left in place.
502
502
  # @param forwarder_id [String]
503
503
  # @param delivery_id [String]
504
504
  # @param [Hash] opts the optional parameters
@@ -509,7 +509,7 @@ module SmplkitGeneratedClient::Audit
509
509
  end
510
510
 
511
511
  # Retry Forwarder Delivery
512
- # Retry a single failed delivery. Returns the new delivery row with its outcome. Prior delivery rows are not modified.
512
+ # Retry a single failed delivery. Returns the new delivery log entry. The prior entry is left in place.
513
513
  # @param forwarder_id [String]
514
514
  # @param delivery_id [String]
515
515
  # @param [Hash] opts the optional parameters
@@ -567,23 +567,23 @@ module SmplkitGeneratedClient::Audit
567
567
  end
568
568
 
569
569
  # Update Forwarder
570
- # Full-replace update. PUT semantics every field is overwritten. The GET path returns plaintext header values, so the standard get-mutate-put round-trip (ADR-014) preserves secrets without any extra work from the caller: GET, change one field, PUT the result.
570
+ # Replace an existing forwarder. Every writable field is overwritten.
571
571
  # @param forwarder_id [String]
572
- # @param forwarder_response [ForwarderResponse]
572
+ # @param forwarder_request [ForwarderRequest]
573
573
  # @param [Hash] opts the optional parameters
574
574
  # @return [ForwarderResponse]
575
- def update_forwarder(forwarder_id, forwarder_response, opts = {})
576
- data, _status_code, _headers = update_forwarder_with_http_info(forwarder_id, forwarder_response, opts)
575
+ def update_forwarder(forwarder_id, forwarder_request, opts = {})
576
+ data, _status_code, _headers = update_forwarder_with_http_info(forwarder_id, forwarder_request, opts)
577
577
  data
578
578
  end
579
579
 
580
580
  # Update Forwarder
581
- # Full-replace update. PUT semantics every field is overwritten. The GET path returns plaintext header values, so the standard get-mutate-put round-trip (ADR-014) preserves secrets without any extra work from the caller: GET, change one field, PUT the result.
581
+ # Replace an existing forwarder. Every writable field is overwritten.
582
582
  # @param forwarder_id [String]
583
- # @param forwarder_response [ForwarderResponse]
583
+ # @param forwarder_request [ForwarderRequest]
584
584
  # @param [Hash] opts the optional parameters
585
585
  # @return [Array<(ForwarderResponse, Integer, Hash)>] ForwarderResponse data, response status code and response headers
586
- def update_forwarder_with_http_info(forwarder_id, forwarder_response, opts = {})
586
+ def update_forwarder_with_http_info(forwarder_id, forwarder_request, opts = {})
587
587
  if @api_client.config.debugging
588
588
  @api_client.config.logger.debug 'Calling API: ForwardersApi.update_forwarder ...'
589
589
  end
@@ -591,9 +591,9 @@ module SmplkitGeneratedClient::Audit
591
591
  if @api_client.config.client_side_validation && forwarder_id.nil?
592
592
  fail ArgumentError, "Missing the required parameter 'forwarder_id' when calling ForwardersApi.update_forwarder"
593
593
  end
594
- # verify the required parameter 'forwarder_response' is set
595
- if @api_client.config.client_side_validation && forwarder_response.nil?
596
- fail ArgumentError, "Missing the required parameter 'forwarder_response' when calling ForwardersApi.update_forwarder"
594
+ # verify the required parameter 'forwarder_request' is set
595
+ if @api_client.config.client_side_validation && forwarder_request.nil?
596
+ fail ArgumentError, "Missing the required parameter 'forwarder_request' when calling ForwardersApi.update_forwarder"
597
597
  end
598
598
  # resource path
599
599
  local_var_path = '/api/v1/forwarders/{forwarder_id}'.sub('{forwarder_id}', CGI.escape(forwarder_id.to_s))
@@ -615,7 +615,7 @@ module SmplkitGeneratedClient::Audit
615
615
  form_params = opts[:form_params] || {}
616
616
 
617
617
  # http body (model)
618
- post_body = opts[:debug_body] || @api_client.object_to_http_body(forwarder_response)
618
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(forwarder_request)
619
619
 
620
620
  # return_type
621
621
  return_type = opts[:debug_return_type] || 'ForwarderResponse'
@@ -20,7 +20,7 @@ module SmplkitGeneratedClient::Audit
20
20
  @api_client = api_client
21
21
  end
22
22
  # Execute Wipe
23
- # Delete every audit-database row scoped to the authenticated account. Returns the per-table row counts that were deleted along with the completion timestamp. The action is atomic within the audit database — either every account-scoped row is gone, or none is. The body is required to be ``{}``; no parameters are accepted.
23
+ # Delete every audit record this account has stored. Atomic: either every record is deleted, or none is. Returns the per-table counts and the completion timestamp. The request body must be `{}`.
24
24
  # @param body [Object]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [WipeResponse]
@@ -30,7 +30,7 @@ module SmplkitGeneratedClient::Audit
30
30
  end
31
31
 
32
32
  # Execute Wipe
33
- # Delete every audit-database row scoped to the authenticated account. Returns the per-table row counts that were deleted along with the completion timestamp. The action is atomic within the audit database — either every account-scoped row is gone, or none is. The body is required to be &#x60;&#x60;{}&#x60;&#x60;; no parameters are accepted.
33
+ # Delete every audit record this account has stored. Atomic: either every record is deleted, or none is. Returns the per-table counts and the completion timestamp. The request body must be &#x60;{}&#x60;.
34
34
  # @param body [Object]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(WipeResponse, Integer, Hash)>] WipeResponse data, response status code and response headers
@@ -19,78 +19,8 @@ module SmplkitGeneratedClient::Audit
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # List Actions
23
- # List the distinct ``action`` slugs seen in the account. Without ``filter[resource_type]``, returns one row per distinct action — the same action may have been recorded with multiple resource types and the unfiltered dropdown shows it once. With ``filter[resource_type]``, returns the actions seen with that specific resource type, powering the Activity tab's cascading filter behavior.
24
- # @param [Hash] opts the optional parameters
25
- # @option opts [String] :filter_resource_type
26
- # @option opts [Integer] :page_size
27
- # @option opts [String] :page_after
28
- # @return [ActionListResponse]
29
- def list_actions(opts = {})
30
- data, _status_code, _headers = list_actions_with_http_info(opts)
31
- data
32
- end
33
-
34
- # List Actions
35
- # List the distinct &#x60;&#x60;action&#x60;&#x60; slugs seen in the account. Without &#x60;&#x60;filter[resource_type]&#x60;&#x60;, returns one row per distinct action — the same action may have been recorded with multiple resource types and the unfiltered dropdown shows it once. With &#x60;&#x60;filter[resource_type]&#x60;&#x60;, returns the actions seen with that specific resource type, powering the Activity tab&#39;s cascading filter behavior.
36
- # @param [Hash] opts the optional parameters
37
- # @option opts [String] :filter_resource_type
38
- # @option opts [Integer] :page_size
39
- # @option opts [String] :page_after
40
- # @return [Array<(ActionListResponse, Integer, Hash)>] ActionListResponse data, response status code and response headers
41
- def list_actions_with_http_info(opts = {})
42
- if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: ResourceTypesApi.list_actions ...'
44
- end
45
- if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
46
- fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ResourceTypesApi.list_actions, must be greater than or equal to 1.'
47
- end
48
-
49
- # resource path
50
- local_var_path = '/api/v1/actions'
51
-
52
- # query parameters
53
- query_params = opts[:query_params] || {}
54
- query_params[:'filter[resource_type]'] = opts[:'filter_resource_type'] if !opts[:'filter_resource_type'].nil?
55
- query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
56
- query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
57
-
58
- # header parameters
59
- header_params = opts[:header_params] || {}
60
- # HTTP header 'Accept' (if needed)
61
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
62
-
63
- # form parameters
64
- form_params = opts[:form_params] || {}
65
-
66
- # http body (model)
67
- post_body = opts[:debug_body]
68
-
69
- # return_type
70
- return_type = opts[:debug_return_type] || 'ActionListResponse'
71
-
72
- # auth_names
73
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
74
-
75
- new_options = opts.merge(
76
- :operation => :"ResourceTypesApi.list_actions",
77
- :header_params => header_params,
78
- :query_params => query_params,
79
- :form_params => form_params,
80
- :body => post_body,
81
- :auth_names => auth_names,
82
- :return_type => return_type
83
- )
84
-
85
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
86
- if @api_client.config.debugging
87
- @api_client.config.logger.debug "API called: ResourceTypesApi#list_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
- end
89
- return data, status_code, headers
90
- end
91
-
92
22
  # List Resource Types
93
- # List the distinct ``resource_type`` slugs seen in the account. Each row's ``id`` is the slug itself, mirroring the smplkit convention of using customer-provided identifiers as the public-facing resource id (ADR-014).
23
+ # List the distinct `resource_type` slugs recorded for this account. The resource `id` is the slug itself. Useful for populating filter dropdowns in a UI.
94
24
  # @param [Hash] opts the optional parameters
95
25
  # @option opts [Integer] :page_size
96
26
  # @option opts [String] :page_after
@@ -101,7 +31,7 @@ module SmplkitGeneratedClient::Audit
101
31
  end
102
32
 
103
33
  # List Resource Types
104
- # List the distinct &#x60;&#x60;resource_type&#x60;&#x60; slugs seen in the account. Each row&#39;s &#x60;&#x60;id&#x60;&#x60; is the slug itself, mirroring the smplkit convention of using customer-provided identifiers as the public-facing resource id (ADR-014).
34
+ # List the distinct &#x60;resource_type&#x60; slugs recorded for this account. The resource &#x60;id&#x60; is the slug itself. Useful for populating filter dropdowns in a UI.
105
35
  # @param [Hash] opts the optional parameters
106
36
  # @option opts [Integer] :page_size
107
37
  # @option opts [String] :page_after
@@ -20,8 +20,8 @@ module SmplkitGeneratedClient::Audit
20
20
  @api_client = api_client
21
21
  end
22
22
  # List Usage
23
- # Current-period usage and quota for the audit product. Only ``filter[period]=current`` is supported; historical usage is a follow-up.
24
- # @param filter_period [String]
23
+ # Report the current-period usage counters for this account.
24
+ # @param filter_period [String] Period to report. &#x60;current&#x60; is the only supported value.
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [UsageResponse]
27
27
  def list_usage(filter_period, opts = {})
@@ -30,8 +30,8 @@ module SmplkitGeneratedClient::Audit
30
30
  end
31
31
 
32
32
  # List Usage
33
- # Current-period usage and quota for the audit product. Only &#x60;&#x60;filter[period]&#x3D;current&#x60;&#x60; is supported; historical usage is a follow-up.
34
- # @param filter_period [String]
33
+ # Report the current-period usage counters for this account.
34
+ # @param filter_period [String] Period to report. &#x60;current&#x60; is the only supported value.
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(UsageResponse, Integer, Hash)>] UsageResponse data, response status code and response headers
37
37
  def list_usage_with_http_info(filter_period, opts = {})
@@ -14,29 +14,39 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::Audit
17
- # Public-facing event resource. Attribute set on POST /api/v1/events: - action (required) - resource_type (required) - resource_id (required) - occurred_at (optional; defaults to ``created_at``) - data (optional; defaults to ``{}``) There is no top-level ``snapshot`` attribute. Customers wishing to record a resource snapshot place it inside ``data`` -- smplkit's internal convention nests it at ``data.snapshot``, but customers may follow their own convention. Attribute set on GET responses includes everything above plus the server-populated fields: ``created_at``, ``actor_type``, ``actor_id``, ``actor_label``, ``idempotency_key``.
17
+ # An audit event a record that something happened, attributed to an actor and a resource. When recording a snapshot of the resource at the time of the event, place it inside `data`. smplkit's own integrations nest it under `data.snapshot`, but the slot is yours to use however you like.
18
18
  class Event < ApiModelBase
19
+ # Slug for what happened, e.g. `user.created`. Lowercase, dot-separated.
19
20
  attr_accessor :action
20
21
 
22
+ # Slug for the kind of resource the event is about, e.g. `user`. Lowercase, dot-separated.
21
23
  attr_accessor :resource_type
22
24
 
25
+ # Identifier of the specific resource the event is about.
23
26
  attr_accessor :resource_id
24
27
 
28
+ # When the event actually happened. Defaults to the server receipt time (`created_at`).
25
29
  attr_accessor :occurred_at
26
30
 
31
+ # Free-form payload attached to the event. Use it for resource snapshots (by convention under `data.snapshot`), request identifiers, or any other context the event needs to carry.
27
32
  attr_accessor :data
28
33
 
29
- # When true, this event is recorded normally but is not forwarded to any configured SIEM forwarder. A forwarder_delivery row with status=skipped_do_not_forward is recorded for each enabled forwarder so the skip is visible in the delivery log.
34
+ # When `true`, the event is recorded but not delivered to any forwarder. A delivery log entry with status `SKIPPED_DO_NOT_FORWARD` is written for each enabled forwarder so the skip is visible in the delivery log.
30
35
  attr_accessor :do_not_forward
31
36
 
37
+ # When the event was received and recorded.
32
38
  attr_accessor :created_at
33
39
 
40
+ # Kind of credential that emitted the event, e.g. `USER` or `API_KEY`. Resolved server-side from the request credential.
34
41
  attr_accessor :actor_type
35
42
 
43
+ # Identifier of the actor that emitted the event.
36
44
  attr_accessor :actor_id
37
45
 
46
+ # Human-readable label for the actor (e.g. the user's email address or the API key name) at the time the event was recorded.
38
47
  attr_accessor :actor_label
39
48
 
49
+ # The idempotency key used to deduplicate the record. Echoes the `Idempotency-Key` header if one was supplied, otherwise a key derived from the event's content.
40
50
  attr_accessor :idempotency_key
41
51
 
42
52
  # Attribute mapping from ruby-style variable name to JSON key.