Skip to content

Commit 78574a5

Browse files
authored
Merge 9c9cf85 into 07b0b43
2 parents 07b0b43 + 9c9cf85 commit 78574a5

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

lib/MessageApiClient.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as CMTypes from "../typescript-node-client/api";
22
import http = require('http');
33

4-
export type Channel = "SMS" | "Viber" | "RCS" | "Apple Business Chat" | "WhatsApp";
4+
export type Channel = "SMS" | "Viber" | "RCS" | "Apple Business Chat" | "WhatsApp" | "Twitter";
55
export type RichMessage = CMTypes.RichMessage;
66
export type Suggestion = CMTypes.Suggestion;
77
export type Template = CMTypes.Template;
@@ -45,8 +45,10 @@ export class MessageApiClient {
4545

4646
/**
4747
* Send an SMS message
48-
* @param to array of recipients for the message, specify the numbers in international format with leading 00
49-
* @param from the sender of the message, specify valid Sender ID
48+
* @param to array of recipients for the message, specify the numbers in international format with leading 00
49+
* For Twitter: use the Twitter Snowflake ID
50+
* @param from the sender of the message, specify valid Sender ID.
51+
* For Twitter: use the Twitter Snowflake ID of the account you want to use as sender.
5052
* @param message the body of the SMS message to be sent
5153
* @param reference (optional) reference to the message to query it later in the CM.platform.
5254
*/public sendTextMessage(to: string[], from: string, message: string, reference: string = undefined) {
@@ -78,8 +80,10 @@ export class Message extends CMTypes.MessageEnvelope {
7880

7981
/**
8082
* Sets the essential message parameters.
81-
* @param to array of recipients for the message, specify the numbers in international format with leading 00
82-
* @param from the sender of the message, specify valid Sender ID
83+
* @param to array of recipients for the message, specify the numbers in international format with leading 00.
84+
* For Twitter: use the Twitter Snowflake ID
85+
* @param from the sender of the message, specify valid Sender ID.
86+
* For Twitter: use the Twitter Snowflake ID of the account you want to use as sender.
8387
* @param message the body of the SMS message to be sent
8488
* @param reference (optional) reference to the message to query it later in the CM.platform.
8589
*/
@@ -102,7 +106,7 @@ export class Message extends CMTypes.MessageEnvelope {
102106

103107
/**
104108
* Sets the allowed channels to use. Default is to allow any channel configured for your account
105-
* @param channels array of allowed channels. Any of "SMS", "Viber", "RCS", "Apple Business Chat" and "WhatsApp"
109+
* @param channels array of allowed channels. Any of "SMS", "Viber", "RCS", "Apple Business Chat", "WhatsApp" and "Twitter"
106110
*/
107111
public setAllowedChannels(channels: Channel[]): Message {
108112
this.messages.msg[0].allowedChannels = channels || [];

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"rbm",
2929
"mms",
3030
"rich sms",
31-
"rich communication services"
31+
"rich communication services",
32+
"twitter"
3233
],
3334
"repository": {
3435
"type": "git",

0 commit comments

Comments
 (0)