"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.transactionUpdateSchema=exports.transactionSchema=exports.baseTransactionSchema=void 0;const schema_1=require("@b/utils/schema"),id={...(0,schema_1.baseStringSchema)("ID of the transaction"),nullable:!0},type=(0,schema_1.baseStringSchema)("Type of the transaction (DEPOSIT, WITHDRAW, etc.)"),status={...(0,schema_1.baseStringSchema)("Current status of the transaction (PENDING, COMPLETED, etc.)"),enum:["PENDING","COMPLETED","FAILED","CANCELLED","REJECTED","EXPIRED"]},amount=(0,schema_1.baseNumberSchema)("Amount involved in the transaction"),fee=(0,schema_1.baseNumberSchema)("Fee associated with the transaction"),description=(0,schema_1.baseStringSchema)("Description of the transaction"),metadata={type:"object",description:"Additional metadata of the transaction",nullable:!0},referenceId={...(0,schema_1.baseStringSchema)("Reference ID of the transaction"),nullable:!0},trxId={...(0,schema_1.baseStringSchema)("Transaction ID from the payment processor"),nullable:!0};exports.baseTransactionSchema={id:id,type:type,status:status,amount:amount,fee:fee,description:description,metadata:metadata,referenceId:referenceId,trxId:trxId};exports.transactionSchema={...exports.baseTransactionSchema,id:{...id,nullable:!1},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},wallet:{type:"object",properties:{currency:{type:"string",description:"Currency of the wallet"},type:{type:"string",description:"Type of the wallet"}},nullable:!0}};exports.transactionUpdateSchema={type:"object",properties:{status:status,amount:amount,fee:fee,description:description,referenceId:referenceId,trxId:trxId,metadata:metadata},required:["status","amount"]};