svix 0.41.0 → 0.48.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +62 -8
  4. data/lib/svix/api/application_api.rb +23 -1
  5. data/lib/svix/api/authentication_api.rb +7 -1
  6. data/lib/svix/api/endpoint_api.rb +61 -18
  7. data/lib/svix/api/environment_api.rb +158 -0
  8. data/lib/svix/api/environment_settings_api.rb +82 -0
  9. data/lib/svix/api/event_type_api.rb +23 -1
  10. data/lib/svix/api/health_api.rb +6 -1
  11. data/lib/svix/api/integration_api.rb +627 -0
  12. data/lib/svix/api/message_api.rb +31 -3
  13. data/lib/svix/api/message_attempt_api.rb +359 -5
  14. data/lib/svix/api/organization_api.rb +152 -0
  15. data/lib/svix/api/organization_settings_api.rb +7 -7
  16. data/lib/svix/api/statistics_api.rb +7 -1
  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/endpoint_api.rb +1 -1
  21. data/lib/svix/integration_api.rb +38 -0
  22. data/lib/svix/internal.rb +1 -0
  23. data/lib/svix/message_attempt_api.rb +11 -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/attempt_statistics_data.rb +1 -1
  27. data/lib/svix/models/attempt_statistics_response.rb +1 -1
  28. data/lib/svix/models/border_radius_config.rb +1 -1
  29. data/lib/svix/models/border_radius_enum.rb +1 -1
  30. data/lib/svix/models/custom_theme_override.rb +1 -1
  31. data/lib/svix/models/dashboard_access_out.rb +1 -1
  32. data/lib/svix/models/endpoint_created_event.rb +1 -1
  33. data/lib/svix/models/endpoint_created_event_data.rb +1 -1
  34. data/lib/svix/models/endpoint_deleted_event.rb +1 -1
  35. data/lib/svix/models/endpoint_deleted_event_data.rb +1 -1
  36. data/lib/svix/models/endpoint_disabled_event.rb +1 -1
  37. data/lib/svix/models/endpoint_disabled_event_data.rb +1 -1
  38. data/lib/svix/models/endpoint_headers_in.rb +1 -1
  39. data/lib/svix/models/endpoint_headers_out.rb +1 -1
  40. data/lib/svix/models/endpoint_in.rb +38 -2
  41. data/lib/svix/models/endpoint_message_out.rb +38 -2
  42. data/lib/svix/models/endpoint_out.rb +38 -2
  43. data/lib/svix/models/endpoint_secret_out.rb +1 -1
  44. data/lib/svix/models/endpoint_secret_rotate_in.rb +1 -1
  45. data/lib/svix/models/endpoint_stats.rb +1 -1
  46. data/lib/svix/models/endpoint_update.rb +38 -2
  47. data/lib/svix/models/endpoint_updated_event.rb +1 -1
  48. data/lib/svix/models/endpoint_updated_event_data.rb +1 -1
  49. data/lib/svix/models/environment_in.rb +257 -0
  50. data/lib/svix/models/environment_out.rb +259 -0
  51. data/lib/svix/models/environment_settings_out.rb +308 -0
  52. data/lib/svix/models/event_example_in.rb +1 -1
  53. data/lib/svix/models/event_type_example_out.rb +1 -1
  54. data/lib/svix/models/event_type_in.rb +1 -1
  55. data/lib/svix/models/event_type_out.rb +1 -1
  56. data/lib/svix/models/event_type_schema_in.rb +1 -1
  57. data/lib/svix/models/event_type_update.rb +1 -1
  58. data/lib/svix/models/export_organization_out.rb +259 -0
  59. data/lib/svix/models/font_size_config.rb +1 -1
  60. data/lib/svix/models/http_error_out.rb +1 -1
  61. data/lib/svix/models/http_validation_error.rb +1 -1
  62. data/lib/svix/models/import_organization_in.rb +257 -0
  63. data/lib/svix/models/integration_in.rb +223 -0
  64. data/lib/svix/models/integration_key_out.rb +223 -0
  65. data/lib/svix/models/integration_out.rb +265 -0
  66. data/lib/svix/models/integration_update.rb +223 -0
  67. data/lib/svix/models/list_response_application_out.rb +1 -1
  68. data/lib/svix/models/list_response_endpoint_message_out.rb +1 -1
  69. data/lib/svix/models/list_response_endpoint_out.rb +1 -1
  70. data/lib/svix/models/list_response_event_type_out.rb +1 -1
  71. data/lib/svix/models/list_response_integration_out.rb +248 -0
  72. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +1 -1
  73. data/lib/svix/models/list_response_message_attempt_out.rb +1 -1
  74. data/lib/svix/models/list_response_message_endpoint_out.rb +1 -1
  75. data/lib/svix/models/list_response_message_out.rb +1 -1
  76. data/lib/svix/models/message_attempt_endpoint_out.rb +16 -2
  77. data/lib/svix/models/message_attempt_exhausted_event.rb +1 -1
  78. data/lib/svix/models/message_attempt_exhausted_event_data.rb +1 -1
  79. data/lib/svix/models/message_attempt_failed_event.rb +1 -1
  80. data/lib/svix/models/message_attempt_out.rb +1 -1
  81. data/lib/svix/models/message_attempt_trigger_type.rb +1 -1
  82. data/lib/svix/models/message_endpoint_out.rb +38 -2
  83. data/lib/svix/models/message_in.rb +38 -2
  84. data/lib/svix/models/message_out.rb +38 -2
  85. data/lib/svix/models/message_status.rb +1 -1
  86. data/lib/svix/models/portal_settings_out.rb +16 -5
  87. data/lib/svix/models/recover_in.rb +1 -1
  88. data/lib/svix/models/settings_in.rb +339 -0
  89. data/lib/svix/models/settings_out.rb +339 -0
  90. data/lib/svix/models/statistics_period.rb +1 -1
  91. data/lib/svix/models/validation_error.rb +1 -1
  92. data/lib/svix/models/webhook_types.rb +1 -1
  93. data/lib/svix/svix.rb +2 -0
  94. data/lib/svix/version.rb +1 -1
  95. data/lib/svix.rb +8 -2
  96. metadata +23 -6
