/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 290aa144444f */ 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 { UpdateType, UpdateType$inboundSchema } from "./updatetype.js"; export type DigestUpdate = { /** * List of URLs for similar updates that are grouped together and rendered as a single update. */ urls?: Array | undefined; /** * URL link to the content or document. */ url?: string | undefined; /** * Title or headline of the update. */ title?: string | undefined; /** * Name or identifier of the data source (e.g., slack, confluence, etc.). */ datasource?: string | undefined; /** * Brief summary or description of the update content. */ summary?: string | undefined; /** * Optional type classification for the update. */ type?: UpdateType | undefined; }; /** @internal */ export const DigestUpdate$inboundSchema: z.ZodType< DigestUpdate, z.ZodTypeDef, unknown > = z.object({ urls: z.array(z.string()).optional(), url: z.string().optional(), title: z.string().optional(), datasource: z.string().optional(), summary: z.string().optional(), type: UpdateType$inboundSchema.optional(), }); export function digestUpdateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DigestUpdate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DigestUpdate' from JSON`, ); }