svix 2.9.1 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/svix/api/endpoint.rb +48 -0
- data/lib/svix/api/endpoint_mcp_events.rb +38 -0
- data/lib/svix/api/event_type.rb +1 -0
- data/lib/svix/api/message.rb +13 -0
- data/lib/svix/api/streaming_event_type.rb +2 -1
- data/lib/svix/models/archive_status.rb +30 -0
- data/lib/svix/models/ascend_config.rb +46 -0
- data/lib/svix/models/ascend_config_out.rb +43 -0
- data/lib/svix/models/batch_create_messages_in.rb +49 -0
- data/lib/svix/models/batch_message_in.rb +113 -0
- data/lib/svix/models/bitbucket_config.rb +46 -0
- data/lib/svix/models/bitbucket_config_out.rb +43 -0
- data/lib/svix/models/client_secret_jwt_params_in.rb +66 -0
- data/lib/svix/models/destination_in.rb +11 -1
- data/lib/svix/models/destination_out.rb +11 -1
- data/lib/svix/models/destination_patch.rb +11 -1
- data/lib/svix/models/elastic_search_config_in.rb +7 -1
- data/lib/svix/models/elastic_search_config_out.rb +4 -1
- data/lib/svix/models/elastic_search_config_patch.rb +4 -1
- data/lib/svix/models/elastic_search_operation.rb +33 -0
- data/lib/svix/models/endpoint_challenge_mode.rb +36 -0
- data/lib/svix/models/endpoint_mtls_config_in.rb +47 -0
- data/lib/svix/models/endpoint_mtls_config_out.rb +46 -0
- data/lib/svix/models/endpoint_mtls_out.rb +49 -0
- data/lib/svix/models/endpoint_oauth_config_in.rb +102 -0
- data/lib/svix/models/endpoint_oauth_config_out.rb +67 -0
- data/lib/svix/models/endpoint_oauth_out.rb +49 -0
- data/lib/svix/models/endpoint_out.rb +8 -1
- data/lib/svix/models/event_type_in.rb +17 -1
- data/lib/svix/models/event_type_out.rb +8 -0
- data/lib/svix/models/event_type_patch.rb +16 -1
- data/lib/svix/models/event_type_upsert_in.rb +16 -1
- data/lib/svix/models/generic_webhook_config.rb +46 -0
- data/lib/svix/models/generic_webhook_config_out.rb +49 -0
- data/lib/svix/models/generic_webhook_response.rb +52 -0
- data/lib/svix/models/ingest_source_in.rb +20 -0
- data/lib/svix/models/ingest_source_out.rb +20 -0
- data/lib/svix/models/mcp_events_delivery_mode.rb +28 -0
- data/lib/svix/models/mcp_events_subscribe_delivery_in.rb +59 -0
- data/lib/svix/models/mcp_events_subscribe_in.rb +100 -0
- data/lib/svix/models/mcp_events_subscribe_out.rb +66 -0
- data/lib/svix/models/mcp_events_unsubscribe_delivery_in.rb +54 -0
- data/lib/svix/models/mcp_events_unsubscribe_in.rb +59 -0
- data/lib/svix/models/message_endpoint_out.rb +8 -1
- data/lib/svix/models/message_in.rb +2 -0
- data/lib/svix/models/oauth2_auth_method_in_out.rb +42 -0
- data/lib/svix/models/oauth2_grant_type_in_out.rb +29 -0
- data/lib/svix/models/oauth_jws_signing_algorithm.rb +28 -0
- data/lib/svix/models/post_hog_config_in.rb +58 -0
- data/lib/svix/models/post_hog_config_out.rb +46 -0
- data/lib/svix/models/post_hog_config_patch.rb +49 -0
- data/lib/svix/models/segment_sink_config_in.rb +59 -0
- data/lib/svix/models/segment_sink_config_out.rb +46 -0
- data/lib/svix/models/segment_sink_config_patch.rb +52 -0
- data/lib/svix/models/stream_sink_in.rb +11 -1
- data/lib/svix/models/stream_sink_out.rb +11 -1
- data/lib/svix/models/stream_sink_patch.rb +11 -1
- data/lib/svix/models/tricentis_qtest_config.rb +46 -0
- data/lib/svix/models/tricentis_qtest_config_out.rb +46 -0
- data/lib/svix/svix_http_client.rb +1 -1
- data/lib/svix/util.rb +1 -1
- data/lib/svix/version.rb +1 -1
- data/lib/svix/webhook.rb +30 -10
- data/lib/svix.rb +37 -0
- metadata +39 -2
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class McpEventsUnsubscribeDeliveryIn
|
|
7
|
+
# How events are delivered. Only `webhook` is supported.
|
|
8
|
+
attr_accessor :mode
|
|
9
|
+
# The callback URL the subscription was made with.
|
|
10
|
+
attr_accessor :url
|
|
11
|
+
|
|
12
|
+
ALL_FIELD ||= ["mode", "url"].freeze
|
|
13
|
+
private_constant :ALL_FIELD
|
|
14
|
+
|
|
15
|
+
def initialize(attributes = {})
|
|
16
|
+
unless attributes.is_a?(Hash)
|
|
17
|
+
fail(
|
|
18
|
+
ArgumentError,
|
|
19
|
+
"The input argument (attributes) must be a hash in `Svix::McpEventsUnsubscribeDeliveryIn` new method"
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
attributes.each do |k, v|
|
|
24
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
25
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::McpEventsUnsubscribeDeliveryIn")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
instance_variable_set("@#{k}", v)
|
|
29
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.deserialize(attributes = {})
|
|
34
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
35
|
+
attrs = Hash.new
|
|
36
|
+
attrs["mode"] = Svix::McpEventsDeliveryMode.deserialize(attributes["mode"])
|
|
37
|
+
attrs["url"] = attributes["url"]
|
|
38
|
+
new(attrs)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def serialize
|
|
42
|
+
out = Hash.new
|
|
43
|
+
out["mode"] = Svix::serialize_schema_ref(@mode) unless @mode.nil?
|
|
44
|
+
out["url"] = Svix::serialize_primitive(@url) unless @url.nil?
|
|
45
|
+
out
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Serializes the object to a json string
|
|
49
|
+
# @return String
|
|
50
|
+
def to_json(*args)
|
|
51
|
+
serialize.to_json(*args)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class McpEventsUnsubscribeIn
|
|
7
|
+
# The event the subscription was made for.
|
|
8
|
+
attr_accessor :name
|
|
9
|
+
# The filter arguments the subscription was made with, as given to
|
|
10
|
+
# `events/subscribe`. See [Stop a subscription](https://developers.openai.com/plugins/build/mcp-events#stop-a-subscription)
|
|
11
|
+
# in OpenAI's MCP Events docs.
|
|
12
|
+
attr_accessor :arguments
|
|
13
|
+
attr_accessor :delivery
|
|
14
|
+
|
|
15
|
+
ALL_FIELD ||= ["name", "arguments", "delivery"].freeze
|
|
16
|
+
private_constant :ALL_FIELD
|
|
17
|
+
|
|
18
|
+
def initialize(attributes = {})
|
|
19
|
+
unless attributes.is_a?(Hash)
|
|
20
|
+
fail(
|
|
21
|
+
ArgumentError,
|
|
22
|
+
"The input argument (attributes) must be a hash in `Svix::McpEventsUnsubscribeIn` new method"
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
attributes.each do |k, v|
|
|
27
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
28
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::McpEventsUnsubscribeIn")
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
instance_variable_set("@#{k}", v)
|
|
32
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.deserialize(attributes = {})
|
|
37
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
38
|
+
attrs = Hash.new
|
|
39
|
+
attrs["name"] = attributes["name"]
|
|
40
|
+
attrs["arguments"] = attributes["arguments"]
|
|
41
|
+
attrs["delivery"] = Svix::McpEventsUnsubscribeDeliveryIn.deserialize(attributes["delivery"])
|
|
42
|
+
new(attrs)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def serialize
|
|
46
|
+
out = Hash.new
|
|
47
|
+
out["name"] = Svix::serialize_primitive(@name) unless @name.nil?
|
|
48
|
+
out["arguments"] = Svix::serialize_primitive(@arguments) unless @arguments.nil?
|
|
49
|
+
out["delivery"] = Svix::serialize_schema_ref(@delivery) unless @delivery.nil?
|
|
50
|
+
out
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Serializes the object to a json string
|
|
54
|
+
# @return String
|
|
55
|
+
def to_json(*args)
|
|
56
|
+
serialize.to_json(*args)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -23,6 +23,10 @@ module Svix
|
|
|
23
23
|
attr_accessor :channels
|
|
24
24
|
attr_accessor :created_at
|
|
25
25
|
attr_accessor :updated_at
|
|
26
|
+
# When the endpoint expires, if ever.
|
|
27
|
+
#
|
|
28
|
+
# No messages are sent to the endpoint after this time.
|
|
29
|
+
attr_accessor :expiry
|
|
26
30
|
|
|
27
31
|
ALL_FIELD ||= [
|
|
28
32
|
"id",
|
|
@@ -37,7 +41,8 @@ module Svix
|
|
|
37
41
|
"event_types",
|
|
38
42
|
"channels",
|
|
39
43
|
"created_at",
|
|
40
|
-
"updated_at"
|
|
44
|
+
"updated_at",
|
|
45
|
+
"expiry"
|
|
41
46
|
].freeze
|
|
42
47
|
private_constant :ALL_FIELD
|
|
43
48
|
|
|
@@ -72,6 +77,7 @@ module Svix
|
|
|
72
77
|
attrs["channels"] = attributes["channels"]
|
|
73
78
|
attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
|
|
74
79
|
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
80
|
+
attrs["expiry"] = DateTime.rfc3339(attributes["expiry"]).to_time if attributes["expiry"]
|
|
75
81
|
new(attrs)
|
|
76
82
|
end
|
|
77
83
|
|
|
@@ -90,6 +96,7 @@ module Svix
|
|
|
90
96
|
out["channels"] = Svix::serialize_primitive(@channels) unless @channels.nil?
|
|
91
97
|
out["createdAt"] = Svix::serialize_primitive(@created_at) unless @created_at.nil?
|
|
92
98
|
out["updatedAt"] = Svix::serialize_primitive(@updated_at) unless @updated_at.nil?
|
|
99
|
+
out["expiry"] = Svix::serialize_primitive(@expiry) unless @expiry.nil?
|
|
93
100
|
out
|
|
94
101
|
end
|
|
95
102
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
module Svix
|
|
4
|
+
# The method used for authenticating to the OAuth authorization server.
|
|
5
|
+
#
|
|
6
|
+
# `clientSecretJwt` will construct a JWT used for authentication
|
|
7
|
+
# with the oauth authorization server. This method is less
|
|
8
|
+
# commonly used and may not be supported by all oauth providers.
|
|
9
|
+
# `clientSecretBasic` will authenticate to the oauth authorization server
|
|
10
|
+
# using an `Authorization` header with the client secret as the value.
|
|
11
|
+
# This is the most common means of authentication.
|
|
12
|
+
# `clientSecretPost` will authenticate to the oauth authorization server
|
|
13
|
+
# by passing the client secret in a `client_secret` field in the
|
|
14
|
+
# request body. This method may not be supported by all oauth providers,
|
|
15
|
+
# and in general `clientSecretBasic` should be preferred.
|
|
16
|
+
class Oauth2AuthMethodInOut
|
|
17
|
+
CLIENT_SECRET_JWT = "clientSecretJwt".freeze
|
|
18
|
+
CLIENT_SECRET_BASIC = "clientSecretBasic".freeze
|
|
19
|
+
CLIENT_SECRET_POST = "clientSecretPost".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [CLIENT_SECRET_JWT, CLIENT_SECRET_BASIC, CLIENT_SECRET_POST].freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def initialize(value)
|
|
26
|
+
unless Oauth2AuthMethodInOut.all_vars.include?(value)
|
|
27
|
+
raise "Invalid ENUM value '#{value}' for class #Oauth2AuthMethodInOut"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
@value = value
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.deserialize(value)
|
|
34
|
+
return value if Oauth2AuthMethodInOut.all_vars.include?(value)
|
|
35
|
+
raise "Invalid ENUM value '#{value}' for class #Oauth2AuthMethodInOut"
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def serialize
|
|
39
|
+
@value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
module Svix
|
|
4
|
+
class Oauth2GrantTypeInOut
|
|
5
|
+
CLIENT_CREDENTIALS = "clientCredentials".freeze
|
|
6
|
+
REFRESH_TOKEN = "refreshToken".freeze
|
|
7
|
+
|
|
8
|
+
def self.all_vars
|
|
9
|
+
@all_vars ||= [CLIENT_CREDENTIALS, REFRESH_TOKEN].freeze
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def initialize(value)
|
|
13
|
+
unless Oauth2GrantTypeInOut.all_vars.include?(value)
|
|
14
|
+
raise "Invalid ENUM value '#{value}' for class #Oauth2GrantTypeInOut"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
@value = value
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.deserialize(value)
|
|
21
|
+
return value if Oauth2GrantTypeInOut.all_vars.include?(value)
|
|
22
|
+
raise "Invalid ENUM value '#{value}' for class #Oauth2GrantTypeInOut"
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def serialize
|
|
26
|
+
@value
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
module Svix
|
|
4
|
+
class OauthJwsSigningAlgorithm
|
|
5
|
+
RS256 = "RS256".freeze
|
|
6
|
+
|
|
7
|
+
def self.all_vars
|
|
8
|
+
@all_vars ||= [RS256].freeze
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def initialize(value)
|
|
12
|
+
unless OauthJwsSigningAlgorithm.all_vars.include?(value)
|
|
13
|
+
raise "Invalid ENUM value '#{value}' for class #OauthJwsSigningAlgorithm"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
@value = value
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def self.deserialize(value)
|
|
20
|
+
return value if OauthJwsSigningAlgorithm.all_vars.include?(value)
|
|
21
|
+
raise "Invalid ENUM value '#{value}' for class #OauthJwsSigningAlgorithm"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def serialize
|
|
25
|
+
@value
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
# Configuration parameters for defining a PostHog sink.
|
|
7
|
+
class PostHogConfigIn
|
|
8
|
+
# The PostHog ingestion domain.
|
|
9
|
+
#
|
|
10
|
+
# This is https://us.i.posthog.com for US Cloud, https://eu.i.posthog.com for EU Cloud,
|
|
11
|
+
# and your self-hosted domain for self-hosted instances. Note the `.i.` in the Cloud hosts
|
|
12
|
+
# (`us.posthog.com` and `eu.posthog.com` are different, private endpoints).
|
|
13
|
+
attr_accessor :domain
|
|
14
|
+
# The PostHog project API key.
|
|
15
|
+
#
|
|
16
|
+
# Sent as the `api_key` field in the body of each `/batch/` request.
|
|
17
|
+
attr_accessor :project_token
|
|
18
|
+
|
|
19
|
+
ALL_FIELD ||= ["domain", "project_token"].freeze
|
|
20
|
+
private_constant :ALL_FIELD
|
|
21
|
+
|
|
22
|
+
def initialize(attributes = {})
|
|
23
|
+
unless attributes.is_a?(Hash)
|
|
24
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::PostHogConfigIn` new method")
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
attributes.each do |k, v|
|
|
28
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
29
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::PostHogConfigIn")
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
instance_variable_set("@#{k}", v)
|
|
33
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def self.deserialize(attributes = {})
|
|
38
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
39
|
+
attrs = Hash.new
|
|
40
|
+
attrs["domain"] = attributes["domain"]
|
|
41
|
+
attrs["project_token"] = attributes["projectToken"]
|
|
42
|
+
new(attrs)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def serialize
|
|
46
|
+
out = Hash.new
|
|
47
|
+
out["domain"] = Svix::serialize_primitive(@domain) unless @domain.nil?
|
|
48
|
+
out["projectToken"] = Svix::serialize_primitive(@project_token) unless @project_token.nil?
|
|
49
|
+
out
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Serializes the object to a json string
|
|
53
|
+
# @return String
|
|
54
|
+
def to_json(*args)
|
|
55
|
+
serialize.to_json(*args)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class PostHogConfigOut
|
|
7
|
+
attr_accessor :domain
|
|
8
|
+
|
|
9
|
+
ALL_FIELD ||= ["domain"].freeze
|
|
10
|
+
private_constant :ALL_FIELD
|
|
11
|
+
|
|
12
|
+
def initialize(attributes = {})
|
|
13
|
+
unless attributes.is_a?(Hash)
|
|
14
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::PostHogConfigOut` new method")
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
attributes.each do |k, v|
|
|
18
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
19
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::PostHogConfigOut")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
instance_variable_set("@#{k}", v)
|
|
23
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.deserialize(attributes = {})
|
|
28
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
29
|
+
attrs = Hash.new
|
|
30
|
+
attrs["domain"] = attributes["domain"]
|
|
31
|
+
new(attrs)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def serialize
|
|
35
|
+
out = Hash.new
|
|
36
|
+
out["domain"] = Svix::serialize_primitive(@domain) unless @domain.nil?
|
|
37
|
+
out
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Serializes the object to a json string
|
|
41
|
+
# @return String
|
|
42
|
+
def to_json(*args)
|
|
43
|
+
serialize.to_json(*args)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class PostHogConfigPatch
|
|
7
|
+
attr_accessor :domain
|
|
8
|
+
attr_accessor :project_token
|
|
9
|
+
|
|
10
|
+
ALL_FIELD ||= ["domain", "project_token"].freeze
|
|
11
|
+
private_constant :ALL_FIELD
|
|
12
|
+
|
|
13
|
+
def initialize(attributes = {})
|
|
14
|
+
unless attributes.is_a?(Hash)
|
|
15
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::PostHogConfigPatch` new method")
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
attributes.each do |k, v|
|
|
19
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
20
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::PostHogConfigPatch")
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
instance_variable_set("@#{k}", v)
|
|
24
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.deserialize(attributes = {})
|
|
29
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
30
|
+
attrs = Hash.new
|
|
31
|
+
attrs["domain"] = attributes["domain"]
|
|
32
|
+
attrs["project_token"] = attributes["projectToken"]
|
|
33
|
+
new(attrs)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def serialize
|
|
37
|
+
out = Hash.new
|
|
38
|
+
out["domain"] = Svix::serialize_primitive(@domain) unless @domain.nil?
|
|
39
|
+
out["projectToken"] = Svix::serialize_primitive(@project_token) unless @project_token.nil?
|
|
40
|
+
out
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Serializes the object to a json string
|
|
44
|
+
# @return String
|
|
45
|
+
def to_json(*args)
|
|
46
|
+
serialize.to_json(*args)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
# Configuration parameters for defining a Segment sink.
|
|
7
|
+
class SegmentSinkConfigIn
|
|
8
|
+
# The Segment ingestion host.
|
|
9
|
+
#
|
|
10
|
+
# This is https://api.segment.io for US workspaces, https://events.eu1.segmentapis.com
|
|
11
|
+
# for EU workspaces, or your custom domain. Events are sent to the `/v1/batch` endpoint
|
|
12
|
+
# under this host.
|
|
13
|
+
attr_accessor :host
|
|
14
|
+
# The Segment source write key.
|
|
15
|
+
#
|
|
16
|
+
# Sent as HTTP Basic auth (the write key as the username, with an empty password) on each
|
|
17
|
+
# `/v1/batch` request.
|
|
18
|
+
attr_accessor :write_key
|
|
19
|
+
|
|
20
|
+
ALL_FIELD ||= ["host", "write_key"].freeze
|
|
21
|
+
private_constant :ALL_FIELD
|
|
22
|
+
|
|
23
|
+
def initialize(attributes = {})
|
|
24
|
+
unless attributes.is_a?(Hash)
|
|
25
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::SegmentSinkConfigIn` new method")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
attributes.each do |k, v|
|
|
29
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
30
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::SegmentSinkConfigIn")
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
instance_variable_set("@#{k}", v)
|
|
34
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.deserialize(attributes = {})
|
|
39
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
40
|
+
attrs = Hash.new
|
|
41
|
+
attrs["host"] = attributes["host"]
|
|
42
|
+
attrs["write_key"] = attributes["writeKey"]
|
|
43
|
+
new(attrs)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def serialize
|
|
47
|
+
out = Hash.new
|
|
48
|
+
out["host"] = Svix::serialize_primitive(@host) unless @host.nil?
|
|
49
|
+
out["writeKey"] = Svix::serialize_primitive(@write_key) unless @write_key.nil?
|
|
50
|
+
out
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Serializes the object to a json string
|
|
54
|
+
# @return String
|
|
55
|
+
def to_json(*args)
|
|
56
|
+
serialize.to_json(*args)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class SegmentSinkConfigOut
|
|
7
|
+
attr_accessor :host
|
|
8
|
+
|
|
9
|
+
ALL_FIELD ||= ["host"].freeze
|
|
10
|
+
private_constant :ALL_FIELD
|
|
11
|
+
|
|
12
|
+
def initialize(attributes = {})
|
|
13
|
+
unless attributes.is_a?(Hash)
|
|
14
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::SegmentSinkConfigOut` new method")
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
attributes.each do |k, v|
|
|
18
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
19
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::SegmentSinkConfigOut")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
instance_variable_set("@#{k}", v)
|
|
23
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.deserialize(attributes = {})
|
|
28
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
29
|
+
attrs = Hash.new
|
|
30
|
+
attrs["host"] = attributes["host"]
|
|
31
|
+
new(attrs)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def serialize
|
|
35
|
+
out = Hash.new
|
|
36
|
+
out["host"] = Svix::serialize_primitive(@host) unless @host.nil?
|
|
37
|
+
out
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Serializes the object to a json string
|
|
41
|
+
# @return String
|
|
42
|
+
def to_json(*args)
|
|
43
|
+
serialize.to_json(*args)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class SegmentSinkConfigPatch
|
|
7
|
+
attr_accessor :host
|
|
8
|
+
attr_accessor :write_key
|
|
9
|
+
|
|
10
|
+
ALL_FIELD ||= ["host", "write_key"].freeze
|
|
11
|
+
private_constant :ALL_FIELD
|
|
12
|
+
|
|
13
|
+
def initialize(attributes = {})
|
|
14
|
+
unless attributes.is_a?(Hash)
|
|
15
|
+
fail(
|
|
16
|
+
ArgumentError,
|
|
17
|
+
"The input argument (attributes) must be a hash in `Svix::SegmentSinkConfigPatch` new method"
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
attributes.each do |k, v|
|
|
22
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
23
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::SegmentSinkConfigPatch")
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
instance_variable_set("@#{k}", v)
|
|
27
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def self.deserialize(attributes = {})
|
|
32
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
33
|
+
attrs = Hash.new
|
|
34
|
+
attrs["host"] = attributes["host"]
|
|
35
|
+
attrs["write_key"] = attributes["writeKey"]
|
|
36
|
+
new(attrs)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def serialize
|
|
40
|
+
out = Hash.new
|
|
41
|
+
out["host"] = Svix::serialize_primitive(@host) unless @host.nil?
|
|
42
|
+
out["writeKey"] = Svix::serialize_primitive(@write_key) unless @write_key.nil?
|
|
43
|
+
out
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Serializes the object to a json string
|
|
47
|
+
# @return String
|
|
48
|
+
def to_json(*args)
|
|
49
|
+
serialize.to_json(*args)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -10,10 +10,12 @@ require_relative "./event_bridge_config_in"
|
|
|
10
10
|
require_relative "./google_cloud_pub_sub_config_in"
|
|
11
11
|
require_relative "./google_cloud_storage_config_in"
|
|
12
12
|
require_relative "./otel_tracing_config_in"
|
|
13
|
+
require_relative "./post_hog_config_in"
|
|
13
14
|
require_relative "./postgres_config_in"
|
|
14
15
|
require_relative "./rabbit_mq_config_in"
|
|
15
16
|
require_relative "./redshift_config_in"
|
|
16
17
|
require_relative "./s3_config_in"
|
|
18
|
+
require_relative "./segment_sink_config_in"
|
|
17
19
|
require_relative "./sink_http_config_in"
|
|
18
20
|
require_relative "./sink_status_in"
|
|
19
21
|
require_relative "./snowflake_config_in"
|
|
@@ -85,6 +87,12 @@ module Svix
|
|
|
85
87
|
|
|
86
88
|
class ElasticSearch < ElasticSearchConfigIn
|
|
87
89
|
end
|
|
90
|
+
|
|
91
|
+
class PostHog < PostHogConfigIn
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
class Segment < SegmentSinkConfigIn
|
|
95
|
+
end
|
|
88
96
|
end
|
|
89
97
|
|
|
90
98
|
class StreamSinkIn
|
|
@@ -131,7 +139,9 @@ module Svix
|
|
|
131
139
|
StreamSinkInConfig::RabbitMq => "rabbitMq",
|
|
132
140
|
StreamSinkInConfig::Redshift => "redshift",
|
|
133
141
|
StreamSinkInConfig::Postgres => "postgres",
|
|
134
|
-
StreamSinkInConfig::ElasticSearch => "elasticSearch"
|
|
142
|
+
StreamSinkInConfig::ElasticSearch => "elasticSearch",
|
|
143
|
+
StreamSinkInConfig::PostHog => "postHog",
|
|
144
|
+
StreamSinkInConfig::Segment => "segment"
|
|
135
145
|
}
|
|
136
146
|
private_constant :TYPE_TO_NAME
|
|
137
147
|
NAME_TO_TYPE = TYPE_TO_NAME.invert
|
|
@@ -10,10 +10,12 @@ require_relative "./event_bridge_config_out"
|
|
|
10
10
|
require_relative "./google_cloud_pub_sub_config_out"
|
|
11
11
|
require_relative "./google_cloud_storage_config_out"
|
|
12
12
|
require_relative "./otel_tracing_config_out"
|
|
13
|
+
require_relative "./post_hog_config_out"
|
|
13
14
|
require_relative "./postgres_config_out"
|
|
14
15
|
require_relative "./rabbit_mq_config_out"
|
|
15
16
|
require_relative "./redshift_config_out"
|
|
16
17
|
require_relative "./s3_config_out"
|
|
18
|
+
require_relative "./segment_sink_config_out"
|
|
17
19
|
require_relative "./sink_http_config_out"
|
|
18
20
|
require_relative "./sink_status"
|
|
19
21
|
require_relative "./snowflake_config_out"
|
|
@@ -101,6 +103,12 @@ module Svix
|
|
|
101
103
|
|
|
102
104
|
class ElasticSearch < ElasticSearchConfigOut
|
|
103
105
|
end
|
|
106
|
+
|
|
107
|
+
class PostHog < PostHogConfigOut
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
class Segment < SegmentSinkConfigOut
|
|
111
|
+
end
|
|
104
112
|
end
|
|
105
113
|
|
|
106
114
|
class StreamSinkOut
|
|
@@ -156,7 +164,9 @@ module Svix
|
|
|
156
164
|
StreamSinkOutConfig::EventBridge => "eventBridge",
|
|
157
165
|
StreamSinkOutConfig::Sns => "sns",
|
|
158
166
|
StreamSinkOutConfig::Postgres => "postgres",
|
|
159
|
-
StreamSinkOutConfig::ElasticSearch => "elasticSearch"
|
|
167
|
+
StreamSinkOutConfig::ElasticSearch => "elasticSearch",
|
|
168
|
+
StreamSinkOutConfig::PostHog => "postHog",
|
|
169
|
+
StreamSinkOutConfig::Segment => "segment"
|
|
160
170
|
}
|
|
161
171
|
private_constant :TYPE_TO_NAME
|
|
162
172
|
NAME_TO_TYPE = TYPE_TO_NAME.invert
|
|
@@ -10,10 +10,12 @@ require_relative "./event_bridge_config_patch"
|
|
|
10
10
|
require_relative "./google_cloud_pub_sub_config_patch"
|
|
11
11
|
require_relative "./google_cloud_storage_config_patch"
|
|
12
12
|
require_relative "./otel_tracing_config_patch"
|
|
13
|
+
require_relative "./post_hog_config_patch"
|
|
13
14
|
require_relative "./postgres_config_patch"
|
|
14
15
|
require_relative "./rabbit_mq_config_patch"
|
|
15
16
|
require_relative "./redshift_config_patch"
|
|
16
17
|
require_relative "./s3_config_patch"
|
|
18
|
+
require_relative "./segment_sink_config_patch"
|
|
17
19
|
require_relative "./sink_http_config_patch"
|
|
18
20
|
require_relative "./sink_status_in"
|
|
19
21
|
require_relative "./snowflake_config_patch"
|
|
@@ -85,6 +87,12 @@ module Svix
|
|
|
85
87
|
|
|
86
88
|
class ElasticSearch < ElasticSearchConfigPatch
|
|
87
89
|
end
|
|
90
|
+
|
|
91
|
+
class PostHog < PostHogConfigPatch
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
class Segment < SegmentSinkConfigPatch
|
|
95
|
+
end
|
|
88
96
|
end
|
|
89
97
|
|
|
90
98
|
class StreamSinkPatch
|
|
@@ -117,7 +125,9 @@ module Svix
|
|
|
117
125
|
StreamSinkPatchConfig::RabbitMq => "rabbitMq",
|
|
118
126
|
StreamSinkPatchConfig::Redshift => "redshift",
|
|
119
127
|
StreamSinkPatchConfig::Postgres => "postgres",
|
|
120
|
-
StreamSinkPatchConfig::ElasticSearch => "elasticSearch"
|
|
128
|
+
StreamSinkPatchConfig::ElasticSearch => "elasticSearch",
|
|
129
|
+
StreamSinkPatchConfig::PostHog => "postHog",
|
|
130
|
+
StreamSinkPatchConfig::Segment => "segment"
|
|
121
131
|
}
|
|
122
132
|
private_constant :TYPE_TO_NAME
|
|
123
133
|
NAME_TO_TYPE = TYPE_TO_NAME.invert
|