svix 1.63.0 → 1.63.1
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/management.rb +14 -0
- data/lib/svix/api/management_authentication.rb +52 -0
- data/lib/svix/models/api_token_censored_out.rb +61 -0
- data/lib/svix/models/api_token_expire_in.rb +46 -0
- data/lib/svix/models/api_token_in.rb +49 -0
- data/lib/svix/models/api_token_out.rb +61 -0
- data/lib/svix/models/list_response_api_token_censored_out.rb +58 -0
- data/lib/svix/svix.rb +2 -0
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +7 -0
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f5589093f0f4dd8596bce28ce58e6ec80b9a6cdecf9572f509412002b5f6901
|
4
|
+
data.tar.gz: 870f20327355c29482fdd2ce9610f14cc743b5e441305e3bc354be3cc30b28be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6954a8ce3191e51efef93f3bc42f5a85c7f8bb13ffd6d71060bf7b88656f0e4902bbc637891acd791df042d36cbba7b179b8e89a1151dd120248e1052c284cac
|
7
|
+
data.tar.gz: 777c8a844e5764aecffdba8188bf749266dfa4669ce7de99c3afd50d42fbb872fc23960141d9fabf4987ed99b8d69402f2bbfcfd1ffddd9ff9787094ccc5cf86
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
|
4
|
+
require "net/http"
|
5
|
+
|
6
|
+
module Svix
|
7
|
+
class Management
|
8
|
+
attr_accessor :authentication
|
9
|
+
def initialize(client)
|
10
|
+
@client = client
|
11
|
+
@authentication = ManagementAuthentication.new(client)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
|
4
|
+
require "net/http"
|
5
|
+
|
6
|
+
module Svix
|
7
|
+
class ManagementAuthentication
|
8
|
+
def initialize(client)
|
9
|
+
@client = client
|
10
|
+
end
|
11
|
+
|
12
|
+
def list_api_tokens(options = {})
|
13
|
+
options = options.transform_keys(&:to_s)
|
14
|
+
res = @client.execute_request(
|
15
|
+
"GET",
|
16
|
+
"/api/v1/management/authentication/api-token",
|
17
|
+
query_params: {
|
18
|
+
"limit" => options["limit"],
|
19
|
+
"iterator" => options["iterator"],
|
20
|
+
"order" => options["order"]
|
21
|
+
}
|
22
|
+
)
|
23
|
+
ListResponseApiTokenCensoredOut.deserialize(res)
|
24
|
+
end
|
25
|
+
|
26
|
+
def create_api_token(api_token_in, options = {})
|
27
|
+
options = options.transform_keys(&:to_s)
|
28
|
+
res = @client.execute_request(
|
29
|
+
"POST",
|
30
|
+
"/api/v1/management/authentication/api-token",
|
31
|
+
headers: {
|
32
|
+
"idempotency-key" => options["idempotency-key"]
|
33
|
+
},
|
34
|
+
body: api_token_in
|
35
|
+
)
|
36
|
+
ApiTokenOut.deserialize(res)
|
37
|
+
end
|
38
|
+
|
39
|
+
def expire_api_token(key_id, api_token_expire_in, options = {})
|
40
|
+
options = options.transform_keys(&:to_s)
|
41
|
+
@client.execute_request(
|
42
|
+
"POST",
|
43
|
+
"/api/v1/management/authentication/api-token/#{key_id}/expire",
|
44
|
+
headers: {
|
45
|
+
"idempotency-key" => options["idempotency-key"]
|
46
|
+
},
|
47
|
+
body: api_token_expire_in
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class ApiTokenCensoredOut
|
7
|
+
attr_accessor :censored_token
|
8
|
+
attr_accessor :created_at
|
9
|
+
attr_accessor :expires_at
|
10
|
+
attr_accessor :id
|
11
|
+
attr_accessor :name
|
12
|
+
attr_accessor :scopes
|
13
|
+
|
14
|
+
ALL_FIELD ||= ["censored_token", "created_at", "expires_at", "id", "name", "scopes"].freeze
|
15
|
+
private_constant :ALL_FIELD
|
16
|
+
|
17
|
+
def initialize(attributes = {})
|
18
|
+
unless attributes.is_a?(Hash)
|
19
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ApiTokenCensoredOut` new method")
|
20
|
+
end
|
21
|
+
|
22
|
+
attributes.each do |k, v|
|
23
|
+
unless ALL_FIELD.include?(k.to_s)
|
24
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::ApiTokenCensoredOut")
|
25
|
+
end
|
26
|
+
|
27
|
+
instance_variable_set("@#{k}", v)
|
28
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.deserialize(attributes = {})
|
33
|
+
attributes = attributes.transform_keys(&:to_s)
|
34
|
+
attrs = Hash.new
|
35
|
+
attrs["censored_token"] = attributes["censoredToken"]
|
36
|
+
attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
|
37
|
+
attrs["expires_at"] = DateTime.rfc3339(attributes["expiresAt"]).to_time if attributes["expiresAt"]
|
38
|
+
attrs["id"] = attributes["id"]
|
39
|
+
attrs["name"] = attributes["name"]
|
40
|
+
attrs["scopes"] = attributes["scopes"]
|
41
|
+
new(attrs)
|
42
|
+
end
|
43
|
+
|
44
|
+
def serialize
|
45
|
+
out = Hash.new
|
46
|
+
out["censoredToken"] = Svix::serialize_primitive(@censored_token) if @censored_token
|
47
|
+
out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
|
48
|
+
out["expiresAt"] = Svix::serialize_primitive(@expires_at) if @expires_at
|
49
|
+
out["id"] = Svix::serialize_primitive(@id) if @id
|
50
|
+
out["name"] = Svix::serialize_primitive(@name) if @name
|
51
|
+
out["scopes"] = Svix::serialize_primitive(@scopes) if @scopes
|
52
|
+
out
|
53
|
+
end
|
54
|
+
|
55
|
+
# Serializes the object to a json string
|
56
|
+
# @return String
|
57
|
+
def to_json
|
58
|
+
JSON.dump(serialize)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class ApiTokenExpireIn
|
7
|
+
attr_accessor :expiry
|
8
|
+
|
9
|
+
ALL_FIELD ||= ["expiry"].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::ApiTokenExpireIn` 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::ApiTokenExpireIn")
|
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["expiry"] = attributes["expiry"]
|
31
|
+
new(attrs)
|
32
|
+
end
|
33
|
+
|
34
|
+
def serialize
|
35
|
+
out = Hash.new
|
36
|
+
out["expiry"] = Svix::serialize_primitive(@expiry) if @expiry
|
37
|
+
out
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serializes the object to a json string
|
41
|
+
# @return String
|
42
|
+
def to_json
|
43
|
+
JSON.dump(serialize)
|
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 ApiTokenIn
|
7
|
+
attr_accessor :name
|
8
|
+
attr_accessor :scopes
|
9
|
+
|
10
|
+
ALL_FIELD ||= ["name", "scopes"].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::ApiTokenIn` 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::ApiTokenIn")
|
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["name"] = attributes["name"]
|
32
|
+
attrs["scopes"] = attributes["scopes"]
|
33
|
+
new(attrs)
|
34
|
+
end
|
35
|
+
|
36
|
+
def serialize
|
37
|
+
out = Hash.new
|
38
|
+
out["name"] = Svix::serialize_primitive(@name) if @name
|
39
|
+
out["scopes"] = Svix::serialize_primitive(@scopes) if @scopes
|
40
|
+
out
|
41
|
+
end
|
42
|
+
|
43
|
+
# Serializes the object to a json string
|
44
|
+
# @return String
|
45
|
+
def to_json
|
46
|
+
JSON.dump(serialize)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class ApiTokenOut
|
7
|
+
attr_accessor :created_at
|
8
|
+
attr_accessor :expires_at
|
9
|
+
attr_accessor :id
|
10
|
+
attr_accessor :name
|
11
|
+
attr_accessor :scopes
|
12
|
+
attr_accessor :token
|
13
|
+
|
14
|
+
ALL_FIELD ||= ["created_at", "expires_at", "id", "name", "scopes", "token"].freeze
|
15
|
+
private_constant :ALL_FIELD
|
16
|
+
|
17
|
+
def initialize(attributes = {})
|
18
|
+
unless attributes.is_a?(Hash)
|
19
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ApiTokenOut` new method")
|
20
|
+
end
|
21
|
+
|
22
|
+
attributes.each do |k, v|
|
23
|
+
unless ALL_FIELD.include?(k.to_s)
|
24
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::ApiTokenOut")
|
25
|
+
end
|
26
|
+
|
27
|
+
instance_variable_set("@#{k}", v)
|
28
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.deserialize(attributes = {})
|
33
|
+
attributes = attributes.transform_keys(&:to_s)
|
34
|
+
attrs = Hash.new
|
35
|
+
attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
|
36
|
+
attrs["expires_at"] = DateTime.rfc3339(attributes["expiresAt"]).to_time if attributes["expiresAt"]
|
37
|
+
attrs["id"] = attributes["id"]
|
38
|
+
attrs["name"] = attributes["name"]
|
39
|
+
attrs["scopes"] = attributes["scopes"]
|
40
|
+
attrs["token"] = attributes["token"]
|
41
|
+
new(attrs)
|
42
|
+
end
|
43
|
+
|
44
|
+
def serialize
|
45
|
+
out = Hash.new
|
46
|
+
out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
|
47
|
+
out["expiresAt"] = Svix::serialize_primitive(@expires_at) if @expires_at
|
48
|
+
out["id"] = Svix::serialize_primitive(@id) if @id
|
49
|
+
out["name"] = Svix::serialize_primitive(@name) if @name
|
50
|
+
out["scopes"] = Svix::serialize_primitive(@scopes) if @scopes
|
51
|
+
out["token"] = Svix::serialize_primitive(@token) if @token
|
52
|
+
out
|
53
|
+
end
|
54
|
+
|
55
|
+
# Serializes the object to a json string
|
56
|
+
# @return String
|
57
|
+
def to_json
|
58
|
+
JSON.dump(serialize)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class ListResponseApiTokenCensoredOut
|
7
|
+
attr_accessor :data
|
8
|
+
attr_accessor :done
|
9
|
+
attr_accessor :iterator
|
10
|
+
attr_accessor :prev_iterator
|
11
|
+
|
12
|
+
ALL_FIELD ||= ["data", "done", "iterator", "prev_iterator"].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::ListResponseApiTokenCensoredOut` 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::ListResponseApiTokenCensoredOut")
|
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["data"] = attributes["data"].map { |v| Svix::ApiTokenCensoredOut.deserialize(v) }
|
37
|
+
attrs["done"] = attributes["done"]
|
38
|
+
attrs["iterator"] = attributes["iterator"]
|
39
|
+
attrs["prev_iterator"] = attributes["prevIterator"]
|
40
|
+
new(attrs)
|
41
|
+
end
|
42
|
+
|
43
|
+
def serialize
|
44
|
+
out = Hash.new
|
45
|
+
out["data"] = @data.map { |v| v.serialize } if @data
|
46
|
+
out["done"] = Svix::serialize_primitive(@done) if @done
|
47
|
+
out["iterator"] = Svix::serialize_primitive(@iterator) if @iterator
|
48
|
+
out["prevIterator"] = Svix::serialize_primitive(@prev_iterator) if @prev_iterator
|
49
|
+
out
|
50
|
+
end
|
51
|
+
|
52
|
+
# Serializes the object to a json string
|
53
|
+
# @return String
|
54
|
+
def to_json
|
55
|
+
JSON.dump(serialize)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/lib/svix/svix.rb
CHANGED
@@ -21,6 +21,7 @@ module Svix
|
|
21
21
|
attr_accessor :health
|
22
22
|
attr_accessor :ingest
|
23
23
|
attr_accessor :integration
|
24
|
+
attr_accessor :management
|
24
25
|
attr_accessor :message
|
25
26
|
attr_accessor :message_attempt
|
26
27
|
attr_accessor :operational_webhook
|
@@ -51,6 +52,7 @@ module Svix
|
|
51
52
|
@health = Health.new(api_client)
|
52
53
|
@ingest = Ingest.new(api_client)
|
53
54
|
@integration = Integration.new(api_client)
|
55
|
+
@management = Management.new(api_client)
|
54
56
|
@message = Message.new(api_client)
|
55
57
|
@message_attempt = MessageAttempt.new(api_client)
|
56
58
|
@operational_webhook = OperationalWebhook.new(api_client)
|
data/lib/svix/version.rb
CHANGED
data/lib/svix.rb
CHANGED
@@ -20,6 +20,8 @@ require "svix/api/ingest"
|
|
20
20
|
require "svix/api/ingest_endpoint"
|
21
21
|
require "svix/api/ingest_source"
|
22
22
|
require "svix/api/integration"
|
23
|
+
require "svix/api/management"
|
24
|
+
require "svix/api/management_authentication"
|
23
25
|
require "svix/api/message"
|
24
26
|
require "svix/api/message_attempt"
|
25
27
|
require "svix/api/operational_webhook"
|
@@ -30,6 +32,10 @@ require "svix/api/statistics"
|
|
30
32
|
require "svix/models/adobe_sign_config"
|
31
33
|
require "svix/models/adobe_sign_config_out"
|
32
34
|
require "svix/models/aggregate_event_types_out"
|
35
|
+
require "svix/models/api_token_censored_out"
|
36
|
+
require "svix/models/api_token_expire_in"
|
37
|
+
require "svix/models/api_token_in"
|
38
|
+
require "svix/models/api_token_out"
|
33
39
|
require "svix/models/app_portal_access_in"
|
34
40
|
require "svix/models/app_portal_access_out"
|
35
41
|
require "svix/models/app_usage_stats_in"
|
@@ -104,6 +110,7 @@ require "svix/models/integration_in"
|
|
104
110
|
require "svix/models/integration_key_out"
|
105
111
|
require "svix/models/integration_out"
|
106
112
|
require "svix/models/integration_update"
|
113
|
+
require "svix/models/list_response_api_token_censored_out"
|
107
114
|
require "svix/models/list_response_application_out"
|
108
115
|
require "svix/models/list_response_background_task_out"
|
109
116
|
require "svix/models/list_response_endpoint_message_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: 1.63.
|
4
|
+
version: 1.63.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Svix
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03
|
10
|
+
date: 2025-04-03 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rake
|
@@ -75,6 +75,8 @@ files:
|
|
75
75
|
- lib/svix/api/ingest_endpoint.rb
|
76
76
|
- lib/svix/api/ingest_source.rb
|
77
77
|
- lib/svix/api/integration.rb
|
78
|
+
- lib/svix/api/management.rb
|
79
|
+
- lib/svix/api/management_authentication.rb
|
78
80
|
- lib/svix/api/message.rb
|
79
81
|
- lib/svix/api/message_attempt.rb
|
80
82
|
- lib/svix/api/operational_webhook.rb
|
@@ -88,6 +90,10 @@ files:
|
|
88
90
|
- lib/svix/models/adobe_sign_config.rb
|
89
91
|
- lib/svix/models/adobe_sign_config_out.rb
|
90
92
|
- lib/svix/models/aggregate_event_types_out.rb
|
93
|
+
- lib/svix/models/api_token_censored_out.rb
|
94
|
+
- lib/svix/models/api_token_expire_in.rb
|
95
|
+
- lib/svix/models/api_token_in.rb
|
96
|
+
- lib/svix/models/api_token_out.rb
|
91
97
|
- lib/svix/models/app_portal_access_in.rb
|
92
98
|
- lib/svix/models/app_portal_access_out.rb
|
93
99
|
- lib/svix/models/app_usage_stats_in.rb
|
@@ -163,6 +169,7 @@ files:
|
|
163
169
|
- lib/svix/models/integration_key_out.rb
|
164
170
|
- lib/svix/models/integration_out.rb
|
165
171
|
- lib/svix/models/integration_update.rb
|
172
|
+
- lib/svix/models/list_response_api_token_censored_out.rb
|
166
173
|
- lib/svix/models/list_response_application_out.rb
|
167
174
|
- lib/svix/models/list_response_background_task_out.rb
|
168
175
|
- lib/svix/models/list_response_endpoint_message_out.rb
|