svix 0.32.0 → 0.34.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/svix/api/endpoint_api.rb +103 -0
- data/lib/svix/api/event_type_api.rb +83 -6
- data/lib/svix/api/message_api.rb +2 -2
- data/lib/svix/api/message_attempt_api.rb +4 -4
- data/lib/svix/endpoint_api.rb +5 -1
- data/lib/svix/models/endpoint_created_event_data.rb +36 -0
- data/lib/svix/models/endpoint_deleted_event_data.rb +36 -0
- data/lib/svix/models/endpoint_disabled_event_data.rb +36 -0
- data/lib/svix/models/endpoint_in.rb +26 -0
- data/lib/svix/models/endpoint_out.rb +9 -0
- data/lib/svix/models/endpoint_secret_out.rb +21 -0
- data/lib/svix/models/endpoint_secret_rotate_in.rb +236 -0
- data/lib/svix/models/endpoint_update.rb +9 -0
- data/lib/svix/models/endpoint_updated_event.rb +269 -0
- data/lib/svix/models/endpoint_updated_event_data.rb +36 -0
- data/lib/svix/models/event_type_example_out.rb +223 -0
- data/lib/svix/models/event_type_in.rb +12 -1
- data/lib/svix/models/event_type_out.rb +12 -1
- data/lib/svix/models/event_type_schema_in.rb +224 -0
- data/lib/svix/models/event_type_update.rb +12 -1
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +36 -0
- data/lib/svix/models/message_endpoint_out.rb +9 -0
- data/lib/svix/models/webhook_types.rb +1 -1
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +2 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bd53602e0ef0e6f125b8d2e842ba2c59e7af478e8bc4cd90cfd06178ccbac89
|
4
|
+
data.tar.gz: e05198a5e8852907c3c2a16fd79ae7dc8751883af100f1b215d017bd069ecdd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f03f41f3113b63c4d13137264d11ce3aaad60857c96888a6a47efcc5c03a5f6f59437160ba51ad91609ef7ec6bb139c15290491359afd0b4d746bf1ca382c188
|
7
|
+
data.tar.gz: 6057e1433ffdb75bba004340ad643e03fae147df58b6fe8ecbddedc3a763850d37b9adbb94e561deb8d58ee522be0237a9711a031a50b7805cbba628997ed5e7
|
data/Gemfile.lock
CHANGED
@@ -565,6 +565,109 @@ module Svix
|
|
565
565
|
return data, status_code, headers
|
566
566
|
end
|
567
567
|
|
568
|
+
# Rotate Endpoint Secret
|
569
|
+
# Rotates the endpoint's signing secret. The previous secret will be valid for the next 24 hours.
|
570
|
+
# @param endpoint_id [String]
|
571
|
+
# @param app_id [String]
|
572
|
+
# @param endpoint_secret_rotate_in [EndpointSecretRotateIn]
|
573
|
+
# @param [Hash] opts the optional parameters
|
574
|
+
# @return [nil]
|
575
|
+
def rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post(endpoint_id, app_id, endpoint_secret_rotate_in, opts = {})
|
576
|
+
rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post_with_http_info(endpoint_id, app_id, endpoint_secret_rotate_in, opts)
|
577
|
+
nil
|
578
|
+
end
|
579
|
+
|
580
|
+
# Rotate Endpoint Secret
|
581
|
+
# Rotates the endpoint's signing secret. The previous secret will be valid for the next 24 hours.
|
582
|
+
# @param endpoint_id [String]
|
583
|
+
# @param app_id [String]
|
584
|
+
# @param endpoint_secret_rotate_in [EndpointSecretRotateIn]
|
585
|
+
# @param [Hash] opts the optional parameters
|
586
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
587
|
+
def rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post_with_http_info(endpoint_id, app_id, endpoint_secret_rotate_in, opts = {})
|
588
|
+
if @api_client.config.debugging
|
589
|
+
@api_client.config.logger.debug 'Calling API: EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post ...'
|
590
|
+
end
|
591
|
+
# verify the required parameter 'endpoint_id' is set
|
592
|
+
if @api_client.config.client_side_validation && endpoint_id.nil?
|
593
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post"
|
594
|
+
end
|
595
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
|
596
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, the character length must be smaller than or equal to 256.'
|
597
|
+
end
|
598
|
+
|
599
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
|
600
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, the character length must be great than or equal to 1.'
|
601
|
+
end
|
602
|
+
|
603
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
604
|
+
if @api_client.config.client_side_validation && endpoint_id !~ pattern
|
605
|
+
fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, must conform to the pattern #{pattern}."
|
606
|
+
end
|
607
|
+
|
608
|
+
# verify the required parameter 'app_id' is set
|
609
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
610
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post"
|
611
|
+
end
|
612
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
613
|
+
fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, the character length must be smaller than or equal to 256.'
|
614
|
+
end
|
615
|
+
|
616
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
617
|
+
fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, the character length must be great than or equal to 1.'
|
618
|
+
end
|
619
|
+
|
620
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
621
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
622
|
+
fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, must conform to the pattern #{pattern}."
|
623
|
+
end
|
624
|
+
|
625
|
+
# verify the required parameter 'endpoint_secret_rotate_in' is set
|
626
|
+
if @api_client.config.client_side_validation && endpoint_secret_rotate_in.nil?
|
627
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_secret_rotate_in' when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post"
|
628
|
+
end
|
629
|
+
# resource path
|
630
|
+
local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
631
|
+
|
632
|
+
# query parameters
|
633
|
+
query_params = opts[:query_params] || {}
|
634
|
+
|
635
|
+
# header parameters
|
636
|
+
header_params = opts[:header_params] || {}
|
637
|
+
# HTTP header 'Accept' (if needed)
|
638
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
639
|
+
# HTTP header 'Content-Type'
|
640
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
641
|
+
|
642
|
+
# form parameters
|
643
|
+
form_params = opts[:form_params] || {}
|
644
|
+
|
645
|
+
# http body (model)
|
646
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_secret_rotate_in)
|
647
|
+
|
648
|
+
# return_type
|
649
|
+
return_type = opts[:debug_return_type]
|
650
|
+
|
651
|
+
# auth_names
|
652
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
653
|
+
|
654
|
+
new_options = opts.merge(
|
655
|
+
:operation => :"EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post",
|
656
|
+
:header_params => header_params,
|
657
|
+
:query_params => query_params,
|
658
|
+
:form_params => form_params,
|
659
|
+
:body => post_body,
|
660
|
+
:auth_names => auth_names,
|
661
|
+
:return_type => return_type
|
662
|
+
)
|
663
|
+
|
664
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
665
|
+
if @api_client.config.debugging
|
666
|
+
@api_client.config.logger.debug "API called: EndpointApi#rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
667
|
+
end
|
668
|
+
return data, status_code, headers
|
669
|
+
end
|
670
|
+
|
568
671
|
# Send Event Type Example Message
|
569
672
|
# Send an example message for event
|
570
673
|
# @param app_id [String]
|
@@ -20,7 +20,7 @@ module Svix
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Create Event Type
|
23
|
-
# Create an event type.
|
23
|
+
# Create new or unarchive existing event type. Unarchiving an event type will allow endpoints to filter on it and messages to be sent with it. Endpoints filtering on the event type before archival will continue to filter on it. This operation does not preserve the description and schemas.
|
24
24
|
# @param event_type_in [EventTypeIn]
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
26
|
# @return [EventTypeOut]
|
@@ -30,7 +30,7 @@ module Svix
|
|
30
30
|
end
|
31
31
|
|
32
32
|
# Create Event Type
|
33
|
-
# Create an event type.
|
33
|
+
# Create new or unarchive existing event type. Unarchiving an event type will allow endpoints to filter on it and messages to be sent with it. Endpoints filtering on the event type before archival will continue to filter on it. This operation does not preserve the description and schemas.
|
34
34
|
# @param event_type_in [EventTypeIn]
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
36
|
# @return [Array<(EventTypeOut, Integer, Hash)>] EventTypeOut data, response status code and response headers
|
@@ -84,8 +84,8 @@ module Svix
|
|
84
84
|
return data, status_code, headers
|
85
85
|
end
|
86
86
|
|
87
|
-
#
|
88
|
-
#
|
87
|
+
# Archive Event Type
|
88
|
+
# Archive an event type. Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the [create operation](#operation/create_event_type_api_v1_event_type__post).
|
89
89
|
# @param event_type_name [String]
|
90
90
|
# @param [Hash] opts the optional parameters
|
91
91
|
# @return [nil]
|
@@ -94,8 +94,8 @@ module Svix
|
|
94
94
|
nil
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
#
|
97
|
+
# Archive Event Type
|
98
|
+
# Archive an event type. Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the [create operation](#operation/create_event_type_api_v1_event_type__post).
|
99
99
|
# @param event_type_name [String]
|
100
100
|
# @param [Hash] opts the optional parameters
|
101
101
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
@@ -156,6 +156,71 @@ module Svix
|
|
156
156
|
return data, status_code, headers
|
157
157
|
end
|
158
158
|
|
159
|
+
# Generate Schema Example
|
160
|
+
# Generates a fake example from the given JSONSchema
|
161
|
+
# @param event_type_schema_in [EventTypeSchemaIn]
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @return [EventTypeExampleOut]
|
164
|
+
def generate_schema_example_api_v1_event_type_schema_generate_example_post(event_type_schema_in, opts = {})
|
165
|
+
data, _status_code, _headers = generate_schema_example_api_v1_event_type_schema_generate_example_post_with_http_info(event_type_schema_in, opts)
|
166
|
+
data
|
167
|
+
end
|
168
|
+
|
169
|
+
# Generate Schema Example
|
170
|
+
# Generates a fake example from the given JSONSchema
|
171
|
+
# @param event_type_schema_in [EventTypeSchemaIn]
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @return [Array<(EventTypeExampleOut, Integer, Hash)>] EventTypeExampleOut data, response status code and response headers
|
174
|
+
def generate_schema_example_api_v1_event_type_schema_generate_example_post_with_http_info(event_type_schema_in, opts = {})
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug 'Calling API: EventTypeApi.generate_schema_example_api_v1_event_type_schema_generate_example_post ...'
|
177
|
+
end
|
178
|
+
# verify the required parameter 'event_type_schema_in' is set
|
179
|
+
if @api_client.config.client_side_validation && event_type_schema_in.nil?
|
180
|
+
fail ArgumentError, "Missing the required parameter 'event_type_schema_in' when calling EventTypeApi.generate_schema_example_api_v1_event_type_schema_generate_example_post"
|
181
|
+
end
|
182
|
+
# resource path
|
183
|
+
local_var_path = '/api/v1/event-type/schema/generate-example/'
|
184
|
+
|
185
|
+
# query parameters
|
186
|
+
query_params = opts[:query_params] || {}
|
187
|
+
|
188
|
+
# header parameters
|
189
|
+
header_params = opts[:header_params] || {}
|
190
|
+
# HTTP header 'Accept' (if needed)
|
191
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
192
|
+
# HTTP header 'Content-Type'
|
193
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
194
|
+
|
195
|
+
# form parameters
|
196
|
+
form_params = opts[:form_params] || {}
|
197
|
+
|
198
|
+
# http body (model)
|
199
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(event_type_schema_in)
|
200
|
+
|
201
|
+
# return_type
|
202
|
+
return_type = opts[:debug_return_type] || 'EventTypeExampleOut'
|
203
|
+
|
204
|
+
# auth_names
|
205
|
+
auth_names = opts[:debug_auth_names] || []
|
206
|
+
|
207
|
+
new_options = opts.merge(
|
208
|
+
:operation => :"EventTypeApi.generate_schema_example_api_v1_event_type_schema_generate_example_post",
|
209
|
+
:header_params => header_params,
|
210
|
+
:query_params => query_params,
|
211
|
+
:form_params => form_params,
|
212
|
+
:body => post_body,
|
213
|
+
:auth_names => auth_names,
|
214
|
+
:return_type => return_type
|
215
|
+
)
|
216
|
+
|
217
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
218
|
+
if @api_client.config.debugging
|
219
|
+
@api_client.config.logger.debug "API called: EventTypeApi#generate_schema_example_api_v1_event_type_schema_generate_example_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
220
|
+
end
|
221
|
+
return data, status_code, headers
|
222
|
+
end
|
223
|
+
|
159
224
|
# Get Event Type
|
160
225
|
# Get an event type.
|
161
226
|
# @param event_type_name [String]
|
@@ -234,6 +299,7 @@ module Svix
|
|
234
299
|
# @option opts [String] :iterator
|
235
300
|
# @option opts [Integer] :limit (default to 50)
|
236
301
|
# @option opts [Boolean] :with_content (default to false)
|
302
|
+
# @option opts [Boolean] :include_archived (default to false)
|
237
303
|
# @return [ListResponseEventTypeOut]
|
238
304
|
def list_event_types_api_v1_event_type_get(opts = {})
|
239
305
|
data, _status_code, _headers = list_event_types_api_v1_event_type_get_with_http_info(opts)
|
@@ -246,11 +312,21 @@ module Svix
|
|
246
312
|
# @option opts [String] :iterator
|
247
313
|
# @option opts [Integer] :limit
|
248
314
|
# @option opts [Boolean] :with_content
|
315
|
+
# @option opts [Boolean] :include_archived
|
249
316
|
# @return [Array<(ListResponseEventTypeOut, Integer, Hash)>] ListResponseEventTypeOut data, response status code and response headers
|
250
317
|
def list_event_types_api_v1_event_type_get_with_http_info(opts = {})
|
251
318
|
if @api_client.config.debugging
|
252
319
|
@api_client.config.logger.debug 'Calling API: EventTypeApi.list_event_types_api_v1_event_type_get ...'
|
253
320
|
end
|
321
|
+
if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length > 256
|
322
|
+
fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling EventTypeApi.list_event_types_api_v1_event_type_get, the character length must be smaller than or equal to 256.'
|
323
|
+
end
|
324
|
+
|
325
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
326
|
+
if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'] !~ pattern
|
327
|
+
fail ArgumentError, "invalid value for 'opts[:\"iterator\"]' when calling EventTypeApi.list_event_types_api_v1_event_type_get, must conform to the pattern #{pattern}."
|
328
|
+
end
|
329
|
+
|
254
330
|
# resource path
|
255
331
|
local_var_path = '/api/v1/event-type/'
|
256
332
|
|
@@ -259,6 +335,7 @@ module Svix
|
|
259
335
|
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
260
336
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
261
337
|
query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
|
338
|
+
query_params[:'include_archived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil?
|
262
339
|
|
263
340
|
# header parameters
|
264
341
|
header_params = opts[:header_params] || {}
|
data/lib/svix/api/message_api.rb
CHANGED
@@ -20,7 +20,7 @@ module Svix
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Create Message
|
23
|
-
# Creates a new message and
|
23
|
+
# Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. If a message with the same `eventId` already exists for any application in your environment, a 409 conflict error will be returned.
|
24
24
|
# @param app_id [String]
|
25
25
|
# @param message_in [MessageIn]
|
26
26
|
# @param [Hash] opts the optional parameters
|
@@ -31,7 +31,7 @@ module Svix
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# Create Message
|
34
|
-
# Creates a new message and
|
34
|
+
# Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. If a message with the same `eventId` already exists for any application in your environment, a 409 conflict error will be returned.
|
35
35
|
# @param app_id [String]
|
36
36
|
# @param message_in [MessageIn]
|
37
37
|
# @param [Hash] opts the optional parameters
|
@@ -222,7 +222,7 @@ module Svix
|
|
222
222
|
end
|
223
223
|
|
224
224
|
# List Attempted Messages
|
225
|
-
# List
|
225
|
+
# List messages for a particular endpoint. Additionally includes metadata about the latest message attempt. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
|
226
226
|
# @param endpoint_id [String]
|
227
227
|
# @param app_id [String]
|
228
228
|
# @param [Hash] opts the optional parameters
|
@@ -237,7 +237,7 @@ module Svix
|
|
237
237
|
end
|
238
238
|
|
239
239
|
# List Attempted Messages
|
240
|
-
# List
|
240
|
+
# List messages for a particular endpoint. Additionally includes metadata about the latest message attempt. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
|
241
241
|
# @param endpoint_id [String]
|
242
242
|
# @param app_id [String]
|
243
243
|
# @param [Hash] opts the optional parameters
|
@@ -433,7 +433,7 @@ module Svix
|
|
433
433
|
end
|
434
434
|
|
435
435
|
# List Attempts For Endpoint
|
436
|
-
# List the message attempts for a particular endpoint. Returning the
|
436
|
+
# List the message attempts for a particular endpoint. Returning the endpoint. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
|
437
437
|
# @param msg_id [String]
|
438
438
|
# @param app_id [String]
|
439
439
|
# @param endpoint_id [String]
|
@@ -450,7 +450,7 @@ module Svix
|
|
450
450
|
end
|
451
451
|
|
452
452
|
# List Attempts For Endpoint
|
453
|
-
# List the message attempts for a particular endpoint. Returning the
|
453
|
+
# List the message attempts for a particular endpoint. Returning the endpoint. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
|
454
454
|
# @param msg_id [String]
|
455
455
|
# @param app_id [String]
|
456
456
|
# @param endpoint_id [String]
|
data/lib/svix/endpoint_api.rb
CHANGED
@@ -6,7 +6,7 @@ module Svix
|
|
6
6
|
@api = EndpointApi.new(api_client)
|
7
7
|
end
|
8
8
|
|
9
|
-
def list(
|
9
|
+
def list(app_id, options = {})
|
10
10
|
return @api.list_endpoints_api_v1_app_app_id_endpoint_get(app_id, options)
|
11
11
|
end
|
12
12
|
|
@@ -30,5 +30,9 @@ module Svix
|
|
30
30
|
return @api.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get(endpoint_id, app_id)
|
31
31
|
end
|
32
32
|
|
33
|
+
def rotate_secret(app_id, endpoint_id, endpoint_secret_rotate_in)
|
34
|
+
return @api.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post(endpoint_id, app_id, endpoint_secret_rotate_in)
|
35
|
+
end
|
36
|
+
|
33
37
|
end
|
34
38
|
end
|
@@ -17,6 +17,7 @@ module Svix
|
|
17
17
|
class EndpointCreatedEventData
|
18
18
|
attr_accessor :app_id
|
19
19
|
|
20
|
+
# Optional unique identifier for the application
|
20
21
|
attr_accessor :app_uid
|
21
22
|
|
22
23
|
attr_accessor :endpoint_id
|
@@ -86,6 +87,19 @@ module Svix
|
|
86
87
|
invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
|
87
88
|
end
|
88
89
|
|
90
|
+
if !@app_uid.nil? && @app_uid.to_s.length > 256
|
91
|
+
invalid_properties.push('invalid value for "app_uid", the character length must be smaller than or equal to 256.')
|
92
|
+
end
|
93
|
+
|
94
|
+
if !@app_uid.nil? && @app_uid.to_s.length < 1
|
95
|
+
invalid_properties.push('invalid value for "app_uid", the character length must be great than or equal to 1.')
|
96
|
+
end
|
97
|
+
|
98
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
99
|
+
if !@app_uid.nil? && @app_uid !~ pattern
|
100
|
+
invalid_properties.push("invalid value for \"app_uid\", must conform to the pattern #{pattern}.")
|
101
|
+
end
|
102
|
+
|
89
103
|
if @endpoint_id.nil?
|
90
104
|
invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
|
91
105
|
end
|
@@ -97,10 +111,32 @@ module Svix
|
|
97
111
|
# @return true if the model is valid
|
98
112
|
def valid?
|
99
113
|
return false if @app_id.nil?
|
114
|
+
return false if !@app_uid.nil? && @app_uid.to_s.length > 256
|
115
|
+
return false if !@app_uid.nil? && @app_uid.to_s.length < 1
|
116
|
+
return false if !@app_uid.nil? && @app_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
100
117
|
return false if @endpoint_id.nil?
|
101
118
|
true
|
102
119
|
end
|
103
120
|
|
121
|
+
# Custom attribute writer method with validation
|
122
|
+
# @param [Object] app_uid Value to be assigned
|
123
|
+
def app_uid=(app_uid)
|
124
|
+
if !app_uid.nil? && app_uid.to_s.length > 256
|
125
|
+
fail ArgumentError, 'invalid value for "app_uid", the character length must be smaller than or equal to 256.'
|
126
|
+
end
|
127
|
+
|
128
|
+
if !app_uid.nil? && app_uid.to_s.length < 1
|
129
|
+
fail ArgumentError, 'invalid value for "app_uid", the character length must be great than or equal to 1.'
|
130
|
+
end
|
131
|
+
|
132
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
133
|
+
if !app_uid.nil? && app_uid !~ pattern
|
134
|
+
fail ArgumentError, "invalid value for \"app_uid\", must conform to the pattern #{pattern}."
|
135
|
+
end
|
136
|
+
|
137
|
+
@app_uid = app_uid
|
138
|
+
end
|
139
|
+
|
104
140
|
# Checks equality by comparing each attribute.
|
105
141
|
# @param [Object] Object to be compared
|
106
142
|
def ==(o)
|
@@ -17,6 +17,7 @@ module Svix
|
|
17
17
|
class EndpointDeletedEventData
|
18
18
|
attr_accessor :app_id
|
19
19
|
|
20
|
+
# Optional unique identifier for the application
|
20
21
|
attr_accessor :app_uid
|
21
22
|
|
22
23
|
attr_accessor :endpoint_id
|
@@ -86,6 +87,19 @@ module Svix
|
|
86
87
|
invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
|
87
88
|
end
|
88
89
|
|
90
|
+
if !@app_uid.nil? && @app_uid.to_s.length > 256
|
91
|
+
invalid_properties.push('invalid value for "app_uid", the character length must be smaller than or equal to 256.')
|
92
|
+
end
|
93
|
+
|
94
|
+
if !@app_uid.nil? && @app_uid.to_s.length < 1
|
95
|
+
invalid_properties.push('invalid value for "app_uid", the character length must be great than or equal to 1.')
|
96
|
+
end
|
97
|
+
|
98
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
99
|
+
if !@app_uid.nil? && @app_uid !~ pattern
|
100
|
+
invalid_properties.push("invalid value for \"app_uid\", must conform to the pattern #{pattern}.")
|
101
|
+
end
|
102
|
+
|
89
103
|
if @endpoint_id.nil?
|
90
104
|
invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
|
91
105
|
end
|
@@ -97,10 +111,32 @@ module Svix
|
|
97
111
|
# @return true if the model is valid
|
98
112
|
def valid?
|
99
113
|
return false if @app_id.nil?
|
114
|
+
return false if !@app_uid.nil? && @app_uid.to_s.length > 256
|
115
|
+
return false if !@app_uid.nil? && @app_uid.to_s.length < 1
|
116
|
+
return false if !@app_uid.nil? && @app_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
100
117
|
return false if @endpoint_id.nil?
|
101
118
|
true
|
102
119
|
end
|
103
120
|
|
121
|
+
# Custom attribute writer method with validation
|
122
|
+
# @param [Object] app_uid Value to be assigned
|
123
|
+
def app_uid=(app_uid)
|
124
|
+
if !app_uid.nil? && app_uid.to_s.length > 256
|
125
|
+
fail ArgumentError, 'invalid value for "app_uid", the character length must be smaller than or equal to 256.'
|
126
|
+
end
|
127
|
+
|
128
|
+
if !app_uid.nil? && app_uid.to_s.length < 1
|
129
|
+
fail ArgumentError, 'invalid value for "app_uid", the character length must be great than or equal to 1.'
|
130
|
+
end
|
131
|
+
|
132
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
133
|
+
if !app_uid.nil? && app_uid !~ pattern
|
134
|
+
fail ArgumentError, "invalid value for \"app_uid\", must conform to the pattern #{pattern}."
|
135
|
+
end
|
136
|
+
|
137
|
+
@app_uid = app_uid
|
138
|
+
end
|
139
|
+
|
104
140
|
# Checks equality by comparing each attribute.
|
105
141
|
# @param [Object] Object to be compared
|
106
142
|
def ==(o)
|
@@ -17,6 +17,7 @@ module Svix
|
|
17
17
|
class EndpointDisabledEventData
|
18
18
|
attr_accessor :app_id
|
19
19
|
|
20
|
+
# Optional unique identifier for the application
|
20
21
|
attr_accessor :app_uid
|
21
22
|
|
22
23
|
attr_accessor :endpoint_id
|
@@ -94,6 +95,19 @@ module Svix
|
|
94
95
|
invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
|
95
96
|
end
|
96
97
|
|
98
|
+
if !@app_uid.nil? && @app_uid.to_s.length > 256
|
99
|
+
invalid_properties.push('invalid value for "app_uid", the character length must be smaller than or equal to 256.')
|
100
|
+
end
|
101
|
+
|
102
|
+
if !@app_uid.nil? && @app_uid.to_s.length < 1
|
103
|
+
invalid_properties.push('invalid value for "app_uid", the character length must be great than or equal to 1.')
|
104
|
+
end
|
105
|
+
|
106
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
107
|
+
if !@app_uid.nil? && @app_uid !~ pattern
|
108
|
+
invalid_properties.push("invalid value for \"app_uid\", must conform to the pattern #{pattern}.")
|
109
|
+
end
|
110
|
+
|
97
111
|
if @endpoint_id.nil?
|
98
112
|
invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
|
99
113
|
end
|
@@ -109,11 +123,33 @@ module Svix
|
|
109
123
|
# @return true if the model is valid
|
110
124
|
def valid?
|
111
125
|
return false if @app_id.nil?
|
126
|
+
return false if !@app_uid.nil? && @app_uid.to_s.length > 256
|
127
|
+
return false if !@app_uid.nil? && @app_uid.to_s.length < 1
|
128
|
+
return false if !@app_uid.nil? && @app_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
112
129
|
return false if @endpoint_id.nil?
|
113
130
|
return false if @fail_since.nil?
|
114
131
|
true
|
115
132
|
end
|
116
133
|
|
134
|
+
# Custom attribute writer method with validation
|
135
|
+
# @param [Object] app_uid Value to be assigned
|
136
|
+
def app_uid=(app_uid)
|
137
|
+
if !app_uid.nil? && app_uid.to_s.length > 256
|
138
|
+
fail ArgumentError, 'invalid value for "app_uid", the character length must be smaller than or equal to 256.'
|
139
|
+
end
|
140
|
+
|
141
|
+
if !app_uid.nil? && app_uid.to_s.length < 1
|
142
|
+
fail ArgumentError, 'invalid value for "app_uid", the character length must be great than or equal to 1.'
|
143
|
+
end
|
144
|
+
|
145
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
146
|
+
if !app_uid.nil? && app_uid !~ pattern
|
147
|
+
fail ArgumentError, "invalid value for \"app_uid\", must conform to the pattern #{pattern}."
|
148
|
+
end
|
149
|
+
|
150
|
+
@app_uid = app_uid
|
151
|
+
end
|
152
|
+
|
117
153
|
# Checks equality by comparing each attribute.
|
118
154
|
# @param [Object] Object to be compared
|
119
155
|
def ==(o)
|
@@ -130,6 +130,15 @@ module Svix
|
|
130
130
|
# @return Array for valid properties with the reasons
|
131
131
|
def list_invalid_properties
|
132
132
|
invalid_properties = Array.new
|
133
|
+
if !@filter_types.nil? && @filter_types.length < 1
|
134
|
+
invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
|
135
|
+
end
|
136
|
+
|
137
|
+
pattern = Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
|
138
|
+
if !@secret.nil? && @secret !~ pattern
|
139
|
+
invalid_properties.push("invalid value for \"secret\", must conform to the pattern #{pattern}.")
|
140
|
+
end
|
141
|
+
|
133
142
|
if !@uid.nil? && @uid.to_s.length > 256
|
134
143
|
invalid_properties.push('invalid value for "uid", the character length must be smaller than or equal to 256.')
|
135
144
|
end
|
@@ -165,6 +174,8 @@ module Svix
|
|
165
174
|
# Check to see if the all the properties in the model are valid
|
166
175
|
# @return true if the model is valid
|
167
176
|
def valid?
|
177
|
+
return false if !@filter_types.nil? && @filter_types.length < 1
|
178
|
+
return false if !@secret.nil? && @secret !~ Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
|
168
179
|
return false if !@uid.nil? && @uid.to_s.length > 256
|
169
180
|
return false if !@uid.nil? && @uid.to_s.length < 1
|
170
181
|
return false if !@uid.nil? && @uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
@@ -178,9 +189,24 @@ module Svix
|
|
178
189
|
# Custom attribute writer method with validation
|
179
190
|
# @param [Object] filter_types Value to be assigned
|
180
191
|
def filter_types=(filter_types)
|
192
|
+
if !filter_types.nil? && filter_types.length < 1
|
193
|
+
fail ArgumentError, 'invalid value for "filter_types", number of items must be greater than or equal to 1.'
|
194
|
+
end
|
195
|
+
|
181
196
|
@filter_types = filter_types
|
182
197
|
end
|
183
198
|
|
199
|
+
# Custom attribute writer method with validation
|
200
|
+
# @param [Object] secret Value to be assigned
|
201
|
+
def secret=(secret)
|
202
|
+
pattern = Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
|
203
|
+
if !secret.nil? && secret !~ pattern
|
204
|
+
fail ArgumentError, "invalid value for \"secret\", must conform to the pattern #{pattern}."
|
205
|
+
end
|
206
|
+
|
207
|
+
@secret = secret
|
208
|
+
end
|
209
|
+
|
184
210
|
# Custom attribute writer method with validation
|
185
211
|
# @param [Object] uid Value to be assigned
|
186
212
|
def uid=(uid)
|
@@ -141,6 +141,10 @@ module Svix
|
|
141
141
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
142
142
|
end
|
143
143
|
|
144
|
+
if !@filter_types.nil? && @filter_types.length < 1
|
145
|
+
invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
|
146
|
+
end
|
147
|
+
|
144
148
|
if @id.nil?
|
145
149
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
146
150
|
end
|
@@ -181,6 +185,7 @@ module Svix
|
|
181
185
|
# @return true if the model is valid
|
182
186
|
def valid?
|
183
187
|
return false if @created_at.nil?
|
188
|
+
return false if !@filter_types.nil? && @filter_types.length < 1
|
184
189
|
return false if @id.nil?
|
185
190
|
return false if !@uid.nil? && @uid.to_s.length > 256
|
186
191
|
return false if !@uid.nil? && @uid.to_s.length < 1
|
@@ -195,6 +200,10 @@ module Svix
|
|
195
200
|
# Custom attribute writer method with validation
|
196
201
|
# @param [Object] filter_types Value to be assigned
|
197
202
|
def filter_types=(filter_types)
|
203
|
+
if !filter_types.nil? && filter_types.length < 1
|
204
|
+
fail ArgumentError, 'invalid value for "filter_types", number of items must be greater than or equal to 1.'
|
205
|
+
end
|
206
|
+
|
198
207
|
@filter_types = filter_types
|
199
208
|
end
|
200
209
|
|
@@ -71,6 +71,11 @@ module Svix
|
|
71
71
|
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
72
72
|
end
|
73
73
|
|
74
|
+
pattern = Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
|
75
|
+
if @key !~ pattern
|
76
|
+
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
77
|
+
end
|
78
|
+
|
74
79
|
invalid_properties
|
75
80
|
end
|
76
81
|
|
@@ -78,9 +83,25 @@ module Svix
|
|
78
83
|
# @return true if the model is valid
|
79
84
|
def valid?
|
80
85
|
return false if @key.nil?
|
86
|
+
return false if @key !~ Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
|
81
87
|
true
|
82
88
|
end
|
83
89
|
|
90
|
+
# Custom attribute writer method with validation
|
91
|
+
# @param [Object] key Value to be assigned
|
92
|
+
def key=(key)
|
93
|
+
if key.nil?
|
94
|
+
fail ArgumentError, 'key cannot be nil'
|
95
|
+
end
|
96
|
+
|
97
|
+
pattern = Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
|
98
|
+
if key !~ pattern
|
99
|
+
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
100
|
+
end
|
101
|
+
|
102
|
+
@key = key
|
103
|
+
end
|
104
|
+
|
84
105
|
# Checks equality by comparing each attribute.
|
85
106
|
# @param [Object] Object to be compared
|
86
107
|
def ==(o)
|