/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 7e42e08182dc */ import * as z from "zod/v3"; import { IndexingShortcut, IndexingShortcut$Outbound, IndexingShortcut$outboundSchema, } from "./indexingshortcut.js"; /** * Describes the request body of the /uploadshortcuts API call */ export type UploadShortcutsRequest = { /** * 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 shortcuts information */ shortcuts: Array; }; /** @internal */ export type UploadShortcutsRequest$Outbound = { uploadId: string; isFirstPage?: boolean | undefined; isLastPage?: boolean | undefined; forceRestartUpload?: boolean | undefined; shortcuts: Array; }; /** @internal */ export const UploadShortcutsRequest$outboundSchema: z.ZodType< UploadShortcutsRequest$Outbound, z.ZodTypeDef, UploadShortcutsRequest > = z.object({ uploadId: z.string(), isFirstPage: z.boolean().optional(), isLastPage: z.boolean().optional(), forceRestartUpload: z.boolean().optional(), shortcuts: z.array(IndexingShortcut$outboundSchema), }); export function uploadShortcutsRequestToJSON( uploadShortcutsRequest: UploadShortcutsRequest, ): string { return JSON.stringify( UploadShortcutsRequest$outboundSchema.parse(uploadShortcutsRequest), ); }