server/types/entities-2/attachment.ts

48 lines
965 B
TypeScript
Raw Normal View History

2023-09-12 22:48:10 +02:00
export interface APISub {
2024-04-07 07:30:49 +02:00
// For Image, Gifv, and Video
width?: number;
height?: number;
size?: string;
aspect?: number;
2023-09-11 05:31:08 +02:00
2024-04-07 07:30:49 +02:00
// For Gifv and Video
frame_rate?: string;
2023-09-11 05:31:08 +02:00
2024-04-07 07:30:49 +02:00
// For Audio, Gifv, and Video
duration?: number;
bitrate?: number;
2023-09-11 05:46:20 +02:00
}
2023-09-11 05:31:08 +02:00
2023-09-12 22:48:10 +02:00
export interface APIFocus {
2024-04-07 07:30:49 +02:00
x: number;
y: number;
2023-09-11 05:46:20 +02:00
}
2023-09-11 05:31:08 +02:00
2023-09-12 22:48:10 +02:00
export interface APIMeta {
2024-04-07 07:30:49 +02:00
original?: APISub;
small?: APISub;
focus?: APIFocus;
length?: string;
duration?: number;
fps?: number;
size?: string;
width?: number;
height?: number;
aspect?: number;
audio_encode?: string;
audio_bitrate?: string;
audio_channel?: string;
2023-09-11 05:46:20 +02:00
}
2023-09-11 05:31:08 +02:00
2023-09-12 22:48:10 +02:00
export interface APIAttachment {
2024-04-07 07:30:49 +02:00
id: string;
type: "unknown" | "image" | "gifv" | "video" | "audio";
url: string;
remote_url: string | null;
preview_url: string | null;
text_url: string | null;
meta: APIMeta | null;
description: string | null;
blurhash: string | null;
2023-09-11 05:46:20 +02:00
}