syntax = "proto3";

package nestrs.microservices;

message SendRequest {
  string pattern = 1;
  bytes payload_json = 2;
}

message SendResponse {
  bool ok = 1;
  bytes payload_json = 2;
  string error_message = 3;
  bytes error_details_json = 4;
  bool has_error_details = 5;
}

message EmitRequest {
  string pattern = 1;
  bytes payload_json = 2;
}

message EmitResponse {
  bool ok = 1;
  string error_message = 2;
  bytes error_details_json = 3;
  bool has_error_details = 4;
}

service Microservice {
  rpc Send(SendRequest) returns (SendResponse);
  rpc Emit(EmitRequest) returns (EmitResponse);
}

