vk-io
Version:
Modern VK API SDK for Node.js
66 lines (65 loc) • 1.89 kB
TypeScript
import { Attachment, AttachmentFactoryOptions } from './attachment';
import { AttachmentType, kSerializeData } from '../../utils/constants';
export interface IAudioMessageAttachmentPayload {
id: number;
owner_id: number;
access_key?: string;
duration?: number;
waveform?: number[];
link_ogg?: string;
link_mp3?: string;
locale?: string;
transcript?: string;
transcript_state?: 'done' | undefined;
}
export type AudioMessageAttachmentOptions = AttachmentFactoryOptions<IAudioMessageAttachmentPayload>;
export declare class AudioMessageAttachment extends Attachment<IAudioMessageAttachmentPayload, AttachmentType.AUDIO_MESSAGE | 'audio_message'> {
/**
* Constructor
*/
constructor(options: AudioMessageAttachmentOptions);
/**
* Load attachment payload
*/
loadAttachmentPayload(): Promise<void>;
/**
* Returns the duration of the audio message
*/
get duration(): number | undefined;
/**
* Returns the waveform of the audio message
*/
get waveform(): number[] | undefined;
/**
* Returns the ogg URL of the audio message
*/
get oggUrl(): string | undefined;
/**
* Returns the mp3 URL of the audio message
*/
get mp3Url(): string | undefined;
/**
* Returns the locale of the audio message
*/
get locale(): string | undefined;
/**
* Returns the transcript of the audio message
*/
get transcript(): string | undefined;
/**
* Returns the transcript of the audio message
*/
get transcriptState(): 'done' | undefined;
/**
* Returns the transcript of the audio message
*/
get isTranscriptDone(): boolean;
/**
* Returns the URL of the audio message
*/
get url(): string | undefined;
/**
* Returns the custom data
*/
[kSerializeData](): object;
}