@accounter/shaam6111-generator
Version:
Fully typed application that generates, parses, and validates SHAAM 6111 tax reports.
90 lines (89 loc) • 3.92 kB
text/typescript
import { z } from 'zod';
import { AccountingMethod, AccountingSystem, AuditOpinionType, BusinessType, CurrencyType, IfrsReportingOption, ReportingMethod, YesNo } from '../types/report-data.cjs';
/**
* 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.ZodNativeEnum<typeof BusinessType>;
reportingMethod: z.ZodNativeEnum<typeof ReportingMethod>;
accountingMethod: z.ZodNativeEnum<typeof AccountingMethod>;
accountingSystem: z.ZodNativeEnum<typeof AccountingSystem>;
isPartnership: z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>;
includesProfitLoss: z.ZodNativeEnum<typeof YesNo>;
includesTaxAdjustment: z.ZodNativeEnum<typeof YesNo>;
includesBalanceSheet: z.ZodNativeEnum<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.ZodNativeEnum<typeof IfrsReportingOption>>;
softwareRegistrationNumber: z.ZodOptional<z.ZodString>;
partnershipCount: z.ZodOptional<z.ZodNumber>;
partnershipProfitShare: z.ZodOptional<z.ZodNumber>;
currencyType: z.ZodNativeEnum<typeof CurrencyType>;
auditOpinionType: z.ZodOptional<z.ZodNativeEnum<typeof AuditOpinionType>>;
amountsInThousands: z.ZodNativeEnum<typeof YesNo>;
}, "strip", z.ZodTypeAny, {
taxFileNumber: string;
taxYear: string;
idNumber: string;
industryCode: string;
businessType: BusinessType;
reportingMethod: ReportingMethod;
accountingMethod: AccountingMethod;
accountingSystem: AccountingSystem;
includesProfitLoss: YesNo;
includesTaxAdjustment: YesNo;
includesBalanceSheet: YesNo;
currencyType: CurrencyType;
amountsInThousands: YesNo;
vatFileNumber?: string | undefined;
withholdingTaxFileNumber?: string | undefined;
businessDescription?: string | undefined;
isPartnership?: YesNo | undefined;
profitLossEntryCount?: number | undefined;
taxAdjustmentEntryCount?: number | undefined;
balanceSheetEntryCount?: number | undefined;
ifrsImplementationYear?: string | undefined;
ifrsReportingOption?: IfrsReportingOption | undefined;
softwareRegistrationNumber?: string | undefined;
partnershipCount?: number | undefined;
partnershipProfitShare?: number | undefined;
auditOpinionType?: AuditOpinionType | undefined;
}, {
taxFileNumber: string;
taxYear: string;
idNumber: string;
industryCode: string;
businessType: BusinessType;
reportingMethod: ReportingMethod;
accountingMethod: AccountingMethod;
accountingSystem: AccountingSystem;
includesProfitLoss: YesNo;
includesTaxAdjustment: YesNo;
includesBalanceSheet: YesNo;
currencyType: CurrencyType;
amountsInThousands: YesNo;
vatFileNumber?: string | undefined;
withholdingTaxFileNumber?: string | undefined;
businessDescription?: string | undefined;
isPartnership?: YesNo | undefined;
profitLossEntryCount?: number | undefined;
taxAdjustmentEntryCount?: number | undefined;
balanceSheetEntryCount?: number | undefined;
ifrsImplementationYear?: string | undefined;
ifrsReportingOption?: IfrsReportingOption | undefined;
softwareRegistrationNumber?: string | undefined;
partnershipCount?: number | undefined;
partnershipProfitShare?: number | undefined;
auditOpinionType?: AuditOpinionType | undefined;
}>;
export type HeaderRecord = z.infer<typeof headerSchema>;