@twilio/conversations 3.0.1-rc.102 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/builds/browser.esm.js +10846 -0
- package/builds/browser.esm.js.map +1 -0
- package/builds/browser.js +891 -260
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +162 -52
- package/builds/lib.esm.d.ts +3178 -0
- package/builds/lib.esm.js +10845 -0
- package/builds/lib.js +900 -260
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +9407 -10424
- package/builds/twilio-conversations.js.map +1 -0
- package/builds/twilio-conversations.min.js +2 -1
- package/builds/twilio-conversations.min.js.map +1 -0
- package/dist/aggregated-delivery-receipt.js +1 -5
- package/dist/aggregated-delivery-receipt.js.map +1 -1
- package/dist/channel-metadata-client.js +5 -10
- package/dist/channel-metadata-client.js.map +1 -1
- package/dist/client.js +218 -204
- package/dist/client.js.map +1 -1
- package/dist/command-executor.js +6 -10
- package/dist/command-executor.js.map +1 -1
- package/dist/configuration.js +14 -14
- package/dist/configuration.js.map +1 -1
- package/dist/content-client.js +5 -9
- package/dist/content-client.js.map +1 -1
- package/dist/content-template.js +1 -7
- package/dist/content-template.js.map +1 -1
- package/dist/conversation.js +170 -134
- package/dist/conversation.js.map +1 -1
- package/dist/data/conversations.js +44 -46
- package/dist/data/conversations.js.map +1 -1
- package/dist/data/messages.js +18 -22
- package/dist/data/messages.js.map +1 -1
- package/dist/data/participants.js +22 -25
- package/dist/data/participants.js.map +1 -1
- package/dist/data/users.js +10 -14
- package/dist/data/users.js.map +1 -1
- package/dist/detailed-delivery-receipt.js +1 -5
- package/dist/detailed-delivery-receipt.js.map +1 -1
- package/dist/index.js +17 -46
- package/dist/index.js.map +1 -1
- package/dist/interfaces/notification-types.js +1 -5
- package/dist/interfaces/notification-types.js.map +1 -1
- package/dist/interfaces/rules.js +7 -13
- package/dist/interfaces/rules.js.map +1 -1
- package/dist/logger.js +9 -29
- package/dist/logger.js.map +1 -1
- package/dist/media.js +32 -25
- package/dist/media.js.map +1 -1
- package/dist/message-builder.js +43 -47
- package/dist/message-builder.js.map +1 -1
- package/dist/message-recipients-client.js +231 -0
- package/dist/message-recipients-client.js.map +1 -0
- package/dist/message.js +120 -98
- package/dist/message.js.map +1 -1
- package/dist/node_modules/quick-lru/index.js +1 -5
- package/dist/node_modules/quick-lru/index.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +7 -6
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/packages/conversations/package.json.js +2 -6
- package/dist/packages/conversations/package.json.js.map +1 -1
- package/dist/participant.js +32 -37
- package/dist/participant.js.map +1 -1
- package/dist/push-notification.js +1 -5
- package/dist/push-notification.js.map +1 -1
- package/dist/rest-paginator.js +1 -5
- package/dist/rest-paginator.js.map +1 -1
- package/dist/services/network.js +3 -7
- package/dist/services/network.js.map +1 -1
- package/dist/services/typing-indicator.js +7 -10
- package/dist/services/typing-indicator.js.map +1 -1
- package/dist/unsent-message.js +5 -9
- package/dist/unsent-message.js.map +1 -1
- package/dist/user.js +21 -30
- package/dist/user.js.map +1 -1
- package/dist/util/deferred.js +1 -5
- package/dist/util/deferred.js.map +1 -1
- package/dist/util/index.js +36 -9
- package/dist/util/index.js.map +1 -1
- package/dist/utils/uuid.js +145 -0
- package/dist/utils/uuid.js.map +1 -0
- package/package.json +14 -17
- package/docs/assets/css/main.css +0 -2660
- package/docs/assets/images/icons.png +0 -0
- package/docs/assets/images/icons@2x.png +0 -0
- package/docs/assets/images/widgets.png +0 -0
- package/docs/assets/images/widgets@2x.png +0 -0
- package/docs/assets/js/main.js +0 -248
- package/docs/assets/js/search.js +0 -1
- package/docs/classes/AggregatedDeliveryReceipt.html +0 -3184
- package/docs/classes/CancellablePromise.html +0 -3213
- package/docs/classes/ChannelMetadata.html +0 -3050
- package/docs/classes/Client.html +0 -4278
- package/docs/classes/ContentTemplate.html +0 -3116
- package/docs/classes/ContentTemplateVariable.html +0 -3116
- package/docs/classes/Conversation.html +0 -4359
- package/docs/classes/DetailedDeliveryReceipt.html +0 -3163
- package/docs/classes/Media.html +0 -3167
- package/docs/classes/Message.html +0 -3803
- package/docs/classes/MessageBuilder.html +0 -3318
- package/docs/classes/Participant.html +0 -3444
- package/docs/classes/PushNotification.html +0 -3130
- package/docs/classes/RestPaginator.html +0 -3160
- package/docs/classes/UnsentMessage.html +0 -3042
- package/docs/classes/User.html +0 -3349
- package/docs/index.html +0 -4333
- package/docs/interfaces/ClientOptions.html +0 -3050
- package/docs/interfaces/ConversationBindings.html +0 -3001
- package/docs/interfaces/ConversationEmailBinding.html +0 -3001
- package/docs/interfaces/ConversationLimits.html +0 -3098
- package/docs/interfaces/ConversationState.html +0 -3050
- package/docs/interfaces/ConversationUpdatedEventArgs.html +0 -3001
- package/docs/interfaces/CreateConversationOptions.html +0 -3066
- package/docs/interfaces/LastMessage.html +0 -3050
- package/docs/interfaces/Paginator.html +0 -3141
- package/docs/interfaces/ParticipantBindings.html +0 -3001
- package/docs/interfaces/ParticipantEmailBinding.html +0 -3001
- package/docs/interfaces/PushNotificationData.html +0 -3114
- package/docs/interfaces/SendEmailOptions.html +0 -3034
- package/docs/interfaces/SendMediaOptions.html +0 -3068
- package/docs/modules.html +0 -4334
package/builds/lib.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { SyncClient, SyncDocument, SyncList } from "twilio-sync";
|
|
3
2
|
import { LogLevelDesc } from "loglevel";
|
|
4
3
|
import { Transport, TwilsockClient, InitRegistration, TransportResult } from "twilsock";
|
|
@@ -6,8 +5,7 @@ import { ConnectionState as TwilsockConnectionState } from "twilsock";
|
|
|
6
5
|
import { ReplayEventEmitter } from "@twilio/replay-event-emitter";
|
|
7
6
|
import { ChannelType, Notifications } from "@twilio/notifications";
|
|
8
7
|
import { Notifications as NotificationClient } from "@twilio/notifications";
|
|
9
|
-
import { CancellablePromise, McsClient, MediaCategory, McsMedia } from "@twilio/mcs-client";
|
|
10
|
-
import { MediaCategory as McsMediaCategory } from "@twilio/mcs-client";
|
|
8
|
+
import { CancellablePromise, McsClient, MediaCategory, McsMedia, McsMediaCategory, McsMediaState } from "@twilio/mcs-client";
|
|
11
9
|
interface ConfigurationResponse {
|
|
12
10
|
options: {
|
|
13
11
|
consumption_report_interval: string;
|
|
@@ -111,6 +109,7 @@ declare class Configuration {
|
|
|
111
109
|
readonly userInfo: string;
|
|
112
110
|
readonly myConversations: string;
|
|
113
111
|
readonly channelMetadataCacheCapacity: number;
|
|
112
|
+
readonly messageRecipientsCacheCapacity: number;
|
|
114
113
|
constructor(options: ClientOptions, configurationResponse: ConfigurationResponse, logger: Logger);
|
|
115
114
|
}
|
|
116
115
|
interface CommandExecutorServices {
|
|
@@ -523,13 +522,6 @@ interface ParticipantBindingOptions {
|
|
|
523
522
|
* * `'history'`
|
|
524
523
|
*/
|
|
525
524
|
type MediaCategory$0 = McsMediaCategory;
|
|
526
|
-
interface MediaState {
|
|
527
|
-
sid: string;
|
|
528
|
-
category: MediaCategory$0;
|
|
529
|
-
filename: string | null;
|
|
530
|
-
contentType: string;
|
|
531
|
-
size: number;
|
|
532
|
-
}
|
|
533
525
|
interface MediaServices {
|
|
534
526
|
mcsClient: McsClient;
|
|
535
527
|
}
|
|
@@ -543,7 +535,7 @@ declare class Media {
|
|
|
543
535
|
/**
|
|
544
536
|
* @internal
|
|
545
537
|
*/
|
|
546
|
-
constructor(data:
|
|
538
|
+
constructor(data: McsMediaState | McsMedia, services: MediaServices);
|
|
547
539
|
/**
|
|
548
540
|
* Server-assigned unique identifier for the media.
|
|
549
541
|
*/
|
|
@@ -573,6 +565,10 @@ declare class Media {
|
|
|
573
565
|
*/
|
|
574
566
|
getContentTemporaryUrl(): CancellablePromise<string | null>;
|
|
575
567
|
private _fetchMcsMedia;
|
|
568
|
+
/**
|
|
569
|
+
* @internal
|
|
570
|
+
*/
|
|
571
|
+
_state(): McsMediaState;
|
|
576
572
|
}
|
|
577
573
|
/**
|
|
578
574
|
* Signifies the amount of participants which have the status for the message.
|
|
@@ -1209,6 +1205,118 @@ declare class ChannelMetadataClient {
|
|
|
1209
1205
|
constructor(services: ChannelMetadataClientServices, configuration: Configuration);
|
|
1210
1206
|
getChannelMetadata(conversationSid: string, messageSid: string): Promise<ChannelMetadata | null>;
|
|
1211
1207
|
}
|
|
1208
|
+
type MessageRecipient = {
|
|
1209
|
+
message_sid: string;
|
|
1210
|
+
type: "email"; // discriminant for future expansion
|
|
1211
|
+
level: "to" | "from" | "cc";
|
|
1212
|
+
name: string;
|
|
1213
|
+
address: string;
|
|
1214
|
+
};
|
|
1215
|
+
/**
|
|
1216
|
+
* Pagination helper interface.
|
|
1217
|
+
* @typeParam T The item type.
|
|
1218
|
+
*/
|
|
1219
|
+
interface Paginator<T> {
|
|
1220
|
+
/**
|
|
1221
|
+
* Indicates the existence of the next page.
|
|
1222
|
+
*/
|
|
1223
|
+
hasNextPage: boolean;
|
|
1224
|
+
/**
|
|
1225
|
+
* Indicates the existence of the previous page.
|
|
1226
|
+
*/
|
|
1227
|
+
hasPrevPage: boolean;
|
|
1228
|
+
/**
|
|
1229
|
+
* Array of elements of type T on the current page.
|
|
1230
|
+
*/
|
|
1231
|
+
items: T[];
|
|
1232
|
+
/**
|
|
1233
|
+
* Request next page.
|
|
1234
|
+
* Does not modify the existing object.
|
|
1235
|
+
*/
|
|
1236
|
+
nextPage(): Promise<Paginator<T>>;
|
|
1237
|
+
/**
|
|
1238
|
+
* Request previous page.
|
|
1239
|
+
* Does not modify the existing object.
|
|
1240
|
+
*/
|
|
1241
|
+
prevPage(): Promise<Paginator<T>>;
|
|
1242
|
+
}
|
|
1243
|
+
interface PaginatorOptions {
|
|
1244
|
+
pageSize?: number;
|
|
1245
|
+
}
|
|
1246
|
+
type MessageRecipientsClientServices = {
|
|
1247
|
+
commandExecutor: CommandExecutor;
|
|
1248
|
+
};
|
|
1249
|
+
/**
|
|
1250
|
+
* Message recipient descriptor.
|
|
1251
|
+
*/
|
|
1252
|
+
type RecipientDescriptor = EmailRecipientDescriptor | UnknownRecipientDescriptor;
|
|
1253
|
+
/**
|
|
1254
|
+
* Email recipient level.
|
|
1255
|
+
*/
|
|
1256
|
+
type EmailRecipientLevel = "to" | "from" | "cc";
|
|
1257
|
+
/**
|
|
1258
|
+
* Email recipient descriptor.
|
|
1259
|
+
*/
|
|
1260
|
+
declare class EmailRecipientDescriptor {
|
|
1261
|
+
/**
|
|
1262
|
+
* Type of recipient.
|
|
1263
|
+
*/
|
|
1264
|
+
readonly type = "email";
|
|
1265
|
+
/**
|
|
1266
|
+
* Sid of the message that this recipient belongs to.
|
|
1267
|
+
*/
|
|
1268
|
+
readonly messageSid: string;
|
|
1269
|
+
/**
|
|
1270
|
+
* Email recipient level.
|
|
1271
|
+
*/
|
|
1272
|
+
readonly level: EmailRecipientLevel;
|
|
1273
|
+
/**
|
|
1274
|
+
* Name of the recipient.
|
|
1275
|
+
*/
|
|
1276
|
+
readonly name: string;
|
|
1277
|
+
/**
|
|
1278
|
+
* Address of the recipient.
|
|
1279
|
+
*/
|
|
1280
|
+
readonly address: string;
|
|
1281
|
+
/**
|
|
1282
|
+
* @internal
|
|
1283
|
+
*/
|
|
1284
|
+
constructor(recipient: MessageRecipient);
|
|
1285
|
+
}
|
|
1286
|
+
/**
|
|
1287
|
+
* Unknown recipient descriptor. Used to be able to handle recipient types that
|
|
1288
|
+
* are not supported by the current version of the SDK.
|
|
1289
|
+
*/
|
|
1290
|
+
declare class UnknownRecipientDescriptor {
|
|
1291
|
+
/**
|
|
1292
|
+
* Type of recipient.
|
|
1293
|
+
*/
|
|
1294
|
+
readonly type: string;
|
|
1295
|
+
/**
|
|
1296
|
+
* Sid of the message that this recipient belongs to.
|
|
1297
|
+
*/
|
|
1298
|
+
readonly messageSid: string;
|
|
1299
|
+
/**
|
|
1300
|
+
* Recipient data as a JSON string.
|
|
1301
|
+
*/
|
|
1302
|
+
readonly rawData: string;
|
|
1303
|
+
/**
|
|
1304
|
+
* @internal
|
|
1305
|
+
*/
|
|
1306
|
+
constructor(recipient: MessageRecipient);
|
|
1307
|
+
}
|
|
1308
|
+
declare class MessageRecipientsClient {
|
|
1309
|
+
private readonly _services;
|
|
1310
|
+
private readonly _configuration;
|
|
1311
|
+
private readonly _cache;
|
|
1312
|
+
constructor(services: MessageRecipientsClientServices, configuration: Configuration);
|
|
1313
|
+
getRecipientsFromMessage(conversationSid: string, messageSid: string): Promise<RecipientDescriptor[]>;
|
|
1314
|
+
getRecipientsFromConversation(conversationSid: string, paginatorOptions?: {
|
|
1315
|
+
pageToken?: string;
|
|
1316
|
+
pageSize?: number;
|
|
1317
|
+
}): Promise<Paginator<RecipientDescriptor>>;
|
|
1318
|
+
private _wrapResponse;
|
|
1319
|
+
}
|
|
1212
1320
|
type MessageEvents = {
|
|
1213
1321
|
updated: (data: {
|
|
1214
1322
|
message: Message;
|
|
@@ -1220,6 +1328,7 @@ interface MessageServices {
|
|
|
1220
1328
|
network: Network;
|
|
1221
1329
|
commandExecutor: CommandExecutor;
|
|
1222
1330
|
channelMetadataClient: ChannelMetadataClient;
|
|
1331
|
+
messageRecipientsClient: MessageRecipientsClient;
|
|
1223
1332
|
}
|
|
1224
1333
|
interface MessageLinks {
|
|
1225
1334
|
self: string;
|
|
@@ -1229,9 +1338,9 @@ interface MessageLinks {
|
|
|
1229
1338
|
/**
|
|
1230
1339
|
* The reason for the `updated` event being emitted by a message.
|
|
1231
1340
|
*/
|
|
1232
|
-
type MessageUpdateReason = "body" | "lastUpdatedBy" | "dateCreated" | "dateUpdated" | "attributes" | "author" | "deliveryReceipt" | "subject";
|
|
1341
|
+
type MessageUpdateReason = "body" | "lastUpdatedBy" | "dateCreated" | "dateUpdated" | "attributes" | "author" | "deliveryReceipt" | "subject" | "media";
|
|
1233
1342
|
/**
|
|
1234
|
-
* Type of
|
|
1343
|
+
* Type of message.
|
|
1235
1344
|
*/
|
|
1236
1345
|
type MessageType = "text" | "media";
|
|
1237
1346
|
interface MessageUpdatedEventArgs {
|
|
@@ -1259,6 +1368,7 @@ interface MessageData {
|
|
|
1259
1368
|
* A message in a conversation.
|
|
1260
1369
|
*/
|
|
1261
1370
|
declare class Message extends ReplayEventEmitter<MessageEvents> {
|
|
1371
|
+
#private;
|
|
1262
1372
|
/**
|
|
1263
1373
|
* Conversation that the message is in.
|
|
1264
1374
|
*/
|
|
@@ -1431,34 +1541,10 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
|
|
|
1431
1541
|
* the message doesn't have any channel metadata.
|
|
1432
1542
|
*/
|
|
1433
1543
|
getChannelMetadata(): Promise<ChannelMetadata | null>;
|
|
1434
|
-
}
|
|
1435
|
-
/**
|
|
1436
|
-
* Pagination helper interface.
|
|
1437
|
-
* @typeParam T The item type.
|
|
1438
|
-
*/
|
|
1439
|
-
interface Paginator<T> {
|
|
1440
|
-
/**
|
|
1441
|
-
* Indicates the existence of the next page.
|
|
1442
|
-
*/
|
|
1443
|
-
hasNextPage: boolean;
|
|
1444
|
-
/**
|
|
1445
|
-
* Indicates the existence of the previous page.
|
|
1446
|
-
*/
|
|
1447
|
-
hasPrevPage: boolean;
|
|
1448
1544
|
/**
|
|
1449
|
-
*
|
|
1545
|
+
* Get recipients of the message.
|
|
1450
1546
|
*/
|
|
1451
|
-
|
|
1452
|
-
/**
|
|
1453
|
-
* Request next page.
|
|
1454
|
-
* Does not modify the existing object.
|
|
1455
|
-
*/
|
|
1456
|
-
nextPage(): Promise<Paginator<T>>;
|
|
1457
|
-
/**
|
|
1458
|
-
* Request previous page.
|
|
1459
|
-
* Does not modify the existing object.
|
|
1460
|
-
*/
|
|
1461
|
-
prevPage(): Promise<Paginator<T>>;
|
|
1547
|
+
getMessageRecipients(): Promise<RecipientDescriptor[]>;
|
|
1462
1548
|
}
|
|
1463
1549
|
interface TypingIndicatorServices {
|
|
1464
1550
|
twilsockClient: TwilsockClient;
|
|
@@ -1594,6 +1680,7 @@ interface MessagesServices {
|
|
|
1594
1680
|
syncClient: SyncClient;
|
|
1595
1681
|
commandExecutor: CommandExecutor;
|
|
1596
1682
|
channelMetadataClient: ChannelMetadataClient;
|
|
1683
|
+
messageRecipientsClient: MessageRecipientsClient;
|
|
1597
1684
|
}
|
|
1598
1685
|
/**
|
|
1599
1686
|
* Represents the collection of messages in a conversation
|
|
@@ -1889,6 +1976,7 @@ interface ConversationServices {
|
|
|
1889
1976
|
syncClient: SyncClient;
|
|
1890
1977
|
commandExecutor: CommandExecutor;
|
|
1891
1978
|
channelMetadataClient: ChannelMetadataClient;
|
|
1979
|
+
messageRecipientsClient: MessageRecipientsClient;
|
|
1892
1980
|
}
|
|
1893
1981
|
/**
|
|
1894
1982
|
* Conversation descriptor.
|
|
@@ -2031,11 +2119,6 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
|
2031
2119
|
* @internal
|
|
2032
2120
|
*/
|
|
2033
2121
|
readonly _links: ConversationLinks;
|
|
2034
|
-
/**
|
|
2035
|
-
* Map of participants.
|
|
2036
|
-
* @internal
|
|
2037
|
-
*/
|
|
2038
|
-
readonly _participants: Map<string, Participant>;
|
|
2039
2122
|
/**
|
|
2040
2123
|
* Configuration of the client that the conversation belongs to.
|
|
2041
2124
|
*/
|
|
@@ -2060,6 +2143,11 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
|
2060
2143
|
* Sync list containing messages.
|
|
2061
2144
|
*/
|
|
2062
2145
|
private _messagesList?;
|
|
2146
|
+
/**
|
|
2147
|
+
* Map of participants.
|
|
2148
|
+
* @internal
|
|
2149
|
+
*/
|
|
2150
|
+
readonly _participants: Map<string, Participant>;
|
|
2063
2151
|
/**
|
|
2064
2152
|
* Participants entity.
|
|
2065
2153
|
*/
|
|
@@ -2076,6 +2164,10 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
|
2076
2164
|
* Promise for the conversation entity document.
|
|
2077
2165
|
*/
|
|
2078
2166
|
private _entityPromise;
|
|
2167
|
+
/**
|
|
2168
|
+
* Promise for the messages list.
|
|
2169
|
+
*/
|
|
2170
|
+
private _streamsPromise;
|
|
2079
2171
|
/**
|
|
2080
2172
|
* Conversation entity document.
|
|
2081
2173
|
*/
|
|
@@ -2130,7 +2222,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
|
2130
2222
|
*/
|
|
2131
2223
|
get notificationLevel(): NotificationLevel;
|
|
2132
2224
|
/**
|
|
2133
|
-
* Conversation bindings.
|
|
2225
|
+
* Conversation bindings. An undocumented feature (for now).
|
|
2134
2226
|
* @internal
|
|
2135
2227
|
*/
|
|
2136
2228
|
get bindings(): ConversationBindings;
|
|
@@ -2337,10 +2429,15 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
|
2337
2429
|
* to null removes it.
|
|
2338
2430
|
*/
|
|
2339
2431
|
updateUniqueName(uniqueName: string | null): Promise<Conversation>;
|
|
2432
|
+
/**
|
|
2433
|
+
* Get recipients of all messages in the conversation.
|
|
2434
|
+
* @param options Optional configuration, set pageSize to request a specific pagination page size. Page size specifies a number of messages to include in a single batch. Each message may include multiple recipients.
|
|
2435
|
+
*/
|
|
2436
|
+
getMessageRecipients(options?: PaginatorOptions): Promise<Paginator<RecipientDescriptor>>;
|
|
2340
2437
|
/**
|
|
2341
2438
|
* Load and subscribe to this conversation and do not subscribe to its
|
|
2342
2439
|
* participants and messages. This or _subscribeStreams will need to be called
|
|
2343
|
-
* before any events
|
|
2440
|
+
* before any events in the conversation will fire.
|
|
2344
2441
|
* @internal
|
|
2345
2442
|
*/
|
|
2346
2443
|
_subscribe(): Promise<SyncDocument>;
|
|
@@ -2353,7 +2450,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
|
2353
2450
|
* will throw an exception that will be caught and handled gracefully.
|
|
2354
2451
|
* @internal
|
|
2355
2452
|
*/
|
|
2356
|
-
_fetchStreams(): Promise<
|
|
2453
|
+
_fetchStreams(): Promise<boolean>;
|
|
2357
2454
|
/**
|
|
2358
2455
|
* Load the attributes of this conversation and instantiate its participants
|
|
2359
2456
|
* and messages. This or _subscribe will need to be called before any events
|
|
@@ -2549,6 +2646,10 @@ interface ClientOptions {
|
|
|
2549
2646
|
* The cache capacity for channel metadata.
|
|
2550
2647
|
*/
|
|
2551
2648
|
channelMetadataCacheCapacity?: number;
|
|
2649
|
+
/**
|
|
2650
|
+
* The cache capacity for message recipients.
|
|
2651
|
+
*/
|
|
2652
|
+
messageRecipientsCacheCapacity?: number;
|
|
2552
2653
|
region?: string;
|
|
2553
2654
|
productId?: string;
|
|
2554
2655
|
twilsockClient?: TwilsockClient;
|
|
@@ -2571,6 +2672,7 @@ interface ClientOptions {
|
|
|
2571
2672
|
disableDeepClone?: boolean;
|
|
2572
2673
|
typingUri?: string;
|
|
2573
2674
|
apiUri?: string;
|
|
2675
|
+
throwErrorsAlways?: boolean;
|
|
2574
2676
|
}
|
|
2575
2677
|
type ConnectionError = {
|
|
2576
2678
|
terminal: boolean;
|
|
@@ -2592,6 +2694,11 @@ interface CreateConversationOptions {
|
|
|
2592
2694
|
* A unique identifier of the conversation.
|
|
2593
2695
|
*/
|
|
2594
2696
|
uniqueName?: string;
|
|
2697
|
+
/**
|
|
2698
|
+
* The access control for the conversation.
|
|
2699
|
+
* null for existing conversations, 'restricted' for conversations that need to support users with restricted access
|
|
2700
|
+
*/
|
|
2701
|
+
access?: string;
|
|
2595
2702
|
}
|
|
2596
2703
|
/**
|
|
2597
2704
|
* A client is the starting point to the Twilio Conversations functionality.
|
|
@@ -2839,7 +2946,7 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
|
|
|
2839
2946
|
/**
|
|
2840
2947
|
* Promise that resolves on successful initialization.
|
|
2841
2948
|
*/
|
|
2842
|
-
private
|
|
2949
|
+
private _ensureReady;
|
|
2843
2950
|
/**
|
|
2844
2951
|
* Options passed to the client.
|
|
2845
2952
|
*/
|
|
@@ -2877,7 +2984,7 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
|
|
|
2877
2984
|
*/
|
|
2878
2985
|
private _conversationsPromise;
|
|
2879
2986
|
/**
|
|
2880
|
-
* Returned Conversations instance is not yet fully initialized. Calling any
|
|
2987
|
+
* Returned Conversations Client instance is not yet fully initialized. Calling any
|
|
2881
2988
|
* operations will block until it is. Use connection events to monitor when
|
|
2882
2989
|
* client becomes fully available (connectionStateChanged with state
|
|
2883
2990
|
* 'connected') or not available (connectionStateChange with state 'denied',
|
|
@@ -2958,7 +3065,6 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
|
|
|
2958
3065
|
/**
|
|
2959
3066
|
* Peek a conversation by its SID.
|
|
2960
3067
|
* @param conversationSid Conversation sid
|
|
2961
|
-
* @internal
|
|
2962
3068
|
*/
|
|
2963
3069
|
peekConversationBySid(conversationSid: string): Promise<Conversation>;
|
|
2964
3070
|
/**
|
|
@@ -3004,7 +3110,7 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
|
|
|
3004
3110
|
*/
|
|
3005
3111
|
removePushRegistrations(channelType: ChannelType, registrationId: string): Promise<void>;
|
|
3006
3112
|
/**
|
|
3007
|
-
*
|
|
3113
|
+
* Parse a push notification payload.
|
|
3008
3114
|
*/
|
|
3009
3115
|
parsePushNotification: typeof Client.parsePushNotification;
|
|
3010
3116
|
/**
|
|
@@ -3056,6 +3162,10 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
|
|
|
3056
3162
|
* @param channelType The channel type to unsubscribe from.
|
|
3057
3163
|
*/
|
|
3058
3164
|
private _unsubscribeFromPushNotifications;
|
|
3165
|
+
/**
|
|
3166
|
+
* Initialize the ensureReady promise.
|
|
3167
|
+
*/
|
|
3168
|
+
private _initializeEnsureReady;
|
|
3059
3169
|
}
|
|
3060
3170
|
declare class NotificationTypes {
|
|
3061
3171
|
static readonly TYPING_INDICATOR = "twilio.ipmsg.typing_indicator";
|
|
@@ -3065,4 +3175,4 @@ declare class NotificationTypes {
|
|
|
3065
3175
|
static readonly REMOVED_FROM_CONVERSATION = "twilio.conversations.removed_from_conversation";
|
|
3066
3176
|
static readonly CONSUMPTION_UPDATE = "twilio.channel.consumption_update";
|
|
3067
3177
|
}
|
|
3068
|
-
export { Conversation, ConversationBindings, ConversationEmailBinding, ConversationUpdateReason, ConversationStatus, NotificationLevel, ConversationState, ConversationUpdatedEventArgs, SendMediaOptions, SendEmailOptions, LastMessage, Participant, ParticipantUpdateReason, ParticipantType, ParticipantUpdatedEventArgs, ParticipantBindings, ParticipantEmailBinding, ParticipantEmailLevel, Message, MessageUpdateReason, MessageType, MessageUpdatedEventArgs, Media, MediaCategory$0 as MediaCategory, AggregatedDeliveryReceipt, DeliveryAmount, DetailedDeliveryReceipt, DeliveryStatus, RestPaginator, MessageBuilder, UnsentMessage, Paginator, ParticipantBindingOptions, User, UserUpdateReason, UserUpdatedEventArgs, PushNotification, PushNotificationType, PushNotificationDescriptor, PushNotificationData, NotificationTypes, Client, State, ConnectionState, NotificationsChannelType, ClientOptions, CreateConversationOptions, ConversationLimits, JSONValue, JSONObject, JSONArray, CancellablePromise, ContentDataActionUrl, ContentDataActionPhone, ContentDataActionReply, ContentDataActionOther, ContentDataAction, ContentDataText, ContentDataMedia, ContentDataLocation, ContentDataReply, ContentDataQuickReply, ContentDataCallToAction, ContentDataListPicker, ContentDataListItem, ContentDataCard, ContentDataOther, ContentData, ContentTemplate, ContentTemplateVariable, ChannelMetadata };
|
|
3178
|
+
export { Conversation, ConversationBindings, ConversationEmailBinding, ConversationUpdateReason, ConversationStatus, NotificationLevel, ConversationState, ConversationUpdatedEventArgs, SendMediaOptions, SendEmailOptions, LastMessage, Participant, ParticipantUpdateReason, ParticipantType, ParticipantUpdatedEventArgs, ParticipantBindings, ParticipantEmailBinding, ParticipantEmailLevel, Message, MessageUpdateReason, MessageType, MessageUpdatedEventArgs, Media, MediaCategory$0 as MediaCategory, AggregatedDeliveryReceipt, DeliveryAmount, DetailedDeliveryReceipt, DeliveryStatus, RestPaginator, MessageBuilder, UnsentMessage, Paginator, ParticipantBindingOptions, User, UserUpdateReason, UserUpdatedEventArgs, PushNotification, PushNotificationType, PushNotificationDescriptor, PushNotificationData, NotificationTypes, Client, State, ConnectionState, NotificationsChannelType, ClientOptions, CreateConversationOptions, ConversationLimits, JSONValue, JSONObject, JSONArray, CancellablePromise, ContentDataActionUrl, ContentDataActionPhone, ContentDataActionReply, ContentDataActionOther, ContentDataAction, ContentDataText, ContentDataMedia, ContentDataLocation, ContentDataReply, ContentDataQuickReply, ContentDataCallToAction, ContentDataListPicker, ContentDataListItem, ContentDataCard, ContentDataOther, ContentData, ContentTemplate, ContentTemplateVariable, ChannelMetadata, RecipientDescriptor, EmailRecipientDescriptor, UnknownRecipientDescriptor, EmailRecipientLevel };
|