317 lines
15 KiB
TypeScript
317 lines
15 KiB
TypeScript
// 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 RelationshipCollection, type QxHandlerSpec, type QxMessages } from "@quixos/camino-package-runtime";
|
||
|
|
import { searchDocumentBinding as message0 } from "../messages.js";
|
||
|
|
export const packageRevisionId = "package:project-runtime@1";
|
||
|
|
export type Contexts = { "addTask": { "objectId": QxObjectRef<"atom:atom:project">; "input": string; "ports": { "tasks": { "connect": (target: QxObjectRef<"atom:atom:task">) => Promise<void> }; "task": { "construct": (input: string) => Promise<QxObjectRef<"atom:atom:task">> } } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:project">; "input": string; "ports": { "tasks": { "connect": (target: QxObjectRef<"atom:atom:task">) => Promise<void> }; "task": { "construct": (input: string) => Promise<QxObjectRef<"atom:atom:task">> } } } & {signal?: AbortSignal}>; "createProject": { "objectId": QxObjectRef<"atom:atom:project">; "input": null; "ports": { } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:project">; "input": null; "ports": { } } & {signal?: AbortSignal}>; "searchDocumentGet": { "objectId": QxObjectRef<"atom:atom:project">; "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">; "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}>; "searchDocumentWatch": { "objectId": QxObjectRef<"atom:atom:project">; "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">; "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> }; "ta
|
||
|
|
export type Implementation = { "addTask": QxHandler<Contexts["addTask"], QxObjectRef<"atom:atom:task">> | QxDerived<Contexts["addTask"], QxObjectRef<"atom:atom:task">>; "createProject": QxHandler<Contexts["createProject"], QxObjectRef<"atom:atom:project">>; "searchDocumentGet": QxHandler<Contexts["searchDocumentGet"], BindingValue<typeof message0>> | QxDerived<Contexts["searchDocumentGet"], BindingValue<typeof message0>>; "searchDocumentWatch": QxDerived<Contexts["searchDocumentWatch"], BindingValue<typeof message0>>; "searchDocumentWatchStop": QxHandler<Contexts["searchDocumentWatchStop"], null>; "taskCountGet": QxHandler<Contexts["taskCountGet"], number> | QxDerived<Contexts["taskCountGet"], number>; "taskCountWatch": QxDerived<Contexts["taskCountWatch"], number>; "taskCountWatchStop": QxHandler<Contexts["taskCountWatchStop"], null> };
|
||
|
|
const messages = { "org.quixos.web-studio.SearchDocument": message0 } satisfies QxMessages;
|
||
|
|
const specs = {
|
||
|
|
"addTask": {
|
||
|
|
"inputType": {
|
||
|
|
"kind": "scalar",
|
||
|
|
"name": "string"
|
||
|
|
},
|
||
|
|
"outputType": {
|
||
|
|
"kind": "object-ref",
|
||
|
|
"expectation": {
|
||
|
|
"kind": "atom",
|
||
|
|
"atomId": "atom:task"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"ports": {
|
||
|
|
"tasks": {
|
||
|
|
"kind": "edge",
|
||
|
|
"id": "port:project-actions:tasks",
|
||
|
|
"primitives": [
|
||
|
|
"connect"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"task": {
|
||
|
|
"kind": "constructor",
|
||
|
|
"id": "port:project-actions:task-constructor",
|
||
|
|
"inputType": {
|
||
|
|
"kind": "scalar",
|
||
|
|
"name": "string"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"createProject": {
|
||
|
|
"inputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "unit"
|
||
|
|
},
|
||
|
|
"outputType": {
|
||
|
|
"kind": "object-ref",
|
||
|
|
"expectation": {
|
||
|
|
"kind": "atom",
|
||
|
|
"atomId": "atom:project"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"ports": {}
|
||
|
|
},
|
||
|
|
"searchDocumentGet": {
|
||
|
|
"inputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "unit"
|
||
|
|
},
|
||
|
|
"outputType": {
|
||
|
|
"kind": "message",
|
||
|
|
"descriptorId": "org.quixos.web-studio.SearchDocument"
|
||
|
|
},
|
||
|
|
"ports": {
|
||
|
|
"named": {
|
||
|
|
"kind": "interface",
|
||
|
|
"id": "port:project-search: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-search: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"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"searchDocumentWatch": {
|
||
|
|
"inputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "unit"
|
||
|
|
},
|
||
|
|
"outputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "watch-handle"
|
||
|
|
},
|
||
|
|
"eventType": {
|
||
|
|
"kind": "message",
|
||
|
|
"descriptorId": "org.quixos.web-studio.SearchDocument"
|
||
|
|
},
|
||
|
|
"ports": {
|
||
|
|
"named": {
|
||
|
|
"kind": "interface",
|
||
|
|
"id": "port:project-search: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-search: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"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"searchDocumentWatchStop": {
|
||
|
|
"inputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "watch-handle"
|
||
|
|
},
|
||
|
|
"outputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "unit"
|
||
|
|
},
|
||
|
|
"ports": {}
|
||
|
|
},
|
||
|
|
"taskCountGet": {
|
||
|
|
"inputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "unit"
|
||
|
|
},
|
||
|
|
"outputType": {
|
||
|
|
"kind": "scalar",
|
||
|
|
"name": "uint32"
|
||
|
|
},
|
||
|
|
"ports": {
|
||
|
|
"tasks": {
|
||
|
|
"kind": "edge",
|
||
|
|
"id": "port:project-count:tasks",
|
||
|
|
"primitives": [
|
||
|
|
"resolve"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"taskCountWatch": {
|
||
|
|
"inputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "unit"
|
||
|
|
},
|
||
|
|
"outputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "watch-handle"
|
||
|
|
},
|
||
|
|
"eventType": {
|
||
|
|
"kind": "scalar",
|
||
|
|
"name": "uint32"
|
||
|
|
},
|
||
|
|
"ports": {
|
||
|
|
"tasks": {
|
||
|
|
"kind": "edge",
|
||
|
|
"id": "port:project-count:tasks",
|
||
|
|
"primitives": [
|
||
|
|
"resolve"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"taskCountWatchStop": {
|
||
|
|
"inputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "watch-handle"
|
||
|
|
},
|
||
|
|
"outputType": {
|
||
|
|
"kind": "builtin",
|
||
|
|
"name": "unit"
|
||
|
|
},
|
||
|
|
"ports": {}
|
||
|
|
}
|
||
|
|
} satisfies Record<string, QxHandlerSpec>;
|
||
|
|
export const createRuntime = (implementation: Implementation) => ({
|
||
|
|
packageRevisionId,
|
||
|
|
exports: {
|
||
|
|
"export:project-runtime:add-task": bindQxHandler(specs["addTask"], implementation["addTask"], messages),
|
||
|
|
"export:project-runtime:create-project": bindQxHandler(specs["createProject"], implementation["createProject"], messages),
|
||
|
|
"export:project-runtime:search-document-get": bindQxHandler(specs["searchDocumentGet"], implementation["searchDocumentGet"], messages),
|
||
|
|
"export:project-runtime:search-document-watch": bindQxHandler(specs["searchDocumentWatch"], implementation["searchDocumentWatch"], messages),
|
||
|
|
"export:project-runtime:search-document-watch-stop": bindQxHandler(specs["searchDocumentWatchStop"], implementation["searchDocumentWatchStop"], messages),
|
||
|
|
"export:project-runtime:task-count-get": bindQxHandler(specs["taskCountGet"], implementation["taskCountGet"], messages),
|
||
|
|
"export:project-runtime:task-count-watch": bindQxHandler(specs["taskCountWatch"], implementation["taskCountWatch"], messages),
|
||
|
|
"export:project-runtime:task-count-watch-stop": bindQxHandler(specs["taskCountWatchStop"], implementation["taskCountWatchStop"], messages),
|
||
|
|
},
|
||
|
|
});
|