github.com/tada-team/tdproto@v1.51.57/tdapi/parser.go (about)

     1  package tdapi
     2  
     3  import "github.com/tada-team/tdproto"
     4  
     5  // ParserUploadArchiveResponse response structure for method UploadArchive
     6  type ParserUploadArchiveResponse struct {
     7  	// Success result
     8  	Success bool `json:"success"`
     9  
    10  	// ProcessingAction action for background notifications about archive unpacking.
    11  	ProcessingAction string `json:"processing_action"`
    12  
    13  	// ActionType must be archive_unpacking
    14  	ActionType tdproto.ActionType `json:"action_type"`
    15  
    16  	// ArchiveName name of archive
    17  	ArchiveName string `json:"archive_name"`
    18  }
    19  
    20  // ParserGetStateResponse response structure for method GetArchiveState
    21  type ParserGetStateResponse struct {
    22  	// State of import chats
    23  	State tdproto.ParseState `json:"state"`
    24  
    25  	// Progress of archive unpacking
    26  	Progress uint16 `json:"progress,omitempty"`
    27  
    28  	// Action name
    29  	Action string `json:"action,omitempty"`
    30  
    31  	// ActionType. Ex: [archive_unpacking || generate_chats]
    32  	ActionType tdproto.ActionType `json:"action_type,omitempty"`
    33  
    34  	// Localized Message
    35  	Message string `json:"message,omitempty"`
    36  
    37  	// Localized Body
    38  	Body string `json:"body,omitempty"`
    39  
    40  	// ArchiveName name of archive
    41  	ArchiveName string `json:"archive_name"`
    42  
    43  	// Has error
    44  	HasError bool `json:"has_error"`
    45  }
    46  
    47  // ParserSendArchiveStateRequest ...
    48  type ParserSendArchiveStateRequest struct {
    49  	// State of chat import
    50  	State tdproto.ParseState `json:"state"`
    51  
    52  	// Progress of archive unpacking
    53  	Progress uint16 `json:"progress"`
    54  
    55  	// ErrorCode if smth went wrong
    56  	ErrorCode tdproto.ParseErrCode `json:"error_code,omitempty"`
    57  }
    58  
    59  // ParserGetMappedUsersResponse ...
    60  type ParserGetMappedUsersResponse struct {
    61  	// Users ...
    62  	Users []tdproto.MappedUser `json:"users"`
    63  
    64  	// ChatName ...
    65  	ChatName string `json:"chat_name"`
    66  }
    67  
    68  // ParserMapUsersRequest ...
    69  type ParserMapUsersRequest struct {
    70  	// Users ...
    71  	Users []tdproto.MappedUser `json:"users"`
    72  }
    73  
    74  // ParserMapUsersResponse ...
    75  type ParserMapUsersResponse struct {
    76  	// Success result
    77  	Success bool `json:"success"`
    78  }
    79  
    80  // ParserGenerateChatsResponse ...
    81  type ParserGenerateChatsResponse struct {
    82  	// ProcessingAction action for background notifications about generation of chats and messages.
    83  	ProcessingAction string `json:"processing_action"`
    84  
    85  	// ActionType must be generate_chat
    86  	ActionType tdproto.ActionType `json:"action_type"`
    87  
    88  	// ArchiveName name of archive
    89  	ArchiveName string `json:"archive_name"`
    90  }