2025-11-11 18:57:04 +00:00
|
|
|
import type { ArrayElement } from "@repo/rdx-utils";
|
|
|
|
|
import type { z } from "zod/v4";
|
2025-09-24 15:09:37 +00:00
|
|
|
|
2025-11-13 11:49:36 +00:00
|
|
|
import { GetIssueInvoiceByIdResponseSchema, ListIssueInvoicesResponseSchema } from "../../common";
|
2025-09-24 15:09:37 +00:00
|
|
|
|
2025-11-13 11:49:36 +00:00
|
|
|
export const IssueInvoiceSchema = GetIssueInvoiceByIdResponseSchema.omit({
|
2025-09-24 15:09:37 +00:00
|
|
|
metadata: true,
|
|
|
|
|
});
|
2025-10-02 16:30:46 +00:00
|
|
|
|
2025-11-13 11:49:36 +00:00
|
|
|
export type IssueInvoice = z.infer<typeof IssueInvoiceSchema>;
|
|
|
|
|
export type IssueInvoiceRecipient = IssueInvoice["recipient"];
|
|
|
|
|
export type IssueInvoiceItem = ArrayElement<IssueInvoice["items"]>;
|
2025-09-24 15:09:37 +00:00
|
|
|
|
2025-10-02 16:30:46 +00:00
|
|
|
// Resultado de consulta con criteria (paginado, etc.)
|
2025-11-13 11:49:36 +00:00
|
|
|
export const IssueInvoicesPageSchema = ListIssueInvoicesResponseSchema.omit({
|
2025-10-18 19:57:52 +00:00
|
|
|
metadata: true,
|
|
|
|
|
});
|
|
|
|
|
|
2025-11-13 11:49:36 +00:00
|
|
|
//export type PaginatedResponse = z.infer<typeof PaginationSchema>;
|
|
|
|
|
//export type CustomerInvoicesPage = z.infer<typeof CustomerInvoicesPageSchema>;
|
2025-09-24 15:09:37 +00:00
|
|
|
|
2025-10-02 16:30:46 +00:00
|
|
|
// Ítem simplificado dentro del listado (no toda la entidad)
|
2025-11-13 11:49:36 +00:00
|
|
|
//export type CustomerInvoiceSummary = Omit<ArrayElement<CustomerInvoicesPage["items"]>, "metadata">;
|