syntax = "proto3"; import "harmonytypes/v1/types.proto"; package protocol.chat.v1; option go_package = "github.com/harmony-development/legato/gen/chat/v1"; // What kind the channel is. enum ChannelKind { // A text channel. Allows you to simply send messages to a group of people. CHANNEL_KIND_TEXT_UNSPECIFIED = 0; // A voice channel. Allows you to talk to other people with voice. CHANNEL_KIND_VOICE_MEDIA = 1; // A category channel. All channels under this channel down to another // category channel belongs to this category channel. CHANNEL_KIND_CATEGORY = 2; } // An object representing a channel, without the ID. message Channel { // The name of this channel. string channel_name = 1; // The kind of channel this is. // Data does not get inherently stored in the Channel type // Instead, clients who understand a certain ChannelKind should // fetch them from a separate RPC. ChannelKind kind = 2; // The metadata of this channel. optional harmonytypes.v1.Metadata metadata = 3; } // The channel alongside with an ID. message ChannelWithId { // ID of the channel. uint64 channel_id = 1; // The channel data. Channel channel = 2; } // Channel Kinds: // // Channel kinds specified in an official Harmony protocol will start with a // "h." prefix. Third-party extensions should not use the "h." prefix. If no // kind is specified, the channel is a text channel. // // Kinds indicate additional functionality a channel may have: for example, // h.voice can indicate that a channel has voice functionalities alongside // the usual text fare. // // Used in the `CreateChannel` endpoint. message CreateChannelRequest { // Guild ID of the guild to create a channel in. uint64 guild_id = 1; // The name of this channel. string channel_name = 2; // The kind of this channel. ChannelKind kind = 3; // The metadata of this channel. optional harmonytypes.v1.Metadata metadata = 4; // The position of your new channel in the channel list. // // If not specified, it will be put at the bottom of the channel list. optional harmonytypes.v1.ItemPosition position = 5; } // Used in the `CreateChannel` endpoint. message CreateChannelResponse { // ID of the channel that was created. uint64 channel_id = 1; } // Used in the `GetGuildChannels` endpoint. message GetGuildChannelsRequest { // Guild ID of the guild you want to get channels from. uint64 guild_id = 1; } // Used in the `GetGuildChannels` endpoint. message GetGuildChannelsResponse { // Channels' data and ID the server responded with. repeated ChannelWithId channels = 1; } // Used in the `UpdateChannelInformation` endpoint. message UpdateChannelInformationRequest { // Guild ID of the guild where the channel is. uint64 guild_id = 1; // Channel ID of the channel you want to change the information of. uint64 channel_id = 2; // New name to set for this channel. optional string new_name = 3; // New metadata to set for this channel. optional harmonytypes.v1.Metadata new_metadata = 4; } // Used in the `UpdateChannelInformation` endpoint. message UpdateChannelInformationResponse {} // Used in the `UpdateChannelOrder` endpoint. message UpdateChannelOrderRequest { // Guild ID of the guild that has the channel. uint64 guild_id = 1; // Channel ID of the channel that you want to move. uint64 channel_id = 2; // The new position of this channel. harmonytypes.v1.ItemPosition new_position = 3; } // Used in the `UpdateChannelOrder` endpoint. message UpdateChannelOrderResponse {} // Request specifiying the order of all channels in a guild at once message UpdateAllChannelOrderRequest { // guild_id: the guild to specify the new channel order for uint64 guild_id = 1; // channel_ids: the new order of channel ids repeated uint64 channel_ids = 2; } // Used in the `UpdateAllChannelOrder` endpoint. message UpdateAllChannelOrderResponse {} // Used in the `DeleteChannel` endpoint. message DeleteChannelRequest { // Guild ID of the guild that has the channel. uint64 guild_id = 1; // Channel ID of the channel you want to delete. uint64 channel_id = 2; } // Used in the `DeleteChannel` endpoint. message DeleteChannelResponse {} // Used in `Typing` endpoint. message TypingRequest { // The guild id of the channel the user is typing in. uint64 guild_id = 1; // The channel id of the channel the user is typing in. uint64 channel_id = 2; } // Used in `Typing` endpoint. message TypingResponse {}