svix 2.4.0 → 2.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80a5c538c52aca1bfdc78b0c292d1b98026e33d52d34d046018cb29f46299045
4
- data.tar.gz: ef7c60c07d70db846465d98192659f868fc64525b272c067e33994b5d32e4a7c
3
+ metadata.gz: 9c4cf7c0e89f379a6cafd236e2717d983f33e7467f26ca89c0241291e30d8450
4
+ data.tar.gz: 59b79417b1cf82be9fb9f8e9d980af3e5f0ba5e36eaf10b1691c84c64600af3e
5
5
  SHA512:
6
- metadata.gz: c575396bda140b62d3f6d033f57b3fdfe87752a372e2bfdc009da887a7a7d9cbc16d47cc0e428d93bdaa0e17686f86e13ba522f4037dd299421ee4215ea340cf
7
- data.tar.gz: 7857cacda9161bcce17b0b3a0a96ffaf046b2db17e856f3ecc8932c5effd9f13e7efe774e284f2fa9780a50256fa247999e44c21d94b27c0847974870d6226b3
6
+ metadata.gz: 33d8911121c6a7aad4d8ceb587ccb29733116cb34f27ae62ea77ce92c5727c3b02f81cba42d505505e1603982fc520f7e032cb33320161fd48f0cd2b43eaa793
7
+ data.tar.gz: bf9e8d998a8fb175d77cc4744aa1f9634c7ab09411dbcc74b607f0878d4bcf02aaf9ed1a46de04354aa5a6c85ebf593f47c84cf39e0dbfad94cbda375d972e5b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (2.4.0)
4
+ svix (2.5.0)
5
5
  base64 (~> 0.3.0)
6
6
  logger (~> 1.0)
7
7
 
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+
4
+ require "net/http"
5
+
6
+ module Svix
7
+ class AutoconfigSubscription
8
+ def initialize(client)
9
+ @client = client
10
+ end
11
+
12
+ def create(app_id, options = {})
13
+ options = options.transform_keys(&:to_s)
14
+ res = @client.execute_request(
15
+ "POST",
16
+ "/api/v1/app/#{app_id}/autoconfig",
17
+ headers: {
18
+ "idempotency-key" => options["idempotency-key"]
19
+ }
20
+ )
21
+ AutoConfigOut.deserialize(res)
22
+ end
23
+
24
+ def rotate(app_id, autoconfig_id, rotate_subscription_in2, options = {})
25
+ options = options.transform_keys(&:to_s)
26
+ res = @client.execute_request(
27
+ "POST",
28
+ "/api/v1/app/#{app_id}/autoconfig/#{autoconfig_id}/rotate",
29
+ headers: {
30
+ "idempotency-key" => options["idempotency-key"]
31
+ },
32
+ body: rotate_subscription_in2
33
+ )
34
+ AutoConfigOut.deserialize(res)
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+
4
+ require "net/http"
5
+
6
+ module Svix
7
+ class AutoconfigSubscription
8
+ attr_accessor :destination
9
+ attr_accessor :endpoint
10
+ def initialize(client)
11
+ @client = client
12
+ @destination = AutoconfigSubscriptionDestination.new(client)
13
+ @endpoint = AutoconfigSubscriptionEndpoint.new(client)
14
+ end
15
+
16
+ def get(app_id, autoconfig_id)
17
+ res = @client.execute_request(
18
+ "GET",
19
+ "/api/v1/app/#{app_id}/autoconfig/#{autoconfig_id}"
20
+ )
21
+ AutoConfigSubscriptionOut.deserialize(res)
22
+ end
23
+
24
+ end
25
+ end
@@ -4,7 +4,7 @@
4
4
  require "net/http"
5
5
 
6
6
  module Svix
7
- class DestinationAutoconfig
7
+ class AutoconfigSubscriptionDestination
8
8
  def initialize(client)
9
9
  @client = client
10
10
  end
@@ -4,19 +4,11 @@
4
4
  require "net/http"
5
5
 
6
6
  module Svix
7
- class EndpointAutoconfig
7
+ class AutoconfigSubscriptionEndpoint
8
8
  def initialize(client)
9
9
  @client = client
10
10
  end
11
11
 
12
- def get(app_id, autoconfig_id)
13
- res = @client.execute_request(
14
- "GET",
15
- "/api/v1/app/#{app_id}/autoconfig/#{autoconfig_id}"
16
- )
17
- AutoConfigSubscriptionOut.deserialize(res)
18
- end
19
-
20
12
  def subscribe(app_id, autoconfig_id, endpoint_in)
