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

278 lines
13 KiB
TypeScript

// Generated by quixos-codegen-ts. Do not edit. Binding ABI version 1.
import { bindQxHandler, type QxObjectRef, type QxWatchHandle, type QxHandler, type QxDerived, type QxContextLifecycle, type QxLiveValue, type QxHandlerSpec, type QxMessages } from "@quixos/camino-package-runtime";
export const packageRevisionId = "package:project-react-runtime@1";
declare const appliedType: unique symbol;
type QxApplied<Definition extends string, Arguments extends readonly unknown[]> = string & {readonly [appliedType]: (value: [Definition, Arguments]) => [Definition, Arguments]};
export type Contexts = { "createComponent": { "objectId": QxObjectRef<"atom:atom:project-react-component">; "input": QxObjectRef<"atom:atom:project">; "ports": { } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:project-react-component">; "input": QxObjectRef<"atom:atom:project">; "ports": { } } & {signal?: AbortSignal}>; "propsGet": { "objectId": QxObjectRef<"atom:atom:project-react-component">; "input": null; "ports": { "named": { "objectId": QxObjectRef<"interface:interface:named@1">; "live": { "name.get": () => Promise<QxLiveValue>; "name.set": (input: string) => Promise<QxLiveValue> }; "name.get": () => Promise<string>; "name.set": (input: string) => Promise<null> }; "tasks": { "objectId": QxObjectRef<"interface:interface:project-tasks@1">; "live": { "tasks.resolve": () => Promise<QxLiveValue>; "tasks.connect": (input: QxObjectRef<"atom:atom:task">) => Promise<QxLiveValue>; "tasks.disconnect": (input: QxObjectRef<"atom:atom:task">) => Promise<QxLiveValue> }; "tasks.resolve": () => Promise<Array<QxObjectRef<"atom:atom:task">>>; "tasks.connect": (input: QxObjectRef<"atom:atom:task">) => Promise<null>; "tasks.disconnect": (input: QxObjectRef<"atom:atom:task">) => Promise<null> } } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:project-react-component">; "input": null; "ports": { "named": { "objectId": QxObjectRef<"interface:interface:named@1">; "live": { "name.get": () => Promise<QxLiveValue>; "name.set": (input: string) => Promise<QxLiveValue> }; "name.get": () => Promise<string>; "name.set": (input: string) => Promise<null> }; "tasks": { "objectId": QxObjectRef<"interface:interface:project-tasks@1">; "live": { "tasks.resolve": () => Promise<QxLiveValue>; "tasks.connect": (input: QxObjectRef<"atom:atom:task">) => Promise<QxLiveValue>; "tasks.disconnect": (input: QxObjectRef<"atom:atom:task">) => Promise<QxLiveValue> }; "tasks.resolve": () => Promise<Array<QxObjectRef<"atom:atom:task">>>; "tasks.connect": (input: QxObjectRef<"atom:atom:task">) => Promise<null>; "tasks.disconnect": (input: QxObjectRef<"atom:atom:task">) => Promise<null> } } } & {signal?: AbortSignal}>; "propsWatch": { "objectId": QxObjectRef<"atom:atom:project-react-component">; "input": null; "ports": { "named": { "objectId": QxObjectRef<"interface:interface:named@1">; "live": { "name.get": () => Promise<QxLiveValue>; "name.set": (input: string) => Promise<QxLiveValue> }; "name.get": () => Promise<string>; "name.set": (input: string) => Promise<null> }; "tasks": { "objectId": QxObjectRef<"interface:interface:project-tasks@1">; "live": { "tasks.resolve": () => Promise<QxLiveValue>; "tasks.connect": (input: QxObjectRef<"atom:atom:task">) => Promise<QxLiveValue>; "tasks.disconnect": (input: QxObjectRef<"atom:atom:task">) => Promise<QxLiveValue> }; "tasks.resolve": () => Promise<Array<QxObjectRef<"atom:atom:task">>>; "tasks.connect": (input: QxObjectRef<"atom:atom:task">) => Promise<null>; "tasks.disconnect": (input: QxObjectRef<"atom:atom:task">) => Promise<null> } } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:project-react-component">; "input": null; "ports": { "named": { "objectId": QxObjectRef<"interface:interface:named@1">; "live": { "name.get": () => Promise<QxLiveValue>; "name.set": (input: string) => Promise<QxLiveValue> }; "name.get": () => Promise<string>; "name.set": (input: string) => Promise<null> }; "tasks": { "objectId": QxObjectRef<"interface:interface:project-tasks@1">; "live": { "tasks.resolve": () => Promise<QxLiveValue>; "tasks.connect": (input: QxObjectRef<"atom:atom:task">) => Promise<QxLiveValue>; "tasks.disconnect": (input: QxObjectRef<"atom:atom:task">) => Promise<QxLiveValue> }; "tasks.resolve": () => Promise<Array<QxObjectRef<"atom:atom:task">>>; "tasks.connect": (input: QxObjectRef<"atom:atom:task">) => Promise<null>; "tasks.disconnect": (input: QxObjectRef<"atom:atom:task">) => Promise<null> } } } & {signal?: AbortSignal}>; "propsWatchStop": { "objectId": QxObjectRef<"atom:atom:project-react-component">; "input": QxWatchHandle; "ports": { } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:project-react-component">; "input": QxWatchHandle; "ports": { } } & {signal?: AbortSignal}>; "sourceGet": { "objectId": QxObjectRef<"atom:atom:project-react-component">; "input": null; "ports": { } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:project-react-component">; "input": null; "ports": { } } & {signal?: AbortSignal}> };
export type Results = { "createComponent": QxObjectRef<"atom:atom:project-react-component">; "propsGet": { "named": QxObjectRef<"interface:interface:named@1">; "tasks": QxObjectRef<"interface:interface:project-tasks@1"> }; "propsWatch": { "named": QxObjectRef<"interface:interface:named@1">; "tasks": QxObjectRef<"interface:interface:project-tasks@1"> }; "propsWatchStop": null; "sourceGet": string };
export type Implementation = { "createComponent": QxHandler<Contexts["createComponent"], QxObjectRef<"atom:atom:project-react-component">>; "propsGet": QxHandler<Contexts["propsGet"], { "named": QxObjectRef<"interface:interface:named@1">; "tasks": QxObjectRef<"interface:interface:project-tasks@1"> }> | QxDerived<Contexts["propsGet"], { "named": QxObjectRef<"interface:interface:named@1">; "tasks": QxObjectRef<"interface:interface:project-tasks@1"> }>; "propsWatch": QxDerived<Contexts["propsWatch"], { "named": QxObjectRef<"interface:interface:named@1">; "tasks": QxObjectRef<"interface:interface:project-tasks@1"> }>; "propsWatchStop": QxHandler<Contexts["propsWatchStop"], null>; "sourceGet": QxHandler<Contexts["sourceGet"], string> | QxDerived<Contexts["sourceGet"], string> };
const messages = { } satisfies QxMessages;
const specs = {
"createComponent": {
"inputType": {
"kind": "object-ref",
"expectation": {
"kind": "atom",
"atomId": "atom:project"
}
},
"outputType": {
"kind": "object-ref",
"expectation": {
"kind": "atom",
"atomId": "atom:project-react-component"
}
},
"ports": {}
},
"propsGet": {
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "record",
"fields": {
"named": {
"kind": "object-ref",
"expectation": {
"kind": "interface",
"interfaceRevisionId": "interface:named@1"
}
},
"tasks": {
"kind": "object-ref",
"expectation": {
"kind": "interface",
"interfaceRevisionId": "interface:project-tasks@1"
}
}
}
},
"ports": {
"named": {
"kind": "interface",
"id": "port:project-react:named",
"operations": {
"name.get": {
"id": "operation:named:name:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"name.set": {
"id": "operation:named:name:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
}
}
},
"tasks": {
"kind": "interface",
"id": "port:project-react:tasks",
"operations": {
"tasks.resolve": {
"id": "operation:project-tasks:tasks:resolve",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "list",
"value": {
"kind": "object-ref",
"expectation": {
"kind": "atom",
"atomId": "atom:task"
}
}
}
},
"tasks.connect": {
"id": "operation:project-tasks:tasks:connect",
"inputType": {
"kind": "object-ref",
"expectation": {
"kind": "atom",
"atomId": "atom:task"
}
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"tasks.disconnect": {
"id": "operation:project-tasks:tasks:disconnect",
"inputType": {
"kind": "object-ref",
"expectation": {
"kind": "atom",
"atomId": "atom:task"
}
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
}
}
}
}
},
"propsWatch": {
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "builtin",
"name": "watch-handle"
},
"eventType": {
"kind": "record",
"fields": {
"named": {
"kind": "object-ref",
"expectation": {
"kind": "interface",
"interfaceRevisionId": "interface:named@1"
}
},
"tasks": {
"kind": "object-ref",
"expectation": {
"kind": "interface",
"interfaceRevisionId": "interface:project-tasks@1"
}
}
}
},
"ports": {
"named": {
"kind": "interface",
"id": "port:project-react:named",
"operations": {
"name.get": {
"id": "operation:named:name:get",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "scalar",
"name": "string"
}
},
"name.set": {
"id": "operation:named:name:set",
"inputType": {
"kind": "scalar",
"name": "string"
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
}
}
},
"tasks": {
"kind": "interface",
"id": "port:project-react:tasks",
"operations": {
"tasks.resolve": {
"id": "operation:project-tasks:tasks:resolve",
"inputType": {
"kind": "builtin",
"name": "unit"
},
"outputType": {
"kind": "list",
"value": {
"kind": "object-ref",
"expectation": {
"kind": "atom",
"atomId": "atom:task"
}
}
}
},
"tasks.connect": {
"id": "operation:project-tasks:tasks:connect",
"inputType": {
"kind": "object-ref",
"expectation": {
"kind": "atom",
"atomId": "atom:task"
}
},
"outputType": {
"kind": "builtin",
"name": "unit"
}
},
"tasks.disconnect": {
"id": "operation:project-tasks:tasks:disconnect",
"inputType": {
"kind": "object-ref",
"expectation": {
"kind": "atom",
"atomId": "atom:task"
}
},
"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:project-react-runtime:create-component": bindQxHandler(specs["createComponent"], implementation["createComponent"], messages),
"export:project-react-runtime:props-get": bindQxHandler(specs["propsGet"], implementation["propsGet"], messages),
"export:project-react-runtime:props-watch": bindQxHandler(specs["propsWatch"], implementation["propsWatch"], messages),
"export:project-react-runtime:props-watch-stop": bindQxHandler(specs["propsWatchStop"], implementation["propsWatchStop"], messages),
"export:project-react-runtime:source-get": bindQxHandler(specs["sourceGet"], implementation["sourceGet"], messages),
},
});