svix 0.61.0 → 0.62.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/models/application_in.rb +2 -0
  4. data/lib/svix/models/application_out.rb +2 -0
  5. data/lib/svix/models/attempt_statistics_data.rb +2 -0
  6. data/lib/svix/models/custom_color_palette.rb +6 -0
  7. data/lib/svix/models/endpoint_created_event_data.rb +51 -4
  8. data/lib/svix/models/endpoint_deleted_event_data.rb +51 -4
  9. data/lib/svix/models/endpoint_disabled_event_data.rb +48 -1
  10. data/lib/svix/models/endpoint_in.rb +9 -4
  11. data/lib/svix/models/endpoint_message_out.rb +7 -2
  12. data/lib/svix/models/endpoint_out.rb +4 -0
  13. data/lib/svix/models/endpoint_secret_out.rb +4 -4
  14. data/lib/svix/models/endpoint_secret_rotate_in.rb +5 -4
  15. data/lib/svix/models/endpoint_update.rb +4 -0
  16. data/lib/svix/models/endpoint_updated_event_data.rb +51 -4
  17. data/lib/svix/models/environment_in.rb +1 -0
  18. data/lib/svix/models/environment_settings_out.rb +3 -0
  19. data/lib/svix/models/event_type_example_out.rb +4 -2
  20. data/lib/svix/models/event_type_in.rb +1 -0
  21. data/lib/svix/models/event_type_out.rb +1 -0
  22. data/lib/svix/models/event_type_update.rb +1 -0
  23. data/lib/svix/models/font_size_config.rb +1 -0
  24. data/lib/svix/models/list_response_application_out.rb +1 -0
  25. data/lib/svix/models/list_response_endpoint_message_out.rb +2 -0
  26. data/lib/svix/models/list_response_endpoint_out.rb +1 -0
  27. data/lib/svix/models/list_response_event_type_out.rb +1 -0
  28. data/lib/svix/models/list_response_integration_out.rb +1 -0
  29. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +2 -0
  30. data/lib/svix/models/list_response_message_attempt_out.rb +2 -0
  31. data/lib/svix/models/list_response_message_endpoint_out.rb +1 -0
  32. data/lib/svix/models/list_response_message_out.rb +2 -0
  33. data/lib/svix/models/message_attempt_exhausted_event_data.rb +48 -1
  34. data/lib/svix/models/message_attempt_failing_event_data.rb +48 -1
  35. data/lib/svix/models/message_endpoint_out.rb +5 -0
  36. data/lib/svix/models/message_in.rb +6 -2
  37. data/lib/svix/models/message_out.rb +6 -2
  38. data/lib/svix/models/settings_in.rb +6 -0
  39. data/lib/svix/models/settings_out.rb +6 -0
  40. data/lib/svix/version.rb +1 -1
  41. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbef83204dc805098f684bb5caf3fc707575e2f6afb1c1646bafdad6be5c2bfb
4
- data.tar.gz: 91c1ace888ae882fcd4ea8afe63721eca7453574db2d1d637771fd9b349f9d17
3
+ metadata.gz: b7d56e59355325ba16710774d5755119e3dda7eb2b43e2c1bfee7da627615384
4
+ data.tar.gz: e376f3052618c320d5280dd01ee7899ddb14fffaf264d5482e8d77e597388180
5
5
  SHA512:
