facturacionelectronicapy-ts-xmlgen
Version:
Genera el contenido del archivo XML del Documento electrónico exigido por la SET
275 lines (274 loc) • 11.2 kB
TypeScript
import { z } from 'zod';
import { IdentityDocumentCarrier } from '../../data/idDocsCarriers.table';
import { TransportType } from '../../data/transportTypes.table';
import { TransportModality } from '../../data/transportModalities.table';
import { VehicleIdentification } from '../../data/vehicleIdentifications.table';
import { TaxpayerNotTaxpayer } from '../../data/taxpayerNotTaxpayer.table';
import { TransportUpdateMotive } from '../../types/TransporteUpdateMotive';
export declare const TransportUpdateEventSchema: z.ZodEffects<z.ZodObject<{
cdc: z.ZodString;
motivo: z.ZodNativeEnum<typeof TransportUpdateMotive>;
entrega: z.ZodEffects<z.ZodObject<{
departamento: z.ZodOptional<z.ZodNativeEnum<typeof import("../../types").Department>>;
distrito: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
ciudad: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
direccion: z.ZodOptional<z.ZodString>;
numeroCasa: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
direccionComplementaria1: z.ZodOptional<z.ZodString>;
tipoTransporte: z.ZodOptional<z.ZodNativeEnum<typeof TransportType>>;
modalidadTransporte: z.ZodOptional<z.ZodNativeEnum<typeof TransportModality>>;
vehiculo: z.ZodObject<{
tipo: z.ZodOptional<z.ZodString>;
marca: z.ZodOptional<z.ZodString>;
documentoTipo: z.ZodOptional<z.ZodNativeEnum<typeof VehicleIdentification>>;
documentoNumero: z.ZodOptional<z.ZodString>;
numeroMatricula: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
tipo?: string | undefined;
documentoTipo?: VehicleIdentification | undefined;
documentoNumero?: string | undefined;
marca?: string | undefined;
numeroMatricula?: string | undefined;
}, {
tipo?: string | undefined;
documentoTipo?: VehicleIdentification | undefined;
documentoNumero?: string | undefined;
marca?: string | undefined;
numeroMatricula?: string | undefined;
}>;
}, "strip", z.ZodTypeAny, {
vehiculo: {
tipo?: string | undefined;
documentoTipo?: VehicleIdentification | undefined;
documentoNumero?: string | undefined;
marca?: string | undefined;
numeroMatricula?: string | undefined;
};
distrito?: number | undefined;
departamento?: import("../../types").Department | undefined;
ciudad?: number | undefined;
direccion?: string | undefined;
numeroCasa?: number | undefined;
direccionComplementaria1?: string | undefined;
tipoTransporte?: TransportType | undefined;
modalidadTransporte?: TransportModality | undefined;
}, {
vehiculo: {
tipo?: string | undefined;
documentoTipo?: VehicleIdentification | undefined;
documentoNumero?: string | undefined;
marca?: string | undefined;
numeroMatricula?: string | undefined;
};
distrito?: number | undefined;
departamento?: import("../../types").Department | undefined;
ciudad?: number | undefined;
direccion?: string | undefined;
numeroCasa?: number | undefined;
direccionComplementaria1?: string | undefined;
tipoTransporte?: TransportType | undefined;
modalidadTransporte?: TransportModality | undefined;
}>, {
vehiculo: {
tipo?: string | undefined;
documentoTipo?: VehicleIdentification | undefined;
documentoNumero?: string | undefined;
marca?: string | undefined;
numeroMatricula?: string | undefined;
};
distrito?: number | undefined;
departamento?: import("../../types").Department | undefined;
ciudad?: number | undefined;
direccion?: string | undefined;
numeroCasa?: number | undefined;
direccionComplementaria1?: string | undefined;
tipoTransporte?: TransportType | undefined;
modalidadTransporte?: TransportModality | undefined;
}, {
vehiculo: {
tipo?: string | undefined;
documentoTipo?: VehicleIdentification | undefined;
documentoNumero?: string | undefined;
marca?: string | undefined;
numeroMatricula?: string | undefined;
};
distrito?: number | undefined;
departamento?: import("../../types").Department | undefined;
ciudad?: number | undefined;
direccion?: string | undefined;
numeroCasa?: number | undefined;
direccionComplementaria1?: string | undefined;
tipoTransporte?: TransportType | undefined;
modalidadTransporte?: TransportModality | undefined;
}>;
transportista: z.ZodObject<{
chofer: z.ZodOptional<z.ZodObject<{
nombre: z.ZodString;
documentoNumero: z.ZodString;
}, "strip", z.ZodTypeAny, {
documentoNumero: string;
nombre: string;
}, {
documentoNumero: string;
nombre: string;
}>>;
contribuyente: z.ZodOptional<z.ZodEffects<z.ZodBoolean, TaxpayerNotTaxpayer, boolean>>;
ruc: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
nombre: z.ZodOptional<z.ZodString>;
documentoTipo: z.ZodOptional<z.ZodNativeEnum<typeof IdentityDocumentCarrier>>;
documentoNumero: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
documentoTipo?: IdentityDocumentCarrier | undefined;
documentoNumero?: string | undefined;
nombre?: string | undefined;
contribuyente?: TaxpayerNotTaxpayer | undefined;
ruc?: string | undefined;
chofer?: {
documentoNumero: string;
nombre: string;
} | undefined;
}, {
documentoTipo?: IdentityDocumentCarrier | undefined;
documentoNumero?: string | undefined;
nombre?: string | undefined;
contribuyente?: boolean | undefined;
ruc?: string | undefined;
chofer?: {
documentoNumero: string;
nombre: string;
} | undefined;
}>;
}, "strip", z.ZodTypeAny, {
cdc: string;
motivo: TransportUpdateMotive;
entrega: {
vehiculo: {
tipo?: string | undefined;
documentoTipo?: VehicleIdentification | undefined;
documentoNumero?: string | undefined;
marca?: string | undefined;
numeroMatricula?: string | undefined;
};
distrito?: number | undefined;
departamento?: import("../../types").Department | undefined;
ciudad?: number | undefined;
direccion?: string | undefined;
numeroCasa?: number | undefined;
direccionComplementaria1?: string | undefined;
tipoTransporte?: TransportType | undefined;
modalidadTransporte?: TransportModality | undefined;
};
transportista: {
documentoTipo?: IdentityDocumentCarrier | undefined;
documentoNumero?: string | undefined;
nombre?: string | undefined;
contribuyente?: TaxpayerNotTaxpayer | undefined;
ruc?: string | undefined;
chofer?: {
documentoNumero: string;
nombre: string;
} | undefined;
};
}, {
cdc: string;
motivo: TransportUpdateMotive;
entrega: {
vehiculo: {
tipo?: string | undefined;
documentoTipo?: VehicleIdentification | undefined;
documentoNumero?: string | undefined;
marca?: string | undefined;
numeroMatricula?: string | undefined;
};
distrito?: number | undefined;
departamento?: import("../../types").Department | undefined;
ciudad?: number | undefined;
direccion?: string | undefined;
numeroCasa?: number | undefined;
direccionComplementaria1?: string | undefined;
tipoTransporte?: TransportType | undefined;
modalidadTransporte?: TransportModality | undefined;
};
transportista: {
documentoTipo?: IdentityDocumentCarrier | undefined;
documentoNumero?: string | undefined;
nombre?: string | undefined;
contribuyente?: boolean | undefined;
ruc?: string | undefined;
chofer?: {
documentoNumero: string;
nombre: string;
} | undefined;
};
}>, {
entrega: {
descripcionDepartamento: string | undefined;
descripcionDistrito: string | undefined;
descripcionCiudad: string | undefined;
descripcionTipoTransporte: string | undefined;
descripcionModalidadTransporte: string | undefined;
vehiculo: {
tipo?: string | undefined;
documentoTipo?: VehicleIdentification | undefined;
documentoNumero?: string | undefined;
marca?: string | undefined;
numeroMatricula?: string | undefined;
};
distrito?: number | undefined;
departamento?: import("../../types").Department | undefined;
ciudad?: number | undefined;
direccion?: string | undefined;
numeroCasa?: number | undefined;
direccionComplementaria1?: string | undefined;
tipoTransporte?: TransportType | undefined;
modalidadTransporte?: TransportModality | undefined;
};
transportista: {
rucID: string | undefined;
rucDV: string | undefined;
descripcionTipoDocumento: string | undefined;
chofer: {
documentoNumero?: string | undefined;
nombre?: string | undefined;
};
documentoTipo?: IdentityDocumentCarrier | undefined;
documentoNumero?: string | undefined;
nombre?: string | undefined;
contribuyente?: TaxpayerNotTaxpayer | undefined;
ruc?: string | undefined;
};
cdc: string;
motivo: TransportUpdateMotive;
}, {
cdc: string;
motivo: TransportUpdateMotive;
entrega: {
vehiculo: {
tipo?: string | undefined;
documentoTipo?: VehicleIdentification | undefined;
documentoNumero?: string | undefined;
marca?: string | undefined;
numeroMatricula?: string | undefined;
};
distrito?: number | undefined;
departamento?: import("../../types").Department | undefined;
ciudad?: number | undefined;
direccion?: string | undefined;
numeroCasa?: number | undefined;
direccionComplementaria1?: string | undefined;
tipoTransporte?: TransportType | undefined;
modalidadTransporte?: TransportModality | undefined;
};
transportista: {
documentoTipo?: IdentityDocumentCarrier | undefined;
documentoNumero?: string | undefined;
nombre?: string | undefined;
contribuyente?: boolean | undefined;
ruc?: string | undefined;
chofer?: {
documentoNumero: string;
nombre: string;
} | undefined;
};
}>;
export type TransportUpdateEventInput = z.input<typeof TransportUpdateEventSchema>;