@suluk/core - v0.1.13
    Preparing search index...

    Interface SulukStore

    A REACTIVE-STORE declaration (C037) — the per-operation x-suluk-store facet. The contract's statement of how the frontend should turn this operation into reactive state, so the @suluk/sdk generator can emit a ready-to-use reactive client (states + events + callbacks) instead of every consumer hand-wiring stores + invalidation. A QUERY (read) BACKS a store; a MUTATION (write) INVALIDATES stores on success. key (query) and invalidates (mutation) are DISJOINT roles — presence-of-key discriminates query-vs-mutation, mirroring C027's presence-of-model skill-vs-route discriminator. CLIENT-CODEGEN ONLY: the reactive layer reads it; the matcher/runtime NEVER do. Every field names author-chosen STORE names or param NAMES — NEVER a request/header/body/query VALUE — so nothing here can leak into a request selector (D1 safe; see plan/facts/0reactive.bn + test/store-d1-invariance.test.ts). Structural.

    interface SulukStore {
        key?: string;
        ttl?: number;
        revalidateOnFocus?: boolean;
        params?: string[];
        invalidates?: string[];
        onSuccess?: string;
        [ext: `x-${string}`]: unknown;
    }

    Indexable

    • [ext: `x-${string}`]: unknown
    Index

    Properties

    key?: string

    QUERY role: the stable store name the generator projects to a $<key> reactive store (C009 by-name identity).

    ttl?: number

    QUERY role: cache lifetime in SECONDS before the store revalidates (the generator's cacheLifetime hint).

    revalidateOnFocus?: boolean

    QUERY role: revalidate the store when the window/tab regains focus (default false).

    params?: string[]

    QUERY role: the path/query PARAM NAMES (never values) that key a parameterized store family — one store per distinct arg tuple.

    invalidates?: string[]

    MUTATION role: the store keys this operation invalidates on a successful (2xx) response → the generated client refetches them.

    onSuccess?: string

    the success message the callback layer surfaces on a 2xx (advisory; the renderer is INJECTED, the text is DECLARED).