@gitkraken/provider-apis 0.27.1 → 0.27.3

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,5 +1,5 @@
1
1
  import { AzureGetRepoInput, AzureGetReposInput, AzureGraphAccount, AzureOrganization, AzureProject, AzureSetAccountInput, AzureSetIssueInput, AzureSetPullRequestInput, PullRequestAsyncStatus, StatusByWorkItemIdByStatusId, WorkItemType } from '../../types/exportedTypes/azureDevOps';
2
- import { CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GetReposInput, GitMergeStrategy, GitPullRequest, GitRepository, NumberedPageInput, Options, SetAccountInput, SetLabelInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
2
+ import { CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GetReposInput, GitMergeStrategy, GitPullRequest, GitRepository, GitRepositoryPermissions, NumberedPageInput, Options, 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';
@@ -94,14 +94,20 @@ export declare class AzureDevOps extends Provider implements GitProvider, IssueP
94
94
  }[];
95
95
  }>;
96
96
  getRepo(input: AzureGetRepoInput, options?: Options): Promise<{
97
- data: GitRepository;
97
+ data: GitRepository & {
98
+ projectId: string;
99
+ };
98
100
  }>;
99
101
  getRepos(inputs: AzureGetRepoInput[], options?: Options): Promise<{
100
- data: GitRepository[];
102
+ data: (GitRepository & {
103
+ projectId: string;
104
+ })[];
101
105
  errors: GetRepoErrorData[];
102
106
  }>;
103
107
  getReposForAzureProject(input: AzureGetReposInput, options?: Options): Promise<{
104
- data: GitRepository[];
108
+ data: (GitRepository & {
109
+ projectId: string;
110
+ })[];
105
111
  }>;
106
112
  private getRefs;
107
113
  getBranches(inputs: {
@@ -255,6 +261,35 @@ export declare class AzureDevOps extends Provider implements GitProvider, IssueP
255
261
  };
256
262
  data: Issue[];
257
263
  }>;
264
+ getPermissionsForRepos(input: {
265
+ namespace: string;
266
+ repos: {
267
+ projectId: string;
268
+ id: string;
269
+ }[];
270
+ }, options?: EnterpriseOptions): Promise<{
271
+ data: Record<string, GitRepositoryPermissions>;
272
+ }>;
273
+ decorateReposWithPermissions(input: {
274
+ namespace: string;
275
+ repos: (GitRepository & {
276
+ projectId: string;
277
+ })[];
278
+ }, options?: EnterpriseOptions): Promise<{
279
+ data: {
280
+ permissions: GitRepositoryPermissions;
281
+ id: string;
282
+ graphQLId?: string | undefined;
283
+ namespace: string;
284
+ name: string;
285
+ project?: string | undefined;
286
+ projectId: string;
287
+ webUrl: string | null;
288
+ httpsUrl: string | null;
289
+ sshUrl: string | null;
290
+ defaultBranch: import("../../types/exportedTypes/gitProvider").GitRef | null;
291
+ }[];
292
+ }>;
258
293
  private updateIssue;
259
294
  setIssueStatus(input: {
260
295
  issue: AzureSetIssueInput;
@@ -1,5 +1,5 @@
1
1
  import { RefreshTokenResponse } from '../../types/exportedTypes/bitbucket';
2
- import { Account, CursorPageInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitMergeStrategy, GitPullRequest, GitRepository, NumberedPageInput, Options, SetAccountInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
2
+ import { Account, CursorPageInput, GetRepoErrorData, GetRepoInput, GetReposInput, GitMergeStrategy, GitPullRequest, GitRepository, GitRepositoryPermissions, NumberedPageInput, Options, SetAccountInput, SetPullRequestInput } from '../../types/exportedTypes/gitProvider';
3
3
  import { GitProvider } from '../gitProvider';
4
4
  import { Provider } from '../provider';
5
5
  export declare class Bitbucket extends Provider implements GitProvider {
@@ -116,6 +116,30 @@ export declare class Bitbucket extends Provider implements GitProvider {
116
116
  };
117
117
  data: Account[];
118
118
  }>;
119
+ getReposPermissionsForCurrentUser(input: NumberedPageInput, options?: Options): Promise<{
120
+ pageInfo: {
121
+ hasNextPage: boolean;
122
+ nextPage: number | null;
123
+ };
124
+ data: Record<string, GitRepositoryPermissions>;
125
+ }>;
126
+ decorateReposWithPermissions(input: {
127
+ repos: GitRepository[];
128
+ }, options?: Options): Promise<{
129
+ data: {
130
+ permissions: GitRepositoryPermissions;
131
+ id: string;
132
+ graphQLId?: string | undefined;
133
+ namespace: string;
134
+ name: string;
135
+ project?: string | undefined;
136
+ projectId?: string | undefined;
137
+ webUrl: string | null;
138
+ httpsUrl: string | null;
139
+ sshUrl: string | null;
140
+ defaultBranch: import("../../types/exportedTypes/gitProvider").GitRef | null;
141
+ }[];
142
+ }>;
119
143
  closePullRequest(input: {
120
144
  pullRequest: SetPullRequestInput;
121
145
  }, options?: Options): Promise<void>;
@@ -199,4 +199,18 @@ export type BitbucketAccount = {
199
199
  self: Link;
200
200
  };
201
201
  };
202
+ export type BitbucketRepositoryPermissions = {
203
+ repository: {
204
+ type: 'repository';
205
+ full_name: string;
206
+ links: CommonLinks & {
207
+ avatar: Link;
208
+ };
209
+ name: string;
210
+ uuid: string;
211
+ };
212
+ type: 'repository_permission';
213
+ permission: 'owner' | 'admin' | 'write' | 'read' | 'none';
214
+ user: UserStub;
215
+ };
202
216
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitkraken/provider-apis",
3
- "version": "0.27.1",
3
+ "version": "0.27.3",
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",