-
Notifications
You must be signed in to change notification settings - Fork 4
/
social-post.d.ts
45 lines (42 loc) · 1.17 KB
/
social-post.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
export type Media = {
type: 'photo' | 'gif' | 'video' | 'audio';
/** Link to default size external file */
externalUrl?: string;
/** Link to original size external file */
original?: string;
otherSources?: { [otherSourceOriginKey: string]: string };
/** File extension */
filetype?: string;
/** Combined local copy of file. Later front and API identify file by `"filehash"` */
filename?: string;
/** Hash for filename for later front and API. @see `filename` */
filehash?: string;
/** Call it when done */
fileCallback?: () => void;
/** Media description e.g. youtube video quality or image size */
description?: string;
/** Media total filesize if known (in bytes) */
filesize?: number;
};
export type SocialPost = {
caption: string;
author: string;
authorURL: string;
postURL: string;
medias: Media[];
};
export type VideoAudioMerged =
| { externalUrl: string }
| {
filename: string;
fileCallback: () => void;
videoSource: string;
audioSource: string;
};
export type VideoCodecConverted =
| { externalUrl: string }
| {
filename: string;
fileCallback: () => void;
filesize?: number;
};