"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const db_1=require("@b/db"),query_1=require("@b/utils/query"),constants_1=require("@b/utils/constants"),utils_1=require("./utils");exports.metadata={summary:"Fetches a list of Admin Profits",operationId:"getAdminProfits",tags:["Admin","Finance","Profits"],responses:{200:{description:"List of Admin Profits",content:{"application/json":{schema:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:utils_1.adminProfitSchema}},pagination:constants_1.paginationSchema}}}}}},requiresAuth:!0,permission:"view.admin.profit"};exports.default=async e=>{const{query:t}=e;return await(0,query_1.getFiltered)({model:db_1.models.adminProfit,query:t,numericFields:["amount"],excludeFields:[],paranoid:!1})};