/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type IndexerCategoryInput = { id?: number | undefined; name?: string | null | undefined; description?: string | null | undefined; }; /** @internal */ export const IndexerCategoryInput$inboundSchema: z.ZodType< IndexerCategoryInput, z.ZodTypeDef, unknown > = z.object({ id: z.number().int().optional(), name: z.nullable(z.string()).optional(), description: z.nullable(z.string()).optional(), }); /** @internal */ export type IndexerCategoryInput$Outbound = { id?: number | undefined; name?: string | null | undefined; description?: string | null | undefined; }; /** @internal */ export const IndexerCategoryInput$outboundSchema: z.ZodType< IndexerCategoryInput$Outbound, z.ZodTypeDef, IndexerCategoryInput > = z.object({ id: z.number().int().optional(), name: z.nullable(z.string()).optional(), description: z.nullable(z.string()).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IndexerCategoryInput$ { /** @deprecated use `IndexerCategoryInput$inboundSchema` instead. */ export const inboundSchema = IndexerCategoryInput$inboundSchema; /** @deprecated use `IndexerCategoryInput$outboundSchema` instead. */ export const outboundSchema = IndexerCategoryInput$outboundSchema; /** @deprecated use `IndexerCategoryInput$Outbound` instead. */ export type Outbound = IndexerCategoryInput$Outbound; } export function indexerCategoryInputToJSON( indexerCategoryInput: IndexerCategoryInput, ): string { return JSON.stringify( IndexerCategoryInput$outboundSchema.parse(indexerCategoryInput), ); } export function indexerCategoryInputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IndexerCategoryInput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IndexerCategoryInput' from JSON`, ); }