svix 1.21.0 → 1.22.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,284 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.1.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Svix
17
+ class EndpointOauthConfigIn
18
+ attr_accessor :auth_method
19
+
20
+ attr_accessor :client_id
21
+
22
+ attr_accessor :client_secret
23
+
24
+ attr_accessor :grant_type
25
+
26
+ attr_accessor :jwt_params
27
+
28
+ attr_accessor :token_url
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'auth_method' => :'authMethod',
34
+ :'client_id' => :'clientId',
35
+ :'client_secret' => :'clientSecret',
36
+ :'grant_type' => :'grantType',
37
+ :'jwt_params' => :'jwtParams',
38
+ :'token_url' => :'tokenUrl'
39
+ }
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'auth_method' => :'Oauth2AuthMethodIn',
51
+ :'client_id' => :'String',
52
+ :'client_secret' => :'String',
53
+ :'grant_type' => :'Oauth2GrantType',
54
+ :'jwt_params' => :'ClientSecretJwtParamsIn',
55
+ :'token_url' => :'String'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ :'client_secret',
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointOauthConfigIn` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::EndpointOauthConfigIn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'auth_method')
82
+ self.auth_method = attributes[:'auth_method']
83
+ end
84
+
85
+ if attributes.key?(:'client_id')
86
+ self.client_id = attributes[:'client_id']
87
+ end
88
+
89
+ if attributes.key?(:'client_secret')
90
+ self.client_secret = attributes[:'client_secret']
91
+ end
92
+
93
+ if attributes.key?(:'grant_type')
94
+ self.grant_type = attributes[:'grant_type']
95
+ end
96
+
97
+ if attributes.key?(:'jwt_params')
98
+ self.jwt_params = attributes[:'jwt_params']
99
+ end
100
+
101
+ if attributes.key?(:'token_url')
102
+ self.token_url = attributes[:'token_url']
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ invalid_properties = Array.new
110
+ if @auth_method.nil?
111
+ invalid_properties.push('invalid value for "auth_method", auth_method cannot be nil.')
112
+ end
113
+
114
+ if @client_id.nil?
115
+ invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
116
+ end
117
+
118
+ if @grant_type.nil?
119
+ invalid_properties.push('invalid value for "grant_type", grant_type cannot be nil.')
120
+ end
121
+
122
+ if @token_url.nil?
123
+ invalid_properties.push('invalid value for "token_url", token_url cannot be nil.')
124
+ end
125
+
126
+ invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ return false if @auth_method.nil?
133
+ return false if @client_id.nil?
134
+ return false if @grant_type.nil?
135
+ return false if @token_url.nil?
136
+ true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ auth_method == o.auth_method &&
145
+ client_id == o.client_id &&
146
+ client_secret == o.client_secret &&
147
+ grant_type == o.grant_type &&
148
+ jwt_params == o.jwt_params &&
149
+ token_url == o.token_url
150
+ end
151
+
152
+ # @see the `==` method
153
+ # @param [Object] Object to be compared
154
+ def eql?(o)
155
+ self == o
156
+ end
157
+
158
+ # Calculates hash code according to all attributes.
159
+ # @return [Integer] Hash code
160
+ def hash
161
+ [auth_method, client_id, client_secret, grant_type, jwt_params, token_url].hash
162
+ end
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def self.build_from_hash(attributes)
168
+ new.build_from_hash(attributes)
169
+ end
170
+
171
+ # Builds the object from hash
172
+ # @param [Hash] attributes Model attributes in the form of hash
173
+ # @return [Object] Returns the model itself
174
+ def build_from_hash(attributes)
175
+ return nil unless attributes.is_a?(Hash)
176
+ self.class.openapi_types.each_pair do |key, type|
177
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
178
+ self.send("#{key}=", nil)
179
+ elsif type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
183
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
184
+ end
185
+ elsif !attributes[self.class.attribute_map[key]].nil?
186
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
187
+ end
188
+ end
189
+
190
+ self
191
+ end
192
+
193
+ # Deserializes the data based on type
194
+ # @param string type Data type
195
+ # @param string value Value to be deserialized
196
+ # @return [Object] Deserialized data
197
+ def _deserialize(type, value)
198
+ case type.to_sym
199
+ when :Time
200
+ Time.parse(value)
201
+ when :Date
202
+ Date.parse(value)
203
+ when :String
204
+ value.to_s
205
+ when :Integer
206
+ value.to_i
207
+ when :Float
208
+ value.to_f
209
+ when :Boolean
210
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
211
+ true
212
+ else
213
+ false
214
+ end
215
+ when :Object
216
+ # generic object (usually a Hash), return directly
217
+ value
218
+ when /\AArray<(?<inner_type>.+)>\z/
219
+ inner_type = Regexp.last_match[:inner_type]
220
+ value.map { |v| _deserialize(inner_type, v) }
221
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
222
+ k_type = Regexp.last_match[:k_type]
223
+ v_type = Regexp.last_match[:v_type]
224
+ {}.tap do |hash|
225
+ value.each do |k, v|
226
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
227
+ end
228
+ end
229
+ else # model
230
+ # models (e.g. Pet) or oneOf
231
+ klass = Svix.const_get(type)
232
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
233
+ end
234
+ end
235
+
236
+ # Returns the string representation of the object
237
+ # @return [String] String presentation of the object
238
+ def to_s
239
+ to_hash.to_s
240
+ end
241
+
242
+ # to_body is an alias to to_hash (backward compatibility)
243
+ # @return [Hash] Returns the object in the form of hash
244
+ def to_body
245
+ to_hash
246
+ end
247
+
248
+ # Returns the object in the form of hash
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_hash
251
+ hash = {}
252
+ self.class.attribute_map.each_pair do |attr, param|
253
+ value = self.send(attr)
254
+ if value.nil?
255
+ is_nullable = self.class.openapi_nullable.include?(attr)
256
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
257
+ end
258
+
259
+ hash[param] = _to_hash(value)
260
+ end
261
+ hash
262
+ end
263
+
264
+ # Outputs non-array value in the form of hash
265
+ # For object, use to_hash. Otherwise, just return the value
266
+ # @param [Object] value Any valid value
267
+ # @return [Hash] Returns the value in the form of hash
268
+ def _to_hash(value)
269
+ if value.is_a?(Array)
270
+ value.compact.map { |v| _to_hash(v) }
271
+ elsif value.is_a?(Hash)
272
+ {}.tap do |hash|
273
+ value.each { |k, v| hash[k] = _to_hash(v) }
274
+ end
275
+ elsif value.respond_to? :to_hash
276
+ value.to_hash
277
+ else
278
+ value
279
+ end
280
+ end
281
+
282
+ end
283
+
284
+ end
@@ -87,6 +87,7 @@ module Svix
87
87
  # List of attributes with nullable: true
88
88
  def self.openapi_nullable
89
89
  Set.new([
90
+ :'custom_color',
90
91
  :'custom_font_family',
91
92
  :'custom_font_family_url',
92
93
  :'custom_logo_url',
@@ -0,0 +1,38 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.1.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Svix
17
+ class Oauth2AuthMethodIn
18
+ CLIENT_SECRET_JWT = "clientSecretJwt".freeze
19
+ CLIENT_SECRET_BASIC = "clientSecretBasic".freeze
20
+ CLIENT_SECRET_POST = "clientSecretPost".freeze
21
+
22
+ # Builds the enum from string
23
+ # @param [String] The enum value in the form of the string
24
+ # @return [String] The enum value
25
+ def self.build_from_hash(value)
26
+ new.build_from_hash(value)
27
+ end
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def build_from_hash(value)
33
+ constantValues = Oauth2AuthMethodIn.constants.select { |c| Oauth2AuthMethodIn::const_get(c) == value }
34
+ raise "Invalid ENUM value #{value} for class #Oauth2AuthMethodIn" if constantValues.empty?
35
+ value
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.1.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Svix
17
+ class Oauth2GrantType
18
+ CLIENT_CREDENTIALS = "clientCredentials".freeze
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ constantValues = Oauth2GrantType.constants.select { |c| Oauth2GrantType::const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #Oauth2GrantType" if constantValues.empty?
33
+ value
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.1.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Svix
17
+ class OauthJwsSigningAlgorithm
18
+ RS256 = "RS256".freeze
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ constantValues = OauthJwsSigningAlgorithm.constants.select { |c| OauthJwsSigningAlgorithm::const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #OauthJwsSigningAlgorithm" if constantValues.empty?
33
+ value
34
+ end
35
+ end
36
+ end
@@ -104,6 +104,7 @@ module Svix
104
104
  def self.openapi_nullable
105
105
  Set.new([
106
106
  :'custom_base_font_size',
107
+ :'custom_color',
107
108
  :'custom_font_family',
108
109
  :'custom_font_family_url',
109
110
  :'custom_logo_url',
@@ -104,6 +104,7 @@ module Svix
104
104
  def self.openapi_nullable
105
105
  Set.new([
106
106
  :'custom_base_font_size',
107
+ :'custom_color',
107
108
  :'custom_font_family',
108
109
  :'custom_font_family_url',
109
110
  :'custom_logo_url',
data/lib/svix/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- VERSION = "1.21.0"
4
+ VERSION = "1.22.0"
5
5
  end
data/lib/svix.rb CHANGED
@@ -20,6 +20,7 @@ require "svix/models/app_portal_access_in"
20
20
  require "svix/models/app_portal_access_out"
21
21
  require "svix/models/application_in"
22
22
  require "svix/models/application_out"
23
+ require "svix/models/application_patch"
23
24
  require "svix/models/dashboard_access_out"
24
25
  require "svix/models/endpoint_created_event_data"
25
26
  require "svix/models/endpoint_created_event"
@@ -37,6 +38,7 @@ require "svix/models/endpoint_secret_rotate_in"
37
38
  require "svix/models/endpoint_update"
38
39
  require "svix/models/endpoint_updated_event_data"
39
40
  require "svix/models/endpoint_updated_event"
41
+ require "svix/models/endpoint_patch"
40
42
  require "svix/models/event_example_in"
41
43
  require "svix/models/event_type_import_open_api_in"
42
44
  require "svix/models/event_type_import_open_api_out"
@@ -44,6 +46,7 @@ require "svix/models/event_type_import_open_api_out_data"
44
46
  require "svix/models/event_type_in"
45
47
  require "svix/models/event_type_out"
46
48
  require "svix/models/event_type_update"
49
+ require "svix/models/event_type_patch"
47
50
  require "svix/models/http_error_out"
48
51
  require "svix/models/http_validation_error"
49
52
  require "svix/models/integration_in"
data/svix.gemspec CHANGED
@@ -47,7 +47,6 @@ Gem::Specification.new do |spec|
47
47
 
48
48
  spec.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
49
49
 
50
- spec.add_development_dependency "bundler", ">= 2.2.10"
51
50
  spec.add_development_dependency "rake", "~> 13.0"
52
51
  spec.add_development_dependency "rspec", "~> 3.2"
53
52
  end
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: 1.21.0
4
+ version: 1.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-06 00:00:00.000000000 Z
11
+ date: 2024-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -30,20 +30,6 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.0.1
33
- - !ruby/object:Gem::Dependency
34
- name: bundler
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: 2.2.10
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 2.2.10
47
33
  - !ruby/object:Gem::Dependency
48
34
  name: rake
49
35
  requirement: !ruby/object:Gem::Requirement
@@ -92,6 +78,7 @@ files:
92
78
  - lib/svix/api/environment_api.rb
93
79
  - lib/svix/api/environment_settings_api.rb
94
80
  - lib/svix/api/event_type_api.rb
81
+ - lib/svix/api/events_api.rb
95
82
  - lib/svix/api/health_api.rb
96
83
  - lib/svix/api/inbound_api.rb
97
84
  - lib/svix/api/integration_api.rb
@@ -129,6 +116,7 @@ files:
129
116
  - lib/svix/models/background_task_type.rb
130
117
  - lib/svix/models/border_radius_config.rb
131
118
  - lib/svix/models/border_radius_enum.rb
119
+ - lib/svix/models/client_secret_jwt_params_in.rb
132
120
  - lib/svix/models/completion_choice.rb
133
121
  - lib/svix/models/completion_message.rb
134
122
  - lib/svix/models/custom_color_palette.rb
@@ -146,6 +134,7 @@ files:
146
134
  - lib/svix/models/endpoint_headers_patch_in.rb
147
135
  - lib/svix/models/endpoint_in.rb
148
136
  - lib/svix/models/endpoint_message_out.rb
137
+ - lib/svix/models/endpoint_oauth_config_in.rb
149
138
  - lib/svix/models/endpoint_out.rb
150
139
  - lib/svix/models/endpoint_patch.rb
151
140
  - lib/svix/models/endpoint_secret_out.rb
@@ -213,6 +202,9 @@ files:
213
202
  - lib/svix/models/message_raw_payload_out.rb
214
203
  - lib/svix/models/message_status.rb
215
204
  - lib/svix/models/message_stream_out.rb
205
+ - lib/svix/models/oauth2_auth_method_in.rb
206
+ - lib/svix/models/oauth2_grant_type.rb
207
+ - lib/svix/models/oauth_jws_signing_algorithm.rb
216
208
  - lib/svix/models/oauth_payload_in.rb
217
209
  - lib/svix/models/oauth_payload_out.rb
218
210
  - lib/svix/models/one_time_token_in.rb