/** @packageDocumentation * @module FormDataManagementService */ import { WsgInstance } from "./ECJsonTypeMap"; import { WsgClient } from "./WsgClient"; import { AuthorizedClientRequestContext } from "./AuthorizedClientRequestContext"; /** FormDefinition * @internal */ export declare class FormDefinition extends WsgInstance { status?: string; formId?: string; name?: string; classDisplayLabel?: string; className?: string; classSchema?: string; definition?: string; type?: string; isShared?: boolean; shareType?: number; projectId?: string; projectNumber?: string; projectName?: string; discipline?: string; classification?: string; errorStatus?: string; } /** FormData * @internal */ export declare class FormInstanceData extends WsgInstance { properties?: any; formDataDirection?: string; formDataSchemaName?: string; formId?: string; formSchemaName?: string; formName?: string; formDisplayLabel?: string; } /** @internal */ export declare class FormDataManagementClient extends WsgClient { static readonly searchKey: string; static readonly configRelyingPartyUri = "imjs_form_data_management_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; /** * Gets theRelyingPartyUrl for the service. * @returns RelyingPartyUrl for the service. */ protected getRelyingPartyUrl(): string; /** * get form definitions and their meta data from the form data management client * @param requestContext The client request context * @param projectId the project associated with the form definitions * @param filter [optional] can either supply a string or an array of property names and values which are then unioned together as a string and inserted into the url to exclude definitions * @param format either xml or json, this corresponds to the actual form definition which will be returned a string property, but can be parse into the format specified */ getFormDefinitions(requestContext: AuthorizedClientRequestContext, projectId: string, filter?: string | Array<{ name: string; value: string; }>, format?: "json" | "xml"): Promise; /** * get form definitions that have the classification "Risk" and the discipline "Issue" * @param requestContext The client request context * @param projectId the project associated with the form definitions */ getRiskIssueFormDefinitions(requestContext: AuthorizedClientRequestContext, projectId: string): Promise; /** * get the form data instances from the form data management client. Note this the data saved from a user filling out a form definition, it is not the form definition itself, * furthermore, the data does not correspond directly to a form definition but rather the 'class' both this data and a form definition share. That 'class' can be said to 'own' the properties * that are referenced by both a form definition and this * @param requestContext The client request context * @param projectId the project associated with the form data * @param className the name of the class that owns the properties for which each instance binds data to (note this is dynamic, ie a user can create/destroy classes) * @param skip the starting index of instances to fetch (accommodates paging to reduce the request payload) * @param top the maximum number of instances to return * @param filter [optional] can either supply a string or an array of property names and values which are then unioned together as a string and inserted into the url to exclude data instances */ getFormData(requestContext: AuthorizedClientRequestContext, projectId: string, className: string, skip?: number, top?: number, filter?: string | Array<{ name: string; value: string; }>): Promise; /** * utility function to construct a filter string that can be insert into the request url to exclude instances * @param filters an array of property names and the values to filter them against */ static buildFormDataFilter(filters: Array<{ name: string; value: string; }>): string; /** * get form data instances with the "Risk" classification, "Issue" discipline, and the given iModelId which is stored as the data instance's "_ContainerId" property * @param requestContext The client request context * @param projectId the project associated with the form data * @param iModelId the iModelId associated with the form data * @param className the name of the class that owns the properties for which each instance binds data to (note this is dynamic, ie a user can create/destroy classes) * @param skip the starting index of instances to fetch (accommodates paging to reduce the request payload) * @param top the maximum number of instances to return */ getRiskIssueFormData(requestContext: AuthorizedClientRequestContext, projectId: string, iModelId: string, className?: string, skip?: number, top?: number): Promise; /** * create/update a form data instance with given form data * @param requestContext The client request context * @param formData the data to be persisted * @param projectId the project associated with the form data * @param className the name of the class that owns the properties for which each instance binds data to (note this is dynamic, ie a user can create/destroy classes) * @param instanceId [optional] if provided the data is used to update an existing form data instance, otherwise a new instance is created */ postFormData(requestContext: AuthorizedClientRequestContext, formData: FormInstanceData, projectId: string, className?: string, instanceId?: string): Promise; /** * create/update a form data instance with given form data that is associated by the classification "Risk", discipline "Issue", and the element and imodel ids provided * @param requestContext The client request context * @param properties the data to be persisted, note due to the dynamic nature of classes this cannot be generalized by a specific type * @param projectId the project associated with the form data * @param iModelId the iModelId associated with the form data (bound to the _ContainerId reference property) * @param elementId the elementId associated with the form data (bound to the _ItemId reference property) * @param formId the form definition the form data was filled out from * @param className the name of the class that owns the properties for which each instance binds data to (note this is dynamic, ie a user can create/destroy classes) * @param instanceId [optional] if provided the data is used to update an existing form data instance, otherwise a new instance is created */ postRiskIssueFormData(requestContext: AuthorizedClientRequestContext, properties: any, projectId: string, iModelId: string, elementId: string, formId: string, className?: string, instanceId?: string): Promise; } //# sourceMappingURL=FormDataManagementClient.d.ts.map