"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.exchangeOrderUpdateSchema=exports.orderSchema=void 0;const schema_1=require("@b/utils/schema"),id={...(0,schema_1.baseStringSchema)("ID of the exchange order"),nullable:!0},referenceId={...(0,schema_1.baseStringSchema)("Reference ID of the order"),nullable:!0},userId={...(0,schema_1.baseStringSchema)("User ID associated with the order"),nullable:!0},status={...(0,schema_1.baseStringSchema)("Current status of the order"),enum:["OPEN","CLOSED","CANCELLED"]},symbol=(0,schema_1.baseStringSchema)("Trading symbol of the order"),type={...(0,schema_1.baseStringSchema)("Type of the order (LIMIT, MARKET)"),enum:["LIMIT","MARKET"]},timeInForce={...(0,schema_1.baseStringSchema)("Time in Force for the order (GTC, IOC)"),enum:["GTC","IOC"]},side={...(0,schema_1.baseStringSchema)("Side of the order (BUY, SELL)"),enum:["BUY","SELL"]},price=(0,schema_1.baseNumberSchema)("Price at which the order was placed"),amount=(0,schema_1.baseNumberSchema)("Amount traded in the order"),fee=(0,schema_1.baseNumberSchema)("Transaction fee for the order"),feeCurrency=(0,schema_1.baseStringSchema)("Currency of the transaction fee"),user={type:"object",properties:{id:{type:"string",description:"User ID"},firstName:{...(0,schema_1.baseStringSchema)("User's first name"),nullable:!0},lastName:{...(0,schema_1.baseStringSchema)("User's last name"),nullable:!0},avatar:{...(0,schema_1.baseStringSchema)("User's avatar"),nullable:!0}},nullable:!0},baseExchangeOrderSchema={id:id,referenceId:referenceId,userId:userId,status:status,symbol:symbol,type:type,timeInForce:timeInForce,side:side,price:price,amount:amount,fee:fee,feeCurrency:feeCurrency,user:user};exports.orderSchema={...baseExchangeOrderSchema,id:{...(0,schema_1.baseStringSchema)("ID of the created exchange order"),nullable:!1}};exports.exchangeOrderUpdateSchema={type:"object",properties:{referenceId:referenceId,symbol:symbol,type:type,timeInForce:timeInForce,status:status,side:side,price:price,amount:amount,feeCurrency:feeCurrency,fee:fee},required:["referenceId","status","symbol","type","timeInForce","side","price","amount","fee","feeCurrency"]};