smplkit 1.0.20 → 1.0.22

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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/forwarders_api.rb +640 -0
  3. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event.rb +13 -1
  4. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder.rb +353 -0
  5. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery.rb +329 -0
  6. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_list_response.rb +202 -0
  7. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_resource.rb +201 -0
  8. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_response.rb +164 -0
  9. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_http.rb +260 -0
  10. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_links.rb +148 -0
  11. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_meta.rb +164 -0
  12. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_response.rb +202 -0
  13. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_resource.rb +201 -0
  14. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_response.rb +164 -0
  15. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/http_header.rb +218 -0
  16. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/retry_failed_deliveries_summary.rb +216 -0
  17. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_request.rb +294 -0
  18. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_response.rb +220 -0
  19. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +16 -0
  20. data/lib/smplkit/_generated/audit/spec/api/forwarders_api_spec.rb +152 -0
  21. data/lib/smplkit/_generated/audit/spec/models/event_spec.rb +6 -0
  22. data/lib/smplkit/_generated/audit/spec/models/forwarder_delivery_list_response_spec.rb +48 -0
  23. data/lib/smplkit/_generated/audit/spec/models/forwarder_delivery_resource_spec.rb +48 -0
  24. data/lib/smplkit/_generated/audit/spec/models/forwarder_delivery_response_spec.rb +36 -0
  25. data/lib/smplkit/_generated/audit/spec/models/forwarder_delivery_spec.rb +94 -0
  26. data/lib/smplkit/_generated/audit/spec/models/forwarder_http_spec.rb +60 -0
  27. data/lib/smplkit/_generated/audit/spec/models/forwarder_list_links_spec.rb +36 -0
  28. data/lib/smplkit/_generated/audit/spec/models/forwarder_list_meta_spec.rb +36 -0
  29. data/lib/smplkit/_generated/audit/spec/models/forwarder_list_response_spec.rb +48 -0
  30. data/lib/smplkit/_generated/audit/spec/models/forwarder_resource_spec.rb +48 -0
  31. data/lib/smplkit/_generated/audit/spec/models/forwarder_response_spec.rb +36 -0
  32. data/lib/smplkit/_generated/audit/spec/models/forwarder_spec.rb +102 -0
  33. data/lib/smplkit/_generated/audit/spec/models/http_header_spec.rb +42 -0
  34. data/lib/smplkit/_generated/audit/spec/models/retry_failed_deliveries_summary_spec.rb +48 -0
  35. data/lib/smplkit/_generated/audit/spec/models/test_forwarder_request_spec.rb +66 -0
  36. data/lib/smplkit/_generated/audit/spec/models/test_forwarder_response_spec.rb +66 -0
  37. metadata +33 -1
