0.0.1 • Published 10 months ago

@guardian/editorial-newsletters-ts v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

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 route
  • LegacyNewsletter - the legacy format for newsletter data, still consumed by existing projects and published on /api/legacy/newsletters
  • LegacyCancelledNewsletter - 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.

0.0.1

10 months ago

0.1.0

10 months ago