@@ -0,0 +1,82 @@
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}`. <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.4
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Svix
16
+ class EnvironmentSettingsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get Org Settings
23
+ # Get the environment's settings
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
26
+ # @return [EnvironmentSettingsOut]
27
+ def get_org_settings_api_v1_environment_settings_get(opts = {})
28
+ data, _status_code, _headers = get_org_settings_api_v1_environment_settings_get_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # Get Org Settings
33
+ # Get the environment&#39;s settings
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
36
+ # @return [Array<(EnvironmentSettingsOut, Integer, Hash)>] EnvironmentSettingsOut data, response status code and response headers
37
+ def get_org_settings_api_v1_environment_settings_get_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: EnvironmentSettingsApi.get_org_settings_api_v1_environment_settings_get ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/api/v1/environment/settings/'
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+
47
+ # header parameters
48
+ header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:debug_body]
58
+
59
+ # return_type
60
+ return_type = opts[:debug_return_type] || 'EnvironmentSettingsOut'
61
+
62
+ # auth_names
63
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
64
+
65
+ new_options = opts.merge(
66
+ :operation => :"EnvironmentSettingsApi.get_org_settings_api_v1_environment_settings_get",
67
+ :header_params => header_params,
68
+ :query_params => query_params,
69
+ :form_params => form_params,
70
+ :body => post_body,
71
+ :auth_names => auth_names,
72
+ :return_type => return_type
73
+ )
74
+
75
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: EnvironmentSettingsApi#get_org_settings_api_v1_environment_settings_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+ end
82
+ end
@@ -1,7 +1,7 @@
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}`. <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/). ## 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
+ #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}`. <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
6
  The version of the OpenAPI document: 1.4
7
7
 
@@ -23,6 +23,7 @@ module Svix
23
23
  # Create new or unarchive existing event type. Unarchiving an event type will allow endpoints to filter on it and messages to be sent with it. Endpoints filtering on the event type before archival will continue to filter on it. This operation does not preserve the description and schemas.
24
24
  # @param event_type_in [EventTypeIn]
25
25
  # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
26
27
  # @return [EventTypeOut]
27
28
  def create_event_type_api_v1_event_type_post(event_type_in, opts = {})
28
29
  data, _status_code, _headers = create_event_type_api_v1_event_type_post_with_http_info(event_type_in, opts)
@@ -33,6 +34,7 @@ module Svix
33
34
  # Create new or unarchive existing event type. Unarchiving an event type will allow endpoints to filter on it and messages to be sent with it. Endpoints filtering on the event type before archival will continue to filter on it. This operation does not preserve the description and schemas.
