1 |
|
2 | export interface BranchDeletionSummary {
|
3 | branch: string;
|
4 | hash: any;
|
5 | success: boolean;
|
6 | }
|
7 |
|
8 | export interface BranchSummary {
|
9 | detached: boolean;
|
10 | current: string;
|
11 | all: string[];
|
12 | branches: {[key: string]: {
|
13 | current: string,
|
14 | name: string,
|
15 | commit: string,
|
16 | label: string
|
17 | }};
|
18 | }
|
19 |
|
20 | export interface CommitSummary {
|
21 | author: null | {
|
22 | email: string;
|
23 | name: string;
|
24 | };
|
25 | branch: string;
|
26 | commit: string;
|
27 | summary: {
|
28 | changes: number;
|
29 | insertions: number;
|
30 | deletions: number;
|
31 | };
|
32 | }
|
33 |
|
34 | export interface DiffResultTextFile {
|
35 | file: string;
|
36 | changes: number,
|
37 | insertions: number;
|
38 | deletions: number;
|
39 | binary: boolean;
|
40 | }
|
41 |
|
42 | export interface DiffResultBinaryFile {
|
43 | file: string;
|
44 | before: number;
|
45 | after: number;
|
46 | binary: boolean;
|
47 | }
|
48 |
|
49 | export interface DiffResult {
|
50 | files: Array<DiffResultTextFile | DiffResultBinaryFile>;
|
51 | insertions: number;
|
52 | deletions: number;
|
53 | }
|
54 |
|
55 | export interface FetchResult {
|
56 | raw: string;
|
57 | remote: string | null;
|
58 | branches: {
|
59 | name: string;
|
60 | tracking: string;
|
61 | }[];
|
62 | tags: {
|
63 | name: string;
|
64 | tracking: string;
|
65 | }[];
|
66 | }
|
67 |
|
68 | export interface MoveSummary {
|
69 | moves: any[];
|
70 | }
|
71 |
|
72 | export interface PullResult {
|
73 |
|
74 |
|
75 | files: string[];
|
76 |
|
77 |
|
78 | insertions: {[key: string]: number};
|
79 |
|
80 |
|
81 | deletions: any;
|
82 |
|
83 | summary: {
|
84 | changes: number;
|
85 | insertions: number;
|
86 | deletions: number;
|
87 | };
|
88 |
|
89 |
|
90 | created: string[];
|
91 |
|
92 |
|
93 | deleted: string[];
|
94 | }
|
95 |
|
96 | export interface RemoteWithoutRefs {
|
97 | name: string;
|
98 | }
|
99 |
|
100 | export interface RemoteWithRefs extends RemoteWithoutRefs {
|
101 | refs: {
|
102 | fetch: string;
|
103 | push: string;
|
104 | }
|
105 | }
|
106 |
|
107 | export interface StatusResultRenamed {
|
108 | from: string;
|
109 | to: string;
|
110 | }
|
111 |
|
112 | export interface StatusResult {
|
113 | not_added: string[];
|
114 | conflicted: string[];
|
115 | created: string[];
|
116 | deleted: string[];
|
117 | modified: string[];
|
118 | renamed: StatusResultRenamed[];
|
119 | staged: string[];
|
120 | files: {
|
121 | path: string;
|
122 | index: string;
|
123 | working_dir: string;
|
124 | }[];
|
125 | ahead: number;
|
126 | behind: number;
|
127 | current: string;
|
128 | tracking: string;
|
129 |
|
130 | |
131 |
|
132 |
|
133 | isClean(): boolean;
|
134 | }
|
135 |
|
136 | export interface TagResult {
|
137 | all: string[];
|
138 | latest: string;
|
139 | }
|
140 |
|
141 | export interface DefaultLogFields {
|
142 | hash: string;
|
143 | date: string;
|
144 | message: string;
|
145 | refs: string;
|
146 | body: string;
|
147 | author_name: string;
|
148 | author_email: string;
|
149 | }
|
150 |
|
151 | export interface ListLogSummary<T = DefaultLogFields> {
|
152 | all: ReadonlyArray<T>;
|
153 | total: number;
|
154 | latest: T;
|
155 | }
|