/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { FileType, FileType$inboundSchema } from "./filetype.js"; export type SharedLinkTarget = { /** * A unique identifier for an object. */ id: string; /** * The name of the file */ name?: string | null | undefined; /** * The type of resource. Could be file, folder or url */ type?: FileType | null | undefined; }; /** @internal */ export const SharedLinkTarget$inboundSchema: z.ZodType< SharedLinkTarget, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ id: types.string(), name: z.nullable(types.string()).optional(), type: z.nullable(FileType$inboundSchema).optional(), }) ); export function sharedLinkTargetFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SharedLinkTarget$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SharedLinkTarget' from JSON`, ); }