diff options
author | HampusM <hampus@hampusmat.com> | 2021-08-02 17:26:29 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-08-02 17:26:29 +0200 |
commit | 904bd1731447796cf1a2bd992c89f889f2a6263a (patch) | |
tree | c746534149722905792e8a1b0059568ed9cc1c7c /packages/shared_types | |
parent | 8feb65c5467cc3ad48270183113a121c4a9f86ca (diff) |
Renamed the shared types package to api
Diffstat (limited to 'packages/shared_types')
-rw-r--r-- | packages/shared_types/package.json | 8 | ||||
-rw-r--r-- | packages/shared_types/src/branch.d.ts | 10 | ||||
-rw-r--r-- | packages/shared_types/src/commit.d.ts | 48 | ||||
-rw-r--r-- | packages/shared_types/src/index.d.ts | 7 | ||||
-rw-r--r-- | packages/shared_types/src/info.d.ts | 4 | ||||
-rw-r--r-- | packages/shared_types/src/misc.d.ts | 4 | ||||
-rw-r--r-- | packages/shared_types/src/repository.d.ts | 12 | ||||
-rw-r--r-- | packages/shared_types/src/tag.d.ts | 7 | ||||
-rw-r--r-- | packages/shared_types/src/tree.d.ts | 12 |
9 files changed, 0 insertions, 112 deletions
diff --git a/packages/shared_types/package.json b/packages/shared_types/package.json deleted file mode 100644 index df40566..0000000 --- a/packages/shared_types/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "shared_types", - "version": "1.0.0", - "main": "src/index.d.ts", - "author": "HampusMat", - "license": "MIT", - "private": true -} diff --git a/packages/shared_types/src/branch.d.ts b/packages/shared_types/src/branch.d.ts deleted file mode 100644 index a32515e..0000000 --- a/packages/shared_types/src/branch.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { LatestCommit } from "./commit"; - -export interface BranchSummary { - id: string, - name: string -} - -export interface Branch extends BranchSummary { - latest_commit: LatestCommit -}
\ No newline at end of file diff --git a/packages/shared_types/src/commit.d.ts b/packages/shared_types/src/commit.d.ts deleted file mode 100644 index 6eb598c..0000000 --- a/packages/shared_types/src/commit.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -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 diff --git a/packages/shared_types/src/index.d.ts b/packages/shared_types/src/index.d.ts deleted file mode 100644 index 71be945..0000000 --- a/packages/shared_types/src/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { Tree, TreeEntry } from "./tree"; -export { Commit, Patch, Hunk, LatestCommit, LogCommit } from "./commit"; -export { Repository, RepositorySummary } from "./repository"; -export { Branch, BranchSummary } from "./branch"; -export { Author } from "./misc"; -export { Tag } from "./tag"; -export { Info } from "./info";
\ No newline at end of file diff --git a/packages/shared_types/src/info.d.ts b/packages/shared_types/src/info.d.ts deleted file mode 100644 index 1101cea..0000000 --- a/packages/shared_types/src/info.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type Info = { - title: string, - about: string, -}
\ No newline at end of file diff --git a/packages/shared_types/src/misc.d.ts b/packages/shared_types/src/misc.d.ts deleted file mode 100644 index e43fae5..0000000 --- a/packages/shared_types/src/misc.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type Author = { - name: string, - email: string -}
\ No newline at end of file diff --git a/packages/shared_types/src/repository.d.ts b/packages/shared_types/src/repository.d.ts deleted file mode 100644 index cb4d246..0000000 --- a/packages/shared_types/src/repository.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -interface RepositoryBase { - name: string, - description: string | null -} - -export interface RepositorySummary extends RepositoryBase { - last_updated: number | string -} - -export interface Repository extends RepositoryBase { - has_readme: boolean -}
\ No newline at end of file diff --git a/packages/shared_types/src/tag.d.ts b/packages/shared_types/src/tag.d.ts deleted file mode 100644 index 7c418da..0000000 --- a/packages/shared_types/src/tag.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Author } from "./misc"; - -export type Tag = { - name: string, - author: Author, - date: number -}
\ No newline at end of file diff --git a/packages/shared_types/src/tree.d.ts b/packages/shared_types/src/tree.d.ts deleted file mode 100644 index d2b4708..0000000 --- a/packages/shared_types/src/tree.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { LatestCommit } from "./commit"; - -export type TreeEntry = { - name: string, - type: "tree" | "blob", - latest_commit: LatestCommit -}; - -export type Tree = { - type: "tree" | "blob", - content: string | TreeEntry[] -};
\ No newline at end of file |