smplkit 3.0.100 → 3.0.101
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/events_api.rb +4 -4
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/exports_api.rb +2 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/forwarders_api.rb +16 -6
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event.rb +1 -1
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/export.rb +12 -1
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/retry_failed_deliveries_request.rb +150 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +1 -0
- data/lib/smplkit/_generated/audit/spec/api/events_api_spec.rb +2 -2
- data/lib/smplkit/_generated/audit/spec/api/exports_api_spec.rb +1 -1
- data/lib/smplkit/_generated/audit/spec/api/forwarders_api_spec.rb +4 -2
- data/lib/smplkit/_generated/audit/spec/models/export_spec.rb +6 -0
- data/lib/smplkit/_generated/audit/spec/models/retry_failed_deliveries_request_spec.rb +36 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 023cc1c779a1121f562c18522ac3df12441aa82f224b886dcf51b92856607d9f
|
|
4
|
+
data.tar.gz: 38edf4febecc1c929d086456450d8b836ae5c73866aec3031d2f9c1bbce1eea4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d79bfdecf66c1d5896c7f3db0a2faca933cfdeab6025888133ae1e2b999ef2525b0a25224d4295e4d5c4b4b9b0089a0428cee337f2a11d883955626e4214d1ae
|
|
7
|
+
data.tar.gz: 4ba20edec0551888d6aa7b13ddbd5fc99bd481794a1771e2c271c6f5c212a328cd028e060d9ddb6f59af56d71e094ff3648ae06100e621069b29186ff3ff4120
|
|
@@ -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. Authorized against the caller's permitted environment set: the event is returned only if its environment is one the caller may access, otherwise `404` (the same response as a non-existent id, so existence never leaks across environments).
|
|
23
|
+
# Retrieve a single audit event by id. Authorized against the caller's permitted environment set: the event is returned only if its environment is one the caller may access, otherwise `404` (the same response as a non-existent id, so existence never leaks across environments). A single-object lookup names the object by id; it does not resolve a target environment.
|
|
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. Authorized against the caller's permitted environment set: the event is returned only if its environment is one the caller may access, otherwise `404` (the same response as a non-existent id, so existence never leaks across environments).
|
|
33
|
+
# Retrieve a single audit event by id. Authorized against the caller's permitted environment set: the event is returned only if its environment is one the caller may access, otherwise `404` (the same response as a non-existent id, so existence never leaks across environments). A single-object lookup names the object by id; it does not resolve a target environment.
|
|
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
|
|
@@ -197,7 +197,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
197
197
|
end
|
|
198
198
|
|
|
199
199
|
# Record Event
|
|
200
|
-
# Record an audit event for this account. The event is stamped with the environment it occurred in
|
|
200
|
+
# Record an audit event for this account. The event is stamped with the environment it occurred in. Name the target environment in the request body's `environment` field; omit it and a single-environment credential implies it, while a multi-environment or unrestricted credential must name it. The named environment must be one the caller may access and must exist and be managed for the 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). The same content recorded in two environments produces two distinct events. `resource_type` values beginning with `smpl.` are reserved for events that smplkit emits about its own resources and cannot be used here.
|
|
201
201
|
# @param event_request [EventRequest]
|
|
202
202
|
# @param [Hash] opts the optional parameters
|
|
203
203
|
# @option opts [String] :idempotency_key
|
|
@@ -208,7 +208,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
208
208
|
end
|
|
209
209
|
|
|
210
210
|
# Record Event
|
|
211
|
-
# Record an audit event for this account. The event is stamped with the environment it occurred in
|
|
211
|
+
# Record an audit event for this account. The event is stamped with the environment it occurred in. Name the target environment in the request body's `environment` field; omit it and a single-environment credential implies it, while a multi-environment or unrestricted credential must name it. The named environment must be one the caller may access and must exist and be managed for the 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). The same content recorded in two environments produces two distinct events. `resource_type` values beginning with `smpl.` are reserved for events that smplkit emits about its own resources and cannot be used here.
|
|
212
212
|
# @param event_request [EventRequest]
|
|
213
213
|
# @param [Hash] opts the optional parameters
|
|
214
214
|
# @option opts [String] :idempotency_key
|
|
@@ -20,7 +20,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create Export
|
|
23
|
-
# Mint a short-lived signed URL to stream an events download. The request body specifies `format` (`CSV` or `JSONL`) and any subset of the event filters accepted by `GET /api/v1/events`. The response returns the signed URL plus its expiry (30 seconds from mint). Open the URL in a browser to stream the file to disk; no `Authorization` header is required at download time. Filter rules match `GET /api/v1/events`: `filter[resource_id]` requires `filter[resource_type]`; `filter[search]` requires either `filter[occurred_at]` or `filter[resource_type]` + `filter[resource_id]`. Violations are rejected here at mint time. Reads are allowed on lapsed subscriptions per the smplcore convention — same gate as the events list.
|
|
23
|
+
# Mint a short-lived signed URL to stream an events download. The request body specifies `format` (`CSV` or `JSONL`) and any subset of the event filters accepted by `GET /api/v1/events`. An export is scoped to a single environment: name it in the body's `environment` field, or omit it and a single-environment credential implies it (a multi-environment credential must name it). The response returns the signed URL plus its expiry (30 seconds from mint). Open the URL in a browser to stream the file to disk; no `Authorization` header is required at download time. Filter rules match `GET /api/v1/events`: `filter[resource_id]` requires `filter[resource_type]`; `filter[search]` requires either `filter[occurred_at]` or `filter[resource_type]` + `filter[resource_id]`. Violations are rejected here at mint time. Reads are allowed on lapsed subscriptions per the smplcore convention — same gate as the events list.
|
|
24
24
|
# @param export_request [ExportRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [ExportResponse]
|
|
@@ -30,7 +30,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create Export
|
|
33
|
-
# Mint a short-lived signed URL to stream an events download. The request body specifies `format` (`CSV` or `JSONL`) and any subset of the event filters accepted by `GET /api/v1/events`. The response returns the signed URL plus its expiry (30 seconds from mint). Open the URL in a browser to stream the file to disk; no `Authorization` header is required at download time. Filter rules match `GET /api/v1/events`: `filter[resource_id]` requires `filter[resource_type]`; `filter[search]` requires either `filter[occurred_at]` or `filter[resource_type]` + `filter[resource_id]`. Violations are rejected here at mint time. Reads are allowed on lapsed subscriptions per the smplcore convention — same gate as the events list.
|
|
33
|
+
# Mint a short-lived signed URL to stream an events download. The request body specifies `format` (`CSV` or `JSONL`) and any subset of the event filters accepted by `GET /api/v1/events`. An export is scoped to a single environment: name it in the body's `environment` field, or omit it and a single-environment credential implies it (a multi-environment credential must name it). The response returns the signed URL plus its expiry (30 seconds from mint). Open the URL in a browser to stream the file to disk; no `Authorization` header is required at download time. Filter rules match `GET /api/v1/events`: `filter[resource_id]` requires `filter[resource_type]`; `filter[search]` requires either `filter[occurred_at]` or `filter[resource_type]` + `filter[resource_id]`. Violations are rejected here at mint time. Reads are allowed on lapsed subscriptions per the smplcore convention — same gate as the events list.
|
|
34
34
|
# @param export_request [ExportRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(ExportResponse, Integer, Hash)>] ExportResponse data, response status code and response headers
|
|
@@ -280,9 +280,10 @@ module SmplkitGeneratedClient::Audit
|
|
|
280
280
|
end
|
|
281
281
|
|
|
282
282
|
# List Forwarder Deliveries
|
|
283
|
-
# List delivery log entries for a forwarder. Scoped
|
|
283
|
+
# List delivery log entries for a forwarder. Scoped by environment. Pass `filter[environment]` as a comma-separated list of environment keys to restrict results to that subset of the environments you can access; omit it to cover every environment you can access. Default sort is `-created_at` (newest first). Filter by `status` (`SUCCEEDED` or `FAILED`, case-insensitive), by `event`, 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
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope deliveries to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects deliveries of 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.
|
|
286
287
|
# @option opts [String] :filter_status
|
|
287
288
|
# @option opts [String] :filter_created_at
|
|
288
289
|
# @option opts [String] :filter_event
|
|
@@ -296,9 +297,10 @@ module SmplkitGeneratedClient::Audit
|
|
|
296
297
|
end
|
|
297
298
|
|
|
298
299
|
# List Forwarder Deliveries
|
|
299
|
-
# List delivery log entries for a forwarder. Scoped
|
|
300
|
+
# List delivery log entries for a forwarder. Scoped by environment. Pass `filter[environment]` as a comma-separated list of environment keys to restrict results to that subset of the environments you can access; omit it to cover every environment you can access. Default sort is `-created_at` (newest first). Filter by `status` (`SUCCEEDED` or `FAILED`, case-insensitive), by `event`, or by a `created_at` range using interval notation (e.g. `[2026-01-01T00:00:00Z,*)`).
|
|
300
301
|
# @param forwarder_id [String]
|
|
301
302
|
# @param [Hash] opts the optional parameters
|
|
303
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope deliveries to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects deliveries of 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.
|
|
302
304
|
# @option opts [String] :filter_status
|
|
303
305
|
# @option opts [String] :filter_created_at
|
|
304
306
|
# @option opts [String] :filter_event
|
|
@@ -327,6 +329,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
327
329
|
|
|
328
330
|
# query parameters
|
|
329
331
|
query_params = opts[:query_params] || {}
|
|
332
|
+
query_params[:'filter[environment]'] = opts[:'filter_environment'] if !opts[:'filter_environment'].nil?
|
|
330
333
|
query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
|
|
331
334
|
query_params[:'filter[created_at]'] = opts[:'filter_created_at'] if !opts[:'filter_created_at'].nil?
|
|
332
335
|
query_params[:'filter[event]'] = opts[:'filter_event'] if !opts[:'filter_event'].nil?
|
|
@@ -445,9 +448,10 @@ module SmplkitGeneratedClient::Audit
|
|
|
445
448
|
end
|
|
446
449
|
|
|
447
450
|
# Retry Failed Forwarder Deliveries
|
|
448
|
-
# Retry every failed delivery for this forwarder in the
|
|
451
|
+
# Retry every failed delivery for this forwarder in the target environment. Targets a single environment: name it in the request body's `environment` field, or omit it and a single-environment credential implies it (a multi-environment credential must name it). Only that environment's failed deliveries are re-attempted, each using the forwarder's effective configuration for that environment and the original event. Returns the counts.
|
|
449
452
|
# @param forwarder_id [String]
|
|
450
453
|
# @param [Hash] opts the optional parameters
|
|
454
|
+
# @option opts [RetryFailedDeliveriesRequest] :retry_failed_deliveries_request
|
|
451
455
|
# @return [RetryFailedDeliveriesSummary]
|
|
452
456
|
def retry_failed_forwarder_deliveries(forwarder_id, opts = {})
|
|
453
457
|
data, _status_code, _headers = retry_failed_forwarder_deliveries_with_http_info(forwarder_id, opts)
|
|
@@ -455,9 +459,10 @@ module SmplkitGeneratedClient::Audit
|
|
|
455
459
|
end
|
|
456
460
|
|
|
457
461
|
# Retry Failed Forwarder Deliveries
|
|
458
|
-
# Retry every failed delivery for this forwarder in the
|
|
462
|
+
# Retry every failed delivery for this forwarder in the target environment. Targets a single environment: name it in the request body's `environment` field, or omit it and a single-environment credential implies it (a multi-environment credential must name it). Only that environment's failed deliveries are re-attempted, each using the forwarder's effective configuration for that environment and the original event. Returns the counts.
|
|
459
463
|
# @param forwarder_id [String]
|
|
460
464
|
# @param [Hash] opts the optional parameters
|
|
465
|
+
# @option opts [RetryFailedDeliveriesRequest] :retry_failed_deliveries_request
|
|
461
466
|
# @return [Array<(RetryFailedDeliveriesSummary, Integer, Hash)>] RetryFailedDeliveriesSummary data, response status code and response headers
|
|
462
467
|
def retry_failed_forwarder_deliveries_with_http_info(forwarder_id, opts = {})
|
|
463
468
|
if @api_client.config.debugging
|
|
@@ -476,13 +481,18 @@ module SmplkitGeneratedClient::Audit
|
|
|
476
481
|
# header parameters
|
|
477
482
|
header_params = opts[:header_params] || {}
|
|
478
483
|
# HTTP header 'Accept' (if needed)
|
|
479
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/
|
|
484
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
485
|
+
# HTTP header 'Content-Type'
|
|
486
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
487
|
+
if !content_type.nil?
|
|
488
|
+
header_params['Content-Type'] = content_type
|
|
489
|
+
end
|
|
480
490
|
|
|
481
491
|
# form parameters
|
|
482
492
|
form_params = opts[:form_params] || {}
|
|
483
493
|
|
|
484
494
|
# http body (model)
|
|
485
|
-
post_body = opts[:debug_body]
|
|
495
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'retry_failed_deliveries_request'])
|
|
486
496
|
|
|
487
497
|
# return_type
|
|
488
498
|
return_type = opts[:debug_return_type] || 'RetryFailedDeliveriesSummary'
|
|
@@ -52,7 +52,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
52
52
|
# When `true`, the event is recorded but not delivered to any forwarder, and no delivery log entries are created for it.
|
|
53
53
|
attr_accessor :do_not_forward
|
|
54
54
|
|
|
55
|
-
# The environment the event occurred in.
|
|
55
|
+
# The environment the event occurred in. On write, optionally names the target environment: omit it and a single-environment credential implies it (a multi-environment credential must name it), and a named environment must be one the caller may access. Always present on read as the resolved environment. The same content recorded in two environments produces two distinct events.
|
|
56
56
|
attr_accessor :environment
|
|
57
57
|
|
|
58
58
|
# When the event was received and recorded.
|
|
@@ -19,6 +19,9 @@ module SmplkitGeneratedClient::Audit
|
|
|
19
19
|
# Output format for the download. `CSV` writes one row per event with the event payload (`data`) serialized as a JSON-encoded cell. `JSONL` writes one JSON object per line with `data` preserved as a nested object.
|
|
20
20
|
attr_accessor :format
|
|
21
21
|
|
|
22
|
+
# The single environment the export is scoped to. Omit it and a single-environment credential implies it (a multi-environment credential must name it), and a named environment must be one the caller may access. An export always covers exactly one environment.
|
|
23
|
+
attr_accessor :environment
|
|
24
|
+
|
|
22
25
|
# Date range using interval notation, e.g. `[2026-04-01T00:00:00Z,2026-04-15T00:00:00Z)`.
|
|
23
26
|
attr_accessor :filter_occurred_at
|
|
24
27
|
|
|
@@ -75,6 +78,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
75
78
|
def self.attribute_map
|
|
76
79
|
{
|
|
77
80
|
:'format' => :'format',
|
|
81
|
+
:'environment' => :'environment',
|
|
78
82
|
:'filter_occurred_at' => :'filter[occurred_at]',
|
|
79
83
|
:'filter_actor_type' => :'filter[actor_type]',
|
|
80
84
|
:'filter_actor_id' => :'filter[actor_id]',
|
|
@@ -102,6 +106,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
102
106
|
def self.openapi_types
|
|
103
107
|
{
|
|
104
108
|
:'format' => :'String',
|
|
109
|
+
:'environment' => :'String',
|
|
105
110
|
:'filter_occurred_at' => :'String',
|
|
106
111
|
:'filter_actor_type' => :'String',
|
|
107
112
|
:'filter_actor_id' => :'String',
|
|
@@ -118,6 +123,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
118
123
|
# List of attributes with nullable: true
|
|
119
124
|
def self.openapi_nullable
|
|
120
125
|
Set.new([
|
|
126
|
+
:'environment',
|
|
121
127
|
:'filter_occurred_at',
|
|
122
128
|
:'filter_actor_type',
|
|
123
129
|
:'filter_actor_id',
|
|
@@ -153,6 +159,10 @@ module SmplkitGeneratedClient::Audit
|
|
|
153
159
|
self.format = nil
|
|
154
160
|
end
|
|
155
161
|
|
|
162
|
+
if attributes.key?(:'environment')
|
|
163
|
+
self.environment = attributes[:'environment']
|
|
164
|
+
end
|
|
165
|
+
|
|
156
166
|
if attributes.key?(:'filter_occurred_at')
|
|
157
167
|
self.filter_occurred_at = attributes[:'filter_occurred_at']
|
|
158
168
|
end
|
|
@@ -232,6 +242,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
232
242
|
return true if self.equal?(o)
|
|
233
243
|
self.class == o.class &&
|
|
234
244
|
format == o.format &&
|
|
245
|
+
environment == o.environment &&
|
|
235
246
|
filter_occurred_at == o.filter_occurred_at &&
|
|
236
247
|
filter_actor_type == o.filter_actor_type &&
|
|
237
248
|
filter_actor_id == o.filter_actor_id &&
|
|
@@ -253,7 +264,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
253
264
|
# Calculates hash code according to all attributes.
|
|
254
265
|
# @return [Integer] Hash code
|
|
255
266
|
def hash
|
|
256
|
-
[format, filter_occurred_at, filter_actor_type, filter_actor_id, filter_event_type, filter_resource_type, filter_resource_id, filter_search, filter_do_not_forward, url, expires_at].hash
|
|
267
|
+
[format, environment, filter_occurred_at, filter_actor_type, filter_actor_id, filter_event_type, filter_resource_type, filter_resource_id, filter_search, filter_do_not_forward, url, expires_at].hash
|
|
257
268
|
end
|
|
258
269
|
|
|
259
270
|
# Builds the object from hash
|
data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/retry_failed_deliveries_request.rb
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::Audit
|
|
17
|
+
# Inputs to the retry-failed-deliveries action.
|
|
18
|
+
class RetryFailedDeliveriesRequest < ApiModelBase
|
|
19
|
+
# The single environment whose failed deliveries are re-attempted. Omit it and a single-environment credential implies it (a multi-environment credential must name it), and a named environment must be one the caller may access. The action always targets exactly one environment.
|
|
20
|
+
attr_accessor :environment
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'environment' => :'environment'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Returns attribute mapping this model knows about
|
|
30
|
+
def self.acceptable_attribute_map
|
|
31
|
+
attribute_map
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns all the JSON keys this model knows about
|
|
35
|
+
def self.acceptable_attributes
|
|
36
|
+
acceptable_attribute_map.values
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.openapi_types
|
|
41
|
+
{
|
|
42
|
+
:'environment' => :'String'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
:'environment'
|
|
50
|
+
])
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Initializes the object
|
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
|
+
def initialize(attributes = {})
|
|
56
|
+
if (!attributes.is_a?(Hash))
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::RetryFailedDeliveriesRequest` initialize method"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
63
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::RetryFailedDeliveriesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
65
|
+
end
|
|
66
|
+
h[k.to_sym] = v
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if attributes.key?(:'environment')
|
|
70
|
+
self.environment = attributes[:'environment']
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
86
|
+
true
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Checks equality by comparing each attribute.
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def ==(o)
|
|
92
|
+
return true if self.equal?(o)
|
|
93
|
+
self.class == o.class &&
|
|
94
|
+
environment == o.environment
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[environment].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
return nil unless attributes.is_a?(Hash)
|
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
115
|
+
transformed_hash = {}
|
|
116
|
+
openapi_types.each_pair do |key, type|
|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
118
|
+
transformed_hash["#{key}"] = nil
|
|
119
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
120
|
+
# check to ensure the input is an array given that the attribute
|
|
121
|
+
# is documented as an array but the input is not
|
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
124
|
+
end
|
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
new(transformed_hash)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Returns the object in the form of hash
|
|
133
|
+
# @return [Hash] Returns the object in the form of hash
|
|
134
|
+
def to_hash
|
|
135
|
+
hash = {}
|
|
136
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
137
|
+
value = self.send(attr)
|
|
138
|
+
if value.nil?
|
|
139
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
140
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
hash[param] = _to_hash(value)
|
|
144
|
+
end
|
|
145
|
+
hash
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
end
|
|
@@ -70,6 +70,7 @@ require 'smplkit_audit_client/models/pagination_meta'
|
|
|
70
70
|
require 'smplkit_audit_client/models/resource_type_attributes'
|
|
71
71
|
require 'smplkit_audit_client/models/resource_type_list_response'
|
|
72
72
|
require 'smplkit_audit_client/models/resource_type_resource'
|
|
73
|
+
require 'smplkit_audit_client/models/retry_failed_deliveries_request'
|
|
73
74
|
require 'smplkit_audit_client/models/retry_failed_deliveries_summary'
|
|
74
75
|
require 'smplkit_audit_client/models/severity'
|
|
75
76
|
require 'smplkit_audit_client/models/test_forwarder_request'
|
|
@@ -34,7 +34,7 @@ describe 'EventsApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for get_event
|
|
36
36
|
# Get Event
|
|
37
|
-
# Retrieve a single audit event by id. Authorized against the caller's permitted environment set: the event is returned only if its environment is one the caller may access, otherwise `404` (the same response as a non-existent id, so existence never leaks across environments).
|
|
37
|
+
# Retrieve a single audit event by id. Authorized against the caller's permitted environment set: the event is returned only if its environment is one the caller may access, otherwise `404` (the same response as a non-existent id, so existence never leaks across environments). A single-object lookup names the object by id; it does not resolve a target environment.
|
|
38
38
|
# @param event_id
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [EventResponse]
|
|
@@ -72,7 +72,7 @@ describe 'EventsApi' do
|
|
|
72
72
|
|
|
73
73
|
# unit tests for record_event
|
|
74
74
|
# Record Event
|
|
75
|
-
# Record an audit event for this account. The event is stamped with the environment it occurred in
|
|
75
|
+
# Record an audit event for this account. The event is stamped with the environment it occurred in. Name the target environment in the request body's `environment` field; omit it and a single-environment credential implies it, while a multi-environment or unrestricted credential must name it. The named environment must be one the caller may access and must exist and be managed for the 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). The same content recorded in two environments produces two distinct events. `resource_type` values beginning with `smpl.` are reserved for events that smplkit emits about its own resources and cannot be used here.
|
|
76
76
|
# @param event_request
|
|
77
77
|
# @param [Hash] opts the optional parameters
|
|
78
78
|
# @option opts [String] :idempotency_key
|
|
@@ -34,7 +34,7 @@ describe 'ExportsApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create_export
|
|
36
36
|
# Create Export
|
|
37
|
-
# Mint a short-lived signed URL to stream an events download. The request body specifies `format` (`CSV` or `JSONL`) and any subset of the event filters accepted by `GET /api/v1/events`. The response returns the signed URL plus its expiry (30 seconds from mint). Open the URL in a browser to stream the file to disk; no `Authorization` header is required at download time. Filter rules match `GET /api/v1/events`: `filter[resource_id]` requires `filter[resource_type]`; `filter[search]` requires either `filter[occurred_at]` or `filter[resource_type]` + `filter[resource_id]`. Violations are rejected here at mint time. Reads are allowed on lapsed subscriptions per the smplcore convention — same gate as the events list.
|
|
37
|
+
# Mint a short-lived signed URL to stream an events download. The request body specifies `format` (`CSV` or `JSONL`) and any subset of the event filters accepted by `GET /api/v1/events`. An export is scoped to a single environment: name it in the body's `environment` field, or omit it and a single-environment credential implies it (a multi-environment credential must name it). The response returns the signed URL plus its expiry (30 seconds from mint). Open the URL in a browser to stream the file to disk; no `Authorization` header is required at download time. Filter rules match `GET /api/v1/events`: `filter[resource_id]` requires `filter[resource_type]`; `filter[search]` requires either `filter[occurred_at]` or `filter[resource_type]` + `filter[resource_id]`. Violations are rejected here at mint time. Reads are allowed on lapsed subscriptions per the smplcore convention — same gate as the events list.
|
|
38
38
|
# @param export_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [ExportResponse]
|
|
@@ -82,9 +82,10 @@ describe 'ForwardersApi' do
|
|
|
82
82
|
|
|
83
83
|
# unit tests for list_forwarder_deliveries
|
|
84
84
|
# List Forwarder Deliveries
|
|
85
|
-
# List delivery log entries for a forwarder. Scoped
|
|
85
|
+
# List delivery log entries for a forwarder. Scoped by environment. Pass `filter[environment]` as a comma-separated list of environment keys to restrict results to that subset of the environments you can access; omit it to cover every environment you can access. Default sort is `-created_at` (newest first). Filter by `status` (`SUCCEEDED` or `FAILED`, case-insensitive), by `event`, or by a `created_at` range using interval notation (e.g. `[2026-01-01T00:00:00Z,*)`).
|
|
86
86
|
# @param forwarder_id
|
|
87
87
|
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @option opts [String] :filter_environment Comma-separated list of environment keys to scope deliveries to (e.g. `production,staging`). When omitted, results cover every environment you can access. The reserved value `smplkit` selects deliveries of 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.
|
|
88
89
|
# @option opts [String] :filter_status
|
|
89
90
|
# @option opts [String] :filter_created_at
|
|
90
91
|
# @option opts [String] :filter_event
|
|
@@ -116,9 +117,10 @@ describe 'ForwardersApi' do
|
|
|
116
117
|
|
|
117
118
|
# unit tests for retry_failed_forwarder_deliveries
|
|
118
119
|
# Retry Failed Forwarder Deliveries
|
|
119
|
-
# Retry every failed delivery for this forwarder in the
|
|
120
|
+
# Retry every failed delivery for this forwarder in the target environment. Targets a single environment: name it in the request body's `environment` field, or omit it and a single-environment credential implies it (a multi-environment credential must name it). Only that environment's failed deliveries are re-attempted, each using the forwarder's effective configuration for that environment and the original event. Returns the counts.
|
|
120
121
|
# @param forwarder_id
|
|
121
122
|
# @param [Hash] opts the optional parameters
|
|
123
|
+
# @option opts [RetryFailedDeliveriesRequest] :retry_failed_deliveries_request
|
|
122
124
|
# @return [RetryFailedDeliveriesSummary]
|
|
123
125
|
describe 'retry_failed_forwarder_deliveries test' do
|
|
124
126
|
it 'should work' do
|
|
@@ -37,6 +37,12 @@ describe SmplkitGeneratedClient::Audit::Export do
|
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
describe 'test attribute "environment"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
40
46
|
describe 'test attribute "filter_occurred_at"' do
|
|
41
47
|
it 'should work' do
|
|
42
48
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for SmplkitGeneratedClient::Audit::RetryFailedDeliveriesRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe SmplkitGeneratedClient::Audit::RetryFailedDeliveriesRequest do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::Audit::RetryFailedDeliveriesRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of RetryFailedDeliveriesRequest' do
|
|
24
|
+
it 'should create an instance of RetryFailedDeliveriesRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::Audit::RetryFailedDeliveriesRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "environment"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
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.
|
|
4
|
+
version: 3.0.101
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Smpl Solutions LLC
|
|
@@ -567,6 +567,7 @@ files:
|
|
|
567
567
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_attributes.rb
|
|
568
568
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_response.rb
|
|
569
569
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_resource.rb
|
|
570
|
+
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/retry_failed_deliveries_request.rb
|
|
570
571
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/retry_failed_deliveries_summary.rb
|
|
571
572
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/severity.rb
|
|
572
573
|
- lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_request.rb
|
|
@@ -635,6 +636,7 @@ files:
|
|
|
635
636
|
- lib/smplkit/_generated/audit/spec/models/resource_type_attributes_spec.rb
|
|
636
637
|
- lib/smplkit/_generated/audit/spec/models/resource_type_list_response_spec.rb
|
|
637
638
|
- lib/smplkit/_generated/audit/spec/models/resource_type_resource_spec.rb
|
|
639
|
+
- lib/smplkit/_generated/audit/spec/models/retry_failed_deliveries_request_spec.rb
|
|
638
640
|
- lib/smplkit/_generated/audit/spec/models/retry_failed_deliveries_summary_spec.rb
|
|
639
641
|
- lib/smplkit/_generated/audit/spec/models/severity_spec.rb
|
|
640
642
|
- lib/smplkit/_generated/audit/spec/models/test_forwarder_request_spec.rb
|