import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The lifecycle status of the batch request itself. Terminal values are `completed` (processing finished — inspect `results` and `exclusions` for per-company outcomes) and `failed` (request failed; can be retried). This is distinct from the per-company `status` returned inside `results[]` and `exclusions[]`. */ export declare const PayrollDigestResultsStatus: { readonly Pending: "pending"; readonly Processing: "processing"; readonly Completed: "completed"; readonly Failed: "failed"; }; /** * The lifecycle status of the batch request itself. Terminal values are `completed` (processing finished — inspect `results` and `exclusions` for per-company outcomes) and `failed` (request failed; can be retried). This is distinct from the per-company `status` returned inside `results[]` and `exclusions[]`. */ export type PayrollDigestResultsStatus = ClosedEnum; /** * The type of entity this result represents. */ export declare const PayrollDigestResultsEntityType: { readonly Company: "company"; }; /** * The type of entity this result represents. */ export type PayrollDigestResultsEntityType = ClosedEnum; /** * The status of this company's digest computation. */ export declare const PayrollDigestResultsResultsStatus: { readonly Success: "success"; readonly PartialSuccess: "partial_success"; readonly Failed: "failed"; }; /** * The status of this company's digest computation. */ export type PayrollDigestResultsResultsStatus = ClosedEnum; export type Blockers = { /** * A machine-readable blocker key (e.g. `missing_bank_account`). */ type?: string | undefined; /** * Human-readable description of the blocker. */ description?: string | undefined; }; export type PayrollDigestResultsPayPeriod = { /** * First day of the pay period. */ startDate?: RFCDate | null | undefined; /** * Last day of the pay period. */ endDate?: RFCDate | null | undefined; /** * The date employees get paid. */ checkDate?: RFCDate | null | undefined; /** * The deadline to run payroll for this pay period. */ runPayrollBy?: RFCDate | null | undefined; }; export type PaySchedule = { /** * UUID of the pay schedule. */ uuid?: string | undefined; /** * Human-friendly pay frequency (e.g. "Every other week"). */ frequency?: string | undefined; /** * Custom name for the pay schedule, when set. */ customName?: string | null | undefined; }; /** * Pay totals. `null` when the payroll has not been calculated, or when the calculation is stale (the partner edited hours/earnings after the last calculation). */ export type PayrollDigestResultsTotals = { /** * Total amount debited from the company bank account (string-formatted decimal). */ totalDebitAmount?: string | undefined; /** * Total net pay across all employees on this payroll (string-formatted decimal). */ netPay?: string | undefined; /** * Total employer cost including taxes and benefits (string-formatted decimal). */ totalEmployerCost?: string | undefined; }; export type Payrolls = { /** * UUID of the payroll. `null` for upcoming pay periods that have not been started yet (the `payrolls` API has not yet created a payroll record). Once a payroll is created, subsequent digest requests will include the real `payroll_uuid`. */ payrollUuid?: string | null | undefined; /** * The type of payroll (e.g. `regular`, `new_hire`, `termination`, `transition`, `bonus`, `correction`). */ payrollType?: string | undefined; /** * Partner-facing display title for this payroll (e.g. "Run biweekly payroll"). */ displayTitle?: string | undefined; /** * Whether the company has auto-payroll enabled for this pay schedule. */ autoPayroll?: boolean | undefined; /** * The lifecycle status of the payroll (e.g. `ready_to_start`, `in_progress`, `submitted`, `completed`, `failed`). */ status?: string | undefined; payPeriod?: PayrollDigestResultsPayPeriod | undefined; paySchedule?: PaySchedule | null | undefined; /** * Pay totals. `null` when the payroll has not been calculated, or when the calculation is stale (the partner edited hours/earnings after the last calculation). */ totals?: PayrollDigestResultsTotals | null | undefined; }; export type PayrollDigestResultsResults = { /** * The index of this company in the original POST batch array. */ idx?: number | undefined; /** * The type of entity this result represents. */ entityType?: PayrollDigestResultsEntityType | undefined; /** * The UUID of the company. */ uuid?: string | undefined; /** * The legal/display name of the company. */ name?: string | undefined; /** * The status of this company's digest computation. */ status?: PayrollDigestResultsResultsStatus | undefined; /** * Reasons the company cannot currently run payroll. Applies to every payroll in this company's `payrolls` array — blockers are evaluated at the company level, not per payroll. Empty when there are no blockers. */ blockers?: Array | undefined; /** * Payrolls for this company within the digest date window (7 days past, 30–60 days future). May be empty. */ payrolls?: Array | undefined; }; /** * The type of entity this exclusion represents. */ export declare const PayrollDigestResultsExclusionsEntityType: { readonly Company: "company"; }; /** * The type of entity this exclusion represents. */ export type PayrollDigestResultsExclusionsEntityType = ClosedEnum; /** * The status of this company's digest computation. */ export declare const PayrollDigestResultsExclusionsStatus: { readonly Failed: "failed"; }; /** * The status of this company's digest computation. */ export type PayrollDigestResultsExclusionsStatus = ClosedEnum; /** * Machine-readable category for why the company was excluded. */ export declare const PayrollDigestResultsCategory: { readonly NotFound: "not_found"; readonly CompanyInactive: "company_inactive"; readonly Duplicate: "duplicate"; readonly InternalError: "internal_error"; }; /** * Machine-readable category for why the company was excluded. */ export type PayrollDigestResultsCategory = ClosedEnum; export type PayrollDigestResultsExclusions = { /** * The index of this company in the original POST batch array. */ idx?: number | undefined; /** * The type of entity this exclusion represents. */ entityType?: PayrollDigestResultsExclusionsEntityType | undefined; /** * The UUID of the excluded company. */ uuid?: string | undefined; /** * The status of this company's digest computation. */ status?: PayrollDigestResultsExclusionsStatus | undefined; /** * Machine-readable category for why the company was excluded. */ category?: PayrollDigestResultsCategory | undefined; /** * Human-readable explanation for the exclusion. */ message?: string | undefined; }; /** * A payroll digest batch with processing results. */ export type PayrollDigestResults = { /** * The unique identifier of the payroll digest batch. */ uuid: string; /** * The idempotency key provided when creating the batch. */ idempotencyKey: string; /** * The lifecycle status of the batch request itself. Terminal values are `completed` (processing finished — inspect `results` and `exclusions` for per-company outcomes) and `failed` (request failed; can be retried). This is distinct from the per-company `status` returned inside `results[]` and `exclusions[]`. */ status: PayrollDigestResultsStatus; /** * The timestamp when the batch was submitted. */ submittedAt: Date; /** * The timestamp when the batch processing completed. */ completedAt?: Date | null | undefined; /** * The number of companies submitted in the batch. */ submittedItems?: number | null | undefined; /** * The number of companies successfully processed. Only present once the batch reaches a terminal status. */ processedItems?: number | undefined; /** * The number of companies excluded from processing. Only present once the batch reaches a terminal status. */ excludedItems?: number | undefined; /** * Per-company results. Only present once the batch reaches a terminal status. Includes successfully processed companies (with their `payrolls` array, which may be empty when the company has no payrolls in the date window). */ results?: Array | undefined; /** * Companies that could not be processed. Only present once the batch reaches a terminal status. Every UUID submitted in the POST batch appears in exactly one of `results` or `exclusions`. */ exclusions?: Array | undefined; }; /** @internal */ export declare const PayrollDigestResultsStatus$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const PayrollDigestResultsEntityType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const PayrollDigestResultsResultsStatus$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Blockers$inboundSchema: z.ZodType; export declare function blockersFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PayrollDigestResultsPayPeriod$inboundSchema: z.ZodType; export declare function payrollDigestResultsPayPeriodFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PaySchedule$inboundSchema: z.ZodType; export declare function payScheduleFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PayrollDigestResultsTotals$inboundSchema: z.ZodType; export declare function payrollDigestResultsTotalsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Payrolls$inboundSchema: z.ZodType; export declare function payrollsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PayrollDigestResultsResults$inboundSchema: z.ZodType; export declare function payrollDigestResultsResultsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PayrollDigestResultsExclusionsEntityType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const PayrollDigestResultsExclusionsStatus$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const PayrollDigestResultsCategory$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const PayrollDigestResultsExclusions$inboundSchema: z.ZodType; export declare function payrollDigestResultsExclusionsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PayrollDigestResults$inboundSchema: z.ZodType; export declare function payrollDigestResultsFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=payrolldigestresults.d.ts.map