feat(documents): accept selected_custom_fields in document schemas
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,11 @@ export const CreateInvoiceSchema = z.object({
|
||||
// Rich-text CZ/EN "Obsah" sections rendered after the items on the PDF
|
||||
// (mirrors issued orders — shared DocumentSectionSchema, DB-aligned limits).
|
||||
sections: z.array(DocumentSectionSchema).optional(),
|
||||
// Positional indices of company custom fields to print on this document's PDF.
|
||||
selected_custom_fields: z
|
||||
.array(z.number().int().nonnegative())
|
||||
.max(200)
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export const UpdateInvoiceSchema = z.object({
|
||||
@@ -74,6 +79,10 @@ export const UpdateInvoiceSchema = z.object({
|
||||
paid_date: nullableIsoDateString,
|
||||
items: z.array(InvoiceItemSchema).optional(),
|
||||
sections: z.array(DocumentSectionSchema).optional(),
|
||||
selected_custom_fields: z
|
||||
.array(z.number().int().nonnegative())
|
||||
.max(200)
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export type CreateInvoiceInput = z.infer<typeof CreateInvoiceSchema>;
|
||||
|
||||
Reference in New Issue
Block a user