svix 0.83.1 → 0.84.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/application_api.rb +247 -181
  4. data/lib/svix/api/authentication_api.rb +82 -150
  5. data/lib/svix/api/background_tasks_api.rb +161 -0
  6. data/lib/svix/api/endpoint_api.rb +561 -485
  7. data/lib/svix/api/environment_api.rb +16 -16
  8. data/lib/svix/api/environment_settings_api.rb +7 -10
  9. data/lib/svix/api/event_type_api.rb +152 -81
  10. data/lib/svix/api/health_api.rb +6 -9
  11. data/lib/svix/api/integration_api.rb +123 -134
  12. data/lib/svix/api/message_api.rb +96 -102
  13. data/lib/svix/api/message_attempt_api.rb +382 -406
  14. data/lib/svix/api/statistics_api.rb +107 -45
  15. data/lib/svix/api_client.rb +0 -1
  16. data/lib/svix/application_api.rb +22 -22
  17. data/lib/svix/authentication_api.rb +3 -3
  18. data/lib/svix/configuration.rb +0 -7
  19. data/lib/svix/endpoint_api.rb +16 -16
  20. data/lib/svix/event_type_api.rb +19 -19
  21. data/lib/svix/integration_api.rb +26 -26
  22. data/lib/svix/message_api.rb +4 -4
  23. data/lib/svix/message_attempt_api.rb +8 -8
  24. data/lib/svix/models/app_portal_access_in.rb +1 -0
  25. data/lib/svix/models/application_in.rb +34 -1
  26. data/lib/svix/models/application_out.rb +20 -2
  27. data/lib/svix/models/application_patch.rb +299 -0
  28. data/lib/svix/models/application_stats.rb +0 -1
  29. data/lib/svix/models/{webhook_types.rb → background_task_out.rb} +40 -69
  30. data/lib/svix/models/background_task_out_common.rb +251 -0
  31. data/lib/svix/models/background_task_status.rb +38 -0
  32. data/lib/svix/models/background_task_type.rb +38 -0
  33. data/lib/svix/models/calculate_app_stats_in.rb +255 -0
  34. data/lib/svix/models/endpoint_created_event.rb +5 -0
  35. data/lib/svix/models/endpoint_created_event_data.rb +0 -2
  36. data/lib/svix/models/endpoint_deleted_event.rb +5 -0
  37. data/lib/svix/models/endpoint_deleted_event_data.rb +0 -2
  38. data/lib/svix/models/endpoint_disabled_event.rb +5 -0
  39. data/lib/svix/models/endpoint_disabled_event_data.rb +1 -2
  40. data/lib/svix/models/endpoint_in.rb +19 -10
  41. data/lib/svix/models/endpoint_message_out.rb +1 -0
  42. data/lib/svix/models/endpoint_out.rb +33 -15
  43. data/lib/svix/models/endpoint_patch.rb +405 -0
  44. data/lib/svix/models/endpoint_secret_rotate_in.rb +2 -0
  45. data/lib/svix/models/endpoint_transformation_in.rb +0 -2
  46. data/lib/svix/models/endpoint_transformation_simulate_in.rb +6 -0
  47. data/lib/svix/models/endpoint_update.rb +19 -10
  48. data/lib/svix/models/endpoint_updated_event.rb +5 -0
  49. data/lib/svix/models/endpoint_updated_event_data.rb +0 -2
  50. data/lib/svix/models/event_type_example_out.rb +4 -2
  51. data/lib/svix/models/event_type_patch.rb +275 -0
  52. data/lib/svix/models/event_type_schema_in.rb +0 -1
  53. data/lib/svix/models/http_validation_error.rb +5 -0
  54. data/lib/svix/models/list_response_application_stats.rb +15 -5
  55. data/lib/svix/models/list_response_background_task_out.rb +259 -0
  56. data/lib/svix/models/list_response_integration_out.rb +15 -5
  57. data/lib/svix/models/list_response_message_endpoint_out.rb +15 -5
  58. data/lib/svix/models/message_attempt_exhausted_event.rb +5 -0
  59. data/lib/svix/models/message_attempt_exhausted_event_data.rb +1 -2
  60. data/lib/svix/models/message_attempt_failing_event.rb +5 -0
  61. data/lib/svix/models/message_attempt_failing_event_data.rb +1 -2
  62. data/lib/svix/models/message_attempt_headers_out.rb +27 -1
  63. data/lib/svix/models/message_endpoint_out.rb +45 -29
  64. data/lib/svix/models/message_in.rb +0 -1
  65. data/lib/svix/models/{one_time_token_out.rb → recover_out.rb} +41 -13
  66. data/lib/svix/models/{one_time_token_in.rb → replay_out.rb} +41 -13
  67. data/lib/svix/models/transformation_http_method.rb +1 -1
  68. data/lib/svix/models/validation_error.rb +4 -0
  69. data/lib/svix/version.rb +1 -1
  70. metadata +14 -5