6
- metadata.gz: f9666e194c71ef92c7648d2b222224b833c5a8a6379e94e04dc77aa928fdef7040a0e521d58fb9923cc86a85e979ede36c5b439e1e1f296d4240eead1034d3c0
7
- data.tar.gz: 768c5fabe2714bbb4f13805a07f96a1e7e9bbf15e6f6de2a4dba4519700785347b3932a18967e9f4146a69e674088db793017b4cb331a5c0a60adc2ed97563a2
6
+ metadata.gz: 9d9c4b0e689d975c627badc1917d81e0c3e9384bcfbca6d0fc4904f3d6f9b3730015a2d126e4acbf73fbda20be56668ef3501476c2fa4761b3d917200bf439c1
7
+ data.tar.gz: 30bfffcb8c3e688071dda73bd70fe4d60d62697354cff38325fa53064f3aa4925f4d2b81ff0d5f32e3933d0fdc2f127246f439af2dc9fbbedcd2c33b6cbe80c3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (0.61.0)
4
+ svix (0.62.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -48,6 +48,8 @@ module Svix
48
48
  # List of attributes with nullable: true
49
49
  def self.openapi_nullable
50
50
  Set.new([
51
+ :'rate_limit',
52
+ :'uid'
51
53
  ])
52
54
  end
53
55
 
@@ -60,6 +60,8 @@ module Svix
60
60
  # List of attributes with nullable: true
61
61
  def self.openapi_nullable
62
62
  Set.new([
63
+ :'rate_limit',
64
+ :'uid',
63
65
  ])
64
66
  end
65
67
 
@@ -43,6 +43,8 @@ module Svix
43
43
  # List of attributes with nullable: true
44
44
  def self.openapi_nullable
45
45
  Set.new([
46
+ :'failure_count',
47
+ :'success_count'
46
48
  ])
47
49
  end
48
50
 
@@ -59,6 +59,12 @@ module Svix
59
59
  # List of attributes with nullable: true
60
60
  def self.openapi_nullable
61
61
  Set.new([
62
+ :'background_hover',
63
+ :'background_primary',
64
+ :'background_secondary',
65
+ :'interactive_accent',
66
+ :'text_danger',
67
+ :'text_primary'
62
68
  ])
63
69
  end
64
70
 
@@ -22,12 +22,16 @@ module Svix
22
22
 
23
23
  attr_accessor :endpoint_id
24
24
 
25
+ # Optional unique identifier for the endpoint
26
+ attr_accessor :endpoint_uid
27
+
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
26
29
  def self.attribute_map
27
30
  {
28
31
  :'app_id' => :'appId',
29
32
  :'app_uid' => :'appUid',
30
- :'endpoint_id' => :'endpointId'
33
+ :'endpoint_id' => :'endpointId',
34
+ :'endpoint_uid' => :'endpointUid'
31
35
  }
32
36
  end
33
37
 
@@ -41,13 +45,16 @@ module Svix
41
45
  {
42
46
  :'app_id' => :'String',
43
47
  :'app_uid' => :'String',
44
- :'endpoint_id' => :'String'
48
+ :'endpoint_id' => :'String',
49
+ :'endpoint_uid' => :'String'
45
50
  }
46
51
  end
47
52
 
48
53
  # List of attributes with nullable: true
49
54
  def self.openapi_nullable
50
55
  Set.new([
56
+ :'app_uid',
57
+ :'endpoint_uid'
51
58
  ])
52
59
  end
53
60
 
@@ -77,6 +84,10 @@ module Svix
77
84
  if attributes.key?(:'endpoint_id')
78
85
  self.endpoint_id = attributes[:'endpoint_id']
79
86
  end
87
+
88
+ if attributes.key?(:'endpoint_uid')
89
+ self.endpoint_uid = attributes[:'endpoint_uid']
90
+ end
80
91
  end
81
92
 
82
93
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -104,6 +115,19 @@ module Svix
104
115
  invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
105
116
  end
106
117
 
118
+ if !@endpoint_uid.nil? && @endpoint_uid.to_s.length > 256
119
+ invalid_properties.push('invalid value for "endpoint_uid", the character length must be smaller than or equal to 256.')
120
+ end
121
+
122
+ if !@endpoint_uid.nil? && @endpoint_uid.to_s.length < 1
123
+ invalid_properties.push('invalid value for "endpoint_uid", the character length must be great than or equal to 1.')
124
+ end
125
+
126
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
127
+ if !@endpoint_uid.nil? && @endpoint_uid !~ pattern
128
+ invalid_properties.push("invalid value for \"endpoint_uid\", must conform to the pattern #{pattern}.")
129
+ end
130
+
107
131
  invalid_properties
108
132
  end
109
133
 
@@ -115,6 +139,9 @@ module Svix
115
139
  return false if !@app_uid.nil? && @app_uid.to_s.length < 1
116
140
  return false if !@app_uid.nil? && @app_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
117
141
  return false if @endpoint_id.nil?
142
+ return false if !@endpoint_uid.nil? && @endpoint_uid.to_s.length > 256
143
+ return false if !@endpoint_uid.nil? && @endpoint_uid.to_s.length < 1
144
+ return false if !@endpoint_uid.nil? && @endpoint_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
118
145
  true
119
146
  end
120
147
 
@@ -137,6 +164,25 @@ module Svix
137
164
  @app_uid = app_uid
138
165
  end
139
166
 
167
+ # Custom attribute writer method with validation
168
+ # @param [Object] endpoint_uid Value to be assigned
169
+ def endpoint_uid=(endpoint_uid)
170
+ if !endpoint_uid.nil? && endpoint_uid.to_s.length > 256
171
+ fail ArgumentError, 'invalid value for "endpoint_uid", the character length must be smaller than or equal to 256.'
172
+ end
173
+
174
+ if !endpoint_uid.nil? && endpoint_uid.to_s.length < 1
175
+ fail ArgumentError, 'invalid value for "endpoint_uid", the character length must be great than or equal to 1.'
176
+ end
177
+
178
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
179
+ if !endpoint_uid.nil? && endpoint_uid !~ pattern
180
+ fail ArgumentError, "invalid value for \"endpoint_uid\", must conform to the pattern #{pattern}."
181
+ end
182
+
183
+ @endpoint_uid = endpoint_uid
184
+ end
185
+
140
186
  # Checks equality by comparing each attribute.
141
187
  # @param [Object] Object to be compared
142
188
  def ==(o)
@@ -144,7 +190,8 @@ module Svix
144
190
  self.class == o.class &&
145
191
  app_id == o.app_id &&
146
192
  app_uid == o.app_uid &&
147
- endpoint_id == o.endpoint_id
193
+ endpoint_id == o.endpoint_id &&
194
+ endpoint_uid == o.endpoint_uid
148
195
  end
149
196
 
150
197
  # @see the `==` method
@@ -156,7 +203,7 @@ module Svix
156
203
  # Calculates hash code according to all attributes.
157
204
  # @return [Integer] Hash code
158
205
  def hash
159
- [app_id, app_uid, endpoint_id].hash
206
+ [app_id, app_uid, endpoint_id, endpoint_uid].hash
160
207
  end
161
208
 
162
209
  # Builds the object from hash
@@ -22,12 +22,16 @@ module Svix
22
22
 
23
23
  attr_accessor :endpoint_id
24
24
 
25
+ # Optional unique identifier for the endpoint
26
+ attr_accessor :endpoint_uid
27
+
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
26
29
  def self.attribute_map
27
30
  {
28
31
  :'app_id' => :'appId',
29
32
  :'app_uid' => :'appUid',
30
- :'endpoint_id' => :'endpointId'
33
+ :'endpoint_id' => :'endpointId',
34
+ :'endpoint_uid' => :'endpointUid'
31
35
  }
32
36
  end
33
37
 
@@ -41,13 +45,16 @@ module Svix
41
45
  {
42
46
  :'app_id' => :'String',
43
47
  :'app_uid' => :'String',
44
- :'endpoint_id' => :'String'
48
+ :'endpoint_id' => :'String',
49
+ :'endpoint_uid' => :'String'
45
50
  }
46
51
  end
47
52
 
48
53
  # List of attributes with nullable: true
49
54
  def self.openapi_nullable
50
55
  Set.new([
56
+ :'app_uid',
57
+ :'endpoint_uid'
51
58
  ])
52
59
  end
53
60
 
@@ -77,6 +84,10 @@ module Svix
77
84
  if attributes.key?(:'endpoint_id')
78
85
  self.endpoint_id = attributes[:'endpoint_id']
79
86
  end
87
+
88
+ if attributes.key?(:'endpoint_uid')
89
+ self.endpoint_uid = attributes[:'endpoint_uid']
90
+ end
80
91
  end
81
92
 
82
93
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -104,6 +115,19 @@ module Svix
104
115
  invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
105
116
  end
106
117
 
118
+ if !@endpoint_uid.nil? && @endpoint_uid.to_s.length > 256
119
+ invalid_properties.push('invalid value for "endpoint_uid", the character length must be smaller than or equal to 256.')
120
+ end
121
+
122
+ if !@endpoint_uid.nil? && @endpoint_uid.to_s.length < 1
123
+ invalid_properties.push('invalid value for "endpoint_uid", the character length must be great than or equal to 1.')
124
+ end
125
+
126
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
127
+ if !@endpoint_uid.nil? && @endpoint_uid !~ pattern
128
+ invalid_properties.push("invalid value for \"endpoint_uid\", must conform to the pattern #{pattern}.")
129
+ end
130
+
107
131
  invalid_properties
108
132
  end
109
133
 
@@ -115,6 +139,9 @@ module Svix
115
139
  return false if !@app_uid.nil? && @app_uid.to_s.length < 1
116
140
  return false if !@app_uid.nil? && @app_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
117
141
  return false if @endpoint_id.nil?
142
+ return false if !@endpoint_uid.nil? && @endpoint_uid.to_s.length > 256
143
+ return false if !@endpoint_uid.nil? && @endpoint_uid.to_s.length < 1
144
+ return false if !@endpoint_uid.nil? && @endpoint_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
118
145
  true
119
146
  end
120
147
 
@@ -137,6 +164,25 @@ module Svix
137
164
  @app_uid = app_uid
138
165
  end
139
166
 
167
+ # Custom attribute writer method with validation
168
+ # @param [Object] endpoint_uid Value to be assigned
169
+ def endpoint_uid=(endpoint_uid)
170
+ if !endpoint_uid.nil? && endpoint_uid.to_s.length > 256
171
+ fail ArgumentError, 'invalid value for "endpoint_uid", the character length must be smaller than or equal to 256.'
172
+ end
173
+
174
+ if !endpoint_uid.nil? && endpoint_uid.to_s.length < 1
175
+ fail ArgumentError, 'invalid value for "endpoint_uid", the character length must be great than or equal to 1.'
176
+ end
177
+
178
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
179
+ if !endpoint_uid.nil? && endpoint_uid !~ pattern
180
+ fail ArgumentError, "invalid value for \"endpoint_uid\", must conform to the pattern #{pattern}."
181
+ end
182
+
183
+ @endpoint_uid = endpoint_uid
184
+ end
185
+
140
186
  # Checks equality by comparing each attribute.
141
187
  # @param [Object] Object to be compared
142
188
  def ==(o)
@@ -144,7 +190,8 @@ module Svix
144
190
  self.class == o.class &&
145
191
  app_id == o.app_id &&
146
192
  app_uid == o.app_uid &&
147
- endpoint_id == o.endpoint_id
193
+ endpoint_id == o.endpoint_id &&
194
+ endpoint_uid == o.endpoint_uid
148
195
  end
149
196
 
150
197
  # @see the `==` method
@@ -156,7 +203,7 @@ module Svix
156
203
  # Calculates hash code according to all attributes.
157
204
  # @return [Integer] Hash code
158
205
  def hash
159
- [app_id, app_uid, endpoint_id].hash
206
+ [app_id, app_uid, endpoint_id, endpoint_uid].hash
160
207
  end
161
208
 
162
209
  # Builds the object from hash
@@ -22,6 +22,9 @@ module Svix
22
22
 
23
23
  attr_accessor :endpoint_id
24
24
 
25
+ # Optional unique identifier for the endpoint
26
+ attr_accessor :endpoint_uid
27
+
25
28
  attr_accessor :fail_since
26
29
 
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -30,6 +33,7 @@ module Svix
30
33
  :'app_id' => :'appId',
31
34
  :'app_uid' => :'appUid',
32
35
  :'endpoint_id' => :'endpointId',
36
+ :'endpoint_uid' => :'endpointUid',
33
37
  :'fail_since' => :'failSince'
34
38
  }
