/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The type of the destination. */ export const GetDestinationTypeSchemaType = { Webhook: "webhook", AwsSqs: "aws_sqs", Rabbitmq: "rabbitmq", Hookdeck: "hookdeck", AwsKinesis: "aws_kinesis", AzureServicebus: "azure_servicebus", AwsS3: "aws_s3", GcpPubsub: "gcp_pubsub", Kafka: "kafka", } as const; /** * The type of the destination. */ export type GetDestinationTypeSchemaType = ClosedEnum< typeof GetDestinationTypeSchemaType >; export type GetDestinationTypeSchemaRequest = { /** * The type of the destination. */ type: GetDestinationTypeSchemaType; }; /** @internal */ export const GetDestinationTypeSchemaType$inboundSchema: z.ZodNativeEnum< typeof GetDestinationTypeSchemaType > = z.nativeEnum(GetDestinationTypeSchemaType); /** @internal */ export const GetDestinationTypeSchemaType$outboundSchema: z.ZodNativeEnum< typeof GetDestinationTypeSchemaType > = GetDestinationTypeSchemaType$inboundSchema; /** @internal */ export const GetDestinationTypeSchemaRequest$inboundSchema: z.ZodType< GetDestinationTypeSchemaRequest, z.ZodTypeDef, unknown > = z.object({ type: GetDestinationTypeSchemaType$inboundSchema, }); /** @internal */ export type GetDestinationTypeSchemaRequest$Outbound = { type: string; }; /** @internal */ export const GetDestinationTypeSchemaRequest$outboundSchema: z.ZodType< GetDestinationTypeSchemaRequest$Outbound, z.ZodTypeDef, GetDestinationTypeSchemaRequest > = z.object({ type: GetDestinationTypeSchemaType$outboundSchema, }); export function getDestinationTypeSchemaRequestToJSON( getDestinationTypeSchemaRequest: GetDestinationTypeSchemaRequest, ): string { return JSON.stringify( GetDestinationTypeSchemaRequest$outboundSchema.parse( getDestinationTypeSchemaRequest, ), ); } export function getDestinationTypeSchemaRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetDestinationTypeSchemaRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDestinationTypeSchemaRequest' from JSON`, ); }