svix 1.25.0 → 1.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/svix/api/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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 137159e57b6b673d13577f4f6707cacb923cc9c31f00280487d5877073eec8b5
|
4
|
+
data.tar.gz: a4a8cfbf51502fee0f60119fa61305c83286130295c75db822fd55f76c4fd082
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d511f01e9d2d071d878f859d3ebfc363158930c1f30b470a729d381087a12a7e55c61c47bf07c7a1394a24c102a52a9ac9ec1d45d34fe721287fba280478070b
|
7
|
+
data.tar.gz: 23ef12bff4592bc625826d993852144052b9d9915aa9d3fa973a49527fe1a2d3583233ab169b11058a6363593647bf72e8d768482791b3bec417329d0f510182
|
data/Gemfile.lock
CHANGED
@@ -106,6 +106,93 @@ module Svix
|
|
106
106
|
return data, status_code, headers
|
107
107
|
end
|
108
108
|
|
109
|
+
# Create Cmg Token
|
110
|
+
# Create a new access token that only allows creating messages inside this application.
|
111
|
+
# @param app_id [String] The app's ID or UID
|
112
|
+
# @param create_message_token_in [CreateMessageTokenIn]
|
113
|
+
# @param [Hash] opts the optional parameters
|
114
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
115
|
+
# @return [AuthTokenOut]
|
116
|
+
def v1_authentication_create_message_token(app_id, create_message_token_in, opts = {})
|
117
|
+
data, _status_code, _headers = v1_authentication_create_message_token_with_http_info(app_id, create_message_token_in, opts)
|
118
|
+
data
|
119
|
+
end
|
120
|
+
|
121
|
+
# Create Cmg Token
|
122
|
+
# Create a new access token that only allows creating messages inside this application.
|
123
|
+
# @param app_id [String] The app's ID or UID
|
124
|
+
# @param create_message_token_in [CreateMessageTokenIn]
|
125
|
+
# @param [Hash] opts the optional parameters
|
126
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
127
|
+
# @return [Array<(AuthTokenOut, Integer, Hash)>] AuthTokenOut data, response status code and response headers
|
128
|
+
def v1_authentication_create_message_token_with_http_info(app_id, create_message_token_in, opts = {})
|
129
|
+
if @api_client.config.debugging
|
130
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.v1_authentication_create_message_token ...'
|
131
|
+
end
|
132
|
+
# verify the required parameter 'app_id' is set
|
133
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
134
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AuthenticationApi.v1_authentication_create_message_token"
|
135
|
+
end
|
136
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
137
|
+
fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_create_message_token, the character length must be smaller than or equal to 256.'
|
138
|
+
end
|
139
|
+
|
140
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
141
|
+
fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_create_message_token, the character length must be great than or equal to 1.'
|
142
|
+
end
|
143
|
+
|
144
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
145
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
146
|
+
fail ArgumentError, "invalid value for 'app_id' when calling AuthenticationApi.v1_authentication_create_message_token, must conform to the pattern #{pattern}."
|
147
|
+
end
|
148
|
+
|
149
|
+
# verify the required parameter 'create_message_token_in' is set
|
150
|
+
if @api_client.config.client_side_validation && create_message_token_in.nil?
|
151
|
+
fail ArgumentError, "Missing the required parameter 'create_message_token_in' when calling AuthenticationApi.v1_authentication_create_message_token"
|
152
|
+
end
|
153
|
+
# resource path
|
154
|
+
local_var_path = '/api/v1/auth/app/{app_id}/create-message-token'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = opts[:query_params] || {}
|
158
|
+
|
159
|
+
# header parameters
|
160
|
+
header_params = opts[:header_params] || {}
|
161
|
+
# HTTP header 'Accept' (if needed)
|
162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
163
|
+
# HTTP header 'Content-Type'
|
164
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
165
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
166
|
+
|
167
|
+
# form parameters
|
168
|
+
form_params = opts[:form_params] || {}
|
169
|
+
|
170
|
+
# http body (model)
|
171
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_message_token_in)
|
172
|
+
|
173
|
+
# return_type
|
174
|
+
return_type = opts[:debug_return_type] || 'AuthTokenOut'
|
175
|
+
|
176
|
+
# auth_names
|
177
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
178
|
+
|
179
|
+
new_options = opts.merge(
|
180
|
+
:operation => :"AuthenticationApi.v1_authentication_create_message_token",
|
181
|
+
:header_params => header_params,
|
182
|
+
:query_params => query_params,
|
183
|
+
:form_params => form_params,
|
184
|
+
:body => post_body,
|
185
|
+
:auth_names => auth_names,
|
186
|
+
:return_type => return_type
|
187
|
+
)
|
188
|
+
|
189
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
190
|
+
if @api_client.config.debugging
|
191
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#v1_authentication_create_message_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
192
|
+
end
|
193
|
+
return data, status_code, headers
|
194
|
+
end
|
195
|
+
|
109
196
|
# Dashboard Access
|
110
197
|
# DEPRECATED: Please use `app-portal-access` instead. Use this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.
|
111
198
|
# @param app_id [String] The app's ID or UID
|
data/lib/svix/api/events_api.rb
CHANGED
@@ -27,7 +27,7 @@ module Svix
|
|
27
27
|
# @option opts [Array<String>] :event_types Filter response based on the event type
|
28
28
|
# @option opts [Array<String>] :channels Filter response based on the event type
|
29
29
|
# @option opts [Time] :after
|
30
|
-
# @return [
|
30
|
+
# @return [MessageEventsOut]
|
31
31
|
def v1_events(opts = {})
|
32
32
|
data, _status_code, _headers = v1_events_with_http_info(opts)
|
33
33
|
data
|
@@ -41,7 +41,7 @@ module Svix
|
|
41
41
|
# @option opts [Array<String>] :event_types Filter response based on the event type
|
42
42
|
# @option opts [Array<String>] :channels Filter response based on the event type
|
43
43
|
# @option opts [Time] :after
|
44
|
-
# @return [Array<(
|
44
|
+
# @return [Array<(MessageEventsOut, Integer, Hash)>] MessageEventsOut data, response status code and response headers
|
45
45
|
def v1_events_with_http_info(opts = {})
|
46
46
|
if @api_client.config.debugging
|
47
47
|
@api_client.config.logger.debug 'Calling API: EventsApi.v1_events ...'
|
@@ -77,7 +77,7 @@ module Svix
|
|
77
77
|
post_body = opts[:debug_body]
|
78
78
|
|
79
79
|
# return_type
|
80
|
-
return_type = opts[:debug_return_type] || '
|
80
|
+
return_type = opts[:debug_return_type] || 'MessageEventsOut'
|
81
81
|
|
82
82
|
# auth_names
|
83
83
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
data/lib/svix/api/message_api.rb
CHANGED
@@ -215,7 +215,106 @@ module Svix
|
|
215
215
|
return data, status_code, headers
|
216
216
|
end
|
217
217
|
|
218
|
-
#
|
218
|
+
# Message Events
|
219
|
+
# Reads the stream of created messages for an application
|
220
|
+
# @param app_id [String] The app's ID or UID
|
221
|
+
# @param [Hash] opts the optional parameters
|
222
|
+
# @option opts [Integer] :limit Limit the number of returned items
|
223
|
+
# @option opts [String] :iterator The iterator returned from a prior invocation
|
224
|
+
# @option opts [Array<String>] :event_types Filter response based on the event type
|
225
|
+
# @option opts [Array<String>] :channels Filter response based on the event type
|
226
|
+
# @option opts [Time] :after
|
227
|
+
# @return [MessageEventsOut]
|
228
|
+
def v1_message_events(app_id, opts = {})
|
229
|
+
data, _status_code, _headers = v1_message_events_with_http_info(app_id, opts)
|
230
|
+
data
|
231
|
+
end
|
232
|
+
|
233
|
+
# Message Events
|
234
|
+
# Reads the stream of created messages for an application
|
235
|
+
# @param app_id [String] The app's ID or UID
|
236
|
+
# @param [Hash] opts the optional parameters
|
237
|
+
# @option opts [Integer] :limit Limit the number of returned items
|
238
|
+
# @option opts [String] :iterator The iterator returned from a prior invocation
|
239
|
+
# @option opts [Array<String>] :event_types Filter response based on the event type
|
240
|
+
# @option opts [Array<String>] :channels Filter response based on the event type
|
241
|
+
# @option opts [Time] :after
|
242
|
+
# @return [Array<(MessageEventsOut, Integer, Hash)>] MessageEventsOut data, response status code and response headers
|
243
|
+
def v1_message_events_with_http_info(app_id, opts = {})
|
244
|
+
if @api_client.config.debugging
|
245
|
+
@api_client.config.logger.debug 'Calling API: MessageApi.v1_message_events ...'
|
246
|
+
end
|
247
|
+
# verify the required parameter 'app_id' is set
|
248
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
249
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageApi.v1_message_events"
|
250
|
+
end
|
251
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
252
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_message_events, the character length must be smaller than or equal to 256.'
|
253
|
+
end
|
254
|
+
|
255
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
256
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_message_events, the character length must be great than or equal to 1.'
|
257
|
+
end
|
258
|
+
|
259
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
260
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
261
|
+
fail ArgumentError, "invalid value for 'app_id' when calling MessageApi.v1_message_events, must conform to the pattern #{pattern}."
|
262
|
+
end
|
263
|
+
|
264
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
265
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.v1_message_events, must be smaller than or equal to 250.'
|
266
|
+
end
|
267
|
+
|
268
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
269
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.v1_message_events, must be greater than or equal to 1.'
|
270
|
+
end
|
271
|
+
|
272
|
+
# resource path
|
273
|
+
local_var_path = '/api/v1/app/{app_id}/events'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
274
|
+
|
275
|
+
# query parameters
|
276
|
+
query_params = opts[:query_params] || {}
|
277
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
278
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
279
|
+
query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
280
|
+
query_params[:'channels'] = @api_client.build_collection_param(opts[:'channels'], :multi) if !opts[:'channels'].nil?
|
281
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
282
|
+
|
283
|
+
# header parameters
|
284
|
+
header_params = opts[:header_params] || {}
|
285
|
+
# HTTP header 'Accept' (if needed)
|
286
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
287
|
+
|
288
|
+
# form parameters
|
289
|
+
form_params = opts[:form_params] || {}
|
290
|
+
|
291
|
+
# http body (model)
|
292
|
+
post_body = opts[:debug_body]
|
293
|
+
|
294
|
+
# return_type
|
295
|
+
return_type = opts[:debug_return_type] || 'MessageEventsOut'
|
296
|
+
|
297
|
+
# auth_names
|
298
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
299
|
+
|
300
|
+
new_options = opts.merge(
|
301
|
+
:operation => :"MessageApi.v1_message_events",
|
302
|
+
:header_params => header_params,
|
303
|
+
:query_params => query_params,
|
304
|
+
:form_params => form_params,
|
305
|
+
:body => post_body,
|
306
|
+
:auth_names => auth_names,
|
307
|
+
:return_type => return_type
|
308
|
+
)
|
309
|
+
|
310
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
311
|
+
if @api_client.config.debugging
|
312
|
+
@api_client.config.logger.debug "API called: MessageApi#v1_message_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
313
|
+
end
|
314
|
+
return data, status_code, headers
|
315
|
+
end
|
316
|
+
|
317
|
+
# Message Events Subscription
|
219
318
|
# Reads the stream of created messages for an application, but using server-managed iterator tracking.
|
220
319
|
# @param app_id [String] The app's ID or UID
|
221
320
|
# @param subscription_id [String] The esub's ID or UID
|
@@ -225,13 +324,13 @@ module Svix
|
|
225
324
|
# @option opts [Array<String>] :event_types Filter response based on the event type
|
226
325
|
# @option opts [Array<String>] :channels Filter response based on the event type
|
227
326
|
# @option opts [Time] :after
|
228
|
-
# @return [
|
327
|
+
# @return [MessageEventsOut]
|
229
328
|
def v1_message_events_subscription(app_id, subscription_id, opts = {})
|
230
329
|
data, _status_code, _headers = v1_message_events_subscription_with_http_info(app_id, subscription_id, opts)
|
231
330
|
data
|
232
331
|
end
|
233
332
|
|
234
|
-
#
|
333
|
+
# Message Events Subscription
|
235
334
|
# Reads the stream of created messages for an application, but using server-managed iterator tracking.
|
236
335
|
# @param app_id [String] The app's ID or UID
|
237
336
|
# @param subscription_id [String] The esub's ID or UID
|
@@ -241,7 +340,7 @@ module Svix
|
|
241
340
|
# @option opts [Array<String>] :event_types Filter response based on the event type
|
242
341
|
# @option opts [Array<String>] :channels Filter response based on the event type
|
243
342
|
# @option opts [Time] :after
|
244
|
-
# @return [Array<(
|
343
|
+
# @return [Array<(MessageEventsOut, Integer, Hash)>] MessageEventsOut data, response status code and response headers
|
245
344
|
def v1_message_events_subscription_with_http_info(app_id, subscription_id, opts = {})
|
246
345
|
if @api_client.config.debugging
|
247
346
|
@api_client.config.logger.debug 'Calling API: MessageApi.v1_message_events_subscription ...'
|
@@ -311,7 +410,7 @@ module Svix
|
|
311
410
|
post_body = opts[:debug_body]
|
312
411
|
|
313
412
|
# return_type
|
314
|
-
return_type = opts[:debug_return_type] || '
|
413
|
+
return_type = opts[:debug_return_type] || 'MessageEventsOut'
|
315
414
|
|
316
415
|
# auth_names
|
317
416
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
@@ -333,7 +432,7 @@ module Svix
|
|
333
432
|
return data, status_code, headers
|
334
433
|
end
|
335
434
|
|
336
|
-
#
|
435
|
+
# Message Events Create Token
|
337
436
|
# Creates an auth token that can be used with the `v1.message.events-subscription` endpoint
|
338
437
|
# @param app_id [String] The app's ID or UID
|
339
438
|
# @param subscription_id [String] The esub's ID or UID
|
@@ -345,7 +444,7 @@ module Svix
|
|
345
444
|
data
|
346
445
|
end
|
347
446
|
|
348
|
-
#
|
447
|
+
# Message Events Create Token
|
349
448
|
# Creates an auth token that can be used with the `v1.message.events-subscription` endpoint
|
350
449
|
# @param app_id [String] The app's ID or UID
|
351
450
|
# @param subscription_id [String] The esub's ID or UID
|
@@ -391,7 +490,7 @@ module Svix
|
|
391
490
|
end
|
392
491
|
|
393
492
|
# resource path
|
394
|
-
local_var_path = '/api/v1/app/{app_id}/events/subscription/{subscription_id}/
|
493
|
+
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
494
|
|
396
495
|
# query parameters
|
397
496
|
query_params = opts[:query_params] || {}
|
@@ -844,104 +943,5 @@ module Svix
|
|
844
943
|
end
|
845
944
|
return data, status_code, headers
|
846
945
|
end
|
847
|
-
|
848
|
-
# Stream Events
|
849
|
-
# Reads the stream of created messages for an application
|
850
|
-
# @param app_id [String] The app's ID or UID
|
851
|
-
# @param [Hash] opts the optional parameters
|
852
|
-
# @option opts [Integer] :limit Limit the number of returned items
|
853
|
-
# @option opts [String] :iterator The iterator returned from a prior invocation
|
854
|
-
# @option opts [Array<String>] :event_types Filter response based on the event type
|
855
|
-
# @option opts [Array<String>] :channels Filter response based on the event type
|
856
|
-
# @option opts [Time] :after
|
857
|
-
# @return [MessageStreamOut]
|
858
|
-
def v1_message_stream(app_id, opts = {})
|
859
|
-
data, _status_code, _headers = v1_message_stream_with_http_info(app_id, opts)
|
860
|
-
data
|
861
|
-
end
|
862
|
-
|
863
|
-
# Stream Events
|
864
|
-
# Reads the stream of created messages for an application
|
865
|
-
# @param app_id [String] The app's ID or UID
|
866
|
-
# @param [Hash] opts the optional parameters
|
867
|
-
# @option opts [Integer] :limit Limit the number of returned items
|
868
|
-
# @option opts [String] :iterator The iterator returned from a prior invocation
|
869
|
-
# @option opts [Array<String>] :event_types Filter response based on the event type
|
870
|
-
# @option opts [Array<String>] :channels Filter response based on the event type
|
871
|
-
# @option opts [Time] :after
|
872
|
-
# @return [Array<(MessageStreamOut, Integer, Hash)>] MessageStreamOut data, response status code and response headers
|
873
|
-
def v1_message_stream_with_http_info(app_id, opts = {})
|
874
|
-
if @api_client.config.debugging
|
875
|
-
@api_client.config.logger.debug 'Calling API: MessageApi.v1_message_stream ...'
|
876
|
-
end
|
877
|
-
# verify the required parameter 'app_id' is set
|
878
|
-
if @api_client.config.client_side_validation && app_id.nil?
|
879
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageApi.v1_message_stream"
|
880
|
-
end
|
881
|
-
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
882
|
-
fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_message_stream, the character length must be smaller than or equal to 256.'
|
883
|
-
end
|
884
|
-
|
885
|
-
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
886
|
-
fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_message_stream, the character length must be great than or equal to 1.'
|
887
|
-
end
|
888
|
-
|
889
|
-
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
890
|
-
if @api_client.config.client_side_validation && app_id !~ pattern
|
891
|
-
fail ArgumentError, "invalid value for 'app_id' when calling MessageApi.v1_message_stream, must conform to the pattern #{pattern}."
|
892
|
-
end
|
893
|
-
|
894
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
895
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.v1_message_stream, must be smaller than or equal to 250.'
|
896
|
-
end
|
897
|
-
|
898
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
899
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.v1_message_stream, must be greater than or equal to 1.'
|
900
|
-
end
|
901
|
-
|
902
|
-
# resource path
|
903
|
-
local_var_path = '/api/v1/app/{app_id}/events'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
904
|
-
|
905
|
-
# query parameters
|
906
|
-
query_params = opts[:query_params] || {}
|
907
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
908
|
-
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
909
|
-
query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
910
|
-
query_params[:'channels'] = @api_client.build_collection_param(opts[:'channels'], :multi) if !opts[:'channels'].nil?
|
911
|
-
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
912
|
-
|
913
|
-
# header parameters
|
914
|
-
header_params = opts[:header_params] || {}
|
915
|
-
# HTTP header 'Accept' (if needed)
|
916
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
917
|
-
|
918
|
-
# form parameters
|
919
|
-
form_params = opts[:form_params] || {}
|
920
|
-
|
921
|
-
# http body (model)
|
922
|
-
post_body = opts[:debug_body]
|
923
|
-
|
924
|
-
# return_type
|
925
|
-
return_type = opts[:debug_return_type] || 'MessageStreamOut'
|
926
|
-
|
927
|
-
# auth_names
|
928
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
929
|
-
|
930
|
-
new_options = opts.merge(
|
931
|
-
:operation => :"MessageApi.v1_message_stream",
|
932
|
-
:header_params => header_params,
|
933
|
-
:query_params => query_params,
|
934
|
-
:form_params => form_params,
|
935
|
-
:body => post_body,
|
936
|
-
:auth_names => auth_names,
|
937
|
-
:return_type => return_type
|
938
|
-
)
|
939
|
-
|
940
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
941
|
-
if @api_client.config.debugging
|
942
|
-
@api_client.config.logger.debug "API called: MessageApi#v1_message_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
943
|
-
end
|
944
|
-
return data, status_code, headers
|
945
|
-
end
|
946
946
|
end
|
947
947
|
end
|
@@ -24,6 +24,8 @@ module Svix
|
|
24
24
|
|
25
25
|
attr_accessor :name
|
26
26
|
|
27
|
+
attr_accessor :scopes
|
28
|
+
|
27
29
|
attr_accessor :token
|
28
30
|
|
29
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -33,6 +35,7 @@ module Svix
|
|
33
35
|
:'expires_at' => :'expiresAt',
|
34
36
|
:'id' => :'id',
|
35
37
|
:'name' => :'name',
|
38
|
+
:'scopes' => :'scopes',
|
36
39
|
:'token' => :'token'
|
37
40
|
}
|
38
41
|
end
|
@@ -49,6 +52,7 @@ module Svix
|
|
49
52
|
:'expires_at' => :'Time',
|
50
53
|
:'id' => :'String',
|
51
54
|
:'name' => :'String',
|
55
|
+
:'scopes' => :'Array<String>',
|
52
56
|
:'token' => :'String'
|
53
57
|
}
|
54
58
|
end
|
@@ -58,6 +62,7 @@ module Svix
|
|
58
62
|
Set.new([
|
59
63
|
:'expires_at',
|
60
64
|
:'name',
|
65
|
+
:'scopes',
|
61
66
|
])
|
62
67
|
end
|
63
68
|
|
@@ -92,6 +97,12 @@ module Svix
|
|
92
97
|
self.name = attributes[:'name']
|
93
98
|
end
|
94
99
|
|
100
|
+
if attributes.key?(:'scopes')
|
101
|
+
if (value = attributes[:'scopes']).is_a?(Array)
|
102
|
+
self.scopes = value
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
95
106
|
if attributes.key?(:'token')
|
96
107
|
self.token = attributes[:'token']
|
97
108
|
end
|
@@ -134,6 +145,7 @@ module Svix
|
|
134
145
|
expires_at == o.expires_at &&
|
135
146
|
id == o.id &&
|
136
147
|
name == o.name &&
|
148
|
+
scopes == o.scopes &&
|
137
149
|
token == o.token
|
138
150
|
end
|
139
151
|
|
@@ -146,7 +158,7 @@ module Svix
|
|
146
158
|
# Calculates hash code according to all attributes.
|
147
159
|
# @return [Integer] Hash code
|
148
160
|
def hash
|
149
|
-
[created_at, expires_at, id, name, token].hash
|
161
|
+
[created_at, expires_at, id, name, scopes, token].hash
|
150
162
|
end
|
151
163
|
|
152
164
|
# Builds the object from hash
|
@@ -17,10 +17,13 @@ module Svix
|
|
17
17
|
class EventOut
|
18
18
|
attr_accessor :payload
|
19
19
|
|
20
|
+
attr_accessor :timestamp
|
21
|
+
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
23
|
def self.attribute_map
|
22
24
|
{
|
23
|
-
:'payload' => :'payload'
|
25
|
+
:'payload' => :'payload',
|
26
|
+
:'timestamp' => :'timestamp'
|
24
27
|
}
|
25
28
|
end
|
26
29
|
|
@@ -32,7 +35,8 @@ module Svix
|
|
32
35
|
# Attribute type mapping.
|
33
36
|
def self.openapi_types
|
34
37
|
{
|
35
|
-
:'payload' => :'String'
|
38
|
+
:'payload' => :'String',
|
39
|
+
:'timestamp' => :'Time'
|
36
40
|
}
|
37
41
|
end
|
38
42
|
|
@@ -60,6 +64,10 @@ module Svix
|
|
60
64
|
if attributes.key?(:'payload')
|
61
65
|
self.payload = attributes[:'payload']
|
62
66
|
end
|
67
|
+
|
68
|
+
if attributes.key?(:'timestamp')
|
69
|
+
self.timestamp = attributes[:'timestamp']
|
70
|
+
end
|
63
71
|
end
|
64
72
|
|
65
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -70,6 +78,10 @@ module Svix
|
|
70
78
|
invalid_properties.push('invalid value for "payload", payload cannot be nil.')
|
71
79
|
end
|
72
80
|
|
81
|
+
if @timestamp.nil?
|
82
|
+
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
83
|
+
end
|
84
|
+
|
73
85
|
invalid_properties
|
74
86
|
end
|
75
87
|
|
@@ -77,6 +89,7 @@ module Svix
|
|
77
89
|
# @return true if the model is valid
|
78
90
|
def valid?
|
79
91
|
return false if @payload.nil?
|
92
|
+
return false if @timestamp.nil?
|
80
93
|
true
|
81
94
|
end
|
82
95
|
|
@@ -85,7 +98,8 @@ module Svix
|
|
85
98
|
def ==(o)
|
86
99
|
return true if self.equal?(o)
|
87
100
|
self.class == o.class &&
|
88
|
-
payload == o.payload
|
101
|
+
payload == o.payload &&
|
102
|
+
timestamp == o.timestamp
|
89
103
|
end
|
90
104
|
|
91
105
|
# @see the `==` method
|
@@ -97,7 +111,7 @@ module Svix
|
|
97
111
|
# Calculates hash code according to all attributes.
|
98
112
|
# @return [Integer] Hash code
|
99
113
|
def hash
|
100
|
-
[payload].hash
|
114
|
+
[payload, timestamp].hash
|
101
115
|
end
|
102
116
|
|
103
117
|
# Builds the object from hash
|
@@ -14,22 +14,19 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Svix
|
17
|
-
class
|
17
|
+
class EventStreamOut
|
18
18
|
attr_accessor :data
|
19
19
|
|
20
20
|
attr_accessor :done
|
21
21
|
|
22
22
|
attr_accessor :iterator
|
23
23
|
|
24
|
-
attr_accessor :prev_iterator
|
25
|
-
|
26
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
27
25
|
def self.attribute_map
|
28
26
|
{
|
29
27
|
:'data' => :'data',
|
30
28
|
:'done' => :'done',
|
31
|
-
:'iterator' => :'iterator'
|
32
|
-
:'prev_iterator' => :'prevIterator'
|
29
|
+
:'iterator' => :'iterator'
|
33
30
|
}
|
34
31
|
end
|
35
32
|
|
@@ -43,16 +40,13 @@ module Svix
|
|
43
40
|
{
|
44
41
|
:'data' => :'Array<EventOut>',
|
45
42
|
:'done' => :'Boolean',
|
46
|
-
:'iterator' => :'String'
|
47
|
-
:'prev_iterator' => :'String'
|
43
|
+
:'iterator' => :'String'
|
48
44
|
}
|
49
45
|
end
|
50
46
|
|
51
47
|
# List of attributes with nullable: true
|
52
48
|
def self.openapi_nullable
|
53
49
|
Set.new([
|
54
|
-
:'iterator',
|
55
|
-
:'prev_iterator'
|
56
50
|
])
|
57
51
|
end
|
58
52
|
|
@@ -60,13 +54,13 @@ module Svix
|
|
60
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
61
55
|
def initialize(attributes = {})
|
62
56
|
if (!attributes.is_a?(Hash))
|
63
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::EventStreamOut` initialize method"
|
64
58
|
end
|
65
59
|
|
66
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
67
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::EventStreamOut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
64
|
end
|
71
65
|
h[k.to_sym] = v
|
72
66
|
}
|
@@ -84,10 +78,6 @@ module Svix
|
|
84
78
|
if attributes.key?(:'iterator')
|
85
79
|
self.iterator = attributes[:'iterator']
|
86
80
|
end
|
87
|
-
|
88
|
-
if attributes.key?(:'prev_iterator')
|
89
|
-
self.prev_iterator = attributes[:'prev_iterator']
|
90
|
-
end
|
91
81
|
end
|
92
82
|
|
93
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -102,6 +92,10 @@ module Svix
|
|
102
92
|
invalid_properties.push('invalid value for "done", done cannot be nil.')
|
103
93
|
end
|
104
94
|
|
95
|
+
if @iterator.nil?
|
96
|
+
invalid_properties.push('invalid value for "iterator", iterator cannot be nil.')
|
97
|
+
end
|
98
|
+
|
105
99
|
invalid_properties
|
106
100
|
end
|
107
101
|
|
@@ -110,6 +104,7 @@ module Svix
|
|
110
104
|
def valid?
|
111
105
|
return false if @data.nil?
|
112
106
|
return false if @done.nil?
|
107
|
+
return false if @iterator.nil?
|
113
108
|
true
|
114
109
|
end
|
115
110
|
|
@@ -120,8 +115,7 @@ module Svix
|
|
120
115
|
self.class == o.class &&
|
121
116
|
data == o.data &&
|
122
117
|
done == o.done &&
|
123
|
-
iterator == o.iterator
|
124
|
-
prev_iterator == o.prev_iterator
|
118
|
+
iterator == o.iterator
|
125
119
|
end
|
126
120
|
|
127
121
|
# @see the `==` method
|
@@ -133,7 +127,7 @@ module Svix
|
|
133
127
|
# Calculates hash code according to all attributes.
|
134
128
|
# @return [Integer] Hash code
|
135
129
|
def hash
|
136
|
-
[data, done, iterator
|
130
|
+
[data, done, iterator].hash
|
137
131
|
end
|
138
132
|
|
139
133
|
# Builds the object from hash
|