svix 1.56.0 → 1.57.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 +115 -10
- data/lib/svix/api/authentication_api.rb +101 -16
- data/lib/svix/api/background_tasks_api.rb +43 -17
- data/lib/svix/api/endpoint_api.rb +312 -96
- data/lib/svix/api/inbound_api.rb +4 -4
- data/lib/svix/api/integration_api.rb +102 -24
- data/lib/svix/api/message_api.rb +142 -39
- data/lib/svix/api/message_attempt_api.rb +135 -372
- data/lib/svix/api/statistics_api.rb +6 -6
- data/lib/svix/api/stream_api.rb +203 -142
- data/lib/svix/api/transformation_template_api.rb +88 -23
- data/lib/svix/api/webhook_endpoint_api.rb +253 -77
- data/lib/svix/background_tasks_api.rb +2 -2
- data/lib/svix/message_attempt_api.rb +7 -3
- data/lib/svix/models/active_application_out.rb +373 -0
- data/lib/svix/models/active_endpoint_out.rb +355 -0
- data/lib/svix/models/aggregate_event_types_out.rb +40 -0
- data/lib/svix/models/aggregated_event_types.rb +305 -0
- data/lib/svix/models/app_portal_access_in.rb +18 -0
- data/lib/svix/models/app_usage_stats_out.rb +40 -0
- data/lib/svix/models/application_message_failure.rb +277 -0
- data/lib/svix/models/application_message_id_pair.rb +317 -0
- data/lib/svix/models/application_out.rb +41 -2
- data/lib/svix/models/application_patch.rb +1 -1
- data/lib/svix/models/application_stats.rb +41 -2
- data/lib/svix/models/application_stats_out.rb +324 -0
- data/lib/svix/models/auth_token_out.rb +40 -1
- data/lib/svix/models/background_task_finished_event.rb +272 -0
- data/lib/svix/models/background_task_finished_event2.rb +331 -0
- data/lib/svix/models/background_task_out.rb +40 -0
- data/lib/svix/models/background_task_type.rb +2 -1
- data/lib/svix/models/{template_in.rb → connector_in.rb} +4 -4
- data/lib/svix/models/{transformation_template_kind.rb → connector_kind.rb} +3 -3
- data/lib/svix/models/create_stream_in.rb +12 -12
- data/lib/svix/models/data.rb +108 -0
- data/lib/svix/models/data_any_of.rb +240 -0
- data/lib/svix/models/data_any_of1.rb +223 -0
- data/lib/svix/models/data_any_of2.rb +241 -0
- data/lib/svix/models/data_any_of3.rb +223 -0
- data/lib/svix/models/data_any_of4.rb +240 -0
- data/lib/svix/models/endpoint_created_event_data.rb +82 -4
- data/lib/svix/models/endpoint_deleted_event_data.rb +82 -4
- data/lib/svix/models/endpoint_disabled_event.rb +1 -1
- data/lib/svix/models/endpoint_disabled_event_data.rb +119 -16
- data/lib/svix/models/endpoint_disabled_trigger.rb +40 -0
- data/lib/svix/models/endpoint_enabled_event.rb +272 -0
- data/lib/svix/models/endpoint_enabled_event_data.rb +410 -0
- data/lib/svix/models/endpoint_message_out.rb +40 -1
- data/lib/svix/models/endpoint_mtls_config_out.rb +215 -0
- data/lib/svix/models/endpoint_oauth_config_in.rb +2 -2
- data/lib/svix/models/endpoint_oauth_config_out.rb +315 -0
- data/lib/svix/models/endpoint_out.rb +40 -1
- data/lib/svix/models/endpoint_patch.rb +1 -1
- data/lib/svix/models/endpoint_updated_event_data.rb +82 -4
- data/lib/svix/models/environment_in.rb +17 -19
- data/lib/svix/models/environment_settings_out.rb +23 -1
- data/lib/svix/models/event_type_import_open_api_in.rb +14 -2
- data/lib/svix/models/export_event_type_out.rb +40 -0
- data/lib/svix/models/expung_all_contents_out.rb +315 -0
- data/lib/svix/models/inbound_path_params.rb +1 -1
- data/lib/svix/models/integration_in.rb +41 -1
- data/lib/svix/models/integration_out.rb +81 -2
- data/lib/svix/models/integration_update.rb +41 -1
- data/lib/svix/models/list_response_active_application_out.rb +261 -0
- data/lib/svix/models/message_attempt_endpoint_out.rb +120 -3
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +122 -5
- data/lib/svix/models/message_attempt_failed_data.rb +40 -1
- data/lib/svix/models/message_attempt_failing_event_data.rb +122 -5
- data/lib/svix/models/message_attempt_out.rb +120 -3
- data/lib/svix/models/message_attempt_recovered_event_data.rb +122 -5
- data/lib/svix/models/message_broadcast_out.rb +40 -0
- data/lib/svix/models/message_endpoint_out.rb +40 -1
- data/lib/svix/models/message_out.rb +40 -1
- data/lib/svix/models/message_precheck_in.rb +288 -0
- data/lib/svix/models/message_precheck_out.rb +221 -0
- data/lib/svix/models/{oauth2_auth_method_in.rb → oauth2_auth_method_in_out.rb} +3 -3
- data/lib/svix/models/{oauth2_grant_type_in.rb → oauth2_grant_type_in_out.rb} +3 -3
- data/lib/svix/models/operational_webhook_endpoint_headers_in.rb +223 -0
- data/lib/svix/models/operational_webhook_endpoint_headers_out.rb +251 -0
- data/lib/svix/models/operational_webhook_endpoint_out.rb +40 -1
- data/lib/svix/models/polling_endpoint_message_out.rb +454 -0
- data/lib/svix/models/polling_endpoint_out.rb +255 -0
- data/lib/svix/models/recover_out.rb +40 -0
- data/lib/svix/models/replay_out.rb +40 -0
- data/lib/svix/models/rotate_poller_token_in.rb +1 -1
- data/lib/svix/models/sink_secret_out.rb +233 -0
- data/lib/svix/models/stream_in.rb +6 -7
- data/lib/svix/models/stream_out.rb +46 -7
- data/lib/svix/models/stream_patch.rb +6 -7
- data/lib/svix/models/stream_portal_access_in.rb +293 -0
- data/lib/svix/models/template_out.rb +81 -1
- data/lib/svix/models/template_patch.rb +1 -1
- data/lib/svix/models/template_update.rb +1 -1
- data/lib/svix/version.rb +1 -1
- metadata +35 -7
- data/lib/svix/operational_webhook_endpoint_api.rb +0 -37
data/lib/svix/api/stream_api.rb
CHANGED
@@ -19,33 +19,47 @@ module Svix
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Create
|
23
|
-
# Creates
|
24
|
-
# @param
|
22
|
+
# Create Events
|
23
|
+
# Creates events on the Stream.
|
24
|
+
# @param stream_id [String] The Stream's ID or UID.
|
25
|
+
# @param create_stream_in [CreateStreamIn]
|
25
26
|
# @param [Hash] opts the optional parameters
|
26
27
|
# @option opts [String] :idempotency_key The request's idempotency key
|
27
|
-
# @return [
|
28
|
-
def
|
29
|
-
data, _status_code, _headers =
|
28
|
+
# @return [Object]
|
29
|
+
def v1_stream_events_create(stream_id, create_stream_in, opts = {})
|
30
|
+
data, _status_code, _headers = v1_stream_events_create_with_http_info(stream_id, create_stream_in, opts)
|
30
31
|
data
|
31
32
|
end
|
32
33
|
|
33
|
-
# Create
|
34
|
-
# Creates
|
35
|
-
# @param
|
34
|
+
# Create Events
|
35
|
+
# Creates events on the Stream.
|
36
|
+
# @param stream_id [String] The Stream's ID or UID.
|
37
|
+
# @param create_stream_in [CreateStreamIn]
|
36
38
|
# @param [Hash] opts the optional parameters
|
37
39
|
# @option opts [String] :idempotency_key The request's idempotency key
|
38
|
-
# @return [Array<(
|
39
|
-
def
|
40
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
41
|
+
def v1_stream_events_create_with_http_info(stream_id, create_stream_in, opts = {})
|
40
42
|
if @api_client.config.debugging
|
41
|
-
@api_client.config.logger.debug 'Calling API: StreamApi.
|
43
|
+
@api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_events_create ...'
|
42
44
|
end
|
43
|
-
# verify the required parameter '
|
44
|
-
if @api_client.config.client_side_validation &&
|
45
|
-
fail ArgumentError, "Missing the required parameter '
|
45
|
+
# verify the required parameter 'stream_id' is set
|
46
|
+
if @api_client.config.client_side_validation && stream_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.v1_stream_events_create"
|
48
|
+
end
|
49
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length > 60
|
50
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_events_create, the character length must be smaller than or equal to 60.'
|
51
|
+
end
|
52
|
+
|
53
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length < 1
|
54
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_events_create, the character length must be great than or equal to 1.'
|
55
|
+
end
|
56
|
+
|
57
|
+
# verify the required parameter 'create_stream_in' is set
|
58
|
+
if @api_client.config.client_side_validation && create_stream_in.nil?
|
59
|
+
fail ArgumentError, "Missing the required parameter 'create_stream_in' when calling StreamApi.v1_stream_events_create"
|
46
60
|
end
|
47
61
|
# resource path
|
48
|
-
local_var_path = '/api/v1/stream'
|
62
|
+
local_var_path = '/api/v1/stream/{stream_id}/events'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
|
49
63
|
|
50
64
|
# query parameters
|
51
65
|
query_params = opts[:query_params] || {}
|
@@ -65,16 +79,16 @@ module Svix
|
|
65
79
|
form_params = opts[:form_params] || {}
|
66
80
|
|
67
81
|
# http body (model)
|
68
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
82
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_stream_in)
|
69
83
|
|
70
84
|
# return_type
|
71
|
-
return_type = opts[:debug_return_type] || '
|
85
|
+
return_type = opts[:debug_return_type] || 'Object'
|
72
86
|
|
73
87
|
# auth_names
|
74
88
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
75
89
|
|
76
90
|
new_options = opts.merge(
|
77
|
-
:operation => :"StreamApi.
|
91
|
+
:operation => :"StreamApi.v1_stream_events_create",
|
78
92
|
:header_params => header_params,
|
79
93
|
:query_params => query_params,
|
80
94
|
:form_params => form_params,
|
@@ -85,73 +99,84 @@ module Svix
|
|
85
99
|
|
86
100
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
87
101
|
if @api_client.config.debugging
|
88
|
-
@api_client.config.logger.debug "API called: StreamApi#
|
102
|
+
@api_client.config.logger.debug "API called: StreamApi#v1_stream_events_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
103
|
end
|
90
104
|
return data, status_code, headers
|
91
105
|
end
|
92
106
|
|
93
|
-
#
|
94
|
-
#
|
95
|
-
# @param stream_id [String]
|
96
|
-
# @param create_stream_in [CreateStreamIn]
|
107
|
+
# Stream Events
|
108
|
+
# Iterate over a stream of events.
|
109
|
+
# @param stream_id [String] The Stream's ID or UID.
|
97
110
|
# @param [Hash] opts the optional parameters
|
98
|
-
# @option opts [
|
99
|
-
# @
|
100
|
-
|
101
|
-
|
111
|
+
# @option opts [Integer] :limit Limit the number of returned items
|
112
|
+
# @option opts [String] :iterator The iterator returned from a prior invocation
|
113
|
+
# @option opts [Time] :after
|
114
|
+
# @return [EventStreamOut]
|
115
|
+
def v1_stream_events_get(stream_id, opts = {})
|
116
|
+
data, _status_code, _headers = v1_stream_events_get_with_http_info(stream_id, opts)
|
102
117
|
data
|
103
118
|
end
|
104
119
|
|
105
|
-
#
|
106
|
-
#
|
107
|
-
# @param stream_id [String]
|
108
|
-
# @param create_stream_in [CreateStreamIn]
|
120
|
+
# Stream Events
|
121
|
+
# Iterate over a stream of events.
|
122
|
+
# @param stream_id [String] The Stream's ID or UID.
|
109
123
|
# @param [Hash] opts the optional parameters
|
110
|
-
# @option opts [
|
111
|
-
# @
|
112
|
-
|
124
|
+
# @option opts [Integer] :limit Limit the number of returned items
|
125
|
+
# @option opts [String] :iterator The iterator returned from a prior invocation
|
126
|
+
# @option opts [Time] :after
|
127
|
+
# @return [Array<(EventStreamOut, Integer, Hash)>] EventStreamOut data, response status code and response headers
|
128
|
+
def v1_stream_events_get_with_http_info(stream_id, opts = {})
|
113
129
|
if @api_client.config.debugging
|
114
|
-
@api_client.config.logger.debug 'Calling API: StreamApi.
|
130
|
+
@api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_events_get ...'
|
115
131
|
end
|
116
132
|
# verify the required parameter 'stream_id' is set
|
117
133
|
if @api_client.config.client_side_validation && stream_id.nil?
|
118
|
-
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.
|
134
|
+
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.v1_stream_events_get"
|
119
135
|
end
|
120
|
-
|
121
|
-
|
122
|
-
|
136
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length > 60
|
137
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_events_get, the character length must be smaller than or equal to 60.'
|
138
|
+
end
|
139
|
+
|
140
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length < 1
|
141
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_events_get, the character length must be great than or equal to 1.'
|
142
|
+
end
|
143
|
+
|
144
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
145
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling StreamApi.v1_stream_events_get, must be smaller than or equal to 250.'
|
146
|
+
end
|
147
|
+
|
148
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
149
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling StreamApi.v1_stream_events_get, must be greater than or equal to 1.'
|
123
150
|
end
|
151
|
+
|
124
152
|
# resource path
|
125
153
|
local_var_path = '/api/v1/stream/{stream_id}/events'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
|
126
154
|
|
127
155
|
# query parameters
|
128
156
|
query_params = opts[:query_params] || {}
|
157
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
158
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
159
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
129
160
|
|
130
161
|
# header parameters
|
131
162
|
header_params = opts[:header_params] || {}
|
132
163
|
# HTTP header 'Accept' (if needed)
|
133
164
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
134
|
-
# HTTP header 'Content-Type'
|
135
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
136
|
-
if !content_type.nil?
|
137
|
-
header_params['Content-Type'] = content_type
|
138
|
-
end
|
139
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
140
165
|
|
141
166
|
# form parameters
|
142
167
|
form_params = opts[:form_params] || {}
|
143
168
|
|
144
169
|
# http body (model)
|
145
|
-
post_body = opts[:debug_body]
|
170
|
+
post_body = opts[:debug_body]
|
146
171
|
|
147
172
|
# return_type
|
148
|
-
return_type = opts[:debug_return_type] || '
|
173
|
+
return_type = opts[:debug_return_type] || 'EventStreamOut'
|
149
174
|
|
150
175
|
# auth_names
|
151
176
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
152
177
|
|
153
178
|
new_options = opts.merge(
|
154
|
-
:operation => :"StreamApi.
|
179
|
+
:operation => :"StreamApi.v1_stream_events_get",
|
155
180
|
:header_params => header_params,
|
156
181
|
:query_params => query_params,
|
157
182
|
:form_params => form_params,
|
@@ -160,38 +185,40 @@ module Svix
|
|
160
185
|
:return_type => return_type
|
161
186
|
)
|
162
187
|
|
163
|
-
data, status_code, headers = @api_client.call_api(:
|
188
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
164
189
|
if @api_client.config.debugging
|
165
|
-
@api_client.config.logger.debug "API called: StreamApi#
|
190
|
+
@api_client.config.logger.debug "API called: StreamApi#v1_stream_events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
166
191
|
end
|
167
192
|
return data, status_code, headers
|
168
193
|
end
|
169
194
|
|
170
|
-
#
|
171
|
-
#
|
172
|
-
# @param
|
195
|
+
# Create Stream
|
196
|
+
# Creates a new stream.
|
197
|
+
# @param stream_in [StreamIn]
|
173
198
|
# @param [Hash] opts the optional parameters
|
174
|
-
# @
|
175
|
-
|
176
|
-
|
177
|
-
|
199
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
200
|
+
# @return [StreamOut]
|
201
|
+
def v1_stream_stream_create(stream_in, opts = {})
|
202
|
+
data, _status_code, _headers = v1_stream_stream_create_with_http_info(stream_in, opts)
|
203
|
+
data
|
178
204
|
end
|
179
205
|
|
180
|
-
#
|
181
|
-
#
|
182
|
-
# @param
|
206
|
+
# Create Stream
|
207
|
+
# Creates a new stream.
|
208
|
+
# @param stream_in [StreamIn]
|
183
209
|
# @param [Hash] opts the optional parameters
|
184
|
-
# @
|
185
|
-
|
210
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
211
|
+
# @return [Array<(StreamOut, Integer, Hash)>] StreamOut data, response status code and response headers
|
212
|
+
def v1_stream_stream_create_with_http_info(stream_in, opts = {})
|
186
213
|
if @api_client.config.debugging
|
187
|
-
@api_client.config.logger.debug 'Calling API: StreamApi.
|
214
|
+
@api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_stream_create ...'
|
188
215
|
end
|
189
|
-
# verify the required parameter '
|
190
|
-
if @api_client.config.client_side_validation &&
|
191
|
-
fail ArgumentError, "Missing the required parameter '
|
216
|
+
# verify the required parameter 'stream_in' is set
|
217
|
+
if @api_client.config.client_side_validation && stream_in.nil?
|
218
|
+
fail ArgumentError, "Missing the required parameter 'stream_in' when calling StreamApi.v1_stream_stream_create"
|
192
219
|
end
|
193
220
|
# resource path
|
194
|
-
local_var_path = '/api/v1/stream
|
221
|
+
local_var_path = '/api/v1/stream'
|
195
222
|
|
196
223
|
# query parameters
|
197
224
|
query_params = opts[:query_params] || {}
|
@@ -200,21 +227,27 @@ module Svix
|
|
200
227
|
header_params = opts[:header_params] || {}
|
201
228
|
# HTTP header 'Accept' (if needed)
|
202
229
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
230
|
+
# HTTP header 'Content-Type'
|
231
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
232
|
+
if !content_type.nil?
|
233
|
+
header_params['Content-Type'] = content_type
|
234
|
+
end
|
235
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
203
236
|
|
204
237
|
# form parameters
|
205
238
|
form_params = opts[:form_params] || {}
|
206
239
|
|
207
240
|
# http body (model)
|
208
|
-
post_body = opts[:debug_body]
|
241
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(stream_in)
|
209
242
|
|
210
243
|
# return_type
|
211
|
-
return_type = opts[:debug_return_type]
|
244
|
+
return_type = opts[:debug_return_type] || 'StreamOut'
|
212
245
|
|
213
246
|
# auth_names
|
214
247
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
215
248
|
|
216
249
|
new_options = opts.merge(
|
217
|
-
:operation => :"StreamApi.
|
250
|
+
:operation => :"StreamApi.v1_stream_stream_create",
|
218
251
|
:header_params => header_params,
|
219
252
|
:query_params => query_params,
|
220
253
|
:form_params => form_params,
|
@@ -223,58 +256,49 @@ module Svix
|
|
223
256
|
:return_type => return_type
|
224
257
|
)
|
225
258
|
|
226
|
-
data, status_code, headers = @api_client.call_api(:
|
259
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
227
260
|
if @api_client.config.debugging
|
228
|
-
@api_client.config.logger.debug "API called: StreamApi#
|
261
|
+
@api_client.config.logger.debug "API called: StreamApi#v1_stream_stream_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
229
262
|
end
|
230
263
|
return data, status_code, headers
|
231
264
|
end
|
232
265
|
|
233
|
-
# Stream
|
234
|
-
#
|
235
|
-
# @param stream_id [String]
|
266
|
+
# Delete Stream
|
267
|
+
# Delete a stream.
|
268
|
+
# @param stream_id [String] The Stream's ID or UID.
|
236
269
|
# @param [Hash] opts the optional parameters
|
237
|
-
# @
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
def v1_stream_events_get(stream_id, opts = {})
|
242
|
-
data, _status_code, _headers = v1_stream_events_get_with_http_info(stream_id, opts)
|
243
|
-
data
|
270
|
+
# @return [nil]
|
271
|
+
def v1_stream_stream_delete(stream_id, opts = {})
|
272
|
+
v1_stream_stream_delete_with_http_info(stream_id, opts)
|
273
|
+
nil
|
244
274
|
end
|
245
275
|
|
246
|
-
# Stream
|
247
|
-
#
|
248
|
-
# @param stream_id [String]
|
276
|
+
# Delete Stream
|
277
|
+
# Delete a stream.
|
278
|
+
# @param stream_id [String] The Stream's ID or UID.
|
249
279
|
# @param [Hash] opts the optional parameters
|
250
|
-
# @
|
251
|
-
|
252
|
-
# @option opts [Time] :after
|
253
|
-
# @return [Array<(EventStreamOut, Integer, Hash)>] EventStreamOut data, response status code and response headers
|
254
|
-
def v1_stream_events_get_with_http_info(stream_id, opts = {})
|
280
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
281
|
+
def v1_stream_stream_delete_with_http_info(stream_id, opts = {})
|
255
282
|
if @api_client.config.debugging
|
256
|
-
@api_client.config.logger.debug 'Calling API: StreamApi.
|
283
|
+
@api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_stream_delete ...'
|
257
284
|
end
|
258
285
|
# verify the required parameter 'stream_id' is set
|
259
286
|
if @api_client.config.client_side_validation && stream_id.nil?
|
260
|
-
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.
|
287
|
+
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.v1_stream_stream_delete"
|
261
288
|
end
|
262
|
-
if @api_client.config.client_side_validation &&
|
263
|
-
fail ArgumentError, 'invalid value for "
|
289
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length > 60
|
290
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_stream_delete, the character length must be smaller than or equal to 60.'
|
264
291
|
end
|
265
292
|
|
266
|
-
if @api_client.config.client_side_validation &&
|
267
|
-
fail ArgumentError, 'invalid value for "
|
293
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length < 1
|
294
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_stream_delete, the character length must be great than or equal to 1.'
|
268
295
|
end
|
269
296
|
|
270
297
|
# resource path
|
271
|
-
local_var_path = '/api/v1/stream/{stream_id}
|
298
|
+
local_var_path = '/api/v1/stream/{stream_id}'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
|
272
299
|
|
273
300
|
# query parameters
|
274
301
|
query_params = opts[:query_params] || {}
|
275
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
276
|
-
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
277
|
-
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
278
302
|
|
279
303
|
# header parameters
|
280
304
|
header_params = opts[:header_params] || {}
|
@@ -288,13 +312,13 @@ module Svix
|
|
288
312
|
post_body = opts[:debug_body]
|
289
313
|
|
290
314
|
# return_type
|
291
|
-
return_type = opts[:debug_return_type]
|
315
|
+
return_type = opts[:debug_return_type]
|
292
316
|
|
293
317
|
# auth_names
|
294
318
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
295
319
|
|
296
320
|
new_options = opts.merge(
|
297
|
-
:operation => :"StreamApi.
|
321
|
+
:operation => :"StreamApi.v1_stream_stream_delete",
|
298
322
|
:header_params => header_params,
|
299
323
|
:query_params => query_params,
|
300
324
|
:form_params => form_params,
|
@@ -303,36 +327,44 @@ module Svix
|
|
303
327
|
:return_type => return_type
|
304
328
|
)
|
305
329
|
|
306
|
-
data, status_code, headers = @api_client.call_api(:
|
330
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
307
331
|
if @api_client.config.debugging
|
308
|
-
@api_client.config.logger.debug "API called: StreamApi#
|
332
|
+
@api_client.config.logger.debug "API called: StreamApi#v1_stream_stream_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
309
333
|
end
|
310
334
|
return data, status_code, headers
|
311
335
|
end
|
312
336
|
|
313
337
|
# Get Stream
|
314
338
|
# Get a stream by id or uid.
|
315
|
-
# @param stream_id [String]
|
339
|
+
# @param stream_id [String] The Stream's ID or UID.
|
316
340
|
# @param [Hash] opts the optional parameters
|
317
341
|
# @return [StreamOut]
|
318
|
-
def
|
319
|
-
data, _status_code, _headers =
|
342
|
+
def v1_stream_stream_get(stream_id, opts = {})
|
343
|
+
data, _status_code, _headers = v1_stream_stream_get_with_http_info(stream_id, opts)
|
320
344
|
data
|
321
345
|
end
|
322
346
|
|
323
347
|
# Get Stream
|
324
348
|
# Get a stream by id or uid.
|
325
|
-
# @param stream_id [String]
|
349
|
+
# @param stream_id [String] The Stream's ID or UID.
|
326
350
|
# @param [Hash] opts the optional parameters
|
327
351
|
# @return [Array<(StreamOut, Integer, Hash)>] StreamOut data, response status code and response headers
|
328
|
-
def
|
352
|
+
def v1_stream_stream_get_with_http_info(stream_id, opts = {})
|
329
353
|
if @api_client.config.debugging
|
330
|
-
@api_client.config.logger.debug 'Calling API: StreamApi.
|
354
|
+
@api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_stream_get ...'
|
331
355
|
end
|
332
356
|
# verify the required parameter 'stream_id' is set
|
333
357
|
if @api_client.config.client_side_validation && stream_id.nil?
|
334
|
-
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.
|
358
|
+
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.v1_stream_stream_get"
|
359
|
+
end
|
360
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length > 60
|
361
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_stream_get, the character length must be smaller than or equal to 60.'
|
335
362
|
end
|
363
|
+
|
364
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length < 1
|
365
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_stream_get, the character length must be great than or equal to 1.'
|
366
|
+
end
|
367
|
+
|
336
368
|
# resource path
|
337
369
|
local_var_path = '/api/v1/stream/{stream_id}'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
|
338
370
|
|
@@ -357,7 +389,7 @@ module Svix
|
|
357
389
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
358
390
|
|
359
391
|
new_options = opts.merge(
|
360
|
-
:operation => :"StreamApi.
|
392
|
+
:operation => :"StreamApi.v1_stream_stream_get",
|
361
393
|
:header_params => header_params,
|
362
394
|
:query_params => query_params,
|
363
395
|
:form_params => form_params,
|
@@ -368,7 +400,7 @@ module Svix
|
|
368
400
|
|
369
401
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
370
402
|
if @api_client.config.debugging
|
371
|
-
@api_client.config.logger.debug "API called: StreamApi#
|
403
|
+
@api_client.config.logger.debug "API called: StreamApi#v1_stream_stream_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
372
404
|
end
|
373
405
|
return data, status_code, headers
|
374
406
|
end
|
@@ -380,8 +412,8 @@ module Svix
|
|
380
412
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
381
413
|
# @option opts [Ordering] :order The sorting order of the returned items
|
382
414
|
# @return [ListResponseStreamOut]
|
383
|
-
def
|
384
|
-
data, _status_code, _headers =
|
415
|
+
def v1_stream_stream_list(opts = {})
|
416
|
+
data, _status_code, _headers = v1_stream_stream_list_with_http_info(opts)
|
385
417
|
data
|
386
418
|
end
|
387
419
|
|
@@ -392,16 +424,29 @@ module Svix
|
|
392
424
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
393
425
|
# @option opts [Ordering] :order The sorting order of the returned items
|
394
426
|
# @return [Array<(ListResponseStreamOut, Integer, Hash)>] ListResponseStreamOut data, response status code and response headers
|
395
|
-
def
|
427
|
+
def v1_stream_stream_list_with_http_info(opts = {})
|
396
428
|
if @api_client.config.debugging
|
397
|
-
@api_client.config.logger.debug 'Calling API: StreamApi.
|
429
|
+
@api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_stream_list ...'
|
398
430
|
end
|
399
431
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
400
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling StreamApi.
|
432
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling StreamApi.v1_stream_stream_list, must be smaller than or equal to 250.'
|
401
433
|
end
|
402
434
|
|
403
435
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
404
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling StreamApi.
|
436
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling StreamApi.v1_stream_stream_list, must be greater than or equal to 1.'
|
437
|
+
end
|
438
|
+
|
439
|
+
if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length > 27
|
440
|
+
fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling StreamApi.v1_stream_stream_list, the character length must be smaller than or equal to 27.'
|
441
|
+
end
|
442
|
+
|
443
|
+
if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length < 27
|
444
|
+
fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling StreamApi.v1_stream_stream_list, the character length must be great than or equal to 27.'
|
445
|
+
end
|
446
|
+
|
447
|
+
pattern = Regexp.new(/^strm_[A-Za-z0-9]{22}$/)
|
448
|
+
if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'] !~ pattern
|
449
|
+
fail ArgumentError, "invalid value for 'opts[:\"iterator\"]' when calling StreamApi.v1_stream_stream_list, must conform to the pattern #{pattern}."
|
405
450
|
end
|
406
451
|
|
407
452
|
# resource path
|
@@ -431,7 +476,7 @@ module Svix
|
|
431
476
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
432
477
|
|
433
478
|
new_options = opts.merge(
|
434
|
-
:operation => :"StreamApi.
|
479
|
+
:operation => :"StreamApi.v1_stream_stream_list",
|
435
480
|
:header_params => header_params,
|
436
481
|
:query_params => query_params,
|
437
482
|
:form_params => form_params,
|
@@ -442,39 +487,47 @@ module Svix
|
|
442
487
|
|
443
488
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
444
489
|
if @api_client.config.debugging
|
445
|
-
@api_client.config.logger.debug "API called: StreamApi#
|
490
|
+
@api_client.config.logger.debug "API called: StreamApi#v1_stream_stream_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
446
491
|
end
|
447
492
|
return data, status_code, headers
|
448
493
|
end
|
449
494
|
|
450
495
|
# Patch Stream
|
451
496
|
# Partially update a stream.
|
452
|
-
# @param stream_id [String]
|
497
|
+
# @param stream_id [String] The Stream's ID or UID.
|
453
498
|
# @param stream_patch [StreamPatch]
|
454
499
|
# @param [Hash] opts the optional parameters
|
455
500
|
# @return [StreamOut]
|
456
|
-
def
|
457
|
-
data, _status_code, _headers =
|
501
|
+
def v1_stream_stream_patch(stream_id, stream_patch, opts = {})
|
502
|
+
data, _status_code, _headers = v1_stream_stream_patch_with_http_info(stream_id, stream_patch, opts)
|
458
503
|
data
|
459
504
|
end
|
460
505
|
|
461
506
|
# Patch Stream
|
462
507
|
# Partially update a stream.
|
463
|
-
# @param stream_id [String]
|
508
|
+
# @param stream_id [String] The Stream's ID or UID.
|
464
509
|
# @param stream_patch [StreamPatch]
|
465
510
|
# @param [Hash] opts the optional parameters
|
466
511
|
# @return [Array<(StreamOut, Integer, Hash)>] StreamOut data, response status code and response headers
|
467
|
-
def
|
512
|
+
def v1_stream_stream_patch_with_http_info(stream_id, stream_patch, opts = {})
|
468
513
|
if @api_client.config.debugging
|
469
|
-
@api_client.config.logger.debug 'Calling API: StreamApi.
|
514
|
+
@api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_stream_patch ...'
|
470
515
|
end
|
471
516
|
# verify the required parameter 'stream_id' is set
|
472
517
|
if @api_client.config.client_side_validation && stream_id.nil?
|
473
|
-
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.
|
518
|
+
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.v1_stream_stream_patch"
|
519
|
+
end
|
520
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length > 60
|
521
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_stream_patch, the character length must be smaller than or equal to 60.'
|
522
|
+
end
|
523
|
+
|
524
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length < 1
|
525
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_stream_patch, the character length must be great than or equal to 1.'
|
474
526
|
end
|
527
|
+
|
475
528
|
# verify the required parameter 'stream_patch' is set
|
476
529
|
if @api_client.config.client_side_validation && stream_patch.nil?
|
477
|
-
fail ArgumentError, "Missing the required parameter 'stream_patch' when calling StreamApi.
|
530
|
+
fail ArgumentError, "Missing the required parameter 'stream_patch' when calling StreamApi.v1_stream_stream_patch"
|
478
531
|
end
|
479
532
|
# resource path
|
480
533
|
local_var_path = '/api/v1/stream/{stream_id}'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
|
@@ -505,7 +558,7 @@ module Svix
|
|
505
558
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
506
559
|
|
507
560
|
new_options = opts.merge(
|
508
|
-
:operation => :"StreamApi.
|
561
|
+
:operation => :"StreamApi.v1_stream_stream_patch",
|
509
562
|
:header_params => header_params,
|
510
563
|
:query_params => query_params,
|
511
564
|
:form_params => form_params,
|
@@ -516,39 +569,47 @@ module Svix
|
|
516
569
|
|
517
570
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
518
571
|
if @api_client.config.debugging
|
519
|
-
@api_client.config.logger.debug "API called: StreamApi#
|
572
|
+
@api_client.config.logger.debug "API called: StreamApi#v1_stream_stream_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
520
573
|
end
|
521
574
|
return data, status_code, headers
|
522
575
|
end
|
523
576
|
|
524
577
|
# Update Stream
|
525
578
|
# Update a stream.
|
526
|
-
# @param stream_id [String]
|
579
|
+
# @param stream_id [String] The Stream's ID or UID.
|
527
580
|
# @param stream_in [StreamIn]
|
528
581
|
# @param [Hash] opts the optional parameters
|
529
582
|
# @return [StreamOut]
|
530
|
-
def
|
531
|
-
data, _status_code, _headers =
|
583
|
+
def v1_stream_stream_update(stream_id, stream_in, opts = {})
|
584
|
+
data, _status_code, _headers = v1_stream_stream_update_with_http_info(stream_id, stream_in, opts)
|
532
585
|
data
|
533
586
|
end
|
534
587
|
|
535
588
|
# Update Stream
|
536
589
|
# Update a stream.
|
537
|
-
# @param stream_id [String]
|
590
|
+
# @param stream_id [String] The Stream's ID or UID.
|
538
591
|
# @param stream_in [StreamIn]
|
539
592
|
# @param [Hash] opts the optional parameters
|
540
593
|
# @return [Array<(StreamOut, Integer, Hash)>] StreamOut data, response status code and response headers
|
541
|
-
def
|
594
|
+
def v1_stream_stream_update_with_http_info(stream_id, stream_in, opts = {})
|
542
595
|
if @api_client.config.debugging
|
543
|
-
@api_client.config.logger.debug 'Calling API: StreamApi.
|
596
|
+
@api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_stream_update ...'
|
544
597
|
end
|
545
598
|
# verify the required parameter 'stream_id' is set
|
546
599
|
if @api_client.config.client_side_validation && stream_id.nil?
|
547
|
-
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.
|
600
|
+
fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.v1_stream_stream_update"
|
601
|
+
end
|
602
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length > 60
|
603
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_stream_update, the character length must be smaller than or equal to 60.'
|
548
604
|
end
|
605
|
+
|
606
|
+
if @api_client.config.client_side_validation && stream_id.to_s.length < 1
|
607
|
+
fail ArgumentError, 'invalid value for "stream_id" when calling StreamApi.v1_stream_stream_update, the character length must be great than or equal to 1.'
|
608
|
+
end
|
609
|
+
|
549
610
|
# verify the required parameter 'stream_in' is set
|
550
611
|
if @api_client.config.client_side_validation && stream_in.nil?
|
551
|
-
fail ArgumentError, "Missing the required parameter 'stream_in' when calling StreamApi.
|
612
|
+
fail ArgumentError, "Missing the required parameter 'stream_in' when calling StreamApi.v1_stream_stream_update"
|
552
613
|
end
|
553
614
|
# resource path
|
554
615
|
local_var_path = '/api/v1/stream/{stream_id}'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
|
@@ -579,7 +640,7 @@ module Svix
|
|
579
640
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
580
641
|
|
581
642
|
new_options = opts.merge(
|
582
|
-
:operation => :"StreamApi.
|
643
|
+
:operation => :"StreamApi.v1_stream_stream_update",
|
583
644
|
:header_params => header_params,
|
584
645
|
:query_params => query_params,
|
585
646
|
:form_params => form_params,
|
@@ -590,7 +651,7 @@ module Svix
|
|
590
651
|
|
591
652
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
592
653
|
if @api_client.config.debugging
|
593
|
-
@api_client.config.logger.debug "API called: StreamApi#
|
654
|
+
@api_client.config.logger.debug "API called: StreamApi#v1_stream_stream_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
594
655
|
end
|
595
656
|
return data, status_code, headers
|
596
657
|
end
|