svix 1.10.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/application_api.rb +20 -20
  4. data/lib/svix/api/authentication_api.rb +2 -2
  5. data/lib/svix/api/background_tasks_api.rb +12 -12
  6. data/lib/svix/api/broadcast_api.rb +2 -2
  7. data/lib/svix/api/endpoint_api.rb +12 -12
  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 +82 -14
  11. data/lib/svix/api/health_api.rb +2 -2
  12. data/lib/svix/api/integration_api.rb +6 -6
  13. data/lib/svix/api/message_api.rb +115 -20
  14. data/lib/svix/api/message_attempt_api.rb +94 -94
  15. data/lib/svix/api/statistics_api.rb +10 -10
  16. data/lib/svix/api/transformation_template_api.rb +8 -8
  17. data/lib/svix/api_client.rb +2 -2
  18. data/lib/svix/api_error.rb +2 -2
  19. data/lib/svix/configuration.rb +10 -6
  20. data/lib/svix/event_type_api.rb +4 -0
  21. data/lib/svix/models/app_portal_access_in.rb +2 -2
  22. data/lib/svix/models/app_portal_access_out.rb +2 -2
  23. data/lib/svix/models/app_usage_stats_in.rb +2 -2
  24. data/lib/svix/models/app_usage_stats_out.rb +2 -2
  25. data/lib/svix/models/application_in.rb +2 -2
  26. data/lib/svix/models/application_out.rb +2 -2
  27. data/lib/svix/models/application_patch.rb +2 -2
  28. data/lib/svix/models/application_stats.rb +2 -2
  29. data/lib/svix/models/application_token_expire_in.rb +2 -2
  30. data/lib/svix/models/attempt_statistics_data.rb +2 -2
  31. data/lib/svix/models/attempt_statistics_response.rb +2 -2
  32. data/lib/svix/models/background_task_out.rb +2 -2
  33. data/lib/svix/models/background_task_status.rb +2 -2
  34. data/lib/svix/models/background_task_type.rb +2 -2
  35. data/lib/svix/models/border_radius_config.rb +2 -2
  36. data/lib/svix/models/border_radius_enum.rb +2 -2
  37. data/lib/svix/models/custom_color_palette.rb +2 -2
  38. data/lib/svix/models/custom_theme_override.rb +2 -2
  39. data/lib/svix/models/dashboard_access_out.rb +2 -2
  40. data/lib/svix/models/endpoint_created_event.rb +2 -2
  41. data/lib/svix/models/endpoint_created_event_data.rb +2 -2
  42. data/lib/svix/models/endpoint_deleted_event.rb +2 -2
  43. data/lib/svix/models/endpoint_deleted_event_data.rb +2 -2
  44. data/lib/svix/models/endpoint_disabled_event.rb +2 -2
  45. data/lib/svix/models/endpoint_disabled_event_data.rb +2 -2
  46. data/lib/svix/models/endpoint_headers_in.rb +2 -2
  47. data/lib/svix/models/endpoint_headers_out.rb +2 -2
  48. data/lib/svix/models/endpoint_headers_patch_in.rb +2 -2
  49. data/lib/svix/models/endpoint_in.rb +2 -2
  50. data/lib/svix/models/endpoint_message_out.rb +2 -2
  51. data/lib/svix/models/endpoint_out.rb +2 -2
  52. data/lib/svix/models/endpoint_patch.rb +2 -2
  53. data/lib/svix/models/endpoint_secret_out.rb +2 -2
  54. data/lib/svix/models/endpoint_secret_rotate_in.rb +2 -2
  55. data/lib/svix/models/endpoint_stats.rb +2 -2
  56. data/lib/svix/models/endpoint_transformation_in.rb +2 -2
  57. data/lib/svix/models/endpoint_transformation_out.rb +2 -2
  58. data/lib/svix/models/endpoint_transformation_simulate_in.rb +2 -2
  59. data/lib/svix/models/endpoint_transformation_simulate_out.rb +2 -2
  60. data/lib/svix/models/endpoint_update.rb +2 -2
  61. data/lib/svix/models/endpoint_updated_event.rb +2 -2
  62. data/lib/svix/models/endpoint_updated_event_data.rb +2 -2
  63. data/lib/svix/models/environment_in.rb +2 -2
  64. data/lib/svix/models/environment_out.rb +2 -2
  65. data/lib/svix/models/environment_settings_out.rb +2 -2
  66. data/lib/svix/models/event_example_in.rb +2 -2
  67. data/lib/svix/models/event_type_example_out.rb +2 -2
  68. data/lib/svix/models/event_type_import_open_api_in.rb +225 -0
  69. data/lib/svix/models/event_type_import_open_api_out.rb +223 -0
  70. data/lib/svix/models/event_type_import_open_api_out_data.rb +225 -0
  71. data/lib/svix/models/event_type_in.rb +2 -2
  72. data/lib/svix/models/event_type_out.rb +2 -2
  73. data/lib/svix/models/event_type_patch.rb +2 -2
  74. data/lib/svix/models/event_type_schema_in.rb +2 -2
  75. data/lib/svix/models/event_type_update.rb +2 -2
  76. data/lib/svix/models/font_size_config.rb +2 -2
  77. data/lib/svix/models/http_error_out.rb +2 -2
  78. data/lib/svix/models/http_validation_error.rb +2 -2
  79. data/lib/svix/models/integration_in.rb +2 -2
  80. data/lib/svix/models/integration_key_out.rb +2 -2
  81. data/lib/svix/models/integration_out.rb +2 -2
  82. data/lib/svix/models/integration_update.rb +2 -2
  83. data/lib/svix/models/list_response_application_out.rb +2 -2
  84. data/lib/svix/models/list_response_application_stats.rb +2 -2
  85. data/lib/svix/models/list_response_background_task_out.rb +2 -2
  86. data/lib/svix/models/list_response_endpoint_message_out.rb +2 -2
  87. data/lib/svix/models/list_response_endpoint_out.rb +2 -2
  88. data/lib/svix/models/list_response_event_type_out.rb +2 -2
  89. data/lib/svix/models/list_response_integration_out.rb +2 -2
  90. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +2 -2
  91. data/lib/svix/models/list_response_message_attempt_out.rb +2 -2
  92. data/lib/svix/models/list_response_message_endpoint_out.rb +2 -2
  93. data/lib/svix/models/list_response_message_out.rb +2 -2
  94. data/lib/svix/models/list_response_template_out.rb +2 -2
  95. data/lib/svix/models/message_attempt_endpoint_out.rb +2 -2
  96. data/lib/svix/models/message_attempt_exhausted_event.rb +2 -2
  97. data/lib/svix/models/message_attempt_exhausted_event_data.rb +2 -2
  98. data/lib/svix/models/message_attempt_failed_data.rb +2 -2
  99. data/lib/svix/models/message_attempt_failing_event.rb +2 -2
  100. data/lib/svix/models/message_attempt_failing_event_data.rb +2 -2
  101. data/lib/svix/models/message_attempt_headers_out.rb +2 -2
  102. data/lib/svix/models/message_attempt_out.rb +2 -2
  103. data/lib/svix/models/message_attempt_recovered_event.rb +2 -2
  104. data/lib/svix/models/message_attempt_recovered_event_data.rb +2 -2
  105. data/lib/svix/models/message_attempt_trigger_type.rb +2 -2
  106. data/lib/svix/models/message_broadcast_in.rb +2 -2
  107. data/lib/svix/models/message_broadcast_out.rb +2 -2
  108. data/lib/svix/models/message_endpoint_out.rb +2 -2
  109. data/lib/svix/models/message_in.rb +2 -2
  110. data/lib/svix/models/message_out.rb +2 -2
  111. data/lib/svix/models/message_raw_payload_out.rb +223 -0
  112. data/lib/svix/models/message_status.rb +2 -2
  113. data/lib/svix/models/one_time_token_in.rb +2 -2
  114. data/lib/svix/models/one_time_token_out.rb +2 -2
  115. data/lib/svix/models/ordering.rb +2 -2
  116. data/lib/svix/models/recover_in.rb +2 -2
  117. data/lib/svix/models/recover_out.rb +2 -2
  118. data/lib/svix/models/replay_in.rb +2 -2
  119. data/lib/svix/models/replay_out.rb +2 -2
  120. data/lib/svix/models/settings_in.rb +2 -2
  121. data/lib/svix/models/settings_out.rb +2 -2
  122. data/lib/svix/models/statistics_period.rb +2 -2
  123. data/lib/svix/models/status_code_class.rb +2 -2
  124. data/lib/svix/models/template_in.rb +39 -3
  125. data/lib/svix/models/template_out.rb +39 -3
  126. data/lib/svix/models/template_patch.rb +39 -3
  127. data/lib/svix/models/template_update.rb +39 -3
  128. data/lib/svix/models/transformation_http_method.rb +2 -2
  129. data/lib/svix/models/transformation_simulate_in.rb +2 -2
  130. data/lib/svix/models/transformation_simulate_out.rb +2 -2
  131. data/lib/svix/models/transformation_template_kind.rb +2 -2
  132. data/lib/svix/models/validation_error.rb +3 -3
  133. data/lib/svix/version.rb +1 -1
  134. data/lib/svix.rb +3 -0
  135. metadata +6 -2
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Svix API
3
3
 
