ModelViewDefinition: UnionCodec<[UnionCodec<[ExactCodec<TypeCodec<{ type: LiteralCodec<"documentAccount"> }>>, ExactCodec<TypeCodec<{ type: LiteralCodec<"documentVersion"> }>>]>, UnionCodec<[ExactCodec<TypeCodec<{ model: RefinementCodec<TrivialCodec<string>, string>; property: TrivialCodec<string>; type: LiteralCodec<"relationDocument"> }>>, ExactCodec<TypeCodec<{ model: RefinementCodec<TrivialCodec<string>, string>; property: TrivialCodec<string>; type: LiteralCodec<"relationFrom"> }>>, ExactCodec<TypeCodec<{ model: RefinementCodec<TrivialCodec<string>, string>; property: TrivialCodec<string>; type: LiteralCodec<"relationCountFrom"> }>>]>]> = ...

Identifies types of properties that are supported as view properties at DApps' runtime

A view-property is one that is not stored in related MIDs' content, but is derived from their other properties

Currently supported types of view properties:

  • 'documentAccount': view properties of this type have the MID's controller DID as values
  • 'documentVersion': view properties of this type have the MID's commit ID as values
  • 'relationDocument': view properties of this type represent document relations identified by the given 'property' field
  • 'relationFrom': view properties of this type represent inverse relations identified by the given 'model' and 'property' fields
  • 'relationCountFrom': view properties of this type represent the number of inverse relations identified by the given 'model' and 'property' fields