"use strict";function fetchPatchNotes(e){return new Promise((t,a)=>{https_1.default.get(e,e=>{if(200!==e.statusCode){a(new Error(`HTTP ${e.statusCode}`));return}let r="";e.on("data",e=>{r+=e});e.on("end",()=>{try{t(JSON.parse(r))}catch(e){a(new Error("Invalid JSON response"))}});e.on("error",a)}).on("error",a)})}var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const https_1=__importDefault(require("https"));exports.metadata={summary:"Fetch patch notes for a specific product",operationId:"getProductPatchNotes",tags:["Admin","System"],parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string"},description:"Product ID or type name (e.g., 'core', 'ai-investment', '35599184')"}],responses:{200:{description:"Product patch notes fetched successfully"}},permission:"access.admin"};const DOCS_BASE_URL="https://docs.mashdiv.com/patch-notes",PRODUCT_ID_TO_TYPE={35599184:"core",35988984:"ai-investment",61007981:"ai-market-maker",40071914:"ecosystem",36668679:"forex",36120046:"ico",37434481:"staking",39166202:"faq",44624493:"ecommerce",37548018:"wallet-connect",44593497:"p2p",36667808:"affiliate",45613491:"mailwizard",46094641:"futures",60962133:"nft",61043226:"gateway",61107157:"copy-trading",612e5:"chart-engine",37179816:"exchange-kucoin",38650585:"exchange-binance",54510301:"exchange-xt",54514052:"blockchain-solana",54577641:"blockchain-tron",54578959:"blockchain-monero",55715370:"blockchain-ton"};exports.default=async e=>{const{productId:t}=e.params,a=PRODUCT_ID_TO_TYPE[t]||t;try{const e=`${DOCS_BASE_URL}/${a}.json`;return await fetchPatchNotes(e)}catch(e){return null}};