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

    Type Alias PropertyConstraints<M>

    Constraints accepted by the member factories.

    States how a member is stored, presented and owned, leaving its cardinality to the factory naming it and its bounds to the general-purpose one.

    type PropertyConstraints<
        M extends Reference
        | Namespace = Reference | Namespace,
    > = {
        name?: string | Dictionary;
        description?: string | Dictionary;
        hidden?: boolean;
        foreign?: boolean;
        captive?: boolean;
        forward?: M;
        reverse?: M;
    }

    Type Parameters

    Index

    Properties

    name?: string | Dictionary

    Human-readable name for the property.

    Accepts a localised Dictionary or, as a shorthand for the English-only case, a plain text string, expanded to { en: <value> } on the resolved property.

    Inheritance — cannot be overridden.

    undefined (no label)

    description?: string | Dictionary

    Human-readable description of the property.

    Accepts a localised Dictionary or, as a shorthand for the English-only case, a Markdown string, expanded to { en: <value> } on the resolved property.

    Inheritance — cannot be overridden.

    undefined (no description)

    hidden?: boolean

    Excludes the member from default serialisation.

    Inheritance — inherited; conflicting parents without a child override are reported as an error.

    undefined (false)

    foreign?: boolean

    Marks the property as owned by the resources in its range.

    A foreign property is read-only for the resource declaring it: a retrieval template may ask for it, but a submitted value stating it is rejected, as the link is written by the resources it points at rather than by the one exposing it.

    Important

    A foreign property is independent from a reverse mapping. A reverse mapping writes an actual inverse mapping; foreign exposes a read-only view over mappings another property owns and writes nothing on insert.

    Inheritance — cannot be overridden.

    undefined (false)

    captive?: boolean

    Marks the resources in the property range as unable to outlive the resource declaring it.

    A captive resource keeps an identity and a lifecycle of its own and may be created, updated and deleted on its own. It stays existentially dependent on the resource declaring the property, though, and is cascade-removed when that resource is deleted.

    Important

    Captivity is independent from embedding. An embedded resource has no identity or lifecycle of its own (an id is rejected as a value is validated) and is always managed as part of the resource containing it; a captive resource has both and may be managed on its own, but does not survive the resource declaring the property.

    Inheritance — cannot be overridden.

    undefined (false)

    forward?: M

    Maps the property to an absolute IRI for direct mapping.

    Accepts an absolute IRI or, as a shorthand, a Namespace resolving the property name against it (for instance, { forward: schema } on property name yields http://schema.org/name), narrowed on a built property to the IRI it denotes.

    Important

    Both forward and reverse mappings write actual property values. This is independent from foreign, which exposes a read-only view over mappings another property owns.

    Inheritance — cannot be overridden.

    undefined (the property name resolved against the space of the shape declaring it, unless a reverse mapping is stated)

    reverse?: M

    Maps the property to an absolute IRI for inverse mapping.

    Accepts an absolute IRI or, as a shorthand, a Namespace resolving the property name against it (for instance, { reverse: schema } on property employee yields http://schema.org/employee), narrowed on a built property to the IRI it denotes.

    Important

    Both forward and reverse mappings write actual property values. This is independent from foreign, which exposes a read-only view over mappings another property owns.

    Inheritance — cannot be overridden.

    undefined (no inverse mapping)