svix 0.83.1 → 0.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/svix/api/application_api.rb +247 -181
- data/lib/svix/api/authentication_api.rb +82 -150
- data/lib/svix/api/background_tasks_api.rb +161 -0
- data/lib/svix/api/endpoint_api.rb +561 -485
- data/lib/svix/api/environment_api.rb +16 -16
- data/lib/svix/api/environment_settings_api.rb +7 -10
- data/lib/svix/api/event_type_api.rb +152 -81
- data/lib/svix/api/health_api.rb +6 -9
- data/lib/svix/api/integration_api.rb +123 -134
- data/lib/svix/api/message_api.rb +96 -102
- data/lib/svix/api/message_attempt_api.rb +382 -406
- data/lib/svix/api/statistics_api.rb +107 -45
- data/lib/svix/api_client.rb +0 -1
- data/lib/svix/application_api.rb +22 -22
- data/lib/svix/authentication_api.rb +3 -3
- data/lib/svix/configuration.rb +0 -7
- data/lib/svix/endpoint_api.rb +16 -16
- data/lib/svix/event_type_api.rb +19 -19
- data/lib/svix/integration_api.rb +26 -26
- data/lib/svix/message_api.rb +4 -4
- data/lib/svix/message_attempt_api.rb +8 -8
- data/lib/svix/models/app_portal_access_in.rb +1 -0
- data/lib/svix/models/application_in.rb +34 -1
- data/lib/svix/models/application_out.rb +20 -2
- data/lib/svix/models/application_patch.rb +299 -0
- data/lib/svix/models/application_stats.rb +0 -1
- data/lib/svix/models/{webhook_types.rb → background_task_out.rb} +40 -69
- data/lib/svix/models/background_task_out_common.rb +251 -0
- data/lib/svix/models/background_task_status.rb +38 -0
- data/lib/svix/models/background_task_type.rb +38 -0
- data/lib/svix/models/calculate_app_stats_in.rb +255 -0
- data/lib/svix/models/endpoint_created_event.rb +5 -0
- data/lib/svix/models/endpoint_created_event_data.rb +0 -2
- data/lib/svix/models/endpoint_deleted_event.rb +5 -0
- data/lib/svix/models/endpoint_deleted_event_data.rb +0 -2
- data/lib/svix/models/endpoint_disabled_event.rb +5 -0
- data/lib/svix/models/endpoint_disabled_event_data.rb +1 -2
- data/lib/svix/models/endpoint_in.rb +19 -10
- data/lib/svix/models/endpoint_message_out.rb +1 -0
- data/lib/svix/models/endpoint_out.rb +33 -15
- data/lib/svix/models/endpoint_patch.rb +405 -0
- data/lib/svix/models/endpoint_secret_rotate_in.rb +2 -0
- data/lib/svix/models/endpoint_transformation_in.rb +0 -2
- data/lib/svix/models/endpoint_transformation_simulate_in.rb +6 -0
- data/lib/svix/models/endpoint_update.rb +19 -10
- data/lib/svix/models/endpoint_updated_event.rb +5 -0
- data/lib/svix/models/endpoint_updated_event_data.rb +0 -2
- data/lib/svix/models/event_type_example_out.rb +4 -2
- data/lib/svix/models/event_type_patch.rb +275 -0
- data/lib/svix/models/event_type_schema_in.rb +0 -1
- data/lib/svix/models/http_validation_error.rb +5 -0
- data/lib/svix/models/list_response_application_stats.rb +15 -5
- data/lib/svix/models/list_response_background_task_out.rb +259 -0
- data/lib/svix/models/list_response_integration_out.rb +15 -5
- data/lib/svix/models/list_response_message_endpoint_out.rb +15 -5
- data/lib/svix/models/message_attempt_exhausted_event.rb +5 -0
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +1 -2
- data/lib/svix/models/message_attempt_failing_event.rb +5 -0
- data/lib/svix/models/message_attempt_failing_event_data.rb +1 -2
- data/lib/svix/models/message_attempt_headers_out.rb +27 -1
- data/lib/svix/models/message_endpoint_out.rb +45 -29
- data/lib/svix/models/message_in.rb +0 -1
- data/lib/svix/models/{one_time_token_out.rb → recover_out.rb} +41 -13
- data/lib/svix/models/{one_time_token_in.rb → replay_out.rb} +41 -13
- data/lib/svix/models/transformation_http_method.rb +1 -1
- data/lib/svix/models/validation_error.rb +4 -0
- data/lib/svix/version.rb +1 -1
- metadata +14 -5
@@ -26,8 +26,8 @@ module Svix
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @option opts [String] :idempotency_key The request's idempotency key
|
28
28
|
# @return [IntegrationOut]
|
29
|
-
def
|
30
|
-
data, _status_code, _headers =
|
29
|
+
def v1_integration_create(app_id, integration_in, opts = {})
|
30
|
+
data, _status_code, _headers = v1_integration_create_with_http_info(app_id, integration_in, opts)
|
31
31
|
data
|
32
32
|
end
|
33
33
|
|
@@ -38,30 +38,30 @@ module Svix
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
39
39
|
# @option opts [String] :idempotency_key The request's idempotency key
|
40
40
|
# @return [Array<(IntegrationOut, Integer, Hash)>] IntegrationOut data, response status code and response headers
|
41
|
-
def
|
41
|
+
def v1_integration_create_with_http_info(app_id, integration_in, opts = {})
|
42
42
|
if @api_client.config.debugging
|
43
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
43
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_create ...'
|
44
44
|
end
|
45
45
|
# verify the required parameter 'app_id' is set
|
46
46
|
if @api_client.config.client_side_validation && app_id.nil?
|
47
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.
|
47
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_create"
|
48
48
|
end
|
49
49
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
50
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
50
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_create, the character length must be smaller than or equal to 256.'
|
51
51
|
end
|
52
52
|
|
53
53
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
54
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
54
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_create, the character length must be great than or equal to 1.'
|
55
55
|
end
|
56
56
|
|
57
57
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
58
58
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
59
|
-
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.
|
59
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_create, must conform to the pattern #{pattern}."
|
60
60
|
end
|
61
61
|
|
62
62
|
# verify the required parameter 'integration_in' is set
|
63
63
|
if @api_client.config.client_side_validation && integration_in.nil?
|
64
|
-
fail ArgumentError, "Missing the required parameter 'integration_in' when calling IntegrationApi.
|
64
|
+
fail ArgumentError, "Missing the required parameter 'integration_in' when calling IntegrationApi.v1_integration_create"
|
65
65
|
end
|
66
66
|
# resource path
|
67
67
|
local_var_path = '/api/v1/app/{app_id}/integration/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
@@ -87,10 +87,10 @@ module Svix
|
|
87
87
|
return_type = opts[:debug_return_type] || 'IntegrationOut'
|
88
88
|
|
89
89
|
# auth_names
|
90
|
-
auth_names = opts[:debug_auth_names] || [
|
90
|
+
auth_names = opts[:debug_auth_names] || []
|
91
91
|
|
92
92
|
new_options = opts.merge(
|
93
|
-
:operation => :"IntegrationApi.
|
93
|
+
:operation => :"IntegrationApi.v1_integration_create",
|
94
94
|
:header_params => header_params,
|
95
95
|
:query_params => query_params,
|
96
96
|
:form_params => form_params,
|
@@ -101,57 +101,55 @@ module Svix
|
|
101
101
|
|
102
102
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
103
103
|
if @api_client.config.debugging
|
104
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
104
|
+
@api_client.config.logger.debug "API called: IntegrationApi#v1_integration_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
105
105
|
end
|
106
106
|
return data, status_code, headers
|
107
107
|
end
|
108
108
|
|
109
109
|
# Delete Integration
|
110
|
-
# Delete an integration
|
111
|
-
# @param integ_id [String]
|
110
|
+
# Delete an integration.
|
112
111
|
# @param app_id [String]
|
112
|
+
# @param integ_id [String]
|
113
113
|
# @param [Hash] opts the optional parameters
|
114
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
115
114
|
# @return [nil]
|
116
|
-
def
|
117
|
-
|
115
|
+
def v1_integration_delete(app_id, integ_id, opts = {})
|
116
|
+
v1_integration_delete_with_http_info(app_id, integ_id, opts)
|
118
117
|
nil
|
119
118
|
end
|
120
119
|
|
121
120
|
# Delete Integration
|
122
|
-
# Delete an integration
|
123
|
-
# @param integ_id [String]
|
121
|
+
# Delete an integration.
|
124
122
|
# @param app_id [String]
|
123
|
+
# @param integ_id [String]
|
125
124
|
# @param [Hash] opts the optional parameters
|
126
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
127
125
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
128
|
-
def
|
126
|
+
def v1_integration_delete_with_http_info(app_id, integ_id, opts = {})
|
129
127
|
if @api_client.config.debugging
|
130
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
131
|
-
end
|
132
|
-
# verify the required parameter 'integ_id' is set
|
133
|
-
if @api_client.config.client_side_validation && integ_id.nil?
|
134
|
-
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete"
|
128
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_delete ...'
|
135
129
|
end
|
136
130
|
# verify the required parameter 'app_id' is set
|
137
131
|
if @api_client.config.client_side_validation && app_id.nil?
|
138
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.
|
132
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_delete"
|
139
133
|
end
|
140
134
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
141
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
135
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_delete, the character length must be smaller than or equal to 256.'
|
142
136
|
end
|
143
137
|
|
144
138
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
145
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
139
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_delete, the character length must be great than or equal to 1.'
|
146
140
|
end
|
147
141
|
|
148
142
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
149
143
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
150
|
-
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.
|
144
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_delete, must conform to the pattern #{pattern}."
|
151
145
|
end
|
152
146
|
|
147
|
+
# verify the required parameter 'integ_id' is set
|
148
|
+
if @api_client.config.client_side_validation && integ_id.nil?
|
149
|
+
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_delete"
|
150
|
+
end
|
153
151
|
# resource path
|
154
|
-
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + '
|
152
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
|
155
153
|
|
156
154
|
# query parameters
|
157
155
|
query_params = opts[:query_params] || {}
|
@@ -160,7 +158,6 @@ module Svix
|
|
160
158
|
header_params = opts[:header_params] || {}
|
161
159
|
# HTTP header 'Accept' (if needed)
|
162
160
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
163
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
164
161
|
|
165
162
|
# form parameters
|
166
163
|
form_params = opts[:form_params] || {}
|
@@ -172,10 +169,10 @@ module Svix
|
|
172
169
|
return_type = opts[:debug_return_type]
|
173
170
|
|
174
171
|
# auth_names
|
175
|
-
auth_names = opts[:debug_auth_names] || [
|
172
|
+
auth_names = opts[:debug_auth_names] || []
|
176
173
|
|
177
174
|
new_options = opts.merge(
|
178
|
-
:operation => :"IntegrationApi.
|
175
|
+
:operation => :"IntegrationApi.v1_integration_delete",
|
179
176
|
:header_params => header_params,
|
180
177
|
:query_params => query_params,
|
181
178
|
:form_params => form_params,
|
@@ -186,57 +183,55 @@ module Svix
|
|
186
183
|
|
187
184
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
188
185
|
if @api_client.config.debugging
|
189
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
186
|
+
@api_client.config.logger.debug "API called: IntegrationApi#v1_integration_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
190
187
|
end
|
191
188
|
return data, status_code, headers
|
192
189
|
end
|
193
190
|
|
194
191
|
# Get Integration
|
195
192
|
# Get an integration.
|
196
|
-
# @param integ_id [String]
|
197
193
|
# @param app_id [String]
|
194
|
+
# @param integ_id [String]
|
198
195
|
# @param [Hash] opts the optional parameters
|
199
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
200
196
|
# @return [IntegrationOut]
|
201
|
-
def
|
202
|
-
data, _status_code, _headers =
|
197
|
+
def v1_integration_get(app_id, integ_id, opts = {})
|
198
|
+
data, _status_code, _headers = v1_integration_get_with_http_info(app_id, integ_id, opts)
|
203
199
|
data
|
204
200
|
end
|
205
201
|
|
206
202
|
# Get Integration
|
207
203
|
# Get an integration.
|
208
|
-
# @param integ_id [String]
|
209
204
|
# @param app_id [String]
|
205
|
+
# @param integ_id [String]
|
210
206
|
# @param [Hash] opts the optional parameters
|
211
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
212
207
|
# @return [Array<(IntegrationOut, Integer, Hash)>] IntegrationOut data, response status code and response headers
|
213
|
-
def
|
208
|
+
def v1_integration_get_with_http_info(app_id, integ_id, opts = {})
|
214
209
|
if @api_client.config.debugging
|
215
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
216
|
-
end
|
217
|
-
# verify the required parameter 'integ_id' is set
|
218
|
-
if @api_client.config.client_side_validation && integ_id.nil?
|
219
|
-
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get"
|
210
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_get ...'
|
220
211
|
end
|
221
212
|
# verify the required parameter 'app_id' is set
|
222
213
|
if @api_client.config.client_side_validation && app_id.nil?
|
223
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.
|
214
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_get"
|
224
215
|
end
|
225
216
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
226
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
217
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_get, the character length must be smaller than or equal to 256.'
|
227
218
|
end
|
228
219
|
|
229
220
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
230
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
221
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_get, the character length must be great than or equal to 1.'
|
231
222
|
end
|
232
223
|
|
233
224
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
234
225
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
235
|
-
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.
|
226
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_get, must conform to the pattern #{pattern}."
|
236
227
|
end
|
237
228
|
|
229
|
+
# verify the required parameter 'integ_id' is set
|
230
|
+
if @api_client.config.client_side_validation && integ_id.nil?
|
231
|
+
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_get"
|
232
|
+
end
|
238
233
|
# resource path
|
239
|
-
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + '
|
234
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
|
240
235
|
|
241
236
|
# query parameters
|
242
237
|
query_params = opts[:query_params] || {}
|
@@ -245,7 +240,6 @@ module Svix
|
|
245
240
|
header_params = opts[:header_params] || {}
|
246
241
|
# HTTP header 'Accept' (if needed)
|
247
242
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
248
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
249
243
|
|
250
244
|
# form parameters
|
251
245
|
form_params = opts[:form_params] || {}
|
@@ -257,10 +251,10 @@ module Svix
|
|
257
251
|
return_type = opts[:debug_return_type] || 'IntegrationOut'
|
258
252
|
|
259
253
|
# auth_names
|
260
|
-
auth_names = opts[:debug_auth_names] || [
|
254
|
+
auth_names = opts[:debug_auth_names] || []
|
261
255
|
|
262
256
|
new_options = opts.merge(
|
263
|
-
:operation => :"IntegrationApi.
|
257
|
+
:operation => :"IntegrationApi.v1_integration_get",
|
264
258
|
:header_params => header_params,
|
265
259
|
:query_params => query_params,
|
266
260
|
:form_params => form_params,
|
@@ -271,57 +265,55 @@ module Svix
|
|
271
265
|
|
272
266
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
273
267
|
if @api_client.config.debugging
|
274
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
268
|
+
@api_client.config.logger.debug "API called: IntegrationApi#v1_integration_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
275
269
|
end
|
276
270
|
return data, status_code, headers
|
277
271
|
end
|
278
272
|
|
279
273
|
# Get Integration Key
|
280
274
|
# Get an integration's key.
|
281
|
-
# @param integ_id [String]
|
282
275
|
# @param app_id [String]
|
276
|
+
# @param integ_id [String]
|
283
277
|
# @param [Hash] opts the optional parameters
|
284
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
285
278
|
# @return [IntegrationKeyOut]
|
286
|
-
def
|
287
|
-
data, _status_code, _headers =
|
279
|
+
def v1_integration_get_key(app_id, integ_id, opts = {})
|
280
|
+
data, _status_code, _headers = v1_integration_get_key_with_http_info(app_id, integ_id, opts)
|
288
281
|
data
|
289
282
|
end
|
290
283
|
|
291
284
|
# Get Integration Key
|
292
285
|
# Get an integration's key.
|
293
|
-
# @param integ_id [String]
|
294
286
|
# @param app_id [String]
|
287
|
+
# @param integ_id [String]
|
295
288
|
# @param [Hash] opts the optional parameters
|
296
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
297
289
|
# @return [Array<(IntegrationKeyOut, Integer, Hash)>] IntegrationKeyOut data, response status code and response headers
|
298
|
-
def
|
290
|
+
def v1_integration_get_key_with_http_info(app_id, integ_id, opts = {})
|
299
291
|
if @api_client.config.debugging
|
300
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
301
|
-
end
|
302
|
-
# verify the required parameter 'integ_id' is set
|
303
|
-
if @api_client.config.client_side_validation && integ_id.nil?
|
304
|
-
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get"
|
292
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_get_key ...'
|
305
293
|
end
|
306
294
|
# verify the required parameter 'app_id' is set
|
307
295
|
if @api_client.config.client_side_validation && app_id.nil?
|
308
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.
|
296
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_get_key"
|
309
297
|
end
|
310
298
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
311
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
299
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_get_key, the character length must be smaller than or equal to 256.'
|
312
300
|
end
|
313
301
|
|
314
302
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
315
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
303
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_get_key, the character length must be great than or equal to 1.'
|
316
304
|
end
|
317
305
|
|
318
306
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
319
307
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
320
|
-
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.
|
308
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_get_key, must conform to the pattern #{pattern}."
|
321
309
|
end
|
322
310
|
|
311
|
+
# verify the required parameter 'integ_id' is set
|
312
|
+
if @api_client.config.client_side_validation && integ_id.nil?
|
313
|
+
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_get_key"
|
314
|
+
end
|
323
315
|
# resource path
|
324
|
-
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/'.sub('{' + '
|
316
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
|
325
317
|
|
326
318
|
# query parameters
|
327
319
|
query_params = opts[:query_params] || {}
|
@@ -330,7 +322,6 @@ module Svix
|
|
330
322
|
header_params = opts[:header_params] || {}
|
331
323
|
# HTTP header 'Accept' (if needed)
|
332
324
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
333
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
334
325
|
|
335
326
|
# form parameters
|
336
327
|
form_params = opts[:form_params] || {}
|
@@ -342,10 +333,10 @@ module Svix
|
|
342
333
|
return_type = opts[:debug_return_type] || 'IntegrationKeyOut'
|
343
334
|
|
344
335
|
# auth_names
|
345
|
-
auth_names = opts[:debug_auth_names] || [
|
336
|
+
auth_names = opts[:debug_auth_names] || []
|
346
337
|
|
347
338
|
new_options = opts.merge(
|
348
|
-
:operation => :"IntegrationApi.
|
339
|
+
:operation => :"IntegrationApi.v1_integration_get_key",
|
349
340
|
:header_params => header_params,
|
350
341
|
:query_params => query_params,
|
351
342
|
:form_params => form_params,
|
@@ -356,7 +347,7 @@ module Svix
|
|
356
347
|
|
357
348
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
358
349
|
if @api_client.config.debugging
|
359
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
350
|
+
@api_client.config.logger.debug "API called: IntegrationApi#v1_integration_get_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
360
351
|
end
|
361
352
|
return data, status_code, headers
|
362
353
|
end
|
@@ -365,12 +356,11 @@ module Svix
|
|
365
356
|
# List the application's integrations.
|
366
357
|
# @param app_id [String]
|
367
358
|
# @param [Hash] opts the optional parameters
|
359
|
+
# @option opts [Integer] :limit
|
368
360
|
# @option opts [String] :iterator
|
369
|
-
# @option opts [Integer] :limit (default to 50)
|
370
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
371
361
|
# @return [ListResponseIntegrationOut]
|
372
|
-
def
|
373
|
-
data, _status_code, _headers =
|
362
|
+
def v1_integration_list(app_id, opts = {})
|
363
|
+
data, _status_code, _headers = v1_integration_list_with_http_info(app_id, opts)
|
374
364
|
data
|
375
365
|
end
|
376
366
|
|
@@ -378,29 +368,32 @@ module Svix
|
|
378
368
|
# List the application's integrations.
|
379
369
|
# @param app_id [String]
|
380
370
|
# @param [Hash] opts the optional parameters
|
381
|
-
# @option opts [String] :iterator
|
382
371
|
# @option opts [Integer] :limit
|
383
|
-
# @option opts [String] :
|
372
|
+
# @option opts [String] :iterator
|
384
373
|
# @return [Array<(ListResponseIntegrationOut, Integer, Hash)>] ListResponseIntegrationOut data, response status code and response headers
|
385
|
-
def
|
374
|
+
def v1_integration_list_with_http_info(app_id, opts = {})
|
386
375
|
if @api_client.config.debugging
|
387
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
376
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_list ...'
|
388
377
|
end
|
389
378
|
# verify the required parameter 'app_id' is set
|
390
379
|
if @api_client.config.client_side_validation && app_id.nil?
|
391
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.
|
380
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_list"
|
392
381
|
end
|
393
382
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
394
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
383
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_list, the character length must be smaller than or equal to 256.'
|
395
384
|
end
|
396
385
|
|
397
386
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
398
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
387
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_list, the character length must be great than or equal to 1.'
|
399
388
|
end
|
400
389
|
|
401
390
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
402
391
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
403
|
-
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.
|
392
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_list, must conform to the pattern #{pattern}."
|
393
|
+
end
|
394
|
+
|
395
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
|
396
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling IntegrationApi.v1_integration_list, must be greater than or equal to 0.'
|
404
397
|
end
|
405
398
|
|
406
399
|
# resource path
|
@@ -408,14 +401,13 @@ module Svix
|
|
408
401
|
|
409
402
|
# query parameters
|
410
403
|
query_params = opts[:query_params] || {}
|
411
|
-
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
412
404
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
405
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
413
406
|
|
414
407
|
# header parameters
|
415
408
|
header_params = opts[:header_params] || {}
|
416
409
|
# HTTP header 'Accept' (if needed)
|
417
410
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
418
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
419
411
|
|
420
412
|
# form parameters
|
421
413
|
form_params = opts[:form_params] || {}
|
@@ -427,10 +419,10 @@ module Svix
|
|
427
419
|
return_type = opts[:debug_return_type] || 'ListResponseIntegrationOut'
|
428
420
|
|
429
421
|
# auth_names
|
430
|
-
auth_names = opts[:debug_auth_names] || [
|
422
|
+
auth_names = opts[:debug_auth_names] || []
|
431
423
|
|
432
424
|
new_options = opts.merge(
|
433
|
-
:operation => :"IntegrationApi.
|
425
|
+
:operation => :"IntegrationApi.v1_integration_list",
|
434
426
|
:header_params => header_params,
|
435
427
|
:query_params => query_params,
|
436
428
|
:form_params => form_params,
|
@@ -441,57 +433,57 @@ module Svix
|
|
441
433
|
|
442
434
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
443
435
|
if @api_client.config.debugging
|
444
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
436
|
+
@api_client.config.logger.debug "API called: IntegrationApi#v1_integration_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
445
437
|
end
|
446
438
|
return data, status_code, headers
|
447
439
|
end
|
448
440
|
|
449
441
|
# Rotate Integration Key
|
450
442
|
# Rotate the integration's key. The previous key will be immediately revoked.
|
451
|
-
# @param integ_id [String]
|
452
443
|
# @param app_id [String]
|
444
|
+
# @param integ_id [String]
|
453
445
|
# @param [Hash] opts the optional parameters
|
454
446
|
# @option opts [String] :idempotency_key The request's idempotency key
|
455
447
|
# @return [IntegrationKeyOut]
|
456
|
-
def
|
457
|
-
data, _status_code, _headers =
|
448
|
+
def v1_integration_rotate_key(app_id, integ_id, opts = {})
|
449
|
+
data, _status_code, _headers = v1_integration_rotate_key_with_http_info(app_id, integ_id, opts)
|
458
450
|
data
|
459
451
|
end
|
460
452
|
|
461
453
|
# Rotate Integration Key
|
462
454
|
# Rotate the integration's key. The previous key will be immediately revoked.
|
463
|
-
# @param integ_id [String]
|
464
455
|
# @param app_id [String]
|
456
|
+
# @param integ_id [String]
|
465
457
|
# @param [Hash] opts the optional parameters
|
466
458
|
# @option opts [String] :idempotency_key The request's idempotency key
|
467
459
|
# @return [Array<(IntegrationKeyOut, Integer, Hash)>] IntegrationKeyOut data, response status code and response headers
|
468
|
-
def
|
460
|
+
def v1_integration_rotate_key_with_http_info(app_id, integ_id, opts = {})
|
469
461
|
if @api_client.config.debugging
|
470
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
471
|
-
end
|
472
|
-
# verify the required parameter 'integ_id' is set
|
473
|
-
if @api_client.config.client_side_validation && integ_id.nil?
|
474
|
-
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post"
|
462
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_rotate_key ...'
|
475
463
|
end
|
476
464
|
# verify the required parameter 'app_id' is set
|
477
465
|
if @api_client.config.client_side_validation && app_id.nil?
|
478
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.
|
466
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_rotate_key"
|
479
467
|
end
|
480
468
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
481
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
469
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_rotate_key, the character length must be smaller than or equal to 256.'
|
482
470
|
end
|
483
471
|
|
484
472
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
485
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
473
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_rotate_key, the character length must be great than or equal to 1.'
|
486
474
|
end
|
487
475
|
|
488
476
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
489
477
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
490
|
-
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.
|
478
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_rotate_key, must conform to the pattern #{pattern}."
|
491
479
|
end
|
492
480
|
|
481
|
+
# verify the required parameter 'integ_id' is set
|
482
|
+
if @api_client.config.client_side_validation && integ_id.nil?
|
483
|
+
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_rotate_key"
|
484
|
+
end
|
493
485
|
# resource path
|
494
|
-
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/rotate/'.sub('{' + '
|
486
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/rotate/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
|
495
487
|
|
496
488
|
# query parameters
|
497
489
|
query_params = opts[:query_params] || {}
|
@@ -512,10 +504,10 @@ module Svix
|
|
512
504
|
return_type = opts[:debug_return_type] || 'IntegrationKeyOut'
|
513
505
|
|
514
506
|
# auth_names
|
515
|
-
auth_names = opts[:debug_auth_names] || [
|
507
|
+
auth_names = opts[:debug_auth_names] || []
|
516
508
|
|
517
509
|
new_options = opts.merge(
|
518
|
-
:operation => :"IntegrationApi.
|
510
|
+
:operation => :"IntegrationApi.v1_integration_rotate_key",
|
519
511
|
:header_params => header_params,
|
520
512
|
:query_params => query_params,
|
521
513
|
:form_params => form_params,
|
@@ -526,63 +518,61 @@ module Svix
|
|
526
518
|
|
527
519
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
528
520
|
if @api_client.config.debugging
|
529
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
521
|
+
@api_client.config.logger.debug "API called: IntegrationApi#v1_integration_rotate_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
530
522
|
end
|
531
523
|
return data, status_code, headers
|
532
524
|
end
|
533
525
|
|
534
526
|
# Update Integration
|
535
527
|
# Update an integration.
|
536
|
-
# @param integ_id [String]
|
537
528
|
# @param app_id [String]
|
529
|
+
# @param integ_id [String]
|
538
530
|
# @param integration_update [IntegrationUpdate]
|
539
531
|
# @param [Hash] opts the optional parameters
|
540
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
541
532
|
# @return [IntegrationOut]
|
542
|
-
def
|
543
|
-
data, _status_code, _headers =
|
533
|
+
def v1_integration_update(app_id, integ_id, integration_update, opts = {})
|
534
|
+
data, _status_code, _headers = v1_integration_update_with_http_info(app_id, integ_id, integration_update, opts)
|
544
535
|
data
|
545
536
|
end
|
546
537
|
|
547
538
|
# Update Integration
|
548
539
|
# Update an integration.
|
549
|
-
# @param integ_id [String]
|
550
540
|
# @param app_id [String]
|
541
|
+
# @param integ_id [String]
|
551
542
|
# @param integration_update [IntegrationUpdate]
|
552
543
|
# @param [Hash] opts the optional parameters
|
553
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
554
544
|
# @return [Array<(IntegrationOut, Integer, Hash)>] IntegrationOut data, response status code and response headers
|
555
|
-
def
|
545
|
+
def v1_integration_update_with_http_info(app_id, integ_id, integration_update, opts = {})
|
556
546
|
if @api_client.config.debugging
|
557
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
558
|
-
end
|
559
|
-
# verify the required parameter 'integ_id' is set
|
560
|
-
if @api_client.config.client_side_validation && integ_id.nil?
|
561
|
-
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put"
|
547
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_update ...'
|
562
548
|
end
|
563
549
|
# verify the required parameter 'app_id' is set
|
564
550
|
if @api_client.config.client_side_validation && app_id.nil?
|
565
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.
|
551
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_update"
|
566
552
|
end
|
567
553
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
568
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
554
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_update, the character length must be smaller than or equal to 256.'
|
569
555
|
end
|
570
556
|
|
571
557
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
572
|
-
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.
|
558
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_update, the character length must be great than or equal to 1.'
|
573
559
|
end
|
574
560
|
|
575
561
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
576
562
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
577
|
-
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.
|
563
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_update, must conform to the pattern #{pattern}."
|
578
564
|
end
|
579
565
|
|
566
|
+
# verify the required parameter 'integ_id' is set
|
567
|
+
if @api_client.config.client_side_validation && integ_id.nil?
|
568
|
+
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_update"
|
569
|
+
end
|
580
570
|
# verify the required parameter 'integration_update' is set
|
581
571
|
if @api_client.config.client_side_validation && integration_update.nil?
|
582
|
-
fail ArgumentError, "Missing the required parameter 'integration_update' when calling IntegrationApi.
|
572
|
+
fail ArgumentError, "Missing the required parameter 'integration_update' when calling IntegrationApi.v1_integration_update"
|
583
573
|
end
|
584
574
|
# resource path
|
585
|
-
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + '
|
575
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
|
586
576
|
|
587
577
|
# query parameters
|
588
578
|
query_params = opts[:query_params] || {}
|
@@ -593,7 +583,6 @@ module Svix
|
|
593
583
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
594
584
|
# HTTP header 'Content-Type'
|
595
585
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
596
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
597
586
|
|
598
587
|
# form parameters
|
599
588
|
form_params = opts[:form_params] || {}
|
@@ -605,10 +594,10 @@ module Svix
|
|
605
594
|
return_type = opts[:debug_return_type] || 'IntegrationOut'
|
606
595
|
|
607
596
|
# auth_names
|
608
|
-
auth_names = opts[:debug_auth_names] || [
|
597
|
+
auth_names = opts[:debug_auth_names] || []
|
609
598
|
|
610
599
|
new_options = opts.merge(
|
611
|
-
:operation => :"IntegrationApi.
|
600
|
+
:operation => :"IntegrationApi.v1_integration_update",
|
612
601
|
:header_params => header_params,
|
613
602
|
:query_params => query_params,
|
614
603
|
:form_params => form_params,
|
@@ -619,7 +608,7 @@ module Svix
|
|
619
608
|
|
620
609
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
621
610
|
if @api_client.config.debugging
|
622
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
611
|
+
@api_client.config.logger.debug "API called: IntegrationApi#v1_integration_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
623
612
|
end
|
624
613
|
return data, status_code, headers
|
625
614
|
end
|