svix 1.15.0 → 1.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a606b32c5ca79a0d0ccb3b18d578ec53a1a1f55cf324b22861148fe71af8041c
4
- data.tar.gz: 7f31beb1b6ee11d0c9a76541a2997fb5e9b43dfae62f5e70e41d1e8f2ce12427
3
+ metadata.gz: af99d60754c708dc656f1b76db700927a11ddc7fc962d1487d9ceffea8aa7f16
4
+ data.tar.gz: 73740a06e1d1c076759fa5a27fae9da4602af40025a76eda69349e26f377cdfe
5
5
  SHA512:
6
- metadata.gz: 2a14e95930d3df9d4625f102acc46d41d010fbd60795a95a38d2e36438bb8c36eeaa56840bb3896bb506df177b795f75a91c83f7cab1d4154a9b34de354afb07
7
- data.tar.gz: 9798437a428c55b80863d9090f7db80091cd36ccf18a4c04159729b985c78ebad94ed3a3189eadd231d24db8906eeb09bbb6c7d22b79d8fdb5ea7f514fe4a7d4
6
+ metadata.gz: 320643c346d8dc0f495f53744785c2bc7abe1b71ea4d9a1ad2b5618602b027c417563c0cec2195e9e584330f3fd26796e2e63d776d169e92bb423520b9f077dd
7
+ data.tar.gz: cf7452898da4e5a34873e150a969aa7759804b736059a7a83774a1d3c8863cd8e707378b68a5272a123fba43b13c0660df8500033d9e1c518fe369cca490db38
data/Gemfile.lock CHANGED
@@ -1,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (1.15.0)
4
+ svix (1.16.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  diff-lcs (1.4.4)
11
- ethon (0.14.0)
11
+ ethon (0.16.0)
12
12
  ffi (>= 1.15.0)
13
- ffi (1.15.1)
13
+ ffi (1.16.3)
14
14
  rake (13.0.6)
15
15
  rspec (3.10.0)
16
16
  rspec-core (~> 3.10.0)
@@ -29,7 +29,7 @@ GEM
29
29
  ethon (>= 0.9.0)
30
30
 
31
31
  PLATFORMS
32
- ruby
32
+ x86_64-linux
33
33
 
34
34
  DEPENDENCIES
35
35
  bundler (>= 2.2.10)
@@ -38,4 +38,4 @@ DEPENDENCIES
38
38
  svix!
39
39
 
40
40
  BUNDLED WITH
41
- 2.2.33
41
+ 2.4.22
@@ -21,29 +21,23 @@ module Svix
21
21
  end
22
22
  # Export Environment Configuration
23
23
  # Download a JSON file containing all org-settings and event types
24
- # @param body [Object]
25
24
  # @param [Hash] opts the optional parameters
26
25
  # @option opts [String] :idempotency_key The request's idempotency key
27
26
  # @return [EnvironmentOut]
28
- def v1_environment_export(body, opts = {})
29
- data, _status_code, _headers = v1_environment_export_with_http_info(body, opts)
27
+ def v1_environment_export(opts = {})
28
+ data, _status_code, _headers = v1_environment_export_with_http_info(opts)
30
29
  data
31
30
  end
32
31
 
33
32
  # Export Environment Configuration
34
33
  # Download a JSON file containing all org-settings and event types
35
- # @param body [Object]
36
34
  # @param [Hash] opts the optional parameters
37
35
  # @option opts [String] :idempotency_key The request's idempotency key
38
36
  # @return [Array<(EnvironmentOut, Integer, Hash)>] EnvironmentOut data, response status code and response headers
39
- def v1_environment_export_with_http_info(body, opts = {})
37
+ def v1_environment_export_with_http_info(opts = {})
40
38
  if @api_client.config.debugging
41
39
  @api_client.config.logger.debug 'Calling API: EnvironmentApi.v1_environment_export ...'
42
40
  end
43
- # verify the required parameter 'body' is set
44
- if @api_client.config.client_side_validation && body.nil?
45
- fail ArgumentError, "Missing the required parameter 'body' when calling EnvironmentApi.v1_environment_export"
46
- end
47
41
  # resource path
48
42
  local_var_path = '/api/v1/environment/export/'
49
43
 
@@ -54,15 +48,13 @@ module Svix
54
48
  header_params = opts[:header_params] || {}
55
49
  # HTTP header 'Accept' (if needed)
56
50
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
- # HTTP header 'Content-Type'
58
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
59
51
  header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
60
52
 
61
53
  # form parameters
62
54
  form_params = opts[:form_params] || {}
63
55
 
64
56
  # http body (model)
65
- post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
57
+ post_body = opts[:debug_body]
66
58
 
67
59
  # return_type
68
60
  return_type = opts[:debug_return_type] || 'EnvironmentOut'
@@ -87,6 +79,63 @@ module Svix
87
79
  return data, status_code, headers
88
80
  end
89
81
 
82
+ # Export Environment Configuration
83
+ # Download a JSON file containing all org-settings and event types
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [EnvironmentOut]
86
+ def v1_environment_export_get(opts = {})
87
+ data, _status_code, _headers = v1_environment_export_get_with_http_info(opts)
88
+ data
89
+ end
90
+
91
+ # Export Environment Configuration
92
+ # Download a JSON file containing all org-settings and event types
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [Array<(EnvironmentOut, Integer, Hash)>] EnvironmentOut data, response status code and response headers
95
+ def v1_environment_export_get_with_http_info(opts = {})
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug 'Calling API: EnvironmentApi.v1_environment_export_get ...'
98
+ end
99
+ # resource path
100
+ local_var_path = '/api/v1/environment/export/'
101
+
102
+ # query parameters
103
+ query_params = opts[:query_params] || {}
104
+
105
+ # header parameters
106
+ header_params = opts[:header_params] || {}
107
+ # HTTP header 'Accept' (if needed)
108
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
109
+
110
+ # form parameters
111
+ form_params = opts[:form_params] || {}
112
+
113
+ # http body (model)
114
+ post_body = opts[:debug_body]
115
+
116
+ # return_type
117
+ return_type = opts[:debug_return_type] || 'EnvironmentOut'
118
+
119
+ # auth_names
120
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
121
+
122
+ new_options = opts.merge(
123
+ :operation => :"EnvironmentApi.v1_environment_export_get",
124
+ :header_params => header_params,
125
+ :query_params => query_params,
126
+ :form_params => form_params,
127
+ :body => post_body,
128
+ :auth_names => auth_names,
129
+ :return_type => return_type
130
+ )
131
+
132
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
133
+ if @api_client.config.debugging
134
+ @api_client.config.logger.debug "API called: EnvironmentApi#v1_environment_export_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
135
+ end
136
+ return data, status_code, headers
137
+ end
138
+
90
139
  # Import Environment Configuration
91
140
  # Import a configuration into the active organization. It doesn't delete anything, only adds/updates what was passed to it.
92
141
  # @param environment_in [EnvironmentIn]
@@ -362,6 +362,78 @@ module Svix
362
362
  return data, status_code, headers
363
363
  end
364
364
 
365
+ # Get Retry Schedule
366
+ # Gets the retry schedule for messages using the given event type
367
+ # @param event_type_name [String] The event type&#39;s name
368
+ # @param [Hash] opts the optional parameters
369
+ # @return [RetryScheduleInOut]
370
+ def v1_event_type_get_retry_schedule(event_type_name, opts = {})
371
+ data, _status_code, _headers = v1_event_type_get_retry_schedule_with_http_info(event_type_name, opts)
372
+ data
373
+ end
374
+
375
+ # Get Retry Schedule
376
+ # Gets the retry schedule for messages using the given event type
377
+ # @param event_type_name [String] The event type&#39;s name
378
+ # @param [Hash] opts the optional parameters
379
+ # @return [Array<(RetryScheduleInOut, Integer, Hash)>] RetryScheduleInOut data, response status code and response headers
380
+ def v1_event_type_get_retry_schedule_with_http_info(event_type_name, opts = {})
381
+ if @api_client.config.debugging
382
+ @api_client.config.logger.debug 'Calling API: EventTypeApi.v1_event_type_get_retry_schedule ...'
383
+ end
384
+ # verify the required parameter 'event_type_name' is set
385
+ if @api_client.config.client_side_validation && event_type_name.nil?
386
+ fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.v1_event_type_get_retry_schedule"
387
+ end
388
+ if @api_client.config.client_side_validation && event_type_name.to_s.length > 256
389
+ fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.v1_event_type_get_retry_schedule, the character length must be smaller than or equal to 256.'
390
+ end
391
+
392
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
393
+ if @api_client.config.client_side_validation && event_type_name !~ pattern
394
+ fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.v1_event_type_get_retry_schedule, must conform to the pattern #{pattern}."
395
+ end
396
+
397
+ # resource path
398
+ local_var_path = '/api/v1/event-type/{event_type_name}/retry-schedule/'.sub('{' + 'event_type_name' + '}', CGI.escape(event_type_name.to_s))
399
+
400
+ # query parameters
401
+ query_params = opts[:query_params] || {}
402
+
403
+ # header parameters
404
+ header_params = opts[:header_params] || {}
405
+ # HTTP header 'Accept' (if needed)
406
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
407
+
408
+ # form parameters
409
+ form_params = opts[:form_params] || {}
410
+
411
+ # http body (model)
412
+ post_body = opts[:debug_body]
413
+
414
+ # return_type
415
+ return_type = opts[:debug_return_type] || 'RetryScheduleInOut'
416
+
417
+ # auth_names
418
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
419
+
420
+ new_options = opts.merge(
421
+ :operation => :"EventTypeApi.v1_event_type_get_retry_schedule",
422
+ :header_params => header_params,
423
+ :query_params => query_params,
424
+ :form_params => form_params,
425
+ :body => post_body,
426
+ :auth_names => auth_names,
427
+ :return_type => return_type
428
+ )
429
+
430
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
431
+ if @api_client.config.debugging
432
+ @api_client.config.logger.debug "API called: EventTypeApi#v1_event_type_get_retry_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
433
+ end
434
+ return data, status_code, headers
435
+ end
436
+
365
437
  # Event Type Import From Openapi
366
438
  # Given an OpenAPI spec, create new or update existing event types. If an existing `archived` event type is updated, it will be unarchvied. The importer will convert all webhooks found in the either the `webhooks` or `x-webhooks` top-level.
367
439
  # @param event_type_import_open_api_in [EventTypeImportOpenApiIn] Import a list of event types from webhooks defined in an OpenAPI spec. The OpenAPI spec can be specified as either &#x60;spec&#x60; given the spec as a JSON object, or as &#x60;specRaw&#x60; (a &#x60;string&#x60;) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a &#x60;400&#x60; **Bad Request**.
@@ -678,5 +750,85 @@ module Svix
678
750
  end
679
751
  return data, status_code, headers
680
752
  end
753
+
754
+ # Update Retry Schedule
755
+ # Sets a retry schedule for all messages using the given event type
756
+ # @param event_type_name [String] The event type&#39;s name
757
+ # @param retry_schedule_in_out [RetryScheduleInOut]
758
+ # @param [Hash] opts the optional parameters
759
+ # @return [RetryScheduleInOut]
760
+ def v1_event_type_update_retry_schedule(event_type_name, retry_schedule_in_out, opts = {})
761
+ data, _status_code, _headers = v1_event_type_update_retry_schedule_with_http_info(event_type_name, retry_schedule_in_out, opts)
762
+ data
763
+ end
764
+
765
+ # Update Retry Schedule
766
+ # Sets a retry schedule for all messages using the given event type
767
+ # @param event_type_name [String] The event type&#39;s name
768
+ # @param retry_schedule_in_out [RetryScheduleInOut]
769
+ # @param [Hash] opts the optional parameters
770
+ # @return [Array<(RetryScheduleInOut, Integer, Hash)>] RetryScheduleInOut data, response status code and response headers
771
+ def v1_event_type_update_retry_schedule_with_http_info(event_type_name, retry_schedule_in_out, opts = {})
772
+ if @api_client.config.debugging
773
+ @api_client.config.logger.debug 'Calling API: EventTypeApi.v1_event_type_update_retry_schedule ...'
774
+ end
775
+ # verify the required parameter 'event_type_name' is set
776
+ if @api_client.config.client_side_validation && event_type_name.nil?
777
+ fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.v1_event_type_update_retry_schedule"
778
+ end
779
+ if @api_client.config.client_side_validation && event_type_name.to_s.length > 256
780
+ fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.v1_event_type_update_retry_schedule, the character length must be smaller than or equal to 256.'
781
+ end
782
+
783
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
784
+ if @api_client.config.client_side_validation && event_type_name !~ pattern
785
+ fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.v1_event_type_update_retry_schedule, must conform to the pattern #{pattern}."
786
+ end
787
+
788
+ # verify the required parameter 'retry_schedule_in_out' is set
789
+ if @api_client.config.client_side_validation && retry_schedule_in_out.nil?
790
+ fail ArgumentError, "Missing the required parameter 'retry_schedule_in_out' when calling EventTypeApi.v1_event_type_update_retry_schedule"
791
+ end
792
+ # resource path
793
+ local_var_path = '/api/v1/event-type/{event_type_name}/retry-schedule/'.sub('{' + 'event_type_name' + '}', CGI.escape(event_type_name.to_s))
794
+
795
+ # query parameters
796
+ query_params = opts[:query_params] || {}
797
+
798
+ # header parameters
799
+ header_params = opts[:header_params] || {}
800
+ # HTTP header 'Accept' (if needed)
801
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
802
+ # HTTP header 'Content-Type'
803
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
804
+
805
+ # form parameters
806
+ form_params = opts[:form_params] || {}
807
+
808
+ # http body (model)
809
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(retry_schedule_in_out)
810
+
811
+ # return_type
812
+ return_type = opts[:debug_return_type] || 'RetryScheduleInOut'
813
+
814
+ # auth_names
815
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
816
+
817
+ new_options = opts.merge(
818
+ :operation => :"EventTypeApi.v1_event_type_update_retry_schedule",
819
+ :header_params => header_params,
820
+ :query_params => query_params,
821
+ :form_params => form_params,
822
+ :body => post_body,
823
+ :auth_names => auth_names,
824
+ :return_type => return_type
825
+ )
826
+
827
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
828
+ if @api_client.config.debugging
829
+ @api_client.config.logger.debug "API called: EventTypeApi#v1_event_type_update_retry_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
830
+ end
831
+ return data, status_code, headers
832
+ end
681
833
  end
682
834
  end
@@ -0,0 +1,206 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.1.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Svix
16
+ class InboundApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Handle Inbound
23
+ # Handles a raw inbound webhook for the application.
24
+ # @param app_id [String] The app&#39;s ID or UID
25
+ # @param inbound_token [String]
26
+ # @param body [String]
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :event_type The event type&#39;s name
29
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
30
+ # @return [MessageOut]
31
+ def v1_inbound_msg(app_id, inbound_token, body, opts = {})
32
+ data, _status_code, _headers = v1_inbound_msg_with_http_info(app_id, inbound_token, body, opts)
33
+ data
34
+ end
35
+
36
+ # Handle Inbound
37
+ # Handles a raw inbound webhook for the application.
38
+ # @param app_id [String] The app&#39;s ID or UID
39
+ # @param inbound_token [String]
40
+ # @param body [String]
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [String] :event_type The event type&#39;s name
43
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
44
+ # @return [Array<(MessageOut, Integer, Hash)>] MessageOut data, response status code and response headers
45
+ def v1_inbound_msg_with_http_info(app_id, inbound_token, body, opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug 'Calling API: InboundApi.v1_inbound_msg ...'
48
+ end
49
+ # verify the required parameter 'app_id' is set
50
+ if @api_client.config.client_side_validation && app_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling InboundApi.v1_inbound_msg"
52
+ end
53
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
54
+ fail ArgumentError, 'invalid value for "app_id" when calling InboundApi.v1_inbound_msg, the character length must be smaller than or equal to 256.'
55
+ end
56
+
57
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
58
+ fail ArgumentError, 'invalid value for "app_id" when calling InboundApi.v1_inbound_msg, the character length must be great than or equal to 1.'
59
+ end
60
+
61
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
62
+ if @api_client.config.client_side_validation && app_id !~ pattern
63
+ fail ArgumentError, "invalid value for 'app_id' when calling InboundApi.v1_inbound_msg, must conform to the pattern #{pattern}."
64
+ end
65
+
66
+ # verify the required parameter 'inbound_token' is set
67
+ if @api_client.config.client_side_validation && inbound_token.nil?
68
+ fail ArgumentError, "Missing the required parameter 'inbound_token' when calling InboundApi.v1_inbound_msg"
69
+ end
70
+ # verify the required parameter 'body' is set
71
+ if @api_client.config.client_side_validation && body.nil?
72
+ fail ArgumentError, "Missing the required parameter 'body' when calling InboundApi.v1_inbound_msg"
73
+ end
74
+ if @api_client.config.client_side_validation && !opts[:'event_type'].nil? && opts[:'event_type'].to_s.length > 256
75
+ fail ArgumentError, 'invalid value for "opts[:"event_type"]" when calling InboundApi.v1_inbound_msg, the character length must be smaller than or equal to 256.'
76
+ end
77
+
78
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
79
+ if @api_client.config.client_side_validation && !opts[:'event_type'].nil? && opts[:'event_type'] !~ pattern
80
+ fail ArgumentError, "invalid value for 'opts[:\"event_type\"]' when calling InboundApi.v1_inbound_msg, must conform to the pattern #{pattern}."
81
+ end
82
+
83
+ # resource path
84
+ local_var_path = '/api/v1/app/{app_id}/inbound/msg/{inbound_token}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'inbound_token' + '}', CGI.escape(inbound_token.to_s))
85
+
86
+ # query parameters
87
+ query_params = opts[:query_params] || {}
88
+ query_params[:'event_type'] = opts[:'event_type'] if !opts[:'event_type'].nil?
89
+
90
+ # header parameters
91
+ header_params = opts[:header_params] || {}
92
+ # HTTP header 'Accept' (if needed)
93
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
94
+ # HTTP header 'Content-Type'
95
+ header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain; charset=utf-8'])
96
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
97
+
98
+ # form parameters
99
+ form_params = opts[:form_params] || {}
100
+
101
+ # http body (model)
102
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
103
+
104
+ # return_type
105
+ return_type = opts[:debug_return_type] || 'MessageOut'
106
+
107
+ # auth_names
108
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
109
+
110
+ new_options = opts.merge(
111
+ :operation => :"InboundApi.v1_inbound_msg",
112
+ :header_params => header_params,
113
+ :query_params => query_params,
114
+ :form_params => form_params,
115
+ :body => post_body,
116
+ :auth_names => auth_names,
117
+ :return_type => return_type
118
+ )
119
+
120
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
121
+ if @api_client.config.debugging
122
+ @api_client.config.logger.debug "API called: InboundApi#v1_inbound_msg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
123
+ end
124
+ return data, status_code, headers
125
+ end
126
+
127
+ # Rotate Url
128
+ # Invalidates the previous inbound url (if one exists), producing a new inbound URL for this app
129
+ # @param app_id [String] The app&#39;s ID or UID
130
+ # @param [Hash] opts the optional parameters
131
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
132
+ # @return [RotatedUrlOut]
133
+ def v1_inbound_rotate_url(app_id, opts = {})
134
+ data, _status_code, _headers = v1_inbound_rotate_url_with_http_info(app_id, opts)
135
+ data
136
+ end
137
+
138
+ # Rotate Url
139
+ # Invalidates the previous inbound url (if one exists), producing a new inbound URL for this app
140
+ # @param app_id [String] The app&#39;s ID or UID
141
+ # @param [Hash] opts the optional parameters
142
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
143
+ # @return [Array<(RotatedUrlOut, Integer, Hash)>] RotatedUrlOut data, response status code and response headers
144
+ def v1_inbound_rotate_url_with_http_info(app_id, opts = {})
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug 'Calling API: InboundApi.v1_inbound_rotate_url ...'
147
+ end
148
+ # verify the required parameter 'app_id' is set
149
+ if @api_client.config.client_side_validation && app_id.nil?
150
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling InboundApi.v1_inbound_rotate_url"
151
+ end
152
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
153
+ fail ArgumentError, 'invalid value for "app_id" when calling InboundApi.v1_inbound_rotate_url, the character length must be smaller than or equal to 256.'
154
+ end
155
+
156
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
157
+ fail ArgumentError, 'invalid value for "app_id" when calling InboundApi.v1_inbound_rotate_url, the character length must be great than or equal to 1.'
158
+ end
159
+
160
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
161
+ if @api_client.config.client_side_validation && app_id !~ pattern
162
+ fail ArgumentError, "invalid value for 'app_id' when calling InboundApi.v1_inbound_rotate_url, must conform to the pattern #{pattern}."
163
+ end
164
+
165
+ # resource path
166
+ local_var_path = '/api/v1/app/{app_id}/inbound/rotate-url/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
167
+
168
+ # query parameters
169
+ query_params = opts[:query_params] || {}
170
+
171
+ # header parameters
172
+ header_params = opts[:header_params] || {}
173
+ # HTTP header 'Accept' (if needed)
174
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
175
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
176
+
177
+ # form parameters
178
+ form_params = opts[:form_params] || {}
179
+
180
+ # http body (model)
181
+ post_body = opts[:debug_body]
182
+
183
+ # return_type
184
+ return_type = opts[:debug_return_type] || 'RotatedUrlOut'
185
+
186
+ # auth_names
187
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
188
+
189
+ new_options = opts.merge(
190
+ :operation => :"InboundApi.v1_inbound_rotate_url",
191
+ :header_params => header_params,
192
+ :query_params => query_params,
193
+ :form_params => form_params,
194
+ :body => post_body,
195
+ :auth_names => auth_names,
196
+ :return_type => return_type
197
+ )
198
+
199
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug "API called: InboundApi#v1_inbound_rotate_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
202
+ end
203
+ return data, status_code, headers
204
+ end
205
+ end
206
+ end
@@ -628,5 +628,101 @@ module Svix
628
628
  end
629
629
  return data, status_code, headers
630
630
  end
631
+
632
+ # Stream Events
633
+ # Reads the stream of created messages for an application
634
+ # @param app_id [String] The app&#39;s ID or UID
635
+ # @param [Hash] opts the optional parameters
636
+ # @option opts [Integer] :limit Limit the number of returned items
637
+ # @option opts [String] :iterator The iterator returned from a prior invocation
638
+ # @option opts [Array<String>] :event_types Filter response based on the event type
639
+ # @option opts [Array<String>] :channels Filter response based on the event type
640
+ # @return [MessageStreamOut]
641
+ def v1_message_stream(app_id, opts = {})
642
+ data, _status_code, _headers = v1_message_stream_with_http_info(app_id, opts)
643
+ data
644
+ end
645
+
646
+ # Stream Events
647
+ # Reads the stream of created messages for an application
648
+ # @param app_id [String] The app&#39;s ID or UID
649
+ # @param [Hash] opts the optional parameters
650
+ # @option opts [Integer] :limit Limit the number of returned items
651
+ # @option opts [String] :iterator The iterator returned from a prior invocation
652
+ # @option opts [Array<String>] :event_types Filter response based on the event type
653
+ # @option opts [Array<String>] :channels Filter response based on the event type
654
+ # @return [Array<(MessageStreamOut, Integer, Hash)>] MessageStreamOut data, response status code and response headers
655
+ def v1_message_stream_with_http_info(app_id, opts = {})
656
+ if @api_client.config.debugging
657
+ @api_client.config.logger.debug 'Calling API: MessageApi.v1_message_stream ...'
658
+ end
659
+ # verify the required parameter 'app_id' is set
660
+ if @api_client.config.client_side_validation && app_id.nil?
661
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageApi.v1_message_stream"
662
+ end
663
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
664
+ fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_message_stream, the character length must be smaller than or equal to 256.'
665
+ end
666
+
667
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
668
+ fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_message_stream, the character length must be great than or equal to 1.'
669
+ end
670
+
671
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
672
+ if @api_client.config.client_side_validation && app_id !~ pattern
673
+ fail ArgumentError, "invalid value for 'app_id' when calling MessageApi.v1_message_stream, must conform to the pattern #{pattern}."
674
+ end
675
+
676
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
677
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.v1_message_stream, must be smaller than or equal to 250.'
678
+ end
679
+
680
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
681
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.v1_message_stream, must be greater than or equal to 1.'
682
+ end
683
+
684
+ # resource path
685
+ local_var_path = '/api/v1/app/{app_id}/events/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
686
+
687
+ # query parameters
688
+ query_params = opts[:query_params] || {}
689
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
690
+ query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
691
+ query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
692
+ query_params[:'channels'] = @api_client.build_collection_param(opts[:'channels'], :multi) if !opts[:'channels'].nil?
693
+
694
+ # header parameters
695
+ header_params = opts[:header_params] || {}
696
+ # HTTP header 'Accept' (if needed)
697
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
698
+
699
+ # form parameters
700
+ form_params = opts[:form_params] || {}
701
+
702
+ # http body (model)
703
+ post_body = opts[:debug_body]
704
+
705
+ # return_type
706
+ return_type = opts[:debug_return_type] || 'MessageStreamOut'
707
+
708
+ # auth_names
709
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
710
+
711
+ new_options = opts.merge(
712
+ :operation => :"MessageApi.v1_message_stream",
713
+ :header_params => header_params,
714
+ :query_params => query_params,
715
+ :form_params => form_params,
716
+ :body => post_body,
717
+ :auth_names => auth_names,
718
+ :return_type => return_type
719
+ )
720
+
721
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
722
+ if @api_client.config.debugging
723
+ @api_client.config.logger.debug "API called: MessageApi#v1_message_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
724
+ end
725
+ return data, status_code, headers
726
+ end
631
727
  end
632
728
  end
@@ -580,7 +580,7 @@ module Svix
580
580
  # @option opts [Time] :before Only include items created before a certain date
581
581
  # @option opts [Time] :after Only include items created after a certain date
582
582
  # @option opts [Boolean] :with_content When &#x60;true&#x60; attempt content is included in the response (default to true)
583
- # @option opts [Boolean] :with_msg (default to false)
583
+ # @option opts [Boolean] :with_msg When &#x60;true&#x60;, the message information is included in the response (default to false)
584
584
  # @option opts [Array<String>] :event_types Filter response based on the event type
585
585
  # @return [ListResponseMessageAttemptOut]
586
586
  def v1_message_attempt_list_by_endpoint(app_id, endpoint_id, opts = {})
@@ -601,7 +601,7 @@ module Svix
601
601
  # @option opts [Time] :before Only include items created before a certain date
602
602
  # @option opts [Time] :after Only include items created after a certain date
603
603
  # @option opts [Boolean] :with_content When &#x60;true&#x60; attempt content is included in the response
604
- # @option opts [Boolean] :with_msg
604
+ # @option opts [Boolean] :with_msg When &#x60;true&#x60;, the message information is included in the response
605
605
  # @option opts [Array<String>] :event_types Filter response based on the event type
606
606
  # @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
607
607
  def v1_message_attempt_list_by_endpoint_with_http_info(app_id, endpoint_id, opts = {})