@twilio/conversations 2.2.0-rc.9 → 2.2.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.
@@ -3722,20 +3722,25 @@ img {
3722
3722
  </aside>
3723
3723
  <div class="tsd-comment tsd-typography">
3724
3724
  <div class="lead">
3725
- <p>Get unread messages count for the user if they are a participant of this
3725
+ <p>Get count of unread messages for the user if they are a participant of this
3726
3726
  conversation. Rejects if the user is not a participant of the conversation.</p>
3727
3727
  </div>
3728
3728
  <p>Use this method to obtain the number of unread messages together with
3729
3729
  <a href="Conversation.html#updateLastReadMessageIndex">Conversation.updateLastReadMessageIndex</a> instead of relying on the
3730
3730
  message indices which may have gaps. See <a href="Message.html#index">Message.index</a> for details.</p>
3731
3731
  <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
3732
+ correct, but it will also be possibly incorrect for a few seconds. The
3733
3733
  Conversations system does not provide real time events for counter values
3734
3734
  changes.</p>
3735
3735
  <p>This is useful for any UI badges, but it is not recommended to build any
3736
3736
  core application logic based on these counters being accurate in real time.</p>
3737
+ <p>If the read horizon is not set, this function will return null. This could mean
3738
+ that all messages in the conversation are unread, or that the read horizon system
3739
+ is not being used. How to interpret this <code>null</code> value is up to the customer application.</p>
3737
3740
  </div>
3738
3741
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4>
3742
+ <p>Number of unread messages based on the current read horizon set for
3743
+ the user or <code>null</code> if the read horizon is not set.</p>
3739
3744
  </li>
3740
3745
  </ul>
3741
3746
  </section>
@@ -3907,7 +3912,7 @@ img {
3907
3912
  </div>
3908
3913
  </div>
3909
3914
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4>
3910
- <p>Resulting unread messages count in the conversation.</p>
3915
+ <p>New count of unread messages after this update.</p>
3911
3916
  </li>
3912
3917
  </ul>
3913
3918
  </section>
@@ -4043,7 +4048,7 @@ img {
4043
4048
  </li>
4044
4049
  </ul>
4045
4050
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4>
4046
- <p>Resulting unread messages count in the conversation.</p>
4051
+ <p>New count of unread messages after this update.</p>
4047
4052
  </li>
4048
4053
  </ul>
4049
4054
  </section>
@@ -3043,13 +3043,13 @@ img {
3043
3043
  </aside>
3044
3044
  <div class="tsd-comment tsd-typography">
3045
3045
  <div class="lead">
3046
- <p>Index of the message in the conversation&#39;s messages list.
3047
- By design of the Conversations system, the message indices may have arbitrary gaps between them,
3048
- that does not necessarily mean they were deleted or otherwise modified - just that
3049
- messages may have some non-contiguous indices even if they are being sent immediately one after another.</p>
3046
+ <p>Index of this message in the conversation&#39;s list of messages.</p>
3050
3047
  </div>
3048
+ <p>By design, the message indices may have arbitrary gaps between them,
3049
+ that does not necessarily mean they were deleted or otherwise modified - just that
3050
+ messages may have some non-contiguous indices even if they are being sent immediately one after another.</p>
3051
3051
  <p>Trying to use indices for some calculations is going to be unreliable.</p>
3052
- <p>To calculate the number of unread messages it is better to use the read horizon API.
3052
+ <p>To calculate the number of unread messages, it is better to use the Read Horizon API.
3053
3053
  See <a href="Conversation.html#getUnreadMessagesCount">Conversation.getUnreadMessagesCount</a> for details.</p>
3054
3054
  </div>
3055
3055
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
package/docs/index.html CHANGED
@@ -2857,36 +2857,40 @@ img {
2857
2857
  <p>Using this method, you can <code>require</code> <code>twilio-conversations</code> and then use the
2858
2858
  client:</p>
2859
2859
  <pre><code><span style="color: #0000FF">const</span><span style="color: #000000"> { </span><span style="color: #0070C1">Client</span><span style="color: #000000"> } = </span><span style="color: #795E26">require</span><span style="color: #000000">(</span><span style="color: #A31515">'@twilio/conversations'</span><span style="color: #000000">);</span>
2860
+
2860
2861
  <span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">client</span><span style="color: #000000"> = </span><span style="color: #0000FF">new</span><span style="color: #000000"> </span><span style="color: #795E26">Client</span><span style="color: #000000">(</span><span style="color: #001080">token</span><span style="color: #000000">);</span>
2861
- <span style="color: #008000">// Before you use the client, subscribe to the `'stateChanged'` event and wait </span>
2862
- <span style="color: #008000">// for the `'initialized'` state to be reported.</span>
2863
- <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">'stateChanged'</span><span style="color: #000000">, ({ </span><span style="color: #001080">state</span><span style="color: #000000">, </span><span style="color: #001080">error</span><span style="color: #000000"> }) </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2864
- <span style="color: #000000"> </span><span style="color: #AF00DB">if</span><span style="color: #000000"> (</span><span style="color: #001080">state</span><span style="color: #000000"> === </span><span style="color: #A31515">'initialized'</span><span style="color: #000000">) {</span>
2865
- <span style="color: #000000"> </span><span style="color: #008000">// Use the client</span>
2866
- <span style="color: #000000"> }</span>
2867
- <span style="color: #000000"> </span>
2868
- <span style="color: #000000"> </span><span style="color: #AF00DB">if</span><span style="color: #000000"> (</span><span style="color: #001080">error</span><span style="color: #000000">) {</span>
2869
- <span style="color: #000000"> </span><span style="color: #008000">// Handle error</span>
2870
- <span style="color: #000000"> }</span>
2862
+
2863
+ <span style="color: #008000">// Before you use the client, subscribe to the `'initialized'` event.</span>
2864
+ <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">'initialized'</span><span style="color: #000000">, () </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2865
+ <span style="color: #000000"> </span><span style="color: #008000">// Use the client.</span>
2871
2866
  <span style="color: #000000">}</span>
2867
+
2868
+ <span style="color: #008000">// To catch client initialization errors, subscribe to the `'initFailed'` event.</span>
2869
+ <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">'initFailed'</span><span style="color: #000000">, ({ </span><span style="color: #001080">error</span><span style="color: #000000"> }) </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2870
+ <span style="color: #000000"> </span><span style="color: #008000">// Handle the error.</span>
2871
+ <span style="color: #000000">});</span>
2872
2872
  </code></pre>
2873
2873
  <p>The SDK could also be imported using the ES module syntax:</p>
2874
2874
  <pre><code><span style="color: #AF00DB">import</span><span style="color: #000000"> { </span><span style="color: #001080">Client</span><span style="color: #000000"> } </span><span style="color: #AF00DB">from</span><span style="color: #000000"> </span><span style="color: #A31515">'@twilio/conversations'</span><span style="color: #000000">;</span>
2875
+
2875
2876
  <span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">client</span><span style="color: #000000"> = </span><span style="color: #0000FF">new</span><span style="color: #000000"> </span><span style="color: #795E26">Client</span><span style="color: #000000">(</span><span style="color: #001080">token</span><span style="color: #000000">);</span>
2876
- <span style="color: #008000">// Before you use the client, subscribe to the `'stateChanged'` event and wait </span>
2877
- <span style="color: #008000">// for the `'initialized'` state to be reported.</span>
2878
- <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">'stateChanged'</span><span style="color: #000000">, ({ </span><span style="color: #001080">state</span><span style="color: #000000">, </span><span style="color: #001080">error</span><span style="color: #000000"> }) </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2879
- <span style="color: #000000"> </span><span style="color: #AF00DB">if</span><span style="color: #000000"> (</span><span style="color: #001080">state</span><span style="color: #000000"> === </span><span style="color: #A31515">'initialized'</span><span style="color: #000000">) {</span>
2880
- <span style="color: #000000"> </span><span style="color: #008000">// Use the client</span>
2881
- <span style="color: #000000"> }</span>
2877
+
2878
+ <span style="color: #008000">// Before you use the client, subscribe to the `'initialized'` event.</span>
2879
+ <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">'initialized'</span><span style="color: #000000">, () </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2880
+ <span style="color: #000000"> </span><span style="color: #008000">// Use the client.</span>
2882
2881
  <span style="color: #000000">}</span>
2882
+
2883
+ <span style="color: #008000">// To catch client initialization errors, subscribe to the `'initFailed'` event.</span>
2884
+ <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">'initFailed'</span><span style="color: #000000">, ({ </span><span style="color: #001080">error</span><span style="color: #000000"> }) </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2885
+ <span style="color: #000000"> </span><span style="color: #008000">// Handle the error.</span>
2886
+ <span style="color: #000000">});</span>
2883
2887
  </code></pre>
