"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 binary orders",operationId:"bulkUpdateBinaryOrderStatus",tags:["Admin","Binary Orders"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",description:"Array of binary order IDs to update",items:{type:"string"}},status:{type:"string",description:"New status to apply to the binary orders",enum:["PENDING","WIN","LOSS","DRAW"]}},required:["ids","status"]}}}},responses:(0,query_1.updateRecordResponses)("Binary Order"),requiresAuth:!0,permission:"edit.binary.order",logModule:"ADMIN_FIN",logTitle:"Bulk Update Binary Order Status"};exports.default=async e=>{const{body:t,ctx:r}=e,{ids:s,status:a}=t;null==r||r.step("Update Binary Order Status...");const u=await(0,query_1.updateStatus)("binaryOrder",s,a);null==r||r.success("Bulk Update Binary Order Status completed successfully");return u};