/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the chunking_strategy concept was introduced in the API. */ export type OtherChunkingStrategy = { /** * Always 'other'. */ type: "other"; }; /** @internal */ export const OtherChunkingStrategy$inboundSchema: z.ZodType< OtherChunkingStrategy, z.ZodTypeDef, unknown > = z.object({ type: z.literal("other"), }); /** @internal */ export type OtherChunkingStrategy$Outbound = { type: "other"; }; /** @internal */ export const OtherChunkingStrategy$outboundSchema: z.ZodType< OtherChunkingStrategy$Outbound, z.ZodTypeDef, OtherChunkingStrategy > = z.object({ type: z.literal("other"), }); export function otherChunkingStrategyToJSON( otherChunkingStrategy: OtherChunkingStrategy, ): string { return JSON.stringify( OtherChunkingStrategy$outboundSchema.parse(otherChunkingStrategy), ); } export function otherChunkingStrategyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OtherChunkingStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OtherChunkingStrategy' from JSON`, ); }