-
Notifications
You must be signed in to change notification settings - Fork 180
/
MMSVcard.ts
40 lines (38 loc) · 993 Bytes
/
MMSVcard.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { AbstractVcardMessage } from '../AbstractVcardMessage';
import { MessageParamsVcard } from '../../types';
/**
* Represents a vCard message for the MMS channel.
*
* @group MMS
*/
export class MMSVcard
extends AbstractVcardMessage
implements MessageParamsVcard
{
public channel: 'mms';
/**
* Send an MMS vCard message.
*
* @param {MessageParamsVcard} params - The parameters for creating the vCard message.
* @example
* ```ts
* import { MMSVcard } from '@vonage/messages';
*
* const { messageUUID } = await messagesClient.send(new MMSVcard({
* to: TO_NUMBER,
* from: FROM_NUMBER,
* vcard: {
* url: 'https://example.com/vcard.vcf',
* caption: 'Download my contact information',
* },
* clientRef: 'my-personal-reference',
* }));
*
* console.log(`Message sent successfully with UUID ${messageUUID}`);
* ```
*/
constructor(params: MessageParamsVcard) {
super(params);
this.channel = 'mms';
}
}