@gitkraken/provider-apis 0.19.1 → 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.
Files changed (40) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/defaults.d.ts +1 -1
  3. package/dist/fetchWrapper.d.ts +1 -1
  4. package/dist/index.d.ts +11 -13
  5. package/dist/index.js +116 -147
  6. package/dist/providerUtils/gitProvider.d.ts +20 -3
  7. package/dist/providerUtils/shared.d.ts +1 -1
  8. package/dist/providers/azureDevops/azureDevOps.d.ts +7 -53
  9. package/dist/providers/azureDevops/azureDevOpsHelpers.d.ts +3 -3
  10. package/dist/providers/bitbucket/bitbucket.d.ts +4 -11
  11. package/dist/providers/bitbucket/bitbucketHelpers.d.ts +2 -2
  12. package/dist/providers/bitbucketServer/bitbucketServer.d.ts +4 -4
  13. package/dist/providers/gitProvider.d.ts +3 -306
  14. package/dist/providers/github/github.d.ts +5 -3
  15. package/dist/providers/github/githubHelpers.d.ts +3 -3
  16. package/dist/providers/gitlab/gitlab.d.ts +6 -15
  17. package/dist/providers/gitlab/gitlabHelpers.d.ts +3 -3
  18. package/dist/providers/issueProvider.d.ts +3 -91
  19. package/dist/providers/jira/jira.d.ts +9 -24
  20. package/dist/providers/jira/{sharedHelpers.d.ts → jiraHelpers.d.ts} +5 -4
  21. package/dist/providers/{jiraServer → jira}/jiraServer.d.ts +8 -11
  22. package/dist/providers/provider.d.ts +1 -1
  23. package/dist/providers/trello/trello.d.ts +5 -26
  24. package/dist/types/exportedTypes/azureDevOps.d.ts +100 -0
  25. package/dist/types/exportedTypes/bitbucket.d.ts +15 -0
  26. package/dist/types/exportedTypes/gitProvider.d.ts +301 -0
  27. package/dist/types/exportedTypes/github.d.ts +23 -0
  28. package/dist/types/exportedTypes/gitlab.d.ts +7 -0
  29. package/dist/types/exportedTypes/issueProvider.d.ts +90 -0
  30. package/dist/types/exportedTypes/jira.d.ts +58 -0
  31. package/dist/types/exportedTypes/trello.d.ts +22 -0
  32. package/dist/{types.d.ts → types/exportedTypes/types.d.ts} +44 -3
  33. package/dist/{providers/azureDevops/azureDevOpsTypes.d.ts → types/internalTypes/azureDevOps.d.ts} +0 -51
  34. package/dist/{providers/bitbucketServer/bitbucketServerTypes.d.ts → types/internalTypes/bitbucketServer.d.ts} +0 -7
  35. package/dist/{providers/github/githubTypes.d.ts → types/internalTypes/github.d.ts} +0 -23
  36. package/dist/{providers/jira/sharedTypes.d.ts → types/internalTypes/jira.d.ts} +1 -38
  37. package/dist/utils.d.ts +3 -3
  38. package/package.json +1 -1
  39. /package/dist/{providers/bitbucket/bitbucketTypes.d.ts → types/internalTypes/bitbucket.d.ts} +0 -0
  40. /package/dist/{providers/gitlab/gitlabTypes.d.ts → types/internalTypes/gitlab.d.ts} +0 -0
@@ -1,5 +1,6 @@
1
- import { type Account, type GitPullRequest } from '../providers/gitProvider';
2
- import type { PullRequestBuckets } from '../types';
1
+ import { type Account } from '../types/exportedTypes/gitProvider';
2
+ import type { ActionablePullRequest, EnrichedItemsByUniqueId, PullRequestBuckets, PullRequestWithUniqueID } from '../types/exportedTypes/types';
3
+ export declare const PINNED_BUCKET_ID = "pinned";
3
4
  export declare const READY_TO_MERGE_BUCKET_ID = "readyToMerge";
