Skip to main content
pb.shapes reads the shapes in your project and the artifacts compiled from them: schemas, bindings, interfaces, projections. You author shapes in the Shapes Workbench; here you read them at run time.

Methods

MethodDescription
pb.shapes.list()All shapes in your project.
pb.shapes.starters()The curated starter shapes (the default kit). These do not appear in list().
pb.shapes.get(id)A single shape.
pb.shapes.schema(id)The shape’s schema.
pb.shapes.binding(id)The shape’s binding.
pb.shapes.interface(id, spec?)The shape’s interface.
pb.shapes.extractionBundle(id)The bundle used for extraction.
pb.shapes.relationships(id)Relationships defined on the shape.
pb.shapes.projections(id)Retrieval projections defined on the shape.
pb.shapes.materialize(input)Materialize a shape.
const shapes = await pb.shapes.list();
const schema = await pb.shapes.schema("shp_deal_notes");
pb.shapes.list() returns the shapes in your project. System starter shapes (Research, Memory, and the rest of the default kit) do not appear there. Discover them with pb.shapes.starters(). They are still usable directly: read their type with pb.types.get("memory") and extract through them by name with pb.extract({ shape: "memory" }).

Types

The entity types a shape structures.

Ontology

The active ontology as a document.