A reader of another part's value refused a field it did not know, so a holder that added one broke every reader until each was rebuilt. Every package is generated again by mesh-delivery's seatgen (feat/47-H2 ff7db337): each generated decoder keeps unknown fields, returns the form read (1 when absent) and each package states its Form (1 everywhere, left out on the wire). The hand-written clients take the three values, and the node-engine client's ask, answer, composition and have decoders keep unknown fields too; their tests now hold that tolerance. seatgen -check clean in all five folders. Builds: design 47 H2 §780; H-A-350 DMC-4
146 lines
4.3 KiB
TypeScript
146 lines
4.3 KiB
TypeScript
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
|
|
|
// The contract of the seat "mesh-config", defined whole (seats/mesh-config/seat.json): The mesh's config values: read and set one, and the renames still open. mesh-config's own events stay under its own subjects (ADR 0620 §2).
|
|
|
|
export declare const seat: "mesh-config";
|
|
|
|
export declare const verbs: {
|
|
readonly config: "config";
|
|
readonly renames: "renames";
|
|
};
|
|
|
|
export declare const holderEvents: {
|
|
readonly configChanged: "config-changed";
|
|
readonly renamed: "renamed";
|
|
readonly retiring: "retiring";
|
|
readonly retired: "retired";
|
|
};
|
|
|
|
export declare function configChangedHolderSubject(holder: string): string;
|
|
|
|
export declare function renamedHolderSubject(holder: string): string;
|
|
|
|
export declare function retiringHolderSubject(holder: string): string;
|
|
|
|
export declare function retiredHolderSubject(holder: string): string;
|
|
|
|
export declare const states: {
|
|
readonly resolved: "resolved";
|
|
};
|
|
|
|
/** The key of one value of the state resolved under the form "<node>.<module>.<key>". */
|
|
export declare function resolvedByNodeModuleKeyKey(node: string, module: string, key: string): string;
|
|
|
|
/** The parts of a key of the form "<node>.<module>.<key>", or undefined for a key of another form. */
|
|
export declare function parseResolvedByNodeModuleKeyKey(_key: string): { node: string; module: string; key: string } | undefined;
|
|
|
|
/** is what config takes. */
|
|
export interface ConfigInput {
|
|
/** list (when not given), set, clear or history */
|
|
"action"?: string;
|
|
/** who gave the value at the controller's terminal */
|
|
"by"?: string;
|
|
/** the config key */
|
|
"key"?: string;
|
|
/** for history: at most this many, newest */
|
|
"limit"?: number;
|
|
/** a module: its own value, with node */
|
|
"module"?: string;
|
|
/** a node */
|
|
"node"?: string;
|
|
/** for set: the value, of the key's type: a number, a string, a boolean, or for a trusted key an object or a list */
|
|
"value"?: unknown;
|
|
/** for set and clear: why */
|
|
"why"?: string;
|
|
}
|
|
|
|
/** is what config answers. */
|
|
export type ConfigAnswer = Record<string, unknown>;
|
|
|
|
/** is what renames takes. */
|
|
export interface RenamesInput {
|
|
/** one module (optional) */
|
|
"module"?: string;
|
|
}
|
|
|
|
export interface RenamesAnswerRenamesItem {
|
|
/** when it moved, RFC 3339 */
|
|
"at"?: string;
|
|
/** the old name */
|
|
"from": string;
|
|
/** the module */
|
|
"module": string;
|
|
/** the nodes still holding the old name open */
|
|
"open"?: string[];
|
|
/** the new name */
|
|
"to": string;
|
|
}
|
|
|
|
/** is what renames answers. */
|
|
export interface RenamesAnswer {
|
|
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
|
"form"?: number;
|
|
/** every open rename */
|
|
"renames": RenamesAnswerRenamesItem[];
|
|
}
|
|
|
|
/** is the body of the holder's event renamed. */
|
|
export interface RenamedHolderEvent {
|
|
/** when, RFC 3339 */
|
|
"at": string;
|
|
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
|
"form"?: number;
|
|
/** the old name */
|
|
"from": string;
|
|
/** the module */
|
|
"module": string;
|
|
/** the new name */
|
|
"to": string;
|
|
}
|
|
|
|
/** is the body of the holder's event retiring. */
|
|
export interface RetiringHolderEvent {
|
|
/** the ask's id */
|
|
"ask"?: string;
|
|
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
|
"form"?: number;
|
|
/** the value's or secret's name */
|
|
"key": string;
|
|
"kind": "value" | "secret";
|
|
/** the module */
|
|
"module": string;
|
|
/** since when, RFC 3339 */
|
|
"since": string;
|
|
}
|
|
|
|
/** is the body of the holder's event retired. */
|
|
export interface RetiredHolderEvent {
|
|
/** the ask's id */
|
|
"ask"?: string;
|
|
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
|
"form"?: number;
|
|
/** the module */
|
|
"module": string;
|
|
/** the name */
|
|
"name": string;
|
|
/** the node */
|
|
"node"?: string;
|
|
}
|
|
|
|
/** is one value of the state resolved under the key <node>.<module>.<key>. */
|
|
export interface ResolvedByNodeModuleKeyValue {
|
|
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
|
"form"?: number;
|
|
"key": string;
|
|
"module": string;
|
|
"node": string;
|
|
/** the predefined key the value falls back to */
|
|
"predefined"?: string;
|
|
/** an unset value is the operator's own to set */
|
|
"required"?: boolean;
|
|
"source": string;
|
|
"trusted"?: boolean;
|
|
"value"?: unknown;
|
|
}
|
|
|