← All procedures
client.lookup
Look up procedure in registry by path
browsernot registered- Package
- @procedures/client · README
- Path
["client","lookup"]- CLI
- Not a
mark command: it is not in the default registry. - As data
{"$proc":["client","lookup"],"input":{}}- Tags
- core, meta
Try it in the Composer →
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY, allCoreProcedures } from "@procedures/client";
for (const procedure of allCoreProcedures) {
if (!PROCEDURE_REGISTRY.has(procedure.path)) PROCEDURE_REGISTRY.register(procedure);
}
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["client","lookup"], { path: [] });
console.log(JSON.stringify(result));As data, in a program
{ "$proc": ["client", "lookup"], "input": { "path": [] } }Input
| Field | Type | Required |
|---|
path | string[] | yes |
Output
| Field | Type | Required | Default | Description |
|---|
exists | boolean | yes | | True when the registry has the procedure |
metadata | any | no | | The metadata of the procedure, when it exists |
path | string[] | yes | | The path of the procedure |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"path": {
"type": "array",
"items": {
"type": "string"
},
"description": "Procedure path to look up"
}
},
"required": [
"path"
]
},
"output": {
"type": "object",
"properties": {
"exists": {
"type": "boolean",
"description": "True when the registry has the procedure"
},
"metadata": {
"description": "The metadata of the procedure, when it exists"
},
"path": {
"type": "array",
"items": {
"type": "string"
},
"description": "The path of the procedure"
}
},
"required": [
"exists",
"path"
],
"additionalProperties": {}
}
}