svix 1.43.0 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/application_api.rb +14 -14
  4. data/lib/svix/api/authentication_api.rb +217 -13
  5. data/lib/svix/api/background_tasks_api.rb +4 -4
  6. data/lib/svix/api/broadcast_api.rb +2 -2
  7. data/lib/svix/api/endpoint_api.rb +45 -45
  8. data/lib/svix/api/environment_api.rb +2 -2
  9. data/lib/svix/api/environment_settings_api.rb +2 -2
  10. data/lib/svix/api/event_type_api.rb +12 -12
  11. data/lib/svix/api/events_api.rb +4 -4
  12. data/lib/svix/api/inbound_api.rb +2 -2
  13. data/lib/svix/api/message_api.rb +162 -26
  14. data/lib/svix/api/message_attempt_api.rb +6 -6
  15. data/lib/svix/api/statistics_api.rb +10 -10
  16. data/lib/svix/api/transformation_template_api.rb +24 -24
  17. data/lib/svix/endpoint_api.rb +1 -1
  18. data/lib/svix/message_api.rb +1 -1
  19. data/lib/svix/models/application_in.rb +1 -1
  20. data/lib/svix/models/{create_message_token_in.rb → create_token_in.rb} +3 -3
  21. data/lib/svix/models/endpoint_in.rb +3 -3
  22. data/lib/svix/models/endpoint_oauth_config_in.rb +1 -1
  23. data/lib/svix/models/endpoint_out.rb +3 -3
  24. data/lib/svix/models/endpoint_patch.rb +1 -1
  25. data/lib/svix/models/endpoint_secret_out.rb +1 -1
  26. data/lib/svix/models/endpoint_secret_rotate_in.rb +1 -1
  27. data/lib/svix/models/endpoint_update.rb +2 -2
  28. data/lib/svix/models/environment_in.rb +2 -4
  29. data/lib/svix/models/environment_out.rb +2 -4
  30. data/lib/svix/models/environment_settings_out.rb +12 -1
  31. data/lib/svix/models/event_type_example_out.rb +2 -4
  32. data/lib/svix/models/event_type_from_open_api.rb +2 -4
  33. data/lib/svix/models/event_type_import_open_api_in.rb +2 -4
  34. data/lib/svix/models/event_type_in.rb +2 -4
  35. data/lib/svix/models/event_type_out.rb +2 -4
  36. data/lib/svix/models/event_type_patch.rb +2 -4
  37. data/lib/svix/models/event_type_update.rb +2 -4
  38. data/lib/svix/models/message_broadcast_in.rb +2 -2
  39. data/lib/svix/models/message_endpoint_out.rb +3 -3
  40. data/lib/svix/models/message_in.rb +0 -9
  41. data/lib/svix/models/operational_webhook_endpoint_in.rb +2 -2
  42. data/lib/svix/models/operational_webhook_endpoint_out.rb +2 -2
  43. data/lib/svix/models/operational_webhook_endpoint_secret_in.rb +1 -1
  44. data/lib/svix/models/operational_webhook_endpoint_secret_out.rb +1 -1
  45. data/lib/svix/models/operational_webhook_endpoint_update.rb +1 -1
  46. data/lib/svix/models/rotate_poller_token_in.rb +280 -0
  47. data/lib/svix/models/sink_in.rb +2 -1
  48. data/lib/svix/models/sink_in_one_of4.rb +255 -0
  49. data/lib/svix/models/sink_out.rb +2 -1
  50. data/lib/svix/models/transformation_http_method.rb +2 -1
  51. data/lib/svix/version.rb +1 -1
  52. metadata +5 -3
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Svix
17
- class CreateMessageTokenIn
17
+ class CreateTokenIn
18
18
  # How long the token will be valid for, in seconds.
19
19
  attr_accessor :expiry
20
20
 
@@ -53,13 +53,13 @@ module Svix
53
53
  # @param [Hash] attributes Model attributes in the form of hash
54
54
  def initialize(attributes = {})
55
55
  if (!attributes.is_a?(Hash))
56
- fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::CreateMessageTokenIn` initialize method"
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::CreateTokenIn` initialize method"
57
57
  end
58
58
 
