svix 2.5.0 → 2.6.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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/endpoint.rb +13 -0
  4. data/lib/svix/models/app_portal_access_in.rb +4 -2
  5. data/lib/svix/models/app_usage_stats_out.rb +7 -7
  6. data/lib/svix/models/application_token_expire_in.rb +2 -1
  7. data/lib/svix/models/auto_config_out.rb +1 -0
  8. data/lib/svix/models/auto_config_subscription_out.rb +1 -0
  9. data/lib/svix/models/azure_blob_storage_config_in.rb +2 -1
  10. data/lib/svix/models/clickhouse_config_in.rb +4 -2
  11. data/lib/svix/models/create_stream_events_in.rb +2 -1
  12. data/lib/svix/models/destination_in.rb +10 -5
  13. data/lib/svix/models/endpoint_attempt_stats.rb +52 -0
  14. data/lib/svix/models/endpoint_message_out.rb +2 -1
  15. data/lib/svix/models/endpoint_secret_rotate_in.rb +2 -1
  16. data/lib/svix/models/event_bridge_config_in.rb +2 -1
  17. data/lib/svix/models/event_type_import_open_api_in.rb +3 -1
  18. data/lib/svix/models/ingest_endpoint_secret_in.rb +2 -1
  19. data/lib/svix/models/ingest_source_consumer_portal_access_in.rb +2 -1
  20. data/lib/svix/models/message_in.rb +8 -4
  21. data/lib/svix/models/operational_webhook_endpoint_secret_in.rb +2 -1
  22. data/lib/svix/models/postgres_config_in.rb +7 -3
  23. data/lib/svix/models/rabbit_mq_config_out.rb +4 -1
  24. data/lib/svix/models/redshift_config_in.rb +4 -2
  25. data/lib/svix/models/rotate_poller_token_in.rb +2 -1
  26. data/lib/svix/models/s3_config_in.rb +2 -1
  27. data/lib/svix/models/snowflake_config_in.rb +6 -3
  28. data/lib/svix/models/sns_config_in.rb +2 -1
  29. data/lib/svix/models/sqs_config_in.rb +2 -1
  30. data/lib/svix/models/stream_portal_access_in.rb +4 -2
  31. data/lib/svix/models/stream_sink_in.rb +4 -2
  32. data/lib/svix/models/stream_token_expire_in.rb +2 -1
  33. data/lib/svix/svix_http_client.rb +3 -1
  34. data/lib/svix/version.rb +1 -1
  35. data/lib/svix.rb +1 -0
  36. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c4cf7c0e89f379a6cafd236e2717d983f33e7467f26ca89c0241291e30d8450
4
- data.tar.gz: 59b79417b1cf82be9fb9f8e9d980af3e5f0ba5e36eaf10b1691c84c64600af3e
3
+ metadata.gz: b2e83b4b03e6e722fce655ec73beacc8f39a5e3d79a368c4a7ceaae565214b40
4
+ data.tar.gz: 23e6c0631d05092189bfdbf58e1ce77232933fc02307fe5879bf4a11e376f519
5
5
  SHA512:
6
- metadata.gz: 33d8911121c6a7aad4d8ceb587ccb29733116cb34f27ae62ea77ce92c5727c3b02f81cba42d505505e1603982fc520f7e032cb33320161fd48f0cd2b43eaa793
7
- data.tar.gz: bf9e8d998a8fb175d77cc4744aa1f9634c7ab09411dbcc74b607f0878d4bcf02aaf9ed1a46de04354aa5a6c85ebf593f47c84cf39e0dbfad94cbda375d972e5b
6
+ metadata.gz: 86bc8555a6158bcdaba392dc5c8f779092362b048ef7a16f1d8d8cc54492999e7fef3039210acf5019139fad21d2870dde8fe4ce958195336fa6234e517094c0
7
+ data.tar.gz: af4a70dc036107e9e6f59ba07eb338d5bc7573e252440119d582a6393739f32e589ffd186fbc53aab09dc0edff6c0c3eecae203d9b395d9714f5cd258c97e40e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (2.5.0)
4
+ svix (2.6.0)
5
5
  base64 (~> 0.3.0)
6
6
  logger (~> 1.0)
7
7
 
@@ -154,6 +154,19 @@ module Svix
154
154
  EndpointStats.deserialize(res)
155
155
  end
