/* * 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"; import { RedirectDto, RedirectDto$inboundSchema } from "./redirectdto.js"; export type InboxActionDto = { /** * Label of the action button */ label: string; /** * Whether the action has been completed */ isCompleted: boolean; /** * Redirect configuration for the action */ redirect?: RedirectDto | undefined; }; /** @internal */ export const InboxActionDto$inboundSchema: z.ZodType< InboxActionDto, z.ZodTypeDef, unknown > = z.object({ label: z.string(), isCompleted: z.boolean(), redirect: RedirectDto$inboundSchema.optional(), }); export function inboxActionDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => InboxActionDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InboxActionDto' from JSON`, ); }