svix 1.23.0 → 1.25.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 +2 -2
- data/lib/svix/api/endpoint_api.rb +475 -2
- data/lib/svix/api/message_api.rb +218 -2
- data/lib/svix/api/streams_api.rb +185 -0
- data/lib/svix/api/transformation_template_api.rb +195 -24
- data/lib/svix/models/auth_token_out.rb +272 -0
- data/lib/svix/models/client_secret_jwt_params_in.rb +3 -0
- data/lib/svix/models/create_message_token_in.rb +250 -0
- data/lib/svix/models/create_stream_in.rb +225 -0
- data/lib/svix/models/endpoint_created_event_data.rb +1 -0
- data/lib/svix/models/endpoint_deleted_event_data.rb +1 -0
- data/lib/svix/models/endpoint_mtls_config_in.rb +235 -0
- data/lib/svix/models/endpoint_oauth_config_in.rb +42 -2
- data/lib/svix/models/endpoint_updated_event_data.rb +1 -0
- data/lib/svix/models/environment_settings_out.rb +15 -4
- data/lib/svix/models/event_in.rb +223 -0
- data/lib/svix/models/event_out.rb +223 -0
- data/lib/svix/models/event_type_from_open_api.rb +280 -0
- data/lib/svix/models/event_type_import_open_api_in.rb +13 -1
- data/lib/svix/models/event_type_import_open_api_out_data.rb +16 -4
- data/lib/svix/models/hubspot_oauth_config_in.rb +223 -0
- data/lib/svix/models/{oauth_payload_out.rb → incoming_webhook_payload_out.rb} +3 -3
- data/lib/svix/models/kafka_security_protocol_type.rb +38 -0
- data/lib/svix/models/list_response_event_out.rb +259 -0
- data/lib/svix/models/list_response_sink_out.rb +259 -0
- data/lib/svix/models/message_subscriber_auth_token_out.rb +237 -0
- data/lib/svix/models/{oauth_payload_in.rb → o_auth_payload_in.rb} +3 -3
- data/lib/svix/models/o_auth_payload_out.rb +239 -0
- data/lib/svix/models/{oauth2_grant_type.rb → oauth2_grant_type_in.rb} +4 -3
- data/lib/svix/models/settings_in.rb +15 -4
- data/lib/svix/models/settings_out.rb +15 -4
- data/lib/svix/models/sink_in.rb +107 -0
- data/lib/svix/models/sink_in_one_of.rb +285 -0
- data/lib/svix/models/sink_in_one_of1.rb +313 -0
- data/lib/svix/models/sink_in_one_of2.rb +321 -0
- data/lib/svix/models/sink_in_one_of3.rb +271 -0
- data/lib/svix/models/sink_out.rb +107 -0
- data/lib/svix/version.rb +1 -1
- metadata +25 -5
data/lib/svix/api/message_api.rb
CHANGED
@@ -126,7 +126,7 @@ module Svix
|
|
126
126
|
end
|
127
127
|
|
128
128
|
# Create Message
|
129
|
-
# Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made. If a message with the same `eventId` already exists for
|
129
|
+
# Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made. If a message with the same `eventId` already exists for the application, a 409 conflict error will be returned. The `eventType` indicates the type and schema of the event. All messages of a certain `eventType` are expected to have the same schema. Endpoints can choose to only listen to specific event types. Messages can also have `channels`, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don't imply a specific message content or schema. The `payload` property is the webhook's body (the actual webhook message). Svix supports payload sizes of up to ~350kb, though it's generally a good idea to keep webhook payloads small, probably no larger than 40kb.
|
130
130
|
# @param app_id [String] The app's ID or UID
|
131
131
|
# @param message_in [MessageIn]
|
132
132
|
# @param [Hash] opts the optional parameters
|
@@ -139,7 +139,7 @@ module Svix
|
|
139
139
|
end
|
140
140
|
|
141
141
|
# Create Message
|
142
|
-
# Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made. If a message with the same `eventId` already exists for
|
142
|
+
# Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made. If a message with the same `eventId` already exists for the application, a 409 conflict error will be returned. The `eventType` indicates the type and schema of the event. All messages of a certain `eventType` are expected to have the same schema. Endpoints can choose to only listen to specific event types. Messages can also have `channels`, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don't imply a specific message content or schema. The `payload` property is the webhook's body (the actual webhook message). Svix supports payload sizes of up to ~350kb, though it's generally a good idea to keep webhook payloads small, probably no larger than 40kb.
|
143
143
|
# @param app_id [String] The app's ID or UID
|
144
144
|
# @param message_in [MessageIn]
|
145
145
|
# @param [Hash] opts the optional parameters
|
@@ -215,6 +215,222 @@ module Svix
|
|
215
215
|
return data, status_code, headers
|
216
216
|
end
|
217
217
|
|
218
|
+
# Stream Events Subscription
|
219
|
+
# Reads the stream of created messages for an application, but using server-managed iterator tracking.
|
220
|
+
# @param app_id [String] The app's ID or UID
|
221
|
+
# @param subscription_id [String] The esub's ID or UID
|
222
|
+
# @param [Hash] opts the optional parameters
|
223
|
+
# @option opts [Integer] :limit Limit the number of returned items
|
224
|
+
# @option opts [String] :iterator The iterator returned from a prior invocation
|
225
|
+
# @option opts [Array<String>] :event_types Filter response based on the event type
|
226
|
+
# @option opts [Array<String>] :channels Filter response based on the event type
|
227
|
+
# @option opts [Time] :after
|
228
|
+
# @return [MessageStreamOut]
|
229
|
+
def v1_message_events_subscription(app_id, subscription_id, opts = {})
|
230
|
+
data, _status_code, _headers = v1_message_events_subscription_with_http_info(app_id, subscription_id, opts)
|
231
|
+
data
|
232
|
+
end
|
233
|
+
|
234
|
+
# Stream Events Subscription
|
235
|
+
# Reads the stream of created messages for an application, but using server-managed iterator tracking.
|
236
|
+
# @param app_id [String] The app's ID or UID
|
237
|
+
# @param subscription_id [String] The esub's ID or UID
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @option opts [Integer] :limit Limit the number of returned items
|
240
|
+
# @option opts [String] :iterator The iterator returned from a prior invocation
|
241
|
+
# @option opts [Array<String>] :event_types Filter response based on the event type
|
242
|
+
# @option opts [Array<String>] :channels Filter response based on the event type
|
243
|
+
# @option opts [Time] :after
|
244
|
+
# @return [Array<(MessageStreamOut, Integer, Hash)>] MessageStreamOut data, response status code and response headers
|
245
|
+
def v1_message_events_subscription_with_http_info(app_id, subscription_id, opts = {})
|
246
|
+
if @api_client.config.debugging
|
247
|
+
@api_client.config.logger.debug 'Calling API: MessageApi.v1_message_events_subscription ...'
|
248
|
+
end
|
249
|
+
# verify the required parameter 'app_id' is set
|
250
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
251
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageApi.v1_message_events_subscription"
|
252
|
+
end
|
253
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
254
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_message_events_subscription, the character length must be smaller than or equal to 256.'
|
255
|
+
end
|
256
|
+
|
257
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
258
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_message_events_subscription, the character length must be great than or equal to 1.'
|
259
|
+
end
|
260
|
+
|
261
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
262
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
263
|
+
fail ArgumentError, "invalid value for 'app_id' when calling MessageApi.v1_message_events_subscription, must conform to the pattern #{pattern}."
|
264
|
+
end
|
265
|
+
|
266
|
+
# verify the required parameter 'subscription_id' is set
|
267
|
+
if @api_client.config.client_side_validation && subscription_id.nil?
|
268
|
+
fail ArgumentError, "Missing the required parameter 'subscription_id' when calling MessageApi.v1_message_events_subscription"
|
269
|
+
end
|
270
|
+
if @api_client.config.client_side_validation && subscription_id.to_s.length > 256
|
271
|
+
fail ArgumentError, 'invalid value for "subscription_id" when calling MessageApi.v1_message_events_subscription, the character length must be smaller than or equal to 256.'
|
272
|
+
end
|
273
|
+
|
274
|
+
if @api_client.config.client_side_validation && subscription_id.to_s.length < 1
|
275
|
+
fail ArgumentError, 'invalid value for "subscription_id" when calling MessageApi.v1_message_events_subscription, the character length must be great than or equal to 1.'
|
276
|
+
end
|
277
|
+
|
278
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
279
|
+
if @api_client.config.client_side_validation && subscription_id !~ pattern
|
280
|
+
fail ArgumentError, "invalid value for 'subscription_id' when calling MessageApi.v1_message_events_subscription, must conform to the pattern #{pattern}."
|
281
|
+
end
|
282
|
+
|
283
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
284
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.v1_message_events_subscription, must be smaller than or equal to 250.'
|
285
|
+
end
|
286
|
+
|
287
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
288
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.v1_message_events_subscription, must be greater than or equal to 1.'
|
289
|
+
end
|
290
|
+
|
291
|
+
# resource path
|
292
|
+
local_var_path = '/api/v1/app/{app_id}/events/subscription/{subscription_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'subscription_id' + '}', CGI.escape(subscription_id.to_s))
|
293
|
+
|
294
|
+
# query parameters
|
295
|
+
query_params = opts[:query_params] || {}
|
296
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
297
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
298
|
+
query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
299
|
+
query_params[:'channels'] = @api_client.build_collection_param(opts[:'channels'], :multi) if !opts[:'channels'].nil?
|
300
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
301
|
+
|
302
|
+
# header parameters
|
303
|
+
header_params = opts[:header_params] || {}
|
304
|
+
# HTTP header 'Accept' (if needed)
|
305
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
306
|
+
|
307
|
+
# form parameters
|
308
|
+
form_params = opts[:form_params] || {}
|
309
|
+
|
310
|
+
# http body (model)
|
311
|
+
post_body = opts[:debug_body]
|
312
|
+
|
313
|
+
# return_type
|
314
|
+
return_type = opts[:debug_return_type] || 'MessageStreamOut'
|
315
|
+
|
316
|
+
# auth_names
|
317
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
318
|
+
|
319
|
+
new_options = opts.merge(
|
320
|
+
:operation => :"MessageApi.v1_message_events_subscription",
|
321
|
+
:header_params => header_params,
|
322
|
+
:query_params => query_params,
|
323
|
+
:form_params => form_params,
|
324
|
+
:body => post_body,
|
325
|
+
:auth_names => auth_names,
|
326
|
+
:return_type => return_type
|
327
|
+
)
|
328
|
+
|
329
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
330
|
+
if @api_client.config.debugging
|
331
|
+
@api_client.config.logger.debug "API called: MessageApi#v1_message_events_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
332
|
+
end
|
333
|
+
return data, status_code, headers
|
334
|
+
end
|
335
|
+
|
336
|
+
# Stream Events Create Token
|
337
|
+
# Creates an auth token that can be used with the `v1.message.events-subscription` endpoint
|
338
|
+
# @param app_id [String] The app's ID or UID
|
339
|
+
# @param subscription_id [String] The esub's ID or UID
|
340
|
+
# @param [Hash] opts the optional parameters
|
341
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
342
|
+
# @return [MessageSubscriberAuthTokenOut]
|
343
|
+
def v1_message_events_subscription_create_token(app_id, subscription_id, opts = {})
|
344
|
+
data, _status_code, _headers = v1_message_events_subscription_create_token_with_http_info(app_id, subscription_id, opts)
|
345
|
+
data
|
346
|
+
end
|
347
|
+
|
348
|
+
# Stream Events Create Token
|
349
|
+
# Creates an auth token that can be used with the `v1.message.events-subscription` endpoint
|
350
|
+
# @param app_id [String] The app's ID or UID
|
351
|
+
# @param subscription_id [String] The esub's ID or UID
|
352
|
+
# @param [Hash] opts the optional parameters
|
353
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
354
|
+
# @return [Array<(MessageSubscriberAuthTokenOut, Integer, Hash)>] MessageSubscriberAuthTokenOut data, response status code and response headers
|
355
|
+
def v1_message_events_subscription_create_token_with_http_info(app_id, subscription_id, opts = {})
|
356
|
+
if @api_client.config.debugging
|
357
|
+
@api_client.config.logger.debug 'Calling API: MessageApi.v1_message_events_subscription_create_token ...'
|
358
|
+
end
|
359
|
+
# verify the required parameter 'app_id' is set
|
360
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
361
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageApi.v1_message_events_subscription_create_token"
|
362
|
+
end
|
363
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
364
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_message_events_subscription_create_token, the character length must be smaller than or equal to 256.'
|
365
|
+
end
|
366
|
+
|
367
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
368
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_message_events_subscription_create_token, the character length must be great than or equal to 1.'
|
369
|
+
end
|
370
|
+
|
371
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
372
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
373
|
+
fail ArgumentError, "invalid value for 'app_id' when calling MessageApi.v1_message_events_subscription_create_token, must conform to the pattern #{pattern}."
|
374
|
+
end
|
375
|
+
|
376
|
+
# verify the required parameter 'subscription_id' is set
|
377
|
+
if @api_client.config.client_side_validation && subscription_id.nil?
|
378
|
+
fail ArgumentError, "Missing the required parameter 'subscription_id' when calling MessageApi.v1_message_events_subscription_create_token"
|
379
|
+
end
|
380
|
+
if @api_client.config.client_side_validation && subscription_id.to_s.length > 256
|
381
|
+
fail ArgumentError, 'invalid value for "subscription_id" when calling MessageApi.v1_message_events_subscription_create_token, the character length must be smaller than or equal to 256.'
|
382
|
+
end
|
383
|
+
|
384
|
+
if @api_client.config.client_side_validation && subscription_id.to_s.length < 1
|
385
|
+
fail ArgumentError, 'invalid value for "subscription_id" when calling MessageApi.v1_message_events_subscription_create_token, the character length must be great than or equal to 1.'
|
386
|
+
end
|
387
|
+
|
388
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
389
|
+
if @api_client.config.client_side_validation && subscription_id !~ pattern
|
390
|
+
fail ArgumentError, "invalid value for 'subscription_id' when calling MessageApi.v1_message_events_subscription_create_token, must conform to the pattern #{pattern}."
|
391
|
+
end
|
392
|
+
|
393
|
+
# resource path
|
394
|
+
local_var_path = '/api/v1/app/{app_id}/events/subscription/{subscription_id}/create_token'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'subscription_id' + '}', CGI.escape(subscription_id.to_s))
|
395
|
+
|
396
|
+
# query parameters
|
397
|
+
query_params = opts[:query_params] || {}
|
398
|
+
|
399
|
+
# header parameters
|
400
|
+
header_params = opts[:header_params] || {}
|
401
|
+
# HTTP header 'Accept' (if needed)
|
402
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
403
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
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] || 'MessageSubscriberAuthTokenOut'
|
413
|
+
|
414
|
+
# auth_names
|
415
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
416
|
+
|
417
|
+
new_options = opts.merge(
|
418
|
+
:operation => :"MessageApi.v1_message_events_subscription_create_token",
|
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(:POST, local_var_path, new_options)
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug "API called: MessageApi#v1_message_events_subscription_create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
430
|
+
end
|
431
|
+
return data, status_code, headers
|
432
|
+
end
|
433
|
+
|
218
434
|
# Delete message payload
|
219
435
|
# Delete the given message's payload. Useful in cases when a message was accidentally sent with sensitive content. The message can't be replayed or resent once its payload has been deleted or expired.
|
220
436
|
# @param app_id [String] The app's ID or UID
|
@@ -0,0 +1,185 @@
|
|
1
|
+
=begin
|
2
|
+
#Svix API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.1.1
|
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 StreamsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Append To Stream
|
23
|
+
# Creates streaming events.
|
24
|
+
# @param app_id [String] The app's ID or UID
|
25
|
+
# @param create_stream_in [CreateStreamIn]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
28
|
+
# @return [nil]
|
29
|
+
def append_to_stream(app_id, create_stream_in, opts = {})
|
30
|
+
append_to_stream_with_http_info(app_id, create_stream_in, opts)
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
# Append To Stream
|
35
|
+
# Creates streaming events.
|
36
|
+
# @param app_id [String] The app's ID or UID
|
37
|
+
# @param create_stream_in [CreateStreamIn]
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
40
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
41
|
+
def append_to_stream_with_http_info(app_id, create_stream_in, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: StreamsApi.append_to_stream ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'app_id' is set
|
46
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling StreamsApi.append_to_stream"
|
48
|
+
end
|
49
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
50
|
+
fail ArgumentError, 'invalid value for "app_id" when calling StreamsApi.append_to_stream, the character length must be smaller than or equal to 256.'
|
51
|
+
end
|
52
|
+
|
53
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
54
|
+
fail ArgumentError, 'invalid value for "app_id" when calling StreamsApi.append_to_stream, the character length must be great than or equal to 1.'
|
55
|
+
end
|
56
|
+
|
57
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
58
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
59
|
+
fail ArgumentError, "invalid value for 'app_id' when calling StreamsApi.append_to_stream, must conform to the pattern #{pattern}."
|
60
|
+
end
|
61
|
+
|
62
|
+
# verify the required parameter 'create_stream_in' is set
|
63
|
+
if @api_client.config.client_side_validation && create_stream_in.nil?
|
64
|
+
fail ArgumentError, "Missing the required parameter 'create_stream_in' when calling StreamsApi.append_to_stream"
|
65
|
+
end
|
66
|
+
# resource path
|
67
|
+
local_var_path = '/api/v1/app/{app_id}/stream'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
68
|
+
|
69
|
+
# query parameters
|
70
|
+
query_params = opts[:query_params] || {}
|
71
|
+
|
72
|
+
# header parameters
|
73
|
+
header_params = opts[:header_params] || {}
|
74
|
+
# HTTP header 'Accept' (if needed)
|
75
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
76
|
+
# HTTP header 'Content-Type'
|
77
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
78
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
79
|
+
|
80
|
+
# form parameters
|
81
|
+
form_params = opts[:form_params] || {}
|
82
|
+
|
83
|
+
# http body (model)
|
84
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_stream_in)
|
85
|
+
|
86
|
+
# return_type
|
87
|
+
return_type = opts[:debug_return_type]
|
88
|
+
|
89
|
+
# auth_names
|
90
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
91
|
+
|
92
|
+
new_options = opts.merge(
|
93
|
+
:operation => :"StreamsApi.append_to_stream",
|
94
|
+
:header_params => header_params,
|
95
|
+
:query_params => query_params,
|
96
|
+
:form_params => form_params,
|
97
|
+
:body => post_body,
|
98
|
+
:auth_names => auth_names,
|
99
|
+
:return_type => return_type
|
100
|
+
)
|
101
|
+
|
102
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug "API called: StreamsApi#append_to_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
105
|
+
end
|
106
|
+
return data, status_code, headers
|
107
|
+
end
|
108
|
+
|
109
|
+
# List Stream
|
110
|
+
# List streaming events.
|
111
|
+
# @param app_id [String] The app's ID or UID
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [ListResponseEventOut]
|
114
|
+
def list_stream(app_id, opts = {})
|
115
|
+
data, _status_code, _headers = list_stream_with_http_info(app_id, opts)
|
116
|
+
data
|
117
|
+
end
|
118
|
+
|
119
|
+
# List Stream
|
120
|
+
# List streaming events.
|
121
|
+
# @param app_id [String] The app's ID or UID
|
122
|
+
# @param [Hash] opts the optional parameters
|
123
|
+
# @return [Array<(ListResponseEventOut, Integer, Hash)>] ListResponseEventOut data, response status code and response headers
|
124
|
+
def list_stream_with_http_info(app_id, opts = {})
|
125
|
+
if @api_client.config.debugging
|
126
|
+
@api_client.config.logger.debug 'Calling API: StreamsApi.list_stream ...'
|
127
|
+
end
|
128
|
+
# verify the required parameter 'app_id' is set
|
129
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
130
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling StreamsApi.list_stream"
|
131
|
+
end
|
132
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
133
|
+
fail ArgumentError, 'invalid value for "app_id" when calling StreamsApi.list_stream, the character length must be smaller than or equal to 256.'
|
134
|
+
end
|
135
|
+
|
136
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
137
|
+
fail ArgumentError, 'invalid value for "app_id" when calling StreamsApi.list_stream, the character length must be great than or equal to 1.'
|
138
|
+
end
|
139
|
+
|
140
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
141
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
142
|
+
fail ArgumentError, "invalid value for 'app_id' when calling StreamsApi.list_stream, must conform to the pattern #{pattern}."
|
143
|
+
end
|
144
|
+
|
145
|
+
# resource path
|
146
|
+
local_var_path = '/api/v1/app/{app_id}/stream'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
147
|
+
|
148
|
+
# query parameters
|
149
|
+
query_params = opts[:query_params] || {}
|
150
|
+
|
151
|
+
# header parameters
|
152
|
+
header_params = opts[:header_params] || {}
|
153
|
+
# HTTP header 'Accept' (if needed)
|
154
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
155
|
+
|
156
|
+
# form parameters
|
157
|
+
form_params = opts[:form_params] || {}
|
158
|
+
|
159
|
+
# http body (model)
|
160
|
+
post_body = opts[:debug_body]
|
161
|
+
|
162
|
+
# return_type
|
163
|
+
return_type = opts[:debug_return_type] || 'ListResponseEventOut'
|
164
|
+
|
165
|
+
# auth_names
|
166
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
167
|
+
|
168
|
+
new_options = opts.merge(
|
169
|
+
:operation => :"StreamsApi.list_stream",
|
170
|
+
:header_params => header_params,
|
171
|
+
:query_params => query_params,
|
172
|
+
:form_params => form_params,
|
173
|
+
:body => post_body,
|
174
|
+
:auth_names => auth_names,
|
175
|
+
:return_type => return_type
|
176
|
+
)
|
177
|
+
|
178
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug "API called: StreamsApi#list_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
181
|
+
end
|
182
|
+
return data, status_code, headers
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|