"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query");exports.metadata={summary:"Bulk updates the status of exchange orders",operationId:"bulkUpdateExchangeOrderStatus",tags:["Admin","Exchange Orders"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",description:"Array of exchange order IDs to update",items:{type:"string"}},status:{type:"string",description:"New status to apply to the exchange orders",enum:["OPEN","CLOSED","CANCELLED"]}},required:["ids","status"]}}}},responses:(0,query_1.updateRecordResponses)("Exchange Order"),requiresAuth:!0,permission:"edit.exchange.order",logModule:"ADMIN_FIN",logTitle:"Bulk Update Exchange Order Status"};exports.default=async e=>{const{body:t,ctx:s}=e,{ids:r,status:a}=t;null==s||s.step("Update Exchange Order Status...");const u=await(0,query_1.updateStatus)("exchangeOrder",r,a);null==s||s.success("Bulk Update Exchange Order Status completed successfully");return u};