import type { FormDefinition, FormSchemaVersion, FormField, FormNotificationSettings, FormEmbedSettings, FormStatus, FormStats, FormsSidebarCount, FetchFormsParams, FormSubmission, FetchFormEntriesParams, EntryCounts } from '@actuate-media/cms-core';
export type { FormDefinition, FormSchemaVersion, FormField, FormFieldType, FormFieldOption, FieldValidationRules, FormNotificationSettings, FormEmbedSettings, FormStatus, FormStats, FormsSidebarCount, FormSubmission, FormSubmissionFile, FetchFormEntriesParams, EntryCounts, SpamStatus, } from '@actuate-media/cms-core';
/**
 * A form as returned by `GET /forms` — the typed definition plus the legacy
 * numeric aliases the list endpoint adds for backward compatibility.
 */
export interface FormListItem extends FormDefinition {
    /** `fields.length` precomputed by the server. */
    fieldCount?: number;
    /** Alias of `totalEntries`. */
    submissions?: number;
}
export interface FormSchemaResult {
    fields: FormField[];
    activeVersionId: string | null;
    versions: FormSchemaVersion[];
}
export declare function fetchForms(params?: FetchFormsParams): Promise<FormListItem[]>;
export declare function fetchFormById(id: string): Promise<FormDefinition | null>;
export declare function fetchFormStats(): Promise<FormStats>;
export declare function fetchFormsSidebarCounts(): Promise<FormsSidebarCount[]>;
export interface CreateFormPayload {
    name: string;
    slug?: string;
    description?: string;
    status?: FormStatus;
    template?: string;
    fields?: FormField[];
}
export declare function createForm(payload: CreateFormPayload): Promise<{
    data?: FormDefinition;
    error?: string;
}>;
export declare function updateForm(id: string, payload: Partial<Pick<FormDefinition, 'name' | 'slug' | 'description' | 'status'>>): Promise<{
    data?: FormDefinition;
    error?: string;
}>;
export declare function duplicateForm(id: string): Promise<{
    data?: FormDefinition;
    error?: string;
}>;
/** Move a form to the archived state (hidden from embed pickers, no new submissions). */
export declare function archiveForm(id: string): Promise<{
    error?: string;
}>;
/** Restore an archived form back to draft. */
export declare function restoreForm(id: string): Promise<{
    error?: string;
}>;
export declare function deleteForm(id: string, opts?: {
    force?: boolean;
}): Promise<{
    error?: string;
}>;
export declare function fetchFormSchema(id: string): Promise<FormSchemaResult>;
export declare function saveFormSchema(id: string, fields: FormField[], notes?: string): Promise<{
    data?: {
        form: FormDefinition;
        version: FormSchemaVersion;
    };
    error?: string;
}>;
export declare function fetchNotificationSettings(id: string): Promise<FormNotificationSettings>;
export declare function updateNotificationSettings(id: string, payload: Partial<FormNotificationSettings>): Promise<{
    data?: FormNotificationSettings;
    error?: string;
}>;
/** Lightweight notify on/off toggle used by the forms-list switch. */
export declare function setNotifyEnabled(id: string, enabled: boolean): Promise<{
    data?: {
        notifyEnabled: boolean;
    };
    error?: string;
}>;
export declare function fetchEmbedSettings(id: string): Promise<FormEmbedSettings>;
export declare function updateEmbedSettings(id: string, payload: Partial<FormEmbedSettings>): Promise<{
    data?: FormEmbedSettings;
    error?: string;
}>;
/** A page of submissions as returned by `GET /forms/entries`. */
export interface EntriesPage {
    entries: FormSubmission[];
    total: number;
    page: number;
    pageSize: number;
}
/** Patch shape accepted by the entry mutation endpoints. */
export interface EntryPatch {
    unread?: boolean;
    starred?: boolean;
    archived?: boolean;
}
export declare function fetchEntries(params?: FetchFormEntriesParams): Promise<EntriesPage>;
export declare function fetchEntryCounts(params?: FetchFormEntriesParams): Promise<EntryCounts>;
/** A single entry rendered against the schema version it was captured with. */
export interface EntryDetail {
    entry: FormSubmission;
    fields: FormField[];
}
export declare function fetchEntry(id: string): Promise<EntryDetail | null>;
export declare function updateEntry(id: string, patch: EntryPatch): Promise<{
    data?: FormSubmission;
    error?: string;
}>;
export declare function deleteEntry(id: string): Promise<{
    error?: string;
}>;
export declare function bulkUpdateEntries(ids: string[], patch: EntryPatch): Promise<{
    data?: {
        updated: number;
    };
    error?: string;
}>;
//# sourceMappingURL=forms-service.d.ts.map