2884
2888
  <a href="#cdn" id="cdn" style="color: inherit; text-decoration: none;">
2885
2889
  <h3>CDN</h3>
2886
2890
  </a>
2887
2891
  <p>Releases of <code>twilio-conversations.js</code> are hosted on a CDN, and you can include these
2888
2892
  directly in your web app using a <code>&lt;script&gt;</code> tag.</p>
2889
- <pre><code class="language-html"><span style="color: #800000">&lt;script</span><span style="color: #000000FF"> </span><span style="color: #FF0000">src</span><span style="color: #000000FF">=</span><span style="color: #0000FF">"https://media.twiliocdn.com/sdk/js/conversations/v3.0/twilio-conversations.min.js"</span><span style="color: #800000">&gt;&lt;/script&gt;</span>
2893
+ <pre><code class="language-html"><span style="color: #800000">&lt;script</span><span style="color: #000000FF"> </span><span style="color: #FF0000">src</span><span style="color: #000000FF">=</span><span style="color: #0000FF">"https://media.twiliocdn.com/sdk/js/conversations/v2.2/twilio-conversations.min.js"</span><span style="color: #800000">&gt;&lt;/script&gt;</span>
2890
2894
  </code></pre>
2891
2895
  <p>Using this method, <code>twilio-conversations.js</code> will set a browser global <code>Twilio.Conversations</code> through which you can use the client:</p>
