svix 1.89.0 → 1.91.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 +21 -19
- data/lib/svix/api/application.rb +1 -0
- data/lib/svix/api/authentication.rb +23 -0
- data/lib/svix/api/endpoint.rb +13 -0
- data/lib/svix/models/aggregate_event_types_out.rb +4 -1
- data/lib/svix/models/amazon_s3_patch_config.rb +4 -1
- data/lib/svix/models/app_usage_stats_out.rb +4 -1
- data/lib/svix/models/application_in.rb +9 -1
- data/lib/svix/models/application_out.rb +10 -2
- data/lib/svix/models/background_task_out.rb +4 -1
- data/lib/svix/models/background_task_type.rb +1 -1
- data/lib/svix/models/bulk_replay_in.rb +67 -0
- data/lib/svix/models/endpoint_in.rb +8 -0
- data/lib/svix/models/endpoint_out.rb +6 -0
- data/lib/svix/models/endpoint_patch.rb +8 -0
- data/lib/svix/models/endpoint_update.rb +8 -0
- data/lib/svix/models/event_type_from_open_api.rb +1 -0
- data/lib/svix/models/event_type_in.rb +1 -1
- data/lib/svix/models/event_type_patch.rb +1 -0
- data/lib/svix/models/event_type_update.rb +1 -0
- data/lib/svix/models/expunge_all_contents_out.rb +4 -1
- data/lib/svix/models/ingest_source_in.rb +9 -0
- data/lib/svix/models/ingest_source_out.rb +9 -0
- data/lib/svix/models/message_endpoint_out.rb +6 -0
- data/lib/svix/models/meta_config.rb +49 -0
- data/lib/svix/models/meta_config_out.rb +43 -0
- data/lib/svix/models/recover_out.rb +4 -1
- data/lib/svix/models/replay_out.rb +4 -1
- data/lib/svix/models/s3_config.rb +4 -1
- data/lib/svix/models/stream_token_expire_in.rb +53 -0
- data/lib/svix/svix_http_client.rb +2 -1
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +4 -0
- data/svix.gemspec +5 -0
- metadata +35 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a522996ed23d6da5fdac13787e4394403675df0b649b5ac32f637132a092ac4f
|
|
4
|
+
data.tar.gz: c7d0a2b1b531217006af323b48225496fd1ca366e13adf1dba20015418c31764
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bab29dc752c36020209420053d91f436f452e49364f7899f70777c6a77a36644cff16364a3421c3071efafcc422c1ce490ee52b78ab2052dbcf7c42fa2b02bf7
|
|
7
|
+
data.tar.gz: 255813344b3d166299b495c23daabe94a75d7130d84802c284fc3039ff2860870d94484dece8e79f39a66908ce5b72416f6a26159333c9865fd15bec32c387ed
|
data/Gemfile.lock
CHANGED
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
svix (1.
|
|
4
|
+
svix (1.91.0)
|
|
5
|
+
base64 (~> 0.3.0)
|
|
6
|
+
logger (~> 1.0)
|
|
5
7
|
|
|
6
8
|
GEM
|
|
7
9
|
remote: https://rubygems.org/
|
|
8
10
|
specs:
|
|
9
|
-
addressable (2.
|
|
10
|
-
public_suffix (>= 2.0.2, <
|
|
11
|
-
base64 (0.
|
|
12
|
-
bigdecimal (
|
|
13
|
-
crack (1.0.
|
|
11
|
+
addressable (2.9.0)
|
|
12
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
13
|
+
base64 (0.3.0)
|
|
14
|
+
bigdecimal (4.1.1)
|
|
15
|
+
crack (1.0.1)
|
|
14
16
|
bigdecimal
|
|
15
17
|
rexml
|
|
16
|
-
diff-lcs (1.6.
|
|
17
|
-
hashdiff (1.1
|
|
18
|
-
logger (1.
|
|
19
|
-
ostruct (0.6.
|
|
20
|
-
public_suffix (
|
|
21
|
-
rake (13.
|
|
22
|
-
rexml (3.4.
|
|
23
|
-
rspec (3.13.
|
|
18
|
+
diff-lcs (1.6.2)
|
|
19
|
+
hashdiff (1.2.1)
|
|
20
|
+
logger (1.7.0)
|
|
21
|
+
ostruct (0.6.3)
|
|
22
|
+
public_suffix (7.0.5)
|
|
23
|
+
rake (13.4.1)
|
|
24
|
+
rexml (3.4.4)
|
|
25
|
+
rspec (3.13.2)
|
|
24
26
|
rspec-core (~> 3.13.0)
|
|
25
27
|
rspec-expectations (~> 3.13.0)
|
|
26
28
|
rspec-mocks (~> 3.13.0)
|
|
27
|
-
rspec-core (3.13.
|
|
29
|
+
rspec-core (3.13.6)
|
|
28
30
|
rspec-support (~> 3.13.0)
|
|
29
|
-
rspec-expectations (3.13.
|
|
31
|
+
rspec-expectations (3.13.5)
|
|
30
32
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
31
33
|
rspec-support (~> 3.13.0)
|
|
32
|
-
rspec-mocks (3.13.
|
|
34
|
+
rspec-mocks (3.13.8)
|
|
33
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
34
36
|
rspec-support (~> 3.13.0)
|
|
35
|
-
rspec-support (3.13.
|
|
36
|
-
webmock (3.
|
|
37
|
+
rspec-support (3.13.7)
|
|
38
|
+
webmock (3.26.2)
|
|
37
39
|
addressable (>= 2.8.0)
|
|
38
40
|
crack (>= 0.3.2)
|
|
39
41
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/lib/svix/api/application.rb
CHANGED
|
@@ -17,6 +17,7 @@ module Svix
|
|
|
17
17
|
query_params: {
|
|
18
18
|
"exclude_apps_with_no_endpoints" => options["exclude_apps_with_no_endpoints"],
|
|
19
19
|
"exclude_apps_with_disabled_endpoints" => options["exclude_apps_with_disabled_endpoints"],
|
|
20
|
+
"exclude_apps_with_svix_play_endpoints" => options["exclude_apps_with_svix_play_endpoints"],
|
|
20
21
|
"limit" => options["limit"],
|
|
21
22
|
"iterator" => options["iterator"],
|
|
22
23
|
"order" => options["order"]
|
|
@@ -57,6 +57,17 @@ module Svix
|
|
|
57
57
|
)
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
+
def stream_logout(options = {})
|
|
61
|
+
options = options.transform_keys(&:to_s)
|
|
62
|
+
@client.execute_request(
|
|
63
|
+
"POST",
|
|
64
|
+
"/api/v1/auth/stream-logout",
|
|
65
|
+
headers: {
|
|
66
|
+
"idempotency-key" => options["idempotency-key"]
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
60
71
|
def stream_portal_access(stream_id, stream_portal_access_in, options = {})
|
|
61
72
|
options = options.transform_keys(&:to_s)
|
|
62
73
|
res = @client.execute_request(
|
|
@@ -70,6 +81,18 @@ module Svix
|
|
|
70
81
|
AppPortalAccessOut.deserialize(res)
|
|
71
82
|
end
|
|
72
83
|
|
|
84
|
+
def stream_expire_all(stream_id, stream_token_expire_in, options = {})
|
|
85
|
+
options = options.transform_keys(&:to_s)
|
|
86
|
+
@client.execute_request(
|
|
87
|
+
"POST",
|
|
88
|
+
"/api/v1/auth/stream/#{stream_id}/expire-all",
|
|
89
|
+
headers: {
|
|
90
|
+
"idempotency-key" => options["idempotency-key"]
|
|
91
|
+
},
|
|
92
|
+
body: stream_token_expire_in
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
73
96
|
def get_stream_poller_token(stream_id, sink_id)
|
|
74
97
|
res = @client.execute_request(
|
|
75
98
|
"GET",
|
data/lib/svix/api/endpoint.rb
CHANGED
|
@@ -69,6 +69,19 @@ module Svix
|
|
|
69
69
|
EndpointOut.deserialize(res)
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
def bulk_replay(app_id, endpoint_id, bulk_replay_in, options = {})
|
|
73
|
+
options = options.transform_keys(&:to_s)
|
|
74
|
+
res = @client.execute_request(
|
|
75
|
+
"POST",
|
|
76
|
+
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/bulk-replay",
|
|
77
|
+
headers: {
|
|
78
|
+
"idempotency-key" => options["idempotency-key"]
|
|
79
|
+
},
|
|
80
|
+
body: bulk_replay_in
|
|
81
|
+
)
|
|
82
|
+
ReplayOut.deserialize(res)
|
|
83
|
+
end
|
|
84
|
+
|
|
72
85
|
def get_headers(app_id, endpoint_id)
|
|
73
86
|
res = @client.execute_request(
|
|
74
87
|
"GET",
|
|
@@ -8,8 +8,9 @@ module Svix
|
|
|
8
8
|
attr_accessor :id
|
|
9
9
|
attr_accessor :status
|
|
10
10
|
attr_accessor :task
|
|
11
|
+
attr_accessor :updated_at
|
|
11
12
|
|
|
12
|
-
ALL_FIELD ||= ["id", "status", "task"].freeze
|
|
13
|
+
ALL_FIELD ||= ["id", "status", "task", "updated_at"].freeze
|
|
13
14
|
private_constant :ALL_FIELD
|
|
14
15
|
|
|
15
16
|
def initialize(attributes = {})
|
|
@@ -36,6 +37,7 @@ module Svix
|
|
|
36
37
|
attrs["id"] = attributes["id"]
|
|
37
38
|
attrs["status"] = Svix::BackgroundTaskStatus.deserialize(attributes["status"])
|
|
38
39
|
attrs["task"] = Svix::BackgroundTaskType.deserialize(attributes["task"])
|
|
40
|
+
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
39
41
|
new(attrs)
|
|
40
42
|
end
|
|
41
43
|
|
|
@@ -44,6 +46,7 @@ module Svix
|
|
|
44
46
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
|
45
47
|
out["status"] = Svix::serialize_schema_ref(@status) if @status
|
|
46
48
|
out["task"] = Svix::serialize_schema_ref(@task) if @task
|
|
49
|
+
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
|
47
50
|
out
|
|
48
51
|
end
|
|
49
52
|
|
|
@@ -6,10 +6,11 @@ module Svix
|
|
|
6
6
|
class AmazonS3PatchConfig
|
|
7
7
|
attr_accessor :access_key_id
|
|
8
8
|
attr_accessor :bucket
|
|
9
|
+
attr_accessor :endpoint_url
|
|
9
10
|
attr_accessor :region
|
|
10
11
|
attr_accessor :secret_access_key
|
|
11
12
|
|
|
12
|
-
ALL_FIELD ||= ["access_key_id", "bucket", "region", "secret_access_key"].freeze
|
|
13
|
+
ALL_FIELD ||= ["access_key_id", "bucket", "endpoint_url", "region", "secret_access_key"].freeze
|
|
13
14
|
private_constant :ALL_FIELD
|
|
14
15
|
|
|
15
16
|
def initialize(attributes = {})
|
|
@@ -32,6 +33,7 @@ module Svix
|
|
|
32
33
|
attrs = Hash.new
|
|
33
34
|
attrs["access_key_id"] = attributes["accessKeyId"]
|
|
34
35
|
attrs["bucket"] = attributes["bucket"]
|
|
36
|
+
attrs["endpoint_url"] = attributes["endpointUrl"]
|
|
35
37
|
attrs["region"] = attributes["region"]
|
|
36
38
|
attrs["secret_access_key"] = attributes["secretAccessKey"]
|
|
37
39
|
new(attrs)
|
|
@@ -41,6 +43,7 @@ module Svix
|
|
|
41
43
|
out = Hash.new
|
|
42
44
|
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) if @access_key_id
|
|
43
45
|
out["bucket"] = Svix::serialize_primitive(@bucket) if @bucket
|
|
46
|
+
out["endpointUrl"] = Svix::serialize_primitive(@endpoint_url) if @endpoint_url
|
|
44
47
|
out["region"] = Svix::serialize_primitive(@region) if @region
|
|
45
48
|
out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) if @secret_access_key
|
|
46
49
|
out
|
|
@@ -12,8 +12,9 @@ module Svix
|
|
|
12
12
|
#
|
|
13
13
|
# Stats will be produced for all the others.
|
|
14
14
|
attr_accessor :unresolved_app_ids
|
|
15
|
+
attr_accessor :updated_at
|
|
15
16
|
|
|
16
|
-
ALL_FIELD ||= ["id", "status", "task", "unresolved_app_ids"].freeze
|
|
17
|
+
ALL_FIELD ||= ["id", "status", "task", "unresolved_app_ids", "updated_at"].freeze
|
|
17
18
|
private_constant :ALL_FIELD
|
|
18
19
|
|
|
19
20
|
def initialize(attributes = {})
|
|
@@ -38,6 +39,7 @@ module Svix
|
|
|
38
39
|
attrs["status"] = Svix::BackgroundTaskStatus.deserialize(attributes["status"])
|
|
39
40
|
attrs["task"] = Svix::BackgroundTaskType.deserialize(attributes["task"])
|
|
40
41
|
attrs["unresolved_app_ids"] = attributes["unresolvedAppIds"]
|
|
42
|
+
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
41
43
|
new(attrs)
|
|
42
44
|
end
|
|
43
45
|
|
|
@@ -47,6 +49,7 @@ module Svix
|
|
|
47
49
|
out["status"] = Svix::serialize_schema_ref(@status) if @status
|
|
48
50
|
out["task"] = Svix::serialize_schema_ref(@task) if @task
|
|
49
51
|
out["unresolvedAppIds"] = Svix::serialize_primitive(@unresolved_app_ids) if @unresolved_app_ids
|
|
52
|
+
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
|
50
53
|
out
|
|
51
54
|
end
|
|
52
55
|
|
|
@@ -5,12 +5,18 @@ require "json"
|
|
|
5
5
|
module Svix
|
|
6
6
|
class ApplicationIn
|
|
7
7
|
attr_accessor :metadata
|
|
8
|
+
# Application name for human consumption.
|
|
8
9
|
attr_accessor :name
|
|
10
|
+
# Deprecated, use `throttleRate` instead.
|
|
9
11
|
attr_accessor :rate_limit
|
|
12
|
+
# Maximum messages per second to send to this application.
|
|
13
|
+
#
|
|
14
|
+
# Outgoing messages will be throttled to this rate.
|
|
15
|
+
attr_accessor :throttle_rate
|
|
10
16
|
# Optional unique identifier for the application.
|
|
11
17
|
attr_accessor :uid
|
|
12
18
|
|
|
13
|
-
ALL_FIELD ||= ["metadata", "name", "rate_limit", "uid"].freeze
|
|
19
|
+
ALL_FIELD ||= ["metadata", "name", "rate_limit", "throttle_rate", "uid"].freeze
|
|
14
20
|
private_constant :ALL_FIELD
|
|
15
21
|
|
|
16
22
|
def initialize(attributes = {})
|
|
@@ -34,6 +40,7 @@ module Svix
|
|
|
34
40
|
attrs["metadata"] = attributes["metadata"]
|
|
35
41
|
attrs["name"] = attributes["name"]
|
|
36
42
|
attrs["rate_limit"] = attributes["rateLimit"]
|
|
43
|
+
attrs["throttle_rate"] = attributes["throttleRate"]
|
|
37
44
|
attrs["uid"] = attributes["uid"]
|
|
38
45
|
new(attrs)
|
|
39
46
|
end
|
|
@@ -43,6 +50,7 @@ module Svix
|
|
|
43
50
|
out["metadata"] = Svix::serialize_primitive(@metadata) if @metadata
|
|
44
51
|
out["name"] = Svix::serialize_primitive(@name) if @name
|
|
45
52
|
out["rateLimit"] = Svix::serialize_primitive(@rate_limit) if @rate_limit
|
|
53
|
+
out["throttleRate"] = Svix::serialize_primitive(@throttle_rate) if @throttle_rate
|
|
46
54
|
out["uid"] = Svix::serialize_primitive(@uid) if @uid
|
|
47
55
|
out
|
|
48
56
|
end
|
|
@@ -8,13 +8,19 @@ module Svix
|
|
|
8
8
|
# The Application's ID.
|
|
9
9
|
attr_accessor :id
|
|
10
10
|
attr_accessor :metadata
|
|
11
|
+
# Application name for human consumption.
|
|
11
12
|
attr_accessor :name
|
|
13
|
+
# Deprecated, use `throttleRate` instead.
|
|
12
14
|
attr_accessor :rate_limit
|
|
13
|
-
#
|
|
15
|
+
# Maximum messages per second to send to this application.
|
|
16
|
+
#
|
|
17
|
+
# Outgoing messages will be throttled to this rate.
|
|
18
|
+
attr_accessor :throttle_rate
|
|
19
|
+
# Optional unique identifier for the application.
|
|
14
20
|
attr_accessor :uid
|
|
15
21
|
attr_accessor :updated_at
|
|
16
22
|
|
|
17
|
-
ALL_FIELD ||= ["created_at", "id", "metadata", "name", "rate_limit", "uid", "updated_at"].freeze
|
|
23
|
+
ALL_FIELD ||= ["created_at", "id", "metadata", "name", "rate_limit", "throttle_rate", "uid", "updated_at"].freeze
|
|
18
24
|
private_constant :ALL_FIELD
|
|
19
25
|
|
|
20
26
|
def initialize(attributes = {})
|
|
@@ -40,6 +46,7 @@ module Svix
|
|
|
40
46
|
attrs["metadata"] = attributes["metadata"]
|
|
41
47
|
attrs["name"] = attributes["name"]
|
|
42
48
|
attrs["rate_limit"] = attributes["rateLimit"]
|
|
49
|
+
attrs["throttle_rate"] = attributes["throttleRate"]
|
|
43
50
|
attrs["uid"] = attributes["uid"]
|
|
44
51
|
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
45
52
|
new(attrs)
|
|
@@ -52,6 +59,7 @@ module Svix
|
|
|
52
59
|
out["metadata"] = Svix::serialize_primitive(@metadata) if @metadata
|
|
53
60
|
out["name"] = Svix::serialize_primitive(@name) if @name
|
|
54
61
|
out["rateLimit"] = Svix::serialize_primitive(@rate_limit) if @rate_limit
|
|
62
|
+
out["throttleRate"] = Svix::serialize_primitive(@throttle_rate) if @throttle_rate
|
|
55
63
|
out["uid"] = Svix::serialize_primitive(@uid) if @uid
|
|
56
64
|
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
|
57
65
|
out
|
|
@@ -9,8 +9,9 @@ module Svix
|
|
|
9
9
|
attr_accessor :id
|
|
10
10
|
attr_accessor :status
|
|
11
11
|
attr_accessor :task
|
|
12
|
+
attr_accessor :updated_at
|
|
12
13
|
|
|
13
|
-
ALL_FIELD ||= ["data", "id", "status", "task"].freeze
|
|
14
|
+
ALL_FIELD ||= ["data", "id", "status", "task", "updated_at"].freeze
|
|
14
15
|
private_constant :ALL_FIELD
|
|
15
16
|
|
|
16
17
|
def initialize(attributes = {})
|
|
@@ -35,6 +36,7 @@ module Svix
|
|
|
35
36
|
attrs["id"] = attributes["id"]
|
|
36
37
|
attrs["status"] = Svix::BackgroundTaskStatus.deserialize(attributes["status"])
|
|
37
38
|
attrs["task"] = Svix::BackgroundTaskType.deserialize(attributes["task"])
|
|
39
|
+
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
38
40
|
new(attrs)
|
|
39
41
|
end
|
|
40
42
|
|
|
@@ -44,6 +46,7 @@ module Svix
|
|
|
44
46
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
|
45
47
|
out["status"] = Svix::serialize_schema_ref(@status) if @status
|
|
46
48
|
out["task"] = Svix::serialize_schema_ref(@task) if @task
|
|
49
|
+
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
|
47
50
|
out
|
|
48
51
|
end
|
|
49
52
|
|
|
@@ -9,7 +9,7 @@ module Svix
|
|
|
9
9
|
SDK_GENERATE = "sdk.generate".freeze
|
|
10
10
|
EVENT_TYPE_AGGREGATE = "event-type.aggregate".freeze
|
|
11
11
|
APPLICATION_PURGE_CONTENT = "application.purge_content".freeze
|
|
12
|
-
ENDPOINT_BULK_REPLAY = "endpoint.
|
|
12
|
+
ENDPOINT_BULK_REPLAY = "endpoint.bulk-replay".freeze
|
|
13
13
|
|
|
14
14
|
def self.all_vars
|
|
15
15
|
@all_vars ||= [
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class BulkReplayIn
|
|
7
|
+
attr_accessor :channel
|
|
8
|
+
attr_accessor :event_types
|
|
9
|
+
attr_accessor :since
|
|
10
|
+
attr_accessor :status
|
|
11
|
+
attr_accessor :status_code_class
|
|
12
|
+
attr_accessor :tag
|
|
13
|
+
attr_accessor :until
|
|
14
|
+
|
|
15
|
+
ALL_FIELD ||= ["channel", "event_types", "since", "status", "status_code_class", "tag", "until"].freeze
|
|
16
|
+
private_constant :ALL_FIELD
|
|
17
|
+
|
|
18
|
+
def initialize(attributes = {})
|
|
19
|
+
unless attributes.is_a?(Hash)
|
|
20
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::BulkReplayIn` new method")
|
|
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::BulkReplayIn")
|
|
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["channel"] = attributes["channel"]
|
|
37
|
+
attrs["event_types"] = attributes["eventTypes"]
|
|
38
|
+
attrs["since"] = DateTime.rfc3339(attributes["since"]).to_time
|
|
39
|
+
attrs["status"] = Svix::MessageStatus.deserialize(attributes["status"]) if attributes["status"]
|
|
40
|
+
if attributes["statusCodeClass"]
|
|
41
|
+
attrs["status_code_class"] = Svix::StatusCodeClass.deserialize(attributes["statusCodeClass"])
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
attrs["tag"] = attributes["tag"]
|
|
45
|
+
attrs["until"] = DateTime.rfc3339(attributes["until"]).to_time if attributes["until"]
|
|
46
|
+
new(attrs)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def serialize
|
|
50
|
+
out = Hash.new
|
|
51
|
+
out["channel"] = Svix::serialize_primitive(@channel) if @channel
|
|
52
|
+
out["eventTypes"] = Svix::serialize_primitive(@event_types) if @event_types
|
|
53
|
+
out["since"] = Svix::serialize_primitive(@since) if @since
|
|
54
|
+
out["status"] = Svix::serialize_schema_ref(@status) if @status
|
|
55
|
+
out["statusCodeClass"] = Svix::serialize_schema_ref(@status_code_class) if @status_code_class
|
|
56
|
+
out["tag"] = Svix::serialize_primitive(@tag) if @tag
|
|
57
|
+
out["until"] = Svix::serialize_primitive(@until) if @until
|
|
58
|
+
out
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Serializes the object to a json string
|
|
62
|
+
# @return String
|
|
63
|
+
def to_json
|
|
64
|
+
JSON.dump(serialize)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -11,12 +11,17 @@ module Svix
|
|
|
11
11
|
attr_accessor :filter_types
|
|
12
12
|
attr_accessor :headers
|
|
13
13
|
attr_accessor :metadata
|
|
14
|
+
# Deprecated, use `throttleRate` instead.
|
|
14
15
|
attr_accessor :rate_limit
|
|
15
16
|
# The endpoint's verification secret.
|
|
16
17
|
#
|
|
17
18
|
# Format: `base64` encoded random bytes optionally prefixed with `whsec_`.
|
|
18
19
|
# It is recommended to not set this and let the server generate the secret.
|
|
19
20
|
attr_accessor :secret
|
|
21
|
+
# Maximum messages per second to send to this endpoint.
|
|
22
|
+
#
|
|
23
|
+
# Outgoing messages will be throttled to this rate.
|
|
24
|
+
attr_accessor :throttle_rate
|
|
20
25
|
# Optional unique identifier for the endpoint.
|
|
21
26
|
attr_accessor :uid
|
|
22
27
|
attr_accessor :url
|
|
@@ -31,6 +36,7 @@ module Svix
|
|
|
31
36
|
"metadata",
|
|
32
37
|
"rate_limit",
|
|
33
38
|
"secret",
|
|
39
|
+
"throttle_rate",
|
|
34
40
|
"uid",
|
|
35
41
|
"url",
|
|
36
42
|
"version"
|
|
@@ -63,6 +69,7 @@ module Svix
|
|
|
63
69
|
attrs["metadata"] = attributes["metadata"]
|
|
64
70
|
attrs["rate_limit"] = attributes["rateLimit"]
|
|
65
71
|
attrs["secret"] = attributes["secret"]
|
|
72
|
+
attrs["throttle_rate"] = attributes["throttleRate"]
|
|
66
73
|
attrs["uid"] = attributes["uid"]
|
|
67
74
|
attrs["url"] = attributes["url"]
|
|
68
75
|
attrs["version"] = attributes["version"]
|
|
@@ -79,6 +86,7 @@ module Svix
|
|
|
79
86
|
out["metadata"] = Svix::serialize_primitive(@metadata) if @metadata
|
|
80
87
|
out["rateLimit"] = Svix::serialize_primitive(@rate_limit) if @rate_limit
|
|
81
88
|
out["secret"] = Svix::serialize_primitive(@secret) if @secret
|
|
89
|
+
out["throttleRate"] = Svix::serialize_primitive(@throttle_rate) if @throttle_rate
|
|
82
90
|
out["uid"] = Svix::serialize_primitive(@uid) if @uid
|
|
83
91
|
out["url"] = Svix::serialize_primitive(@url) if @url
|
|
84
92
|
out["version"] = Svix::serialize_primitive(@version) if @version
|
|
@@ -14,7 +14,10 @@ module Svix
|
|
|
14
14
|
# The Endpoint's ID.
|
|
15
15
|
attr_accessor :id
|
|
16
16
|
attr_accessor :metadata
|
|
17
|
+
# Deprecated, use `throttleRate` instead.
|
|
17
18
|
attr_accessor :rate_limit
|
|
19
|
+
# Maximum messages per second to send to this endpoint. Outgoing messages will be throttled to this rate.
|
|
20
|
+
attr_accessor :throttle_rate
|
|
18
21
|
# Optional unique identifier for the endpoint.
|
|
19
22
|
attr_accessor :uid
|
|
20
23
|
attr_accessor :updated_at
|
|
@@ -30,6 +33,7 @@ module Svix
|
|
|
30
33
|
"id",
|
|
31
34
|
"metadata",
|
|
32
35
|
"rate_limit",
|
|
36
|
+
"throttle_rate",
|
|
33
37
|
"uid",
|
|
34
38
|
"updated_at",
|
|
35
39
|
"url",
|
|
@@ -63,6 +67,7 @@ module Svix
|
|
|
63
67
|
attrs["id"] = attributes["id"]
|
|
64
68
|
attrs["metadata"] = attributes["metadata"]
|
|
65
69
|
attrs["rate_limit"] = attributes["rateLimit"]
|
|
70
|
+
attrs["throttle_rate"] = attributes["throttleRate"]
|
|
66
71
|
attrs["uid"] = attributes["uid"]
|
|
67
72
|
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
68
73
|
attrs["url"] = attributes["url"]
|
|
@@ -80,6 +85,7 @@ module Svix
|
|
|
80
85
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
|
81
86
|
out["metadata"] = Svix::serialize_primitive(@metadata) if @metadata
|
|
82
87
|
out["rateLimit"] = Svix::serialize_primitive(@rate_limit) if @rate_limit
|
|
88
|
+
out["throttleRate"] = Svix::serialize_primitive(@throttle_rate) if @throttle_rate
|
|
83
89
|
out["uid"] = Svix::serialize_primitive(@uid) if @uid
|
|
84
90
|
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
|
85
91
|
out["url"] = Svix::serialize_primitive(@url) if @url
|
|
@@ -9,12 +9,17 @@ module Svix
|
|
|
9
9
|
attr_accessor :disabled
|
|
10
10
|
attr_accessor :filter_types
|
|
11
11
|
attr_accessor :metadata
|
|
12
|
+
# Deprecated, use `throttleRate` instead.
|
|
12
13
|
attr_accessor :rate_limit
|
|
13
14
|
# The endpoint's verification secret.
|
|
14
15
|
#
|
|
15
16
|
# Format: `base64` encoded random bytes optionally prefixed with `whsec_`.
|
|
16
17
|
# It is recommended to not set this and let the server generate the secret.
|
|
17
18
|
attr_accessor :secret
|
|
19
|
+
# Maximum messages per second to send to this endpoint.
|
|
20
|
+
#
|
|
21
|
+
# Outgoing messages will be throttled to this rate.
|
|
22
|
+
attr_accessor :throttle_rate
|
|
18
23
|
# The Endpoint's UID.
|
|
19
24
|
attr_accessor :uid
|
|
20
25
|
attr_accessor :url
|
|
@@ -28,6 +33,7 @@ module Svix
|
|
|
28
33
|
"metadata",
|
|
29
34
|
"rate_limit",
|
|
30
35
|
"secret",
|
|
36
|
+
"throttle_rate",
|
|
31
37
|
"uid",
|
|
32
38
|
"url",
|
|
33
39
|
"version"
|
|
@@ -59,6 +65,7 @@ module Svix
|
|
|
59
65
|
attrs["metadata"] = attributes["metadata"]
|
|
60
66
|
attrs["rate_limit"] = attributes["rateLimit"]
|
|
61
67
|
attrs["secret"] = attributes["secret"]
|
|
68
|
+
attrs["throttle_rate"] = attributes["throttleRate"]
|
|
62
69
|
attrs["uid"] = attributes["uid"]
|
|
63
70
|
attrs["url"] = attributes["url"]
|
|
64
71
|
attrs["version"] = attributes["version"]
|
|
@@ -74,6 +81,7 @@ module Svix
|
|
|
74
81
|
out["metadata"] = Svix::serialize_primitive(@metadata) if @metadata
|
|
75
82
|
out["rateLimit"] = Svix::serialize_primitive(@rate_limit) if @__rate_limit_is_defined
|
|
76
83
|
out["secret"] = Svix::serialize_primitive(@secret) if @__secret_is_defined
|
|
84
|
+
out["throttleRate"] = Svix::serialize_primitive(@throttle_rate) if @__throttle_rate_is_defined
|
|
77
85
|
out["uid"] = Svix::serialize_primitive(@uid) if @__uid_is_defined
|
|
78
86
|
out["url"] = Svix::serialize_primitive(@url) if @url
|
|
79
87
|
out["version"] = Svix::serialize_primitive(@version) if @version
|
|
@@ -10,7 +10,12 @@ module Svix
|
|
|
10
10
|
attr_accessor :disabled
|
|
11
11
|
attr_accessor :filter_types
|
|
12
12
|
attr_accessor :metadata
|
|
13
|
+
# Deprecated, use `throttleRate` instead.
|
|
13
14
|
attr_accessor :rate_limit
|
|
15
|
+
# Maximum messages per second to send to this endpoint.
|
|
16
|
+
#
|
|
17
|
+
# Outgoing messages will be throttled to this rate.
|
|
18
|
+
attr_accessor :throttle_rate
|
|
14
19
|
# Optional unique identifier for the endpoint.
|
|
15
20
|
attr_accessor :uid
|
|
16
21
|
attr_accessor :url
|
|
@@ -23,6 +28,7 @@ module Svix
|
|
|
23
28
|
"filter_types",
|
|
24
29
|
"metadata",
|
|
25
30
|
"rate_limit",
|
|
31
|
+
"throttle_rate",
|
|
26
32
|
"uid",
|
|
27
33
|
"url",
|
|
28
34
|
"version"
|
|
@@ -53,6 +59,7 @@ module Svix
|
|
|
53
59
|
attrs["filter_types"] = attributes["filterTypes"]
|
|
54
60
|
attrs["metadata"] = attributes["metadata"]
|
|
55
61
|
attrs["rate_limit"] = attributes["rateLimit"]
|
|
62
|
+
attrs["throttle_rate"] = attributes["throttleRate"]
|
|
56
63
|
attrs["uid"] = attributes["uid"]
|
|
57
64
|
attrs["url"] = attributes["url"]
|
|
58
65
|
attrs["version"] = attributes["version"]
|
|
@@ -67,6 +74,7 @@ module Svix
|
|
|
67
74
|
out["filterTypes"] = Svix::serialize_primitive(@filter_types) if @filter_types
|
|
68
75
|
out["metadata"] = Svix::serialize_primitive(@metadata) if @metadata
|
|
69
76
|
out["rateLimit"] = Svix::serialize_primitive(@rate_limit) if @rate_limit
|
|
77
|
+
out["throttleRate"] = Svix::serialize_primitive(@throttle_rate) if @throttle_rate
|
|
70
78
|
out["uid"] = Svix::serialize_primitive(@uid) if @uid
|
|
71
79
|
out["url"] = Svix::serialize_primitive(@url) if @url
|
|
72
80
|
out["version"] = Svix::serialize_primitive(@version) if @version
|
|
@@ -7,7 +7,7 @@ module Svix
|
|
|
7
7
|
attr_accessor :archived
|
|
8
8
|
attr_accessor :deprecated
|
|
9
9
|
attr_accessor :description
|
|
10
|
-
# Deprecated
|
|
10
|
+
# Deprecated, use `featureFlags` instead.
|
|
11
11
|
attr_accessor :feature_flag
|
|
12
12
|
attr_accessor :feature_flags
|
|
13
13
|
# The event type group's name
|
|
@@ -8,8 +8,9 @@ module Svix
|
|
|
8
8
|
attr_accessor :id
|
|
9
9
|
attr_accessor :status
|
|
10
10
|
attr_accessor :task
|
|
11
|
+
attr_accessor :updated_at
|
|
11
12
|
|
|
12
|
-
ALL_FIELD ||= ["id", "status", "task"].freeze
|
|
13
|
+
ALL_FIELD ||= ["id", "status", "task", "updated_at"].freeze
|
|
13
14
|
private_constant :ALL_FIELD
|
|
14
15
|
|
|
15
16
|
def initialize(attributes = {})
|
|
@@ -36,6 +37,7 @@ module Svix
|
|
|
36
37
|
attrs["id"] = attributes["id"]
|
|
37
38
|
attrs["status"] = Svix::BackgroundTaskStatus.deserialize(attributes["status"])
|
|
38
39
|
attrs["task"] = Svix::BackgroundTaskType.deserialize(attributes["task"])
|
|
40
|
+
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
39
41
|
new(attrs)
|
|
40
42
|
end
|
|
41
43
|
|
|
@@ -44,6 +46,7 @@ module Svix
|
|
|
44
46
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
|
45
47
|
out["status"] = Svix::serialize_schema_ref(@status) if @status
|
|
46
48
|
out["task"] = Svix::serialize_schema_ref(@task) if @task
|
|
49
|
+
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
|
47
50
|
out
|
|
48
51
|
end
|
|
49
52
|
|
|
@@ -10,6 +10,7 @@ require_relative "./docusign_config"
|
|
|
10
10
|
require_relative "./easypost_config"
|
|
11
11
|
require_relative "./github_config"
|
|
12
12
|
require_relative "./hubspot_config"
|
|
13
|
+
require_relative "./meta_config"
|
|
13
14
|
require_relative "./orum_io_config"
|
|
14
15
|
require_relative "./panda_doc_config"
|
|
15
16
|
require_relative "./port_io_config"
|
|
@@ -81,6 +82,9 @@ module Svix
|
|
|
81
82
|
class Lithic < SvixConfig
|
|
82
83
|
end
|
|
83
84
|
|
|
85
|
+
class Meta < MetaConfig
|
|
86
|
+
end
|
|
87
|
+
|
|
84
88
|
class Nash < SvixConfig
|
|
85
89
|
end
|
|
86
90
|
|
|
@@ -96,6 +100,9 @@ module Svix
|
|
|
96
100
|
class Pleo < SvixConfig
|
|
97
101
|
end
|
|
98
102
|
|
|
103
|
+
class PsiFi < SvixConfig
|
|
104
|
+
end
|
|
105
|
+
|
|
99
106
|
class Replicate < SvixConfig
|
|
100
107
|
end
|
|
101
108
|
|
|
@@ -175,11 +182,13 @@ module Svix
|
|
|
175
182
|
IngestSourceInConfig::Hubspot => "hubspot",
|
|
176
183
|
IngestSourceInConfig::IncidentIo => "incident-io",
|
|
177
184
|
IngestSourceInConfig::Lithic => "lithic",
|
|
185
|
+
IngestSourceInConfig::Meta => "meta",
|
|
178
186
|
IngestSourceInConfig::Nash => "nash",
|
|
179
187
|
IngestSourceInConfig::OrumIo => "orum-io",
|
|
180
188
|
IngestSourceInConfig::PandaDoc => "panda-doc",
|
|
181
189
|
IngestSourceInConfig::PortIo => "port-io",
|
|
182
190
|
IngestSourceInConfig::Pleo => "pleo",
|
|
191
|
+
IngestSourceInConfig::PsiFi => "psi-fi",
|
|
183
192
|
IngestSourceInConfig::Replicate => "replicate",
|
|
184
193
|
IngestSourceInConfig::Resend => "resend",
|
|
185
194
|
IngestSourceInConfig::Rutter => "rutter",
|
|
@@ -10,6 +10,7 @@ require_relative "./docusign_config_out"
|
|
|
10
10
|
require_relative "./easypost_config_out"
|
|
11
11
|
require_relative "./github_config_out"
|
|
12
12
|
require_relative "./hubspot_config_out"
|
|
13
|
+
require_relative "./meta_config_out"
|
|
13
14
|
require_relative "./orum_io_config_out"
|
|
14
15
|
require_relative "./panda_doc_config_out"
|
|
15
16
|
require_relative "./port_io_config_out"
|
|
@@ -81,6 +82,9 @@ module Svix
|
|
|
81
82
|
class Lithic < SvixConfigOut
|
|
82
83
|
end
|
|
83
84
|
|
|
85
|
+
class Meta < MetaConfigOut
|
|
86
|
+
end
|
|
87
|
+
|
|
84
88
|
class Nash < SvixConfigOut
|
|
85
89
|
end
|
|
86
90
|
|
|
@@ -93,6 +97,9 @@ module Svix
|
|
|
93
97
|
class PortIo < PortIoConfigOut
|
|
94
98
|
end
|
|
95
99
|
|
|
100
|
+
class PsiFi < SvixConfigOut
|
|
101
|
+
end
|
|
102
|
+
|
|
96
103
|
class Pleo < SvixConfigOut
|
|
97
104
|
end
|
|
98
105
|
|
|
@@ -180,10 +187,12 @@ module Svix
|
|
|
180
187
|
IngestSourceOutConfig::Hubspot => "hubspot",
|
|
181
188
|
IngestSourceOutConfig::IncidentIo => "incident-io",
|
|
182
189
|
IngestSourceOutConfig::Lithic => "lithic",
|
|
190
|
+
IngestSourceOutConfig::Meta => "meta",
|
|
183
191
|
IngestSourceOutConfig::Nash => "nash",
|
|
184
192
|
IngestSourceOutConfig::OrumIo => "orum-io",
|
|
185
193
|
IngestSourceOutConfig::PandaDoc => "panda-doc",
|
|
186
194
|
IngestSourceOutConfig::PortIo => "port-io",
|
|
195
|
+
IngestSourceOutConfig::PsiFi => "psi-fi",
|
|
187
196
|
IngestSourceOutConfig::Pleo => "pleo",
|
|
188
197
|
IngestSourceOutConfig::Replicate => "replicate",
|
|
189
198
|
IngestSourceOutConfig::Resend => "resend",
|
|
@@ -14,9 +14,12 @@ module Svix
|
|
|
14
14
|
# The Endpoint's ID.
|
|
15
15
|
attr_accessor :id
|
|
16
16
|
attr_accessor :next_attempt
|
|
17
|
+
# Deprecated, use `throttleRate` instead.
|
|
17
18
|
attr_accessor :rate_limit
|
|
18
19
|
attr_accessor :status
|
|
19
20
|
attr_accessor :status_text
|
|
21
|
+
# Maximum messages per second to send to this endpoint. Outgoing messages will be throttled to this rate.
|
|
22
|
+
attr_accessor :throttle_rate
|
|
20
23
|
# Optional unique identifier for the endpoint.
|
|
21
24
|
attr_accessor :uid
|
|
22
25
|
attr_accessor :updated_at
|
|
@@ -34,6 +37,7 @@ module Svix
|
|
|
34
37
|
"rate_limit",
|
|
35
38
|
"status",
|
|
36
39
|
"status_text",
|
|
40
|
+
"throttle_rate",
|
|
37
41
|
"uid",
|
|
38
42
|
"updated_at",
|
|
39
43
|
"url",
|
|
@@ -69,6 +73,7 @@ module Svix
|
|
|
69
73
|
attrs["rate_limit"] = attributes["rateLimit"]
|
|
70
74
|
attrs["status"] = Svix::MessageStatus.deserialize(attributes["status"])
|
|
71
75
|
attrs["status_text"] = Svix::MessageStatusText.deserialize(attributes["statusText"])
|
|
76
|
+
attrs["throttle_rate"] = attributes["throttleRate"]
|
|
72
77
|
attrs["uid"] = attributes["uid"]
|
|
73
78
|
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
74
79
|
attrs["url"] = attributes["url"]
|
|
@@ -88,6 +93,7 @@ module Svix
|
|
|
88
93
|
out["rateLimit"] = Svix::serialize_primitive(@rate_limit) if @rate_limit
|
|
89
94
|
out["status"] = Svix::serialize_schema_ref(@status) if @status
|
|
90
95
|
out["statusText"] = Svix::serialize_schema_ref(@status_text) if @status_text
|
|
96
|
+
out["throttleRate"] = Svix::serialize_primitive(@throttle_rate) if @throttle_rate
|
|
91
97
|
out["uid"] = Svix::serialize_primitive(@uid) if @uid
|
|
92
98
|
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
|
93
99
|
out["url"] = Svix::serialize_primitive(@url) if @url
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class MetaConfig
|
|
7
|
+
attr_accessor :secret
|
|
8
|
+
attr_accessor :verify_token
|
|
9
|
+
|
|
10
|
+
ALL_FIELD ||= ["secret", "verify_token"].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::MetaConfig` 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::MetaConfig")
|
|
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["secret"] = attributes["secret"]
|
|
32
|
+
attrs["verify_token"] = attributes["verifyToken"]
|
|
33
|
+
new(attrs)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def serialize
|
|
37
|
+
out = Hash.new
|
|
38
|
+
out["secret"] = Svix::serialize_primitive(@secret) if @secret
|
|
39
|
+
out["verifyToken"] = Svix::serialize_primitive(@verify_token) if @verify_token
|
|
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,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class MetaConfigOut
|
|
7
|
+
|
|
8
|
+
ALL_FIELD ||= [].freeze
|
|
9
|
+
private_constant :ALL_FIELD
|
|
10
|
+
|
|
11
|
+
def initialize(attributes = {})
|
|
12
|
+
unless attributes.is_a?(Hash)
|
|
13
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::MetaConfigOut` new method")
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
attributes.each do |k, v|
|
|
17
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
18
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::MetaConfigOut")
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
instance_variable_set("@#{k}", v)
|
|
22
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.deserialize(attributes = {})
|
|
27
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
28
|
+
attrs = Hash.new
|
|
29
|
+
new(attrs)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def serialize
|
|
33
|
+
out = Hash.new
|
|
34
|
+
out
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Serializes the object to a json string
|
|
38
|
+
# @return String
|
|
39
|
+
def to_json
|
|
40
|
+
JSON.dump(serialize)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -8,8 +8,9 @@ module Svix
|
|
|
8
8
|
attr_accessor :id
|
|
9
9
|
attr_accessor :status
|
|
10
10
|
attr_accessor :task
|
|
11
|
+
attr_accessor :updated_at
|
|
11
12
|
|
|
12
|
-
ALL_FIELD ||= ["id", "status", "task"].freeze
|
|
13
|
+
ALL_FIELD ||= ["id", "status", "task", "updated_at"].freeze
|
|
13
14
|
private_constant :ALL_FIELD
|
|
14
15
|
|
|
15
16
|
def initialize(attributes = {})
|
|
@@ -33,6 +34,7 @@ module Svix
|
|
|
33
34
|
attrs["id"] = attributes["id"]
|
|
34
35
|
attrs["status"] = Svix::BackgroundTaskStatus.deserialize(attributes["status"])
|
|
35
36
|
attrs["task"] = Svix::BackgroundTaskType.deserialize(attributes["task"])
|
|
37
|
+
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
36
38
|
new(attrs)
|
|
37
39
|
end
|
|
38
40
|
|
|
@@ -41,6 +43,7 @@ module Svix
|
|
|
41
43
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
|
42
44
|
out["status"] = Svix::serialize_schema_ref(@status) if @status
|
|
43
45
|
out["task"] = Svix::serialize_schema_ref(@task) if @task
|
|
46
|
+
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
|
44
47
|
out
|
|
45
48
|
end
|
|
46
49
|
|
|
@@ -8,8 +8,9 @@ module Svix
|
|
|
8
8
|
attr_accessor :id
|
|
9
9
|
attr_accessor :status
|
|
10
10
|
attr_accessor :task
|
|
11
|
+
attr_accessor :updated_at
|
|
11
12
|
|
|
12
|
-
ALL_FIELD ||= ["id", "status", "task"].freeze
|
|
13
|
+
ALL_FIELD ||= ["id", "status", "task", "updated_at"].freeze
|
|
13
14
|
private_constant :ALL_FIELD
|
|
14
15
|
|
|
15
16
|
def initialize(attributes = {})
|
|
@@ -33,6 +34,7 @@ module Svix
|
|
|
33
34
|
attrs["id"] = attributes["id"]
|
|
34
35
|
attrs["status"] = Svix::BackgroundTaskStatus.deserialize(attributes["status"])
|
|
35
36
|
attrs["task"] = Svix::BackgroundTaskType.deserialize(attributes["task"])
|
|
37
|
+
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
36
38
|
new(attrs)
|
|
37
39
|
end
|
|
38
40
|
|
|
@@ -41,6 +43,7 @@ module Svix
|
|
|
41
43
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
|
42
44
|
out["status"] = Svix::serialize_schema_ref(@status) if @status
|
|
43
45
|
out["task"] = Svix::serialize_schema_ref(@task) if @task
|
|
46
|
+
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
|
44
47
|
out
|
|
45
48
|
end
|
|
46
49
|
|
|
@@ -6,10 +6,11 @@ module Svix
|
|
|
6
6
|
class S3Config
|
|
7
7
|
attr_accessor :access_key_id
|
|
8
8
|
attr_accessor :bucket
|
|
9
|
+
attr_accessor :endpoint_url
|
|
9
10
|
attr_accessor :region
|
|
10
11
|
attr_accessor :secret_access_key
|
|
11
12
|
|
|
12
|
-
ALL_FIELD ||= ["access_key_id", "bucket", "region", "secret_access_key"].freeze
|
|
13
|
+
ALL_FIELD ||= ["access_key_id", "bucket", "endpoint_url", "region", "secret_access_key"].freeze
|
|
13
14
|
private_constant :ALL_FIELD
|
|
14
15
|
|
|
15
16
|
def initialize(attributes = {})
|
|
@@ -32,6 +33,7 @@ module Svix
|
|
|
32
33
|
attrs = Hash.new
|
|
33
34
|
attrs["access_key_id"] = attributes["accessKeyId"]
|
|
34
35
|
attrs["bucket"] = attributes["bucket"]
|
|
36
|
+
attrs["endpoint_url"] = attributes["endpointUrl"]
|
|
35
37
|
attrs["region"] = attributes["region"]
|
|
36
38
|
attrs["secret_access_key"] = attributes["secretAccessKey"]
|
|
37
39
|
new(attrs)
|
|
@@ -41,6 +43,7 @@ module Svix
|
|
|
41
43
|
out = Hash.new
|
|
42
44
|
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) if @access_key_id
|
|
43
45
|
out["bucket"] = Svix::serialize_primitive(@bucket) if @bucket
|
|
46
|
+
out["endpointUrl"] = Svix::serialize_primitive(@endpoint_url) if @endpoint_url
|
|
44
47
|
out["region"] = Svix::serialize_primitive(@region) if @region
|
|
45
48
|
out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) if @secret_access_key
|
|
46
49
|
out
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class StreamTokenExpireIn
|
|
7
|
+
# How many seconds until the old key is expired.
|
|
8
|
+
attr_accessor :expiry
|
|
9
|
+
# An optional list of session ids.
|
|
10
|
+
#
|
|
11
|
+
# If any session ids are specified, only Stream tokens created with that session id will be expired.
|
|
12
|
+
attr_accessor :session_ids
|
|
13
|
+
|
|
14
|
+
ALL_FIELD ||= ["expiry", "session_ids"].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::StreamTokenExpireIn` 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::StreamTokenExpireIn")
|
|
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["expiry"] = attributes["expiry"]
|
|
36
|
+
attrs["session_ids"] = attributes["sessionIds"]
|
|
37
|
+
new(attrs)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def serialize
|
|
41
|
+
out = Hash.new
|
|
42
|
+
out["expiry"] = Svix::serialize_primitive(@expiry) if @expiry
|
|
43
|
+
out["sessionIds"] = Svix::serialize_primitive(@session_ids) if @session_ids
|
|
44
|
+
out
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Serializes the object to a json string
|
|
48
|
+
# @return String
|
|
49
|
+
def to_json
|
|
50
|
+
JSON.dump(serialize)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
require "cgi"
|
|
2
3
|
require "uri"
|
|
3
4
|
require "net/http"
|
|
4
5
|
require "securerandom"
|
|
@@ -54,7 +55,7 @@ module Svix
|
|
|
54
55
|
|
|
55
56
|
# Check if idempotency-key header already exists
|
|
56
57
|
if !request.key?("idempotency-key") && method.to_s.upcase == "POST"
|
|
57
|
-
request["idempotency-key"] = "auto_" + SecureRandom.
|
|
58
|
+
request["idempotency-key"] = "auto_" + SecureRandom.uuid.to_s
|
|
58
59
|
end
|
|
59
60
|
|
|
60
61
|
# Add body for non-GET requests
|
data/lib/svix/version.rb
CHANGED
data/lib/svix.rb
CHANGED
|
@@ -56,6 +56,7 @@ require "svix/models/background_task_finished_event2"
|
|
|
56
56
|
require "svix/models/background_task_out"
|
|
57
57
|
require "svix/models/background_task_status"
|
|
58
58
|
require "svix/models/background_task_type"
|
|
59
|
+
require "svix/models/bulk_replay_in"
|
|
59
60
|
require "svix/models/checkbook_config"
|
|
60
61
|
require "svix/models/checkbook_config_out"
|
|
61
62
|
require "svix/models/connector_in"
|
|
@@ -180,6 +181,8 @@ require "svix/models/message_precheck_in"
|
|
|
180
181
|
require "svix/models/message_precheck_out"
|
|
181
182
|
require "svix/models/message_status"
|
|
182
183
|
require "svix/models/message_status_text"
|
|
184
|
+
require "svix/models/meta_config"
|
|
185
|
+
require "svix/models/meta_config_out"
|
|
183
186
|
require "svix/models/operational_webhook_endpoint_headers_in"
|
|
184
187
|
require "svix/models/operational_webhook_endpoint_headers_out"
|
|
185
188
|
require "svix/models/operational_webhook_endpoint_in"
|
|
@@ -232,6 +235,7 @@ require "svix/models/stream_portal_access_in"
|
|
|
232
235
|
require "svix/models/stream_sink_in"
|
|
233
236
|
require "svix/models/stream_sink_out"
|
|
234
237
|
require "svix/models/stream_sink_patch"
|
|
238
|
+
require "svix/models/stream_token_expire_in"
|
|
235
239
|
require "svix/models/stripe_config"
|
|
236
240
|
require "svix/models/stripe_config_out"
|
|
237
241
|
require "svix/models/svix_config"
|
data/svix.gemspec
CHANGED
|
@@ -15,6 +15,8 @@ Gem::Specification.new do |spec|
|
|
|
15
15
|
"Learn more at https://www.svix.com"
|
|
16
16
|
spec.homepage = "https://www.svix.com"
|
|
17
17
|
|
|
18
|
+
spec.required_ruby_version = ">= 3.2"
|
|
19
|
+
|
|
18
20
|
spec.post_install_message = <<~MESSAGE
|
|
19
21
|
|
|
20
22
|
Thank you for installing svix!
|
|
@@ -47,6 +49,9 @@ Gem::Specification.new do |spec|
|
|
|
47
49
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
48
50
|
spec.require_paths = ["lib"]
|
|
49
51
|
|
|
52
|
+
spec.add_dependency "base64", "~> 0.3.0"
|
|
53
|
+
spec.add_dependency "logger", "~> 1.0"
|
|
54
|
+
|
|
50
55
|
spec.add_development_dependency "rake", "~> 13.0"
|
|
51
56
|
spec.add_development_dependency "rspec", "~> 3.2"
|
|
52
57
|
spec.add_development_dependency 'webmock', '~> 3.25'
|
metadata
CHANGED
|
@@ -1,14 +1,42 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: svix
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.91.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Svix
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-04-20 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: base64
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 0.3.0
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: 0.3.0
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: logger
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '1.0'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '1.0'
|
|
12
40
|
- !ruby/object:Gem::Dependency
|
|
13
41
|
name: rake
|
|
14
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -114,6 +142,7 @@ files:
|
|
|
114
142
|
- lib/svix/models/background_task_out.rb
|
|
115
143
|
- lib/svix/models/background_task_status.rb
|
|
116
144
|
- lib/svix/models/background_task_type.rb
|
|
145
|
+
- lib/svix/models/bulk_replay_in.rb
|
|
117
146
|
- lib/svix/models/checkbook_config.rb
|
|
118
147
|
- lib/svix/models/checkbook_config_out.rb
|
|
119
148
|
- lib/svix/models/connector_in.rb
|
|
@@ -238,6 +267,8 @@ files:
|
|
|
238
267
|
- lib/svix/models/message_precheck_out.rb
|
|
239
268
|
- lib/svix/models/message_status.rb
|
|
240
269
|
- lib/svix/models/message_status_text.rb
|
|
270
|
+
- lib/svix/models/meta_config.rb
|
|
271
|
+
- lib/svix/models/meta_config_out.rb
|
|
241
272
|
- lib/svix/models/operational_webhook_endpoint_headers_in.rb
|
|
242
273
|
- lib/svix/models/operational_webhook_endpoint_headers_out.rb
|
|
243
274
|
- lib/svix/models/operational_webhook_endpoint_in.rb
|
|
@@ -290,6 +321,7 @@ files:
|
|
|
290
321
|
- lib/svix/models/stream_sink_in.rb
|
|
291
322
|
- lib/svix/models/stream_sink_out.rb
|
|
292
323
|
- lib/svix/models/stream_sink_patch.rb
|
|
324
|
+
- lib/svix/models/stream_token_expire_in.rb
|
|
293
325
|
- lib/svix/models/stripe_config.rb
|
|
294
326
|
- lib/svix/models/stripe_config_out.rb
|
|
295
327
|
- lib/svix/models/svix_config.rb
|
|
@@ -328,7 +360,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
328
360
|
requirements:
|
|
329
361
|
- - ">="
|
|
330
362
|
- !ruby/object:Gem::Version
|
|
331
|
-
version: '
|
|
363
|
+
version: '3.2'
|
|
332
364
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
333
365
|
requirements:
|
|
334
366
|
- - ">="
|