@gitkraken/provider-apis 0.43.0 → 0.45.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.
@@ -1,11 +1,15 @@
1
1
  import { AzureGetRepoInput, AzureGetReposInput, AzureGraphAccount, AzureOrganization, AzureProject, AzureSetAccountInput, AzureSetIssueInput, AzureSetPullRequestInput, PullRequestAsyncStatus, StatusByWorkItemIdByStatusId, WorkItemType } from '../../types/exportedTypes/azureDevOps';
2
- import { CursorPageInput, EnterpriseOptions, GetMergeBaseInput, GetPRForRepoInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitMergeStrategy, GitPullRequest, GitRepository, GitRepositoryPermissions, NumberedPageInput, SetAccountInput, SetLabelInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
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';
3
3
  import { Issue, SetStatusInput } from '../../types/exportedTypes/issueProvider';
4
4
  import { PagedResult, Result } from '../../types/exportedTypes/types';
5
5
  import { GitProvider } from '../gitProvider';
6
6
  import { IssueProvider } from '../issueProvider';
7
7
  import { EnterpriseProvider } from '../provider';
8
8
  export declare class AzureDevOps extends EnterpriseProvider implements GitProvider, IssueProvider {
9
+ private cachedUserIds;
10
+ private inflightUserIds;
11
+ private getCurrentUserId;
12
+ private fetchCurrentUserId;
9
13
  private getRepoApiUrl;
10
14
  /** Note: PATs are not supported for this function, only OAuth tokens are. */
11
15
  getCurrentUser(input?: Record<string, never>, options?: EnterpriseOptions): Promise<{
@@ -344,4 +348,38 @@ export declare class AzureDevOps extends EnterpriseProvider implements GitProvid
344
348
  repo: GetRepoInput;
345
349
  pullRequestId: number;
346
350
  }, options?: EnterpriseOptions): Promise<string>;
351
+ private getPullRequestWriteHeaders;
352
+ private setReviewerVote;
353
+ private postPullRequestThread;
354
+ getCommentsForPullRequest(input: {
355
+ repo: GetRepoInput;
356
+ pullRequestNumber: number;
357
+ } & PageInput, options?: EnterpriseOptions): Promise<PagedResult<GitComment>>;
358
+ addCommentToPullRequest(input: {
359
+ pullRequest: SetPullRequestInput;
360
+ comment: string;
361
+ }, options?: EnterpriseOptions): Promise<void>;
362
+ addInlineCommentToPullRequest(input: AddInlineCommentInput, options?: EnterpriseOptions): Promise<string | undefined>;
363
+ editComment(input: EditCommentInput, options?: EnterpriseOptions): Promise<void>;
364
+ editInlineComment(input: EditCommentInput, options?: EnterpriseOptions): Promise<void>;
365
+ deleteComment(input: DeleteCommentInput, options?: EnterpriseOptions): Promise<void>;
366
+ deleteInlineComment(input: DeleteCommentInput, options?: EnterpriseOptions): Promise<void>;
367
+ resolveReviewThread(input: ResolveReviewThreadInput, options?: EnterpriseOptions): Promise<void>;
368
+ unresolveReviewThread(input: ResolveReviewThreadInput, options?: EnterpriseOptions): Promise<void>;
369
+ approvePullRequest(input: {
370
+ pullRequest: SetPullRequestInput;
371
+ comment?: string;
372
+ }, options?: EnterpriseOptions): Promise<void>;
373
+ requestPullRequestChanges(input: {
374
+ pullRequest: SetPullRequestInput;
375
+ comment: string;
376
+ }, options?: EnterpriseOptions): Promise<void>;
377
+ commentOnPullRequest(input: {
378
+ pullRequest: SetPullRequestInput;
379
+ comment: string;
380
+ }, options?: EnterpriseOptions): Promise<void>;
381
+ getReviewsForPullRequest(input: {
382
+ repo: GetRepoInput;
383
+ pullRequestId: number;
384
+ }, options?: EnterpriseOptions): Promise<Result<GitPullRequestReview[]>>;
347
385
  }
@@ -220,6 +220,11 @@ export declare enum AzureThreadStatus {
220
220
  ByDesign = 5,
221
221
  Pending = 6
222
222
  }
223
+ export declare enum AzureCommentType {
224
+ Text = 1,
225
+ CodeChange = 2,
226
+ System = 3
227
+ }
223
228
  export interface AzureComment {
224
229
  id: number;
225
230
  parentCommentId: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitkraken/provider-apis",
3
- "version": "0.43.0",
3
+ "version": "0.45.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",