59
59
  # check to see if the attribute exists and convert string to symbol for hash key
60
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
61
  if (!self.class.attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::CreateMessageTokenIn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::CreateTokenIn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
63
  end
64
64
  h[k.to_sym] = v
65
65
  }
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Svix
17
17
  class EndpointIn
18
- # List of message channels this endpoint listens to (omit for all)
18
+ # List of message channels this endpoint listens to (omit for all).
19
19
  attr_accessor :channels
20
20
 
21
21
  attr_accessor :description
@@ -28,10 +28,10 @@ module Svix
28
28
 
29
29
  attr_accessor :rate_limit
30
30
 
31
- # 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.
31
+ # The endpoint's verification secret. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret.
32
32
  attr_accessor :secret
33
33
 
34
- # Optional unique identifier for the endpoint
34
+ # Optional unique identifier for the endpoint.
35
35
  attr_accessor :uid
36
36
 
37
37
  attr_accessor :url
@@ -30,7 +30,7 @@ module Svix
30
30
 
31
31
  attr_accessor :jwt_params
32
32
 
33
- # For `refreshToken` grant type
33
+ # For `refreshToken` grant type.
34
34
  attr_accessor :refresh_token
35
35
 
36
36
  # Optional OAuth scopes added to the request body.
@@ -15,12 +15,12 @@ require 'time'
15
15
 
16
16
  module Svix
17
17
  class EndpointOut
18
- # List of message channels this endpoint listens to (omit for all)
18
+ # List of message channels this endpoint listens to (omit for all).
19
19
  attr_accessor :channels
20
20
 
21
21
  attr_accessor :created_at
22
22
 
23
- # An example endpoint name
23
+ # An example endpoint name.
24
24
  attr_accessor :description
25
25
 
26
26
  attr_accessor :disabled
@@ -34,7 +34,7 @@ module Svix
34
34
 
35
35
  attr_accessor :rate_limit
36
36
 
37
- # Optional unique identifier for the endpoint
37
+ # Optional unique identifier for the endpoint.
38
38
  attr_accessor :uid
39
39
 
40
40
  attr_accessor :updated_at
@@ -27,7 +27,7 @@ module Svix
27
27
 
28
28
  attr_accessor :rate_limit
29
29
 
30
- # 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
+ # The endpoint's verification secret. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret.
31
31
  attr_accessor :secret
32
32
 
33
33
  # The ep's UID
@@ -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. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24.
18
+ # The endpoint's verification secret. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret.
19
19
  attr_accessor :key
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -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. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24.
18
+ # The endpoint's verification secret. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret.
19
19
  attr_accessor :key
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Svix
17
17
  class EndpointUpdate
18
- # List of message channels this endpoint listens to (omit for all)
18
+ # List of message channels this endpoint listens to (omit for all).
19
19
  attr_accessor :channels
20
20
 
21
21
  attr_accessor :description
@@ -28,7 +28,7 @@ module Svix
28
28
 
29
29
  attr_accessor :rate_limit
30
30
 
31
- # Optional unique identifier for the endpoint
31
+ # Optional unique identifier for the endpoint.
32
32
  attr_accessor :uid
33
33
 
34
34
  attr_accessor :url
@@ -39,7 +39,7 @@ module Svix
39
39
  def self.openapi_types
40
40
  {
41
41
  :'event_types' => :'Array<EventTypeIn>',
42
- :'settings' => :'Hash<String, Object>',
42
+ :'settings' => :'Object',
43
43
  :'transformation_templates' => :'Array<TemplateIn>'
44
44
  }
45
45
  end
@@ -75,9 +75,7 @@ module Svix
75
75
  end
76
76
 
77
77
  if attributes.key?(:'settings')
78
- if (value = attributes[:'settings']).is_a?(Hash)
79
- self.settings = value
80
- end
78
+ self.settings = attributes[:'settings']
81
79
  else
82
80
  self.settings = nil
83
81
  end
@@ -46,7 +46,7 @@ module Svix
46
46
  {
47
47
  :'created_at' => :'Time',
48
48
  :'event_types' => :'Array<EventTypeOut>',
49
- :'settings' => :'Hash<String, Object>',
49
+ :'settings' => :'Object',
50
50
  :'transformation_templates' => :'Array<TemplateOut>',
51
51
  :'version' => :'Integer'
52
52
  }
