svix 1.43.0 → 1.45.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 +14 -14
- data/lib/svix/api/authentication_api.rb +217 -13
- data/lib/svix/api/background_tasks_api.rb +4 -4
- data/lib/svix/api/broadcast_api.rb +2 -2
- data/lib/svix/api/endpoint_api.rb +45 -45
- data/lib/svix/api/environment_api.rb +2 -2
- data/lib/svix/api/environment_settings_api.rb +2 -2
- data/lib/svix/api/event_type_api.rb +12 -12
- data/lib/svix/api/events_api.rb +4 -4
- data/lib/svix/api/inbound_api.rb +2 -2
- data/lib/svix/api/message_api.rb +162 -26
- data/lib/svix/api/message_attempt_api.rb +6 -6
- data/lib/svix/api/statistics_api.rb +10 -10
- data/lib/svix/api/transformation_template_api.rb +24 -24
- data/lib/svix/endpoint_api.rb +1 -1
- data/lib/svix/message_api.rb +1 -1
- data/lib/svix/models/application_in.rb +1 -1
- data/lib/svix/models/{create_message_token_in.rb → create_token_in.rb} +3 -3
- data/lib/svix/models/endpoint_in.rb +3 -3
- data/lib/svix/models/endpoint_oauth_config_in.rb +1 -1
- data/lib/svix/models/endpoint_out.rb +3 -3
- data/lib/svix/models/endpoint_patch.rb +1 -1
- data/lib/svix/models/endpoint_secret_out.rb +1 -1
- data/lib/svix/models/endpoint_secret_rotate_in.rb +1 -1
- data/lib/svix/models/endpoint_update.rb +2 -2
- data/lib/svix/models/environment_in.rb +2 -4
- data/lib/svix/models/environment_out.rb +2 -4
- data/lib/svix/models/environment_settings_out.rb +12 -1
- data/lib/svix/models/event_type_example_out.rb +2 -4
- data/lib/svix/models/event_type_from_open_api.rb +2 -4
- data/lib/svix/models/event_type_import_open_api_in.rb +2 -4
- data/lib/svix/models/event_type_in.rb +2 -4
- data/lib/svix/models/event_type_out.rb +2 -4
- data/lib/svix/models/event_type_patch.rb +2 -4
- data/lib/svix/models/event_type_update.rb +2 -4
- data/lib/svix/models/message_broadcast_in.rb +2 -2
- data/lib/svix/models/message_endpoint_out.rb +3 -3
- data/lib/svix/models/message_in.rb +0 -9
- data/lib/svix/models/operational_webhook_endpoint_in.rb +2 -2
- data/lib/svix/models/operational_webhook_endpoint_out.rb +2 -2
- data/lib/svix/models/operational_webhook_endpoint_secret_in.rb +1 -1
- data/lib/svix/models/operational_webhook_endpoint_secret_out.rb +1 -1
- data/lib/svix/models/operational_webhook_endpoint_update.rb +1 -1
- data/lib/svix/models/rotate_poller_token_in.rb +280 -0
- data/lib/svix/models/sink_in.rb +2 -1
- data/lib/svix/models/sink_in_one_of4.rb +255 -0
- data/lib/svix/models/sink_out.rb +2 -1
- data/lib/svix/models/transformation_http_method.rb +2 -1
- data/lib/svix/version.rb +1 -1
- metadata +5 -3
data/lib/svix/api/message_api.rb
CHANGED
@@ -20,7 +20,7 @@ module Svix
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Create Message Attempt For Endpoint
|
23
|
-
# Creates and sends a message to the specified endpoint.
|
23
|
+
# Creates and sends a message to the specified endpoint. The message attempt and response from the endpoint is returned.
|
24
24
|
# @param app_id [String] The app's ID or UID
|
25
25
|
# @param endpoint_id [String] The ep's ID or UID
|
26
26
|
# @param message_in [MessageIn]
|
@@ -33,7 +33,7 @@ module Svix
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# Create Message Attempt For Endpoint
|
36
|
-
# Creates and sends a message to the specified endpoint.
|
36
|
+
# Creates and sends a message to the specified endpoint. The message attempt and response from the endpoint is returned.
|
37
37
|
# @param app_id [String] The app's ID or UID
|
38
38
|
# @param endpoint_id [String] The ep's ID or UID
|
39
39
|
# @param message_in [MessageIn]
|
@@ -128,12 +128,148 @@ module Svix
|
|
128
128
|
return data, status_code, headers
|
129
129
|
end
|
130
130
|
|
131
|
+
# Public Events
|
132
|
+
# Reads the stream of created messages for an application, filtered on the Sink's event types and Channels.
|
133
|
+
# @param app_id [String] The app's ID or UID
|
134
|
+
# @param sink_id [String] The ep's ID or UID
|
135
|
+
# @param [Hash] opts the optional parameters
|
136
|
+
# @option opts [Integer] :limit Limit the number of returned items
|
137
|
+
# @option opts [String] :iterator The iterator returned from a prior invocation
|
138
|
+
# @option opts [String] :event_type Filters messages sent with this event type (optional).
|
139
|
+
# @option opts [String] :channel Filters messages sent with this channel (optional).
|
140
|
+
# @option opts [Time] :after
|
141
|
+
# @return [MessageEventsOut]
|
142
|
+
def v1_events_public(app_id, sink_id, opts = {})
|
143
|
+
data, _status_code, _headers = v1_events_public_with_http_info(app_id, sink_id, opts)
|
144
|
+
data
|
145
|
+
end
|
146
|
+
|
147
|
+
# Public Events
|
148
|
+
# Reads the stream of created messages for an application, filtered on the Sink's event types and Channels.
|
149
|
+
# @param app_id [String] The app's ID or UID
|
150
|
+
# @param sink_id [String] The ep's ID or UID
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @option opts [Integer] :limit Limit the number of returned items
|
153
|
+
# @option opts [String] :iterator The iterator returned from a prior invocation
|
154
|
+
# @option opts [String] :event_type Filters messages sent with this event type (optional).
|
155
|
+
# @option opts [String] :channel Filters messages sent with this channel (optional).
|
156
|
+
# @option opts [Time] :after
|
157
|
+
# @return [Array<(MessageEventsOut, Integer, Hash)>] MessageEventsOut data, response status code and response headers
|
158
|
+
def v1_events_public_with_http_info(app_id, sink_id, opts = {})
|
159
|
+
if @api_client.config.debugging
|
160
|
+
@api_client.config.logger.debug 'Calling API: MessageApi.v1_events_public ...'
|
161
|
+
end
|
162
|
+
# verify the required parameter 'app_id' is set
|
163
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
164
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageApi.v1_events_public"
|
165
|
+
end
|
166
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
167
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_events_public, the character length must be smaller than or equal to 256.'
|
168
|
+
end
|
169
|
+
|
170
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
171
|
+
fail ArgumentError, 'invalid value for "app_id" when calling MessageApi.v1_events_public, the character length must be great than or equal to 1.'
|
172
|
+
end
|
173
|
+
|
174
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
175
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
176
|
+
fail ArgumentError, "invalid value for 'app_id' when calling MessageApi.v1_events_public, must conform to the pattern #{pattern}."
|
177
|
+
end
|
178
|
+
|
179
|
+
# verify the required parameter 'sink_id' is set
|
180
|
+
if @api_client.config.client_side_validation && sink_id.nil?
|
181
|
+
fail ArgumentError, "Missing the required parameter 'sink_id' when calling MessageApi.v1_events_public"
|
182
|
+
end
|
183
|
+
if @api_client.config.client_side_validation && sink_id.to_s.length > 256
|
184
|
+
fail ArgumentError, 'invalid value for "sink_id" when calling MessageApi.v1_events_public, the character length must be smaller than or equal to 256.'
|
185
|
+
end
|
186
|
+
|
187
|
+
if @api_client.config.client_side_validation && sink_id.to_s.length < 1
|
188
|
+
fail ArgumentError, 'invalid value for "sink_id" when calling MessageApi.v1_events_public, the character length must be great than or equal to 1.'
|
189
|
+
end
|
190
|
+
|
191
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
192
|
+
if @api_client.config.client_side_validation && sink_id !~ pattern
|
193
|
+
fail ArgumentError, "invalid value for 'sink_id' when calling MessageApi.v1_events_public, must conform to the pattern #{pattern}."
|
194
|
+
end
|
195
|
+
|
196
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
197
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.v1_events_public, must be smaller than or equal to 250.'
|
198
|
+
end
|
199
|
+
|
200
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
201
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.v1_events_public, must be greater than or equal to 1.'
|
202
|
+
end
|
203
|
+
|
204
|
+
if @api_client.config.client_side_validation && !opts[:'event_type'].nil? && opts[:'event_type'].to_s.length > 256
|
205
|
+
fail ArgumentError, 'invalid value for "opts[:"event_type"]" when calling MessageApi.v1_events_public, the character length must be smaller than or equal to 256.'
|
206
|
+
end
|
207
|
+
|
208
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
209
|
+
if @api_client.config.client_side_validation && !opts[:'event_type'].nil? && opts[:'event_type'] !~ pattern
|
210
|
+
fail ArgumentError, "invalid value for 'opts[:\"event_type\"]' when calling MessageApi.v1_events_public, must conform to the pattern #{pattern}."
|
211
|
+
end
|
212
|
+
|
213
|
+
if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
|
214
|
+
fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageApi.v1_events_public, the character length must be smaller than or equal to 128.'
|
215
|
+
end
|
216
|
+
|
217
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
|
218
|
+
if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
|
219
|
+
fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageApi.v1_events_public, must conform to the pattern #{pattern}."
|
220
|
+
end
|
221
|
+
|
222
|
+
# resource path
|
223
|
+
local_var_path = '/api/v1/app/{app_id}/poller/{sink_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'sink_id' + '}', CGI.escape(sink_id.to_s))
|
224
|
+
|
225
|
+
# query parameters
|
226
|
+
query_params = opts[:query_params] || {}
|
227
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
228
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
229
|
+
query_params[:'event_type'] = opts[:'event_type'] if !opts[:'event_type'].nil?
|
230
|
+
query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
|
231
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
232
|
+
|
233
|
+
# header parameters
|
234
|
+
header_params = opts[:header_params] || {}
|
235
|
+
# HTTP header 'Accept' (if needed)
|
236
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
237
|
+
|
238
|
+
# form parameters
|
239
|
+
form_params = opts[:form_params] || {}
|
240
|
+
|
241
|
+
# http body (model)
|
242
|
+
post_body = opts[:debug_body]
|
243
|
+
|
244
|
+
# return_type
|
245
|
+
return_type = opts[:debug_return_type] || 'MessageEventsOut'
|
246
|
+
|
247
|
+
# auth_names
|
248
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
249
|
+
|
250
|
+
new_options = opts.merge(
|
251
|
+
:operation => :"MessageApi.v1_events_public",
|
252
|
+
:header_params => header_params,
|
253
|
+
:query_params => query_params,
|
254
|
+
:form_params => form_params,
|
255
|
+
:body => post_body,
|
256
|
+
:auth_names => auth_names,
|
257
|
+
:return_type => return_type
|
258
|
+
)
|
259
|
+
|
260
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
261
|
+
if @api_client.config.debugging
|
262
|
+
@api_client.config.logger.debug "API called: MessageApi#v1_events_public\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
263
|
+
end
|
264
|
+
return data, status_code, headers
|
265
|
+
end
|
266
|
+
|
131
267
|
# Create Message
|
132
268
|
# 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.
|
133
269
|
# @param app_id [String] The app's ID or UID
|
134
270
|
# @param message_in [MessageIn]
|
135
271
|
# @param [Hash] opts the optional parameters
|
136
|
-
# @option opts [Boolean] :with_content When `true`
|
272
|
+
# @option opts [Boolean] :with_content When `true`, message payloads are included in the response. (default to true)
|
137
273
|
# @option opts [String] :idempotency_key The request's idempotency key
|
138
274
|
# @return [MessageOut]
|
139
275
|
def v1_message_create(app_id, message_in, opts = {})
|
@@ -146,7 +282,7 @@ module Svix
|
|
146
282
|
# @param app_id [String] The app's ID or UID
|
147
283
|
# @param message_in [MessageIn]
|
148
284
|
# @param [Hash] opts the optional parameters
|
149
|
-
# @option opts [Boolean] :with_content When `true`
|
285
|
+
# @option opts [Boolean] :with_content When `true`, message payloads are included in the response. (default to true)
|
150
286
|
# @option opts [String] :idempotency_key The request's idempotency key
|
151
287
|
# @return [Array<(MessageOut, Integer, Hash)>] MessageOut data, response status code and response headers
|
152
288
|
def v1_message_create_with_http_info(app_id, message_in, opts = {})
|
@@ -222,13 +358,13 @@ module Svix
|
|
222
358
|
end
|
223
359
|
|
224
360
|
# Message Events
|
225
|
-
# Reads the stream of created messages for an application
|
361
|
+
# Reads the stream of created messages for an application.
|
226
362
|
# @param app_id [String] The app's ID or UID
|
227
363
|
# @param [Hash] opts the optional parameters
|
228
364
|
# @option opts [Integer] :limit Limit the number of returned items
|
229
365
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
230
366
|
# @option opts [Array<String>] :event_types Filter response based on the event type
|
231
|
-
# @option opts [Array<String>] :channels Filter response based on the event type
|
367
|
+
# @option opts [Array<String>] :channels Filter response based on the event type.
|
232
368
|
# @option opts [Time] :after
|
233
369
|
# @return [MessageEventsOut]
|
234
370
|
def v1_message_events(app_id, opts = {})
|
@@ -237,13 +373,13 @@ module Svix
|
|
237
373
|
end
|
238
374
|
|
239
375
|
# Message Events
|
240
|
-
# Reads the stream of created messages for an application
|
376
|
+
# Reads the stream of created messages for an application.
|
241
377
|
# @param app_id [String] The app's ID or UID
|
242
378
|
# @param [Hash] opts the optional parameters
|
243
379
|
# @option opts [Integer] :limit Limit the number of returned items
|
244
380
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
245
381
|
# @option opts [Array<String>] :event_types Filter response based on the event type
|
246
|
-
# @option opts [Array<String>] :channels Filter response based on the event type
|
382
|
+
# @option opts [Array<String>] :channels Filter response based on the event type.
|
247
383
|
# @option opts [Time] :after
|
248
384
|
# @return [Array<(MessageEventsOut, Integer, Hash)>] MessageEventsOut data, response status code and response headers
|
249
385
|
def v1_message_events_with_http_info(app_id, opts = {})
|
@@ -328,7 +464,7 @@ module Svix
|
|
328
464
|
# @option opts [Integer] :limit Limit the number of returned items
|
329
465
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
330
466
|
# @option opts [Array<String>] :event_types Filter response based on the event type
|
331
|
-
# @option opts [Array<String>] :channels Filter response based on the event type
|
467
|
+
# @option opts [Array<String>] :channels Filter response based on the event type.
|
332
468
|
# @option opts [Time] :after
|
333
469
|
# @return [MessageEventsOut]
|
334
470
|
def v1_message_events_subscription(app_id, subscription_id, opts = {})
|
@@ -344,7 +480,7 @@ module Svix
|
|
344
480
|
# @option opts [Integer] :limit Limit the number of returned items
|
345
481
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
346
482
|
# @option opts [Array<String>] :event_types Filter response based on the event type
|
347
|
-
# @option opts [Array<String>] :channels Filter response based on the event type
|
483
|
+
# @option opts [Array<String>] :channels Filter response based on the event type.
|
348
484
|
# @option opts [Time] :after
|
349
485
|
# @return [Array<(MessageEventsOut, Integer, Hash)>] MessageEventsOut data, response status code and response headers
|
350
486
|
def v1_message_events_subscription_with_http_info(app_id, subscription_id, opts = {})
|
@@ -439,7 +575,7 @@ module Svix
|
|
439
575
|
end
|
440
576
|
|
441
577
|
# Message Events Create Token
|
442
|
-
# Creates an auth token that can be used with the `v1.message.events-subscription` endpoint
|
578
|
+
# Creates an auth token that can be used with the `v1.message.events-subscription` endpoint.
|
443
579
|
# @param app_id [String] The app's ID or UID
|
444
580
|
# @param subscription_id [String] The esub's ID or UID
|
445
581
|
# @param [Hash] opts the optional parameters
|
@@ -451,7 +587,7 @@ module Svix
|
|
451
587
|
end
|
452
588
|
|
453
589
|
# Message Events Create Token
|
454
|
-
# Creates an auth token that can be used with the `v1.message.events-subscription` endpoint
|
590
|
+
# Creates an auth token that can be used with the `v1.message.events-subscription` endpoint.
|
455
591
|
# @param app_id [String] The app's ID or UID
|
456
592
|
# @param subscription_id [String] The esub's ID or UID
|
457
593
|
# @param [Hash] opts the optional parameters
|
@@ -537,7 +673,7 @@ module Svix
|
|
537
673
|
end
|
538
674
|
|
539
675
|
# Delete message payload
|
540
|
-
# Delete the given message's payload.
|
676
|
+
# 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.
|
541
677
|
# @param app_id [String] The app's ID or UID
|
542
678
|
# @param msg_id [String] The msg's ID or UID
|
543
679
|
# @param [Hash] opts the optional parameters
|
@@ -548,7 +684,7 @@ module Svix
|
|
548
684
|
end
|
549
685
|
|
550
686
|
# Delete message payload
|
551
|
-
# Delete the given message's payload.
|
687
|
+
# 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.
|
552
688
|
# @param app_id [String] The app's ID or UID
|
553
689
|
# @param msg_id [String] The msg's ID or UID
|
554
690
|
# @param [Hash] opts the optional parameters
|
@@ -636,7 +772,7 @@ module Svix
|
|
636
772
|
# @param app_id [String] The app's ID or UID
|
637
773
|
# @param msg_id [String] The msg's ID or UID
|
638
774
|
# @param [Hash] opts the optional parameters
|
639
|
-
# @option opts [Boolean] :with_content When `true` message payloads are included in the response (default to true)
|
775
|
+
# @option opts [Boolean] :with_content When `true` message payloads are included in the response. (default to true)
|
640
776
|
# @return [MessageOut]
|
641
777
|
def v1_message_get(app_id, msg_id, opts = {})
|
642
778
|
data, _status_code, _headers = v1_message_get_with_http_info(app_id, msg_id, opts)
|
@@ -648,7 +784,7 @@ module Svix
|
|
648
784
|
# @param app_id [String] The app's ID or UID
|
649
785
|
# @param msg_id [String] The msg's ID or UID
|
650
786
|
# @param [Hash] opts the optional parameters
|
651
|
-
# @option opts [Boolean] :with_content When `true` message payloads are included in the response (default to true)
|
787
|
+
# @option opts [Boolean] :with_content When `true` message payloads are included in the response. (default to true)
|
652
788
|
# @return [Array<(MessageOut, Integer, Hash)>] MessageOut data, response status code and response headers
|
653
789
|
def v1_message_get_with_http_info(app_id, msg_id, opts = {})
|
654
790
|
if @api_client.config.debugging
|
@@ -830,11 +966,11 @@ module Svix
|
|
830
966
|
# @param [Hash] opts the optional parameters
|
831
967
|
# @option opts [Integer] :limit Limit the number of returned items
|
832
968
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
833
|
-
# @option opts [String] :channel Filter response based on the channel
|
834
|
-
# @option opts [Time] :before Only include items created before a certain date
|
835
|
-
# @option opts [Time] :after Only include items created after a certain date
|
836
|
-
# @option opts [Boolean] :with_content When `true` message payloads are included in the response (default to true)
|
837
|
-
# @option opts [String] :tag Filter messages matching the provided tag
|
969
|
+
# @option opts [String] :channel Filter response based on the channel.
|
970
|
+
# @option opts [Time] :before Only include items created before a certain date.
|
971
|
+
# @option opts [Time] :after Only include items created after a certain date.
|
972
|
+
# @option opts [Boolean] :with_content When `true` message payloads are included in the response. (default to true)
|
973
|
+
# @option opts [String] :tag Filter messages matching the provided tag.
|
838
974
|
# @option opts [Array<String>] :event_types Filter response based on the event type
|
839
975
|
# @return [ListResponseMessageOut]
|
840
976
|
def v1_message_list(app_id, opts = {})
|
@@ -848,11 +984,11 @@ module Svix
|
|
848
984
|
# @param [Hash] opts the optional parameters
|
849
985
|
# @option opts [Integer] :limit Limit the number of returned items
|
850
986
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
851
|
-
# @option opts [String] :channel Filter response based on the channel
|
852
|
-
# @option opts [Time] :before Only include items created before a certain date
|
853
|
-
# @option opts [Time] :after Only include items created after a certain date
|
854
|
-
# @option opts [Boolean] :with_content When `true` message payloads are included in the response (default to true)
|
855
|
-
# @option opts [String] :tag Filter messages matching the provided tag
|
987
|
+
# @option opts [String] :channel Filter response based on the channel.
|
988
|
+
# @option opts [Time] :before Only include items created before a certain date.
|
989
|
+
# @option opts [Time] :after Only include items created after a certain date.
|
990
|
+
# @option opts [Boolean] :with_content When `true` message payloads are included in the response. (default to true)
|
991
|
+
# @option opts [String] :tag Filter messages matching the provided tag.
|
856
992
|
# @option opts [Array<String>] :event_types Filter response based on the event type
|
857
993
|
# @return [Array<(ListResponseMessageOut, Integer, Hash)>] ListResponseMessageOut data, response status code and response headers
|
858
994
|
def v1_message_list_with_http_info(app_id, opts = {})
|
@@ -154,7 +154,7 @@ module Svix
|
|
154
154
|
end
|
155
155
|
|
156
156
|
# Delete attempt response body
|
157
|
-
# Deletes the given attempt's response body.
|
157
|
+
# Deletes the given attempt's response body. Useful when an endpoint accidentally returned sensitive content. The message can't be replayed or resent once its payload has been deleted or expired.
|
158
158
|
# @param app_id [String] The app's ID or UID
|
159
159
|
# @param msg_id [String] The msg's ID or UID
|
160
160
|
# @param attempt_id [String] The attempt's ID
|
@@ -166,7 +166,7 @@ module Svix
|
|
166
166
|
end
|
167
167
|
|
168
168
|
# Delete attempt response body
|
169
|
-
# Deletes the given attempt's response body.
|
169
|
+
# Deletes the given attempt's response body. Useful when an endpoint accidentally returned sensitive content. The message can't be replayed or resent once its payload has been deleted or expired.
|
170
170
|
# @param app_id [String] The app's ID or UID
|
171
171
|
# @param msg_id [String] The msg's ID or UID
|
172
172
|
# @param attempt_id [String] The attempt's ID
|
@@ -457,7 +457,7 @@ module Svix
|
|
457
457
|
end
|
458
458
|
|
459
459
|
# List Attempted Destinations
|
460
|
-
# List endpoints attempted by a given message.
|
460
|
+
# List endpoints attempted by a given message. Additionally includes metadata about the latest message attempt. By default, endpoints are listed in ascending order by ID.
|
461
461
|
# @param app_id [String] The app's ID or UID
|
462
462
|
# @param msg_id [String] The msg's ID or UID
|
463
463
|
# @param [Hash] opts the optional parameters
|
@@ -470,7 +470,7 @@ module Svix
|
|
470
470
|
end
|
471
471
|
|
472
472
|
# List Attempted Destinations
|
473
|
-
# List endpoints attempted by a given message.
|
473
|
+
# List endpoints attempted by a given message. Additionally includes metadata about the latest message attempt. By default, endpoints are listed in ascending order by ID.
|
474
474
|
# @param app_id [String] The app's ID or UID
|
475
475
|
# @param msg_id [String] The msg's ID or UID
|
476
476
|
# @param [Hash] opts the optional parameters
|
@@ -1032,7 +1032,7 @@ module Svix
|
|
1032
1032
|
end
|
1033
1033
|
|
1034
1034
|
# List Attempts By Msg
|
1035
|
-
# List attempts by message
|
1035
|
+
# List attempts by message ID. Note that by default this endpoint is limited to retrieving 90 days' worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the `before` or `after` parameter as appropriate.
|
1036
1036
|
# @param app_id [String] The app's ID or UID
|
1037
1037
|
# @param msg_id [String] The msg's ID or UID
|
1038
1038
|
# @param [Hash] opts the optional parameters
|
@@ -1054,7 +1054,7 @@ module Svix
|
|
1054
1054
|
end
|
1055
1055
|
|
1056
1056
|
# List Attempts By Msg
|
1057
|
-
# List attempts by message
|
1057
|
+
# List attempts by message ID. Note that by default this endpoint is limited to retrieving 90 days' worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the `before` or `after` parameter as appropriate.
|
1058
1058
|
# @param app_id [String] The app's ID or UID
|
1059
1059
|
# @param msg_id [String] The msg's ID or UID
|
1060
1060
|
# @param [Hash] opts the optional parameters
|
@@ -151,8 +151,8 @@ module Svix
|
|
151
151
|
# Returns application-level statistics on message attempts
|
152
152
|
# @param app_id [String] The app's ID or UID
|
153
153
|
# @param [Hash] opts the optional parameters
|
154
|
-
# @option opts [Time] :start_date Filter the range to data starting from this date
|
155
|
-
# @option opts [Time] :end_date Filter the range to data ending by this date
|
154
|
+
# @option opts [Time] :start_date Filter the range to data starting from this date.
|
155
|
+
# @option opts [Time] :end_date Filter the range to data ending by this date.
|
156
156
|
# @return [AttemptStatisticsResponse]
|
157
157
|
def v1_stats_app_attempts(app_id, opts = {})
|
158
158
|
data, _status_code, _headers = v1_stats_app_attempts_with_http_info(app_id, opts)
|
@@ -163,8 +163,8 @@ module Svix
|
|
163
163
|
# Returns application-level statistics on message attempts
|
164
164
|
# @param app_id [String] The app's ID or UID
|
165
165
|
# @param [Hash] opts the optional parameters
|
166
|
-
# @option opts [Time] :start_date Filter the range to data starting from this date
|
167
|
-
# @option opts [Time] :end_date Filter the range to data ending by this date
|
166
|
+
# @option opts [Time] :start_date Filter the range to data starting from this date.
|
167
|
+
# @option opts [Time] :end_date Filter the range to data ending by this date.
|
168
168
|
# @return [Array<(AttemptStatisticsResponse, Integer, Hash)>] AttemptStatisticsResponse data, response status code and response headers
|
169
169
|
def v1_stats_app_attempts_with_http_info(app_id, opts = {})
|
170
170
|
if @api_client.config.debugging
|
@@ -230,12 +230,12 @@ module Svix
|
|
230
230
|
end
|
231
231
|
|
232
232
|
# Get Ep Stats
|
233
|
-
# Returns endpoint-level statistics on message attempts
|
233
|
+
# Returns endpoint-level statistics on message attempts.
|
234
234
|
# @param app_id [String] The app's ID or UID
|
235
235
|
# @param endpoint_id [String] The ep's ID or UID
|
236
236
|
# @param [Hash] opts the optional parameters
|
237
|
-
# @option opts [Time] :start_date Filter the range to data starting from this date
|
238
|
-
# @option opts [Time] :end_date Filter the range to data ending by this date
|
237
|
+
# @option opts [Time] :start_date Filter the range to data starting from this date.
|
238
|
+
# @option opts [Time] :end_date Filter the range to data ending by this date.
|
239
239
|
# @return [AttemptStatisticsResponse]
|
240
240
|
def v1_stats_endpoint_attempts(app_id, endpoint_id, opts = {})
|
241
241
|
data, _status_code, _headers = v1_stats_endpoint_attempts_with_http_info(app_id, endpoint_id, opts)
|
@@ -243,12 +243,12 @@ module Svix
|
|
243
243
|
end
|
244
244
|
|
245
245
|
# Get Ep Stats
|
246
|
-
# Returns endpoint-level statistics on message attempts
|
246
|
+
# Returns endpoint-level statistics on message attempts.
|
247
247
|
# @param app_id [String] The app's ID or UID
|
248
248
|
# @param endpoint_id [String] The ep's ID or UID
|
249
249
|
# @param [Hash] opts the optional parameters
|
250
|
-
# @option opts [Time] :start_date Filter the range to data starting from this date
|
251
|
-
# @option opts [Time] :end_date Filter the range to data ending by this date
|
250
|
+
# @option opts [Time] :start_date Filter the range to data starting from this date.
|
251
|
+
# @option opts [Time] :end_date Filter the range to data ending by this date.
|
252
252
|
# @return [Array<(AttemptStatisticsResponse, Integer, Hash)>] AttemptStatisticsResponse data, response status code and response headers
|
253
253
|
def v1_stats_endpoint_attempts_with_http_info(app_id, endpoint_id, opts = {})
|
254
254
|
if @api_client.config.debugging
|
@@ -20,7 +20,7 @@ module Svix
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Update Hubspot Oauth Config
|
23
|
-
# Create/update endpoint
|
23
|
+
# Create/update endpoint Hubspot OAuth configuration Specific private endpoint just for us, to avoid exposing the Hubspot secret to the client.
|
24
24
|
# @param app_id [String] The app's ID or UID
|
25
25
|
# @param endpoint_id [String] The ep's ID or UID
|
26
26
|
# @param hubspot_oauth_config_in [HubspotOauthConfigIn]
|
@@ -32,7 +32,7 @@ module Svix
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# Update Hubspot Oauth Config
|
35
|
-
# Create/update endpoint
|
35
|
+
# Create/update endpoint Hubspot OAuth configuration Specific private endpoint just for us, to avoid exposing the Hubspot secret to the client.
|
36
36
|
# @param app_id [String] The app's ID or UID
|
37
37
|
# @param endpoint_id [String] The ep's ID or UID
|
38
38
|
# @param hubspot_oauth_config_in [HubspotOauthConfigIn]
|
@@ -126,7 +126,7 @@ module Svix
|
|
126
126
|
end
|
127
127
|
|
128
128
|
# Create Transformation Template
|
129
|
-
# Create a new transformation template
|
129
|
+
# Create a new transformation template.
|
130
130
|
# @param template_in [TemplateIn]
|
131
131
|
# @param [Hash] opts the optional parameters
|
132
132
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -137,7 +137,7 @@ module Svix
|
|
137
137
|
end
|
138
138
|
|
139
139
|
# Create Transformation Template
|
140
|
-
# Create a new transformation template
|
140
|
+
# Create a new transformation template.
|
141
141
|
# @param template_in [TemplateIn]
|
142
142
|
# @param [Hash] opts the optional parameters
|
143
143
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -197,7 +197,7 @@ module Svix
|
|
197
197
|
end
|
198
198
|
|
199
199
|
# Delete Transformation Template
|
200
|
-
# Delete a transformation template
|
200
|
+
# Delete a transformation template.
|
201
201
|
# @param transformation_template_id [String]
|
202
202
|
# @param [Hash] opts the optional parameters
|
203
203
|
# @return [nil]
|
@@ -207,7 +207,7 @@ module Svix
|
|
207
207
|
end
|
208
208
|
|
209
209
|
# Delete Transformation Template
|
210
|
-
# Delete a transformation template
|
210
|
+
# Delete a transformation template.
|
211
211
|
# @param transformation_template_id [String]
|
212
212
|
# @param [Hash] opts the optional parameters
|
213
213
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
@@ -260,7 +260,7 @@ module Svix
|
|
260
260
|
end
|
261
261
|
|
262
262
|
# Generate
|
263
|
-
# Use OpenAI's Completion API to generate code for a transformation template
|
263
|
+
# Use OpenAI's Completion API to generate code for a transformation template.
|
264
264
|
# @param generate_in [GenerateIn]
|
265
265
|
# @param [Hash] opts the optional parameters
|
266
266
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -271,7 +271,7 @@ module Svix
|
|
271
271
|
end
|
272
272
|
|
273
273
|
# Generate
|
274
|
-
# Use OpenAI's Completion API to generate code for a transformation template
|
274
|
+
# Use OpenAI's Completion API to generate code for a transformation template.
|
275
275
|
# @param generate_in [GenerateIn]
|
276
276
|
# @param [Hash] opts the optional parameters
|
277
277
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -331,7 +331,7 @@ module Svix
|
|
331
331
|
end
|
332
332
|
|
333
333
|
# Get Transformation Template
|
334
|
-
# Get a transformation template
|
334
|
+
# Get a transformation template.
|
335
335
|
# @param transformation_template_id [String]
|
336
336
|
# @param [Hash] opts the optional parameters
|
337
337
|
# @return [TemplateOut]
|
@@ -341,7 +341,7 @@ module Svix
|
|
341
341
|
end
|
342
342
|
|
343
343
|
# Get Transformation Template
|
344
|
-
# Get a transformation template
|
344
|
+
# Get a transformation template.
|
345
345
|
# @param transformation_template_id [String]
|
346
346
|
# @param [Hash] opts the optional parameters
|
347
347
|
# @return [Array<(TemplateOut, Integer, Hash)>] TemplateOut data, response status code and response headers
|
@@ -394,7 +394,7 @@ module Svix
|
|
394
394
|
end
|
395
395
|
|
396
396
|
# List Transformation Templates
|
397
|
-
# List all transformation templates for an application
|
397
|
+
# List all transformation templates for an application.
|
398
398
|
# @param [Hash] opts the optional parameters
|
399
399
|
# @option opts [Integer] :limit Limit the number of returned items
|
400
400
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
@@ -406,7 +406,7 @@ module Svix
|
|
406
406
|
end
|
407
407
|
|
408
408
|
# List Transformation Templates
|
409
|
-
# List all transformation templates for an application
|
409
|
+
# List all transformation templates for an application.
|
410
410
|
# @param [Hash] opts the optional parameters
|
411
411
|
# @option opts [Integer] :limit Limit the number of returned items
|
412
412
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
@@ -468,7 +468,7 @@ module Svix
|
|
468
468
|
end
|
469
469
|
|
470
470
|
# Authorize Discord
|
471
|
-
# Get Discord Incoming webhook URL
|
471
|
+
# Get Discord Incoming webhook URL.
|
472
472
|
# @param o_auth_payload_in [OAuthPayloadIn]
|
473
473
|
# @param [Hash] opts the optional parameters
|
474
474
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -479,7 +479,7 @@ module Svix
|
|
479
479
|
end
|
480
480
|
|
481
481
|
# Authorize Discord
|
482
|
-
# Get Discord Incoming webhook URL
|
482
|
+
# Get Discord Incoming webhook URL.
|
483
483
|
# @param o_auth_payload_in [OAuthPayloadIn]
|
484
484
|
# @param [Hash] opts the optional parameters
|
485
485
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -539,7 +539,7 @@ module Svix
|
|
539
539
|
end
|
540
540
|
|
541
541
|
# Authorize Hubspot
|
542
|
-
# Get Hubspot access token using authorization code
|
542
|
+
# Get Hubspot access token using authorization code.
|
543
543
|
# @param o_auth_payload_in [OAuthPayloadIn]
|
544
544
|
# @param [Hash] opts the optional parameters
|
545
545
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -550,7 +550,7 @@ module Svix
|
|
550
550
|
end
|
551
551
|
|
552
552
|
# Authorize Hubspot
|
553
|
-
# Get Hubspot access token using authorization code
|
553
|
+
# Get Hubspot access token using authorization code.
|
554
554
|
# @param o_auth_payload_in [OAuthPayloadIn]
|
555
555
|
# @param [Hash] opts the optional parameters
|
556
556
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -610,7 +610,7 @@ module Svix
|
|
610
610
|
end
|
611
611
|
|
612
612
|
# Authorize Slack
|
613
|
-
# Get Slack Incoming webhook URL
|
613
|
+
# Get Slack Incoming webhook URL.
|
614
614
|
# @param o_auth_payload_in [OAuthPayloadIn]
|
615
615
|
# @param [Hash] opts the optional parameters
|
616
616
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -621,7 +621,7 @@ module Svix
|
|
621
621
|
end
|
622
622
|
|
623
623
|
# Authorize Slack
|
624
|
-
# Get Slack Incoming webhook URL
|
624
|
+
# Get Slack Incoming webhook URL.
|
625
625
|
# @param o_auth_payload_in [OAuthPayloadIn]
|
626
626
|
# @param [Hash] opts the optional parameters
|
627
627
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -681,7 +681,7 @@ module Svix
|
|
681
681
|
end
|
682
682
|
|
683
683
|
# Patch Transformation Template
|
684
|
-
# Partially update a transformation template
|
684
|
+
# Partially update a transformation template.
|
685
685
|
# @param transformation_template_id [String]
|
686
686
|
# @param template_patch [TemplatePatch]
|
687
687
|
# @param [Hash] opts the optional parameters
|
@@ -692,7 +692,7 @@ module Svix
|
|
692
692
|
end
|
693
693
|
|
694
694
|
# Patch Transformation Template
|
695
|
-
# Partially update a transformation template
|
695
|
+
# Partially update a transformation template.
|
696
696
|
# @param transformation_template_id [String]
|
697
697
|
# @param template_patch [TemplatePatch]
|
698
698
|
# @param [Hash] opts the optional parameters
|
@@ -755,7 +755,7 @@ module Svix
|
|
755
755
|
end
|
756
756
|
|
757
757
|
# Simulate
|
758
|
-
# Simulate running the transformation on the payload and code
|
758
|
+
# Simulate running the transformation on the payload and code.
|
759
759
|
# @param transformation_simulate_in [TransformationSimulateIn]
|
760
760
|
# @param [Hash] opts the optional parameters
|
761
761
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -766,7 +766,7 @@ module Svix
|
|
766
766
|
end
|
767
767
|
|
768
768
|
# Simulate
|
769
|
-
# Simulate running the transformation on the payload and code
|
769
|
+
# Simulate running the transformation on the payload and code.
|
770
770
|
# @param transformation_simulate_in [TransformationSimulateIn]
|
771
771
|
# @param [Hash] opts the optional parameters
|
772
772
|
# @option opts [String] :idempotency_key The request's idempotency key
|
@@ -826,7 +826,7 @@ module Svix
|
|
826
826
|
end
|
827
827
|
|
828
828
|
# Update Transformation Template
|
829
|
-
# Update a transformation template
|
829
|
+
# Update a transformation template.
|
830
830
|
# @param transformation_template_id [String]
|
831
831
|
# @param template_update [TemplateUpdate]
|
832
832
|
# @param [Hash] opts the optional parameters
|
@@ -837,7 +837,7 @@ module Svix
|
|
837
837
|
end
|
838
838
|
|
839
839
|
# Update Transformation Template
|
840
|
-
# Update a transformation template
|
840
|
+
# Update a transformation template.
|
841
841
|
# @param transformation_template_id [String]
|
842
842
|
# @param template_update [TemplateUpdate]
|
843
843
|
# @param [Hash] opts the optional parameters
|
data/lib/svix/endpoint_api.rb
CHANGED
data/lib/svix/message_api.rb
CHANGED
@@ -25,7 +25,7 @@ module Svix
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
# Creates a [`MessageIn`] with a
|
28
|
+
# Creates a [`MessageIn`] with a raw string payload.
|
29
29
|
#
|
30
30
|
# The payload is not normalized on the server. Normally, payloads are required
|
31
31
|
# to be JSON, and Svix will minify the payload before sending the webhook
|