Refactor pipeline task handling and UI flows
This commit is contained in:
@@ -132,10 +132,22 @@ export const followUpDraftSchema = z.object({
|
||||
goals: z.array(z.string()).nullable(),
|
||||
});
|
||||
|
||||
export const qualityReviewRevisedCopySchema = z.object({
|
||||
publicSummary: nonEmptyTextSchema,
|
||||
publicBody: nonEmptyTextSchema,
|
||||
emailSubject: nonEmptyTextSchema,
|
||||
emailBody: nonEmptyTextSchema,
|
||||
phoneScript: callScriptSchema,
|
||||
followUpDraft: followUpDraftSchema,
|
||||
});
|
||||
|
||||
export const qualityReviewSchema = z.object({
|
||||
isValid: z.boolean(),
|
||||
severity: z.enum(["ok", "warning", "unsafe"]),
|
||||
issues: z.array(z.string()),
|
||||
suggestions: z.array(z.string()),
|
||||
rewriteRequired: z.boolean(),
|
||||
revisedCopy: qualityReviewRevisedCopySchema.nullable(),
|
||||
notes: z.array(z.string()).nullable(),
|
||||
});
|
||||
|
||||
@@ -154,4 +166,5 @@ export type EmailDraft = z.infer<typeof emailDraftSchema>;
|
||||
export type EmailSubject = z.infer<typeof emailSubjectSchema>;
|
||||
export type CallScript = z.infer<typeof callScriptSchema>;
|
||||
export type FollowUpDraft = z.infer<typeof followUpDraftSchema>;
|
||||
export type QualityReviewRevisedCopy = z.infer<typeof qualityReviewRevisedCopySchema>;
|
||||
export type QualityReview = z.infer<typeof qualityReviewSchema>;
|
||||
|
||||
Reference in New Issue
Block a user