34
35
  # @param event_type_in [EventTypeIn]
35
36
  # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
36
38
  # @return [Array<(EventTypeOut, Integer, Hash)>] EventTypeOut data, response status code and response headers
37
39
  def create_event_type_api_v1_event_type_post_with_http_info(event_type_in, opts = {})
38
40
  if @api_client.config.debugging
@@ -54,6 +56,7 @@ module Svix
54
56
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
57
  # HTTP header 'Content-Type'
56
58
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
59
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
57
60
 
58
61
  # form parameters
59
62
  form_params = opts[:form_params] || {}
@@ -88,6 +91,7 @@ module Svix
88
91
  # Archive an event type. Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the [create operation](#operation/create_event_type_api_v1_event_type__post).
89
92
  # @param event_type_name [String]
90
93
  # @param [Hash] opts the optional parameters
94
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
91
95
  # @return [nil]
92
96
  def delete_event_type_api_v1_event_type_event_type_name_delete(event_type_name, opts = {})
93
97
  delete_event_type_api_v1_event_type_event_type_name_delete_with_http_info(event_type_name, opts)
@@ -98,6 +102,7 @@ module Svix
98
102
  # Archive an event type. Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the [create operation](#operation/create_event_type_api_v1_event_type__post).
99
103
  # @param event_type_name [String]
100
104
  # @param [Hash] opts the optional parameters
105
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
101
106
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
102
107
  def delete_event_type_api_v1_event_type_event_type_name_delete_with_http_info(event_type_name, opts = {})
103
108
  if @api_client.config.debugging
@@ -126,6 +131,7 @@ module Svix
126
131
  header_params = opts[:header_params] || {}
127
132
  # HTTP header 'Accept' (if needed)
128
133
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
134
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
129
135
 
130
136
  # form parameters
131
137
  form_params = opts[:form_params] || {}
@@ -160,6 +166,7 @@ module Svix
160
166
  # Generates a fake example from the given JSONSchema
161
167
  # @param event_type_schema_in [EventTypeSchemaIn]
162
168
  # @param [Hash] opts the optional parameters
169
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
163
170
  # @return [EventTypeExampleOut]
164
171
  def generate_schema_example_api_v1_event_type_schema_generate_example_post(event_type_schema_in, opts = {})
165
172
  data, _status_code, _headers = generate_schema_example_api_v1_event_type_schema_generate_example_post_with_http_info(event_type_schema_in, opts)
@@ -170,6 +177,7 @@ module Svix
170
177
  # Generates a fake example from the given JSONSchema
171
178
  # @param event_type_schema_in [EventTypeSchemaIn]
172
179
  # @param [Hash] opts the optional parameters
180
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
173
181
  # @return [Array<(EventTypeExampleOut, Integer, Hash)>] EventTypeExampleOut data, response status code and response headers
174
182
  def generate_schema_example_api_v1_event_type_schema_generate_example_post_with_http_info(event_type_schema_in, opts = {})
175
183
  if @api_client.config.debugging
@@ -191,6 +199,7 @@ module Svix
191
199
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
192
200
  # HTTP header 'Content-Type'
193
201
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
202
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
194
203
 
195
204
  # form parameters
196
205
  form_params = opts[:form_params] || {}
@@ -225,6 +234,7 @@ module Svix
225
234
  # Get an event type.
226
235
  # @param event_type_name [String]
227
236
  # @param [Hash] opts the optional parameters
237
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
228
238
  # @return [EventTypeOut]
229
239
  def get_event_type_api_v1_event_type_event_type_name_get(event_type_name, opts = {})
230
240
  data, _status_code, _headers = get_event_type_api_v1_event_type_event_type_name_get_with_http_info(event_type_name, opts)
@@ -235,6 +245,7 @@ module Svix
235
245
  # Get an event type.
236
246
  # @param event_type_name [String]
237
247
  # @param [Hash] opts the optional parameters
248
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
238
249
  # @return [Array<(EventTypeOut, Integer, Hash)>] EventTypeOut data, response status code and response headers
239
250
  def get_event_type_api_v1_event_type_event_type_name_get_with_http_info(event_type_name, opts = {})
240
251
  if @api_client.config.debugging
@@ -263,6 +274,7 @@ module Svix
263
274
  header_params = opts[:header_params] || {}
264
275
  # HTTP header 'Accept' (if needed)
265
276
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
277
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
266
278
 
267
279
  # form parameters
268
280
  form_params = opts[:form_params] || {}
@@ -300,6 +312,7 @@ module Svix
300
312
  # @option opts [Integer] :limit (default to 50)
301
313
  # @option opts [Boolean] :with_content (default to false)
302
314
  # @option opts [Boolean] :include_archived (default to false)
315
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
303
316
  # @return [ListResponseEventTypeOut]
304
317
  def list_event_types_api_v1_event_type_get(opts = {})
305
318
  data, _status_code, _headers = list_event_types_api_v1_event_type_get_with_http_info(opts)
@@ -313,6 +326,7 @@ module Svix
313
326
  # @option opts [Integer] :limit
314
327
  # @option opts [Boolean] :with_content
315
328
  # @option opts [Boolean] :include_archived
329
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
316
330
  # @return [Array<(ListResponseEventTypeOut, Integer, Hash)>] ListResponseEventTypeOut data, response status code and response headers
317
331
  def list_event_types_api_v1_event_type_get_with_http_info(opts = {})
318
332
  if @api_client.config.debugging
@@ -327,6 +341,10 @@ module Svix
327
341
  fail ArgumentError, "invalid value for 'opts[:\"iterator\"]' when calling EventTypeApi.list_event_types_api_v1_event_type_get, must conform to the pattern #{pattern}."
328
342
  end
329
343
 
344
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
345
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EventTypeApi.list_event_types_api_v1_event_type_get, must be smaller than or equal to 250.'
346
+ end
347
+
330
348
  # resource path
331
349
  local_var_path = '/api/v1/event-type/'
332
350
 
@@ -341,6 +359,7 @@ module Svix
341
359
  header_params = opts[:header_params] || {}
342
360
  # HTTP header 'Accept' (if needed)
343
361
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
362
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
344
363
 
345
364
  # form parameters
346
365
  form_params = opts[:form_params] || {}
@@ -376,6 +395,7 @@ module Svix
376
395
  # @param event_type_name [String]
377
396
  # @param event_type_update [EventTypeUpdate]
378
397
  # @param [Hash] opts the optional parameters
398
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
379
399
  # @return [EventTypeOut]
380
400
  def update_event_type_api_v1_event_type_event_type_name_put(event_type_name, event_type_update, opts = {})
381
401
  data, _status_code, _headers = update_event_type_api_v1_event_type_event_type_name_put_with_http_info(event_type_name, event_type_update, opts)
@@ -387,6 +407,7 @@ module Svix
387
407
  # @param event_type_name [String]
388
408
  # @param event_type_update [EventTypeUpdate]
389
409
  # @param [Hash] opts the optional parameters
410
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
390
411
  # @return [Array<(EventTypeOut, Integer, Hash)>] EventTypeOut data, response status code and response headers
391
412
  def update_event_type_api_v1_event_type_event_type_name_put_with_http_info(event_type_name, event_type_update, opts = {})
392
413
  if @api_client.config.debugging
@@ -421,6 +442,7 @@ module Svix
421
442
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
422
443
  # HTTP header 'Content-Type'
423
444
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
445
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
424
446
 
425
447
  # form parameters
426
448
  form_params = opts[:form_params] || {}
@@ -1,7 +1,7 @@
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}`. <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/). ## 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
+ #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}`. <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
6
  The version of the OpenAPI document: 1.4
7
7
 
@@ -22,6 +22,7 @@ module Svix
22
22
  # Health
23
23
  # Verify the API server is up and running.
24
24
  # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
25
26
  # @return [nil]
26
27
  def health_api_v1_health_get(opts = {})
27
28
  health_api_v1_health_get_with_http_info(opts)
@@ -31,6 +32,7 @@ module Svix
31
32
  # Health
32
33
  # Verify the API server is up and running.
33
34
  # @param [Hash] opts the optional parameters
35
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
34
36
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
37
  def health_api_v1_health_get_with_http_info(opts = {})
36
38
  if @api_client.config.debugging
@@ -44,6 +46,9 @@ module Svix
44
46
 
45
47
  # header parameters
46
48
  header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
47
52
 
48
53
  # form parameters
49
54
  form_params = opts[:form_params] || {}