svix 1.5.2 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe0928a477c7bf0c3d21a2ae1d2631c43c9dfab3bde9460699fe0ad8903cd871
4
- data.tar.gz: d6a4cc87c16ac281e29b3008948c9bcbe1db3ffa54baa844595799831670c948
3
+ metadata.gz: e13981a648541841230174ac0fa3528d8f7d635a1654185b88c9cb866992deef
4
+ data.tar.gz: 64793f92a7218200dbe8b135f309a7443ab28564b99e5a37e23ca63959580584
5
5
  SHA512:
6
- metadata.gz: 668747107a4cb380d0f9b89e443420171ea27d5c7cc1a09f513418548b0d5f24d77b9d4062b2e9d56ce58e99f568d7a5331b58833f4364a32390edb0b44698de
7
- data.tar.gz: 81f6bb161f0d358134518ed6a33211aa5a9afd964d2c4a8cca14772051cc123e1b44a6d2a6ae515044663966abab16277d1df64bccab686ea66996fdac17953d
6
+ metadata.gz: 1af800c28b005f856e81c9d4efc7ca9e9bd656ffca4ebc492bec326a9f2231898604cbc5bbd02797bd41b9c51974bda1d99b85eb94bc439eec0f26b549a90577
7
+ data.tar.gz: '093bdc69230013f356bf6519918056afbfa3a39fe0ce59720a3c70236d63cce7f28f4e878cb73aeadd48f9cf370d4a1540afb6b0c9dedbcb4db46647bfab9542'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (1.5.2)
4
+ svix (1.6.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -100,90 +100,6 @@ module Svix
100
100
  return data, status_code, headers
101
101
  end
102
102
 
103
- # Patch Application
104
- # Partially update an application.
105
- # @param app_id [String] The app's ID or UID
106
- # @param application_patch [ApplicationPatch]
107
- # @param [Hash] opts the optional parameters
108
- # @return [ApplicationOut]
109
- def patch_application(app_id, application_patch, opts = {})
110
- data, _status_code, _headers = patch_application_with_http_info(app_id, application_patch, opts)
111
- data
112
- end
113
-
114
- # Patch Application
115
- # Partially update an application.
116
- # @param app_id [String] The app's ID or UID
117
- # @param application_patch [ApplicationPatch]
118
- # @param [Hash] opts the optional parameters
119
- # @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
120
- def patch_application_with_http_info(app_id, application_patch, opts = {})
121
- if @api_client.config.debugging
122
- @api_client.config.logger.debug 'Calling API: ApplicationApi.patch_application ...'
123
- end
124
- # verify the required parameter 'app_id' is set
125
- if @api_client.config.client_side_validation && app_id.nil?
126
- fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.patch_application"
127
- end
128
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
129
- fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.patch_application, the character length must be smaller than or equal to 256.'
130
- end
131
-
132
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
133
- fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.patch_application, the character length must be great than or equal to 1.'
134
- end
135
-
136
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
137
- if @api_client.config.client_side_validation && app_id !~ pattern
138
- fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.patch_application, must conform to the pattern #{pattern}."
139
- end
140
-
141
- # verify the required parameter 'application_patch' is set
142
- if @api_client.config.client_side_validation && application_patch.nil?
143
- fail ArgumentError, "Missing the required parameter 'application_patch' when calling ApplicationApi.patch_application"
144
- end
145
- # resource path
146
- local_var_path = '/api/v1/app/{app_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
147
-
148
- # query parameters
149
- query_params = opts[:query_params] || {}
150
-
151
- # header parameters
152
- header_params = opts[:header_params] || {}
153
- # HTTP header 'Accept' (if needed)
154
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
155
- # HTTP header 'Content-Type'
156
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
157
-
158
- # form parameters
159
- form_params = opts[:form_params] || {}
160
-
161
- # http body (model)
162
- post_body = opts[:debug_body] || @api_client.object_to_http_body(application_patch)
163
-
164
- # return_type
165
- return_type = opts[:debug_return_type] || 'ApplicationOut'
166
-
167
- # auth_names
168
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
169
-
170
- new_options = opts.merge(
171
- :operation => :"ApplicationApi.patch_application",
172
- :header_params => header_params,
173
- :query_params => query_params,
174
- :form_params => form_params,
175
- :body => post_body,
176
- :auth_names => auth_names,
177
- :return_type => return_type
178
- )
179
-
180
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
181
- if @api_client.config.debugging
182
- @api_client.config.logger.debug "API called: ApplicationApi#patch_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
183
- end
184
- return data, status_code, headers
185
- end
186
-
187
103
  # Create Application
188
104
  # Create a new application.
189
105
  # @param application_in [ApplicationIn]
@@ -571,6 +487,90 @@ module Svix
571
487
  return data, status_code, headers
572
488
  end
573
489
 
490
+ # Patch Application
491
+ # Partially update an application.
492
+ # @param app_id [String] The app&#39;s ID or UID
493
+ # @param application_patch [ApplicationPatch]
494
+ # @param [Hash] opts the optional parameters
495
+ # @return [ApplicationOut]
496
+ def v1_application_patch(app_id, application_patch, opts = {})
497
+ data, _status_code, _headers = v1_application_patch_with_http_info(app_id, application_patch, opts)
498
+ data
499
+ end
500
+
501
+ # Patch Application
502
+ # Partially update an application.
503
+ # @param app_id [String] The app&#39;s ID or UID
504
+ # @param application_patch [ApplicationPatch]
505
+ # @param [Hash] opts the optional parameters
506
+ # @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
507
+ def v1_application_patch_with_http_info(app_id, application_patch, opts = {})
508
+ if @api_client.config.debugging
509
+ @api_client.config.logger.debug 'Calling API: ApplicationApi.v1_application_patch ...'
510
+ end
511
+ # verify the required parameter 'app_id' is set
512
+ if @api_client.config.client_side_validation && app_id.nil?
513
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.v1_application_patch"
514
+ end
515
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
516
+ fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.v1_application_patch, the character length must be smaller than or equal to 256.'
517
+ end
518
+
519
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
520
+ fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.v1_application_patch, the character length must be great than or equal to 1.'
521
+ end
522
+
523
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
524
+ if @api_client.config.client_side_validation && app_id !~ pattern
525
+ fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.v1_application_patch, must conform to the pattern #{pattern}."
526
+ end
527
+
528
+ # verify the required parameter 'application_patch' is set
529
+ if @api_client.config.client_side_validation && application_patch.nil?
530
+ fail ArgumentError, "Missing the required parameter 'application_patch' when calling ApplicationApi.v1_application_patch"
531
+ end
532
+ # resource path
533
+ local_var_path = '/api/v1/app/{app_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
534
+
535
+ # query parameters
536
+ query_params = opts[:query_params] || {}
537
+
538
+ # header parameters
539
+ header_params = opts[:header_params] || {}
540
+ # HTTP header 'Accept' (if needed)
541
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
542
+ # HTTP header 'Content-Type'
543
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
544
+
545
+ # form parameters
546
+ form_params = opts[:form_params] || {}
547
+
548
+ # http body (model)
549
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(application_patch)
550
+
551
+ # return_type
552
+ return_type = opts[:debug_return_type] || 'ApplicationOut'
553
+
554
+ # auth_names
555
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
556
+
557
+ new_options = opts.merge(
558
+ :operation => :"ApplicationApi.v1_application_patch",
559
+ :header_params => header_params,
560
+ :query_params => query_params,
561
+ :form_params => form_params,
562
+ :body => post_body,
563
+ :auth_names => auth_names,
564
+ :return_type => return_type
565
+ )
566
+
567
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
568
+ if @api_client.config.debugging
569
+ @api_client.config.logger.debug "API called: ApplicationApi#v1_application_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
570
+ end
571
+ return data, status_code, headers
572
+ end
573
+
574
574
  # Update Application
575
575
  # Update an application.
576
576
  # @param app_id [String] The app&#39;s ID or UID
@@ -19,109 +19,6 @@ module Svix
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Patch Endpoint
23
- # Partially update an endpoint.
24
- # @param app_id [String] The app&#39;s ID or UID
25
- # @param endpoint_id [String] The ep&#39;s ID or UID
26
- # @param endpoint_patch [EndpointPatch]
27
- # @param [Hash] opts the optional parameters
28
- # @return [EndpointOut]
29
- def patch_endpoint(app_id, endpoint_id, endpoint_patch, opts = {})
30
- data, _status_code, _headers = patch_endpoint_with_http_info(app_id, endpoint_id, endpoint_patch, opts)
31
- data
32
- end
33
-
34
- # Patch Endpoint
35
- # Partially update an endpoint.
36
- # @param app_id [String] The app&#39;s ID or UID
37
- # @param endpoint_id [String] The ep&#39;s ID or UID
38
- # @param endpoint_patch [EndpointPatch]
39
- # @param [Hash] opts the optional parameters
40
- # @return [Array<(EndpointOut, Integer, Hash)>] EndpointOut data, response status code and response headers
41
- def patch_endpoint_with_http_info(app_id, endpoint_id, endpoint_patch, opts = {})
42
- if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: EndpointApi.patch_endpoint ...'
44
- end
45
- # verify the required parameter 'app_id' is set
46
- if @api_client.config.client_side_validation && app_id.nil?
47
- fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.patch_endpoint"
48
- end
49
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
50
- fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.patch_endpoint, the character length must be smaller than or equal to 256.'
51
- end
52
-
53
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
54
- fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.patch_endpoint, the character length must be great than or equal to 1.'
55
- end
56
-
57
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
58
- if @api_client.config.client_side_validation && app_id !~ pattern
59
- fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.patch_endpoint, must conform to the pattern #{pattern}."
60
- end
61
-
62
- # verify the required parameter 'endpoint_id' is set
63
- if @api_client.config.client_side_validation && endpoint_id.nil?
64
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.patch_endpoint"
65
- end
66
- if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
67
- fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.patch_endpoint, the character length must be smaller than or equal to 256.'
68
- end
69
-
70
- if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
71
- fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.patch_endpoint, the character length must be great than or equal to 1.'
72
- end
73
-
74
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
75
- if @api_client.config.client_side_validation && endpoint_id !~ pattern
76
- fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.patch_endpoint, must conform to the pattern #{pattern}."
77
- end
78
-
79
- # verify the required parameter 'endpoint_patch' is set
80
- if @api_client.config.client_side_validation && endpoint_patch.nil?
81
- fail ArgumentError, "Missing the required parameter 'endpoint_patch' when calling EndpointApi.patch_endpoint"
82
- end
83
- # resource path
84
- local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
85
-
86
- # query parameters
87
- query_params = opts[:query_params] || {}
88
-
89
- # header parameters
90
- header_params = opts[:header_params] || {}
91
- # HTTP header 'Accept' (if needed)
92
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
93
- # HTTP header 'Content-Type'
94
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
95
-
96
- # form parameters
97
- form_params = opts[:form_params] || {}
98
-
99
- # http body (model)
100
- post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_patch)
101
-
102
- # return_type
103
- return_type = opts[:debug_return_type] || 'EndpointOut'
104
-
105
- # auth_names
106
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
107
-
108
- new_options = opts.merge(
109
- :operation => :"EndpointApi.patch_endpoint",
110
- :header_params => header_params,
111
- :query_params => query_params,
112
- :form_params => form_params,
113
- :body => post_body,
114
- :auth_names => auth_names,
115
- :return_type => return_type
116
- )
117
-
118
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
119
- if @api_client.config.debugging
120
- @api_client.config.logger.debug "API called: EndpointApi#patch_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
121
- end
122
- return data, status_code, headers
123
- end
124
-
125
22
  # Create Endpoint
