0.0.1 • Published 10 months ago
@guardian/editorial-newsletters-ts v0.0.1
editorial-newsletters-ts
This library exports types and validation functions for the objects published by the Guardian editorial newsletters API.
The three type of "newsletter" objects, each with an "is" validation function:
NewsletterData
- the full newsletter data model, as published on the /api/newsletters routeLegacyNewsletter
- the legacy format for newsletter data, still consumed by existing projects and published on /api/legacy/newslettersLegacyCancelledNewsletter
- a variant the legacy format for newsletter data, representing a newsletter which is cancelled.
Running unit tests
Run nx test editorial-newsletters-ts
to execute the unit tests via Jest.
Running lint
Run nx lint editorial-newsletters-ts
to execute the lint via ESLint.