4
5
  export declare const UNASSIGNED_REVIEWERS_BUCKET_ID = "unassignedReviewers";
5
6
  export declare const FAILING_CI_BUCKET_ID = "failingCI";
@@ -10,4 +11,20 @@ export declare const REVIEWER_COMMENTED_BUCKET_ID = "reviewerCommented";
10
11
  export declare const WAITING_FOR_REVIEW_BUCKET_ID = "waitingForReview";
11
12
  export declare const DRAFT_BUCKET_ID = "draft";
12
13
  export declare const OTHER_BUCKET_ID = "other";
13
- export declare const groupPullRequestsIntoBuckets: (pullRequests: GitPullRequest[], currentUser: Pick<Account, 'id'>) => PullRequestBuckets;
14
+ export declare const SNOOZED_BUCKET_ID = "snoozed";
15
+ export declare const READY_TO_MERGE_ACTION_CATEGORY = "readyToMerge";
16
+ export declare const UNASSIGNED_REVIEWERS_ACTION_CATEGORY = "unassignedReviewers";
17
+ export declare const FAILING_CI_ACTION_CATEGORY = "failingCI";
18
+ export declare const CONFLICTS_ACTION_CATEGORY = "conflicts";
19
+ export declare const NEEDS_MY_REVIEW_ACTION_CATEGORY = "needsMyReview";
20
+ export declare const CHANGES_REQUESTED_ACTION_CATEGORY = "changesRequested";
21
+ export declare const REVIEWER_COMMENTED_ACTION_CATEGORY = "reviewerCommented";
22
+ export declare const WAITING_FOR_REVIEW_ACTION_CATEGORY = "waitingForReview";
23
+ export declare const DRAFT_ACTION_CATEGORY = "draft";
24
+ export declare const OTHER_ACTION_CATEGORY = "other";
25
+ export declare const getActionablePullRequests: (pullRequests: PullRequestWithUniqueID[], currentUser: Pick<Account, 'id'>, options?: {
26
+ enrichedItemsByUniqueId?: EnrichedItemsByUniqueId;
27
+ }) => ActionablePullRequest[];
28
+ export declare const groupPullRequestsIntoBuckets: (pullRequests: PullRequestWithUniqueID[], currentUser: Pick<Account, 'id'>, options?: {
29
+ enrichedItemsByUniqueId?: EnrichedItemsByUniqueId;
30
+ }) => PullRequestBuckets;
@@ -1,4 +1,4 @@
1
- import { GitPullRequestReviewState } from '../providers/gitProvider';
1
+ import { GitPullRequestReviewState } from '../types/exportedTypes/gitProvider';
2
2
  export declare const summarizeReviewDecision: (reviews: {
3
3
  state: GitPullRequestReviewState;
4
4
  }[] | null) => GitPullRequestReviewState | null;
