Docmap: IntersectionC<[TypeC<{
@context: LiteralC<"https://w3id.org/docmaps/context.jsonld">;
created: DateFromUnknownC;
id: StringC;
publisher: IntersectionC<[TypeC<{}>, PartialC<{
account: IntersectionC<[TypeC<{
id: StringC;
}>, PartialC<{
service: UrlFromStringC;
}>]>;
homepage: UrlFromStringC;
id: StringC;
logo: UrlFromStringC;
name: StringC;
url: UrlFromStringC;
}>]>;
type: UnionC<[LiteralC<string>, ArrayC<LiteralC<string>>]> | UnionC<[ArrayC<UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>>, UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>]>;
}>, PartialC<{
first-step: StringC;
steps: RecordC<StringC, IntersectionC<[TypeC<{
actions: ArrayC<IntersectionC<[TypeC<{
inputs: ArrayC<IntersectionC<[TypeC<{}>, PartialC<{
content: ArrayC<IntersectionC<[TypeC<{
type: UnionC<[LiteralC<string>, ArrayC<LiteralC<string>>]> | UnionC<[ArrayC<UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>>, UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>]>;
}>, PartialC<{
id: StringC;
service: UrlFromStringC;
url: UrlFromStringC;
}>]>>;
doi: StringC;
id: StringC;
published: DateFromUnknownC;
type: UnionC<[LiteralC<string>, ArrayC<LiteralC<string>>]> | UnionC<[ArrayC<UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>>, UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>]>;
url: UrlFromStringC;
}>]>>;
outputs: ArrayC<IntersectionC<[TypeC<{}>, PartialC<{
content: ArrayC<IntersectionC<[TypeC<{
type: UnionC<[LiteralC<string>, ArrayC<LiteralC<string>>]> | UnionC<[ArrayC<UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>>, UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>]>;
}>, PartialC<{
id: StringC;
service: UrlFromStringC;
url: UrlFromStringC;
}>]>>;
doi: StringC;
id: StringC;
published: DateFromUnknownC;
type: UnionC<[LiteralC<string>, ArrayC<LiteralC<string>>]> | UnionC<[ArrayC<UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>>, UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>]>;
url: UrlFromStringC;
}>]>>;
participants: ArrayC<IntersectionC<[TypeC<{
actor: UnionC<[TypeC<{
name: StringC;
type: UnionC<[LiteralC<string>, ArrayC<LiteralC<string>>]> | UnionC<[ArrayC<UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>>, UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>]>;
}>, UnknownC]>;
role: StringC;
}>, PartialC<{
id: StringC;
type: UnionC<[LiteralC<"pro:roleintime">, LiteralC<"pro:RoleInTime">]>;
}>]>>;
}>, PartialC<{
id: StringC;
}>]>>;
assertions: ArrayC<IntersectionC<[TypeC<{
item: UnknownC;
status: StringC;
}>, PartialC<{
happened: DateFromUnknownC;
}>]>>;
}>, PartialC<{
id: StringC;
inputs: ArrayC<IntersectionC<[TypeC<{}>, PartialC<{
content: ArrayC<IntersectionC<[TypeC<{
type: UnionC<[LiteralC<string>, ArrayC<LiteralC<string>>]> | UnionC<[ArrayC<UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>>, UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>]>;
}>, PartialC<{
id: StringC;
service: UrlFromStringC;
url: UrlFromStringC;
}>]>>;
doi: StringC;
id: StringC;
published: DateFromUnknownC;
type: UnionC<[LiteralC<string>, ArrayC<LiteralC<string>>]> | UnionC<[ArrayC<UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>>, UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>]>;
url: UrlFromStringC;
}>]>>;
next-step: UnionC<[StringC, NullC]>;
previous-step: UnionC<[StringC, NullC]>;
}>]>>;
updated: DateFromUnknownC;
}>]> = ...
Example
Since
0.1.0
TODO: use smart validation rules for custom io-ts docmap type, such as next-steps referring to steps that exist and any other value-dependent type rules. see https://github.com/Docmaps-Project/docmaps/issues/23
TODO: support something where docmaps: is prefixed t.literal('docmaps:docmap'), t.literal('docmaps:Docmap'), or abbreviate the Base somehow on the w3id docmap repo.