35
39
  end
@@ -45,6 +49,7 @@ module Svix
45
49
  :'app_id' => :'String',
46
50
  :'app_uid' => :'String',
47
51
  :'endpoint_id' => :'String',
52
+ :'endpoint_uid' => :'String',
48
53
  :'fail_since' => :'Time'
49
54
  }
50
55
  end
@@ -52,6 +57,8 @@ module Svix
52
57
  # List of attributes with nullable: true
53
58
  def self.openapi_nullable
54
59
  Set.new([
60
+ :'app_uid',
61
+ :'endpoint_uid',
55
62
  ])
56
63
  end
57
64
 
@@ -82,6 +89,10 @@ module Svix
82
89
  self.endpoint_id = attributes[:'endpoint_id']
83
90
  end
84
91
 
92
+ if attributes.key?(:'endpoint_uid')
93
+ self.endpoint_uid = attributes[:'endpoint_uid']
94
+ end
95
+
85
96
  if attributes.key?(:'fail_since')
86
97
  self.fail_since = attributes[:'fail_since']
87
98
  end
@@ -112,6 +123,19 @@ module Svix
112
123
  invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
113
124
  end
114
125
 
126
+ if !@endpoint_uid.nil? && @endpoint_uid.to_s.length > 256
127
+ invalid_properties.push('invalid value for "endpoint_uid", the character length must be smaller than or equal to 256.')
128
+ end
129
+
130
+ if !@endpoint_uid.nil? && @endpoint_uid.to_s.length < 1
131
+ invalid_properties.push('invalid value for "endpoint_uid", the character length must be great than or equal to 1.')
132
+ end
133
+
134
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
135
+ if !@endpoint_uid.nil? && @endpoint_uid !~ pattern
136
+ invalid_properties.push("invalid value for \"endpoint_uid\", must conform to the pattern #{pattern}.")
137
+ end
138
+
115
139
  if @fail_since.nil?
116
140
  invalid_properties.push('invalid value for "fail_since", fail_since cannot be nil.')
117
141
  end
@@ -127,6 +151,9 @@ module Svix
127
151
  return false if !@app_uid.nil? && @app_uid.to_s.length < 1
128
152
  return false if !@app_uid.nil? && @app_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
129
153
  return false if @endpoint_id.nil?
154
+ return false if !@endpoint_uid.nil? && @endpoint_uid.to_s.length > 256
155
+ return false if !@endpoint_uid.nil? && @endpoint_uid.to_s.length < 1
156
+ return false if !@endpoint_uid.nil? && @endpoint_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
130
157
  return false if @fail_since.nil?
131
158
  true
132
159
  end
@@ -150,6 +177,25 @@ module Svix
150
177
  @app_uid = app_uid
