svix 0.83.1 → 0.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +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,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's idempotency key
|
29
96
|
# @return [AttemptStatisticsResponse]
|
30
|
-
def
|
31
|
-
data, _status_code, _headers =
|
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's idempotency key
|
42
108
|
# @return [Array<(AttemptStatisticsResponse, Integer, Hash)>] AttemptStatisticsResponse data, response status code and response headers
|
43
|
-
def
|
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.
|
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.
|
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.
|
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.
|
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.
|
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] || [
|
153
|
+
auth_names = opts[:debug_auth_names] || []
|
89
154
|
|
90
155
|
new_options = opts.merge(
|
91
|
-
:operation => :"StatisticsApi.
|
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#
|
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's idempotency key
|
115
179
|
# @return [AttemptStatisticsResponse]
|
116
|
-
def
|
117
|
-
data, _status_code, _headers =
|
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's idempotency key
|
129
192
|
# @return [Array<(AttemptStatisticsResponse, Integer, Hash)>] AttemptStatisticsResponse data, response status code and response headers
|
130
|
-
def
|
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.
|
195
|
+
@api_client.config.logger.debug 'Calling API: StatisticsApi.v1_stats_endpoint_attempts ...'
|
133
196
|
end
|
134
|
-
# verify the required parameter '
|
135
|
-
if @api_client.config.client_side_validation &&
|
136
|
-
fail ArgumentError, "Missing the required parameter '
|
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 &&
|
139
|
-
fail ArgumentError, 'invalid value for "
|
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 &&
|
143
|
-
fail ArgumentError, 'invalid value for "
|
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 &&
|
148
|
-
fail ArgumentError, "invalid value for '
|
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 '
|
152
|
-
if @api_client.config.client_side_validation &&
|
153
|
-
fail ArgumentError, "Missing the required parameter '
|
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 &&
|
156
|
-
fail ArgumentError, 'invalid value for "
|
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 &&
|
160
|
-
fail ArgumentError, 'invalid value for "
|
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 &&
|
165
|
-
fail ArgumentError, "invalid value for '
|
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('{' + '
|
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] || [
|
254
|
+
auth_names = opts[:debug_auth_names] || []
|
193
255
|
|
194
256
|
new_options = opts.merge(
|
195
|
-
:operation => :"StatisticsApi.
|
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#
|
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
|
data/lib/svix/api_client.rb
CHANGED
@@ -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
|
data/lib/svix/application_api.rb
CHANGED
@@ -1,31 +1,31 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Svix
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
class ApplicationAPI
|
5
|
+
def initialize(api_client)
|
6
|
+
@api = ApplicationApi.new(api_client)
|
7
|
+
end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
def list(options = {})
|
10
|
+
return @api.v1_application_list(options)
|
11
|
+
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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
|
-
|
24
|
-
|
25
|
-
|
23
|
+
def update(app_id, application_in)
|
24
|
+
return @api.v1_application_update(app_id, application_in)
|
25
|
+
end
|
26
26
|
|
27
|
-
|
28
|
-
|
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.
|
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.
|
14
|
+
return @api.v1_authentication_dashboard_access(app_id, options)
|
15
15
|
end
|
16
16
|
|
17
17
|
def logout(options = {})
|
18
|
-
return @api.
|
18
|
+
return @api.v1_authentication_logout(options)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/lib/svix/configuration.rb
CHANGED
data/lib/svix/endpoint_api.rb
CHANGED
@@ -7,70 +7,70 @@ module Svix
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def list(app_id, options = {})
|
10
|
-
return @api.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
73
|
+
@api.v1_endpoint_send_example(app_id, endpoint_id, event_example_in, options)
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
data/lib/svix/event_type_api.rb
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Svix
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
class EventTypeAPI
|
5
|
+
def initialize(api_client)
|
6
|
+
@api = EventTypeApi.new(api_client)
|
7
|
+
end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
def list(options = {})
|
10
|
+
return @api.v1_event_type_list(options)
|
11
|
+
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
def create(event_type_in, options = {})
|
14
|
+
return @api.v1_event_type_create(event_type_in, options)
|
15
|
+
end
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
def get(event_type_name)
|
18
|
+
return @api.v1_event_type_get(event_type_name)
|
19
|
+
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
-
|
26
|
-
|
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
|
data/lib/svix/integration_api.rb
CHANGED
@@ -1,38 +1,38 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Svix
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
14
|
-
|
15
|
-
|
9
|
+
def list(app_id, options = {})
|
10
|
+
return @api.v1_integration_list(app_id, options)
|
11
|
+
end
|
16
12
|
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
def create(app_id, integ_in, options = {})
|
14
|
+
return @api.v1_integration_create(app_id, integ_in, options)
|
15
|
+
end
|
20
16
|
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
def get(app_id, integ_id)
|
18
|
+
return @api.v1_integration_get(app_id, integ_id)
|
19
|
+
end
|
24
20
|
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
30
|
-
|
31
|
-
|
25
|
+
def delete(app_id, integ_id)
|
26
|
+
return @api.v1_integration_delete(app_id, integ_id)
|
27
|
+
end
|
32
28
|
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
data/lib/svix/message_api.rb
CHANGED
@@ -7,19 +7,19 @@ module Svix
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def list(app_id, options = {})
|
10
|
-
return @api.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
44
|
+
return @api.v1_message_attempt_expunge_content(app_id, msg_id, attempt_id)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|