@gitkraken/provider-apis 0.19.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/dist/defaults.d.ts +1 -1
- package/dist/fetchWrapper.d.ts +1 -1
- package/dist/index.d.ts +14 -14
- package/dist/index.js +153 -184
- package/dist/providerUtils/azureDevops.d.ts +2 -2
- package/dist/providerUtils/bitbucket.d.ts +2 -2
- package/dist/providerUtils/bitbucketServer.d.ts +2 -2
- package/dist/providerUtils/entityIdentifiers/entityIdentifier.d.ts +5 -0
- package/dist/providerUtils/entityIdentifiers/providerEntityIdentifiers/azureDevopsIssueEntityIdentifier.d.ts +9 -0
- package/dist/providerUtils/entityIdentifiers/providerEntityIdentifiers/azureDevopsPullRequestEntityIdentifier.d.ts +9 -0
- package/dist/providerUtils/entityIdentifiers/providerEntityIdentifiers/bitbucketIssueEntityIdentifier.d.ts +9 -0
- package/dist/providerUtils/entityIdentifiers/providerEntityIdentifiers/bitbucketPullRequestEntityIdentifier.d.ts +9 -0
- package/dist/providerUtils/entityIdentifiers/providerEntityIdentifiers/githubIssueEntityIdentifier.d.ts +9 -0
- package/dist/providerUtils/entityIdentifiers/providerEntityIdentifiers/githubPullRequestEntityIdentifier.d.ts +9 -0
- package/dist/providerUtils/entityIdentifiers/providerEntityIdentifiers/gitlabIssueEntityIdentifier.d.ts +9 -0
- package/dist/providerUtils/entityIdentifiers/providerEntityIdentifiers/gitlabPullRequestEntityIdentifier.d.ts +9 -0
- package/dist/providerUtils/entityIdentifiers/providerEntityIdentifiers/jiraIssueEntityIdentifier.d.ts +9 -0
- package/dist/providerUtils/entityIdentifiers/providerEntityIdentifiers/trelloIssueEntityIdentifier.d.ts +9 -0
- package/dist/providerUtils/gitProvider.d.ts +20 -3
- package/dist/providerUtils/github.d.ts +0 -2
- package/dist/providerUtils/gitlab.d.ts +2 -2
- package/dist/providerUtils/jira.d.ts +2 -2
- package/dist/providerUtils/shared.d.ts +1 -1
- package/dist/providerUtils/trello.d.ts +2 -1
- package/dist/providers/azureDevops/azureDevOps.d.ts +7 -53
- package/dist/providers/azureDevops/azureDevOpsHelpers.d.ts +3 -3
- package/dist/providers/bitbucket/bitbucket.d.ts +4 -11
- package/dist/providers/bitbucket/bitbucketHelpers.d.ts +2 -2
- package/dist/providers/bitbucketServer/bitbucketServer.d.ts +4 -4
- package/dist/providers/gitProvider.d.ts +3 -306
- package/dist/providers/github/github.d.ts +5 -3
- package/dist/providers/github/githubHelpers.d.ts +3 -3
- package/dist/providers/gitlab/gitlab.d.ts +6 -15
- package/dist/providers/gitlab/gitlabHelpers.d.ts +3 -3
- package/dist/providers/issueProvider.d.ts +3 -91
- package/dist/providers/jira/jira.d.ts +9 -24
- package/dist/providers/jira/{sharedHelpers.d.ts → jiraHelpers.d.ts} +5 -4
- package/dist/providers/{jiraServer → jira}/jiraServer.d.ts +8 -11
- package/dist/providers/provider.d.ts +1 -1
- package/dist/providers/trello/trello.d.ts +5 -26
- package/dist/types/exportedTypes/azureDevOps.d.ts +100 -0
- package/dist/types/exportedTypes/bitbucket.d.ts +15 -0
- package/dist/types/exportedTypes/gitProvider.d.ts +301 -0
- package/dist/types/exportedTypes/github.d.ts +23 -0
- package/dist/types/exportedTypes/gitlab.d.ts +7 -0
- package/dist/types/exportedTypes/issueProvider.d.ts +90 -0
- package/dist/types/exportedTypes/jira.d.ts +58 -0
- package/dist/types/exportedTypes/trello.d.ts +22 -0
- package/dist/{types.d.ts → types/exportedTypes/types.d.ts} +81 -3
- package/dist/{providers/azureDevops/azureDevOpsTypes.d.ts → types/internalTypes/azureDevOps.d.ts} +0 -51
- package/dist/{providers/bitbucketServer/bitbucketServerTypes.d.ts → types/internalTypes/bitbucketServer.d.ts} +0 -7
- package/dist/{providers/github/githubTypes.d.ts → types/internalTypes/github.d.ts} +0 -23
- package/dist/{providers/jira/sharedTypes.d.ts → types/internalTypes/jira.d.ts} +1 -38
- package/dist/utils.d.ts +3 -3
- package/package.json +1 -1
- /package/dist/{providers/bitbucket/bitbucketTypes.d.ts → types/internalTypes/bitbucket.d.ts} +0 -0
- /package/dist/{providers/gitlab/gitlabTypes.d.ts → types/internalTypes/gitlab.d.ts} +0 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
export interface Options {
|
|
2
|
+
token?: string;
|
|
3
|
+
isPAT?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface EnterpriseOptions extends Options {
|
|
6
|
+
baseUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface User {
|
|
9
|
+
name: string | null;
|
|
10
|
+
email: string | null;
|
|
11
|
+
avatarUrl: string | null;
|
|
12
|
+
}
|
|
13
|
+
export interface Account extends User {
|
|
14
|
+
id: string;
|
|
15
|
+
graphQLId?: string;
|
|
16
|
+
username: string | null;
|
|
17
|
+
url: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface Organization {
|
|
20
|
+
id: string;
|
|
21
|
+
graphQLId?: string;
|
|
22
|
+
username: string;
|
|
23
|
+
name: string | null;
|
|
24
|
+
email: string | null;
|
|
25
|
+
avatarUrl: string;
|
|
26
|
+
}
|
|
27
|
+
export declare enum GitBuildStatusStage {
|
|
28
|
+
Build = "build",
|
|
29
|
+
Production = "production",
|
|
30
|
+
Staging = "staging",
|
|
31
|
+
Test = "test"
|
|
32
|
+
}
|
|
33
|
+
export declare enum GitBuildStatusState {
|
|
34
|
+
ActionRequired = "ACTION_REQUIRED",
|
|
35
|
+
Cancelled = "CANCELLED",
|
|
36
|
+
Error = "ERROR",
|
|
37
|
+
Failed = "FAILED",
|
|
38
|
+
Pending = "PENDING",
|
|
39
|
+
Running = "RUNNING",
|
|
40
|
+
Skipped = "SKIPPED",
|
|
41
|
+
Success = "SUCCESS",
|
|
42
|
+
Warning = "WARNING",
|
|
43
|
+
OptionalActionRequired = "OPTIONAL_ACTION_REQUIRED"
|
|
44
|
+
}
|
|
45
|
+
export interface GitBuildStatus {
|
|
46
|
+
completedAt: Date | null;
|
|
47
|
+
description: string | null;
|
|
48
|
+
name: string | null;
|
|
49
|
+
state: GitBuildStatusState | null;
|
|
50
|
+
stage: GitBuildStatusStage | null;
|
|
51
|
+
startedAt: Date | null;
|
|
52
|
+
url: string;
|
|
53
|
+
}
|
|
54
|
+
export interface GitLabel {
|
|
55
|
+
color: string | null;
|
|
56
|
+
description: string | null;
|
|
57
|
+
graphQLId?: string;
|
|
58
|
+
id: string | null;
|
|
59
|
+
name: string;
|
|
60
|
+
}
|
|
61
|
+
export interface GitMilestone {
|
|
62
|
+
id: string;
|
|
63
|
+
graphQLId?: string;
|
|
64
|
+
number: number;
|
|
65
|
+
title: string;
|
|
66
|
+
description: string | null;
|
|
67
|
+
isOpen: boolean;
|
|
68
|
+
url: string;
|
|
69
|
+
startDate: Date | null;
|
|
70
|
+
dueDate: Date | null;
|
|
71
|
+
}
|
|
72
|
+
export interface GitRepository {
|
|
73
|
+
id: string;
|
|
74
|
+
graphQLId?: string;
|
|
75
|
+
namespace: string;
|
|
76
|
+
name: string;
|
|
77
|
+
project?: string;
|
|
78
|
+
webUrl: string | null;
|
|
79
|
+
httpsUrl: string | null;
|
|
80
|
+
sshUrl: string | null;
|
|
81
|
+
defaultBranch: GitRef | null;
|
|
82
|
+
permission: string | null;
|
|
83
|
+
}
|
|
84
|
+
export interface GitRef {
|
|
85
|
+
name: string;
|
|
86
|
+
}
|
|
87
|
+
export interface GitRefWithOID extends GitRef {
|
|
88
|
+
oid: string | null;
|
|
89
|
+
}
|
|
90
|
+
export interface GitRefWithCommit extends GitRef {
|
|
91
|
+
commit: GitCommit | null;
|
|
92
|
+
}
|
|
93
|
+
export interface GitCommit {
|
|
94
|
+
oid: string;
|
|
95
|
+
authoredDate: Date | null;
|
|
96
|
+
committedDate: Date | null;
|
|
97
|
+
}
|
|
98
|
+
export interface GitBlame {
|
|
99
|
+
ranges: {
|
|
100
|
+
startingLine: number;
|
|
101
|
+
endingLine: number;
|
|
102
|
+
commit: GitCommit & {
|
|
103
|
+
parentOids: string[];
|
|
104
|
+
message: string;
|
|
105
|
+
author: User | null;
|
|
106
|
+
committer: User | null;
|
|
107
|
+
fileCount: number | null;
|
|
108
|
+
additions: number | null;
|
|
109
|
+
deletions: number | null;
|
|
110
|
+
};
|
|
111
|
+
}[];
|
|
112
|
+
}
|
|
113
|
+
export declare enum GitMergeStrategy {
|
|
114
|
+
MergeCommit = "MERGE_COMMIT",
|
|
115
|
+
Rebase = "REBASE",
|
|
116
|
+
RebaseThenMergeCommit = "REBASE_THEN_MERGE_COMMIT",
|
|
117
|
+
FastForward = "FAST_FORWARD",
|
|
118
|
+
Squash = "SQUASH"
|
|
119
|
+
}
|
|
120
|
+
export declare enum GitPullRequestState {
|
|
121
|
+
Open = "OPEN",
|
|
122
|
+
Closed = "CLOSED",
|
|
123
|
+
Merged = "MERGED"
|
|
124
|
+
}
|
|
125
|
+
export declare enum GitPullRequestReviewState {
|
|
126
|
+
Approved = "APPROVED",
|
|
127
|
+
ChangesRequested = "CHANGES_REQUESTED",
|
|
128
|
+
Commented = "COMMENTED",
|
|
129
|
+
ReviewRequested = "REVIEW_REQUESTED"
|
|
130
|
+
}
|
|
131
|
+
export declare enum GitPullRequestMergeableState {
|
|
132
|
+
Behind = "BEHIND",
|
|
133
|
+
Blocked = "BLOCKED",
|
|
134
|
+
Conflicts = "CONFLICTS",
|
|
135
|
+
Mergeable = "MERGEABLE",
|
|
136
|
+
Unknown = "UNKNOWN",
|
|
137
|
+
UnknownAndBlocked = "UNKNOWN_AND_BLOCKED",
|
|
138
|
+
Unstable = "UNSTABLE"
|
|
139
|
+
}
|
|
140
|
+
export interface GitPullRequestPermissions {
|
|
141
|
+
canMerge: boolean;
|
|
142
|
+
canMergeAndBypassProtections: boolean;
|
|
143
|
+
}
|
|
144
|
+
export interface GitPullRequest {
|
|
145
|
+
id: string;
|
|
146
|
+
graphQLId?: string;
|
|
147
|
+
number: number;
|
|
148
|
+
title: string;
|
|
149
|
+
url: string | null;
|
|
150
|
+
state: GitPullRequestState;
|
|
151
|
+
isDraft: boolean;
|
|
152
|
+
createdDate: Date;
|
|
153
|
+
updatedDate: Date;
|
|
154
|
+
closedDate: Date | null;
|
|
155
|
+
mergedDate: Date | null;
|
|
156
|
+
baseRef: GitRefWithOID | null;
|
|
157
|
+
headRef: GitRefWithOID | null;
|
|
158
|
+
commentCount: number | null;
|
|
159
|
+
upvoteCount: number | null;
|
|
160
|
+
commitCount: number | null;
|
|
161
|
+
fileCount: number | null;
|
|
162
|
+
additions: number | null;
|
|
163
|
+
deletions: number | null;
|
|
164
|
+
author: Account | null;
|
|
165
|
+
assignees: Account[] | null;
|
|
166
|
+
reviews: {
|
|
167
|
+
reviewer: Account;
|
|
168
|
+
state: GitPullRequestReviewState;
|
|
169
|
+
}[] | null;
|
|
170
|
+
reviewDecision: GitPullRequestReviewState | null;
|
|
171
|
+
repository: {
|
|
172
|
+
id: string;
|
|
173
|
+
graphQLId?: string;
|
|
174
|
+
name: string;
|
|
175
|
+
project?: string;
|
|
176
|
+
owner: {
|
|
177
|
+
login: string;
|
|
178
|
+
};
|
|
179
|
+
remoteInfo: {
|
|
180
|
+
cloneUrlHTTPS: string;
|
|
181
|
+
cloneUrlSSH: string;
|
|
182
|
+
} | null;
|
|
183
|
+
};
|
|
184
|
+
headRepository: {
|
|
185
|
+
id: string;
|
|
186
|
+
graphQLId?: string;
|
|
187
|
+
name: string;
|
|
188
|
+
project?: string;
|
|
189
|
+
owner: {
|
|
190
|
+
login: string;
|
|
191
|
+
};
|
|
192
|
+
remoteInfo: {
|
|
193
|
+
cloneUrlHTTPS: string;
|
|
194
|
+
cloneUrlSSH: string;
|
|
195
|
+
} | null;
|
|
196
|
+
} | null;
|
|
197
|
+
headCommit: {
|
|
198
|
+
buildStatuses: GitBuildStatus[] | null;
|
|
199
|
+
} | null;
|
|
200
|
+
mergeableState: GitPullRequestMergeableState;
|
|
201
|
+
milestone?: GitMilestone | null;
|
|
202
|
+
labels?: GitLabel[];
|
|
203
|
+
permissions: GitPullRequestPermissions | null;
|
|
204
|
+
version?: number;
|
|
205
|
+
}
|
|
206
|
+
export interface GitComment {
|
|
207
|
+
author: Account | User | null;
|
|
208
|
+
body: string;
|
|
209
|
+
createdAt: Date | null;
|
|
210
|
+
id: string;
|
|
211
|
+
graphQLId?: string;
|
|
212
|
+
url: string;
|
|
213
|
+
}
|
|
214
|
+
export declare enum GitDiffLineType {
|
|
215
|
+
ADDED = "ADDED",
|
|
216
|
+
DELETED = "DELETED",
|
|
217
|
+
UNMODIFIED = "UNMODIFIED"
|
|
218
|
+
}
|
|
219
|
+
export interface GitDiffLine {
|
|
220
|
+
line: string;
|
|
221
|
+
oldLineNumber: number | null;
|
|
222
|
+
newLineNumber: number | null;
|
|
223
|
+
type: GitDiffLineType;
|
|
224
|
+
}
|
|
225
|
+
export interface GitPullRequestReviewComment extends GitComment {
|
|
226
|
+
diffLines: GitDiffLine[];
|
|
227
|
+
filename: string;
|
|
228
|
+
replies: GitComment[];
|
|
229
|
+
isOutdated: boolean;
|
|
230
|
+
isResolved: boolean;
|
|
231
|
+
}
|
|
232
|
+
export interface GitPullRequestReview extends GitComment {
|
|
233
|
+
reviewComments: GitPullRequestReviewComment[];
|
|
234
|
+
}
|
|
235
|
+
export interface GetRepoInput {
|
|
236
|
+
namespace: string;
|
|
237
|
+
name: string;
|
|
238
|
+
project?: string;
|
|
239
|
+
}
|
|
240
|
+
export interface GetReposInput {
|
|
241
|
+
repos: GetRepoInput[];
|
|
242
|
+
}
|
|
243
|
+
export type GetPRForRepoInput = {
|
|
244
|
+
repo: GetRepoInput;
|
|
245
|
+
number: number;
|
|
246
|
+
};
|
|
247
|
+
export interface SetPullRequestInput {
|
|
248
|
+
id: string;
|
|
249
|
+
number: number;
|
|
250
|
+
graphQLId?: string;
|
|
251
|
+
repository: {
|
|
252
|
+
id: string;
|
|
253
|
+
name: string;
|
|
254
|
+
project?: string;
|
|
255
|
+
owner: {
|
|
256
|
+
login: string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
version?: number;
|
|
260
|
+
}
|
|
261
|
+
export interface SetMilestoneInput {
|
|
262
|
+
id: string;
|
|
263
|
+
graphQLId?: string;
|
|
264
|
+
}
|
|
265
|
+
export interface SetAccountInput {
|
|
266
|
+
id: string;
|
|
267
|
+
name: string | null;
|
|
268
|
+
graphQLId?: string;
|
|
269
|
+
username: string | null;
|
|
270
|
+
}
|
|
271
|
+
export interface CreateCommitInput {
|
|
272
|
+
commitMessage: {
|
|
273
|
+
description?: string;
|
|
274
|
+
summary: string;
|
|
275
|
+
};
|
|
276
|
+
deletedFiles: string[];
|
|
277
|
+
newOrModifiedFiles: {
|
|
278
|
+
[filePath: string]: string;
|
|
279
|
+
};
|
|
280
|
+
repo: GetRepoInput;
|
|
281
|
+
target: {
|
|
282
|
+
name: string;
|
|
283
|
+
oid: string;
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
export interface SetLabelInput {
|
|
287
|
+
id: string | null;
|
|
288
|
+
graphQLId?: string;
|
|
289
|
+
name: string;
|
|
290
|
+
}
|
|
291
|
+
export interface CursorPageInput {
|
|
292
|
+
cursor?: string | null;
|
|
293
|
+
}
|
|
294
|
+
export interface NumberedPageInput {
|
|
295
|
+
page?: number | null;
|
|
296
|
+
}
|
|
297
|
+
export type PageInput = CursorPageInput | NumberedPageInput;
|
|
298
|
+
export interface GetRepoErrorData {
|
|
299
|
+
input: GetRepoInput;
|
|
300
|
+
error?: Error;
|
|
301
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GetRepoInput } from './gitProvider';
|
|
2
|
+
export declare enum GitHubIssueCloseReason {
|
|
3
|
+
Completed = "COMPLETED",
|
|
4
|
+
NotPlanned = "NOT_PLANNED"
|
|
5
|
+
}
|
|
6
|
+
export interface FetchPullRequestsData {
|
|
7
|
+
repos: GetRepoInput[];
|
|
8
|
+
assigneeLogins?: string[];
|
|
9
|
+
updatedBefore?: string;
|
|
10
|
+
isDraft?: boolean;
|
|
11
|
+
authorLogin?: string;
|
|
12
|
+
mentionLogin?: string;
|
|
13
|
+
reviewRequestedLogin?: string;
|
|
14
|
+
startQuery?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface FetchIssuesData {
|
|
17
|
+
repos: GetRepoInput[];
|
|
18
|
+
assigneeLogins?: string[];
|
|
19
|
+
updatedBefore?: string;
|
|
20
|
+
authorLogin?: string;
|
|
21
|
+
mentionLogin?: string;
|
|
22
|
+
startQuery?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Account, GetReposInput, GitLabel, GitMilestone } from './gitProvider';
|
|
2
|
+
export declare enum GitIssueState {
|
|
3
|
+
Open = "OPEN",
|
|
4
|
+
Closed = "CLOSED"
|
|
5
|
+
}
|
|
6
|
+
export interface GetIssueInput {
|
|
7
|
+
resourceId?: string;
|
|
8
|
+
namespace?: string;
|
|
9
|
+
project?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
number: string;
|
|
12
|
+
}
|
|
13
|
+
export type GetIssuesForReposInput = GetReposInput | {
|
|
14
|
+
repoIds: (string | number)[];
|
|
15
|
+
};
|
|
16
|
+
export interface IssueTransition {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
to: {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
color: string;
|
|
23
|
+
category: IssueStatusCategory;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface IssueComponent {
|
|
27
|
+
description: string | null;
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
31
|
+
export type IssueStatusCategory = 'TO_DO' | 'IN_PROGRESS' | 'DONE';
|
|
32
|
+
export interface Issue {
|
|
33
|
+
author: Account | null;
|
|
34
|
+
assignees: Account[];
|
|
35
|
+
commentCount: number | null;
|
|
36
|
+
closedDate: Date | null;
|
|
37
|
+
createdDate: Date;
|
|
38
|
+
description: string | null;
|
|
39
|
+
graphQLId?: string;
|
|
40
|
+
id: string;
|
|
41
|
+
labels: GitLabel[];
|
|
42
|
+
number: string;
|
|
43
|
+
repository: {
|
|
44
|
+
id: string;
|
|
45
|
+
graphQLId?: string;
|
|
46
|
+
name: string;
|
|
47
|
+
owner: {
|
|
48
|
+
login?: string;
|
|
49
|
+
};
|
|
50
|
+
} | null;
|
|
51
|
+
project?: {
|
|
52
|
+
namespace: string | null;
|
|
53
|
+
resourceId: string | null;
|
|
54
|
+
name: string;
|
|
55
|
+
};
|
|
56
|
+
state: {
|
|
57
|
+
id?: string;
|
|
58
|
+
name: string;
|
|
59
|
+
color: string | null;
|
|
60
|
+
category?: IssueStatusCategory;
|
|
61
|
+
} | null;
|
|
62
|
+
statusTransitions?: IssueTransition[];
|
|
63
|
+
components?: IssueComponent[];
|
|
64
|
+
title: string;
|
|
65
|
+
type: string | null;
|
|
66
|
+
updatedDate: Date | null;
|
|
67
|
+
upvoteCount: number | null;
|
|
68
|
+
url: string | null;
|
|
69
|
+
milestone?: GitMilestone | null;
|
|
70
|
+
}
|
|
71
|
+
export interface SetIssueInput {
|
|
72
|
+
id: string;
|
|
73
|
+
graphQLId?: string;
|
|
74
|
+
number: string;
|
|
75
|
+
repository: {
|
|
76
|
+
name: string;
|
|
77
|
+
owner: {
|
|
78
|
+
login?: string;
|
|
79
|
+
};
|
|
80
|
+
} | null;
|
|
81
|
+
project?: {
|
|
82
|
+
namespace: string | null;
|
|
83
|
+
resourceId: string | null;
|
|
84
|
+
name: string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export interface SetStatusInput {
|
|
88
|
+
name: string;
|
|
89
|
+
id?: string;
|
|
90
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface JiraResource {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
url: string;
|
|
5
|
+
avatarUrl: string;
|
|
6
|
+
}
|
|
7
|
+
export interface JiraProject {
|
|
8
|
+
id: string;
|
|
9
|
+
key: string;
|
|
10
|
+
name: string;
|
|
11
|
+
resourceId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface JiraGetIssueInput {
|
|
14
|
+
resourceId: string;
|
|
15
|
+
number: string;
|
|
16
|
+
}
|
|
17
|
+
export interface JiraServerProject {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
}
|
|
21
|
+
export interface SetComponentInput {
|
|
22
|
+
id: string;
|
|
23
|
+
}
|
|
24
|
+
export interface AvatarUrls {
|
|
25
|
+
'16x16': string;
|
|
26
|
+
'24x24': string;
|
|
27
|
+
'32x32': string;
|
|
28
|
+
'48x48': string;
|
|
29
|
+
}
|
|
30
|
+
export interface JiraUser {
|
|
31
|
+
accountId?: string;
|
|
32
|
+
accountType: string;
|
|
33
|
+
active: boolean;
|
|
34
|
+
avatarUrls: AvatarUrls;
|
|
35
|
+
displayName: string;
|
|
36
|
+
emailAddress: string;
|
|
37
|
+
key?: string;
|
|
38
|
+
self: string;
|
|
39
|
+
timeZone: string;
|
|
40
|
+
name?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface JiraComponent {
|
|
43
|
+
ari?: string;
|
|
44
|
+
assignee?: JiraUser;
|
|
45
|
+
assigneeType: string;
|
|
46
|
+
description?: string;
|
|
47
|
+
id: string;
|
|
48
|
+
isAssigneeTypeValid: boolean;
|
|
49
|
+
lead?: JiraUser;
|
|
50
|
+
leadUserName?: string;
|
|
51
|
+
metadata?: unknown;
|
|
52
|
+
name: string;
|
|
53
|
+
project: string;
|
|
54
|
+
projectId: string;
|
|
55
|
+
realAssignee?: JiraUser;
|
|
56
|
+
realAssigneeType: string;
|
|
57
|
+
self: string;
|
|
58
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface TrelloBoard {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export interface TrelloList {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
closed: boolean;
|
|
9
|
+
pos: number;
|
|
10
|
+
softLimit: string;
|
|
11
|
+
idBoard: string;
|
|
12
|
+
subscribed: boolean;
|
|
13
|
+
limits: {
|
|
14
|
+
attachments: {
|
|
15
|
+
perBoard: {
|
|
16
|
+
status: string;
|
|
17
|
+
disableAt: number;
|
|
18
|
+
warnAt: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node-fetch" />
|
|
2
|
-
import {
|
|
2
|
+
import { GitPullRequest } from './gitProvider';
|
|
3
3
|
export type Fetch = typeof import('node-fetch').default;
|
|
4
4
|
export declare const isFetch: (fetch: Fetch | RequestFunction, forceIsFetch?: boolean) => fetch is typeof import("node-fetch").default;
|
|
5
5
|
export type RequestFunction = <T>(options: RequestOptions) => Promise<Response<T>>;
|
|
@@ -80,12 +80,90 @@ export type PagedResult<T> = {
|
|
|
80
80
|
};
|
|
81
81
|
export type FullFieldMap<T> = Record<keyof T, boolean>;
|
|
82
82
|
export type FieldMap<T> = Partial<FullFieldMap<T>>;
|
|
83
|
-
export type
|
|
83
|
+
export type PullRequestActionCategory = 'readyToMerge' | 'unassignedReviewers' | 'failingCI' | 'conflicts' | 'needsMyReview' | 'changesRequested' | 'reviewerCommented' | 'waitingForReview' | 'draft' | 'other';
|
|
84
|
+
export type PullRequestBucketID = PullRequestActionCategory | 'pinned' | 'snoozed';
|
|
84
85
|
export interface PullRequestBucket {
|
|
85
86
|
id: PullRequestBucketID;
|
|
86
87
|
faIconName: string;
|
|
87
88
|
name: string;
|
|
88
89
|
priority: number;
|
|
89
|
-
pullRequests:
|
|
90
|
+
pullRequests: PullRequestWithUniqueID[];
|
|
90
91
|
}
|
|
92
|
+
export declare enum EntityVersion {
|
|
93
|
+
Zero = "0",
|
|
94
|
+
One = "1"
|
|
95
|
+
}
|
|
96
|
+
export declare enum EntityType {
|
|
97
|
+
PullRequest = "0",
|
|
98
|
+
Issue = "1"
|
|
99
|
+
}
|
|
100
|
+
export declare enum EntityIdentifierProviderType {
|
|
101
|
+
Azure = "0",
|
|
102
|
+
Github = "1",
|
|
103
|
+
GithubEnterprise = "2",
|
|
104
|
+
Gitlab = "3",
|
|
105
|
+
GitlabSelfHosted = "4",
|
|
106
|
+
Bitbucket = "5",
|
|
107
|
+
BitbucketServer = "6",
|
|
108
|
+
Jira = "7",
|
|
109
|
+
JiraServer = "8",
|
|
110
|
+
Trello = "9"
|
|
111
|
+
}
|
|
112
|
+
export type EntityIdentifier = {
|
|
113
|
+
provider: EntityIdentifierProviderType;
|
|
114
|
+
entityType: EntityType;
|
|
115
|
+
version: EntityVersion;
|
|
116
|
+
domain: string | null;
|
|
117
|
+
resourceId: string | null;
|
|
118
|
+
accountOrOrgId: string | null;
|
|
119
|
+
organizationName: string | null;
|
|
120
|
+
projectId: string | null;
|
|
121
|
+
repoId: string | null;
|
|
122
|
+
entityId: string;
|
|
123
|
+
};
|
|
124
|
+
export interface EntityIdentifierInterface {
|
|
125
|
+
encode(entityIdentifier: EntityIdentifier): string;
|
|
126
|
+
decode(entityFields: string[]): EntityIdentifier;
|
|
127
|
+
validate(entityIdentifier: EntityIdentifier): void;
|
|
128
|
+
}
|
|
129
|
+
export type EnrichedItemsByUniqueId = {
|
|
130
|
+
[uuid: string]: EnrichedItem[];
|
|
131
|
+
};
|
|
132
|
+
export type EnrichedItem = {
|
|
133
|
+
id: string;
|
|
134
|
+
userId?: string;
|
|
135
|
+
type: 'pin' | 'snooze';
|
|
136
|
+
provider: 'azure' | 'bitbucket' | 'github' | 'gitlab' | 'jira' | 'trello' | 'gitkraken';
|
|
137
|
+
entityType: 'issue' | 'pr';
|
|
138
|
+
entityId: string;
|
|
139
|
+
entityUrl: string;
|
|
140
|
+
createdAt: string;
|
|
141
|
+
updatedAt: string;
|
|
142
|
+
expiresAt?: string;
|
|
143
|
+
};
|
|
144
|
+
export type PullRequestWithUniqueID = GitPullRequest & {
|
|
145
|
+
uuid: string;
|
|
146
|
+
};
|
|
147
|
+
export type ActionablePullRequest = PullRequestWithUniqueID & {
|
|
148
|
+
suggestedActionCategory: PullRequestActionCategory;
|
|
149
|
+
priority: number;
|
|
150
|
+
viewer: {
|
|
151
|
+
canMerge: boolean;
|
|
152
|
+
isAuthor: boolean;
|
|
153
|
+
isAssignee: boolean;
|
|
154
|
+
isReviewer: boolean;
|
|
155
|
+
shouldMerge: boolean;
|
|
156
|
+
shouldAssignReviewer: boolean;
|
|
157
|
+
waitingOnReviews: boolean;
|
|
158
|
+
shouldReview: boolean;
|
|
159
|
+
pinned?: boolean;
|
|
160
|
+
snoozed?: boolean;
|
|
161
|
+
enrichedItems?: EnrichedItem[];
|
|
162
|
+
};
|
|
163
|
+
failingCI: boolean;
|
|
164
|
+
hasConflicts: boolean;
|
|
165
|
+
changeRequestReviewCount: number;
|
|
166
|
+
commentReviewCount: number;
|
|
167
|
+
approvalReviewCount: number;
|
|
168
|
+
};
|
|
91
169
|
export type PullRequestBuckets = Record<PullRequestBucketID, PullRequestBucket>;
|
package/dist/{providers/azureDevops/azureDevOpsTypes.d.ts → types/internalTypes/azureDevOps.d.ts}
RENAMED
|
@@ -197,58 +197,7 @@ export interface AzureIssue {
|
|
|
197
197
|
};
|
|
198
198
|
url: string;
|
|
199
199
|
}
|
|
200
|
-
export interface WorkItemTypeField {
|
|
201
|
-
helpText: string;
|
|
202
|
-
alwaysRequired: boolean;
|
|
203
|
-
referenceName: string;
|
|
204
|
-
name: string;
|
|
205
|
-
url: string;
|
|
206
|
-
}
|
|
207
|
-
export interface WorkItemTypeTransition {
|
|
208
|
-
to: string;
|
|
209
|
-
actions: string[] | null;
|
|
210
|
-
}
|
|
211
|
-
export interface WorkItemState {
|
|
212
|
-
category: 'Proposed' | 'InProgress' | 'Resolved' | 'Completed' | 'Removed';
|
|
213
|
-
color: string;
|
|
214
|
-
name: string;
|
|
215
|
-
}
|
|
216
|
-
export interface WorkItemType {
|
|
217
|
-
name: string;
|
|
218
|
-
referenceName: string;
|
|
219
|
-
description: string;
|
|
220
|
-
color: string;
|
|
221
|
-
icon: {
|
|
222
|
-
id: string;
|
|
223
|
-
url: string;
|
|
224
|
-
};
|
|
225
|
-
isDisabled: boolean;
|
|
226
|
-
xmlForm: string;
|
|
227
|
-
fields: WorkItemTypeField[];
|
|
228
|
-
fieldInstances: WorkItemTypeField[];
|
|
229
|
-
transitions: {
|
|
230
|
-
[index: string]: WorkItemTypeTransition;
|
|
231
|
-
};
|
|
232
|
-
states: WorkItemState[];
|
|
233
|
-
url: string;
|
|
234
|
-
}
|
|
235
|
-
export interface AzureGraphAccount {
|
|
236
|
-
avatarUrl: string | null;
|
|
237
|
-
descriptor: string;
|
|
238
|
-
email: string | null;
|
|
239
|
-
name: string;
|
|
240
|
-
storageKeyURL: string;
|
|
241
|
-
username: string;
|
|
242
|
-
}
|
|
243
200
|
export interface UpdatePullRequestResponse {
|
|
244
201
|
status: string;
|
|
245
202
|
}
|
|
246
|
-
export declare enum PullRequestAsyncStatus {
|
|
247
|
-
Conflicts = "conflicts",
|
|
248
|
-
Failure = "failure",
|
|
249
|
-
NotSet = "notSet",
|
|
250
|
-
Queued = "queued",
|
|
251
|
-
RejectedByPolicy = "rejectedByPolicy",
|
|
252
|
-
Succeeded = "succeeded"
|
|
253
|
-
}
|
|
254
203
|
export {};
|
|
@@ -4,13 +4,6 @@ export interface Link {
|
|
|
4
4
|
export interface NamedLink<T extends string = string> extends Link {
|
|
5
5
|
name: T;
|
|
6
6
|
}
|
|
7
|
-
export interface BitbucketServerMergeStrategy {
|
|
8
|
-
description: string;
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
flag: string;
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
}
|
|
14
7
|
export interface BitbucketServerPagedResponse<T> {
|
|
15
8
|
values: T[];
|
|
16
9
|
size: number;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { GetRepoInput } from '../gitProvider';
|
|
2
|
-
export declare enum GitHubIssueCloseReason {
|
|
3
|
-
Completed = "COMPLETED",
|
|
4
|
-
NotPlanned = "NOT_PLANNED"
|
|
5
|
-
}
|
|
6
1
|
export declare enum GraphQLViewerPermission {
|
|
7
2
|
ADMIN = "ADMIN",
|
|
8
3
|
MAINTAIN = "MAINTAIN",
|
|
@@ -264,24 +259,6 @@ export interface GraphQLMilestone {
|
|
|
264
259
|
title: string;
|
|
265
260
|
url: string;
|
|
266
261
|
}
|
|
267
|
-
export interface FetchPullRequestsData {
|
|
268
|
-
repos: GetRepoInput[];
|
|
269
|
-
assigneeLogins?: string[];
|
|
270
|
-
updatedBefore?: string;
|
|
271
|
-
isDraft?: boolean;
|
|
272
|
-
authorLogin?: string;
|
|
273
|
-
mentionLogin?: string;
|
|
274
|
-
reviewRequestedLogin?: string;
|
|
275
|
-
startQuery?: string;
|
|
276
|
-
}
|
|
277
|
-
export interface FetchIssuesData {
|
|
278
|
-
repos: GetRepoInput[];
|
|
279
|
-
assigneeLogins?: string[];
|
|
280
|
-
updatedBefore?: string;
|
|
281
|
-
authorLogin?: string;
|
|
282
|
-
mentionLogin?: string;
|
|
283
|
-
startQuery?: string;
|
|
284
|
-
}
|
|
285
262
|
export interface GraphQLReviewThread {
|
|
286
263
|
comments: {
|
|
287
264
|
nodes: GraphQLReviewComment[];
|