/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 3c13f601602c */ import * as z from "zod/v3"; import { EmployeeInfoDefinition, EmployeeInfoDefinition$Outbound, EmployeeInfoDefinition$outboundSchema, } from "./employeeinfodefinition.js"; /** * Describes the request body of the /bulkindexemployees API call */ export type BulkIndexEmployeesRequest = { /** * Unique id that must be used for this bulk upload instance */ uploadId: string; /** * true if this is the first page of the upload. Defaults to false */ isFirstPage?: boolean | undefined; /** * true if this is the last page of the upload. Defaults to false */ isLastPage?: boolean | undefined; /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ forceRestartUpload?: boolean | undefined; /** * Batch of employee information */ employees: Array; /** * True if older employee data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than 20%. This must only be set when `isLastPage = true` */ disableStaleDataDeletionCheck?: boolean | undefined; }; /** @internal */ export type BulkIndexEmployeesRequest$Outbound = { uploadId: string; isFirstPage?: boolean | undefined; isLastPage?: boolean | undefined; forceRestartUpload?: boolean | undefined; employees: Array; disableStaleDataDeletionCheck?: boolean | undefined; }; /** @internal */ export const BulkIndexEmployeesRequest$outboundSchema: z.ZodType< BulkIndexEmployeesRequest$Outbound, z.ZodTypeDef, BulkIndexEmployeesRequest > = z.object({ uploadId: z.string(), isFirstPage: z.boolean().optional(), isLastPage: z.boolean().optional(), forceRestartUpload: z.boolean().optional(), employees: z.array(EmployeeInfoDefinition$outboundSchema), disableStaleDataDeletionCheck: z.boolean().optional(), }); export function bulkIndexEmployeesRequestToJSON( bulkIndexEmployeesRequest: BulkIndexEmployeesRequest, ): string { return JSON.stringify( BulkIndexEmployeesRequest$outboundSchema.parse(bulkIndexEmployeesRequest), ); }