svix 0.41.0 → 0.43.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/application_api.rb +5 -1
  4. data/lib/svix/api/authentication_api.rb +1 -1
  5. data/lib/svix/api/endpoint_api.rb +22 -18
  6. data/lib/svix/api/event_type_api.rb +5 -1
  7. data/lib/svix/api/health_api.rb +1 -1
  8. data/lib/svix/api/message_api.rb +10 -16
  9. data/lib/svix/api/message_attempt_api.rb +15 -64
  10. data/lib/svix/api/organization_api.rb +152 -0
  11. data/lib/svix/api/organization_settings_api.rb +1 -1
  12. data/lib/svix/api/statistics_api.rb +1 -1
  13. data/lib/svix/api_client.rb +1 -1
  14. data/lib/svix/api_error.rb +1 -1
  15. data/lib/svix/configuration.rb +1 -1
  16. data/lib/svix/endpoint_api.rb +1 -1
  17. data/lib/svix/models/application_in.rb +1 -1
  18. data/lib/svix/models/application_out.rb +1 -1
  19. data/lib/svix/models/attempt_statistics_data.rb +1 -1
  20. data/lib/svix/models/attempt_statistics_response.rb +1 -1
  21. data/lib/svix/models/border_radius_config.rb +1 -1
  22. data/lib/svix/models/border_radius_enum.rb +1 -1
  23. data/lib/svix/models/custom_theme_override.rb +1 -1
  24. data/lib/svix/models/dashboard_access_out.rb +1 -1
  25. data/lib/svix/models/endpoint_created_event.rb +1 -1
  26. data/lib/svix/models/endpoint_created_event_data.rb +1 -1
  27. data/lib/svix/models/endpoint_deleted_event.rb +1 -1
  28. data/lib/svix/models/endpoint_deleted_event_data.rb +1 -1
  29. data/lib/svix/models/endpoint_disabled_event.rb +1 -1
  30. data/lib/svix/models/endpoint_disabled_event_data.rb +1 -1
  31. data/lib/svix/models/endpoint_headers_in.rb +1 -1
  32. data/lib/svix/models/endpoint_headers_out.rb +1 -1
  33. data/lib/svix/models/endpoint_in.rb +38 -2
  34. data/lib/svix/models/endpoint_message_out.rb +38 -2
  35. data/lib/svix/models/endpoint_out.rb +38 -2
  36. data/lib/svix/models/endpoint_secret_out.rb +1 -1
  37. data/lib/svix/models/endpoint_secret_rotate_in.rb +1 -1
  38. data/lib/svix/models/endpoint_stats.rb +1 -1
  39. data/lib/svix/models/endpoint_update.rb +38 -2
  40. data/lib/svix/models/endpoint_updated_event.rb +1 -1
  41. data/lib/svix/models/endpoint_updated_event_data.rb +1 -1
  42. data/lib/svix/models/event_example_in.rb +1 -1
  43. data/lib/svix/models/event_type_example_out.rb +1 -1
  44. data/lib/svix/models/event_type_in.rb +1 -1
  45. data/lib/svix/models/event_type_out.rb +1 -1
  46. data/lib/svix/models/event_type_schema_in.rb +1 -1
  47. data/lib/svix/models/event_type_update.rb +1 -1
  48. data/lib/svix/models/export_organization_out.rb +259 -0
  49. data/lib/svix/models/font_size_config.rb +1 -1
  50. data/lib/svix/models/http_error_out.rb +1 -1
  51. data/lib/svix/models/http_validation_error.rb +1 -1
  52. data/lib/svix/models/import_organization_in.rb +257 -0
  53. data/lib/svix/models/list_response_application_out.rb +1 -1
  54. data/lib/svix/models/list_response_endpoint_message_out.rb +1 -1
  55. data/lib/svix/models/list_response_endpoint_out.rb +1 -1
  56. data/lib/svix/models/list_response_event_type_out.rb +1 -1
  57. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +1 -1
  58. data/lib/svix/models/list_response_message_attempt_out.rb +1 -1
  59. data/lib/svix/models/list_response_message_endpoint_out.rb +1 -1
  60. data/lib/svix/models/list_response_message_out.rb +1 -1
  61. data/lib/svix/models/message_attempt_endpoint_out.rb +1 -1
  62. data/lib/svix/models/message_attempt_exhausted_event.rb +1 -1
  63. data/lib/svix/models/message_attempt_exhausted_event_data.rb +1 -1
  64. data/lib/svix/models/message_attempt_failed_event.rb +1 -1
  65. data/lib/svix/models/message_attempt_out.rb +1 -1
  66. data/lib/svix/models/message_attempt_trigger_type.rb +1 -1
  67. data/lib/svix/models/message_endpoint_out.rb +38 -2
  68. data/lib/svix/models/message_in.rb +38 -2
  69. data/lib/svix/models/message_out.rb +38 -2
  70. data/lib/svix/models/message_status.rb +1 -1
  71. data/lib/svix/models/portal_settings_out.rb +16 -5
  72. data/lib/svix/models/recover_in.rb +1 -1
  73. data/lib/svix/models/settings_in.rb +328 -0
  74. data/lib/svix/models/settings_out.rb +328 -0
  75. data/lib/svix/models/statistics_period.rb +1 -1
  76. data/lib/svix/models/validation_error.rb +1 -1
  77. data/lib/svix/models/webhook_types.rb +1 -1
  78. data/lib/svix/version.rb +1 -1
  79. data/lib/svix.rb +1 -0
  80. metadata +11 -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: c4d5477a7c45e7ce760b3ecbaf129104fd87ab3499cefd3b0734b503c6bfce50