2892
2896
  <pre><code><span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">client</span><span style="color: #000000"> = </span><span style="color: #0000FF">new</span><span style="color: #000000"> </span><span style="color: #001080">Twilio</span><span style="color: #000000">.</span><span style="color: #001080">Conversations</span><span style="color: #000000">.</span><span style="color: #795E26">Client</span><span style="color: #000000">(</span><span style="color: #001080">token</span><span style="color: #000000">);</span>
@@ -2899,13 +2903,13 @@ img {
2899
2903
  <p>If you require more security you will have to consume SDK by using <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity">SRI</a> and using an exact version
2900
2904
  number. While less flexible it is significantly more secure, which is required by some applications.</p>
2901
2905
  <p>To consume securely use the following script snippet format:</p>
2902
- <pre><code class="language-html"><span style="color: #800000">&lt;script</span><span style="color: #000000FF"> </span><span style="color: #FF0000">src</span><span style="color: #000000FF">=</span><span style="color: #0000FF">"https://media.twiliocdn.com/sdk/js/conversations/releases/3.0.0/twilio-conversations.min.js"</span>
2906
+ <pre><code class="language-html"><span style="color: #800000">&lt;script</span><span style="color: #000000FF"> </span><span style="color: #FF0000">src</span><span style="color: #000000FF">=</span><span style="color: #0000FF">"https://media.twiliocdn.com/sdk/js/conversations/releases/2.2.0/twilio-conversations.min.js"</span>
2903
2907
  <span style="color: #000000FF"> </span><span style="color: #FF0000">integrity</span><span style="color: #000000FF">=</span><span style="color: #0000FF">"sha256-&lt;HASH FROM THE CHANGELOGS PAGE&gt;"</span>
2904
2908
  <span style="color: #000000FF"> </span><span style="color: #FF0000">crossorigin</span><span style="color: #000000FF">=</span><span style="color: #0000FF">"anonymous"</span><span style="color: #800000">&gt;&lt;/script&gt;</span>
2905
2909
  </code></pre>
2906
2910
  <p>Find the hash of each release published on the <a href="#Changelog">Changelog</a> page.</p>
2907
2911
  <a href="#changelog" id="changelog" style="color: inherit; text-decoration: none;">
2908
- <h2>Supported Browsers</h2><table><thead><tr><th>Browser</th><th>Supported Versions</th></tr></thead><tbody><tr><td>Chrome for Android</td><td>100</td></tr><tr><td>Firefox for Android</td><td>99</td></tr><tr><td>UC Browser for Android</td><td>12.12</td></tr><tr><td>Chrome</td><td>100, 99, 98</td></tr><tr><td>Edge</td><td>100, 99, 98</td></tr><tr><td>Firefox</td><td>99, 98, 97</td></tr><tr><td>Internet Explorer</td><td>11</td></tr><tr><td>Safari for iOS</td><td>15.4, 15.2-15.3</td></tr><tr><td>Safari</td><td>15.4, 15.2-15.3, 15.1</td></tr><tr><td>Samsung Internet</td><td>16.0, 15.0</td></tr></tbody></table><h3>Changelog</h3>
2912
+ <h2>Supported Browsers</h2><table><thead><tr><th>Browser</th><th>Supported Versions</th></tr></thead><tbody><tr><td>Chrome for Android</td><td>104</td></tr><tr><td>Firefox for Android</td><td>101</td></tr><tr><td>UC Browser for Android</td><td>12.12</td></tr><tr><td>Chrome</td><td>104, 103, 102</td></tr><tr><td>Edge</td><td>104, 103, 102</td></tr><tr><td>Firefox</td><td>103, 102, 101</td></tr><tr><td>Internet Explorer</td><td>11</td></tr><tr><td>Safari for iOS</td><td>15.6, 15.5</td></tr><tr><td>Safari</td><td>15.6, 15.5, 15.4</td></tr><tr><td>Samsung Internet</td><td>18.0, 17.0</td></tr></tbody></table><h3>Changelog</h3>
2909
2913
  </a>
2910
2914
  <p>See this <a href="https://www.twilio.com/docs/conversations/javascript/changelog">link</a>.</p>
2911
2915
  </div>
package/docs/modules.html CHANGED
@@ -2859,36 +2859,40 @@ img {
2859
2859
  <p>Using this method, you can <code>require</code> <code>twilio-conversations</code> and then use the
2860
2860
  client:</p>
2861
2861
  <pre><code><span style="color: #0000FF">const</span><span style="color: #000000"> { </span><span style="color: #0070C1">Client</span><span style="color: #000000"> } = </span><span style="color: #795E26">require</span><span style="color: #000000">(</span><span style="color: #A31515">&#039;@twilio/conversations&#039;</span><span style="color: #000000">);</span>
2862
+
2862
2863
  <span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">client</span><span style="color: #000000"> = </span><span style="color: #0000FF">new</span><span style="color: #000000"> </span><span style="color: #795E26">Client</span><span style="color: #000000">(</span><span style="color: #001080">token</span><span style="color: #000000">);</span>
2863
- <span style="color: #008000">// Before you use the client, subscribe to the `&#039;stateChanged&#039;` event and wait </span>
2864
- <span style="color: #008000">// for the `&#039;initialized&#039;` state to be reported.</span>
2865
- <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">&#039;stateChanged&#039;</span><span style="color: #000000">, ({ </span><span style="color: #001080">state</span><span style="color: #000000">, </span><span style="color: #001080">error</span><span style="color: #000000"> }) </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2866
- <span style="color: #000000"> </span><span style="color: #AF00DB">if</span><span style="color: #000000"> (</span><span style="color: #001080">state</span><span style="color: #000000"> === </span><span style="color: #A31515">&#039;initialized&#039;</span><span style="color: #000000">) {</span>
2867
- <span style="color: #000000"> </span><span style="color: #008000">// Use the client</span>
2868
- <span style="color: #000000"> }</span>
2869
- <span style="color: #000000"> </span>
2870
- <span style="color: #000000"> </span><span style="color: #AF00DB">if</span><span style="color: #000000"> (</span><span style="color: #001080">error</span><span style="color: #000000">) {</span>
2871
- <span style="color: #000000"> </span><span style="color: #008000">// Handle error</span>
2872
- <span style="color: #000000"> }</span>
2864
+
2865
+ <span style="color: #008000">// Before you use the client, subscribe to the `&#039;initialized&#039;` event.</span>
2866
+ <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">&#039;initialized&#039;</span><span style="color: #000000">, () </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2867
+ <span style="color: #000000"> </span><span style="color: #008000">// Use the client.</span>
2873
2868
  <span style="color: #000000">}</span>
2869
+
2870
+ <span style="color: #008000">// To catch client initialization errors, subscribe to the `&#039;initFailed&#039;` event.</span>
2871
+ <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">&#039;initFailed&#039;</span><span style="color: #000000">, ({ </span><span style="color: #001080">error</span><span style="color: #000000"> }) </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2872
+ <span style="color: #000000"> </span><span style="color: #008000">// Handle the error.</span>
2873
+ <span style="color: #000000">});</span>
2874
2874
  </code></pre>
