@itwin/itwins-client
Version:
iTwins client for the iTwin platform
122 lines • 5.95 kB
TypeScript
/** @packageDocumentation
* @module iTwinsClient
*/
import type { AccessToken } from "@itwin/core-bentley";
import { BaseClient } from "./BaseClient";
import type { ITwin, ITwinQueryScope, ITwinResultMode, ITwinsAccess, ITwinsAPIResponse, ITwinsQueryArg, ITwinsQueryArgBase, ITwinSubClass, RepositoriesQueryArg, Repository } from "./iTwinsAccessProps";
/** Client API to access the itwins service.
* @beta
*/
export declare class ITwinsAccessClient extends BaseClient implements ITwinsAccess {
constructor(url?: string);
/** Get itwins accessible to the user
* @param accessToken The client access token string
* @param subClass Optional parameter to search a specific iTwin subClass
* @param arg Optional query arguments, for paging, searching, and filtering
* @returns Array of projects, may be empty
*/
queryAsync(accessToken: AccessToken,
/**
* @deprecated in 2.0 This property is deprecated, and will be removed in the next major release. Please use `arg` to provide subClass instead.
*/
subClass?: ITwinSubClass, arg?: ITwinsQueryArg): Promise<ITwinsAPIResponse<ITwin[]>>;
/** Create a new iTwin
* @param accessToken The client access token string
* @param iTwin The iTwin to be created
* @returns ITwin
*/
createiTwin(accessToken: AccessToken, iTwin: ITwin): Promise<ITwinsAPIResponse<ITwin>>;
/** Update the specified iTwin
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param iTwin The iTwin to be created
* @returns ITwin
*/
updateiTwin(accessToken: AccessToken, iTwinId: string, iTwin: ITwin): Promise<ITwinsAPIResponse<ITwin>>;
/** Delete the specified iTwin
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @returns No Content
*/
deleteiTwin(accessToken: AccessToken, iTwinId: string): Promise<ITwinsAPIResponse<undefined>>;
/** Create a new iTwin Repository
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param repository The Repository to be created
* @return Repository
*/
createRepository(accessToken: AccessToken, iTwinId: string, repository: Repository): Promise<ITwinsAPIResponse<Repository>>;
/** Delete the specified iTwin Repository
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param repositoryId The id of the Repository
* @return No Content
*/
deleteRepository(accessToken: AccessToken, iTwinId: string, repositoryId: string): Promise<ITwinsAPIResponse<undefined>>;
/** Get Repositories accessible to user
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param arg Optional query arguments, for class and subclass
* @returns Array of Repositories, may be empty
*/
queryRepositoriesAsync(accessToken: AccessToken, iTwinId: string, arg?: RepositoriesQueryArg): Promise<ITwinsAPIResponse<Repository[]>>;
/** Get itwin accessible to the user
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param resultMode (Optional) iTwin result mode: minimal or representation
* @returns Array of projects, may be empty
*/
getAsync(accessToken: AccessToken, iTwinId: string, resultMode?: ITwinResultMode): Promise<ITwinsAPIResponse<ITwin>>;
/** Get itwins accessible to the user
* @param accessToken The client access token string
* @param subClass Optional parameter to search a specific iTwin subClass
* @param arg Optional query arguments, for paging, searching, and filtering
* @returns Array of projects, may be empty
*/
queryFavoritesAsync(accessToken: AccessToken,
/**
* @deprecated in 2.0 This property is deprecated, and will be removed in the next major release. Please use `arg` to provide subClass instead.
*/
subClass?: ITwinSubClass, arg?: ITwinsQueryArgBase): Promise<ITwinsAPIResponse<ITwin[]>>;
/** Get itwins accessible to the user
* @param accessToken The client access token string
* @param subClass Optional parameter to search a specific iTwin subClass
* @param arg Optional query arguments, for paging, searching, and filtering
* @returns Array of projects, may be empty
*/
queryRecentsAsync(accessToken: AccessToken,
/**
* @deprecated in 2.0 This property is deprecated, and will be removed in the next major release. Please use `arg` to provide subClass instead.
*/
subClass?: ITwinSubClass, arg?: ITwinsQueryArgBase): Promise<ITwinsAPIResponse<ITwin[]>>;
/** Get primary account accessible to the user
* @returns Primary account
*/
getPrimaryAccountAsync(accessToken: AccessToken): Promise<ITwinsAPIResponse<ITwin>>;
/**
* Gets the Account for the specified iTwin.
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @returns Account
*/
getAccountAsync(accessToken: AccessToken, iTwinId: string, resultMode?: ITwinResultMode): Promise<ITwinsAPIResponse<ITwin>>;
/**
* Format headers from query arguments
* @param arg (Optional) iTwin query arguments
* @protected
*/
protected getHeaders(arg?: ITwinsQueryArgBase): Record<string, string>;
/**
* Format result mode parameter into a headers entry
* @param resultMode (Optional) iTwin result mode
* @protected
*/
protected getResultModeHeaders(resultMode?: ITwinResultMode): Record<string, string>;
/**
* Format query scope parameter into a headers entry
* @param queryScope (Optional) iTwin query scope
* @protected
*/
protected getQueryScopeHeaders(queryScope?: ITwinQueryScope): Record<string, string>;
}
//# sourceMappingURL=iTwinsClient.d.ts.map