151
178
  end
152
179
 
180
+ # Custom attribute writer method with validation
181
+ # @param [Object] endpoint_uid Value to be assigned
182
+ def endpoint_uid=(endpoint_uid)
183
+ if !endpoint_uid.nil? && endpoint_uid.to_s.length > 256
184
+ fail ArgumentError, 'invalid value for "endpoint_uid", the character length must be smaller than or equal to 256.'
185
+ end
186
+
187
+ if !endpoint_uid.nil? && endpoint_uid.to_s.length < 1
188
+ fail ArgumentError, 'invalid value for "endpoint_uid", the character length must be great than or equal to 1.'
189
+ end
190
+
191
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
192
+ if !endpoint_uid.nil? && endpoint_uid !~ pattern
193
+ fail ArgumentError, "invalid value for \"endpoint_uid\", must conform to the pattern #{pattern}."
194
+ end
195
+
196
+ @endpoint_uid = endpoint_uid
197
+ end
198
+
153
199
  # Checks equality by comparing each attribute.
154
200
  # @param [Object] Object to be compared
155
201
  def ==(o)
@@ -158,6 +204,7 @@ module Svix
158
204
  app_id == o.app_id &&
159
205
  app_uid == o.app_uid &&
160
206
  endpoint_id == o.endpoint_id &&
207
+ endpoint_uid == o.endpoint_uid &&
161
208
  fail_since == o.fail_since
162
209
  end
163
210
 
@@ -170,7 +217,7 @@ module Svix
170
217
  # Calculates hash code according to all attributes.
171
218
  # @return [Integer] Hash code
172
219
  def hash
173
- [app_id, app_uid, endpoint_id, fail_since].hash
220
+ [app_id, app_uid, endpoint_id, endpoint_uid, fail_since].hash
174
221
  end
175
222
 
176
223
  # Builds the object from hash
@@ -26,7 +26,7 @@ module Svix
26
26
 
27
27
  attr_accessor :rate_limit
28
28
 
29
- # The endpoint's verification secret. If `null` is passed, a secret is automatically generated.
29
+ # The endpoint's verification secret. If `null` is passed, a secret is automatically generated. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24.
30
30
  attr_accessor :secret
31
31
 
32
32
  # Optional unique identifier for the endpoint
@@ -74,6 +74,11 @@ module Svix
74
74
  # List of attributes with nullable: true
75
75
  def self.openapi_nullable
76
76
  Set.new([
77
+ :'channels',
78
+ :'filter_types',
79
+ :'rate_limit',
80
+ :'secret',
81
+ :'uid',
77
82
  ])
78
83
  end
79
84
 
@@ -153,7 +158,7 @@ module Svix
153
158
  invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
154
159
  end
155
160
 
156
- pattern = Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
161
+ pattern = Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
157
162
  if !@secret.nil? && @secret !~ pattern
158
163
  invalid_properties.push("invalid value for \"secret\", must conform to the pattern #{pattern}.")
159
164
  end
@@ -196,7 +201,7 @@ module Svix
196
201
  return false if !@channels.nil? && @channels.length > 10
197
202
  return false if !@channels.nil? && @channels.length < 1
198
203
  return false if !@filter_types.nil? && @filter_types.length < 1
199
- return false if !@secret.nil? && @secret !~ Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
204
+ return false if !@secret.nil? && @secret !~ Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
200
205
  return false if !@uid.nil? && @uid.to_s.length > 256
201
206
  return false if !@uid.nil? && @uid.to_s.length < 1
202
207
  return false if !@uid.nil? && @uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
@@ -234,7 +239,7 @@ module Svix
234
239
  # Custom attribute writer method with validation
235
240
  # @param [Object] secret Value to be assigned
236
241
  def secret=(secret)
237
- pattern = Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
242
+ pattern = Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
238
243
  if !secret.nil? && secret !~ pattern
239
244
  fail ArgumentError, "invalid value for \"secret\", must conform to the pattern #{pattern}."
240
245
  end
@@ -60,7 +60,7 @@ module Svix
60
60
  :'event_type' => :'String',
61
61
  :'id' => :'String',
62
62
  :'next_attempt' => :'Time',
63
- :'payload' => :'Object',
63
+ :'payload' => :'Hash<String, AnyType>',
64
64
  :'status' => :'MessageStatus',
65
65
  :'timestamp' => :'Time'
66
66
  }
@@ -69,6 +69,9 @@ module Svix
69
69
  # List of attributes with nullable: true
70
70
  def self.openapi_nullable
71
71
  Set.new([
72
+ :'channels',
73
+ :'event_id',
74
+ :'next_attempt',
72
75
  ])
73
76
  end
74
77
 
@@ -110,7 +113,9 @@ module Svix
110
113
  end
111
114
 
112
115
  if attributes.key?(:'payload')
113
- self.payload = attributes[:'payload']
116
+ if (value = attributes[:'payload']).is_a?(Hash)
117
+ self.payload = value
118
+ end
114
119
  end
115
120
 
116
121
  if attributes.key?(:'status')
@@ -81,6 +81,10 @@ module Svix
81
81
  # List of attributes with nullable: true
82
82
  def self.openapi_nullable
83
83
  Set.new([
84
+ :'channels',
85
+ :'filter_types',
86
+ :'rate_limit',
87
+ :'uid',
84
88
  ])
85
89
  end
86
90
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Svix
17
17
  class EndpointSecretOut
18
- # The endpoint's verification secret. If `null` is passed, a secret is automatically generated.
18
+ # The endpoint's verification secret. If `null` is passed, a secret is automatically generated. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24.
19
19
  attr_accessor :key
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -71,7 +71,7 @@ module Svix
71
71
  invalid_properties.push('invalid value for "key", key cannot be nil.')
72
72
  end
73
73
 
74
- pattern = Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
74
+ pattern = Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
75
75
  if @key !~ pattern
76
76
  invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
77
77
  end
@@ -83,7 +83,7 @@ module Svix
83
83
  # @return true if the model is valid
84
84
  def valid?
85
85
  return false if @key.nil?
86
- return false if @key !~ Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
86
+ return false if @key !~ Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
87
87
  true
88
88
  end
89
89
 
@@ -94,7 +94,7 @@ module Svix
94
94
  fail ArgumentError, 'key cannot be nil'
