/* * 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 BulkDeleteLinksRequest = { /** * Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored. */ linkIds: Array; }; /** * The deleted links count. */ export type BulkDeleteLinksResponseBody = { /** * The number of links deleted. */ deletedCount: number; }; /** @internal */ export type BulkDeleteLinksRequest$Outbound = { linkIds: Array; }; /** @internal */ export const BulkDeleteLinksRequest$outboundSchema: z.ZodType< BulkDeleteLinksRequest$Outbound, z.ZodTypeDef, BulkDeleteLinksRequest > = z.object({ linkIds: z.array(z.string()), }); export function bulkDeleteLinksRequestToJSON( bulkDeleteLinksRequest: BulkDeleteLinksRequest, ): string { return JSON.stringify( BulkDeleteLinksRequest$outboundSchema.parse(bulkDeleteLinksRequest), ); } /** @internal */ export const BulkDeleteLinksResponseBody$inboundSchema: z.ZodType< BulkDeleteLinksResponseBody, z.ZodTypeDef, unknown > = z.object({ deletedCount: z.number(), }); export function bulkDeleteLinksResponseBodyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BulkDeleteLinksResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BulkDeleteLinksResponseBody' from JSON`, ); }