/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; /** * The breakdown of the report. Use `default` for no split. */ export const Aggregation = { Default: "default", Job: "job", Department: "department", Integration: "integration", } as const; /** * The breakdown of the report. Use `default` for no split. */ export type Aggregation = ClosedEnum; /** * A general ledger report entry in a bulk batch. */ export type BulkReportGeneralLedgerItem = { /** * UUID of the company to generate the report for. The partner must be mapped to this company. */ companyUuid: string; /** * Identifies this batch item as a general ledger report. */ reportType: "general_ledger"; /** * The UUID of the payroll to generate the general ledger for. */ payrollUuid: string; /** * The breakdown of the report. Use `default` for no split. */ aggregation: Aggregation; /** * The kind of integration set up for the company. Required when `aggregation` is `integration`; must be null otherwise. */ integrationType?: string | null | undefined; }; /** @internal */ export const Aggregation$outboundSchema: z.ZodNativeEnum = z .nativeEnum(Aggregation); /** @internal */ export type BulkReportGeneralLedgerItem$Outbound = { company_uuid: string; report_type: "general_ledger"; payroll_uuid: string; aggregation: string; integration_type?: string | null | undefined; }; /** @internal */ export const BulkReportGeneralLedgerItem$outboundSchema: z.ZodType< BulkReportGeneralLedgerItem$Outbound, z.ZodTypeDef, BulkReportGeneralLedgerItem > = z.object({ companyUuid: z.string(), reportType: z.literal("general_ledger"), payrollUuid: z.string(), aggregation: Aggregation$outboundSchema, integrationType: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { companyUuid: "company_uuid", reportType: "report_type", payrollUuid: "payroll_uuid", integrationType: "integration_type", }); }); export function bulkReportGeneralLedgerItemToJSON( bulkReportGeneralLedgerItem: BulkReportGeneralLedgerItem, ): string { return JSON.stringify( BulkReportGeneralLedgerItem$outboundSchema.parse( bulkReportGeneralLedgerItem, ), ); }