/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { smartUnion } from "../../types/smartUnion.js"; import { CustomerSubscriptionCancel, CustomerSubscriptionCancel$Outbound, CustomerSubscriptionCancel$outboundSchema, } from "./customersubscriptioncancel.js"; import { CustomerSubscriptionUpdateClear, CustomerSubscriptionUpdateClear$Outbound, CustomerSubscriptionUpdateClear$outboundSchema, } from "./customersubscriptionupdateclear.js"; import { CustomerSubscriptionUpdateProduct, CustomerSubscriptionUpdateProduct$Outbound, CustomerSubscriptionUpdateProduct$outboundSchema, } from "./customersubscriptionupdateproduct.js"; import { CustomerSubscriptionUpdateSeats, CustomerSubscriptionUpdateSeats$Outbound, CustomerSubscriptionUpdateSeats$outboundSchema, } from "./customersubscriptionupdateseats.js"; export type CustomerSubscriptionUpdate = | CustomerSubscriptionUpdateProduct | CustomerSubscriptionUpdateSeats | CustomerSubscriptionUpdateClear | CustomerSubscriptionCancel; /** @internal */ export type CustomerSubscriptionUpdate$Outbound = | CustomerSubscriptionUpdateProduct$Outbound | CustomerSubscriptionUpdateSeats$Outbound | CustomerSubscriptionUpdateClear$Outbound | CustomerSubscriptionCancel$Outbound; /** @internal */ export const CustomerSubscriptionUpdate$outboundSchema: z.ZodMiniType< CustomerSubscriptionUpdate$Outbound, CustomerSubscriptionUpdate > = smartUnion([ CustomerSubscriptionUpdateProduct$outboundSchema, CustomerSubscriptionUpdateSeats$outboundSchema, CustomerSubscriptionUpdateClear$outboundSchema, CustomerSubscriptionCancel$outboundSchema, ]); export function customerSubscriptionUpdateToJSON( customerSubscriptionUpdate: CustomerSubscriptionUpdate, ): string { return JSON.stringify( CustomerSubscriptionUpdate$outboundSchema.parse(customerSubscriptionUpdate), ); }