/
rest.d.ts
52 lines (47 loc) · 1.25 KB
/
rest.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
46
47
48
49
50
51
52
type GetFilesRequest = GetFilesParams & { fileKey: string };
type GetFilesParams = {
version?: string;
ids?: string[];
depth?: number;
geometry?: string;
plugin_data?: string;
branch_data?: string;
};
interface GetFilesResponse {
readonly name: string;
readonly role: string;
readonly lastModified: string;
readonly editorType: string;
readonly thumbnailUrl: string;
readonly version: string;
readonly document: DocumentNode;
readonly components: Record<string, Component>;
readonly componentSets: Record<string, ComponentSet>;
readonly schemaVersion: 0;
readonly styles: Record<string, Style>;
readonly mainFileKey: string;
readonly branches: [
{
readonly key: string;
readonly name: string;
readonly thumbnail_url: string;
readonly last_modified: string;
readonly link_access: string;
}
];
}
type GetImagesRequest = GetImagesParams & { fileKey: string };
type GetImagesParams = {
ids: string[];
format?: "jpg" | "png" | "svg" | "pdf";
version?: string;
scale?: number;
svg_include_id?: boolean;
svg_simplify_stroke?: boolean;
use_absolute_bounds?: boolean;
};
interface GetImagesResponse {
readonly err: string;
readonly images: Record<string, string>;
readonly status: number;
}