4
+ data.tar.gz: f76c1ae5de0348c89abb51bbe27ea28cd57eb0955ee00f523c386591e75becee
5
5
  SHA512:
6
- metadata.gz: 77fa1947cea80de4a1d57aca24f8e9ccad811dded54b81d27567cd8a125d7cb96e364bfc8cb655c2d25a6467c2f15198a53bcf8083ff9130c34f631426f3d6ba
7
- data.tar.gz: 3dbde77e7dd662432ddf3d44bce754534a47fc7b06692c0c47effc30b27668a84f1774d71c113ff274bd0fbe6236ba9aa629ff475f66e1509ff11d223b37eb40
6
+ metadata.gz: 1cebae06fcaa4d2100c43676cf5be855e8885182eb2182be4dc91dd33022ae3b4a569cd395879c29963123310ec5ee4940fdfa1c9d460ba9100ca19b797ecd78
7
+ data.tar.gz: 2155b0f51d24baaecf980f040262800b0e58ccb9e79dab40176d787ca2f54ba4c5273cfe5ceda3bc1d7a79f51f9841d8cb2123dadcfebf41cffa74a9692ac07f
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.43.2)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -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
 
@@ -257,6 +257,10 @@ module Svix
257
257
  if @api_client.config.debugging
258
258
  @api_client.config.logger.debug 'Calling API: ApplicationApi.list_applications_api_v1_app_get ...'
259
259
  end
260
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
261
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationApi.list_applications_api_v1_app_get, must be smaller than or equal to 250.'
262
+ end
263
+
260
264
  # resource path
261
265
  local_var_path = '/api/v1/app/'
262
266
 
@@ -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
 
@@ -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
 
@@ -618,6 +618,10 @@ module Svix
618
618
  fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.list_endpoints_api_v1_app_app_id_endpoint_get, must conform to the pattern #{pattern}."
619
619
  end
620
620
 
621
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
622
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EndpointApi.list_endpoints_api_v1_app_app_id_endpoint_get, must be smaller than or equal to 250.'
623
+ end
624
+
621
625
  # resource path
622
626
  local_var_path = '/api/v1/app/{app_id}/endpoint/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
623
627
 
@@ -763,66 +767,66 @@ module Svix
763
767
  return data, status_code, headers
764
768
  end
765
769
 
