syntax = "proto3"; message User { int32 id = 1; string email = 2; } message Error { string details = 1; } message FieldError { string field = 1; repeated string details = 2; } message ChangesetError { repeated FieldError errors = 1; } message SecretCreated { string name = 1; string value = 2; } message SecretUpdated { string name = 1; string value = 2; } message SessionRequest { string app_version = 1; } message SessionResponse { string id = 1; User user = 2; } message CreateSecretRequest { string name = 1; string value = 2; } message CreateSecretResponse { } message Request { int32 id = 1; oneof type { SessionRequest session = 2; CreateSecretRequest create_secret = 3; } } message Response { int32 id = 1; oneof type { Error error = 2; ChangesetError changeset = 3; SessionResponse session = 4; CreateSecretResponse create_secret = 5; } } message Event { oneof type { SecretCreated secret_created = 100; SecretUpdated secret_updated = 101; } }