"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.depositUpdateSchema=void 0;const schema_1=require("@b/utils/schema"),depositStatus={...(0,schema_1.baseStringSchema)("Status of the deposit transaction"),enum:["PENDING","COMPLETED","FAILED","CANCELLED","REJECTED","EXPIRED"]},amount={...(0,schema_1.baseNumberSchema)("Deposit amount"),minimum:.01},fee={...(0,schema_1.baseNumberSchema)("Processing fee for the deposit"),minimum:0},description=(0,schema_1.baseStringSchema)("Description of the deposit transaction"),referenceId={...(0,schema_1.baseStringSchema)("Payment reference ID from the payment processor"),nullable:!0},referenceIdRequired={...(0,schema_1.baseStringSchema)("Payment reference ID from the payment processor"),minLength:1,nullable:!1},trxId={...(0,schema_1.baseStringSchema)("Transaction ID from the payment processor"),nullable:!0},metadata={type:"object",description:"Additional metadata for the deposit transaction",properties:{method:{...(0,schema_1.baseStringSchema)("Payment method used"),nullable:!0},message:{...(0,schema_1.baseStringSchema)("Admin message or notes"),nullable:!0}},nullable:!0,additionalProperties:!0};exports.depositUpdateSchema={type:"object",properties:{status:depositStatus,amount:amount,fee:fee,description:description,referenceId:referenceId,trxId:trxId,metadata:metadata},required:["status","amount","fee","description"],allOf:[{if:{properties:{status:{const:"COMPLETED"}}},then:{properties:{referenceId:referenceIdRequired},required:["status","amount","fee","description","referenceId"]}}]};