syntax = "proto3";
package services;

import "tasks.proto";
import "pretransform.proto";
import "errors.proto";

service VegaFusionRuntime {
  rpc TaskGraphQuery(QueryRequest) returns (QueryResult) {}
  rpc PreTransformSpec(pretransform.PreTransformSpecRequest) returns (PreTransformSpecResult) {}
  rpc PreTransformValues(pretransform.PreTransformValuesRequest) returns (PreTransformValuesResult) {}
  rpc PreTransformExtract(pretransform.PreTransformExtractRequest) returns (PreTransformExtractResult) {}
}

message QueryRequest {
  oneof request {
    tasks.TaskGraphValueRequest task_graph_values = 1;
  }
}

message QueryResult {
  oneof response {
    errors.Error error = 1;
    tasks.TaskGraphValueResponse task_graph_values = 2;
  }
}

message PreTransformSpecResult {
  oneof result {
    errors.Error error = 1;
    pretransform.PreTransformSpecResponse response = 2;
  }
}

message PreTransformValuesResult {
  oneof result {
    errors.Error error = 1;
    pretransform.PreTransformValuesResponse response = 2;
  }
}

message PreTransformExtractResult {
  oneof result {
    errors.Error error = 1;
    pretransform.PreTransformExtractResponse response = 2;
  }
}