svix 1.62.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/application.rb +1 -1
- data/lib/svix/api/events_public.rb +41 -0
- data/lib/svix/api/ingest.rb +4 -0
- data/lib/svix/api/management.rb +14 -0
- data/lib/svix/api/management_authentication.rb +52 -0
- data/lib/svix/api/operational_webhook.rb +14 -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/models/polling_endpoint_consumer_seek_in.rb +49 -0
- data/lib/svix/models/polling_endpoint_consumer_seek_out.rb +49 -0
- data/lib/svix/models/polling_endpoint_message_out.rb +71 -0
- data/lib/svix/models/polling_endpoint_out.rb +52 -0
- data/lib/svix/svix.rb +6 -0
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +13 -0
- data/templates/api_extra/application_create.rb +1 -1
- data/templates/api_resource.rb.jinja +7 -0
- data/templates/summary.rb.jinja +0 -2
- metadata +15 -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
data/lib/svix/api/application.rb
CHANGED
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
|
4
|
+
require "net/http"
|
5
|
+
|
6
|
+
module Svix
|
7
|
+
class EventsPublic
|
8
|
+
def initialize(client)
|
9
|
+
@client = client
|
10
|
+
end
|
11
|
+
|
12
|
+
def consumer(app_id, sink_id, consumer_id, options = {})
|
13
|
+
options = options.transform_keys(&:to_s)
|
14
|
+
res = @client.execute_request(
|
15
|
+
"GET",
|
16
|
+
"/api/v1/app/#{app_id}/poller/#{sink_id}/consumer/#{consumer_id}",
|
17
|
+
query_params: {
|
18
|
+
"limit" => options["limit"],
|
19
|
+
"iterator" => options["iterator"],
|
20
|
+
"event_type" => options["event_type"],
|
21
|
+
"channel" => options["channel"]
|
22
|
+
}
|
23
|
+
)
|
24
|
+
PollingEndpointOut.deserialize(res)
|
25
|
+
end
|
26
|
+
|
27
|
+
def consumer_seek(app_id, sink_id, consumer_id, polling_endpoint_consumer_seek_in, options = {})
|
28
|
+
options = options.transform_keys(&:to_s)
|
29
|
+
res = @client.execute_request(
|
30
|
+
"POST",
|
31
|
+
"/api/v1/app/#{app_id}/poller/#{sink_id}/consumer/#{consumer_id}/seek",
|
32
|
+
headers: {
|
33
|
+
"idempotency-key" => options["idempotency-key"]
|
34
|
+
},
|
35
|
+
body: polling_endpoint_consumer_seek_in
|
36
|
+
)
|
37
|
+
PollingEndpointConsumerSeekOut.deserialize(res)
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
data/lib/svix/api/ingest.rb
CHANGED
@@ -5,8 +5,12 @@ require "net/http"
|
|
5
5
|
|
6
6
|
module Svix
|
7
7
|
class Ingest
|
8
|
+
attr_accessor :endpoint
|
9
|
+
attr_accessor :source
|
8
10
|
def initialize(client)
|
9
11
|
@client = client
|
12
|
+
@endpoint = IngestEndpoint.new(client)
|
13
|
+
@source = IngestSource.new(client)
|
10
14
|
end
|
11
15
|
|
12
16
|
def dashboard(source_id, ingest_source_consumer_portal_access_in, options = {})
|
@@ -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,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
|
4
|
+
require "net/http"
|
5
|
+
|
6
|
+
module Svix
|
7
|
+
class OperationalWebhook
|
8
|
+
attr_accessor :endpoint
|
9
|
+
def initialize(client)
|
10
|
+
@client = client
|
11
|
+
@endpoint = OperationalWebhookEndpoint.new(client)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
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
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class PollingEndpointConsumerSeekIn
|
7
|
+
attr_accessor :after
|
8
|
+
|
9
|
+
ALL_FIELD ||= ["after"].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::PollingEndpointConsumerSeekIn` 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::PollingEndpointConsumerSeekIn")
|
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["after"] = DateTime.rfc3339(attributes["after"]).to_time
|
34
|
+
new(attrs)
|
35
|
+
end
|
36
|
+
|
37
|
+
def serialize
|
38
|
+
out = Hash.new
|
39
|
+
out["after"] = Svix::serialize_primitive(@after) if @after
|
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,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class PollingEndpointConsumerSeekOut
|
7
|
+
attr_accessor :iterator
|
8
|
+
|
9
|
+
ALL_FIELD ||= ["iterator"].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::PollingEndpointConsumerSeekOut` 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::PollingEndpointConsumerSeekOut")
|
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["iterator"] = attributes["iterator"]
|
34
|
+
new(attrs)
|
35
|
+
end
|
36
|
+
|
37
|
+
def serialize
|
38
|
+
out = Hash.new
|
39
|
+
out["iterator"] = Svix::serialize_primitive(@iterator) if @iterator
|
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,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# The MessageOut equivalent of polling endpoint
|
7
|
+
class PollingEndpointMessageOut
|
8
|
+
attr_accessor :channels
|
9
|
+
attr_accessor :event_id
|
10
|
+
attr_accessor :event_type
|
11
|
+
attr_accessor :headers
|
12
|
+
attr_accessor :id
|
13
|
+
attr_accessor :payload
|
14
|
+
attr_accessor :tags
|
15
|
+
attr_accessor :timestamp
|
16
|
+
|
17
|
+
ALL_FIELD ||= ["channels", "event_id", "event_type", "headers", "id", "payload", "tags", "timestamp"].freeze
|
18
|
+
private_constant :ALL_FIELD
|
19
|
+
|
20
|
+
def initialize(attributes = {})
|
21
|
+
unless attributes.is_a?(Hash)
|
22
|
+
fail(
|
23
|
+
ArgumentError,
|
24
|
+
"The input argument (attributes) must be a hash in `Svix::PollingEndpointMessageOut` new method"
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
attributes.each do |k, v|
|
29
|
+
unless ALL_FIELD.include?(k.to_s)
|
30
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::PollingEndpointMessageOut")
|
31
|
+
end
|
32
|
+
|
33
|
+
instance_variable_set("@#{k}", v)
|
34
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.deserialize(attributes = {})
|
39
|
+
attributes = attributes.transform_keys(&:to_s)
|
40
|
+
attrs = Hash.new
|
41
|
+
attrs["channels"] = attributes["channels"]
|
42
|
+
attrs["event_id"] = attributes["eventId"]
|
43
|
+
attrs["event_type"] = attributes["eventType"]
|
44
|
+
attrs["headers"] = attributes["headers"]
|
45
|
+
attrs["id"] = attributes["id"]
|
46
|
+
attrs["payload"] = attributes["payload"]
|
47
|
+
attrs["tags"] = attributes["tags"]
|
48
|
+
attrs["timestamp"] = DateTime.rfc3339(attributes["timestamp"]).to_time
|
49
|
+
new(attrs)
|
50
|
+
end
|
51
|
+
|
52
|
+
def serialize
|
53
|
+
out = Hash.new
|
54
|
+
out["channels"] = Svix::serialize_primitive(@channels) if @channels
|
55
|
+
out["eventId"] = Svix::serialize_primitive(@event_id) if @event_id
|
56
|
+
out["eventType"] = Svix::serialize_primitive(@event_type) if @event_type
|
57
|
+
out["headers"] = Svix::serialize_primitive(@headers) if @headers
|
58
|
+
out["id"] = Svix::serialize_primitive(@id) if @id
|
59
|
+
out["payload"] = Svix::serialize_primitive(@payload) if @payload
|
60
|
+
out["tags"] = Svix::serialize_primitive(@tags) if @tags
|
61
|
+
out["timestamp"] = Svix::serialize_primitive(@timestamp) if @timestamp
|
62
|
+
out
|
63
|
+
end
|
64
|
+
|
65
|
+
# Serializes the object to a json string
|
66
|
+
# @return String
|
67
|
+
def to_json
|
68
|
+
JSON.dump(serialize)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class PollingEndpointOut
|
7
|
+
attr_accessor :data
|
8
|
+
attr_accessor :done
|
9
|
+
attr_accessor :iterator
|
10
|
+
|
11
|
+
ALL_FIELD ||= ["data", "done", "iterator"].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::PollingEndpointOut` 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::PollingEndpointOut")
|
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["data"] = attributes["data"].map { |v| Svix::PollingEndpointMessageOut.deserialize(v) }
|
33
|
+
attrs["done"] = attributes["done"]
|
34
|
+
attrs["iterator"] = attributes["iterator"]
|
35
|
+
new(attrs)
|
36
|
+
end
|
37
|
+
|
38
|
+
def serialize
|
39
|
+
out = Hash.new
|
40
|
+
out["data"] = @data.map { |v| v.serialize } if @data
|
41
|
+
out["done"] = Svix::serialize_primitive(@done) if @done
|
42
|
+
out["iterator"] = Svix::serialize_primitive(@iterator) if @iterator
|
43
|
+
out
|
44
|
+
end
|
45
|
+
|
46
|
+
# Serializes the object to a json string
|
47
|
+
# @return String
|
48
|
+
def to_json
|
49
|
+
JSON.dump(serialize)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/lib/svix/svix.rb
CHANGED
@@ -19,9 +19,12 @@ module Svix
|
|
19
19
|
attr_accessor :environment
|
20
20
|
attr_accessor :event_type
|
21
21
|
attr_accessor :health
|
22
|
+
attr_accessor :ingest
|
22
23
|
attr_accessor :integration
|
24
|
+
attr_accessor :management
|
23
25
|
attr_accessor :message
|
24
26
|
attr_accessor :message_attempt
|
27
|
+
attr_accessor :operational_webhook
|
25
28
|
attr_accessor :operational_webhook_endpoint
|
26
29
|
attr_accessor :statistics
|
27
30
|
|
@@ -47,9 +50,12 @@ module Svix
|
|
47
50
|
@environment = Environment.new(api_client)
|
48
51
|
@event_type = EventType.new(api_client)
|
49
52
|
@health = Health.new(api_client)
|
53
|
+
@ingest = Ingest.new(api_client)
|
50
54
|
@integration = Integration.new(api_client)
|
55
|
+
@management = Management.new(api_client)
|
51
56
|
@message = Message.new(api_client)
|
52
57
|
@message_attempt = MessageAttempt.new(api_client)
|
58
|
+
@operational_webhook = OperationalWebhook.new(api_client)
|
53
59
|
@operational_webhook_endpoint = OperationalWebhookEndpoint.new(api_client)
|
54
60
|
@statistics = Statistics.new(api_client)
|
55
61
|
end
|
data/lib/svix/version.rb
CHANGED
data/lib/svix.rb
CHANGED
@@ -14,13 +14,17 @@ require "svix/api/background_task"
|
|
14
14
|
require "svix/api/endpoint"
|
15
15
|
require "svix/api/environment"
|
16
16
|
require "svix/api/event_type"
|
17
|
+
require "svix/api/events_public"
|
17
18
|
require "svix/api/health"
|
18
19
|
require "svix/api/ingest"
|
19
20
|
require "svix/api/ingest_endpoint"
|
20
21
|
require "svix/api/ingest_source"
|
21
22
|
require "svix/api/integration"
|
23
|
+
require "svix/api/management"
|
24
|
+
require "svix/api/management_authentication"
|
22
25
|
require "svix/api/message"
|
23
26
|
require "svix/api/message_attempt"
|
27
|
+
require "svix/api/operational_webhook"
|
24
28
|
require "svix/api/operational_webhook_endpoint"
|
25
29
|
require "svix/api/statistics"
|
26
30
|
|
@@ -28,6 +32,10 @@ require "svix/api/statistics"
|
|
28
32
|
require "svix/models/adobe_sign_config"
|
29
33
|
require "svix/models/adobe_sign_config_out"
|
30
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"
|
31
39
|
require "svix/models/app_portal_access_in"
|
32
40
|
require "svix/models/app_portal_access_out"
|
33
41
|
require "svix/models/app_usage_stats_in"
|
@@ -102,6 +110,7 @@ require "svix/models/integration_in"
|
|
102
110
|
require "svix/models/integration_key_out"
|
103
111
|
require "svix/models/integration_out"
|
104
112
|
require "svix/models/integration_update"
|
113
|
+
require "svix/models/list_response_api_token_censored_out"
|
105
114
|
require "svix/models/list_response_application_out"
|
106
115
|
require "svix/models/list_response_background_task_out"
|
107
116
|
require "svix/models/list_response_endpoint_message_out"
|
@@ -135,6 +144,10 @@ require "svix/models/operational_webhook_endpoint_secret_in"
|
|
135
144
|
require "svix/models/operational_webhook_endpoint_secret_out"
|
136
145
|
require "svix/models/operational_webhook_endpoint_update"
|
137
146
|
require "svix/models/ordering"
|
147
|
+
require "svix/models/polling_endpoint_consumer_seek_in"
|
148
|
+
require "svix/models/polling_endpoint_consumer_seek_out"
|
149
|
+
require "svix/models/polling_endpoint_message_out"
|
150
|
+
require "svix/models/polling_endpoint_out"
|
138
151
|
require "svix/models/recover_in"
|
139
152
|
require "svix/models/recover_out"
|
140
153
|
require "svix/models/replay_in"
|
@@ -11,8 +11,15 @@ module Svix
|
|
11
11
|
{% include "api_extra/message.rb" %}
|
12
12
|
{% endif -%}
|
13
13
|
class {{ resource_type_name }}
|
14
|
+
{% for name, _ in resource.subresources | items -%}
|
15
|
+
attr_accessor :{{ name | to_snake_case }}
|
16
|
+
{% endfor -%}
|
17
|
+
|
14
18
|
def initialize(client)
|
15
19
|
@client = client
|
20
|
+
{%- for name, sub in resource.subresources | items %}
|
21
|
+
@{{ name | to_snake_case }} = {{ sub.name | to_upper_camel_case }}.new(client)
|
22
|
+
{%- endfor %}
|
16
23
|
end
|
17
24
|
{% for op in resource.operations %}
|
18
25
|
{% set func_args -%}
|
data/templates/summary.rb.jinja
CHANGED
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.
|
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
|
@@ -69,13 +69,17 @@ files:
|
|
69
69
|
- lib/svix/api/endpoint.rb
|
70
70
|
- lib/svix/api/environment.rb
|
71
71
|
- lib/svix/api/event_type.rb
|
72
|
+
- lib/svix/api/events_public.rb
|
72
73
|
- lib/svix/api/health.rb
|
73
74
|
- lib/svix/api/ingest.rb
|
74
75
|
- lib/svix/api/ingest_endpoint.rb
|
75
76
|
- lib/svix/api/ingest_source.rb
|
76
77
|
- lib/svix/api/integration.rb
|
78
|
+
- lib/svix/api/management.rb
|
79
|
+
- lib/svix/api/management_authentication.rb
|
77
80
|
- lib/svix/api/message.rb
|
78
81
|
- lib/svix/api/message_attempt.rb
|
82
|
+
- lib/svix/api/operational_webhook.rb
|
79
83
|
- lib/svix/api/operational_webhook_endpoint.rb
|
80
84
|
- lib/svix/api/statistics.rb
|
81
85
|
- lib/svix/api_error.rb
|
@@ -86,6 +90,10 @@ files:
|
|
86
90
|
- lib/svix/models/adobe_sign_config.rb
|
87
91
|
- lib/svix/models/adobe_sign_config_out.rb
|
88
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
|
89
97
|
- lib/svix/models/app_portal_access_in.rb
|
90
98
|
- lib/svix/models/app_portal_access_out.rb
|
91
99
|
- lib/svix/models/app_usage_stats_in.rb
|
@@ -161,6 +169,7 @@ files:
|
|
161
169
|
- lib/svix/models/integration_key_out.rb
|
162
170
|
- lib/svix/models/integration_out.rb
|
163
171
|
- lib/svix/models/integration_update.rb
|
172
|
+
- lib/svix/models/list_response_api_token_censored_out.rb
|
164
173
|
- lib/svix/models/list_response_application_out.rb
|
165
174
|
- lib/svix/models/list_response_background_task_out.rb
|
166
175
|
- lib/svix/models/list_response_endpoint_message_out.rb
|
@@ -194,6 +203,10 @@ files:
|
|
194
203
|
- lib/svix/models/operational_webhook_endpoint_secret_out.rb
|
195
204
|
- lib/svix/models/operational_webhook_endpoint_update.rb
|
196
205
|
- lib/svix/models/ordering.rb
|
206
|
+
- lib/svix/models/polling_endpoint_consumer_seek_in.rb
|
207
|
+
- lib/svix/models/polling_endpoint_consumer_seek_out.rb
|
208
|
+
- lib/svix/models/polling_endpoint_message_out.rb
|
209
|
+
- lib/svix/models/polling_endpoint_out.rb
|
197
210
|
- lib/svix/models/recover_in.rb
|
198
211
|
- lib/svix/models/recover_out.rb
|
199
212
|
- lib/svix/models/replay_in.rb
|