// Generated by dts-bundle-generator v9.5.1 export type RequestType = (obj: XhrRequest) => Promise>; export interface HybridFormsClientConfig { baseUrl: string; clientId: string; user?: string; password?: string; token?: string; xhr?: (obj: XhrRequest) => Promise; } export interface XhrRequest { url: string; withCredentials?: boolean; type?: string; data?: any; headers?: Record; user?: string; password?: string; responseType?: XMLHttpRequestResponseType; } export interface FetchResponse { status: number; statusText: string; response: T; responseURL: string; getAllResponseHeaders: () => string; } export interface SigninResponse { access_token: string; token_type: string; expires_in?: number; resource?: string; refresh_token?: string; refresh_token_expires_in?: number; id_token?: string; } declare class Authentication { private readonly baseUrl; private readonly user; private readonly password; private auth; private gatewayData; constructor(baseUrl: string, user: string, password: string); private getAdfsAccess; private getAzureAdAccess; private getBasicAuthAccess; private getGatewayData; getAccess(): Promise; } export interface Client { id: number; title: string; remark: string; errorMail: string; acl: any; modified: string; modifiedBy: string; role: string; } export interface RoamingData { subscribedFormdefinitions: string[]; } export interface UserResponse { displayName: string; accountName: string; companyName: string; pictureURL?: string; id: string; firstname: string; lastname: string; email: string; serverApiUrl?: string; features: any; sigCrypto: string; options?: any; clients?: Client[]; roamingData?: RoamingData; } declare abstract class BaseController { protected readonly config: HybridFormsClientConfig; protected readonly request: RequestType; protected basePath: string; constructor(config: HybridFormsClientConfig, request: RequestType); protected abstract init(): void; } declare class AuthController extends BaseController { protected readonly config: HybridFormsClientConfig; protected readonly request: RequestType; protected readonly authInstance: Authentication | null; constructor(config: HybridFormsClientConfig, request: RequestType, authInstance?: Authentication | null); protected init(): void; getAccess(): Promise; getUserData(): Promise>; getUserDataWithClient(): Promise>; } export interface ModifiedBy { id: number; title: string; upn: string; email: string; isGroup: boolean; } export interface CatalogListResponse { name: string; count: number; modified: string; modifiedUtc: string; modifiedBy: ModifiedBy; hasACL: boolean; clientId: number; clientName: string; remark: string; isReachout: boolean; version: string; XSLFilename: null; useXSL: boolean; originalFilename: string; } export interface JsonExportCatalogEntry { Fields: Record; Users: string[]; Groups: string[]; } export interface JsonExportCatalog { Name: string; Version: string; Remark: string; entries: JsonExportCatalogEntry[]; IgnoreColumns: string[]; } export interface ExportCatalogMapping { json: JsonExportCatalog; xml: string; csv: string; excel: string; } export interface ExportCatalogParams { format?: T; } export interface GetCatalogParams { $select?: string; $orderby?: string; $top?: number; $filter?: string; $skip?: number; [key: string]: any; } export interface GetCatalogResponse { d: ODataResult; } export interface ODataResult { results: Record[]; __count: number | null; __next: number | null; } export interface DeleteCatalogResponse { deleted: boolean; } declare class CatalogsController extends BaseController { protected init(): void; listCatalogs(): Promise>; getCatalog(catalogName: string, params?: GetCatalogParams): Promise>; exportCatalog(catalogName: string, params?: ExportCatalogParams): Promise>; deleteCatalog(catalogName: string): Promise>; createCatalog(catalogName: string, data: string | object): Promise>; updateCatalog(catalogName: string, data: string | object): Promise>; } export interface ACL { id: number; title: string; upn: string; email: null | string; isGroup: boolean; } export interface Area { id: number; clientId: number; title: string; modified: string; modifiedBy: string; } export interface Info { version: string; date: string; minAppVersion: string; minServerVersion: string; conditionsOnRender: boolean; } export interface ServerFile { filename: string; size: number; contentType: string; modified: string; version: number; fileID: number; isReachoutExcluded: boolean; } export interface StageDefinition { stages: Record; } export interface StageNextItem { workflows: string[]; stage?: string; buttonLabel?: string; dialogTitle?: string; dialogMessage?: string; } export interface Stage { key: string; label: string; first: boolean; next: StageNextItem; appKioskMode: boolean; stateChanges: Record; expiry: any[]; } export interface FormDefinitionResponse { id: number; formID: string; version: number; title: string; description: string; culture: string; archiveDays: null; approvedSyncDays: number; deleteDays: number; deleteEditDays: null; deleteGroupDays: null; purgeDeletedDays: number; files: ServerFile[]; flags: Record; created: string; createdBy: string; modified: string; modifiedBy: string; areaId: number; useACL: ACL[]; editACL: ACL[]; adminACL: ACL[]; readonlyACL: ACL[]; role: string; isExtendedReader: boolean; area: Area; subtitle: string; info: Info; isReachout: boolean; reachoutUrl: string; mayUse: boolean; stageDefinition: StageDefinition; } export interface GroupResponse { id: number; title: string; upn: string; email: string; isGroup: boolean; address: string; company: string; logoUrl: string; } declare enum ExpandableDefaultEnum { expanded = "expanded", closed = "closed" } declare enum NextPageConditionEnum { Fullfilled = "fullfilled", Visible = "visible" } declare enum RepeatingOrderEnum { Asc = "asc", Desc = "desc" } /** * HybridForms Conditions - Interfaces */ export type ConditionExpressionOp = "and" | "or"; export type ConditionExpressionType = "page" | "tab" | "block" | "field" | "kiosk" | "stage" | "callback" | "reachout" | "pdf" | "forWeb" | "cordova" | "electron"; export type ConditionExpressionElse = "invisible" | "disabled" | "readonly" | "optional"; export type ConditionExpressionVal = boolean | number | string; export type ConditionExpressionValOp = "equals" | "contains" | "doesnotcontain" | "startswith" | "doesnotstartwith" | "endswith" | "doesnotendwith" | "not" | "gt" | "gte" | "lt" | "lte" | "regexp"; export interface IConditionExpressionElseComplex { readonly: IElseCondition; disabled: IElseCondition; invisible: IElseCondition; optional: IElseCondition; } export interface IConditionExpression { type: ConditionExpressionType; id: string; val?: ConditionExpressionVal; op?: ConditionExpressionValOp; regexpOp: string; nestedOp?: ConditionExpressionOp; cond?: IConditionExpression[]; fullfillMissingField?: boolean; } export interface IElseCondition { cond?: IConditionExpression[]; default?: boolean; op?: ConditionExpressionOp; } export interface ICondition { id: string; cond: IConditionExpression[]; op?: ConditionExpressionOp; else?: ConditionExpressionElse | IConditionExpressionElseComplex; elseCallback?: string; excludeFromValidation?: boolean; inProgress?: boolean; hintText?: string; hintHtml?: string; condstring: string; } export interface IFeatureCondition extends ICondition { addNewMedia?: boolean; } export interface IControlCondition { id: string; fields: string[]; condition: ICondition; state?: IState; conditionControls?: IControlConditions; } export type IControlConditions = Record; /** * HybridForms Validation */ export type FieldValidatorType = "text" | "number" | "email" | "tel" | "date" | "time"; export interface IFieldValidator { type?: FieldValidatorType; min?: number | string; max?: number | string; step?: number; minlength?: number; maxlength?: number; decimals?: number; pattern?: string; anytext?: boolean; allowedValues?: { value: string; text?: string; }[]; custom?: string; jsonSchema?: any; errorText?: string | Record; errorHTML?: string | Record; } /** * LabelControl Interfaces */ export interface IComplexRequiredFields { op: string; fields: string; } export type RequiredFields = string | IComplexRequiredFields[]; export interface IListOptions { dialogHide: boolean; dialogText: string; } /** * HybridForms IField */ export interface IField { id: string; name: string; type: string; required: boolean; fieldset: RequiredFields; requiredFieldsOp?: string; list: boolean; label: string; value: string; defaultValue: string; htmlTag: string; options: Record; format?: string; repeatableDefaultId?: string; validator: IFieldValidator; refBlockCode?: string; refTabCode?: string; refSectionCode?: string; condition?: ICondition; conditionControl?: string[]; customControlClass?: string; removeIf?: string[]; state?: IState; listOptions?: IListOptions; } /** * HybridForms IBlock */ export interface IBlock { code: string; templateId: string; fields: IField[]; repeatable?: boolean; repeatingUnitHeader?: boolean; repeatingUnitFooter?: boolean; repeatablePostfixFieldId?: string; repeatableCount?: number; condition?: ICondition; conditionControls?: IControlConditions; id?: string; cssClasses?: string; rowCssClasses?: string; fullWidth?: boolean; tabTitle?: boolean; captionText?: string; subcaptionText?: string; separator?: "top" | "bottom" | "none"; removeIf?: string[]; state?: IState; } /** * HybridForms ITab */ export interface IRepeatableDataSource { mapping: Record; target?: string | string[]; onChanged?: string; } export type DataSourceMappingEntryType = DataSourceFieldIdType | DataSourceCallbackType; export interface DataSourceCallbackType { sourceIds: DataSourceFieldIdType[]; callback: string; } export type DataSourceFieldIdType = string | { fieldId: string; shadowField: string; }; export interface IDynamicPlaceholder { phKey: string; pipe: string; } export type DynamicRepeatingUnitTrigger = "automatic" | "manual"; export interface IDynamicRepeatingUnit { source: any; trigger: DynamicRepeatingUnitTrigger; onFinished: string; filter: string; } export interface ITab { id: string; code: string; label: string; htmlLabel?: string; hideLabelPDF?: boolean; expandable: boolean; expandableId: string; expandableDefault?: ExpandableDefaultEnum; blocks: IBlock[]; blockTemplates: IBlock[]; repeatable: boolean; repeatableDynamic: IDynamicRepeatingUnit; repeatableMin: number; repeatableMax: number; repeatableToolbar: boolean; repeatableShowOnlyLastToolbar: boolean; repeatableLabel: string; repeatableLabelAdd: string; repeatableLabelRemove: string; repeatableAnchors: boolean; repeatableAlwaysShowHeaderFooter: boolean; repeatableOrder: RepeatingOrderEnum; repeatingUnitHeader?: string[]; repeatingUnitFooter?: string[]; repeatableDataSource?: IRepeatableDataSource; repeatableDynamicPlaceholders?: IDynamicPlaceholder[]; tabTitleBlock?: IBlock; condition?: ICondition; cssClasses?: string; tooltip?: string; removeIf?: string[]; state?: IState; } declare enum SectionTypeEnum { evaluation = "evaluation" } export type CondStateType = "fullfilled" | "else-invisible" | "else-disabled" | "else-readonly" | "else-optional"; export interface IState { condState: CondStateType; filled: number; invalid: boolean; warning: boolean; previousCondState?: CondStateType; uiStateId?: string; stateId?: string; previousStateId?: string; rendered?: boolean; active?: boolean; condElse?: ConditionExpressionElse; } export interface INextPageButton { show?: boolean; nextText?: string; condition?: NextPageConditionEnum; hint?: string; audioFeedback?: boolean; } export interface ISection { code: string; label: string; labelHTML: string; tabs: ITab[]; hideLabelPDF?: boolean; type?: SectionTypeEnum; condition?: ICondition; id?: string; cssClasses?: string; state?: IState; removeIf?: string[]; nextPageButton?: INextPageButton; removePageBreakPDF?: boolean; } /** * HybridForms FormDataSource */ export interface IFormDataSource { url: string; isOnline?: boolean; id: string; name: string; catalogName: string; progressItems?: number; formdefinitions?: any[]; } /** * HybridForms IAppKioskMode */ export type AppKioskModeType = "single" | "sequential"; export interface IAppKioskMode { mode: AppKioskModeType; unlockCode: string; lockTime: number; approveLabel?: string; activateFeatures: boolean; showPinOnLock: boolean; lockLabel?: string; unlockLabel?: string; } /** * HybridForms FormDefinitionInfo */ export interface IFormDefinitionInfo { version: string; date: Date | string; minAppVersion?: string; minServerVersion?: string; conditionsOnRender?: boolean; } declare enum SketchTemplateSourceEnum { fromApp = "fromApp", fromFormDef = "fromFormDef", fromPictures = "fromPictures", fromMaps = "fromMaps", fromModel = "fromModel" } export interface IHFFeature { id: string; filename: string; fileSize?: number; remark?: string; date?: string; hideInPDF: boolean; readonly?: boolean; objectLink?: string; meta?: IHFFeatureMetadata; } export interface IHFFeatureMetadata { stageId: string; } export interface IHFPicture extends IHFFeature { width: number; height: number; original: boolean; exifOrientation?: number; latitude: number; longitude: number; accuracy: number; accuracyFormatted: string; bgFilename: string; strokeJson: string; sketchTemplate?: boolean; sketchLabel?: string; } export interface IHFMap extends IHFFeature { width: number; height: number; original: boolean; latitude: number; longitude: number; accuracy: number; accuracyFormatted: string; zoomLevel: number; bounds: any; provider: any; mapType: any; address: any; bgFilename: string; strokeJson: string; sketchTemplate?: boolean; sketchLabel?: string; serverKeyId?: string; connectedMap?: boolean; connectedMapId?: string; connectedMapJSON?: any; hasStaticImage?: boolean; directions?: string; } export interface IHFModel extends IHFFeature { fileType: string; height: number; width: number; original: boolean; previewFilename?: string; connectedModel?: boolean; connectedModelId?: string; sketchTemplate?: boolean; sketchLabel?: string; modelData?: any; } export interface ISketchTemplate { label: string; id: string; image?: string; width?: number; height?: number; thumbnailImage?: string; source?: SketchTemplateSourceEnum; imageUrl?: string; thumbnailImageUrl?: string; order?: number; featureItem?: IHFPicture | IHFMap | IHFModel; } export interface ISketchTemplateSettings { templates: ISketchTemplate[]; showDefaultTemplates: boolean; } /** * HybridForms ApproveButton */ export interface IApproveButtonSettings { label: string; dialogMessage?: string; dialogTitle?: string; } declare enum ManipulateCtrlTypeEnum { TextField = "TextField", DatePicker = "DatePicker", TimePicker = "TimePicker", CheckBox = "CheckBox", RadioBox = "RadioBox", Switch = "Switch", NumericField = "NumericField", SelectBox = "SelectBox", ComboBox = "ComboBox", DropDownList = "DropDownList", FileUploader = "FileUploader" } declare enum ManipulateTypeEnum { boolean = "boolean", text = "text", email = "email", number = "number", date = "date", time = "time", select = "select", search = "search", radio = "radio", stage = "stage", group = "group", stringArray = "stringArray" } declare enum SortDirectionEnum { Ascending = 0, Descending = 1 } export interface IListPageFavorite { label: string; sorting: { id: string; type: ManipulateTypeEnum; direction?: SortDirectionEnum | string; label?: string; ctrlType?: ManipulateCtrlTypeEnum; }; grouping: { id: string; type: ManipulateTypeEnum; direction?: SortDirectionEnum | string; label?: string; ctrlType?: ManipulateCtrlTypeEnum; }; filter: { id: string; type: ManipulateTypeEnum | string; filter: any; values?: any[]; label?: string; ctrlType?: ManipulateCtrlTypeEnum; }; default?: boolean; formDefault?: boolean; type?: IListPageFavoriteType; id?: string; } export type IListPageFavoriteType = "user" | "formDefinition"; /** * HybridForms ColorPalette */ export interface IColorPalette { color: string; text: string; default?: boolean; } export interface IColorPaletteSettings { colors: IColorPalette[]; extendDefaultColors: boolean; } export interface IReachoutViewSetting { show: boolean; onStages?: string[]; } export interface IReachoutStrings { PDFDownloadButton?: string; RemainingTime?: string; RemainingTimeIsUp?: string; SubmissionError?: string; SubmissionSuccessMsg?: string; SubmissionSuccessTitle?: string; SubmissionSuccessPrimaryBtn?: string; SubmissionSuccessHtml?: string; PreviewMsgHtml?: string; PreviewLoadingMsg?: string; ClosePreviewBtn?: string; PreviewBtn?: string; SendBtn?: string; CouldNotGetFormData?: string; UploadingFormMsg?: string; TransmissionError?: string; SaveError?: string; NotFilledOut?: string; ConfirmSendFormTitle?: string; ConfirmSendFormMsg?: string; ConfirmSendFormBtnLabel?: string; } export interface IReachoutSettings { maxTime?: number; minTime?: number; strings?: IReachoutStrings & Record; preview?: IReachoutViewSetting; pdfView?: IReachoutViewSetting; pdfName?: string; pdfNames?: Record; } export interface IPDFSettings { hfHideFormTitle?: boolean; hfHidePageTitle?: boolean | string[]; hfHideTabTitle?: boolean | string[]; hfRemovePageBreak?: boolean | string[]; } declare enum CompressionFormatEnum { png = "png", jpg = "jpg", original = "original" } declare enum CompressionTypeEnum { original = "original", compress = "compress" } export interface IPictureCompression { type: CompressionTypeEnum; options: { maxDimension?: number; maxSizeMB?: number; format?: CompressionFormatEnum; jpgQuality?: number; }; } export interface IMediaSettings { pictureCompression?: IPictureCompression; saveImageToPhotoAlbum?: boolean; maxFilenameLength?: number; characterWhitelistRegExp?: string; invalidCharacterErrorText?: string; } export interface IPDFEditSettings { inkColor: string; inkThickness: number; inkOpacity: number; inkSmoothing: number; textColor: string; textSize: number; } export interface IInitializer { rendered: string; viewRendered: string; disposed: string; } export interface IIconPickerEntry { label?: string; name: string; } export interface IIconPicker { title: string; icons: IIconPickerEntry[]; } export interface ITabMenuSettings { fixedDisabled?: boolean | string[]; scrollable?: boolean | string[]; } export interface IFormSettings { formLogo?: string; formLogoDark?: string; formLogoWidth?: number; characterWhitelist?: string; characterWhitelistRegExp?: string; invalidCharacterErrorText?: string; } export interface IFormDefinitionFeature { condition: IFeatureCondition; state: IState; disabledByAppFlag?: boolean; registeredMaps?: string[]; } export interface IFormDefinitionFeatures { pictures: IFormDefinitionFeature; sketches: IFormDefinitionFeature; maps: IFormDefinitionFeature; models: IFormDefinitionFeature; audio: IFormDefinitionFeature; documents: IFormDefinitionFeature; } /** * HybridForms FormDefinitionStructure */ export interface IFormDefinitionStructure { sections: ISection[]; features: IFormDefinitionFeatures; ListDataMapping: Record; TitleTemplate: string; templates?: { titleTemplate: string; listTemplate: string; headerTitleTemplate: string; }; legacyTemplate: boolean; Title?: string; ApproveButton?: IApproveButtonSettings; dataSources?: IFormDataSource[]; approvalCondition?: ICondition; version?: number; info?: IFormDefinitionInfo; appKioskMode?: IAppKioskMode; sketchTemplates?: ISketchTemplateSettings; listPageFavorites?: IListPageFavorite[]; drawingColorPalette?: IColorPaletteSettings; reachout?: IReachoutSettings; pdfSettings?: IPDFSettings; pdfEditSettings?: IPDFEditSettings; mediaSettings?: IMediaSettings; initializer?: IInitializer; iconPicker?: IIconPicker[]; tabMenuSettings?: ITabMenuSettings; formSettings?: IFormSettings; } declare class FormDefinitionsController extends BaseController { protected init(): void; getFormDefinitions(): Promise>; getFormDefinition(formID: string): Promise>; getMyGroups(formID: string): Promise>; getFormDefinitionFile(formID: string, filename: string): Promise>; getFormDefinitionStructure(formID: string): Promise>; } export type FormFieldDictionary = Record; export interface Group { id: number; title: string; upn: string; email: string; isGroup: boolean; address: string; company: string; logoUrl: string; } export interface AclServerFormat { id: number; title: string; upn: string; email: string; isGroup: boolean; } export interface FileServer { contentType: string; filename: string; modified: string; size: number; version: number; fileID: number; } export interface StatisticPages { label: string; open: number; } export interface Statistic { offline: number; open: number; pages: Record; statusGroupToEdit: number; statusEditToGroup: number; time: number; oneColumn: number; twoColumns: number; } export interface FormMinimalServerFormat { itemID: string; version: number; displayVersion: string; title: string; status: string; isExtendedRead: boolean; completion: number; feedback: string; modified: string; created: string; pdfDate: string; pdfReady: boolean; pdfVersion: number; stage: string; reachOutUrl: string; reachOutDate: string; badges: any[]; scheduledDate: string; } export interface FormBriefServerFormat extends FormMinimalServerFormat { saveStatus: string; listData: FormFieldDictionary; modifiedBy: string; modifiedUser: AclServerFormat; createdBy: string; createdUser: AclServerFormat; group: Group; owner: AclServerFormat; lockedBy?: string; lockedDate?: string; } export interface FormFullServerFormat extends FormBriefServerFormat { fields: FormFieldDictionary; files: FileServer[]; audio: any[]; documents: any[]; links: any[]; maps: any[]; pictures: any[]; sketches: any[]; models: any[]; statistic: Statistic; } export interface FormRepeatingServerFormat extends FormFullServerFormat { repeatingfields: Record; } export interface FormFormatMapping { minimal: FormMinimalServerFormat; brief: FormBriefServerFormat; full: FormFullServerFormat; repeating: FormRepeatingServerFormat; } export interface ListFormsParams { format?: T; allforms?: boolean; pdfready?: boolean; stage?: string; status?: "Edit" | "Group" | "Approved" | "Archived"; query?: string; modifiedSince?: string; modifiedBefore?: string; createdSince?: string; createdBefore?: string; deleted?: boolean; page?: number; hitsPerPage?: number; } export interface ListFormsResponse { forms: T[]; queryDate: string; isPaged: boolean; page: number; hitsPerPage: number; totalCount: number; totalPages: number; } export interface GetFormParams { format?: T; } export type ListFormFilesResponse = FileServer[]; export interface IRepeatingUnitTab { operation?: "create" | "update" | "delete"; position?: number; fields?: FormFieldDictionary; } export interface FormBinaryContent { filename?: string; id?: string; remark?: string; hideInPDF?: boolean; readonly?: boolean; content?: string; contentFilename?: string; operation?: "create" | "update" | "delete"; } export interface SimpleAPIData { culture?: string; title?: string; owner?: string; group?: string; status?: string; feedback?: string; fields?: FormFieldDictionary; repeatingUnits?: Record; pictures?: FormBinaryContent[]; documents?: FormBinaryContent[]; audio?: FormBinaryContent[]; } declare class FormsController extends BaseController { protected init(): void; listForms = never>(formID: string, params?: ListFormsParams): Promise>>; getForm(formID: string, itemID: string, params?: GetFormParams): Promise>; listFormFiles(formID: string, itemID: string): Promise>; getFormFile(formID: string, itemID: string, filename: string): Promise>; } declare class SimpleAPIController extends BaseController { protected init(): void; post(formID: string, data: SimpleAPIData): Promise>; put(formID: string, itemID: string, data: SimpleAPIData): Promise>; } declare class HybridFormsClient { private readonly authInstance; readonly request: RequestType; readonly requestWithAuth: RequestType; readonly auth: AuthController; readonly formDefinitions: FormDefinitionsController; readonly forms: FormsController; readonly simpleAPI: SimpleAPIController; readonly catalogs: CatalogsController; constructor(config: HybridFormsClientConfig); } export declare const createClient: (config: HybridFormsClientConfig) => HybridFormsClient; export as namespace HybridFormsJS; export {};