This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.d.ts
80 lines (66 loc) · 1.48 KB
/
index.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
type schemas = import("@octokit/openapi-types").components["schemas"];
interface CommonBlockProps {
metadata: any;
onUpdateMetadata: () => any;
onUpdateContent: () => any;
}
interface Session {
token: string;
}
interface FileData {
content: string;
context: FileContext;
}
type FileBlockProps = FileData & CommonBlockProps;
interface FolderData {
tree: {
path: string;
mode: string;
type: string;
sha: string;
size: number;
url: string;
}[];
context: FolderContext;
}
type FolderBlockProps = FolderData & CommonBlockProps;
type DirectoryItem = schemas["content-directory"][number];
type TreeItem = schemas["git-tree"]["tree"][number];
type RepoItem = schemas["repo-search-result-item"];
type Contributor = schemas["contributor"];
type Branch = schemas["short-branch"];
type RepoInfo = schemas["repository"] & {
contributors: Contributor[];
blocksConfig: BlocksConfig;
};
type Commit = schemas["commit"];
type CommitBrief = {
date: Commit["commit"]["author"]["date"];
username: Commit["author"]["login"];
message: Commit["commit"]["message"];
url: Commit["html_url"];
sha: Commit["sha"];
};
type RepoTimeline = CommitBrief[];
interface User {
name: string;
image: string;
}
interface Session {
token: string;
user: User;
expires: string;
}
type DevServerInfo = {
owner: string;
repo: string;
devServer: string;
};
type AllowBlock = {
owner: string;
repo: string;
id: string;
};
type BlocksConfig = {
allow?: AllowBlock[];
};