@gitkraken/provider-apis 0.17.4 → 0.17.5
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 +6 -0
- package/dist/index.js +129 -129
- package/dist/providers/github/githubHelpers.d.ts +11 -2
- package/dist/providers/github/githubTypes.d.ts +1 -1
- package/dist/providers/issueProvider.d.ts +3 -3
- package/dist/providers/jira/jira.d.ts +6 -0
- package/dist/providers/jira/sharedHelpers.d.ts +6 -0
- package/dist/providers/jiraServer/jiraServer.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { FieldMap, GraphQLBody, GraphQLError, GraphQLResponse, ProviderConfig } from '../../types';
|
|
2
2
|
import { Account, EnterpriseOptions, GitDiffLineType } from '../gitProvider';
|
|
3
|
+
export declare const minimumFeatureVersions: {
|
|
4
|
+
AS_CODE_OWNER: number[];
|
|
5
|
+
CHECK_RUN: number[];
|
|
6
|
+
LATEST_REVIEWS: number[];
|
|
7
|
+
VIEWER_CAN_MERGE_AS_ADMIN: number[];
|
|
8
|
+
};
|
|
9
|
+
type MinimumFeatureVersions = typeof minimumFeatureVersions;
|
|
10
|
+
export declare const doesEnterpriseSupportFeature: (enterpriseVersion: [number, number, number], feature: keyof MinimumFeatureVersions) => boolean;
|
|
3
11
|
export declare const GITHUB_API_URL = "https://api.github.com";
|
|
4
12
|
export declare const GITHUB_GRAPHQL_API_URL: string;
|
|
5
13
|
export declare const GRAPHQL_MILESTONE_FIELDS = "\ndescription\ndueOn\nid\nnumber\nstate\ntitle\nurl\n";
|
|
@@ -10,11 +18,11 @@ export declare const makeGitHubGraphQLRequest: <T>(config: ProviderConfig, data:
|
|
|
10
18
|
export declare const hasEmailScope: (scopes: string[]) => boolean;
|
|
11
19
|
export declare const getAccountFields: (withAvatarSizeVar?: boolean, includeEmail?: boolean, fields?: FieldMap<Account>) => string;
|
|
12
20
|
export declare const getBotFields: (withAvatarSizeVar?: boolean) => string;
|
|
13
|
-
export declare const getPullRequestFields: (isDraftPullRequestSupported: boolean, includeEmail: boolean | undefined,
|
|
21
|
+
export declare const getPullRequestFields: (isDraftPullRequestSupported: boolean, includeEmail: boolean | undefined, enterpriseVersion: [number, number, number] | null) => string;
|
|
14
22
|
export declare const getIssueFields: (includeEmail?: boolean) => string;
|
|
15
23
|
export declare const GithubSearchSyntaxQualifiers: Record<string, string>;
|
|
16
24
|
export declare const getProjectGithubSearchSyntax: (search: string) => string[];
|
|
17
|
-
export declare const makeSearchIssuesOrPRsGraphQLBody: (type: 'issue' | 'pr', query: string, cursor: string | null | undefined, supportsEmail: boolean, supportsDrafts?: boolean,
|
|
25
|
+
export declare const makeSearchIssuesOrPRsGraphQLBody: (type: 'issue' | 'pr', query: string, cursor: string | null | undefined, supportsEmail: boolean, supportsDrafts?: boolean, enterpriseVersion?: [number, number, number] | null) => GraphQLBody;
|
|
18
26
|
export declare const hasDraftsNotSupportedError: (errors?: GraphQLError[]) => boolean;
|
|
19
27
|
export declare const getDiffLinesFromDiffHunk: (diffHunk: string, originalLine: number | null, originalStartLine: number | null, startDiffSide: 'LEFT' | 'RIGHT' | null) => {
|
|
20
28
|
line: string;
|
|
@@ -22,3 +30,4 @@ export declare const getDiffLinesFromDiffHunk: (diffHunk: string, originalLine:
|
|
|
22
30
|
newLineNumber: number | null;
|
|
23
31
|
type: GitDiffLineType;
|
|
24
32
|
}[];
|
|
33
|
+
export {};
|
|
@@ -5,10 +5,10 @@ export declare enum GitIssueState {
|
|
|
5
5
|
Closed = "CLOSED"
|
|
6
6
|
}
|
|
7
7
|
export interface GetIssueInput {
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
8
|
namespace: string;
|
|
11
|
-
project
|
|
9
|
+
project?: string;
|
|
10
|
+
name: string;
|
|
11
|
+
number: string;
|
|
12
12
|
}
|
|
13
13
|
export type GetIssuesForReposInput = GetReposInput | {
|
|
14
14
|
repoIds: (string | number)[];
|
|
@@ -69,6 +69,12 @@ export declare class Jira extends Provider {
|
|
|
69
69
|
}, options?: EnterpriseOptions): Promise<{
|
|
70
70
|
data: import("./sharedTypes").JiraComponent[];
|
|
71
71
|
}>;
|
|
72
|
+
getIssue(input: {
|
|
73
|
+
resourceId: string;
|
|
74
|
+
number: string;
|
|
75
|
+
}, options?: EnterpriseOptions): Promise<{
|
|
76
|
+
data: import("../issueProvider").Issue;
|
|
77
|
+
}>;
|
|
72
78
|
getIssuesForProject(input: {
|
|
73
79
|
project: string;
|
|
74
80
|
resourceId: string;
|
|
@@ -14,6 +14,12 @@ export declare const normalizeUser: (user: JiraUser, resourceUrl: string | null,
|
|
|
14
14
|
username: string;
|
|
15
15
|
url: string;
|
|
16
16
|
};
|
|
17
|
+
export declare const getIssue: (config: ProviderConfig, input: {
|
|
18
|
+
resourceId?: string;
|
|
19
|
+
number: string;
|
|
20
|
+
} & NumberedPageInput, resourceUrl: string | null, options?: EnterpriseOptions) => Promise<{
|
|
21
|
+
data: Issue;
|
|
22
|
+
}>;
|
|
17
23
|
export declare const getIssuesForResourceForCurrentUser: (config: ProviderConfig, input: {
|
|
18
24
|
resourceId?: string;
|
|
19
25
|
} & NumberedPageInput, resourceUrl: string | null, options?: EnterpriseOptions) => Promise<{
|
|
@@ -21,6 +21,11 @@ export declare class JiraServer extends EnterpriseProvider {
|
|
|
21
21
|
name: string;
|
|
22
22
|
}[];
|
|
23
23
|
}>;
|
|
24
|
+
getIssue(input: {
|
|
25
|
+
number: string;
|
|
26
|
+
}, options?: EnterpriseOptions): Promise<{
|
|
27
|
+
data: import("../issueProvider").Issue;
|
|
28
|
+
}>;
|
|
24
29
|
getIssuesForProject(input: {
|
|
25
30
|
project: string;
|
|
26
31
|
assigneeLogins?: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitkraken/provider-apis",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.5",
|
|
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",
|