2875
2875
  <p>The SDK could also be imported using the ES module syntax:</p>
2876
2876
  <pre><code><span style="color: #AF00DB">import</span><span style="color: #000000"> { </span><span style="color: #001080">Client</span><span style="color: #000000"> } </span><span style="color: #AF00DB">from</span><span style="color: #000000"> </span><span style="color: #A31515">&#039;@twilio/conversations&#039;</span><span style="color: #000000">;</span>
2877
+
2877
2878
  <span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">client</span><span style="color: #000000"> = </span><span style="color: #0000FF">new</span><span style="color: #000000"> </span><span style="color: #795E26">Client</span><span style="color: #000000">(</span><span style="color: #001080">token</span><span style="color: #000000">);</span>
2878
- <span style="color: #008000">// Before you use the client, subscribe to the `&#039;stateChanged&#039;` event and wait </span>
2879
- <span style="color: #008000">// for the `&#039;initialized&#039;` state to be reported.</span>
2880
- <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">&#039;stateChanged&#039;</span><span style="color: #000000">, ({ </span><span style="color: #001080">state</span><span style="color: #000000">, </span><span style="color: #001080">error</span><span style="color: #000000"> }) </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2881
- <span style="color: #000000"> </span><span style="color: #AF00DB">if</span><span style="color: #000000"> (</span><span style="color: #001080">state</span><span style="color: #000000"> === </span><span style="color: #A31515">&#039;initialized&#039;</span><span style="color: #000000">) {</span>
2882
- <span style="color: #000000"> </span><span style="color: #008000">// Use the client</span>
2883
- <span style="color: #000000"> }</span>
2879
+
2880
+ <span style="color: #008000">// Before you use the client, subscribe to the `&#039;initialized&#039;` event.</span>
2881
+ <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">&#039;initialized&#039;</span><span style="color: #000000">, () </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2882
+ <span style="color: #000000"> </span><span style="color: #008000">// Use the client.</span>
2884
2883
  <span style="color: #000000">}</span>
