Files
mesh-contracts/ts/seats/meshbroker/index.d.ts
T
jschoubben 74b6162807 K21a (regenerate, in between): the generated Go and TypeScript follow the definitions so far
The conditions developer reads kinds, attempt-changed, wait-held and wait-ended from it. K21 regenerates last. The client
meshconditionsclient does not build against the findings state's new layout until the question on it is answered.

Builds: design 47 G §341, §523, §580, §541, §499

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
2026-11-11 20:31:55 +01:00

301 lines
9.4 KiB
TypeScript

// Code generated by seatgen from the seat definitions; DO NOT EDIT.
// The contract of the seat "mesh-broker", defined whole (seats/mesh-broker/seat.json): The mesh's bus, and the bus state modules ask of it in requires (design 25 § 12). create, apply, recreate and drop are granted to the bus module's own credential alone.
export declare const seat: "mesh-broker";
export declare const verbs: {
readonly list: "list";
readonly show: "show";
readonly check: "check";
readonly orphans: "orphans";
readonly create: "create";
readonly apply: "apply";
readonly recreate: "recreate";
readonly drop: "drop";
};
export declare const events: {
readonly created: "created";
readonly refused: "refused";
readonly drifted: "drifted";
readonly driftCleared: "drift-cleared";
readonly full: "full";
readonly fullCleared: "full-cleared";
readonly orphaned: "orphaned";
readonly recreated: "recreated";
readonly dropped: "dropped";
};
export declare const family: { readonly name: "mesh-broker.events"; readonly maxAgeDays: 7 };
export declare const createdSubject: "mesh.seat.mesh-broker.event.created";
export declare const refusedSubject: "mesh.seat.mesh-broker.event.refused";
export declare const driftedSubject: "mesh.seat.mesh-broker.event.drifted";
export declare const driftClearedSubject: "mesh.seat.mesh-broker.event.drift-cleared";
export declare const fullSubject: "mesh.seat.mesh-broker.event.full";
export declare const fullClearedSubject: "mesh.seat.mesh-broker.event.full-cleared";
export declare const orphanedSubject: "mesh.seat.mesh-broker.event.orphaned";
export declare const recreatedSubject: "mesh.seat.mesh-broker.event.recreated";
export declare const droppedSubject: "mesh.seat.mesh-broker.event.dropped";
/** the binding a module receives in its membership for one entry (ADR 0595 §1, §7): the names on the bus of the entry's objects, one form in the events, in list, show and orphans, and in the membership */
export interface Binding {
/** a key-value bucket's name */
"bucket"?: string;
/** a ledger's history stream */
"history"?: string;
/** a ledger's index buckets, by index name */
"indexes"?: Record<string, string>;
/** the entry's local name in the module's manifest */
"local": string;
/** an object store's name */
"object-store"?: string;
/** the bus name of the state's <state>-objects, where its large values go (design 47 G 58, 399) */
"objects"?: string;
/** the subject of a ledger's instances' snapshots */
"snapshot"?: string;
/** a ledger's state bucket */
"state"?: string;
/** how the bus keeps it: the entry's storage type */
"storage": string;
/** a stream's name on the bus */
"stream"?: string;
/** the subject a stream's messages are on; also a ledger's history's */
"subject"?: string;
/** its template */
"template"?: string;
/** a ledger's types, as its manifest declares them */
"types"?: Record<string, unknown>[];
}
/** one piece of bus state as a manifest asks it */
export interface Entry {
/** its own configuration, where no template fits */
"configuration"?: Record<string, unknown>;
/** its local name in the module's manifest */
"local-name": string;
/** the module asking it */
"module": string;
/** the template's options the module set, within their bounds */
"options"?: Record<string, unknown>;
/** how the bus keeps it */
"storage-type": "stream" | "key-value" | "object-store" | "ledger";
/** its template; empty for a configuration of its own */
"template"?: "state" | "events" | "work-queue" | "log" | "objects" | "ledger" | "";
}
export interface Fill {
/** bytes held */
"bytes": number;
/** its cap in bytes */
"cap": number;
/** messages, keys or objects held */
"count": number;
}
/** one entry as the bus holds it */
export interface Held {
/** the binding a module receives for the entry, as created and recreated carry it; present on an entry whose objects the bus holds, absent on one it does not (design 25 bindings-first-view §2) */
"binding"?: Binding;
/** its name on the bus, <module>_<local name> */
"bus-name": string;
/** its own configuration, where no template fits */
"configuration"?: Record<string, unknown>;
"fill"?: Fill;
/** its local name in the module's manifest */
"local-name": string;
/** the module asking it */
"module": string;
/** the template's options the module set, within their bounds */
"options"?: Record<string, unknown>;
/** the settings the bus holds */
"settings"?: Record<string, unknown>;
/** the entry's state: held as asked, refused, waiting to be made, drifted from what is asked, full, or orphaned (no manifest asks it) */
"state"?: "held" | "refused" | "waiting" | "drifted" | "full" | "orphaned";
/** how the bus keeps it */
"storage-type": "stream" | "key-value" | "object-store" | "ledger";
/** its template; empty for a configuration of its own */
"template"?: "state" | "events" | "work-queue" | "log" | "objects" | "ledger" | "";
/** why it is in its state, in plain words; empty when held as asked */
"why"?: string;
}
export interface Named {
/** the entry's local name */
"local-name": string;
/** the module */
"module": string;
}
/** the body of every event of the seat */
export interface Said {
/** the settings asked */
"asked"?: Record<string, unknown>;
"binding"?: Binding;
/** its name on the bus */
"bus-name": string;
/** its own configuration, where no template fits */
"configuration"?: Record<string, unknown>;
"fill"?: Fill;
/** the settings held */
"held"?: Record<string, unknown>;
/** its local name in the module's manifest */
"local-name": string;
/** the module asking it */
"module": string;
/** the template's options the module set, within their bounds */
"options"?: Record<string, unknown>;
/** the indexer's revision of the verdict the bus module acted on (ADR 0622 §2), so a reader orders what it hears */
"revision"?: number;
/** the stream snapshot taken before a recreate or drop */
"snapshot"?: string;
/** how the bus keeps it */
"storage-type"?: "stream" | "key-value" | "object-store" | "ledger";
/** its template; empty for a configuration of its own */
"template"?: "state" | "events" | "work-queue" | "log" | "objects" | "ledger" | "";
/** why: a refusal's cause, a drift's difference, a drop's or recreate's reason */
"why"?: string;
}
export interface Warranted {
/** the entry's local name */
"local-name": string;
/** the module */
"module": string;
/** the operator's warrant, as the operator channel decided it (ADR 0259 §6) */
"warrant": string;
/** why, kept in the record */
"why": string;
}
/** is what list takes. */
export interface ListInput {
/** one module (optional) */
"module"?: string;
}
/** the sum of the bus's caps against its limits, in MiB; an absent limit is unlimited (design 47 G 547, 661) */
export interface ListAnswerCaps {
"account-limit-mib"?: number;
"server-limit-mib"?: number;
"sum-mib": number;
}
/** is what list answers. */
export interface ListAnswer {
/** the sum of the bus's caps against its limits, in MiB; an absent limit is unlimited (design 47 G 547, 661) */
"caps"?: ListAnswerCaps;
/** every entry */
"entries": Held[];
}
/** is what show takes. */
export type ShowInput = Named;
/** is what show answers. */
export type ShowAnswer = Held;
/** is what check takes. */
export interface CheckInput {
/** one module (optional) */
"module"?: string;
}
export interface CheckAnswerDifferencesItem {
/** asked */
"asked"?: Record<string, unknown>;
/** the difference only grows: apply may act on it */
"grows"?: boolean;
/** held */
"held"?: Record<string, unknown>;
/** the entry */
"local-name": string;
/** the module */
"module": string;
}
/** is what check answers. */
export interface CheckAnswer {
/** every difference */
"differences": CheckAnswerDifferencesItem[];
}
/** is what orphans takes. */
export interface OrphansInput {
}
/** is what orphans answers. */
export interface OrphansAnswer {
/** every orphan */
"entries": Held[];
}
/** is what create takes. */
export type CreateInput = Entry;
/** is what create answers. */
export type CreateAnswer = Held;
/** is what apply takes. */
export type ApplyInput = Named;
/** is what apply answers. */
export type ApplyAnswer = Held;
/** is what recreate takes. */
export type RecreateInput = Warranted;
/** is what recreate answers. */
export type RecreateAnswer = Held;
/** is what drop takes. */
export type DropInput = Warranted;
/** is what drop answers. */
export interface DropAnswer {
/** it is gone */
"dropped": boolean;
/** the snapshot taken first */
"snapshot"?: string;
}
/** is the body of the event created. */
export type CreatedEvent = Said;
/** is the body of the event refused. */
export type RefusedEvent = Said;
/** is the body of the event drifted. */
export type DriftedEvent = Said;
/** is the body of the event drift-cleared. */
export type DriftClearedEvent = Said;
/** is the body of the event full. */
export type FullEvent = Said;
/** is the body of the event full-cleared. */
export type FullClearedEvent = Said;
/** is the body of the event orphaned. */
export type OrphanedEvent = Said;
/** is the body of the event recreated. */
export type RecreatedEvent = Said;
/** is the body of the event dropped. */
export type DroppedEvent = Said;
/** is the form of the provision bus-state. */
export type BusStateForm = Binding;