export type IRequiredValidator = { errorMessage?: string | undefined; level?: ("info" | "warning" | "error") | undefined; validate: "required"; }; export type IUniqueValidator = { errorMessage?: string | undefined; level?: ("info" | "warning" | "error") | undefined; validate: "unique" | "unique_case_insensitive"; }; export type IUniqueWithValidator = { errorMessage?: string | undefined; level?: ("info" | "warning" | "error") | undefined; validate: "unique_with"; uniqueKey: string; }; export type IRegexValidator = { errorMessage?: string | undefined; level?: ("info" | "warning" | "error") | undefined; validate: "regex_match" | "regex_exclude"; regex: string | RegExp; regexOptions?: { ignoreCase?: boolean | undefined; dotAll?: boolean | undefined; multiline?: boolean | undefined; unicode?: boolean | undefined; } | undefined; }; export type IRequireWithValidator = { errorMessage?: string | undefined; level?: ("info" | "warning" | "error") | undefined; validate: "require_with" | "require_without" | "require_with_all" | "require_without_all"; fields: string[]; }; export type IRequireWithValuesValidator = { errorMessage?: string | undefined; level?: ("info" | "warning" | "error") | undefined; validate: "require_with_values" | "require_without_values" | "require_with_all_values" | "require_without_all_values"; fieldValues: { [x: string]: any; }; }; export type ILengthValidator = { errorMessage?: string | undefined; level?: ("info" | "warning" | "error") | undefined; validate: "length"; min?: number | undefined; max?: number | undefined; }; export type IAlphabeticalValidator = { errorMessage?: string | undefined; level?: ("info" | "warning" | "error") | undefined; validate: "alphabetical"; }; export type IValidatorField = IRequiredValidator | IUniqueValidator | IUniqueWithValidator | IRegexValidator | IRequireWithValidator | IRequireWithValuesValidator | ILengthValidator | IAlphabeticalValidator; export type IStringField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type?: ("string" | [ "string", { [x: string]: never; } ]) | undefined; }; export type ICheckboxField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "checkbox" | [ "checkbox", { [x: string]: never; } ]; }; export type IEmailField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "email" | [ "email", { [x: string]: never; } ]; }; export type IDeveloperSelectOption = { label: string; value: string; alternateMatches?: string[] | undefined; }; export type ISelectField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "select" | [ "select", { allowCustom?: boolean | undefined; exactMatchOnly?: boolean | undefined; } ]; selectOptions: IDeveloperSelectOption[]; }; export type INumberField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "number" | [ "number", (("default" | "percent" | "percent_0" | "percent_1" | "percent_2" | "percent_3" | "percent_4" | "decimal_0" | "decimal_1" | "decimal_2" | "decimal_3" | "decimal_4" | "integer" | "plain" | "usd" | "usd_accounting" | "eur" | "gbp") | { preset?: ("default" | "percent" | "percent_0" | "percent_1" | "percent_2" | "percent_3" | "percent_4" | "decimal_0" | "decimal_1" | "decimal_2" | "decimal_3" | "decimal_4" | "integer" | "plain" | "usd" | "usd_accounting" | "eur" | "gbp") | undefined; round?: number | undefined; displayFormat?: { output?: ("currency" | "percent" | "byte" | "time" | "ordinal" | "number") | undefined; base?: ("decimal" | "binary" | "general") | undefined; characteristic?: number | undefined; prefix?: string | undefined; postfix?: string | undefined; forceAverage?: ("trillion" | "billion" | "million" | "thousand") | undefined; average?: boolean | undefined; currencyPosition?: ("prefix" | "infix" | "postfix") | undefined; currencySymbol?: string | undefined; totalLength?: number | undefined; mantissa?: number | undefined; optionalMantissa?: boolean | undefined; trimMantissa?: boolean | undefined; optionalCharacteristic?: boolean | undefined; thousandSeparated?: boolean | undefined; abbreviations?: { thousand?: string | undefined; million?: string | undefined; billion?: string | undefined; trillion?: string | undefined; } | undefined; negative?: ("sign" | "parenthesis") | undefined; forceSign?: boolean | undefined; spaceSeparated?: boolean | undefined; spaceSeparatedCurrency?: boolean | undefined; spaceSeparatedAbbreviation?: boolean | undefined; exponential?: boolean | undefined; prefixSymbol?: boolean | undefined; lowPrecision?: boolean | undefined; roundingFunction?: ((args0: number, ...args1: unknown[]) => number) | undefined; } | undefined; outputFormat?: { output?: ("currency" | "percent" | "byte" | "time" | "ordinal" | "number") | undefined; base?: ("decimal" | "binary" | "general") | undefined; characteristic?: number | undefined; prefix?: string | undefined; postfix?: string | undefined; forceAverage?: ("trillion" | "billion" | "million" | "thousand") | undefined; average?: boolean | undefined; currencyPosition?: ("prefix" | "infix" | "postfix") | undefined; currencySymbol?: string | undefined; totalLength?: number | undefined; mantissa?: number | undefined; optionalMantissa?: boolean | undefined; trimMantissa?: boolean | undefined; optionalCharacteristic?: boolean | undefined; thousandSeparated?: boolean | undefined; abbreviations?: { thousand?: string | undefined; million?: string | undefined; billion?: string | undefined; trillion?: string | undefined; } | undefined; negative?: ("sign" | "parenthesis") | undefined; forceSign?: boolean | undefined; spaceSeparated?: boolean | undefined; spaceSeparatedCurrency?: boolean | undefined; spaceSeparatedAbbreviation?: boolean | undefined; exponential?: boolean | undefined; prefixSymbol?: boolean | undefined; lowPrecision?: boolean | undefined; roundingFunction?: ((args0: number, ...args1: unknown[]) => number) | undefined; } | undefined; min?: number | undefined; max?: number | undefined; }) ]; }; export type IDateTimeField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: ("date" | "time" | "datetime") | [ "date" | "time" | "datetime", { displayFormat?: string | undefined; outputFormat?: string | undefined; locale?: string | undefined; withSeconds?: boolean | undefined; autofix?: boolean | undefined; } ]; }; export type IPhoneNumberField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "phone-number" | [ "phone-number", { country?: ("AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TA" | "TC" | "TD" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW") | undefined; format?: ("international" | "national" | "both") | undefined; outputFormatted?: boolean | undefined; } ]; }; export type IUrlField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "url" | [ "url", { acceptedProtocols?: string[] | undefined; acceptedDomains?: string[] | undefined; } ]; }; export type IUSZipCodeField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "us-zip-code" | [ "us-zip-code", { format?: ("5-digit" | "9-digit") | undefined; outputDash?: boolean | undefined; } ]; }; export type ISSNField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "ssn" | [ "ssn", { outputDash?: boolean | undefined; } ]; }; export type ICountryField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "country" | [ "country", { format?: ("2-letter" | "3-letter") | undefined; } ]; }; export type IDomainField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "domain" | [ "domain", { allowSubdomains?: boolean | undefined; } ]; }; export type IUUIDField = { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "uuid" | [ "uuid", { version?: number | undefined; } ]; }; export type IDeveloperField = IStringField | ICheckboxField | IEmailField | ISelectField | { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean; type: "multi-select" | [ "multi-select", { delimiter?: string | undefined; trimValues?: boolean | undefined; } ]; selectOptions: IDeveloperSelectOption[]; } | INumberField | IDateTimeField | IDomainField | IPhoneNumberField | IUrlField | ISSNField | IUUIDField | IUSZipCodeField | { label: string; key: string; description?: string | undefined; alternateMatches?: string[] | undefined; validators?: IValidatorField[]; invalidValueMessage?: string | undefined; readOnly?: boolean; hidden?: boolean; requireMapping?: boolean | undefined; manyToOne?: boolean | undefined; type: "us-state-territory" | [ "us-state-territory", { [x: string]: never; } ]; } | ICountryField; export type IDeveloperStyleOverrides = { global?: { textColor?: string; primaryTextColor?: string; secondaryTextColor?: string; successColor?: string; warningColor?: string; customFontURL?: string | null; customFontFamily?: string | null; backgroundColor?: string; borderRadius?: string; borderWidth?: string; borderColor?: string; borderStyle?: string; backdropBlur?: boolean; }; primaryButton?: { borderRadius?: string; backgroundColor?: string; textColor?: string; border?: string; hoverBackgroundColor?: string; hoverTextColor?: string; hoverBorder?: string; disabledBackgroundColor?: string; disabledTextColor?: string; padding?: string; }; secondaryButton?: { borderRadius?: string; backgroundColor?: string; textColor?: string; border?: string; hoverBackgroundColor?: string; hoverTextColor?: string; hoverBorder?: string; disabledBackgroundColor?: string; disabledTextColor?: string; padding?: string; }; tertiaryButton?: { borderRadius?: string; backgroundColor?: string; textColor?: string; border?: string; hoverBackgroundColor?: string; hoverTextColor?: string; hoverBorder?: string; disabledBackgroundColor?: string; disabledTextColor?: string; padding?: string; }; dropzone?: { borderWidth?: number; borderRadius?: number; borderColor?: string; borderStyle?: string; backgroundColor?: string; color?: string; outline?: string; activeBorderColor?: string; acceptBorderColor?: string; rejectBorderColor?: string; }; helpText?: { textColor?: string; backgroundColor?: string; }; stepperBar?: { completeColor?: string; incompleteColor?: string; currentColor?: string; fontSize?: string; completeFontWeight?: string; incompleteFontWeight?: string; currentFontWeight?: string; backgroundColor?: string; borderBottom?: string; }; dataTable?: { headerFontWeight?: string; headerBackgroundColor?: string; headerTextColor?: string; rowHeaderBackgroundColor?: string; rowHeaderTextColor?: string; cornerHeaderBackgroundColor?: string; cellSelectionBorderColor?: string; cellSelectionBackgroundColor?: string; accentColor?: string; headerActiveBackgroundColor?: string; headerActiveTextColor?: string; headerHighlightedBackgroundColor?: string; headerHighlightedTextColor?: string; cellBackgroundColor?: string; cellTextColor?: string; cellHoverBackgroundColor?: string; cellHoverTextColor?: string; oddRowBackgroundColor?: string; rowSelectedBackgroundColor?: string; rowSelectedBorderColor?: string; borderColor?: string; dividerColor?: string; errorCellBackgroundColor?: string; errorCellHoverBackgroundColor?: string; warningCellBackgroundColor?: string; warningCellHoverBackgroundColor?: string; infoCellBackgroundColor?: string; infoCellHoverBackgroundColor?: string; readOnlyCellBackgroundColor?: string; readOnlyCellTextColor?: string; }; modalOverlay?: { backgroundColor?: string; opacity?: string; }; card?: { backgroundColor?: string; containerBackgroundColor?: string; borderColor?: string; borderWidth?: string; borderRadius?: string; textColor?: string; expandedBackgroundColor?: string; iconColor?: string; }; dropdown?: { backgroundColor?: string; borderColor?: string; textColor?: string; errorBorderColor?: string; menuBackgroundColor?: string; optionHoverBackgroundColor?: string; optionSelectedBackgroundColor?: string; }; }; export type TLocaleShorthand = "bn" | "en" | "hr" | "ja" | "nl" | "ru" | "uk" | "cs" | "es" | "hu" | "ko" | "no" | "sv" | "vi" | "da" | "fi" | "id" | "lt" | "pl" | "sw" | "zh_CN" | "de" | "fr" | "is" | "lv" | "pt" | "th" | "zh_TW" | "el" | "hi" | "it" | "ms" | "ro" | "tr"; export type IDeveloperSettings = { importIdentifier: string; title?: string | undefined; allowInvalidSubmit?: boolean | undefined; invalidDataBehavior?: ("BLOCK_SUBMIT" | "INCLUDE_INVALID_ROWS" | "REMOVE_INVALID_ROWS" | "INCLUDE_INVALID_ROWS_AND_VALUES") | undefined; allowEmptySubmit?: boolean; backendSync?: boolean | undefined; backendSyncMode?: ("DISABLED" | "FULL_DATA" | "MAPPINGS_ONLY") | undefined; manualInputDisabled?: boolean | undefined; manualInputOnly?: boolean; allowCustomFields?: boolean; passThroughUnmappedColumns?: boolean; maxRecords?: number | null; developmentMode?: boolean | undefined; displayEncoding?: boolean; styleOverrides?: IDeveloperStyleOverrides; textOverrides?: { errors?: { [x: string]: string; }; ui?: { [x: string]: string; }; }; maxFileSize?: number; webhookUrl?: string | null; needsReviewWebhookUrl?: string | null; initialData?: ({ [x: string]: any; }[] | any[][]) | null; initialFile?: any | null; uploadStep?: { helpText?: string | null; sheetOverride?: string | null; sheetSelectionHelpText?: string | null; templateDownloadOverrideURL?: string | null; }; matchingStep?: { helpText?: string | null; headerRowOverride?: number | null; fuzzyMatchHeaders?: boolean; matchToSchema?: boolean; suggestCustomFirst?: boolean; }; matchValuesStep?: { helpText?: string | null; maxMappableSelectValues?: number; }; reviewStep?: { helpText?: string | null; processingText?: string | null; enableUserTransformations?: boolean; allowAddingRows?: boolean; allowRemovingRows?: boolean; highlightAutoFixes?: boolean; autoCreateUnmappedColumns?: boolean; enableNavigatingErrors?: boolean; }; autoMapHeaders?: boolean; delimiter?: string | undefined; backendOverride?: { url: string; type: "AWS" | "AZURE"; }; locale?: TLocaleShorthand; templateDownloadFilename?: string | null; browserExcelParsing?: boolean; version?: string; alternateDomain?: string | null; xmlParsingOptions?: { forceArrayTags?: string[] | undefined; headerAlias?: { [x: string]: string; } | undefined; enableAutoArrayHeuristics?: boolean; assumeSingleRootChildIsArray?: boolean; } | undefined; savePartialSession?: boolean; sessionId?: string | null; }; export type IUser = { id: string; name?: string | undefined; email?: string | undefined; companyId?: string | undefined; companyName?: string | undefined; }; export type CustomStepInsertAfter = "HEADER_SELECT" | "COLUMN_MATCH" | "SELECT_MATCH"; type MaybeAsync = T | Promise; export declare enum EButtonName { CONTINUE = "CONTINUE", NEXT = "NEXT", GO_BACK = "GO_BACK", FINISH = "FINISH", UPLOAD_DATA = "UPLOAD_DATA", ENTER_DATA = "ENTER_DATA", DOWNLOAD_TEMPLATE = "DOWNLOAD_TEMPLATE", CONFIRM_SHEET = "CONFIRM_SHEET", HEADER_SELECT_CONTINUE = "HEADER_SELECT_CONTINUE", NO_HEADER_ROW = "NO_HEADER_ROW", COLUMN_MATCH_IGNORE = "COLUMN_MATCH_IGNORE", COLUMN_MATCH_REMOVE = "COLUMN_MATCH_REMOVE", DATE_FIX_ACCEPT = "DATE_FIX_ACCEPT", DATE_FIX_UNDO = "DATE_FIX_UNDO", SELECT_MATCH_CLEAR = "SELECT_MATCH_CLEAR", MULTI_SELECT_MATCH_CLEAR = "MULTI_SELECT_MATCH_CLEAR", FIND_AND_REPLACE_OPEN = "FIND_AND_REPLACE_OPEN", FIND_AND_REPLACE_CONFIRM = "FIND_AND_REPLACE_CONFIRM", FIND_AND_REPLACE_CANCEL = "FIND_AND_REPLACE_CANCEL", SHOW_ROWS_WITH_ERRORS = "SHOW_ROWS_WITH_ERRORS", CLEAR_ROWS_WITH_ERRORS_FILTER = "CLEAR_ROWS_WITH_ERRORS_FILTER", TRANSFORM_DATA_OPEN = "TRANSFORM_DATA_OPEN", TRANSFORM_DATA_PREVIEW = "TRANSFORM_DATA_PREVIEW", TRANSFORM_DATA_REGENERATE = "TRANSFORM_DATA_REGENERATE", TRANSFORM_DATA_CONFIRM = "TRANSFORM_DATA_CONFIRM", TRANSFORM_DATA_CANCEL = "TRANSFORM_DATA_CANCEL", EXPORT_ALL = "EXPORT_ALL", EXPORT_ERRORS_ONLY = "EXPORT_ERRORS_ONLY", DOWNLOAD_XLSX = "DOWNLOAD_XLSX", TOGGLE_SEARCH = "TOGGLE_SEARCH", EXIT_CONFIRM = "EXIT_CONFIRM", EXIT_CANCEL = "EXIT_CANCEL", ALERT_PRIMARY = "ALERT_PRIMARY", ALERT_SECONDARY = "ALERT_SECONDARY", UPSELL_LATER = "UPSELL_LATER", UPSELL_BUY_NOW = "UPSELL_BUY_NOW" } export declare enum EStep { UPLOAD = "UPLOAD", HEADER_SELECT = "HEADER_SELECT", COLUMN_MATCH = "COLUMN_MATCH", SELECT_MATCH = "SELECT_MATCH", REVIEW = "REVIEW" } export declare enum EUserEventType { BUTTON_CLICK = "BUTTON_CLICK" } export interface IButtonClickPayload { buttonName: EButtonName; step: EStep; } export type IUserEventPayloadMap = { [EUserEventType.BUTTON_CLICK]: IButtonClickPayload; }; export interface IUserEvent { eventType: T; payload: IUserEventPayloadMap[T]; } export interface IParentConnectionMethods { handleColumnHooks: (fieldName: string, data: IColumnHookInput[]) => Promise; handleRowHooks: (data: IRowHookInput[], mode: "init" | "update") => Promise; handleStepHook: (step: EStepHook, data: IUploadStepData | IReviewStepData) => void; handleRowDeleteHooks: (deletedRows: IRowHookInput[]) => Promise; handleBeforeFinishCallback: (data: Record[], metadata: IResultMetadataWithValues) => Promise; handleResults: (data: any, metadata: IResultMetadataWithValues) => Promise; handleCloseModal: () => void; handleCancel: () => void; handleUserEvent: (event: IUserEvent) => Promise; handleParseFileCallback: (buffer: ArrayBuffer, fileName: string) => Promise; handleCustomStep: (id: string) => Promise; handleCustomStepMessage: (id: string, payload: unknown) => Promise; } export interface IConnectionMethods { init: (licenseKey: string, fields: IDeveloperField[], settings: IDeveloperSettings, user: IUser, appHost?: string) => void; initFromSavedSchema: (licenseKey: string, schemaName: string, appHost: string, options?: IImporterOptions) => void; setHeaderRowOverride: (headerRowOverride: number | null) => void; setNumRegisteredColHooks: (numColHooks: number) => void; setNumRegisteredRowHooks: (numRowHooks: number) => void; setNumRegisteredRowDeleteHooks: (numRowDeleteHooks: number) => void; setEmbedInline: (embedInline: boolean) => void; setUser: (user: IUser) => void; addField: (field: IDeveloperField, position?: IPositionSpec) => void; removeField: (fieldKey: string) => void; updateInfoMessages: (messages: IMessagesForCell[]) => void; setDevelopmentMode: (developmentMode: boolean) => void; rehydrate: (rehydrateState: any, headlessImportId?: string) => void; addRows: (rows: IRowToAdd[]) => string[]; removeRows: (rowIds: string[]) => void; setConfirmationMessage: (messageHTML: string, options?: { submitButtonText?: string; cancelButtonText?: string; }) => void; setCustomParserFileExtensions: (fileExtensions: string[]) => void; setCustomSteps: (steps: Array<{ id: string; insertAfter: CustomStepInsertAfter; label?: string; url?: string; }>) => void; completeCustomStep: () => void; goBackCustomStep: () => void; } export type WrapAsync = { [P in keyof T]: T[P] extends (...args: infer Args) => infer Return ? (...args: Args) => Promise : T[P]; }; export type IPublicConnectionMethods = WrapAsync>; export type ICustomStepConnectionMethods = IPublicConnectionMethods & WrapAsync>; export type IDeveloperFieldType = "string" | "checkbox" | "select" | "multi-select" | "number" | "domain" | "date" | "ssn" | "datetime" | "phone-number" | "time" | "url" | "us-zip-code" | "country" | "uuid" | "us-state-territory" | "email"; export interface ICellRef { rowIndex: number; fieldKey: string; manyToOneIndex?: number; } export interface ITableMessage { message: string; level: "info" | "warning" | "error"; } export interface IMessagesForCell extends ICellRef { messages: ITableMessage[]; } export interface IColumnHook { fieldName: string; callback: (values: IColumnHookInput[]) => MaybeAsync; } export interface IRowHook { (data: IRowHookInput, mode: "init" | "update"): MaybeAsync; } export type IBulkRowHook = (data: IRowHookInput[], mode: "init" | "update") => IRowHookOutputInternal[] | Promise; export interface IRowDeleteHook { (data: IRowHookInput): MaybeAsync; } export interface IColumnHookInput { index: number; value: any; rowId: string; } export interface IColumnHookOutput { index: number; value?: any; info?: ITableMessage[]; } export interface IRowHookCell extends IRowHookCellBasic { manyToOne?: IRowHookCellBasic[]; } export interface IRowHookCellBasic { value: any; resultValue: any; info?: ITableMessage[]; selectOptions?: ISelectField["selectOptions"]; } export interface IRowHookInput { row: { [key: string]: IRowHookCell; }; index: number; rowId: string; } export interface IRowHookOutput { row: { [key: string]: IRowCellBasic | IRowCellManyToOne; }; } export interface IRowCellBasic { value?: any; info?: ITableMessage[]; selectOptions?: ISelectField["selectOptions"]; } export interface IRowCellManyToOne { manyToOne: IRowCellBasic[]; value?: unknown; info?: unknown; selectOptions?: unknown; } export interface IRowCell extends IRowCellBasic { manyToOne?: IRowCellBasic[]; } export interface IRow { [key: string]: IRowCell; } export interface IRowToAdd { index?: number; row: IRow; } export interface IRowHookOutputInternal extends IRowHookOutput { index: number; } export type IFieldMetadataBasic = { fileHeader: string | null; fileHeaderIndex: number | null; isCustom: boolean; manyToOne: false; }; export type IFieldMetadataManyToOne = { fileHeader: null; fileHeaders: (string | null)[]; fileHeaderIndex: null; fileHeaderIndexes: (number | null)[]; isCustom: boolean; manyToOne: true; }; export type IFieldMetadata = Record; export type IError = { fieldKey: string; rowIndex: number; message: string; manyToOneIndex?: number; }; export type IErrorWithValue = IError & { value: string; }; interface ResultMetadata { id: string | null; filename: string | null; importIdentifier: string; user: IUser; rowsWithError: number[]; rawHeaders: string[] | null; fields: IFieldMetadata; saveForLater?: boolean; errors: ErrorType[]; } export type IResultMetadata = ResultMetadata; export type IResultMetadataWithValues = ResultMetadata; export declare enum EStepHook { UPLOAD_STEP = "UPLOAD_STEP", REVIEW_STEP = "REVIEW_STEP", REVIEW_STEP_POST_HOOKS = "REVIEW_STEP_POST_HOOKS", REVIEW_STEP_PRE_SUBMIT = "REVIEW_STEP_PRE_SUBMIT" } export interface IUploadStepData { filename: string | null; dataPreview: any[][]; sessionId: string | null; } export interface IReviewStepData { rawHeaders: string[] | null; headerMapping: { [header: string]: string | undefined; }; fields: IFieldMetadata; } export interface IReviewStepPostHooksData { headerMapping: { [header: string]: string | undefined; }; fields: IFieldMetadata; } export interface IReviewStepPreSubmitData { headerMapping: { [header: string]: string | undefined; }; fields: IFieldMetadata; } export interface IStepHook { type: keyof typeof EStepHook; callback: (uploader: IPublicConnectionMethods, data: IUploadStepData | IReviewStepData | IReviewStepPostHooksData) => MaybeAsync; } export interface ICustomStepConfig { id: string; insertAfter: CustomStepInsertAfter; /** Label shown in the stepper bar. Defaults to the step id if omitted. */ label?: string; /** * Dromo renders an