svix 0.43.2 → 0.44.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 +3 -0
- data/lib/svix/api/environment_api.rb +152 -0
- data/lib/svix/api/environment_settings_api.rb +79 -0
- data/lib/svix/api/integration_api.rb +606 -0
- data/lib/svix/api/message_api.rb +13 -0
- data/lib/svix/api/message_attempt_api.rb +65 -0
- data/lib/svix/integration_api.rb +38 -0
- data/lib/svix/internal.rb +1 -0
- data/lib/svix/models/environment_in.rb +257 -0
- data/lib/svix/models/environment_out.rb +259 -0
- data/lib/svix/models/environment_settings_out.rb +308 -0
- data/lib/svix/models/integration_in.rb +223 -0
- data/lib/svix/models/integration_key_out.rb +223 -0
- data/lib/svix/models/integration_out.rb +265 -0
- data/lib/svix/models/integration_update.rb +223 -0
- data/lib/svix/models/list_response_integration_out.rb +248 -0
- data/lib/svix/models/settings_in.rb +12 -1
- data/lib/svix/models/settings_out.rb +12 -1
- data/lib/svix/svix.rb +2 -0
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +7 -2
- metadata +14 -2
@@ -0,0 +1,606 @@
|
|
1
|
+
=begin
|
2
|
+
#Svix API
|
3
|
+
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.4
|
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 IntegrationApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create Integration
|
23
|
+
# Create an integration.
|
24
|
+
# @param app_id [String]
|
25
|
+
# @param integration_in [IntegrationIn]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [IntegrationOut]
|
28
|
+
def create_integration_api_v1_app_app_id_integration_post(app_id, integration_in, opts = {})
|
29
|
+
data, _status_code, _headers = create_integration_api_v1_app_app_id_integration_post_with_http_info(app_id, integration_in, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create Integration
|
34
|
+
# Create an integration.
|
35
|
+
# @param app_id [String]
|
36
|
+
# @param integration_in [IntegrationIn]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(IntegrationOut, Integer, Hash)>] IntegrationOut data, response status code and response headers
|
39
|
+
def create_integration_api_v1_app_app_id_integration_post_with_http_info(app_id, integration_in, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.create_integration_api_v1_app_app_id_integration_post ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'app_id' is set
|
44
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.create_integration_api_v1_app_app_id_integration_post"
|
46
|
+
end
|
47
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
48
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.create_integration_api_v1_app_app_id_integration_post, the character length must be smaller than or equal to 256.'
|
49
|
+
end
|
50
|
+
|
51
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
52
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.create_integration_api_v1_app_app_id_integration_post, the character length must be great than or equal to 1.'
|
53
|
+
end
|
54
|
+
|
55
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
56
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
57
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.create_integration_api_v1_app_app_id_integration_post, must conform to the pattern #{pattern}."
|
58
|
+
end
|
59
|
+
|
60
|
+
# verify the required parameter 'integration_in' is set
|
61
|
+
if @api_client.config.client_side_validation && integration_in.nil?
|
62
|
+
fail ArgumentError, "Missing the required parameter 'integration_in' when calling IntegrationApi.create_integration_api_v1_app_app_id_integration_post"
|
63
|
+
end
|
64
|
+
# resource path
|
65
|
+
local_var_path = '/api/v1/app/{app_id}/integration/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
66
|
+
|
67
|
+
# query parameters
|
68
|
+
query_params = opts[:query_params] || {}
|
69
|
+
|
70
|
+
# header parameters
|
71
|
+
header_params = opts[:header_params] || {}
|
72
|
+
# HTTP header 'Accept' (if needed)
|
73
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
74
|
+
# HTTP header 'Content-Type'
|
75
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
76
|
+
|
77
|
+
# form parameters
|
78
|
+
form_params = opts[:form_params] || {}
|
79
|
+
|
80
|
+
# http body (model)
|
81
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(integration_in)
|
82
|
+
|
83
|
+
# return_type
|
84
|
+
return_type = opts[:debug_return_type] || 'IntegrationOut'
|
85
|
+
|
86
|
+
# auth_names
|
87
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
88
|
+
|
89
|
+
new_options = opts.merge(
|
90
|
+
:operation => :"IntegrationApi.create_integration_api_v1_app_app_id_integration_post",
|
91
|
+
:header_params => header_params,
|
92
|
+
:query_params => query_params,
|
93
|
+
:form_params => form_params,
|
94
|
+
:body => post_body,
|
95
|
+
:auth_names => auth_names,
|
96
|
+
:return_type => return_type
|
97
|
+
)
|
98
|
+
|
99
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug "API called: IntegrationApi#create_integration_api_v1_app_app_id_integration_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
102
|
+
end
|
103
|
+
return data, status_code, headers
|
104
|
+
end
|
105
|
+
|
106
|
+
# Delete Integration
|
107
|
+
# Delete an integration and revoke it's key.
|
108
|
+
# @param integ_id [String]
|
109
|
+
# @param app_id [String]
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @return [nil]
|
112
|
+
def delete_integration_api_v1_app_app_id_integration_integ_id_delete(integ_id, app_id, opts = {})
|
113
|
+
delete_integration_api_v1_app_app_id_integration_integ_id_delete_with_http_info(integ_id, app_id, opts)
|
114
|
+
nil
|
115
|
+
end
|
116
|
+
|
117
|
+
# Delete Integration
|
118
|
+
# Delete an integration and revoke it's key.
|
119
|
+
# @param integ_id [String]
|
120
|
+
# @param app_id [String]
|
121
|
+
# @param [Hash] opts the optional parameters
|
122
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
123
|
+
def delete_integration_api_v1_app_app_id_integration_integ_id_delete_with_http_info(integ_id, app_id, opts = {})
|
124
|
+
if @api_client.config.debugging
|
125
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete ...'
|
126
|
+
end
|
127
|
+
# verify the required parameter 'integ_id' is set
|
128
|
+
if @api_client.config.client_side_validation && integ_id.nil?
|
129
|
+
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete"
|
130
|
+
end
|
131
|
+
# verify the required parameter 'app_id' is set
|
132
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
133
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete"
|
134
|
+
end
|
135
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
136
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete, the character length must be smaller than or equal to 256.'
|
137
|
+
end
|
138
|
+
|
139
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
140
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete, the character length must be great than or equal to 1.'
|
141
|
+
end
|
142
|
+
|
143
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
144
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
145
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete, must conform to the pattern #{pattern}."
|
146
|
+
end
|
147
|
+
|
148
|
+
# resource path
|
149
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
150
|
+
|
151
|
+
# query parameters
|
152
|
+
query_params = opts[:query_params] || {}
|
153
|
+
|
154
|
+
# header parameters
|
155
|
+
header_params = opts[:header_params] || {}
|
156
|
+
# HTTP header 'Accept' (if needed)
|
157
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
158
|
+
|
159
|
+
# form parameters
|
160
|
+
form_params = opts[:form_params] || {}
|
161
|
+
|
162
|
+
# http body (model)
|
163
|
+
post_body = opts[:debug_body]
|
164
|
+
|
165
|
+
# return_type
|
166
|
+
return_type = opts[:debug_return_type]
|
167
|
+
|
168
|
+
# auth_names
|
169
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
170
|
+
|
171
|
+
new_options = opts.merge(
|
172
|
+
:operation => :"IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete",
|
173
|
+
:header_params => header_params,
|
174
|
+
:query_params => query_params,
|
175
|
+
:form_params => form_params,
|
176
|
+
:body => post_body,
|
177
|
+
:auth_names => auth_names,
|
178
|
+
:return_type => return_type
|
179
|
+
)
|
180
|
+
|
181
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
182
|
+
if @api_client.config.debugging
|
183
|
+
@api_client.config.logger.debug "API called: IntegrationApi#delete_integration_api_v1_app_app_id_integration_integ_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
184
|
+
end
|
185
|
+
return data, status_code, headers
|
186
|
+
end
|
187
|
+
|
188
|
+
# Get Integration
|
189
|
+
# Get an integration.
|
190
|
+
# @param integ_id [String]
|
191
|
+
# @param app_id [String]
|
192
|
+
# @param [Hash] opts the optional parameters
|
193
|
+
# @return [IntegrationOut]
|
194
|
+
def get_integration_api_v1_app_app_id_integration_integ_id_get(integ_id, app_id, opts = {})
|
195
|
+
data, _status_code, _headers = get_integration_api_v1_app_app_id_integration_integ_id_get_with_http_info(integ_id, app_id, opts)
|
196
|
+
data
|
197
|
+
end
|
198
|
+
|
199
|
+
# Get Integration
|
200
|
+
# Get an integration.
|
201
|
+
# @param integ_id [String]
|
202
|
+
# @param app_id [String]
|
203
|
+
# @param [Hash] opts the optional parameters
|
204
|
+
# @return [Array<(IntegrationOut, Integer, Hash)>] IntegrationOut data, response status code and response headers
|
205
|
+
def get_integration_api_v1_app_app_id_integration_integ_id_get_with_http_info(integ_id, app_id, opts = {})
|
206
|
+
if @api_client.config.debugging
|
207
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get ...'
|
208
|
+
end
|
209
|
+
# verify the required parameter 'integ_id' is set
|
210
|
+
if @api_client.config.client_side_validation && integ_id.nil?
|
211
|
+
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get"
|
212
|
+
end
|
213
|
+
# verify the required parameter 'app_id' is set
|
214
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
215
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get"
|
216
|
+
end
|
217
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
218
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get, the character length must be smaller than or equal to 256.'
|
219
|
+
end
|
220
|
+
|
221
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
222
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get, the character length must be great than or equal to 1.'
|
223
|
+
end
|
224
|
+
|
225
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
226
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
227
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get, must conform to the pattern #{pattern}."
|
228
|
+
end
|
229
|
+
|
230
|
+
# resource path
|
231
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
232
|
+
|
233
|
+
# query parameters
|
234
|
+
query_params = opts[:query_params] || {}
|
235
|
+
|
236
|
+
# header parameters
|
237
|
+
header_params = opts[:header_params] || {}
|
238
|
+
# HTTP header 'Accept' (if needed)
|
239
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
240
|
+
|
241
|
+
# form parameters
|
242
|
+
form_params = opts[:form_params] || {}
|
243
|
+
|
244
|
+
# http body (model)
|
245
|
+
post_body = opts[:debug_body]
|
246
|
+
|
247
|
+
# return_type
|
248
|
+
return_type = opts[:debug_return_type] || 'IntegrationOut'
|
249
|
+
|
250
|
+
# auth_names
|
251
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
252
|
+
|
253
|
+
new_options = opts.merge(
|
254
|
+
:operation => :"IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get",
|
255
|
+
:header_params => header_params,
|
256
|
+
:query_params => query_params,
|
257
|
+
:form_params => form_params,
|
258
|
+
:body => post_body,
|
259
|
+
:auth_names => auth_names,
|
260
|
+
:return_type => return_type
|
261
|
+
)
|
262
|
+
|
263
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
264
|
+
if @api_client.config.debugging
|
265
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_integration_api_v1_app_app_id_integration_integ_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
266
|
+
end
|
267
|
+
return data, status_code, headers
|
268
|
+
end
|
269
|
+
|
270
|
+
# Get Integration Key
|
271
|
+
# Get an integration's key.
|
272
|
+
# @param integ_id [String]
|
273
|
+
# @param app_id [String]
|
274
|
+
# @param [Hash] opts the optional parameters
|
275
|
+
# @return [IntegrationKeyOut]
|
276
|
+
def get_integration_key_api_v1_app_app_id_integration_integ_id_key_get(integ_id, app_id, opts = {})
|
277
|
+
data, _status_code, _headers = get_integration_key_api_v1_app_app_id_integration_integ_id_key_get_with_http_info(integ_id, app_id, opts)
|
278
|
+
data
|
279
|
+
end
|
280
|
+
|
281
|
+
# Get Integration Key
|
282
|
+
# Get an integration's key.
|
283
|
+
# @param integ_id [String]
|
284
|
+
# @param app_id [String]
|
285
|
+
# @param [Hash] opts the optional parameters
|
286
|
+
# @return [Array<(IntegrationKeyOut, Integer, Hash)>] IntegrationKeyOut data, response status code and response headers
|
287
|
+
def get_integration_key_api_v1_app_app_id_integration_integ_id_key_get_with_http_info(integ_id, app_id, opts = {})
|
288
|
+
if @api_client.config.debugging
|
289
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get ...'
|
290
|
+
end
|
291
|
+
# verify the required parameter 'integ_id' is set
|
292
|
+
if @api_client.config.client_side_validation && integ_id.nil?
|
293
|
+
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get"
|
294
|
+
end
|
295
|
+
# verify the required parameter 'app_id' is set
|
296
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
297
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get"
|
298
|
+
end
|
299
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
300
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get, the character length must be smaller than or equal to 256.'
|
301
|
+
end
|
302
|
+
|
303
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
304
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get, the character length must be great than or equal to 1.'
|
305
|
+
end
|
306
|
+
|
307
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
308
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
309
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get, must conform to the pattern #{pattern}."
|
310
|
+
end
|
311
|
+
|
312
|
+
# resource path
|
313
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/'.sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
314
|
+
|
315
|
+
# query parameters
|
316
|
+
query_params = opts[:query_params] || {}
|
317
|
+
|
318
|
+
# header parameters
|
319
|
+
header_params = opts[:header_params] || {}
|
320
|
+
# HTTP header 'Accept' (if needed)
|
321
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
322
|
+
|
323
|
+
# form parameters
|
324
|
+
form_params = opts[:form_params] || {}
|
325
|
+
|
326
|
+
# http body (model)
|
327
|
+
post_body = opts[:debug_body]
|
328
|
+
|
329
|
+
# return_type
|
330
|
+
return_type = opts[:debug_return_type] || 'IntegrationKeyOut'
|
331
|
+
|
332
|
+
# auth_names
|
333
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
334
|
+
|
335
|
+
new_options = opts.merge(
|
336
|
+
:operation => :"IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get",
|
337
|
+
:header_params => header_params,
|
338
|
+
:query_params => query_params,
|
339
|
+
:form_params => form_params,
|
340
|
+
:body => post_body,
|
341
|
+
:auth_names => auth_names,
|
342
|
+
:return_type => return_type
|
343
|
+
)
|
344
|
+
|
345
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
346
|
+
if @api_client.config.debugging
|
347
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_integration_key_api_v1_app_app_id_integration_integ_id_key_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
348
|
+
end
|
349
|
+
return data, status_code, headers
|
350
|
+
end
|
351
|
+
|
352
|
+
# List Integrations
|
353
|
+
# List the application's integrations.
|
354
|
+
# @param app_id [String]
|
355
|
+
# @param [Hash] opts the optional parameters
|
356
|
+
# @option opts [String] :iterator
|
357
|
+
# @option opts [Integer] :limit (default to 50)
|
358
|
+
# @return [ListResponseIntegrationOut]
|
359
|
+
def list_integrations_api_v1_app_app_id_integration_get(app_id, opts = {})
|
360
|
+
data, _status_code, _headers = list_integrations_api_v1_app_app_id_integration_get_with_http_info(app_id, opts)
|
361
|
+
data
|
362
|
+
end
|
363
|
+
|
364
|
+
# List Integrations
|
365
|
+
# List the application's integrations.
|
366
|
+
# @param app_id [String]
|
367
|
+
# @param [Hash] opts the optional parameters
|
368
|
+
# @option opts [String] :iterator
|
369
|
+
# @option opts [Integer] :limit
|
370
|
+
# @return [Array<(ListResponseIntegrationOut, Integer, Hash)>] ListResponseIntegrationOut data, response status code and response headers
|
371
|
+
def list_integrations_api_v1_app_app_id_integration_get_with_http_info(app_id, opts = {})
|
372
|
+
if @api_client.config.debugging
|
373
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.list_integrations_api_v1_app_app_id_integration_get ...'
|
374
|
+
end
|
375
|
+
# verify the required parameter 'app_id' is set
|
376
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
377
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.list_integrations_api_v1_app_app_id_integration_get"
|
378
|
+
end
|
379
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
380
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.list_integrations_api_v1_app_app_id_integration_get, the character length must be smaller than or equal to 256.'
|
381
|
+
end
|
382
|
+
|
383
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
384
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.list_integrations_api_v1_app_app_id_integration_get, the character length must be great than or equal to 1.'
|
385
|
+
end
|
386
|
+
|
387
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
388
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
389
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.list_integrations_api_v1_app_app_id_integration_get, must conform to the pattern #{pattern}."
|
390
|
+
end
|
391
|
+
|
392
|
+
# resource path
|
393
|
+
local_var_path = '/api/v1/app/{app_id}/integration/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
394
|
+
|
395
|
+
# query parameters
|
396
|
+
query_params = opts[:query_params] || {}
|
397
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
398
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
399
|
+
|
400
|
+
# header parameters
|
401
|
+
header_params = opts[:header_params] || {}
|
402
|
+
# HTTP header 'Accept' (if needed)
|
403
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
404
|
+
|
405
|
+
# form parameters
|
406
|
+
form_params = opts[:form_params] || {}
|
407
|
+
|
408
|
+
# http body (model)
|
409
|
+
post_body = opts[:debug_body]
|
410
|
+
|
411
|
+
# return_type
|
412
|
+
return_type = opts[:debug_return_type] || 'ListResponseIntegrationOut'
|
413
|
+
|
414
|
+
# auth_names
|
415
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
416
|
+
|
417
|
+
new_options = opts.merge(
|
418
|
+
:operation => :"IntegrationApi.list_integrations_api_v1_app_app_id_integration_get",
|
419
|
+
:header_params => header_params,
|
420
|
+
:query_params => query_params,
|
421
|
+
:form_params => form_params,
|
422
|
+
:body => post_body,
|
423
|
+
:auth_names => auth_names,
|
424
|
+
:return_type => return_type
|
425
|
+
)
|
426
|
+
|
427
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug "API called: IntegrationApi#list_integrations_api_v1_app_app_id_integration_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
430
|
+
end
|
431
|
+
return data, status_code, headers
|
432
|
+
end
|
433
|
+
|
434
|
+
# Rotate Integration Key
|
435
|
+
# Rotate the integration's key. The previous key will be immediately revoked.
|
436
|
+
# @param integ_id [String]
|
437
|
+
# @param app_id [String]
|
438
|
+
# @param [Hash] opts the optional parameters
|
439
|
+
# @return [IntegrationKeyOut]
|
440
|
+
def rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post(integ_id, app_id, opts = {})
|
441
|
+
data, _status_code, _headers = rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post_with_http_info(integ_id, app_id, opts)
|
442
|
+
data
|
443
|
+
end
|
444
|
+
|
445
|
+
# Rotate Integration Key
|
446
|
+
# Rotate the integration's key. The previous key will be immediately revoked.
|
447
|
+
# @param integ_id [String]
|
448
|
+
# @param app_id [String]
|
449
|
+
# @param [Hash] opts the optional parameters
|
450
|
+
# @return [Array<(IntegrationKeyOut, Integer, Hash)>] IntegrationKeyOut data, response status code and response headers
|
451
|
+
def rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post_with_http_info(integ_id, app_id, opts = {})
|
452
|
+
if @api_client.config.debugging
|
453
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post ...'
|
454
|
+
end
|
455
|
+
# verify the required parameter 'integ_id' is set
|
456
|
+
if @api_client.config.client_side_validation && integ_id.nil?
|
457
|
+
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post"
|
458
|
+
end
|
459
|
+
# verify the required parameter 'app_id' is set
|
460
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
461
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post"
|
462
|
+
end
|
463
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
464
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post, the character length must be smaller than or equal to 256.'
|
465
|
+
end
|
466
|
+
|
467
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
468
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post, the character length must be great than or equal to 1.'
|
469
|
+
end
|
470
|
+
|
471
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
472
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
473
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post, must conform to the pattern #{pattern}."
|
474
|
+
end
|
475
|
+
|
476
|
+
# resource path
|
477
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/rotate/'.sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
478
|
+
|
479
|
+
# query parameters
|
480
|
+
query_params = opts[:query_params] || {}
|
481
|
+
|
482
|
+
# header parameters
|
483
|
+
header_params = opts[:header_params] || {}
|
484
|
+
# HTTP header 'Accept' (if needed)
|
485
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
486
|
+
|
487
|
+
# form parameters
|
488
|
+
form_params = opts[:form_params] || {}
|
489
|
+
|
490
|
+
# http body (model)
|
491
|
+
post_body = opts[:debug_body]
|
492
|
+
|
493
|
+
# return_type
|
494
|
+
return_type = opts[:debug_return_type] || 'IntegrationKeyOut'
|
495
|
+
|
496
|
+
# auth_names
|
497
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
498
|
+
|
499
|
+
new_options = opts.merge(
|
500
|
+
:operation => :"IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post",
|
501
|
+
:header_params => header_params,
|
502
|
+
:query_params => query_params,
|
503
|
+
:form_params => form_params,
|
504
|
+
:body => post_body,
|
505
|
+
:auth_names => auth_names,
|
506
|
+
:return_type => return_type
|
507
|
+
)
|
508
|
+
|
509
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
510
|
+
if @api_client.config.debugging
|
511
|
+
@api_client.config.logger.debug "API called: IntegrationApi#rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
512
|
+
end
|
513
|
+
return data, status_code, headers
|
514
|
+
end
|
515
|
+
|
516
|
+
# Update Integration
|
517
|
+
# Update an integration.
|
518
|
+
# @param integ_id [String]
|
519
|
+
# @param app_id [String]
|
520
|
+
# @param integration_update [IntegrationUpdate]
|
521
|
+
# @param [Hash] opts the optional parameters
|
522
|
+
# @return [IntegrationOut]
|
523
|
+
def update_integration_api_v1_app_app_id_integration_integ_id_put(integ_id, app_id, integration_update, opts = {})
|
524
|
+
data, _status_code, _headers = update_integration_api_v1_app_app_id_integration_integ_id_put_with_http_info(integ_id, app_id, integration_update, opts)
|
525
|
+
data
|
526
|
+
end
|
527
|
+
|
528
|
+
# Update Integration
|
529
|
+
# Update an integration.
|
530
|
+
# @param integ_id [String]
|
531
|
+
# @param app_id [String]
|
532
|
+
# @param integration_update [IntegrationUpdate]
|
533
|
+
# @param [Hash] opts the optional parameters
|
534
|
+
# @return [Array<(IntegrationOut, Integer, Hash)>] IntegrationOut data, response status code and response headers
|
535
|
+
def update_integration_api_v1_app_app_id_integration_integ_id_put_with_http_info(integ_id, app_id, integration_update, opts = {})
|
536
|
+
if @api_client.config.debugging
|
537
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put ...'
|
538
|
+
end
|
539
|
+
# verify the required parameter 'integ_id' is set
|
540
|
+
if @api_client.config.client_side_validation && integ_id.nil?
|
541
|
+
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put"
|
542
|
+
end
|
543
|
+
# verify the required parameter 'app_id' is set
|
544
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
545
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put"
|
546
|
+
end
|
547
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
548
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put, the character length must be smaller than or equal to 256.'
|
549
|
+
end
|
550
|
+
|
551
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
552
|
+
fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put, the character length must be great than or equal to 1.'
|
553
|
+
end
|
554
|
+
|
555
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
556
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
557
|
+
fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put, must conform to the pattern #{pattern}."
|
558
|
+
end
|
559
|
+
|
560
|
+
# verify the required parameter 'integration_update' is set
|
561
|
+
if @api_client.config.client_side_validation && integration_update.nil?
|
562
|
+
fail ArgumentError, "Missing the required parameter 'integration_update' when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put"
|
563
|
+
end
|
564
|
+
# resource path
|
565
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
566
|
+
|
567
|
+
# query parameters
|
568
|
+
query_params = opts[:query_params] || {}
|
569
|
+
|
570
|
+
# header parameters
|
571
|
+
header_params = opts[:header_params] || {}
|
572
|
+
# HTTP header 'Accept' (if needed)
|
573
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
574
|
+
# HTTP header 'Content-Type'
|
575
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
576
|
+
|
577
|
+
# form parameters
|
578
|
+
form_params = opts[:form_params] || {}
|
579
|
+
|
580
|
+
# http body (model)
|
581
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(integration_update)
|
582
|
+
|
583
|
+
# return_type
|
584
|
+
return_type = opts[:debug_return_type] || 'IntegrationOut'
|
585
|
+
|
586
|
+
# auth_names
|
587
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
588
|
+
|
589
|
+
new_options = opts.merge(
|
590
|
+
:operation => :"IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put",
|
591
|
+
:header_params => header_params,
|
592
|
+
:query_params => query_params,
|
593
|
+
:form_params => form_params,
|
594
|
+
:body => post_body,
|
595
|
+
:auth_names => auth_names,
|
596
|
+
:return_type => return_type
|
597
|
+
)
|
598
|
+
|
599
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
600
|
+
if @api_client.config.debugging
|
601
|
+
@api_client.config.logger.debug "API called: IntegrationApi#update_integration_api_v1_app_app_id_integration_integ_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
602
|
+
end
|
603
|
+
return data, status_code, headers
|
604
|
+
end
|
605
|
+
end
|
606
|
+
end
|
data/lib/svix/api/message_api.rb
CHANGED
@@ -131,6 +131,19 @@ module Svix
|
|
131
131
|
if @api_client.config.client_side_validation && msg_id.nil?
|
132
132
|
fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageApi.get_message_api_v1_app_app_id_msg_msg_id_get"
|
133
133
|
end
|
134
|
+
if @api_client.config.client_side_validation && msg_id.to_s.length > 256
|
135
|
+
fail ArgumentError, 'invalid value for "msg_id" when calling MessageApi.get_message_api_v1_app_app_id_msg_msg_id_get, the character length must be smaller than or equal to 256.'
|
136
|
+
end
|
137
|
+
|
138
|
+
if @api_client.config.client_side_validation && msg_id.to_s.length < 1
|
139
|
+
fail ArgumentError, 'invalid value for "msg_id" when calling MessageApi.get_message_api_v1_app_app_id_msg_msg_id_get, the character length must be great than or equal to 1.'
|
140
|
+
end
|
141
|
+
|
142
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
143
|
+
if @api_client.config.client_side_validation && msg_id !~ pattern
|
144
|
+
fail ArgumentError, "invalid value for 'msg_id' when calling MessageApi.get_message_api_v1_app_app_id_msg_msg_id_get, must conform to the pattern #{pattern}."
|
145
|
+
end
|
146
|
+
|
134
147
|
# verify the required parameter 'app_id' is set
|
135
148
|
if @api_client.config.client_side_validation && app_id.nil?
|
136
149
|
fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageApi.get_message_api_v1_app_app_id_msg_msg_id_get"
|