svix 1.25.0 → 1.27.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/authentication_api.rb +87 -0
- data/lib/svix/api/events_api.rb +3 -3
- data/lib/svix/api/message_api.rb +107 -107
- data/lib/svix/models/auth_token_out.rb +13 -1
- data/lib/svix/models/event_out.rb +18 -4
- data/lib/svix/models/{list_response_event_out.rb → event_stream_out.rb} +12 -18
- data/lib/svix/models/event_type_in.rb +38 -1
- data/lib/svix/models/event_type_out.rb +38 -1
- data/lib/svix/models/event_type_patch.rb +38 -1
- data/lib/svix/models/event_type_update.rb +38 -1
- data/lib/svix/models/{message_stream_out.rb → message_events_out.rb} +3 -3
- data/lib/svix/models/message_subscriber_auth_token_out.rb +10 -10
- data/lib/svix/version.rb +1 -1
- metadata +4 -5
- data/lib/svix/api/streams_api.rb +0 -185
data/lib/svix/api/streams_api.rb
DELETED
@@ -1,185 +0,0 @@
|
|
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
|