svix 0.83.1 → 0.84.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/application_api.rb +251 -181
  4. data/lib/svix/api/authentication_api.rb +84 -152
  5. data/lib/svix/api/background_tasks_api.rb +165 -0
  6. data/lib/svix/api/endpoint_api.rb +591 -511
  7. data/lib/svix/api/environment_api.rb +15 -15
  8. data/lib/svix/api/environment_settings_api.rb +7 -10
  9. data/lib/svix/api/event_type_api.rb +160 -85
  10. data/lib/svix/api/health_api.rb +7 -10
  11. data/lib/svix/api/integration_api.rb +136 -143
  12. data/lib/svix/api/message_api.rb +103 -105
  13. data/lib/svix/api/message_attempt_api.rb +419 -419
  14. data/lib/svix/api/statistics_api.rb +110 -48
  15. data/lib/svix/api_client.rb +1 -1
  16. data/lib/svix/api_error.rb +1 -1
  17. data/lib/svix/application_api.rb +22 -22
  18. data/lib/svix/authentication_api.rb +3 -3
  19. data/lib/svix/configuration.rb +2 -1
  20. data/lib/svix/endpoint_api.rb +16 -16
  21. data/lib/svix/event_type_api.rb +19 -19
  22. data/lib/svix/integration_api.rb +26 -26
  23. data/lib/svix/message_api.rb +4 -4
  24. data/lib/svix/message_attempt_api.rb +8 -8
  25. data/lib/svix/models/app_portal_access_in.rb +2 -1
  26. data/lib/svix/models/app_portal_access_out.rb +1 -1
  27. data/lib/svix/models/app_usage_stats_in.rb +255 -0
  28. data/lib/svix/models/app_usage_stats_out.rb +251 -0
  29. data/lib/svix/models/application_in.rb +35 -2
  30. data/lib/svix/models/application_out.rb +23 -3
  31. data/lib/svix/models/application_patch.rb +300 -0
  32. data/lib/svix/models/application_stats.rb +3 -2
  33. data/lib/svix/models/application_token_expire_in.rb +1 -1
  34. data/lib/svix/models/attempt_statistics_data.rb +1 -1
  35. data/lib/svix/models/attempt_statistics_response.rb +1 -1
  36. data/lib/svix/models/{webhook_types.rb → background_task_out.rb} +41 -70
  37. data/lib/svix/models/background_task_status.rb +38 -0
  38. data/lib/svix/models/background_task_type.rb +38 -0
  39. data/lib/svix/models/border_radius_config.rb +1 -1
  40. data/lib/svix/models/border_radius_enum.rb +1 -1
  41. data/lib/svix/models/custom_color_palette.rb +1 -1
  42. data/lib/svix/models/custom_theme_override.rb +1 -1
  43. data/lib/svix/models/dashboard_access_out.rb +1 -1
  44. data/lib/svix/models/endpoint_created_event.rb +6 -1
  45. data/lib/svix/models/endpoint_created_event_data.rb +5 -3
  46. data/lib/svix/models/endpoint_deleted_event.rb +6 -1
  47. data/lib/svix/models/endpoint_deleted_event_data.rb +5 -3
  48. data/lib/svix/models/endpoint_disabled_event.rb +6 -1
  49. data/lib/svix/models/endpoint_disabled_event_data.rb +6 -3
  50. data/lib/svix/models/endpoint_headers_in.rb +1 -1
  51. data/lib/svix/models/endpoint_headers_out.rb +1 -1
  52. data/lib/svix/models/endpoint_headers_patch_in.rb +1 -1
  53. data/lib/svix/models/endpoint_in.rb +20 -11
  54. data/lib/svix/models/endpoint_message_out.rb +4 -1
  55. data/lib/svix/models/endpoint_out.rb +35 -16
  56. data/lib/svix/models/endpoint_patch.rb +406 -0
  57. data/lib/svix/models/endpoint_secret_out.rb +1 -1
  58. data/lib/svix/models/endpoint_secret_rotate_in.rb +3 -1
  59. data/lib/svix/models/endpoint_stats.rb +1 -1
  60. data/lib/svix/models/endpoint_transformation_in.rb +1 -3
  61. data/lib/svix/models/endpoint_transformation_out.rb +1 -1
  62. data/lib/svix/models/endpoint_transformation_simulate_in.rb +8 -1
  63. data/lib/svix/models/endpoint_transformation_simulate_out.rb +1 -1
  64. data/lib/svix/models/endpoint_update.rb +20 -11
  65. data/lib/svix/models/endpoint_updated_event.rb +6 -1
  66. data/lib/svix/models/endpoint_updated_event_data.rb +5 -3
  67. data/lib/svix/models/environment_in.rb +1 -1
  68. data/lib/svix/models/environment_out.rb +1 -1
  69. data/lib/svix/models/environment_settings_out.rb +1 -1
  70. data/lib/svix/models/event_example_in.rb +2 -1
  71. data/lib/svix/models/event_type_example_out.rb +5 -3
  72. data/lib/svix/models/event_type_in.rb +2 -1
  73. data/lib/svix/models/event_type_out.rb +2 -1
  74. data/lib/svix/models/event_type_patch.rb +275 -0
  75. data/lib/svix/models/event_type_schema_in.rb +1 -2
  76. data/lib/svix/models/event_type_update.rb +1 -1
  77. data/lib/svix/models/font_size_config.rb +1 -1
  78. data/lib/svix/models/http_error_out.rb +1 -1
  79. data/lib/svix/models/http_validation_error.rb +6 -1
  80. data/lib/svix/models/integration_in.rb +1 -1
  81. data/lib/svix/models/integration_key_out.rb +1 -1
  82. data/lib/svix/models/integration_out.rb +2 -1
  83. data/lib/svix/models/integration_update.rb +1 -1
  84. data/lib/svix/models/list_response_application_out.rb +1 -1
  85. data/lib/svix/models/list_response_application_stats.rb +16 -6
  86. data/lib/svix/models/list_response_background_task_out.rb +259 -0
  87. data/lib/svix/models/list_response_endpoint_message_out.rb +1 -1
  88. data/lib/svix/models/list_response_endpoint_out.rb +1 -1
  89. data/lib/svix/models/list_response_event_type_out.rb +1 -1
  90. data/lib/svix/models/list_response_integration_out.rb +16 -6
  91. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +1 -1
  92. data/lib/svix/models/list_response_message_attempt_out.rb +1 -1
  93. data/lib/svix/models/list_response_message_endpoint_out.rb +16 -6
  94. data/lib/svix/models/list_response_message_out.rb +1 -1
  95. data/lib/svix/models/message_attempt_endpoint_out.rb +4 -1
  96. data/lib/svix/models/message_attempt_exhausted_event.rb +6 -1
  97. data/lib/svix/models/message_attempt_exhausted_event_data.rb +7 -3
  98. data/lib/svix/models/message_attempt_failed_data.rb +2 -1
  99. data/lib/svix/models/message_attempt_failing_event.rb +6 -1
  100. data/lib/svix/models/message_attempt_failing_event_data.rb +7 -3
  101. data/lib/svix/models/message_attempt_headers_out.rb +28 -2
  102. data/lib/svix/models/message_attempt_out.rb +4 -1
  103. data/lib/svix/models/message_attempt_trigger_type.rb +1 -1
  104. data/lib/svix/models/message_endpoint_out.rb +47 -30
  105. data/lib/svix/models/message_in.rb +2 -2
  106. data/lib/svix/models/message_out.rb +3 -1
  107. data/lib/svix/models/message_status.rb +1 -1
  108. data/lib/svix/models/ordering.rb +1 -1
  109. data/lib/svix/models/recover_in.rb +1 -1
  110. data/lib/svix/models/{one_time_token_out.rb → recover_out.rb} +42 -14
  111. data/lib/svix/models/replay_in.rb +1 -1
  112. data/lib/svix/models/{one_time_token_in.rb → replay_out.rb} +42 -14
  113. data/lib/svix/models/settings_in.rb +1 -1
  114. data/lib/svix/models/settings_out.rb +1 -1
  115. data/lib/svix/models/statistics_period.rb +1 -1
  116. data/lib/svix/models/status_code_class.rb +1 -1
  117. data/lib/svix/models/transformation_http_method.rb +2 -2
  118. data/lib/svix/models/validation_error.rb +5 -1
  119. data/lib/svix/version.rb +1 -1
  120. metadata +14 -5
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
5
5
 
