Variable ActionConst

Action: 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;
}>]> = ...

An action taken in a step.

Example

import { ActionT, Action } from '@docmaps/sdk';
import { Validation } from 'io-ts';

const C: Validation<ActionT> = Action.decode({
inputs: [{
doi: '10.12345/xyz',
type: 'Article',
}],
outputs: [{
published: '2020-01-01',
id: '123456',
doi: '10.12345/abcdef',
type: 'Article',
content: [{
type: 'text',
text: 'This is an example of a thing'
}]
}],
participants: [{
actor: {
type: 'person',
name: 'John Doe'
},
role: 'author'
}],
id: '123456'
});

Since

0.1.0

TODO - this will probably be an independently-publishable thing and id should not be optional.

Generated using TypeDoc