95
95
  end
96
96
 
97
- pattern = Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
97
+ pattern = Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
98
98
  if key !~ pattern
99
99
  fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
100
100
  end
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Svix
17
17
  class EndpointSecretRotateIn
18
- # The endpoint's verification secret. If `null` is passed, a secret is automatically generated.
18
+ # The endpoint's verification secret. If `null` is passed, a secret is automatically generated. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24.
19
19
  attr_accessor :key
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -40,6 +40,7 @@ module Svix
40
40
  # List of attributes with nullable: true
41
41
  def self.openapi_nullable
42
42
  Set.new([
43
+ :'key'
43
44
  ])
44
45
  end
45
46
 
@@ -67,7 +68,7 @@ module Svix
67
68
  # @return Array for valid properties with the reasons
68
69
  def list_invalid_properties
69
70
  invalid_properties = Array.new
70
- pattern = Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
71
+ pattern = Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
71
72
  if !@key.nil? && @key !~ pattern
72
73
  invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
73
74
  end
@@ -78,14 +79,14 @@ module Svix
78
79
  # Check to see if the all the properties in the model are valid
79
80
  # @return true if the model is valid
80
81
  def valid?
81
- return false if !@key.nil? && @key !~ Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
82
+ return false if !@key.nil? && @key !~ Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
82
83
  true
83
84
  end
84
85
 
85
86
  # Custom attribute writer method with validation
86
87
  # @param [Object] key Value to be assigned
87
88
  def key=(key)
88
- pattern = Regexp.new(/^whsec_[a-zA-Z0-9+\/]{32}$/)
89
+ pattern = Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
89
90
  if !key.nil? && key !~ pattern
90
91
  fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
91
92
  end
@@ -69,6 +69,10 @@ module Svix
69
69
  # List of attributes with nullable: true
70
70
  def self.openapi_nullable
71
71
  Set.new([
72
+ :'channels',
73
+ :'filter_types',
74
+ :'rate_limit',
75
+ :'uid',
72
76
  ])
73
77
  end
74
78
 
@@ -22,12 +22,16 @@ module Svix
22
22
 
23
23
  attr_accessor :endpoint_id
24
24
 
25
+ # Optional unique identifier for the endpoint
26
+ attr_accessor :endpoint_uid
27
+
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
26
29
  def self.attribute_map
27
30
  {
28
31
  :'app_id' => :'appId',
29
32
  :'app_uid' => :'appUid',
30
- :'endpoint_id' => :'endpointId'
33
+ :'endpoint_id' => :'endpointId',
34
+ :'endpoint_uid' => :'endpointUid'
31
35
  }
32
36
  end
33
37
 
@@ -41,13 +45,16 @@ module Svix
41
45
  {
42
46
  :'app_id' => :'String',
43
47
  :'app_uid' => :'String',
44
- :'endpoint_id' => :'String'
48
+ :'endpoint_id' => :'String',
49
+ :'endpoint_uid' => :'String'
45
50
  }
46
51
  end
47
52
 
48
53
  # List of attributes with nullable: true
49
54
  def self.openapi_nullable
50
55
  Set.new([
56
+ :'app_uid',
57
+ :'endpoint_uid'
51
58
  ])
52
59
  end
53
60
 
@@ -77,6 +84,10 @@ module Svix
77
84
  if attributes.key?(:'endpoint_id')
78
85
  self.endpoint_id = attributes[:'endpoint_id']
79
86
  end
87
+
88
+ if attributes.key?(:'endpoint_uid')
89
+ self.endpoint_uid = attributes[:'endpoint_uid']
90
+ end
80
91
  end
81
92
 
82
93
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -104,6 +115,19 @@ module Svix
104
115
  invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
105
116
  end
106
117
 
118
+ if !@endpoint_uid.nil? && @endpoint_uid.to_s.length > 256
119
+ invalid_properties.push('invalid value for "endpoint_uid", the character length must be smaller than or equal to 256.')
120
+ end
121
+
122
+ if !@endpoint_uid.nil? && @endpoint_uid.to_s.length < 1
123
+ invalid_properties.push('invalid value for "endpoint_uid", the character length must be great than or equal to 1.')
124
+ end
125
+
126
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
127
+ if !@endpoint_uid.nil? && @endpoint_uid !~ pattern
128
+ invalid_properties.push("invalid value for \"endpoint_uid\", must conform to the pattern #{pattern}.")
129
+ end
130
+
107
131
  invalid_properties
108
132
  end
109
133
 
@@ -115,6 +139,9 @@ module Svix
115
139
  return false if !@app_uid.nil? && @app_uid.to_s.length < 1
116
140
  return false if !@app_uid.nil? && @app_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
117
141
  return false if @endpoint_id.nil?
142
+ return false if !@endpoint_uid.nil? && @endpoint_uid.to_s.length > 256
143
+ return false if !@endpoint_uid.nil? && @endpoint_uid.to_s.length < 1
144
+ return false if !@endpoint_uid.nil? && @endpoint_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
118
145
  true
119
146
  end
120
147
 
@@ -137,6 +164,25 @@ module Svix
137
164
  @app_uid = app_uid
138
165
  end
139
166
 
167
+ # Custom attribute writer method with validation
168
+ # @param [Object] endpoint_uid Value to be assigned
169
+ def endpoint_uid=(endpoint_uid)
170
+ if !endpoint_uid.nil? && endpoint_uid.to_s.length > 256
171
+ fail ArgumentError, 'invalid value for "endpoint_uid", the character length must be smaller than or equal to 256.'
172
+ end
173
+
174
+ if !endpoint_uid.nil? && endpoint_uid.to_s.length < 1
175
+ fail ArgumentError, 'invalid value for "endpoint_uid", the character length must be great than or equal to 1.'
176
+ end
177
+
178
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
179
+ if !endpoint_uid.nil? && endpoint_uid !~ pattern
180
+ fail ArgumentError, "invalid value for \"endpoint_uid\", must conform to the pattern #{pattern}."
181
+ end
182
+
183
+ @endpoint_uid = endpoint_uid
184
+ end
185
+
140
186
  # Checks equality by comparing each attribute.
141
187
  # @param [Object] Object to be compared
142
188
  def ==(o)
@@ -144,7 +190,8 @@ module Svix
144
190
  self.class == o.class &&
