svix 1.61.4 → 1.63.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/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/operational_webhook.rb +14 -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 +4 -0
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +6 -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 +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3f7a3dae74500278c76a5bb17fe22b794a98cc7a97d17ecb0118c29e2412793
|
4
|
+
data.tar.gz: 5e92f1b80338f2d7fe6215eb3cce535d2c4d7f02bf5b61e96ba7fbc4a052bbb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2a5452cfd741ec15bdc21e0f7065f21ef73c64e2d6754796ebe2c27565024761c5f07e81d72550680f288203e17fbfa399d1a4ef67948cf5435a7e3f70d79a2
|
7
|
+
data.tar.gz: 22217d29cec7dc8743bf6a3e740e51a3f624b0ce0f26c9f9ee022f406af4e0843ece058f33931c0e28c146da7911f80a0d6765d84506ffd84b4ff6ec8277ab60
|
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 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,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,11 @@ 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
|
23
24
|
attr_accessor :message
|
24
25
|
attr_accessor :message_attempt
|
26
|
+
attr_accessor :operational_webhook
|
25
27
|
attr_accessor :operational_webhook_endpoint
|
26
28
|
attr_accessor :statistics
|
27
29
|
|
@@ -47,9 +49,11 @@ module Svix
|
|
47
49
|
@environment = Environment.new(api_client)
|
48
50
|
@event_type = EventType.new(api_client)
|
49
51
|
@health = Health.new(api_client)
|
52
|
+
@ingest = Ingest.new(api_client)
|
50
53
|
@integration = Integration.new(api_client)
|
51
54
|
@message = Message.new(api_client)
|
52
55
|
@message_attempt = MessageAttempt.new(api_client)
|
56
|
+
@operational_webhook = OperationalWebhook.new(api_client)
|
53
57
|
@operational_webhook_endpoint = OperationalWebhookEndpoint.new(api_client)
|
54
58
|
@statistics = Statistics.new(api_client)
|
55
59
|
end
|
data/lib/svix/version.rb
CHANGED
data/lib/svix.rb
CHANGED
@@ -14,6 +14,7 @@ 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"
|
@@ -21,6 +22,7 @@ require "svix/api/ingest_source"
|
|
21
22
|
require "svix/api/integration"
|
22
23
|
require "svix/api/message"
|
23
24
|
require "svix/api/message_attempt"
|
25
|
+
require "svix/api/operational_webhook"
|
24
26
|
require "svix/api/operational_webhook_endpoint"
|
25
27
|
require "svix/api/statistics"
|
26
28
|
|
@@ -135,6 +137,10 @@ require "svix/models/operational_webhook_endpoint_secret_in"
|
|
135
137
|
require "svix/models/operational_webhook_endpoint_secret_out"
|
136
138
|
require "svix/models/operational_webhook_endpoint_update"
|
137
139
|
require "svix/models/ordering"
|
140
|
+
require "svix/models/polling_endpoint_consumer_seek_in"
|
141
|
+
require "svix/models/polling_endpoint_consumer_seek_out"
|
142
|
+
require "svix/models/polling_endpoint_message_out"
|
143
|
+
require "svix/models/polling_endpoint_out"
|
138
144
|
require "svix/models/recover_in"
|
139
145
|
require "svix/models/recover_out"
|
140
146
|
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.0
|
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-03-31 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rake
|
@@ -69,6 +69,7 @@ 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
|
@@ -76,6 +77,7 @@ files:
|
|
76
77
|
- lib/svix/api/integration.rb
|
77
78
|
- lib/svix/api/message.rb
|
78
79
|
- lib/svix/api/message_attempt.rb
|
80
|
+
- lib/svix/api/operational_webhook.rb
|
79
81
|
- lib/svix/api/operational_webhook_endpoint.rb
|
80
82
|
- lib/svix/api/statistics.rb
|
81
83
|
- lib/svix/api_error.rb
|
@@ -194,6 +196,10 @@ files:
|
|
194
196
|
- lib/svix/models/operational_webhook_endpoint_secret_out.rb
|
195
197
|
- lib/svix/models/operational_webhook_endpoint_update.rb
|
196
198
|
- lib/svix/models/ordering.rb
|
199
|
+
- lib/svix/models/polling_endpoint_consumer_seek_in.rb
|
200
|
+
- lib/svix/models/polling_endpoint_consumer_seek_out.rb
|
201
|
+
- lib/svix/models/polling_endpoint_message_out.rb
|
202
|
+
- lib/svix/models/polling_endpoint_out.rb
|
197
203
|
- lib/svix/models/recover_in.rb
|
198
204
|
- lib/svix/models/recover_out.rb
|
199
205
|
- lib/svix/models/replay_in.rb
|