@@ -89,9 +89,7 @@ module Svix
89
89
  end
90
90
 
91
91
  if attributes.key?(:'settings')
92
- if (value = attributes[:'settings']).is_a?(Hash)
93
- self.settings = value
94
- end
92
+ self.settings = attributes[:'settings']
95
93
  else
96
94
  self.settings = nil
97
95
  end
@@ -37,6 +37,8 @@ module Svix
37
37
 
38
38
  attr_accessor :enable_integration_management
39
39
 
40
+ attr_accessor :enable_message_stream
41
+
40
42
  attr_accessor :enable_message_tags
41
43
 
42
44
  attr_accessor :enable_transformations
@@ -59,6 +61,7 @@ module Svix
59
61
  :'display_name' => :'displayName',
60
62
  :'enable_channels' => :'enableChannels',
61
63
  :'enable_integration_management' => :'enableIntegrationManagement',
64
+ :'enable_message_stream' => :'enableMessageStream',
62
65
  :'enable_message_tags' => :'enableMessageTags',
63
66
  :'enable_transformations' => :'enableTransformations',
64
67
  :'show_use_svix_play' => :'showUseSvixPlay',
@@ -85,6 +88,7 @@ module Svix
85
88
  :'display_name' => :'String',
86
89
  :'enable_channels' => :'Boolean',
87
90
  :'enable_integration_management' => :'Boolean',
91
+ :'enable_message_stream' => :'Boolean',
88
92
  :'enable_message_tags' => :'Boolean',
89
93
  :'enable_transformations' => :'Boolean',
90
94
  :'show_use_svix_play' => :'Boolean',
@@ -166,6 +170,12 @@ module Svix
166
170
  self.enable_integration_management = false
167
171
  end
168
172
 
173
+ if attributes.key?(:'enable_message_stream')
174
+ self.enable_message_stream = attributes[:'enable_message_stream']
175
+ else
176
+ self.enable_message_stream = false
177
+ end
178
+
169
179
  if attributes.key?(:'enable_message_tags')
170
180
  self.enable_message_tags = attributes[:'enable_message_tags']
171
181
  else
@@ -287,6 +297,7 @@ module Svix
287
297
  display_name == o.display_name &&
288
298
  enable_channels == o.enable_channels &&
289
299
  enable_integration_management == o.enable_integration_management &&
300
+ enable_message_stream == o.enable_message_stream &&
290
301
  enable_message_tags == o.enable_message_tags &&
291
302
  enable_transformations == o.enable_transformations &&
292
303
  show_use_svix_play == o.show_use_svix_play &&
@@ -302,7 +313,7 @@ module Svix
302
313
  # Calculates hash code according to all attributes.
303
314
  # @return [Integer] Hash code
304
315
  def hash
305
- [color_palette_dark, color_palette_light, custom_color, custom_font_family, custom_font_family_url, custom_logo_url, custom_strings_override, custom_theme_override, display_name, enable_channels, enable_integration_management, enable_message_tags, enable_transformations, show_use_svix_play, wipe_successful_payload].hash
316
+ [color_palette_dark, color_palette_light, custom_color, custom_font_family, custom_font_family_url, custom_logo_url, custom_strings_override, custom_theme_override, display_name, enable_channels, enable_integration_management, enable_message_stream, enable_message_tags, enable_transformations, show_use_svix_play, wipe_successful_payload].hash
306
317
  end
307
318
 
308
319
  # Builds the object from hash
@@ -32,7 +32,7 @@ module Svix
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'example' => :'Hash<String, Object>'
35
+ :'example' => :'Object'
36
36
  }
37
37
  end
38
38
 
@@ -58,9 +58,7 @@ module Svix
58
58
  }
59
59
 
60
60
  if attributes.key?(:'example')
61
- if (value = attributes[:'example']).is_a?(Hash)
62
- self.example = value
63
- end
61
+ self.example = attributes[:'example']
64
62
  else
65
63
  self.example = nil
66
64
  end
@@ -54,7 +54,7 @@ module Svix
54
54
  :'feature_flag' => :'String',
