Six predicates in this codebase are written twice, once in TypeScript and once in SQL

A campaign in Nakodo can be paused in three different ways: stop finding new creators, stop the email flow, or stop both. Nakodo can also pause a campaign itself, for instance when a Free account's month of contacts is used up, and our pricing page states a couple of those cases, including that extra campaigns are paused rather than deleted when a plan gets smaller. From that one product idea comes a question the code has to answer in two completely different places. A React component renders a status dot and needs to know whether this campaign is still searching. A background job runs a query
Headline and summary provided via NewsData.io. The full article and its copyright belong to the original publisher.