145
191
  app_id == o.app_id &&
146
192
  app_uid == o.app_uid &&
147
- endpoint_id == o.endpoint_id
193
+ endpoint_id == o.endpoint_id &&
194
+ endpoint_uid == o.endpoint_uid
148
195
  end
149
196
 
150
197
  # @see the `==` method
@@ -156,7 +203,7 @@ module Svix
156
203
  # Calculates hash code according to all attributes.
157
204
  # @return [Integer] Hash code
158
205
  def hash
159
- [app_id, app_uid, endpoint_id].hash
206
+ [app_id, app_uid, endpoint_id, endpoint_uid].hash
160
207
  end
161
208
 
162
209
  # Builds the object from hash
@@ -51,6 +51,7 @@ module Svix
51
51
  # List of attributes with nullable: true
52
52
  def self.openapi_nullable
53
53
  Set.new([
54
+ :'event_types',
54
55
  ])
55
56
  end
56
57
 
@@ -67,6 +67,9 @@ module Svix
67
67
  # List of attributes with nullable: true
68
68
  def self.openapi_nullable
69
69
  Set.new([
70
+ :'custom_color',
71
+ :'custom_font_family',
72
+ :'custom_logo_url',
70
73
  ])
71
74
  end
72
75
 
@@ -32,7 +32,7 @@ module Svix
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'example' => :'Object'
35
+ :'example' => :'Hash<String, AnyType>'
36
36
  }
37
37
  end
38
38
 
@@ -58,7 +58,9 @@ module Svix
58
58
  }
59
59
 
60
60
  if attributes.key?(:'example')
61
- self.example = attributes[:'example']
61
+ if (value = attributes[:'example']).is_a?(Hash)
62
+ self.example = value
63
+ end
62
64
  end
63
65
  end
64
66
 
@@ -52,6 +52,7 @@ module Svix
52
52
  # List of attributes with nullable: true
53
53
  def self.openapi_nullable
54
54
  Set.new([
55
+ :'schemas'
55
56
  ])
56
57
  end
57
58
 
@@ -60,6 +60,7 @@ module Svix
60
60
  # List of attributes with nullable: true
61
61
  def self.openapi_nullable
62
62
  Set.new([
63
+ :'schemas',
63
64
  ])
64
65
  end
65
66
 
@@ -48,6 +48,7 @@ module Svix
48
48
  # List of attributes with nullable: true
49
49
  def self.openapi_nullable
50
50
  Set.new([
51
+ :'schemas'
51
52
  ])
52
53
  end
53
54
 
@@ -39,6 +39,7 @@ module Svix
39
39
  # List of attributes with nullable: true
40
40
  def self.openapi_nullable
41
41
  Set.new([
42
+ :'base'
42
43
  ])
43
44
  end
44
45
 
@@ -47,6 +47,7 @@ module Svix
47
47
  # List of attributes with nullable: true
48
48
  def self.openapi_nullable
49
49
  Set.new([
50
+ :'iterator'
50
51
  ])
51
52
  end
52
53
 
@@ -51,6 +51,8 @@ module Svix
51
51
  # List of attributes with nullable: true
52
52
  def self.openapi_nullable
53
53
  Set.new([
54
+ :'iterator',
55
+ :'prev_iterator'
54
56
  ])
55
57
  end
56
58
 
@@ -47,6 +47,7 @@ module Svix
47
47
  # List of attributes with nullable: true
48
48
  def self.openapi_nullable
49
49
  Set.new([
50
+ :'iterator'
50
51
  ])
51
52
  end
52
53
 
@@ -47,6 +47,7 @@ module Svix
47
47
  # List of attributes with nullable: true
48
48
  def self.openapi_nullable
49
49
  Set.new([
50
+ :'iterator'
50
51
  ])
51
52
  end
52
53
 
@@ -47,6 +47,7 @@ module Svix
47
47
  # List of attributes with nullable: true
48
48
  def self.openapi_nullable
49
49
  Set.new([
50
+ :'iterator'
50
51
  ])
51
52
  end
52
53
 
@@ -51,6 +51,8 @@ module Svix
51
51
  # List of attributes with nullable: true
52
52
  def self.openapi_nullable
53
53
  Set.new([
54
+ :'iterator',
55
+ :'prev_iterator'
54
56
  ])
55
57
  end
56
58
 
@@ -51,6 +51,8 @@ module Svix
51
51
  # List of attributes with nullable: true
52
52
  def self.openapi_nullable
53
53
  Set.new([
54
+ :'iterator',
55
+ :'prev_iterator'
54
56
  ])
55
57
  end
56
58
 
@@ -47,6 +47,7 @@ module Svix
47
47
  # List of attributes with nullable: true
48
48
  def self.openapi_nullable
49
49
  Set.new([
50
+ :'iterator'
50
51
  ])
51
52
  end
52
53
 
@@ -51,6 +51,8 @@ module Svix
51
51
  # List of attributes with nullable: true
52
52
  def self.openapi_nullable
53
53
  Set.new([
54
+ :'iterator',
55
+ :'prev_iterator'
54
56
  ])
55
57
  end
56
58
 
@@ -24,6 +24,9 @@ module Svix
24
24
 
25
25
  attr_accessor :last_attempt
26
26
 
27
+ # Optional unique identifier for the message
28
+ attr_accessor :msg_event_id
29
+
27
30
  attr_accessor :msg_id
28
31
 
29
32
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,6 +36,7 @@ module Svix
33
36
  :'app_uid' => :'appUid',
34
37
  :'endpoint_id' => :'endpointId',
35
38
  :'last_attempt' => :'lastAttempt',
39
+ :'msg_event_id' => :'msgEventId',
36
40
  :'msg_id' => :'msgId'
37
41
  }
38
42
  end
@@ -49,6 +53,7 @@ module Svix
49
53
  :'app_uid' => :'String',
50
54
  :'endpoint_id' => :'String',
51
55
  :'last_attempt' => :'MessageAttemptFailedData',
56
+ :'msg_event_id' => :'String',
52
57
  :'msg_id' => :'String'
53
58
  }
54
59
  end
@@ -56,6 +61,8 @@ module Svix
56
61
  # List of attributes with nullable: true
57
62
  def self.openapi_nullable