@@ -0,0 +1,294 @@
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
+ # Plain-JSON body for the test_forwarder execute action. Mirrors the encrypted ``ForwarderHttp`` shape with one addition — ``timeout_ms``, capped server-side.
18
+ class TestForwarderRequest < ApiModelBase
19
+ attr_accessor :method
20
+
21
+ attr_accessor :url
22
+
23
+ attr_accessor :headers
24
+
25
+ attr_accessor :body
26
+
27
+ attr_accessor :success_status
28
+
29
+ attr_accessor :timeout_ms
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'method' => :'method',
35
+ :'url' => :'url',
36
+ :'headers' => :'headers',
37
+ :'body' => :'body',
38
+ :'success_status' => :'success_status',
39
+ :'timeout_ms' => :'timeout_ms'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'method' => :'String',
57
+ :'url' => :'String',
58
+ :'headers' => :'Array<HttpHeader>',
59
+ :'body' => :'String',
60
+ :'success_status' => :'String',
61
+ :'timeout_ms' => :'Integer'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ :'body',
69
+ :'timeout_ms'
70
+ ])
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ def initialize(attributes = {})
76
+ if (!attributes.is_a?(Hash))
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::TestForwarderRequest` initialize method"
78
+ end
79
+
80
+ # check to see if the attribute exists and convert string to symbol for hash key
81
+ acceptable_attribute_map = self.class.acceptable_attribute_map
82
+ attributes = attributes.each_with_object({}) { |(k, v), h|
83
+ if (!acceptable_attribute_map.key?(k.to_sym))
84
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::TestForwarderRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
85
+ end
86
+ h[k.to_sym] = v
87
+ }
88
+
89
+ if attributes.key?(:'method')
90
+ self.method = attributes[:'method']
91
+ else
92
+ self.method = 'POST'
93
+ end
94
+
95
+ if attributes.key?(:'url')
96
+ self.url = attributes[:'url']
97
+ else
98
+ self.url = nil
99
+ end
100
+
101
+ if attributes.key?(:'headers')
102
+ if (value = attributes[:'headers']).is_a?(Array)
103
+ self.headers = value
104
+ end
105
+ end
106
+
107
+ if attributes.key?(:'body')
108
+ self.body = attributes[:'body']
109
+ end
110
+
111
+ if attributes.key?(:'success_status')
112
+ self.success_status = attributes[:'success_status']
113
+ else
114
+ self.success_status = '2xx'
115
+ end
116
+
117
+ if attributes.key?(:'timeout_ms')
118
+ self.timeout_ms = attributes[:'timeout_ms']
119
+ end
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properties with the reasons
124
+ def list_invalid_properties
125
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
126
+ invalid_properties = Array.new
127
+ if @url.nil?
128
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
129
+ end
130
+
131
+ if @url.to_s.length > 2048
132
+ invalid_properties.push('invalid value for "url", the character length must be smaller than or equal to 2048.')
133
+ end
134
+
135
+ if @url.to_s.length < 1
136
+ invalid_properties.push('invalid value for "url", the character length must be greater than or equal to 1.')
137
+ end
138
+
139
+ if !@body.nil? && @body.to_s.length > 65536
140
+ invalid_properties.push('invalid value for "body", the character length must be smaller than or equal to 65536.')
141
+ end
142
+
143
+ if !@success_status.nil? && @success_status.to_s.length > 3
144
+ invalid_properties.push('invalid value for "success_status", the character length must be smaller than or equal to 3.')
145
+ end
146
+
147
+ if !@timeout_ms.nil? && @timeout_ms > 30000
148
+ invalid_properties.push('invalid value for "timeout_ms", must be smaller than or equal to 30000.')
149
+ end
150
+
151
+ if !@timeout_ms.nil? && @timeout_ms < 1
152
+ invalid_properties.push('invalid value for "timeout_ms", must be greater than or equal to 1.')
153
+ end
154
+
155
+ invalid_properties
156
+ end
157
+
158
+ # Check to see if the all the properties in the model are valid
159
+ # @return true if the model is valid
160
+ def valid?
161
+ warn '[DEPRECATED] the `valid?` method is obsolete'
162
+ return false if @url.nil?
163
+ return false if @url.to_s.length > 2048
164
+ return false if @url.to_s.length < 1
165
+ return false if !@body.nil? && @body.to_s.length > 65536
166
+ return false if !@success_status.nil? && @success_status.to_s.length > 3
167
+ return false if !@timeout_ms.nil? && @timeout_ms > 30000
168
+ return false if !@timeout_ms.nil? && @timeout_ms < 1
169
+ true
170
+ end
171
+
172
+ # Custom attribute writer method with validation
173
+ # @param [Object] url Value to be assigned
174
+ def url=(url)
175
+ if url.nil?
176
+ fail ArgumentError, 'url cannot be nil'
177
+ end
178
+
179
+ if url.to_s.length > 2048
180
+ fail ArgumentError, 'invalid value for "url", the character length must be smaller than or equal to 2048.'
181
+ end
182
+
183
+ if url.to_s.length < 1
184
+ fail ArgumentError, 'invalid value for "url", the character length must be greater than or equal to 1.'
185
+ end
186
+
187
+ @url = url
188
+ end
189
+
190
+ # Custom attribute writer method with validation
191
+ # @param [Object] body Value to be assigned
192
+ def body=(body)
193
+ if !body.nil? && body.to_s.length > 65536
194
+ fail ArgumentError, 'invalid value for "body", the character length must be smaller than or equal to 65536.'
195
+ end
196
+
197
+ @body = body
198
+ end
199
+
200
+ # Custom attribute writer method with validation
201
+ # @param [Object] success_status Value to be assigned
202
+ def success_status=(success_status)
203
+ if success_status.nil?
204
+ fail ArgumentError, 'success_status cannot be nil'
205
+ end
206
+
207
+ if success_status.to_s.length > 3
208
+ fail ArgumentError, 'invalid value for "success_status", the character length must be smaller than or equal to 3.'
209
+ end
210
+
211
+ @success_status = success_status
212
+ end
213
+
214
+ # Custom attribute writer method with validation
215
+ # @param [Object] timeout_ms Value to be assigned
216
+ def timeout_ms=(timeout_ms)
217
+ if !timeout_ms.nil? && timeout_ms > 30000
218
+ fail ArgumentError, 'invalid value for "timeout_ms", must be smaller than or equal to 30000.'
219
+ end
220
+
221
+ if !timeout_ms.nil? && timeout_ms < 1
222
+ fail ArgumentError, 'invalid value for "timeout_ms", must be greater than or equal to 1.'
223
+ end
224
+
225
+ @timeout_ms = timeout_ms
226
+ end
227
+
228
+ # Checks equality by comparing each attribute.
229
+ # @param [Object] Object to be compared
230
+ def ==(o)
231
+ return true if self.equal?(o)
232
+ self.class == o.class &&
233
+ method == o.method &&
234
+ url == o.url &&
235
+ headers == o.headers &&
236
+ body == o.body &&
237
+ success_status == o.success_status &&
238
+ timeout_ms == o.timeout_ms
239
+ end
240
+
241
+ # @see the `==` method
242
+ # @param [Object] Object to be compared
243
+ def eql?(o)
244
+ self == o
245
+ end
246
+
247
+ # Calculates hash code according to all attributes.
248
+ # @return [Integer] Hash code
249
+ def hash
250
+ [method, url, headers, body, success_status, timeout_ms].hash
251
+ end
252
+
253
+ # Builds the object from hash
254
+ # @param [Hash] attributes Model attributes in the form of hash
255
+ # @return [Object] Returns the model itself
256
+ def self.build_from_hash(attributes)
257
+ return nil unless attributes.is_a?(Hash)
258
+ attributes = attributes.transform_keys(&:to_sym)
259
+ transformed_hash = {}
260
+ openapi_types.each_pair do |key, type|
261
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
262
+ transformed_hash["#{key}"] = nil
263
+ elsif type =~ /\AArray<(.*)>/i
264
+ # check to ensure the input is an array given that the attribute
265
+ # is documented as an array but the input is not
266
+ if attributes[attribute_map[key]].is_a?(Array)
267
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
268
+ end
269
+ elsif !attributes[attribute_map[key]].nil?
270
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
271
+ end
272
+ end
273
+ new(transformed_hash)
274
+ end
275
+
276
+ # Returns the object in the form of hash
277
+ # @return [Hash] Returns the object in the form of hash
278
+ def to_hash
279
+ hash = {}
280
+ self.class.attribute_map.each_pair do |attr, param|
281
+ value = self.send(attr)
282
+ if value.nil?
283
+ is_nullable = self.class.openapi_nullable.include?(attr)
284
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
285
+ end
286
+
287
+ hash[param] = _to_hash(value)
288
+ end
289
+ hash
290
+ end
291
+
292
+ end
293
+
294
+ end
@@ -0,0 +1,220 @@
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
+ # Plain-JSON response body. Headers are echoed back unredacted because the caller already supplied them — the response is for the caller, not persisted into the delivery log.
18
+ class TestForwarderResponse < ApiModelBase
19
+ attr_accessor :succeeded
20
+
21
+ attr_accessor :response_status
22
+
23
+ attr_accessor :response_headers
24
+
25
+ attr_accessor :response_body
26
+
27
+ attr_accessor :latency_ms
28
+
29
+ attr_accessor :error
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'succeeded' => :'succeeded',
35
+ :'response_status' => :'response_status',
36
+ :'response_headers' => :'response_headers',
37
+ :'response_body' => :'response_body',
38
+ :'latency_ms' => :'latency_ms',
39
+ :'error' => :'error'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'succeeded' => :'Boolean',
57
+ :'response_status' => :'Integer',
58
+ :'response_headers' => :'Hash<String, String>',
59
+ :'response_body' => :'String',
60
+ :'latency_ms' => :'Integer',
61
+ :'error' => :'String'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ :'response_status',
69
+ :'response_body',
70
+ :'latency_ms',
71
+ :'error'
72
+ ])
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::TestForwarderResponse` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ acceptable_attribute_map = self.class.acceptable_attribute_map
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!acceptable_attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::TestForwarderResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'succeeded')
92
+ self.succeeded = attributes[:'succeeded']
93
+ else
94
+ self.succeeded = nil
95
+ end
96
+
97
+ if attributes.key?(:'response_status')
98
+ self.response_status = attributes[:'response_status']
99
+ else
100
+ self.response_status = nil
101
+ end
102
+
103
+ if attributes.key?(:'response_headers')
104
+ if (value = attributes[:'response_headers']).is_a?(Hash)
105
+ self.response_headers = value
106
+ end
107
+ end
108
+
109
+ if attributes.key?(:'response_body')
110
+ self.response_body = attributes[:'response_body']
111
+ end
112
+
113
+ if attributes.key?(:'latency_ms')
114
+ self.latency_ms = attributes[:'latency_ms']
115
+ else
116
+ self.latency_ms = nil
117
+ end
118
+
119
+ if attributes.key?(:'error')
120
+ self.error = attributes[:'error']
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
128
+ invalid_properties = Array.new
129
+ if @succeeded.nil?
130
+ invalid_properties.push('invalid value for "succeeded", succeeded cannot be nil.')
131
+ end
132
+
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ warn '[DEPRECATED] the `valid?` method is obsolete'
140
+ return false if @succeeded.nil?
141
+ true
142
+ end
143
+
144
+ # Custom attribute writer method with validation
145
+ # @param [Object] succeeded Value to be assigned
146
+ def succeeded=(succeeded)
147
+ if succeeded.nil?
148
+ fail ArgumentError, 'succeeded cannot be nil'
149
+ end
150
+
151
+ @succeeded = succeeded
152
+ end
153
+
154
+ # Checks equality by comparing each attribute.
155
+ # @param [Object] Object to be compared
156
+ def ==(o)
157
+ return true if self.equal?(o)
158
+ self.class == o.class &&
159
+ succeeded == o.succeeded &&
160
+ response_status == o.response_status &&
161
+ response_headers == o.response_headers &&
162
+ response_body == o.response_body &&
163
+ latency_ms == o.latency_ms &&
164
+ error == o.error
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [succeeded, response_status, response_headers, response_body, latency_ms, error].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ attributes = attributes.transform_keys(&:to_sym)
185
+ transformed_hash = {}
186
+ openapi_types.each_pair do |key, type|
187
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = nil
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[attribute_map[key]].is_a?(Array)
193
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
+ end
195
+ elsif !attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
+ end
198
+ end
199
+ new(transformed_hash)
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -24,11 +24,27 @@ require 'smplkit_audit_client/models/event_list_meta'
24
24
  require 'smplkit_audit_client/models/event_list_response'
