"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query"),utils_1=require("../utils");exports.metadata={summary:"Updates an existing exchange order",operationId:"updateExchangeOrder",tags:["Admin","Exchange Orders"],parameters:[{index:0,name:"id",in:"path",description:"The ID of the exchange order to update",required:!0,schema:{type:"string"}}],requestBody:{required:!0,description:"Updated data for the exchange order",content:{"application/json":{schema:utils_1.exchangeOrderUpdateSchema}}},responses:(0,query_1.updateRecordResponses)("Exchange Order"),requiresAuth:!0,permission:"edit.exchange.order",logModule:"ADMIN_FIN",logTitle:"Update Exchange Order"};exports.default=async e=>{const{body:r,params:t,ctx:a}=e,{id:d}=t,{referenceId:s,status:n,side:i,price:o,amount:u,fee:c,feeCurrency:p}=r;return await(0,query_1.updateRecord)("exchangeOrder",d,{referenceId:s,status:n,side:i,price:o,amount:u,fee:c,feeCurrency:p})};