← All procedures
sdk.typescript
Write a typed TypeScript SDK for the exposed procedures
CLI- Package
- @procedures/compiler · README
- Path
["sdk","typescript"]- CLI
mark sdk typescript- As data
{"$proc":["sdk","typescript"],"input":{}}- Tags
- compiler, sdk
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/compiler/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["sdk","typescript"], {});
console.log(JSON.stringify(result));From the command line
$ mark sdk typescript
As data, in a program
{ "$proc": ["sdk", "typescript"], "input": {} }Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"namespace": {
"description": "Only the procedures under this first path segment",
"type": "string"
}
}
},
"output": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The source of the TypeScript module: the types, the interface Sdk and the function createSdk"
},
"procedures": {
"type": "number",
"description": "The number of procedures in the SDK"
},
"registryHash": {
"type": "string",
"description": "The hash of the manifest that the SDK comes from"
}
},
"required": [
"code",
"procedures",
"registryHash"
],
"additionalProperties": false
}
}