Accept post creation time in message contract

This commit is contained in:
jjbrunton committed 2026-08-09 14:43:43 +01:00
1 parent 92c54feedc
commit 5abac31c28
2 files changed
+2

No files matched your search

+1
View File
@@ -23,6 +23,7 @@ export const SentMessageSchema = z.strictObject({
postUrl: z.string().optional(), postUrl: z.string().optional(),
postImageUrl: z.string().optional(), postImageUrl: z.string().optional(),
postImageAnalysis: z.string().optional(), postImageAnalysis: z.string().optional(),
postCreatedAt: z.number().optional(),
owner: RedditAccountOwnerSchema.optional(), owner: RedditAccountOwnerSchema.optional(),
}); });
export const MessagesResponseSchema = z.array(SentMessageSchema); export const MessagesResponseSchema = z.array(SentMessageSchema);
@@ -96,6 +96,7 @@ describe('dashboard endpoint contracts', () => {
modelId: 'openai/gpt-5.2', modelId: 'openai/gpt-5.2',
selectionReason: 'exploit', selectionReason: 'exploit',
sourceType: 'image', sourceType: 'image',
postCreatedAt: 1_699_999_900_000,
}]).success).toBe(true); }]).success).toBe(true);
expect(SuccessfulExamplesResponseSchema.safeParse([{ expect(SuccessfulExamplesResponseSchema.safeParse([{
id: 1, id: 1,