hippofish/packages/megalodon/src/entities/attachment.ts

50 lines
935 B
TypeScript
Raw Normal View History

2023-09-23 18:49:47 +02:00
namespace Entity {
2023-09-24 01:44:53 +02:00
export type Sub = {
// For Image, Gifv, and Video
width?: number
height?: number
size?: string
aspect?: number
2023-09-23 18:49:47 +02:00
2023-09-24 01:44:53 +02:00
// For Gifv and Video
frame_rate?: string
2023-09-23 18:49:47 +02:00
2023-09-24 01:44:53 +02:00
// For Audio, Gifv, and Video
duration?: number
bitrate?: number
}
2023-09-23 18:49:47 +02:00
2023-09-24 01:44:53 +02:00
export type Focus = {
x: number
y: number
}
2023-09-23 18:49:47 +02:00
2023-09-24 01:44:53 +02:00
export type Meta = {
original?: Sub
small?: Sub
focus?: Focus
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-23 18:49:47 +02:00
2023-09-24 01:44:53 +02:00
export type Attachment = {
id: string
type: 'unknown' | 'image' | 'gifv' | 'video' | 'audio'
url: string
remote_url: string | null
preview_url: string | null
text_url: string | null
meta: Meta | null
description: string | null
blurhash: string | null
}
2023-09-23 18:49:47 +02:00
}