svix 0.45.0 → 0.48.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/README.md +62 -8
- data/lib/svix/api/application_api.rb +15 -0
- data/lib/svix/api/authentication_api.rb +6 -0
- data/lib/svix/api/endpoint_api.rb +39 -0
- data/lib/svix/api/environment_api.rb +6 -0
- data/lib/svix/api/environment_settings_api.rb +3 -0
- data/lib/svix/api/event_type_api.rb +18 -0
- data/lib/svix/api/health_api.rb +5 -0
- data/lib/svix/api/integration_api.rb +21 -0
- data/lib/svix/api/message_api.rb +21 -0
- data/lib/svix/api/message_attempt_api.rb +342 -4
- data/lib/svix/api/organization_api.rb +29 -29
- data/lib/svix/api/organization_settings_api.rb +6 -6
- data/lib/svix/api/statistics_api.rb +6 -0
- data/lib/svix/message_attempt_api.rb +11 -1
- data/lib/svix/models/export_organization_out.rb +3 -3
- data/lib/svix/models/import_organization_in.rb +3 -3
- data/lib/svix/models/message_attempt_endpoint_out.rb +15 -1
- data/lib/svix/version.rb +1 -1
- metadata +2 -2
@@ -25,6 +25,7 @@ module Svix
|
|
25
25
|
# @param msg_id [String]
|
26
26
|
# @param app_id [String]
|
27
27
|
# @param [Hash] opts the optional parameters
|
28
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
28
29
|
# @return [MessageAttemptOut]
|
29
30
|
def get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get(attempt_id, msg_id, app_id, opts = {})
|
30
31
|
data, _status_code, _headers = get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get_with_http_info(attempt_id, msg_id, app_id, opts)
|
@@ -37,6 +38,7 @@ module Svix
|
|
37
38
|
# @param msg_id [String]
|
38
39
|
# @param app_id [String]
|
39
40
|
# @param [Hash] opts the optional parameters
|
41
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
40
42
|
# @return [Array<(MessageAttemptOut, Integer, Hash)>] MessageAttemptOut data, response status code and response headers
|
41
43
|
def get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get_with_http_info(attempt_id, msg_id, app_id, opts = {})
|
42
44
|
if @api_client.config.debugging
|
@@ -90,6 +92,7 @@ module Svix
|
|
90
92
|
header_params = opts[:header_params] || {}
|
91
93
|
# HTTP header 'Accept' (if needed)
|
92
94
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
95
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
93
96
|
|
94
97
|
# form parameters
|
95
98
|
form_params = opts[:form_params] || {}
|
@@ -127,6 +130,7 @@ module Svix
|
|
127
130
|
# @param [Hash] opts the optional parameters
|
128
131
|
# @option opts [String] :iterator
|
129
132
|
# @option opts [Integer] :limit (default to 50)
|
133
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
130
134
|
# @return [ListResponseMessageEndpointOut]
|
131
135
|
def list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get(msg_id, app_id, opts = {})
|
132
136
|
data, _status_code, _headers = list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get_with_http_info(msg_id, app_id, opts)
|
@@ -140,6 +144,7 @@ module Svix
|
|
140
144
|
# @param [Hash] opts the optional parameters
|
141
145
|
# @option opts [String] :iterator
|
142
146
|
# @option opts [Integer] :limit
|
147
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
143
148
|
# @return [Array<(ListResponseMessageEndpointOut, Integer, Hash)>] ListResponseMessageEndpointOut data, response status code and response headers
|
144
149
|
def list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get_with_http_info(msg_id, app_id, opts = {})
|
145
150
|
if @api_client.config.debugging
|
@@ -195,6 +200,7 @@ module Svix
|
|
195
200
|
header_params = opts[:header_params] || {}
|
196
201
|
# HTTP header 'Accept' (if needed)
|
197
202
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
203
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
198
204
|
|
199
205
|
# form parameters
|
200
206
|
form_params = opts[:form_params] || {}
|
@@ -225,6 +231,280 @@ module Svix
|
|
225
231
|
return data, status_code, headers
|
226
232
|
end
|
227
233
|
|
234
|
+
# List Attempted Destinations By Endpoint
|
235
|
+
# List attempts by endpoint id
|
236
|
+
# @param app_id [String]
|
237
|
+
# @param endpoint_id [String]
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @option opts [String] :iterator
|
240
|
+
# @option opts [Integer] :limit (default to 50)
|
241
|
+
# @option opts [MessageStatus] :status
|
242
|
+
# @option opts [Array<String>] :event_types
|
243
|
+
# @option opts [String] :channel
|
244
|
+
# @option opts [Time] :before
|
245
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
246
|
+
# @return [ListResponseMessageAttemptOut]
|
247
|
+
def list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get(app_id, endpoint_id, opts = {})
|
248
|
+
data, _status_code, _headers = list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get_with_http_info(app_id, endpoint_id, opts)
|
249
|
+
data
|
250
|
+
end
|
251
|
+
|
252
|
+
# List Attempted Destinations By Endpoint
|
253
|
+
# List attempts by endpoint id
|
254
|
+
# @param app_id [String]
|
255
|
+
# @param endpoint_id [String]
|
256
|
+
# @param [Hash] opts the optional parameters
|
257
|
+
# @option opts [String] :iterator
|
258
|
+
# @option opts [Integer] :limit
|
259
|
+
# @option opts [MessageStatus] :status
|
260
|
+
# @option opts [Array<String>] :event_types
|
261
|
+
# @option opts [String] :channel
|
262
|
+
# @option opts [Time] :before
|
263
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
264
|
+
# @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
|
265
|
+
def list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get_with_http_info(app_id, endpoint_id, opts = {})
|
266
|
+
if @api_client.config.debugging
|
267
|
+
@api_client.config.logger.debug 'Calling API: MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get ...'
|
268
|
+
end
|
269
|
+
# verify the required parameter 'app_id' is set
|
270
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
271
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get"
|
272
|
+
end
|
273
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
274
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be smaller than or equal to 256.'
|
275
|
+
end
|
276
|
+
|
277
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
278
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be great than or equal to 1.'
|
279
|
+
end
|
280
|
+
|
281
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
282
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
283
|
+
fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
|
284
|
+
end
|
285
|
+
|
286
|
+
# verify the required parameter 'endpoint_id' is set
|
287
|
+
if @api_client.config.client_side_validation && endpoint_id.nil?
|
288
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get"
|
289
|
+
end
|
290
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
|
291
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be smaller than or equal to 256.'
|
292
|
+
end
|
293
|
+
|
294
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
|
295
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be great than or equal to 1.'
|
296
|
+
end
|
297
|
+
|
298
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
299
|
+
if @api_client.config.client_side_validation && endpoint_id !~ pattern
|
300
|
+
fail ArgumentError, "invalid value for 'endpoint_id' when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
|
301
|
+
end
|
302
|
+
|
303
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
304
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must be smaller than or equal to 250.'
|
305
|
+
end
|
306
|
+
|
307
|
+
if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
|
308
|
+
fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be smaller than or equal to 128.'
|
309
|
+
end
|
310
|
+
|
311
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
312
|
+
if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
|
313
|
+
fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
|
314
|
+
end
|
315
|
+
|
316
|
+
# resource path
|
317
|
+
local_var_path = '/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
318
|
+
|
319
|
+
# query parameters
|
320
|
+
query_params = opts[:query_params] || {}
|
321
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
322
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
323
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
324
|
+
query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
325
|
+
query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
|
326
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
327
|
+
|
328
|
+
# header parameters
|
329
|
+
header_params = opts[:header_params] || {}
|
330
|
+
# HTTP header 'Accept' (if needed)
|
331
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
332
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
333
|
+
|
334
|
+
# form parameters
|
335
|
+
form_params = opts[:form_params] || {}
|
336
|
+
|
337
|
+
# http body (model)
|
338
|
+
post_body = opts[:debug_body]
|
339
|
+
|
340
|
+
# return_type
|
341
|
+
return_type = opts[:debug_return_type] || 'ListResponseMessageAttemptOut'
|
342
|
+
|
343
|
+
# auth_names
|
344
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
345
|
+
|
346
|
+
new_options = opts.merge(
|
347
|
+
:operation => :"MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get",
|
348
|
+
:header_params => header_params,
|
349
|
+
:query_params => query_params,
|
350
|
+
:form_params => form_params,
|
351
|
+
:body => post_body,
|
352
|
+
:auth_names => auth_names,
|
353
|
+
:return_type => return_type
|
354
|
+
)
|
355
|
+
|
356
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
357
|
+
if @api_client.config.debugging
|
358
|
+
@api_client.config.logger.debug "API called: MessageAttemptApi#list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
359
|
+
end
|
360
|
+
return data, status_code, headers
|
361
|
+
end
|
362
|
+
|
363
|
+
# List Attempted Destinations By Msg
|
364
|
+
# List attempts by message id
|
365
|
+
# @param app_id [String]
|
366
|
+
# @param msg_id [String]
|
367
|
+
# @param [Hash] opts the optional parameters
|
368
|
+
# @option opts [String] :endpoint_id
|
369
|
+
# @option opts [String] :iterator
|
370
|
+
# @option opts [Integer] :limit (default to 50)
|
371
|
+
# @option opts [MessageStatus] :status
|
372
|
+
# @option opts [Array<String>] :event_types
|
373
|
+
# @option opts [String] :channel
|
374
|
+
# @option opts [Time] :before
|
375
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
376
|
+
# @return [ListResponseMessageAttemptOut]
|
377
|
+
def list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get(app_id, msg_id, opts = {})
|
378
|
+
data, _status_code, _headers = list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get_with_http_info(app_id, msg_id, opts)
|
379
|
+
data
|
380
|
+
end
|
381
|
+
|
382
|
+
# List Attempted Destinations By Msg
|
383
|
+
# List attempts by message id
|
384
|
+
# @param app_id [String]
|
385
|
+
# @param msg_id [String]
|
386
|
+
# @param [Hash] opts the optional parameters
|
387
|
+
# @option opts [String] :endpoint_id
|
388
|
+
# @option opts [String] :iterator
|
389
|
+
# @option opts [Integer] :limit
|
390
|
+
# @option opts [MessageStatus] :status
|
391
|
+
# @option opts [Array<String>] :event_types
|
392
|
+
# @option opts [String] :channel
|
393
|
+
# @option opts [Time] :before
|
394
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
395
|
+
# @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
|
396
|
+
def list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get_with_http_info(app_id, msg_id, opts = {})
|
397
|
+
if @api_client.config.debugging
|
398
|
+
@api_client.config.logger.debug 'Calling API: MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get ...'
|
399
|
+
end
|
400
|
+
# verify the required parameter 'app_id' is set
|
401
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
402
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get"
|
403
|
+
end
|
404
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
405
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 256.'
|
406
|
+
end
|
407
|
+
|
408
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
409
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be great than or equal to 1.'
|
410
|
+
end
|
411
|
+
|
412
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
413
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
414
|
+
fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
|
415
|
+
end
|
416
|
+
|
417
|
+
# verify the required parameter 'msg_id' is set
|
418
|
+
if @api_client.config.client_side_validation && msg_id.nil?
|
419
|
+
fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get"
|
420
|
+
end
|
421
|
+
if @api_client.config.client_side_validation && msg_id.to_s.length > 256
|
422
|
+
fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 256.'
|
423
|
+
end
|
424
|
+
|
425
|
+
if @api_client.config.client_side_validation && msg_id.to_s.length < 1
|
426
|
+
fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be great than or equal to 1.'
|
427
|
+
end
|
428
|
+
|
429
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
430
|
+
if @api_client.config.client_side_validation && msg_id !~ pattern
|
431
|
+
fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
|
432
|
+
end
|
433
|
+
|
434
|
+
if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'].to_s.length > 256
|
435
|
+
fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 256.'
|
436
|
+
end
|
437
|
+
|
438
|
+
if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'].to_s.length < 1
|
439
|
+
fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be great than or equal to 1.'
|
440
|
+
end
|
441
|
+
|
442
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
443
|
+
if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'] !~ pattern
|
444
|
+
fail ArgumentError, "invalid value for 'opts[:\"endpoint_id\"]' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
|
445
|
+
end
|
446
|
+
|
447
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
448
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must be smaller than or equal to 250.'
|
449
|
+
end
|
450
|
+
|
451
|
+
if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
|
452
|
+
fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 128.'
|
453
|
+
end
|
454
|
+
|
455
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
456
|
+
if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
|
457
|
+
fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
|
458
|
+
end
|
459
|
+
|
460
|
+
# resource path
|
461
|
+
local_var_path = '/api/v1/app/{app_id}/attempt/msg/{msg_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
|
462
|
+
|
463
|
+
# query parameters
|
464
|
+
query_params = opts[:query_params] || {}
|
465
|
+
query_params[:'endpoint_id'] = opts[:'endpoint_id'] if !opts[:'endpoint_id'].nil?
|
466
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
467
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
468
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
469
|
+
query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
470
|
+
query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
|
471
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
472
|
+
|
473
|
+
# header parameters
|
474
|
+
header_params = opts[:header_params] || {}
|
475
|
+
# HTTP header 'Accept' (if needed)
|
476
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
477
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
478
|
+
|
479
|
+
# form parameters
|
480
|
+
form_params = opts[:form_params] || {}
|
481
|
+
|
482
|
+
# http body (model)
|
483
|
+
post_body = opts[:debug_body]
|
484
|
+
|
485
|
+
# return_type
|
486
|
+
return_type = opts[:debug_return_type] || 'ListResponseMessageAttemptOut'
|
487
|
+
|
488
|
+
# auth_names
|
489
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
490
|
+
|
491
|
+
new_options = opts.merge(
|
492
|
+
:operation => :"MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get",
|
493
|
+
:header_params => header_params,
|
494
|
+
:query_params => query_params,
|
495
|
+
:form_params => form_params,
|
496
|
+
:body => post_body,
|
497
|
+
:auth_names => auth_names,
|
498
|
+
:return_type => return_type
|
499
|
+
)
|
500
|
+
|
501
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
502
|
+
if @api_client.config.debugging
|
503
|
+
@api_client.config.logger.debug "API called: MessageAttemptApi#list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
504
|
+
end
|
505
|
+
return data, status_code, headers
|
506
|
+
end
|
507
|
+
|
228
508
|
# List Attempted Messages
|
229
509
|
# List messages for a particular endpoint. Additionally includes metadata about the latest message attempt. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
|
230
510
|
# @param endpoint_id [String]
|
@@ -234,6 +514,7 @@ module Svix
|
|
234
514
|
# @option opts [Integer] :limit (default to 50)
|
235
515
|
# @option opts [MessageStatus] :status
|
236
516
|
# @option opts [Time] :before
|
517
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
237
518
|
# @return [ListResponseEndpointMessageOut]
|
238
519
|
def list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get(endpoint_id, app_id, opts = {})
|
239
520
|
data, _status_code, _headers = list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get_with_http_info(endpoint_id, app_id, opts)
|
@@ -249,6 +530,7 @@ module Svix
|
|
249
530
|
# @option opts [Integer] :limit
|
250
531
|
# @option opts [MessageStatus] :status
|
251
532
|
# @option opts [Time] :before
|
533
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
252
534
|
# @return [Array<(ListResponseEndpointMessageOut, Integer, Hash)>] ListResponseEndpointMessageOut data, response status code and response headers
|
253
535
|
def list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get_with_http_info(endpoint_id, app_id, opts = {})
|
254
536
|
if @api_client.config.debugging
|
@@ -306,6 +588,7 @@ module Svix
|
|
306
588
|
header_params = opts[:header_params] || {}
|
307
589
|
# HTTP header 'Accept' (if needed)
|
308
590
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
591
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
309
592
|
|
310
593
|
# form parameters
|
311
594
|
form_params = opts[:form_params] || {}
|
@@ -337,13 +620,18 @@ module Svix
|
|
337
620
|
end
|
338
621
|
|
339
622
|
# List Attempts
|
340
|
-
# `msg_id`: Use a message id or a message `eventId`
|
623
|
+
# Deprecated: Please use the /attempt/ api instead. `msg_id`: Use a message id or a message `eventId`
|
341
624
|
# @param app_id [String]
|
342
625
|
# @param msg_id [String]
|
343
626
|
# @param [Hash] opts the optional parameters
|
344
627
|
# @option opts [String] :iterator
|
345
628
|
# @option opts [Integer] :limit (default to 50)
|
629
|
+
# @option opts [String] :endpoint_id
|
630
|
+
# @option opts [Array<String>] :event_types
|
631
|
+
# @option opts [String] :channel
|
346
632
|
# @option opts [MessageStatus] :status
|
633
|
+
# @option opts [Time] :before
|
634
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
347
635
|
# @return [ListResponseMessageAttemptOut]
|
348
636
|
def list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get(app_id, msg_id, opts = {})
|
349
637
|
data, _status_code, _headers = list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get_with_http_info(app_id, msg_id, opts)
|
@@ -351,13 +639,18 @@ module Svix
|
|
351
639
|
end
|
352
640
|
|
353
641
|
# List Attempts
|
354
|
-
# `msg_id`: Use a message id or a message `eventId`
|
642
|
+
# Deprecated: Please use the /attempt/ api instead. `msg_id`: Use a message id or a message `eventId`
|
355
643
|
# @param app_id [String]
|
356
644
|
# @param msg_id [String]
|
357
645
|
# @param [Hash] opts the optional parameters
|
358
646
|
# @option opts [String] :iterator
|
359
647
|
# @option opts [Integer] :limit
|
648
|
+
# @option opts [String] :endpoint_id
|
649
|
+
# @option opts [Array<String>] :event_types
|
650
|
+
# @option opts [String] :channel
|
360
651
|
# @option opts [MessageStatus] :status
|
652
|
+
# @option opts [Time] :before
|
653
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
361
654
|
# @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
|
362
655
|
def list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get_with_http_info(app_id, msg_id, opts = {})
|
363
656
|
if @api_client.config.debugging
|
@@ -401,6 +694,28 @@ module Svix
|
|
401
694
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must be smaller than or equal to 250.'
|
402
695
|
end
|
403
696
|
|
697
|
+
if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'].to_s.length > 256
|
698
|
+
fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 256.'
|
699
|
+
end
|
700
|
+
|
701
|
+
if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'].to_s.length < 1
|
702
|
+
fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be great than or equal to 1.'
|
703
|
+
end
|
704
|
+
|
705
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
706
|
+
if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'] !~ pattern
|
707
|
+
fail ArgumentError, "invalid value for 'opts[:\"endpoint_id\"]' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
|
708
|
+
end
|
709
|
+
|
710
|
+
if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
|
711
|
+
fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 128.'
|
712
|
+
end
|
713
|
+
|
714
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
715
|
+
if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
|
716
|
+
fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
|
717
|
+
end
|
718
|
+
|
404
719
|
# resource path
|
405
720
|
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
|
406
721
|
|
@@ -408,12 +723,17 @@ module Svix
|
|
408
723
|
query_params = opts[:query_params] || {}
|
409
724
|
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
410
725
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
726
|
+
query_params[:'endpoint_id'] = opts[:'endpoint_id'] if !opts[:'endpoint_id'].nil?
|
727
|
+
query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
728
|
+
query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
|
411
729
|
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
730
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
412
731
|
|
413
732
|
# header parameters
|
414
733
|
header_params = opts[:header_params] || {}
|
415
734
|
# HTTP header 'Accept' (if needed)
|
416
735
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
736
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
417
737
|
|
418
738
|
# form parameters
|
419
739
|
form_params = opts[:form_params] || {}
|
@@ -445,7 +765,7 @@ module Svix
|
|
445
765
|
end
|
446
766
|
|
447
767
|
# List Attempts For Endpoint
|
448
|
-
# List the message attempts for a particular endpoint. Returning the endpoint. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
|
768
|
+
# DEPRECATED: please use list_attempts with endpoint_id as a query parameter instead. List the message attempts for a particular endpoint. Returning the endpoint. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
|
449
769
|
# @param msg_id [String]
|
450
770
|
# @param app_id [String]
|
451
771
|
# @param endpoint_id [String]
|
@@ -453,8 +773,10 @@ module Svix
|
|
453
773
|
# @option opts [String] :iterator
|
454
774
|
# @option opts [Integer] :limit (default to 50)
|
455
775
|
# @option opts [Array<String>] :event_types
|
776
|
+
# @option opts [String] :channel
|
456
777
|
# @option opts [MessageStatus] :status
|
457
778
|
# @option opts [Time] :before
|
779
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
458
780
|
# @return [ListResponseMessageAttemptEndpointOut]
|
459
781
|
def list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get(msg_id, app_id, endpoint_id, opts = {})
|
460
782
|
data, _status_code, _headers = list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get_with_http_info(msg_id, app_id, endpoint_id, opts)
|
@@ -462,7 +784,7 @@ module Svix
|
|
462
784
|
end
|
463
785
|
|
464
786
|
# List Attempts For Endpoint
|
465
|
-
# List the message attempts for a particular endpoint. Returning the endpoint. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
|
787
|
+
# DEPRECATED: please use list_attempts with endpoint_id as a query parameter instead. List the message attempts for a particular endpoint. Returning the endpoint. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
|
466
788
|
# @param msg_id [String]
|
467
789
|
# @param app_id [String]
|
468
790
|
# @param endpoint_id [String]
|
@@ -470,8 +792,10 @@ module Svix
|
|
470
792
|
# @option opts [String] :iterator
|
471
793
|
# @option opts [Integer] :limit
|
472
794
|
# @option opts [Array<String>] :event_types
|
795
|
+
# @option opts [String] :channel
|
473
796
|
# @option opts [MessageStatus] :status
|
474
797
|
# @option opts [Time] :before
|
798
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
475
799
|
# @return [Array<(ListResponseMessageAttemptEndpointOut, Integer, Hash)>] ListResponseMessageAttemptEndpointOut data, response status code and response headers
|
476
800
|
def list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get_with_http_info(msg_id, app_id, endpoint_id, opts = {})
|
477
801
|
if @api_client.config.debugging
|
@@ -532,6 +856,15 @@ module Svix
|
|
532
856
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get, must be smaller than or equal to 250.'
|
533
857
|
end
|
534
858
|
|
859
|
+
if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
|
860
|
+
fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get, the character length must be smaller than or equal to 128.'
|
861
|
+
end
|
862
|
+
|
863
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
864
|
+
if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
|
865
|
+
fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get, must conform to the pattern #{pattern}."
|
866
|
+
end
|
867
|
+
|
535
868
|
# resource path
|
536
869
|
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt/'.sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
537
870
|
|
@@ -540,6 +873,7 @@ module Svix
|
|
540
873
|
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
541
874
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
542
875
|
query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
876
|
+
query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
|
543
877
|
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
544
878
|
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
545
879
|
|
@@ -547,6 +881,7 @@ module Svix
|
|
547
881
|
header_params = opts[:header_params] || {}
|
548
882
|
# HTTP header 'Accept' (if needed)
|
549
883
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
884
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
550
885
|
|
551
886
|
# form parameters
|
552
887
|
form_params = opts[:form_params] || {}
|
@@ -583,6 +918,7 @@ module Svix
|
|
583
918
|
# @param msg_id [String]
|
584
919
|
# @param app_id [String]
|
585
920
|
# @param [Hash] opts the optional parameters
|
921
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
586
922
|
# @return [nil]
|
587
923
|
def resend_webhook_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_resend_post(endpoint_id, msg_id, app_id, opts = {})
|
588
924
|
resend_webhook_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_resend_post_with_http_info(endpoint_id, msg_id, app_id, opts)
|
@@ -595,6 +931,7 @@ module Svix
|
|
595
931
|
# @param msg_id [String]
|
596
932
|
# @param app_id [String]
|
597
933
|
# @param [Hash] opts the optional parameters
|
934
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
598
935
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
599
936
|
def resend_webhook_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_resend_post_with_http_info(endpoint_id, msg_id, app_id, opts = {})
|
600
937
|
if @api_client.config.debugging
|
@@ -661,6 +998,7 @@ module Svix
|
|
661
998
|
header_params = opts[:header_params] || {}
|
662
999
|
# HTTP header 'Accept' (if needed)
|
663
1000
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1001
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
664
1002
|
|
665
1003
|
# form parameters
|
666
1004
|
form_params = opts[:form_params] || {}
|