21
13
  res = @client.execute_request(
22
14
  "PUT",
@@ -6,11 +6,9 @@ require "net/http"
6
6
  module Svix
7
7
  class Endpoint
8
8
  attr_accessor :auto_config_deprecated
9
- attr_accessor :autoconfig
10
9
  def initialize(client)
11
10
  @client = client
12
11
  @auto_config_deprecated = EndpointAutoConfigDeprecated.new(client)
13
- @autoconfig = EndpointAutoconfig.new(client)
14
12
  end
15
13
 
16
14
  def transformation_partial_update(app_id, endpoint_id, endpoint_transformation_in)
@@ -6,7 +6,9 @@ require "uri"
6
6
 
7
7
  require "svix/models/subscribe_in"
8
8
  require "svix/api_internal/endpoint_auto_config_deprecated"
9
- require "svix/api_internal/endpoint_autoconfig"
9
+ require "svix/api_internal/autoconfig_subscription"
10
+ require "svix/api_internal/autoconfig_subscription_destination"
11
+ require "svix/api_internal/autoconfig_subscription_endpoint"
10
12
 
11
13
  module Svix
12
14
  class AutoConfig
@@ -33,7 +35,7 @@ module Svix
33
35
 
34
36
  def subscribe
35
37
  if @autoconfig_id
36
- EndpointAutoconfig.new(@client).subscribe(
38
+ AutoconfigSubscription.new(@client).endpoint.subscribe(
37
39
  @app_id,
38
40
  @autoconfig_id,
39
41
  @endpoint
@@ -12,8 +12,9 @@ require "svix/models/sink_in_common"
12
12
  require "svix/models/destination_status"
13
13
  require "svix/models/subscribe_in"
14
14
  require "svix/api_internal/endpoint_auto_config_deprecated"
15
- require "svix/api_internal/endpoint_autoconfig"
16
- require "svix/api_internal/destination_autoconfig"
15
+ require "svix/api_internal/autoconfig_subscription"
16
+ require "svix/api_internal/autoconfig_subscription_destination"
17
+ require "svix/api_internal/autoconfig_subscription_endpoint"
17
18
  require "svix/api_internal/message_pollerv2"
18
19
 
19
20
  module Svix
@@ -32,7 +33,7 @@ module Svix
32
33
 
33
34
  def subscribe
34
35
  if @autoconfig_id
35
- destination = DestinationAutoconfig.new(@client).subscribe(
36
+ destination = AutoconfigSubscription.new(@client).destination.subscribe(
36
37
  @app_id,
37
38
  @autoconfig_id,
38
39
  sink_in_common_to_polling_destination(@sink_in)
@@ -74,7 +75,7 @@ module Svix
74
75
  return @sink_id if @sink_id
75
76
 
76
77
  # Get the sink id from the autoconfig id (v2)
77
- dest_id = EndpointAutoconfig.new(@client).get(@app_id, @autoconfig_id).dest_id
78
+ dest_id = AutoconfigSubscription.new(@client).get(@app_id, @autoconfig_id).dest_id
78
79
  raise "autoconfig subscription is pending. Have you called subscribe()?" if dest_id.nil? || dest_id.empty?
79
80
 
80
81
  dest_id
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class AutoConfigOut
7
+ attr_accessor :created_at
8
+ attr_accessor :token
9
+ # The AutoConfigSubscription's ID.
10
+ attr_accessor :id
11
+
12
+ ALL_FIELD ||= ["created_at", "token", "id"].freeze
13
+ private_constant :ALL_FIELD
14
+
15
+ def initialize(attributes = {})
16
+ unless attributes.is_a?(Hash)
17
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::AutoConfigOut` new method")
18
+ end
19
+
20
+ attributes.each do |k, v|
21
+ unless ALL_FIELD.include?(k.to_s)
22
+ fail(ArgumentError, "The field #{k} is not part of Svix::AutoConfigOut")
23
+ end
24
+
25
+ instance_variable_set("@#{k}", v)
26
+ instance_variable_set("@__#{k}_is_defined", true)
27
+ end
28
+ end
29
+
30
+ def self.deserialize(attributes = {})
31
+ attributes = attributes.transform_keys(&:to_s)
32
+ attrs = Hash.new
33
+ attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
34
+ attrs["token"] = attributes["token"]
35
+ attrs["id"] = attributes["id"]
36
+ new(attrs)
37
+ end
38
+
39
+ def serialize
40
+ out = Hash.new
41
+ out["createdAt"] = Svix::serialize_primitive(@created_at) unless @created_at.nil?
42
+ out["token"] = Svix::serialize_primitive(@token) unless @token.nil?
43
+ out["id"] = Svix::serialize_primitive(@id) unless @id.nil?
44
+ out
45
+ end
46
+
47
+ # Serializes the object to a json string
48
+ # @return String
49
+ def to_json(*args)
50
+ serialize.to_json(*args)
51
+ end
52
+ end
53
+ end
@@ -10,18 +10,32 @@ module Svix
10
10
  attr_accessor :detail_type
11
11
  # Access key ID.
12
12
  #
13
- # Currently a required field, but marked as optional because we may add different authentication in the future.
13
+ # Required (along with `secret_access_key`) if `role_arn` is blank.
14
14
  attr_accessor :access_key_id
15
15
  # Secret access key.
16
16
  #
17
- # Currently a required field, but marked as optional because we may add different authentication in the future.
17
+ # Required (along with `access_key_id`) if `role_arn` is blank.
18
18
  attr_accessor :secret_access_key
19
+ # Role ARN for delegated authentication
20
+ attr_accessor :role_arn
21
+ # Shared secret passed as the STS ExternalId.
22
+ #
23
+ # Can only be set if `role_arn` is Some
24
+ attr_accessor :external_id
19
25
  # The region of the EventBridge bus.
20
26
  #
21
27
  # Currently a required field, but marked as optional because we may infer it from other fields in the future.
22
28
  attr_accessor :region
23
29
 
24
- ALL_FIELD ||= ["event_bus_name", "detail_type", "access_key_id", "secret_access_key", "region"].freeze
30
+ ALL_FIELD ||= [
31
+ "event_bus_name",
32
+ "detail_type",
33
+ "access_key_id",
34
+ "secret_access_key",
35
+ "role_arn",
36
+ "external_id",
37
+ "region"
38
+ ].freeze
25
39
  private_constant :ALL_FIELD
26
40
 
27
41
  def initialize(attributes = {})
@@ -46,6 +60,8 @@ module Svix
46
60
  attrs["detail_type"] = attributes["detailType"]
47
61
  attrs["access_key_id"] = attributes["accessKeyId"]
48
62
  attrs["secret_access_key"] = attributes["secretAccessKey"]
63
+ attrs["role_arn"] = attributes["roleArn"]
64
+ attrs["external_id"] = attributes["externalId"]
49
65
  attrs["region"] = attributes["region"]
50
66
  new(attrs)
51
67
  end
@@ -56,6 +72,8 @@ module Svix
56
72
  out["detailType"] = Svix::serialize_primitive(@detail_type) unless @detail_type.nil?
57
73
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
58
74
  out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
75
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
76
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
59
77
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
60
78
  out
61
79
  end
@@ -7,9 +7,11 @@ module Svix
7
7
  attr_accessor :event_bus_name
8
8
  attr_accessor :detail_type
9
9
  attr_accessor :access_key_id
10
+ attr_accessor :role_arn
11
+ attr_accessor :external_id
10
12
  attr_accessor :region
11
13
 
12
- ALL_FIELD ||= ["event_bus_name", "detail_type", "access_key_id", "region"].freeze
14
+ ALL_FIELD ||= ["event_bus_name", "detail_type", "access_key_id", "role_arn", "external_id", "region"].freeze
13
15
  private_constant :ALL_FIELD
14
16
 
15
17
  def initialize(attributes = {})
@@ -33,6 +35,8 @@ module Svix
33
35
  attrs["event_bus_name"] = attributes["eventBusName"]
34
36
  attrs["detail_type"] = attributes["detailType"]
35
37
  attrs["access_key_id"] = attributes["accessKeyId"]
38
+ attrs["role_arn"] = attributes["roleArn"]
39
+ attrs["external_id"] = attributes["externalId"]
36
40
  attrs["region"] = attributes["region"]
37
41
  new(attrs)
38
42
  end
@@ -42,6 +46,8 @@ module Svix
42
46
  out["eventBusName"] = Svix::serialize_primitive(@event_bus_name) unless @event_bus_name.nil?
43
47
  out["detailType"] = Svix::serialize_primitive(@detail_type) unless @detail_type.nil?
44
48
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
49
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
50
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
45
51
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
46
52
  out
47
53
  end
@@ -8,9 +8,19 @@ module Svix
8
8
  attr_accessor :detail_type
9
9
  attr_accessor :access_key_id
10
10
  attr_accessor :secret_access_key
11
+ attr_accessor :role_arn
12
+ attr_accessor :external_id
11
13
  attr_accessor :region
12
14
 
13
- ALL_FIELD ||= ["event_bus_name", "detail_type", "access_key_id", "secret_access_key", "region"].freeze
15
+ ALL_FIELD ||= [
16
+ "event_bus_name",
17
+ "detail_type",
18
+ "access_key_id",
19
+ "secret_access_key",
20
+ "role_arn",
21
+ "external_id",
22
+ "region"
23
+ ].freeze
14
24
  private_constant :ALL_FIELD
15
25
 
16
26
  def initialize(attributes = {})
@@ -38,6 +48,8 @@ module Svix
38
48
  attrs["detail_type"] = attributes["detailType"]
39
49
  attrs["access_key_id"] = attributes["accessKeyId"]
40
50
  attrs["secret_access_key"] = attributes["secretAccessKey"]
51
+ attrs["role_arn"] = attributes["roleArn"]
52
+ attrs["external_id"] = attributes["externalId"]
41
53
  attrs["region"] = attributes["region"]
42
54
  new(attrs)
43
55
  end
@@ -48,6 +60,8 @@ module Svix
48
60
  out["detailType"] = Svix::serialize_primitive(@detail_type) unless @detail_type.nil?
49
61
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
50
62
  out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
63
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
64
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
51
65
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
52
66
  out
53
67
  end
@@ -9,12 +9,18 @@ module Svix
9
9
  class RedshiftConfigIn
10
10
  # Access key ID.
11
11
  #
12
- # Currently a required field, but marked as optional because we may add different authentication in the future.
12
+ # Required (along with `secret_access_key`) if `role_arn` is blank.
13
13
  attr_accessor :access_key_id
14
14
  # Secret access key.
15
15
  #
16
- # Currently a required field, but marked as optional because we may add different authentication in the future.
16
+ # Required (along with `access_key_id`) if `role_arn` is blank.
17
17
  attr_accessor :secret_access_key
18
+ # Role ARN for delegated authentication
19
+ attr_accessor :role_arn
20
+ # Shared secret passed as the STS ExternalId.
21
+ #
22
+ # Can only be set if `role_arn` is Some
23
+ attr_accessor :external_id
18
24
  # The region of the Redshift DB.
19
25
  #
20
26
  # Currently a required field, but marked as optional because we may infer it from other fields in the future.
@@ -41,6 +47,8 @@ module Svix
41
47
  ALL_FIELD ||= [
42
48
  "access_key_id",
43
49
  "secret_access_key",
50
+ "role_arn",
51
+ "external_id",
44
52
  "region",
45
53
  "cluster_identifier",
46
54
  "db_user",
@@ -71,6 +79,8 @@ module Svix
71
79
  attrs = Hash.new
72
80
  attrs["access_key_id"] = attributes["accessKeyId"]
73
81
  attrs["secret_access_key"] = attributes["secretAccessKey"]
82
+ attrs["role_arn"] = attributes["roleArn"]
83
+ attrs["external_id"] = attributes["externalId"]
74
84
  attrs["region"] = attributes["region"]
75
85
  attrs["cluster_identifier"] = attributes["clusterIdentifier"]
76
86
  attrs["db_user"] = attributes["dbUser"]
@@ -85,6 +95,8 @@ module Svix
85
95
  out = Hash.new
86
96
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
87
97
  out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
98
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
99
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
88
100
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
89
101
  out["clusterIdentifier"] = Svix::serialize_primitive(@cluster_identifier) unless @cluster_identifier.nil?
90
102
  out["dbUser"] = Svix::serialize_primitive(@db_user) unless @db_user.nil?
@@ -5,6 +5,8 @@ require "json"
5
5
  module Svix
6
6
  class RedshiftConfigOut
7
7
  attr_accessor :access_key_id
8
+ attr_accessor :role_arn
9
+ attr_accessor :external_id
8
10
  attr_accessor :region
9
11
  attr_accessor :cluster_identifier
10
12
  attr_accessor :db_user
@@ -24,6 +26,8 @@ module Svix
24
26
 
25
27
  ALL_FIELD ||= [
26
28
  "access_key_id",
29
+ "role_arn",
30
+ "external_id",
27
31
  "region",
28
32
  "cluster_identifier",
29
33
  "db_user",
@@ -53,6 +57,8 @@ module Svix
53
57
  attributes = attributes.transform_keys(&:to_s)
54
58
  attrs = Hash.new
55
59
  attrs["access_key_id"] = attributes["accessKeyId"]
60
+ attrs["role_arn"] = attributes["roleArn"]
61
+ attrs["external_id"] = attributes["externalId"]
56
62
  attrs["region"] = attributes["region"]
57
63
  attrs["cluster_identifier"] = attributes["clusterIdentifier"]
58
64
  attrs["db_user"] = attributes["dbUser"]
@@ -66,6 +72,8 @@ module Svix
66
72
  def serialize
67
73
  out = Hash.new
68
74
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
75
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
76
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
69
77
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
70
78
  out["clusterIdentifier"] = Svix::serialize_primitive(@cluster_identifier) unless @cluster_identifier.nil?
71
79
  out["dbUser"] = Svix::serialize_primitive(@db_user) unless @db_user.nil?
@@ -6,6 +6,8 @@ module Svix
6
6
  class RedshiftConfigPatch
7
7
  attr_accessor :access_key_id
8
8
  attr_accessor :secret_access_key
9
+ attr_accessor :role_arn
10
+ attr_accessor :external_id
9
11
  attr_accessor :region
10
12
  # Database name.
11
13
  #
@@ -20,7 +22,16 @@ module Svix
20
22
  # Only required if not using transformations.
21
23
  attr_accessor :table_name
22
24
 
23
- ALL_FIELD ||= ["access_key_id", "secret_access_key", "region", "db_name", "schema_name", "table_name"].freeze
25
+ ALL_FIELD ||= [
26
+ "access_key_id",
27
+ "secret_access_key",
28
+ "role_arn",
29
+ "external_id",
30
+ "region",
31
+ "db_name",
32
+ "schema_name",
33
+ "table_name"
34
+ ].freeze
24
35
  private_constant :ALL_FIELD
25
36
 
26
37
  def initialize(attributes = {})
@@ -43,6 +54,8 @@ module Svix
43
54
  attrs = Hash.new
44
55
  attrs["access_key_id"] = attributes["accessKeyId"]
45
56
  attrs["secret_access_key"] = attributes["secretAccessKey"]
57
+ attrs["role_arn"] = attributes["roleArn"]
58
+ attrs["external_id"] = attributes["externalId"]
46
59
  attrs["region"] = attributes["region"]
47
60
  attrs["db_name"] = attributes["dbName"]
48
61
  attrs["schema_name"] = attributes["schemaName"]
@@ -54,6 +67,8 @@ module Svix
54
67
  out = Hash.new
55
68
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
56
69
  out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
70
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
71
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
57
72
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
58
73
  out["dbName"] = Svix::serialize_primitive(@db_name) unless @db_name.nil?
59
74
  out["schemaName"] = Svix::serialize_primitive(@schema_name) if @__schema_name_is_defined
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class RotateSubscriptionIn2
7
+ attr_accessor :signing_secret
8
+
9
+ ALL_FIELD ||= ["signing_secret"].freeze
10
+ private_constant :ALL_FIELD
11
+
12
+ def initialize(attributes = {})
13
+ unless attributes.is_a?(Hash)
14
+ fail(
15
+ ArgumentError,
16
+ "The input argument (attributes) must be a hash in `Svix::RotateSubscriptionIn2` new method"
17
+ )
18
+ end
19
+
20
+ attributes.each do |k, v|
21
+ unless ALL_FIELD.include?(k.to_s)
22
+ fail(ArgumentError, "The field #{k} is not part of Svix::RotateSubscriptionIn2")
23
+ end
24
+
25
+ instance_variable_set("@#{k}", v)
26
+ instance_variable_set("@__#{k}_is_defined", true)
27
+ end
28
+ end
29
+
30
+ def self.deserialize(attributes = {})
31
+ attributes = attributes.transform_keys(&:to_s)
32
+ attrs = Hash.new
33
+ if attributes["signingSecret"]
34
+ attrs["signing_secret"] = Svix::EndpointSecretRotateIn.deserialize(attributes["signingSecret"])
35
+ end
36
+
37
+ new(attrs)
38
+ end
39
+
40
+ def serialize
41
+ out = Hash.new
42
+ out["signingSecret"] = Svix::serialize_schema_ref(@signing_secret) unless @signing_secret.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
@@ -12,15 +12,29 @@ module Svix
12
12
  attr_accessor :region
13
13
  # Access key ID.
14
14
  #
15
- # Currently a required field, but marked as optional because we may add different authentication in the future.
15
+ # Required (along with `secret_access_key`) if `role_arn` is None
16
16
  attr_accessor :access_key_id
17
17
  # Secret access key.
18
18
  #
19
- # Currently a required field, but marked as optional because we may add different authentication in the future.
19
+ # Required (along with `access_key_id`) if `role_arn` is None
20
20
  attr_accessor :secret_access_key
21
21
  attr_accessor :endpoint_url
22
+ # Role ARN for delegated authentication
23
+ attr_accessor :role_arn
24
+ # Shared secret passed as the STS ExternalId.
25
+ #
26
+ # Can only be set if `role_arn` is Some
27
+ attr_accessor :external_id
22
28
 
23
- ALL_FIELD ||= ["topic_arn", "region", "access_key_id", "secret_access_key", "endpoint_url"].freeze
29
+ ALL_FIELD ||= [
30
+ "topic_arn",
31
+ "region",
32
+ "access_key_id",
33
+ "secret_access_key",
34
+ "endpoint_url",
35
+ "role_arn",
36
+ "external_id"
37
+ ].freeze
24
38
  private_constant :ALL_FIELD
25
39
 
26
40
  def initialize(attributes = {})
@@ -46,6 +60,8 @@ module Svix
46
60
  attrs["access_key_id"] = attributes["accessKeyId"]
47
61
  attrs["secret_access_key"] = attributes["secretAccessKey"]
48
62
  attrs["endpoint_url"] = attributes["endpointUrl"]
63
+ attrs["role_arn"] = attributes["roleArn"]
64
+ attrs["external_id"] = attributes["externalId"]
49
65
  new(attrs)
50
66
  end
51
67
 
@@ -56,6 +72,8 @@ module Svix
56
72
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
57
73
  out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
58
74
  out["endpointUrl"] = Svix::serialize_primitive(@endpoint_url) unless @endpoint_url.nil?
75
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
76
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
59
77
  out
60
78
  end
61
79
 
@@ -7,8 +7,10 @@ module Svix
7
7
  attr_accessor :topic_arn
8
8
  attr_accessor :region
9
9
  attr_accessor :access_key_id
10
+ attr_accessor :role_arn
11
+ attr_accessor :external_id
10
12
 
11
- ALL_FIELD ||= ["topic_arn", "region", "access_key_id"].freeze
13
+ ALL_FIELD ||= ["topic_arn", "region", "access_key_id", "role_arn", "external_id"].freeze
12
14
  private_constant :ALL_FIELD
13
15
 
14
16
  def initialize(attributes = {})
@@ -32,6 +34,8 @@ module Svix
32
34
  attrs["topic_arn"] = attributes["topicArn"]
33
35
  attrs["region"] = attributes["region"]
34
36
  attrs["access_key_id"] = attributes["accessKeyId"]
37
+ attrs["role_arn"] = attributes["roleArn"]
38
+ attrs["external_id"] = attributes["externalId"]
35
39
  new(attrs)
36
40
  end
37
41
 
@@ -40,6 +44,8 @@ module Svix
40
44
  out["topicArn"] = Svix::serialize_primitive(@topic_arn) unless @topic_arn.nil?
41
45
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
42
46
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
47
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
48
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
43
49
  out
44
50
  end
45
51
 
@@ -8,9 +8,19 @@ module Svix
8
8
  attr_accessor :region
9
9
  attr_accessor :access_key_id
10
10
  attr_accessor :secret_access_key
11
+ attr_accessor :role_arn
12
+ attr_accessor :external_id
11
13
  attr_accessor :endpoint_url
12
14
 
13
- ALL_FIELD ||= ["topic_arn", "region", "access_key_id", "secret_access_key", "endpoint_url"].freeze
15
+ ALL_FIELD ||= [
16
+ "topic_arn",
17
+ "region",
18
+ "access_key_id",
19
+ "secret_access_key",
20
+ "role_arn",
21
+ "external_id",
22
+ "endpoint_url"
23
+ ].freeze
14
24
  private_constant :ALL_FIELD
15
25
 
16
26
  def initialize(attributes = {})
@@ -35,6 +45,8 @@ module Svix
35
45
  attrs["region"] = attributes["region"]
36
46
  attrs["access_key_id"] = attributes["accessKeyId"]
37
47
  attrs["secret_access_key"] = attributes["secretAccessKey"]
48
+ attrs["role_arn"] = attributes["roleArn"]
49
+ attrs["external_id"] = attributes["externalId"]
38
50
  attrs["endpoint_url"] = attributes["endpointUrl"]
39
51
  new(attrs)
40
52
  end
@@ -45,6 +57,8 @@ module Svix
45
57
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
46
58
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
47
59
  out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
60
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
61
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
48
62
  out["endpointUrl"] = Svix::serialize_primitive(@endpoint_url) if @__endpoint_url_is_defined
49
63
  out
50
64
  end
@@ -12,15 +12,29 @@ module Svix
12
12
  attr_accessor :region
13
13
  # Access key ID.
14
14
  #
15
- # Currently a required field, but marked as optional because we may add different authentication in the future.
15
+ # Required (along with `secret_access_key`) if `role_arn` is blank.
16
16
  attr_accessor :access_key_id
17
17
  # Secret access key.
18
18
  #
19
- # Currently a required field, but marked as optional because we may add different authentication in the future.
19
+ # Required (along with `access_key_id`) if `role_arn` is blank.
20
20
  attr_accessor :secret_access_key
21
+ # Role ARN for delegated authentication
22
+ attr_accessor :role_arn
23
+ # Shared secret passed as the STS ExternalId.
24
+ #
25
+ # Can only be set if `role_arn` is Some
26
+ attr_accessor :external_id
21
27
  attr_accessor :endpoint_url
22
28
 
23
- ALL_FIELD ||= ["queue_url", "region", "access_key_id", "secret_access_key", "endpoint_url"].freeze
29
+ ALL_FIELD ||= [
30
+ "queue_url",
31
+ "region",
32
+ "access_key_id",
33
+ "secret_access_key",
34
+ "role_arn",
35
+ "external_id",
36
+ "endpoint_url"
37
+ ].freeze
24
38
  private_constant :ALL_FIELD
25
39
 
26
40
  def initialize(attributes = {})
@@ -45,6 +59,8 @@ module Svix
45
59
  attrs["region"] = attributes["region"]
46
60
  attrs["access_key_id"] = attributes["accessKeyId"]
47
61
  attrs["secret_access_key"] = attributes["secretAccessKey"]
62
+ attrs["role_arn"] = attributes["roleArn"]
63
+ attrs["external_id"] = attributes["externalId"]
48
64
  attrs["endpoint_url"] = attributes["endpointUrl"]
49
65
  new(attrs)
50
66
  end
@@ -55,6 +71,8 @@ module Svix
55
71
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
56
72
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
57
73
  out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
74
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
75
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
58
76
  out["endpointUrl"] = Svix::serialize_primitive(@endpoint_url) unless @endpoint_url.nil?
59
77
  out
60
78
  end
@@ -7,9 +7,11 @@ module Svix
7
7
  attr_accessor :queue_url
8
8
  attr_accessor :region
9
9
  attr_accessor :access_key_id
10
+ attr_accessor :role_arn
11
+ attr_accessor :external_id
10
12
  attr_accessor :endpoint_url
11
13
 
12
- ALL_FIELD ||= ["queue_url", "region", "access_key_id", "endpoint_url"].freeze
14
+ ALL_FIELD ||= ["queue_url", "region", "access_key_id", "role_arn", "external_id", "endpoint_url"].freeze
13
15
  private_constant :ALL_FIELD
14
16
 
15
17
  def initialize(attributes = {})
@@ -33,6 +35,8 @@ module Svix
33
35
  attrs["queue_url"] = attributes["queueUrl"]
34
36
  attrs["region"] = attributes["region"]
35
37
  attrs["access_key_id"] = attributes["accessKeyId"]
38
+ attrs["role_arn"] = attributes["roleArn"]
39
+ attrs["external_id"] = attributes["externalId"]
36
40
  attrs["endpoint_url"] = attributes["endpointUrl"]
37
41
  new(attrs)
38
42
  end
@@ -42,6 +46,8 @@ module Svix
42
46
  out["queueUrl"] = Svix::serialize_primitive(@queue_url) unless @queue_url.nil?
43
47
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
44
48
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
49
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
50
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
45
51
  out["endpointUrl"] = Svix::serialize_primitive(@endpoint_url) unless @endpoint_url.nil?
46
52
  out
47
53
  end
@@ -8,9 +8,19 @@ module Svix
8
8
  attr_accessor :region
9
9
  attr_accessor :access_key_id
10
10
  attr_accessor :secret_access_key
11
+ attr_accessor :role_arn
12
+ attr_accessor :external_id
11
13
  attr_accessor :endpoint_url
12
14
 
13
- ALL_FIELD ||= ["queue_url", "region", "access_key_id", "secret_access_key", "endpoint_url"].freeze
15
+ ALL_FIELD ||= [
16
+ "queue_url",
17
+ "region",
18
+ "access_key_id",
19
+ "secret_access_key",
20
+ "role_arn",
21
+ "external_id",
22
+ "endpoint_url"
23
+ ].freeze
14
24
  private_constant :ALL_FIELD
15
25
 
16
26
  def initialize(attributes = {})
@@ -35,6 +45,8 @@ module Svix
35
45
  attrs["region"] = attributes["region"]
36
46
  attrs["access_key_id"] = attributes["accessKeyId"]
37
47
  attrs["secret_access_key"] = attributes["secretAccessKey"]
48
+ attrs["role_arn"] = attributes["roleArn"]
49
+ attrs["external_id"] = attributes["externalId"]
38
50
  attrs["endpoint_url"] = attributes["endpointUrl"]
39
51
  new(attrs)
40
52
  end
@@ -45,6 +57,8 @@ module Svix
45
57
  out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
46
58
  out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
47
59
  out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
60
+ out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
61
+ out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
48
62
  out["endpointUrl"] = Svix::serialize_primitive(@endpoint_url) if @__endpoint_url_is_defined
49
63
  out
50
64
  end
data/lib/svix/svix.rb CHANGED
@@ -15,6 +15,7 @@ module Svix
15
15
  class Client
16
16
  attr_accessor :application
17
17
  attr_accessor :authentication
18
+ attr_accessor :autoconfig_subscription
18
19
  attr_accessor :background_task
19
20
  attr_accessor :connector
20
21
  attr_accessor :destination
@@ -51,6 +52,7 @@ module Svix
51
52
 
52
53
  @application = Application.new(api_client)
53
54
  @authentication = Authentication.new(api_client)
55
+ @autoconfig_subscription = AutoconfigSubscription.new(api_client)
54
56
  @background_task = BackgroundTask.new(api_client)
55
57
  @connector = Connector.new(api_client)
56
58
  @destination = Destination.new(api_client)
data/lib/svix/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- VERSION = "2.4.0"
4
+ VERSION = "2.5.0"
5
5
  end
data/lib/svix.rb CHANGED
@@ -10,6 +10,7 @@ require "logger"
10
10
  # API
11
11
  require "svix/api/application"
12
12
  require "svix/api/authentication"
13
+ require "svix/api/autoconfig_subscription"
13
14
  require "svix/api/background_task"
14
15
  require "svix/api/connector"
15
16
  require "svix/api/destination"
@@ -54,6 +55,7 @@ require "svix/models/application_in"
54
55
  require "svix/models/application_out"
55
56
  require "svix/models/application_patch"
56
57
  require "svix/models/application_token_expire_in"
58
+ require "svix/models/auto_config_out"
57
59
  require "svix/models/azure_blob_storage_config_in"
58
60
  require "svix/models/azure_blob_storage_config_out"
59
61
  require "svix/models/azure_blob_storage_config_patch"
@@ -222,6 +224,7 @@ require "svix/models/redshift_config_patch"
222
224
  require "svix/models/replay_in"
223
225
  require "svix/models/replay_out"
224
226
  require "svix/models/rotate_poller_token_in"
227
+ require "svix/models/rotate_subscription_in2"
225
228
  require "svix/models/rotate_token_out"
226
229
  require "svix/models/rutter_config"
227
230
  require "svix/models/rutter_config_out"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svix
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-09-09 00:00:00.000000000 Z
10
+ date: 2026-09-11 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: base64
@@ -107,6 +107,7 @@ files:
107
107
  - lib/svix.rb
108
108
  - lib/svix/api/application.rb
109
109
  - lib/svix/api/authentication.rb
110
+ - lib/svix/api/autoconfig_subscription.rb
110
111
  - lib/svix/api/background_task.rb
111
112
  - lib/svix/api/connector.rb
112
113
  - lib/svix/api/destination.rb
@@ -135,11 +136,11 @@ files:
135
136
  - lib/svix/api/streaming_sink_transformation.rb
136
137
  - lib/svix/api/streaming_stream.rb
137
138
  - lib/svix/api_error.rb
138
- - lib/svix/api_internal/destination.rb
139
- - lib/svix/api_internal/destination_autoconfig.rb
139
+ - lib/svix/api_internal/autoconfig_subscription.rb
140
+ - lib/svix/api_internal/autoconfig_subscription_destination.rb
141
+ - lib/svix/api_internal/autoconfig_subscription_endpoint.rb
140
142
  - lib/svix/api_internal/endpoint.rb
141
143
  - lib/svix/api_internal/endpoint_auto_config_deprecated.rb
142
- - lib/svix/api_internal/endpoint_autoconfig.rb
143
144
  - lib/svix/api_internal/message.rb
144
145
  - lib/svix/api_internal/message_pollerv2.rb
145
146
  - lib/svix/autoconfig.rb
@@ -163,6 +164,7 @@ files:
163
164
  - lib/svix/models/application_out.rb
164
165
  - lib/svix/models/application_patch.rb
165
166
  - lib/svix/models/application_token_expire_in.rb
167
+ - lib/svix/models/auto_config_out.rb
166
168
  - lib/svix/models/auto_config_sink_type.rb
167
169
  - lib/svix/models/auto_config_subscription_out.rb
168
170
  - lib/svix/models/azure_blob_storage_config_in.rb
@@ -336,6 +338,7 @@ files:
336
338
  - lib/svix/models/replay_in.rb
337
339
  - lib/svix/models/replay_out.rb
338
340
  - lib/svix/models/rotate_poller_token_in.rb
341
+ - lib/svix/models/rotate_subscription_in2.rb
339
342
  - lib/svix/models/rotate_token_out.rb
340
343
  - lib/svix/models/rutter_config.rb
341
344
  - lib/svix/models/rutter_config_out.rb
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
- # This file is @generated
3
-
4
- require "net/http"
5
-
6
- module Svix
7
- class Destination
8
- attr_accessor :autoconfig
9
- def initialize(client)
10
- @client = client
11
- @autoconfig = DestinationAutoconfig.new(client)
12
- end
13
- end
14
- end