126
23
  # Create a new endpoint for the application. When `secret` is `null` the secret is automatically generated (recommended)
127
24
  # @param app_id [String] The app&#39;s ID or UID
@@ -783,6 +680,109 @@ module Svix
783
680
  return data, status_code, headers
784
681
  end
785
682
 
683
+ # Patch Endpoint
684
+ # Partially update an endpoint.
685
+ # @param app_id [String] The app&#39;s ID or UID
686
+ # @param endpoint_id [String] The ep&#39;s ID or UID
687
+ # @param endpoint_patch [EndpointPatch]
688
+ # @param [Hash] opts the optional parameters
689
+ # @return [EndpointOut]
690
+ def v1_endpoint_patch(app_id, endpoint_id, endpoint_patch, opts = {})
691
+ data, _status_code, _headers = v1_endpoint_patch_with_http_info(app_id, endpoint_id, endpoint_patch, opts)
692
+ data
693
+ end
694
+
695
+ # Patch Endpoint
696
+ # Partially update an endpoint.
697
+ # @param app_id [String] The app&#39;s ID or UID
698
+ # @param endpoint_id [String] The ep&#39;s ID or UID
699
+ # @param endpoint_patch [EndpointPatch]
700
+ # @param [Hash] opts the optional parameters
701
+ # @return [Array<(EndpointOut, Integer, Hash)>] EndpointOut data, response status code and response headers
702
+ def v1_endpoint_patch_with_http_info(app_id, endpoint_id, endpoint_patch, opts = {})
703
+ if @api_client.config.debugging
704
+ @api_client.config.logger.debug 'Calling API: EndpointApi.v1_endpoint_patch ...'
705
+ end
706
+ # verify the required parameter 'app_id' is set
707
+ if @api_client.config.client_side_validation && app_id.nil?
708
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.v1_endpoint_patch"
709
+ end
710
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
711
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_endpoint_patch, the character length must be smaller than or equal to 256.'
712
+ end
713
+
714
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
715
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_endpoint_patch, the character length must be great than or equal to 1.'
716
+ end
717
+
718
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
719
+ if @api_client.config.client_side_validation && app_id !~ pattern
720
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.v1_endpoint_patch, must conform to the pattern #{pattern}."
721
+ end
722
+
723
+ # verify the required parameter 'endpoint_id' is set
724
+ if @api_client.config.client_side_validation && endpoint_id.nil?
725
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.v1_endpoint_patch"
726
+ end
727
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
728
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.v1_endpoint_patch, the character length must be smaller than or equal to 256.'
729
+ end
730
+
731
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
732
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.v1_endpoint_patch, the character length must be great than or equal to 1.'
733
+ end
734
+
735
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
736
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
737
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.v1_endpoint_patch, must conform to the pattern #{pattern}."
738
+ end
739
+
740
+ # verify the required parameter 'endpoint_patch' is set
741
+ if @api_client.config.client_side_validation && endpoint_patch.nil?
742
+ fail ArgumentError, "Missing the required parameter 'endpoint_patch' when calling EndpointApi.v1_endpoint_patch"
743
+ end
744
+ # resource path
745
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
746
+
747
+ # query parameters
748
+ query_params = opts[:query_params] || {}
749
+
750
+ # header parameters
751
+ header_params = opts[:header_params] || {}
752
+ # HTTP header 'Accept' (if needed)
753
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
754
+ # HTTP header 'Content-Type'
755
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
756
+
757
+ # form parameters
758
+ form_params = opts[:form_params] || {}
759
+
760
+ # http body (model)
761
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_patch)
762
+
763
+ # return_type
764
+ return_type = opts[:debug_return_type] || 'EndpointOut'
765
+
766
+ # auth_names
767
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
768
+
769
+ new_options = opts.merge(
770
+ :operation => :"EndpointApi.v1_endpoint_patch",
771
+ :header_params => header_params,
772
+ :query_params => query_params,
773
+ :form_params => form_params,
774
+ :body => post_body,
775
+ :auth_names => auth_names,
776
+ :return_type => return_type
777
+ )
778
+
779
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
780
+ if @api_client.config.debugging
781
+ @api_client.config.logger.debug "API called: EndpointApi#v1_endpoint_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
782
+ end
783
+ return data, status_code, headers
784
+ end
785
+
786
786
  # Patch Endpoint Headers
