svix 2.9.1 → 2.11.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 +2 -2
- data/lib/svix/api/endpoint.rb +48 -0
- data/lib/svix/api/endpoint_mcp_events.rb +38 -0
- data/lib/svix/api/event_type.rb +1 -0
- data/lib/svix/api/message.rb +13 -0
- data/lib/svix/api/streaming_event_type.rb +2 -1
- data/lib/svix/models/archive_status.rb +30 -0
- data/lib/svix/models/ascend_config.rb +46 -0
- data/lib/svix/models/ascend_config_out.rb +43 -0
- data/lib/svix/models/batch_create_messages_in.rb +49 -0
- data/lib/svix/models/batch_message_in.rb +113 -0
- data/lib/svix/models/bitbucket_config.rb +46 -0
- data/lib/svix/models/bitbucket_config_out.rb +43 -0
- data/lib/svix/models/client_secret_jwt_params_in.rb +66 -0
- data/lib/svix/models/destination_in.rb +11 -1
- data/lib/svix/models/destination_out.rb +11 -1
- data/lib/svix/models/destination_patch.rb +11 -1
- data/lib/svix/models/elastic_search_config_in.rb +7 -1
- data/lib/svix/models/elastic_search_config_out.rb +4 -1
- data/lib/svix/models/elastic_search_config_patch.rb +4 -1
- data/lib/svix/models/elastic_search_operation.rb +33 -0
- data/lib/svix/models/endpoint_challenge_mode.rb +36 -0
- data/lib/svix/models/endpoint_mtls_config_in.rb +47 -0
- data/lib/svix/models/endpoint_mtls_config_out.rb +46 -0
- data/lib/svix/models/endpoint_mtls_out.rb +49 -0
- data/lib/svix/models/endpoint_oauth_config_in.rb +102 -0
- data/lib/svix/models/endpoint_oauth_config_out.rb +67 -0
- data/lib/svix/models/endpoint_oauth_out.rb +49 -0
- data/lib/svix/models/endpoint_out.rb +8 -1
- data/lib/svix/models/event_type_in.rb +17 -1
- data/lib/svix/models/event_type_out.rb +8 -0
- data/lib/svix/models/event_type_patch.rb +16 -1
- data/lib/svix/models/event_type_upsert_in.rb +16 -1
- data/lib/svix/models/generic_webhook_config.rb +46 -0
- data/lib/svix/models/generic_webhook_config_out.rb +49 -0
- data/lib/svix/models/generic_webhook_response.rb +52 -0
- data/lib/svix/models/ingest_source_in.rb +20 -0
- data/lib/svix/models/ingest_source_out.rb +20 -0
- data/lib/svix/models/mcp_events_delivery_mode.rb +28 -0
- data/lib/svix/models/mcp_events_subscribe_delivery_in.rb +59 -0
- data/lib/svix/models/mcp_events_subscribe_in.rb +100 -0
- data/lib/svix/models/mcp_events_subscribe_out.rb +66 -0
- data/lib/svix/models/mcp_events_unsubscribe_delivery_in.rb +54 -0
- data/lib/svix/models/mcp_events_unsubscribe_in.rb +59 -0
- data/lib/svix/models/message_endpoint_out.rb +8 -1
- data/lib/svix/models/message_in.rb +2 -0
- data/lib/svix/models/oauth2_auth_method_in_out.rb +42 -0
- data/lib/svix/models/oauth2_grant_type_in_out.rb +29 -0
- data/lib/svix/models/oauth_jws_signing_algorithm.rb +28 -0
- data/lib/svix/models/post_hog_config_in.rb +58 -0
- data/lib/svix/models/post_hog_config_out.rb +46 -0
- data/lib/svix/models/post_hog_config_patch.rb +49 -0
- data/lib/svix/models/segment_sink_config_in.rb +59 -0
- data/lib/svix/models/segment_sink_config_out.rb +46 -0
- data/lib/svix/models/segment_sink_config_patch.rb +52 -0
- data/lib/svix/models/stream_sink_in.rb +11 -1
- data/lib/svix/models/stream_sink_out.rb +11 -1
- data/lib/svix/models/stream_sink_patch.rb +11 -1
- data/lib/svix/models/tricentis_qtest_config.rb +46 -0
- data/lib/svix/models/tricentis_qtest_config_out.rb +46 -0
- data/lib/svix/svix_http_client.rb +1 -1
- data/lib/svix/util.rb +1 -1
- data/lib/svix/version.rb +1 -1
- data/lib/svix/webhook.rb +30 -10
- data/lib/svix.rb +37 -0
- metadata +39 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: defe5a6383bccc4eb8af8eca1a56505aa4d205e9ed0cd644018f6644f77991fa
|
|
4
|
+
data.tar.gz: 1d4f467b00d6ab74b1c72adf8affc0cffdf0d1cb4be90743417df23bf06b9fdb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 10d3d32995d64aab2d0b9fc109946df3b84aa20c0d8f22c4b330aba7d8e796d9c2da80329ff51c5b37910789fd86a89a2c10cac9d9792ba2696e80b2a605cfb9
|
|
7
|
+
data.tar.gz: 4e499e791e152f7c22babc45cb7e8e802b9c5eebeef5b1bc857bfb9d7bf7b8edf57ec374eb7e0b3bdbd418785c65543a2047c9a8a67ce969cd0ff6bbf98fb242
|
data/Gemfile.lock
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
svix (2.
|
|
4
|
+
svix (2.11.0)
|
|
5
5
|
base64 (~> 0.3.0)
|
|
6
6
|
logger (~> 1.0)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
addressable (2.9.
|
|
11
|
+
addressable (2.9.1)
|
|
12
12
|
public_suffix (>= 2.0.2, < 8.0)
|
|
13
13
|
base64 (0.3.0)
|
|
14
14
|
bigdecimal (4.1.1)
|
data/lib/svix/api/endpoint.rb
CHANGED
|
@@ -5,9 +5,11 @@ require "net/http"
|
|
|
5
5
|
|
|
6
6
|
module Svix
|
|
7
7
|
class Endpoint
|
|
8
|
+
attr_accessor :mcp_events
|
|
8
9
|
attr_accessor :transformation
|
|
9
10
|
def initialize(client)
|
|
10
11
|
@client = client
|
|
12
|
+
@mcp_events = EndpointMcpEvents.new(client)
|
|
11
13
|
@transformation = EndpointTransformation.new(client)
|
|
12
14
|
end
|
|
13
15
|
|
|
@@ -142,6 +144,52 @@ module Svix
|
|
|
142
144
|
ReplayOut.deserialize(res)
|
|
143
145
|
end
|
|
144
146
|
|
|
147
|
+
def get_oauth_config(app_id, endpoint_id)
|
|
148
|
+
res = @client.execute_request(
|
|
149
|
+
"GET",
|
|
150
|
+
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/oauth"
|
|
151
|
+
)
|
|
152
|
+
EndpointOauthOut.deserialize(res)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def set_oauth_config(app_id, endpoint_id, endpoint_oauth_config_in)
|
|
156
|
+
@client.execute_request(
|
|
157
|
+
"PUT",
|
|
158
|
+
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/oauth",
|
|
159
|
+
body: endpoint_oauth_config_in
|
|
160
|
+
)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
def delete_oauth_config(app_id, endpoint_id)
|
|
164
|
+
@client.execute_request(
|
|
165
|
+
"DELETE",
|
|
166
|
+
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/oauth"
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
def get_mtls_config(app_id, endpoint_id)
|
|
171
|
+
res = @client.execute_request(
|
|
172
|
+
"GET",
|
|
173
|
+
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/mtls"
|
|
174
|
+
)
|
|
175
|
+
EndpointMtlsOut.deserialize(res)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
def set_mtls_config(app_id, endpoint_id, endpoint_mtls_config_in)
|
|
179
|
+
@client.execute_request(
|
|
180
|
+
"PUT",
|
|
181
|
+
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/mtls",
|
|
182
|
+
body: endpoint_mtls_config_in
|
|
183
|
+
)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
def delete_mtls_config(app_id, endpoint_id)
|
|
187
|
+
@client.execute_request(
|
|
188
|
+
"DELETE",
|
|
189
|
+
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/mtls"
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
|
|
145
193
|
def get_stats(app_id, endpoint_id, options = {})
|
|
146
194
|
options = options.transform_keys(&:to_s)
|
|
147
195
|
res = @client.execute_request(
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
|
|
4
|
+
require "net/http"
|
|
5
|
+
|
|
6
|
+
module Svix
|
|
7
|
+
class EndpointMcpEvents
|
|
8
|
+
def initialize(client)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def subscribe(app_id, mcp_events_subscribe_in, options = {})
|
|
13
|
+
options = options.transform_keys(&:to_s)
|
|
14
|
+
res = @client.execute_request(
|
|
15
|
+
"POST",
|
|
16
|
+
"/api/v1/app/#{app_id}/mcp-events/subscribe",
|
|
17
|
+
headers: {
|
|
18
|
+
"idempotency-key" => options["idempotency-key"]
|
|
19
|
+
},
|
|
20
|
+
body: mcp_events_subscribe_in
|
|
21
|
+
)
|
|
22
|
+
McpEventsSubscribeOut.deserialize(res)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def unsubscribe(app_id, mcp_events_unsubscribe_in, options = {})
|
|
26
|
+
options = options.transform_keys(&:to_s)
|
|
27
|
+
@client.execute_request(
|
|
28
|
+
"POST",
|
|
29
|
+
"/api/v1/app/#{app_id}/mcp-events/unsubscribe",
|
|
30
|
+
headers: {
|
|
31
|
+
"idempotency-key" => options["idempotency-key"]
|
|
32
|
+
},
|
|
33
|
+
body: mcp_events_unsubscribe_in
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
end
|
|
38
|
+
end
|
data/lib/svix/api/event_type.rb
CHANGED
data/lib/svix/api/message.rb
CHANGED
|
@@ -74,6 +74,19 @@ module Svix
|
|
|
74
74
|
MessageOut.deserialize(res)
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
+
def create_batch(app_id, batch_create_messages_in, options = {})
|
|
78
|
+
options = options.transform_keys(&:to_s)
|
|
79
|
+
res = @client.execute_request(
|
|
80
|
+
"POST",
|
|
81
|
+
"/api/v1/app/#{app_id}/msg/batch",
|
|
82
|
+
headers: {
|
|
83
|
+
"idempotency-key" => options["idempotency-key"]
|
|
84
|
+
},
|
|
85
|
+
body: batch_create_messages_in
|
|
86
|
+
)
|
|
87
|
+
EmptyResponse.deserialize(res)
|
|
88
|
+
end
|
|
89
|
+
|
|
77
90
|
def precheck(app_id, message_precheck_in, options = {})
|
|
78
91
|
options = options.transform_keys(&:to_s)
|
|
79
92
|
res = @client.execute_request(
|
|
@@ -18,7 +18,8 @@ module Svix
|
|
|
18
18
|
"limit" => options["limit"],
|
|
19
19
|
"iterator" => options["iterator"],
|
|
20
20
|
"order" => options["order"],
|
|
21
|
-
"include_archived" => options["include_archived"]
|
|
21
|
+
"include_archived" => options["include_archived"],
|
|
22
|
+
"archive_status" => options["archive_status"]
|
|
22
23
|
}
|
|
23
24
|
)
|
|
24
25
|
ListResponseStreamEventTypeOut.deserialize(res)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
module Svix
|
|
4
|
+
class ArchiveStatus
|
|
5
|
+
ACTIVE = "active".freeze
|
|
6
|
+
ARCHIVED = "archived".freeze
|
|
7
|
+
ALL = "all".freeze
|
|
8
|
+
|
|
9
|
+
def self.all_vars
|
|
10
|
+
@all_vars ||= [ACTIVE, ARCHIVED, ALL].freeze
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def initialize(value)
|
|
14
|
+
unless ArchiveStatus.all_vars.include?(value)
|
|
15
|
+
raise "Invalid ENUM value '#{value}' for class #ArchiveStatus"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
@value = value
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.deserialize(value)
|
|
22
|
+
return value if ArchiveStatus.all_vars.include?(value)
|
|
23
|
+
raise "Invalid ENUM value '#{value}' for class #ArchiveStatus"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def serialize
|
|
27
|
+
@value
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class AscendConfig
|
|
7
|
+
attr_accessor :secret
|
|
8
|
+
|
|
9
|
+
ALL_FIELD ||= ["secret"].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::AscendConfig` 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::AscendConfig")
|
|
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["secret"] = attributes["secret"]
|
|
31
|
+
new(attrs)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def serialize
|
|
35
|
+
out = Hash.new
|
|
36
|
+
out["secret"] = Svix::serialize_primitive(@secret) unless @secret.nil?
|
|
37
|
+
out
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Serializes the object to a json string
|
|
41
|
+
# @return String
|
|
42
|
+
def to_json(*args)
|
|
43
|
+
serialize.to_json(*args)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class AscendConfigOut
|
|
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::AscendConfigOut` 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::AscendConfigOut")
|
|
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(*args)
|
|
40
|
+
serialize.to_json(*args)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class BatchCreateMessagesIn
|
|
7
|
+
attr_accessor :messages
|
|
8
|
+
|
|
9
|
+
ALL_FIELD ||= ["messages"].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::BatchCreateMessagesIn` 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::BatchCreateMessagesIn")
|
|
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["messages"] = attributes["messages"].map { |v| Svix::BatchMessageIn.deserialize(v) }
|
|
34
|
+
new(attrs)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def serialize
|
|
38
|
+
out = Hash.new
|
|
39
|
+
out["messages"] = @messages.map { |v| v.serialize } unless @messages.nil?
|
|
40
|
+
out
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Serializes the object to a json string
|
|
44
|
+
# @return String
|
|
45
|
+
def to_json(*args)
|
|
46
|
+
serialize.to_json(*args)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
# A single message in a batch of bulk-created messages
|
|
7
|
+
#
|
|
8
|
+
# Practically identical to `MessageIn`, but without the `application` field
|
|
9
|
+
class BatchMessageIn
|
|
10
|
+
# Optional unique identifier for the message
|
|
11
|
+
#
|
|
12
|
+
# This should not contain the '.' character
|
|
13
|
+
attr_accessor :event_id
|
|
14
|
+
# The event type's name
|
|
15
|
+
attr_accessor :event_type
|
|
16
|
+
# JSON payload to send as the request body of the webhook.
|
|
17
|
+
#
|
|
18
|
+
# We also support sending non-JSON payloads. Please contact us for more information.
|
|
19
|
+
#
|
|
20
|
+
# The serialized byte-length of this value should be under 1MiB. Please contact us
|
|
21
|
+
# if you need to send payloads large than 1MiB.
|
|
22
|
+
attr_accessor :payload
|
|
23
|
+
# List of free-form identifiers that endpoints can filter by
|
|
24
|
+
attr_accessor :channels
|
|
25
|
+
# List of free-form tags that can be filtered by when listing messages
|
|
26
|
+
attr_accessor :tags
|
|
27
|
+
# Extra parameters to pass to Transformations (for future use)
|
|
28
|
+
attr_accessor :transformations_params
|
|
29
|
+
# The date and time at which the message will be delivered.
|
|
30
|
+
#
|
|
31
|
+
# Note that this time is best-effort-only. Must be at least one minute
|
|
32
|
+
# and no more than 24 hours in the future.
|
|
33
|
+
attr_accessor :deliver_at
|
|
34
|
+
# Optional number of days to retain the message payload. Defaults to 90.
|
|
35
|
+
# Note that this is mutually exclusive with `payloadRetentionHours`.
|
|
36
|
+
attr_accessor :payload_retention_period
|
|
37
|
+
# Optional number of hours to retain the message payload. Note that
|
|
38
|
+
# this is mutually exclusive with `payloadRetentionPeriod`.
|
|
39
|
+
attr_accessor :payload_retention_hours
|
|
40
|
+
|
|
41
|
+
ALL_FIELD ||= [
|
|
42
|
+
"event_id",
|
|
43
|
+
"event_type",
|
|
44
|
+
"payload",
|
|
45
|
+
"channels",
|
|
46
|
+
"tags",
|
|
47
|
+
"transformations_params",
|
|
48
|
+
"deliver_at",
|
|
49
|
+
"payload_retention_period",
|
|
50
|
+
"payload_retention_hours"
|
|
51
|
+
].freeze
|
|
52
|
+
private_constant :ALL_FIELD
|
|
53
|
+
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
unless attributes.is_a?(Hash)
|
|
56
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::BatchMessageIn` new method")
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
attributes.each do |k, v|
|
|
60
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
61
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::BatchMessageIn")
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
instance_variable_set("@#{k}", v)
|
|
65
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def self.deserialize(attributes = {})
|
|
70
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
71
|
+
attrs = Hash.new
|
|
72
|
+
attrs["event_id"] = attributes["eventId"]
|
|
73
|
+
attrs["event_type"] = attributes["eventType"]
|
|
74
|
+
attrs["payload"] = attributes["payload"]
|
|
75
|
+
attrs["channels"] = attributes["channels"]
|
|
76
|
+
attrs["tags"] = attributes["tags"]
|
|
77
|
+
attrs["transformations_params"] = attributes["transformationsParams"]
|
|
78
|
+
attrs["deliver_at"] = DateTime.rfc3339(attributes["deliverAt"]).to_time if attributes["deliverAt"]
|
|
79
|
+
attrs["payload_retention_period"] = attributes["payloadRetentionPeriod"]
|
|
80
|
+
attrs["payload_retention_hours"] = attributes["payloadRetentionHours"]
|
|
81
|
+
new(attrs)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def serialize
|
|
85
|
+
out = Hash.new
|
|
86
|
+
out["eventId"] = Svix::serialize_primitive(@event_id) unless @event_id.nil?
|
|
87
|
+
out["eventType"] = Svix::serialize_primitive(@event_type) unless @event_type.nil?
|
|
88
|
+
out["payload"] = Svix::serialize_primitive(@payload) unless @payload.nil?
|
|
89
|
+
out["channels"] = Svix::serialize_primitive(@channels) unless @channels.nil?
|
|
90
|
+
out["tags"] = Svix::serialize_primitive(@tags) unless @tags.nil?
|
|
91
|
+
unless @transformations_params.nil?
|
|
92
|
+
out["transformationsParams"] = Svix::serialize_primitive(@transformations_params)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
out["deliverAt"] = Svix::serialize_primitive(@deliver_at) unless @deliver_at.nil?
|
|
96
|
+
unless @payload_retention_period.nil?
|
|
97
|
+
out["payloadRetentionPeriod"] = Svix::serialize_primitive(@payload_retention_period)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
unless @payload_retention_hours.nil?
|
|
101
|
+
out["payloadRetentionHours"] = Svix::serialize_primitive(@payload_retention_hours)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
out
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Serializes the object to a json string
|
|
108
|
+
# @return String
|
|
109
|
+
def to_json(*args)
|
|
110
|
+
serialize.to_json(*args)
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class BitbucketConfig
|
|
7
|
+
attr_accessor :secret
|
|
8
|
+
|
|
9
|
+
ALL_FIELD ||= ["secret"].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::BitbucketConfig` 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::BitbucketConfig")
|
|
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["secret"] = attributes["secret"]
|
|
31
|
+
new(attrs)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def serialize
|
|
35
|
+
out = Hash.new
|
|
36
|
+
out["secret"] = Svix::serialize_primitive(@secret) unless @secret.nil?
|
|
37
|
+
out
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Serializes the object to a json string
|
|
41
|
+
# @return String
|
|
42
|
+
def to_json(*args)
|
|
43
|
+
serialize.to_json(*args)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class BitbucketConfigOut
|
|
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::BitbucketConfigOut` 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::BitbucketConfigOut")
|
|
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(*args)
|
|
40
|
+
serialize.to_json(*args)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class ClientSecretJwtParamsIn
|
|
7
|
+
# The base64-encoded secret used for signing the JWT.
|
|
8
|
+
attr_accessor :secret_base64
|
|
9
|
+
# The algorithm used to sign the JWT.
|
|
10
|
+
attr_accessor :signing_algorithm
|
|
11
|
+
# Optional secret identifier.
|
|
12
|
+
#
|
|
13
|
+
# If supplied, this will be populated in the JWT header in the `kid` field.
|
|
14
|
+
attr_accessor :secret_id
|
|
15
|
+
# Optional number of seconds after which the JWT should expire.
|
|
16
|
+
#
|
|
17
|
+
# Defaults to 300 seconds.
|
|
18
|
+
attr_accessor :token_expiry_secs
|
|
19
|
+
|
|
20
|
+
ALL_FIELD ||= ["secret_base64", "signing_algorithm", "secret_id", "token_expiry_secs"].freeze
|
|
21
|
+
private_constant :ALL_FIELD
|
|
22
|
+
|
|
23
|
+
def initialize(attributes = {})
|
|
24
|
+
unless attributes.is_a?(Hash)
|
|
25
|
+
fail(
|
|
26
|
+
ArgumentError,
|
|
27
|
+
"The input argument (attributes) must be a hash in `Svix::ClientSecretJwtParamsIn` new method"
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
attributes.each do |k, v|
|
|
32
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
33
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::ClientSecretJwtParamsIn")
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
instance_variable_set("@#{k}", v)
|
|
37
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.deserialize(attributes = {})
|
|
42
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
43
|
+
attrs = Hash.new
|
|
44
|
+
attrs["secret_base64"] = attributes["secretBase64"]
|
|
45
|
+
attrs["signing_algorithm"] = Svix::OauthJwsSigningAlgorithm.deserialize(attributes["signingAlgorithm"])
|
|
46
|
+
attrs["secret_id"] = attributes["secretId"]
|
|
47
|
+
attrs["token_expiry_secs"] = attributes["tokenExpirySecs"]
|
|
48
|
+
new(attrs)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def serialize
|
|
52
|
+
out = Hash.new
|
|
53
|
+
out["secretBase64"] = Svix::serialize_primitive(@secret_base64) unless @secret_base64.nil?
|
|
54
|
+
out["signingAlgorithm"] = Svix::serialize_schema_ref(@signing_algorithm) unless @signing_algorithm.nil?
|
|
55
|
+
out["secretId"] = Svix::serialize_primitive(@secret_id) unless @secret_id.nil?
|
|
56
|
+
out["tokenExpirySecs"] = Svix::serialize_primitive(@token_expiry_secs) unless @token_expiry_secs.nil?
|
|
57
|
+
out
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Serializes the object to a json string
|
|
61
|
+
# @return String
|
|
62
|
+
def to_json(*args)
|
|
63
|
+
serialize.to_json(*args)
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -12,10 +12,12 @@ require_relative "./fifo_endpoint_config_in"
|
|
|
12
12
|
require_relative "./google_cloud_pub_sub_config_in"
|
|
13
13
|
require_relative "./google_cloud_storage_config_in"
|
|
14
14
|
require_relative "./otel_tracing_config_in"
|
|
15
|
+
require_relative "./post_hog_config_in"
|
|
15
16
|
require_relative "./postgres_config_in"
|
|
16
17
|
require_relative "./rabbit_mq_config_in"
|
|
17
18
|
require_relative "./redshift_config_in"
|
|
18
19
|
require_relative "./s3_config_in"
|
|
20
|
+
require_relative "./segment_sink_config_in"
|
|
19
21
|
require_relative "./snowflake_config_in"
|
|
20
22
|
require_relative "./sns_config_in"
|
|
21
23
|
require_relative "./sqs_config_in"
|
|
@@ -85,6 +87,12 @@ module Svix
|
|
|
85
87
|
|
|
86
88
|
class ElasticSearch < ElasticSearchConfigIn
|
|
87
89
|
end
|
|
90
|
+
|
|
91
|
+
class PostHog < PostHogConfigIn
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
class Segment < SegmentSinkConfigIn
|
|
95
|
+
end
|
|
88
96
|
end
|
|
89
97
|
|
|
90
98
|
# The destination's type and type-specific configuration.
|
|
@@ -136,7 +144,9 @@ module Svix
|
|
|
136
144
|
DestinationInConfig::RabbitMq => "rabbitMq",
|
|
137
145
|
DestinationInConfig::Redshift => "redshift",
|
|
138
146
|
DestinationInConfig::Postgres => "postgres",
|
|
139
|
-
DestinationInConfig::ElasticSearch => "elasticSearch"
|
|
147
|
+
DestinationInConfig::ElasticSearch => "elasticSearch",
|
|
148
|
+
DestinationInConfig::PostHog => "postHog",
|
|
149
|
+
DestinationInConfig::Segment => "segment"
|
|
140
150
|
}
|
|
141
151
|
private_constant :TYPE_TO_NAME
|
|
142
152
|
NAME_TO_TYPE = TYPE_TO_NAME.invert
|