@gitkraken/provider-apis 0.46.1 → 0.47.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 +8 -0
- package/dist/index.js +154 -154
- package/dist/index.provider-utils.js +1 -1
- package/dist/index.providers.js +154 -154
- package/dist/providers/azureDevops/azureDevOps.d.ts +3 -1
- package/dist/providers/gitProvider.d.ts +3 -1
- package/dist/providers/github/github.d.ts +3 -1
- package/dist/providers/gitlab/gitlab.d.ts +5 -1
- package/dist/types/exportedTypes/gitProvider.d.ts +13 -0
- package/dist/types/internalTypes/azureDevOps.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AzureGetRepoInput, AzureGetReposInput, AzureGraphAccount, AzureOrganization, AzureProject, AzureSetAccountInput, AzureSetIssueInput, AzureSetPullRequestInput, PullRequestAsyncStatus, StatusByWorkItemIdByStatusId, WorkItemType } from '../../types/exportedTypes/azureDevOps';
|
|
2
|
-
import { AddInlineCommentInput, CursorPageInput, DeleteCommentInput, EditCommentInput, EnterpriseOptions, GetMergeBaseInput, GetPRForRepoInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitComment, GitMergeStrategy, GitPullRequest, GitPullRequestReview, GitRepository, GitRepositoryPermissions, NumberedPageInput, PageInput, ResolveReviewThreadInput, SetAccountInput, SetLabelInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
|
|
2
|
+
import { AddInlineCommentInput, CursorPageInput, DeleteCommentInput, EditCommentInput, EnterpriseOptions, GetMergeBaseInput, GetPRForRepoInput, GetPullRequestDescriptionInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitComment, GitMergeStrategy, GitPullRequest, GitPullRequestReview, GitRepository, GitRepositoryPermissions, NumberedPageInput, PageInput, PullRequestDescription, ResolveReviewThreadInput, SetAccountInput, SetLabelInput, SetPullRequestDescriptionInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
|
|
3
3
|
import { Issue, SetStatusInput } from '../../types/exportedTypes/issueProvider';
|
|
4
4
|
import { PagedResult, Result } from '../../types/exportedTypes/types';
|
|
5
5
|
import { GitProvider } from '../gitProvider';
|
|
@@ -338,6 +338,8 @@ export declare class AzureDevOps extends EnterpriseProvider implements GitProvid
|
|
|
338
338
|
}[];
|
|
339
339
|
}>;
|
|
340
340
|
getPullRequestForRepo(input: GetPRForRepoInput, options?: EnterpriseOptions): Promise<Result<GitPullRequest | null>>;
|
|
341
|
+
getPullRequestDescription(input: GetPullRequestDescriptionInput, options?: EnterpriseOptions): Promise<Result<PullRequestDescription>>;
|
|
342
|
+
setPullRequestDescription(input: SetPullRequestDescriptionInput, options?: EnterpriseOptions): Promise<Result<PullRequestDescription>>;
|
|
341
343
|
getMergeBase(input: GetMergeBaseInput, options?: EnterpriseOptions): Promise<Result<string>>;
|
|
342
344
|
getFileContents(input: {
|
|
343
345
|
repo: GetRepoInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, AddInlineCommentInput, CreateCommitInput, DeleteCommentInput, EditCommentInput, GetMergeBaseInput, GetPRForRepoInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitBlame, GitComment, GitLabel, GitMergeStrategy, GitPullRequest, GitRefWithCommit, GitRepository, Options, PageInput, ResolveReviewThreadInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput, User } from '../types/exportedTypes/gitProvider';
|
|
1
|
+
import { Account, AddInlineCommentInput, CreateCommitInput, DeleteCommentInput, EditCommentInput, GetMergeBaseInput, GetPRForRepoInput, GetPullRequestDescriptionInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitBlame, GitComment, GitLabel, GitMergeStrategy, GitPullRequest, GitRefWithCommit, GitRepository, Options, PageInput, PullRequestDescription, ResolveReviewThreadInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestDescriptionInput, SetPullRequestInput, User } from '../types/exportedTypes/gitProvider';
|
|
2
2
|
import { PagedResult, Result } from '../types/exportedTypes/types';
|
|
3
3
|
export interface GitProvider {
|
|
4
4
|
getCurrentUser?(input: Record<string, never>, options: Options): Promise<Result<Account>>;
|
|
@@ -31,6 +31,8 @@ export interface GitProvider {
|
|
|
31
31
|
}, options: Options): Promise<Result<GitBlame>>;
|
|
32
32
|
getPullRequestsForRepos?(input: GetReposInput, options: Options): Promise<Result<GitPullRequest[]>>;
|
|
33
33
|
getPullRequestForRepo?(input: GetPRForRepoInput, options: Options): Promise<Result<GitPullRequest | null>>;
|
|
34
|
+
getPullRequestDescription?(input: GetPullRequestDescriptionInput, options: Options): Promise<Result<PullRequestDescription>>;
|
|
35
|
+
setPullRequestDescription?(input: SetPullRequestDescriptionInput, options: Options): Promise<Result<PullRequestDescription>>;
|
|
34
36
|
setPullRequestAssignees?(input: {
|
|
35
37
|
pullRequest: SetPullRequestInput;
|
|
36
38
|
assignees: SetAccountInput[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, AddInlineCommentInput, CreateCommitInput, CursorPageInput, DeleteCommentInput, EditCommentInput, EnterpriseOptions, GetMergeBaseInput, GetRepoErrorData, GetRepoInput, GitComment, GitLabel, GitMergeStrategy, GitMilestone, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, GitTreeItem, NumberedPageInput, Organization, ResolveReviewThreadInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
|
|
1
|
+
import { Account, AddInlineCommentInput, CreateCommitInput, CursorPageInput, DeleteCommentInput, EditCommentInput, EnterpriseOptions, GetMergeBaseInput, GetPullRequestDescriptionInput, GetRepoErrorData, GetRepoInput, GitComment, GitLabel, GitMergeStrategy, GitMilestone, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, GitTreeItem, NumberedPageInput, Organization, PullRequestDescription, ResolveReviewThreadInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestDescriptionInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
|
|
2
2
|
import { FetchIssuesData, FetchPullRequestsData, GitHubIssueCloseReason } from '../../types/exportedTypes/github';
|
|
3
3
|
import { Issue, SetIssueInput } from '../../types/exportedTypes/issueProvider';
|
|
4
4
|
import { Result } from '../../types/exportedTypes/types';
|
|
@@ -261,6 +261,8 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider, I
|
|
|
261
261
|
}, options?: EnterpriseOptions): Promise<{
|
|
262
262
|
data: GitPullRequest | null;
|
|
263
263
|
}>;
|
|
264
|
+
getPullRequestDescription(input: GetPullRequestDescriptionInput, options?: EnterpriseOptions): Promise<Result<PullRequestDescription>>;
|
|
265
|
+
setPullRequestDescription(input: SetPullRequestDescriptionInput, options?: EnterpriseOptions): Promise<Result<PullRequestDescription>>;
|
|
264
266
|
getPullRequestByGraphQLId(input: {
|
|
265
267
|
graphQLId: string;
|
|
266
268
|
}, options?: EnterpriseOptions): Promise<{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Account, AddInlineCommentInput, CursorPageInput, DeleteCommentInput, EditCommentInput, EnterpriseOptions, GetMergeBaseInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitComment, GitLabel, GitMergeStrategy, GitPullRequest, GitPullRequestReview, GitRepository, GitTreeItem, NumberedPageInput, ResolveReviewThreadInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
|
|
1
|
+
import { Account, AddInlineCommentInput, CursorPageInput, DeleteCommentInput, EditCommentInput, EnterpriseOptions, GetMergeBaseInput, GetPullRequestDescriptionInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitComment, GitLabel, GitMergeStrategy, GitPullRequest, GitPullRequestReview, GitRepository, GitTreeItem, NumberedPageInput, PullRequestDescription, ResolveReviewThreadInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestDescriptionInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
|
|
2
2
|
import { GitLabGetIssueInput, PullRequestAssociation } from '../../types/exportedTypes/gitlab';
|
|
3
3
|
import { Issue, SetIssueInput } from '../../types/exportedTypes/issueProvider';
|
|
4
|
+
import { Result } from '../../types/exportedTypes/types';
|
|
4
5
|
import { GitProvider } from '../gitProvider';
|
|
5
6
|
import { IssueProvider } from '../issueProvider';
|
|
6
7
|
import { EnterpriseProvider } from '../provider';
|
|
@@ -317,6 +318,9 @@ export declare class GitLab extends EnterpriseProvider implements GitProvider, I
|
|
|
317
318
|
}, options?: EnterpriseOptions): Promise<{
|
|
318
319
|
data: GitPullRequest | null;
|
|
319
320
|
}>;
|
|
321
|
+
private getMergeRequestUrl;
|
|
322
|
+
getPullRequestDescription(input: GetPullRequestDescriptionInput, options?: EnterpriseOptions): Promise<Result<PullRequestDescription>>;
|
|
323
|
+
setPullRequestDescription(input: SetPullRequestDescriptionInput, options?: EnterpriseOptions): Promise<Result<PullRequestDescription>>;
|
|
320
324
|
/**
|
|
321
325
|
* Returns the raw contents of a file at the given ref as a {@link Blob}.
|
|
322
326
|
* Matches the {@link GitHub.getFileContents} contract — call `.text()` for text files; binary files are preserved.
|
|
@@ -255,6 +255,19 @@ export type GetPRForRepoInput = {
|
|
|
255
255
|
repo: GetRepoInput;
|
|
256
256
|
number: number;
|
|
257
257
|
};
|
|
258
|
+
export type GetPullRequestDescriptionInput = {
|
|
259
|
+
repo: GetRepoInput;
|
|
260
|
+
number: number;
|
|
261
|
+
};
|
|
262
|
+
export type SetPullRequestDescriptionInput = {
|
|
263
|
+
repo: GetRepoInput;
|
|
264
|
+
number: number;
|
|
265
|
+
description: string;
|
|
266
|
+
};
|
|
267
|
+
export interface PullRequestDescription {
|
|
268
|
+
description: string | null;
|
|
269
|
+
descriptionHtml?: string | null;
|
|
270
|
+
}
|
|
258
271
|
export interface SetPullRequestInput {
|
|
259
272
|
id: string;
|
|
260
273
|
number: number;
|
|
@@ -206,10 +206,11 @@ export interface AzureIteration {
|
|
|
206
206
|
export interface AzureIterationChange {
|
|
207
207
|
changeId: number;
|
|
208
208
|
item: {
|
|
209
|
-
path: string;
|
|
209
|
+
path: string | null;
|
|
210
210
|
originalPath?: string;
|
|
211
211
|
};
|
|
212
|
-
|
|
212
|
+
originalPath?: string;
|
|
213
|
+
changeType: string | number;
|
|
213
214
|
}
|
|
214
215
|
export declare enum AzureThreadStatus {
|
|
215
216
|
Unknown = 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitkraken/provider-apis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.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",
|