@gitkraken/provider-apis 0.25.10 → 0.26.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.
@@ -68,8 +68,22 @@ export declare class Bitbucket extends Provider implements GitProvider {
68
68
  };
69
69
  }[];
70
70
  }>;
71
- getPullRequestsForUser(input: {
71
+ getWorkspacesForUser(input: {
72
72
  userId: string;
73
+ } & NumberedPageInput, options?: Options): Promise<{
74
+ pageInfo: {
75
+ hasNextPage: boolean;
76
+ nextPage: number | null;
77
+ };
78
+ data: {
79
+ id: string;
80
+ slug: string;
81
+ name: string;
82
+ }[];
83
+ }>;
84
+ getPullRequestsForUserAndWorkspace(input: {
85
+ userId: string;
86
+ workspaceSlug: string;
73
87
  } & NumberedPageInput, options?: Options): Promise<{
74
88
  pageInfo: {
75
89
  hasNextPage: boolean;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { Account, CreateCommitInput, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, NumberedPageInput, Organization, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
2
+ import { Account, CreateCommitInput, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, GitTreeItem, NumberedPageInput, Organization, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
3
3
  import { FetchIssuesData, FetchPullRequestsData, GitHubIssueCloseReason } from '../../types/exportedTypes/github';
4
4
  import { Issue, SetIssueInput } from '../../types/exportedTypes/issueProvider';
5
5
  import { GitProvider } from '../gitProvider';
@@ -394,4 +394,10 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider, I
394
394
  };
395
395
  data: GitLabel[];
396
396
  }>;
397
+ getTreeForRepo(input: {
398
+ repo: GetRepoInput;
399
+ branch: string;
400
+ }, options?: EnterpriseOptions): Promise<{
401
+ data: GitTreeItem[];
402
+ }>;
397
403
  }
@@ -13,3 +13,8 @@ export interface BitbucketServerMergeStrategy {
13
13
  id: string;
14
14
  name: string;
15
15
  }
16
+ export interface BitbucketWorkspaceStub {
17
+ id: string;
18
+ name: string;
19
+ slug: string;
20
+ }
@@ -299,3 +299,7 @@ export interface GetRepoErrorData {
299
299
  input: GetRepoInput;
300
300
  error?: Error;
301
301
  }
302
+ export interface GitTreeItem {
303
+ path: string;
304
+ isDirectory: boolean;
305
+ }
@@ -178,4 +178,17 @@ export interface BitbucketPullRequest {
178
178
  merge_commit: CommitStub | null;
179
179
  closed_by: UserStub | null;
180
180
  }
181
+ export interface BitbucketWorkspace {
182
+ type: 'workspace_membership';
183
+ permission: string;
184
+ last_accessed: string;
185
+ added_on: string;
186
+ user: UserStub;
187
+ workspace: {
188
+ type: 'workspace';
189
+ uuid: string;
190
+ name: string;
191
+ slug: string;
192
+ };
193
+ }
181
194
  export {};
@@ -304,3 +304,16 @@ export interface GraphQLReviewComment {
304
304
  } | null;
305
305
  url: string;
306
306
  }
307
+ export interface RESTTreeResponse {
308
+ sha: string;
309
+ url: string;
310
+ tree: RESTTreeItem[];
311
+ truncated: boolean;
312
+ }
313
+ export interface RESTTreeItem {
314
+ path: string;
315
+ mode: string;
316
+ type: string;
317
+ sha: string;
318
+ url: string;
319
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitkraken/provider-apis",
3
- "version": "0.25.10",
3
+ "version": "0.26.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",