787
787
  # Partially set the additional headers to be sent with the webhook
788
788
  # @param app_id [String] The app&#39;s ID or UID
@@ -19,86 +19,6 @@ module Svix
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Patch Event Type
23
- # Partially update an event type.
24
- # @param event_type_name [String] The event type&#39;s name
25
- # @param event_type_patch [EventTypePatch]
26
- # @param [Hash] opts the optional parameters
27
- # @return [EventTypeOut]
28
- def patch_event_type(event_type_name, event_type_patch, opts = {})
29
- data, _status_code, _headers = patch_event_type_with_http_info(event_type_name, event_type_patch, opts)
30
- data
31
- end
32
-
33
- # Patch Event Type
34
- # Partially update an event type.
35
- # @param event_type_name [String] The event type&#39;s name
36
- # @param event_type_patch [EventTypePatch]
37
- # @param [Hash] opts the optional parameters
38
- # @return [Array<(EventTypeOut, Integer, Hash)>] EventTypeOut data, response status code and response headers
39
- def patch_event_type_with_http_info(event_type_name, event_type_patch, opts = {})
40
- if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: EventTypeApi.patch_event_type ...'
42
- end
43
- # verify the required parameter 'event_type_name' is set
44
- if @api_client.config.client_side_validation && event_type_name.nil?
45
- fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.patch_event_type"
46
- end
47
- if @api_client.config.client_side_validation && event_type_name.to_s.length > 256
48
- fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.patch_event_type, the character length must be smaller than or equal to 256.'
49
- end
50
-
51
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
52
- if @api_client.config.client_side_validation && event_type_name !~ pattern
53
- fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.patch_event_type, must conform to the pattern #{pattern}."
54
- end
55
-
56
- # verify the required parameter 'event_type_patch' is set
57
- if @api_client.config.client_side_validation && event_type_patch.nil?
58
- fail ArgumentError, "Missing the required parameter 'event_type_patch' when calling EventTypeApi.patch_event_type"
59
- end
60
- # resource path
61
- local_var_path = '/api/v1/event-type/{event_type_name}/'.sub('{' + 'event_type_name' + '}', CGI.escape(event_type_name.to_s))
62
-
63
- # query parameters
64
- query_params = opts[:query_params] || {}
65
-
66
- # header parameters
67
- header_params = opts[:header_params] || {}
68
- # HTTP header 'Accept' (if needed)
69
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
70
- # HTTP header 'Content-Type'
71
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
72
-
73
- # form parameters
74
- form_params = opts[:form_params] || {}
75
-
76
- # http body (model)
77
- post_body = opts[:debug_body] || @api_client.object_to_http_body(event_type_patch)
78
-
79
- # return_type
80
- return_type = opts[:debug_return_type] || 'EventTypeOut'
81
-
82
- # auth_names
83
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
84
-
85
- new_options = opts.merge(
86
- :operation => :"EventTypeApi.patch_event_type",
87
- :header_params => header_params,
88
- :query_params => query_params,
89
- :form_params => form_params,
90
- :body => post_body,
91
- :auth_names => auth_names,
92
- :return_type => return_type
93
- )
94
-
95
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
96
- if @api_client.config.debugging
97
- @api_client.config.logger.debug "API called: EventTypeApi#patch_event_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
- end
99
- return data, status_code, headers
100
- end
101
-
102
22
  # Create Event Type
