import { z } from 'zod';
import { type InferProvider } from './capability-definition.js';
/**
 * Query filter for settings-store collections.
 */
declare const QueryFilterSchema: z.ZodObject<{
    where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
    whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
    orderBy: z.ZodOptional<z.ZodObject<{
        field: z.ZodString;
        direction: z.ZodEnum<{
            asc: "asc";
            desc: "desc";
        }>;
    }, z.core.$strip>>;
    limit: z.ZodOptional<z.ZodNumber>;
    offset: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
/** A single stored record: `{ id, data }`. */
declare const SettingsRecordSchema: z.ZodObject<{
    id: z.ZodString;
    data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.core.$strip>;
/**
 * Column declaration for a structured (SQL-backed) collection.
 *
 * Logical types — the backend translates each to the matching SQLite
 * storage class and handles per-type marshaling:
 *   - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
 *   - `JSON`    — TEXT under the hood; serialised on write, parsed on read
 *   - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
 */
declare const CollectionColumnSchema: z.ZodObject<{
    name: z.ZodString;
    type: z.ZodEnum<{
        TEXT: "TEXT";
        INTEGER: "INTEGER";
        REAL: "REAL";
        JSON: "JSON";
        BOOLEAN: "BOOLEAN";
    }>;
    primaryKey: z.ZodOptional<z.ZodBoolean>;
    notNull: z.ZodOptional<z.ZodBoolean>;
    unique: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
declare const CollectionIndexSchema: z.ZodObject<{
    name: z.ZodString;
    columns: z.ZodReadonly<z.ZodArray<z.ZodString>>;
    unique: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
/**
 * settings-store — singleton capability for addon-scoped persistence.
 *
 * Every method operates within a `collection`. An optional `namespace`
 * field provides access to additional data spaces beyond the default
 * addon settings — useful for business data (events, tracks, faces, etc.).
 *
 * Scoping: the implementation prefixes every collection with the calling
 * addon's ID automatically. Addons never see each other's data.
 *
 *   - No namespace (default): `"addon-settings"` → `"<addonId>:addon-settings"`
 *   - With namespace: `{ namespace: 'events', collection: 'detections' }` →
 *     `"<addonId>:events:detections"`
 *
 * Implemented by `@camstack/core/builtins/sqlite-settings` (SQLite WAL backend).
 * Addons access it via `ctx.api.settingsStore.*`.
 */
export declare const settingsStoreCapability: {
    readonly name: "settings-store";
    readonly scope: "system";
    readonly mode: "singleton";
    readonly methods: {
        /** Get a single value by key from a collection. */
        readonly get: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            namespace: z.ZodOptional<z.ZodString>;
            collection: z.ZodString;
            key: z.ZodString;
        }, z.core.$strip>, z.ZodUnknown, import("./capability-definition.js").CapabilityMethodKind>;
        /** Set a value by key in a collection (upsert). */
        readonly set: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            namespace: z.ZodOptional<z.ZodString>;
            collection: z.ZodString;
            key: z.ZodString;
            value: z.ZodUnknown;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Get all entries matching an optional filter. */
        readonly query: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            namespace: z.ZodOptional<z.ZodString>;
            collection: z.ZodString;
            filter: z.ZodOptional<z.ZodObject<{
                where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
                whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
                whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
                orderBy: z.ZodOptional<z.ZodObject<{
                    field: z.ZodString;
                    direction: z.ZodEnum<{
                        asc: "asc";
                        desc: "desc";
                    }>;
                }, z.core.$strip>>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
        }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Insert a new record. */
        readonly insert: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            namespace: z.ZodOptional<z.ZodString>;
            collection: z.ZodString;
            record: z.ZodObject<{
                id: z.ZodString;
                data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            }, z.core.$strip>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Update an existing record by ID. */
        readonly update: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            namespace: z.ZodOptional<z.ZodString>;
            collection: z.ZodString;
            id: z.ZodString;
            data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Delete a record by key/ID. */
        readonly delete: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            namespace: z.ZodOptional<z.ZodString>;
            collection: z.ZodString;
            key: z.ZodString;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Count entries in a collection, optionally filtered. */
        readonly count: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            namespace: z.ZodOptional<z.ZodString>;
            collection: z.ZodString;
            filter: z.ZodOptional<z.ZodObject<{
                where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
                whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
                whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
                orderBy: z.ZodOptional<z.ZodObject<{
                    field: z.ZodString;
                    direction: z.ZodEnum<{
                        asc: "asc";
                        desc: "desc";
                    }>;
                }, z.core.$strip>>;
                limit: z.ZodOptional<z.ZodNumber>;
                offset: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
        }, z.core.$strip>, z.ZodNumber, import("./capability-definition.js").CapabilityMethodKind>;
        /** Check if a collection is empty. */
        readonly isEmpty: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            namespace: z.ZodOptional<z.ZodString>;
            collection: z.ZodString;
        }, z.core.$strip>, z.ZodBoolean, import("./capability-definition.js").CapabilityMethodKind>;
        /**
         * Declare a typed (SQL-backed) collection with explicit columns +
         * indexes. Idempotent: re-declaring an existing collection with the
         * same shape is a no-op; shape changes (new columns, new indexes)
         * are applied additively. Subsequent `insert` / `update` / `delete`
         * / `query` calls on this collection use typed columns instead of
         * JSON-blob storage — `record.data` fields are spread across
         * columns, `query.filter.where` matches real columns (no
         * `json_extract` overhead), `orderBy` uses column indexes.
         *
         * Addons call this in `onInitialize` before their first read/write.
         * Collection names should be namespaced by addon (e.g.
         * `pipeline-analytics:object-events`) to avoid cross-addon
         * clashes — no automatic prefix is added.
         */
        readonly declareCollection: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            namespace: z.ZodOptional<z.ZodString>;
            collection: z.ZodString;
            columns: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                name: z.ZodString;
                type: z.ZodEnum<{
                    TEXT: "TEXT";
                    INTEGER: "INTEGER";
                    REAL: "REAL";
                    JSON: "JSON";
                    BOOLEAN: "BOOLEAN";
                }>;
                primaryKey: z.ZodOptional<z.ZodBoolean>;
                notNull: z.ZodOptional<z.ZodBoolean>;
                unique: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strip>>>;
            indexes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
                name: z.ZodString;
                columns: z.ZodReadonly<z.ZodArray<z.ZodString>>;
                unique: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strip>>>>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
    };
};
export type ISettingsStoreProvider = InferProvider<typeof settingsStoreCapability>;
/**
 * tRPC client namespace type for the settings-store capability.
 * Used as the dependency type for services that need settings persistence.
 * Methods are accessed as `client.get.query(input)`, `client.set.mutate(input)`, etc.
 */
export type SettingsStoreClient = import('../generated/addon-api.js').AddonApi['settingsStore'];
export { QueryFilterSchema, SettingsRecordSchema, CollectionColumnSchema, CollectionIndexSchema };
export type CollectionColumn = z.infer<typeof CollectionColumnSchema>;
export type CollectionIndex = z.infer<typeof CollectionIndexSchema>;
//# sourceMappingURL=settings-store.cap.d.ts.map