@accounter/server
Version:
Accounter GraphQL server
36 lines (35 loc) • 1.76 kB
TypeScript
import { z } from 'zod';
import { AccountingMethod, AccountingSystem, AuditOpinionType, BusinessType, CurrencyType, IFRSReportingOption, ReportingMethod, YesNo } from '../types/index.js';
/**
* Zod schema for HeaderRecord
* Enforces strict validation based on the specification.
*/
export declare const headerSchema: z.ZodObject<{
taxFileNumber: z.ZodString;
taxYear: z.ZodString;
idNumber: z.ZodString;
vatFileNumber: z.ZodOptional<z.ZodString>;
withholdingTaxFileNumber: z.ZodOptional<z.ZodString>;
industryCode: z.ZodString;
businessDescription: z.ZodOptional<z.ZodString>;
businessType: z.ZodEnum<typeof BusinessType>;
reportingMethod: z.ZodEnum<typeof ReportingMethod>;
accountingMethod: z.ZodEnum<typeof AccountingMethod>;
accountingSystem: z.ZodEnum<typeof AccountingSystem>;
isPartnership: z.ZodOptional<z.ZodEnum<typeof YesNo>>;
includesProfitLoss: z.ZodEnum<typeof YesNo>;
includesTaxAdjustment: z.ZodEnum<typeof YesNo>;
includesBalanceSheet: z.ZodEnum<typeof YesNo>;
profitLossEntryCount: z.ZodOptional<z.ZodNumber>;
taxAdjustmentEntryCount: z.ZodOptional<z.ZodNumber>;
balanceSheetEntryCount: z.ZodOptional<z.ZodNumber>;
ifrsImplementationYear: z.ZodOptional<z.ZodString>;
ifrsReportingOption: z.ZodOptional<z.ZodEnum<typeof IFRSReportingOption>>;
softwareRegistrationNumber: z.ZodOptional<z.ZodString>;
partnershipCount: z.ZodOptional<z.ZodNumber>;
partnershipProfitShare: z.ZodOptional<z.ZodNumber>;
currencyType: z.ZodEnum<typeof CurrencyType>;
auditOpinionType: z.ZodOptional<z.ZodEnum<typeof AuditOpinionType>>;
amountsInThousands: z.ZodEnum<typeof YesNo>;
}, z.core.$strip>;
export type HeaderRecord = z.infer<typeof headerSchema>;