mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Fix conversion between database and Lysand types
This commit is contained in:
parent
6d0a8a6478
commit
8563c97403
7 changed files with 118 additions and 136 deletions
|
|
@ -44,9 +44,19 @@ export interface Entity {
|
|||
created_at: string;
|
||||
uri: string;
|
||||
type: string;
|
||||
extensions?: {
|
||||
"org.lysand:custom_emojis"?: {
|
||||
emojis: Emoji[];
|
||||
};
|
||||
[key: string]: object | undefined;
|
||||
};
|
||||
}
|
||||
|
||||
export interface Publication {
|
||||
export interface InlineCustomEmojis {
|
||||
[key: string]: Emoji;
|
||||
}
|
||||
|
||||
export interface Publication extends Entity {
|
||||
type: "Note" | "Patch";
|
||||
author: string;
|
||||
content?: ContentFormat;
|
||||
|
|
@ -57,6 +67,19 @@ export interface Publication {
|
|||
subject?: string;
|
||||
is_sensitive?: boolean;
|
||||
visibility: Visibility;
|
||||
extensions?: Entity["extensions"] & {
|
||||
"org.lysand:reactions"?: {
|
||||
reactions: string;
|
||||
};
|
||||
"org.lysand:polls"?: {
|
||||
poll: {
|
||||
options: ContentFormat[];
|
||||
votes: number[];
|
||||
multiple_choice?: boolean;
|
||||
expires_at: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export enum Visibility {
|
||||
|
|
@ -96,6 +119,9 @@ export interface User extends Entity {
|
|||
dislikes: string;
|
||||
inbox: string;
|
||||
outbox: string;
|
||||
extensions?: Entity["extensions"] & {
|
||||
"org.lysand:vanity"?: VanityExtension;
|
||||
};
|
||||
}
|
||||
|
||||
export interface Field {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue