import IntegrationClient from './integrationClient'; import type { DebouncedFunc } from 'lodash'; import { GetConfigParams } from '../internalState'; import { ExtractionActionOptions, PageSelectionInput, ForwardInboxEmailOptions } from '@feathery/client-utils'; export declare let API_URL: string; export declare let CDN_URL: string; export declare let STATIC_URL: string; export declare let S3_URL: string; export declare const updateRegionApiUrls: (region: string) => void; export default class FeatheryClient extends IntegrationClient { /** * Used to aggregate field value updates for successive calls to * submitCustom within the debounce window */ pendingCustomFieldUpdates: { [key: string]: any; }; /** * Debounced implementation of submitCustom */ debouncedSubmitCustom: DebouncedFunc<(override: boolean) => Promise>; customSubmitInFlight: Record; /** * Queue for events triggered before user interaction */ private userEventQueue; constructor(formKey?: string, ignoreNetworkErrors?: any, draft?: boolean, bypassCDN?: boolean); private handleInteraction; private replayQueuedEvents; destroy(): void; _submitJSONData(servars: any, stepKey: string, noComplete: boolean): Promise; _getFileValue(servar: any): Promise; _submitFileData(servar: any, stepKey: string): Promise; updateUserId(newUserId: string, merge?: boolean): Promise; pollUserData(): Promise; setDefaultFormValues({ steps, additionalValues }: any): void; _loadFormPackages(res: any): void; fetchCacheForm(formLanguage?: string): Promise; fetchForm(initVals: any, language?: string): Promise; fetchSession(formPromise?: null, block?: boolean): Promise; submitAuthInfo({ authId, authData, isStytchTemplateKey }: any): Promise; /** * Debounceable function responsible for pinging `/api/panel/custom/submit/` */ _debouncedSubmitCustom(override: boolean): Promise; /** * If there is a pending invocation of submitCustom, this method calls it immediately */ flushCustomFields(override?: boolean): Promise; /** * `beforeunload` event handler that flushes the pending submit custom changes * when a user is attempting to exit the page. * Defined via an arrow function so that event handler has a consistent reference * when adding and removing the listener * @param event `BeforeUnloadEvent` * @returns */ _flushCustomFieldsBeforeUnload: (event: BeforeUnloadEvent) => "" | undefined; _removeCustomFieldListener(): void; _addCustomFieldListener(): void; getNoSave(): boolean; submitCustom(customKeyValues: { [key: string]: any; }, { override, shouldFlush }?: { override?: boolean; shouldFlush?: boolean; }): Promise; submitStep(servars: any, step: any, hasNext: boolean): Promise<[any, void, void, ...any[]] | undefined>; registerEvent(eventData: any): Promise; private _registerEventInternal; runServerSideLogicRule(id: string): Promise; AI_CHECK_INTERVAL: number; AI_MAX_TIME: number; runAIExtraction({ extractionId, options, pages, setPollFuserData, onStatusUpdate }: { extractionId: string; options: ExtractionActionOptions | boolean; pages?: PageSelectionInput; setPollFuserData?: any; onStatusUpdate?: any; }): Promise>; forwardInboxEmail({ options }: { options: ForwardInboxEmailOptions; }): Promise; getConfig(configParams: GetConfigParams): Promise; verifyCollaborator(email: string): Promise; inviteCollaborator(usersGroups: string[], templateId: string): Promise<{ ok: boolean; payload: any; error?: undefined; } | { ok: boolean; error: string; payload?: undefined; }>; rewindCollaboration(templateId: string, rewindEmailKey: string): Promise; setCollaboratorAsCompleted(templateId: string): Promise; generateDocuments({ documentIds, download, merge, zipName, mergedFileName }: { documentIds: string[]; download?: boolean; merge?: boolean; zipName?: string; mergedFileName?: string; }): Promise<{ files: any; }>; resetPendingFileUploads(fieldKeys: string[]): Promise; dataHubAction({ hubId, operation, entryId, data }: { hubId: string; operation: 'get' | 'create' | 'update' | 'delete'; entryId?: string; data?: Record; }): Promise; } //# sourceMappingURL=index.d.ts.map