Options
All
  • Public
  • Public/Protected
  • All
Menu

This extension allows an app to require that certain changes, such as changes to access controls, are agreed before they are shared in the domain. This can be important for security and data integrity. See the white paper link below for more details.

see

the white paper

experimental

Hierarchy

  • Statutory

Implements

Index

Properties

agreementConditions

agreementConditions: { test: any }[] = [{test: (state: MeldReadState, update: MeldPreUpdate) =>Promise.all(Array.from(this.statutes.values(),statute => statute.test(state, update)))}]

constraints

constraints: { check: any }[] = [{check: (state: MeldReadState, update: InterimUpdate) =>Promise.all(Array.from(this.statutes.values(),statute => statute.check(state, update)))}]

Methods

initFromData

invalidate

  • invalidate(): void

Static declare

  • declare(priority: number): Subject
  • Extension declaration. Insert into the domain data to install the extension. For example (assuming a m-ld clone object):

    clone.write(Statutory.declare(0));
    

    Parameters

    • priority: number

      the preferred index into the existing list of extensions (lower value is higher priority).

    Returns Subject

Static declareAuthority

  • Declares a principal to have authority over some shape, for example (assuming a m-ld clone object):

    clone.write(Statutory.declareAuthority(
      'https://alice.example/profile#me',
      { '@id': 'documentStateShape' }
    ));
    

    Parameters

    • principalIri: Iri

      the principal's identity. As for all domain data, this can be a relative IRI, e.g. 'fred'.

    • shape: Subject | Reference

      the shape Subject, or a Reference to a pre-existing shape

    Returns Subject

Static declareStatute

  • Declares that some set of shapes are statutory, that is, they cannot change without agreement. In order to have agreement, the given conditions must be met.

    For example (assuming a m-ld clone object):

    clone.write(Statutory.declareStatute(
      'https://alice.example/profile#me',
      { '@id': 'documentStateShape' }
    ));
    

    Parameters

    Returns Subject

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method
  • Protected method

Generated using TypeDoc. Delivered by Vercel. @m-ld/m-ld - v0.10.0 Source code licensed MIT. Privacy policy