svix 0.65.0 → 0.67.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/endpoint_api.rb +310 -0
- data/lib/svix/endpoint_api.rb +42 -38
- data/lib/svix/models/endpoint_in.rb +24 -0
- data/lib/svix/models/endpoint_out.rb +24 -0
- data/lib/svix/models/endpoint_transformation_in.rb +254 -0
- data/lib/svix/models/endpoint_transformation_out.rb +254 -0
- data/lib/svix/models/endpoint_transformation_simulate_in.rb +321 -0
- data/lib/svix/models/endpoint_transformation_simulate_out.rb +274 -0
- data/lib/svix/models/endpoint_update.rb +24 -0
- data/lib/svix/models/environment_settings_out.rb +15 -4
- data/lib/svix/models/message_endpoint_out.rb +24 -0
- data/lib/svix/models/settings_in.rb +12 -1
- data/lib/svix/models/settings_out.rb +12 -1
- data/lib/svix/models/transformation_http_method.rb +37 -0
- data/lib/svix/version.rb +1 -1
- metadata +7 -2
@@ -31,6 +31,8 @@ module Svix
|
|
31
31
|
|
32
32
|
attr_accessor :enable_integration_management
|
33
33
|
|
34
|
+
attr_accessor :enable_transformations
|
35
|
+
|
34
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
37
|
def self.attribute_map
|
36
38
|
{
|
@@ -41,7 +43,8 @@ module Svix
|
|
41
43
|
:'custom_logo_url' => :'customLogoUrl',
|
42
44
|
:'custom_theme_override' => :'customThemeOverride',
|
43
45
|
:'enable_channels' => :'enableChannels',
|
44
|
-
:'enable_integration_management' => :'enableIntegrationManagement'
|
46
|
+
:'enable_integration_management' => :'enableIntegrationManagement',
|
47
|
+
:'enable_transformations' => :'enableTransformations'
|
45
48
|
}
|
46
49
|
end
|
47
50
|
|
@@ -60,7 +63,8 @@ module Svix
|
|
60
63
|
:'custom_logo_url' => :'String',
|
61
64
|
:'custom_theme_override' => :'CustomThemeOverride',
|
62
65
|
:'enable_channels' => :'Boolean',
|
63
|
-
:'enable_integration_management' => :'Boolean'
|
66
|
+
:'enable_integration_management' => :'Boolean',
|
67
|
+
:'enable_transformations' => :'Boolean'
|
64
68
|
}
|
65
69
|
end
|
66
70
|
|
@@ -123,6 +127,12 @@ module Svix
|
|
123
127
|
else
|
124
128
|
self.enable_integration_management = false
|
125
129
|
end
|
130
|
+
|
131
|
+
if attributes.key?(:'enable_transformations')
|
132
|
+
self.enable_transformations = attributes[:'enable_transformations']
|
133
|
+
else
|
134
|
+
self.enable_transformations = false
|
135
|
+
end
|
126
136
|
end
|
127
137
|
|
128
138
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -191,7 +201,8 @@ module Svix
|
|
191
201
|
custom_logo_url == o.custom_logo_url &&
|
192
202
|
custom_theme_override == o.custom_theme_override &&
|
193
203
|
enable_channels == o.enable_channels &&
|
194
|
-
enable_integration_management == o.enable_integration_management
|
204
|
+
enable_integration_management == o.enable_integration_management &&
|
205
|
+
enable_transformations == o.enable_transformations
|
195
206
|
end
|
196
207
|
|
197
208
|
# @see the `==` method
|
@@ -203,7 +214,7 @@ module Svix
|
|
203
214
|
# Calculates hash code according to all attributes.
|
204
215
|
# @return [Integer] Hash code
|
205
216
|
def hash
|
206
|
-
[color_palette_dark, color_palette_light, custom_color, custom_font_family, custom_logo_url, custom_theme_override, enable_channels, enable_integration_management].hash
|
217
|
+
[color_palette_dark, color_palette_light, custom_color, custom_font_family, custom_logo_url, custom_theme_override, enable_channels, enable_integration_management, enable_transformations].hash
|
207
218
|
end
|
208
219
|
|
209
220
|
# Builds the object from hash
|
@@ -189,6 +189,14 @@ module Svix
|
|
189
189
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
190
190
|
end
|
191
191
|
|
192
|
+
if !@rate_limit.nil? && @rate_limit > 65535
|
193
|
+
invalid_properties.push('invalid value for "rate_limit", must be smaller than or equal to 65535.')
|
194
|
+
end
|
195
|
+
|
196
|
+
if !@rate_limit.nil? && @rate_limit < 1
|
197
|
+
invalid_properties.push('invalid value for "rate_limit", must be greater than or equal to 1.')
|
198
|
+
end
|
199
|
+
|
192
200
|
if @status.nil?
|
193
201
|
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
194
202
|
end
|
@@ -233,6 +241,8 @@ module Svix
|
|
233
241
|
return false if @created_at.nil?
|
234
242
|
return false if !@filter_types.nil? && @filter_types.length < 1
|
235
243
|
return false if @id.nil?
|
244
|
+
return false if !@rate_limit.nil? && @rate_limit > 65535
|
245
|
+
return false if !@rate_limit.nil? && @rate_limit < 1
|
236
246
|
return false if @status.nil?
|
237
247
|
return false if !@uid.nil? && @uid.to_s.length > 256
|
238
248
|
return false if !@uid.nil? && @uid.to_s.length < 1
|
@@ -268,6 +278,20 @@ module Svix
|
|
268
278
|
@filter_types = filter_types
|
269
279
|
end
|
270
280
|
|
281
|
+
# Custom attribute writer method with validation
|
282
|
+
# @param [Object] rate_limit Value to be assigned
|
283
|
+
def rate_limit=(rate_limit)
|
284
|
+
if !rate_limit.nil? && rate_limit > 65535
|
285
|
+
fail ArgumentError, 'invalid value for "rate_limit", must be smaller than or equal to 65535.'
|
286
|
+
end
|
287
|
+
|
288
|
+
if !rate_limit.nil? && rate_limit < 1
|
289
|
+
fail ArgumentError, 'invalid value for "rate_limit", must be greater than or equal to 1.'
|
290
|
+
end
|
291
|
+
|
292
|
+
@rate_limit = rate_limit
|
293
|
+
end
|
294
|
+
|
271
295
|
# Custom attribute writer method with validation
|
272
296
|
# @param [Object] uid Value to be assigned
|
273
297
|
def uid=(uid)
|
@@ -37,6 +37,8 @@ module Svix
|
|
37
37
|
|
38
38
|
attr_accessor :enable_integration_management
|
39
39
|
|
40
|
+
attr_accessor :enable_transformations
|
41
|
+
|
40
42
|
attr_accessor :enforce_https
|
41
43
|
|
42
44
|
attr_accessor :event_catalog_published
|
@@ -55,6 +57,7 @@ module Svix
|
|
55
57
|
:'display_name' => :'displayName',
|
56
58
|
:'enable_channels' => :'enableChannels',
|
57
59
|
:'enable_integration_management' => :'enableIntegrationManagement',
|
60
|
+
:'enable_transformations' => :'enableTransformations',
|
58
61
|
:'enforce_https' => :'enforceHttps',
|
59
62
|
:'event_catalog_published' => :'eventCatalogPublished'
|
60
63
|
}
|
@@ -79,6 +82,7 @@ module Svix
|
|
79
82
|
:'display_name' => :'String',
|
80
83
|
:'enable_channels' => :'Boolean',
|
81
84
|
:'enable_integration_management' => :'Boolean',
|
85
|
+
:'enable_transformations' => :'Boolean',
|
82
86
|
:'enforce_https' => :'Boolean',
|
83
87
|
:'event_catalog_published' => :'Boolean'
|
84
88
|
}
|
@@ -161,6 +165,12 @@ module Svix
|
|
161
165
|
self.enable_integration_management = false
|
162
166
|
end
|
163
167
|
|
168
|
+
if attributes.key?(:'enable_transformations')
|
169
|
+
self.enable_transformations = attributes[:'enable_transformations']
|
170
|
+
else
|
171
|
+
self.enable_transformations = false
|
172
|
+
end
|
173
|
+
|
164
174
|
if attributes.key?(:'enforce_https')
|
165
175
|
self.enforce_https = attributes[:'enforce_https']
|
166
176
|
else
|
@@ -244,6 +254,7 @@ module Svix
|
|
244
254
|
display_name == o.display_name &&
|
245
255
|
enable_channels == o.enable_channels &&
|
246
256
|
enable_integration_management == o.enable_integration_management &&
|
257
|
+
enable_transformations == o.enable_transformations &&
|
247
258
|
enforce_https == o.enforce_https &&
|
248
259
|
event_catalog_published == o.event_catalog_published
|
249
260
|
end
|
@@ -257,7 +268,7 @@ module Svix
|
|
257
268
|
# Calculates hash code according to all attributes.
|
258
269
|
# @return [Integer] Hash code
|
259
270
|
def hash
|
260
|
-
[color_palette_dark, color_palette_light, custom_base_font_size, custom_color, custom_font_family, custom_logo_url, custom_theme_override, disable_endpoint_on_failure, display_name, enable_channels, enable_integration_management, enforce_https, event_catalog_published].hash
|
271
|
+
[color_palette_dark, color_palette_light, custom_base_font_size, custom_color, custom_font_family, custom_logo_url, custom_theme_override, disable_endpoint_on_failure, display_name, enable_channels, enable_integration_management, enable_transformations, enforce_https, event_catalog_published].hash
|
261
272
|
end
|
262
273
|
|
263
274
|
# Builds the object from hash
|
@@ -37,6 +37,8 @@ module Svix
|
|
37
37
|
|
38
38
|
attr_accessor :enable_integration_management
|
39
39
|
|
40
|
+
attr_accessor :enable_transformations
|
41
|
+
|
40
42
|
attr_accessor :enforce_https
|
41
43
|
|
42
44
|
attr_accessor :event_catalog_published
|
@@ -55,6 +57,7 @@ module Svix
|
|
55
57
|
:'display_name' => :'displayName',
|
56
58
|
:'enable_channels' => :'enableChannels',
|
57
59
|
:'enable_integration_management' => :'enableIntegrationManagement',
|
60
|
+
:'enable_transformations' => :'enableTransformations',
|
58
61
|
:'enforce_https' => :'enforceHttps',
|
59
62
|
:'event_catalog_published' => :'eventCatalogPublished'
|
60
63
|
}
|
@@ -79,6 +82,7 @@ module Svix
|
|
79
82
|
:'display_name' => :'String',
|
80
83
|
:'enable_channels' => :'Boolean',
|
81
84
|
:'enable_integration_management' => :'Boolean',
|
85
|
+
:'enable_transformations' => :'Boolean',
|
82
86
|
:'enforce_https' => :'Boolean',
|
83
87
|
:'event_catalog_published' => :'Boolean'
|
84
88
|
}
|
@@ -161,6 +165,12 @@ module Svix
|
|
161
165
|
self.enable_integration_management = false
|
162
166
|
end
|
163
167
|
|
168
|
+
if attributes.key?(:'enable_transformations')
|
169
|
+
self.enable_transformations = attributes[:'enable_transformations']
|
170
|
+
else
|
171
|
+
self.enable_transformations = false
|
172
|
+
end
|
173
|
+
|
164
174
|
if attributes.key?(:'enforce_https')
|
165
175
|
self.enforce_https = attributes[:'enforce_https']
|
166
176
|
else
|
@@ -244,6 +254,7 @@ module Svix
|
|
244
254
|
display_name == o.display_name &&
|
245
255
|
enable_channels == o.enable_channels &&
|
246
256
|
enable_integration_management == o.enable_integration_management &&
|
257
|
+
enable_transformations == o.enable_transformations &&
|
247
258
|
enforce_https == o.enforce_https &&
|
248
259
|
event_catalog_published == o.event_catalog_published
|
249
260
|
end
|
@@ -257,7 +268,7 @@ module Svix
|
|
257
268
|
# Calculates hash code according to all attributes.
|
258
269
|
# @return [Integer] Hash code
|
259
270
|
def hash
|
260
|
-
[color_palette_dark, color_palette_light, custom_base_font_size, custom_color, custom_font_family, custom_logo_url, custom_theme_override, disable_endpoint_on_failure, display_name, enable_channels, enable_integration_management, enforce_https, event_catalog_published].hash
|
271
|
+
[color_palette_dark, color_palette_light, custom_base_font_size, custom_color, custom_font_family, custom_logo_url, custom_theme_override, disable_endpoint_on_failure, display_name, enable_channels, enable_integration_management, enable_transformations, enforce_https, event_catalog_published].hash
|
261
272
|
end
|
262
273
|
|
263
274
|
# Builds the object from hash
|
@@ -0,0 +1,37 @@
|
|
1
|
+
=begin
|
2
|
+
#Svix API
|
3
|
+
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.4
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Svix
|
17
|
+
class TransformationHttpMethod
|
18
|
+
PUT = "PUT".freeze
|
19
|
+
POST = "POST".freeze
|
20
|
+
|
21
|
+
# Builds the enum from string
|
22
|
+
# @param [String] The enum value in the form of the string
|
23
|
+
# @return [String] The enum value
|
24
|
+
def self.build_from_hash(value)
|
25
|
+
new.build_from_hash(value)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Builds the enum from string
|
29
|
+
# @param [String] The enum value in the form of the string
|
30
|
+
# @return [String] The enum value
|
31
|
+
def build_from_hash(value)
|
32
|
+
constantValues = TransformationHttpMethod.constants.select { |c| TransformationHttpMethod::const_get(c) == value }
|
33
|
+
raise "Invalid ENUM value #{value} for class #TransformationHttpMethod" if constantValues.empty?
|
34
|
+
value
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/svix/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.67.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Svix
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -131,6 +131,10 @@ files:
|
|
131
131
|
- lib/svix/models/endpoint_secret_out.rb
|
132
132
|
- lib/svix/models/endpoint_secret_rotate_in.rb
|
133
133
|
- lib/svix/models/endpoint_stats.rb
|
134
|
+
- lib/svix/models/endpoint_transformation_in.rb
|
135
|
+
- lib/svix/models/endpoint_transformation_out.rb
|
136
|
+
- lib/svix/models/endpoint_transformation_simulate_in.rb
|
137
|
+
- lib/svix/models/endpoint_transformation_simulate_out.rb
|
134
138
|
- lib/svix/models/endpoint_update.rb
|
135
139
|
- lib/svix/models/endpoint_updated_event.rb
|
136
140
|
- lib/svix/models/endpoint_updated_event_data.rb
|
@@ -177,6 +181,7 @@ files:
|
|
177
181
|
- lib/svix/models/settings_out.rb
|
178
182
|
- lib/svix/models/statistics_period.rb
|
179
183
|
- lib/svix/models/status_code_class.rb
|
184
|
+
- lib/svix/models/transformation_http_method.rb
|
180
185
|
- lib/svix/models/validation_error.rb
|
181
186
|
- lib/svix/models/webhook_types.rb
|
182
187
|
- lib/svix/svix.rb
|