@gitkraken/provider-apis 0.14.1 → 0.15.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.
@@ -0,0 +1,4 @@
1
+ import { GitPullRequestReviewState } from '../providers/gitProvider';
2
+ export declare const summarizeReviewDecision: (reviews: {
3
+ state: GitPullRequestReviewState;
4
+ }[] | null) => GitPullRequestReviewState | null;
@@ -28,13 +28,14 @@ export type StatusByWorkItemIdByStatusId = {
28
28
  };
29
29
  export declare class AzureDevOps extends Provider implements GitProvider {
30
30
  /** Note: PATs are not supported for this function, only OAuth tokens are. */
31
- getCurrentUser(options?: EnterpriseOptions): Promise<{
31
+ getCurrentUser(input?: Record<string, never>, options?: EnterpriseOptions): Promise<{
32
32
  data: {
33
33
  id: string;
34
34
  name: string;
35
35
  username: string;
36
36
  email: string;
37
37
  avatarUrl: null;
38
+ url: null;
38
39
  };
39
40
  }>;
40
41
  getCurrentUserForInstance(input: {
@@ -146,6 +147,29 @@ export declare class AzureDevOps extends Provider implements GitProvider {
146
147
  }, options?: EnterpriseOptions): Promise<{
147
148
  data: GitPullRequest[];
148
149
  }>;
150
+ private getPullRequestsForProjectBase;
151
+ getPullRequestsForProject(input: {
152
+ namespace: string;
153
+ project: string;
154
+ assigneeLogins?: string[];
155
+ authorLogin?: string;
156
+ } & NumberedPageInput, options?: EnterpriseOptions): Promise<{
157
+ pageInfo: {
158
+ hasNextPage: boolean;
159
+ nextPage: number;
160
+ };
161
+ data: GitPullRequest[];
162
+ }>;
163
+ getPullRequestsForProjects(input: {
164
+ projects: {
165
+ namespace: string;
166
+ project: string;
167
+ }[];
168
+ assigneeLogins?: string[];
169
+ authorLogin?: string;
170
+ }, options?: EnterpriseOptions): Promise<{
171
+ data: GitPullRequest[];
172
+ }>;
149
173
  getAzurePullRequestLastMergeStatus(input: {
150
174
  repo: GetRepoInput;
151
175
  pullRequestId: string;
@@ -226,7 +226,9 @@ export interface WorkItemType {
226
226
  xmlForm: string;
227
227
  fields: WorkItemTypeField[];
228
228
  fieldInstances: WorkItemTypeField[];
229
- transitions: [string: WorkItemTypeTransition];
229
+ transitions: {
230
+ [index: string]: WorkItemTypeTransition;
231
+ };
230
232
  states: WorkItemState[];
231
233
  url: string;
232
234
  }
@@ -15,7 +15,7 @@ export declare class Bitbucket extends Provider implements GitProvider {
15
15
  }): Promise<{
16
16
  data: RefreshTokenResponse;
17
17
  }>;
18
- getCurrentUser(options?: Options): Promise<{
18
+ getCurrentUser(input?: Record<string, never>, options?: Options): Promise<{
19
19
  data: Account;
20
20
  }>;
21
21
  getUserForCommit(input: {
@@ -1,4 +1,4 @@
1
- import { EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitProvider, GitRepository } from '../gitProvider';
1
+ import { EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitProvider, GitPullRequest, GitRepository, NumberedPageInput } from '../gitProvider';
2
2
  import { EnterpriseProvider } from '../provider';
3
3
  import { BitbucketServerMergeStrategy } from './bitbucketServerTypes';
4
4
  export declare class BitbucketServer extends EnterpriseProvider implements GitProvider {
@@ -20,6 +20,30 @@ export declare class BitbucketServer extends EnterpriseProvider implements GitPr
20
20
  data: GitRepository[];
21
21
  errors: GetRepoErrorData[];
22
22
  }>;
23
+ private getPullRequestsForRepoBase;
24
+ getPullRequestsForRepo(input: {
25
+ repo: GetRepoInput;
26
+ authorLogin?: string;
27
+ } & NumberedPageInput, options?: EnterpriseOptions): Promise<{
28
+ pageInfo: {
29
+ hasNextPage: boolean;
30
+ nextPage: number | null;
31
+ };
32
+ data: GitPullRequest[];
33
+ }>;
34
+ getPullRequestsForRepos(input: {
35
+ repos: GetRepoInput[];
36
+ authorLogin?: string;
37
+ }, options?: EnterpriseOptions): Promise<{
38
+ data: GitPullRequest[];
39
+ }>;
40
+ getPullRequestsForCurrentUser(input: NumberedPageInput, options?: EnterpriseOptions): Promise<{
41
+ pageInfo: {
42
+ hasNextPage: boolean;
43
+ nextPage: number | null;
44
+ };
45
+ data: GitPullRequest[];
46
+ }>;
23
47
  closePullRequest(input: {
24
48
  repo: GetRepoInput;
25
49
  pullRequestId: string;
@@ -11,3 +11,92 @@ export interface BitbucketServerMergeStrategy {
11
11
  id: string;
12
12
  name: string;
13
13
  }
14
+ export interface BitbucketServerPagedResponse<T> {
15
+ values: T[];
16
+ size: number;
17
+ limit: number;
18
+ isLastPage: boolean;
19
+ nextPageStart: number;
20
+ start: number;
21
+ }
22
+ export interface BitbucketServerPullRequestRef {
23
+ id: string;
24
+ displayId: string;
25
+ latestCommit: string;
26
+ type: string;
27
+ repository: {
28
+ slug: string;
29
+ id: number;
30
+ name: string;
31
+ hierarchyId: string;
32
+ scmId: string;
33
+ state: string;
34
+ statusMessage: string;
35
+ forkable: boolean;
36
+ project: {
37
+ key: string;
38
+ id: number;
39
+ name: string;
40
+ public: boolean;
41
+ type: string;
42
+ links: {
43
+ self: Link[];
44
+ };
45
+ };
46
+ public: boolean;
47
+ archived: boolean;
48
+ links: {
49
+ clone: NamedLink[];
50
+ self: Link[];
51
+ };
52
+ };
53
+ }
54
+ export interface BitbucketServerUser {
55
+ name: string;
56
+ emailAddress: string;
57
+ active: boolean;
58
+ displayName: string;
59
+ id: number;
60
+ slug: string;
61
+ type: string;
62
+ links: {
63
+ self: Link[];
64
+ };
65
+ }
66
+ export interface BitbucketServerPullRequestUser {
67
+ user: BitbucketServerUser;
68
+ lastReviewedCommit?: string;
69
+ role: 'REVIEWER' | 'AUTHOR' | 'PARTICIPANT';
70
+ approved: boolean;
71
+ status: 'UNAPPROVED' | 'NEEDS_WORK' | 'APPROVED';
72
+ }
73
+ export interface BitbucketServerPullRequest {
74
+ id: number;
75
+ version: number;
76
+ title: string;
77
+ description: string;
78
+ state: 'OPEN' | 'MERGED' | 'DECLINED';
79
+ open: boolean;
80
+ closed: boolean;
81
+ createdDate: number;
82
+ updatedDate: number;
83
+ closedDate: number | null;
84
+ fromRef: BitbucketServerPullRequestRef;
85
+ toRef: BitbucketServerPullRequestRef;
86
+ locked: boolean;
87
+ author: BitbucketServerPullRequestUser;
88
+ reviewers: BitbucketServerPullRequestUser[];
89
+ participants: BitbucketServerPullRequestUser[];
90
+ properties: {
91
+ mergeResult: {
92
+ outcome: string;
93
+ current: boolean;
94
+ };
95
+ resolvedTaskCount: number;
96
+ commentCount: number;
97
+ openTaskCount: number;
98
+ };
99
+ links: {
100
+ self: Link[];
101
+ };
102
+ }
@@ -15,6 +15,7 @@ export interface Account extends User {
15
15
  id: string;
16
16
  graphQLId?: string;
17
17
  username: string | null;
18
+ url: string | null;
18
19
  }
19
20
  export interface Organization {
20
21
  id: string;
@@ -60,10 +61,12 @@ export declare enum GitLabCiJobStatus {
60
61
  WaitingForResource = "WAITING_FOR_RESOURCE"
61
62
  }
62
63
  export interface GitBuildStatus {
64
+ completedAt: Date | null;
63
65
  description: string | null;
64
66
  name: string | null;
65
67
  state: GitHubCheckRunState | GitHubStatusState | GitLabCiJobStatus | null;
66
68
  stage: GitBuildStatusStage | null;
69
+ startedAt: Date | null;
67
70
  url: string;
68
71
  }
69
72
  export interface GitLabel {
@@ -159,6 +162,7 @@ export interface GitPullRequest {
159
162
  createdDate: Date;
160
163
  updatedDate: Date;
161
164
  closedDate: Date | null;
165
+ mergedDate: Date | null;
162
166
  baseRef: GitRefWithOID | null;
163
167
  headRef: GitRefWithOID | null;
164
168
  commentCount: number | null;
@@ -173,21 +177,32 @@ export interface GitPullRequest {
173
177
  reviewer: Account;
174
178
  state: GitPullRequestReviewState;
175
179
  }[] | null;
180
+ reviewDecision: GitPullRequestReviewState | null;
176
181
  repository: {
182
+ id: string;
183
+ graphQLId?: string;
177
184
  name: string;
185
+ project?: string;
178
186
  owner: {
179
187
  login?: string;
180
188
  };
189
+ remoteInfo: {
190
+ cloneUrlHTTPS: string;
191
+ cloneUrlSSH: string;
192
+ } | null;
181
193
  };
182
194
  headRepository: {
195
+ id: string;
196
+ graphQLId?: string;
183
197
  name: string;
198
+ project?: string;
184
199
  owner: {
185
200
  login: string;
186
201
  };
187
202
  remoteInfo: {
188
203
  cloneUrlHTTPS: string;
189
204
  cloneUrlSSH: string;
190
- };
205
+ } | null;
191
206
  } | null;
192
207
  headCommit: {
193
208
  buildStatuses: GitBuildStatus[] | null;
@@ -196,6 +211,35 @@ export interface GitPullRequest {
196
211
  milestone?: GitMilestone | null;
197
212
  labels?: GitLabel[];
198
213
  }
214
+ export interface GitComment {
215
+ author: Account | User | null;
216
+ body: string;
217
+ createdAt: Date | null;
218
+ id: string;
219
+ graphQLId?: string;
220
+ url: string;
221
+ }
222
+ export declare enum GitDiffLineType {
223
+ ADDED = "ADDED",
224
+ DELETED = "DELETED",
225
+ UNMODIFIED = "UNMODIFIED"
226
+ }
227
+ export interface GitDiffLine {
228
+ line: string;
229
+ oldLineNumber: number | null;
230
+ newLineNumber: number | null;
231
+ type: GitDiffLineType;
232
+ }
233
+ export interface GitPullRequestReviewComment extends GitComment {
234
+ diffLines: GitDiffLine[];
235
+ filename: string;
236
+ replies: GitComment[];
237
+ isOutdated: boolean;
238
+ isResolved: boolean;
239
+ }
240
+ export interface GitPullRequestReview extends GitComment {
241
+ reviewComments: GitPullRequestReviewComment[];
242
+ }
199
243
  export interface GetRepoInput {
200
244
  namespace: string;
201
245
  name: string;
@@ -219,7 +263,7 @@ export interface GetRepoErrorData {
219
263
  error?: Error;
220
264
  }
221
265
  export interface GitProvider {
222
- getCurrentUser?(options: Options): Promise<Result<Account>>;
266
+ getCurrentUser?(input: Record<string, never>, options: Options): Promise<Result<Account>>;
223
267
  getUserForCommit?(input: {
224
268
  repo: GetRepoInput;
225
269
  oid: string;
@@ -1,13 +1,17 @@
1
- import { Account, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitProvider, GitPullRequest, GitRepository, Organization } from '../gitProvider';
1
+ import { Account, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitProvider, GitPullRequest, GitPullRequestReviewComment, GitRepository, Organization } from '../gitProvider';
2
2
  import { Issue } from '../issueProvider';
3
3
  import { EnterpriseProvider } from '../provider';
4
4
  import { FetchIssuesData, FetchPullRequestsData } from './githubTypes';
5
5
  export declare class GitHub extends EnterpriseProvider implements GitProvider {
6
6
  private _scopesCache;
7
+ private _enterpriseVersionsCache;
7
8
  private getScopes;
9
+ private getEnterpriseVersion;
8
10
  private getEnterpriseAvatarUrlIfNeeded;
9
- getCurrentUser(options?: EnterpriseOptions): Promise<{
10
- data: Account;
11
+ getCurrentUser<F extends keyof Account>(input?: {
12
+ fields?: F[];
13
+ }, options?: EnterpriseOptions): Promise<{
14
+ data: Pick<Account, F>;
11
15
  }>;
12
16
  getAccountsForRepo(input: {
13
17
  repo: GetRepoInput;
@@ -16,7 +20,7 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider {
16
20
  endCursor: string | null;
17
21
  hasNextPage: boolean;
18
22
  };
19
- data: Account[];
23
+ data: Pick<Account, keyof Account>[];
20
24
  }>;
21
25
  getUserForCommit(input: {
22
26
  repo: GetRepoInput;
@@ -36,13 +40,13 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider {
36
40
  email: string;
37
41
  avatarSize?: number;
38
42
  }, options?: EnterpriseOptions): Promise<{
39
- data: Account;
43
+ data: Pick<Account, keyof Account>;
40
44
  }>;
41
45
  getAccountForUsername(input: {
42
46
  username: string;
43
47
  avatarSize?: number;
44
48
  }, options?: EnterpriseOptions): Promise<{
45
- data: Account;
49
+ data: Pick<Account, keyof Account>;
46
50
  }>;
47
51
  getOrgsForCurrentUser(input?: CursorPageInput, options?: EnterpriseOptions): Promise<{
48
52
  pageInfo: {
@@ -212,6 +216,24 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider {
212
216
  pullRequestGraphQLId: string;
213
217
  assigneeGraphQLIds: string[];
214
218
  }, options?: EnterpriseOptions): Promise<void>;
219
+ getReviewsForPullRequest(input: {
220
+ repo: GetRepoInput;
221
+ pullRequestId: number;
222
+ }, options?: EnterpriseOptions): Promise<{
223
+ data: {
224
+ author: {
225
+ avatarUrl: string;
226
+ email: null;
227
+ name: string;
228
+ } | null;
229
+ body: string;
230
+ createdAt: Date | null;
231
+ id: string;
232
+ graphQLId: string;
233
+ reviewComments: GitPullRequestReviewComment[];
234
+ url: string;
235
+ }[];
236
+ }>;
215
237
  /**
216
238
  * Returns issues that were created by or are assigned to the user.
217
239
  */
@@ -1,17 +1,24 @@
1
- import { GraphQLBody, GraphQLError, GraphQLResponse, ProviderConfig } from '../../types';
2
- import { EnterpriseOptions } from '../gitProvider';
1
+ import { FieldMap, GraphQLBody, GraphQLError, GraphQLResponse, ProviderConfig } from '../../types';
2
+ import { Account, EnterpriseOptions, GitDiffLineType } from '../gitProvider';
3
3
  export declare const GITHUB_API_URL = "https://api.github.com";
4
4
  export declare const GITHUB_GRAPHQL_API_URL: string;
5
5
  export declare const GRAPHQL_MILESTONE_FIELDS = "\ndescription\ndueOn\nid\nnumber\nstate\ntitle\nurl\n";
6
6
  export declare const GRAPHQL_LABEL_FIELDS = "\ncolor\ndescription\nid\nname\n";
7
7
  export declare const getGraphQLEndpoint: (config: ProviderConfig, options: EnterpriseOptions) => string;
8
+ export declare const getRESTBaseUrl: (config: ProviderConfig, options: EnterpriseOptions) => string;
8
9
  export declare const makeGitHubGraphQLRequest: <T>(config: ProviderConfig, data: GraphQLBody, options: EnterpriseOptions) => Promise<import("../../types").Response<GraphQLResponse<T>>>;
9
10
  export declare const hasEmailScope: (scopes: string[]) => boolean;
10
- export declare const getAccountFields: (withAvatarSizeVar?: boolean, includeEmail?: boolean) => string;
11
+ export declare const getAccountFields: (withAvatarSizeVar?: boolean, includeEmail?: boolean, fields?: FieldMap<Account>) => string;
11
12
  export declare const getBotFields: (withAvatarSizeVar?: boolean) => string;
12
- export declare const getPullRequestFields: (isDraftPullRequestSupported: boolean, includeEmail?: boolean) => string;
13
+ export declare const getPullRequestFields: (isDraftPullRequestSupported: boolean, includeEmail: boolean | undefined, supportsEnterpriseVersion3: boolean) => string;
13
14
  export declare const getIssueFields: (includeEmail?: boolean) => string;
14
15
  export declare const GithubSearchSyntaxQualifiers: Record<string, string>;
15
16
  export declare const getProjectGithubSearchSyntax: (search: string) => string[];
16
- export declare const makeSearchIssuesOrPRsGraphQLBody: (type: 'issue' | 'pr', query: string, cursor: string | null | undefined, supportsEmail: boolean, supportsDrafts?: boolean) => GraphQLBody;
17
+ export declare const makeSearchIssuesOrPRsGraphQLBody: (type: 'issue' | 'pr', query: string, cursor: string | null | undefined, supportsEmail: boolean, supportsDrafts?: boolean, supportsEnterpriseVersion3?: boolean) => GraphQLBody;
17
18
  export declare const hasDraftsNotSupportedError: (errors?: GraphQLError[]) => boolean;
19
+ export declare const getDiffLinesFromDiffHunk: (diffHunk: string, originalLine: number | null, originalStartLine: number | null, startDiffSide: 'LEFT' | 'RIGHT' | null) => {
20
+ line: string;
21
+ oldLineNumber: number | null;
22
+ newLineNumber: number | null;
23
+ type: GitDiffLineType;
24
+ }[];
@@ -49,6 +49,7 @@ export interface GraphQLUser {
49
49
  login: string;
50
50
  email?: string;
51
51
  avatarUrl: string;
52
+ url: string;
52
53
  }
53
54
  export interface GraphQLBot {
54
55
  __typename: 'Bot';
@@ -56,6 +57,7 @@ export interface GraphQLBot {
56
57
  databaseId: number;
57
58
  login: string;
58
59
  avatarUrl: string;
60
+ url: string;
59
61
  }
60
62
  export interface GraphQLOrganization {
61
63
  id: string;
@@ -67,12 +69,15 @@ export interface GraphQLOrganization {
67
69
  }
68
70
  export type PullRequestState = 'OPEN' | 'CLOSED' | 'MERGED';
69
71
  export interface GraphQLCheckRun {
72
+ completedAt: string | null;
70
73
  name: string;
71
- status: GitHubCheckRunState;
72
74
  permalink: string;
75
+ startedAt: string | null;
76
+ status: GitHubCheckRunState;
73
77
  }
74
78
  export interface GraphQLContext {
75
79
  context: string;
80
+ createdAt: string;
76
81
  description: string;
77
82
  state: GitHubStatusState;
78
83
  targetUrl: string;
@@ -91,6 +96,7 @@ export interface GraphQLPullRequest {
91
96
  };
92
97
  createdAt: string;
93
98
  closedAt: string | null;
99
+ mergedAt: string | null;
94
100
  isDraft: boolean;
95
101
  changedFiles: number;
96
102
  additions: number;
@@ -126,6 +132,8 @@ export interface GraphQLPullRequest {
126
132
  } | null;
127
133
  } | null;
128
134
  headRepository: {
135
+ id: string;
136
+ databaseId: string;
129
137
  name: string;
130
138
  owner: {
131
139
  login: string;
@@ -134,18 +142,22 @@ export interface GraphQLPullRequest {
134
142
  url: string;
135
143
  };
136
144
  repository: {
145
+ id: string;
146
+ databaseId: string;
137
147
  name: string;
138
148
  owner: {
139
149
  login: string;
140
150
  };
151
+ sshUrl: string;
152
+ url: string;
141
153
  };
142
154
  reviewRequests: {
143
155
  nodes: {
144
- asCodeOwner: boolean;
145
- requestedReviewer: GraphQLUser;
156
+ asCodeOwner?: boolean;
157
+ requestedReviewer: GraphQLUser | Record<string, never> | null;
146
158
  }[] | null;
147
159
  } | null;
148
- latestReviews: {
160
+ latestReviews?: {
149
161
  nodes: {
150
162
  author: GraphQLUser;
151
163
  state: GitHubPullRequestReviewState;
@@ -176,6 +188,7 @@ export interface GraphQLIssue {
176
188
  nodes: GraphQLUser[] | null;
177
189
  };
178
190
  author: GraphQLUser | GraphQLBot | Record<string, never> | null;
191
+ closedAt: string | null;
179
192
  createdAt: string;
180
193
  updatedAt: string;
181
194
  comments: {
@@ -216,3 +229,29 @@ export interface FetchIssuesData {
216
229
  mentionLogin?: string;
217
230
  startQuery?: string;
218
231
  }
232
+ export interface GraphQLReviewThread {
233
+ comments: {
234
+ nodes: GraphQLReviewComment[];
235
+ };
236
+ isOutdated: boolean;
237
+ isResolved: boolean;
238
+ originalLine: number | null;
239
+ originalStartLine: number | null;
240
+ startDiffSide: 'LEFT' | 'RIGHT' | null;
241
+ }
242
+ export interface GraphQLReviewComment {
243
+ author: {
244
+ avatarUrl: string;
245
+ login: string;
246
+ } | null;
247
+ body: string;
248
+ databaseId: string;
249
+ diffHunk: string;
250
+ id: string;
251
+ path: string;
252
+ publishedAt: string | null;
253
+ pullRequestReview: {
254
+ id: string;
255
+ } | null;
256
+ url: string;
257
+ }
@@ -4,7 +4,8 @@ import { EnterpriseProvider } from '../provider';
4
4
  export type PullRequestState = 'opened' | 'merged' | 'closed';
5
5
  export type PullRequestAssociation = 'assigned' | 'authored' | 'reviewRequested';
6
6
  export declare class GitLab extends EnterpriseProvider implements GitProvider, IssueProvider {
7
- getCurrentUser(options?: EnterpriseOptions): Promise<{
7
+ private getIsSelfHosted;
8
+ getCurrentUser(input?: Record<string, never>, options?: EnterpriseOptions): Promise<{
8
9
  data: Account;
9
10
  }>;
10
11
  getUserForCommit(input: {
@@ -27,6 +27,7 @@ export interface Issue {
27
27
  author: Account | null;
28
28
  assignees: Account[];
29
29
  commentCount: number | null;
30
+ closedDate: Date | null;
30
31
  createdDate: Date;
31
32
  description: string | null;
32
33
  graphQLId?: string;
@@ -1,40 +1,6 @@
1
1
  import { Result } from '../../types';
2
2
  import { CursorPageInput, EnterpriseOptions } from '../gitProvider';
3
- import { Issue } from '../issueProvider';
4
3
  import { Provider } from '../provider';
5
- interface AvatarUrls {
6
- '16x16': string;
7
- '24x24': string;
8
- '32x32': string;
9
- '48x48': string;
10
- }
11
- interface JiraUser {
12
- accountId: string;
13
- accountType: string;
14
- active: boolean;
15
- avatarUrls: AvatarUrls;
16
- displayName: string;
17
- emailAddress: string;
18
- self: string;
19
- timeZone: string;
20
- }
21
- interface JiraComponent {
22
- ari?: string;
23
- assignee?: JiraUser;
24
- assigneeType: string;
25
- description?: string;
26
- id: string;
27
- isAssigneeTypeValid: boolean;
28
- lead?: JiraUser;
29
- leadUserName?: string;
30
- metadata?: unknown;
31
- name: string;
32
- project: string;
33
- projectId: string;
34
- realAssignee?: JiraUser;
35
- realAssigneeType: string;
36
- self: string;
37
- }
38
4
  export interface JiraResource {
39
5
  id: string;
40
6
  name: string;
@@ -59,6 +25,7 @@ export declare class Jira extends Provider {
59
25
  avatarUrl: string;
60
26
  id: string;
61
27
  username: string;
28
+ url: string | null;
62
29
  };
63
30
  }>;
64
31
  getJiraResourcesForCurrentUser(options?: EnterpriseOptions): Promise<Result<JiraResource[]>>;
@@ -93,13 +60,14 @@ export declare class Jira extends Provider {
93
60
  email: string;
94
61
  avatarUrl: string;
95
62
  username: string;
63
+ url: string;
96
64
  }[];
97
65
  }>;
98
66
  getComponentsForJiraProject(input: {
99
67
  resourceId: string;
100
68
  projectIdOrKey: string;
101
69
  }, options?: EnterpriseOptions): Promise<{
102
- data: JiraComponent[];
70
+ data: import("./sharedTypes").JiraComponent[];
103
71
  }>;
104
72
  getIssuesForProject(input: {
105
73
  project: string;
@@ -108,7 +76,7 @@ export declare class Jira extends Provider {
108
76
  authorLogin?: string;
109
77
  mentionLogin?: string;
110
78
  }, options?: EnterpriseOptions): Promise<{
111
- data: Issue[];
79
+ data: import("../issueProvider").Issue[];
112
80
  }>;
113
81
  setIssueStatus(input: {
114
82
  resourceId: string;
@@ -145,4 +113,3 @@ export declare class Jira extends Provider {
145
113
  }[];
146
114
  }>;
147
115
  }
148
- export {};
@@ -0,0 +1,46 @@
1
+ import { ProviderConfig } from '../../types';
2
+ import { EnterpriseOptions } from '../gitProvider';
3
+ import { Issue, IssueComponent, IssueTransition } from '../issueProvider';
4
+ import { JiraComponent, JiraComponentStub, JiraIssue, JiraTransition, JiraUser } from './sharedTypes';
5
+ export declare const normalizeIssue: (issue: JiraIssue, resourceUrl: string | null, isServer: boolean) => Issue;
6
+ export declare const normalizeTransition: (transition: JiraTransition) => IssueTransition;
7
+ export declare const normalizeComponentStub: (component: JiraComponentStub) => IssueComponent;
8
+ export declare const normalizeUserURL: (user: JiraUser, resourceUrl: string | null, isServer: boolean) => string;
9
+ export declare const normalizeUser: (user: JiraUser, resourceUrl: string | null, isServer: boolean) => {
10
+ id: string;
11
+ name: string;
12
+ email: string;
13
+ avatarUrl: string;
14
+ username: string;
15
+ url: string;
16
+ };
17
+ export declare const getIssuesForProject: (config: ProviderConfig, input: {
18
+ resourceId?: string;
19
+ project: string;
20
+ assigneeLogins?: string[];
21
+ authorLogin?: string;
22
+ mentionLogin?: string;
23
+ }, resourceUrl: string | null, options?: EnterpriseOptions) => Promise<{
24
+ data: Issue[];
25
+ }>;
26
+ export declare const setIssueLabels: (config: ProviderConfig, input: {
27
+ resourceId?: string;
28
+ issueId: string;
29
+ labelNames: string[];
30
+ }, options?: EnterpriseOptions) => Promise<void>;
31
+ export declare const setIssueComponents: (config: ProviderConfig, input: {
32
+ resourceId?: string;
33
+ issueId: string;
34
+ componentIds: string[];
35
+ }, options?: EnterpriseOptions) => Promise<void>;
36
+ export declare const setIssueStatus: (config: ProviderConfig, input: {
37
+ resourceId?: string;
38
+ issueId: string;
39
+ status: string;
40
+ }, options?: EnterpriseOptions) => Promise<void>;
41
+ export declare const getComponentsForJiraProject: (config: ProviderConfig, input: {
42
+ resourceId?: string;
43
+ projectIdOrKey: string;
44
+ }, options?: EnterpriseOptions) => Promise<{
45
+ data: JiraComponent[];
46
+ }>;