svix 2.6.2 → 2.7.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: fe89cb5d8971fdad2ddbde11b67036dedcde034cac1009628dce96e762361b96
4
- data.tar.gz: 8f4025f16edbc61f5a1cd87fd906bb94610c1eb9a4b3c44772ef188d402430d7
3
+ metadata.gz: 473ce371b4fad4bd881f5c78f9a097aa966621224cf75799a75865e82d3b1034
4
+ data.tar.gz: 4fdd92b272002cb0fa770939f7310364024f38281242eff151bee692383fe6a1
5
5
  SHA512:
6
- metadata.gz: 793e92aa68ea92db38be15824998cfdf2815fc9f3b7972e793b844da45cbacd728a265d02a03b8f84a973ede601e18cb18901ca7fae788eaa95e31390a5db80f
7
- data.tar.gz: 5306a258f6a82fb0803156e88f60c6d1d8120f04e3412037a28506426fdf9a8fcea33de2483e55f99a842295486d784781e60f14b6214e98fc6b70e2fb2eb171
6
+ metadata.gz: c27e2a4e758ec3ff6cf6f182a27cffb362e948d6a8c656ce4955164484ca7473c66b2c95b3f9e3f228d40c797216a73165741073af11f62fa885703ee1782171
7
+ data.tar.gz: a6722c45076c6e42c956507baf4e9d6c91c0fbe923249fe8efd3295165b7300b92f01ef87c3713b4803e6a22f584599342395a7c644ba6b12a28e732ccadc7a4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (2.6.2)
4
+ svix (2.7.0)
5
5
  base64 (~> 0.3.0)
6
6
  logger (~> 1.0)
7
7
 
@@ -71,5 +71,18 @@ module Svix
71
71
  DestinationOut.deserialize(res)
72
72
  end
73
73
 
74
+ def rotate_secret(app_id, destination_id, endpoint_secret_rotate_in, options = {})
75
+ options = options.transform_keys(&:to_s)
76
+ res = @client.execute_request(
77
+ "POST",
78
+ "/api/v1/app/#{app_id}/destination/#{destination_id}/secret/rotate",
79
+ headers: {
80
+ "idempotency-key" => options["idempotency-key"]
81
+ },
82
+ body: endpoint_secret_rotate_in
83
+ )
84
+ DestinationSecretRotateOut.deserialize(res)
85
+ end
86
+
74
87
  end
75
88
  end
@@ -81,7 +81,7 @@ module Svix
81
81
 
82
82
  def rotate_secret(app_id, endpoint_id, endpoint_secret_rotate_in, options = {})
83
83
  options = options.transform_keys(&:to_s)
84
- @client.execute_request(
84
+ res = @client.execute_request(
85
85
  "POST",
86
86
  "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/secret/rotate",
87
87
  headers: {
@@ -89,6 +89,7 @@ module Svix
89
89
  },
90
90
  body: endpoint_secret_rotate_in
91
91
  )
92
+ EndpointSecretOut.deserialize(res)
92
93
  end
93
94
 
94
95
  def get_headers(app_id, endpoint_id)
@@ -89,7 +89,7 @@ module Svix
89
89
  },
90
90
  body: endpoint_secret_rotate_in
91
91
  )
92
- EmptyResponse.deserialize(res)
92
+ SinkSecretRotateOut.deserialize(res)
93
93
  end
94
94
 
95
95
  end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class DestinationSecretRotateOut
