packageDocumentation module import { GuidString } from "@itwin/core-bentley" ; import { RequestQueryOptions } from "../itwin-client/Request" ; import { WsgQuery } from "../wsg/WsgQuery" ; import { ArgumentCheck } from "./Errors" ; internal export class StringIdQuery extends WsgQuery { internal protected _byId ? : string ; param id returns throws public byId ( id ) { this . checkValue ( id ) ; this . _byId = id ; this . _query . $pageSize = undefined ; return this ; } internal protected checkValue ( id ) { ArgumentCheck . valid ( "id" , id ) ; } internal public getId ( ) { return this . _byId ; } } internal export class InstanceIdQuery extends WsgQuery { internal protected _byId ? : GuidString ; param id returns throws public byId ( id ) { ArgumentCheck . validGuid ( "id" , id ) ; this . _byId = id ; this . _query . $pageSize = undefined ; return this ; } internal public getId ( ) { return this . _byId ; } } internal export function addSelectFileAccessKey ( query ) { if ( ! query . $select ) query . $select = "*" ; const fileAccessKeySelector = "FileAccessKey-forward-AccessKey.DownloadURL" ; if ( query . $select . indexOf ( fileAccessKeySelector ) === - 1 ) query . $select += `,${ fileAccessKeySelector }` ; } internal export function addSelectContainerAccessKey ( query ) { if ( ! query . $select ) query . $select = "*" ; query . $select += ",HasContainer-forward-ContainerAccessKey.*" ; } internal export function addSelectApplicationData ( query ) { if ( ! query . $select ) query . $select = "*" ; query . $select += ",CreatedByApplication-forward-Application.*" ; }