Extracted types and refactor from activitypub-models repo.
npm i activitypub-types
# or
yarn add activitypub-types
Implemented and documented every structure from specification. You can use interfaces and extend them by yourself, or you can use specified fields types:
// All models interfaces starts with AP
import { APObject, APNote, ContextField, ContentMapField } from 'activitypub-types';
- Use
orderedItems
instead ofitems
inOrderedCollection
(#1, thanks @RangerMauve)