@twilio/conversations 3.0.0-rc.8 → 3.0.0
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 +39 -29
- package/builds/browser.esm.js +10838 -0
- package/builds/browser.esm.js.map +1 -0
- package/builds/browser.js +2494 -476
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +805 -70
- package/builds/lib.esm.d.ts +3178 -0
- package/builds/lib.esm.js +10837 -0
- package/builds/lib.js +2494 -476
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +29167 -26611
- 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 +10 -5
- package/dist/aggregated-delivery-receipt.js.map +1 -1
- package/dist/channel-metadata-client.js +187 -0
- package/dist/channel-metadata-client.js.map +1 -0
- package/dist/client.js +266 -192
- package/dist/client.js.map +1 -1
- package/dist/command-executor.js +51 -14
- package/dist/command-executor.js.map +1 -1
- package/dist/configuration.js +23 -12
- package/dist/configuration.js.map +1 -1
- package/dist/content-client.js +180 -0
- package/dist/content-client.js.map +1 -0
- package/dist/content-template.js +304 -0
- package/dist/content-template.js.map +1 -0
- package/dist/conversation.js +213 -134
- package/dist/conversation.js.map +1 -1
- package/dist/data/conversations.js +70 -50
- package/dist/data/conversations.js.map +1 -1
- package/dist/data/messages.js +40 -27
- package/dist/data/messages.js.map +1 -1
- package/dist/data/participants.js +38 -32
- package/dist/data/participants.js.map +1 -1
- package/dist/data/users.js +19 -14
- package/dist/data/users.js.map +1 -1
- package/dist/detailed-delivery-receipt.js +9 -4
- package/dist/detailed-delivery-receipt.js.map +1 -1
- package/dist/index.js +26 -41
- package/dist/index.js.map +1 -1
- package/dist/interfaces/notification-types.js +9 -4
- package/dist/interfaces/notification-types.js.map +1 -1
- package/dist/interfaces/{attributes.js → rules.js} +26 -13
- package/dist/interfaces/rules.js.map +1 -0
- package/dist/logger.js +17 -28
- package/dist/logger.js.map +1 -1
- package/dist/media.js +40 -24
- package/dist/media.js.map +1 -1
- package/dist/message-builder.js +79 -12
- 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 +258 -92
- package/dist/message.js.map +1 -1
- package/dist/node_modules/quick-lru/index.js +261 -0
- package/dist/node_modules/quick-lru/index.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +15 -5
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/packages/conversations/package.json.js +12 -7
- package/dist/packages/conversations/package.json.js.map +1 -1
- package/dist/participant.js +42 -38
- package/dist/participant.js.map +1 -1
- package/dist/push-notification.js +9 -4
- package/dist/push-notification.js.map +1 -1
- package/dist/rest-paginator.js +9 -4
- package/dist/rest-paginator.js.map +1 -1
- package/dist/services/network.js +11 -6
- package/dist/services/network.js.map +1 -1
- package/dist/services/typing-indicator.js +17 -11
- package/dist/services/typing-indicator.js.map +1 -1
- package/dist/unsent-message.js +14 -9
- package/dist/unsent-message.js.map +1 -1
- package/dist/user.js +40 -32
- package/dist/user.js.map +1 -1
- package/dist/util/deferred.js +9 -4
- package/dist/util/deferred.js.map +1 -1
- package/dist/util/index.js +44 -8
- package/dist/util/index.js.map +1 -1
- package/docs/assets/js/search.js +1 -1
- package/docs/classes/AggregatedDeliveryReceipt.html +1 -1
- package/docs/classes/ChannelMetadata.html +3050 -0
- package/docs/classes/Client.html +98 -27
- package/docs/classes/ContentTemplate.html +3116 -0
- package/docs/classes/ContentTemplateVariable.html +3116 -0
- package/docs/classes/Conversation.html +46 -9
- package/docs/classes/EmailRecipientDescriptor.html +3098 -0
- package/docs/classes/Message.html +99 -5
- package/docs/classes/MessageBuilder.html +41 -0
- package/docs/classes/Participant.html +2 -2
- package/docs/classes/UnknownRecipientDescriptor.html +3067 -0
- package/docs/index.html +892 -28
- package/docs/interfaces/ClientOptions.html +32 -0
- package/docs/interfaces/CreateConversationOptions.html +17 -0
- package/docs/modules.html +891 -27
- package/package.json +21 -19
- package/CHANGELOG.md +0 -501
- package/dist/interfaces/attributes.js.map +0 -1
|
@@ -2789,6 +2789,9 @@ img {
|
|
|
2789
2789
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
2790
2790
|
<a href="Conversation.html#getAttributes" class="tsd-kind-icon">get<wbr>Attributes</a>
|
|
2791
2791
|
</li>
|
|
2792
|
+
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
2793
|
+
<a href="Conversation.html#getMessageRecipients" class="tsd-kind-icon">get<wbr>Message<wbr>Recipients</a>
|
|
2794
|
+
</li>
|
|
2792
2795
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
2793
2796
|
<a href="Conversation.html#getMessages" class="tsd-kind-icon">get<wbr>Messages</a>
|
|
2794
2797
|
</li>
|
|
@@ -2926,6 +2929,7 @@ img {
|
|
|
2926
2929
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Conversation.html#advanceLastReadMessageIndex" class="tsd-kind-icon">advance<wbr>Last<wbr>Read<wbr>Message<wbr>Index</a></li>
|
|
2927
2930
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Conversation.html#delete" class="tsd-kind-icon">delete</a></li>
|
|
2928
2931
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Conversation.html#getAttributes" class="tsd-kind-icon">get<wbr>Attributes</a></li>
|
|
2932
|
+
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Conversation.html#getMessageRecipients" class="tsd-kind-icon">get<wbr>Message<wbr>Recipients</a></li>
|
|
2929
2933
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Conversation.html#getMessages" class="tsd-kind-icon">get<wbr>Messages</a></li>
|
|
2930
2934
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Conversation.html#getMessagesCount" class="tsd-kind-icon">get<wbr>Messages<wbr>Count</a></li>
|
|
2931
2935
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Conversation.html#getParticipantByIdentity" class="tsd-kind-icon">get<wbr>Participant<wbr>ByIdentity</a></li>
|
|
@@ -3391,7 +3395,7 @@ img {
|
|
|
3391
3395
|
<a name="add" class="tsd-anchor"></a>
|
|
3392
3396
|
<h3>add</h3>
|
|
3393
3397
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
3394
|
-
<li class="tsd-signature tsd-kind-icon">add<span class="tsd-signature-symbol">(</span>identity<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, attributes<span class="tsd-signature-symbol">?: </span><a href="../modules.html#JSONValue" class="tsd-signature-type" data-tsd-kind="Type alias">JSONValue</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><
|
|
3398
|
+
<li class="tsd-signature tsd-kind-icon">add<span class="tsd-signature-symbol">(</span>identity<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, attributes<span class="tsd-signature-symbol">?: </span><a href="../modules.html#JSONValue" class="tsd-signature-type" data-tsd-kind="Type alias">JSONValue</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ParticipantResponse</span><span class="tsd-signature-symbol">></span></li>
|
|
3395
3399
|
</ul>
|
|
3396
3400
|
<ul class="tsd-descriptions">
|
|
3397
3401
|
<li class="tsd-description">
|
|
@@ -3417,7 +3421,7 @@ img {
|
|
|
3417
3421
|
</div>
|
|
3418
3422
|
</li>
|
|
3419
3423
|
</ul>
|
|
3420
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><
|
|
3424
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ParticipantResponse</span><span class="tsd-signature-symbol">></span></h4>
|
|
3421
3425
|
<p>The added participant.</p>
|
|
3422
3426
|
</li>
|
|
3423
3427
|
</ul>
|
|
@@ -3426,7 +3430,7 @@ img {
|
|
|
3426
3430
|
<a name="addNonChatParticipant" class="tsd-anchor"></a>
|
|
3427
3431
|
<h3>add<wbr>Non<wbr>Chat<wbr>Participant</h3>
|
|
3428
3432
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
3429
|
-
<li class="tsd-signature tsd-kind-icon">add<wbr>Non<wbr>Chat<wbr>Participant<span class="tsd-signature-symbol">(</span>proxyAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, address<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, attributes<span class="tsd-signature-symbol">?: </span><a href="../modules.html#JSONValue" class="tsd-signature-type" data-tsd-kind="Type alias">JSONValue</a>, bindingOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ParticipantBindingOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><
|
|
3433
|
+
<li class="tsd-signature tsd-kind-icon">add<wbr>Non<wbr>Chat<wbr>Participant<span class="tsd-signature-symbol">(</span>proxyAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, address<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, attributes<span class="tsd-signature-symbol">?: </span><a href="../modules.html#JSONValue" class="tsd-signature-type" data-tsd-kind="Type alias">JSONValue</a>, bindingOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ParticipantBindingOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ParticipantResponse</span><span class="tsd-signature-symbol">></span></li>
|
|
3430
3434
|
</ul>
|
|
3431
3435
|
<ul class="tsd-descriptions">
|
|
3432
3436
|
<li class="tsd-description">
|
|
@@ -3465,7 +3469,7 @@ img {
|
|
|
3465
3469
|
</div>
|
|
3466
3470
|
</li>
|
|
3467
3471
|
</ul>
|
|
3468
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><
|
|
3472
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ParticipantResponse</span><span class="tsd-signature-symbol">></span></h4>
|
|
3469
3473
|
<p>The added participant.</p>
|
|
3470
3474
|
</li>
|
|
3471
3475
|
</ul>
|
|
@@ -3540,6 +3544,34 @@ img {
|
|
|
3540
3544
|
</li>
|
|
3541
3545
|
</ul>
|
|
3542
3546
|
</section>
|
|
3547
|
+
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
3548
|
+
<a name="getMessageRecipients" class="tsd-anchor"></a>
|
|
3549
|
+
<h3>get<wbr>Message<wbr>Recipients</h3>
|
|
3550
|
+
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
3551
|
+
<li class="tsd-signature tsd-kind-icon">get<wbr>Message<wbr>Recipients<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">PaginatorOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/Paginator.html" class="tsd-signature-type" data-tsd-kind="Interface">Paginator</a><span class="tsd-signature-symbol"><</span><a href="../modules.html#RecipientDescriptor" class="tsd-signature-type" data-tsd-kind="Type alias">RecipientDescriptor</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></li>
|
|
3552
|
+
</ul>
|
|
3553
|
+
<ul class="tsd-descriptions">
|
|
3554
|
+
<li class="tsd-description">
|
|
3555
|
+
<aside class="tsd-sources">
|
|
3556
|
+
</aside>
|
|
3557
|
+
<div class="tsd-comment tsd-typography">
|
|
3558
|
+
<div class="lead">
|
|
3559
|
+
<p>Get recipients of all messages in the conversation.</p>
|
|
3560
|
+
</div>
|
|
3561
|
+
</div>
|
|
3562
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
3563
|
+
<ul class="tsd-parameters">
|
|
3564
|
+
<li>
|
|
3565
|
+
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">PaginatorOptions</span></h5>
|
|
3566
|
+
<div class="tsd-comment tsd-typography">
|
|
3567
|
+
<p>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.</p>
|
|
3568
|
+
</div>
|
|
3569
|
+
</li>
|
|
3570
|
+
</ul>
|
|
3571
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/Paginator.html" class="tsd-signature-type" data-tsd-kind="Interface">Paginator</a><span class="tsd-signature-symbol"><</span><a href="../modules.html#RecipientDescriptor" class="tsd-signature-type" data-tsd-kind="Type alias">RecipientDescriptor</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4>
|
|
3572
|
+
</li>
|
|
3573
|
+
</ul>
|
|
3574
|
+
</section>
|
|
3543
3575
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
3544
3576
|
<a name="getMessages" class="tsd-anchor"></a>
|
|
3545
3577
|
<h3>get<wbr>Messages</h3>
|
|
@@ -3722,20 +3754,25 @@ img {
|
|
|
3722
3754
|
</aside>
|
|
3723
3755
|
<div class="tsd-comment tsd-typography">
|
|
3724
3756
|
<div class="lead">
|
|
3725
|
-
<p>Get unread messages
|
|
3757
|
+
<p>Get count of unread messages for the user if they are a participant of this
|
|
3726
3758
|
conversation. Rejects if the user is not a participant of the conversation.</p>
|
|
3727
3759
|
</div>
|
|
3728
3760
|
<p>Use this method to obtain the number of unread messages together with
|
|
3729
3761
|
<a href="Conversation.html#updateLastReadMessageIndex">Conversation.updateLastReadMessageIndex</a> instead of relying on the
|
|
3730
3762
|
message indices which may have gaps. See <a href="Message.html#index">Message.index</a> for details.</p>
|
|
3731
3763
|
<p>This method is semi-realtime. This means that this data will be eventually
|
|
3732
|
-
correct, but will also be possibly incorrect for a few seconds. The
|
|
3764
|
+
correct, but it will also be possibly incorrect for a few seconds. The
|
|
3733
3765
|
Conversations system does not provide real time events for counter values
|
|
3734
3766
|
changes.</p>
|
|
3735
3767
|
<p>This is useful for any UI badges, but it is not recommended to build any
|
|
3736
3768
|
core application logic based on these counters being accurate in real time.</p>
|
|
3769
|
+
<p>If the read horizon is not set, this function will return null. This could mean
|
|
3770
|
+
that all messages in the conversation are unread, or that the read horizon system
|
|
3771
|
+
is not being used. How to interpret this <code>null</code> value is up to the customer application.</p>
|
|
3737
3772
|
</div>
|
|
3738
3773
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4>
|
|
3774
|
+
<p>Number of unread messages based on the current read horizon set for
|
|
3775
|
+
the user or <code>null</code> if the read horizon is not set.</p>
|
|
3739
3776
|
</li>
|
|
3740
3777
|
</ul>
|
|
3741
3778
|
</section>
|
|
@@ -3790,7 +3827,7 @@ img {
|
|
|
3790
3827
|
<div class="tsd-comment tsd-typography">
|
|
3791
3828
|
<div class="lead">
|
|
3792
3829
|
<p>New interface to prepare for sending a message.
|
|
3793
|
-
Use this instead of
|
|
3830
|
+
Use this instead of <a href="Conversation.html#sendMessage">Conversation.sendMessage</a>.</p>
|
|
3794
3831
|
</div>
|
|
3795
3832
|
</div>
|
|
3796
3833
|
<h4 class="tsd-returns-title">Returns <a href="MessageBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">MessageBuilder</a></h4>
|
|
@@ -3907,7 +3944,7 @@ img {
|
|
|
3907
3944
|
</div>
|
|
3908
3945
|
</div>
|
|
3909
3946
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4>
|
|
3910
|
-
<p>
|
|
3947
|
+
<p>New count of unread messages after this update.</p>
|
|
3911
3948
|
</li>
|
|
3912
3949
|
</ul>
|
|
3913
3950
|
</section>
|
|
@@ -4043,7 +4080,7 @@ img {
|
|
|
4043
4080
|
</li>
|
|
4044
4081
|
</ul>
|
|
4045
4082
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4>
|
|
4046
|
-
<p>
|
|
4083
|
+
<p>New count of unread messages after this update.</p>
|
|
4047
4084
|
</li>
|
|
4048
4085
|
</ul>
|
|
4049
4086
|
</section>
|