6
- The version of the OpenAPI document: 1.4
6
+ The version of the OpenAPI document: 1.4.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -25,8 +25,8 @@ module Svix
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
27
27
  # @return [EnvironmentOut]
28
- def export_environment_configuration_api_v1_environment_export_post(body, opts = {})
29
- data, _status_code, _headers = export_environment_configuration_api_v1_environment_export_post_with_http_info(body, opts)
28
+ def v1_environment_export(body, opts = {})
29
+ data, _status_code, _headers = v1_environment_export_with_http_info(body, opts)
30
30
  data
31
31
  end
32
32
 
@@ -36,13 +36,13 @@ module Svix
36
36
  # @param [Hash] opts the optional parameters
37
37
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
38
38
  # @return [Array<(EnvironmentOut, Integer, Hash)>] EnvironmentOut data, response status code and response headers
39
- def export_environment_configuration_api_v1_environment_export_post_with_http_info(body, opts = {})
39
+ def v1_environment_export_with_http_info(body, opts = {})
40
40
  if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: EnvironmentApi.export_environment_configuration_api_v1_environment_export_post ...'
41
+ @api_client.config.logger.debug 'Calling API: EnvironmentApi.v1_environment_export ...'
42
42
  end
43
43
  # verify the required parameter 'body' is set
