The lead's ruling of 12:5x: no record fixes 30 days; decided rides the shared events stream, 7 days, as on the bus today. Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
283 lines
6.6 KiB
TypeScript
283 lines
6.6 KiB
TypeScript
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
|
|
|
// The contract of the seat "operator-channel", defined whole (seats/operator-channel/seat.json): Asking a person and answering on a channel (ADR 0259): held by the router, the messenger module, whose manifest declares the seat; written from that seat entry (design 26).
|
|
|
|
export const seat = "operator-channel";
|
|
|
|
export const verbs = {
|
|
open: "open",
|
|
history: "history",
|
|
notify: "notify",
|
|
tell: "tell",
|
|
asks: "asks",
|
|
} as const;
|
|
|
|
export const accepts = {
|
|
ask: "ask",
|
|
cancel: "cancel",
|
|
condition: "condition",
|
|
} as const;
|
|
|
|
export const events = {
|
|
decided: "decided",
|
|
} as const;
|
|
|
|
export const family = { name: "operator-channel.decided", maxAgeDays: 7 } as const;
|
|
|
|
export function decidedSubject(caller: string): string {
|
|
return "mesh.seat.operator-channel.event.decided." + caller;
|
|
}
|
|
|
|
export function askSubject(caller: string): string {
|
|
return "mesh.seat.operator-channel.accept.ask." + caller;
|
|
}
|
|
|
|
export function cancelSubject(caller: string): string {
|
|
return "mesh.seat.operator-channel.accept.cancel." + caller;
|
|
}
|
|
|
|
export function conditionSubject(caller: string): string {
|
|
return "mesh.seat.operator-channel.accept.condition." + caller;
|
|
}
|
|
|
|
export const holderEvents = {
|
|
refused: "refused",
|
|
offered: "offered",
|
|
closed: "closed",
|
|
} as const;
|
|
|
|
export function refusedHolderSubject(holder: string): string {
|
|
return "mesh.mod." + holder + ".event.refused";
|
|
}
|
|
|
|
export function offeredHolderSubject(holder: string): string {
|
|
return "mesh.mod." + holder + ".event.offered";
|
|
}
|
|
|
|
export function closedHolderSubject(holder: string): string {
|
|
return "mesh.mod." + holder + ".event.closed";
|
|
}
|
|
|
|
export interface Ask {
|
|
/** what it is about: a newer ask about it replaces the older */
|
|
"about"?: string;
|
|
/** its secondary words */
|
|
"details"?: string;
|
|
/** when it ends unanswered, RFC 3339 */
|
|
"expires": string;
|
|
/** what happened and what it means */
|
|
"explanation": string;
|
|
/** a few plain words */
|
|
"headline": string;
|
|
/** the asker's own id */
|
|
"id": string;
|
|
/** what the asker then does */
|
|
"on-expiry": string;
|
|
/** the answers it offers */
|
|
"options": Option[];
|
|
/** urgent */
|
|
"urgent"?: boolean;
|
|
/** who may answer: operator */
|
|
"who": string;
|
|
/** the explanation with its values whole */
|
|
"whole"?: string;
|
|
/** the details whole */
|
|
"whole-details"?: string;
|
|
}
|
|
|
|
export interface ConditionActionsItem {
|
|
"arguments"?: Record<string, string>;
|
|
/** label */
|
|
"label": string;
|
|
/** level */
|
|
"level"?: string;
|
|
/** machine */
|
|
"machine"?: string;
|
|
/** verb */
|
|
"verb": string;
|
|
}
|
|
|
|
export interface ConditionSubject {
|
|
/** id */
|
|
"id": string;
|
|
/** machine */
|
|
"machine"?: string;
|
|
/** scope */
|
|
"scope": string;
|
|
}
|
|
|
|
export interface Condition {
|
|
/** the answers it offers */
|
|
"actions"?: ConditionActionsItem[];
|
|
/** plain words */
|
|
"explanation"?: string;
|
|
/** plain words */
|
|
"headline"?: string;
|
|
/** the condition's key */
|
|
"key": string;
|
|
/** what it needs */
|
|
"needs"?: string;
|
|
/** the line said when it is over */
|
|
"resolved"?: string;
|
|
/** urgent or warning */
|
|
"severity"?: string;
|
|
/** raised or cleared */
|
|
"state": string;
|
|
"subject": ConditionSubject;
|
|
/** one line */
|
|
"summary"?: string;
|
|
/** the form's version, 1 */
|
|
"v": number;
|
|
}
|
|
|
|
export interface Option {
|
|
/** the digest of exactly what the asker performs when it is chosen */
|
|
"binds"?: string;
|
|
/** what it does, in plain words */
|
|
"does": string;
|
|
/** the option's id */
|
|
"id": string;
|
|
/** the button's label */
|
|
"label": string;
|
|
/** the proof its answer needs */
|
|
"level": string;
|
|
}
|
|
|
|
export interface Person {
|
|
/** the name shown */
|
|
"display"?: string;
|
|
/** the account */
|
|
"identity": string;
|
|
/** the channel kind */
|
|
"kind": string;
|
|
/** how the router knew */
|
|
"verified": string;
|
|
/** the role */
|
|
"who": string;
|
|
}
|
|
|
|
export interface Warrant {
|
|
/** what it was about */
|
|
"about"?: string;
|
|
/** the ask */
|
|
"ask": string;
|
|
/** the digest of the ask as the router took it */
|
|
"ask-digest"?: string;
|
|
/** its asker */
|
|
"asker": string;
|
|
/** when, RFC 3339 */
|
|
"at": string;
|
|
"by"?: Person;
|
|
/** the module it came through */
|
|
"channel"?: string;
|
|
/** its label */
|
|
"label"?: string;
|
|
/** its level */
|
|
"level"?: string;
|
|
/** the option chosen */
|
|
"option"?: string;
|
|
"outcome": "chosen" | "expired" | "cancelled" | "replaced" | "refused";
|
|
/** the proofs present */
|
|
"proofs"?: string[];
|
|
/** why it ended without a choice, or what refused it */
|
|
"words"?: string;
|
|
}
|
|
|
|
/** is what open takes. */
|
|
export interface OpenInput {
|
|
}
|
|
|
|
/** is what open answers. */
|
|
export type OpenAnswer = Record<string, unknown>;
|
|
|
|
/** is what history takes. */
|
|
export interface HistoryInput {
|
|
/** at most this many of each (default 50) */
|
|
"limit"?: number;
|
|
}
|
|
|
|
/** is what history answers. */
|
|
export type HistoryAnswer = Record<string, unknown>;
|
|
|
|
/** is what notify takes. */
|
|
export interface NotifyInput {
|
|
/** it is over */
|
|
"clear"?: boolean;
|
|
/** one or two plain sentences */
|
|
"explanation"?: string;
|
|
/** plain words */
|
|
"headline"?: string;
|
|
/** the message's key */
|
|
"key"?: string;
|
|
/** the line said when it is over */
|
|
"resolved"?: string;
|
|
"severity"?: "urgent" | "warning";
|
|
/** what it is about */
|
|
"subject"?: string;
|
|
/** one line */
|
|
"summary"?: string;
|
|
}
|
|
|
|
/** is what notify answers. */
|
|
export type NotifyAnswer = Record<string, unknown>;
|
|
|
|
/** is what tell takes. */
|
|
export interface TellInput {
|
|
/** plain words */
|
|
"headline"?: string;
|
|
/** one or two plain lines */
|
|
"lines"?: string[];
|
|
/** what it is about */
|
|
"subject"?: string;
|
|
}
|
|
|
|
/** is what tell answers. */
|
|
export type TellAnswer = Record<string, unknown>;
|
|
|
|
/** is what asks takes. */
|
|
export interface AsksInput {
|
|
}
|
|
|
|
/** is what asks answers. */
|
|
export type AsksAnswer = Record<string, unknown>;
|
|
|
|
/** is the body of ask. */
|
|
export type AskAccept = Ask;
|
|
|
|
/** is the body of cancel. */
|
|
export interface CancelAccept {
|
|
/** the ask's id */
|
|
"id": string;
|
|
}
|
|
|
|
/** is the body of condition. */
|
|
export type ConditionAccept = Condition;
|
|
|
|
/** is the body of the event decided. */
|
|
export type DecidedEvent = Warrant;
|
|
|
|
/** is the body of the holder's event offered. */
|
|
export interface OfferedHolderEvent {
|
|
/** its asker */
|
|
"asker": string;
|
|
/** the channels it was offered on */
|
|
"channels"?: string[];
|
|
/** its headline */
|
|
"headline"?: string;
|
|
/** the ask's id */
|
|
"id": string;
|
|
}
|
|
|
|
/** is the body of the holder's event closed. */
|
|
export interface ClosedHolderEvent {
|
|
/** its asker */
|
|
"asker": string;
|
|
"how": "answered" | "expired" | "cancelled" | "replaced" | "unlinked";
|
|
/** the ask's id */
|
|
"id": string;
|
|
}
|
|
|
|
/** is one value of the record asks. */
|
|
export type AsksRecord = Record<string, unknown>;
|
|
|