svix 0.83.1 → 0.84.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/lib/svix/api/application_api.rb +247 -181
- data/lib/svix/api/authentication_api.rb +82 -150
- data/lib/svix/api/background_tasks_api.rb +161 -0
- data/lib/svix/api/endpoint_api.rb +561 -485
- data/lib/svix/api/environment_api.rb +16 -16
- data/lib/svix/api/environment_settings_api.rb +7 -10
- data/lib/svix/api/event_type_api.rb +152 -81
- data/lib/svix/api/health_api.rb +6 -9
- data/lib/svix/api/integration_api.rb +123 -134
- data/lib/svix/api/message_api.rb +96 -102
- data/lib/svix/api/message_attempt_api.rb +382 -406
- data/lib/svix/api/statistics_api.rb +107 -45
- data/lib/svix/api_client.rb +0 -1
- data/lib/svix/application_api.rb +22 -22
- data/lib/svix/authentication_api.rb +3 -3
- data/lib/svix/configuration.rb +0 -7
- data/lib/svix/endpoint_api.rb +16 -16
- data/lib/svix/event_type_api.rb +19 -19
- data/lib/svix/integration_api.rb +26 -26
- data/lib/svix/message_api.rb +4 -4
- data/lib/svix/message_attempt_api.rb +8 -8
- data/lib/svix/models/app_portal_access_in.rb +1 -0
- data/lib/svix/models/application_in.rb +34 -1
- data/lib/svix/models/application_out.rb +20 -2
- data/lib/svix/models/application_patch.rb +299 -0
- data/lib/svix/models/application_stats.rb +0 -1
- data/lib/svix/models/{webhook_types.rb → background_task_out.rb} +40 -69
- data/lib/svix/models/background_task_out_common.rb +251 -0
- data/lib/svix/models/background_task_status.rb +38 -0
- data/lib/svix/models/background_task_type.rb +38 -0
- data/lib/svix/models/calculate_app_stats_in.rb +255 -0
- data/lib/svix/models/endpoint_created_event.rb +5 -0
- data/lib/svix/models/endpoint_created_event_data.rb +0 -2
- data/lib/svix/models/endpoint_deleted_event.rb +5 -0
- data/lib/svix/models/endpoint_deleted_event_data.rb +0 -2
- data/lib/svix/models/endpoint_disabled_event.rb +5 -0
- data/lib/svix/models/endpoint_disabled_event_data.rb +1 -2
- data/lib/svix/models/endpoint_in.rb +19 -10
- data/lib/svix/models/endpoint_message_out.rb +1 -0
- data/lib/svix/models/endpoint_out.rb +33 -15
- data/lib/svix/models/endpoint_patch.rb +405 -0
- data/lib/svix/models/endpoint_secret_rotate_in.rb +2 -0
- data/lib/svix/models/endpoint_transformation_in.rb +0 -2
- data/lib/svix/models/endpoint_transformation_simulate_in.rb +6 -0
- data/lib/svix/models/endpoint_update.rb +19 -10
- data/lib/svix/models/endpoint_updated_event.rb +5 -0
- data/lib/svix/models/endpoint_updated_event_data.rb +0 -2
- data/lib/svix/models/event_type_example_out.rb +4 -2
- data/lib/svix/models/event_type_patch.rb +275 -0
- data/lib/svix/models/event_type_schema_in.rb +0 -1
- data/lib/svix/models/http_validation_error.rb +5 -0
- data/lib/svix/models/list_response_application_stats.rb +15 -5
- data/lib/svix/models/list_response_background_task_out.rb +259 -0
- data/lib/svix/models/list_response_integration_out.rb +15 -5
- data/lib/svix/models/list_response_message_endpoint_out.rb +15 -5
- data/lib/svix/models/message_attempt_exhausted_event.rb +5 -0
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +1 -2
- data/lib/svix/models/message_attempt_failing_event.rb +5 -0
- data/lib/svix/models/message_attempt_failing_event_data.rb +1 -2
- data/lib/svix/models/message_attempt_headers_out.rb +27 -1
- data/lib/svix/models/message_endpoint_out.rb +45 -29
- data/lib/svix/models/message_in.rb +0 -1
- data/lib/svix/models/{one_time_token_out.rb → recover_out.rb} +41 -13
- data/lib/svix/models/{one_time_token_in.rb → replay_out.rb} +41 -13
- data/lib/svix/models/transformation_http_method.rb +1 -1
- data/lib/svix/models/validation_error.rb +4 -0
- data/lib/svix/version.rb +1 -1
- metadata +14 -5
@@ -19,14 +19,94 @@ module Svix
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Patch Event Type
|
23
|
+
# Partially update an event type.
|
24
|
+
# @param event_type_name [String]
|
25
|
+
# @param event_type_patch [EventTypePatch]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [EventTypeOut]
|
28
|
+
def patch_event_type(event_type_name, event_type_patch, opts = {})
|
29
|
+
data, _status_code, _headers = patch_event_type_with_http_info(event_type_name, event_type_patch, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Patch Event Type
|
34
|
+
# Partially update an event type.
|
35
|
+
# @param event_type_name [String]
|
36
|
+
# @param event_type_patch [EventTypePatch]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(EventTypeOut, Integer, Hash)>] EventTypeOut data, response status code and response headers
|
39
|
+
def patch_event_type_with_http_info(event_type_name, event_type_patch, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: EventTypeApi.patch_event_type ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'event_type_name' is set
|
44
|
+
if @api_client.config.client_side_validation && event_type_name.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.patch_event_type"
|
46
|
+
end
|
47
|
+
if @api_client.config.client_side_validation && event_type_name.to_s.length > 256
|
48
|
+
fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.patch_event_type, the character length must be smaller than or equal to 256.'
|
49
|
+
end
|
50
|
+
|
51
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
52
|
+
if @api_client.config.client_side_validation && event_type_name !~ pattern
|
53
|
+
fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.patch_event_type, must conform to the pattern #{pattern}."
|
54
|
+
end
|
55
|
+
|
56
|
+
# verify the required parameter 'event_type_patch' is set
|
57
|
+
if @api_client.config.client_side_validation && event_type_patch.nil?
|
58
|
+
fail ArgumentError, "Missing the required parameter 'event_type_patch' when calling EventTypeApi.patch_event_type"
|
59
|
+
end
|
60
|
+
# resource path
|
61
|
+
local_var_path = '/api/v1/event-type/{event_type_name}/'.sub('{' + 'event_type_name' + '}', CGI.escape(event_type_name.to_s))
|
62
|
+
|
63
|
+
# query parameters
|
64
|
+
query_params = opts[:query_params] || {}
|
65
|
+
|
66
|
+
# header parameters
|
67
|
+
header_params = opts[:header_params] || {}
|
68
|
+
# HTTP header 'Accept' (if needed)
|
69
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
70
|
+
# HTTP header 'Content-Type'
|
71
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
72
|
+
|
73
|
+
# form parameters
|
74
|
+
form_params = opts[:form_params] || {}
|
75
|
+
|
76
|
+
# http body (model)
|
77
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(event_type_patch)
|
78
|
+
|
79
|
+
# return_type
|
80
|
+
return_type = opts[:debug_return_type] || 'EventTypeOut'
|
81
|
+
|
82
|
+
# auth_names
|
83
|
+
auth_names = opts[:debug_auth_names] || []
|
84
|
+
|
85
|
+
new_options = opts.merge(
|
86
|
+
:operation => :"EventTypeApi.patch_event_type",
|
87
|
+
:header_params => header_params,
|
88
|
+
:query_params => query_params,
|
89
|
+
:form_params => form_params,
|
90
|
+
:body => post_body,
|
91
|
+
:auth_names => auth_names,
|
92
|
+
:return_type => return_type
|
93
|
+
)
|
94
|
+
|
95
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug "API called: EventTypeApi#patch_event_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
98
|
+
end
|
99
|
+
return data, status_code, headers
|
100
|
+
end
|
101
|
+
|
22
102
|
# Create Event Type
|
23
103
|
# Create new or unarchive existing event type. Unarchiving an event type will allow endpoints to filter on it and messages to be sent with it. Endpoints filtering on the event type before archival will continue to filter on it. This operation does not preserve the description and schemas.
|
24
104
|
# @param event_type_in [EventTypeIn]
|
25
105
|
# @param [Hash] opts the optional parameters
|
26
106
|
# @option opts [String] :idempotency_key The request's idempotency key
|
27
107
|
# @return [EventTypeOut]
|
28
|
-
def
|
29
|
-
data, _status_code, _headers =
|
108
|
+
def v1_event_type_create(event_type_in, opts = {})
|
109
|
+
data, _status_code, _headers = v1_event_type_create_with_http_info(event_type_in, opts)
|
30
110
|
data
|
31
111
|
end
|
32
112
|
|
@@ -36,13 +116,13 @@ module Svix
|
|
36
116
|
# @param [Hash] opts the optional parameters
|
37
117
|
# @option opts [String] :idempotency_key The request's idempotency key
|
38
118
|
# @return [Array<(EventTypeOut, Integer, Hash)>] EventTypeOut data, response status code and response headers
|
39
|
-
def
|
119
|
+
def v1_event_type_create_with_http_info(event_type_in, opts = {})
|
40
120
|
if @api_client.config.debugging
|
41
|
-
@api_client.config.logger.debug 'Calling API: EventTypeApi.
|
121
|
+
@api_client.config.logger.debug 'Calling API: EventTypeApi.v1_event_type_create ...'
|
42
122
|
end
|
43
123
|
# verify the required parameter 'event_type_in' is set
|
44
124
|
if @api_client.config.client_side_validation && event_type_in.nil?
|
45
|
-
fail ArgumentError, "Missing the required parameter 'event_type_in' when calling EventTypeApi.
|
125
|
+
fail ArgumentError, "Missing the required parameter 'event_type_in' when calling EventTypeApi.v1_event_type_create"
|
46
126
|
end
|
47
127
|
# resource path
|
48
128
|
local_var_path = '/api/v1/event-type/'
|
@@ -68,10 +148,10 @@ module Svix
|
|
68
148
|
return_type = opts[:debug_return_type] || 'EventTypeOut'
|
69
149
|
|
70
150
|
# auth_names
|
71
|
-
auth_names = opts[:debug_auth_names] || [
|
151
|
+
auth_names = opts[:debug_auth_names] || []
|
72
152
|
|
73
153
|
new_options = opts.merge(
|
74
|
-
:operation => :"EventTypeApi.
|
154
|
+
:operation => :"EventTypeApi.v1_event_type_create",
|
75
155
|
:header_params => header_params,
|
76
156
|
:query_params => query_params,
|
77
157
|
:form_params => form_params,
|
@@ -82,45 +162,43 @@ module Svix
|
|
82
162
|
|
83
163
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
84
164
|
if @api_client.config.debugging
|
85
|
-
@api_client.config.logger.debug "API called: EventTypeApi#
|
165
|
+
@api_client.config.logger.debug "API called: EventTypeApi#v1_event_type_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
166
|
end
|
87
167
|
return data, status_code, headers
|
88
168
|
end
|
89
169
|
|
90
|
-
#
|
91
|
-
# Archive an event type. Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the [create operation](#operation/create_event_type_api_v1_event_type__post).
|
170
|
+
# Delete Event Type
|
171
|
+
# Archive an event type. Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the [create operation](#operation/create_event_type_api_v1_event_type__post).
|
92
172
|
# @param event_type_name [String]
|
93
173
|
# @param [Hash] opts the optional parameters
|
94
174
|
# @option opts [Boolean] :expunge (default to false)
|
95
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
96
175
|
# @return [nil]
|
97
|
-
def
|
98
|
-
|
176
|
+
def v1_event_type_delete(event_type_name, opts = {})
|
177
|
+
v1_event_type_delete_with_http_info(event_type_name, opts)
|
99
178
|
nil
|
100
179
|
end
|
101
180
|
|
102
|
-
#
|
103
|
-
# Archive an event type. Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the [create operation](#operation/create_event_type_api_v1_event_type__post).
|
181
|
+
# Delete Event Type
|
182
|
+
# Archive an event type. Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the [create operation](#operation/create_event_type_api_v1_event_type__post).
|
104
183
|
# @param event_type_name [String]
|
105
184
|
# @param [Hash] opts the optional parameters
|
106
185
|
# @option opts [Boolean] :expunge
|
107
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
108
186
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
109
|
-
def
|
187
|
+
def v1_event_type_delete_with_http_info(event_type_name, opts = {})
|
110
188
|
if @api_client.config.debugging
|
111
|
-
@api_client.config.logger.debug 'Calling API: EventTypeApi.
|
189
|
+
@api_client.config.logger.debug 'Calling API: EventTypeApi.v1_event_type_delete ...'
|
112
190
|
end
|
113
191
|
# verify the required parameter 'event_type_name' is set
|
114
192
|
if @api_client.config.client_side_validation && event_type_name.nil?
|
115
|
-
fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.
|
193
|
+
fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.v1_event_type_delete"
|
116
194
|
end
|
117
195
|
if @api_client.config.client_side_validation && event_type_name.to_s.length > 256
|
118
|
-
fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.
|
196
|
+
fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.v1_event_type_delete, the character length must be smaller than or equal to 256.'
|
119
197
|
end
|
120
198
|
|
121
199
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
122
200
|
if @api_client.config.client_side_validation && event_type_name !~ pattern
|
123
|
-
fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.
|
201
|
+
fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.v1_event_type_delete, must conform to the pattern #{pattern}."
|
124
202
|
end
|
125
203
|
|
126
204
|
# resource path
|
@@ -134,7 +212,6 @@ module Svix
|
|
134
212
|
header_params = opts[:header_params] || {}
|
135
213
|
# HTTP header 'Accept' (if needed)
|
136
214
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
137
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
138
215
|
|
139
216
|
# form parameters
|
140
217
|
form_params = opts[:form_params] || {}
|
@@ -146,10 +223,10 @@ module Svix
|
|
146
223
|
return_type = opts[:debug_return_type]
|
147
224
|
|
148
225
|
# auth_names
|
149
|
-
auth_names = opts[:debug_auth_names] || [
|
226
|
+
auth_names = opts[:debug_auth_names] || []
|
150
227
|
|
151
228
|
new_options = opts.merge(
|
152
|
-
:operation => :"EventTypeApi.
|
229
|
+
:operation => :"EventTypeApi.v1_event_type_delete",
|
153
230
|
:header_params => header_params,
|
154
231
|
:query_params => query_params,
|
155
232
|
:form_params => form_params,
|
@@ -160,7 +237,7 @@ module Svix
|
|
160
237
|
|
161
238
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
162
239
|
if @api_client.config.debugging
|
163
|
-
@api_client.config.logger.debug "API called: EventTypeApi#
|
240
|
+
@api_client.config.logger.debug "API called: EventTypeApi#v1_event_type_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
241
|
end
|
165
242
|
return data, status_code, headers
|
166
243
|
end
|
@@ -171,8 +248,8 @@ module Svix
|
|
171
248
|
# @param [Hash] opts the optional parameters
|
172
249
|
# @option opts [String] :idempotency_key The request's idempotency key
|
173
250
|
# @return [EventTypeExampleOut]
|
174
|
-
def
|
175
|
-
data, _status_code, _headers =
|
251
|
+
def v1_event_type_generate_example(event_type_schema_in, opts = {})
|
252
|
+
data, _status_code, _headers = v1_event_type_generate_example_with_http_info(event_type_schema_in, opts)
|
176
253
|
data
|
177
254
|
end
|
178
255
|
|
@@ -182,13 +259,13 @@ module Svix
|
|
182
259
|
# @param [Hash] opts the optional parameters
|
183
260
|
# @option opts [String] :idempotency_key The request's idempotency key
|
184
261
|
# @return [Array<(EventTypeExampleOut, Integer, Hash)>] EventTypeExampleOut data, response status code and response headers
|
185
|
-
def
|
262
|
+
def v1_event_type_generate_example_with_http_info(event_type_schema_in, opts = {})
|
186
263
|
if @api_client.config.debugging
|
187
|
-
@api_client.config.logger.debug 'Calling API: EventTypeApi.
|
264
|
+
@api_client.config.logger.debug 'Calling API: EventTypeApi.v1_event_type_generate_example ...'
|
188
265
|
end
|
189
266
|
# verify the required parameter 'event_type_schema_in' is set
|
190
267
|
if @api_client.config.client_side_validation && event_type_schema_in.nil?
|
191
|
-
fail ArgumentError, "Missing the required parameter 'event_type_schema_in' when calling EventTypeApi.
|
268
|
+
fail ArgumentError, "Missing the required parameter 'event_type_schema_in' when calling EventTypeApi.v1_event_type_generate_example"
|
192
269
|
end
|
193
270
|
# resource path
|
194
271
|
local_var_path = '/api/v1/event-type/schema/generate-example/'
|
@@ -217,7 +294,7 @@ module Svix
|
|
217
294
|
auth_names = opts[:debug_auth_names] || []
|
218
295
|
|
219
296
|
new_options = opts.merge(
|
220
|
-
:operation => :"EventTypeApi.
|
297
|
+
:operation => :"EventTypeApi.v1_event_type_generate_example",
|
221
298
|
:header_params => header_params,
|
222
299
|
:query_params => query_params,
|
223
300
|
:form_params => form_params,
|
@@ -228,7 +305,7 @@ module Svix
|
|
228
305
|
|
229
306
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
230
307
|
if @api_client.config.debugging
|
231
|
-
@api_client.config.logger.debug "API called: EventTypeApi#
|
308
|
+
@api_client.config.logger.debug "API called: EventTypeApi#v1_event_type_generate_example\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
232
309
|
end
|
233
310
|
return data, status_code, headers
|
234
311
|
end
|
@@ -237,10 +314,9 @@ module Svix
|
|
237
314
|
# Get an event type.
|
238
315
|
# @param event_type_name [String]
|
239
316
|
# @param [Hash] opts the optional parameters
|
240
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
241
317
|
# @return [EventTypeOut]
|
242
|
-
def
|
243
|
-
data, _status_code, _headers =
|
318
|
+
def v1_event_type_get(event_type_name, opts = {})
|
319
|
+
data, _status_code, _headers = v1_event_type_get_with_http_info(event_type_name, opts)
|
244
320
|
data
|
245
321
|
end
|
246
322
|
|
@@ -248,23 +324,22 @@ module Svix
|
|
248
324
|
# Get an event type.
|
249
325
|
# @param event_type_name [String]
|
250
326
|
# @param [Hash] opts the optional parameters
|
251
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
252
327
|
# @return [Array<(EventTypeOut, Integer, Hash)>] EventTypeOut data, response status code and response headers
|
253
|
-
def
|
328
|
+
def v1_event_type_get_with_http_info(event_type_name, opts = {})
|
254
329
|
if @api_client.config.debugging
|
255
|
-
@api_client.config.logger.debug 'Calling API: EventTypeApi.
|
330
|
+
@api_client.config.logger.debug 'Calling API: EventTypeApi.v1_event_type_get ...'
|
256
331
|
end
|
257
332
|
# verify the required parameter 'event_type_name' is set
|
258
333
|
if @api_client.config.client_side_validation && event_type_name.nil?
|
259
|
-
fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.
|
334
|
+
fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.v1_event_type_get"
|
260
335
|
end
|
261
336
|
if @api_client.config.client_side_validation && event_type_name.to_s.length > 256
|
262
|
-
fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.
|
337
|
+
fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.v1_event_type_get, the character length must be smaller than or equal to 256.'
|
263
338
|
end
|
264
339
|
|
265
340
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
266
341
|
if @api_client.config.client_side_validation && event_type_name !~ pattern
|
267
|
-
fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.
|
342
|
+
fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.v1_event_type_get, must conform to the pattern #{pattern}."
|
268
343
|
end
|
269
344
|
|
270
345
|
# resource path
|
@@ -277,7 +352,6 @@ module Svix
|
|
277
352
|
header_params = opts[:header_params] || {}
|
278
353
|
# HTTP header 'Accept' (if needed)
|
279
354
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
280
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
281
355
|
|
282
356
|
# form parameters
|
283
357
|
form_params = opts[:form_params] || {}
|
@@ -289,10 +363,10 @@ module Svix
|
|
289
363
|
return_type = opts[:debug_return_type] || 'EventTypeOut'
|
290
364
|
|
291
365
|
# auth_names
|
292
|
-
auth_names = opts[:debug_auth_names] || [
|
366
|
+
auth_names = opts[:debug_auth_names] || []
|
293
367
|
|
294
368
|
new_options = opts.merge(
|
295
|
-
:operation => :"EventTypeApi.
|
369
|
+
:operation => :"EventTypeApi.v1_event_type_get",
|
296
370
|
:header_params => header_params,
|
297
371
|
:query_params => query_params,
|
298
372
|
:form_params => form_params,
|
@@ -303,7 +377,7 @@ module Svix
|
|
303
377
|
|
304
378
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
305
379
|
if @api_client.config.debugging
|
306
|
-
@api_client.config.logger.debug "API called: EventTypeApi#
|
380
|
+
@api_client.config.logger.debug "API called: EventTypeApi#v1_event_type_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
307
381
|
end
|
308
382
|
return data, status_code, headers
|
309
383
|
end
|
@@ -311,41 +385,41 @@ module Svix
|
|
311
385
|
# List Event Types
|
312
386
|
# Return the list of event types.
|
313
387
|
# @param [Hash] opts the optional parameters
|
388
|
+
# @option opts [Integer] :limit
|
314
389
|
# @option opts [String] :iterator
|
315
|
-
# @option opts [
|
316
|
-
# @option opts [Boolean] :with_content (default to false)
|
390
|
+
# @option opts [Ordering] :order
|
317
391
|
# @option opts [Boolean] :include_archived (default to false)
|
318
|
-
# @option opts [
|
392
|
+
# @option opts [Boolean] :with_content (default to false)
|
319
393
|
# @return [ListResponseEventTypeOut]
|
320
|
-
def
|
321
|
-
data, _status_code, _headers =
|
394
|
+
def v1_event_type_list(opts = {})
|
395
|
+
data, _status_code, _headers = v1_event_type_list_with_http_info(opts)
|
322
396
|
data
|
323
397
|
end
|
324
398
|
|
325
399
|
# List Event Types
|
326
400
|
# Return the list of event types.
|
327
401
|
# @param [Hash] opts the optional parameters
|
328
|
-
# @option opts [String] :iterator
|
329
402
|
# @option opts [Integer] :limit
|
330
|
-
# @option opts [
|
403
|
+
# @option opts [String] :iterator
|
404
|
+
# @option opts [Ordering] :order
|
331
405
|
# @option opts [Boolean] :include_archived
|
332
|
-
# @option opts [
|
406
|
+
# @option opts [Boolean] :with_content
|
333
407
|
# @return [Array<(ListResponseEventTypeOut, Integer, Hash)>] ListResponseEventTypeOut data, response status code and response headers
|
334
|
-
def
|
408
|
+
def v1_event_type_list_with_http_info(opts = {})
|
335
409
|
if @api_client.config.debugging
|
336
|
-
@api_client.config.logger.debug 'Calling API: EventTypeApi.
|
410
|
+
@api_client.config.logger.debug 'Calling API: EventTypeApi.v1_event_type_list ...'
|
337
411
|
end
|
412
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
|
413
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EventTypeApi.v1_event_type_list, must be greater than or equal to 0.'
|
414
|
+
end
|
415
|
+
|
338
416
|
if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length > 256
|
339
|
-
fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling EventTypeApi.
|
417
|
+
fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling EventTypeApi.v1_event_type_list, the character length must be smaller than or equal to 256.'
|
340
418
|
end
|
341
419
|
|
342
420
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
343
421
|
if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'] !~ pattern
|
344
|
-
fail ArgumentError, "invalid value for 'opts[:\"iterator\"]' when calling EventTypeApi.
|
345
|
-
end
|
346
|
-
|
347
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
348
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EventTypeApi.list_event_types_api_v1_event_type_get, must be smaller than or equal to 250.'
|
422
|
+
fail ArgumentError, "invalid value for 'opts[:\"iterator\"]' when calling EventTypeApi.v1_event_type_list, must conform to the pattern #{pattern}."
|
349
423
|
end
|
350
424
|
|
351
425
|
# resource path
|
@@ -353,16 +427,16 @@ module Svix
|
|
353
427
|
|
354
428
|
# query parameters
|
355
429
|
query_params = opts[:query_params] || {}
|
356
|
-
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
357
430
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
358
|
-
query_params[:'
|
431
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
432
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
359
433
|
query_params[:'include_archived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil?
|
434
|
+
query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
|
360
435
|
|
361
436
|
# header parameters
|
362
437
|
header_params = opts[:header_params] || {}
|
363
438
|
# HTTP header 'Accept' (if needed)
|
364
439
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
365
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
366
440
|
|
367
441
|
# form parameters
|
368
442
|
form_params = opts[:form_params] || {}
|
@@ -374,10 +448,10 @@ module Svix
|
|
374
448
|
return_type = opts[:debug_return_type] || 'ListResponseEventTypeOut'
|
375
449
|
|
376
450
|
# auth_names
|
377
|
-
auth_names = opts[:debug_auth_names] || [
|
451
|
+
auth_names = opts[:debug_auth_names] || []
|
378
452
|
|
379
453
|
new_options = opts.merge(
|
380
|
-
:operation => :"EventTypeApi.
|
454
|
+
:operation => :"EventTypeApi.v1_event_type_list",
|
381
455
|
:header_params => header_params,
|
382
456
|
:query_params => query_params,
|
383
457
|
:form_params => form_params,
|
@@ -388,7 +462,7 @@ module Svix
|
|
388
462
|
|
389
463
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
390
464
|
if @api_client.config.debugging
|
391
|
-
@api_client.config.logger.debug "API called: EventTypeApi#
|
465
|
+
@api_client.config.logger.debug "API called: EventTypeApi#v1_event_type_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
392
466
|
end
|
393
467
|
return data, status_code, headers
|
394
468
|
end
|
@@ -398,10 +472,9 @@ module Svix
|
|
398
472
|
# @param event_type_name [String]
|
399
473
|
# @param event_type_update [EventTypeUpdate]
|
400
474
|
# @param [Hash] opts the optional parameters
|
401
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
402
475
|
# @return [EventTypeOut]
|
403
|
-
def
|
404
|
-
data, _status_code, _headers =
|
476
|
+
def v1_event_type_update(event_type_name, event_type_update, opts = {})
|
477
|
+
data, _status_code, _headers = v1_event_type_update_with_http_info(event_type_name, event_type_update, opts)
|
405
478
|
data
|
406
479
|
end
|
407
480
|
|
@@ -410,28 +483,27 @@ module Svix
|
|
410
483
|
# @param event_type_name [String]
|
411
484
|
# @param event_type_update [EventTypeUpdate]
|
412
485
|
# @param [Hash] opts the optional parameters
|
413
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
414
486
|
# @return [Array<(EventTypeOut, Integer, Hash)>] EventTypeOut data, response status code and response headers
|
415
|
-
def
|
487
|
+
def v1_event_type_update_with_http_info(event_type_name, event_type_update, opts = {})
|
416
488
|
if @api_client.config.debugging
|
417
|
-
@api_client.config.logger.debug 'Calling API: EventTypeApi.
|
489
|
+
@api_client.config.logger.debug 'Calling API: EventTypeApi.v1_event_type_update ...'
|
418
490
|
end
|
419
491
|
# verify the required parameter 'event_type_name' is set
|
420
492
|
if @api_client.config.client_side_validation && event_type_name.nil?
|
421
|
-
fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.
|
493
|
+
fail ArgumentError, "Missing the required parameter 'event_type_name' when calling EventTypeApi.v1_event_type_update"
|
422
494
|
end
|
423
495
|
if @api_client.config.client_side_validation && event_type_name.to_s.length > 256
|
424
|
-
fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.
|
496
|
+
fail ArgumentError, 'invalid value for "event_type_name" when calling EventTypeApi.v1_event_type_update, the character length must be smaller than or equal to 256.'
|
425
497
|
end
|
426
498
|
|
427
499
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
428
500
|
if @api_client.config.client_side_validation && event_type_name !~ pattern
|
429
|
-
fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.
|
501
|
+
fail ArgumentError, "invalid value for 'event_type_name' when calling EventTypeApi.v1_event_type_update, must conform to the pattern #{pattern}."
|
430
502
|
end
|
431
503
|
|
432
504
|
# verify the required parameter 'event_type_update' is set
|
433
505
|
if @api_client.config.client_side_validation && event_type_update.nil?
|
434
|
-
fail ArgumentError, "Missing the required parameter 'event_type_update' when calling EventTypeApi.
|
506
|
+
fail ArgumentError, "Missing the required parameter 'event_type_update' when calling EventTypeApi.v1_event_type_update"
|
435
507
|
end
|
436
508
|
# resource path
|
437
509
|
local_var_path = '/api/v1/event-type/{event_type_name}/'.sub('{' + 'event_type_name' + '}', CGI.escape(event_type_name.to_s))
|
@@ -445,7 +517,6 @@ module Svix
|
|
445
517
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
446
518
|
# HTTP header 'Content-Type'
|
447
519
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
448
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
449
520
|
|
450
521
|
# form parameters
|
451
522
|
form_params = opts[:form_params] || {}
|
@@ -457,10 +528,10 @@ module Svix
|
|
457
528
|
return_type = opts[:debug_return_type] || 'EventTypeOut'
|
458
529
|
|
459
530
|
# auth_names
|
460
|
-
auth_names = opts[:debug_auth_names] || [
|
531
|
+
auth_names = opts[:debug_auth_names] || []
|
461
532
|
|
462
533
|
new_options = opts.merge(
|
463
|
-
:operation => :"EventTypeApi.
|
534
|
+
:operation => :"EventTypeApi.v1_event_type_update",
|
464
535
|
:header_params => header_params,
|
465
536
|
:query_params => query_params,
|
466
537
|
:form_params => form_params,
|
@@ -471,7 +542,7 @@ module Svix
|
|
471
542
|
|
472
543
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
473
544
|
if @api_client.config.debugging
|
474
|
-
@api_client.config.logger.debug "API called: EventTypeApi#
|
545
|
+
@api_client.config.logger.debug "API called: EventTypeApi#v1_event_type_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
475
546
|
end
|
476
547
|
return data, status_code, headers
|
477
548
|
end
|
data/lib/svix/api/health_api.rb
CHANGED
@@ -22,21 +22,19 @@ module Svix
|
|
22
22
|
# Health
|
23
23
|
# Verify the API server is up and running.
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
26
25
|
# @return [nil]
|
27
|
-
def
|
28
|
-
|
26
|
+
def v1_health_get(opts = {})
|
27
|
+
v1_health_get_with_http_info(opts)
|
29
28
|
nil
|
30
29
|
end
|
31
30
|
|
32
31
|
# Health
|
33
32
|
# Verify the API server is up and running.
|
34
33
|
# @param [Hash] opts the optional parameters
|
35
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
36
34
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
37
|
-
def
|
35
|
+
def v1_health_get_with_http_info(opts = {})
|
38
36
|
if @api_client.config.debugging
|
39
|
-
@api_client.config.logger.debug 'Calling API: HealthApi.
|
37
|
+
@api_client.config.logger.debug 'Calling API: HealthApi.v1_health_get ...'
|
40
38
|
end
|
41
39
|
# resource path
|
42
40
|
local_var_path = '/api/v1/health/'
|
@@ -48,7 +46,6 @@ module Svix
|
|
48
46
|
header_params = opts[:header_params] || {}
|
49
47
|
# HTTP header 'Accept' (if needed)
|
50
48
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
51
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
52
49
|
|
53
50
|
# form parameters
|
54
51
|
form_params = opts[:form_params] || {}
|
@@ -63,7 +60,7 @@ module Svix
|
|
63
60
|
auth_names = opts[:debug_auth_names] || []
|
64
61
|
|
65
62
|
new_options = opts.merge(
|
66
|
-
:operation => :"HealthApi.
|
63
|
+
:operation => :"HealthApi.v1_health_get",
|
67
64
|
:header_params => header_params,
|
68
65
|
:query_params => query_params,
|
69
66
|
:form_params => form_params,
|
@@ -74,7 +71,7 @@ module Svix
|
|
74
71
|
|
75
72
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
76
73
|
if @api_client.config.debugging
|
77
|
-
@api_client.config.logger.debug "API called: HealthApi#
|
74
|
+
@api_client.config.logger.debug "API called: HealthApi#v1_health_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
78
75
|
end
|
79
76
|
return data, status_code, headers
|
80
77
|
end
|