44
44
  if @api_client.config.client_side_validation && body.nil?
45
- fail ArgumentError, "Missing the required parameter 'body' when calling EnvironmentApi.export_environment_configuration_api_v1_environment_export_post"
45
+ fail ArgumentError, "Missing the required parameter 'body' when calling EnvironmentApi.v1_environment_export"
46
46
  end
47
47
  # resource path
48
48
  local_var_path = '/api/v1/environment/export/'
@@ -71,7 +71,7 @@ module Svix
71
71
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
72
72
 
73
73
  new_options = opts.merge(
74
- :operation => :"EnvironmentApi.export_environment_configuration_api_v1_environment_export_post",
74
+ :operation => :"EnvironmentApi.v1_environment_export",
75
75
  :header_params => header_params,
76
76
  :query_params => query_params,
77
77
  :form_params => form_params,
@@ -82,7 +82,7 @@ module Svix
82
82
 
83
83
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
84
  if @api_client.config.debugging
85
- @api_client.config.logger.debug "API called: EnvironmentApi#export_environment_configuration_api_v1_environment_export_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ @api_client.config.logger.debug "API called: EnvironmentApi#v1_environment_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
86
  end
87
87
  return data, status_code, headers
88
88
  end
@@ -93,8 +93,8 @@ module Svix
93
93
  # @param [Hash] opts the optional parameters
94
94
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
95
95
  # @return [nil]
96
- def import_environment_configuration_api_v1_environment_import_post(environment_in, opts = {})
97
- import_environment_configuration_api_v1_environment_import_post_with_http_info(environment_in, opts)
96
+ def v1_environment_import(environment_in, opts = {})
97
+ v1_environment_import_with_http_info(environment_in, opts)
98
98
  nil
99
99
  end
100
100
 
@@ -104,13 +104,13 @@ module Svix
104
104
  # @param [Hash] opts the optional parameters
105
105
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
106
106
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
107
- def import_environment_configuration_api_v1_environment_import_post_with_http_info(environment_in, opts = {})
107
+ def v1_environment_import_with_http_info(environment_in, opts = {})
108
108
  if @api_client.config.debugging
109
- @api_client.config.logger.debug 'Calling API: EnvironmentApi.import_environment_configuration_api_v1_environment_import_post ...'
109
+ @api_client.config.logger.debug 'Calling API: EnvironmentApi.v1_environment_import ...'
110
110
  end
111
111
  # verify the required parameter 'environment_in' is set
112
112
  if @api_client.config.client_side_validation && environment_in.nil?
113
- fail ArgumentError, "Missing the required parameter 'environment_in' when calling EnvironmentApi.import_environment_configuration_api_v1_environment_import_post"
113
+ fail ArgumentError, "Missing the required parameter 'environment_in' when calling EnvironmentApi.v1_environment_import"
114
114
  end
115
115
  # resource path
116
116
  local_var_path = '/api/v1/environment/import/'
@@ -139,7 +139,7 @@ module Svix
139
139
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
140
140
 
141
141
  new_options = opts.merge(
142
- :operation => :"EnvironmentApi.import_environment_configuration_api_v1_environment_import_post",
142
+ :operation => :"EnvironmentApi.v1_environment_import",
143
143
  :header_params => header_params,
144
144
  :query_params => query_params,
145
145
  :form_params => form_params,
@@ -150,7 +150,7 @@ module Svix
150
150
 
151
151
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
152
  if @api_client.config.debugging
153
- @api_client.config.logger.debug "API called: EnvironmentApi#import_environment_configuration_api_v1_environment_import_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
153
+ @api_client.config.logger.debug "API called: EnvironmentApi#v1_environment_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
154
  end
155
155
  return data, status_code, headers
156
156
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
5
5
 
6
- The version of the OpenAPI document: 1.4
6
+ The version of the OpenAPI document: 1.4.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -22,21 +22,19 @@ module Svix
22
22
  # Get Org Settings
23
23
  # Get the environment's settings
24
24
  # @param [Hash] opts the optional parameters
25
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
26
25
  # @return [EnvironmentSettingsOut]
27
- def get_org_settings_api_v1_environment_settings_get(opts = {})
28
- data, _status_code, _headers = get_org_settings_api_v1_environment_settings_get_with_http_info(opts)
26
+ def v1_environment_get_settings(opts = {})
27
+ data, _status_code, _headers = v1_environment_get_settings_with_http_info(opts)
29
28
  data
30
29
  end
31
30
 
32
31
  # Get Org Settings
33
32
  # Get the environment&#39;s settings
34
33
  # @param [Hash] opts the optional parameters
35
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
36
34
  # @return [Array<(EnvironmentSettingsOut, Integer, Hash)>] EnvironmentSettingsOut data, response status code and response headers
37
- def get_org_settings_api_v1_environment_settings_get_with_http_info(opts = {})
35
+ def v1_environment_get_settings_with_http_info(opts = {})
38
36
  if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: EnvironmentSettingsApi.get_org_settings_api_v1_environment_settings_get ...'
37
+ @api_client.config.logger.debug 'Calling API: EnvironmentSettingsApi.v1_environment_get_settings ...'
40
38
  end
41
39
  # resource path
42
40
  local_var_path = '/api/v1/environment/settings/'
@@ -48,7 +46,6 @@ module Svix
48
46
  header_params = opts[:header_params] || {}
49
47
  # HTTP header 'Accept' (if needed)
50
48
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
52
49
 
53
50
  # form parameters
54
51
  form_params = opts[:form_params] || {}
@@ -63,7 +60,7 @@ module Svix
63
60
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
64
61
 
65
62
  new_options = opts.merge(
66
- :operation => :"EnvironmentSettingsApi.get_org_settings_api_v1_environment_settings_get",
63
+ :operation => :"EnvironmentSettingsApi.v1_environment_get_settings",
67
64
  :header_params => header_params,
68
65
  :query_params => query_params,
69
66
  :form_params => form_params,
@@ -74,7 +71,7 @@ module Svix
74
71
 
75
72
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
76
73
  if @api_client.config.debugging
77
- @api_client.config.logger.debug "API called: EnvironmentSettingsApi#get_org_settings_api_v1_environment_settings_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ @api_client.config.logger.debug "API called: EnvironmentSettingsApi#v1_environment_get_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
75
  end
79
76
  return data, status_code, headers
80
77
  end