in libs/newsletters-data-client/src/lib/schemas/newsletter-data-type.ts [141:185]
seriesTag: tagPathString(
'Please add the path of the series tag e.g. for https://www.theguardian.com/world/series/first-edition just use world/series/first-edition. Can only include lower-case letters, number and dashes, separated by slashes',
)
.optional()
.describe('Series tag (path)'),
seriesTagDescription: z
.string()
.optional()
.describe('The Series tag description'),
composerTag: z.string().optional().describe('Composer tag(s)'),
composerCampaignTag: z
.string()
.optional()
.describe('Composer campaign tag description'),
launchDate: z.coerce.date().describe('Launch date'),
signUpPageDate: z.coerce.date().describe('Sign up page date'),
thrasherDate: z.coerce.date().describe('Thrasher date'),
privateUntilLaunch: z.boolean().describe('Needs to be private until launch?'),
onlineArticle: onlineArticleSchema.optional(),
renderingOptions: renderingOptionsSchema.optional(),
thrasherOptions: thrasherOptionsSchema.optional(),
mailSuccessDescription: z
.string()
.optional()
.describe('Sign-up success message'),
brazeCampaignCreationStatus: workflowStatusEnumSchema.describe(
'Braze campaign creation status',
),
ophanCampaignCreationStatus: workflowStatusEnumSchema
.optional()
.describe(
'Ophan campaign creation status',
),
signupPageCreationStatus: workflowStatusEnumSchema.describe(
'Sign up creation status',
),
tagCreationStatus: workflowStatusEnumSchema.describe('Tag creation status'),
});
/** NOT FINAL - this type a placeholder to test the data transformation structure */
export type NewsletterData = z.infer<typeof newsletterDataSchema>;
export function isNewsletterData(subject: unknown): subject is NewsletterData {