/** @packageDocumentation * @module iTwinServiceClients */ import { WsgClient } from "./WsgClient"; import { RequestQueryOptions, RequestOptions } from "./Request"; import { WsgInstance } from "./ECJsonTypeMap"; import { AuthorizedClientRequestContext } from "./AuthorizedClientRequestContext"; /** Connect context type * @beta */ export declare enum ContextType { Unknown = 0, Asset = 2, Project = 3 } /** Connect context. Currently supported contexts are [[Project]] and [[Asset]]. * @beta */ export declare class Context extends WsgInstance { contextTypeId?: ContextType; name?: string; number?: string; ultimateRefId?: string; dataLocationId?: string; status?: number; allowExternalTeamMembers?: boolean; } /** * @beta */ declare abstract class CommonContext extends Context { industry?: string; location?: string; latitude?: string; longitude?: string; countryCode?: string; timeZoneLocation?: string; registeredDate?: string; lastModifiedDate?: string; } /** Connect project. Represents time-constrained work done on an [[Asset]]. * @beta */ export declare class Project extends CommonContext { assetId?: string; type?: string; isRbacEnabled?: boolean; } /** Connect asset. Assets represent a large scale item that is owned and/or operated by organization, such as buildings, highways and so on. * @beta */ export declare class Asset extends CommonContext { assetType?: string; } /** RBAC project * @internal */ export declare class RbacProject extends WsgInstance { } /** RBAC user * @internal */ export declare class RbacUser extends WsgInstance { } /** RBAC permission * @internal */ export declare class Permission extends WsgInstance { name?: string; description?: string; serviceGprId?: number; categoryId?: number; } /** Options to request connect projects * @beta */ export interface ConnectRequestQueryOptions extends RequestQueryOptions { /** Set to true to request the most recently used projects */ isMRU?: boolean; /** Set to true to request the favorite projects */ isFavorite?: boolean; } /** @internal */ export interface RbacRequestQueryOptions extends RequestQueryOptions { rbacOnly?: boolean; } /** Client API to access the connect services. * @beta */ export declare class ConnectClient extends WsgClient { static readonly searchKey: string; static readonly configRelyingPartyUri = "imjs_connected_context_service_relying_party_uri"; constructor(); /** * Gets name/key to query the service URLs from the URL Discovery Service ("Buddi") * @returns Search key for the URL. */ protected getUrlSearchKey(): string; protected setupOptionDefaults(options: RequestOptions): Promise; /** * Gets theRelyingPartyUrl for the service. * @returns RelyingPartyUrl for the service. */ protected getRelyingPartyUrl(): string; /** * Gets connect projects accessible to the authorized user. * @param requestContext The client request context * @param queryOptions Query options. Use the mapped EC property names in the query strings and not the TypeScript property names. * @returns Resolves to an array of projects. */ getProjects(requestContext: AuthorizedClientRequestContext, queryOptions?: ConnectRequestQueryOptions): Promise; /** * Gets a connect project. * @param requestContext The client request context * @param queryOptions Query options. Use the mapped EC property names in the query strings and not the TypeScript property names. * @returns Resolves to the found project. Rejects if no projects, or more than one project is found. */ getProject(requestContext: AuthorizedClientRequestContext, queryOptions?: ConnectRequestQueryOptions): Promise; /** Get the projects the user has been "invited" to. * @param token Delegation token of the authorized user. * @param queryOptions Query options. Use the mapped EC property names in the query strings and not the TypeScript property names. * @returns Resolves to an array of invited projects. */ getInvitedProjects(requestContext: AuthorizedClientRequestContext, queryOptions?: ConnectRequestQueryOptions): Promise; /** * Gets a connect asset. * @param requestContext The client request context * @param queryOptions Query options. Use the mapped EC property names in the query strings and not the TypeScript property names. * @returns Resolves to the found asset. Rejects if no assets, or more than one asset is found. */ getAsset(requestContext: AuthorizedClientRequestContext, queryOptions?: RequestQueryOptions): Promise; /** * Gets connect assets accessible to the authorized user. * @param requestContext The client request context * @param queryOptions Query options. Use the mapped EC property names in the query strings and not the TypeScript property names. * @returns Resolves to an array of assets. */ getAssets(requestContext: AuthorizedClientRequestContext, queryOptions?: RequestQueryOptions): Promise; } export {}; //# sourceMappingURL=ConnectClients.d.ts.map