feat: add auto-completion to workspaces and repositories
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
@@ -85,6 +85,16 @@ export class BitbucketCloudClient {
|
||||
);
|
||||
}
|
||||
|
||||
listWorkspaces(
|
||||
options?: FilterAndSortOptions & PartialResponseOptions,
|
||||
): WithPagination<Models.PaginatedWorkspaces, Models.Workspace> {
|
||||
return new WithPagination(
|
||||
paginationOptions =>
|
||||
this.createUrl('/workspaces', { ...paginationOptions, ...options }),
|
||||
url => this.getTypeMapped(url),
|
||||
);
|
||||
}
|
||||
|
||||
private createUrl(endpoint: string, options?: RequestOptions): URL {
|
||||
const request = new URL(this.config.apiBaseUrl + endpoint);
|
||||
for (const key in options) {
|
||||
|
||||
@@ -264,6 +264,17 @@ export namespace Models {
|
||||
values?: Set<Project>;
|
||||
}
|
||||
|
||||
/**
|
||||
* A paginated list of workspaces.
|
||||
* @public
|
||||
*/
|
||||
export interface PaginatedWorkspaces extends Paginated<Workspace> {
|
||||
/**
|
||||
* The values of the current page.
|
||||
*/
|
||||
values?: Set<Workspace>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Object describing a user's role on resources like commits or pull requests.
|
||||
* @public
|
||||
|
||||
Reference in New Issue
Block a user