@gitkraken/provider-apis 0.19.0 → 0.20.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 +26 -0
- package/dist/defaults.d.ts +1 -1
- package/dist/fetchWrapper.d.ts +1 -1
- package/dist/index.d.ts +11 -13
- package/dist/index.js +123 -154
- package/dist/providerUtils/gitProvider.d.ts +20 -3
- package/dist/providerUtils/shared.d.ts +1 -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 +7 -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} +44 -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} +1 -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
|
@@ -1,94 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
Open = "OPEN",
|
|
5
|
-
Closed = "CLOSED"
|
|
6
|
-
}
|
|
7
|
-
export interface GetIssueInput {
|
|
8
|
-
resourceId?: string;
|
|
9
|
-
namespace?: string;
|
|
10
|
-
project?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
number: string;
|
|
13
|
-
}
|
|
14
|
-
export type GetIssuesForReposInput = GetReposInput | {
|
|
15
|
-
repoIds: (string | number)[];
|
|
16
|
-
};
|
|
17
|
-
export interface IssueTransition {
|
|
18
|
-
id: string;
|
|
19
|
-
name: string;
|
|
20
|
-
to: {
|
|
21
|
-
id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
color: string;
|
|
24
|
-
category: IssueStatusCategory;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface IssueComponent {
|
|
28
|
-
description: string | null;
|
|
29
|
-
id: string;
|
|
30
|
-
name: string;
|
|
31
|
-
}
|
|
32
|
-
export type IssueStatusCategory = 'TO_DO' | 'IN_PROGRESS' | 'DONE';
|
|
33
|
-
export interface Issue {
|
|
34
|
-
author: Account | null;
|
|
35
|
-
assignees: Account[];
|
|
36
|
-
commentCount: number | null;
|
|
37
|
-
closedDate: Date | null;
|
|
38
|
-
createdDate: Date;
|
|
39
|
-
description: string | null;
|
|
40
|
-
graphQLId?: string;
|
|
41
|
-
id: string;
|
|
42
|
-
labels: GitLabel[];
|
|
43
|
-
number: string;
|
|
44
|
-
repository: {
|
|
45
|
-
id: string;
|
|
46
|
-
graphQLId?: string;
|
|
47
|
-
name: string;
|
|
48
|
-
owner: {
|
|
49
|
-
login?: string;
|
|
50
|
-
};
|
|
51
|
-
} | null;
|
|
52
|
-
project?: {
|
|
53
|
-
namespace: string | null;
|
|
54
|
-
resourceId: string | null;
|
|
55
|
-
name: string;
|
|
56
|
-
};
|
|
57
|
-
state: {
|
|
58
|
-
id?: string;
|
|
59
|
-
name: string;
|
|
60
|
-
color: string | null;
|
|
61
|
-
category?: IssueStatusCategory;
|
|
62
|
-
} | null;
|
|
63
|
-
statusTransitions?: IssueTransition[];
|
|
64
|
-
components?: IssueComponent[];
|
|
65
|
-
title: string;
|
|
66
|
-
type: string | null;
|
|
67
|
-
updatedDate: Date | null;
|
|
68
|
-
upvoteCount: number | null;
|
|
69
|
-
url: string | null;
|
|
70
|
-
milestone?: GitMilestone | null;
|
|
71
|
-
}
|
|
72
|
-
export interface SetIssueInput {
|
|
73
|
-
id: string;
|
|
74
|
-
graphQLId?: string;
|
|
75
|
-
number: string;
|
|
76
|
-
repository: {
|
|
77
|
-
name: string;
|
|
78
|
-
owner: {
|
|
79
|
-
login?: string;
|
|
80
|
-
};
|
|
81
|
-
} | null;
|
|
82
|
-
project?: {
|
|
83
|
-
namespace: string | null;
|
|
84
|
-
resourceId: string | null;
|
|
85
|
-
name: string;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
export interface SetStatusInput {
|
|
89
|
-
name: string;
|
|
90
|
-
id?: string;
|
|
91
|
-
}
|
|
1
|
+
import { GetRepoInput, Options, SetAccountInput, SetLabelInput, SetMilestoneInput } from '../types/exportedTypes/gitProvider';
|
|
2
|
+
import { GetIssueInput, GetIssuesForReposInput, Issue, SetIssueInput, SetStatusInput } from '../types/exportedTypes/issueProvider';
|
|
3
|
+
import { PagedResult, Result } from '../types/exportedTypes/types';
|
|
92
4
|
export interface IssueProvider {
|
|
93
5
|
getIssue?(input: GetIssueInput, options: Options): Promise<Result<Issue>>;
|
|
94
6
|
getIssuesForRepo?(input: {
|
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { CursorPageInput, EnterpriseOptions, NumberedPageInput, SetAccountInput, SetLabelInput } from '../../types/exportedTypes/gitProvider';
|
|
2
|
+
import { SetIssueInput, SetStatusInput } from '../../types/exportedTypes/issueProvider';
|
|
3
|
+
import { JiraGetIssueInput, JiraProject, JiraResource, SetComponentInput } from '../../types/exportedTypes/jira';
|
|
4
|
+
import { Result } from '../../types/exportedTypes/types';
|
|
5
|
+
import { IssueProvider } from '../issueProvider';
|
|
4
6
|
import { Provider } from '../provider';
|
|
5
|
-
import { SetComponentInput } from './sharedTypes';
|
|
6
|
-
export interface JiraResource {
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
url: string;
|
|
10
|
-
avatarUrl: string;
|
|
11
|
-
}
|
|
12
|
-
export interface JiraProject {
|
|
13
|
-
id: string;
|
|
14
|
-
key: string;
|
|
15
|
-
name: string;
|
|
16
|
-
resourceId: string;
|
|
17
|
-
}
|
|
18
|
-
export interface JiraGetIssueInput {
|
|
19
|
-
resourceId: string;
|
|
20
|
-
number: string;
|
|
21
|
-
}
|
|
22
7
|
export declare class Jira extends Provider implements IssueProvider {
|
|
23
8
|
private _resourceUrlCache;
|
|
24
9
|
private getResourceUrl;
|
|
@@ -73,10 +58,10 @@ export declare class Jira extends Provider implements IssueProvider {
|
|
|
73
58
|
resourceId: string;
|
|
74
59
|
projectIdOrKey: string;
|
|
75
60
|
}, options?: EnterpriseOptions): Promise<{
|
|
76
|
-
data: import("
|
|
61
|
+
data: import("../../types/exportedTypes/jira").JiraComponent[];
|
|
77
62
|
}>;
|
|
78
63
|
getIssue(input: JiraGetIssueInput, options?: EnterpriseOptions): Promise<{
|
|
79
|
-
data: import("
|
|
64
|
+
data: import("../../types/exportedTypes/issueProvider").Issue;
|
|
80
65
|
}>;
|
|
81
66
|
getIssuesForProject(input: {
|
|
82
67
|
project: string;
|
|
@@ -85,7 +70,7 @@ export declare class Jira extends Provider implements IssueProvider {
|
|
|
85
70
|
authorLogin?: string;
|
|
86
71
|
mentionLogin?: string;
|
|
87
72
|
} & NumberedPageInput, options?: EnterpriseOptions): Promise<{
|
|
88
|
-
data: import("
|
|
73
|
+
data: import("../../types/exportedTypes/issueProvider").Issue[];
|
|
89
74
|
pageInfo: {
|
|
90
75
|
hasNextPage: boolean;
|
|
91
76
|
nextPage: number | null;
|
|
@@ -94,7 +79,7 @@ export declare class Jira extends Provider implements IssueProvider {
|
|
|
94
79
|
getIssuesForResourceForCurrentUser(input: {
|
|
95
80
|
resourceId: string;
|
|
96
81
|
} & NumberedPageInput, options?: EnterpriseOptions): Promise<{
|
|
97
|
-
data: import("
|
|
82
|
+
data: import("../../types/exportedTypes/issueProvider").Issue[];
|
|
98
83
|
pageInfo: {
|
|
99
84
|
hasNextPage: boolean;
|
|
100
85
|
nextPage: number | null;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { EnterpriseOptions, NumberedPageInput, SetLabelInput } from '../../types/exportedTypes/gitProvider';
|
|
2
|
+
import { Issue, IssueComponent, IssueTransition, SetIssueInput, SetStatusInput } from '../../types/exportedTypes/issueProvider';
|
|
3
|
+
import { JiraComponent, JiraUser, SetComponentInput } from '../../types/exportedTypes/jira';
|
|
4
|
+
import { ProviderConfig } from '../../types/exportedTypes/types';
|
|
5
|
+
import { JiraComponentStub, JiraIssue, JiraTransition } from '../../types/internalTypes/jira';
|
|
5
6
|
export declare const normalizeIssue: (issue: JiraIssue, resourceUrl: string | null, resourceId?: string) => Issue;
|
|
6
7
|
export declare const normalizeTransition: (transition: JiraTransition) => IssueTransition;
|
|
7
8
|
export declare const normalizeComponentStub: (component: JiraComponentStub) => IssueComponent;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { EnterpriseOptions, NumberedPageInput, SetLabelInput } from '
|
|
2
|
-
import {
|
|
3
|
-
import { SetComponentInput } from '
|
|
1
|
+
import { EnterpriseOptions, NumberedPageInput, SetLabelInput } from '../../types/exportedTypes/gitProvider';
|
|
2
|
+
import { SetIssueInput, SetStatusInput } from '../../types/exportedTypes/issueProvider';
|
|
3
|
+
import { SetComponentInput } from '../../types/exportedTypes/jira';
|
|
4
|
+
import { IssueProvider } from '../issueProvider';
|
|
4
5
|
import { EnterpriseProvider } from '../provider';
|
|
5
|
-
export interface JiraServerProject {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
}
|
|
9
6
|
export declare class JiraServer extends EnterpriseProvider implements IssueProvider {
|
|
10
7
|
getCurrentUser(options?: EnterpriseOptions): Promise<{
|
|
11
8
|
data: {
|
|
@@ -26,7 +23,7 @@ export declare class JiraServer extends EnterpriseProvider implements IssueProvi
|
|
|
26
23
|
getIssue(input: {
|
|
27
24
|
number: string;
|
|
28
25
|
}, options?: EnterpriseOptions): Promise<{
|
|
29
|
-
data: import("
|
|
26
|
+
data: import("../../types/exportedTypes/issueProvider").Issue;
|
|
30
27
|
}>;
|
|
31
28
|
getIssuesForProject(input: {
|
|
32
29
|
project: string;
|
|
@@ -34,14 +31,14 @@ export declare class JiraServer extends EnterpriseProvider implements IssueProvi
|
|
|
34
31
|
authorLogin?: string;
|
|
35
32
|
mentionLogin?: string;
|
|
36
33
|
} & NumberedPageInput, options?: EnterpriseOptions): Promise<{
|
|
37
|
-
data: import("
|
|
34
|
+
data: import("../../types/exportedTypes/issueProvider").Issue[];
|
|
38
35
|
pageInfo: {
|
|
39
36
|
hasNextPage: boolean;
|
|
40
37
|
nextPage: number | null;
|
|
41
38
|
};
|
|
42
39
|
}>;
|
|
43
40
|
getIssuesForResourceForCurrentUser(input: NumberedPageInput, options?: EnterpriseOptions): Promise<{
|
|
44
|
-
data: import("
|
|
41
|
+
data: import("../../types/exportedTypes/issueProvider").Issue[];
|
|
45
42
|
pageInfo: {
|
|
46
43
|
hasNextPage: boolean;
|
|
47
44
|
nextPage: number | null;
|
|
@@ -70,6 +67,6 @@ export declare class JiraServer extends EnterpriseProvider implements IssueProvi
|
|
|
70
67
|
getComponentsForJiraProject(input: {
|
|
71
68
|
projectIdOrKey: string;
|
|
72
69
|
}, options?: EnterpriseOptions): Promise<{
|
|
73
|
-
data: import("
|
|
70
|
+
data: import("../../types/exportedTypes/jira").JiraComponent[];
|
|
74
71
|
}>;
|
|
75
72
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnterpriseProviderConfigInit, ProviderConfig, ProviderConfigInit } from '../types';
|
|
1
|
+
import { EnterpriseProviderConfigInit, ProviderConfig, ProviderConfigInit } from '../types/exportedTypes/types';
|
|
2
2
|
export declare class Provider<Config extends ProviderConfigInit = ProviderConfigInit> {
|
|
3
3
|
protected config: ProviderConfig;
|
|
4
4
|
constructor(config?: Config);
|
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { EnterpriseOptions, SetAccountInput, SetLabelInput } from '../../types/exportedTypes/gitProvider';
|
|
2
|
+
import { Issue, SetIssueInput, SetStatusInput } from '../../types/exportedTypes/issueProvider';
|
|
3
|
+
import { TrelloBoard, TrelloList } from '../../types/exportedTypes/trello';
|
|
4
|
+
import { Result } from '../../types/exportedTypes/types';
|
|
5
|
+
import { IssueProvider } from '../issueProvider';
|
|
4
6
|
import { Provider } from '../provider';
|
|
5
|
-
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
|
-
}
|
|
23
|
-
export interface TrelloBoard {
|
|
24
|
-
id: string;
|
|
25
|
-
name: string;
|
|
26
|
-
}
|
|
27
7
|
export declare class Trello extends Provider implements IssueProvider {
|
|
28
8
|
getCurrentUser(input: {
|
|
29
9
|
appKey: string;
|
|
@@ -107,4 +87,3 @@ export declare class Trello extends Provider implements IssueProvider {
|
|
|
107
87
|
}[];
|
|
108
88
|
}>;
|
|
109
89
|
}
|
|
110
|
-
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { GetRepoInput, SetAccountInput, SetPullRequestInput } from './gitProvider';
|
|
2
|
+
import { SetIssueInput } from './issueProvider';
|
|
3
|
+
export interface WorkItemState {
|
|
4
|
+
category: 'Proposed' | 'InProgress' | 'Resolved' | 'Completed' | 'Removed';
|
|
5
|
+
color: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AzureGraphAccount {
|
|
9
|
+
avatarUrl: string | null;
|
|
10
|
+
descriptor: string;
|
|
11
|
+
email: string | null;
|
|
12
|
+
name: string;
|
|
13
|
+
storageKeyURL: string;
|
|
14
|
+
username: string;
|
|
15
|
+
}
|
|
16
|
+
export declare enum PullRequestAsyncStatus {
|
|
17
|
+
Conflicts = "conflicts",
|
|
18
|
+
Failure = "failure",
|
|
19
|
+
NotSet = "notSet",
|
|
20
|
+
Queued = "queued",
|
|
21
|
+
RejectedByPolicy = "rejectedByPolicy",
|
|
22
|
+
Succeeded = "succeeded"
|
|
23
|
+
}
|
|
24
|
+
export interface WorkItemTypeField {
|
|
25
|
+
helpText: string;
|
|
26
|
+
alwaysRequired: boolean;
|
|
27
|
+
referenceName: string;
|
|
28
|
+
name: string;
|
|
29
|
+
url: string;
|
|
30
|
+
}
|
|
31
|
+
export interface WorkItemTypeTransition {
|
|
32
|
+
to: string;
|
|
33
|
+
actions: string[] | null;
|
|
34
|
+
}
|
|
35
|
+
export interface WorkItemType {
|
|
36
|
+
name: string;
|
|
37
|
+
referenceName: string;
|
|
38
|
+
description: string;
|
|
39
|
+
color: string;
|
|
40
|
+
icon: {
|
|
41
|
+
id: string;
|
|
42
|
+
url: string;
|
|
43
|
+
};
|
|
44
|
+
isDisabled: boolean;
|
|
45
|
+
xmlForm: string;
|
|
46
|
+
fields: WorkItemTypeField[];
|
|
47
|
+
fieldInstances: WorkItemTypeField[];
|
|
48
|
+
transitions: {
|
|
49
|
+
[index: string]: WorkItemTypeTransition;
|
|
50
|
+
};
|
|
51
|
+
states: WorkItemState[];
|
|
52
|
+
url: string;
|
|
53
|
+
}
|
|
54
|
+
export interface AzureDevOpsProject {
|
|
55
|
+
namespace: string;
|
|
56
|
+
name: string;
|
|
57
|
+
}
|
|
58
|
+
export interface AzureGetRepoInput extends GetRepoInput {
|
|
59
|
+
project: string;
|
|
60
|
+
}
|
|
61
|
+
export interface AzureGetReposInput {
|
|
62
|
+
namespace: string;
|
|
63
|
+
project: string;
|
|
64
|
+
}
|
|
65
|
+
export interface AzureSetAccountInput extends SetAccountInput {
|
|
66
|
+
name: string;
|
|
67
|
+
}
|
|
68
|
+
export interface AzureSetIssueInput extends SetIssueInput {
|
|
69
|
+
project: {
|
|
70
|
+
namespace: string;
|
|
71
|
+
resourceId: null;
|
|
72
|
+
name: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export interface AzureSetPullRequestInput extends SetPullRequestInput {
|
|
76
|
+
repository: {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
project: string;
|
|
80
|
+
owner: {
|
|
81
|
+
login: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export interface AzureProject {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
namespace: string;
|
|
89
|
+
}
|
|
90
|
+
export interface AzureOrganization {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
}
|
|
94
|
+
export type StatusByWorkItemIdByStatusId = {
|
|
95
|
+
[workItemType: string]: {
|
|
96
|
+
[statusId: string]: {
|
|
97
|
+
title: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface RefreshTokenResponse {
|
|
2
|
+
access_token: string;
|
|
3
|
+
scopes: string;
|
|
4
|
+
token_type: string;
|
|
5
|
+
expires_in: number;
|
|
6
|
+
state: string;
|
|
7
|
+
refresh_token: string;
|
|
8
|
+
}
|
|
9
|
+
export interface BitbucketServerMergeStrategy {
|
|
10
|
+
description: string;
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
flag: string;
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
@@ -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
|
+
}
|