svix 1.7.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/application_api.rb +1 -1
  4. data/lib/svix/api/authentication_api.rb +1 -1
  5. data/lib/svix/api/background_tasks_api.rb +1 -1
  6. data/lib/svix/api/broadcast_api.rb +1 -1
  7. data/lib/svix/api/endpoint_api.rb +1 -1
  8. data/lib/svix/api/environment_api.rb +1 -1
  9. data/lib/svix/api/environment_settings_api.rb +1 -1
  10. data/lib/svix/api/event_type_api.rb +1 -1
  11. data/lib/svix/api/health_api.rb +1 -1
  12. data/lib/svix/api/integration_api.rb +1 -1
  13. data/lib/svix/api/message_api.rb +3 -3
  14. data/lib/svix/api/message_attempt_api.rb +21 -12
  15. data/lib/svix/api/statistics_api.rb +1 -1
  16. data/lib/svix/api/transformation_template_api.rb +432 -0
  17. data/lib/svix/api_client.rb +1 -1
  18. data/lib/svix/api_error.rb +1 -1
  19. data/lib/svix/configuration.rb +1 -1
  20. data/lib/svix/models/app_portal_access_in.rb +1 -1
  21. data/lib/svix/models/app_portal_access_out.rb +1 -1
  22. data/lib/svix/models/app_usage_stats_in.rb +1 -1
  23. data/lib/svix/models/app_usage_stats_out.rb +1 -1
  24. data/lib/svix/models/application_in.rb +1 -1
  25. data/lib/svix/models/application_out.rb +1 -1
  26. data/lib/svix/models/application_patch.rb +1 -1
  27. data/lib/svix/models/application_stats.rb +1 -1
  28. data/lib/svix/models/application_token_expire_in.rb +1 -1
  29. data/lib/svix/models/attempt_statistics_data.rb +1 -1
  30. data/lib/svix/models/attempt_statistics_response.rb +1 -1
  31. data/lib/svix/models/background_task_out.rb +1 -1
  32. data/lib/svix/models/background_task_status.rb +1 -1
  33. data/lib/svix/models/background_task_type.rb +1 -1
  34. data/lib/svix/models/border_radius_config.rb +1 -1
  35. data/lib/svix/models/border_radius_enum.rb +1 -1
  36. data/lib/svix/models/custom_color_palette.rb +1 -1
  37. data/lib/svix/models/custom_theme_override.rb +1 -1
  38. data/lib/svix/models/dashboard_access_out.rb +1 -1
  39. data/lib/svix/models/endpoint_created_event.rb +1 -1
  40. data/lib/svix/models/endpoint_created_event_data.rb +1 -1
  41. data/lib/svix/models/endpoint_deleted_event.rb +1 -1
  42. data/lib/svix/models/endpoint_deleted_event_data.rb +1 -1
  43. data/lib/svix/models/endpoint_disabled_event.rb +1 -1
  44. data/lib/svix/models/endpoint_disabled_event_data.rb +1 -1
  45. data/lib/svix/models/endpoint_headers_in.rb +1 -1
  46. data/lib/svix/models/endpoint_headers_out.rb +1 -1
  47. data/lib/svix/models/endpoint_headers_patch_in.rb +1 -1
  48. data/lib/svix/models/endpoint_in.rb +7 -13
  49. data/lib/svix/models/endpoint_message_out.rb +1 -1
  50. data/lib/svix/models/endpoint_out.rb +1 -1
  51. data/lib/svix/models/endpoint_patch.rb +6 -6
  52. data/lib/svix/models/endpoint_secret_out.rb +1 -1
  53. data/lib/svix/models/endpoint_secret_rotate_in.rb +1 -1
  54. data/lib/svix/models/endpoint_stats.rb +1 -1
  55. data/lib/svix/models/endpoint_transformation_in.rb +1 -1
  56. data/lib/svix/models/endpoint_transformation_out.rb +1 -1
  57. data/lib/svix/models/endpoint_transformation_simulate_in.rb +1 -1
  58. data/lib/svix/models/endpoint_transformation_simulate_out.rb +1 -1
  59. data/lib/svix/models/endpoint_update.rb +7 -13
  60. data/lib/svix/models/endpoint_updated_event.rb +1 -1
  61. data/lib/svix/models/endpoint_updated_event_data.rb +1 -1
  62. data/lib/svix/models/environment_in.rb +1 -1
  63. data/lib/svix/models/environment_out.rb +1 -1
  64. data/lib/svix/models/environment_settings_out.rb +1 -1
  65. data/lib/svix/models/event_example_in.rb +1 -1
  66. data/lib/svix/models/event_type_example_out.rb +1 -1
  67. data/lib/svix/models/event_type_in.rb +1 -1
  68. data/lib/svix/models/event_type_out.rb +1 -1
  69. data/lib/svix/models/event_type_patch.rb +1 -1
  70. data/lib/svix/models/event_type_schema_in.rb +1 -1
  71. data/lib/svix/models/event_type_update.rb +1 -1
  72. data/lib/svix/models/font_size_config.rb +1 -1
  73. data/lib/svix/models/http_error_out.rb +1 -1
  74. data/lib/svix/models/http_validation_error.rb +1 -1
  75. data/lib/svix/models/integration_in.rb +1 -1
  76. data/lib/svix/models/integration_key_out.rb +1 -1
  77. data/lib/svix/models/integration_out.rb +1 -1
  78. data/lib/svix/models/integration_update.rb +1 -1
  79. data/lib/svix/models/list_response_application_out.rb +1 -1
  80. data/lib/svix/models/list_response_application_stats.rb +1 -1
  81. data/lib/svix/models/list_response_background_task_out.rb +1 -1
  82. data/lib/svix/models/list_response_endpoint_message_out.rb +1 -1
  83. data/lib/svix/models/list_response_endpoint_out.rb +1 -1
  84. data/lib/svix/models/list_response_event_type_out.rb +1 -1
  85. data/lib/svix/models/list_response_integration_out.rb +1 -1
  86. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +1 -1
  87. data/lib/svix/models/list_response_message_attempt_out.rb +1 -1
  88. data/lib/svix/models/list_response_message_endpoint_out.rb +1 -1
  89. data/lib/svix/models/list_response_message_out.rb +1 -1
  90. data/lib/svix/models/list_response_template_out.rb +259 -0
  91. data/lib/svix/models/message_attempt_endpoint_out.rb +1 -1
  92. data/lib/svix/models/message_attempt_exhausted_event.rb +1 -1
  93. data/lib/svix/models/message_attempt_exhausted_event_data.rb +1 -1
  94. data/lib/svix/models/message_attempt_failed_data.rb +1 -1
  95. data/lib/svix/models/message_attempt_failing_event.rb +1 -1
  96. data/lib/svix/models/message_attempt_failing_event_data.rb +1 -1
  97. data/lib/svix/models/message_attempt_headers_out.rb +1 -1
  98. data/lib/svix/models/message_attempt_out.rb +1 -1
  99. data/lib/svix/models/message_attempt_recovered_event.rb +274 -0
  100. data/lib/svix/models/message_attempt_recovered_event_data.rb +361 -0
  101. data/lib/svix/models/message_attempt_trigger_type.rb +1 -1
  102. data/lib/svix/models/message_broadcast_in.rb +1 -1
  103. data/lib/svix/models/message_broadcast_out.rb +1 -1
  104. data/lib/svix/models/message_endpoint_out.rb +1 -1
  105. data/lib/svix/models/message_in.rb +1 -1
  106. data/lib/svix/models/message_out.rb +1 -1
  107. data/lib/svix/models/message_status.rb +1 -1
  108. data/lib/svix/models/one_time_token_in.rb +1 -1
  109. data/lib/svix/models/one_time_token_out.rb +1 -1
  110. data/lib/svix/models/ordering.rb +1 -1
  111. data/lib/svix/models/recover_in.rb +1 -1
  112. data/lib/svix/models/recover_out.rb +1 -1
  113. data/lib/svix/models/replay_in.rb +1 -1
  114. data/lib/svix/models/replay_out.rb +1 -1
  115. data/lib/svix/models/settings_in.rb +1 -1
  116. data/lib/svix/models/settings_out.rb +1 -1
  117. data/lib/svix/models/statistics_period.rb +1 -1
  118. data/lib/svix/models/status_code_class.rb +1 -1
  119. data/lib/svix/models/template_in.rb +340 -0
  120. data/lib/svix/models/template_out.rb +386 -0
  121. data/lib/svix/models/template_patch.rb +315 -0
  122. data/lib/svix/models/template_update.rb +335 -0
  123. data/lib/svix/models/transformation_http_method.rb +1 -1
  124. data/lib/svix/models/transformation_template_kind.rb +36 -0
  125. data/lib/svix/models/validation_error.rb +1 -1
  126. data/lib/svix/version.rb +1 -1
  127. metadata +11 -2
