svix 0.32.0 → 0.38.0
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 +507 -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/api/organization_settings_api.rb +79 -0
- data/lib/svix/api/statistics_api.rb +205 -0
- data/lib/svix/endpoint_api.rb +22 -1
- data/lib/svix/event_type_api.rb +4 -0
- data/lib/svix/models/application_out.rb +18 -4
- data/lib/svix/models/attempt_statistics_data.rb +231 -0
- data/lib/svix/models/attempt_statistics_response.rb +265 -0
- data/lib/svix/models/border_radii_config.rb +236 -0
- data/lib/svix/models/border_radius_config.rb +236 -0
- data/lib/svix/models/border_radius_enum.rb +40 -0
- data/lib/svix/models/custom_theme_override.rb +227 -0
- 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_headers_in.rb +225 -0
- data/lib/svix/models/endpoint_headers_out.rb +252 -0
- data/lib/svix/models/endpoint_in.rb +26 -0
- data/lib/svix/models/endpoint_out.rb +24 -1
- 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 +43 -4
- 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/font_size_config.rb +218 -0
- 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/portal_settings_out.rb +286 -0
- data/lib/svix/models/radii_enum.rb +39 -0
- data/lib/svix/models/recover_in.rb +223 -0
- data/lib/svix/models/settings_out.rb +323 -0
- data/lib/svix/models/statistics_period.rb +37 -0
- data/lib/svix/models/webhook_types.rb +1 -1
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +6 -2
- metadata +22 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4362f2a1b672cb4bb80aeb7dd9de017675d6d9b3a64a2c84bea29429d7869b03
|
4
|
+
data.tar.gz: b777f890ef42e82726d5f41d2d25997d4b8d6d60c34d1363a77c3c7e280aed25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5777306678f760f17a139ed7d24953b03adc55de7a5d30f0f78367e043eb40d4ee4889c9b28b4f0959cd03cb8e59dbc92a577c4dcf5aa072a9c0a45706cd093
|
7
|
+
data.tar.gz: d322fd0002e9d58a24f606787b83ba14fdb1149b39e01fbfcca56d851b819239f8fe553314e98e60a4b8c806c024fba1fa518c1afef99946341c8c0ba2d87160
|
data/Gemfile.lock
CHANGED
@@ -293,6 +293,101 @@ module Svix
|
|
293
293
|
return data, status_code, headers
|
294
294
|
end
|
295
295
|
|
296
|
+
# Get Endpoint Headers
|
297
|
+
# Get the additional headers to be sent with the webhook
|
298
|
+
# @param endpoint_id [String]
|
299
|
+
# @param app_id [String]
|
300
|
+
# @param [Hash] opts the optional parameters
|
301
|
+
# @return [EndpointHeadersOut]
|
302
|
+
def get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get(endpoint_id, app_id, opts = {})
|
303
|
+
data, _status_code, _headers = get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get_with_http_info(endpoint_id, app_id, opts)
|
304
|
+
data
|
305
|
+
end
|
306
|
+
|
307
|
+
# Get Endpoint Headers
|
308
|
+
# Get the additional headers to be sent with the webhook
|
309
|
+
# @param endpoint_id [String]
|
310
|
+
# @param app_id [String]
|
311
|
+
# @param [Hash] opts the optional parameters
|
312
|
+
# @return [Array<(EndpointHeadersOut, Integer, Hash)>] EndpointHeadersOut data, response status code and response headers
|
313
|
+
def get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get_with_http_info(endpoint_id, app_id, opts = {})
|
314
|
+
if @api_client.config.debugging
|
315
|
+
@api_client.config.logger.debug 'Calling API: EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get ...'
|
316
|
+
end
|
317
|
+
# verify the required parameter 'endpoint_id' is set
|
318
|
+
if @api_client.config.client_side_validation && endpoint_id.nil?
|
319
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get"
|
320
|
+
end
|
321
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
|
322
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, the character length must be smaller than or equal to 256.'
|
323
|
+
end
|
324
|
+
|
325
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
|
326
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, the character length must be great than or equal to 1.'
|
327
|
+
end
|
328
|
+
|
329
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
330
|
+
if @api_client.config.client_side_validation && endpoint_id !~ pattern
|
331
|
+
fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, must conform to the pattern #{pattern}."
|
332
|
+
end
|
333
|
+
|
334
|
+
# verify the required parameter 'app_id' is set
|
335
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
336
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get"
|
337
|
+
end
|
338
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
339
|
+
fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, the character length must be smaller than or equal to 256.'
|
340
|
+
end
|
341
|
+
|
342
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
343
|
+
fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, the character length must be great than or equal to 1.'
|
344
|
+
end
|
345
|
+
|
346
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
347
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
348
|
+
fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, must conform to the pattern #{pattern}."
|
349
|
+
end
|
350
|
+
|
351
|
+
# resource path
|
352
|
+
local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
353
|
+
|
354
|
+
# query parameters
|
355
|
+
query_params = opts[:query_params] || {}
|
356
|
+
|
357
|
+
# header parameters
|
358
|
+
header_params = opts[:header_params] || {}
|
359
|
+
# HTTP header 'Accept' (if needed)
|
360
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
361
|
+
|
362
|
+
# form parameters
|
363
|
+
form_params = opts[:form_params] || {}
|
364
|
+
|
365
|
+
# http body (model)
|
366
|
+
post_body = opts[:debug_body]
|
367
|
+
|
368
|
+
# return_type
|
369
|
+
return_type = opts[:debug_return_type] || 'EndpointHeadersOut'
|
370
|
+
|
371
|
+
# auth_names
|
372
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
373
|
+
|
374
|
+
new_options = opts.merge(
|
375
|
+
:operation => :"EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get",
|
376
|
+
:header_params => header_params,
|
377
|
+
:query_params => query_params,
|
378
|
+
:form_params => form_params,
|
379
|
+
:body => post_body,
|
380
|
+
:auth_names => auth_names,
|
381
|
+
:return_type => return_type
|
382
|
+
)
|
383
|
+
|
384
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
385
|
+
if @api_client.config.debugging
|
386
|
+
@api_client.config.logger.debug "API called: EndpointApi#get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
387
|
+
end
|
388
|
+
return data, status_code, headers
|
389
|
+
end
|
390
|
+
|
296
391
|
# Get Endpoint Secret
|
297
392
|
# Get the endpoint's signing secret. This is used to verify the authenticity of the webhook. For more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).
|
298
393
|
# @param endpoint_id [String]
|
@@ -565,6 +660,315 @@ module Svix
|
|
565
660
|
return data, status_code, headers
|
566
661
|
end
|
567
662
|
|
663
|
+
# Patch Endpoint Headers
|
664
|
+
# Partially set the additional headers to be sent with the webhook
|
665
|
+
# @param app_id [String]
|
666
|
+
# @param endpoint_id [String]
|
667
|
+
# @param endpoint_headers_in [EndpointHeadersIn]
|
668
|
+
# @param [Hash] opts the optional parameters
|
669
|
+
# @return [nil]
|
670
|
+
def patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch(app_id, endpoint_id, endpoint_headers_in, opts = {})
|
671
|
+
patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts)
|
672
|
+
nil
|
673
|
+
end
|
674
|
+
|
675
|
+
# Patch Endpoint Headers
|
676
|
+
# Partially set the additional headers to be sent with the webhook
|
677
|
+
# @param app_id [String]
|
678
|
+
# @param endpoint_id [String]
|
679
|
+
# @param endpoint_headers_in [EndpointHeadersIn]
|
680
|
+
# @param [Hash] opts the optional parameters
|
681
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
682
|
+
def patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts = {})
|
683
|
+
if @api_client.config.debugging
|
684
|
+
@api_client.config.logger.debug 'Calling API: EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch ...'
|
685
|
+
end
|
686
|
+
# verify the required parameter 'app_id' is set
|
687
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
688
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch"
|
689
|
+
end
|
690
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
691
|
+
fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, the character length must be smaller than or equal to 256.'
|
692
|
+
end
|
693
|
+
|
694
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
695
|
+
fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, the character length must be great than or equal to 1.'
|
696
|
+
end
|
697
|
+
|
698
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
699
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
700
|
+
fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, must conform to the pattern #{pattern}."
|
701
|
+
end
|
702
|
+
|
703
|
+
# verify the required parameter 'endpoint_id' is set
|
704
|
+
if @api_client.config.client_side_validation && endpoint_id.nil?
|
705
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch"
|
706
|
+
end
|
707
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
|
708
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, the character length must be smaller than or equal to 256.'
|
709
|
+
end
|
710
|
+
|
711
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
|
712
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, the character length must be great than or equal to 1.'
|
713
|
+
end
|
714
|
+
|
715
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
716
|
+
if @api_client.config.client_side_validation && endpoint_id !~ pattern
|
717
|
+
fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, must conform to the pattern #{pattern}."
|
718
|
+
end
|
719
|
+
|
720
|
+
# verify the required parameter 'endpoint_headers_in' is set
|
721
|
+
if @api_client.config.client_side_validation && endpoint_headers_in.nil?
|
722
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_headers_in' when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch"
|
723
|
+
end
|
724
|
+
# resource path
|
725
|
+
local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
726
|
+
|
727
|
+
# query parameters
|
728
|
+
query_params = opts[:query_params] || {}
|
729
|
+
|
730
|
+
# header parameters
|
731
|
+
header_params = opts[:header_params] || {}
|
732
|
+
# HTTP header 'Accept' (if needed)
|
733
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
734
|
+
# HTTP header 'Content-Type'
|
735
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
736
|
+
|
737
|
+
# form parameters
|
738
|
+
form_params = opts[:form_params] || {}
|
739
|
+
|
740
|
+
# http body (model)
|
741
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_headers_in)
|
742
|
+
|
743
|
+
# return_type
|
744
|
+
return_type = opts[:debug_return_type]
|
745
|
+
|
746
|
+
# auth_names
|
747
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
748
|
+
|
749
|
+
new_options = opts.merge(
|
750
|
+
:operation => :"EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch",
|
751
|
+
:header_params => header_params,
|
752
|
+
:query_params => query_params,
|
753
|
+
:form_params => form_params,
|
754
|
+
:body => post_body,
|
755
|
+
:auth_names => auth_names,
|
756
|
+
:return_type => return_type
|
757
|
+
)
|
758
|
+
|
759
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
760
|
+
if @api_client.config.debugging
|
761
|
+
@api_client.config.logger.debug "API called: EndpointApi#patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
762
|
+
end
|
763
|
+
return data, status_code, headers
|
764
|
+
end
|
765
|
+
|
766
|
+
# Resend Failed Webhooks
|
767
|
+
# Resend all failed messages since a given time.
|
768
|
+
# @param app_id [String]
|
769
|
+
# @param endpoint_id [String]
|
770
|
+
# @param recover_in [RecoverIn]
|
771
|
+
# @param [Hash] opts the optional parameters
|
772
|
+
# @return [Object]
|
773
|
+
def resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post(app_id, endpoint_id, recover_in, opts = {})
|
774
|
+
data, _status_code, _headers = resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts)
|
775
|
+
data
|
776
|
+
end
|
777
|
+
|
778
|
+
# Resend Failed Webhooks
|
779
|
+
# Resend all failed messages since a given time.
|
780
|
+
# @param app_id [String]
|
781
|
+
# @param endpoint_id [String]
|
782
|
+
# @param recover_in [RecoverIn]
|
783
|
+
# @param [Hash] opts the optional parameters
|
784
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
785
|
+
def resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts = {})
|
786
|
+
if @api_client.config.debugging
|
787
|
+
@api_client.config.logger.debug 'Calling API: EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post ...'
|
788
|
+
end
|
789
|
+
# verify the required parameter 'app_id' is set
|
790
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
791
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
|
792
|
+
end
|
793
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
794
|
+
fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
|
795
|
+
end
|
796
|
+
|
797
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
798
|
+
fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
|
799
|
+
end
|
800
|
+
|
801
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
802
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
803
|
+
fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
|
804
|
+
end
|
805
|
+
|
806
|
+
# verify the required parameter 'endpoint_id' is set
|
807
|
+
if @api_client.config.client_side_validation && endpoint_id.nil?
|
808
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
|
809
|
+
end
|
810
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
|
811
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
|
812
|
+
end
|
813
|
+
|
814
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
|
815
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
|
816
|
+
end
|
817
|
+
|
818
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
819
|
+
if @api_client.config.client_side_validation && endpoint_id !~ pattern
|
820
|
+
fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
|
821
|
+
end
|
822
|
+
|
823
|
+
# verify the required parameter 'recover_in' is set
|
824
|
+
if @api_client.config.client_side_validation && recover_in.nil?
|
825
|
+
fail ArgumentError, "Missing the required parameter 'recover_in' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
|
826
|
+
end
|
827
|
+
# resource path
|
828
|
+
local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
829
|
+
|
830
|
+
# query parameters
|
831
|
+
query_params = opts[:query_params] || {}
|
832
|
+
|
833
|
+
# header parameters
|
834
|
+
header_params = opts[:header_params] || {}
|
835
|
+
# HTTP header 'Accept' (if needed)
|
836
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
837
|
+
# HTTP header 'Content-Type'
|
838
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
839
|
+
|
840
|
+
# form parameters
|
841
|
+
form_params = opts[:form_params] || {}
|
842
|
+
|
843
|
+
# http body (model)
|
844
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(recover_in)
|
845
|
+
|
846
|
+
# return_type
|
847
|
+
return_type = opts[:debug_return_type] || 'Object'
|
848
|
+
|
849
|
+
# auth_names
|
850
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
851
|
+
|
852
|
+
new_options = opts.merge(
|
853
|
+
:operation => :"EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post",
|
854
|
+
:header_params => header_params,
|
855
|
+
:query_params => query_params,
|
856
|
+
:form_params => form_params,
|
857
|
+
:body => post_body,
|
858
|
+
:auth_names => auth_names,
|
859
|
+
:return_type => return_type
|
860
|
+
)
|
861
|
+
|
862
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
863
|
+
if @api_client.config.debugging
|
864
|
+
@api_client.config.logger.debug "API called: EndpointApi#resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
865
|
+
end
|
866
|
+
return data, status_code, headers
|
867
|
+
end
|
868
|
+
|
869
|
+
# Rotate Endpoint Secret
|
870
|
+
# Rotates the endpoint's signing secret. The previous secret will be valid for the next 24 hours.
|
871
|
+
# @param endpoint_id [String]
|
872
|
+
# @param app_id [String]
|
873
|
+
# @param endpoint_secret_rotate_in [EndpointSecretRotateIn]
|
874
|
+
# @param [Hash] opts the optional parameters
|
875
|
+
# @return [nil]
|
876
|
+
def rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post(endpoint_id, app_id, endpoint_secret_rotate_in, opts = {})
|
877
|
+
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)
|
878
|
+
nil
|
879
|
+
end
|
880
|
+
|
881
|
+
# Rotate Endpoint Secret
|
882
|
+
# Rotates the endpoint's signing secret. The previous secret will be valid for the next 24 hours.
|
883
|
+
# @param endpoint_id [String]
|
884
|
+
# @param app_id [String]
|
885
|
+
# @param endpoint_secret_rotate_in [EndpointSecretRotateIn]
|
886
|
+
# @param [Hash] opts the optional parameters
|
887
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
888
|
+
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 = {})
|
889
|
+
if @api_client.config.debugging
|
890
|
+
@api_client.config.logger.debug 'Calling API: EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post ...'
|
891
|
+
end
|
892
|
+
# verify the required parameter 'endpoint_id' is set
|
893
|
+
if @api_client.config.client_side_validation && endpoint_id.nil?
|
894
|
+
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"
|
895
|
+
end
|
896
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
|
897
|
+
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.'
|
898
|
+
end
|
899
|
+
|
900
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
|
901
|
+
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.'
|
902
|
+
end
|
903
|
+
|
904
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
905
|
+
if @api_client.config.client_side_validation && endpoint_id !~ pattern
|
906
|
+
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}."
|
907
|
+
end
|
908
|
+
|
909
|
+
# verify the required parameter 'app_id' is set
|
910
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
911
|
+
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"
|
912
|
+
end
|
913
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
914
|
+
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.'
|
915
|
+
end
|
916
|
+
|
917
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
918
|
+
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.'
|
919
|
+
end
|
920
|
+
|
921
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
922
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
923
|
+
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}."
|
924
|
+
end
|
925
|
+
|
926
|
+
# verify the required parameter 'endpoint_secret_rotate_in' is set
|
927
|
+
if @api_client.config.client_side_validation && endpoint_secret_rotate_in.nil?
|
928
|
+
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"
|
929
|
+
end
|
930
|
+
# resource path
|
931
|
+
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))
|
932
|
+
|
933
|
+
# query parameters
|
934
|
+
query_params = opts[:query_params] || {}
|
935
|
+
|
936
|
+
# header parameters
|
937
|
+
header_params = opts[:header_params] || {}
|
938
|
+
# HTTP header 'Accept' (if needed)
|
939
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
940
|
+
# HTTP header 'Content-Type'
|
941
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
942
|
+
|
943
|
+
# form parameters
|
944
|
+
form_params = opts[:form_params] || {}
|
945
|
+
|
946
|
+
# http body (model)
|
947
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_secret_rotate_in)
|
948
|
+
|
949
|
+
# return_type
|
950
|
+
return_type = opts[:debug_return_type]
|
951
|
+
|
952
|
+
# auth_names
|
953
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
954
|
+
|
955
|
+
new_options = opts.merge(
|
956
|
+
:operation => :"EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post",
|
957
|
+
:header_params => header_params,
|
958
|
+
:query_params => query_params,
|
959
|
+
:form_params => form_params,
|
960
|
+
:body => post_body,
|
961
|
+
:auth_names => auth_names,
|
962
|
+
:return_type => return_type
|
963
|
+
)
|
964
|
+
|
965
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
966
|
+
if @api_client.config.debugging
|
967
|
+
@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}"
|
968
|
+
end
|
969
|
+
return data, status_code, headers
|
970
|
+
end
|
971
|
+
|
568
972
|
# Send Event Type Example Message
|
569
973
|
# Send an example message for event
|
570
974
|
# @param app_id [String]
|
@@ -770,5 +1174,108 @@ module Svix
|
|
770
1174
|
end
|
771
1175
|
return data, status_code, headers
|
772
1176
|
end
|
1177
|
+
|
1178
|
+
# Update Endpoint Headers
|
1179
|
+
# Set the additional headers to be sent with the webhook
|
1180
|
+
# @param app_id [String]
|
1181
|
+
# @param endpoint_id [String]
|
1182
|
+
# @param endpoint_headers_in [EndpointHeadersIn]
|
1183
|
+
# @param [Hash] opts the optional parameters
|
1184
|
+
# @return [nil]
|
1185
|
+
def update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put(app_id, endpoint_id, endpoint_headers_in, opts = {})
|
1186
|
+
update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts)
|
1187
|
+
nil
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
# Update Endpoint Headers
|
1191
|
+
# Set the additional headers to be sent with the webhook
|
1192
|
+
# @param app_id [String]
|
1193
|
+
# @param endpoint_id [String]
|
1194
|
+
# @param endpoint_headers_in [EndpointHeadersIn]
|
1195
|
+
# @param [Hash] opts the optional parameters
|
1196
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1197
|
+
def update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts = {})
|
1198
|
+
if @api_client.config.debugging
|
1199
|
+
@api_client.config.logger.debug 'Calling API: EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put ...'
|
1200
|
+
end
|
1201
|
+
# verify the required parameter 'app_id' is set
|
1202
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
1203
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put"
|
1204
|
+
end
|
1205
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
1206
|
+
fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, the character length must be smaller than or equal to 256.'
|
1207
|
+
end
|
1208
|
+
|
1209
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
1210
|
+
fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, the character length must be great than or equal to 1.'
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
1214
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
1215
|
+
fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, must conform to the pattern #{pattern}."
|
1216
|
+
end
|
1217
|
+
|
1218
|
+
# verify the required parameter 'endpoint_id' is set
|
1219
|
+
if @api_client.config.client_side_validation && endpoint_id.nil?
|
1220
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put"
|
1221
|
+
end
|
1222
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
|
1223
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, the character length must be smaller than or equal to 256.'
|
1224
|
+
end
|
1225
|
+
|
1226
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
|
1227
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, the character length must be great than or equal to 1.'
|
1228
|
+
end
|
1229
|
+
|
1230
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
1231
|
+
if @api_client.config.client_side_validation && endpoint_id !~ pattern
|
1232
|
+
fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, must conform to the pattern #{pattern}."
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
# verify the required parameter 'endpoint_headers_in' is set
|
1236
|
+
if @api_client.config.client_side_validation && endpoint_headers_in.nil?
|
1237
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_headers_in' when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put"
|
1238
|
+
end
|
1239
|
+
# resource path
|
1240
|
+
local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
1241
|
+
|
1242
|
+
# query parameters
|
1243
|
+
query_params = opts[:query_params] || {}
|
1244
|
+
|
1245
|
+
# header parameters
|
1246
|
+
header_params = opts[:header_params] || {}
|
1247
|
+
# HTTP header 'Accept' (if needed)
|
1248
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1249
|
+
# HTTP header 'Content-Type'
|
1250
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1251
|
+
|
1252
|
+
# form parameters
|
1253
|
+
form_params = opts[:form_params] || {}
|
1254
|
+
|
1255
|
+
# http body (model)
|
1256
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_headers_in)
|
1257
|
+
|
1258
|
+
# return_type
|
1259
|
+
return_type = opts[:debug_return_type]
|
1260
|
+
|
1261
|
+
# auth_names
|
1262
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
1263
|
+
|
1264
|
+
new_options = opts.merge(
|
1265
|
+
:operation => :"EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put",
|
1266
|
+
:header_params => header_params,
|
1267
|
+
:query_params => query_params,
|
1268
|
+
:form_params => form_params,
|
1269
|
+
:body => post_body,
|
1270
|
+
:auth_names => auth_names,
|
1271
|
+
:return_type => return_type
|
1272
|
+
)
|
1273
|
+
|
1274
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1275
|
+
if @api_client.config.debugging
|
1276
|
+
@api_client.config.logger.debug "API called: EndpointApi#update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1277
|
+
end
|
1278
|
+
return data, status_code, headers
|
1279
|
+
end
|
773
1280
|
end
|
774
1281
|
end
|