Files
agency/.pnpm-store/v3/files/cd/b9a25daf13d4d1c8cdedc4047cc88d02c772c95d0b09076d6e76471a3fd8d4275f40f8daaad1c68351c59bb86e2fa21f68190fae5de6fb7316491c8c93052d
hanzo-agent 5af6960b87 run project
Run: sess_f37640604ae254cb4d11dc6217f7b721
2026-09-30 00:04:56 +00:00

37 lines
1.8 KiB
Plaintext

/**
* @hanzo/events — the canonical event schema.
*
* Which events exist, what each one means, and what it carries. This is the
* vocabulary; @hanzo/event is the client that sends one.
*
* Plural and singular split along the thing they describe: many events are
* defined here, one event is sent by a call there. The client depends on this
* package and re-exports EVENTS, so a surface can keep importing either — but
* there is only one definition, here.
*
* The catalog also ships as `catalog.json` beside the built output, because the
* ingest door is Go and cannot import TypeScript. One source, two readers.
*/
export { EVENTS, PAGEVIEW, EXCEPTION } from './names.js';
export type { EventName } from './names.js';
export { SCHEMA } from './schema.js';
export type { EventSpec, PropSpec, PropType } from './schema.js';
export { FUNNELS, PRODUCTS, eventsOf } from './funnels.js';
export type { FunnelDef, FunnelStep, FunnelId, ProductId } from './funnels.js';
/** Every event name in the vocabulary, as it travels on the wire. */
export declare const NAMES: readonly string[];
/** The two reserved names: a pageview and a captured exception. */
export declare const RESERVED: readonly string[];
/**
* Is this a name the vocabulary knows?
*
* The ingest door RECORDS an unknown event rather than refusing it, and flags
* it. Refusing would mean a surface shipping a new event before the catalog
* does loses the data outright, and the data is the thing you cannot recover;
* a flag you can act on later. So this answers a question about the catalog,
* never about whether to accept.
*/
export declare function isKnown(name: string): boolean;
/** What an event means and carries, or undefined if it is not in the catalog. */
export declare function specFor(name: string): import("./schema.js").EventSpec;