103
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.
104
24
  # @param event_type_in [EventTypeIn]
@@ -471,6 +391,86 @@ module Svix
471
391
  return data, status_code, headers
472
392
  end
473
393
 
394
+ # Patch Event Type
395
+ # Partially update an event type.
396
+ # @param event_type_name [String] The event type&#39;s name
397
+ # @param event_type_patch [EventTypePatch]
398
+ # @param [Hash] opts the optional parameters
399
+ # @return [EventTypeOut]
400
+ def v1_event_type_patch(event_type_name, event_type_patch, opts = {})
401
+ data, _status_code, _headers = v1_event_type_patch_with_http_info(event_type_name, event_type_patch, opts)
402
+ data
403
+ end
404
+
405
+ # Patch Event Type
406
+ # Partially update an event type.
407
+ # @param event_type_name [String] The event type&#39;s name
408
+ # @param event_type_patch [EventTypePatch]
409
+ # @param [Hash] opts the optional parameters
410
+ # @return [Array<(EventTypeOut, Integer, Hash)>] EventTypeOut data, response status code and response headers
411
+ def v1_event_type_patch_with_http_info(event_type_name, event_type_patch, opts = {})
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug 'Calling API: EventTypeApi.v1_event_type_patch ...'
414
+ end
415
+ # verify the required parameter 'event_type_name' is set
416
+ if @api_client.config.client_side_validation && event_type_name.nil?
417
+ fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.v1_event_type_patch"
418
+ end
419
+ if @api_client.config.client_side_validation && event_type_name.to_s.length > 256
420
+ fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.v1_event_type_patch, the character length must be smaller than or equal to 256.'
421
+ end
422
+
423
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
424
+ if @api_client.config.client_side_validation && event_type_name !~ pattern
425
+ fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.v1_event_type_patch, must conform to the pattern #{pattern}."
426
+ end
427
+
428
+ # verify the required parameter 'event_type_patch' is set
429
+ if @api_client.config.client_side_validation && event_type_patch.nil?
430
+ fail ArgumentError, "Missing the required parameter 'event_type_patch' when calling EventTypeApi.v1_event_type_patch"
431
+ end
432
+ # resource path
433
+ local_var_path = '/api/v1/event-type/{event_type_name}/'.sub('{' + 'event_type_name' + '}', CGI.escape(event_type_name.to_s))
434
+
435
+ # query parameters
436
+ query_params = opts[:query_params] || {}
437
+
438
+ # header parameters
439
+ header_params = opts[:header_params] || {}
440
+ # HTTP header 'Accept' (if needed)
441
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
442
+ # HTTP header 'Content-Type'
443
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
444
+
445
+ # form parameters
446
+ form_params = opts[:form_params] || {}
447
+
448
+ # http body (model)
449
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(event_type_patch)
450
+
451
+ # return_type
452
+ return_type = opts[:debug_return_type] || 'EventTypeOut'
453
+
454
+ # auth_names
455
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
456
+
457
+ new_options = opts.merge(
458
+ :operation => :"EventTypeApi.v1_event_type_patch",
459
+ :header_params => header_params,
460
+ :query_params => query_params,
461
+ :form_params => form_params,
462
+ :body => post_body,
463
+ :auth_names => auth_names,
464
+ :return_type => return_type
465
+ )
466
+
467
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
468
+ if @api_client.config.debugging
469
+ @api_client.config.logger.debug "API called: EventTypeApi#v1_event_type_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
470
+ end
471
+ return data, status_code, headers
472
+ end
473
+
474
474
  # Update Event Type
