/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { SmsControlDto, SmsControlDto$Outbound, SmsControlDto$outboundSchema, } from "./smscontroldto.js"; /** * Control values for the SMS step. */ export type SmsStepUpsertDtoControlValues = SmsControlDto | { [k: string]: any; }; export type SmsStepUpsertDto = { /** * Database identifier of the step. Used for updating the step. */ id?: string | undefined; /** * Unique identifier for the step */ stepId?: string | undefined; /** * Name of the step */ name: string; /** * Type of the step */ type: "sms"; /** * Control values for the SMS step. */ controlValues?: SmsControlDto | { [k: string]: any } | undefined; }; /** @internal */ export type SmsStepUpsertDtoControlValues$Outbound = SmsControlDto$Outbound | { [k: string]: any; }; /** @internal */ export const SmsStepUpsertDtoControlValues$outboundSchema: z.ZodType< SmsStepUpsertDtoControlValues$Outbound, z.ZodTypeDef, SmsStepUpsertDtoControlValues > = z.union([SmsControlDto$outboundSchema, z.record(z.any())]); export function smsStepUpsertDtoControlValuesToJSON( smsStepUpsertDtoControlValues: SmsStepUpsertDtoControlValues, ): string { return JSON.stringify( SmsStepUpsertDtoControlValues$outboundSchema.parse( smsStepUpsertDtoControlValues, ), ); } /** @internal */ export type SmsStepUpsertDto$Outbound = { _id?: string | undefined; stepId?: string | undefined; name: string; type: "sms"; controlValues?: SmsControlDto$Outbound | { [k: string]: any } | undefined; }; /** @internal */ export const SmsStepUpsertDto$outboundSchema: z.ZodType< SmsStepUpsertDto$Outbound, z.ZodTypeDef, SmsStepUpsertDto > = z.object({ id: z.string().optional(), stepId: z.string().optional(), name: z.string(), type: z.literal("sms"), controlValues: z.union([SmsControlDto$outboundSchema, z.record(z.any())]) .optional(), }).transform((v) => { return remap$(v, { id: "_id", }); }); export function smsStepUpsertDtoToJSON( smsStepUpsertDto: SmsStepUpsertDto, ): string { return JSON.stringify( SmsStepUpsertDto$outboundSchema.parse(smsStepUpsertDto), ); }