@metreeca/blue - v0.9.1
    Preparing search index...

    Interface ResourceConstraints

    Constraints for resource shape factories.

    interface ResourceConstraints {
        virtual?: boolean;
        name?: Local;
        description?: Local;
        namespace?: Namespace;
        class?: string;
        extends?: Some<Lazy<ResourceShape>>;
        pattern?: string;
        in?: readonly string[];
        hasValue?: readonly string[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    virtual?: boolean

    Marks the resource as dynamically generated.

    When true, indicates the resource is at least partially computed rather than stored.

    undefined (false)

    name?: Local

    Human-readable name for the shape.

    SHACL defines sh:name only for property shapes; extended here to node shapes.

    description?: Local

    Human-readable description of the shape.

    SHACL defines sh:description only for property shapes; extended here to node shapes.

    namespace?: Namespace

    Default namespace for converting property names to IRIs.

    Property names without explicit IRI mappings are resolved relative to this namespace.

    defaultNamespace

    class?: string

    Class constraint for resource instances.

    The absolute IRI identifying the class that resource instances must belong to. If defined, this value is exposed through the property mapped to @type using type.

    Note

    Restricted to a single optional class, unlike SHACL which allows multiple sh:class values.

    extends?: Some<Lazy<ResourceShape>>

    Parent shape(s) this shape inherits from.

    Inherited properties and constraints are merged into the derived shape.

    Warning

    When inheriting from multiple shapes with different namespace values, an overriding namespace must be declared in this shape.

    pattern?: string

    IRI path pattern that resource identifiers must match.

    undefined (no pattern constraint)

    Patterns are IRI-like templates using {name} placeholders for single path segments and /* for trailing wildcards. Patterns may be absolute or root-relative; root-relative patterns match absolute IRIs, ignoring the origin.

    https://example.org/products/{sku}  → https://example.org/products/ABC-456
    https://example.org/categories/* → https://example.org/categories/electronics/phones

    /employees/{id} → https://example.org/employees/123
    /departments/* → https://example.org/departments/sales/emea
    in?: readonly string[]

    Allowed resource identifiers (closed enumeration).

    When specified, resource identifiers must be members of this list. IRIs must be absolute.

    undefined (no enumeration constraint)

    hasValue?: readonly string[]

    Required resource identifiers that must be present.

    When specified, all listed resource identifiers must appear. IRIs must be absolute.

    undefined (no required values)