58
63
  Set.new([
64
+ :'app_uid',
65
+ :'msg_event_id',
59
66
  ])
60
67
  end
61
68
 
@@ -90,6 +97,10 @@ module Svix
90
97
  self.last_attempt = attributes[:'last_attempt']
91
98
  end
92
99
 
100
+ if attributes.key?(:'msg_event_id')
101
+ self.msg_event_id = attributes[:'msg_event_id']
102
+ end
103
+
93
104
  if attributes.key?(:'msg_id')
94
105
  self.msg_id = attributes[:'msg_id']
95
106
  end
@@ -124,6 +135,19 @@ module Svix
124
135
  invalid_properties.push('invalid value for "last_attempt", last_attempt cannot be nil.')
125
136
  end
126
137
 
138
+ if !@msg_event_id.nil? && @msg_event_id.to_s.length > 256
139
+ invalid_properties.push('invalid value for "msg_event_id", the character length must be smaller than or equal to 256.')
140
+ end
141
+
142
+ if !@msg_event_id.nil? && @msg_event_id.to_s.length < 1
143
+ invalid_properties.push('invalid value for "msg_event_id", the character length must be great than or equal to 1.')
144
+ end
145
+
146
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
147
+ if !@msg_event_id.nil? && @msg_event_id !~ pattern
148
+ invalid_properties.push("invalid value for \"msg_event_id\", must conform to the pattern #{pattern}.")
149
+ end
150
+
127
151
  if @msg_id.nil?
128
152
  invalid_properties.push('invalid value for "msg_id", msg_id cannot be nil.')
129
153
  end
@@ -140,6 +164,9 @@ module Svix
140
164
  return false if !@app_uid.nil? && @app_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
141
165
  return false if @endpoint_id.nil?
142
166
  return false if @last_attempt.nil?
167
+ return false if !@msg_event_id.nil? && @msg_event_id.to_s.length > 256
168
+ return false if !@msg_event_id.nil? && @msg_event_id.to_s.length < 1
169
+ return false if !@msg_event_id.nil? && @msg_event_id !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
143
170
  return false if @msg_id.nil?
144
171
  true
145
172
  end
@@ -163,6 +190,25 @@ module Svix
163
190
  @app_uid = app_uid
164
191
  end
165
192
 
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] msg_event_id Value to be assigned
195
+ def msg_event_id=(msg_event_id)
196
+ if !msg_event_id.nil? && msg_event_id.to_s.length > 256
197
+ fail ArgumentError, 'invalid value for "msg_event_id", the character length must be smaller than or equal to 256.'
198
+ end
199
+
200
+ if !msg_event_id.nil? && msg_event_id.to_s.length < 1
201
+ fail ArgumentError, 'invalid value for "msg_event_id", the character length must be great than or equal to 1.'
202
+ end
203
+
204
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
205
+ if !msg_event_id.nil? && msg_event_id !~ pattern
206
+ fail ArgumentError, "invalid value for \"msg_event_id\", must conform to the pattern #{pattern}."
207
+ end
208
+
209
+ @msg_event_id = msg_event_id
210
+ end
211
+
166
212
  # Checks equality by comparing each attribute.
167
213
  # @param [Object] Object to be compared
168
214
  def ==(o)
@@ -172,6 +218,7 @@ module Svix
172
218
  app_uid == o.app_uid &&
173
219
  endpoint_id == o.endpoint_id &&
174
220
  last_attempt == o.last_attempt &&
221
+ msg_event_id == o.msg_event_id &&
175
222
  msg_id == o.msg_id
176
223
  end
177
224
 
@@ -184,7 +231,7 @@ module Svix
184
231
  # Calculates hash code according to all attributes.
185
232
  # @return [Integer] Hash code
186
233
  def hash
187
- [app_id, app_uid, endpoint_id, last_attempt, msg_id].hash
234
+ [app_id, app_uid, endpoint_id, last_attempt, msg_event_id, msg_id].hash
188
235
  end
189
236
 
190
237
  # Builds the object from hash
@@ -24,6 +24,9 @@ module Svix
24
24
 
25
25
  attr_accessor :last_attempt
26
26
 
27
+ # Optional unique identifier for the message
28
+ attr_accessor :msg_event_id
29
+
27
30
  attr_accessor :msg_id
28
31
 
29
32
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,6 +36,7 @@ module Svix
33
36
  :'app_uid' => :'appUid',
34
37
  :'endpoint_id' => :'endpointId',
35
38
  :'last_attempt' => :'lastAttempt',
39
+ :'msg_event_id' => :'msgEventId',
36
40
  :'msg_id' => :'msgId'
37
41
  }
38
42
  end
@@ -49,6 +53,7 @@ module Svix
49
53
  :'app_uid' => :'String',
50
54
  :'endpoint_id' => :'String',
51
55
  :'last_attempt' => :'MessageAttemptFailedData',
56
+ :'msg_event_id' => :'String',
52
57
  :'msg_id' => :'String'
53
58
  }
54
59
  end
@@ -56,6 +61,8 @@ module Svix
56
61
  # List of attributes with nullable: true
57
62
  def self.openapi_nullable
58
63
  Set.new([
64
+ :'app_uid',
65
+ :'msg_event_id',
59
66
  ])
60
67
  end
61
68
 
@@ -90,6 +97,10 @@ module Svix
90
97
  self.last_attempt = attributes[:'last_attempt']
91
98
  end
92
99
 
100
+ if attributes.key?(:'msg_event_id')
101
+ self.msg_event_id = attributes[:'msg_event_id']
102
+ end
103
+
93
104
  if attributes.key?(:'msg_id')
94
105
  self.msg_id = attributes[:'msg_id']
95
106
  end
@@ -124,6 +135,19 @@ module Svix
124
135
  invalid_properties.push('invalid value for "last_attempt", last_attempt cannot be nil.')
125
136
  end
126
137
 
138
+ if !@msg_event_id.nil? && @msg_event_id.to_s.length > 256
139
+ invalid_properties.push('invalid value for "msg_event_id", the character length must be smaller than or equal to 256.')
140
+ end
141
+
142
+ if !@msg_event_id.nil? && @msg_event_id.to_s.length < 1
143
+ invalid_properties.push('invalid value for "msg_event_id", the character length must be great than or equal to 1.')
144
+ end
145
+
146
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
147
+ if !@msg_event_id.nil? && @msg_event_id !~ pattern
148
+ invalid_properties.push("invalid value for \"msg_event_id\", must conform to the pattern #{pattern}.")
149
+ end
150
+
127
151
  if @msg_id.nil?
