diff --git a/specs/mini-vc/mini-vc.md b/specs/mini-vc/mini-vc.md index 93a3bca612e9995481a3370120d8edb0cbad3dc8..dd8387c71287dd8bc7ec52663d753ef09deb1bfd 100644 --- a/specs/mini-vc/mini-vc.md +++ b/specs/mini-vc/mini-vc.md @@ -163,13 +163,13 @@ It is an error if a repository with this name already exists. The request JSON has the following form: ```ts -interface NewRepositoryRequest { +{ name: string } ``` If successful, the response JSON has the following form: ```ts -interface NewRepositoryResponse { +{ success: true } ``` @@ -182,7 +182,7 @@ It is an error if the repository doesn't exist or the commit does not exist in t The request JSON has the following form: ```ts -interface FetchRequest { +{ // Repository name name: string // Last known commit ID. @@ -192,18 +192,21 @@ interface FetchRequest { ``` If successful, the response JSON has the following form: ```ts -interface FetchResponse { +{ success: true // Commits after parentID up to HEAD. // They must be ordered from oldest to newest. commits: Commit[] } -interface Commit { +``` +where +```ts +type Commit = { id: string message: string diffs: FileDiffs } -interface FileDiffs { +type FileDiffs = { // Map each filename to a diff for that file [file: string]: Diff } @@ -226,7 +229,7 @@ If there is a merge conflict, `mergeFileDiffs()` will throw an error, which you The request JSON has the following form: ```ts -interface CommitRequest { +{ // Repository name name: string // Parent commit.