smplkit 2.0.9 → 2.0.11
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/forwarders_api.rb +5 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery.rb +2 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_type.rb +7 -7
- data/lib/smplkit/_generated/audit/spec/api/forwarders_api_spec.rb +2 -1
- data/lib/smplkit/_generated/audit/spec/models/forwarder_delivery_spec.rb +1 -1
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/api/configs_api.rb +28 -28
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/api/usage_api.rb +4 -4
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/config.rb +8 -0
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_item_definition.rb +3 -1
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_item_override.rb +1 -1
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_list_response.rb +1 -0
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_request.rb +165 -0
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_resource.rb +1 -0
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_response.rb +1 -0
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/environment_override.rb +2 -1
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/usage_attributes.rb +4 -0
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/usage_list_response.rb +1 -0
- data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/usage_resource.rb +1 -0
- data/lib/smplkit/_generated/config/lib/smplkit_config_client.rb +1 -0
- data/lib/smplkit/_generated/config/spec/api/configs_api_spec.rb +7 -7
- data/lib/smplkit/_generated/config/spec/api/usage_api_spec.rb +2 -2
- data/lib/smplkit/_generated/config/spec/models/config_request_spec.rb +36 -0
- data/lib/smplkit/audit/events.rb +2 -1
- data/lib/smplkit/audit/forwarders.rb +9 -8
- 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: 11d1397bb7c77eeb63a28eb21bf9aab0688feffe5e8df6339c363511713ac843
|
|
4
|
+
data.tar.gz: 8efcc6ad6061be18bbf48fb5993dffd693a9f2b1243a0b091fde72fbe46830c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 936f0a2efbad65c8a7904b18ed28e0508892bbd4d641e6ed7774eba0df22c1c64aabe7f24780e0f2f31e5303905b58c3464122bff83f7c18863e81a3fcfe3dca
|
|
7
|
+
data.tar.gz: a0ec336127cd5a0d72bc943d0dda7e5df277cc010d4e6641699136b8d8eaecdad0b3eeab94f6c4ac54f5117109930b90f07e3e5df99f86724385a042b6a4099b
|
|
@@ -280,11 +280,12 @@ 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 (``
|
|
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.
|
|
284
284
|
# @param forwarder_id [String]
|
|
285
285
|
# @param [Hash] opts the optional parameters
|
|
286
286
|
# @option opts [String] :filter_status
|
|
287
287
|
# @option opts [String] :filter_created_at
|
|
288
|
+
# @option opts [String] :filter_event_id
|
|
288
289
|
# @option opts [Integer] :page_size
|
|
289
290
|
# @option opts [String] :page_after
|
|
290
291
|
# @return [ForwarderDeliveryListResponse]
|
|
@@ -294,11 +295,12 @@ module SmplkitGeneratedClient::Audit
|
|
|
294
295
|
end
|
|
295
296
|
|
|
296
297
|
# List Forwarder Deliveries
|
|
297
|
-
# List delivery rows for a forwarder. Default sort is ``-created_at``. Cursor pagination via ``page[after]``. Filter by status (``
|
|
298
|
+
# 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.
|
|
298
299
|
# @param forwarder_id [String]
|
|
299
300
|
# @param [Hash] opts the optional parameters
|
|
300
301
|
# @option opts [String] :filter_status
|
|
301
302
|
# @option opts [String] :filter_created_at
|
|
303
|
+
# @option opts [String] :filter_event_id
|
|
302
304
|
# @option opts [Integer] :page_size
|
|
303
305
|
# @option opts [String] :page_after
|
|
304
306
|
# @return [Array<(ForwarderDeliveryListResponse, Integer, Hash)>] ForwarderDeliveryListResponse data, response status code and response headers
|
|
@@ -321,6 +323,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
321
323
|
query_params = opts[:query_params] || {}
|
|
322
324
|
query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
|
|
323
325
|
query_params[:'filter[created_at]'] = opts[:'filter_created_at'] if !opts[:'filter_created_at'].nil?
|
|
326
|
+
query_params[:'filter[event_id]'] = opts[:'filter_event_id'] if !opts[:'filter_event_id'].nil?
|
|
324
327
|
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
325
328
|
query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
|
|
326
329
|
|
|
@@ -211,7 +211,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
211
211
|
return false if @event_id.nil?
|
|
212
212
|
return false if @attempt_number.nil?
|
|
213
213
|
return false if @status.nil?
|
|
214
|
-
status_validator = EnumAttributeValidator.new('String', ["
|
|
214
|
+
status_validator = EnumAttributeValidator.new('String', ["SUCCEEDED", "FAILED", "FILTERED_OUT", "SKIPPED_DO_NOT_FORWARD"])
|
|
215
215
|
return false unless status_validator.valid?(@status)
|
|
216
216
|
true
|
|
217
217
|
end
|
|
@@ -249,7 +249,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
249
249
|
# Custom attribute writer method checking allowed values (enum).
|
|
250
250
|
# @param [Object] status Object to be assigned
|
|
251
251
|
def status=(status)
|
|
252
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
252
|
+
validator = EnumAttributeValidator.new('String', ["SUCCEEDED", "FAILED", "FILTERED_OUT", "SKIPPED_DO_NOT_FORWARD"])
|
|
253
253
|
unless validator.valid?(status)
|
|
254
254
|
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
255
255
|
end
|
|
@@ -15,13 +15,13 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Audit
|
|
17
17
|
class ForwarderType
|
|
18
|
-
HTTP = "
|
|
19
|
-
DATADOG = "
|
|
20
|
-
SPLUNK_HEC = "
|
|
21
|
-
SUMO_LOGIC = "
|
|
22
|
-
NEW_RELIC = "
|
|
23
|
-
HONEYCOMB = "
|
|
24
|
-
ELASTIC = "
|
|
18
|
+
HTTP = "HTTP".freeze
|
|
19
|
+
DATADOG = "DATADOG".freeze
|
|
20
|
+
SPLUNK_HEC = "SPLUNK_HEC".freeze
|
|
21
|
+
SUMO_LOGIC = "SUMO_LOGIC".freeze
|
|
22
|
+
NEW_RELIC = "NEW_RELIC".freeze
|
|
23
|
+
HONEYCOMB = "HONEYCOMB".freeze
|
|
24
|
+
ELASTIC = "ELASTIC".freeze
|
|
25
25
|
|
|
26
26
|
def self.all_vars
|
|
27
27
|
@all_vars ||= [HTTP, DATADOG, SPLUNK_HEC, SUMO_LOGIC, NEW_RELIC, HONEYCOMB, ELASTIC].freeze
|
|
@@ -82,11 +82,12 @@ describe 'ForwardersApi' do
|
|
|
82
82
|
|
|
83
83
|
# unit tests for list_forwarder_deliveries
|
|
84
84
|
# List Forwarder Deliveries
|
|
85
|
-
# List delivery rows for a forwarder. Default sort is ``-created_at``. Cursor pagination via ``page[after]``. Filter by status (``
|
|
85
|
+
# 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.
|
|
86
86
|
# @param forwarder_id
|
|
87
87
|
# @param [Hash] opts the optional parameters
|
|
88
88
|
# @option opts [String] :filter_status
|
|
89
89
|
# @option opts [String] :filter_created_at
|
|
90
|
+
# @option opts [String] :filter_event_id
|
|
90
91
|
# @option opts [Integer] :page_size
|
|
91
92
|
# @option opts [String] :page_after
|
|
92
93
|
# @return [ForwarderDeliveryListResponse]
|
|
@@ -48,7 +48,7 @@ describe SmplkitGeneratedClient::Audit::ForwarderDelivery do
|
|
|
48
48
|
describe 'test attribute "status"' do
|
|
49
49
|
it 'should work' do
|
|
50
50
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["
|
|
51
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["SUCCEEDED", "FAILED", "FILTERED_OUT", "SKIPPED_DO_NOT_FORWARD"])
|
|
52
52
|
# validator.allowable_values.each do |value|
|
|
53
53
|
# expect { instance.status = value }.not_to raise_error
|
|
54
54
|
# end
|
|
@@ -20,27 +20,27 @@ module SmplkitGeneratedClient::Config
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create Config
|
|
23
|
-
# Create a
|
|
24
|
-
# @param
|
|
23
|
+
# Create a config for this account. The caller supplies the config's key as `data.id`. Keys are unique within an account and immutable for the lifetime of the config.
|
|
24
|
+
# @param config_request [ConfigRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [ConfigResponse]
|
|
27
|
-
def create_config(
|
|
28
|
-
data, _status_code, _headers = create_config_with_http_info(
|
|
27
|
+
def create_config(config_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_config_with_http_info(config_request, opts)
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create Config
|
|
33
|
-
# Create a
|
|
34
|
-
# @param
|
|
33
|
+
# Create a config for this account. The caller supplies the config's key as `data.id`. Keys are unique within an account and immutable for the lifetime of the config.
|
|
34
|
+
# @param config_request [ConfigRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(ConfigResponse, Integer, Hash)>] ConfigResponse data, response status code and response headers
|
|
37
|
-
def create_config_with_http_info(
|
|
37
|
+
def create_config_with_http_info(config_request, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
39
|
@api_client.config.logger.debug 'Calling API: ConfigsApi.create_config ...'
|
|
40
40
|
end
|
|
41
|
-
# verify the required parameter '
|
|
42
|
-
if @api_client.config.client_side_validation &&
|
|
43
|
-
fail ArgumentError, "Missing the required parameter '
|
|
41
|
+
# verify the required parameter 'config_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && config_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'config_request' when calling ConfigsApi.create_config"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
46
|
local_var_path = '/api/v1/configs'
|
|
@@ -62,7 +62,7 @@ module SmplkitGeneratedClient::Config
|
|
|
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(
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(config_request)
|
|
66
66
|
|
|
67
67
|
# return_type
|
|
68
68
|
return_type = opts[:debug_return_type] || 'ConfigResponse'
|
|
@@ -88,7 +88,7 @@ module SmplkitGeneratedClient::Config
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Delete Config
|
|
91
|
-
# Delete a
|
|
91
|
+
# Delete a config by its key. A config that is referenced as `parent` by another config cannot be deleted; reparent or remove the parent reference on every child first. The `common` config cannot be deleted.
|
|
92
92
|
# @param id [String]
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
94
|
# @return [nil]
|
|
@@ -98,7 +98,7 @@ module SmplkitGeneratedClient::Config
|
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
# Delete Config
|
|
101
|
-
# Delete a
|
|
101
|
+
# Delete a config by its key. A config that is referenced as `parent` by another config cannot be deleted; reparent or remove the parent reference on every child first. The `common` config cannot be deleted.
|
|
102
102
|
# @param 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::Config
|
|
|
149
149
|
end
|
|
150
150
|
|
|
151
151
|
# Get Config
|
|
152
|
-
#
|
|
152
|
+
# Retrieve a single config by its key.
|
|
153
153
|
# @param id [String]
|
|
154
154
|
# @param [Hash] opts the optional parameters
|
|
155
155
|
# @return [ConfigResponse]
|
|
@@ -159,7 +159,7 @@ module SmplkitGeneratedClient::Config
|
|
|
159
159
|
end
|
|
160
160
|
|
|
161
161
|
# Get Config
|
|
162
|
-
#
|
|
162
|
+
# Retrieve a single config by its key.
|
|
163
163
|
# @param id [String]
|
|
164
164
|
# @param [Hash] opts the optional parameters
|
|
165
165
|
# @return [Array<(ConfigResponse, Integer, Hash)>] ConfigResponse data, response status code and response headers
|
|
@@ -212,7 +212,7 @@ module SmplkitGeneratedClient::Config
|
|
|
212
212
|
end
|
|
213
213
|
|
|
214
214
|
# List Configs
|
|
215
|
-
# List
|
|
215
|
+
# List configs for this account. Pass `filter[parent]=<parent_key>` to return only the direct children of a specific config.
|
|
216
216
|
# @param [Hash] opts the optional parameters
|
|
217
217
|
# @option opts [String] :filter_parent
|
|
218
218
|
# @return [ConfigListResponse]
|
|
@@ -222,7 +222,7 @@ module SmplkitGeneratedClient::Config
|
|
|
222
222
|
end
|
|
223
223
|
|
|
224
224
|
# List Configs
|
|
225
|
-
# List
|
|
225
|
+
# List configs for this account. Pass `filter[parent]=<parent_key>` to return only the direct children of a specific config.
|
|
226
226
|
# @param [Hash] opts the optional parameters
|
|
227
227
|
# @option opts [String] :filter_parent
|
|
228
228
|
# @return [Array<(ConfigListResponse, Integer, Hash)>] ConfigListResponse data, response status code and response headers
|
|
@@ -272,23 +272,23 @@ module SmplkitGeneratedClient::Config
|
|
|
272
272
|
end
|
|
273
273
|
|
|
274
274
|
# Update Config
|
|
275
|
-
# Replace a
|
|
275
|
+
# Replace a config entirely. Every writable field is overwritten.
|
|
276
276
|
# @param id [String]
|
|
277
|
-
# @param
|
|
277
|
+
# @param config_request [ConfigRequest]
|
|
278
278
|
# @param [Hash] opts the optional parameters
|
|
279
279
|
# @return [ConfigResponse]
|
|
280
|
-
def update_config(id,
|
|
281
|
-
data, _status_code, _headers = update_config_with_http_info(id,
|
|
280
|
+
def update_config(id, config_request, opts = {})
|
|
281
|
+
data, _status_code, _headers = update_config_with_http_info(id, config_request, opts)
|
|
282
282
|
data
|
|
283
283
|
end
|
|
284
284
|
|
|
285
285
|
# Update Config
|
|
286
|
-
# Replace a
|
|
286
|
+
# Replace a config entirely. Every writable field is overwritten.
|
|
287
287
|
# @param id [String]
|
|
288
|
-
# @param
|
|
288
|
+
# @param config_request [ConfigRequest]
|
|
289
289
|
# @param [Hash] opts the optional parameters
|
|
290
290
|
# @return [Array<(ConfigResponse, Integer, Hash)>] ConfigResponse data, response status code and response headers
|
|
291
|
-
def update_config_with_http_info(id,
|
|
291
|
+
def update_config_with_http_info(id, config_request, opts = {})
|
|
292
292
|
if @api_client.config.debugging
|
|
293
293
|
@api_client.config.logger.debug 'Calling API: ConfigsApi.update_config ...'
|
|
294
294
|
end
|
|
@@ -296,9 +296,9 @@ module SmplkitGeneratedClient::Config
|
|
|
296
296
|
if @api_client.config.client_side_validation && id.nil?
|
|
297
297
|
fail ArgumentError, "Missing the required parameter 'id' when calling ConfigsApi.update_config"
|
|
298
298
|
end
|
|
299
|
-
# verify the required parameter '
|
|
300
|
-
if @api_client.config.client_side_validation &&
|
|
301
|
-
fail ArgumentError, "Missing the required parameter '
|
|
299
|
+
# verify the required parameter 'config_request' is set
|
|
300
|
+
if @api_client.config.client_side_validation && config_request.nil?
|
|
301
|
+
fail ArgumentError, "Missing the required parameter 'config_request' when calling ConfigsApi.update_config"
|
|
302
302
|
end
|
|
303
303
|
# resource path
|
|
304
304
|
local_var_path = '/api/v1/configs/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -320,7 +320,7 @@ module SmplkitGeneratedClient::Config
|
|
|
320
320
|
form_params = opts[:form_params] || {}
|
|
321
321
|
|
|
322
322
|
# http body (model)
|
|
323
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
323
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(config_request)
|
|
324
324
|
|
|
325
325
|
# return_type
|
|
326
326
|
return_type = opts[:debug_return_type] || 'ConfigResponse'
|
|
@@ -20,9 +20,9 @@ module SmplkitGeneratedClient::Config
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# List Config Usage
|
|
23
|
-
#
|
|
23
|
+
# Report the current-period usage counters for this account.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @option opts [String] :filter_period
|
|
25
|
+
# @option opts [String] :filter_period Period to report. `current` is the only supported value.
|
|
26
26
|
# @return [UsageListResponse]
|
|
27
27
|
def list_config_usage(opts = {})
|
|
28
28
|
data, _status_code, _headers = list_config_usage_with_http_info(opts)
|
|
@@ -30,9 +30,9 @@ module SmplkitGeneratedClient::Config
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# List Config Usage
|
|
33
|
-
#
|
|
33
|
+
# Report the current-period usage counters for this account.
|
|
34
34
|
# @param [Hash] opts the optional parameters
|
|
35
|
-
# @option opts [String] :filter_period
|
|
35
|
+
# @option opts [String] :filter_period Period to report. `current` is the only supported value.
|
|
36
36
|
# @return [Array<(UsageListResponse, Integer, Hash)>] UsageListResponse data, response status code and response headers
|
|
37
37
|
def list_config_usage_with_http_info(opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
@@ -14,19 +14,27 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Config
|
|
17
|
+
# A named bag of configuration items, optionally inheriting from another config. Items are typed key/value pairs (`STRING`, `NUMBER`, `BOOLEAN`, `JSON`). Configs may declare per-environment overrides for any item declared on the config itself or anywhere in its inheritance chain; resolving a config against an environment merges the chain top-down and then applies the matching overrides.
|
|
17
18
|
class Config < ApiModelBase
|
|
19
|
+
# Human-readable name for the config.
|
|
18
20
|
attr_accessor :name
|
|
19
21
|
|
|
22
|
+
# Optional human-readable description of what this config holds.
|
|
20
23
|
attr_accessor :description
|
|
21
24
|
|
|
25
|
+
# Key of another config to inherit items from. Inherited items appear as if declared on this config; locally declared items with the same key shadow them. Omit or set to `null` for a standalone config with no parent.
|
|
22
26
|
attr_accessor :parent
|
|
23
27
|
|
|
28
|
+
# Map of item keys to item definitions declared on this config. Keys must be unique within the config; declared types are immutable once set and must match any type declared for the same key on an ancestor.
|
|
24
29
|
attr_accessor :items
|
|
25
30
|
|
|
31
|
+
# Map of environment keys to per-environment override sets. An environment override applies when this config is resolved against that environment.
|
|
26
32
|
attr_accessor :environments
|
|
27
33
|
|
|
34
|
+
# When the config was created.
|
|
28
35
|
attr_accessor :created_at
|
|
29
36
|
|
|
37
|
+
# When the config was last modified.
|
|
30
38
|
attr_accessor :updated_at
|
|
31
39
|
|
|
32
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_item_definition.rb
CHANGED
|
@@ -14,12 +14,14 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Config
|
|
17
|
-
#
|
|
17
|
+
# Type-declared item within a config. Each item carries a value plus a declared type that constrains the value and any per-environment overrides for the same key.
|
|
18
18
|
class ConfigItemDefinition < ApiModelBase
|
|
19
19
|
attr_accessor :value
|
|
20
20
|
|
|
21
|
+
# Declared value type. Constrains the JSON shape of `value` and of every override of this key in the `environments` map.
|
|
21
22
|
attr_accessor :type
|
|
22
23
|
|
|
24
|
+
# Optional human-readable explanation of what this item controls.
|
|
23
25
|
attr_accessor :description
|
|
24
26
|
|
|
25
27
|
class EnumAttributeValidator
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Config
|
|
17
|
-
#
|
|
17
|
+
# Per-environment override of a single item value.
|
|
18
18
|
class ConfigItemOverride < ApiModelBase
|
|
19
19
|
attr_accessor :value
|
|
20
20
|
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Config API
|
|
3
|
+
|
|
4
|
+
#Configuration management API for smplkit.
|
|
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::Config
|
|
17
|
+
# JSON:API request envelope for creating or updating a config.
|
|
18
|
+
class ConfigRequest < ApiModelBase
|
|
19
|
+
attr_accessor :data
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'data' => :'data'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'data' => :'ConfigResource'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Config::ConfigRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Config::ConfigRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'data')
|
|
68
|
+
self.data = attributes[:'data']
|
|
69
|
+
else
|
|
70
|
+
self.data = nil
|
|
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
|
+
if @data.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @data.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] data Value to be assigned
|
|
96
|
+
def data=(data)
|
|
97
|
+
if data.nil?
|
|
98
|
+
fail ArgumentError, 'data cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@data = data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
data == o.data
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[data].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Config
|
|
17
|
+
# JSON:API resource envelope for a config. `id` is the human-readable key for the config and must be supplied by the caller on create. It is unique within the account.
|
|
17
18
|
class ConfigResource < ApiModelBase
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|
|
@@ -14,8 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Config
|
|
17
|
-
#
|
|
17
|
+
# Per-environment override set for a config.
|
|
18
18
|
class EnvironmentOverride < ApiModelBase
|
|
19
|
+
# Map of item keys to override values that apply when this environment is resolved. Each key must already be declared (with a type) on this config or one of its ancestors.
|
|
19
20
|
attr_accessor :values
|
|
20
21
|
|
|
21
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,11 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Config
|
|
17
|
+
# Usage counter for a single metered limit.
|
|
17
18
|
class UsageAttributes < ApiModelBase
|
|
19
|
+
# Identifier of the metered limit, e.g. `config.items` or `config.inheritance_depth`.
|
|
18
20
|
attr_accessor :limit_key
|
|
19
21
|
|
|
22
|
+
# Period the counter covers. `current` is the only supported value.
|
|
20
23
|
attr_accessor :period
|
|
21
24
|
|
|
25
|
+
# Count for the period.
|
|
22
26
|
attr_accessor :value
|
|
23
27
|
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -22,6 +22,7 @@ require 'smplkit_config_client/models/config'
|
|
|
22
22
|
require 'smplkit_config_client/models/config_item_definition'
|
|
23
23
|
require 'smplkit_config_client/models/config_item_override'
|
|
24
24
|
require 'smplkit_config_client/models/config_list_response'
|
|
25
|
+
require 'smplkit_config_client/models/config_request'
|
|
25
26
|
require 'smplkit_config_client/models/config_resource'
|
|
26
27
|
require 'smplkit_config_client/models/config_response'
|
|
27
28
|
require 'smplkit_config_client/models/environment_override'
|
|
@@ -34,8 +34,8 @@ describe 'ConfigsApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create_config
|
|
36
36
|
# Create Config
|
|
37
|
-
# Create a
|
|
38
|
-
# @param
|
|
37
|
+
# Create a config for this account. The caller supplies the config's key as `data.id`. Keys are unique within an account and immutable for the lifetime of the config.
|
|
38
|
+
# @param config_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [ConfigResponse]
|
|
41
41
|
describe 'create_config test' do
|
|
@@ -46,7 +46,7 @@ describe 'ConfigsApi' do
|
|
|
46
46
|
|
|
47
47
|
# unit tests for delete_config
|
|
48
48
|
# Delete Config
|
|
49
|
-
# Delete a
|
|
49
|
+
# Delete a config by its key. A config that is referenced as `parent` by another config cannot be deleted; reparent or remove the parent reference on every child first. The `common` config cannot be deleted.
|
|
50
50
|
# @param id
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
|
52
52
|
# @return [nil]
|
|
@@ -58,7 +58,7 @@ describe 'ConfigsApi' do
|
|
|
58
58
|
|
|
59
59
|
# unit tests for get_config
|
|
60
60
|
# Get Config
|
|
61
|
-
#
|
|
61
|
+
# Retrieve a single config by its key.
|
|
62
62
|
# @param id
|
|
63
63
|
# @param [Hash] opts the optional parameters
|
|
64
64
|
# @return [ConfigResponse]
|
|
@@ -70,7 +70,7 @@ describe 'ConfigsApi' do
|
|
|
70
70
|
|
|
71
71
|
# unit tests for list_configs
|
|
72
72
|
# List Configs
|
|
73
|
-
# List
|
|
73
|
+
# List configs for this account. Pass `filter[parent]=<parent_key>` to return only the direct children of a specific config.
|
|
74
74
|
# @param [Hash] opts the optional parameters
|
|
75
75
|
# @option opts [String] :filter_parent
|
|
76
76
|
# @return [ConfigListResponse]
|
|
@@ -82,9 +82,9 @@ describe 'ConfigsApi' do
|
|
|
82
82
|
|
|
83
83
|
# unit tests for update_config
|
|
84
84
|
# Update Config
|
|
85
|
-
# Replace a
|
|
85
|
+
# Replace a config entirely. Every writable field is overwritten.
|
|
86
86
|
# @param id
|
|
87
|
-
# @param
|
|
87
|
+
# @param config_request
|
|
88
88
|
# @param [Hash] opts the optional parameters
|
|
89
89
|
# @return [ConfigResponse]
|
|
90
90
|
describe 'update_config test' do
|
|
@@ -34,9 +34,9 @@ describe 'UsageApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for list_config_usage
|
|
36
36
|
# List Config Usage
|
|
37
|
-
#
|
|
37
|
+
# Report the current-period usage counters for this account.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
|
-
# @option opts [String] :filter_period
|
|
39
|
+
# @option opts [String] :filter_period Period to report. `current` is the only supported value.
|
|
40
40
|
# @return [UsageListResponse]
|
|
41
41
|
describe 'list_config_usage test' do
|
|
42
42
|
it 'should work' do
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Config API
|
|
3
|
+
|
|
4
|
+
#Configuration management API for smplkit.
|
|
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::Config::ConfigRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe SmplkitGeneratedClient::Config::ConfigRequest do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::Config::ConfigRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ConfigRequest' do
|
|
24
|
+
it 'should create an instance of ConfigRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::Config::ConfigRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "data"' 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
|
data/lib/smplkit/audit/events.rb
CHANGED
|
@@ -71,7 +71,7 @@ module Smplkit
|
|
|
71
71
|
# +#next_cursor+ is the opaque token for the next page (or nil).
|
|
72
72
|
def list(action: nil, resource_type: nil, resource_id: nil,
|
|
73
73
|
actor_type: nil, actor_id: nil, occurred_at_range: nil,
|
|
74
|
-
page_size: nil, page_after: nil)
|
|
74
|
+
search: nil, page_size: nil, page_after: nil)
|
|
75
75
|
# Generated client opts use snake_case keys that internally map
|
|
76
76
|
# to the JSON:API ``filter[*]`` / ``page[*]`` query-string format
|
|
77
77
|
# (see default_api.rb#list_events_with_http_info). Without the
|
|
@@ -84,6 +84,7 @@ module Smplkit
|
|
|
84
84
|
opts[:filter_actor_type] = actor_type if actor_type
|
|
85
85
|
opts[:filter_actor_id] = actor_id if actor_id
|
|
86
86
|
opts[:filter_occurred_at] = occurred_at_range if occurred_at_range
|
|
87
|
+
opts[:filter_search] = search if search
|
|
87
88
|
opts[:page_size] = page_size if page_size
|
|
88
89
|
opts[:page_after] = page_after if page_after
|
|
89
90
|
|
|
@@ -10,13 +10,13 @@ module Smplkit
|
|
|
10
10
|
# {Forwarders#list}. The wrapper validates membership before
|
|
11
11
|
# round-tripping to the wire.
|
|
12
12
|
module ForwarderType
|
|
13
|
-
HTTP = "
|
|
14
|
-
DATADOG = "
|
|
15
|
-
SPLUNK_HEC = "
|
|
16
|
-
SUMO_LOGIC = "
|
|
17
|
-
NEW_RELIC = "
|
|
18
|
-
HONEYCOMB = "
|
|
19
|
-
ELASTIC = "
|
|
13
|
+
HTTP = "HTTP"
|
|
14
|
+
DATADOG = "DATADOG"
|
|
15
|
+
SPLUNK_HEC = "SPLUNK_HEC"
|
|
16
|
+
SUMO_LOGIC = "SUMO_LOGIC"
|
|
17
|
+
NEW_RELIC = "NEW_RELIC"
|
|
18
|
+
HONEYCOMB = "HONEYCOMB"
|
|
19
|
+
ELASTIC = "ELASTIC"
|
|
20
20
|
|
|
21
21
|
# Every supported value, in spec order. Useful for membership
|
|
22
22
|
# checks, dropdown population, or test parametrization.
|
|
@@ -129,10 +129,11 @@ module Smplkit
|
|
|
129
129
|
@actions = DeliveryActions.new(api)
|
|
130
130
|
end
|
|
131
131
|
|
|
132
|
-
def list(forwarder_id, status: nil, created_at_range: nil, page_size: nil, page_after: nil)
|
|
132
|
+
def list(forwarder_id, status: nil, created_at_range: nil, event_id: nil, page_size: nil, page_after: nil)
|
|
133
133
|
opts = {}
|
|
134
134
|
opts[:filter_status] = status if status
|
|
135
135
|
opts[:filter_created_at] = created_at_range if created_at_range
|
|
136
|
+
opts[:filter_event_id] = event_id if event_id
|
|
136
137
|
opts[:page_size] = page_size if page_size
|
|
137
138
|
opts[:page_after] = page_after if page_after
|
|
138
139
|
resp = @api.list_forwarder_deliveries(forwarder_id, opts)
|
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: 2.0.
|
|
4
|
+
version: 2.0.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Smpl Solutions LLC
|
|
@@ -478,6 +478,7 @@ files:
|
|
|
478
478
|
- lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_item_definition.rb
|
|
479
479
|
- lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_item_override.rb
|
|
480
480
|
- lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_list_response.rb
|
|
481
|
+
- lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_request.rb
|
|
481
482
|
- lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_resource.rb
|
|
482
483
|
- lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_response.rb
|
|
483
484
|
- lib/smplkit/_generated/config/lib/smplkit_config_client/models/environment_override.rb
|
|
@@ -490,6 +491,7 @@ files:
|
|
|
490
491
|
- lib/smplkit/_generated/config/spec/models/config_item_definition_spec.rb
|
|
491
492
|
- lib/smplkit/_generated/config/spec/models/config_item_override_spec.rb
|
|
492
493
|
- lib/smplkit/_generated/config/spec/models/config_list_response_spec.rb
|
|
494
|
+
- lib/smplkit/_generated/config/spec/models/config_request_spec.rb
|
|
493
495
|
- lib/smplkit/_generated/config/spec/models/config_resource_spec.rb
|
|
494
496
|
- lib/smplkit/_generated/config/spec/models/config_response_spec.rb
|
|
495
497
|
- lib/smplkit/_generated/config/spec/models/config_spec.rb
|