55
55
  :'group_name' => :'String',
56
56
  :'name' => :'String',
57
- :'schemas' => :'Hash<String, Object>'
57
+ :'schemas' => :'Object'
58
58
  }
59
59
  end
60
60
 
@@ -109,9 +109,7 @@ module Svix
109
109
  end
110
110
 
111
111
  if attributes.key?(:'schemas')
112
- if (value = attributes[:'schemas']).is_a?(Hash)
113
- self.schemas = value
114
- end
112
+ self.schemas = attributes[:'schemas']
115
113
  end
116
114
  end
117
115
 
@@ -43,7 +43,7 @@ module Svix
43
43
  def self.openapi_types
44
44
  {
45
45
  :'dry_run' => :'Boolean',
46
- :'spec' => :'Hash<String, Object>',
46
+ :'spec' => :'Object',
47
47
  :'spec_raw' => :'String'
48
48
  }
49
49
  end
@@ -78,9 +78,7 @@ module Svix
78
78
  end
79
79
 
80
80
  if attributes.key?(:'spec')
81
- if (value = attributes[:'spec']).is_a?(Hash)
82
- self.spec = value
83
- end
81
+ self.spec = attributes[:'spec']
84
82
  end
85
83
 
86
84
  if attributes.key?(:'spec_raw')
@@ -59,7 +59,7 @@ module Svix
59
59
  :'feature_flag' => :'String',
60
60
  :'group_name' => :'String',
61
61
  :'name' => :'String',
62
- :'schemas' => :'Hash<String, Object>'
62
+ :'schemas' => :'Object'
63
63
  }
64
64
  end
65
65
 
@@ -120,9 +120,7 @@ module Svix
120
120
  end
121
121
 
122
122
  if attributes.key?(:'schemas')
123
- if (value = attributes[:'schemas']).is_a?(Hash)
124
- self.schemas = value
125
- end
123
+ self.schemas = attributes[:'schemas']
126
124
  end
127
125
  end
128
126
 
@@ -66,7 +66,7 @@ module Svix
66
66
  :'feature_flag' => :'String',
67
67
  :'group_name' => :'String',
68
68
  :'name' => :'String',
69
- :'schemas' => :'Hash<String, Object>',
69
+ :'schemas' => :'Object',
70
70
  :'updated_at' => :'Time'
71
71
  }
72
72
  end
@@ -134,9 +134,7 @@ module Svix
134
134
  end
135
135
 
136
136
  if attributes.key?(:'schemas')
137
- if (value = attributes[:'schemas']).is_a?(Hash)
138
- self.schemas = value
139
- end
137
+ self.schemas = attributes[:'schemas']
140
138
  end
141
139
 
142
140
  if attributes.key?(:'updated_at')
@@ -53,7 +53,7 @@ module Svix
53
53
  :'description' => :'String',
54
54
  :'feature_flag' => :'String',
55
55
  :'group_name' => :'String',
56
- :'schemas' => :'Hash<String, Object>'
56
+ :'schemas' => :'Object'
57
57
  }
58
58
  end
59
59
 
@@ -102,9 +102,7 @@ module Svix
102
102
  end
103
103
 
104
104
  if attributes.key?(:'schemas')
105
- if (value = attributes[:'schemas']).is_a?(Hash)
106
- self.schemas = value
107
- end
105
+ self.schemas = attributes[:'schemas']
108
106
  end
109
107
  end
110
108
 
@@ -54,7 +54,7 @@ module Svix
54
54
  :'description' => :'String',
55
55
  :'feature_flag' => :'String',
56
56
  :'group_name' => :'String',
57
- :'schemas' => :'Hash<String, Object>'
57
+ :'schemas' => :'Object'
58
58
  }
59
59
  end
60
60
 
@@ -109,9 +109,7 @@ module Svix
109
109
  end
110
110
 
111
111
  if attributes.key?(:'schemas')
112
- if (value = attributes[:'schemas']).is_a?(Hash)
113
- self.schemas = value
114
- end
112
+ self.schemas = attributes[:'schemas']
115
113
  end
116
114
  end
117
115
 
@@ -15,10 +15,10 @@ require 'time'
15
15
 