4
- #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys). <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 1.7.0
6
+ The version of the OpenAPI document: 1.1.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -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
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Svix API
3
3
 
4
- #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys). <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 1.7.0
6
+ The version of the OpenAPI document: 1.1.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -17,6 +17,8 @@ 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
@@ -33,6 +35,7 @@ module Svix
33
35
  def self.attribute_map
34
36
  {
35
37
  :'description' => :'description',
38
+ :'feature_flag' => :'featureFlag',
36
39
  :'filter_types' => :'filterTypes',
37
40
  :'instructions' => :'instructions',
38
41
  :'instructions_link' => :'instructionsLink',
@@ -51,6 +54,7 @@ module Svix
51
54
  def self.openapi_types
52
55
  {
53
56
  :'description' => :'String',
57
+ :'feature_flag' => :'String',
54
58
  :'filter_types' => :'Array<String>',
55
59
  :'instructions' => :'String',
56
60
  :'instructions_link' => :'String',
@@ -63,6 +67,7 @@ module Svix
63
67
  # List of attributes with nullable: true
64
68
  def self.openapi_nullable
65
69
  Set.new([
70
+ :'feature_flag',
66
71
  :'filter_types',
67
72
  :'instructions_link',
68
73
  ])
@@ -87,6 +92,10 @@ module Svix
87
92
  self.description = attributes[:'description']
88
93
  end
89
94
 
95
+ if attributes.key?(:'feature_flag')
96
+ self.feature_flag = attributes[:'feature_flag']
97
+ end
98
+
90
99
  if attributes.key?(:'filter_types')
91
100
  if (value = attributes[:'filter_types']).is_a?(Array)
92
101
  self.filter_types = value
@@ -118,6 +127,15 @@ module Svix
118
127
  # @return Array for valid properties with the reasons
119
128
  def list_invalid_properties
120
129
  invalid_properties = Array.new
130
+ if !@feature_flag.nil? && @feature_flag.to_s.length > 256
131
+ invalid_properties.push('invalid value for "feature_flag", the character length must be smaller than or equal to 256.')
132
+ end
133
+
134
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
135
+ if !@feature_flag.nil? && @feature_flag !~ pattern
136
+ invalid_properties.push("invalid value for \"feature_flag\", must conform to the pattern #{pattern}.")
137
+ end
138
+
121
139
  if !@filter_types.nil? && @filter_types.length < 1
122
140
  invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
123
141
  end
@@ -136,12 +154,29 @@ module Svix
136
154
  # Check to see if the all the properties in the model are valid
137
155
  # @return true if the model is valid
138
156
  def valid?
157
+ return false if !@feature_flag.nil? && @feature_flag.to_s.length > 256
158
+ return false if !@feature_flag.nil? && @feature_flag !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
139
159
  return false if !@filter_types.nil? && @filter_types.length < 1
140
160
  return false if !@transformation.nil? && @transformation.to_s.length > 51200
141
161
  return false if !@transformation.nil? && @transformation.to_s.length < 10
142
162
  true
143
163
  end
144
164
 
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] feature_flag Value to be assigned
167
+ def feature_flag=(feature_flag)
168
+ if !feature_flag.nil? && feature_flag.to_s.length > 256
169
+ fail ArgumentError, 'invalid value for "feature_flag", the character length must be smaller than or equal to 256.'
170
+ end
171
+
172
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
173
+ if !feature_flag.nil? && feature_flag !~ pattern
174
+ fail ArgumentError, "invalid value for \"feature_flag\", must conform to the pattern #{pattern}."
175
+ end
176
+
177
+ @feature_flag = feature_flag
178
+ end
179
+
145
180
  # Custom attribute writer method with validation
146
181
  # @param [Object] filter_types Value to be assigned
147
182
  def filter_types=(filter_types)
@@ -172,6 +207,7 @@ module Svix
172
207
  return true if self.equal?(o)
173
208
  self.class == o.class &&
174
209
  description == o.description &&
210
+ feature_flag == o.feature_flag &&
175
211
  filter_types == o.filter_types &&
176
212
  instructions == o.instructions &&
177
213
  instructions_link == o.instructions_link &&
@@ -189,7 +225,7 @@ module Svix
189
225
  # Calculates hash code according to all attributes.
190
226
  # @return [Integer] Hash code
191
227
  def hash
192
- [description, filter_types, instructions, instructions_link, logo, name, transformation].hash
228
+ [description, feature_flag, filter_types, instructions, instructions_link, logo, name, transformation].hash
193
229
  end
194
230
 
195
231
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Svix API
3
3
 
4
- #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys). <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 1.7.0
6
+ The version of the OpenAPI document: 1.1.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -17,6 +17,8 @@ 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
@@ -33,6 +35,7 @@ module Svix
33
35
  def self.attribute_map
34
36
  {
35
37
  :'description' => :'description',
38
+ :'feature_flag' => :'featureFlag',
36
39
  :'filter_types' => :'filterTypes',
37
40
  :'instructions' => :'instructions',
38
41
  :'instructions_link' => :'instructionsLink',
@@ -51,6 +54,7 @@ module Svix
51
54
  def self.openapi_types
52
55
  {
53
56
  :'description' => :'String',
57
+ :'feature_flag' => :'String',
54
58
  :'filter_types' => :'Array<String>',
55
59
  :'instructions' => :'String',
56
60
  :'instructions_link' => :'String',
@@ -63,6 +67,7 @@ module Svix
63
67
  # List of attributes with nullable: true
64
68
  def self.openapi_nullable
65
69
  Set.new([
70
+ :'feature_flag',
66
71
  :'filter_types',
67
72
  :'instructions_link',
68
73
  ])
@@ -89,6 +94,10 @@ module Svix
89
94
  self.description = ''
90
95
  end
91
96
 
97
+ if attributes.key?(:'feature_flag')
98
+ self.feature_flag = attributes[:'feature_flag']
99
+ end
100
+
92
101
  if attributes.key?(:'filter_types')
93
102
  if (value = attributes[:'filter_types']).is_a?(Array)
94
103
  self.filter_types = value
@@ -124,6 +133,15 @@ module Svix
124
133
  # @return Array for valid properties with the reasons
125
134
  def list_invalid_properties
126
135
  invalid_properties = Array.new
136
+ if !@feature_flag.nil? && @feature_flag.to_s.length > 256
137
+ invalid_properties.push('invalid value for "feature_flag", the character length must be smaller than or equal to 256.')
138
+ end
139
+
140
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
141
+ if !@feature_flag.nil? && @feature_flag !~ pattern
142
+ invalid_properties.push("invalid value for \"feature_flag\", must conform to the pattern #{pattern}.")
143
+ end
144
+
127
145
  if !@filter_types.nil? && @filter_types.length < 1
128
146
  invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
129
147
  end
@@ -150,6 +168,8 @@ module Svix
150
168
  # Check to see if the all the properties in the model are valid
151
169
  # @return true if the model is valid
152
170
  def valid?
171
+ return false if !@feature_flag.nil? && @feature_flag.to_s.length > 256
172
+ return false if !@feature_flag.nil? && @feature_flag !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
153
173
  return false if !@filter_types.nil? && @filter_types.length < 1
154
174
  return false if @logo.nil?
155
175
  return false if @transformation.nil?
@@ -158,6 +178,21 @@ module Svix
158
178
  true
159
179
  end
160
180
 
181
+ # Custom attribute writer method with validation
182
+ # @param [Object] feature_flag Value to be assigned
183
+ def feature_flag=(feature_flag)
184
+ if !feature_flag.nil? && feature_flag.to_s.length > 256
185
+ fail ArgumentError, 'invalid value for "feature_flag", the character length must be smaller than or equal to 256.'
186
+ end
187
+
188
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
189
+ if !feature_flag.nil? && feature_flag !~ pattern
190
+ fail ArgumentError, "invalid value for \"feature_flag\", must conform to the pattern #{pattern}."
191
+ end
192
+
193
+ @feature_flag = feature_flag
194
+ end
195
+
161
196
  # Custom attribute writer method with validation
162
197
  # @param [Object] filter_types Value to be assigned
163
198
  def filter_types=(filter_types)
@@ -192,6 +227,7 @@ module Svix
192
227
  return true if self.equal?(o)
193
228
  self.class == o.class &&
194
229
  description == o.description &&
230
+ feature_flag == o.feature_flag &&
195
231
  filter_types == o.filter_types &&
196
232
  instructions == o.instructions &&
197
233
  instructions_link == o.instructions_link &&
@@ -209,7 +245,7 @@ module Svix
209
245
  # Calculates hash code according to all attributes.
210
246
  # @return [Integer] Hash code
211
247
  def hash
212
- [description, filter_types, instructions, instructions_link, logo, name, transformation].hash
248
+ [description, feature_flag, filter_types, instructions, instructions_link, logo, name, transformation].hash
213
249
  end
214
250
 
215
251
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Svix API
3
3
 
4
- #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys). <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 1.7.0
6
+ The version of the OpenAPI document: 1.1.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Svix API
3
3
 
4
- #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys). <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 1.7.0
6
+ The version of the OpenAPI document: 1.1.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Svix API
3
3
 
4
- #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys). <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 1.7.0
6
+ The version of the OpenAPI document: 1.1.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Svix API
3
3
 
4
- #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys). <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 1.7.0
6
+ The version of the OpenAPI document: 1.1.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Svix API
3
3
 
4
- #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys). <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 1.7.0
6
+ The version of the OpenAPI document: 1.1.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -16,7 +16,7 @@ require 'time'
16
16
  module Svix
17
17
  # Validation errors have their own schema to provide context for invalid requests eg. mismatched types and out of bounds values. There may be any number of these per 422 UNPROCESSABLE ENTITY error.
18
18
  class ValidationError
19
- # The location as a [`Vec`] of [`String`]s -- often in the form `[\"body\", \"field_name\"]`, `[\"query\", \"field_name\"]`, etc. They may, however, be arbitarily deep.
19
+ # The location as a [`Vec`] of [`String`]s -- often in the form `[\"body\", \"field_name\"]`, `[\"query\", \"field_name\"]`, etc. They may, however, be arbitrarily deep.
20
20
  attr_accessor :loc
21
21
 
22
22
  # The message accompanying the validation error item.
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.10.0"
4
+ VERSION = "1.12.0"
5
5
  end
data/lib/svix.rb CHANGED
@@ -38,6 +38,9 @@ require "svix/models/endpoint_update"
38
38
  require "svix/models/endpoint_updated_event_data"
39
39
  require "svix/models/endpoint_updated_event"
40
40
  require "svix/models/event_example_in"
41
+ require "svix/models/event_type_import_open_api_in"
42
+ require "svix/models/event_type_import_open_api_out"
43
+ require "svix/models/event_type_import_open_api_out_data"
41
44
  require "svix/models/event_type_in"
42
45
  require "svix/models/event_type_out"
43
46
  require "svix/models/event_type_update"
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.10.0
4
+ version: 1.12.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-08-30 00:00:00.000000000 Z
11
+ date: 2023-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -158,6 +158,9 @@ files:
158
158
  - lib/svix/models/environment_settings_out.rb
159
159
  - lib/svix/models/event_example_in.rb
160
160
  - lib/svix/models/event_type_example_out.rb
161
+ - lib/svix/models/event_type_import_open_api_in.rb
162
+ - lib/svix/models/event_type_import_open_api_out.rb
163
+ - lib/svix/models/event_type_import_open_api_out_data.rb
161
164
  - lib/svix/models/event_type_in.rb
162
165
  - lib/svix/models/event_type_out.rb
163
166
  - lib/svix/models/event_type_patch.rb
@@ -198,6 +201,7 @@ files:
198
201
  - lib/svix/models/message_endpoint_out.rb
199
202
  - lib/svix/models/message_in.rb
200
203
  - lib/svix/models/message_out.rb
204
+ - lib/svix/models/message_raw_payload_out.rb
201
205
  - lib/svix/models/message_status.rb
202
206
  - lib/svix/models/one_time_token_in.rb
203
207
  - lib/svix/models/one_time_token_out.rb