mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
rebuild json rpc types, to rebase prs to unclutter diff
This commit is contained in:
@@ -1,223 +1,74 @@
|
|||||||
// AUTO-GENERATED by typescript-type-def
|
// AUTO-GENERATED by typescript-type-def
|
||||||
|
|
||||||
export type U32=number;
|
export type U32=number;
|
||||||
export type Account =
|
export type Account=(({"type":"Configured";}&{"id":U32;"displayName":(string|null);"addr":(string|null);"profileImage":(string|null);"color":string;})|({"type":"Unconfigured";}&{"id":U32;}));
|
||||||
| ({ type: "Configured" } & {
|
export type ProviderInfo={"beforeLoginHint":string;"overviewPage":string;"status":U32;};
|
||||||
id: U32;
|
export type Qr=(({"type":"askVerifyContact";}&{"contact_id":U32;"fingerprint":string;"invitenumber":string;"authcode":string;})|({"type":"askVerifyGroup";}&{"grpname":string;"grpid":string;"contact_id":U32;"fingerprint":string;"invitenumber":string;"authcode":string;})|({"type":"fprOk";}&{"contact_id":U32;})|({"type":"fprMismatch";}&{"contact_id":(U32|null);})|({"type":"fprWithoutAddr";}&{"fingerprint":string;})|({"type":"account";}&{"domain":string;})|({"type":"webrtcInstance";}&{"domain":string;"instance_pattern":string;})|({"type":"addr";}&{"contact_id":U32;"draft":(string|null);})|({"type":"url";}&{"url":string;})|({"type":"text";}&{"text":string;})|({"type":"withdrawVerifyContact";}&{"contact_id":U32;"fingerprint":string;"invitenumber":string;"authcode":string;})|({"type":"withdrawVerifyGroup";}&{"grpname":string;"grpid":string;"contact_id":U32;"fingerprint":string;"invitenumber":string;"authcode":string;})|({"type":"reviveVerifyContact";}&{"contact_id":U32;"fingerprint":string;"invitenumber":string;"authcode":string;})|({"type":"reviveVerifyGroup";}&{"grpname":string;"grpid":string;"contact_id":U32;"fingerprint":string;"invitenumber":string;"authcode":string;}));
|
||||||
displayName: string | null;
|
|
||||||
addr: string | null;
|
|
||||||
profileImage: string | null;
|
|
||||||
color: string;
|
|
||||||
})
|
|
||||||
| ({ type: "Unconfigured" } & { id: U32 });
|
|
||||||
export type ProviderInfo = {
|
|
||||||
beforeLoginHint: string;
|
|
||||||
overviewPage: string;
|
|
||||||
status: U32;
|
|
||||||
};
|
|
||||||
export type Qr =
|
|
||||||
| ({ type: "askVerifyContact" } & {
|
|
||||||
contact_id: U32;
|
|
||||||
fingerprint: string;
|
|
||||||
invitenumber: string;
|
|
||||||
authcode: string;
|
|
||||||
})
|
|
||||||
| ({ type: "askVerifyGroup" } & {
|
|
||||||
grpname: string;
|
|
||||||
grpid: string;
|
|
||||||
contact_id: U32;
|
|
||||||
fingerprint: string;
|
|
||||||
invitenumber: string;
|
|
||||||
authcode: string;
|
|
||||||
})
|
|
||||||
| ({ type: "fprOk" } & { contact_id: U32 })
|
|
||||||
| ({ type: "fprMismatch" } & { contact_id: U32 | null })
|
|
||||||
| ({ type: "fprWithoutAddr" } & { fingerprint: string })
|
|
||||||
| ({ type: "account" } & { domain: string })
|
|
||||||
| ({ type: "webrtcInstance" } & { domain: string; instance_pattern: string })
|
|
||||||
| ({ type: "addr" } & { contact_id: U32 })
|
|
||||||
| ({ type: "url" } & { url: string })
|
|
||||||
| ({ type: "text" } & { text: string })
|
|
||||||
| ({ type: "withdrawVerifyContact" } & {
|
|
||||||
contact_id: U32;
|
|
||||||
fingerprint: string;
|
|
||||||
invitenumber: string;
|
|
||||||
authcode: string;
|
|
||||||
})
|
|
||||||
| ({ type: "withdrawVerifyGroup" } & {
|
|
||||||
grpname: string;
|
|
||||||
grpid: string;
|
|
||||||
contact_id: U32;
|
|
||||||
fingerprint: string;
|
|
||||||
invitenumber: string;
|
|
||||||
authcode: string;
|
|
||||||
})
|
|
||||||
| ({ type: "reviveVerifyContact" } & {
|
|
||||||
contact_id: U32;
|
|
||||||
fingerprint: string;
|
|
||||||
invitenumber: string;
|
|
||||||
authcode: string;
|
|
||||||
})
|
|
||||||
| ({ type: "reviveVerifyGroup" } & {
|
|
||||||
grpname: string;
|
|
||||||
grpid: string;
|
|
||||||
contact_id: U32;
|
|
||||||
fingerprint: string;
|
|
||||||
invitenumber: string;
|
|
||||||
authcode: string;
|
|
||||||
});
|
|
||||||
export type Usize=number;
|
export type Usize=number;
|
||||||
export type ChatListEntry=[U32,U32];
|
export type ChatListEntry=[U32,U32];
|
||||||
export type I64=number;
|
export type I64=number;
|
||||||
export type ChatListItemFetchResult =
|
export type ChatListItemFetchResult=(({"type":"ChatListItem";}&{"id":U32;"name":string;"avatarPath":(string|null);"color":string;"lastUpdated":(I64|null);"summaryText1":string;"summaryText2":string;"summaryStatus":U32;"isProtected":boolean;"isGroup":boolean;"freshMessageCounter":Usize;"isSelfTalk":boolean;"isDeviceTalk":boolean;"isSendingLocation":boolean;"isSelfInGroup":boolean;"isArchived":boolean;"isPinned":boolean;"isMuted":boolean;"isContactRequest":boolean;
|
||||||
| ({ type: "ChatListItem" } & {
|
|
||||||
id: U32;
|
|
||||||
name: string;
|
|
||||||
avatarPath: string | null;
|
|
||||||
color: string;
|
|
||||||
lastUpdated: I64 | null;
|
|
||||||
summaryText1: string;
|
|
||||||
summaryText2: string;
|
|
||||||
summaryStatus: U32;
|
|
||||||
isProtected: boolean;
|
|
||||||
isGroup: boolean;
|
|
||||||
freshMessageCounter: Usize;
|
|
||||||
isSelfTalk: boolean;
|
|
||||||
isDeviceTalk: boolean;
|
|
||||||
isSendingLocation: boolean;
|
|
||||||
isSelfInGroup: boolean;
|
|
||||||
isArchived: boolean;
|
|
||||||
isPinned: boolean;
|
|
||||||
isMuted: boolean;
|
|
||||||
isContactRequest: boolean;
|
|
||||||
/**
|
/**
|
||||||
* contact id if this is a dm chat (for view profile entry in context menu)
|
* contact id if this is a dm chat (for view profile entry in context menu)
|
||||||
*/
|
*/
|
||||||
dmChatContact: U32 | null;
|
"dmChatContact":(U32|null);})|{"type":"ArchiveLink";}|({"type":"Error";}&{"id":U32;"error":string;}));
|
||||||
})
|
export type Contact={"address":string;"color":string;"authName":string;"status":string;"displayName":string;"id":U32;"name":string;"profileImage":(string|null);"nameAndAddr":string;"isBlocked":boolean;"isVerified":boolean;};
|
||||||
| { type: "ArchiveLink" }
|
export type FullChat={"id":U32;"name":string;"isProtected":boolean;"profileImage":(string|null);"archived":boolean;"chatType":U32;"isUnpromoted":boolean;"isSelfTalk":boolean;"contacts":(Contact)[];"contactIds":(U32)[];"color":string;"freshMessageCounter":Usize;"isContactRequest":boolean;"isDeviceChat":boolean;"selfInGroup":boolean;"isMuted":boolean;"ephemeralTimer":U32;"canSend":boolean;};
|
||||||
| ({ type: "Error" } & { id: U32; error: string });
|
export type Viewtype=("Unknown"|
|
||||||
export type Contact = {
|
|
||||||
address: string;
|
|
||||||
color: string;
|
|
||||||
authName: string;
|
|
||||||
status: string;
|
|
||||||
displayName: string;
|
|
||||||
id: U32;
|
|
||||||
name: string;
|
|
||||||
profileImage: string | null;
|
|
||||||
nameAndAddr: string;
|
|
||||||
isBlocked: boolean;
|
|
||||||
isVerified: boolean;
|
|
||||||
};
|
|
||||||
export type FullChat = {
|
|
||||||
id: U32;
|
|
||||||
name: string;
|
|
||||||
isProtected: boolean;
|
|
||||||
profileImage: string | null;
|
|
||||||
archived: boolean;
|
|
||||||
chatType: U32;
|
|
||||||
isUnpromoted: boolean;
|
|
||||||
isSelfTalk: boolean;
|
|
||||||
contacts: Contact[];
|
|
||||||
contactIds: U32[];
|
|
||||||
color: string;
|
|
||||||
freshMessageCounter: Usize;
|
|
||||||
isContactRequest: boolean;
|
|
||||||
isDeviceChat: boolean;
|
|
||||||
selfInGroup: boolean;
|
|
||||||
isMuted: boolean;
|
|
||||||
ephemeralTimer: U32;
|
|
||||||
canSend: boolean;
|
|
||||||
};
|
|
||||||
export type Viewtype =
|
|
||||||
| "Unknown"
|
|
||||||
/**
|
/**
|
||||||
* Text message.
|
* Text message.
|
||||||
*/
|
*/
|
||||||
| "Text"
|
"Text"|
|
||||||
/**
|
/**
|
||||||
* Image message.
|
* Image message.
|
||||||
* If the image is an animated GIF, the type `Viewtype.Gif` should be used.
|
* If the image is an animated GIF, the type `Viewtype.Gif` should be used.
|
||||||
*/
|
*/
|
||||||
| "Image"
|
"Image"|
|
||||||
/**
|
/**
|
||||||
* Animated GIF message.
|
* Animated GIF message.
|
||||||
*/
|
*/
|
||||||
| "Gif"
|
"Gif"|
|
||||||
/**
|
/**
|
||||||
* Message containing a sticker, similar to image.
|
* Message containing a sticker, similar to image.
|
||||||
* If possible, the ui should display the image without borders in a transparent way.
|
* If possible, the ui should display the image without borders in a transparent way.
|
||||||
* A click on a sticker will offer to install the sticker set in some future.
|
* A click on a sticker will offer to install the sticker set in some future.
|
||||||
*/
|
*/
|
||||||
| "Sticker"
|
"Sticker"|
|
||||||
/**
|
/**
|
||||||
* Message containing an Audio file.
|
* Message containing an Audio file.
|
||||||
*/
|
*/
|
||||||
| "Audio"
|
"Audio"|
|
||||||
/**
|
/**
|
||||||
* A voice message that was directly recorded by the user.
|
* A voice message that was directly recorded by the user.
|
||||||
* For all other audio messages, the type `Viewtype.Audio` should be used.
|
* For all other audio messages, the type `Viewtype.Audio` should be used.
|
||||||
*/
|
*/
|
||||||
| "Voice"
|
"Voice"|
|
||||||
/**
|
/**
|
||||||
* Video messages.
|
* Video messages.
|
||||||
*/
|
*/
|
||||||
| "Video"
|
"Video"|
|
||||||
/**
|
/**
|
||||||
* Message containing any file, eg. a PDF.
|
* Message containing any file, eg. a PDF.
|
||||||
*/
|
*/
|
||||||
| "File"
|
"File"|
|
||||||
/**
|
/**
|
||||||
* Message is an invitation to a videochat.
|
* Message is an invitation to a videochat.
|
||||||
*/
|
*/
|
||||||
| "VideochatInvitation"
|
"VideochatInvitation"|
|
||||||
/**
|
/**
|
||||||
* Message is an webxdc instance.
|
* Message is an webxdc instance.
|
||||||
*/
|
*/
|
||||||
| "Webxdc";
|
"Webxdc");
|
||||||
export type I32=number;
|
export type I32=number;
|
||||||
export type U64=number;
|
export type U64=number;
|
||||||
export type Message = {
|
export type Message={"id":U32;"chatId":U32;"fromId":U32;"quotedText":(string|null);"quotedMessageId":(U32|null);"text":(string|null);"hasLocation":boolean;"hasHtml":boolean;"viewType":Viewtype;"state":U32;"timestamp":I64;"sortTimestamp":I64;"receivedTimestamp":I64;"hasDeviatingTimestamp":boolean;"subject":string;"showPadlock":boolean;"isSetupmessage":boolean;"isInfo":boolean;"isForwarded":boolean;"duration":I32;"dimensionsHeight":I32;"dimensionsWidth":I32;"videochatType":(U32|null);"videochatUrl":(string|null);"overrideSenderName":(string|null);"sender":Contact;"setupCodeBegin":(string|null);"file":(string|null);"fileMime":(string|null);"fileBytes":U64;"fileName":(string|null);};
|
||||||
id: U32;
|
|
||||||
chatId: U32;
|
|
||||||
fromId: U32;
|
|
||||||
quotedText: string | null;
|
|
||||||
quotedMessageId: U32 | null;
|
|
||||||
text: string | null;
|
|
||||||
hasLocation: boolean;
|
|
||||||
hasHtml: boolean;
|
|
||||||
viewType: Viewtype;
|
|
||||||
state: U32;
|
|
||||||
timestamp: I64;
|
|
||||||
sortTimestamp: I64;
|
|
||||||
receivedTimestamp: I64;
|
|
||||||
hasDeviatingTimestamp: boolean;
|
|
||||||
subject: string;
|
|
||||||
showPadlock: boolean;
|
|
||||||
isSetupmessage: boolean;
|
|
||||||
isInfo: boolean;
|
|
||||||
isForwarded: boolean;
|
|
||||||
duration: I32;
|
|
||||||
dimensionsHeight: I32;
|
|
||||||
dimensionsWidth: I32;
|
|
||||||
videochatType: U32 | null;
|
|
||||||
videochatUrl: string | null;
|
|
||||||
overrideSenderName: string | null;
|
|
||||||
sender: Contact;
|
|
||||||
setupCodeBegin: string | null;
|
|
||||||
file: string | null;
|
|
||||||
fileMime: string | null;
|
|
||||||
fileBytes: U64;
|
|
||||||
fileName: string | null;
|
|
||||||
};
|
|
||||||
export type WebxdcMessageInfo={
|
export type WebxdcMessageInfo={
|
||||||
/**
|
/**
|
||||||
* The name of the app.
|
* The name of the app.
|
||||||
*
|
*
|
||||||
* Defaults to the filename if not set in the manifest.
|
* Defaults to the filename if not set in the manifest.
|
||||||
*/
|
*/
|
||||||
name: string;
|
"name":string;
|
||||||
/**
|
/**
|
||||||
* App icon file name.
|
* App icon file name.
|
||||||
* Defaults to an standard icon if nothing is set in the manifest.
|
* Defaults to an standard icon if nothing is set in the manifest.
|
||||||
@@ -227,159 +78,21 @@ export type WebxdcMessageInfo = {
|
|||||||
* App icons should should be square,
|
* App icons should should be square,
|
||||||
* the implementations will add round corners etc. as needed.
|
* the implementations will add round corners etc. as needed.
|
||||||
*/
|
*/
|
||||||
icon: string;
|
"icon":string;
|
||||||
/**
|
/**
|
||||||
* if the Webxdc represents a document, then this is the name of the document
|
* if the Webxdc represents a document, then this is the name of the document
|
||||||
*/
|
*/
|
||||||
document: string | null;
|
"document":(string|null);
|
||||||
/**
|
/**
|
||||||
* short string describing the state of the app,
|
* short string describing the state of the app,
|
||||||
* sth. as "2 votes", "Highscore: 123",
|
* sth. as "2 votes", "Highscore: 123",
|
||||||
* can be changed by the apps
|
* can be changed by the apps
|
||||||
*/
|
*/
|
||||||
summary: string | null;
|
"summary":(string|null);
|
||||||
/**
|
/**
|
||||||
* URL where the source code of the Webxdc and other information can be found;
|
* URL where the source code of the Webxdc and other information can be found;
|
||||||
* defaults to an empty string.
|
* defaults to an empty string.
|
||||||
* Implementations may offer an menu or a button to open this URL.
|
* Implementations may offer an menu or a button to open this URL.
|
||||||
*/
|
*/
|
||||||
sourceCodeUrl: string | null;
|
"sourceCodeUrl":(string|null);};
|
||||||
};
|
export type __AllTyps=[string,boolean,Record<string,string>,U32,U32,null,(U32)[],U32,null,(U32|null),(Account)[],U32,Account,U32,string,(ProviderInfo|null),U32,boolean,U32,Record<string,string>,U32,string,(string|null),null,U32,Record<string,(string|null)>,null,U32,string,null,U32,string,Qr,U32,string,(string|null),U32,(string)[],Record<string,(string|null)>,U32,null,U32,null,U32,(U32)[],U32,U32,Usize,U32,string,U32,U32,string,null,U32,(U32|null),(string|null),(U32|null),(ChatListEntry)[],U32,(ChatListEntry)[],Record<U32,ChatListItemFetchResult>,U32,U32,FullChat,U32,U32,null,U32,U32,null,U32,string,string,U32,U32,U32,U32,(U32)[],U32,U32,Message,U32,(U32)[],Record<U32,Message>,U32,U32,Contact,U32,string,(string|null),U32,U32,U32,U32,U32,U32,null,U32,U32,null,U32,(Contact)[],U32,U32,(string|null),(U32)[],U32,U32,(string|null),(Contact)[],U32,(U32)[],Record<U32,Contact>,U32,U32,Viewtype,(Viewtype|null),(Viewtype|null),(U32)[],U32,U32,string,string,null,U32,U32,U32,string,U32,U32,WebxdcMessageInfo,U32,string,U32,U32];
|
||||||
export type __AllTyps = [
|
|
||||||
string,
|
|
||||||
boolean,
|
|
||||||
Record<string, string>,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
null,
|
|
||||||
U32[],
|
|
||||||
U32,
|
|
||||||
null,
|
|
||||||
U32 | null,
|
|
||||||
Account[],
|
|
||||||
U32,
|
|
||||||
Account,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
ProviderInfo | null,
|
|
||||||
U32,
|
|
||||||
boolean,
|
|
||||||
U32,
|
|
||||||
Record<string, string>,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
string | null,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
Record<string, string | null>,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
Qr,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
string | null,
|
|
||||||
U32,
|
|
||||||
string[],
|
|
||||||
Record<string, string | null>,
|
|
||||||
U32,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
U32[],
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
Usize,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
U32 | null,
|
|
||||||
string | null,
|
|
||||||
U32 | null,
|
|
||||||
ChatListEntry[],
|
|
||||||
U32,
|
|
||||||
ChatListEntry[],
|
|
||||||
Record<U32, ChatListItemFetchResult>,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
FullChat,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
string,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
U32[],
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
Message,
|
|
||||||
U32,
|
|
||||||
U32[],
|
|
||||||
Record<U32, Message>,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
Contact,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
string | null,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
Contact[],
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
string | null,
|
|
||||||
U32[],
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
string | null,
|
|
||||||
Contact[],
|
|
||||||
U32,
|
|
||||||
U32[],
|
|
||||||
Record<U32, Contact>,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
Viewtype,
|
|
||||||
Viewtype | null,
|
|
||||||
Viewtype | null,
|
|
||||||
U32[],
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
string,
|
|
||||||
null,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
U32,
|
|
||||||
U32,
|
|
||||||
WebxdcMessageInfo,
|
|
||||||
U32,
|
|
||||||
string,
|
|
||||||
U32,
|
|
||||||
U32
|
|
||||||
];
|
|
||||||
|
|||||||
Reference in New Issue
Block a user