aboutsummaryrefslogtreecommitdiff
path: root/packages/api/src/commit.d.ts
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-08-02 17:26:29 +0200
committerHampusM <hampus@hampusmat.com>2021-08-02 17:26:29 +0200
commit904bd1731447796cf1a2bd992c89f889f2a6263a (patch)
treec746534149722905792e8a1b0059568ed9cc1c7c /packages/api/src/commit.d.ts
parent8feb65c5467cc3ad48270183113a121c4a9f86ca (diff)
Renamed the shared types package to api
Diffstat (limited to 'packages/api/src/commit.d.ts')
-rw-r--r--packages/api/src/commit.d.ts48
1 files changed, 48 insertions, 0 deletions
diff --git a/packages/api/src/commit.d.ts b/packages/api/src/commit.d.ts
new file mode 100644
index 0000000..6eb598c
--- /dev/null
+++ b/packages/api/src/commit.d.ts
@@ -0,0 +1,48 @@
+import { Author } from "./misc";
+
+export type Hunk = {
+ new_start: number,
+ new_lines_cnt: number,
+ new_lines: number[],
+ old_start: number,
+ old_lines_cnt: number,
+ deleted_lines: number[],
+ hunk: string
+}
+
+export type Patch = {
+ additions: number,
+ deletions: number,
+ from: string,
+ to: string,
+ too_large: boolean,
+ hunks: Hunk[]
+}
+export interface Commit {
+ message: string,
+ author: Author,
+ date: number,
+ insertions: number,
+ deletions: number,
+ files_changed: number,
+ diff: Patch[]
+}
+
+export type LogCommit = {
+ id: string,
+ author: {
+ name: string,
+ email: string
+ },
+ message: string,
+ date: number,
+ insertions: number,
+ deletions: number,
+ files_changed: number
+}
+
+export type LatestCommit = {
+ id: string,
+ message: string,
+ date: number
+} \ No newline at end of file