/* * 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 { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Information about the payroll's status and expected dates */ export type PayrollPayrollStatusMetaType = { /** * true if the payroll may be cancelled. */ cancellable?: boolean | undefined; /** * The date an employee will be paid if the payroll is submitted now. */ expectedCheckDate?: string | undefined; /** * The normal check date for the associated pay period. */ initialCheckDate?: string | undefined; /** * The time the employer's account will be debited if the payroll is submitted now. */ expectedDebitTime?: string | undefined; /** * expected_check_date > initial_check_date. */ payrollLate?: boolean | undefined; /** * Payroll must be submitted at or before this time to avoid late payroll. */ initialDebitCutoffTime?: string | undefined; }; /** @internal */ export const PayrollPayrollStatusMetaType$inboundSchema: z.ZodType< PayrollPayrollStatusMetaType, z.ZodTypeDef, unknown > = z.object({ cancellable: z.boolean().optional(), expected_check_date: z.string().optional(), initial_check_date: z.string().optional(), expected_debit_time: z.string().optional(), payroll_late: z.boolean().optional(), initial_debit_cutoff_time: z.string().optional(), }).transform((v) => { return remap$(v, { "expected_check_date": "expectedCheckDate", "initial_check_date": "initialCheckDate", "expected_debit_time": "expectedDebitTime", "payroll_late": "payrollLate", "initial_debit_cutoff_time": "initialDebitCutoffTime", }); }); export function payrollPayrollStatusMetaTypeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PayrollPayrollStatusMetaType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayrollPayrollStatusMetaType' from JSON`, ); }