svix 0.43.2 → 0.44.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4d5477a7c45e7ce760b3ecbaf129104fd87ab3499cefd3b0734b503c6bfce50
4
- data.tar.gz: f76c1ae5de0348c89abb51bbe27ea28cd57eb0955ee00f523c386591e75becee
3
+ metadata.gz: ad220418b20ebcf88529ae1a4036018679ee31b08c3715242b7240a7a69aed04
4
+ data.tar.gz: 1ebd10e65a0780d47f9727a519b74b5d13a2565fcfe09f15a8f382e19dfd4177
5
5
  SHA512:
6
- metadata.gz: 1cebae06fcaa4d2100c43676cf5be855e8885182eb2182be4dc91dd33022ae3b4a569cd395879c29963123310ec5ee4940fdfa1c9d460ba9100ca19b797ecd78
7
- data.tar.gz: 2155b0f51d24baaecf980f040262800b0e58ccb9e79dab40176d787ca2f54ba4c5273cfe5ceda3bc1d7a79f51f9841d8cb2123dadcfebf41cffa74a9692ac07f
6
+ metadata.gz: 34361fb676b9e62e795f601a93fd557dddd68339fe8b19a68199ce935f9901752c1192b88e9ec6e07eeb0a9978fedf156fd82b71fb440ff843631fadd08ceb7b
7
+ data.tar.gz: 3a1aaa10ba50db71e7cdf7e154c7fabe9cc8e83c1605ec59a580660876f218cddd3ef9046c56b5930c0351641b44284a9d94221cc3045092bf7aa55fb89a474f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (0.43.2)
4
+ svix (0.44.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -23,6 +23,7 @@ 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)
26
27
  # @return [ApplicationOut]
27
28
  def create_application_api_v1_app_post(application_in, opts = {})
28
29
  data, _status_code, _headers = create_application_api_v1_app_post_with_http_info(application_in, opts)
@@ -33,6 +34,7 @@ module Svix
33
34
  # Create a new application.
34
35
  # @param application_in [ApplicationIn]
35
36
  # @param [Hash] opts the optional parameters
37
+ # @option opts [Boolean] :get_if_exists
36
38
  # @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
37
39
  def create_application_api_v1_app_post_with_http_info(application_in, opts = {})
38
40
  if @api_client.config.debugging
@@ -47,6 +49,7 @@ module Svix
47
49
 
48
50
  # query parameters
49
51
  query_params = opts[:query_params] || {}
52
+ query_params[:'get_if_exists'] = opts[:'get_if_exists'] if !opts[:'get_if_exists'].nil?
50
53
 
51
54
  # header parameters
52
55
  header_params = opts[:header_params] || {}
@@ -0,0 +1,152 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
5
+
6
+ The version of the OpenAPI document: 1.4
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Svix
16
+ class EnvironmentApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Export Environment Configuration
23
+ # Download a JSON file containing all org-settings and event types
24
+ # @param body [Object]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [EnvironmentOut]
27
+ def export_environment_configuration_api_v1_environment_export_post(body, opts = {})
28
+ data, _status_code, _headers = export_environment_configuration_api_v1_environment_export_post_with_http_info(body, opts)
29
+ data
30
+ end
31
+
32
+ # Export Environment Configuration
33
+ # Download a JSON file containing all org-settings and event types
34
+ # @param body [Object]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(EnvironmentOut, Integer, Hash)>] EnvironmentOut data, response status code and response headers
37
+ def export_environment_configuration_api_v1_environment_export_post_with_http_info(body, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: EnvironmentApi.export_environment_configuration_api_v1_environment_export_post ...'
40
+ end
41
+ # verify the required parameter 'body' is set
42
+ if @api_client.config.client_side_validation && body.nil?
43
+ fail ArgumentError, "Missing the required parameter 'body' when calling EnvironmentApi.export_environment_configuration_api_v1_environment_export_post"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/v1/environment/export/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
63
+
64
+ # return_type
65
+ return_type = opts[:debug_return_type] || 'EnvironmentOut'
66
+
67
+ # auth_names
68
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
69
+
70
+ new_options = opts.merge(
71
+ :operation => :"EnvironmentApi.export_environment_configuration_api_v1_environment_export_post",
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names,
77
+ :return_type => return_type
78
+ )
79
+
80
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
81
+ if @api_client.config.debugging
82
+ @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}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+
87
+ # Import Environment Configuration
88
+ # Import a configuration into the active organization. It doesn't delete anything, only adds/updates what was passed to it.
89
+ # @param environment_in [EnvironmentIn]
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [nil]
92
+ def import_environment_configuration_api_v1_environment_import_post(environment_in, opts = {})
93
+ import_environment_configuration_api_v1_environment_import_post_with_http_info(environment_in, opts)
94
+ nil
95
+ end
96
+
97
+ # Import Environment Configuration
98
+ # Import a configuration into the active organization. It doesn&#39;t delete anything, only adds/updates what was passed to it.
99
+ # @param environment_in [EnvironmentIn]
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
102
+ def import_environment_configuration_api_v1_environment_import_post_with_http_info(environment_in, opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug 'Calling API: EnvironmentApi.import_environment_configuration_api_v1_environment_import_post ...'
105
+ end
106
+ # verify the required parameter 'environment_in' is set
107
+ if @api_client.config.client_side_validation && environment_in.nil?
108
+ fail ArgumentError, "Missing the required parameter 'environment_in' when calling EnvironmentApi.import_environment_configuration_api_v1_environment_import_post"
109
+ end
110
+ # resource path
111
+ local_var_path = '/api/v1/environment/import/'
112
+
113
+ # query parameters
114
+ query_params = opts[:query_params] || {}
115
+
116
+ # header parameters
117
+ header_params = opts[:header_params] || {}
118
+ # HTTP header 'Accept' (if needed)
119
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
120
+ # HTTP header 'Content-Type'
121
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
122
+
123
+ # form parameters
124
+ form_params = opts[:form_params] || {}
125
+
126
+ # http body (model)
127
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(environment_in)
128
+
129
+ # return_type
130
+ return_type = opts[:debug_return_type]
131
+
132
+ # auth_names
133
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
134
+
135
+ new_options = opts.merge(
136
+ :operation => :"EnvironmentApi.import_environment_configuration_api_v1_environment_import_post",
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => return_type
143
+ )
144
+
145
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
146
+ if @api_client.config.debugging
147
+ @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}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+ end
152
+ end
@@ -0,0 +1,79 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
5
+
6
+ The version of the OpenAPI document: 1.4
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Svix
16
+ class EnvironmentSettingsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get Org Settings
23
+ # Get the environment's settings
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [EnvironmentSettingsOut]
26
+ def get_org_settings_api_v1_environment_settings_get(opts = {})
27
+ data, _status_code, _headers = get_org_settings_api_v1_environment_settings_get_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Get Org Settings
32
+ # Get the environment&#39;s settings
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(EnvironmentSettingsOut, Integer, Hash)>] EnvironmentSettingsOut data, response status code and response headers
35
+ def get_org_settings_api_v1_environment_settings_get_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: EnvironmentSettingsApi.get_org_settings_api_v1_environment_settings_get ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/api/v1/environment/settings/'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'EnvironmentSettingsOut'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"EnvironmentSettingsApi.get_org_settings_api_v1_environment_settings_get",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @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}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+ end
79
+ end