[core] Openapi - use pairing tag for qr/code/screenshot, move apps below

This commit is contained in:
devlikepro committed 2026-01-26 10:08:40 +07:00
1 parent 73faf330e3
commit f8f0063975
3 files changed
+11 -8

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ import { Base64File } from '../structures/files.dto';
@ApiSecurity('api_key')
@Controller('api/:session/auth')
@ApiTags('🔑 Auth')
@ApiTags('📱 Pairing')
class AuthController {
constructor(private manager: SessionManager) {}
+6 -2
View File
@@ -6,7 +6,7 @@ import {
StreamableFile,
UseInterceptors,
} from '@nestjs/common';
import { ApiSecurity, ApiTags } from '@nestjs/swagger';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { ApiFileAcceptHeader } from '@waha/nestjs/ApiFileAcceptHeader';
import { Response } from 'express';
@@ -16,11 +16,15 @@ import { SessionQuery } from '../structures/base.dto';
@ApiSecurity('api_key')
@Controller('api')
@ApiTags('🖼️ Screenshot')
@ApiTags('📱 Pairing')
export class ScreenshotController {
constructor(private manager: SessionManager) {}
@Get('/screenshot')
@ApiOperation({
summary:
'Get a screenshot of the current WhatsApp session (**WEBJS** only)',
})
@UseInterceptors(new BufferResponseInterceptor('image/jpeg'))
@ApiFileAcceptHeader('image/jpeg')
async screenshot(
+4 -5
View File
@@ -74,12 +74,10 @@ export class SwaggerConfiguratorCore {
.setExternalDoc(this.title, this.externalDocUrl)
.setVersion(VERSION.version)
.addTag('🖥️ Sessions', 'Control WhatsApp sessions (accounts)')
.addTag('🧩 Apps', 'Applications (built-in integrations)')
.addTag('🔑 Auth', 'Authentication')
.addTag('📱 Pairing', 'Pair a session with WhatsApp on your phone.')
.addTag('🆔 Profile', 'Your profile information')
.addTag('🖼️ Screenshot', 'Get screenshot of WhatsApp and show QR code')
.addTag('📤 Chatting', 'Chatting methods')
.addTag('📞 Calls', 'Call handling methods')
.addTag('✅ Presence', `Presence information`)
.addTag('📢 Channels', 'Channels (newsletters) methods')
.addTag('🟢 Status', 'Status (aka stories) methods')
.addTag('💬 Chats', `Chats methods`)
@@ -90,13 +88,14 @@ export class SwaggerConfiguratorCore {
'E.g: \`12312312310\` OR \`12312312310@c.us\`<br>`,
)
.addTag('👥 Groups', `Groups methods.<br>`)
.addTag('✅ Presence', `Presence information`)
.addTag('📞 Calls', 'Call handling methods')
.addTag('📅 Events', `Event Message`)
.addTag(
'🏷️ Labels',
'Labels - available only for WhatsApp Business accounts',
)
.addTag('🖼️ Media', 'Media methods')
.addTag('🧩 Apps', 'Applications (built-in integrations)')
.addTag('🔍 Observability', 'Other methods')
.addTag('🗄️ Storage', 'Storage methods')
.addApiKey({