katanakit-js
Classes
| Class | Description |
|---|---|
| AccessService | AccessService - Singleton facade con Strategy Pattern. |
| AgentService | AgentService - Singleton facade con Strategy Pattern. |
| ArrayService | ArrayService — singleton facade for collection helpers. |
| AssistantService | AssistantService - Singleton para el asistente conversacional. |
| AuthService | Holds the providers a deployment has configured and routes a request to one. |
| CancelledError | The error thrown by a Retryer (and surfaced to query.promise/mutation) when a fetch is cancelled, e.g. via query.cancel(). revert, if true, tells the caller to restore the state the query was in before the fetch started instead of surfacing the error. silent, if true, tells the caller to suppress this error and instead resolve with the promise of the fetch that triggered the cancellation. |
| DatesService | DatesService - Singleton para operaciones de fechas. |
| DirectoryService | User management over any storage, with the lockout guards built in. |
| FetchApiManager | FetchApiManager - Singleton para el registro de APIs y peticiones HTTP. |
| FlatAccessStrategy | Estrategia estricta: sólo verifica capacidades declaradas explícitamente en el rol del sujeto, sin her jerarquía. Útil cuando cada rol debe declarar todo lo que puede hacer. |
| HierarchicalAccessStrategy | Estrategia por defecto: control de acceso jerárquico basado en roles registrados. Es la estrategia estándar del servicio. |
| InfiniteQueryObserver | An InfiniteQueryObserver extends QueryObserver to observe and switch between infinite queries. It augments the base QueryObserverResult with infinite-query-specific fields and methods, such as hasNextPage and fetchNextPage, and is the primitive that framework adapters (e.g. useInfiniteQuery) build their hooks on top of. |
| LoggerService | LoggerService - Singleton para logging Aplica el patrón Singleton para garantizar una única instancia de logger. |
| Mutation | Represents a single mutation attempt. A Mutation holds the mutation's options, state (data/error/status), and the MutationObservers currently subscribed to it. |
| MutationCache | The MutationCache is the storage for mutations. |
| MutationObserver | Observes a single mutation and derives a MutationObserverResult from it. A framework hook like useMutation creates one MutationObserver per hook call, keeps it stable across re-renders, calls setOptions when the options passed to the hook change, subscribes to it to re-render on updates, and reads getCurrentResult() for the value to return. Calling mutate() builds a new underlying Mutation in the MutationCache and executes it. |
| OpenAiCompatibleStrategy | Estrategia por defecto: proveedor compatible con OpenAI (POST /chat/completions con Bearer token). Cubre DashScope en modo compatible, OpenAI, Azure OpenAI y la mayoría de endpoints self-hosted. |
| QueriesObserver | A QueriesObserver watches an array of queries at once, exposing them as a single array of QueryObserverResults (or, when a combine option is given, as a combined value derived from that array). It manages one internal QueryObserver per query, and is the primitive that framework adapters (e.g. useQueries) build their hooks on top of. |
| Query | Represents a single cached query. A Query holds the query's key, options, state (data/error/status), and the observers currently subscribed to it. |
| QueryCache | The QueryCache is the storage mechanism for TanStack Query. It stores all the data, meta information, and state of the queries it contains. |
| QueryClient | QueryClient is used to interact with a cache of queries and mutations. It owns a QueryCache and a MutationCache (creating default ones if none are passed in) and holds the default options that are applied to queries and mutations created through it. |
| QueryClientFactory | QueryClientFactory - Factory Pattern para crear instancias de QueryClient. |
| QueryObserver | A QueryObserver watches a single query in the QueryCache and computes a QueryObserverResult from its state, recomputing and notifying subscribers whenever the underlying query (or the observer's options) changes. It is the primitive that framework adapters (e.g. useQuery) build their hooks on top of, but it can also be used directly to observe and switch between queries outside of any framework. |
| QueryService | QueryService - Singleton para el QueryClient compartido. |
| UtilsService | UtilsService - Singleton para utilidades genéricas. |
| ValidationService | ValidationService - Singleton para validaciones. |
Interfaces
| Interface | Description |
|---|---|
| AgentRunOptions | Options for running the tool-calling agent loop. |
| AiChatOptions | Options for a single chat completion. |
| AiTool | A tool the agent can invoke. parameters is a JSON Schema object describing the expected input. |
| ApiEntry | - |
| AssistantInitConfig | Configuration for the assistant facade. |
| AssistantReplyOptions | Options for a single assistant reply. |
| AstroPath | - |
| AuthError | Why a provider could not answer. |
| BatteryManager | Type for the experimental Battery API. |
| CacheDecoratorOptions | CacheDecorator - Decorator Pattern para caché de resultados. |
| CancelOptions | Options for cancelling an in-flight fetch, e.g. via query.cancel(). They are carried on the CancelledError that the cancelled fetch rejects with. |
| CollectionEntryLike | Minimal shape of an Astro content collection entry. |
| ConversationStore | Persistence contract for assistant conversations. |
| DatesServiceTypes | Contract of the dates facade. |
| DefaultOptions | - |
| DehydratedState | A serializable snapshot of a QueryClient's cache, as produced by dehydrate and consumed by hydrate. Typically transported from server to client (e.g. embedded in server-rendered markup) to seed the client's cache with data that has already been fetched, avoiding a redundant fetch on the client. |
| DehydrateOptions | Options for dehydrate, controlling which queries/mutations are included in the resulting DehydratedState and how their data/errors are transformed before being serialized (e.g. for embedding in server-rendered markup). |
| DirectoryActor | Actions that lock every administrator out of their own system. |
| DirectoryError | - |
| DirectoryRepository | Where user records actually live. |
| DirectoryServiceOptions | - |
| FetchNextPageOptions | - |
| FetchOptions | Options passed when executing a fetch request. |
| FetchPreviousPageOptions | - |
| FetchRequest | Mutable request inputs passed through registered HTTP request interceptors. |
| FocusManager | The FocusManager manages the focus state within TanStack Query. |
| GrantAwareOptions | - |
| HydrateOptions | Options for hydrate, controlling the default options applied to queries/mutations restored from a DehydratedState, and how to reverse any transformation applied by DehydrateOptions.serializeData. |
| IAccessService | Contract of the access-control facade. Pure, no I/O. |
| IAccessStrategy | Estrategia de verificación de acceso - Strategy Pattern. |
| IAiProviderStrategy | Estrategia de proveedor AI - Strategy Pattern. |
| IAiService | Contract of the AI/agent facade. |
| IAppUtils | Contract of the app utilities facade. |
| IAssistantService | Contract of the assistant facade. |
| IAstroService | Contract of the Astro facade. |
| IAuthProvider | An identity provider the kit can ask "who is this?". |
| IConverterService | Contract of the unit converter facade. |
| ICryptoStrategy | Contract for a crypto strategy. |
| IDataUtils | Contract of the data utilities. |
| IDomService | Contract of the DOM facade. |
| IFetchApiManager | Contract of the fetch facade. |
| IFormatterService | Contract of the formatter facade. |
| InfiniteData | The data shape of an infinite query: every page fetched so far, plus the page param each one was fetched with. pages and pageParams are index-aligned — pageParams[i] is the param that produced pages[i]. |
| InfiniteQueryObserverBaseResult | - |
| InfiniteQueryObserverLoadingErrorResult | - |
| InfiniteQueryObserverLoadingResult | - |
| InfiniteQueryObserverOptions | - |
| InfiniteQueryObserverPendingResult | - |
| InfiniteQueryObserverPlaceholderResult | - |
| InfiniteQueryObserverRefetchErrorResult | - |
| InfiniteQueryObserverSuccessResult | - |
| InfiniteQueryPageParamsOptions | - |
| InitialPageParam | - |
| INotionService | Contract of the Notion adapter facade. |
| IntervalControl | Control object returned by interval operations. |
| InvalidateOptions | - |
| InvalidateQueryFilters | Filters used to select queries, for example in queryClient.getQueriesData or queryClient.invalidateQueries. All provided filters must match; filters that are left unspecified are ignored. |
| IReactiveService | Contract of the reactive facade. |
| IRssService | Contract of the RSS facade. |
| ISystemUtils | Contract of the system utilities. |
| IThemeService | Contract of the theme facade. |
| IUuidStrategy | Contract for a UUID strategy. |
| IWordPressService | Contract of the WordPress adapter facade. |
| MutateOptions | - |
| MutationCacheConfig | Global callbacks that fire for every mutation handled by a MutationCache, regardless of which component or observer triggered it. They differ from the defaultOptions provided to a QueryClient in two ways: defaultOptions can be overridden by each mutation, while these callbacks are always called, and onMutate here does not allow returning a result. |
| MutationFilters | Filters used to select mutations, for example in mutationCache.findAll or queryClient.isMutating. All provided filters must match; filters that are left unspecified are ignored. |
| MutationObserverBaseResult | The raw state stored on a Mutation instance. This is the underlying state that observer results (e.g. MutationObserverResult) are derived from. |
| MutationObserverErrorResult | The raw state stored on a Mutation instance. This is the underlying state that observer results (e.g. MutationObserverResult) are derived from. |
| MutationObserverIdleResult | The raw state stored on a Mutation instance. This is the underlying state that observer results (e.g. MutationObserverResult) are derived from. |
| MutationObserverLoadingResult | The raw state stored on a Mutation instance. This is the underlying state that observer results (e.g. MutationObserverResult) are derived from. |
| MutationObserverOptions | - |
| MutationObserverSuccessResult | The raw state stored on a Mutation instance. This is the underlying state that observer results (e.g. MutationObserverResult) are derived from. |
| MutationOptions | - |
| MutationState | The raw state stored on a Mutation instance. This is the underlying state that observer results (e.g. MutationObserverResult) are derived from. |
| NotifyEvent | - |
| NotionFilter | Filter for querying a Notion database. |
| ObserverConfig | Configuration for a registered IntersectionObserver. |
| ObserverEntry | Internal registry entry storing an observer instance and its tracked targets. |
| OnlineManager | The OnlineManager manages the online state within TanStack Query. It can be used to change the default event listeners or to manually change the online state. |
| PaginationProps | - |
| PathsOptions | - |
| QueriesObserverOptions | - |
| QueryCacheConfig | Global callbacks that fire for every query handled by a QueryCache, regardless of which component or observer triggered it. Unlike QueryClient's defaultOptions, which a query can override, these callbacks are always called. Unlike MutationCacheConfig's callbacks, these are fire-and-forget: their return value is not awaited before the query settles. |
| QueryClientConfig | - |
| QueryExecuteOptions | - |
| QueryFilters | Filters used to select queries, for example in queryClient.getQueriesData or queryClient.invalidateQueries. All provided filters must match; filters that are left unspecified are ignored. |
| QueryObserverBaseResult | - |
| QueryObserverLoadingErrorResult | - |
| QueryObserverLoadingResult | - |
| QueryObserverOptions | - |
| QueryObserverPendingResult | - |
| QueryObserverPlaceholderResult | - |
| QueryObserverRefetchErrorResult | - |
| QueryObserverSuccessResult | - |
| QueryOptions | - |
| QueryState | The raw state stored on a Query instance. This is the underlying state that observer results (e.g. QueryObserverResult) are derived from. |
| RefetchOptions | - |
| RefetchQueryFilters | Filters used to select queries, for example in queryClient.getQueriesData or queryClient.invalidateQueries. All provided filters must match; filters that are left unspecified are ignored. |
| Register | The interface to augment via declaration merging to override Query's default types repository-wide. Each field it declares replaces the default of the matching type: defaultError for DefaultError, queryKey for QueryKey, mutationKey for MutationKey, queryMeta for QueryMeta and mutationMeta for MutationMeta. Leave a field out to keep that type's default. Augment the module you install — @tanstack/react-query, @tanstack/vue-query, @tanstack/solid-query, @tanstack/svelte-query, @tanstack/preact-query, @tanstack/angular-query-experimental or @tanstack/lit-query. Augmenting @tanstack/query-core works too and covers every adapter at once. |
| ResetOptions | - |
| ResourceAccessDecision | - |
| ResultOptions | - |
| SalePrice | Result of useSalePrice: the regular price, the discounted price and the rounded percentage taken off. |
| ScrollOptions | Options for scrolling operations. |
| SeoMetaArticle | Article Open Graph extensions (og:type=article). |
| SeoMetaFlat | Flat meta: HTML head essentials, Open Graph and optional Twitter/X cards. |
| SeoOgImageObject | Open Graph image (string URL or object). |
| SeoRobotsObject | Robots as string or simple object. |
| SeoTagNode | - |
| SetDataOptions | Options for writing data into the cache, e.g. via queryClient.setQueryData(). updatedAt overrides the timestamp the data is recorded with, which is what staleness is measured from; omit it to use the current time. |
| SignalGetter | - |
| SiteConfig | Site-wide configuration for KatanaKit SEO / RSS helpers. Framework-agnostic — reuse in Vanilla, Astro, Vue/React SPAs, Express, etc. |
| StorageStrategy | Strategy contract: homogeneous storage without any. |
| Subscribable | - |
| ThemeOptions | - |
| TimeoutControl | Control object returned by timeout operations. |
| TimeoutManager | Allows customization of how timeouts are created. |
| ToggleSignalSetter | - |
| UrlOptions | - |
| ValidationSchema | Schema-agnostic contract. Accepts Zod (safeParse), Valibot (safeParse), Standard Schema (~standard.validate), Yup (validateSync) or any object exposing one of those members. |
| WorkerPoolEntry | - |
Type Aliases
| Type Alias | Description |
|---|---|
| AccessCapability | A namespaced capability, <domain>:<action>[:<scope>]. |
| AccessResource | Anything the authorization layer can check a subject against. |
| AccessRole | A role slug. Closed vocabulary by convention (BuiltInRole), open by schema: useRegisterRole takes any slug matching the pattern. |
| AccessRoleDefinition | A role definition: slug, label, hierarchy rank and the capabilities it grants. |
| AccessSource | Where a permission came from. Kept so audit logs can say why. |
| AccessSubject | Structural subject for access checks. Decoupled from the persistence layer: any object with an id and a role list can be checked (e.g. a Prisma Account row, a JWT payload, or a test fixture). Extra keys are preserved, so a subject can also carry the principal it was resolved from. |
| AgentData | Payload returned by a successful useRunAgent call. |
| AgentResult | Safe result of an agent run. |
| AgentStep | One round of tool execution inside the agent loop. |
| AiError | Safe error returned on non-2xx or network failures. |
| AiFunctionCall | Function invocation requested by the model when using tools. |
| AiMessage | A chat message. tool_calls and tool_call_id use snake_case on purpose: they mirror the OpenAI-compatible protocol so messages pass through unchanged. |
| AiProviderConfig | Provider configuration for an OpenAI-compatible chat/agent endpoint. |
| AiResult | Safe result (discriminated union) without throwing. |
| AiRole | Role of a chat message in the OpenAI-compatible protocol. |
| AiToolCall | A single tool call emitted by the model (OpenAI-compatible wire shape). |
| AnyDataTag | - |
| ApiConfigValue | Values accepted by defineApiConfig: an ApiEntry, a boolean flag (kept on config only — never registered as an API) or a method. |
| ApiError | Structure of the safe error returned on non-2xx or network failures. |
| ApisConfig | - |
| AppDateFormatOptions | - |
| AssistantReply | Payload returned by a successful assistant reply. |
| AssistantResult | Safe result of an assistant reply. |
| AstroServiceError | - |
| AstroServiceResult | Safe Result (discriminated union without throwing). |
| AuthRequestLike | Anything that carries the headers of an inbound request. |
| AuthResult | Safe result of an authentication step. |
| BuiltInCapability | Capabilities the kit ships with. A convenience alias for autocomplete — the schema itself accepts any <domain>:<action>[:<scope>] string. |
| BuiltInRole | Role slugs the kit ships with. A convenience alias for autocomplete — the schema itself accepts any slug, and deployments register their own. |
| ConfigData | The props/booleans half of a define*Config literal — the config data. |
| ConfigFacade | What every define*Config returns: the registered config under config, plus the methods declared alongside it so this.config resolves inside them. |
| ConfigMethod | Any method a consumer declares inline in a define*Config literal. Written with function (never an arrow) so this resolves to the facade. |
| ConfigMethodEntries | The methods half of a define*Config literal. |
| ConfigMethodKeys | Keys of T whose value is a ConfigMethod. Methods declared as optional are still detected (NonNullable), so they are split out of the config half rather than leaking into it. |
| ConfigValues | Constrains every non-method entry of a define*Config literal to V, while leaving method entries untouched. Pair with NoInfer<T> in the signature so it validates without stealing inference from the literal. |
| Currency | - |
| CurrencyFormatOptions | - |
| DataTag | - |
| dataTagErrorSymbol | - |
| dataTagSymbol | - |
| DateFormatOptions | Backwards-compatible alias for AppDateFormatOptions. |
| DateOrder | Relative ordering of two dates. |
| DateUnit | Granularity accepted by the calendar arithmetic helpers. |
| DefaultedInfiniteQueryObserverOptions | - |
| DefaultedQueryObserverOptions | - |
| DefaultError | The error type used wherever an error is not given an explicit type parameter. Defaults to Error; declare defaultError on Register to change it everywhere at once. |
| DefinedInfiniteQueryObserverResult | - |
| DefinedQueryObserverResult | - |
| DirectoryErrorCode | - |
| DirectoryPage | - |
| DirectoryPageResult | Shape a repository must satisfy — lets a plain object be passed as one. |
| DirectoryQuery | - |
| DirectoryResult | Safe result of a directory operation. Never throws for a refused action. |
| DirectoryUser | - |
| DistributiveOmit | - |
| FakeVehicle | Generic fake vehicle returned by useFakeVehicle. |
| FetchResult | Safe result, discriminated union (Astro Actions style) without throwing. The ok flag narrows the union between the success and error branches. |
| FetchStatus | - |
| FieldErrors | A single field-level validation message keyed by field name. |
| FileEncoding | Text encodings accepted by the filesystem helpers. |
| FileHashAlgorithm | Hash algorithms supported by useHashFile / useVerifyFileHash. |
| FileStats | Portable stats subset returned by useGetFileStats. |
| FilesystemError | Safe error from a filesystem operation (NodeJS.ErrnoException-shaped). |
| FilesystemResult | Safe Result for filesystem operations: { data, error, ok }, never throws. |
| GeometryFormatOptions | Options for number formatting in geometry calculations. |
| GeoPosition | Represents a geographic position with latitude, longitude and accuracy. |
| GetNextPageParamFunction | - |
| GetPreviousPageParamFunction | - |
| Grant | A role scoped to one resource. |
| GrantResolver | Supplies the roles a subject holds over one resource. |
| HttpMethod | - |
| Identity | A person in your system. |
| IdentityStatus | Account lifecycle state you own. |
| IfConfig | Config for the InsForge adapter. InsForge is the database fallback (primary data layer is Cloudflare); storage and edge functions are also available through the same client. |
| IfInsertRows | Rows for insert (one or many). |
| IfInvokeOptions | Edge function invocation. |
| IfListOptions | Options for listing bucket objects. |
| IfOrder | Sort clause for table queries. |
| IfRpcCall | Postgres function (RPC) call. |
| IfStorageRef | Bucket + object key reference for storage operations. |
| IfTableQuery | Options for a table read. Filters map to equality clauses. |
| IfUpdatePatch | Patch for update (must be paired with filters — mass updates are refused). |
| IfWriteQuery | Options for an update or delete. Filters are REQUIRED (no mass writes). |
| InferDataFromTag | - |
| InferErrorFromTag | - |
| InfiniteQueryExecuteOptions | - |
| InfiniteQueryObserverResult | - |
| InitialDataFunction | - |
| ISerializedError | Serialized error shape. |
| LazyLoaderEntry | Internal registry entry for lazy loading configurations. |
| Locale | - |
| LogLevel | Native console methods used as log levels. |
| ManagedTimerId | Wrapping setTimeout is awkward from a typing perspective because platform typings may extend the return type of setTimeout. For example, NodeJS typings add NodeJS.Timeout; but a non-default timeoutManager may not be able to return such a type. |
| MediaProvider | Where a media source comes from. file = direct mp4/webm (native <video>). |
| MediaSource | Normalized media source: provider + stable id or direct src. |
| MutateFunction | - |
| MutateFunctionRest | - |
| MutationCacheNotifyEvent | The event passed to a MutationCache subscriber. Fired whenever a mutation is added or removed from the cache, its state is updated, or one of its observers is added, removed, or has its options updated. |
| MutationFunction | - |
| MutationFunctionContext | - |
| MutationKey | The type of a mutation key — the serializable array used to identify and filter mutations. Defaults to ReadonlyArray<unknown>; declare mutationKey on Register to narrow it repository-wide. |
| MutationMeta | The type of the meta object that can be attached to a mutation and read back from mutationFn, callbacks and cache-level handlers. Defaults to Record<string, unknown>; declare mutationMeta on Register to narrow it. |
| MutationObserverResult | - |
| MutationScope | Groups mutations so they run one after another instead of in parallel. Mutations that share the same id form a queue: while one is running, the others wait in isPaused: true state and resume automatically when their turn comes. Mutations with no scope always run in parallel. |
| MutationStatus | - |
| NetworkMode | - |
| NonUndefinedGuard | - |
| NotifyEventType | - |
| NotifyOnChangeProps | - |
| NotionBlock | A Notion block object. |
| NotionBlockList | Result of listing block children (paginated). |
| NotionConfig | Configuration for the Notion API integration. |
| NotionCover | Cover image on a page. |
| NotionDatabase | A Notion database object. |
| NotionDatabaseQuery | Query options for a Notion database. |
| NotionIcon | Icon on a page or database (emoji or file). |
| NotionPage | A Notion page object. |
| NotionPageList | Result of querying a Notion database (paginated). |
| NotionParent | Parent reference for pages and databases. |
| NotionProperty | Property value on a Notion page. |
| NotionPropertySchema | Schema definition for a database property. |
| NotionRichText | Rich text object used in Notion blocks and properties. |
| NotionSearchQuery | Search query options for the Notion API. |
| NotionSearchResult | Result of a Notion search (paginated). |
| NotionSort | Sort option for querying a Notion database. |
| NotionUser | A Notion user object. |
| NotionUserList | Paginated list of Notion users. |
| NumberFormatOptions | - |
| ObserverCallback | Callback invoked when an observed element enters the viewport. |
| ObserverTarget | Target can be either an HTMLElement reference or a CSS selector string. |
| OmitKeyof | - |
| Override | - |
| PathParams | - |
| PlaceholderDataFunction | - |
| Principal | The authenticated subject, as reported by an identity provider. |
| ProductType | - |
| QueriesPlaceholderDataFunction | - |
| QueryBooleanOption | - |
| QueryCacheNotifyEvent | The event passed to a QueryCache subscriber. Fired whenever a query is added or removed from the cache, its state is updated (e.g. via query.setState or queryClient.removeQueries), or one of its observers is added, removed, or has its results or options updated. |
| QueryFunction | - |
| QueryFunctionContext | - |
| QueryKey | The type of a query key — the serializable array that identifies a query in the cache. Defaults to ReadonlyArray<unknown>; declare queryKey on Register to narrow it repository-wide. |
| QueryKeyHashFunction | - |
| QueryKeyWithDataTag | - |
| QueryMeta | The type of the meta object that can be attached to a query and read back from queryFn, callbacks and cache-level handlers. Defaults to Record<string, unknown>; declare queryMeta on Register to narrow it. |
| QueryObserverResult | - |
| QueryParams | - |
| QueryPersister | - |
| QueryStatus | - |
| ReadDirEntry | A single directory entry returned by useReadDir. |
| ReadDirOptions | Options for useReadDir. |
| RequestInterceptor | Inspects or modifies a request before fetch; interceptors run in registration order. |
| RssConfig | Configuration for generating an RSS feed. |
| RssItem | A single item in an RSS feed. |
| RssResult | Result of an RSS generation attempt. |
| SafeResult | Generic Safe Result discriminated union (Astro Actions style): the ok flag narrows between the success and error branches and nothing is thrown. |
| SalePriceOptions | - |
| ScrollPosition | Represents scroll position. |
| SeoArrayable | - |
| SeoBooleanable | Slim SEO types: typical HTML meta + Open Graph (Facebook) only. CamelCase keys map to <title> / <meta> / <link rel="canonical">. |
| SeoMetaInput | Flat meta input (all keys optional / nullable). |
| SeoTagResult | Result of useSeoMeta: html / tags for the head, plus one flat object of resolved fields (site + HTML + OG + Twitter). No duplicate title / meta.title / config.title. |
| SignalListener | - |
| SignalSetter | - |
| SkipToken | The type of the skipToken sentinel value. |
| SmartVideoOptions | Input for useBuildVideoEmbed (core) — one src, unified output. |
| StaleTime | - |
| StaleTimeFunction | - |
| StorageTarget | - |
| TemporalInput | - |
| ThemeMode | - |
| ThrowOnError | - |
| TimeoutCallback | TimeoutManager does not support passing arguments to the callback. |
| TimeoutProvider | Backend for timer functions. |
| UnsetMarker | - |
| Updater | Either a plain value of type TOutput, or a function that receives TInput and returns TOutput. Used for example by setQueryData-style updaters, which accept either the new data directly or a function that computes it from the previous data. See functionalUpdate. |
| UseSeoMetaBase | Site + HTML + OG fields in one object (before Omit). |
| UseSeoMetaOptions | Public options for useSeoMeta. HTML, Open Graph, Twitter/X card and site fields in one object. Omit keys you do not want in the type. |
| ValidationIssue | Minimal issue shape (error.issues entries). |
| ValidationParseResult | Minimal Zod-like success/failure result (schema.safeParse). |
| ViewportSize | Represents viewport dimensions. |
| WatchCallback | Watch callback taken from the native Vue watch. Any internal function is accepted: sync or async, with (newValue, oldValue) args or with no args at all (e.g. () => checkValidations()). |
| WatchOptions | Watch options taken from the native Vue watch. deep defaults to true in useKatanaWatch. |
| WatchSource | Watch source taken from the native Vue watch (ref, reactive object, getter function or array of those). |
| WatchStopHandle | Stop function taken from the native Vue watch. |
| WithRequired | - |
| WordPressAuth | Authentication methods for WordPress. |
| WordPressConfig | Configuration for the WordPress REST API integration. |
| WorkerFunc | - |
| WpAcfFields | Container for ACF (Advanced Custom Fields) fields on a WordPress entity. |
| WpBaseEntity | Base fields shared by all WordPress entities. |
| WpBatchOperation | A batch operation for the WordPress REST API. |
| WpBatchResult | Result of a WordPress batch operation. |
| WpCapability | A WordPress capability name (edit_orders). |
| WpCapabilityMap | Capability map as WordPress reports it ({ manage_options: true }). |
| WpCategory | A WordPress category. |
| WpCategoryCreate | Payload for creating a WordPress category. |
| WpCategoryUpdate | Payload for updating a WordPress category. |
| WpComment | A WordPress comment. |
| WpCommentCreate | Payload for creating a WordPress comment. |
| WpCommentUpdate | Payload for updating a WordPress comment. |
| WpEmbedded | Embedded resources returned by WordPress when _embed is used. |
| WpMedia | A WordPress media item (attachment). |
| WpMediaMeta | Metadata for a media upload. |
| WpMediaUpdate | Payload for updating a WordPress media item. |
| WpPage | A WordPress page. |
| WpPageCreate | Payload for creating a WordPress page. |
| WpPageUpdate | Payload for updating a WordPress page. |
| WpPost | A WordPress post. |
| WpPostCreate | Payload for creating a WordPress post. |
| WpPostUpdate | Payload for updating a WordPress post. |
| WpQueryParams | Common query parameters for WordPress REST API list endpoints. |
| WpRoleAudit | A declared role compared against what the live site reports. |
| WpRoleAuditStatus | Verification outcome of a declared role: verified, partial, unverifiable. |
| WpRoleDefinition | A role declaration: the PHP-free replacement for add_role(). |
| WpRoleRegistry | A declared role registry. |
| WpTag | A WordPress tag. |
| WpTagCreate | Payload for creating a WordPress tag. |
| WpTagUpdate | Payload for updating a WordPress tag. |
| WpUser | A WordPress user. |
| WpUserCreate | Payload for creating a WordPress user. |
| WpUserUpdate | Payload for updating a WordPress user. |
| WriteFileOptions | Options for useWriteFile / useAppendFile. |
| YoutubeApiConfig | Config for the YouTube service. One GCP project serves all repos. |
| YoutubeChannelsResponse | Minimal channels.list shape (only what the service reads). |
| YoutubeEmbedOptions | Options for the YouTube nocookie embed URL. |
| YoutubeListParams | Params for useGetChannelVideos. |
| YoutubePlaylistItemsResponse | Minimal playlistItems.list shape (only what the service reads). |
| YoutubeThumbnailQuality | Thumbnail quality for i.ytimg.com. |
| YoutubeVideoNormalized | Normalized video, enriched with player-ready URLs. |
| YoutubeVideoPage | Paginated channel listing result. |
| YoutubeVideosResponse | Minimal videos.list shape (only what the service reads). |
| YoutubeVideoThumbnails | Resolution-keyed thumbnails (all derivable without an API key). |
Variables
| Variable | Description |
|---|---|
| AccessCapabilitySchema | A capability: at least <domain>:<action>, optionally :action:<scope>. Rejecting a bare word matters — an unscoped delete is exactly the ambiguity content:delete:own exists to remove. |
| AccessResourceSchema | The thing being acted on — enough for the authorization layer to route a check to the right table, and nothing more. |
| AccessRoleDefinitionSchema | A role definition. |
| AccessRoleSchema | A role slug: lowercase, and made of alphanumeric words joined by _, . or -. The format is enforced so a typo fails loudly at the schema boundary instead of silently granting nothing. |
| AccessSubjectSchema | Structural subject for access checks. Decoupled from the persistence layer: any object with an id and a role list can be checked (e.g. a Prisma Account row, a JWT payload, or a test fixture). |
| AgentDataSchema | Payload returned by a successful useRunAgent call. |
| AgentStepSchema | One round of tool execution inside the agent loop. |
| AiErrorSchema | Safe error returned on non-2xx or network failures (AI boundary). |
| AiFunctionCallSchema | Function invocation requested by the model when using tools. |
| AiMessageSchema | A chat message. tool_calls and tool_call_id use snake_case on purpose: they mirror the OpenAI-compatible protocol so messages pass through unchanged. |
| AiProviderConfigSchema | Provider configuration for an OpenAI-compatible chat/agent endpoint. |
| AiRoleSchema | Role of a chat message in the OpenAI-compatible protocol. |
| AiToolCallSchema | A single tool call emitted by the model (OpenAI-compatible wire shape). |
| ApiErrorSchema | Safe error returned on non-2xx, network or validation failures. |
| AppDateFormatOptionsSchema | Date format parts (subset of Intl.DateTimeFormatOptions). |
| assistant | Object facade implementing IAssistantService over the singleton. |
| AssistantReplySchema | Payload returned by a successful assistant reply. |
| AstroServiceErrorSchema | Error shape for Astro content operations. |
| BUILT_IN_CAPABILITIES | Capabilities that ship with the kit. Namespaced as <domain>:<action> [:<scope>]; the scope suffix is what keeps edit:own and edit:any from being confused. Open-ended by design — a deployment that needs expediente:firmar or nomina:aprobar registers its own. |
| BUILT_IN_ROLE_SLUGS | Role slugs that ship with the kit, ordered from most to least privileged. |
| CurrencyFormatOptionsSchema | Options for currency formatting. |
| CurrencySchema | Supported ISO currency codes. |
| dataTagErrorSymbol | - |
| dataTagSymbol | - |
| DateOrderSchema | Relative ordering of two dates, matching Notion's dateOrder(). |
| DateUnitSchema | Granularity of a date calculation, matching Notion's formula vocabulary. |
| defaultScheduler | Default scheduling function used by the notify manager. Schedules the callback with the system's setTimeout(callback, 0). |
| DirectoryErrorCodeSchema | Why an operation was refused. |
| DirectoryPageSchema | A page of results plus the cursor for the next one. |
| DirectoryQuerySchema | A page request. cursor is opaque and provider-defined — the kit neither issues nor interprets it. |
| DirectoryUserSchema | A person as your directory stores them. |
| environmentManager | Manages how TanStack Query detects whether the current runtime should be treated as server-side, which disables scheduling refetch timers and changes the default retry count and gcTime. By default, the detection treats a missing window (or the presence of a Deno global) as server. |
| FakeVehicleSchema | Generic fake vehicle shape returned by useFakeVehicle. |
| FieldErrorsSchema | A single field-level validation message keyed by field name. |
| FileEncodingSchema | Text encodings accepted by the filesystem helpers. |
| FileHashAlgorithmSchema | Hash algorithms supported by useHashFile / useVerifyFileHash. |
| FileStatsSchema | Portable stats subset for a file or directory. |
| FilesystemErrorSchema | Safe error from a filesystem operation (NodeJS.ErrnoException-shaped). |
| focusManager | Singleton instance of FocusManager, used to manage and observe the focus state within TanStack Query. |
| GeometryFormatOptionsSchema | Options for number formatting in geometry calculations. |
| GeometryUtils | Consolidated pure geometry utilities namespace. Groups area, perimeter and volume calculations (no shared mutable state). |
| GeoPositionSchema | Represents a geographic position with latitude, longitude and accuracy. |
| GrantSchema | A role held over one specific resource — the "share with restricted access" that a content-management role ladder cannot express. |
| HttpMethodSchema | HTTP verbs supported by the fetch facade. |
| IdentitySchema | A person in your system, as opposed to the principal they log in with. |
| IdentityStatusSchema | Lifecycle of an account you own. |
| IfBucketSchema | Bucket name. |
| IfConfigSchema | Config for the InsForge adapter. InsForge is the database fallback (primary data layer is Cloudflare); storage and edge functions are also available through the same client. |
| IfInsertRowsSchema | Rows for insert (one or many). |
| IfInvokeOptionsSchema | Edge function invocation. |
| IfListOptionsSchema | Options for listing bucket objects. |
| IfOrderSchema | Sort clause for table queries. |
| IfRpcCallSchema | Postgres function (RPC) call. |
| IfStorageRefSchema | Bucket + object key reference for storage operations. |
| IfTableNameSchema | Table name (bare; schema comes from config or query options). |
| IfTableQuerySchema | Options for a table read. Filters map to equality clauses. |
| IfUpdatePatchSchema | Patch for update (must be paired with filters — mass updates are refused). |
| IfWriteQuerySchema | Options for an update or delete. Filters are REQUIRED (no mass writes). |
| KITT_BASE_URL | Default endpoint for Alibaba Cloud Model Studio (DashScope) compatible mode. |
| KITT_DEFAULT_MODEL | Default model for the Kitt assistant preset. |
| KITT_SYSTEM_PROMPT | Default system prompt injected when the agent is configured without one. |
| kittPreset | Reusable preset (base URL + model) for the Kitt assistant. |
| LazyLoaderEntrySchema | Internal registry entry for lazy loading configurations. |
| LazyNodeCryptoStrategy | Lazy Node.js crypto strategy for PBKDF2 hashing. |
| LocaleSchema | Locales with first-class formatting support. |
| LogLevelSchema | Native console methods used as log levels. |
| MediaProviderSchema | Where a media source comes from. file = direct mp4/webm (native <video>). |
| MediaSourceSchema | Normalized media source: provider + stable id or direct src. |
| NativeUuidStrategy | Native UUID strategy using globalThis.crypto.randomUUID, with a fallback. |
| notifyManager | Handles scheduling and batching callbacks in TanStack Query. |
| NotionBlockListSchema | Result of listing block children (paginated). |
| NotionBlockResponseSchema | Single block response (fields may be sparse depending on the endpoint). |
| NotionBlockSchema | A Notion block object. |
| NotionConfigSchema | Config for the Notion API integration. |
| NotionCoverSchema | Cover image on a page. |
| NotionDatabaseQuerySchema | Query options for a Notion database. |
| NotionDatabaseResponseSchema | Single database response (fields may be sparse depending on the endpoint). |
| NotionDatabaseSchema | A Notion database object. |
| NotionFilterSchema | Filter for querying a Notion database. |
| NotionIconSchema | Icon on a page or database (emoji or file). |
| NotionPageListSchema | Result of querying a Notion database (paginated). |
| NotionPageResponseSchema | Single page response (fields may be sparse depending on the endpoint). |
| NotionPageSchema | A Notion page object. |
| NotionParentSchema | Parent reference for pages and databases. |
| NotionPropertySchemaSchema | Schema definition for a database property. |
| NotionPropertyValueSchema | Property value on a Notion page. |
| NotionRichTextSchema | Rich text object used in Notion blocks and properties. |
| NotionSearchQuerySchema | Search query options for the Notion API. |
| NotionSearchResultSchema | Result of a Notion search (paginated). |
| NotionSortSchema | Sort option for querying a Notion database. |
| NotionUserListSchema | Paginated list of Notion users. |
| NotionUserResponseSchema | Single user response (fields may be sparse depending on the endpoint). |
| NotionUserSchema | A Notion user object. |
| NumberFormatOptionsSchema | Options for plain number formatting. |
| onlineManager | Singleton instance of OnlineManager, used to manage and observe the online state within TanStack Query. |
| PrincipalSchema | A principal is the result of authenticating: who the provider says you are, and how it proved it. |
| ProductTypeSchema | Demo product shape (Express adapter). |
| ReadDirEntrySchema | A single directory entry with pre-resolved type flags. |
| ReadDirOptionsSchema | Options for directory listing. |
| RssConfigSchema | Configuration for generating an RSS feed. |
| RssItemSchema | A single item in an RSS feed. |
| SalePriceOptionsSchema | Options for sale price arithmetic. |
| ScrollPositionSchema | Represents scroll position. |
| SerializedErrorSchema | Serialized error shape. |
| siteConfig | Demo defaults — override in your project. |
| skipToken | Sentinel value that can be passed as a query's queryFn to conditionally disable the query (equivalent to enabled: false) while preserving full type inference for the query's data. Unlike enabled: false, a query disabled via skipToken cannot be triggered with refetch. |
| SmartVideoOptionsSchema | Input for useBuildVideoEmbed (core) — one src, unified output. |
| StorageTargetSchema | Storage backends (Web Storage API). |
| ThemeModeSchema | Color scheme modes. |
| timeoutManager | Singleton instance of TimeoutManager, used throughout TanStack Query to schedule and cancel timers. |
| unsetMarker | - |
| useQuerySelector | Returns the first element matching a CSS selector. |
| useQuerySelectorAll | Returns all elements matching a CSS selector. |
| ValidationIssueSchema | Minimal issue shape (error.issues entries). |
| ViewportSizeSchema | Represents viewport dimensions. |
| WordPressAuthSchema | Authentication methods for WordPress. |
| WordPressConfigSchema | Configuration for the WordPress REST API integration. |
| WpAcfFieldsSchema | Container for ACF (Advanced Custom Fields) fields. |
| WpBaseEntitySchema | Base fields shared by all WordPress entities. |
| WpBatchOperationSchema | A batch operation for the WordPress REST API. |
| WpBatchResultSchema | Result of a WordPress batch operation. |
| WpCapabilityMapSchema | Capability map as WordPress reports it: { manage_options: true, … }. |
| WpCapabilitySchema | A WordPress capability name: edit_orders, read_private_orders, manage_options. Snake_case, the vocabulary WordPress itself uses. |
| WpCategoryCreateSchema | Payload for creating a WordPress category. |
| WpCategoryListSchema | List of categories. |
| WpCategoryResponseSchema | Category response variant (partials via _fields stay well-typed). |
| WpCategorySchema | A WordPress category. |
| WpCategoryUpdateSchema | Payload for updating a WordPress category. |
| WpCommentCreateSchema | Payload for creating a WordPress comment. |
| WpCommentListSchema | List of comments. |
| WpCommentResponseSchema | Comment response variant (partials via _fields stay well-typed). |
| WpCommentSchema | A WordPress comment. |
| WpCommentUpdateSchema | Payload for updating a WordPress comment. |
| WpEmbeddedSchema | Embedded resources returned when _embed is used. |
| WpMediaListSchema | List of media items. |
| WpMediaMetaSchema | Metadata for a media upload. |
| WpMediaResponseSchema | Media response variant (partials via _fields stay well-typed). |
| WpMediaSchema | A WordPress media item (attachment). |
| WpMediaUpdateSchema | Payload for updating a WordPress media item. |
| WpPageCreateSchema | Payload for creating a WordPress page. |
| WpPageListSchema | List of pages. |
| WpPageResponseSchema | Page response variant (partials via _fields stay well-typed). |
| WpPageSchema | A WordPress page. |
| WpPageUpdateSchema | Payload for updating a WordPress page. |
| WpPostCreateSchema | Payload for creating a WordPress post. |
| WpPostListSchema | List of posts. |
| WpPostResponseSchema | Post response variant (partials via _fields stay well-typed). |
| WpPostSchema | A WordPress post. |
| WpPostUpdateSchema | Payload for updating a WordPress post. |
| WpQueryParamsSchema | Common query parameters for WordPress REST API list endpoints. |
| WpRoleAuditSchema | The result of auditing a declared role against what WordPress reports for the users that hold it. |
| WpRoleAuditStatusSchema | How a declaration compares to the live site. |
| WpRoleDefinitionSchema | A role declaration, the PHP-free replacement for add_role(). |
| WpRoleRegistrySchema | A declared role registry. |
| WpTagCreateSchema | Payload for creating a WordPress tag. |
| WpTagListSchema | List of tags. |
| WpTagResponseSchema | Tag response variant (partials via _fields stay well-typed). |
| WpTagSchema | A WordPress tag. |
| WpTagUpdateSchema | Payload for updating a WordPress tag. |
| WpUserCreateSchema | Payload for creating a WordPress user. |
| WpUserListSchema | List of users. |
| WpUserResponseSchema | User response variant (partials via _fields stay well-typed). |
| WpUserSchema | A WordPress user. |
| WpUserUpdateSchema | Payload for updating a WordPress user. |
| WriteFileOptionsSchema | Options for writing or appending files. |
| YoutubeApiConfigSchema | Config for the YouTube service. One GCP project serves all repos. |
| YoutubeChannelsResponseSchema | Minimal channels.list shape (only what the service reads). |
| YoutubeEmbedOptionsSchema | Options for the YouTube nocookie embed URL. |
| YoutubeListParamsSchema | Params for useGetChannelVideos. |
| YoutubePlaylistItemsResponseSchema | Minimal playlistItems.list shape (only what the service reads). |
| YoutubeThumbnailQualitySchema | Thumbnail quality for i.ytimg.com. |
| YoutubeVideoNormalizedSchema | Normalized video, enriched with player-ready URLs. |
| YoutubeVideoPageSchema | Paginated channel listing result. |
| YoutubeVideosResponseSchema | Minimal videos.list shape (only what the service reads). |
| YoutubeVideoThumbnailsSchema | Resolution-keyed thumbnails (all derivable without an API key). |
Functions
| Function | Description |
|---|---|
| CacheDecorator | Decorates an async function with memoized results (Decorator Pattern). |
| createMemoryStorage | Creates a new in-memory Storage instance used as an SSR / private-mode fallback. Each call owns its own Map — never share one across requests. |
| defaultShouldDehydrateMutation | The default shouldDehydrateMutation predicate used by dehydrate. Only dehydrates mutations that are currently paused (e.g. paused by networkMode while offline). |
| defaultShouldDehydrateQuery | The default shouldDehydrateQuery predicate used by dehydrate. Only dehydrates queries whose status is 'success'. |
| defineApiConfig | Declares the API registry in a single call - the config-file entry point. |
| defineSeoMetaConfig | Registers the site-wide SEO config once — the same define*Config pattern used by the HTTP client and the other services. |
| dehydrate | Dehydrates a QueryClient's cache (queries and mutations) into a plain, serializable DehydratedState, typically to embed in server-rendered markup and later restore into a client-side QueryClient via hydrate. Which queries/mutations are included, and how their data/errors are transformed, is controlled by options, falling back to the client's dehydrate default options, and finally to defaultShouldDehydrateQuery / defaultShouldDehydrateMutation. |
| dehydrateQuery | Dehydrates a single Query into a serializable DehydratedQuery snapshot. Note that most query config (e.g. queryFn, staleTime) is not dehydrated but instead meant to be configured again when consuming the de/rehydrated data, typically with useQuery on the client. If the query is still pending, its in-flight promise is dehydrated too so it can be resumed on the other side instead of re-fetched. |
| experimental_streamedQuery | This is a helper function to create a query function that streams data from an AsyncIterable. Data will be an Array of all the chunks received. The query will be in a 'pending' state until the first chunk of data is received, but will go to 'success' after that. The query will stay in fetchStatus 'fetching' until the stream ends. |
| hashKey | Default query & mutation keys hash function. Hashes the value into a stable hash. |
| hydrate | Restores a DehydratedState (as produced by dehydrate) into a QueryClient's cache, typically to seed the client with data already fetched on the server. mutations and queries are each optional on dehydratedState. Queries not yet in the cache are built from the dehydrated snapshot; queries that already exist are only updated when the dehydrated data is newer than what's already cached. Newly built queries have their fetchStatus reset to 'idle' so they don't hydrate stuck in a fetching state. If a dehydrated query still had an in-flight promise, it is resumed via query.fetch() (reusing that promise as initialPromise) rather than re-invoking queryFn. |
| keepPreviousData | Intended to be passed as a query's placeholderData option, for example placeholderData: keepPreviousData. Instead of resetting the query's data to undefined while a new query key is fetching, it keeps displaying the previously fetched data until the new data arrives. |
| LocalStorageStrategy | Creates a strategy backed by window.localStorage. |
| LoggerDecorator | LoggerDecorator - Decorator Pattern para trazado de llamadas. |
| matchMutation | Checks whether a mutation matches the given MutationFilters. Every filter that is specified must match; filters that are left unspecified are ignored. If a mutationKey filter is provided but the mutation has no mutationKey of its own, it does not match. |
| matchQuery | Checks whether a query matches the given QueryFilters. Every filter that is specified must match; filters that are left unspecified are ignored. |
| MemoryStorageStrategy | Creates a strategy backed by an in-memory store (SSR / private-mode fallback). |
| noop | A function that does nothing. |
| partialMatchKey | Checks if key b partially matches with key a. |
| replaceEqualDeep | This function returns a if b is deeply equal. If not, it will replace any deeply equal children of b with those of a. This can be used for structural sharing between JSON values for example. |
| RetryDecorator | RetryDecorator - Decorator Pattern para reintentos. |
| SessionStorageStrategy | Creates a strategy backed by window.sessionStorage. |
| shouldThrowError | Resolves a throwOnError option to a boolean. If throwOnError is a function, it is called with params (e.g. the error and, depending on the caller, additional context such as the query or mutation) and its result is returned, allowing the throwing behavior to be decided per error. Otherwise, throwOnError itself is coerced to a boolean (undefined resolves to false). |
| useAddClass | Adds one or more CSS classes to the target element. |
| useAddDays | Adds a number of days to a date. |
| useAddRequestInterceptor | Registers a request interceptor on the singleton HTTP client. |
| useAppend | Appends a child element to the target parent. |
| useAppendFile | Appends text or bytes to a file, creating it when missing. |
| useApplySeoTag | Applies tags from a SeoTagResult into document.head (Vanilla / SPA). No-op when document is unavailable (SSR). |
| useAttempt | Runs an operation (sync or async) and captures any throw as a Safe Result. |
| useAverage | Computes the arithmetic mean of an array of numbers. |
| useBearerToken | Reads the bearer token from anything carrying headers. |
| useBlurActiveElement | Removes focus from the currently active element. |
| useBuildUrl | Returns the URL of a registered endpoint without calling fetch. |
| useBuildVideoEmbed | Builds the semantically correct embed HTML for any supported source. |
| useBuildVimeoEmbedUrl | Builds the Vimeo player embed URL with privacy defaults. |
| useBuildYoutubeEmbedUrl | Builds the privacy-enhanced YouTube embed URL (youtube-nocookie). |
| useBuildYoutubeRssUrl | Builds the public channel RSS feed URL. Needs no API key and costs zero quota — ideal for "latest videos" widgets. |
| useBuildYoutubeThumbnail | Builds the public YouTube thumbnail URL (no API key needed). |
| useCan | Whether the subject may perform a capability. Any of the subject's roles granting the capability (directly or by inheritance) is enough. |
| useCapabilitiesFor | Effective capabilities of a role: its own plus every less-privileged role's. |
| useCapitalize | Pure: capitalizes the first character; leaves the rest unchanged. |
| useChat | Sends a single chat completion and returns the assistant text as a Safe Result. |
| useChunk | Splits an array into chunks of the given size. |
| useClearStorage | Clears all values from the specified storage backend. |
| useCopyFile | Copies a file. Existing destinations are overwritten unless overwrite: false is passed (COPYFILE_EXCL). |
| useCopyToClipboard | Copies text to the clipboard (browser only). |
| useCreateBatch | Returns a batch function that defers signal notifications until the callback completes. Nested calls are supported -- only the outermost batch flushes the queue. |
| useCreateDebouncedSignal | Creates a signal whose setter debounces writes by delayMs milliseconds. Useful for search inputs or any value that triggers expensive work. |
| useCreateEffect | Creates a side effect that re-runs whenever a signal read by the callback changes. Explicit dependencies can also be provided for compatibility. An optional cleanup function returned from the callback is invoked before each re-run and on disposal. |
| useCreateElement | Creates a new HTML element. |
| useCreateMemo | Creates a memoised signal whose value is derived from a computation. The computation re-runs whenever a signal it reads changes. Explicit dependencies can also be provided for compatibility. |
| useCreateMemoryStore | Creates a fresh in-memory conversation store. Useful in tests or when you want an isolated store per process. |
| useCreatePool | Creates a reusable Worker pool under a unique key. If a pool with the same key already exists, it is terminated first. |
| useCreateQueryClient | Creates a new QueryClient. Use this on the server (SSR) to get one client per request and avoid sharing a process-global cache across users. |
| useCreateSession | Creates a new conversation session. |
| useCreateSignal | Creates a reactive signal with a getter and setter. |
| useCreateStorageSignal | Creates a signal that persists its value to a storage backend (localStorage, sessionStorage, etc.). Reads the initial value from storage on creation. |
| useCreateToggle | Creates a boolean toggle signal. |
| useDateAdd | Returns the date a given number of units away, with calendar semantics. |
| useDateBetween | Returns the whole number of units between two dates. Signed, never fractional, and defaulting to days. |
| useDateOrder | Returns whether the first date comes before, after, or at the same time as the second. |
| useDateSubtract | Subtracts units from a date, with calendar semantics. |
| useDebounce | Returns a debounced version of func that delays invocation until delayMs milliseconds of quiet. |
| useDebounceImmediate | Leading-edge debounce: fires immediately on the first call, then ignores calls until delayMs of quiet. Additional calls during the wait window schedule a single trailing invocation with the latest arguments. |
| useDeepClone | Deep clones a value using structuredClone with a JSON fallback. |
| useDeepMerge | Deep merges source into a shallow copy of target. |
| useDelete | DELETE helper over a registered API endpoint. |
| useDestroyTheme | Cleans up the media-query listener. Call this when the theme system is no longer needed (e.g. during teardown in tests). |
| useDurationBetween | Returns the balanced breakdown between two dates as a Temporal.Duration. |
| useEnhanceVideoFacades | Hydrates click-to-play facades rendered by useBuildVideoEmbed. SSR-safe: no-op outside the browser, no side effects on import. Call once per page (Astro/React/Vue/MDX useEffect or inline script). |
| useEnsureDir | Creates a directory (and any missing parents). |
| useErrorCustom | Create a custom error object. Use with useLogger for consistent error logging. |
| useErrorNormalize | Normalizes any thrown value into the shared ApiError shape. |
| useErrorSerialize | Serialize an error into a plain object. Uses sensible defaults based on the status code when message is omitted. |
| useEvery | Whether every item matches. See ArrayService.useEvery. |
| useEveryAsync | Async every, short-circuiting. See ArrayService.useEveryAsync. |
| useExitFullscreen | Exits fullscreen mode. |
| useFakeBoolean | Generates a random boolean. |
| useFakeCompanyName | Generates a fake company name. |
| useFakeDate | Generates a random date within an optional range. |
| useFakeEmail | Generates a fake email address. |
| useFakeFirstName | Generates a fake first name. |
| useFakeFullName | Generates a fake full name. |
| useFakeLastName | Generates a fake last name. |
| useFakeList | Builds an array of fake items from a factory (sync or async). |
| useFakeNumber | Generates an integer within an inclusive range. |
| useFakePhone | Generates a fake phone number. |
| useFakeSeed | Seeds the faker instance for reproducible output, or rolls a new random seed. |
| useFakeSetDefaultRefDate | Pins the reference date faker uses for relative date helpers, so date-dependent output stays reproducible next to useFakeSeed. |
| useFakeText | Generates lorem-ipsum text. |
| useFakeUrl | Generates a fake URL. |
| useFakeUuid | Generates a v4 UUID. |
| useFakeVehicle | Generates a generic fake vehicle (brand, model, type, fuel, color, vin, plate). |
| useFetch | Fetches a registered endpoint and returns a Safe Result. |
| useFetchApi | Fetches a registered endpoint and returns a Safe Result. Alias for useFetch. |
| useFileExists | Checks whether a path exists and is accessible. Never throws: returns false for missing paths and non-Node runtimes. |
| useFilter | Keeps the items that satisfy predicate. See ArrayService.useFilter. |
| useFilterAsync | Async filter, in parallel. See ArrayService.useFilterAsync. |
| useFind | Returns the first matching item, or undefined. See ArrayService.useFind. |
| useFindAsync | Async find, short-circuiting. See ArrayService.useFindAsync. |
| useFindIndex | Returns the index of the first match, or -1. See ArrayService.useFindIndex. |
| useFindLast | Returns the last matching item, or undefined. See ArrayService.useFindLast. |
| useFirstDayOfMonth | Returns the first day of the month for a given date. |
| useFlatMap | Maps to collections and flattens one level. See ArrayService.useFlatMap. |
| useFocusElement | Focuses an element. |
| useFormat | Formats a date input into a localised string using Intl.DateTimeFormat. |
| useFormatCurrency | Pure: formats an amount as currency. |
| useFormatNumber | Pure number formatter over Intl.NumberFormat. Stateless — safe to call from any environment. |
| useFromEntries | Typed Object.fromEntries. See ArrayService.useFromEntries. |
| useGenerateMetaTags | HTML string of meta tags (no RSS). Prefer useSeoMeta. |
| useGet | GET helper over a registered API endpoint. |
| useGetActiveElement | Returns the currently focused element. |
| useGetApi | GET helper over a registered API endpoint. Alias for useGet. |
| useGetApis | Returns a shallow copy of the registered APIs (safe to mutate locally). |
| useGetApisConfig | Returns a shallow copy of the registered APIs. Alias for useGetApis. |
| useGetAttribute | Gets the value of an attribute from the target element. |
| useGetBackCamera | Opens the back-facing (environment) camera. |
| useGetBasename | Returns the last portion of a path (file name). |
| useGetBattery | Gets the device battery status. |
| useGetBody | Returns the <body> element, or null outside a browser. |
| useGetChannelVideos | Lists channel videos via the quota-cheap path (channels → playlistItems, never search.list which costs 100 units). Call server/build-time and cache the response (1h) to share quota across every repo using the same GCP project. |
| useGetChannelVideosRss | Fetches the keyless channel RSS feed and parses it. Zero quota, limited to the latest ~15 videos with basic metadata. |
| useGetCwd | Returns the current working directory of the process (where the command was launched), or null outside a Node-compatible runtime. Use it for project-relative paths; use useGetDirname for file-relative paths. |
| useGetDataAttribute | Gets a data-* attribute value from the target element. |
| useGetDirname | Resolves the directory of a module from its import.meta.url. |
| useGetElementByClass | Finds the first element matching a class name. |
| useGetElementById | Finds an element by its id attribute. |
| useGetFileExtension | Returns the extension of a path, including the leading dot. |
| useGetFileStats | Returns a portable stats subset for a file or directory. |
| useGetFrontCamera | Opens the front-facing (user) camera. |
| useGetGeolocation | Gets the device's current geographic position once. |
| useGetHistory | Returns the full message history of a session, oldest first. |
| useGetMediaStream | Requests a media stream (camera, microphone, or both). |
| useGetRelativePath | Computes the relative path from from to to. |
| useGetResolved | Returns the resolved theme ("light" or "dark"), accounting for system preference when mode is "system". |
| useGetRoot | Returns the root <html> element, or null outside a browser. |
| useGetScrollPosition | Returns the current scroll position as { x, y }. |
| useGetScrollProgress | Returns the vertical scroll progress as a value between 0 (top) and 1 (bottom). |
| useGetScrollX | Returns the current horizontal scroll position. |
| useGetScrollY | Returns the current vertical scroll position. |
| useGetStorage | Retrieves a value from storage by key. |
| useGetThemeMode | Returns the current theme mode (may be "system"). |
| useGetTitle | Returns the current document title. |
| useGetUploadsPlaylistId | Resolves a channel id to its uploads playlist id (quota cost: 1 unit). Prefer passing playlistId to useGetChannelVideos to skip this call. |
| useGetUrlParams | Parses query parameters from a URL string into a plain object. |
| useGetVideoDetails | Enriches videos with duration and view count (videos.list, 1 unit). |
| useGetViewportSize | Returns the current viewport dimensions. |
| useGetVimeoVideoId | Extracts a Vimeo video id from a URL or bare numeric id. |
| useGetYoutubeConfig | Returns a shallow copy of the YouTube config (safe to mutate locally). |
| useGetYoutubeVideoId | Extracts a YouTube video id from a watch / shorts / live / embed / youtu.be URL or a bare 11-char id. Returns null when not matched. |
| useGrantAwareCan | Resolves a capability against a subject and a resource. |
| useGroupBy | Groups array items by a key property or key selector function. |
| useHasClass | Checks whether the target element has a given CSS class. |
| useHash | Derives a PBKDF2-SHA512 hash of plainText. Returns "salt:hashHex". Prefer a unique salt per secret. |
| useHashFile | Streams a file and returns its checksum as a lowercase hex digest. |
| useHasRole | Exact role membership - no hierarchy involved. |
| useHasWorker | Checks whether a Worker pool with the given key exists. |
| useHeadTags | Full <head> HTML (meta + RSS). Accepts legacy SeoMeta or flat SeoMetaInput. |
| useInitAgent | Registers the AI provider for the Kitt assistant. |
| useInitAssistant | Configures the assistant: provider (Kitt) plus an optional conversation store. |
| useInitQueryClient | Replaces the shared QueryClient singleton with a configured instance. The previous client's caches are cleared before swapping. |
| useInitTheme | Initializes the theme system. Reads the stored preference (or falls back to defaultMode), applies the theme, and registers a system color-scheme listener for "system" mode. |
| useInitYoutube | Registers the YouTube APIs (youtube + keyless youtubeFeed) and stores the default channel. Call once per app, server/build-time — the API key must never ship to the browser. |
| useInterval | Repeatedly executes a callback at ms intervals with pause/resume/stop controls. Uses recursive setTimeout internally to avoid overlap. |
| useIsAfter | Checks whether date1 is after date2. |
| useIsAtBottom | Checks whether the page is scrolled to (or near) the bottom. |
| useIsAtTop | Checks whether the page is scrolled to (or near) the top. |
| useIsBefore | Checks whether date1 is before date2. |
| useIsBrowser | Checks whether the code is running in a browser environment. |
| useIsDocumentVisible | Checks whether the document tab is currently visible. |
| useIsEqual | Checks whether two dates are equal. |
| useIsFullscreen | Checks whether the document is currently in fullscreen mode. |
| useIsNode | Checks whether the code runs in a Node.js-compatible runtime (Node, Bun or Deno). Returns false in browsers and edge runtimes. |
| useIsObject | Type guard that checks whether a value is a plain object (not null, not an array). |
| useIsSupported | Checks whether IntersectionObserver is available in the current environment. |
| useJoinPath | Joins path segments without resolving against process.cwd(). |
| useJsonParse | Pure: parse JSON (throws on invalid input — same as JSON.parse). |
| useJsonStringify | Pure: pretty-print JSON (3-space indent). |
| useKeys | Typed Object.keys. See ArrayService.useKeys. |
| useLastDayOfMonth | Returns the last day of the month for a given date. |
| useLazyLoaderHas | Checks whether a lazy-loader with the given key is active. |
| useLazyLoaderInit | Initializes lazy loading for images using IntersectionObserver. Elements matching the selector must have a data-src attribute with the real image URL. |
| useLazyLoaderStop | Stops a lazy-loader instance and disconnects its underlying observer. |
| useLazyLoaderStopAll | Stops all active lazy-loader instances. |
| useLogger | Wrapper para LoggerService - mantiene backward compatibility |
| useLoggerClear | Wrapper para LoggerService - mantiene backward compatibility |
| useLoggerError | Wrapper para LoggerService - mantiene backward compatibility |
| useLoggerTable | Wrapper para LoggerService - mantiene backward compatibility |
| useLoggerWarn | Wrapper para LoggerService - mantiene backward compatibility |
| useLowerCase | Pure: locale-aware lower case (trims whitespace). |
| useMap | Projects every item. See ArrayService.useMap. |
| useMapAsync | Async map, in parallel. See ArrayService.useMapAsync. |
| useMatchesMedia | Tests a CSS media query against the current viewport. |
| useModalClose | Closes a modal by adding the "hidden" class or removing it from the DOM. Clicking outside the modal or calling this function will hide it. |
| useMoveFile | Moves (renames) a file or directory. |
| useNow | Returns today's date as an ISO date string. |
| useNowDateTime | Returns the current date and time as an ISO string (no timezone offset). |
| useNumericId | Returns the next auto-incrementing numeric id. |
| useObserverCreate | Creates an IntersectionObserver under the given key. If an observer with the same key already exists, it is disconnected first. |
| useObserverDisconnect | Disconnects and removes an observer by key, cleaning up all observed targets. |
| useObserverDisconnectAll | Disconnects and removes all registered observers. |
| useObserverHas | Checks whether an observer with the given key exists. |
| useObserverKeys | Returns a list of all registered observer keys. |
| useObserverObserve | Starts observing a single element under an existing observer key. |
| useObserverObserveAll | Observes all elements matching a CSS selector under an existing observer key. |
| useObserverUnobserve | Stops observing a specific element under an observer key. |
| useOmit | Omits the listed keys from an object, returning a shallow copy without them. |
| useOn | Attaches an event listener to the target element and returns a cleanup function. |
| useOnDeviceMotion | Listens for device motion events (acceleration, rotation rate). |
| useOnDeviceOrientation | Listens for device orientation events (compass heading, tilt). |
| useOnVisibilityChange | Registers a callback for document visibility changes. |
| useParseIso8601Duration | Parses an ISO 8601 duration (PT1H2M3S) into seconds. Pure and SSR-safe. |
| useParseMediaSource | Normalizes any supported input into a MediaSource. Pure and SSR-safe: no DOM, no fetch. |
| useParseSmartVideoOptions | Validates unknown input (parsed JSON, frontmatter, CMS payloads) against the SmartVideoOptions schema. Returns a Safe Result instead of throwing. |
| useParseYoutubeRss | Parses a YouTube channel RSS feed (feeds/videos.xml) into normalized videos. Pure and SSR-safe — no network, no DOM parser. |
| usePartition | Splits into [matching, rest]. See ArrayService.usePartition. |
| usePatch | PATCH helper over a registered API endpoint. |
| usePbkdf2Hash | Alias for useHash. |
| usePick | Picks the listed keys from an object into a new object. |
| usePost | POST helper over a registered API endpoint. |
| usePrefersColorScheme | Checks whether the user's OS is set to prefer a dark color scheme. |
| usePrefersDarkMode | Checks whether the user's OS prefers dark mode. |
| usePrefersReducedMotion | Checks whether the user prefers reduced motion. |
| usePrintPage | Triggers the browser print dialog. |
| usePut | PUT helper over a registered API endpoint. |
| useQueryClient | Returns the shared QueryClient singleton, creating one on first call. |
| useRace | Races a promise against a timeout. Clears the timer when the promise wins so the timeout rejection cannot become an unhandled rejection. |
| useReadDir | Lists a directory with type flags resolved per entry. |
| useReadFile | Reads a text file. |
| useReadFileBuffer | Reads a file as raw bytes (no encoding). |
| useReadJsonFile | Reads and parses a JSON file, optionally validating it with a Zod schema. |
| useReadModuleFile | Reads a file resolved from the caller's module directory — the __dirname + relative path pattern, without __dirname. |
| useReadModuleJson | Reads and parses a JSON file resolved from the caller's module directory, optionally validating it with a Zod schema. |
| useReduce | Folds into a single value. See ArrayService.useReduce. |
| useReduceAsync | Async reduce, sequential. See ArrayService.useReduceAsync. |
| useRegisterRole | Registers (or replaces) a role definition. Use it to extend a built-in role's capabilities, e.g. grant content:create to member. |
| useRemove | Removes the target element from the DOM. |
| useRemoveAttribute | Removes an attribute from the target element. |
| useRemoveClass | Removes CSS class(es) from the target element. |
| useRemoveDir | Removes a directory tree. Recursive by default; force: false surfaces ENOENT instead of ignoring missing paths. |
| useRemoveFile | Removes a file. |
| useRemoveStorage | Removes a value from storage by key. |
| useRepeat | Executes a callback iterations times with an optional delay between each iteration. |
| useReply | Sends a user message within a conversation and returns the assistant reply. If no sessionId is provided, a new session is created. The user message and the assistant reply are persisted only on success. |
| useRequestFullscreen | Requests fullscreen on the given element (or the document root). |
| useRequestMotionPermission | Requests permission to access device orientation/motion sensors (required on iOS 13+). |
| useResetRoles | Restores the built-in role registry (mainly for tests). |
| useResetSeoMetaConfig | Clears the registered config (restores the demo defaults). Useful in tests. |
| useResetSession | Deletes a conversation session and its messages. |
| useResetTheme | Resets the theme to "system" and removes the stored preference. |
| useResolvePath | Resolves a sequence of path segments into an absolute path. Relative segments resolve against process.cwd(); if the first segment is absolute (like a useGetDirname result), cwd is ignored. |
| useResolveSubject | Turns an authenticated principal into an access subject — the single point where authentication hands over to authorization. |
| useRetry | Retries an async function with a fixed delay between attempts. |
| useReverse | Returns a reversed copy. See ArrayService.useReverse. |
| useRoles | Lists every registered role definition. Returns copies, not live state. |
| useRound | Rounds a number (or numeric string) to the specified number of decimal places. |
| useRssHeadLink | - |
| useRun | Runs a pure function in a one-shot Worker and destroys it afterwards. Falls back to running on the main thread when Workers are unavailable (SSR). Async worker functions are awaited (Promise resolved before postMessage). |
| useRunAgent | Runs the tool-calling agent loop against a goal until it emits a final answer or exhausts maxSteps. |
| useRunPool | Runs a task on an existing Worker pool. Tasks are correlated by __taskId so concurrent tasks do not stomp each other's handlers. |
| useRunStorageScope | Runs fn with request-isolated in-memory storage (SSR). Use this around a request handler so useSetStorage / useGetStorage share state within the request but not across requests. |
| useSafeQueryFn | Bridges a KatanaKit Safe Result fetcher into a TanStack queryFn. |
| useSalePrice | Pure: applies a discount to a price and reports what was taken off. |
| useScrollTo | Scrolls the window to a specific position, respecting prefers-reduced-motion. |
| useScrollToBottom | Scrolls to the bottom of the page. |
| useScrollToElement | Scrolls an element into view. |
| useScrollToTop | Scrolls to the top of the page. |
| useSeoMeta | SEO helper: one flat object in → one flat object out (+ html/tags). |
| useSeoMetaConfig | Returns the registered site config, falling back to the bundled demo defaults when defineSeoMetaConfig was never called. |
| useSessionExists | Checks whether a conversation session exists. |
| useSetAttribute | Sets an attribute on the target element with XSS protection. Blocks event-handler attributes (on*) and javascript: URLs. |
| useSetDataAttribute | Sets a data-* attribute on the target element. |
| useSetHtml | Sets innerHTML on the target element. |
| useSetStorage | Stores a value under the given key (serialized as JSON). |
| useSetTempTitle | Temporarily changes the document title, restoring the original after durationMs. |
| useSetText | Sets the textContent of the target element (safe for user input). |
| useSetThemeMode | Sets the theme mode and persists it to storage. |
| useSetTimeout | Executes a callback after ms milliseconds, returning a cancellable promise that resolves with the callback's result. |
| useSetTitle | Sets the document title. |
| useSleep | Returns a promise that resolves after ms milliseconds. |
| useSlugify | Converts a text string into a URL-friendly slug. |
| useSome | Whether any item matches. See ArrayService.useSome. |
| useSomeAsync | Async some, short-circuiting. See ArrayService.useSomeAsync. |
| useSortBy | Sorts a copy by a derived key. See ArrayService.useSortBy. |
| useSplitConfig | Splits a define*Config literal into its config half and its method half. |
| useStopMediaStream | Stops all tracks in a media stream (releases camera/microphone). |
| useStopVibration | Stops any ongoing vibration. |
| useSubtractDays | Subtracts a number of days from a date. |
| useTerminate | Terminates a specific Worker pool and rejects any in-flight tasks. |
| useTerminateAll | Terminates all active Worker pools and rejects any in-flight tasks. |
| useThrottle | Returns a throttled version of func that fires at most once per limitMs milliseconds (leading edge). |
| useThrottleTrailing | Throttle with trailing invocation: fires on the leading edge and also fires once at the end of the throttle window with the latest arguments. |
| useTitle | - |
| useToCelsius | Pure: °F → °C (formatted). |
| useToCm | Pure: inches → centimeters (formatted). |
| useToFahrenheit | Pure: °C → °F (formatted). |
| useToggleClass | Toggles a CSS class on the target element. |
| useToggleTheme | Toggles between "light" and "dark" (ignores "system"). |
| useToInches | Pure: centimeters → inches (formatted). |
| useToken | Returns a cryptographically strong 6-digit numeric token (100000–999999). |
| useToKilometers | Pure: miles → kilometers (formatted). Round-trips with useToMiles. |
| useToKilos | Pure: pounds → kilograms (formatted). |
| useToMiles | Pure: kilometers → miles (formatted). Round-trips with useToKilometers. |
| useToPounds | Pure: kilograms → pounds (formatted). |
| useTryJsonParse | Parses JSON without throwing; failures come back as a Safe Result. |
| useUnique | Returns a new array with duplicate values removed, preserving first-seen order. |
| useUpperCase | Pure: locale-aware upper case (trims whitespace). |
| useUuid | Generates a RFC 4122 v4 UUID string. |
| useValidate | Validates unknown data against a Zod schema and returns a Safe Result. Wrapper sobre ValidationService (backward compatibility). |
| useValues | Typed Object.values. See ArrayService.useValues. |
| useVerifyFileHash | Verifies a file checksum against an expected value (case-insensitive). |
| useVibrate | Triggers the device vibration motor with a given pattern. |
| useWatchGeolocation | Continuously watches the device's geographic position. |
| useWorkerKeys | Returns a list of all active Worker pool keys. |
| useWriteFile | Writes (or overwrites) a file, creating it when missing. |
| useWriteJsonFile | Serializes data to JSON and writes it to a file (pretty-printed by default). |