feat(swagger): add Swagger UI for API documentation
* Create index.html for Swagger UI integration * Link to Swagger UI CSS and JS from CDN * Configure Swagger UI to load API specification from api.json
This commit is contained in:
@@ -131,65 +131,6 @@
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.endpoints {
|
||||
background: #f8f9fa;
|
||||
border-radius: 10px;
|
||||
padding: 30px;
|
||||
text-align: left;
|
||||
animation: fadeInUp 0.8s ease 1s both;
|
||||
}
|
||||
|
||||
.endpoints h2 {
|
||||
color: #1a237e;
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.endpoint-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.endpoint-group h3 {
|
||||
color: #1e88e5;
|
||||
font-size: 1em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.endpoint {
|
||||
background: white;
|
||||
padding: 12px 15px;
|
||||
margin-bottom: 8px;
|
||||
border-radius: 6px;
|
||||
font-family: 'Monaco', 'Courier New', monospace;
|
||||
font-size: 0.85em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.endpoint-method {
|
||||
background: #1e88e5;
|
||||
color: white;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
font-size: 0.85em;
|
||||
min-width: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.endpoint-method.post {
|
||||
background: #4caf50;
|
||||
}
|
||||
|
||||
.endpoint-method.delete {
|
||||
background: #f44336;
|
||||
}
|
||||
|
||||
.endpoint-path {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 40px;
|
||||
padding-top: 30px;
|
||||
@@ -265,11 +206,6 @@
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.endpoint {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -311,258 +247,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoints">
|
||||
<h2>Available API Endpoints</h2>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>📊 Status & Health</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">GET</span>
|
||||
<span class="endpoint-path">/health</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>🔌 Webhooks</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">GET</span>
|
||||
<span class="endpoint-path">/api/hooks</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/hooks/add</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method delete">DELETE</span>
|
||||
<span class="endpoint-path">/api/hooks/remove</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>👤 Accounts</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">GET</span>
|
||||
<span class="endpoint-path">/api/accounts</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/accounts/add</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/accounts/update</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/accounts/disable</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/accounts/enable</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method delete">DELETE</span>
|
||||
<span class="endpoint-path">/api/accounts/remove</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>💬 Send Messages</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/image</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/video</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/document</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/audio</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/sticker</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/location</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/contacts</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/interactive</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/template</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/flow</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/reaction</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/messages/read</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>📄 Templates</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/templates</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/templates/upload</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/templates/delete</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>🔄 Flows</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/flows</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/flows/create</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/flows/get</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/flows/upload</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/flows/publish</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/flows/deprecate</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/flows/delete</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>📞 Phone Numbers</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/phone-numbers</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/phone-numbers/request-code</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/phone-numbers/verify-code</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>🏪 Catalog / Commerce</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/catalogs</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/catalogs/products</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/catalog</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/product</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/send/product-list</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>🏢 Business Profile</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/business-profile</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/business-profile/update</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>🗑️ Media Management</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/media/upload</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/media-delete</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>💾 Message Cache</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">GET</span>
|
||||
<span class="endpoint-path">/api/cache</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">GET</span>
|
||||
<span class="endpoint-path">/api/cache/stats</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/api/cache/replay</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="endpoint-group">
|
||||
<h3>🔔 WhatsApp Business API</h3>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">GET</span>
|
||||
<span class="endpoint-path">/webhooks/whatsapp/{account_id}</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method post">POST</span>
|
||||
<span class="endpoint-path">/webhooks/whatsapp/{account_id}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<p>Need help? Check out the <a href="https://git.warky.dev/wdevs/whatshooked" target="_blank">documentation</a> · <a href="/privacy-policy">Privacy Policy</a> · <a href="/terms-of-service">Terms of Service</a></p>
|
||||
<p style="margin-top: 10px;">Made by Warky Devs</p>
|
||||
|
||||
Reference in New Issue
Block a user