import { z } from 'zod'; import { type APIClient, APIResponseSchema } from '@agentuity/api'; import { ProjectResponseError } from './util.ts'; export const ProjectDeleteRequestSchema = z .object({ ids: z.array(z.string()).describe('Array of project IDs to delete.') }) .describe('Request to delete one or more projects.'); export const ProjectDeleteResponseSchema = APIResponseSchema(z.array(z.string())); type ProjectDeleteRequest = z.infer; type ProjectDeleteResponse = z.infer; export async function projectDelete(client: APIClient, ...ids: string[]): Promise { const resp = await client.request( 'DELETE', '/cli/project', ProjectDeleteResponseSchema, { ids }, ProjectDeleteRequestSchema ); if (resp.success) { return resp.data; } throw new ProjectResponseError({ message: resp.message ?? 'failed to delete project' }); }