svix 1.11.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eaab1c4418f3c0a4f3f7c63f1fe116c9bc4b60c020838830f360ad363613f568
4
- data.tar.gz: a5397eba7cbd51dd78806a3b4a2526cd063ba6d833a7708274eebb0c2ee7b378
3
+ metadata.gz: 17b5d97f7e6c49e08bdd186ffc37d7df93e1ef4fee429a9ce546ea0fb3b0da18
4
+ data.tar.gz: aa249d2de965495213c584a96cae7400028dbd20b81920906aa2b5efb50dffaf
5
5
  SHA512:
6
- metadata.gz: ecef7b2e766d99655203c24950eae35b831654ede0a2f01c6eaf97c1c179d5c396259b3b6001520f96c20757087aa1f8fc1f7450e4812b7e154990966e20680e
7
- data.tar.gz: 650c74bb8413282a8a21153bd8a7ec6917174a216df442950c1c68f97505ef91dec7df63d0244dd5e236737538510e378cac418ab62c3eaa3a031f2a8c69d6f1
6
+ metadata.gz: 3b3f7094ea9ed99dc168a1f23934c6a5ced2f36c08c032d90f573402603ac5d2f56b2c6d9841982eda6759baf42d7f8d08c4028686fe96bec3c0a8434e457857
7
+ data.tar.gz: 50c97cbb777efc0b1aa5d3eb6fd94d367ab1db413643e4ed3d9e108abe2b88f8748cf49beea6a358c5b32b2e214020cf871559b9919d89837f86ad35500deb3d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (1.11.0)
4
+ svix (1.13.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -304,7 +304,7 @@ module Svix
304
304
 
305
305
  # Event Type Import From Openapi
306
306
  # Given an OpenAPI spec, create new or update existing event types. If an existing `archived` event type is updated, it will be unarchvied. The importer will convert all webhooks found in the either the `webhooks` or `x-webhooks` top-level.
307
- # @param event_type_import_open_api_in [EventTypeImportOpenApiIn]
307
+ # @param event_type_import_open_api_in [EventTypeImportOpenApiIn] Import a list of event types from webhooks defined in an OpenAPI spec. The OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a `400` **Bad Request**.
308
308
  # @param [Hash] opts the optional parameters
309
309
  # @option opts [String] :idempotency_key The request's idempotency key
310
310
  # @return [EventTypeImportOpenApiOut]
@@ -315,7 +315,7 @@ module Svix
315
315
 
316
316
  # Event Type Import From Openapi
317
317
  # Given an OpenAPI spec, create new or update existing event types. If an existing `archived` event type is updated, it will be unarchvied. The importer will convert all webhooks found in the either the `webhooks` or `x-webhooks` top-level.
318
- # @param event_type_import_open_api_in [EventTypeImportOpenApiIn]
318
+ # @param event_type_import_open_api_in [EventTypeImportOpenApiIn] Import a list of event types from webhooks defined in an OpenAPI spec. The OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a `400` **Bad Request**.
319
319
  # @param [Hash] opts the optional parameters
320
320
  # @option opts [String] :idempotency_key The request's idempotency key
321
321
  # @return [Array<(EventTypeImportOpenApiOut, Integer, Hash)>] EventTypeImportOpenApiOut data, response status code and response headers
@@ -53,11 +53,11 @@ module Svix
53
53
  request = build_request(http_method, path, opts)
54
54
  response = request.run
55
55
 
56
- # retry 500s
56
+ # retry on 5XX and general network errors
57
57
  sleep_time = 0.05
58
58
  retry_count = 0
59
59
  (0..1).each do |n|
60
- break if response.success? || response.code < 500
60
+ break if response.success? || (response.code < 500 && response.code > 0)
61
61
  retry_count += 1
62
62
  sleep(sleep_time)
63
63
  sleep_time = sleep_time * 2
@@ -14,13 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Svix
17
+ # Import a list of event types from webhooks defined in an OpenAPI spec. The OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a `400` **Bad Request**.
17
18
  class EventTypeImportOpenApiIn
19
+ # A pre-parsed JSON spec.
18
20
  attr_accessor :spec
19
21
 
22
+ # A string, parsed by the server as YAML or JSON.
23
+ attr_accessor :spec_raw
24
+
20
25
  # Attribute mapping from ruby-style variable name to JSON key.
21
26
  def self.attribute_map
22
27
  {
23
- :'spec' => :'spec'
28
+ :'spec' => :'spec',
29
+ :'spec_raw' => :'specRaw'
24
30
  }
25
31
  end
26
32
 
@@ -32,13 +38,16 @@ module Svix
32
38
  # Attribute type mapping.
33
39
  def self.openapi_types
34
40
  {
35
- :'spec' => :'Hash<String, Object>'
41
+ :'spec' => :'Hash<String, Object>',
42
+ :'spec_raw' => :'String'
36
43
  }
37
44
  end
38
45
 
39
46
  # List of attributes with nullable: true
40
47
  def self.openapi_nullable
41
48
  Set.new([
49
+ :'spec',
50
+ :'spec_raw'
42
51
  ])
43
52
  end
44
53
 
@@ -62,23 +71,22 @@ module Svix
62
71
  self.spec = value
63
72
  end
64
73
  end
74
+
75
+ if attributes.key?(:'spec_raw')
76
+ self.spec_raw = attributes[:'spec_raw']
77
+ end
65
78
  end
66
79
 
67
80
  # Show invalid properties with the reasons. Usually used together with valid?
68
81
  # @return Array for valid properties with the reasons
69
82
  def list_invalid_properties
70
83
  invalid_properties = Array.new
71
- if @spec.nil?
72
- invalid_properties.push('invalid value for "spec", spec cannot be nil.')
73
- end
74
-
75
84
  invalid_properties
76
85
  end
77
86
 
78
87
  # Check to see if the all the properties in the model are valid
79
88
  # @return true if the model is valid
80
89
  def valid?
81
- return false if @spec.nil?
82
90
  true
83
91
  end
84
92
 
@@ -87,7 +95,8 @@ module Svix
87
95
  def ==(o)
88
96
  return true if self.equal?(o)
89
97
  self.class == o.class &&
90
- spec == o.spec
98
+ spec == o.spec &&
99
+ spec_raw == o.spec_raw
91
100
  end
92
101
 
93
102
  # @see the `==` method
@@ -99,7 +108,7 @@ module Svix
99
108
  # Calculates hash code according to all attributes.
100
109
  # @return [Integer] Hash code
101
110
  def hash
102
- [spec].hash
111
+ [spec, spec_raw].hash
103
112
  end
104
113
 
105
114
  # Builds the object from hash
@@ -17,12 +17,16 @@ module Svix
17
17
  class TemplateIn
18
18
  attr_accessor :description
19
19
 
20
+ attr_accessor :feature_flag
21
+
20
22
  attr_accessor :filter_types
21
23
 
22
24
  attr_accessor :instructions
23
25
 
24
26
  attr_accessor :instructions_link
25
27
 
28
+ attr_accessor :kind
29
+
26
30
  attr_accessor :logo
27
31
 
28
32
  attr_accessor :name
@@ -33,9 +37,11 @@ module Svix
33
37
  def self.attribute_map
34
38
  {
35
39
  :'description' => :'description',
40
+ :'feature_flag' => :'featureFlag',
36
41
  :'filter_types' => :'filterTypes',
37
42
  :'instructions' => :'instructions',
38
43
  :'instructions_link' => :'instructionsLink',
44
+ :'kind' => :'kind',
39
45
  :'logo' => :'logo',
40
46
  :'name' => :'name',
41
47
  :'transformation' => :'transformation'
@@ -51,9 +57,11 @@ module Svix
51
57
  def self.openapi_types
52
58
  {
53
59
  :'description' => :'String',
60
+ :'feature_flag' => :'String',
54
61
  :'filter_types' => :'Array<String>',
55
62
  :'instructions' => :'String',
56
63
  :'instructions_link' => :'String',
64
+ :'kind' => :'TransformationTemplateKind',
57
65
  :'logo' => :'String',
58
66
  :'name' => :'String',
59
67
  :'transformation' => :'String'
@@ -63,6 +71,7 @@ module Svix
63
71
  # List of attributes with nullable: true
64
72
  def self.openapi_nullable
65
73
  Set.new([
74
+ :'feature_flag',
66
75
  :'filter_types',
67
76
  :'instructions_link',
68
77
  ])
@@ -89,6 +98,10 @@ module Svix
89
98
  self.description = ''
90
99
  end
91
100
 
101
+ if attributes.key?(:'feature_flag')
102
+ self.feature_flag = attributes[:'feature_flag']
103
+ end
104
+
92
105
  if attributes.key?(:'filter_types')
93
106
  if (value = attributes[:'filter_types']).is_a?(Array)
94
107
  self.filter_types = value
@@ -107,6 +120,10 @@ module Svix
107
120
  self.instructions_link = 'null'
108
121
  end
109
122
 
123
+ if attributes.key?(:'kind')
124
+ self.kind = attributes[:'kind']
125
+ end
126
+
110
127
  if attributes.key?(:'logo')
111
128
  self.logo = attributes[:'logo']
112
129
  end
@@ -124,6 +141,15 @@ module Svix
124
141
  # @return Array for valid properties with the reasons
125
142
  def list_invalid_properties
126
143
  invalid_properties = Array.new
144
+ if !@feature_flag.nil? && @feature_flag.to_s.length > 256
145
+ invalid_properties.push('invalid value for "feature_flag", the character length must be smaller than or equal to 256.')
146
+ end
147
+
148
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
149
+ if !@feature_flag.nil? && @feature_flag !~ pattern
150
+ invalid_properties.push("invalid value for \"feature_flag\", must conform to the pattern #{pattern}.")
151
+ end
152
+
127
153
  if !@filter_types.nil? && @filter_types.length < 1
128
154
  invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
129
155
  end
@@ -154,6 +180,8 @@ module Svix
154
180
  # Check to see if the all the properties in the model are valid
155
181
  # @return true if the model is valid
156
182
  def valid?
183
+ return false if !@feature_flag.nil? && @feature_flag.to_s.length > 256
184
+ return false if !@feature_flag.nil? && @feature_flag !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
157
185
  return false if !@filter_types.nil? && @filter_types.length < 1
158
186
  return false if @logo.nil?
159
187
  return false if @name.nil?
@@ -163,6 +191,21 @@ module Svix
163
191
  true
164
192
  end
165
193
 
194
+ # Custom attribute writer method with validation
195
+ # @param [Object] feature_flag Value to be assigned
196
+ def feature_flag=(feature_flag)
197
+ if !feature_flag.nil? && feature_flag.to_s.length > 256
198
+ fail ArgumentError, 'invalid value for "feature_flag", the character length must be smaller than or equal to 256.'
199
+ end
200
+
201
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
202
+ if !feature_flag.nil? && feature_flag !~ pattern
203
+ fail ArgumentError, "invalid value for \"feature_flag\", must conform to the pattern #{pattern}."
204
+ end
205
+
206
+ @feature_flag = feature_flag
207
+ end
208
+
166
209
  # Custom attribute writer method with validation
167
210
  # @param [Object] filter_types Value to be assigned
168
211
  def filter_types=(filter_types)
@@ -197,9 +240,11 @@ module Svix
197
240
  return true if self.equal?(o)
198
241
  self.class == o.class &&
199
242
  description == o.description &&
243
+ feature_flag == o.feature_flag &&
200
244
  filter_types == o.filter_types &&
201
245
  instructions == o.instructions &&
202
246
  instructions_link == o.instructions_link &&
247
+ kind == o.kind &&
203
248
  logo == o.logo &&
204
249
  name == o.name &&
205
250
  transformation == o.transformation
@@ -214,7 +259,7 @@ module Svix
214
259
  # Calculates hash code according to all attributes.
215
260
  # @return [Integer] Hash code
216
261
  def hash
217
- [description, filter_types, instructions, instructions_link, logo, name, transformation].hash
262
+ [description, feature_flag, filter_types, instructions, instructions_link, kind, logo, name, transformation].hash
218
263
  end
219
264
 
220
265
  # Builds the object from hash
@@ -19,6 +19,8 @@ module Svix
19
19
 
20
20
  attr_accessor :description
21
21
 
22
+ attr_accessor :feature_flag
23
+
22
24
  attr_accessor :filter_types
23
25
 
24
26
  attr_accessor :id
@@ -44,6 +46,7 @@ module Svix
44
46
  {
45
47
  :'created_at' => :'createdAt',
46
48
  :'description' => :'description',
49
+ :'feature_flag' => :'featureFlag',
47
50
  :'filter_types' => :'filterTypes',
48
51
  :'id' => :'id',
49
52
  :'instructions' => :'instructions',
@@ -67,6 +70,7 @@ module Svix
67
70
  {
68
71
  :'created_at' => :'Time',
69
72
  :'description' => :'String',
73
+ :'feature_flag' => :'String',
70
74
  :'filter_types' => :'Array<String>',
71
75
  :'id' => :'String',
72
76
  :'instructions' => :'String',
@@ -83,6 +87,7 @@ module Svix
83
87
  # List of attributes with nullable: true
84
88
  def self.openapi_nullable
85
89
  Set.new([
90
+ :'feature_flag',
86
91
  :'filter_types',
87
92
  :'instructions_link',
88
93
  ])
@@ -111,6 +116,10 @@ module Svix
111
116
  self.description = attributes[:'description']
112
117
  end
113
118
 
119
+ if attributes.key?(:'feature_flag')
120
+ self.feature_flag = attributes[:'feature_flag']
121
+ end
122
+
114
123
  if attributes.key?(:'filter_types')
115
124
  if (value = attributes[:'filter_types']).is_a?(Array)
116
125
  self.filter_types = value
@@ -166,6 +175,15 @@ module Svix
166
175
  invalid_properties.push('invalid value for "description", description cannot be nil.')
167
176
  end
168
177
 
178
+ if !@feature_flag.nil? && @feature_flag.to_s.length > 256
179
+ invalid_properties.push('invalid value for "feature_flag", the character length must be smaller than or equal to 256.')
180
+ end
181
+
182
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
183
+ if !@feature_flag.nil? && @feature_flag !~ pattern
184
+ invalid_properties.push("invalid value for \"feature_flag\", must conform to the pattern #{pattern}.")
185
+ end
186
+
169
187
  if !@filter_types.nil? && @filter_types.length < 1
170
188
  invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
171
189
  end
@@ -210,6 +228,8 @@ module Svix
210
228
  def valid?
211
229
  return false if @created_at.nil?
212
230
  return false if @description.nil?
231
+ return false if !@feature_flag.nil? && @feature_flag.to_s.length > 256
232
+ return false if !@feature_flag.nil? && @feature_flag !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
213
233
  return false if !@filter_types.nil? && @filter_types.length < 1
214
234
  return false if @id.nil?
215
235
  return false if @instructions.nil?
@@ -222,6 +242,21 @@ module Svix
222
242
  true
223
243
  end
224
244
 
245
+ # Custom attribute writer method with validation
246
+ # @param [Object] feature_flag Value to be assigned
247
+ def feature_flag=(feature_flag)
248
+ if !feature_flag.nil? && feature_flag.to_s.length > 256
249
+ fail ArgumentError, 'invalid value for "feature_flag", the character length must be smaller than or equal to 256.'
250
+ end
251
+
252
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
253
+ if !feature_flag.nil? && feature_flag !~ pattern
254
+ fail ArgumentError, "invalid value for \"feature_flag\", must conform to the pattern #{pattern}."
255
+ end
256
+
257
+ @feature_flag = feature_flag
258
+ end
259
+
225
260
  # Custom attribute writer method with validation
226
261
  # @param [Object] filter_types Value to be assigned
227
262
  def filter_types=(filter_types)
@@ -239,6 +274,7 @@ module Svix
239
274
  self.class == o.class &&
240
275
  created_at == o.created_at &&
241
276
  description == o.description &&
277
+ feature_flag == o.feature_flag &&
242
278
  filter_types == o.filter_types &&
243
279
  id == o.id &&
244
280
  instructions == o.instructions &&
@@ -260,7 +296,7 @@ module Svix
260
296
  # Calculates hash code according to all attributes.
261
297
  # @return [Integer] Hash code
262
298
  def hash
263
- [created_at, description, filter_types, id, instructions, instructions_link, kind, logo, name, org_id, transformation, updated_at].hash
299
+ [created_at, description, feature_flag, filter_types, id, instructions, instructions_link, kind, logo, name, org_id, transformation, updated_at].hash
264
300
  end
265
301
 
266
302
  # Builds the object from hash
@@ -17,12 +17,16 @@ module Svix
17
17
  class TemplatePatch
18
18
  attr_accessor :description
19
19
 
20
+ attr_accessor :feature_flag
21
+
20
22
  attr_accessor :filter_types
21
23
 
22
24
  attr_accessor :instructions
23
25
 
24
26
  attr_accessor :instructions_link
25
27
 
28
+ attr_accessor :kind
29
+
26
30
  attr_accessor :logo
27
31
 
28
32
  attr_accessor :name
@@ -33,9 +37,11 @@ module Svix
33
37
  def self.attribute_map
34
38
  {
35
39
  :'description' => :'description',
40
+ :'feature_flag' => :'featureFlag',
36
41
  :'filter_types' => :'filterTypes',
37
42
  :'instructions' => :'instructions',
38
43
  :'instructions_link' => :'instructionsLink',
44
+ :'kind' => :'kind',
39
45
  :'logo' => :'logo',
40
46
  :'name' => :'name',
41
47
  :'transformation' => :'transformation'
@@ -51,9 +57,11 @@ module Svix
51
57
  def self.openapi_types
52
58
  {
53
59
  :'description' => :'String',
60
+ :'feature_flag' => :'String',
54
61
  :'filter_types' => :'Array<String>',
55
62
  :'instructions' => :'String',
56
63
  :'instructions_link' => :'String',
64
+ :'kind' => :'TransformationTemplateKind',
57
65
  :'logo' => :'String',
58
66
  :'name' => :'String',
59
67
  :'transformation' => :'String'
@@ -63,6 +71,7 @@ module Svix
63
71
  # List of attributes with nullable: true
64
72
  def self.openapi_nullable
65
73
  Set.new([
74
+ :'feature_flag',
66
75
  :'filter_types',
67
76
  :'instructions_link',
68
77
  ])
@@ -87,6 +96,10 @@ module Svix
87
96
  self.description = attributes[:'description']
88
97
  end
89
98
 
99
+ if attributes.key?(:'feature_flag')
100
+ self.feature_flag = attributes[:'feature_flag']
101
+ end
102
+
90
103
  if attributes.key?(:'filter_types')
91
104
  if (value = attributes[:'filter_types']).is_a?(Array)
92
105
  self.filter_types = value
@@ -101,6 +114,10 @@ module Svix
101
114
  self.instructions_link = attributes[:'instructions_link']
102
115
  end
103
116
 
117
+ if attributes.key?(:'kind')
118
+ self.kind = attributes[:'kind']
119
+ end
120
+
104
121
  if attributes.key?(:'logo')
105
122
  self.logo = attributes[:'logo']
106
123
  end
@@ -118,6 +135,15 @@ module Svix
118
135
  # @return Array for valid properties with the reasons
119
136
  def list_invalid_properties
120
137
  invalid_properties = Array.new
138
+ if !@feature_flag.nil? && @feature_flag.to_s.length > 256
139
+ invalid_properties.push('invalid value for "feature_flag", the character length must be smaller than or equal to 256.')
140
+ end
141
+
142
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
143
+ if !@feature_flag.nil? && @feature_flag !~ pattern
144
+ invalid_properties.push("invalid value for \"feature_flag\", must conform to the pattern #{pattern}.")
145
+ end
146
+
121
147
  if !@filter_types.nil? && @filter_types.length < 1
122
148
  invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
123
149
  end
@@ -136,12 +162,29 @@ module Svix
136
162
  # Check to see if the all the properties in the model are valid
137
163
  # @return true if the model is valid
138
164
  def valid?
165
+ return false if !@feature_flag.nil? && @feature_flag.to_s.length > 256
166
+ return false if !@feature_flag.nil? && @feature_flag !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
139
167
  return false if !@filter_types.nil? && @filter_types.length < 1
140
168
  return false if !@transformation.nil? && @transformation.to_s.length > 51200
141
169
  return false if !@transformation.nil? && @transformation.to_s.length < 10
142
170
  true
143
171
  end
144
172
 
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] feature_flag Value to be assigned
175
+ def feature_flag=(feature_flag)
176
+ if !feature_flag.nil? && feature_flag.to_s.length > 256
177
+ fail ArgumentError, 'invalid value for "feature_flag", the character length must be smaller than or equal to 256.'
178
+ end
179
+
180
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
181
+ if !feature_flag.nil? && feature_flag !~ pattern
182
+ fail ArgumentError, "invalid value for \"feature_flag\", must conform to the pattern #{pattern}."
183
+ end
184
+
185
+ @feature_flag = feature_flag
186
+ end
187
+
145
188
  # Custom attribute writer method with validation
146
189
  # @param [Object] filter_types Value to be assigned
147
190
  def filter_types=(filter_types)
@@ -172,9 +215,11 @@ module Svix
172
215
  return true if self.equal?(o)
173
216
  self.class == o.class &&
174
217
  description == o.description &&
218
+ feature_flag == o.feature_flag &&
175
219
  filter_types == o.filter_types &&
176
220
  instructions == o.instructions &&
177
221
  instructions_link == o.instructions_link &&
222
+ kind == o.kind &&
178
223
  logo == o.logo &&
179
224
  name == o.name &&
180
225
  transformation == o.transformation
@@ -189,7 +234,7 @@ module Svix
189
234
  # Calculates hash code according to all attributes.
190
235
  # @return [Integer] Hash code
191
236
  def hash
192
- [description, filter_types, instructions, instructions_link, logo, name, transformation].hash
237
+ [description, feature_flag, filter_types, instructions, instructions_link, kind, logo, name, transformation].hash
193
238
  end
194
239
 
195
240
  # Builds the object from hash
@@ -17,12 +17,16 @@ module Svix
17
17
  class TemplateUpdate
18
18
  attr_accessor :description
19
19
 
20
+ attr_accessor :feature_flag
21
+
20
22
  attr_accessor :filter_types
21
23
 
22
24
  attr_accessor :instructions
23
25
 
24
26
  attr_accessor :instructions_link
25
27
 
28
+ attr_accessor :kind
29
+
26
30
  attr_accessor :logo
27
31
 
28
32
  attr_accessor :name
@@ -33,9 +37,11 @@ module Svix
33
37
  def self.attribute_map
34
38
  {
35
39
  :'description' => :'description',
40
+ :'feature_flag' => :'featureFlag',
36
41
  :'filter_types' => :'filterTypes',
37
42
  :'instructions' => :'instructions',
38
43
  :'instructions_link' => :'instructionsLink',
44
+ :'kind' => :'kind',
39
45
  :'logo' => :'logo',
40
46
  :'name' => :'name',
41
47
  :'transformation' => :'transformation'
@@ -51,9 +57,11 @@ module Svix
51
57
  def self.openapi_types
52
58
  {
53
59
  :'description' => :'String',
60
+ :'feature_flag' => :'String',
54
61
  :'filter_types' => :'Array<String>',
55
62
  :'instructions' => :'String',
56
63
  :'instructions_link' => :'String',
64
+ :'kind' => :'TransformationTemplateKind',
57
65
  :'logo' => :'String',
58
66
  :'name' => :'String',
59
67
  :'transformation' => :'String'
@@ -63,6 +71,7 @@ module Svix
63
71
  # List of attributes with nullable: true
64
72
  def self.openapi_nullable
65
73
  Set.new([
74
+ :'feature_flag',
66
75
  :'filter_types',
67
76
  :'instructions_link',
68
77
  ])
@@ -89,6 +98,10 @@ module Svix
89
98
  self.description = ''
90
99
  end
91
100
 
101
+ if attributes.key?(:'feature_flag')
102
+ self.feature_flag = attributes[:'feature_flag']
103
+ end
104
+
92
105
  if attributes.key?(:'filter_types')
93
106
  if (value = attributes[:'filter_types']).is_a?(Array)
94
107
  self.filter_types = value
@@ -105,6 +118,10 @@ module Svix
105
118
  self.instructions_link = attributes[:'instructions_link']
106
119
  end
107
120
 
121
+ if attributes.key?(:'kind')
122
+ self.kind = attributes[:'kind']
123
+ end
124
+
108
125
  if attributes.key?(:'logo')
109
126
  self.logo = attributes[:'logo']
110
127
  end
@@ -124,6 +141,15 @@ module Svix
124
141
  # @return Array for valid properties with the reasons
125
142
  def list_invalid_properties
126
143
  invalid_properties = Array.new
144
+ if !@feature_flag.nil? && @feature_flag.to_s.length > 256
145
+ invalid_properties.push('invalid value for "feature_flag", the character length must be smaller than or equal to 256.')
146
+ end
147
+
148
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
149
+ if !@feature_flag.nil? && @feature_flag !~ pattern
150
+ invalid_properties.push("invalid value for \"feature_flag\", must conform to the pattern #{pattern}.")
151
+ end
152
+
127
153
  if !@filter_types.nil? && @filter_types.length < 1
128
154
  invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
129
155
  end
@@ -150,6 +176,8 @@ module Svix
150
176
  # Check to see if the all the properties in the model are valid
151
177
  # @return true if the model is valid
152
178
  def valid?
179
+ return false if !@feature_flag.nil? && @feature_flag.to_s.length > 256
180
+ return false if !@feature_flag.nil? && @feature_flag !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
153
181
  return false if !@filter_types.nil? && @filter_types.length < 1
154
182
  return false if @logo.nil?
155
183
  return false if @transformation.nil?
@@ -158,6 +186,21 @@ module Svix
158
186
  true
159
187
  end
160
188
 
189
+ # Custom attribute writer method with validation
190
+ # @param [Object] feature_flag Value to be assigned
191
+ def feature_flag=(feature_flag)
192
+ if !feature_flag.nil? && feature_flag.to_s.length > 256
193
+ fail ArgumentError, 'invalid value for "feature_flag", the character length must be smaller than or equal to 256.'
194
+ end
195
+
196
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
197
+ if !feature_flag.nil? && feature_flag !~ pattern
198
+ fail ArgumentError, "invalid value for \"feature_flag\", must conform to the pattern #{pattern}."
199
+ end
200
+
201
+ @feature_flag = feature_flag
202
+ end
203
+
161
204
  # Custom attribute writer method with validation
162
205
  # @param [Object] filter_types Value to be assigned
163
206
  def filter_types=(filter_types)
@@ -192,9 +235,11 @@ module Svix
192
235
  return true if self.equal?(o)
193
236
  self.class == o.class &&
194
237
  description == o.description &&
238
+ feature_flag == o.feature_flag &&
195
239
  filter_types == o.filter_types &&
196
240
  instructions == o.instructions &&
197
241
  instructions_link == o.instructions_link &&
242
+ kind == o.kind &&
198
243
  logo == o.logo &&
199
244
  name == o.name &&
200
245
  transformation == o.transformation
@@ -209,7 +254,7 @@ module Svix
209
254
  # Calculates hash code according to all attributes.
210
255
  # @return [Integer] Hash code
211
256
  def hash
212
- [description, filter_types, instructions, instructions_link, logo, name, transformation].hash
257
+ [description, feature_flag, filter_types, instructions, instructions_link, kind, logo, name, transformation].hash
213
258
  end
214
259
 
215
260
  # Builds the object from hash
@@ -16,6 +16,7 @@ require 'time'
16
16
  module Svix
17
17
  class TransformationTemplateKind
18
18
  CUSTOM = "Custom".freeze
19
+ SLACK = "Slack".freeze
19
20
 
20
21
  # Builds the enum from string
21
22
  # @param [String] The enum value in the form of the string
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.11.0"
4
+ VERSION = "1.13.0"
5
5
  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.11.0
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-04 00:00:00.000000000 Z
11
+ date: 2023-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus