"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query");exports.metadata={summary:"Bulk deletes API keys by IDs",operationId:"bulkDeleteApiKeys",tags:["Admin","API Keys"],logModule:"ADMIN_API",logTitle:"Bulk delete APIs",parameters:(0,query_1.commonBulkDeleteParams)("API Keys"),requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Array of API key IDs to delete"}},required:["ids"]}}}},responses:(0,query_1.commonBulkDeleteResponses)("API Keys"),requiresAuth:!0,permission:"delete.api.key"};exports.default=async e=>{const{body:s,query:t,ctx:r}=e,{ids:l}=s;null==r||r.step("Validating API key IDs");null==r||r.step(`Deleting ${l.length} API keys`);const o=await(0,query_1.handleBulkDelete)({model:"apiKey",ids:l,query:t});null==r||r.success();return o};