Spaces:
Runtime error
Runtime error
| import { ApiProperty } from '@nestjs/swagger'; | |
| import { S3MediaData } from '@waha/structures/media.s3.dto'; | |
| export class WAMedia { | |
| ({ | |
| description: 'The URL for the media in the message if any', | |
| example: | |
| 'http://localhost:3000/api/files/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga', | |
| }) | |
| url?: string; | |
| ({ | |
| description: 'mimetype for the media in the message if any', | |
| example: 'audio/jpeg', | |
| }) | |
| mimetype?: string; | |
| ({ | |
| description: 'The original filename in mediaUrl in the message if any', | |
| example: 'example.pdf', | |
| }) | |
| filename?: string; | |
| ({ | |
| description: | |
| 'S3 attributes for the media in the message ' + | |
| 'if you are using S3 media storage', | |
| }) | |
| s3?: S3MediaData; | |
| ({ | |
| description: "Error message if there's an error downloading the media", | |
| example: null, | |
| }) | |
| // eslint-disable-next-line @typescript-eslint/ban-types | |
| error?: object; | |
| } | |
| export class FileDTO { | |
| ({ | |
| description: 'The URL for the file', | |
| }) | |
| url?: string; | |
| ({ | |
| description: 'Base64 content of the file', | |
| example: null, | |
| }) | |
| data?: string; | |
| } | |
| export class VoiceFileDTO extends FileDTO { | |
| ({ | |
| description: 'The URL for the voice file', | |
| example: | |
| process.env.WHATSAPP_SWAGGER_VIDEO_EXAMPLE_URL || | |
| 'https://github.com/devlikeapro/waha/raw/core/examples/voice.mp3', | |
| }) | |
| url?: string; | |
| } | |
| export class VideoFileDTO extends FileDTO { | |
| ({ | |
| description: 'The URL for the video file', | |
| example: 'https://github.com/devlikeapro/waha/raw/core/examples/video.mp4', | |
| }) | |
| url?: string; | |
| } | |