156
156
 
157
+ def get_attempt_stats(app_id, endpoint_id, options = {})
158
+ options = options.transform_keys(&:to_s)
159
+ res = @client.execute_request(
160
+ "GET",
161
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/attempt-stats",
162
+ query_params: {
163
+ "since" => options["since"],
164
+ "until" => options["until"]
165
+ }
166
+ )
167
+ EndpointAttemptStats.deserialize(res)
168
+ end
169
+
157
170
  def recover(app_id, endpoint_id, recover_in, options = {})
158
171
  options = options.transform_keys(&:to_s)
159
172
  res = @client.execute_request(
@@ -32,11 +32,13 @@ module Svix
32
32
  attr_accessor :feature_flags
33
33
  # How long the token will be valid for, in seconds.
34
34
  #
35
- # Valid values are between 1 hour and 7 days. The default is 7 days.
35
+ # Valid values are between 1 hour and 7 days.
36
+ # The default is 7 days.
36
37
  attr_accessor :expiry
37
38
  # An optional session ID to attach to the token.
38
39
  #
39
- # When expiring tokens with "Expire All", you can include the session ID to only expire tokens that were created with that session ID.
40
+ # When expiring tokens with "Expire All", you can include the session ID
41
+ # to only expire tokens that were created with that session ID.
40
42
  attr_accessor :session_id
41
43
 
42
44
  ALL_FIELD ||= ["application", "read_only", "capabilities", "feature_flags", "expiry", "session_id"].freeze
@@ -4,17 +4,17 @@ require "json"
4
4
 
5
5
  module Svix
6
6
  class AppUsageStatsOut
7
- # Any app IDs or UIDs received in the request that weren't found.
8
- #
9
- # Stats will be produced for all the others.
10
- attr_accessor :unresolved_app_ids
11
7
  # The QueueBackgroundTask's ID.
12
8
  attr_accessor :id
13
9
  attr_accessor :status
14
10
  attr_accessor :task
15
11
  attr_accessor :updated_at
12
+ # Any app IDs or UIDs received in the request that weren't found.
13
+ #
14
+ # Stats will be produced for all the others.
15
+ attr_accessor :unresolved_app_ids
16
16
 
17
- ALL_FIELD ||= ["unresolved_app_ids", "id", "status", "task", "updated_at"].freeze
17
+ ALL_FIELD ||= ["id", "status", "task", "updated_at", "unresolved_app_ids"].freeze
18
18
  private_constant :ALL_FIELD
19
19
 
20
20
  def initialize(attributes = {})
@@ -35,21 +35,21 @@ module Svix
35
35
  def self.deserialize(attributes = {})
36
36
  attributes = attributes.transform_keys(&:to_s)
37
37
  attrs = Hash.new
38
- attrs["unresolved_app_ids"] = attributes["unresolvedAppIds"]
39
38
  attrs["id"] = attributes["id"]
40
39
  attrs["status"] = Svix::BackgroundTaskStatus.deserialize(attributes["status"])
41
40
  attrs["task"] = Svix::BackgroundTaskType.deserialize(attributes["task"])
42
41
  attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
42
+ attrs["unresolved_app_ids"] = attributes["unresolvedAppIds"]
43
43
  new(attrs)
44
44
  end
45
45
 
46
46
  def serialize
47
47
  out = Hash.new
48
- out["unresolvedAppIds"] = Svix::serialize_primitive(@unresolved_app_ids) unless @unresolved_app_ids.nil?
49
48
  out["id"] = Svix::serialize_primitive(@id) unless @id.nil?
50
49
  out["status"] = Svix::serialize_schema_ref(@status) unless @status.nil?
51
50
  out["task"] = Svix::serialize_schema_ref(@task) unless @task.nil?
52
51
  out["updatedAt"] = Svix::serialize_primitive(@updated_at) unless @updated_at.nil?
52
+ out["unresolvedAppIds"] = Svix::serialize_primitive(@unresolved_app_ids) unless @unresolved_app_ids.nil?
53
53
  out
54
54
  end
55
55
 
@@ -8,7 +8,8 @@ module Svix
8
8
  attr_accessor :expiry
9
9
  # An optional list of session ids.
10
10
  #
11
- # If any session ids are specified, only Application tokens created with that session id will be expired.
11
+ # If any session ids are specified, only Application tokens created with that
12
+ # session id will be expired.
12
13
  attr_accessor :session_ids
13
14
 
14
15
  ALL_FIELD ||= ["expiry", "session_ids"].freeze
@@ -5,6 +5,7 @@ require "json"
5
5
  module Svix
6
6
  class AutoConfigOut
7
7
  attr_accessor :created_at
8
+ # The AutoConfig token
8
9
  attr_accessor :token
9
10
  # The AutoConfigSubscription's ID.
10
11
  attr_accessor :id
@@ -5,6 +5,7 @@ require "json"
5
5
  module Svix
6
6
  class AutoConfigSubscriptionOut
7
7
  attr_accessor :created_at
8
+ # The censored AutoConfig token
8
9
  attr_accessor :token_censored
9
10
  # The AutoConfigSubscription's ID.
10
11
  attr_accessor :id
@@ -8,7 +8,8 @@ module Svix
8
8
  attr_accessor :account
9
9
  # Access key.
10
10
  #
11
- # Currently a required field, but marked as optional because we may add different authentication in the future.
11
+ # Currently a required field, but marked as optional because we may add
12
+ # different authentication in the future.
12
13
  attr_accessor :access_key
13
14
 
14
15
  ALL_FIELD ||= ["container", "account", "access_key"].freeze
@@ -8,11 +8,13 @@ module Svix
8
8
  attr_accessor :url
9
9
  # Username to access Clickhouse.
10
10
  #
11
- # Currently a required field, but marked as optional because we may add different authentication in the future.
11
+ # Currently a required field, but marked as optional because we may add
12
+ # different authentication in the future.
12
13
  attr_accessor :username
13
14
  # Password to access Clickhouse.
14
15
  #
15
- # Currently a required field, but marked as optional because we may add different authentication in the future.
16
+ # Currently a required field, but marked as optional because we may add
17
+ # different authentication in the future.
16
18
  attr_accessor :password
17
19
  # The Clickhouse database to connect to.
18
20
  attr_accessor :database
@@ -7,7 +7,8 @@ module Svix
7
7
  attr_accessor :events
8
8
  # Optionally creates a new Stream alongside the events.
9
9
  #
10
- # If the stream id or uid that is used in the path already exists, this argument is ignored.
10
+ # If the stream id or uid that is used in the path already exists,
11
+ # this argument is ignored.
11
12
  attr_accessor :stream
12
13
 
13
14
  ALL_FIELD ||= ["events", "stream"].freeze
@@ -89,21 +89,26 @@ module Svix
89
89
  attr_accessor :uid
90
90
  # Whether the destination will receive events.
91
91
  #
92
- # If the destination is `enabled`, events sent to the application will be dispatched to the destination in order.
92
+ # If the destination is `enabled`, events sent to the application will be
93
+ # dispatched to the destination in order.
93
94
  #
94
- # If the destination is `disabled`, events will not be dispatched until the destination is reenabled.
95
+ # If the destination is `disabled`, events will not be dispatched until the
96
+ # destination is reenabled.
95
97
  attr_accessor :status
96
98
  # How many events will be batched in a request to the destination.
97
99
  attr_accessor :batch_size
98
100
  # How long to wait before a batch of events is sent, if the `batchSize` is not reached.
99
101
  #
100
- # For example, with a `batchSize` of 100 and `maxWaitSecs` of 10, a request is sent after 10 seconds or 100 events, whichever comes first.
102
+ # For example, with a `batchSize` of 100 and `maxWaitSecs` of 10, a request is sent after
103
+ # 10 seconds or 100 events, whichever comes first.
101
104
  #
102
105
  # Note that an empty batch is never sent to the destination.
103
106
  attr_accessor :max_wait_secs
104
- # A list of event types that filter which events are dispatched to the destination. An empty list (or null) will not filter out any events.
107
+ # A list of event types that filter which events are dispatched to the destination.
108
+ # An empty list (or null) will not filter out any events.
105
109
  attr_accessor :event_types
106
- # A list of channels that filter which events are dispatched to the destination. An empty list (or null) will not filter out any events.
110
+ # A list of channels that filter which events are dispatched to the destination.
111
+ # An empty list (or null) will not filter out any events.
107
112
  attr_accessor :channels
108
113
  attr_accessor :metadata
109
114
  attr_accessor :config
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class EndpointAttemptStats
7
+ attr_accessor :success
8
+ attr_accessor :fail
9
+ attr_accessor :canceled
10
+
11
+ ALL_FIELD ||= ["success", "fail", "canceled"].freeze
12
+ private_constant :ALL_FIELD
13
+
14
+ def initialize(attributes = {})
15
+ unless attributes.is_a?(Hash)
16
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointAttemptStats` new method")
17
+ end
18
+
19
+ attributes.each do |k, v|
20
+ unless ALL_FIELD.include?(k.to_s)
21
+ fail(ArgumentError, "The field #{k} is not part of Svix::EndpointAttemptStats")
22
+ end
23
+
24
+ instance_variable_set("@#{k}", v)
25
+ instance_variable_set("@__#{k}_is_defined", true)
26
+ end
27
+ end
28
+
29
+ def self.deserialize(attributes = {})
30
+ attributes = attributes.transform_keys(&:to_s)
31
+ attrs = Hash.new
32
+ attrs["success"] = attributes["success"]
33
+ attrs["fail"] = attributes["fail"]
34
+ attrs["canceled"] = attributes["canceled"]
35
+ new(attrs)
36
+ end
37
+
38
+ def serialize
39
+ out = Hash.new
40
+ out["success"] = Svix::serialize_primitive(@success) unless @success.nil?
41
+ out["fail"] = Svix::serialize_primitive(@fail) unless @fail.nil?
42
+ out["canceled"] = Svix::serialize_primitive(@canceled) unless @canceled.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
@@ -3,7 +3,8 @@
3
3
  require "json"
4
4
 
5
5
  module Svix
6
- # A model containing information on a given message plus additional fields on the last attempt for that message.
6
+ # A model containing information on a given message plus additional fields on the last attempt for
7
+ # that message.
7
8
  class EndpointMessageOut
8
9
  attr_accessor :status
9
10
  attr_accessor :status_text
@@ -11,7 +11,8 @@ module Svix
11
11
  attr_accessor :key
12
12
  # How long the old secret will be valid for, in seconds.
13
13
  #
14
- # Valid values are between 0 (immediate expiry) and 7 days. The default is 24 hours.
14
+ # Valid values are between 0 (immediate expiry) and 7 days.
15
+ # The default is 24 hours.
15
16
  attr_accessor :grace_period_seconds
16
17
 
17
18
  ALL_FIELD ||= ["key", "grace_period_seconds"].freeze
@@ -24,7 +24,8 @@ module Svix
24
24
  attr_accessor :external_id
25
25
  # The region of the EventBridge bus.
26
26
  #
27
- # Currently a required field, but marked as optional because we may infer it from other fields in the future.
27
+ # Currently a required field, but marked as optional because we may infer
28
+ # it from other fields in the future.
28
29
  attr_accessor :region
29
30
 
30
31
  ALL_FIELD ||= [
@@ -5,7 +5,9 @@ require "json"
5
5
  module Svix
6
6
  # Import a list of event types from webhooks defined in an OpenAPI spec.
7
7
  #
8
- # The OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a `400` **Bad Request**.
8
+ # The OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw`
9
+ # (a `string`) which will be parsed as YAML or JSON by the server.
10
+ # Sending neither or both is invalid, resulting in a `400` **Bad Request**.
9
11
  class EventTypeImportOpenApiIn
10
12
  # If `true`, return the event types that would be modified without actually modifying them.
11
13
  attr_accessor :dry_run
@@ -11,7 +11,8 @@ module Svix
11
11
  attr_accessor :key
12
12
  # How long the old secret will be valid for, in seconds.
13
13
  #
14
- # Valid values are between 0 (immediate expiry) and 7 days. The default is 24 hours.
14
+ # Valid values are between 0 (immediate expiry) and 7 days.
15
+ # The default is 24 hours.
15
16
  attr_accessor :grace_period_seconds
16
17
 
17
18
  ALL_FIELD ||= ["key", "grace_period_seconds"].freeze
@@ -6,7 +6,8 @@ module Svix
6
6
  class IngestSourceConsumerPortalAccessIn
7
7
  # How long the token will be valid for, in seconds.
8
8
  #
9
- # Valid values are between 1 hour and 7 days. The default is 7 days.
9
+ # Valid values are between 1 hour and 7 days.
10
+ # The default is 7 days.
10
11
  attr_accessor :expiry
11
12
  # Whether the app portal should be in read-only mode.
12
13
  attr_accessor :read_only
@@ -16,7 +16,8 @@ module Svix
16
16
  attr_accessor :channels
17
17
  # Optionally creates a new application alongside the message.
18
18
  #
19
- # If the application id or uid that is used in the path already exists, this argument is ignored.
19
+ # If the application id or uid that is used in the path already exists,
20
+ # this argument is ignored.
20
21
  attr_accessor :application
21
22
  # List of free-form tags that can be filtered by when listing messages
22
23
  attr_accessor :tags
@@ -24,11 +25,14 @@ module Svix
24
25
  attr_accessor :transformations_params
25
26
  # The date and time at which the message will be delivered.
26
27
  #
27
- # Note that this time is best-effort-only. Must be at least one minute and no more than 24 hours in the future.
28
+ # Note that this time is best-effort-only. Must be at least one minute
29
+ # and no more than 24 hours in the future.
28
30
  attr_accessor :deliver_at
29
- # Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with `payloadRetentionHours`.
31
+ # Optional number of days to retain the message payload. Defaults to 90.
32
+ # Note that this is mutually exclusive with `payloadRetentionHours`.
30
33
  attr_accessor :payload_retention_period
31
- # Optional number of hours to retain the message payload. Note that this is mutually exclusive with `payloadRetentionPeriod`.
34
+ # Optional number of hours to retain the message payload. Note that
35
+ # this is mutually exclusive with `payloadRetentionPeriod`.
32
36
  attr_accessor :payload_retention_hours
33
37
 
34
38
  ALL_FIELD ||= [
@@ -11,7 +11,8 @@ module Svix
11
11
  attr_accessor :key
12
12
  # How long the old secret will be valid for, in seconds.
13
13
  #
14
- # Valid values are between 0 (immediate expiry) and 7 days. The default is 24 hours.
14
+ # Valid values are between 0 (immediate expiry) and 7 days.
15
+ # The default is 24 hours.
15
16
  attr_accessor :grace_period_seconds
16
17
 
17
18
  ALL_FIELD ||= ["key", "grace_period_seconds"].freeze
@@ -4,7 +4,8 @@ require "json"
4
4
 
5
5
  module Svix
6
6
  class PostgresConfigIn
7
- # PostgreSQL connection URL, e.g. `postgres://user@host:5432/dbname?sslmode=require`.
7
+ # PostgreSQL connection URL, e.g.
8
+ # `postgres://user@host:5432/dbname?sslmode=require`.
8
9
  #
9
10
  # Do NOT embed a password here; use the `password` field instead.
10
11
  attr_accessor :url
@@ -12,11 +13,14 @@ module Svix
12
13
  attr_accessor :password
13
14
  # Table to insert into. May be schema-qualified (e.g. `public.events`).
14
15
  #
15
- # Quote characters are not supported. Each dot-separated segment is automatically double-quoted when the query is built, so `public.events` becomes `"public"."events"`.
16
+ # Quote characters are not supported. Each dot-separated segment is automatically
17
+ # double-quoted when the query is built, so `public.events` becomes `"public"."events"`.
16
18
  attr_accessor :table_name
17
19
  # PEM-encoded CA certificate used to verify the Postgres server's TLS certificate.
18
20
  #
19
- # Supply this to trust a private or self-signed CA when connecting with `sslmode=verify-ca` or `sslmode=verify-full`. Without it, only the built-in public roots are trusted.
21
+ # Supply this to trust a private or self-signed CA when connecting with
22
+ # `sslmode=verify-ca` or `sslmode=verify-full`. Without it, only the built-in
23
+ # public roots are trusted.
20
24
  attr_accessor :ssl_root_cert
21
25
 
22
26
  ALL_FIELD ||= ["url", "password", "table_name", "ssl_root_cert"].freeze
@@ -4,9 +4,10 @@ require "json"
4
4
 
5
5
  module Svix
6
6
  class RabbitMqConfigOut
7
+ attr_accessor :uri
7
8
  attr_accessor :routing_key
8
9
 
9
- ALL_FIELD ||= ["routing_key"].freeze
10
+ ALL_FIELD ||= ["uri", "routing_key"].freeze
10
11
  private_constant :ALL_FIELD
11
12
 
12
13
  def initialize(attributes = {})
@@ -27,12 +28,14 @@ module Svix
27
28
  def self.deserialize(attributes = {})
28
29
  attributes = attributes.transform_keys(&:to_s)
29
30
  attrs = Hash.new
31
+ attrs["uri"] = attributes["uri"]
30
32
  attrs["routing_key"] = attributes["routingKey"]
31
33
  new(attrs)
32
34
  end
33
35
 
34
36
  def serialize
35
37
  out = Hash.new
38
+ out["uri"] = Svix::serialize_primitive(@uri) unless @uri.nil?
36
39
  out["routingKey"] = Svix::serialize_primitive(@routing_key) unless @routing_key.nil?
37
40
  out
38
41
  end
@@ -5,7 +5,8 @@ require "json"
5
5
  module Svix
6
6
  # Configuration parameters for defining a Redshift sink.
7
7
  #
8
- # For provisioned clusters, set `cluster_identifier` and `db_user`. For Redshift Serverless, set `workgroup_name`.
8
+ # For provisioned clusters, set `cluster_identifier` and `db_user`.
9
+ # For Redshift Serverless, set `workgroup_name`.
9
10
  class RedshiftConfigIn
10
11
  # Access key ID.
11
12
  #
@@ -23,7 +24,8 @@ module Svix
23
24
  attr_accessor :external_id
24
25
  # The region of the Redshift DB.
25
26
  #
26
- # Currently a required field, but marked as optional because we may infer it from other fields in the future.
27
+ # Currently a required field, but marked as optional because we may infer
28
+ # it from other fields in the future.
27
29
  attr_accessor :region
28
30
  # Required for provisioned clusters.
29
31
  attr_accessor :cluster_identifier
@@ -8,7 +8,8 @@ module Svix
8
8
  attr_accessor :expiry
9
9
  # Updates the previous token's expiration, in seconds.
10
10
  #
11
- # If set to 0, the old token will immediately be revoked. Must be between 0 and 86,400 seconds (1 day).
11
+ # If set to 0, the old token will immediately be revoked.
12
+ # Must be between 0 and 86,400 seconds (1 day).
12
13
  #
13
14
  # Defaults to 300 seconds (5 minutes).
14
15
  attr_accessor :old_token_expiry
@@ -15,7 +15,8 @@ module Svix
15
15
  attr_accessor :secret_access_key
16
16
  # The region of the S3 bucket
17
17
  #
18
- # Currently a required field, but marked as optional because we may infer it from other fields in the future.
18
+ # Currently a required field, but marked as optional because we may infer
19
+ # it from other fields in the future.
19
20
  attr_accessor :region
20
21
  attr_accessor :endpoint_url
21
22
  # Role ARN for delegated authentication
@@ -5,13 +5,16 @@ require "json"
5
5
  module Svix
6
6
  # Configuration parameters for defining a Snowflake sink.
7
7
  class SnowflakeConfigIn
8
- # PEM-encoded private key used for signing token-based requests to the Snowflake API.
8
+ # PEM-encoded private key used for signing token-based requests
9
+ # to the Snowflake API.
9
10
  #
10
11
  # Beginning/end delimiters are not required.
11
12
  #
12
- # Currently a required field, but marked as optional because we may add different authentication in the future.
13
+ # Currently a required field, but marked as optional because we may add
14
+ # different authentication in the future.
13
15
  attr_accessor :private_key
14
- # Snowflake account identifier, which includes both the organization and account IDs separated by a hyphen.
16
+ # Snowflake account identifier, which includes both the organization and account
17
+ # IDs separated by a hyphen.
15
18
  attr_accessor :account_identifier
16
19
  # The Snowflake user id.
17
20
  attr_accessor :user_id
@@ -8,7 +8,8 @@ module Svix
8
8
  attr_accessor :topic_arn
9
9
  # The region of the SNS instance.
10
10
  #
11
- # Currently a required field, but marked as optional because we may infer it from other fields in the future.
11
+ # Currently a required field, but marked as optional because we may infer
12
+ # it from other fields in the future.
12
13
  attr_accessor :region
13
14
  # Access key ID.
14
15
  #
@@ -8,7 +8,8 @@ module Svix
8
8
  attr_accessor :queue_url
9
9
  # The region of the SQS queue.
10
10
  #
11
- # Currently a required field, but marked as optional because we may infer it from other fields in the future.
11
+ # Currently a required field, but marked as optional because we may infer
12
+ # it from other fields in the future.
12
13
  attr_accessor :region
13
14
  # Access key ID.
14
15
  #
@@ -8,11 +8,13 @@ module Svix
8
8
  attr_accessor :feature_flags
9
9
  # How long the token will be valid for, in seconds.
10
10
  #
11
- # Valid values are between 1 hour and 7 days. The default is 7 days.
11
+ # Valid values are between 1 hour and 7 days.
12
+ # The default is 7 days.
12
13
  attr_accessor :expiry
13
14
  # An optional session ID to attach to the token.
14
15
  #
15
- # When expiring tokens with "Expire All", you can include the session ID to only expire tokens that were created with that session ID.
16
+ # When expiring tokens with "Expire All", you can include the session ID
17
+ # to only expire tokens that were created with that session ID.
16
18
  attr_accessor :session_id
17
19
 
18
20
  ALL_FIELD ||= ["feature_flags", "expiry", "session_id"].freeze
@@ -88,7 +88,8 @@ module Svix
88
88
  attr_accessor :uid
89
89
  # Whether the sink will receive events.
90
90
  #
91
- # If the sink is `enabled`, any events posted to the stream will be dispatched to the Sink in the same order that events were posted to the stream.
91
+ # If the sink is `enabled`, any events posted to the stream will be
92
+ # dispatched to the Sink in the same order that events were posted to the stream.
92
93
  #
93
94
  # If the sink is `disabled`, events will not be dispatched to the sink until the sink is reenabled.
94
95
  attr_accessor :status
@@ -100,7 +101,8 @@ module Svix
100
101
  #
101
102
  # Note that we will never send an empty batch of events to the Sink.
102
103
  attr_accessor :max_wait_secs
103
- # A list of event types that filter which events are dispatched to the Sink. An empty list (or null) will not filter out any events.
104
+ # A list of event types that filter which events are dispatched to the Sink. An empty list (or null) will not filter out
105
+ # any events.
104
106
  attr_accessor :event_types
105
107
  attr_accessor :channels
106
108
  attr_accessor :metadata
@@ -8,7 +8,8 @@ module Svix
8
8
  attr_accessor :expiry
9
9
  # An optional list of session ids.
10
10
  #
11
- # If any session ids are specified, only Stream tokens created with that session id will be expired.
11
+ # If any session ids are specified, only Stream tokens created with that
12
+ # session id will be expired.
12
13
  attr_accessor :session_ids
13
14
 
14
15
  ALL_FIELD ||= ["expiry", "session_ids"].freeze
@@ -9,7 +9,9 @@ module Svix
9
9
  class SvixHttpClient
10
10
  def initialize(token, base_url)
11
11
  @token = token
12
- @base_url = base_url
12
+ # Strip trailing slashes so that `https://api.svix.com/` does not
13
+ # produce request URLs such as `https://api.svix.com//api/v1/app`.
14
+ @base_url = base_url.to_s.sub(%r{/+\z}, "")
13
15
  end
14
16
 
15
17
  def execute_request(method, path, **kwargs)
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.5.0"
4
+ VERSION = "2.6.0"
5
5
  end
data/lib/svix.rb CHANGED
@@ -95,6 +95,7 @@ require "svix/models/docusign_config_out"
95
95
  require "svix/models/easypost_config"
96
96
  require "svix/models/easypost_config_out"
97
97
  require "svix/models/empty_response"
98
+ require "svix/models/endpoint_attempt_stats"
98
99
  require "svix/models/endpoint_headers_in"
99
100
  require "svix/models/endpoint_headers_out"
100
101
  require "svix/models/endpoint_headers_patch_in"
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.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-09-11 00:00:00.000000000 Z
10
+ date: 2026-09-29 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: base64
@@ -206,6 +206,7 @@ files:
206
206
  - lib/svix/models/easypost_config.rb
207
207
  - lib/svix/models/easypost_config_out.rb
208
208
  - lib/svix/models/empty_response.rb
209
+ - lib/svix/models/endpoint_attempt_stats.rb
209
210
  - lib/svix/models/endpoint_headers_in.rb
210
211
  - lib/svix/models/endpoint_headers_out.rb
211
212
  - lib/svix/models/endpoint_headers_patch_in.rb