25
25
  require 'smplkit_audit_client/models/event_resource'
26
26
  require 'smplkit_audit_client/models/event_response'
27
+ require 'smplkit_audit_client/models/forwarder'
28
+ require 'smplkit_audit_client/models/forwarder_delivery'
29
+ require 'smplkit_audit_client/models/forwarder_delivery_list_response'
30
+ require 'smplkit_audit_client/models/forwarder_delivery_resource'
31
+ require 'smplkit_audit_client/models/forwarder_delivery_response'
32
+ require 'smplkit_audit_client/models/forwarder_http'
33
+ require 'smplkit_audit_client/models/forwarder_list_links'
34
+ require 'smplkit_audit_client/models/forwarder_list_meta'
35
+ require 'smplkit_audit_client/models/forwarder_list_response'
36
+ require 'smplkit_audit_client/models/forwarder_resource'
37
+ require 'smplkit_audit_client/models/forwarder_response'
38
+ require 'smplkit_audit_client/models/http_header'
39
+ require 'smplkit_audit_client/models/retry_failed_deliveries_summary'
40
+ require 'smplkit_audit_client/models/test_forwarder_request'
41
+ require 'smplkit_audit_client/models/test_forwarder_response'
27
42
  require 'smplkit_audit_client/models/usage_resource'
