← All procedures

client.export

Serialize procedure aggregation to JSON string

browsernot registered
Package
@procedures/client · README
Path
["client","export"]
CLI
Not a mark command: it is not in the default registry.
As data
{"$proc":["client","export"],"input":{}}
Tags
core, meta, raw-input

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","export"], {});
console.log(JSON.stringify(result));

As data, in a program

{ "$proc": ["client", "export"], "input": {} }

Input

FieldTypeRequired
procedureunknownno
prettybooleanno

Output

FieldTypeRequiredDefaultDescription
jsonstringyesThe procedure reference as JSON text
successbooleanyesTrue when the serialization succeeded
errorstringnoThe error message when the serialization failed
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "procedure": {
        "description": "Procedure reference to serialize"
      },
      "pretty": {
        "description": "Pretty print JSON output",
        "type": "boolean"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "json": {
        "type": "string",
        "description": "The procedure reference as JSON text"
      },
      "success": {
        "type": "boolean",
        "description": "True when the serialization succeeded"
      },
      "error": {
        "description": "The error message when the serialization failed",
        "type": "string"
      }
    },
    "required": [
      "json",
      "success"
    ],
    "additionalProperties": {}
  }
}