475
475
  # Update an event type.
476
476
  # @param event_type_name [String] The event type&#39;s name
@@ -24,6 +24,10 @@ module Svix
24
24
  return @api.v1_application_update(app_id, application_in)
25
25
  end
26
26
 
27
+ def patch(app_id, application_patch)
28
+ return @api.v1_application_patch(app_id, application_patch)
29
+ end
30
+
27
31
  def delete(app_id)
28
32
  return @api.v1_application_delete(app_id)
29
33
  end
@@ -22,6 +22,10 @@ module Svix
22
22
  return @api.v1_endpoint_update(app_id, endpoint_id, endpoint_update)
23
23
  end
24
24
 
25
+ def patch(app_id, endpoint_id, endpoint_patch)
26
+ return @api.v1_endpoint_patch(app_id, endpoint_id, endpoint_patch)
27
+ end
28
+
25
29
  def delete(app_id, endpoint_id)
26
30
  return @api.v1_endpoint_delete(app_id, endpoint_id)
27
31
  end
@@ -22,6 +22,10 @@ module Svix
22
22
  return @api.v1_event_type_update(event_type_name, event_type_update)
23
23
  end
24
24
 
25
+ def patch(event_type_name, event_type_patch)
26
+ return @api.v1_event_type_patch(event_type_name, event_type_patch)
27
+ end
28
+
25
29
  def delete(event_type_name)
26
30
  return @api.v1_event_type_delete(event_type_name)
27
31
  end
data/lib/svix/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- VERSION = "1.5.2"
4
+ VERSION = "1.6.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-30 00:00:00.000000000 Z
11
+ date: 2023-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus