syntax = "proto3";

import "authResponse.proto";
import "contact.proto";
import "message.proto";
import "server.proto";
import "user.proto";

message FetchContacts {
    bytes user_id = 1;
}

message FetchDmMessages {
    bytes user_id = 1;
    bytes fetch_user_name = 2;
}

message FetchServers {
    bytes user_id = 1;
}

message FetchChannelMessages {
    bytes server_id = 1;
    bytes channel_name = 2;
}
S
message FetchServerMembers {
    bytes server_id = 1;
}

message SignInRequest {
    string user_name = 1;
    string user_password = 2;
}

message SignUpRequest {
    string user_name = 1;
    string display_name = 2;
    string user_email = 3;
    string user_password = 4;
}

message FetchResponseContacts {
    repeated User response = 1;
}

message FetchResponseServers {
    repeated Server response = 1;
}

message FetchResponseMessages {
    repeated Message response = 1;
}

message Body {
    oneof payload {
        FetchContacts f_contacts = 1;
        FetchDmMessages f_dmMessages = 2;
        FetchServers f_servers = 3;
        FetchChannelMessages f_channelMessages = 4;
        FetchServerMembers f_serverMembers = 5;
        SignUpRequest su_request = 6;
        SignInRequest si_request = 7;
        AuthResponse au_response = 8;
        Contact ct_request = 9;
        Contact ct_response = 10;
        FetchResponseContacts f_contacts_response = 11;
        FetchResponseServers f_servers_response = 12;
        FetchResponseMessages f_messages_response = 13;
        Message send_message_to_user = 14;
        Message send_message_response = 15;
    }
}
