/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type PushControlDto = { /** * JSONLogic filter conditions for conditionally skipping the step execution. Supports complex logical operations with AND, OR, and comparison operators. See https://jsonlogic.com/ for full typing reference. */ skip?: { [k: string]: any } | undefined; /** * Subject/title of the push notification. */ subject?: string | undefined; /** * Body content of the push notification. */ body?: string | undefined; }; /** @internal */ export const PushControlDto$inboundSchema: z.ZodType< PushControlDto, z.ZodTypeDef, unknown > = z.object({ skip: z.record(z.any()).optional(), subject: z.string().optional(), body: z.string().optional(), }); /** @internal */ export type PushControlDto$Outbound = { skip?: { [k: string]: any } | undefined; subject?: string | undefined; body?: string | undefined; }; /** @internal */ export const PushControlDto$outboundSchema: z.ZodType< PushControlDto$Outbound, z.ZodTypeDef, PushControlDto > = z.object({ skip: z.record(z.any()).optional(), subject: z.string().optional(), body: z.string().optional(), }); export function pushControlDtoToJSON(pushControlDto: PushControlDto): string { return JSON.stringify(PushControlDto$outboundSchema.parse(pushControlDto)); } export function pushControlDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PushControlDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PushControlDto' from JSON`, ); }