github.com/status-im/status-go@v1.1.0/protocol/protobuf/community_update.proto (about)

     1  syntax = "proto3";
     2  
     3  option go_package = "./;protobuf";
     4  package protobuf;
     5  
     6  import "chat_identity.proto";
     7  import "communities.proto";
     8  
     9  message CommunityEvent {
    10    uint64 community_event_clock = 1;
    11    EventType type = 2;
    12    CommunityConfig community_config = 3;
    13    CommunityTokenPermission token_permission = 4;
    14    CategoryData category_data = 5;
    15    ChannelData channel_data = 6;
    16    string member_to_action = 7;
    17    map<string,CommunityMember> membersAdded = 8;
    18    map<string,CommunityRequestToJoin> rejectedRequestsToJoin = 9;
    19    map<string,CommunityRequestToJoin> acceptedRequestsToJoin = 10;
    20    CommunityTokenMetadata token_metadata = 11;
    21  
    22    enum EventType {
    23      UNKNOWN = 0;
    24      COMMUNITY_EDIT = 1;
    25      COMMUNITY_MEMBER_TOKEN_PERMISSION_CHANGE = 2;
    26      COMMUNITY_MEMBER_TOKEN_PERMISSION_DELETE = 3;
    27      COMMUNITY_CATEGORY_CREATE = 4;
    28      COMMUNITY_CATEGORY_DELETE = 5;
    29      COMMUNITY_CATEGORY_EDIT = 6;
    30      COMMUNITY_CHANNEL_CREATE = 7;
    31      COMMUNITY_CHANNEL_DELETE = 8;
    32      COMMUNITY_CHANNEL_EDIT = 9;
    33      COMMUNITY_CATEGORY_REORDER = 10;
    34      COMMUNITY_CHANNEL_REORDER = 11;
    35      COMMUNITY_REQUEST_TO_JOIN_ACCEPT = 12;
    36      COMMUNITY_REQUEST_TO_JOIN_REJECT = 13;
    37      COMMUNITY_MEMBER_KICK = 14;
    38      COMMUNITY_MEMBER_BAN = 15;
    39      COMMUNITY_MEMBER_UNBAN = 16;
    40      COMMUNITY_TOKEN_ADD = 17;
    41      COMMUNITY_DELETE_BANNED_MEMBER_MESSAGES = 18;
    42    }
    43  }
    44  
    45  message CommunityConfig {
    46    ChatIdentity identity = 1;
    47    CommunityPermissions permissions = 2;
    48    CommunityAdminSettings admin_settings = 3;
    49    string intro_message = 4;
    50    string outro_message = 5;
    51    repeated string tags = 6;
    52  }
    53  
    54  message CategoryData {
    55    string category_id = 1;
    56    string name = 2;
    57    repeated string channels_ids = 3;
    58    int32 position = 4;
    59  }
    60  
    61  message ChannelData {
    62    string category_id = 1;
    63    string channel_id = 2;
    64    int32 position = 3;
    65    CommunityChat channel = 4;
    66  }
    67  
    68  message SignedCommunityEvent {
    69    // Signature of the payload field
    70    bytes signature = 1;
    71    // Marshaled CommunityEvent
    72    bytes payload = 2;
    73  }
    74  
    75  // CommunityEventsMessage is a message used to propagate information
    76  // about community changes.
    77  message CommunityEventsMessage {
    78    bytes community_id = 1;
    79  
    80    // Events base CommunityDescription with owner signature on top of which events were generated
    81    bytes events_base_community_description = 2;
    82  
    83    // A list of admins events for the channel in bytes
    84    // Deprecated: use signed_events instead.
    85    repeated bytes events = 3 [deprecated=true];
    86  
    87    // A list of signed community events
    88    repeated SignedCommunityEvent signed_events = 4;
    89  }
    90  
    91  message CommunityEventsMessageRejected {
    92    CommunityEventsMessage msg = 1;
    93  }