svix 0.64.2 → 0.66.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,37 @@
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 'date'
14
+ require 'time'
15
+
16
+ module Svix
17
+ class TransformationHttpMethod
18
+ PUT = "PUT".freeze
19
+ POST = "POST".freeze
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ constantValues = TransformationHttpMethod.constants.select { |c| TransformationHttpMethod::const_get(c) == value }
33
+ raise "Invalid ENUM value #{value} for class #TransformationHttpMethod" if constantValues.empty?
34
+ value
35
+ end
36
+ end
37
+ end
data/lib/svix/svix.rb CHANGED
@@ -5,7 +5,7 @@ module Svix
5
5
  attr_accessor :debug
6
6
  attr_accessor :server_url
7
7
 
8
- def initialize(debug = false, server_url = "https://api.svix.com")
8
+ def initialize(debug = false, server_url = nil)
9
9
  @debug=debug
10
10
  @server_url=server_url
11
11
  end
@@ -22,7 +22,6 @@ module Svix
22
22
 
23
23
  def initialize(auth_token, options = SvixOptions.new)
24
24
 
25
- regional_url = nil
26
25
  region = auth_token.split(".").last
27
26
  if region == "us"
28
27
  regional_url = "https://api.us.svix.com"
@@ -30,6 +29,8 @@ module Svix
30
29
  regional_url = "https://api.eu.svix.com"
31
30
  elsif region == "in"
32
31
  regional_url = "https://api.in.svix.com"
32
+ else
33
+ regional_url = "https://api.svix.com"
33
34
  end
34
35
 
35
36
  uri = URI(options.server_url || regional_url)
data/lib/svix/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- VERSION = "0.64.2"
4
+ VERSION = "0.66.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.64.2
4
+ version: 0.66.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-28 00:00:00.000000000 Z
11
+ date: 2022-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -131,6 +131,10 @@ files:
131
131
  - lib/svix/models/endpoint_secret_out.rb
132
132
  - lib/svix/models/endpoint_secret_rotate_in.rb
133
133
  - lib/svix/models/endpoint_stats.rb
134
+ - lib/svix/models/endpoint_transformation_in.rb
135
+ - lib/svix/models/endpoint_transformation_out.rb
136
+ - lib/svix/models/endpoint_transformation_simulate_in.rb
137
+ - lib/svix/models/endpoint_transformation_simulate_out.rb
134
138
  - lib/svix/models/endpoint_update.rb
135
139
  - lib/svix/models/endpoint_updated_event.rb
136
140
  - lib/svix/models/endpoint_updated_event_data.rb
@@ -177,6 +181,7 @@ files:
177
181
  - lib/svix/models/settings_out.rb
178
182
  - lib/svix/models/statistics_period.rb
179
183
  - lib/svix/models/status_code_class.rb
184
+ - lib/svix/models/transformation_http_method.rb
180
185
  - lib/svix/models/validation_error.rb
181
186
  - lib/svix/models/webhook_types.rb
182
187
  - lib/svix/svix.rb