ModelViewDefinitionV2: UnionCodec<[UnionCodec<[ExactCodec<TypeCodec<{ type: LiteralCodec<"documentAccount"> }>>, ExactCodec<TypeCodec<{ type: LiteralCodec<"documentVersion"> }>>]>, UnionCodec<[ExactCodec<TypeCodec<{ model: UnionCodec<[RefinementCodec<TrivialCodec<string>, string>, TrivialCodec<null>]>; 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"> }>>, ExactCodec<TypeCodec<{ model: RefinementCodec<TrivialCodec<string>, string>; property: TrivialCodec<string>; type: LiteralCodec<"relationSetFrom"> }>>]>]> = ...

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
  • 'relationSetFrom': view properties of this type represent a single inverse relation identified by the given 'model' and 'property' fields for models using the SET account relation