svix 1.99.1 → 2.0.0.pre.rc.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/authentication.rb +0 -12
- data/lib/svix/api/connector.rb +2 -2
- data/lib/svix/api/endpoint.rb +5 -19
- data/lib/svix/api/endpoint_transformation.rb +29 -0
- data/lib/svix/api/event_type.rb +2 -2
- data/lib/svix/api/ingest.rb +2 -14
- data/lib/svix/api/ingest_authentication.rb +26 -0
- data/lib/svix/api/ingest_endpoint.rb +5 -19
- data/lib/svix/api/ingest_endpoint_transformation.rb +29 -0
- data/lib/svix/api/ingest_source.rb +1 -1
- data/lib/svix/api/integration.rb +0 -8
- data/lib/svix/api/operational_webhook_endpoint.rb +3 -3
- data/lib/svix/api/streaming.rb +0 -8
- data/lib/svix/api/streaming_event_type.rb +1 -1
- data/lib/svix/api/streaming_sink.rb +3 -10
- data/lib/svix/api/streaming_sink_transformation.rb +30 -0
- data/lib/svix/api/streaming_stream.rb +1 -1
- data/lib/svix/models/amazon_s3_patch_config.rb +10 -10
- data/lib/svix/models/api_token_out.rb +10 -10
- data/lib/svix/models/app_portal_access_in.rb +9 -9
- data/lib/svix/models/app_portal_access_out.rb +4 -4
- data/lib/svix/models/app_usage_stats_in.rb +5 -5
- data/lib/svix/models/app_usage_stats_out.rb +7 -7
- data/lib/svix/models/application_in.rb +4 -8
- data/lib/svix/models/application_out.rb +15 -19
- data/lib/svix/models/application_patch.rb +4 -8
- data/lib/svix/models/azure_blob_storage_config.rb +7 -7
- data/lib/svix/models/azure_blob_storage_patch_config.rb +7 -7
- data/lib/svix/models/big_query_config.rb +8 -8
- data/lib/svix/models/big_query_patch_config.rb +7 -7
- data/lib/svix/models/bulk_replay_in.rb +13 -13
- data/lib/svix/models/clickhouse_config.rb +13 -13
- data/lib/svix/models/clickhouse_patch_config.rb +10 -10
- data/lib/svix/models/connector_in.rb +29 -29
- data/lib/svix/models/connector_out.rb +41 -41
- data/lib/svix/models/connector_patch.rb +21 -21
- data/lib/svix/models/{connector_update.rb → connector_upsert_in.rb} +24 -24
- data/lib/svix/models/cron_config.rb +7 -7
- data/lib/svix/models/endpoint_headers_patch_in.rb +4 -4
- data/lib/svix/models/endpoint_in.rb +33 -42
- data/lib/svix/models/endpoint_message_out.rb +29 -29
- data/lib/svix/models/endpoint_out.rb +26 -36
- data/lib/svix/models/endpoint_patch.rb +13 -39
- data/lib/svix/models/endpoint_secret_rotate_in.rb +7 -7
- data/lib/svix/models/endpoint_stats.rb +10 -10
- data/lib/svix/models/endpoint_transformation_out.rb +4 -4
- data/lib/svix/models/{endpoint_update.rb → endpoint_upsert_in.rb} +20 -38
- data/lib/svix/models/environment_in.rb +7 -7
- data/lib/svix/models/environment_out.rb +7 -7
- data/lib/svix/models/event_bridge_config.rb +11 -11
- data/lib/svix/models/event_bridge_patch_config.rb +10 -10
- data/lib/svix/models/event_stream_out.rb +4 -4
- data/lib/svix/models/event_type_from_open_api.rb +14 -18
- data/lib/svix/models/event_type_in.rb +15 -28
- data/lib/svix/models/event_type_out.rb +27 -27
- data/lib/svix/models/event_type_patch.rb +7 -11
- data/lib/svix/models/{event_type_update.rb → event_type_upsert_in.rb} +11 -15
- data/lib/svix/models/google_cloud_pub_sub_config.rb +5 -5
- data/lib/svix/models/google_cloud_pub_sub_patch_config.rb +4 -4
- data/lib/svix/models/ingest_endpoint_in.rb +17 -21
- data/lib/svix/models/ingest_endpoint_out.rb +20 -26
- data/lib/svix/models/{ingest_endpoint_update.rb → ingest_endpoint_upsert_in.rb} +16 -17
- data/lib/svix/models/ingest_source_in.rb +4 -4
- data/lib/svix/models/ingest_source_out.rb +13 -13
- data/lib/svix/models/integration_in.rb +4 -4
- data/lib/svix/models/integration_out.rb +11 -11
- data/lib/svix/models/integration_update.rb +4 -4
- data/lib/svix/models/list_response_application_out.rb +4 -4
- data/lib/svix/models/list_response_background_task_out.rb +4 -4
- data/lib/svix/models/list_response_connector_out.rb +4 -4
- data/lib/svix/models/list_response_endpoint_message_out.rb +4 -4
- data/lib/svix/models/list_response_endpoint_out.rb +4 -4
- data/lib/svix/models/list_response_event_type_out.rb +4 -4
- data/lib/svix/models/list_response_ingest_endpoint_out.rb +4 -4
- data/lib/svix/models/list_response_ingest_source_out.rb +4 -4
- data/lib/svix/models/list_response_integration_out.rb +4 -4
- data/lib/svix/models/list_response_message_attempt_out.rb +4 -4
- data/lib/svix/models/list_response_message_endpoint_out.rb +4 -4
- data/lib/svix/models/list_response_message_out.rb +4 -4
- data/lib/svix/models/list_response_operational_webhook_endpoint_out.rb +4 -4
- data/lib/svix/models/list_response_stream_event_type_out.rb +4 -4
- data/lib/svix/models/list_response_stream_out.rb +4 -4
- data/lib/svix/models/list_response_stream_sink_out.rb +4 -4
- data/lib/svix/models/message_attempt_out.rb +31 -31
- data/lib/svix/models/message_endpoint_out.rb +30 -40
- data/lib/svix/models/message_in.rb +30 -30
- data/lib/svix/models/message_out.rb +14 -14
- data/lib/svix/models/message_precheck_in.rb +4 -4
- data/lib/svix/models/operational_webhook_endpoint_in.rb +20 -34
- data/lib/svix/models/operational_webhook_endpoint_out.rb +24 -30
- data/lib/svix/models/{operational_webhook_endpoint_update.rb → operational_webhook_endpoint_upsert_in.rb} +16 -20
- data/lib/svix/models/poller_v2_message_out.rb +25 -25
- data/lib/svix/models/polling_endpoint_message_out.rb +17 -17
- data/lib/svix/models/polling_endpoint_out.rb +4 -4
- data/lib/svix/models/rabbit_mq_config.rb +4 -4
- data/lib/svix/models/redshift_config.rb +19 -19
- data/lib/svix/models/redshift_patch_config.rb +7 -7
- data/lib/svix/models/s3_config.rb +10 -10
- data/lib/svix/models/sink_http_config.rb +4 -4
- data/lib/svix/models/sink_in_common.rb +21 -35
- data/lib/svix/models/sink_otel_v1_config.rb +4 -4
- data/lib/svix/models/snowflake_config.rb +11 -11
- data/lib/svix/models/snowflake_patch_config.rb +7 -7
- data/lib/svix/models/sns_config.rb +10 -10
- data/lib/svix/models/sns_patch_config.rb +10 -10
- data/lib/svix/models/sqs_config.rb +7 -7
- data/lib/svix/models/sqs_patch_config.rb +7 -7
- data/lib/svix/models/stream_event_type_in.rb +11 -11
- data/lib/svix/models/stream_event_type_out.rb +14 -14
- data/lib/svix/models/stream_event_type_patch.rb +7 -7
- data/lib/svix/models/stream_in.rb +4 -4
- data/lib/svix/models/stream_out.rb +11 -11
- data/lib/svix/models/stream_patch.rb +4 -4
- data/lib/svix/models/stream_portal_access_in.rb +5 -5
- data/lib/svix/models/stream_sink_in.rb +17 -17
- data/lib/svix/models/stream_sink_out.rb +33 -33
- data/lib/svix/models/stream_sink_patch.rb +11 -11
- data/lib/svix/svix.rb +0 -2
- data/lib/svix/svix_http_client.rb +6 -2
- data/lib/svix/version.rb +1 -1
- data/lib/svix/webhook.rb +1 -2
- data/lib/svix.rb +9 -37
- metadata +11 -39
- data/lib/svix/models/background_task_finished_event.rb +0 -53
- data/lib/svix/models/background_task_finished_event2.rb +0 -59
- data/lib/svix/models/dashboard_access_out.rb +0 -49
- data/lib/svix/models/endpoint_created_event.rb +0 -50
- data/lib/svix/models/endpoint_created_event_data.rb +0 -63
- data/lib/svix/models/endpoint_deleted_event.rb +0 -50
- data/lib/svix/models/endpoint_deleted_event_data.rb +0 -63
- data/lib/svix/models/endpoint_disabled_event.rb +0 -53
- data/lib/svix/models/endpoint_disabled_event_data.rb +0 -69
- data/lib/svix/models/endpoint_disabled_trigger.rb +0 -29
- data/lib/svix/models/endpoint_enabled_event.rb +0 -50
- data/lib/svix/models/endpoint_enabled_event_data.rb +0 -63
- data/lib/svix/models/endpoint_updated_event.rb +0 -50
- data/lib/svix/models/endpoint_updated_event_data.rb +0 -63
- data/lib/svix/models/http_attempt_times.rb +0 -49
- data/lib/svix/models/ingest_endpoint_disabled_event.rb +0 -53
- data/lib/svix/models/ingest_endpoint_disabled_event_data.rb +0 -65
- data/lib/svix/models/ingest_message_attempt_exhausted_event.rb +0 -53
- data/lib/svix/models/ingest_message_attempt_exhausted_event_data.rb +0 -66
- data/lib/svix/models/ingest_message_attempt_failing_event.rb +0 -54
- data/lib/svix/models/ingest_message_attempt_failing_event_data.rb +0 -66
- data/lib/svix/models/ingest_message_attempt_recovered_event.rb +0 -53
- data/lib/svix/models/ingest_message_attempt_recovered_event_data.rb +0 -66
- data/lib/svix/models/message_attempt_exhausted_event.rb +0 -53
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +0 -70
- data/lib/svix/models/message_attempt_failed_data.rb +0 -56
- data/lib/svix/models/message_attempt_failing_event.rb +0 -54
- data/lib/svix/models/message_attempt_failing_event_data.rb +0 -70
- data/lib/svix/models/message_attempt_log.rb +0 -112
- data/lib/svix/models/message_attempt_log_event.rb +0 -53
- data/lib/svix/models/message_attempt_recovered_event.rb +0 -53
- data/lib/svix/models/message_attempt_recovered_event_data.rb +0 -70
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c001003803b586530a7595c16c065112e37599263f80ecb3886598631f934060
|
|
4
|
+
data.tar.gz: 7080aaa17f07dd546b6d4a2e6c475fd0a483fb62b706589365ab60be612fd9b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f65a6aad33f8b7e9f52cd1c15aa6ea3d0874722a2c749ea4ff8d229d9afa53d6aaddf667493c3330012de0f31c55362644df3cef8d783d6979e794d63f82262
|
|
7
|
+
data.tar.gz: 374973673dffb18172332a9ab5644a96d0aa6e3142d1dfee4543f7e0b431ee69a3af76864117bcf6fb38d6fd7deb234a2607b8ae6b15680393bdb9524074c1ae
|
data/Gemfile.lock
CHANGED
data/lib/svix/api/application.rb
CHANGED
|
@@ -45,18 +45,6 @@ module Svix
|
|
|
45
45
|
)
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
def dashboard_access(app_id, options = {})
|
|
49
|
-
options = options.transform_keys(&:to_s)
|
|
50
|
-
res = @client.execute_request(
|
|
51
|
-
"POST",
|
|
52
|
-
"/api/v1/auth/dashboard-access/#{app_id}",
|
|
53
|
-
headers: {
|
|
54
|
-
"idempotency-key" => options["idempotency-key"]
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
DashboardAccessOut.deserialize(res)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
48
|
def stream_portal_access(stream_id, stream_portal_access_in, options = {})
|
|
61
49
|
options = options.transform_keys(&:to_s)
|
|
62
50
|
res = @client.execute_request(
|
data/lib/svix/api/connector.rb
CHANGED
|
@@ -45,11 +45,11 @@ module Svix
|
|
|
45
45
|
ConnectorOut.deserialize(res)
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
def
|
|
48
|
+
def upsert(connector_id, connector_upsert_in)
|
|
49
49
|
res = @client.execute_request(
|
|
50
50
|
"PUT",
|
|
51
51
|
"/api/v1/connector/#{connector_id}",
|
|
52
|
-
body:
|
|
52
|
+
body: connector_upsert_in
|
|
53
53
|
)
|
|
54
54
|
ConnectorOut.deserialize(res)
|
|
55
55
|
end
|
data/lib/svix/api/endpoint.rb
CHANGED
|
@@ -5,8 +5,10 @@ require "net/http"
|
|
|
5
5
|
|
|
6
6
|
module Svix
|
|
7
7
|
class Endpoint
|
|
8
|
+
attr_accessor :transformation
|
|
8
9
|
def initialize(client)
|
|
9
10
|
@client = client
|
|
11
|
+
@transformation = EndpointTransformation.new(client)
|
|
10
12
|
end
|
|
11
13
|
|
|
12
14
|
def list(app_id, options = {})
|
|
@@ -44,11 +46,11 @@ module Svix
|
|
|
44
46
|
EndpointOut.deserialize(res)
|
|
45
47
|
end
|
|
46
48
|
|
|
47
|
-
def
|
|
49
|
+
def upsert(app_id, endpoint_id, endpoint_upsert_in)
|
|
48
50
|
res = @client.execute_request(
|
|
49
51
|
"PUT",
|
|
50
52
|
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}",
|
|
51
|
-
body:
|
|
53
|
+
body: endpoint_upsert_in
|
|
52
54
|
)
|
|
53
55
|
EndpointOut.deserialize(res)
|
|
54
56
|
end
|
|
@@ -97,7 +99,7 @@ module Svix
|
|
|
97
99
|
EndpointHeadersOut.deserialize(res)
|
|
98
100
|
end
|
|
99
101
|
|
|
100
|
-
def
|
|
102
|
+
def set_headers(app_id, endpoint_id, endpoint_headers_in)
|
|
101
103
|
@client.execute_request(
|
|
102
104
|
"PUT",
|
|
103
105
|
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/headers",
|
|
@@ -113,22 +115,6 @@ module Svix
|
|
|
113
115
|
)
|
|
114
116
|
end
|
|
115
117
|
|
|
116
|
-
def transformation_get(app_id, endpoint_id)
|
|
117
|
-
res = @client.execute_request(
|
|
118
|
-
"GET",
|
|
119
|
-
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/transformation"
|
|
120
|
-
)
|
|
121
|
-
EndpointTransformationOut.deserialize(res)
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
def patch_transformation(app_id, endpoint_id, endpoint_transformation_patch)
|
|
125
|
-
@client.execute_request(
|
|
126
|
-
"PATCH",
|
|
127
|
-
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/transformation",
|
|
128
|
-
body: endpoint_transformation_patch
|
|
129
|
-
)
|
|
130
|
-
end
|
|
131
|
-
|
|
132
118
|
def replay_missing(app_id, endpoint_id, replay_in, options = {})
|
|
133
119
|
options = options.transform_keys(&:to_s)
|
|
134
120
|
res = @client.execute_request(
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
|
|
4
|
+
require "net/http"
|
|
5
|
+
|
|
6
|
+
module Svix
|
|
7
|
+
class EndpointTransformation
|
|
8
|
+
def initialize(client)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def get(app_id, endpoint_id)
|
|
13
|
+
res = @client.execute_request(
|
|
14
|
+
"GET",
|
|
15
|
+
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/transformation"
|
|
16
|
+
)
|
|
17
|
+
EndpointTransformationOut.deserialize(res)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def patch(app_id, endpoint_id, endpoint_transformation_patch)
|
|
21
|
+
@client.execute_request(
|
|
22
|
+
"PATCH",
|
|
23
|
+
"/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/transformation",
|
|
24
|
+
body: endpoint_transformation_patch
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
data/lib/svix/api/event_type.rb
CHANGED
|
@@ -59,11 +59,11 @@ module Svix
|
|
|
59
59
|
EventTypeOut.deserialize(res)
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
-
def
|
|
62
|
+
def upsert(event_type_name, event_type_upsert_in)
|
|
63
63
|
res = @client.execute_request(
|
|
64
64
|
"PUT",
|
|
65
65
|
"/api/v1/event-type/#{event_type_name}",
|
|
66
|
-
body:
|
|
66
|
+
body: event_type_upsert_in
|
|
67
67
|
)
|
|
68
68
|
EventTypeOut.deserialize(res)
|
|
69
69
|
end
|
data/lib/svix/api/ingest.rb
CHANGED
|
@@ -5,26 +5,14 @@ require "net/http"
|
|
|
5
5
|
|
|
6
6
|
module Svix
|
|
7
7
|
class Ingest
|
|
8
|
+
attr_accessor :authentication
|
|
8
9
|
attr_accessor :endpoint
|
|
9
10
|
attr_accessor :source
|
|
10
11
|
def initialize(client)
|
|
11
12
|
@client = client
|
|
13
|
+
@authentication = IngestAuthentication.new(client)
|
|
12
14
|
@endpoint = IngestEndpoint.new(client)
|
|
13
15
|
@source = IngestSource.new(client)
|
|
14
16
|
end
|
|
15
|
-
|
|
16
|
-
def dashboard(source_id, ingest_source_consumer_portal_access_in, options = {})
|
|
17
|
-
options = options.transform_keys(&:to_s)
|
|
18
|
-
res = @client.execute_request(
|
|
19
|
-
"POST",
|
|
20
|
-
"/ingest/api/v1/source/#{source_id}/dashboard",
|
|
21
|
-
headers: {
|
|
22
|
-
"idempotency-key" => options["idempotency-key"]
|
|
23
|
-
},
|
|
24
|
-
body: ingest_source_consumer_portal_access_in
|
|
25
|
-
)
|
|
26
|
-
DashboardAccessOut.deserialize(res)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
17
|
end
|
|
30
18
|
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
|
|
4
|
+
require "net/http"
|
|
5
|
+
|
|
6
|
+
module Svix
|
|
7
|
+
class IngestAuthentication
|
|
8
|
+
def initialize(client)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def consumer_portal_access(source_id, ingest_source_consumer_portal_access_in, options = {})
|
|
13
|
+
options = options.transform_keys(&:to_s)
|
|
14
|
+
res = @client.execute_request(
|
|
15
|
+
"POST",
|
|
16
|
+
"/ingest/api/v1/source/#{source_id}/dashboard",
|
|
17
|
+
headers: {
|
|
18
|
+
"idempotency-key" => options["idempotency-key"]
|
|
19
|
+
},
|
|
20
|
+
body: ingest_source_consumer_portal_access_in
|
|
21
|
+
)
|
|
22
|
+
AppPortalAccessOut.deserialize(res)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -5,8 +5,10 @@ require "net/http"
|
|
|
5
5
|
|
|
6
6
|
module Svix
|
|
7
7
|
class IngestEndpoint
|
|
8
|
+
attr_accessor :transformation
|
|
8
9
|
def initialize(client)
|
|
9
10
|
@client = client
|
|
11
|
+
@transformation = IngestEndpointTransformation.new(client)
|
|
10
12
|
end
|
|
11
13
|
|
|
12
14
|
def list(source_id, options = {})
|
|
@@ -44,11 +46,11 @@ module Svix
|
|
|
44
46
|
IngestEndpointOut.deserialize(res)
|
|
45
47
|
end
|
|
46
48
|
|
|
47
|
-
def
|
|
49
|
+
def upsert(source_id, endpoint_id, ingest_endpoint_upsert_in)
|
|
48
50
|
res = @client.execute_request(
|
|
49
51
|
"PUT",
|
|
50
52
|
"/ingest/api/v1/source/#{source_id}/endpoint/#{endpoint_id}",
|
|
51
|
-
body:
|
|
53
|
+
body: ingest_endpoint_upsert_in
|
|
52
54
|
)
|
|
53
55
|
IngestEndpointOut.deserialize(res)
|
|
54
56
|
end
|
|
@@ -88,7 +90,7 @@ module Svix
|
|
|
88
90
|
IngestEndpointHeadersOut.deserialize(res)
|
|
89
91
|
end
|
|
90
92
|
|
|
91
|
-
def
|
|
93
|
+
def set_headers(source_id, endpoint_id, ingest_endpoint_headers_in)
|
|
92
94
|
@client.execute_request(
|
|
93
95
|
"PUT",
|
|
94
96
|
"/ingest/api/v1/source/#{source_id}/endpoint/#{endpoint_id}/headers",
|
|
@@ -96,21 +98,5 @@ module Svix
|
|
|
96
98
|
)
|
|
97
99
|
end
|
|
98
100
|
|
|
99
|
-
def get_transformation(source_id, endpoint_id)
|
|
100
|
-
res = @client.execute_request(
|
|
101
|
-
"GET",
|
|
102
|
-
"/ingest/api/v1/source/#{source_id}/endpoint/#{endpoint_id}/transformation"
|
|
103
|
-
)
|
|
104
|
-
IngestEndpointTransformationOut.deserialize(res)
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
def set_transformation(source_id, endpoint_id, ingest_endpoint_transformation_patch)
|
|
108
|
-
@client.execute_request(
|
|
109
|
-
"PATCH",
|
|
110
|
-
"/ingest/api/v1/source/#{source_id}/endpoint/#{endpoint_id}/transformation",
|
|
111
|
-
body: ingest_endpoint_transformation_patch
|
|
112
|
-
)
|
|
113
|
-
end
|
|
114
|
-
|
|
115
101
|
end
|
|
116
102
|
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
|
|
4
|
+
require "net/http"
|
|
5
|
+
|
|
6
|
+
module Svix
|
|
7
|
+
class IngestEndpointTransformation
|
|
8
|
+
def initialize(client)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def transformation(source_id, endpoint_id)
|
|
13
|
+
res = @client.execute_request(
|
|
14
|
+
"GET",
|
|
15
|
+
"/ingest/api/v1/source/#{source_id}/endpoint/#{endpoint_id}/transformation"
|
|
16
|
+
)
|
|
17
|
+
IngestEndpointTransformationOut.deserialize(res)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def patch(source_id, endpoint_id, ingest_endpoint_transformation_patch)
|
|
21
|
+
@client.execute_request(
|
|
22
|
+
"PATCH",
|
|
23
|
+
"/ingest/api/v1/source/#{source_id}/endpoint/#{endpoint_id}/transformation",
|
|
24
|
+
body: ingest_endpoint_transformation_patch
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
data/lib/svix/api/integration.rb
CHANGED
|
@@ -72,13 +72,5 @@ module Svix
|
|
|
72
72
|
IntegrationKeyOut.deserialize(res)
|
|
73
73
|
end
|
|
74
74
|
|
|
75
|
-
def get_key(app_id, integ_id)
|
|
76
|
-
res = @client.execute_request(
|
|
77
|
-
"GET",
|
|
78
|
-
"/api/v1/app/#{app_id}/integration/#{integ_id}/key"
|
|
79
|
-
)
|
|
80
|
-
IntegrationKeyOut.deserialize(res)
|
|
81
|
-
end
|
|
82
|
-
|
|
83
75
|
end
|
|
84
76
|
end
|
|
@@ -44,11 +44,11 @@ module Svix
|
|
|
44
44
|
OperationalWebhookEndpointOut.deserialize(res)
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
def
|
|
47
|
+
def upsert(endpoint_id, operational_webhook_endpoint_upsert_in)
|
|
48
48
|
res = @client.execute_request(
|
|
49
49
|
"PUT",
|
|
50
50
|
"/api/v1/operational-webhook/endpoint/#{endpoint_id}",
|
|
51
|
-
body:
|
|
51
|
+
body: operational_webhook_endpoint_upsert_in
|
|
52
52
|
)
|
|
53
53
|
OperationalWebhookEndpointOut.deserialize(res)
|
|
54
54
|
end
|
|
@@ -88,7 +88,7 @@ module Svix
|
|
|
88
88
|
OperationalWebhookEndpointHeadersOut.deserialize(res)
|
|
89
89
|
end
|
|
90
90
|
|
|
91
|
-
def
|
|
91
|
+
def set_headers(endpoint_id, operational_webhook_endpoint_headers_in)
|
|
92
92
|
@client.execute_request(
|
|
93
93
|
"PUT",
|
|
94
94
|
"/api/v1/operational-webhook/endpoint/#{endpoint_id}/headers",
|
data/lib/svix/api/streaming.rb
CHANGED
|
@@ -17,14 +17,6 @@ module Svix
|
|
|
17
17
|
@stream = StreamingStream.new(client)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def sink_transformation_get(stream_id, sink_id)
|
|
21
|
-
res = @client.execute_request(
|
|
22
|
-
"GET",
|
|
23
|
-
"/api/v1/stream/#{stream_id}/sink/#{sink_id}/transformation"
|
|
24
|
-
)
|
|
25
|
-
SinkTransformationOut.deserialize(res)
|
|
26
|
-
end
|
|
27
|
-
|
|
28
20
|
def sink_headers_get(stream_id, sink_id)
|
|
29
21
|
res = @client.execute_request(
|
|
30
22
|
"GET",
|
|
@@ -5,8 +5,10 @@ require "net/http"
|
|
|
5
5
|
|
|
6
6
|
module Svix
|
|
7
7
|
class StreamingSink
|
|
8
|
+
attr_accessor :transformation
|
|
8
9
|
def initialize(client)
|
|
9
10
|
@client = client
|
|
11
|
+
@transformation = StreamingSinkTransformation.new(client)
|
|
10
12
|
end
|
|
11
13
|
|
|
12
14
|
def list(stream_id, options = {})
|
|
@@ -44,7 +46,7 @@ module Svix
|
|
|
44
46
|
StreamSinkOut.deserialize(res)
|
|
45
47
|
end
|
|
46
48
|
|
|
47
|
-
def
|
|
49
|
+
def upsert(stream_id, sink_id, stream_sink_in)
|
|
48
50
|
res = @client.execute_request(
|
|
49
51
|
"PUT",
|
|
50
52
|
"/api/v1/stream/#{stream_id}/sink/#{sink_id}",
|
|
@@ -69,15 +71,6 @@ module Svix
|
|
|
69
71
|
StreamSinkOut.deserialize(res)
|
|
70
72
|
end
|
|
71
73
|
|
|
72
|
-
def transformation_partial_update(stream_id, sink_id, sink_transform_in)
|
|
73
|
-
res = @client.execute_request(
|
|
74
|
-
"PATCH",
|
|
75
|
-
"/api/v1/stream/#{stream_id}/sink/#{sink_id}/transformation",
|
|
76
|
-
body: sink_transform_in
|
|
77
|
-
)
|
|
78
|
-
EmptyResponse.deserialize(res)
|
|
79
|
-
end
|
|
80
|
-
|
|
81
74
|
def get_secret(stream_id, sink_id)
|
|
82
75
|
res = @client.execute_request(
|
|
83
76
|
"GET",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
|
|
4
|
+
require "net/http"
|
|
5
|
+
|
|
6
|
+
module Svix
|
|
7
|
+
class StreamingSinkTransformation
|
|
8
|
+
def initialize(client)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def get(stream_id, sink_id)
|
|
13
|
+
res = @client.execute_request(
|
|
14
|
+
"GET",
|
|
15
|
+
"/api/v1/stream/#{stream_id}/sink/#{sink_id}/transformation"
|
|
16
|
+
)
|
|
17
|
+
SinkTransformationOut.deserialize(res)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def patch(stream_id, sink_id, sink_transform_in)
|
|
21
|
+
res = @client.execute_request(
|
|
22
|
+
"PATCH",
|
|
23
|
+
"/api/v1/stream/#{stream_id}/sink/#{sink_id}/transformation",
|
|
24
|
+
body: sink_transform_in
|
|
25
|
+
)
|
|
26
|
+
EmptyResponse.deserialize(res)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -4,13 +4,13 @@ require "json"
|
|
|
4
4
|
|
|
5
5
|
module Svix
|
|
6
6
|
class AmazonS3PatchConfig
|
|
7
|
-
attr_accessor :access_key_id
|
|
8
7
|
attr_accessor :bucket
|
|
9
|
-
attr_accessor :
|
|
10
|
-
attr_accessor :region
|
|
8
|
+
attr_accessor :access_key_id
|
|
11
9
|
attr_accessor :secret_access_key
|
|
10
|
+
attr_accessor :region
|
|
11
|
+
attr_accessor :endpoint_url
|
|
12
12
|
|
|
13
|
-
ALL_FIELD ||= ["
|
|
13
|
+
ALL_FIELD ||= ["bucket", "access_key_id", "secret_access_key", "region", "endpoint_url"].freeze
|
|
14
14
|
private_constant :ALL_FIELD
|
|
15
15
|
|
|
16
16
|
def initialize(attributes = {})
|
|
@@ -31,21 +31,21 @@ module Svix
|
|
|
31
31
|
def self.deserialize(attributes = {})
|
|
32
32
|
attributes = attributes.transform_keys(&:to_s)
|
|
33
33
|
attrs = Hash.new
|
|
34
|
-
attrs["access_key_id"] = attributes["accessKeyId"]
|
|
35
34
|
attrs["bucket"] = attributes["bucket"]
|
|
36
|
-
attrs["
|
|
37
|
-
attrs["region"] = attributes["region"]
|
|
35
|
+
attrs["access_key_id"] = attributes["accessKeyId"]
|
|
38
36
|
attrs["secret_access_key"] = attributes["secretAccessKey"]
|
|
37
|
+
attrs["region"] = attributes["region"]
|
|
38
|
+
attrs["endpoint_url"] = attributes["endpointUrl"]
|
|
39
39
|
new(attrs)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def serialize
|
|
43
43
|
out = Hash.new
|
|
44
|
-
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) if @access_key_id
|
|
45
44
|
out["bucket"] = Svix::serialize_primitive(@bucket) if @bucket
|
|
46
|
-
out["
|
|
47
|
-
out["region"] = Svix::serialize_primitive(@region) if @region
|
|
45
|
+
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) if @access_key_id
|
|
48
46
|
out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) if @secret_access_key
|
|
47
|
+
out["region"] = Svix::serialize_primitive(@region) if @region
|
|
48
|
+
out["endpointUrl"] = Svix::serialize_primitive(@endpoint_url) if @endpoint_url
|
|
49
49
|
out
|
|
50
50
|
end
|
|
51
51
|
|
|
@@ -4,14 +4,14 @@ require "json"
|
|
|
4
4
|
|
|
5
5
|
module Svix
|
|
6
6
|
class ApiTokenOut
|
|
7
|
-
attr_accessor :
|
|
8
|
-
attr_accessor :expires_at
|
|
7
|
+
attr_accessor :token
|
|
9
8
|
attr_accessor :id
|
|
10
9
|
attr_accessor :name
|
|
10
|
+
attr_accessor :created_at
|
|
11
|
+
attr_accessor :expires_at
|
|
11
12
|
attr_accessor :scopes
|
|
12
|
-
attr_accessor :token
|
|
13
13
|
|
|
14
|
-
ALL_FIELD ||= ["
|
|
14
|
+
ALL_FIELD ||= ["token", "id", "name", "created_at", "expires_at", "scopes"].freeze
|
|
15
15
|
private_constant :ALL_FIELD
|
|
16
16
|
|
|
17
17
|
def initialize(attributes = {})
|
|
@@ -32,23 +32,23 @@ module Svix
|
|
|
32
32
|
def self.deserialize(attributes = {})
|
|
33
33
|
attributes = attributes.transform_keys(&:to_s)
|
|
34
34
|
attrs = Hash.new
|
|
35
|
-
attrs["
|
|
36
|
-
attrs["expires_at"] = DateTime.rfc3339(attributes["expiresAt"]).to_time if attributes["expiresAt"]
|
|
35
|
+
attrs["token"] = attributes["token"]
|
|
37
36
|
attrs["id"] = attributes["id"]
|
|
38
37
|
attrs["name"] = attributes["name"]
|
|
38
|
+
attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
|
|
39
|
+
attrs["expires_at"] = DateTime.rfc3339(attributes["expiresAt"]).to_time if attributes["expiresAt"]
|
|
39
40
|
attrs["scopes"] = attributes["scopes"]
|
|
40
|
-
attrs["token"] = attributes["token"]
|
|
41
41
|
new(attrs)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def serialize
|
|
45
45
|
out = Hash.new
|
|
46
|
-
out["
|
|
47
|
-
out["expiresAt"] = Svix::serialize_primitive(@expires_at) if @expires_at
|
|
46
|
+
out["token"] = Svix::serialize_primitive(@token) if @token
|
|
48
47
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
|
49
48
|
out["name"] = Svix::serialize_primitive(@name) if @name
|
|
49
|
+
out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
|
|
50
|
+
out["expiresAt"] = Svix::serialize_primitive(@expires_at) if @expires_at
|
|
50
51
|
out["scopes"] = Svix::serialize_primitive(@scopes) if @scopes
|
|
51
|
-
out["token"] = Svix::serialize_primitive(@token) if @token
|
|
52
52
|
out
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -8,6 +8,8 @@ module Svix
|
|
|
8
8
|
#
|
|
9
9
|
# If the application id or uid that is used in the path already exists, this argument is ignored.
|
|
10
10
|
attr_accessor :application
|
|
11
|
+
# Whether the app portal should be in read-only mode.
|
|
12
|
+
attr_accessor :read_only
|
|
11
13
|
# Custom capabilities attached to the token, You can combine as many capabilities as necessary.
|
|
12
14
|
#
|
|
13
15
|
# The `ViewBase` capability is always required
|
|
@@ -26,20 +28,18 @@ module Svix
|
|
|
26
28
|
#
|
|
27
29
|
# By default, the token will get all capabilities if the capabilities are not explicitly specified.
|
|
28
30
|
attr_accessor :capabilities
|
|
31
|
+
# The set of feature flags the created token will have access to.
|
|
32
|
+
attr_accessor :feature_flags
|
|
29
33
|
# How long the token will be valid for, in seconds.
|
|
30
34
|
#
|
|
31
35
|
# Valid values are between 1 hour and 7 days. The default is 7 days.
|
|
32
36
|
attr_accessor :expiry
|
|
33
|
-
# The set of feature flags the created token will have access to.
|
|
34
|
-
attr_accessor :feature_flags
|
|
35
|
-
# Whether the app portal should be in read-only mode.
|
|
36
|
-
attr_accessor :read_only
|
|
37
37
|
# An optional session ID to attach to the token.
|
|
38
38
|
#
|
|
39
39
|
# When expiring tokens with "Expire All", you can include the session ID to only expire tokens that were created with that session ID.
|
|
40
40
|
attr_accessor :session_id
|
|
41
41
|
|
|
42
|
-
ALL_FIELD ||= ["application", "
|
|
42
|
+
ALL_FIELD ||= ["application", "read_only", "capabilities", "feature_flags", "expiry", "session_id"].freeze
|
|
43
43
|
private_constant :ALL_FIELD
|
|
44
44
|
|
|
45
45
|
def initialize(attributes = {})
|
|
@@ -61,13 +61,13 @@ module Svix
|
|
|
61
61
|
attributes = attributes.transform_keys(&:to_s)
|
|
62
62
|
attrs = Hash.new
|
|
63
63
|
attrs["application"] = Svix::ApplicationIn.deserialize(attributes["application"]) if attributes["application"]
|
|
64
|
+
attrs["read_only"] = attributes["readOnly"]
|
|
64
65
|
if attributes["capabilities"]
|
|
65
66
|
attrs["capabilities"] = attributes["capabilities"].map { |v| Svix::AppPortalCapability.deserialize(v) }
|
|
66
67
|
end
|
|
67
68
|
|
|
68
|
-
attrs["expiry"] = attributes["expiry"]
|
|
69
69
|
attrs["feature_flags"] = attributes["featureFlags"]
|
|
70
|
-
attrs["
|
|
70
|
+
attrs["expiry"] = attributes["expiry"]
|
|
71
71
|
attrs["session_id"] = attributes["sessionId"]
|
|
72
72
|
new(attrs)
|
|
73
73
|
end
|
|
@@ -75,10 +75,10 @@ module Svix
|
|
|
75
75
|
def serialize
|
|
76
76
|
out = Hash.new
|
|
77
77
|
out["application"] = Svix::serialize_schema_ref(@application) if @application
|
|
78
|
+
out["readOnly"] = Svix::serialize_primitive(@read_only) if @read_only
|
|
78
79
|
out["capabilities"] = @capabilities.map { |v| v.serialize } if @capabilities
|
|
79
|
-
out["expiry"] = Svix::serialize_primitive(@expiry) if @expiry
|
|
80
80
|
out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags
|
|
81
|
-
out["
|
|
81
|
+
out["expiry"] = Svix::serialize_primitive(@expiry) if @expiry
|
|
82
82
|
out["sessionId"] = Svix::serialize_primitive(@session_id) if @session_id
|
|
83
83
|
out
|
|
84
84
|
end
|
|
@@ -4,10 +4,10 @@ require "json"
|
|
|
4
4
|
|
|
5
5
|
module Svix
|
|
6
6
|
class AppPortalAccessOut
|
|
7
|
-
attr_accessor :token
|
|
8
7
|
attr_accessor :url
|
|
8
|
+
attr_accessor :token
|
|
9
9
|
|
|
10
|
-
ALL_FIELD ||= ["
|
|
10
|
+
ALL_FIELD ||= ["url", "token"].freeze
|
|
11
11
|
private_constant :ALL_FIELD
|
|
12
12
|
|
|
13
13
|
def initialize(attributes = {})
|
|
@@ -28,15 +28,15 @@ module Svix
|
|
|
28
28
|
def self.deserialize(attributes = {})
|
|
29
29
|
attributes = attributes.transform_keys(&:to_s)
|
|
30
30
|
attrs = Hash.new
|
|
31
|
-
attrs["token"] = attributes["token"]
|
|
32
31
|
attrs["url"] = attributes["url"]
|
|
32
|
+
attrs["token"] = attributes["token"]
|
|
33
33
|
new(attrs)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def serialize
|
|
37
37
|
out = Hash.new
|
|
38
|
-
out["token"] = Svix::serialize_primitive(@token) if @token
|
|
39
38
|
out["url"] = Svix::serialize_primitive(@url) if @url
|
|
39
|
+
out["token"] = Svix::serialize_primitive(@token) if @token
|
|
40
40
|
out
|
|
41
41
|
end
|
|
42
42
|
|