"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const db_1=require("@b/db"),error_1=require("@b/utils/error");exports.metadata={summary:"Get a KYC Level by ID",description:"Retrieves a specific KYC level by its ID.",operationId:"getKycLevelById",tags:["KYC","Levels"],parameters:[{index:0,name:"id",in:"path",description:"KYC level ID",required:!0,schema:{type:"string"}}],responses:{200:{description:"KYC level retrieved successfully."},404:{description:"KYC level not found."},500:{description:"Internal Server Error."}},permission:"view.kyc.level",requiresAuth:!0,logModule:"ADMIN_CRM",logTitle:"Get KYC level"};exports.default=async e=>{const{params:r,ctx:t}=e,{id:s}=r;null==t||t.step(`Fetching KYC level ${s}`);const l=await db_1.models.kycLevel.findByPk(s);if(!l)throw(0,error_1.createError)({statusCode:404,message:"KYC level not found"});null==t||t.success("KYC level retrieved successfully");return l};