/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdk-validation-error.js"; export type DeleteAuthorRequest = { /** * Either external ID or the ID assigned by moderation API. */ id: string; /** * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. */ projectId?: string | undefined; }; /** * Successful response */ export type DeleteAuthorResponse = { success: boolean; }; /** @internal */ export type DeleteAuthorRequest$Outbound = { id: string; projectId?: string | undefined; }; /** @internal */ export const DeleteAuthorRequest$outboundSchema: z.ZodMiniType< DeleteAuthorRequest$Outbound, DeleteAuthorRequest > = z.object({ id: z.string(), projectId: z.optional(z.string()), }); export function deleteAuthorRequestToJSON( deleteAuthorRequest: DeleteAuthorRequest, ): string { return JSON.stringify( DeleteAuthorRequest$outboundSchema.parse(deleteAuthorRequest), ); } /** @internal */ export const DeleteAuthorResponse$inboundSchema: z.ZodMiniType< DeleteAuthorResponse, unknown > = z.object({ success: types.boolean(), }); export function deleteAuthorResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteAuthorResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteAuthorResponse' from JSON`, ); }