766
- # Resend Failed Webhooks
770
+ # Recover Failed Webhooks
767
771
  # Resend all failed messages since a given time.
768
772
  # @param app_id [String]
769
773
  # @param endpoint_id [String]
770
774
  # @param recover_in [RecoverIn]
771
775
  # @param [Hash] opts the optional parameters
772
776
  # @return [Object]
773
- def resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post(app_id, endpoint_id, recover_in, opts = {})
774
- data, _status_code, _headers = resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts)
777
+ def recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post(app_id, endpoint_id, recover_in, opts = {})
778
+ data, _status_code, _headers = recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts)
775
779
  data
776
780
  end
777
781
 
778
- # Resend Failed Webhooks
782
+ # Recover Failed Webhooks
779
783
  # Resend all failed messages since a given time.
780
784
  # @param app_id [String]
781
785
  # @param endpoint_id [String]
782
786
  # @param recover_in [RecoverIn]
783
787
  # @param [Hash] opts the optional parameters
784
788
  # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
785
- def resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts = {})
789
+ def recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts = {})
786
790
  if @api_client.config.debugging
787
- @api_client.config.logger.debug 'Calling API: EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post ...'
791
+ @api_client.config.logger.debug 'Calling API: EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post ...'
788
792
  end
789
793
  # verify the required parameter 'app_id' is set
790
794
  if @api_client.config.client_side_validation && app_id.nil?
791
- fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
795
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
792
796
  end
793
797
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
794
- fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
798
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
795
799
  end
796
800
 
797
801
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
798
- fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
802
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
799
803
  end
800
804
 
801
805
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
802
806
  if @api_client.config.client_side_validation && app_id !~ pattern
803
- fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
807
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
804
808
  end
805
809
 
806
810
  # verify the required parameter 'endpoint_id' is set
807
811
  if @api_client.config.client_side_validation && endpoint_id.nil?
808
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
812
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
809
813
  end
810
814
  if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
811
- fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
815
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
812
816
  end
813
817
 
814
818
  if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
815
- fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
819
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
816
820
  end
817
821
 
818
822
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
819
823
  if @api_client.config.client_side_validation && endpoint_id !~ pattern
820
- fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
824
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
821
825
  end
822
826
 
823
827
  # verify the required parameter 'recover_in' is set
824
828
  if @api_client.config.client_side_validation && recover_in.nil?
825
- fail ArgumentError, "Missing the required parameter 'recover_in' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
829
+ fail ArgumentError, "Missing the required parameter 'recover_in' when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
826
830
  end
827
831
  # resource path
828
832
  local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
@@ -850,7 +854,7 @@ module Svix
850
854
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
851
855
 
