import { z } from 'zod';
import { APIResponseSchemaNoData } from "../api.js";
import { OrgResponseError } from "./util.js";
export const OrgEnvDeleteRequestSchema = z.object({
    id: z.string().describe('the organization id'),
    env: z.array(z.string()).optional().describe('environment variable keys to delete'),
    secrets: z.array(z.string()).optional().describe('secret keys to delete'),
});
export const OrgEnvDeleteResponseSchema = APIResponseSchemaNoData();
/**
 * Delete environment variables and/or secrets from an organization.
 * Provide arrays of keys to delete.
 * Requires admin/owner role.
 */
export async function orgEnvDelete(client, request) {
    const { id, env, secrets } = request;
    const resp = await client.request('DELETE', `/cli/organization/${encodeURIComponent(id)}/env`, OrgEnvDeleteResponseSchema, {
        env,
        secrets,
    });
    if (!resp.success) {
        throw new OrgResponseError({ message: resp.message ?? 'failed to delete org env' });
    }
}
//# sourceMappingURL=env-delete.js.map