16
16
  module Svix
17
17
  class MessageBroadcastIn
18
- # List of free-form identifiers that endpoints can filter by
18
+ # List of free-form identifiers that endpoints can filter by.
19
19
  attr_accessor :channels
20
20
 
21
- # Optional unique identifier for the message
21
+ # Optional unique identifier for the message.
22
22
  attr_accessor :event_id
23
23
 
24
24
  # The event type's name
@@ -15,12 +15,12 @@ require 'time'
15
15
 
16
16
  module Svix
17
17
  class MessageEndpointOut
18
- # List of message channels this endpoint listens to (omit for all)
18
+ # List of message channels this endpoint listens to (omit for all).
19
19
  attr_accessor :channels
20
20
 
21
21
  attr_accessor :created_at
22
22
 
23
- # An example endpoint name
23
+ # An example endpoint name.
24
24
  attr_accessor :description
25
25
 
26
26
  attr_accessor :disabled
@@ -36,7 +36,7 @@ module Svix
36
36
 
37
37
  attr_accessor :status
38
38
 
39
- # Optional unique identifier for the endpoint
39
+ # Optional unique identifier for the endpoint.
40
40
  attr_accessor :uid
41
41
 
42
42
  attr_accessor :updated_at
@@ -213,10 +213,6 @@ module Svix
213
213
  invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 5.')
214
214
  end
215
215
 
216
- if !@tags.nil? && @tags.length < 1
217
- invalid_properties.push('invalid value for "tags", number of items must be greater than or equal to 1.')
218
- end
219
-
220
216
  invalid_properties
221
217
  end
222
218
 
@@ -238,7 +234,6 @@ module Svix
238
234
  return false if !@payload_retention_period.nil? && @payload_retention_period > 90
239
235
  return false if !@payload_retention_period.nil? && @payload_retention_period < 1
240
236
  return false if !@tags.nil? && @tags.length > 5
241
- return false if !@tags.nil? && @tags.length < 1
242
237
  true
243
238
  end
244
239
 
@@ -329,10 +324,6 @@ module Svix
329
324
  fail ArgumentError, 'invalid value for "tags", number of items must be less than or equal to 5.'
330
325
  end
331
326
 
332
- if !tags.nil? && tags.length < 1
333
- fail ArgumentError, 'invalid value for "tags", number of items must be greater than or equal to 1.'
334
- end
335
-
336
327
  @tags = tags
337
328
  end
338
329
 
@@ -25,10 +25,10 @@ module Svix
25
25
 
26
26
  attr_accessor :rate_limit
27
27
 
28
- # 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.
28
+ # The endpoint's verification secret. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret.
29
29
  attr_accessor :secret
30
30
 
31
- # Optional unique identifier for the endpoint
31
+ # Optional unique identifier for the endpoint.
32
32
  attr_accessor :uid
33
33
 
34
34
  attr_accessor :url
@@ -17,7 +17,7 @@ module Svix
17
17
  class OperationalWebhookEndpointOut
18
18
  attr_accessor :created_at
19
19
 
20
- # An example endpoint name
20
+ # An example endpoint name.
21
21
  attr_accessor :description
22
22
 
23
23
  attr_accessor :disabled
@@ -31,7 +31,7 @@ module Svix
31
31
 
32
32
  attr_accessor :rate_limit
33
33
 
34
- # Optional unique identifier for the endpoint
34
+ # Optional unique identifier for the endpoint.
35
35
  attr_accessor :uid
36
36
 
37
37
  attr_accessor :updated_at
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Svix
17
17
  class OperationalWebhookEndpointSecretIn
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.
18
+ # The endpoint's verification secret. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret.
19
19
  attr_accessor :key
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Svix
17
17
  class OperationalWebhookEndpointSecretOut
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.
18
+ # The endpoint's verification secret. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret.
19
19
  attr_accessor :key
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -25,7 +25,7 @@ module Svix
25
25
 
26
26
  attr_accessor :rate_limit
27
27
 
28
- # Optional unique identifier for the endpoint
28
+ # Optional unique identifier for the endpoint.
29
29
  attr_accessor :uid
30
30
 
31
31
  attr_accessor :url