aiconfigtargetingvariationjson.ts•2.05 kB
/*
* 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 AIConfigTargetingVariationJSON = {};
/** @internal */
export const AIConfigTargetingVariationJSON$inboundSchema: z.ZodType<
AIConfigTargetingVariationJSON,
z.ZodTypeDef,
unknown
> = z.object({});
/** @internal */
export type AIConfigTargetingVariationJSON$Outbound = {};
/** @internal */
export const AIConfigTargetingVariationJSON$outboundSchema: z.ZodType<
AIConfigTargetingVariationJSON$Outbound,
z.ZodTypeDef,
AIConfigTargetingVariationJSON
> = z.object({});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace AIConfigTargetingVariationJSON$ {
/** @deprecated use `AIConfigTargetingVariationJSON$inboundSchema` instead. */
export const inboundSchema = AIConfigTargetingVariationJSON$inboundSchema;
/** @deprecated use `AIConfigTargetingVariationJSON$outboundSchema` instead. */
export const outboundSchema = AIConfigTargetingVariationJSON$outboundSchema;
/** @deprecated use `AIConfigTargetingVariationJSON$Outbound` instead. */
export type Outbound = AIConfigTargetingVariationJSON$Outbound;
}
export function aiConfigTargetingVariationJSONToJSON(
aiConfigTargetingVariationJSON: AIConfigTargetingVariationJSON,
): string {
return JSON.stringify(
AIConfigTargetingVariationJSON$outboundSchema.parse(
aiConfigTargetingVariationJSON,
),
);
}
export function aiConfigTargetingVariationJSONFromJSON(
jsonString: string,
): SafeParseResult<AIConfigTargetingVariationJSON, SDKValidationError> {
return safeParse(
jsonString,
(x) => AIConfigTargetingVariationJSON$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'AIConfigTargetingVariationJSON' from JSON`,
);
}