Files
package-todo-react-runtime/src/gen/qx.ts
T

363 lines
16 KiB
TypeScript
Raw Normal View History

// Generated by quixos-codegen-ts. Do not edit. Binding ABI version 1.
import { bindQxHandler, type BindingValue, type QxObjectRef, type QxWatchHandle, type QxHandler, type QxDerived, type QxContextLifecycle, type QxLiveValue, type QxHandlerSpec, type QxMessages } from "@quixos/camino-package-runtime";
import { opaqueReactPropsBinding as message0 } from "@quixos/camino-package-runtime";
export const packageRevisionId = "package:todo-react-runtime@1";
export type Contexts = { "createComponent": { "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": QxObjectRef<"atom:atom:task">; "ports": { } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": QxObjectRef<"atom:atom:task">; "ports": { } } & {signal?: AbortSignal}>; "propsGet": { "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": null; "ports": { "data": { "objectId": QxObjectRef<"interface:interface:task-data@1">; "live": { "title.get": () => Promise<QxLiveValue>; "title.set": (input: string) => Promise<QxLiveValue>; "status.get": () => Promise<QxLiveValue>; "status.set": (input: string) => Promise<QxLiveValue>; "priority.get": () => Promise<QxLiveValue>; "priority.set": (input: string) => Promise<QxLiveValue>; "notes.get": () => Promise<QxLiveValue>; "notes.set": (input: string) => Promise<QxLiveValue>; "dueDate.get": () => Promise<QxLiveValue>; "dueDate.set": (input: string) => Promise<QxLiveValue>; "energy.get": () => Promise<QxLiveValue>; "energy.set": (input: string) => Promise<QxLiveValue> }; "title.get": () => Promise<string>; "title.set": (input: string) => Promise<null>; "status.get": () => Promise<string>; "status.set": (input: string) => Promise<null>; "priority.get": () => Promise<string>; "priority.set": (input: string) => Promise<null>; "notes.get": () => Promise<string>; "notes.set": (input: string) => Promise<null>; "dueDate.get": () => Promise<string>; "dueDate.set": (input: string) => Promise<null>; "energy.get": () => Promise<string>; "energy.set": (input: string) => Promise<null> } } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": null; "ports": { "data": { "objectId": QxObjectRef<"interface:interface:task-data@1">; "live": { "title.get": () => Promise<QxLiveValue>; "title.set": (input: string) => Promise<QxLiveValue>; "status.get": () => Promise<QxLiveValue>; "status.set": (input: string) => Promise<QxLiveValue>; "priority.get": () => Promise<QxLiveValue>; "priority.set": (input: string) => Promise<QxLiveValue>; "notes.get": () => Promise<QxLiveValue>; "notes.set": (input: string) => Promise<QxLiveValue>; "dueDate.get": () => Promise<QxLiveValue>; "dueDate.set": (input: string) => Promise<QxLiveValue>; "energy.get": () => Promise<QxLiveValue>; "energy.set": (input: string) => Promise<QxLiveValue> }; "title.get": () => Promise<string>; "title.set": (input: string) => Promise<null>; "status.get": () => Promise<string>; "status.set": (input: string) => Promise<null>; "priority.get": () => Promise<string>; "priority.set": (input: string) => Promise<null>; "notes.get": () => Promise<string>; "notes.set": (input: string) => Promise<null>; "dueDate.get": () => Promise<string>; "dueDate.set": (input: string) => Promise<null>; "energy.get": () => Promise<string>; "energy.set": (input: string) => Promise<null> } } } & {signal?: AbortSignal}>; "propsWatch": { "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": null; "ports": { "data": { "objectId": QxObjectRef<"interface:interface:task-data@1">; "live": { "title.get": () => Promise<QxLiveValue>; "title.set": (input: string) => Promise<QxLiveValue>; "status.get": () => Promise<QxLiveValue>; "status.set": (input: string) => Promise<QxLiveValue>; "priority.get": () => Promise<QxLiveValue>; "priority.set": (input: string) => Promise<QxLiveValue>; "notes.get": () => Promise<QxLiveValue>; "notes.set": (input: string) => Promise<QxLiveValue>; "dueDate.get": () => Promise<QxLiveValue>; "dueDate.set": (input: string) => Promise<QxLiveValue>; "energy.get": () => Promise<QxLiveValue>; "energy.set": (input: string) => Promise<QxLiveValue> }; "title.get": () => Promise<string>; "title.set": (input: string) => Promise<null>; "status.get": () => Promise<string>; "status.set": (input: string) => Promise<null>; "priority.get": () => Promise<string>; "priority.set": (input: string) => Promise<null>; "notes.get": () => Promise<string>; "notes.set": (input: string) => Promise<null>; "dueDate.get": () => Promise<string>; "dueDate.set": (input: s
export type Implementation = { "createComponent": QxHandler<Contexts["createComponent"], QxObjectRef<"atom:atom:task-react-component">>; "propsGet": QxHandler<Contexts["propsGet"], BindingValue<typeof message0>> | QxDerived<Contexts["propsGet"], BindingValue<typeof message0>>; "propsWatch": QxDerived<Contexts["propsWatch"], BindingValue<typeof message0>>; "propsWatchStop": QxHandler<Contexts["propsWatchStop"], null>; "sourceGet": QxHandler<Contexts["sourceGet"], string> | QxDerived<Contexts["sourceGet"], string> };
const messages = { "org.quixos.web-studio.ReactProps": message0 } satisfies QxMessages;
const specs = {
"createComponent": {
"inputType": {
"kind": "object-ref",
"expectation": {
"kind": "atom",
"atomId": "atom:task"
}
},
"outputType": {
"kind": "object-ref",
"expectation": {
"kind": "atom",
"atomId": "atom:task-react-component"
}
},
"ports": {}
},
"propsGet": {
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "message",
"descriptorId": "org.quixos.web-studio.ReactProps"
},
"ports": {
"data": {
"kind": "interface",
"id": "port:todo-react-runtime:data",
"operations": {
"title.get": {
"id": "operation:task-data:title:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"title.set": {
"id": "operation:task-data:title:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"status.get": {
"id": "operation:task-data:status:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"status.set": {
"id": "operation:task-data:status:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"priority.get": {
"id": "operation:task-data:priority:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"priority.set": {
"id": "operation:task-data:priority:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"notes.get": {
"id": "operation:task-data:notes:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"notes.set": {
"id": "operation:task-data:notes:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"dueDate.get": {
"id": "operation:task-data:due-date:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"dueDate.set": {
"id": "operation:task-data:due-date:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"energy.get": {
"id": "operation:task-data:energy:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"energy.set": {
"id": "operation:task-data:energy:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
}
}
}
}
},
"propsWatch": {
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "builtin",
"name": "watch-handle"
},
"eventType": {
"kind": "message",
"descriptorId": "org.quixos.web-studio.ReactProps"
},
"ports": {
"data": {
"kind": "interface",
"id": "port:todo-react-runtime:data",
"operations": {
"title.get": {
"id": "operation:task-data:title:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"title.set": {
"id": "operation:task-data:title:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"status.get": {
"id": "operation:task-data:status:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"status.set": {
"id": "operation:task-data:status:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"priority.get": {
"id": "operation:task-data:priority:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"priority.set": {
"id": "operation:task-data:priority:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"notes.get": {
"id": "operation:task-data:notes:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"notes.set": {
"id": "operation:task-data:notes:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"dueDate.get": {
"id": "operation:task-data:due-date:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"dueDate.set": {
"id": "operation:task-data:due-date:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"energy.get": {
"id": "operation:task-data:energy:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"energy.set": {
"id": "operation:task-data:energy:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
}
}
}
}
},
"propsWatchStop": {
"inputType": {
"kind": "builtin",
"name": "watch-handle"
},
"outputType": {
"kind": "builtin",
"name": "unit"
},
"ports": {}
},
"sourceGet": {
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
},
"ports": {}
}
} satisfies Record<string, QxHandlerSpec>;
export const createRuntime = (implementation: Implementation) => ({
packageRevisionId,
exports: {
"export:todo-react-runtime:create-component": bindQxHandler(specs["createComponent"], implementation["createComponent"], messages),
"export:todo-react-runtime:props-get": bindQxHandler(specs["propsGet"], implementation["propsGet"], messages),
"export:todo-react-runtime:props-watch": bindQxHandler(specs["propsWatch"], implementation["propsWatch"], messages),
"export:todo-react-runtime:props-watch-stop": bindQxHandler(specs["propsWatchStop"], implementation["propsWatchStop"], messages),
"export:todo-react-runtime:source-get": bindQxHandler(specs["sourceGet"], implementation["sourceGet"], messages),
},
});