Admin Panel (Next.js): - Dashboard with stats - Users list with relationships (watches/watched_by) - User detail pages - Deployments list and detail pages - Devices, Orders, Subscriptions pages - OTP-based admin authentication Backend Optimizations: - Fixed N+1 query problem in admin APIs - Added pagination support - Added .range() and count support to Supabase wrapper - Optimized batch queries with lookup maps Database: - Added migrations for schema evolution - New tables: push_tokens, notification_settings - Updated access model iOS Build Scripts: - build-ios.sh, clear-apple-cache.sh - EAS configuration updates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
const fs = require('fs');
|
||
const data = JSON.parse(fs.readFileSync('/Users/sergei/Desktop/WellNuo/api/Wellnuo_API.postman_collection.json', 'utf8'));
|
||
|
||
const endpoints = [];
|
||
|
||
function extractEndpoints(items) {
|
||
for (const item of items) {
|
||
if (item.item) {
|
||
extractEndpoints(item.item);
|
||
} else if (item.request) {
|
||
const body = item.request.body?.urlencoded || [];
|
||
const funcParam = body.find(p => p.key === 'function');
|
||
const params = body.filter(p => p.key !== 'function').map(p => p.key);
|
||
|
||
endpoints.push({
|
||
name: item.name,
|
||
function: funcParam?.value || 'N/A',
|
||
method: item.request.method,
|
||
params: params
|
||
});
|
||
}
|
||
}
|
||
}
|
||
|
||
extractEndpoints(data.item);
|
||
|
||
console.log('# WellNuo API Endpoints\n');
|
||
console.log('| # | Endpoint Name | Function | Parameters |');
|
||
console.log('|---|---------------|----------|------------|');
|
||
|
||
endpoints.forEach((ep, i) => {
|
||
const paramsStr = ep.params.join(', ');
|
||
console.log(`| ${i+1} | ${ep.name} | \`${ep.function}\` | ${paramsStr} |`);
|
||
});
|
||
|
||
console.log(`\n**Всего endpoints: ${endpoints.length}**`);
|
||
|
||
// Save to file
|
||
const output = endpoints.map((ep, i) => ({
|
||
id: i + 1,
|
||
name: ep.name,
|
||
function: ep.function,
|
||
params: ep.params
|
||
}));
|
||
|
||
fs.writeFileSync('/Users/sergei/Desktop/WellNuo/api/endpoints-list.json', JSON.stringify(output, null, 2));
|
||
console.log('\nСохранено в endpoints-list.json');
|