import { RJSFSchema, UiSchema } from '@rjsf/utils'; import { JSONSchema7 } from 'json-schema'; export interface ProcessedFormSpecs { schema: JSONSchema7; uiSchema: UiSchema; embedFormOptions: EmbedFormOptions; } export interface FormOptions { hostUrl: string; headers?: GenericObjectType; team: string; processId: string; async?: boolean; } export type GenericObjectType = { [name: string]: any; }; export type Theme = 'light' | 'dark' | 'none'; export type FormTheme = 'bootstrap-3' | 'bootstrap-4'; export type { UiSchema, JSONSchema7 }; export interface EmbedFormOptions { withBranding?: boolean; theme?: Theme; themeStylesheet?: string; stylesheet?: string; className?: string; loadingOverlayDisabled?: boolean; loadingOverlayContent?: string; locale: string; fallbackLocale?: string; variables?: GenericObjectType; i18nVariables?: GenericObjectType; onChange?: string; fields?: GenericObjectType; } export interface FormSpecsSchema extends RJSFSchema { ui: UiSchema; embedFormOptions: EmbedFormOptions; } export interface FormSpecs extends RJSFSchema { schema: FormSpecsSchema; } export type FormData = GenericObjectType; export interface RedirectConfig { url: string; timeout?: number; } export type SubmitFormResults = GenericObjectType; export interface FetchFormSpecsParams { hostUrl: string; headers?: GenericObjectType; team: string; processId: string; } export interface SubmitFormParams { hostUrl: string; headers?: GenericObjectType; team: string; processId: string; async?: boolean; formData: FormData; }