@@ -19,16 +19,83 @@ module Svix
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Calculate Aggregate App Stats
23
+ # Creates a background task to calculate the message destinations for all applications in the environment.
24
+ # @param calculate_app_stats_in [CalculateAppStatsIn]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :idempotency_key The request's idempotency key
27
+ # @return [BackgroundTaskOutCommon]
28
+ def calculate_aggregate_app_stats(calculate_app_stats_in, opts = {})
29
+ data, _status_code, _headers = calculate_aggregate_app_stats_with_http_info(calculate_app_stats_in, opts)
30
+ data
31
+ end
32
+
33
+ # Calculate Aggregate App Stats
34
+ # Creates a background task to calculate the message destinations for all applications in the environment.
35
+ # @param calculate_app_stats_in [CalculateAppStatsIn]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :idempotency_key The request's idempotency key
38
+ # @return [Array<(BackgroundTaskOutCommon, Integer, Hash)>] BackgroundTaskOutCommon data, response status code and response headers
39
+ def calculate_aggregate_app_stats_with_http_info(calculate_app_stats_in, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: StatisticsApi.calculate_aggregate_app_stats ...'
42
+ end
43
+ # verify the required parameter 'calculate_app_stats_in' is set
44
+ if @api_client.config.client_side_validation && calculate_app_stats_in.nil?
45
+ fail ArgumentError, "Missing the required parameter 'calculate_app_stats_in' when calling StatisticsApi.calculate_aggregate_app_stats"
46
+ end
47
+ # resource path
48
+ local_var_path = '/api/v1/stats/usage/app/'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ 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
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(calculate_app_stats_in)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'BackgroundTaskOutCommon'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || []
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"StatisticsApi.calculate_aggregate_app_stats",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: StatisticsApi#calculate_aggregate_app_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
22
90
  # Get App Attempt Stats
23
91
  # Returns application-level statistics on message attempts
24
92
  # @param app_id [String]
25
93
  # @param [Hash] opts the optional parameters
26
94
  # @option opts [Time] :start_date
27
95
  # @option opts [Time] :end_date
28
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
29
96
  # @return [AttemptStatisticsResponse]
30
- def get_app_attempt_stats_api_v1_stats_app_app_id_attempt_get(app_id, opts = {})
31
- data, _status_code, _headers = get_app_attempt_stats_api_v1_stats_app_app_id_attempt_get_with_http_info(app_id, opts)
97
+ def v1_stats_app_attempts(app_id, opts = {})
98
+ data, _status_code, _headers = v1_stats_app_attempts_with_http_info(app_id, opts)
32
99
  data
33
100
  end
34
101
 
@@ -38,27 +105,26 @@ module Svix
38
105
  # @param [Hash] opts the optional parameters
39
106
  # @option opts [Time] :start_date
40
107
  # @option opts [Time] :end_date
41
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
42
108
  # @return [Array<(AttemptStatisticsResponse, Integer, Hash)>] AttemptStatisticsResponse data, response status code and response headers
43
- def get_app_attempt_stats_api_v1_stats_app_app_id_attempt_get_with_http_info(app_id, opts = {})
109
+ def v1_stats_app_attempts_with_http_info(app_id, opts = {})
44
110
  if @api_client.config.debugging
45
- @api_client.config.logger.debug 'Calling API: StatisticsApi.get_app_attempt_stats_api_v1_stats_app_app_id_attempt_get ...'
111
+ @api_client.config.logger.debug 'Calling API: StatisticsApi.v1_stats_app_attempts ...'
46
112
  end
47
113
  # verify the required parameter 'app_id' is set
48
114
  if @api_client.config.client_side_validation && app_id.nil?
49
- fail ArgumentError, "Missing the required parameter 'app_id' when calling StatisticsApi.get_app_attempt_stats_api_v1_stats_app_app_id_attempt_get"
115
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling StatisticsApi.v1_stats_app_attempts"
50
116
  end
51
117
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
52
- fail ArgumentError, 'invalid value for "app_id" when calling StatisticsApi.get_app_attempt_stats_api_v1_stats_app_app_id_attempt_get, the character length must be smaller than or equal to 256.'
118
+ fail ArgumentError, 'invalid value for "app_id" when calling StatisticsApi.v1_stats_app_attempts, the character length must be smaller than or equal to 256.'
53
119
  end
54
120
 
55
121
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
56
- fail ArgumentError, 'invalid value for "app_id" when calling StatisticsApi.get_app_attempt_stats_api_v1_stats_app_app_id_attempt_get, the character length must be great than or equal to 1.'
122
+ fail ArgumentError, 'invalid value for "app_id" when calling StatisticsApi.v1_stats_app_attempts, the character length must be great than or equal to 1.'
57
123
  end
58
124
 
59
125
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
60
126
  if @api_client.config.client_side_validation && app_id !~ pattern
61
- fail ArgumentError, "invalid value for 'app_id' when calling StatisticsApi.get_app_attempt_stats_api_v1_stats_app_app_id_attempt_get, must conform to the pattern #{pattern}."
127
+ fail ArgumentError, "invalid value for 'app_id' when calling StatisticsApi.v1_stats_app_attempts, must conform to the pattern #{pattern}."
62
128
  end
63
129
 
64
130
  # resource path
@@ -73,7 +139,6 @@ module Svix
73
139
  header_params = opts[:header_params] || {}
74
140
  # HTTP header 'Accept' (if needed)
75
141
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
76
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
77
142
 
78
143
  # form parameters
79
144
  form_params = opts[:form_params] || {}
@@ -85,10 +150,10 @@ module Svix
85
150
  return_type = opts[:debug_return_type] || 'AttemptStatisticsResponse'
86
151
 
87
152
  # auth_names
88
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
153
+ auth_names = opts[:debug_auth_names] || []
89
154
 
90
155
  new_options = opts.merge(
91
- :operation => :"StatisticsApi.get_app_attempt_stats_api_v1_stats_app_app_id_attempt_get",
156
+ :operation => :"StatisticsApi.v1_stats_app_attempts",
92
157
  :header_params => header_params,
93
158
  :query_params => query_params,
94
159
  :form_params => form_params,
@@ -99,74 +164,72 @@ module Svix
99
164
 
100
165
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
101
166
  if @api_client.config.debugging
102
- @api_client.config.logger.debug "API called: StatisticsApi#get_app_attempt_stats_api_v1_stats_app_app_id_attempt_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
167
+ @api_client.config.logger.debug "API called: StatisticsApi#v1_stats_app_attempts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
103
168
  end
104
169
  return data, status_code, headers
105
170
  end
106
171
 
107
172
  # Get Ep Stats
108
173
  # Returns endpoint-level statistics on message attempts
109
- # @param endpoint_id [String]
110
174
  # @param app_id [String]
175
+ # @param endpoint_id [String]
111
176
  # @param [Hash] opts the optional parameters
112
177
  # @option opts [Time] :start_date
113
178
  # @option opts [Time] :end_date
114
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
115
179
  # @return [AttemptStatisticsResponse]
116
- def get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get(endpoint_id, app_id, opts = {})
117
- data, _status_code, _headers = get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get_with_http_info(endpoint_id, app_id, opts)
180
+ def v1_stats_endpoint_attempts(app_id, endpoint_id, opts = {})
181
+ data, _status_code, _headers = v1_stats_endpoint_attempts_with_http_info(app_id, endpoint_id, opts)
118
182
  data
119
183
  end
120
184
 
121
185
  # Get Ep Stats
122
186
  # Returns endpoint-level statistics on message attempts
123
- # @param endpoint_id [String]
124
187
  # @param app_id [String]
188
+ # @param endpoint_id [String]
125
189
  # @param [Hash] opts the optional parameters
126
190
  # @option opts [Time] :start_date
127
191
  # @option opts [Time] :end_date
128
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
129
192
  # @return [Array<(AttemptStatisticsResponse, Integer, Hash)>] AttemptStatisticsResponse data, response status code and response headers
130
- def get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get_with_http_info(endpoint_id, app_id, opts = {})
193
+ def v1_stats_endpoint_attempts_with_http_info(app_id, endpoint_id, opts = {})
131
194
  if @api_client.config.debugging
132
- @api_client.config.logger.debug 'Calling API: StatisticsApi.get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get ...'
195
+ @api_client.config.logger.debug 'Calling API: StatisticsApi.v1_stats_endpoint_attempts ...'
133
196
  end
134
- # verify the required parameter 'endpoint_id' is set
135
- if @api_client.config.client_side_validation && endpoint_id.nil?
136
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling StatisticsApi.get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get"
197
+ # verify the required parameter 'app_id' is set
198
+ if @api_client.config.client_side_validation && app_id.nil?
199
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling StatisticsApi.v1_stats_endpoint_attempts"
137
200
  end
138
- if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
139
- fail ArgumentError, 'invalid value for "endpoint_id" when calling StatisticsApi.get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get, the character length must be smaller than or equal to 256.'
201
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
202
+ fail ArgumentError, 'invalid value for "app_id" when calling StatisticsApi.v1_stats_endpoint_attempts, the character length must be smaller than or equal to 256.'
140
203
  end
141
204
 
142
- if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
143
- fail ArgumentError, 'invalid value for "endpoint_id" when calling StatisticsApi.get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get, the character length must be great than or equal to 1.'
205
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
206
+ fail ArgumentError, 'invalid value for "app_id" when calling StatisticsApi.v1_stats_endpoint_attempts, the character length must be great than or equal to 1.'
144
207
  end
145
208
 
146
209
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
147
- if @api_client.config.client_side_validation && endpoint_id !~ pattern
148
- fail ArgumentError, "invalid value for 'endpoint_id' when calling StatisticsApi.get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get, must conform to the pattern #{pattern}."
210
+ if @api_client.config.client_side_validation && app_id !~ pattern
211
+ fail ArgumentError, "invalid value for 'app_id' when calling StatisticsApi.v1_stats_endpoint_attempts, must conform to the pattern #{pattern}."
149
212
  end
150
213
 
151
- # verify the required parameter 'app_id' is set
152
- if @api_client.config.client_side_validation && app_id.nil?
153
- fail ArgumentError, "Missing the required parameter 'app_id' when calling StatisticsApi.get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get"
214
+ # verify the required parameter 'endpoint_id' is set
215
+ if @api_client.config.client_side_validation && endpoint_id.nil?
216
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling StatisticsApi.v1_stats_endpoint_attempts"
154
217
  end
155
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
156
- fail ArgumentError, 'invalid value for "app_id" when calling StatisticsApi.get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get, the character length must be smaller than or equal to 256.'
218
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
219
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling StatisticsApi.v1_stats_endpoint_attempts, the character length must be smaller than or equal to 256.'
157
220
  end
158
221
 
159
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
160
- fail ArgumentError, 'invalid value for "app_id" when calling StatisticsApi.get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get, the character length must be great than or equal to 1.'
222
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
223
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling StatisticsApi.v1_stats_endpoint_attempts, the character length must be great than or equal to 1.'
161
224
  end
162
225
 
163
226
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
164
- if @api_client.config.client_side_validation && app_id !~ pattern
165
- fail ArgumentError, "invalid value for 'app_id' when calling StatisticsApi.get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get, must conform to the pattern #{pattern}."
227
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
228
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling StatisticsApi.v1_stats_endpoint_attempts, must conform to the pattern #{pattern}."
166
229
  end
167
230
 
168
231
  # resource path
169
- local_var_path = '/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
232
+ local_var_path = '/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
170
233
 
171
234
  # query parameters
172
235
  query_params = opts[:query_params] || {}
@@ -177,7 +240,6 @@ module Svix
177
240
  header_params = opts[:header_params] || {}
178
241
  # HTTP header 'Accept' (if needed)
179
242
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
180
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
181
243
 
182
244
  # form parameters
183
245
  form_params = opts[:form_params] || {}
@@ -189,10 +251,10 @@ module Svix
189
251
  return_type = opts[:debug_return_type] || 'AttemptStatisticsResponse'
190
252
 
191
253
  # auth_names
192
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
254
+ auth_names = opts[:debug_auth_names] || []
193
255
 
194
256
  new_options = opts.merge(
195
- :operation => :"StatisticsApi.get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get",
257
+ :operation => :"StatisticsApi.v1_stats_endpoint_attempts",
196
258
  :header_params => header_params,
197
259
  :query_params => query_params,
198
260
  :form_params => form_params,
@@ -203,7 +265,7 @@ module Svix
203
265
 
204
266
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
205
267
  if @api_client.config.debugging
206
- @api_client.config.logger.debug "API called: StatisticsApi#get_ep_stats_api_v1_stats_app_app_id_ep_endpoint_id_attempt_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
268
+ @api_client.config.logger.debug "API called: StatisticsApi#v1_stats_endpoint_attempts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
207
269
  end
208
270
  return data, status_code, headers
209
271
  end
@@ -110,7 +110,6 @@ module Svix
110
110
  query_params = opts[:query_params] || {}
111
111
  form_params = opts[:form_params] || {}
112
112
 
113
- update_params_for_auth! header_params, query_params, opts[:auth_names]
114
113
 
115
114
  # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
116
115
  _verify_ssl_host = @config.verify_ssl_host ? 2 : 0
@@ -1,31 +1,31 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- class ApplicationAPI
5
- def initialize(api_client)
6
- @api = ApplicationApi.new(api_client)
7
- end
4
+ class ApplicationAPI
5
+ def initialize(api_client)
6
+ @api = ApplicationApi.new(api_client)
7
+ end
8
8
 
9
- def list(options = {})
10
- return @api.list_applications_api_v1_app_get(options)
11
- end
9
+ def list(options = {})
10
+ return @api.v1_application_list(options)
11
+ end
12
12
 
13
- def create(application_in, options = {})
14
- return @api.create_application_api_v1_app_post(application_in, options)
15
- end
16
- def get_or_create(application_in, options = {})
17
- return @api.create_application_api_v1_app_post(application_in, {**options, get_if_exists: true})
18
- end
19
- def get(app_id)
20
- return @api.get_application_api_v1_app_app_id_get(app_id)
21
- end
13
+ def create(application_in, options = {})
14
+ return @api.v1_application_create(application_in, options)
15
+ end
16
+ def get_or_create(application_in, options = {})
17
+ return @api.v1_application_create(application_in, {**options, get_if_exists: true})
18
+ end
19
+ def get(app_id)
20
+ return @api.v1_application_get(app_id)
21
+ end
22
22
 
23
- def update(app_id, application_in)
24
- return @api.update_application_api_v1_app_app_id_put(app_id, application_in)
25
- end
23
+ def update(app_id, application_in)
24
+ return @api.v1_application_update(app_id, application_in)
25
+ end
26
26
 
27
- def delete(app_id)
28
- return @api.delete_application_api_v1_app_app_id_delete(app_id)
29
- end
27
+ def delete(app_id)
28
+ return @api.v1_application_delete(app_id)
30
29
  end
30
+ end
31
31
  end
@@ -7,15 +7,15 @@ module Svix
7
7
  end
8
8
 
9
9
  def app_portal_access(app_id, app_portal_access_in, options = {})
10
- return @api.get_app_portal_access_access_api_v1_auth_dashboard_access_app_id_post(app_id, app_portal_access_in, options)
10
+ return @api.v1_authentication_app_portal_access(app_id, app_portal_access_in, options)
11
11
  end
12
12
 
13
13
  def dashboard_access(app_id, options = {})
14
- return @api.get_dashboard_access_api_v1_auth_dashboard_access_app_id_post(app_id, options)
14
+ return @api.v1_authentication_dashboard_access(app_id, options)
15
15
  end
16
16
 
17
17
  def logout(options = {})
18
- return @api.logout_api_v1_auth_logout_post(options)
18
+ return @api.v1_authentication_logout(options)
19
19
  end
20
20
  end
21
21
  end
@@ -215,13 +215,6 @@ module Svix
215
215
  # Returns Auth Settings hash for api client.
216
216
  def auth_settings
217
217
  {
218
- 'HTTPBearer' =>
219
- {
220
- type: 'bearer',
221
- in: 'header',
222
- key: 'Authorization',
223
- value: "Bearer #{access_token}"
224
- },
225
218
  }
226
219
  end
227
220
 
@@ -7,70 +7,70 @@ module Svix
7
7
  end
8
8
 
9
9
  def list(app_id, options = {})
10
- return @api.list_endpoints_api_v1_app_app_id_endpoint_get(app_id, options)
10
+ return @api.v1_endpoint_list(app_id, options)
11
11
  end
12
12
 
13
13
  def create(app_id, endpoint_in, options = {})
14
- return @api.create_endpoint_api_v1_app_app_id_endpoint_post(app_id, endpoint_in, options)
14
+ return @api.v1_endpoint_create(app_id, endpoint_in, options)
15
15
  end
16
16
 
17
17
  def get(app_id, endpoint_id)
18
- return @api.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get(endpoint_id, app_id)
18
+ return @api.v1_endpoint_get(app_id, endpoint_id)
19
19
  end
20
20
 
21
21
  def update(app_id, endpoint_id, endpoint_update)
22
- return @api.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put(endpoint_id, app_id, endpoint_update)
22
+ return @api.v1_endpoint_update(app_id, endpoint_id, endpoint_update)
23
23
  end
24
24
 
25
25
  def delete(app_id, endpoint_id)
26
- return @api.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete(endpoint_id, app_id)
26
+ return @api.v1_endpoint_delete(app_id, endpoint_id)
27
27
  end
28
28
 
29
29
  def get_secret(app_id, endpoint_id)
30
- return @api.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get(endpoint_id, app_id)
30
+ return @api.v1_endpoint_get_secret(app_id, endpoint_id)
31
31
  end
32
32
 
33
33
  def rotate_secret(app_id, endpoint_id, endpoint_secret_rotate_in, options = {})
34
- return @api.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post(endpoint_id, app_id, endpoint_secret_rotate_in, options)
34
+ return @api.v1_endpoint_rotate_secret(app_id, endpoint_id, endpoint_secret_rotate_in, options)
35
35
  end
36
36
 
37
37
  def recover(app_id, endpoint_id, recover_in, options = {})
38
- @api.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post(app_id, endpoint_id, recover_in, options)
38
+ @api.v1_endpoint_recover(app_id, endpoint_id, recover_in, options)
39
39
  nil
40
40
  end
41
41
 
42
42
  def get_headers(app_id, endpoint_id)
43
- return @api.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get(endpoint_id app_id)
43
+ return @api.v1_endpoint_get_headers(app_id, endpoint_id)
44
44
  end
45
45
 
46
46
  def update_headers(app_id, endpoint_id, endpoint_headers_in)
47
- return @api.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put(app_id, endpoint_id, endpoint_headers_in)
47
+ return @api.v1_endpoint_update_headers(app_id, endpoint_id, endpoint_headers_in)
48
48
  end
49
49
 
50
50
  def patch_headers(app_id, endpoint_id, endpoint_headers_in)
51
- return @api.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch(app_id, endpoint_id, endpoint_headers_in)
51
+ return @api.v1_endpoint_patch_headers(app_id, endpoint_id, endpoint_headers_in)
52
52
  end
53
53
 
54
54
  def get_stats(app_id, endpoint_id)
55
- return @api.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get(endpoint_id app_id)
55
+ return @api.v1_endpoint_get_stats(app_id, endpoint_id)
56
56
  end
57
57
 
58
58
  def replay_missing(app_id, endpoint_id, replay_in, options = {})
59
- @api.replay_missing_webhooks_api_v1_app_app_id_endpoint_endpoint_id_replay_missing_post(app_id, endpoint_id, replay_in, options)
59
+ @api.v1_endpoint_replay(app_id, endpoint_id, replay_in, options)
60
60
  nil
61
61
  end
62
62
 
63
63
  def transformation_get(app_id, endpoint_id, options = {})
64
- return @api.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get(endpoint_id, app_id, options)
64
+ return @api.v1_endpoint_transformation_get(app_id, endpoint_id, options)
65
65
  end
66
66
 
67
67
  def transformation_partial_update(app_id, endpoint_id, endpoint_transformation_in, options = {})
68
- @api.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch(app_id, endpoint_id, endpoint_transformation_in, options)
68
+ @api.v1_endpoint_transformation_partial_update(app_id, endpoint_id, endpoint_transformation_in, options)
69
69
  nil
70
70
  end
71
71
 
72
72
  def send_example(app_id, endpoint_id, event_example_in, options = {})
73
- @api.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post(app_id, endpoint_id, event_example_in, options)
73
+ @api.v1_endpoint_send_example(app_id, endpoint_id, event_example_in, options)
74
74
  end
75
75
  end
76
76
  end
@@ -1,29 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- class EventTypeAPI
5
- def initialize(api_client)
6
- @api = EventTypeApi.new(api_client)
7
- end
4
+ class EventTypeAPI
5
+ def initialize(api_client)
6
+ @api = EventTypeApi.new(api_client)
7
+ end
8
8
 
9
- def list(options = {})
10
- return @api.list_event_types_api_v1_event_type_get(options)
11
- end
9
+ def list(options = {})
10
+ return @api.v1_event_type_list(options)
11
+ end
12
12
 
13
- def create(event_type_in, options = {})
14
- return @api.create_event_type_api_v1_event_type_post(event_type_in, options)
15
- end
13
+ def create(event_type_in, options = {})
14
+ return @api.v1_event_type_create(event_type_in, options)
15
+ end
16
16
 
17
- def get(event_type_name)
18
- return @api.get_event_type_api_v1_event_type_event_type_name_get(event_type_name)
19
- end
17
+ def get(event_type_name)
18
+ return @api.v1_event_type_get(event_type_name)
19
+ end
20
20
 
21
- def update(event_type_name, event_type_update)
22
- return @api.update_event_type_api_v1_event_type_event_type_name_put(event_type_name, event_type_update)
23
- end
21
+ def update(event_type_name, event_type_update)
22
+ return @api.v1_event_type_update(event_type_name, event_type_update)
23
+ end
24
24
 
25
- def delete(event_type_name)
26
- return @api.delete_event_type_api_v1_event_type_event_type_name_delete(event_type_name)
27
- end
25
+ def delete(event_type_name)
26
+ return @api.v1_event_type_delete(event_type_name)
28
27
  end
28
+ end
29
29
  end
@@ -1,38 +1,38 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- class IntegrationAPI
5
- def initialize(api_client)
6
- @api = IntegrationApi.new(api_client)
7
- end
8
-
9
- def list(app_id, options = {})
10
- return @api.list_integrations_api_v1_app_app_id_integration_get(app_id, options)
11
- end
4
+ class IntegrationAPI
5
+ def initialize(api_client)
6
+ @api = IntegrationApi.new(api_client)
7
+ end
12
8
 
13
- def create(app_id, integ_in, options = {})
14
- return @api.create_integration_api_v1_app_app_id_integration_post(app_id, integ_in, options)
15
- end
9
+ def list(app_id, options = {})
10
+ return @api.v1_integration_list(app_id, options)
11
+ end
16
12
 
17
- def get(app_id, integ_id)
18
- return @api.get_integration_api_v1_app_app_id_integration_integ_id_get(integ_id, app_id)
19
- end
13
+ def create(app_id, integ_in, options = {})
14
+ return @api.v1_integration_create(app_id, integ_in, options)
15
+ end
20
16
 
21
- def update(app_id, integ_id, integ_update)
22
- return @api.update_integration_api_v1_app_app_id_integration_integ_id_put(integ_id, app_id, integ_update)
23
- end
17
+ def get(app_id, integ_id)
18
+ return @api.v1_integration_get(app_id, integ_id)
19
+ end
24
20
 
25
- def delete(app_id, integ_id)
26
- return @api.delete_integration_api_v1_app_app_id_integration_integ_id_delete(integ_id, app_id)
27
- end
21
+ def update(app_id, integ_id, integ_update)
22
+ return @api.v1_integration_update(app_id, integ_id, integ_update)
23
+ end
28
24
 
29
- def get_key(app_id, integ_id)
30
- return @api.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get(integ_id, app_id)
31
- end
25
+ def delete(app_id, integ_id)
26
+ return @api.v1_integration_delete(app_id, integ_id)
27
+ end
32
28
 
33
- def rotate_key(app_id, integ_id, options = {})
34
- return @api.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post(integ_id, app_id, options)
35
- end
29
+ def get_key(app_id, integ_id)
30
+ return @api.v1_integration_get_key(app_id, integ_id)
31
+ end
36
32
 
33
+ def rotate_key(app_id, integ_id, options = {})
34
+ return @api.v1_integration_rotate_key(app_id, integ_id, options)
37
35
  end
36
+
37
+ end
38
38
  end
@@ -7,19 +7,19 @@ module Svix
7
7
  end
8
8
 
9
9
  def list(app_id, options = {})
10
- return @api.list_messages_api_v1_app_app_id_msg_get(app_id, options)
10
+ return @api.v1_message_list(app_id, options)
11
11
  end
12
12
 
13
13
  def create(app_id, message_in, options = {})
14
- return @api.create_message_api_v1_app_app_id_msg_post(app_id, message_in, options)
14
+ return @api.v1_message_create(app_id, message_in, options)
15
15
  end
16
16
 
17
17
  def get(app_id, msg_id)
18
- return @api.get_message_api_v1_app_app_id_msg_msg_id_get(msg_id, app_id)
18
+ return @api.v1_message_get(app_id, msg_id)
19
19
  end
20
20
 
21
21
  def expunge_content(app_id, msg_id)
22
- return @api.expunge_message_payload_api_v1_app_app_id_msg_msg_id_content_delete(msg_id, app_id)
22
+ return @api.v1_message_expunge_content(app_id, msg_id)
23
23
  end
24
24
  end
25
25
  end
@@ -13,35 +13,35 @@ module Svix
13
13
  end
14
14
 
15
15
  def list_by_msg(app_id, msg_id, options = {})
16
- return @api.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get(app_id, msg_id, options)
16
+ return @api.v1_message_attempt_list_by_msg(app_id, msg_id, options)
17
17
  end
18
18
 
19
19
  def list_by_endpoint(app_id, endpoint_id, options = {})
20
- return @api.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get(app_id, endpoint_id, options)
20
+ return @api.v1_message_attempt_list_by_endpoint(app_id, endpoint_id, options)
21
21
  end
22
22
 
23
23
  def get(app_id, msg_id, attempt_id)
24
- return @api.get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get(attempt_id, msg_id, app_id)
24
+ return @api.v1_message_attempt_get(app_id, msg_id, attempt_id)
25
25
  end
26
26
 
27
27
  def resend(app_id, msg_id, endpoint_id, options = {})
28
- return @api.resend_webhook_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_resend_post(endpoint_id, msg_id, app_id, options)
28
+ return @api.v1_message_attempt_resend(app_id, msg_id, endpoint_id, options)
29
29
  end
30
30
 
31
31
  def list_attempted_messages(app_id, endpoint_id, options = {})
32
- return @api.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get(endpoint_id, app_id, options)
32
+ return @api.v1_message_attempt_list_attempted_messages(app_id, endpoint_id, options)
33
33
  end
34
34
 
35
35
  def list_attempted_destinations(app_id, msg_id, options = {})
36
- return @api.list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get(msg_id, app_id, options)
36
+ return @api.v1_message_attempt_list_attempted_destinations(app_id, msg_id, options)
37
37
  end
38
38
 
39
39
  def list_attempts_for_endpoint(app_id, endpoint_id, msg_id, options = {})
40
- return @api.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get(msg_id, app_id, endpoint_id, options)
40
+ return @api.v1_message_attempt_list_by_endpoint_deprecated(app_id, msg_id, endpoint_id, options)
41
41
  end
42
42
 
43
43
  def expunge_content(app_id, msg_id, attempt_id)
44
- return @api.expunge_attempt_content_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_content_delete(attempt_id, msg_id, app_id)
44
+ return @api.v1_message_attempt_expunge_content(app_id, msg_id, attempt_id)
45
45
  end
46
46
  end
47
47
  end