2884
+
2885
+ <span style="color: #008000">// To catch client initialization errors, subscribe to the `&#039;initFailed&#039;` event.</span>
2886
+ <span style="color: #001080">client</span><span style="color: #000000">.</span><span style="color: #795E26">on</span><span style="color: #000000">(</span><span style="color: #A31515">&#039;initFailed&#039;</span><span style="color: #000000">, ({ </span><span style="color: #001080">error</span><span style="color: #000000"> }) </span><span style="color: #0000FF">=&gt;</span><span style="color: #000000"> {</span>
2887
+ <span style="color: #000000"> </span><span style="color: #008000">// Handle the error.</span>
2888
+ <span style="color: #000000">});</span>
2885
2889
  </code></pre>
2886
2890
  <a href="#cdn" id="cdn" style="color: inherit; text-decoration: none;">
2887
2891
  <h3>CDN</h3>
2888
2892
  </a>
2889
2893
  <p>Releases of <code>twilio-conversations.js</code> are hosted on a CDN, and you can include these
2890
2894
  directly in your web app using a <code>&lt;script&gt;</code> tag.</p>
2891
- <pre><code class="language-html"><span style="color: #800000">&lt;script</span><span style="color: #000000FF"> </span><span style="color: #FF0000">src</span><span style="color: #000000FF">=</span><span style="color: #0000FF">&quot;https://media.twiliocdn.com/sdk/js/conversations/v3.0/twilio-conversations.min.js&quot;</span><span style="color: #800000">&gt;&lt;/script&gt;</span>
2895
+ <pre><code class="language-html"><span style="color: #800000">&lt;script</span><span style="color: #000000FF"> </span><span style="color: #FF0000">src</span><span style="color: #000000FF">=</span><span style="color: #0000FF">&quot;https://media.twiliocdn.com/sdk/js/conversations/v2.2/twilio-conversations.min.js&quot;</span><span style="color: #800000">&gt;&lt;/script&gt;</span>
2892
2896
  </code></pre>
