@gitkraken/provider-apis 0.53.0 → 0.54.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 +9 -0
- package/dist/index.js +150 -149
- package/dist/index.provider-utils.js +1 -1
- package/dist/index.providers.js +181 -180
- package/dist/providers/bitbucketServer/bitbucketServer.d.ts +3 -11
- package/dist/providers/github/github.d.ts +8 -0
- package/dist/providers/github/githubHelpers.d.ts +1 -1
- package/dist/providers/gitlab/gitlab.d.ts +4 -1
- package/dist/types/exportedTypes/gitProvider.d.ts +6 -0
- package/dist/types/exportedTypes/issueProvider.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BitbucketServerMergeStrategy } from '../../types/exportedTypes/bitbucket';
|
|
2
2
|
import { Account, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GetReposInput, GitPullRequest, GitPullRequestState, GitRepository, NumberedPageInput, Options, SetPullRequestInput, User } from '../../types/exportedTypes/gitProvider';
|
|
3
|
-
import { Result } from '../../types/exportedTypes/types';
|
|
3
|
+
import { NumberedPageInfo, Result } from '../../types/exportedTypes/types';
|
|
4
4
|
import { BitbucketServerPullRequest } from '../../types/internalTypes/bitbucketServer';
|
|
5
5
|
import { GitProvider } from '../gitProvider';
|
|
6
6
|
import { EnterpriseProvider } from '../provider';
|
|
@@ -58,11 +58,7 @@ export declare class BitbucketServer extends EnterpriseProvider implements GitPr
|
|
|
58
58
|
reviewerLogin?: string;
|
|
59
59
|
states?: GitPullRequestState[];
|
|
60
60
|
} & NumberedPageInput, options?: EnterpriseOptions): Promise<{
|
|
61
|
-
pageInfo:
|
|
62
|
-
hasNextPage: boolean;
|
|
63
|
-
nextPage: number | null;
|
|
64
|
-
currentPage: number | null;
|
|
65
|
-
};
|
|
61
|
+
pageInfo: NumberedPageInfo;
|
|
66
62
|
data: GitPullRequest[];
|
|
67
63
|
}>;
|
|
68
64
|
getPullRequestsForRepos(input: {
|
|
@@ -78,11 +74,7 @@ export declare class BitbucketServer extends EnterpriseProvider implements GitPr
|
|
|
78
74
|
reviewerLogin?: string;
|
|
79
75
|
states?: GitPullRequestState[];
|
|
80
76
|
} & NumberedPageInput, options?: EnterpriseOptions): Promise<{
|
|
81
|
-
pageInfo:
|
|
82
|
-
hasNextPage: boolean;
|
|
83
|
-
nextPage: number | null;
|
|
84
|
-
currentPage: number | null;
|
|
85
|
-
};
|
|
77
|
+
pageInfo: NumberedPageInfo;
|
|
86
78
|
data: GitPullRequest[];
|
|
87
79
|
}>;
|
|
88
80
|
closePullRequest(input: {
|
|
@@ -233,6 +233,7 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider, I
|
|
|
233
233
|
endCursor: string | null;
|
|
234
234
|
};
|
|
235
235
|
data: GitPullRequest[];
|
|
236
|
+
metadata: import("../../types/exportedTypes/types").CollectionMetadata | undefined;
|
|
236
237
|
}>;
|
|
237
238
|
searchIssues(input: {
|
|
238
239
|
query: string;
|
|
@@ -245,6 +246,7 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider, I
|
|
|
245
246
|
endCursor: string | null;
|
|
246
247
|
};
|
|
247
248
|
data: Issue[];
|
|
249
|
+
metadata: import("../../types/exportedTypes/types").CollectionMetadata | undefined;
|
|
248
250
|
}>;
|
|
249
251
|
/**
|
|
250
252
|
* Returns pull requests that were created by, are assigned to, or have been requested to be reviewed by the user.
|
|
@@ -255,12 +257,14 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider, I
|
|
|
255
257
|
includeFromArchivedRepos?: boolean;
|
|
256
258
|
labelNames?: string[];
|
|
257
259
|
maxPageSize?: number;
|
|
260
|
+
states?: GitPullRequestState[];
|
|
258
261
|
} & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
259
262
|
pageInfo: {
|
|
260
263
|
hasNextPage: boolean;
|
|
261
264
|
endCursor: string | null;
|
|
262
265
|
};
|
|
263
266
|
data: GitPullRequest[];
|
|
267
|
+
metadata: import("../../types/exportedTypes/types").CollectionMetadata | undefined;
|
|
264
268
|
}>;
|
|
265
269
|
getPullRequestsForRepos(input: FetchPullRequestsData & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
266
270
|
pageInfo: {
|
|
@@ -268,6 +272,7 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider, I
|
|
|
268
272
|
endCursor: string | null;
|
|
269
273
|
};
|
|
270
274
|
data: GitPullRequest[];
|
|
275
|
+
metadata: import("../../types/exportedTypes/types").CollectionMetadata | undefined;
|
|
271
276
|
}>;
|
|
272
277
|
getPullRequestForRepo(input: {
|
|
273
278
|
repo: GetRepoInput;
|
|
@@ -400,12 +405,14 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider, I
|
|
|
400
405
|
includeFromArchivedRepos?: boolean;
|
|
401
406
|
maxPageSize?: number;
|
|
402
407
|
labelNames?: string[];
|
|
408
|
+
states?: GitIssueState[];
|
|
403
409
|
} & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
404
410
|
pageInfo: {
|
|
405
411
|
hasNextPage: boolean;
|
|
406
412
|
endCursor: string;
|
|
407
413
|
};
|
|
408
414
|
data: Issue[];
|
|
415
|
+
metadata: import("../../types/exportedTypes/types").CollectionMetadata | undefined;
|
|
409
416
|
}>;
|
|
410
417
|
setPullRequestLabels(input: {
|
|
411
418
|
pullRequest: SetPullRequestInput;
|
|
@@ -417,6 +424,7 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider, I
|
|
|
417
424
|
endCursor: string | null;
|
|
418
425
|
};
|
|
419
426
|
data: Issue[];
|
|
427
|
+
metadata: import("../../types/exportedTypes/types").CollectionMetadata | undefined;
|
|
420
428
|
}>;
|
|
421
429
|
closeIssueWithReason(input: {
|
|
422
430
|
issue: SetIssueInput;
|
|
@@ -12,7 +12,7 @@ export declare const minimumFeatureVersions: {
|
|
|
12
12
|
PR_REVIEW_FULL_DATABASE_ID: number[];
|
|
13
13
|
PR_REVIEW_COMMENT_FULL_DATABASE_ID: number[];
|
|
14
14
|
};
|
|
15
|
-
export declare const MAX_PR_PAGE_SIZE =
|
|
15
|
+
export declare const MAX_PR_PAGE_SIZE = 100;
|
|
16
16
|
export declare const MAX_ISSUE_PAGE_SIZE = 100;
|
|
17
17
|
type MinimumFeatureVersions = typeof minimumFeatureVersions;
|
|
18
18
|
export declare const GHOST_AUTHOR: GraphQLUser;
|
|
@@ -154,6 +154,7 @@ export declare class GitLab extends EnterpriseProvider implements GitProvider, I
|
|
|
154
154
|
includeFromArchivedRepos?: boolean;
|
|
155
155
|
labelNames?: string[];
|
|
156
156
|
repos?: GetRepoInput[];
|
|
157
|
+
states?: GitPullRequestState[];
|
|
157
158
|
} & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
158
159
|
pageInfo: {
|
|
159
160
|
hasNextPage: false;
|
|
@@ -279,8 +280,10 @@ export declare class GitLab extends EnterpriseProvider implements GitProvider, I
|
|
|
279
280
|
*
|
|
280
281
|
* `scope` controls breadth: `assigned_to_me` returns issues assigned to the token's user (GitLab scopes to the
|
|
281
282
|
* current user server-side, no username needed); `all` returns every issue visible to the user and is combined
|
|
282
|
-
* with `assigneeUsername`
|
|
283
|
+
* with `assigneeUsername` and/or `authorUsername` to narrow the read.
|
|
283
284
|
* Without `scope`, GitLab defaults to `created_by_me`, which is too narrow for a "my issues" read.
|
|
285
|
+
* GitLab's REST endpoint has no first-class mention filter here, so mentions are intentionally unsupported rather
|
|
286
|
+
* than approximated via search.
|
|
284
287
|
*
|
|
285
288
|
* Numbered pagination (`page`/`per_page` + the `x-next-page` header); one page per call — follow `pageInfo`.
|
|
286
289
|
*/
|
|
@@ -349,6 +349,12 @@ export interface CursorPageInput {
|
|
|
349
349
|
cursor?: string | null;
|
|
350
350
|
}
|
|
351
351
|
export interface NumberedPageInput {
|
|
352
|
+
/**
|
|
353
|
+
* The 1-based page number to request. Numbered-page providers translate this to their native
|
|
354
|
+
* pagination unit where needed (for example Bitbucket Server's `start` offset). Note that some
|
|
355
|
+
* Bitbucket Server endpoints still consume `page` as a raw `start` offset and have not yet been
|
|
356
|
+
* migrated to this contract.
|
|
357
|
+
*/
|
|
352
358
|
page?: number | null;
|
|
353
359
|
/**
|
|
354
360
|
* The number of items to request per page. Honored by all numbered-page providers (Bitbucket,
|
|
@@ -13,10 +13,11 @@ export interface GetIssueInput {
|
|
|
13
13
|
export type GetIssuesForReposInput = GetReposInput | {
|
|
14
14
|
repoIds: (string | number)[];
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export interface GetIssuesForCurrentUserInput extends CursorPageInput, NumberedPageInput {
|
|
17
17
|
scope?: 'assigned_to_me' | 'all';
|
|
18
18
|
assigneeUsername?: string;
|
|
19
|
-
|
|
19
|
+
authorUsername?: string;
|
|
20
|
+
}
|
|
20
21
|
export interface IssueTransition {
|
|
21
22
|
id: string;
|
|
22
23
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitkraken/provider-apis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "An SDK around different third-party APIs that accepts and returns data in a common format.",
|
|
5
5
|
"author": "Axosoft, LLC dba GitKraken",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|