852
856
  new_options = opts.merge(
853
- :operation => :"EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post",
857
+ :operation => :"EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post",
854
858
  :header_params => header_params,
855
859
  :query_params => query_params,
856
860
  :form_params => form_params,
@@ -861,7 +865,7 @@ module Svix
861
865
 
862
866
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
863
867
  if @api_client.config.debugging
864
- @api_client.config.logger.debug "API called: EndpointApi#resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
868
+ @api_client.config.logger.debug "API called: EndpointApi#recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
865
869
  end
866
870
  return data, status_code, headers
867
871
  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
 
@@ -327,6 +327,10 @@ module Svix
327
327
  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
328
  end
329
329
 
330
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
331
+ 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.'
332
+ end
333
+
330
334
  # resource path
331
335
  local_var_path = '/api/v1/event-type/'
332
336
 
@@ -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
 
@@ -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
 
@@ -20,10 +20,11 @@ module Svix
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create Message
23
- # Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. If a message with the same `eventId` already exists for any application in your environment, a 409 conflict error will be returned.
23
+ # Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made. If a message with the same `eventId` already exists for any application in your environment, a 409 conflict error will be returned. The `eventType` indicates the type and schema of the event. All messages of a certain `eventType` are expected to have the same schema. Endpoints can choose to only listen to specific event types. Messages can also have `channels`, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don't imply a specific message content or schema.
24
24
  # @param app_id [String]
25
25
  # @param message_in [MessageIn]
26
26
  # @param [Hash] opts the optional parameters
27
+ # @option opts [Boolean] :with_content (default to true)
27
28
  # @return [MessageOut]
28
29
  def create_message_api_v1_app_app_id_msg_post(app_id, message_in, opts = {})
29
30
  data, _status_code, _headers = create_message_api_v1_app_app_id_msg_post_with_http_info(app_id, message_in, opts)
@@ -31,10 +32,11 @@ module Svix
31
32
  end
32
33
 
33
34
  # Create Message
34
- # Creates a new message and dispatches it to all of the application&#39;s endpoints. The &#x60;eventId&#x60; is an optional custom unique ID. If a message with the same &#x60;eventId&#x60; already exists for any application in your environment, a 409 conflict error will be returned.
35
+ # Creates a new message and dispatches it to all of the application&#39;s endpoints. The &#x60;eventId&#x60; is an optional custom unique ID. It&#39;s verified to be unique only up to a day, after that no verification will be made. If a message with the same &#x60;eventId&#x60; already exists for any application in your environment, a 409 conflict error will be returned. The &#x60;eventType&#x60; indicates the type and schema of the event. All messages of a certain &#x60;eventType&#x60; are expected to have the same schema. Endpoints can choose to only listen to specific event types. Messages can also have &#x60;channels&#x60;, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don&#39;t imply a specific message content or schema.
35
36
  # @param app_id [String]
36
37
  # @param message_in [MessageIn]
37
38
  # @param [Hash] opts the optional parameters
39
+ # @option opts [Boolean] :with_content
38
40
  # @return [Array<(MessageOut, Integer, Hash)>] MessageOut data, response status code and response headers
39
41
  def create_message_api_v1_app_app_id_msg_post_with_http_info(app_id, message_in, opts = {})
40
42
  if @api_client.config.debugging
@@ -66,6 +68,7 @@ module Svix
66
68
 
67
69
  # query parameters
68
70
  query_params = opts[:query_params] || {}
71
+ query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
69
72
 
70
73
  # header parameters
71
74
  header_params = opts[:header_params] || {}
@@ -128,19 +131,6 @@ module Svix
128
131
  if @api_client.config.client_side_validation && msg_id.nil?
129
132
  fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageApi.get_message_api_v1_app_app_id_msg_msg_id_get"
130
133
  end
131
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
132
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageApi.get_message_api_v1_app_app_id_msg_msg_id_get, the character length must be smaller than or equal to 256.'
133
- end
134
-
135
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
136
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageApi.get_message_api_v1_app_app_id_msg_msg_id_get, the character length must be great than or equal to 1.'
137
- end
138
-
139
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
140
- if @api_client.config.client_side_validation && msg_id !~ pattern
141
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageApi.get_message_api_v1_app_app_id_msg_msg_id_get, must conform to the pattern #{pattern}."
142
- end
143
-
144
134
  # verify the required parameter 'app_id' is set
145
135
  if @api_client.config.client_side_validation && app_id.nil?
146
136
  fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageApi.get_message_api_v1_app_app_id_msg_msg_id_get"
@@ -242,6 +232,10 @@ module Svix
242
232
  fail ArgumentError, "invalid value for 'app_id' when calling MessageApi.list_messages_api_v1_app_app_id_msg_get, must conform to the pattern #{pattern}."
243
233
  end
244
234
 
235
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
236
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageApi.list_messages_api_v1_app_app_id_msg_get, must be smaller than or equal to 250.'
237
+ end
238
+
245
239
  # resource path
246
240
  local_var_path = '/api/v1/app/{app_id}/msg/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
247
241
 
@@ -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
 
@@ -50,19 +50,6 @@ module Svix
50
50
  if @api_client.config.client_side_validation && msg_id.nil?
51
51
  fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get"
52
52
  end
53
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
54
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get, the character length must be smaller than or equal to 256.'
55
- end
56
-
57
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
58
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get, the character length must be great than or equal to 1.'
59
- end
60
-
61
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
62
- if @api_client.config.client_side_validation && msg_id !~ pattern
63
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get, must conform to the pattern #{pattern}."
64
- end
65
-
66
53
  # verify the required parameter 'app_id' is set
67
54
  if @api_client.config.client_side_validation && app_id.nil?
68
55
  fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get"
@@ -149,19 +136,6 @@ module Svix
149
136
  if @api_client.config.client_side_validation && msg_id.nil?
150
137
  fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get"
151
138
  end
152
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
153
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get, the character length must be smaller than or equal to 256.'
154
- end
155
-
156
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
157
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get, the character length must be great than or equal to 1.'
158
- end
159
-
160
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
161
- if @api_client.config.client_side_validation && msg_id !~ pattern
162
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get, must conform to the pattern #{pattern}."
163
- end
164
-
165
139
  # verify the required parameter 'app_id' is set
166
140
  if @api_client.config.client_side_validation && app_id.nil?
167
141
  fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get"
@@ -179,6 +153,10 @@ module Svix
179
153
  fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get, must conform to the pattern #{pattern}."
180
154
  end
181
155
 
156
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
157
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get, must be smaller than or equal to 250.'
158
+ end
159
+
182
160
  # resource path
183
161
  local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/endpoint/'.sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
184
162
 
@@ -284,6 +262,10 @@ module Svix
284
262
  fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, must conform to the pattern #{pattern}."
285
263
  end
286
264
 
265
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
266
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, must be smaller than or equal to 250.'
267
+ end
268
+
287
269
  # resource path
288
270
  local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
289
271
 
@@ -376,17 +358,8 @@ module Svix
376
358
  if @api_client.config.client_side_validation && msg_id.nil?
377
359
  fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get"
378
360
  end
379
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
380
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 256.'
381
- end
382
-
383
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
384
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be great than or equal to 1.'
385
- end
386
-
387
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
388
- if @api_client.config.client_side_validation && msg_id !~ pattern
389
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
361
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
362
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must be smaller than or equal to 250.'
390
363
  end
391
364
 
392
365
  # resource path
@@ -469,19 +442,6 @@ module Svix
469
442
  if @api_client.config.client_side_validation && msg_id.nil?
470
443
  fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get"
471
444
  end
472
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
473
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get, the character length must be smaller than or equal to 256.'
474
- end
475
-
476
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
477
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get, the character length must be great than or equal to 1.'
478
- end
479
-
480
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
481
- if @api_client.config.client_side_validation && msg_id !~ pattern
482
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get, must conform to the pattern #{pattern}."
483
- end
484
-
485
445
  # verify the required parameter 'app_id' is set
486
446
  if @api_client.config.client_side_validation && app_id.nil?
487
447
  fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get"
@@ -516,6 +476,10 @@ module Svix
516
476
  fail ArgumentError, "invalid value for 'endpoint_id' when calling MessageAttemptApi.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get, must conform to the pattern #{pattern}."
517
477
  end
518
478
 
479
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
480
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get, must be smaller than or equal to 250.'
481
+ end
482
+
519
483
  # resource path
520
484
  local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt/'.sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
521
485
 
@@ -605,19 +569,6 @@ module Svix
605
569
  if @api_client.config.client_side_validation && msg_id.nil?
606
570
  fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.resend_webhook_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_resend_post"
607
571
  end
608
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
609
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.resend_webhook_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_resend_post, the character length must be smaller than or equal to 256.'
610
- end
611
-
612
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
613
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.resend_webhook_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_resend_post, the character length must be great than or equal to 1.'
614
- end
615
-
616
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
617
- if @api_client.config.client_side_validation && msg_id !~ pattern
618
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.resend_webhook_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_resend_post, must conform to the pattern #{pattern}."
619
- end
620
-
621
572
  # verify the required parameter 'app_id' is set
622
573
  if @api_client.config.client_side_validation && app_id.nil?
623
574
  fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.resend_webhook_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_resend_post"