@gitkraken/provider-apis 0.27.2 → 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 { 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.2",
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",