/* * 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 DeleteActionRequest = { /** * The ID of the action to delete. */ 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; }; /** * Action deleted successfully */ export type DeleteActionResponse = { /** * Whether the action was deleted. */ deleted: boolean; /** * The ID of the action. */ id: string; }; /** @internal */ export type DeleteActionRequest$Outbound = { id: string; projectId?: string | undefined; }; /** @internal */ export const DeleteActionRequest$outboundSchema: z.ZodMiniType< DeleteActionRequest$Outbound, DeleteActionRequest > = z.object({ id: z.string(), projectId: z.optional(z.string()), }); export function deleteActionRequestToJSON( deleteActionRequest: DeleteActionRequest, ): string { return JSON.stringify( DeleteActionRequest$outboundSchema.parse(deleteActionRequest), ); } /** @internal */ export const DeleteActionResponse$inboundSchema: z.ZodMiniType< DeleteActionResponse, unknown > = z.object({ deleted: types.boolean(), id: types.string(), }); export function deleteActionResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteActionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteActionResponse' from JSON`, ); }