128
152
  invalid_properties.push('invalid value for "msg_id", msg_id cannot be nil.')
129
153
  end
@@ -140,6 +164,9 @@ module Svix
140
164
  return false if !@app_uid.nil? && @app_uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
141
165
  return false if @endpoint_id.nil?
142
166
  return false if @last_attempt.nil?
167
+ return false if !@msg_event_id.nil? && @msg_event_id.to_s.length > 256
168
+ return false if !@msg_event_id.nil? && @msg_event_id.to_s.length < 1
169
+ return false if !@msg_event_id.nil? && @msg_event_id !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
143
170
  return false if @msg_id.nil?
144
171
  true
145
172
  end
@@ -163,6 +190,25 @@ module Svix
163
190
  @app_uid = app_uid
164
191
  end
165
192
 
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] msg_event_id Value to be assigned
195
+ def msg_event_id=(msg_event_id)
196
+ if !msg_event_id.nil? && msg_event_id.to_s.length > 256
197
+ fail ArgumentError, 'invalid value for "msg_event_id", the character length must be smaller than or equal to 256.'
198
+ end
199
+
200
+ if !msg_event_id.nil? && msg_event_id.to_s.length < 1
201
+ fail ArgumentError, 'invalid value for "msg_event_id", the character length must be great than or equal to 1.'
202
+ end
203
+
204
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
205
+ if !msg_event_id.nil? && msg_event_id !~ pattern
206
+ fail ArgumentError, "invalid value for \"msg_event_id\", must conform to the pattern #{pattern}."
207
+ end
208
+
209
+ @msg_event_id = msg_event_id
210
+ end
211
+
166
212
  # Checks equality by comparing each attribute.
167
213
  # @param [Object] Object to be compared
168
214
  def ==(o)
@@ -172,6 +218,7 @@ module Svix
172
218
  app_uid == o.app_uid &&
173
219
  endpoint_id == o.endpoint_id &&
174
220
  last_attempt == o.last_attempt &&
221
+ msg_event_id == o.msg_event_id &&
175
222
  msg_id == o.msg_id
176
223
  end
177
224
 
@@ -184,7 +231,7 @@ module Svix
184
231
  # Calculates hash code according to all attributes.
185
232
  # @return [Integer] Hash code
186
233
  def hash
187
- [app_id, app_uid, endpoint_id, last_attempt, msg_id].hash
234
+ [app_id, app_uid, endpoint_id, last_attempt, msg_event_id, msg_id].hash
188
235
  end
189
236
 
190
237
  # Builds the object from hash
@@ -85,6 +85,11 @@ module Svix
85
85
  # List of attributes with nullable: true
86
86
  def self.openapi_nullable
87
87
  Set.new([
88
+ :'channels',
89
+ :'filter_types',
90
+ :'next_attempt',
91
+ :'rate_limit',
92
+ :'uid',
88
93
  ])
89
94
  end
90
95
 
@@ -50,7 +50,7 @@ module Svix
50
50
  :'channels' => :'Array<String>',
51
51
  :'event_id' => :'String',
52
52
  :'event_type' => :'String',
53
- :'payload' => :'Object',
53
+ :'payload' => :'Hash<String, AnyType>',
54
54
  :'payload_retention_period' => :'Integer'
55
55
  }
56
56
  end
@@ -58,6 +58,8 @@ module Svix
58
58
  # List of attributes with nullable: true
59
59
  def self.openapi_nullable
60
60
  Set.new([
61
+ :'channels',
62
+ :'event_id',
61
63
  ])
62
64
  end
63
65
 
@@ -91,7 +93,9 @@ module Svix
91
93
  end
92
94
 
93
95
  if attributes.key?(:'payload')
94
- self.payload = attributes[:'payload']
96
+ if (value = attributes[:'payload']).is_a?(Hash)
97
+ self.payload = value
98
+ end
95
99
  end
96
100
 
97
101
  if attributes.key?(:'payload_retention_period')
@@ -53,7 +53,7 @@ module Svix
53
53
  :'event_id' => :'String',
54
54
  :'event_type' => :'String',
55
55
  :'id' => :'String',
56
- :'payload' => :'Object',
56
+ :'payload' => :'Hash<String, AnyType>',
57
57
  :'timestamp' => :'Time'
58
58
  }
59
59
  end
@@ -61,6 +61,8 @@ module Svix
61
61
  # List of attributes with nullable: true
62
62
  def self.openapi_nullable
63
63
  Set.new([
64
+ :'channels',
65
+ :'event_id',
64
66
  ])
65
67
  end
66
68
 
@@ -98,7 +100,9 @@ module Svix
98
100
  end
99
101
 
100
102
  if attributes.key?(:'payload')
101
- self.payload = attributes[:'payload']
103
+ if (value = attributes[:'payload']).is_a?(Hash)
104
+ self.payload = value
105
+ end
102
106
  end
103
107
 
104
108
  if attributes.key?(:'timestamp')
@@ -87,6 +87,12 @@ module Svix
87
87
  # List of attributes with nullable: true
88
88
  def self.openapi_nullable
89
89
  Set.new([
90
+ :'custom_base_font_size',
91
+ :'custom_color',
92
+ :'custom_font_family',
93
+ :'custom_logo_url',
94
+ :'display_name',
95
+ :'event_catalog_published'
90
96
  ])
91
97
  end
92
98
 
@@ -87,6 +87,12 @@ module Svix
87
87
  # List of attributes with nullable: true
88
88
  def self.openapi_nullable
89
89
  Set.new([
90
+ :'custom_base_font_size',
91
+ :'custom_color',
92
+ :'custom_font_family',
93
+ :'custom_logo_url',
94
+ :'display_name',
95
+ :'event_catalog_published'
90
96
  ])
91
97
  end
92
98
 
data/lib/svix/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- VERSION = "0.61.0"
4
+ VERSION = "0.62.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: 0.61.0
4
+ version: 0.62.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-07-01 00:00:00.000000000 Z
11
+ date: 2022-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus