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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1eb8ab3af1e0634005724f6b5c759319008f9a3cc130be62b917989139ad899a
4
- data.tar.gz: ed7a0a14128124670d25f6a4f7b3703ebdc3365842054273e03ea22887e5a728
3
+ metadata.gz: e1742c65f260a8cbf205d478341f72aff69b0e6ef1019ddccb309355b266f583
4
+ data.tar.gz: 62150765756ff23b82ddd3f3906d60923f14053d3895c94317bde67d0b39d51a
5
5
  SHA512:
6
- metadata.gz: 77fa1947cea80de4a1d57aca24f8e9ccad811dded54b81d27567cd8a125d7cb96e364bfc8cb655c2d25a6467c2f15198a53bcf8083ff9130c34f631426f3d6ba
7
- data.tar.gz: 3dbde77e7dd662432ddf3d44bce754534a47fc7b06692c0c47effc30b27668a84f1774d71c113ff274bd0fbe6236ba9aa629ff475f66e1509ff11d223b37eb40
6
+ metadata.gz: cac5c60620c751a953300a734bf1910a11f30401752d81e1eb3b5d19eac33e57f2e87f8da7614f1e715e5ab71b31542a4cfefafbc7d0cd14f5072a41b9ccf01f
7
+ data.tar.gz: 79428d402103ce0068cd8e52a48bdb208c90c96be1169ceb8c17bd845f91ad831803fa4b1e92427da43911f74fa875abfb552d4068e7154403490978eb318d41
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (0.41.0)
4
+ svix (0.48.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,6 +1,46 @@
1
- # Svix Ruby
2
-
3
- Please refer to [the documentation](https://docs.svix.com) for usage instructions.
1
+ <h1 align="center">
2
+ <a style="text-decoration: none" href="https://www.svix.com">
3
+ <img width="120" src="https://avatars.githubusercontent.com/u/80175132?s=200&v=4" />
4
+ <p align="center">Svix - Webhooks as a service</p>
5
+ </a>
6
+ </h1>
7
+ <h2 align="center">
8
+ <a href="https://svix.com">Website</a> | <a href="https://docs.svix.com">Documentation</a> | <a href="https://svix.com/slack">Community Slack</a>
9
+ <h2>
10
+
11
+ Ruby library for interacting with the Svix API and verifying webhook signatures
12
+
13
+ ![GitHub tag](https://img.shields.io/github/tag/svix/svix-webhooks.svg)
14
+ [![Gem](https://img.shields.io/gem/v/svix)](https://rubygems.org/gems/svix)
15
+
16
+
17
+ [![Join our slack](https://img.shields.io/badge/Slack-join%20the%20community-blue?logo=slack&style=social)](https://www.svix.com/slack/)
18
+
19
+ # Usage Documentation
20
+
21
+ You can find general usage documentation at <https://docs.svix.com>. For complete API documentation with code examples for each endpoint in all of our official client libraries head over to our API documentation site at <https://api.svix.com>.
22
+
23
+ # Language Support
24
+
25
+ <table style="table-layout:fixed; white-space: nowrap;">
26
+ <th colspan="2">⚡️ Features ⚡️</th>
27
+ <tr>
28
+ <th>Officially Supported</th>
29
+ <th>✅</th>
30
+ </tr>
31
+ <tr>
32
+ <th>API Support</th>
33
+ <th>✅</th>
34
+ </tr>
35
+ <tr>
36
+ <th>Signature Verification</th>
37
+ <th>✅</th>
38
+ </tr>
39
+ <tr>
40
+ <th>Caveats</th>
41
+ <th>🚀 None!</th>
42
+ </tr>
43
+ </table>
4
44
 
5
45
  ## Installation
6
46
 
@@ -22,19 +62,33 @@ Or install it yourself as:
22
62
  gem install svix
23
63
  ```
24
64
 
25
- ## Development
65
+ # Development
66
+
67
+ First checkout the [core README](../README.md#development) for details on how to generate our API bindings, then follow the steps below.
26
68
 
27
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
69
+ ## Building
28
70
 
29
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
71
+ ```sh
72
+ bundler exec rake build
73
+ ```
30
74
 
75
+ ## Contributing
31
76
 
32
- ### Run Tests
77
+ Before opening a PR be sure to format your code!
33
78
 
79
+ ```sh
34
80
  bundle exec rspec spec
81
+ ```
35
82
 
83
+ ## Running Tests
84
+
85
+ Simply run:
86
+
87
+ ```sh
88
+ bundle exec rspec spec
89
+ ```
36
90
 
37
- ### Build & Upload
91
+ ## Publishing
38
92
 
39
93
  ```sh
40
94
  gem build svix.gemspec
@@ -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,8 @@ module Svix
23
23
  # Create a new application.
24
24
  # @param application_in [ApplicationIn]
25
25
  # @param [Hash] opts the optional parameters
26
+ # @option opts [Boolean] :get_if_exists (default to false)
27
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
26
28
  # @return [ApplicationOut]
27
29
  def create_application_api_v1_app_post(application_in, opts = {})
28
30
  data, _status_code, _headers = create_application_api_v1_app_post_with_http_info(application_in, opts)
@@ -33,6 +35,8 @@ module Svix
33
35
  # Create a new application.
34
36
  # @param application_in [ApplicationIn]
35
37
  # @param [Hash] opts the optional parameters
38
+ # @option opts [Boolean] :get_if_exists
39
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
36
40
  # @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
37
41
  def create_application_api_v1_app_post_with_http_info(application_in, opts = {})
38
42
  if @api_client.config.debugging
@@ -47,6 +51,7 @@ module Svix
47
51
 
48
52
  # query parameters
49
53
  query_params = opts[:query_params] || {}
54
+ query_params[:'get_if_exists'] = opts[:'get_if_exists'] if !opts[:'get_if_exists'].nil?
50
55
 
51
56
  # header parameters
52
57
  header_params = opts[:header_params] || {}
@@ -54,6 +59,7 @@ module Svix
54
59
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
60
  # HTTP header 'Content-Type'
56
61
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
62
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
57
63
 
58
64
  # form parameters
59
65
  form_params = opts[:form_params] || {}
@@ -88,6 +94,7 @@ module Svix
88
94
  # Delete an application.
89
95
  # @param app_id [String]
90
96
  # @param [Hash] opts the optional parameters
97
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
91
98
  # @return [nil]
92
99
  def delete_application_api_v1_app_app_id_delete(app_id, opts = {})
93
100
  delete_application_api_v1_app_app_id_delete_with_http_info(app_id, opts)
@@ -98,6 +105,7 @@ module Svix
98
105
  # Delete an application.
99
106
  # @param app_id [String]
100
107
  # @param [Hash] opts the optional parameters
108
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
101
109
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
102
110
  def delete_application_api_v1_app_app_id_delete_with_http_info(app_id, opts = {})
103
111
  if @api_client.config.debugging
@@ -130,6 +138,7 @@ module Svix
130
138
  header_params = opts[:header_params] || {}
131
139
  # HTTP header 'Accept' (if needed)
132
140
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
141
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
133
142
 
134
143
  # form parameters
135
144
  form_params = opts[:form_params] || {}
@@ -164,6 +173,7 @@ module Svix
164
173
  # Get an application.
165
174
  # @param app_id [String]
166
175
  # @param [Hash] opts the optional parameters
176
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
167
177
  # @return [ApplicationOut]
168
178
  def get_application_api_v1_app_app_id_get(app_id, opts = {})
169
179
  data, _status_code, _headers = get_application_api_v1_app_app_id_get_with_http_info(app_id, opts)
@@ -174,6 +184,7 @@ module Svix
174
184
  # Get an application.
175
185
  # @param app_id [String]
176
186
  # @param [Hash] opts the optional parameters
187
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
177
188
  # @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
178
189
  def get_application_api_v1_app_app_id_get_with_http_info(app_id, opts = {})
179
190
  if @api_client.config.debugging
@@ -206,6 +217,7 @@ module Svix
206
217
  header_params = opts[:header_params] || {}
207
218
  # HTTP header 'Accept' (if needed)
208
219
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
220
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
209
221
 
210
222
  # form parameters
211
223
  form_params = opts[:form_params] || {}
@@ -241,6 +253,7 @@ module Svix
241
253
  # @param [Hash] opts the optional parameters
242
254
  # @option opts [String] :iterator
243
255
  # @option opts [Integer] :limit (default to 50)
256
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
244
257
  # @return [ListResponseApplicationOut]
245
258
  def list_applications_api_v1_app_get(opts = {})
246
259
  data, _status_code, _headers = list_applications_api_v1_app_get_with_http_info(opts)
@@ -252,11 +265,16 @@ module Svix
252
265
  # @param [Hash] opts the optional parameters
253
266
  # @option opts [String] :iterator
254
267
  # @option opts [Integer] :limit
268
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
255
269
  # @return [Array<(ListResponseApplicationOut, Integer, Hash)>] ListResponseApplicationOut data, response status code and response headers
256
270
  def list_applications_api_v1_app_get_with_http_info(opts = {})
257
271
  if @api_client.config.debugging
258
272
  @api_client.config.logger.debug 'Calling API: ApplicationApi.list_applications_api_v1_app_get ...'
259
273
  end
274
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
275
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationApi.list_applications_api_v1_app_get, must be smaller than or equal to 250.'
276
+ end
277
+
260
278
  # resource path
261
279
  local_var_path = '/api/v1/app/'
262
280
 
@@ -269,6 +287,7 @@ module Svix
269
287
  header_params = opts[:header_params] || {}
270
288
  # HTTP header 'Accept' (if needed)
271
289
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
290
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
272
291
 
273
292
  # form parameters
274
293
  form_params = opts[:form_params] || {}
@@ -304,6 +323,7 @@ module Svix
304
323
  # @param app_id [String]
305
324
  # @param application_in [ApplicationIn]
306
325
  # @param [Hash] opts the optional parameters
326
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
307
327
  # @return [ApplicationOut]
308
328
  def update_application_api_v1_app_app_id_put(app_id, application_in, opts = {})
309
329
  data, _status_code, _headers = update_application_api_v1_app_app_id_put_with_http_info(app_id, application_in, opts)
@@ -315,6 +335,7 @@ module Svix
315
335
  # @param app_id [String]
316
336
  # @param application_in [ApplicationIn]
317
337
  # @param [Hash] opts the optional parameters
338
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
318
339
  # @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
319
340
  def update_application_api_v1_app_app_id_put_with_http_info(app_id, application_in, opts = {})
320
341
  if @api_client.config.debugging
@@ -353,6 +374,7 @@ module Svix
353
374
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
354
375
  # HTTP header 'Content-Type'
355
376
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
377
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
356
378
 
357
379
  # form parameters
358
380
  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
 
@@ -23,6 +23,7 @@ module Svix
23
23
  # Use this function to get magic links (and authentication codes) for connecting your users to the management UIs.
24
24
  # @param app_id [String]
25
25
  # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
26
27
  # @return [DashboardAccessOut]
27
28
  def get_dashboard_access_api_v1_auth_dashboard_access_app_id_post(app_id, opts = {})
28
29
  data, _status_code, _headers = get_dashboard_access_api_v1_auth_dashboard_access_app_id_post_with_http_info(app_id, opts)
@@ -33,6 +34,7 @@ module Svix
33
34
  # Use this function to get magic links (and authentication codes) for connecting your users to the management UIs.
34
35
  # @param app_id [String]
35
36
  # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
36
38
  # @return [Array<(DashboardAccessOut, Integer, Hash)>] DashboardAccessOut data, response status code and response headers
37
39
  def get_dashboard_access_api_v1_auth_dashboard_access_app_id_post_with_http_info(app_id, opts = {})
38
40
  if @api_client.config.debugging
@@ -65,6 +67,7 @@ module Svix
65
67
  header_params = opts[:header_params] || {}
66
68
  # HTTP header 'Accept' (if needed)
67
69
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
70
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
68
71
 
69
72
  # form parameters
70
73
  form_params = opts[:form_params] || {}
@@ -98,6 +101,7 @@ module Svix
98
101
  # Logout
99
102
  # Logout an app token. Trying to log out other tokens will fail.
100
103
  # @param [Hash] opts the optional parameters
104
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
101
105
  # @return [nil]
102
106
  def logout_api_v1_auth_logout_post(opts = {})
103
107
  logout_api_v1_auth_logout_post_with_http_info(opts)
@@ -107,6 +111,7 @@ module Svix
107
111
  # Logout
108
112
  # Logout an app token. Trying to log out other tokens will fail.
109
113
  # @param [Hash] opts the optional parameters
114
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
110
115
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
111
116
  def logout_api_v1_auth_logout_post_with_http_info(opts = {})
112
117
  if @api_client.config.debugging
@@ -122,6 +127,7 @@ module Svix
122
127
  header_params = opts[:header_params] || {}
123
128
  # HTTP header 'Accept' (if needed)
124
129
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
130
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
125
131
 
126
132
  # form parameters
127
133
  form_params = opts[:form_params] || {}