7
+ # The endpoint's verification secret.
8
+ #
9
+ # Format: `base64` encoded random bytes optionally prefixed with `whsec_`.
10
+ # It is recommended to not set this and let the server generate the secret.
11
+ attr_accessor :key
12
+
13
+ ALL_FIELD ||= ["key"].freeze
14
+ private_constant :ALL_FIELD
15
+
16
+ def initialize(attributes = {})
17
+ unless attributes.is_a?(Hash)
18
+ fail(
19
+ ArgumentError,
20
+ "The input argument (attributes) must be a hash in `Svix::DestinationSecretRotateOut` new method"
21
+ )
22
+ end
23
+
24
+ attributes.each do |k, v|
25
+ unless ALL_FIELD.include?(k.to_s)
26
+ fail(ArgumentError, "The field #{k} is not part of Svix::DestinationSecretRotateOut")
27
+ end
28
+
29
+ instance_variable_set("@#{k}", v)
30
+ instance_variable_set("@__#{k}_is_defined", true)
31
+ end
32
+ end
33
+
34
+ def self.deserialize(attributes = {})
35
+ attributes = attributes.transform_keys(&:to_s)
36
+ attrs = Hash.new
37
+ attrs["key"] = attributes["key"]
38
+ new(attrs)
39
+ end
40
+
41
+ def serialize
42
+ out = Hash.new
43
+ out["key"] = Svix::serialize_primitive(@key) unless @key.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
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class SinkSecretRotateOut
7
+ # The endpoint's verification secret.
8
+ #
9
+ # Format: `base64` encoded random bytes optionally prefixed with `whsec_`.
10
+ # It is recommended to not set this and let the server generate the secret.
11
+ attr_accessor :key
12
+
13
+ ALL_FIELD ||= ["key"].freeze
14
+ private_constant :ALL_FIELD
15
+
16
+ def initialize(attributes = {})
17
+ unless attributes.is_a?(Hash)
18
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::SinkSecretRotateOut` new method")
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::SinkSecretRotateOut")
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["key"] = attributes["key"]
35
+ new(attrs)
36
+ end
37
+
38
+ def serialize
39
+ out = Hash.new
40
+ out["key"] = Svix::serialize_primitive(@key) unless @key.nil?
41
+ out
42
+ end
43
+
44
+ # Serializes the object to a json string
45
+ # @return String
46
+ def to_json(*args)
47
+ serialize.to_json(*args)
48
+ end
49
+ end
50
+ end
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.6.2"
4
+ VERSION = "2.7.0"
5
5
  end
data/lib/svix.rb CHANGED
@@ -87,6 +87,7 @@ require "svix/models/cron_config"
87
87
  require "svix/models/destination_in"
88
88
  require "svix/models/destination_out"
89
89
  require "svix/models/destination_patch"
90
+ require "svix/models/destination_secret_rotate_out"
90
91
  require "svix/models/destination_status"
91
92
  require "svix/models/destination_status_in"
92
93
  require "svix/models/destination_transform_in"
@@ -241,6 +242,7 @@ require "svix/models/sink_http_config_in"
241
242
  require "svix/models/sink_http_config_out"
242
243
  require "svix/models/sink_http_config_patch"
243
244
  require "svix/models/sink_secret_out"
245
+ require "svix/models/sink_secret_rotate_out"
244
246
  require "svix/models/sink_status"
245
247
  require "svix/models/sink_status_in"
246
248
  require "svix/models/sink_transform_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.6.2
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-10-05 00:00:00.000000000 Z
10
+ date: 2026-10-06 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: base64
@@ -198,6 +198,7 @@ files:
198
198
  - lib/svix/models/destination_in.rb
199
199
  - lib/svix/models/destination_out.rb
200
200
  - lib/svix/models/destination_patch.rb
201
+ - lib/svix/models/destination_secret_rotate_out.rb
201
202
  - lib/svix/models/destination_status.rb
202
203
  - lib/svix/models/destination_status_in.rb
203
204
  - lib/svix/models/destination_transform_in.rb
@@ -356,6 +357,7 @@ files:
356
357
  - lib/svix/models/sink_http_config_patch.rb
357
358
  - lib/svix/models/sink_in_common.rb
358
359
  - lib/svix/models/sink_secret_out.rb
360
+ - lib/svix/models/sink_secret_rotate_out.rb
359
361
  - lib/svix/models/sink_status.rb
360
362
  - lib/svix/models/sink_status_in.rb
361
363
  - lib/svix/models/sink_transform_in.rb