@gitkraken/provider-apis 0.27.3 → 0.28.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 +22 -0
- package/dist/index.js +62 -62
- package/dist/index.providers.js +34 -34
- package/dist/providers/github/githubHelpers.d.ts +2 -1
- package/dist/providers/jira/jira.d.ts +7 -7
- package/dist/providers/jira/jiraHelpers.d.ts +7 -7
- package/dist/providers/jira/jiraServer.d.ts +7 -7
- package/dist/types/internalTypes/github.d.ts +21 -4
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { FieldMap, GraphQLBody, GraphQLError, GraphQLResponse, ProviderConfig }
|
|
|
3
3
|
export declare const minimumFeatureVersions: {
|
|
4
4
|
AS_CODE_OWNER: number[];
|
|
5
5
|
CHECK_RUN: number[];
|
|
6
|
+
PR_ISSUE_FULL_DATABASE_ID: number[];
|
|
6
7
|
LATEST_REVIEWS: number[];
|
|
7
8
|
VIEWER_CAN_MERGE_AS_ADMIN: number[];
|
|
8
9
|
};
|
|
@@ -22,7 +23,7 @@ export declare const hasEmailScope: (scopes: string[]) => boolean;
|
|
|
22
23
|
export declare const getAccountFields: (withAvatarSizeVar?: boolean, includeEmail?: boolean, fields?: FieldMap<Account>) => string;
|
|
23
24
|
export declare const getBotFields: (withAvatarSizeVar?: boolean) => string;
|
|
24
25
|
export declare const getPullRequestFields: (isDraftPullRequestSupported: boolean, includeEmail: boolean | undefined, enterpriseVersion: [number, number, number] | null) => string;
|
|
25
|
-
export declare const getIssueFields: (includeEmail
|
|
26
|
+
export declare const getIssueFields: (includeEmail: boolean | undefined, enterpriseVersion: [number, number, number] | null) => string;
|
|
26
27
|
export declare const GithubSearchSyntaxQualifiers: Record<string, string>;
|
|
27
28
|
export declare const getProjectGithubSearchSyntax: (search: string) => string[];
|
|
28
29
|
export declare const makeSearchIssuesOrPRsGraphQLBody: (type: 'issue' | 'pr', query: string, cursor: string | null | undefined, options: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CursorPageInput, EnterpriseOptions,
|
|
1
|
+
import { CursorPageInput, EnterpriseOptions, SetAccountInput, SetLabelInput } from '../../types/exportedTypes/gitProvider';
|
|
2
2
|
import { SetIssueInput, SetStatusInput } from '../../types/exportedTypes/issueProvider';
|
|
3
3
|
import { JiraGetIssueInput, JiraProject, JiraResource, SetComponentInput } from '../../types/exportedTypes/jira';
|
|
4
4
|
import { Result } from '../../types/exportedTypes/types';
|
|
@@ -72,11 +72,11 @@ export declare class Jira extends Provider implements IssueProvider {
|
|
|
72
72
|
authorLogin?: string;
|
|
73
73
|
mentionLogin?: string;
|
|
74
74
|
labelNames?: string[];
|
|
75
|
-
} &
|
|
75
|
+
} & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
76
76
|
data: import("../../types/exportedTypes/issueProvider").Issue[];
|
|
77
77
|
pageInfo: {
|
|
78
78
|
hasNextPage: boolean;
|
|
79
|
-
|
|
79
|
+
endCursor: string | null;
|
|
80
80
|
};
|
|
81
81
|
}>;
|
|
82
82
|
getIssuesForProjects(input: {
|
|
@@ -86,21 +86,21 @@ export declare class Jira extends Provider implements IssueProvider {
|
|
|
86
86
|
authorLogin?: string;
|
|
87
87
|
mentionLogin?: string;
|
|
88
88
|
labelNames?: string[];
|
|
89
|
-
} &
|
|
89
|
+
} & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
90
90
|
data: import("../../types/exportedTypes/issueProvider").Issue[];
|
|
91
91
|
pageInfo: {
|
|
92
92
|
hasNextPage: boolean;
|
|
93
|
-
|
|
93
|
+
endCursor: string | null;
|
|
94
94
|
};
|
|
95
95
|
}>;
|
|
96
96
|
getIssuesForResourceForCurrentUser(input: {
|
|
97
97
|
resourceId: string;
|
|
98
98
|
labelNames?: string[];
|
|
99
|
-
} &
|
|
99
|
+
} & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
100
100
|
data: import("../../types/exportedTypes/issueProvider").Issue[];
|
|
101
101
|
pageInfo: {
|
|
102
102
|
hasNextPage: boolean;
|
|
103
|
-
|
|
103
|
+
endCursor: string | null;
|
|
104
104
|
};
|
|
105
105
|
}>;
|
|
106
106
|
setIssueStatus(input: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnterpriseOptions, NumberedPageInput, SetLabelInput } from '../../types/exportedTypes/gitProvider';
|
|
1
|
+
import { CursorPageInput, EnterpriseOptions, NumberedPageInput, SetLabelInput } from '../../types/exportedTypes/gitProvider';
|
|
2
2
|
import { Issue, IssueComponent, IssueTransition, SetIssueInput, SetStatusInput } from '../../types/exportedTypes/issueProvider';
|
|
3
3
|
import { JiraComponent, JiraUser, SetComponentInput } from '../../types/exportedTypes/jira';
|
|
4
4
|
import { ProviderConfig } from '../../types/exportedTypes/types';
|
|
@@ -30,11 +30,11 @@ export declare const getIssuesForResourceForCurrentUser: (config: ProviderConfig
|
|
|
30
30
|
resourceId?: string;
|
|
31
31
|
labelNames?: string[];
|
|
32
32
|
fields: JiraIssueFieldNameToId | null;
|
|
33
|
-
} &
|
|
33
|
+
} & CursorPageInput, resourceUrl: string | null, options?: EnterpriseOptions) => Promise<{
|
|
34
34
|
data: Issue[];
|
|
35
35
|
pageInfo: {
|
|
36
36
|
hasNextPage: boolean;
|
|
37
|
-
|
|
37
|
+
endCursor: string | null;
|
|
38
38
|
};
|
|
39
39
|
}>;
|
|
40
40
|
export declare const getIssuesForProject: (config: ProviderConfig, input: {
|
|
@@ -45,11 +45,11 @@ export declare const getIssuesForProject: (config: ProviderConfig, input: {
|
|
|
45
45
|
mentionLogin?: string;
|
|
46
46
|
labelNames?: string[];
|
|
47
47
|
fields: JiraIssueFieldNameToId | null;
|
|
48
|
-
} &
|
|
48
|
+
} & CursorPageInput, resourceUrl: string | null, options?: EnterpriseOptions) => Promise<{
|
|
49
49
|
data: Issue[];
|
|
50
50
|
pageInfo: {
|
|
51
51
|
hasNextPage: boolean;
|
|
52
|
-
|
|
52
|
+
endCursor: string | null;
|
|
53
53
|
};
|
|
54
54
|
}>;
|
|
55
55
|
export declare const getIssuesForProjects: (config: ProviderConfig, input: {
|
|
@@ -60,11 +60,11 @@ export declare const getIssuesForProjects: (config: ProviderConfig, input: {
|
|
|
60
60
|
mentionLogin?: string;
|
|
61
61
|
labelNames?: string[];
|
|
62
62
|
fields: JiraIssueFieldNameToId | null;
|
|
63
|
-
} &
|
|
63
|
+
} & CursorPageInput, resourceUrl: string | null, options?: EnterpriseOptions) => Promise<{
|
|
64
64
|
data: Issue[];
|
|
65
65
|
pageInfo: {
|
|
66
66
|
hasNextPage: boolean;
|
|
67
|
-
|
|
67
|
+
endCursor: string | null;
|
|
68
68
|
};
|
|
69
69
|
}>;
|
|
70
70
|
export declare const setIssueLabels: (config: ProviderConfig, input: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CursorPageInput, EnterpriseOptions, SetLabelInput } from '../../types/exportedTypes/gitProvider';
|
|
2
2
|
import { SetIssueInput, SetStatusInput } from '../../types/exportedTypes/issueProvider';
|
|
3
3
|
import { SetComponentInput } from '../../types/exportedTypes/jira';
|
|
4
4
|
import { IssueProvider } from '../issueProvider';
|
|
@@ -35,11 +35,11 @@ export declare class JiraServer extends EnterpriseProvider implements IssueProvi
|
|
|
35
35
|
mentionLogin?: string;
|
|
36
36
|
labelNames?: string[];
|
|
37
37
|
resourceUrl?: string;
|
|
38
|
-
} &
|
|
38
|
+
} & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
39
39
|
data: import("../../types/exportedTypes/issueProvider").Issue[];
|
|
40
40
|
pageInfo: {
|
|
41
41
|
hasNextPage: boolean;
|
|
42
|
-
|
|
42
|
+
endCursor: string | null;
|
|
43
43
|
};
|
|
44
44
|
}>;
|
|
45
45
|
getIssuesForProjects(input: {
|
|
@@ -49,21 +49,21 @@ export declare class JiraServer extends EnterpriseProvider implements IssueProvi
|
|
|
49
49
|
mentionLogin?: string;
|
|
50
50
|
labelNames?: string[];
|
|
51
51
|
resourceUrl?: string;
|
|
52
|
-
} &
|
|
52
|
+
} & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
53
53
|
data: import("../../types/exportedTypes/issueProvider").Issue[];
|
|
54
54
|
pageInfo: {
|
|
55
55
|
hasNextPage: boolean;
|
|
56
|
-
|
|
56
|
+
endCursor: string | null;
|
|
57
57
|
};
|
|
58
58
|
}>;
|
|
59
59
|
getIssuesForResourceForCurrentUser(input: {
|
|
60
60
|
labelNames?: string[];
|
|
61
61
|
resourceUrl?: string;
|
|
62
|
-
} &
|
|
62
|
+
} & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
63
63
|
data: import("../../types/exportedTypes/issueProvider").Issue[];
|
|
64
64
|
pageInfo: {
|
|
65
65
|
hasNextPage: boolean;
|
|
66
|
-
|
|
66
|
+
endCursor: string | null;
|
|
67
67
|
};
|
|
68
68
|
}>;
|
|
69
69
|
setIssueStatus(input: {
|
|
@@ -144,9 +144,8 @@ export interface GraphQLContext {
|
|
|
144
144
|
state: GitHubStatusState;
|
|
145
145
|
targetUrl: string;
|
|
146
146
|
}
|
|
147
|
-
|
|
147
|
+
type GraphQLPullRequestBase = {
|
|
148
148
|
id: string;
|
|
149
|
-
databaseId: number;
|
|
150
149
|
title: string;
|
|
151
150
|
number: number;
|
|
152
151
|
state: PullRequestState;
|
|
@@ -235,10 +234,18 @@ export interface GraphQLPullRequest {
|
|
|
235
234
|
nodes: (GraphQLLabel | null)[] | null;
|
|
236
235
|
} | null;
|
|
237
236
|
viewerCanMergeAsAdmin?: boolean;
|
|
237
|
+
};
|
|
238
|
+
interface GraphQLPullRequestWithDatabaseId extends GraphQLPullRequestBase {
|
|
239
|
+
databaseId: number;
|
|
240
|
+
fullDatabaseId: undefined;
|
|
241
|
+
}
|
|
242
|
+
interface GraphQLPullRequestWithFullDatabaseId extends GraphQLPullRequestBase {
|
|
243
|
+
databaseId: undefined;
|
|
244
|
+
fullDatabaseId: string;
|
|
238
245
|
}
|
|
239
|
-
export
|
|
246
|
+
export type GraphQLPullRequest = GraphQLPullRequestWithDatabaseId | GraphQLPullRequestWithFullDatabaseId;
|
|
247
|
+
type GraphQLIssueBase = {
|
|
240
248
|
id: string;
|
|
241
|
-
databaseId: number;
|
|
242
249
|
number: string;
|
|
243
250
|
title: string;
|
|
244
251
|
url: string;
|
|
@@ -268,7 +275,16 @@ export interface GraphQLIssue {
|
|
|
268
275
|
labels: {
|
|
269
276
|
nodes: (GraphQLLabel | null)[] | null;
|
|
270
277
|
} | null;
|
|
278
|
+
};
|
|
279
|
+
interface GraphQLIssueWithDatabaseId extends GraphQLIssueBase {
|
|
280
|
+
databaseId: number;
|
|
281
|
+
fullDatabaseId: undefined;
|
|
282
|
+
}
|
|
283
|
+
interface GraphQLIssueWithFullDatabaseId extends GraphQLIssueBase {
|
|
284
|
+
databaseId: undefined;
|
|
285
|
+
fullDatabaseId: string;
|
|
271
286
|
}
|
|
287
|
+
export type GraphQLIssue = GraphQLIssueWithDatabaseId | GraphQLIssueWithFullDatabaseId;
|
|
272
288
|
export interface GraphQLMilestone {
|
|
273
289
|
description: string | null;
|
|
274
290
|
dueOn: string | null;
|
|
@@ -317,3 +333,4 @@ export interface RESTTreeItem {
|
|
|
317
333
|
sha: string;
|
|
318
334
|
url: string;
|
|
319
335
|
}
|
|
336
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitkraken/provider-apis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.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",
|