@@ -0,0 +1,335 @@
1
+ =begin
2
+ #Svix API
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.
5
+
6
+ The version of the OpenAPI document: 1.7.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Svix
17
+ class TemplateUpdate
18
+ attr_accessor :description
19
+
20
+ attr_accessor :filter_types
21
+
22
+ attr_accessor :instructions
23
+
24
+ attr_accessor :instructions_link
25
+
26
+ attr_accessor :logo
27
+
28
+ attr_accessor :name
29
+
30
+ attr_accessor :transformation
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'description' => :'description',
36
+ :'filter_types' => :'filterTypes',
37
+ :'instructions' => :'instructions',
38
+ :'instructions_link' => :'instructionsLink',
39
+ :'logo' => :'logo',
40
+ :'name' => :'name',
41
+ :'transformation' => :'transformation'
42
+ }
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'description' => :'String',
54
+ :'filter_types' => :'Array<String>',
55
+ :'instructions' => :'String',
56
+ :'instructions_link' => :'String',
57
+ :'logo' => :'String',
58
+ :'name' => :'String',
59
+ :'transformation' => :'String'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ :'filter_types',
67
+ :'instructions_link',
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::TemplateUpdate` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::TemplateUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'description')
87
+ self.description = attributes[:'description']
88
+ else
89
+ self.description = ''
90
+ end
91
+
92
+ if attributes.key?(:'filter_types')
93
+ if (value = attributes[:'filter_types']).is_a?(Array)
94
+ self.filter_types = value
95
+ end
96
+ end
97
+
98
+ if attributes.key?(:'instructions')
99
+ self.instructions = attributes[:'instructions']
100
+ else
101
+ self.instructions = ''
102
+ end
103
+
104
+ if attributes.key?(:'instructions_link')
105
+ self.instructions_link = attributes[:'instructions_link']
106
+ end
107
+
108
+ if attributes.key?(:'logo')
109
+ self.logo = attributes[:'logo']
110
+ end
111
+
112
+ if attributes.key?(:'name')
113
+ self.name = attributes[:'name']
114
+ else
115
+ self.name = ''
116
+ end
117
+
118
+ if attributes.key?(:'transformation')
119
+ self.transformation = attributes[:'transformation']
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ invalid_properties = Array.new
127
+ if !@filter_types.nil? && @filter_types.length < 1
128
+ invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
129
+ end
130
+
131
+ if @logo.nil?
132
+ invalid_properties.push('invalid value for "logo", logo cannot be nil.')
133
+ end
134
+
135
+ if @transformation.nil?
136
+ invalid_properties.push('invalid value for "transformation", transformation cannot be nil.')
137
+ end
138
+
139
+ if @transformation.to_s.length > 51200
140
+ invalid_properties.push('invalid value for "transformation", the character length must be smaller than or equal to 51200.')
141
+ end
142
+
143
+ if @transformation.to_s.length < 10
144
+ invalid_properties.push('invalid value for "transformation", the character length must be great than or equal to 10.')
145
+ end
146
+
147
+ invalid_properties
148
+ end
149
+
150
+ # Check to see if the all the properties in the model are valid
151
+ # @return true if the model is valid
152
+ def valid?
153
+ return false if !@filter_types.nil? && @filter_types.length < 1
154
+ return false if @logo.nil?
155
+ return false if @transformation.nil?
156
+ return false if @transformation.to_s.length > 51200
157
+ return false if @transformation.to_s.length < 10
158
+ true
159
+ end
160
+
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] filter_types Value to be assigned
163
+ def filter_types=(filter_types)
164
+ if !filter_types.nil? && filter_types.length < 1
165
+ fail ArgumentError, 'invalid value for "filter_types", number of items must be greater than or equal to 1.'
166
+ end
167
+
168
+ @filter_types = filter_types
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] transformation Value to be assigned
173
+ def transformation=(transformation)
174
+ if transformation.nil?
175
+ fail ArgumentError, 'transformation cannot be nil'
176
+ end
177
+
178
+ if transformation.to_s.length > 51200
179
+ fail ArgumentError, 'invalid value for "transformation", the character length must be smaller than or equal to 51200.'
180
+ end
181
+
182
+ if transformation.to_s.length < 10
183
+ fail ArgumentError, 'invalid value for "transformation", the character length must be great than or equal to 10.'
184
+ end
185
+
186
+ @transformation = transformation
187
+ end
188
+
189
+ # Checks equality by comparing each attribute.
190
+ # @param [Object] Object to be compared
191
+ def ==(o)
192
+ return true if self.equal?(o)
193
+ self.class == o.class &&
194
+ description == o.description &&
195
+ filter_types == o.filter_types &&
196
+ instructions == o.instructions &&
197
+ instructions_link == o.instructions_link &&
198
+ logo == o.logo &&
199
+ name == o.name &&
200
+ transformation == o.transformation
201
+ end
202
+
203
+ # @see the `==` method
204
+ # @param [Object] Object to be compared
205
+ def eql?(o)
206
+ self == o
207
+ end
208
+
209
+ # Calculates hash code according to all attributes.
210
+ # @return [Integer] Hash code
211
+ def hash
212
+ [description, filter_types, instructions, instructions_link, logo, name, transformation].hash
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def self.build_from_hash(attributes)
219
+ new.build_from_hash(attributes)
220
+ end
221
+
222
+ # Builds the object from hash
223
+ # @param [Hash] attributes Model attributes in the form of hash
224
+ # @return [Object] Returns the model itself
225
+ def build_from_hash(attributes)
226
+ return nil unless attributes.is_a?(Hash)
227
+ self.class.openapi_types.each_pair do |key, type|
228
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
229
+ self.send("#{key}=", nil)
230
+ elsif type =~ /\AArray<(.*)>/i
231
+ # check to ensure the input is an array given that the attribute
232
+ # is documented as an array but the input is not
233
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
234
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
235
+ end
236
+ elsif !attributes[self.class.attribute_map[key]].nil?
237
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
238
+ end
239
+ end
240
+
241
+ self
242
+ end
243
+
244
+ # Deserializes the data based on type
245
+ # @param string type Data type
246
+ # @param string value Value to be deserialized
247
+ # @return [Object] Deserialized data
248
+ def _deserialize(type, value)
249
+ case type.to_sym
250
+ when :Time
251
+ Time.parse(value)
252
+ when :Date
253
+ Date.parse(value)
254
+ when :String
255
+ value.to_s
256
+ when :Integer
257
+ value.to_i
258
+ when :Float
259
+ value.to_f
260
+ when :Boolean
261
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
262
+ true
263
+ else
264
+ false
265
+ end
266
+ when :Object
267
+ # generic object (usually a Hash), return directly
268
+ value
269
+ when /\AArray<(?<inner_type>.+)>\z/
270
+ inner_type = Regexp.last_match[:inner_type]
271
+ value.map { |v| _deserialize(inner_type, v) }
272
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
273
+ k_type = Regexp.last_match[:k_type]
274
+ v_type = Regexp.last_match[:v_type]
275
+ {}.tap do |hash|
276
+ value.each do |k, v|
277
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
278
+ end
279
+ end
280
+ else # model
281
+ # models (e.g. Pet) or oneOf
282
+ klass = Svix.const_get(type)
283
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
284
+ end
285
+ end
286
+
287
+ # Returns the string representation of the object
288
+ # @return [String] String presentation of the object
289
+ def to_s
290
+ to_hash.to_s
291
+ end
292
+
293
+ # to_body is an alias to to_hash (backward compatibility)
294
+ # @return [Hash] Returns the object in the form of hash
295
+ def to_body
296
+ to_hash
297
+ end
298
+
299
+ # Returns the object in the form of hash
300
+ # @return [Hash] Returns the object in the form of hash
301
+ def to_hash
302
+ hash = {}
303
+ self.class.attribute_map.each_pair do |attr, param|
304
+ value = self.send(attr)
305
+ if value.nil?
306
+ is_nullable = self.class.openapi_nullable.include?(attr)
307
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
308
+ end
309
+
310
+ hash[param] = _to_hash(value)
311
+ end
312
+ hash
313
+ end
314
+
315
+ # Outputs non-array value in the form of hash
316
+ # For object, use to_hash. Otherwise, just return the value
317
+ # @param [Object] value Any valid value
318
+ # @return [Hash] Returns the value in the form of hash
319
+ def _to_hash(value)
320
+ if value.is_a?(Array)
321
+ value.compact.map { |v| _to_hash(v) }
322
+ elsif value.is_a?(Hash)
323
+ {}.tap do |hash|
324
+ value.each { |k, v| hash[k] = _to_hash(v) }
325
+ end
326
+ elsif value.respond_to? :to_hash
327
+ value.to_hash
328
+ else
329
+ value
330
+ end
331
+ end
332
+
333
+ end
334
+
335
+ end
@@ -3,7 +3,7 @@
3
3
 
4
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.
5
5
 
6
- The version of the OpenAPI document: 1.4.12
6
+ The version of the OpenAPI document: 1.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Svix API
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.
5
+
6
+ The version of the OpenAPI document: 1.7.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Svix
17
+ class TransformationTemplateKind
18
+ CUSTOM = "Custom".freeze
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ constantValues = TransformationTemplateKind.constants.select { |c| TransformationTemplateKind::const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #TransformationTemplateKind" if constantValues.empty?
33
+ value
34
+ end
35
+ end
36
+ end
@@ -3,7 +3,7 @@
3
3
 
4
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.
5
5
 
6
- The version of the OpenAPI document: 1.4.12
6
+ The version of the OpenAPI document: 1.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
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.7.0"
4
+ VERSION = "1.8.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.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-07-19 00:00:00.000000000 Z
11
+ date: 2023-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -97,6 +97,7 @@ files:
97
97
  - lib/svix/api/message_api.rb
98
98
  - lib/svix/api/message_attempt_api.rb
99
99
  - lib/svix/api/statistics_api.rb
100
+ - lib/svix/api/transformation_template_api.rb
100
101
  - lib/svix/api_client.rb
101
102
  - lib/svix/api_error.rb
102
103
  - lib/svix/application_api.rb
@@ -180,6 +181,7 @@ files:
180
181
  - lib/svix/models/list_response_message_attempt_out.rb
181
182
  - lib/svix/models/list_response_message_endpoint_out.rb
182
183
  - lib/svix/models/list_response_message_out.rb
184
+ - lib/svix/models/list_response_template_out.rb
183
185
  - lib/svix/models/message_attempt_endpoint_out.rb
184
186
  - lib/svix/models/message_attempt_exhausted_event.rb
185
187
  - lib/svix/models/message_attempt_exhausted_event_data.rb
@@ -188,6 +190,8 @@ files:
188
190
  - lib/svix/models/message_attempt_failing_event_data.rb
189
191
  - lib/svix/models/message_attempt_headers_out.rb
190
192
  - lib/svix/models/message_attempt_out.rb
193
+ - lib/svix/models/message_attempt_recovered_event.rb
194
+ - lib/svix/models/message_attempt_recovered_event_data.rb
191
195
  - lib/svix/models/message_attempt_trigger_type.rb
192
196
  - lib/svix/models/message_broadcast_in.rb
193
197
  - lib/svix/models/message_broadcast_out.rb
@@ -206,7 +210,12 @@ files:
206
210
  - lib/svix/models/settings_out.rb
207
211
  - lib/svix/models/statistics_period.rb
208
212
  - lib/svix/models/status_code_class.rb
213
+ - lib/svix/models/template_in.rb
214
+ - lib/svix/models/template_out.rb
215
+ - lib/svix/models/template_patch.rb
216
+ - lib/svix/models/template_update.rb
209
217
  - lib/svix/models/transformation_http_method.rb
218
+ - lib/svix/models/transformation_template_kind.rb
210
219
  - lib/svix/models/validation_error.rb
211
220
  - lib/svix/svix.rb
212
221
  - lib/svix/util.rb