28
43
  require 'smplkit_audit_client/models/usage_response'
29
44
 
30
45
  # APIs
31
46
  require 'smplkit_audit_client/api/events_api'
47
+ require 'smplkit_audit_client/api/forwarders_api'
32
48
  require 'smplkit_audit_client/api/usage_api'
33
49
 
34
50
  module SmplkitGeneratedClient::Audit
@@ -0,0 +1,152 @@
1
+ =begin
2
+ #smplkit Audit API
3
+
4
+ #Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for SmplkitGeneratedClient::Audit::ForwardersApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'ForwardersApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = SmplkitGeneratedClient::Audit::ForwardersApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ForwardersApi' do
30
+ it 'should create an instance of ForwardersApi' do
31
+ expect(@api_instance).to be_instance_of(SmplkitGeneratedClient::Audit::ForwardersApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for create_forwarder
36
+ # Create Forwarder
37
+ # Create a forwarder. Requires the &#x60;&#x60;audit.siem_streaming&#x60;&#x60; entitlement on the account; lower-tier accounts get 402.
38
+ # @param forwarder_response
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [ForwarderResponse]
41
+ describe 'create_forwarder test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
+ end
45
+ end
46
+
47
+ # unit tests for delete_forwarder
48
+ # Delete Forwarder
49
+ # 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).
50
+ # @param forwarder_id
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [nil]
53
+ describe 'delete_forwarder test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
56
+ end
57
+ end
58
+
59
+ # unit tests for execute_test_forwarder
60
+ # Execute Test Forwarder
61
+ # 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.
62
+ # @param test_forwarder_request
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [TestForwarderResponse]
65
+ describe 'execute_test_forwarder test' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
68
+ end
69
+ end
70
+
71
+ # unit tests for get_forwarder
72
+ # Get Forwarder
73
+ # 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 always redacted regardless of caller permission.
74
+ # @param forwarder_id
75
+ # @param [Hash] opts the optional parameters
76
+ # @return [ForwarderResponse]
77
+ describe 'get_forwarder test' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
80
+ end
81
+ end
82
+
83
+ # unit tests for list_forwarder_deliveries
84
+ # List Forwarder Deliveries
85
+ # 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;) 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.
86
+ # @param forwarder_id
87
+ # @param [Hash] opts the optional parameters
88
+ # @option opts [String] :filter_status
89
+ # @option opts [String] :filter_created_at
90
+ # @option opts [Integer] :page_size
91
+ # @option opts [String] :page_after
92
+ # @return [ForwarderDeliveryListResponse]
93
+ describe 'list_forwarder_deliveries test' do
94
+ it 'should work' do
95
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
96
+ end
97
+ end
98
+
99
+ # unit tests for list_forwarders
100
+ # List Forwarders
101
+ # 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.
102
+ # @param [Hash] opts the optional parameters
103
+ # @option opts [String] :filter_forwarder_type
104
+ # @option opts [Boolean] :filter_enabled
105
+ # @option opts [Integer] :page_size
106
+ # @option opts [String] :page_after
107
+ # @return [ForwarderListResponse]
108
+ describe 'list_forwarders test' do
109
+ it 'should work' do
110
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
111
+ end
112
+ end
113
+
114
+ # unit tests for retry_failed_forwarder_deliveries
115
+ # Retry Failed Forwarder Deliveries
116
+ # 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.
117
+ # @param forwarder_id
118
+ # @param [Hash] opts the optional parameters
119
+ # @return [RetryFailedDeliveriesSummary]
120
+ describe 'retry_failed_forwarder_deliveries test' do
121
+ it 'should work' do
122
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
123
+ end
124
+ end
125
+
126
+ # unit tests for retry_forwarder_delivery
127
+ # Retry Forwarder Delivery
128
+ # Retry a single failed delivery. Returns the new delivery row with its outcome. Prior delivery rows are not modified.
129
+ # @param forwarder_id
130
+ # @param delivery_id
131
+ # @param [Hash] opts the optional parameters
132
+ # @return [ForwarderDeliveryResponse]
133
+ describe 'retry_forwarder_delivery test' do
134
+ it 'should work' do
135
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
136
+ end
137
+ end
138
+
139
+ # unit tests for update_forwarder
140
+ # Update Forwarder
141
+ # Full-replace update. PUT semantics — every field is overwritten. The header values must be re-supplied; the GET path redacts them, but a PUT body that contains &#x60;&#x60;\&quot;&lt;redacted&gt;\&quot;&#x60;&#x60; would persist that literal. Customers must round-trip the actual secret back. This is the standard get-mutate-put pattern (see CLAUDE.md \&quot;Updating Resources via the API\&quot;); the SDK helpers track the un-redacted secret client-side so customers don&#39;t usually need to re-enter it.
142
+ # @param forwarder_id
143
+ # @param forwarder_response
144
+ # @param [Hash] opts the optional parameters
145
+ # @return [ForwarderResponse]
146
+ describe 'update_forwarder test' do
147
+ it 'should work' do
148
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
149
+ end
150
+ end
151
+
152
+ end