import { Row } from 'tinybase';
import { VerdocsEndpoint } from '@verdocs/js-sdk';
import type { IEnvelope, IEnvelopeField, ITemplate, ITemplateField } from '@verdocs/js-sdk';
export declare const safeJsonParse: (val: any, fallback?: any) => any;
export declare const objectToRow: (obj: Object) => Row;
export declare const rowToObject: <T extends {}>(row: Row) => T;
export type TRowUpdatedCallback<T> = (row: T) => void;
export type TRowGetter<T> = () => Promise<T>;
export declare const Store: {
    store: import("tinybase").Store;
    subscribe<T extends object>(tableId: string, rowId: string, getter: TRowGetter<T>, forceReload: boolean, callback: TRowUpdatedCallback<T>): string;
    unsubscribe(listenerId: string): void;
    getTemplate(endpoint: VerdocsEndpoint, templateId: string, reload?: boolean): Promise<ITemplate | null>;
    updateTemplate(templateId: string, template: ITemplate): ITemplate;
    getEnvelope(endpoint: VerdocsEndpoint, envelopeId: string, reload?: boolean): Promise<IEnvelope | null>;
    updateEnvelope(envelopeId: string, envelope: IEnvelope): IEnvelope;
    getField(source: "template" | "envelope", sourceId: string, fieldName: string, fieldOverride: ITemplateField | IEnvelopeField | null | undefined): {
        index: number;
        field: ITemplateField | IEnvelopeField;
    };
};
