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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/svix/api/destination.rb +13 -0
- data/lib/svix/api/endpoint.rb +2 -1
- data/lib/svix/api/streaming_sink.rb +1 -1
- data/lib/svix/models/destination_secret_rotate_out.rb +53 -0
- data/lib/svix/models/sink_secret_rotate_out.rb +50 -0
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 473ce371b4fad4bd881f5c78f9a097aa966621224cf75799a75865e82d3b1034
|
|
4
|
+
data.tar.gz: 4fdd92b272002cb0fa770939f7310364024f38281242eff151bee692383fe6a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c27e2a4e758ec3ff6cf6f182a27cffb362e948d6a8c656ce4955164484ca7473c66b2c95b3f9e3f228d40c797216a73165741073af11f62fa885703ee1782171
|
|
7
|
+
data.tar.gz: a6722c45076c6e42c956507baf4e9d6c91c0fbe923249fe8efd3295165b7300b92f01ef87c3713b4803e6a22f584599342395a7c644ba6b12a28e732ccadc7a4
|
data/Gemfile.lock
CHANGED
data/lib/svix/api/destination.rb
CHANGED
|
@@ -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
|
data/lib/svix/api/endpoint.rb
CHANGED
|
@@ -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)
|
|
@@ -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
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.
|
|
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-
|
|
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
|