/* * 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 { lazySchema as lazySchema$ } from "../../lib/schemas.js"; import { PassThroughBody, PassThroughBody$Outbound, PassThroughBody$outboundSchema, } from "./passthroughbody.js"; export type UpdateFileRequest = { /** * The name of the file. */ name?: string | undefined; /** * Optional description of the file. */ description?: string | undefined; /** * The parent folder to create the new file within. This can be an ID or a path depending on the downstream folder. Please see the connector section below to see downstream specific gotchas. */ parentFolderId?: string | undefined; /** * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. */ passThrough?: Array | undefined; }; /** @internal */ export type UpdateFileRequest$Outbound = { name?: string | undefined; description?: string | undefined; parent_folder_id?: string | undefined; pass_through?: Array | undefined; }; /** @internal */ export const UpdateFileRequest$outboundSchema: z.ZodType< UpdateFileRequest$Outbound, z.ZodTypeDef, UpdateFileRequest > = /* @__PURE__ */ lazySchema$(() => z.object({ name: z.string().optional(), description: z.string().optional(), parentFolderId: z.string().optional(), passThrough: z.array(PassThroughBody$outboundSchema).optional(), }).transform((v) => { return remap$(v, { parentFolderId: "parent_folder_id", passThrough: "pass_through", }); }) ); export function updateFileRequestToJSON( updateFileRequest: UpdateFileRequest, ): string { return JSON.stringify( UpdateFileRequest$outboundSchema.parse(updateFileRequest), ); }