ae355dc ←7732aecantonApr 18, 2026 api

create class.d2 via macOS

A /docs/undefined +62 -0
A /docs/undefined +62 -0
1Item: {
2 shape: class
3
4 id: string
5 name: string
6 kind: "file" | "folder"
7 contentHash: string | null
8 parentId: string | null
9 spaceId: string
10 createdAt: Date
11 updatedAt: Date
12
13 getContent(): Uint8Array
14 getVersions(): Version[]
15 move(newParent): void
16}
17
18Version: {
19 shape: class
20
21 id: string
22 itemId: string
23 contentHash: string
24 size: number
25 message: string | null
26 createdAt: Date
27
28 getContent(): Uint8Array
29 getDiff(other): Diff
30}
31
32Space: {
33 shape: class
34
35 id: string
36 slug: string
37 name: string
38 visibility: "public" | "private"
39 ownerId: string
40
41 listItems(path): Item[]
42 createItem(name, kind): Item
43 getTree(): TreeEntry[]
44}
45
46Commit: {
47 shape: class
48
49 id: string
50 commitHash: string
51 treeHash: string
52 parentHash: string | null
53 message: string
54 authorName: string
55 createdAt: Date
56
57 getChanges(): CommitItem[]
58}
59
60Space -> Item: contains
61Item -> Version: has versions
62Commit -> Version: references