@gitkraken/provider-apis 0.28.1 → 0.28.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.
@@ -96,6 +96,8 @@ export declare class Bitbucket extends Provider implements GitProvider {
96
96
  getPullRequestsForRepo(input: {
97
97
  repo: GetRepoInput;
98
98
  authorLogin?: string;
99
+ reviewerId?: string;
100
+ useOrFilter?: boolean;
99
101
  } & NumberedPageInput, options?: Options): Promise<{
100
102
  pageInfo: {
101
103
  hasNextPage: boolean;
@@ -105,6 +107,8 @@ export declare class Bitbucket extends Provider implements GitProvider {
105
107
  }>;
106
108
  getPullRequestsForRepos(input: {
107
109
  authorLogin?: string;
110
+ reviewerId?: string;
111
+ useOrFilter?: boolean;
108
112
  } & GetReposInput, options?: Options): Promise<{
109
113
  data: GitPullRequest[];
110
114
  }>;
@@ -22,6 +22,7 @@ export declare const makeGitHubGraphQLRequest: <T>(config: ProviderConfig, data:
22
22
  export declare const hasEmailScope: (scopes: string[]) => boolean;
23
23
  export declare const getAccountFields: (withAvatarSizeVar?: boolean, includeEmail?: boolean, fields?: FieldMap<Account>) => string;
24
24
  export declare const getBotFields: (withAvatarSizeVar?: boolean) => string;
25
+ export declare const getEnterpriseUserAccountFields: (withAvatarSizeVar?: boolean) => string;
25
26
  export declare const getPullRequestFields: (isDraftPullRequestSupported: boolean, includeEmail: boolean | undefined, enterpriseVersion: [number, number, number] | null) => string;
26
27
  export declare const getIssueFields: (includeEmail: boolean | undefined, enterpriseVersion: [number, number, number] | null) => string;
27
28
  export declare const GithubSearchSyntaxQualifiers: Record<string, string>;
@@ -148,6 +148,10 @@ export interface GitPullRequestPermissions {
148
148
  canMerge: boolean;
149
149
  canMergeAndBypassProtections: boolean;
150
150
  }
151
+ export interface GitRepositoryRemoteInfo {
152
+ cloneUrlHTTPS: string;
153
+ cloneUrlSSH: string;
154
+ }
151
155
  export interface GitPullRequest {
152
156
  id: string;
153
157
  graphQLId?: string;
@@ -183,10 +187,7 @@ export interface GitPullRequest {
183
187
  owner: {
184
188
  login: string;
185
189
  };
186
- remoteInfo: {
187
- cloneUrlHTTPS: string;
188
- cloneUrlSSH: string;
189
- } | null;
190
+ remoteInfo: GitRepositoryRemoteInfo | null;
190
191
  };
191
192
  headRepository: {
192
193
  id: string;
@@ -196,10 +197,7 @@ export interface GitPullRequest {
196
197
  owner: {
197
198
  login: string;
198
199
  };
199
- remoteInfo: {
200
- cloneUrlHTTPS: string;
201
- cloneUrlSSH: string;
202
- } | null;
200
+ remoteInfo: GitRepositoryRemoteInfo | null;
203
201
  } | null;
204
202
  headCommit: {
205
203
  buildStatuses: GitBuildStatus[] | null;
@@ -63,9 +63,10 @@ export interface Tag extends Ref {
63
63
  };
64
64
  };
65
65
  }
66
- interface RepositoryStub {
66
+ export interface RepositoryStub {
67
67
  links: CommonLinks & {
68
68
  avatar: Link;
69
+ clone?: NamedLink<'https' | 'ssh'>[];
69
70
  };
70
71
  type: 'repository';
71
72
  name: string;
@@ -158,6 +159,14 @@ export interface User extends UserStub {
158
159
  location: string | null;
159
160
  }
160
161
  export type PullRequestState = 'OPEN' | 'MERGED' | 'DECLINED';
162
+ export type BitbucketPullRequestParticipant = {
163
+ type: 'participant';
164
+ user: UserStub;
165
+ role: 'PARTICIPANT' | 'REVIEWER';
166
+ approved: boolean;
167
+ state: null | 'approved' | 'changes_requested';
168
+ participated_on: null | string;
169
+ };
161
170
  export interface BitbucketPullRequest {
162
171
  description: string;
163
172
  links: PullRequestLinks;
@@ -177,6 +186,7 @@ export interface BitbucketPullRequest {
177
186
  author: UserStub;
178
187
  merge_commit: CommitStub | null;
179
188
  closed_by: UserStub | null;
189
+ participants?: BitbucketPullRequestParticipant[];
180
190
  }
181
191
  export interface BitbucketWorkspace {
182
192
  type: 'workspace_membership';
@@ -94,6 +94,13 @@ export interface GraphQLBot {
94
94
  avatarUrl: string;
95
95
  url: string;
96
96
  }
97
+ export type GraphQLEnterpriseUserAccount = {
98
+ __typename: 'EnterpriseUserAccount';
99
+ id: string;
100
+ login: string;
101
+ avatarUrl: string;
102
+ url: string;
103
+ };
97
104
  export interface GraphQLOrganization {
98
105
  id: string;
99
106
  databaseId: number;
@@ -144,6 +151,7 @@ export interface GraphQLContext {
144
151
  state: GitHubStatusState;
145
152
  targetUrl: string;
146
153
  }
154
+ export type GraphQLLatestReviewAuthorType = GraphQLUser | GraphQLEnterpriseUserAccount | Record<string, never> | null;
147
155
  type GraphQLPullRequestBase = {
148
156
  id: string;
149
157
  title: string;
@@ -165,7 +173,7 @@ type GraphQLPullRequestBase = {
165
173
  assignees: {
166
174
  nodes: (GraphQLUser | null)[] | null;
167
175
  };
168
- author: GraphQLUser | GraphQLBot | Record<string, never> | null;
176
+ author: GraphQLUser | GraphQLBot | GraphQLEnterpriseUserAccount | Record<string, never> | null;
169
177
  commits: {
170
178
  nodes: ({
171
179
  commit: {
@@ -221,7 +229,7 @@ type GraphQLPullRequestBase = {
221
229
  } | null;
222
230
  latestReviews?: {
223
231
  nodes: ({
224
- author: GraphQLUser;
232
+ author: GraphQLLatestReviewAuthorType;
225
233
  state: GitHubPullRequestReviewState;
226
234
  } | null)[] | null;
227
235
  } | null;
@@ -261,7 +269,7 @@ type GraphQLIssueBase = {
261
269
  assignees: {
262
270
  nodes: (GraphQLUser | null)[] | null;
263
271
  };
264
- author: GraphQLUser | GraphQLBot | Record<string, never> | null;
272
+ author: GraphQLUser | GraphQLBot | GraphQLEnterpriseUserAccount | Record<string, never> | null;
265
273
  closedAt: string | null;
266
274
  createdAt: string;
267
275
  updatedAt: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitkraken/provider-apis",
3
- "version": "0.28.1",
3
+ "version": "0.28.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",