svix 1.39.0 → 1.41.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/stream_api.rb +157 -0
- data/lib/svix/api/stream_event_types_api.rb +486 -0
- data/lib/svix/models/app_usage_stats_in.rb +1 -0
- data/lib/svix/models/app_usage_stats_out.rb +33 -4
- data/lib/svix/models/event_example_in.rb +35 -4
- data/lib/svix/models/event_in.rb +38 -1
- data/lib/svix/models/event_out.rb +38 -1
- data/lib/svix/models/list_response_application_out.rb +2 -0
- data/lib/svix/models/list_response_application_stats.rb +2 -0
- data/lib/svix/models/list_response_background_task_out.rb +2 -0
- data/lib/svix/models/list_response_endpoint_message_out.rb +2 -0
- data/lib/svix/models/list_response_endpoint_out.rb +2 -0
- data/lib/svix/models/list_response_event_type_out.rb +2 -0
- data/lib/svix/models/list_response_integration_out.rb +2 -0
- data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +2 -0
- data/lib/svix/models/list_response_message_attempt_out.rb +2 -0
- data/lib/svix/models/list_response_message_endpoint_out.rb +2 -0
- data/lib/svix/models/list_response_message_out.rb +2 -0
- data/lib/svix/models/list_response_operational_webhook_endpoint_out.rb +2 -0
- data/lib/svix/models/list_response_sink_out.rb +2 -0
- data/lib/svix/models/list_response_stream_event_type_out.rb +261 -0
- data/lib/svix/models/list_response_stream_out.rb +2 -0
- data/lib/svix/models/list_response_stream_sink_out.rb +2 -0
- data/lib/svix/models/list_response_template_out.rb +2 -0
- data/lib/svix/models/sink_http_config.rb +11 -1
- data/lib/svix/models/stream_event_type_in.rb +262 -0
- data/lib/svix/models/stream_event_type_out.rb +294 -0
- data/lib/svix/models/stream_event_type_patch.rb +254 -0
- data/lib/svix/version.rb +1 -1
- metadata +7 -3
- data/lib/svix/api/sink_api.rb +0 -179
data/lib/svix/api/sink_api.rb
DELETED
@@ -1,179 +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
|
-
Generator version: 7.9.0
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'cgi'
|
14
|
-
|
15
|
-
module Svix
|
16
|
-
class SinkApi
|
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 stream_id [String]
|
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 [Object]
|
29
|
-
def v1_stream_create_events(stream_id, create_stream_in, opts = {})
|
30
|
-
data, _status_code, _headers = v1_stream_create_events_with_http_info(stream_id, create_stream_in, opts)
|
31
|
-
data
|
32
|
-
end
|
33
|
-
|
34
|
-
# Append To Stream
|
35
|
-
# Creates streaming events.
|
36
|
-
# @param stream_id [String]
|
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<(Object, Integer, Hash)>] Object data, response status code and response headers
|
41
|
-
def v1_stream_create_events_with_http_info(stream_id, create_stream_in, opts = {})
|
42
|
-
if @api_client.config.debugging
|
43
|
-
@api_client.config.logger.debug 'Calling API: SinkApi.v1_stream_create_events ...'
|
44
|
-
end
|
45
|
-
# verify the required parameter 'stream_id' is set
|
46
|
-
if @api_client.config.client_side_validation && stream_id.nil?
|
47
|
-
fail ArgumentError, "Missing the required parameter 'stream_id' when calling SinkApi.v1_stream_create_events"
|
48
|
-
end
|
49
|
-
# verify the required parameter 'create_stream_in' is set
|
50
|
-
if @api_client.config.client_side_validation && create_stream_in.nil?
|
51
|
-
fail ArgumentError, "Missing the required parameter 'create_stream_in' when calling SinkApi.v1_stream_create_events"
|
52
|
-
end
|
53
|
-
# resource path
|
54
|
-
local_var_path = '/api/v1/stream/{stream_id}/events'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
|
55
|
-
|
56
|
-
# query parameters
|
57
|
-
query_params = opts[:query_params] || {}
|
58
|
-
|
59
|
-
# header parameters
|
60
|
-
header_params = opts[:header_params] || {}
|
61
|
-
# HTTP header 'Accept' (if needed)
|
62
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
63
|
-
# HTTP header 'Content-Type'
|
64
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
65
|
-
if !content_type.nil?
|
66
|
-
header_params['Content-Type'] = content_type
|
67
|
-
end
|
68
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
69
|
-
|
70
|
-
# form parameters
|
71
|
-
form_params = opts[:form_params] || {}
|
72
|
-
|
73
|
-
# http body (model)
|
74
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_stream_in)
|
75
|
-
|
76
|
-
# return_type
|
77
|
-
return_type = opts[:debug_return_type] || 'Object'
|
78
|
-
|
79
|
-
# auth_names
|
80
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
81
|
-
|
82
|
-
new_options = opts.merge(
|
83
|
-
:operation => :"SinkApi.v1_stream_create_events",
|
84
|
-
:header_params => header_params,
|
85
|
-
:query_params => query_params,
|
86
|
-
:form_params => form_params,
|
87
|
-
:body => post_body,
|
88
|
-
:auth_names => auth_names,
|
89
|
-
:return_type => return_type
|
90
|
-
)
|
91
|
-
|
92
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
93
|
-
if @api_client.config.debugging
|
94
|
-
@api_client.config.logger.debug "API called: SinkApi#v1_stream_create_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
95
|
-
end
|
96
|
-
return data, status_code, headers
|
97
|
-
end
|
98
|
-
|
99
|
-
# Stream Events
|
100
|
-
# Iterate over a stream of events.
|
101
|
-
# @param stream_id [String]
|
102
|
-
# @param [Hash] opts the optional parameters
|
103
|
-
# @option opts [Integer] :limit Limit the number of returned items
|
104
|
-
# @option opts [String] :iterator The iterator returned from a prior invocation
|
105
|
-
# @option opts [Time] :after
|
106
|
-
# @return [EventStreamOut]
|
107
|
-
def v1_stream_events_get(stream_id, opts = {})
|
108
|
-
data, _status_code, _headers = v1_stream_events_get_with_http_info(stream_id, opts)
|
109
|
-
data
|
110
|
-
end
|
111
|
-
|
112
|
-
# Stream Events
|
113
|
-
# Iterate over a stream of events.
|
114
|
-
# @param stream_id [String]
|
115
|
-
# @param [Hash] opts the optional parameters
|
116
|
-
# @option opts [Integer] :limit Limit the number of returned items
|
117
|
-
# @option opts [String] :iterator The iterator returned from a prior invocation
|
118
|
-
# @option opts [Time] :after
|
119
|
-
# @return [Array<(EventStreamOut, Integer, Hash)>] EventStreamOut data, response status code and response headers
|
120
|
-
def v1_stream_events_get_with_http_info(stream_id, opts = {})
|
121
|
-
if @api_client.config.debugging
|
122
|
-
@api_client.config.logger.debug 'Calling API: SinkApi.v1_stream_events_get ...'
|
123
|
-
end
|
124
|
-
# verify the required parameter 'stream_id' is set
|
125
|
-
if @api_client.config.client_side_validation && stream_id.nil?
|
126
|
-
fail ArgumentError, "Missing the required parameter 'stream_id' when calling SinkApi.v1_stream_events_get"
|
127
|
-
end
|
128
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
129
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SinkApi.v1_stream_events_get, must be smaller than or equal to 250.'
|
130
|
-
end
|
131
|
-
|
132
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
133
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SinkApi.v1_stream_events_get, must be greater than or equal to 1.'
|
134
|
-
end
|
135
|
-
|
136
|
-
# resource path
|
137
|
-
local_var_path = '/api/v1/stream/{stream_id}/events'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
|
138
|
-
|
139
|
-
# query parameters
|
140
|
-
query_params = opts[:query_params] || {}
|
141
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
142
|
-
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
143
|
-
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
144
|
-
|
145
|
-
# header parameters
|
146
|
-
header_params = opts[:header_params] || {}
|
147
|
-
# HTTP header 'Accept' (if needed)
|
148
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
149
|
-
|
150
|
-
# form parameters
|
151
|
-
form_params = opts[:form_params] || {}
|
152
|
-
|
153
|
-
# http body (model)
|
154
|
-
post_body = opts[:debug_body]
|
155
|
-
|
156
|
-
# return_type
|
157
|
-
return_type = opts[:debug_return_type] || 'EventStreamOut'
|
158
|
-
|
159
|
-
# auth_names
|
160
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
161
|
-
|
162
|
-
new_options = opts.merge(
|
163
|
-
:operation => :"SinkApi.v1_stream_events_get",
|
164
|
-
:header_params => header_params,
|
165
|
-
:query_params => query_params,
|
166
|
-
:form_params => form_params,
|
167
|
-
:body => post_body,
|
168
|
-
:auth_names => auth_names,
|
169
|
-
:return_type => return_type
|
170
|
-
)
|
171
|
-
|
172
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
173
|
-
if @api_client.config.debugging
|
174
|
-
@api_client.config.logger.debug "API called: SinkApi#v1_stream_events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
175
|
-
end
|
176
|
-
return data, status_code, headers
|
177
|
-
end
|
178
|
-
end
|
179
|
-
end
|