2893
2897
  <p>Using this method, <code>twilio-conversations.js</code> will set a browser global <code>Twilio.Conversations</code> through which you can use the client:</p>
2894
2898
  <pre><code><span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">client</span><span style="color: #000000"> = </span><span style="color: #0000FF">new</span><span style="color: #000000"> </span><span style="color: #001080">Twilio</span><span style="color: #000000">.</span><span style="color: #001080">Conversations</span><span style="color: #000000">.</span><span style="color: #795E26">Client</span><span style="color: #000000">(</span><span style="color: #001080">token</span><span style="color: #000000">);</span>
@@ -2901,7 +2905,7 @@ img {
2901
2905
  <p>If you require more security you will have to consume SDK by using <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity">SRI</a> and using an exact version
2902
2906
  number. While less flexible it is significantly more secure, which is required by some applications.</p>
2903
2907
  <p>To consume securely use the following script snippet format:</p>
2904
- <pre><code class="language-html"><span style="color: #800000">&lt;script</span><span style="color: #000000FF"> </span><span style="color: #FF0000">src</span><span style="color: #000000FF">=</span><span style="color: #0000FF">&quot;https://media.twiliocdn.com/sdk/js/conversations/releases/3.0.0/twilio-conversations.min.js&quot;</span>
2908
+ <pre><code class="language-html"><span style="color: #800000">&lt;script</span><span style="color: #000000FF"> </span><span style="color: #FF0000">src</span><span style="color: #000000FF">=</span><span style="color: #0000FF">&quot;https://media.twiliocdn.com/sdk/js/conversations/releases/2.2.0/twilio-conversations.min.js&quot;</span>
2905
2909
  <span style="color: #000000FF"> </span><span style="color: #FF0000">integrity</span><span style="color: #000000FF">=</span><span style="color: #0000FF">&quot;sha256-&lt;HASH FROM THE CHANGELOGS PAGE&gt;&quot;</span>
2906
2910
  <span style="color: #000000FF"> </span><span style="color: #FF0000">crossorigin</span><span style="color: #000000FF">=</span><span style="color: #0000FF">&quot;anonymous&quot;</span><span style="color: #800000">&gt;&lt;/script&gt;</span>
2907
2911
  </code></pre>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twilio/conversations",
3
- "version": "2.2.0-rc.9",
3
+ "version": "2.2.0",
4
4
  "description": "Twilio Conversations client library",
5
5
  "main": "./builds/lib.js",
6
6
  "browser": "./builds/browser.js",
@@ -36,12 +36,12 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@babel/runtime": "^7.17.0",
39
- "@twilio/declarative-type-validator": "^0.2.0-rc.3",
40
- "@twilio/deprecation-decorator": "^0.1.0-rc.10",
41
- "@twilio/mcs-client": "^0.6.0-rc.8",
42
- "@twilio/notifications": "^2.0.0-rc.3",
43
- "@twilio/operation-retrier": "^4.0.8-rc.4",
44
- "@twilio/replay-event-emitter": "^0.3.0-rc.4",
39
+ "@twilio/declarative-type-validator": "^0.2.1",
40
+ "@twilio/deprecation-decorator": "^0.2.0",
41
+ "@twilio/mcs-client": "^0.6.1",
42
+ "@twilio/notifications": "^2.0.1",
43
+ "@twilio/operation-retrier": "^4.0.9",
44
+ "@twilio/replay-event-emitter": "^0.3.1",
45
45
  "core-js": "^3.17.3",
46
46
  "iso8601-duration": "=1.2.0",
47
47
  "isomorphic-form-data": "^2.0.0",
@@ -73,7 +73,7 @@
73
73
  "async": "^3.0.1",
74
74
  "async-test-tools": "^1.0.7",
75
75
  "backoff": "^2.5.0",
76
- "browserslist": "^4.20.3",
76
+ "browserslist": "^4.21.3",
77
77
  "chai": "^4.2.0",
78
78
  "chai-as-promised": "^7.1.1",
79
79
  "chai-spies": "^1.0.0",