diff --git a/common.proto b/common.proto index 2f09d03..cc39336 100644 --- a/common.proto +++ b/common.proto @@ -1,8 +1,8 @@ syntax = "proto3"; option optimize_for = SPEED; option java_multiple_files = true; -option go_package = "fivetran.com/fivetran_sdk"; -package fivetran_sdk; +option go_package = "fivetran.com/fivetran_sdk_r2"; +package fivetran_sdk.r2; import "google/protobuf/timestamp.proto"; @@ -25,6 +25,8 @@ message FormField { DropdownField dropdown_field = 6; ToggleField toggle_field = 7; } + optional string default_value = 8; + optional string placeholder = 9; } message DropdownField { @@ -53,7 +55,6 @@ message TestResponse { oneof response { bool success = 1; string failure = 2; - // potential future warning } } @@ -86,6 +87,14 @@ enum DataType { XML = 12; STRING = 13; JSON = 14; + NAIVE_TIME = 15; +} + +message DataTypeParams { + oneof params { + DecimalParams decimal = 1; + int32 string_byte_length = 2; + } } message DecimalParams { @@ -93,7 +102,7 @@ message DecimalParams { uint32 scale = 2; } -enum OpType { +enum RecordType { UPSERT = 0; UPDATE = 1; DELETE = 2; @@ -117,6 +126,7 @@ message ValueType { string string = 13; string json = 14; string xml = 15; + google.protobuf.Timestamp naive_time = 16; } } @@ -129,5 +139,5 @@ message Column { string name = 1; DataType type = 2; bool primary_key = 3; - optional DecimalParams decimal = 4; + optional DataTypeParams params = 4; } diff --git a/connector_sdk.proto b/connector_sdk.proto index 4d906ee..301f32e 100644 --- a/connector_sdk.proto +++ b/connector_sdk.proto @@ -1,13 +1,13 @@ syntax = "proto3"; option optimize_for = SPEED; option java_multiple_files = true; -option go_package = "fivetran.com/fivetran_sdk"; -package fivetran_sdk; +option go_package = "fivetran.com/fivetran_sdk_r2"; +package fivetran_sdk.r2; import "common.proto"; -// Fivetran (grpc client) <> Connector (grpc server) -service Connector { +// Fivetran (grpc client) <> SourceConnector (grpc server) +service SourceConnector { rpc ConfigurationForm (ConfigurationFormRequest) returns (ConfigurationFormResponse) {} rpc Test (TestRequest) returns (TestResponse) {} rpc Schema (SchemaRequest) returns (SchemaResponse) {} @@ -65,24 +65,6 @@ message TableSelection { } message UpdateResponse { - oneof response { - LogEntry log_entry = 1; - Operation operation = 2; - } -} - -enum LogLevel { - INFO = 0; - WARNING = 1; - SEVERE = 2; -} - -message LogEntry { - LogLevel level = 1; - string message = 2; -} - -message Operation { oneof op { Record record = 1; SchemaChange schema_change = 2; @@ -100,7 +82,7 @@ message SchemaChange { message Record { optional string schema_name = 1; string table_name = 2; - OpType type = 3; + RecordType type = 3; map data = 4; } diff --git a/destination_sdk.proto b/destination_sdk.proto index 8c5635b..66c4c76 100644 --- a/destination_sdk.proto +++ b/destination_sdk.proto @@ -1,14 +1,14 @@ syntax = "proto3"; option optimize_for = SPEED; option java_multiple_files = true; -option go_package = "fivetran.com/fivetran_sdk"; -package fivetran_sdk; +option go_package = "fivetran.com/fivetran_sdk_r2"; +package fivetran_sdk.r2; import "google/protobuf/timestamp.proto"; import "common.proto"; -// Fivetran (grpc client) <> Destination (grpc server) -service Destination { +// Fivetran (grpc client) <> DestinationConnector (grpc server) +service DestinationConnector { rpc ConfigurationForm (ConfigurationFormRequest) returns (ConfigurationFormResponse) {} rpc Capabilities (CapabilitiesRequest) returns (CapabilitiesResponse) {} rpc Test (TestRequest) returns (TestResponse) {} @@ -75,7 +75,7 @@ message TruncateRequest { } message SoftTruncate { - string deleted_column = 3; + string deleted_column = 1; } message TruncateResponse {