@@ -1,55 +1,10 @@
1
- import { PagedResult, Result } from '../../types';
2
- import { CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitMergeStrategy, GitProvider, GitPullRequest, GitRepository, NumberedPageInput, Options, SetAccountInput, SetLabelInput, SetPullRequestInput } from '../gitProvider';
3
- import { Issue, IssueProvider, SetIssueInput, SetStatusInput } from '../issueProvider';
1
+ import { AzureGetRepoInput, AzureGetReposInput, AzureGraphAccount, AzureOrganization, AzureProject, AzureSetAccountInput, AzureSetIssueInput, AzureSetPullRequestInput, PullRequestAsyncStatus, StatusByWorkItemIdByStatusId, WorkItemType } from '../../types/exportedTypes/azureDevOps';
2
+ import { CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GetReposInput, GitMergeStrategy, GitPullRequest, GitRepository, NumberedPageInput, Options, SetAccountInput, SetLabelInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
3
+ import { Issue, SetStatusInput } from '../../types/exportedTypes/issueProvider';
4
+ import { PagedResult, Result } from '../../types/exportedTypes/types';
5
+ import { GitProvider } from '../gitProvider';
6
+ import { IssueProvider } from '../issueProvider';
4
7
  import { Provider } from '../provider';
5
- import { AzureGraphAccount, PullRequestAsyncStatus, WorkItemType } from './azureDevOpsTypes';
6
- export interface AzureDevOpsProject {
7
- namespace: string;
8
- name: string;
9
- }
10
- export interface AzureGetRepoInput extends GetRepoInput {
11
- project: string;
12
- }
13
- export interface AzureGetReposInput {
14
- namespace: string;
15
- project: string;
16
- }
17
- export interface AzureSetAccountInput extends SetAccountInput {
18
- name: string;
19
- }
20
- export interface AzureSetIssueInput extends SetIssueInput {
21
- project: {
22
- namespace: string;
23
- resourceId: null;
24
- name: string;
25
- };
26
- }
27
- export interface AzureSetPullRequestInput extends SetPullRequestInput {
28
- repository: {
29
- id: string;
30
- name: string;
31
- project: string;
32
- owner: {
33
- login: string;
34
- };
35
- };
36
- }
37
- export interface AzureProject {
38
- id: string;
39
- name: string;
40
- namespace: string;
41
- }
42
- export interface AzureOrganization {
43
- id: string;
44
- name: string;
45
- }
46
- export type StatusByWorkItemIdByStatusId = {
47
- [workItemType: string]: {
48
- [statusId: string]: {
49
- title: string;
50
- };
51
- };
52
- };
53
8
  export declare class AzureDevOps extends Provider implements GitProvider, IssueProvider {
54
9
  /** Note: PATs are not supported for this function, only OAuth tokens are. */
55
10
  getCurrentUser(input?: Record<string, never>, options?: EnterpriseOptions): Promise<{
@@ -194,10 +149,9 @@ export declare class AzureDevOps extends Provider implements GitProvider, IssueP
194
149
  data: GitPullRequest[];
195
150
  }>;
196
151
  getPullRequestsForRepos(input: {
197
- repos: GetRepoInput[];
198
152
  assigneeLogins?: string[];
199
153
  authorLogin?: string;
200
- }, options?: EnterpriseOptions): Promise<{
154
+ } & GetReposInput, options?: EnterpriseOptions): Promise<{
201
155
  data: GitPullRequest[];
202
156
  }>;
203
157
  private getPullRequestsForProjectBase;
@@ -1,5 +1,5 @@
1
- import { ProviderConfig } from '../../types';
2
- import { Options } from '../gitProvider';
3
- import { AzurePullRequest } from './azureDevOpsTypes';
1
+ import { Options } from '../../types/exportedTypes/gitProvider';
2
+ import { ProviderConfig } from '../../types/exportedTypes/types';
3
+ import { AzurePullRequest } from '../../types/internalTypes/azureDevOps';
4
4
  export declare const getAzureRequestHeaders: (config: ProviderConfig, options?: Options) => Record<string, string>;
5
5
  export declare const getPullRequestUrl: (pullRequest: AzurePullRequest) => string;
@@ -1,13 +1,7 @@
1
- import { Account, CursorPageInput, GetRepoErrorData, GetRepoInput, GitMergeStrategy, GitProvider, GitPullRequest, GitRepository, NumberedPageInput, Options, SetAccountInput, SetPullRequestInput } from '../gitProvider';
1
+ import { RefreshTokenResponse } from '../../types/exportedTypes/bitbucket';
2
+ import { Account, CursorPageInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitMergeStrategy, GitPullRequest, GitRepository, NumberedPageInput, Options, SetAccountInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
3
+ import { GitProvider } from '../gitProvider';
2
4
  import { Provider } from '../provider';
3
- export interface RefreshTokenResponse {
4
- access_token: string;
5
- scopes: string;
6
- token_type: string;
7
- expires_in: number;
8
- state: string;
9
- refresh_token: string;
10
- }
11
5
  export declare class Bitbucket extends Provider implements GitProvider {
12
6
  refreshToken(data: {
13
7
  refreshToken: string;
@@ -95,9 +89,8 @@ export declare class Bitbucket extends Provider implements GitProvider {
95
89
  data: GitPullRequest[];
96
90
  }>;
97
91
  getPullRequestsForRepos(input: {
98
- repos: GetRepoInput[];
99
92
  authorLogin?: string;
100
- }, options?: Options): Promise<{
93
+ } & GetReposInput, options?: Options): Promise<{
101
94
  data: GitPullRequest[];
102
95
  }>;
103
96
  closePullRequest(input: {
@@ -1,3 +1,3 @@
1
- import { ProviderConfig } from '../../types';
2
- import { Options } from '../gitProvider';
1
+ import { Options } from '../../types/exportedTypes/gitProvider';
2
+ import { ProviderConfig } from '../../types/exportedTypes/types';
3
3
  export declare const getBitbucketRequestHeaders: (config: ProviderConfig, options?: Options) => Record<string, string>;
@@ -1,6 +1,7 @@
1
- import { Account, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitProvider, GitPullRequest, GitRepository, NumberedPageInput, SetPullRequestInput } from '../gitProvider';
1
+ import { BitbucketServerMergeStrategy } from '../../types/exportedTypes/bitbucket';
2
+ import { Account, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GetReposInput, GitPullRequest, GitRepository, NumberedPageInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
3
+ import { GitProvider } from '../gitProvider';
2
4
  import { EnterpriseProvider } from '../provider';
3
- import { BitbucketServerMergeStrategy } from './bitbucketServerTypes';
4
5
  export declare class BitbucketServer extends EnterpriseProvider implements GitProvider {
5
6
  private getBaseUrl;
6
7
  private getRequestHeaders;
@@ -33,9 +34,8 @@ export declare class BitbucketServer extends EnterpriseProvider implements GitPr
33
34
  data: GitPullRequest[];
34
35
  }>;
35
36
  getPullRequestsForRepos(input: {
36
- repos: GetRepoInput[];
37
37
  authorLogin?: string;
38
- }, options?: EnterpriseOptions): Promise<{
38
+ } & GetReposInput, options?: EnterpriseOptions): Promise<{
39
39
  data: GitPullRequest[];
40
40
  }>;
41
41
  getPullRequestsForCurrentUser(input: NumberedPageInput, options?: EnterpriseOptions): Promise<{
@@ -1,308 +1,5 @@
1
- import { PagedResult, Result } from '../types';
2
- export interface Options {
3
- token?: string;
4
- isPAT?: boolean;
5
- }
6
- export interface EnterpriseOptions extends Options {
7
- baseUrl?: string;
8
- }
9
- export interface User {
10
- name: string | null;
11
- email: string | null;
12
- avatarUrl: string | null;
13
- }
14
- export interface Account extends User {
15
- id: string;
16
- graphQLId?: string;
17
- username: string | null;
18
- url: string | null;
19
- }
20
- export interface Organization {
21
- id: string;
22
- graphQLId?: string;
23
- username: string;
24
- name: string | null;
25
- email: string | null;
26
- avatarUrl: string;
27
- }
28
- export declare enum GitBuildStatusStage {
29
- Build = "build",
30
- Production = "production",
31
- Staging = "staging",
32
- Test = "test"
33
- }
34
- export declare enum GitBuildStatusState {
35
- ActionRequired = "ACTION_REQUIRED",
36
- Cancelled = "CANCELLED",
37
- Error = "ERROR",
38
- Failed = "FAILED",
39
- Pending = "PENDING",
40
- Running = "RUNNING",
41
- Skipped = "SKIPPED",
42
- Success = "SUCCESS",
43
- Warning = "WARNING",
44
- OptionalActionRequired = "OPTIONAL_ACTION_REQUIRED"
45
- }
46
- export interface GitBuildStatus {
47
- completedAt: Date | null;
48
- description: string | null;
49
- name: string | null;
50
- state: GitBuildStatusState | null;
51
- stage: GitBuildStatusStage | null;
52
- startedAt: Date | null;
53
- url: string;
54
- }
55
- export interface GitLabel {
56
- color: string | null;
57
- description: string | null;
58
- graphQLId?: string;
59
- id: string | null;
60
- name: string;
61
- }
62
- export interface GitMilestone {
63
- id: string;
64
- graphQLId?: string;
65
- number: number;
66
- title: string;
67
- description: string | null;
68
- isOpen: boolean;
69
- url: string;
70
- startDate: Date | null;
71
- dueDate: Date | null;
72
- }
73
- export interface GitRepository {
74
- id: string;
75
- graphQLId?: string;
76
- namespace: string;
77
- name: string;
78
- project?: string;
79
- webUrl: string | null;
80
- httpsUrl: string | null;
81
- sshUrl: string | null;
82
- defaultBranch: GitRef | null;
83
- permission: string | null;
84
- }
85
- export interface GitRef {
86
- name: string;
87
- }
88
- export interface GitRefWithOID extends GitRef {
89
- oid: string | null;
90
- }
91
- export interface GitRefWithCommit extends GitRef {
92
- commit: GitCommit | null;
93
- }
94
- export interface GitCommit {
95
- oid: string;
96
- authoredDate: Date | null;
97
- committedDate: Date | null;
98
- }
99
- export interface GitBlame {
100
- ranges: {
101
- startingLine: number;
102
- endingLine: number;
103
- commit: GitCommit & {
104
- parentOids: string[];
105
- message: string;
106
- author: User | null;
107
- committer: User | null;
108
- fileCount: number | null;
109
- additions: number | null;
110
- deletions: number | null;
111
- };
112
- }[];
113
- }
114
- export declare enum GitMergeStrategy {
115
- MergeCommit = "MERGE_COMMIT",
116
- Rebase = "REBASE",
117
- RebaseThenMergeCommit = "REBASE_THEN_MERGE_COMMIT",
118
- FastForward = "FAST_FORWARD",
119
- Squash = "SQUASH"
120
- }
121
- export declare enum GitPullRequestState {
122
- Open = "OPEN",
123
- Closed = "CLOSED",
124
- Merged = "MERGED"
125
- }
126
- export declare enum GitPullRequestReviewState {
127
- Approved = "APPROVED",
128
- ChangesRequested = "CHANGES_REQUESTED",
129
- Commented = "COMMENTED",
130
- ReviewRequested = "REVIEW_REQUESTED"
131
- }
132
- export declare enum GitPullRequestMergeableState {
133
- Behind = "BEHIND",
134
- Blocked = "BLOCKED",
135
- Conflicts = "CONFLICTS",
136
- Mergeable = "MERGEABLE",
137
- Unknown = "UNKNOWN",
138
- UnknownAndBlocked = "UNKNOWN_AND_BLOCKED",
139
- Unstable = "UNSTABLE"
140
- }
141
- export interface GitPullRequestPermissions {
142
- canMerge: boolean;
143
- canMergeAndBypassProtections: boolean;
144
- }
145
- export interface GitPullRequest {
146
- id: string;
147
- graphQLId?: string;
148
- number: number;
149
- title: string;
150
- url: string | null;
151
- state: GitPullRequestState;
152
- isDraft: boolean;
153
- createdDate: Date;
154
- updatedDate: Date;
155
- closedDate: Date | null;
156
- mergedDate: Date | null;
157
- baseRef: GitRefWithOID | null;
158
- headRef: GitRefWithOID | null;
159
- commentCount: number | null;
160
- upvoteCount: number | null;
161
- commitCount: number | null;
162
- fileCount: number | null;
163
- additions: number | null;
164
- deletions: number | null;
165
- author: Account | null;
166
- assignees: Account[] | null;
167
- reviews: {
168
- reviewer: Account;
169
- state: GitPullRequestReviewState;
170
- }[] | null;
171
- reviewDecision: GitPullRequestReviewState | null;
172
- repository: {
173
- id: string;
174
- graphQLId?: string;
175
- name: string;
176
- project?: string;
177
- owner: {
178
- login: string;
179
- };
180
- remoteInfo: {
181
- cloneUrlHTTPS: string;
182
- cloneUrlSSH: string;
183
- } | null;
184
- };
185
- headRepository: {
186
- id: string;
187
- graphQLId?: string;
188
- name: string;
189
- project?: string;
190
- owner: {
191
- login: string;
192
- };
193
- remoteInfo: {
194
- cloneUrlHTTPS: string;
195
- cloneUrlSSH: string;
196
- } | null;
197
- } | null;
198
- headCommit: {
199
- buildStatuses: GitBuildStatus[] | null;
200
- } | null;
201
- mergeableState: GitPullRequestMergeableState;
202
- milestone?: GitMilestone | null;
203
- labels?: GitLabel[];
204
- permissions: GitPullRequestPermissions | null;
205
- version?: number;
206
- }
207
- export interface GitComment {
208
- author: Account | User | null;
209
- body: string;
210
- createdAt: Date | null;
211
- id: string;
212
- graphQLId?: string;
213
- url: string;
214
- }
215
- export declare enum GitDiffLineType {
216
- ADDED = "ADDED",
217
- DELETED = "DELETED",
218
- UNMODIFIED = "UNMODIFIED"
219
- }
220
- export interface GitDiffLine {
221
- line: string;
222
- oldLineNumber: number | null;
223
- newLineNumber: number | null;
224
- type: GitDiffLineType;
225
- }
226
- export interface GitPullRequestReviewComment extends GitComment {
227
- diffLines: GitDiffLine[];
228
- filename: string;
229
- replies: GitComment[];
230
- isOutdated: boolean;
231
- isResolved: boolean;
232
- }
233
- export interface GitPullRequestReview extends GitComment {
234
- reviewComments: GitPullRequestReviewComment[];
235
- }
236
- export interface GetRepoInput {
237
- namespace: string;
238
- name: string;
239
- project?: string;
240
- }
241
- export interface GetReposInput {
242
- repos: GetRepoInput[];
243
- }
244
- export type GetPRsForReposInput = GetReposInput | {
245
- repoIds: (string | number)[];
246
- };
247
- export type GetPRForRepoInput = {
248
- repo: GetRepoInput;
249
- number: number;
250
- };
251
- export interface SetPullRequestInput {
252
- id: string;
253
- number: number;
254
- graphQLId?: string;
255
- repository: {
256
- id: string;
257
- name: string;
258
- project?: string;
259
- owner: {
260
- login: string;
261
- };
262
- };
263
- version?: number;
264
- }
265
- export interface SetMilestoneInput {
266
- id: string;
267
- graphQLId?: string;
268
- }
269
- export interface SetAccountInput {
270
- id: string;
271
- name: string | null;
272
- graphQLId?: string;
273
- username: string | null;
274
- }
275
- export interface CreateCommitInput {
276
- commitMessage: {
277
- description?: string;
278
- summary: string;
279
- };
280
- deletedFiles: string[];
281
- newOrModifiedFiles: {
282
- [filePath: string]: string;
283
- };
284
- repo: GetRepoInput;
285
- target: {
286
- name: string;
287
- oid: string;
288
- };
289
- }
290
- export interface SetLabelInput {
291
- id: string | null;
292
- graphQLId?: string;
293
- name: string;
294
- }
295
- export interface CursorPageInput {
296
- cursor?: string | null;
297
- }
298
- export interface NumberedPageInput {
299
- page?: number | null;
300
- }
301
- export type PageInput = CursorPageInput | NumberedPageInput;
302
- export interface GetRepoErrorData {
303
- input: GetRepoInput;
304
- error?: Error;
305
- }
1
+ import { Account, CreateCommitInput, GetPRForRepoInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitBlame, GitLabel, GitMergeStrategy, GitPullRequest, GitRefWithCommit, GitRepository, Options, PageInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput, User } from '../types/exportedTypes/gitProvider';
2
+ import { PagedResult, Result } from '../types/exportedTypes/types';
306
3
  export interface GitProvider {
307
4
  getCurrentUser?(input: Record<string, never>, options: Options): Promise<Result<Account>>;
308
5
  getUserForCommit?(input: {
@@ -332,7 +29,7 @@ export interface GitProvider {
332
29
  ref: string;
333
30
  path: string;
334
31
  }, options: Options): Promise<Result<GitBlame>>;
335
- getPullRequestsForRepos?(input: GetPRsForReposInput, options: Options): Promise<Result<GitPullRequest[]>>;
32
+ getPullRequestsForRepos?(input: GetReposInput, options: Options): Promise<Result<GitPullRequest[]>>;
336
33
  getPullRequestForRepo?(input: GetPRForRepoInput, options: Options): Promise<Result<GitPullRequest | null>>;
337
34
  setPullRequestAssignees?(input: {
338
35
  pullRequest: SetPullRequestInput;
@@ -1,8 +1,10 @@
1
1
  /// <reference types="node" />
2
- import { Account, CreateCommitInput, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitProvider, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, Organization, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../gitProvider';
3
- import { Issue, IssueProvider, SetIssueInput } from '../issueProvider';
2
+ import { Account, CreateCommitInput, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, Organization, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
3
+ import { FetchIssuesData, FetchPullRequestsData, GitHubIssueCloseReason } from '../../types/exportedTypes/github';
4
+ import { Issue, SetIssueInput } from '../../types/exportedTypes/issueProvider';
5
+ import { GitProvider } from '../gitProvider';
6
+ import { IssueProvider } from '../issueProvider';
4
7
  import { EnterpriseProvider } from '../provider';
5
- import { FetchIssuesData, FetchPullRequestsData, GitHubIssueCloseReason } from './githubTypes';
6
8
  export declare class GitHub extends EnterpriseProvider implements GitProvider, IssueProvider {
7
9
  private _scopesCache;
8
10
  private _enterpriseVersionsCache;
@@ -1,5 +1,5 @@
1
- import { FieldMap, GraphQLBody, GraphQLError, GraphQLResponse, ProviderConfig } from '../../types';
2
- import { Account, EnterpriseOptions, GitDiffLineType } from '../gitProvider';
1
+ import { Account, EnterpriseOptions, GitDiffLineType } from '../../types/exportedTypes/gitProvider';
2
+ import { FieldMap, GraphQLBody, GraphQLError, GraphQLResponse, ProviderConfig } from '../../types/exportedTypes/types';
3
3
  export declare const minimumFeatureVersions: {
4
4
  AS_CODE_OWNER: number[];
5
5
  CHECK_RUN: number[];
@@ -14,7 +14,7 @@ export declare const GRAPHQL_MILESTONE_FIELDS = "\ndescription\ndueOn\nid\nnumbe
14
14
  export declare const GRAPHQL_LABEL_FIELDS = "\ncolor\ndescription\nid\nname\n";
15
15
  export declare const getGraphQLEndpoint: (config: ProviderConfig, options: EnterpriseOptions) => string;
16
16
  export declare const getRESTBaseUrl: (config: ProviderConfig, options: EnterpriseOptions) => string;
17
- export declare const makeGitHubGraphQLRequest: <T>(config: ProviderConfig, data: GraphQLBody, options: EnterpriseOptions) => Promise<import("../../types").Response<GraphQLResponse<T>>>;
17
+ export declare const makeGitHubGraphQLRequest: <T>(config: ProviderConfig, data: GraphQLBody, options: EnterpriseOptions) => Promise<import("../../types/exportedTypes/types").Response<GraphQLResponse<T>>>;
18
18
  export declare const hasEmailScope: (scopes: string[]) => boolean;
19
19
  export declare const getAccountFields: (withAvatarSizeVar?: boolean, includeEmail?: boolean, fields?: FieldMap<Account>) => string;
20
20
  export declare const getBotFields: (withAvatarSizeVar?: boolean) => string;
@@ -1,13 +1,9 @@
1
- import { Account, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitProvider, GitPullRequest, GitRepository, NumberedPageInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../gitProvider';
2
- import { Issue, IssueProvider, SetIssueInput } from '../issueProvider';
1
+ import { Account, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GetReposInput, GitLabel, GitMergeStrategy, GitPullRequest, GitRepository, NumberedPageInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
2
+ import { GitLabGetIssueInput, PullRequestAssociation } from '../../types/exportedTypes/gitlab';
3
+ import { Issue, SetIssueInput } from '../../types/exportedTypes/issueProvider';
4
+ import { GitProvider } from '../gitProvider';
5
+ import { IssueProvider } from '../issueProvider';
3
6
  import { EnterpriseProvider } from '../provider';
4
- export interface GitLabGetIssueInput {
5
- namespace: string;
6
- name: string;
7
- number: string;
8
- }
9
- export type PullRequestState = 'opened' | 'merged' | 'closed';
10
- export type PullRequestAssociation = 'assigned' | 'authored' | 'reviewRequested';
11
7
  export declare class GitLab extends EnterpriseProvider implements GitProvider, IssueProvider {
12
8
  private getIsSelfHosted;
13
9
  getCurrentUser(input?: Record<string, never>, options?: EnterpriseOptions): Promise<{
@@ -159,17 +155,12 @@ export declare class GitLab extends EnterpriseProvider implements GitProvider, I
159
155
  data: GitPullRequest[];
160
156
  }>;
161
157
  getPullRequestsForRepos(input: {
162
- repoIds: (string | number)[];
163
158
  assigneeLogins?: string[];
164
159
  updatedBefore?: string;
165
160
  authorLogin?: string;
166
161
  isDraft?: boolean;
167
162
  reviewRequestedLogin?: string;
168
- } & CursorPageInput, options?: EnterpriseOptions): Promise<{
169
- pageInfo: {
170
- endCursor: string | null;
171
- hasNextPage: boolean;
172
- } | undefined;
163
+ } & GetReposInput & CursorPageInput, options?: EnterpriseOptions): Promise<{
173
164
  data: GitPullRequest[];
174
165
  }>;
175
166
  closePullRequest(input: {
@@ -1,7 +1,7 @@
1
- import { GraphQLBody, GraphQLResponse, ProviderConfig } from '../../types';
2
- import { EnterpriseOptions } from '../gitProvider';
1
+ import { EnterpriseOptions } from '../../types/exportedTypes/gitProvider';
2
+ import { GraphQLBody, GraphQLResponse, ProviderConfig } from '../../types/exportedTypes/types';
3
3
  export declare const GITLAB_API_URL = "https://gitlab.com/api/v4";
4
4
  export declare const GITLAB_GRAPHQL_API_URL = "https://gitlab.com/api/graphql";
5
5
  export declare const getRESTBaseUrl: (config: ProviderConfig, options: EnterpriseOptions) => string;
6
6
  export declare const getGraphQLEndpoint: (config: ProviderConfig, options: EnterpriseOptions) => string;
7
- export declare const makeGitLabGraphQLRequest: <T>(config: ProviderConfig, data: GraphQLBody, options: EnterpriseOptions) => Promise<import("../../types").Response<GraphQLResponse<T>>>;
7
+ export declare const makeGitLabGraphQLRequest: <T>(config: ProviderConfig, data: GraphQLBody, options: EnterpriseOptions) => Promise<import("../../types/exportedTypes/types").Response<GraphQLResponse<T>>>;