@twilio/conversations 2.4.0-rc.0 → 2.4.0-rc.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 CHANGED
@@ -1,21 +1,21 @@
1
+ # Twilio Conversations client library
1
2
 
2
- Twilio Conversations client library
3
- =============
4
3
  Twilio Conversations: Create meaningful connections with customers across various communication channels.
5
4
  Visit our official site for more detalis: [https://www.twilio.com/conversations](https://www.twilio.com/conversations)
6
5
 
6
+ ## Instantiating and using
7
7
 
8
- Instantiating and using
9
- ------------
10
8
  To use the library you need [to generate a token](https://www.twilio.com/docs/conversations/create-tokens) and pass it to the Conversations Client constructor.
11
9
 
12
10
  ### NPM
11
+
13
12
  ```
14
13
  npm install --save @twilio/conversations
15
14
  ```
16
15
 
17
- Using this method, you can `require` `twilio-conversations` and then use the
16
+ Using this method, you can `require` `twilio-conversations` and then use the
18
17
  client:
18
+
19
19
  ```
20
20
  const { Client } = require('@twilio/conversations');
21
21
 
@@ -33,6 +33,7 @@ client.on('initFailed', ({ error }) => {
33
33
  ```
34
34
 
35
35
  The SDK could also be imported using the ES module syntax:
36
+
36
37
  ```
37
38
  import { Client } from '@twilio/conversations';
38
39
 
@@ -53,10 +54,13 @@ client.on('initFailed', ({ error }) => {
53
54
 
54
55
  Releases of `twilio-conversations.js` are hosted on a CDN, and you can include these
55
56
  directly in your web app using a `<script>` tag.
57
+
56
58
  ```html
57
- <script src="https://media.twiliocdn.com/sdk/js/conversations/v2.3/twilio-conversations.min.js"></script>
59
+ <script src="https://media.twiliocdn.com/sdk/js/conversations/v2.4/twilio-conversations.min.js"></script>
58
60
  ```
61
+
59
62
  Using this method, `twilio-conversations.js` will set a browser global `Twilio.Conversations` through which you can use the client:
63
+
60
64
  ```
61
65
  const client = new Twilio.Conversations.Client(token);
62
66
  ```
@@ -72,13 +76,15 @@ number. While less flexible it is significantly more secure, which is required b
72
76
  To consume securely use the following script snippet format:
73
77
 
74
78
  ```html
75
- <script src="https://media.twiliocdn.com/sdk/js/conversations/releases/2.3.0/twilio-conversations.min.js"
76
- integrity="sha256-<HASH FROM THE CHANGELOGS PAGE>"
77
- crossorigin="anonymous"></script>
79
+ <script
80
+ src="https://media.twiliocdn.com/sdk/js/conversations/releases/2.4.0/twilio-conversations.min.js"
81
+ integrity="sha256-<HASH FROM THE CHANGELOGS PAGE>"
82
+ crossorigin="anonymous"
83
+ ></script>
78
84
  ```
79
85
 
80
- Find the hash of each release published on the [Changelog](#Changelog) page.
86
+ Find the hash of each release published on the [Changelog](#changelog) page.
81
87
 
82
- ### Changelog
88
+ ### Changelog
83
89
 
84
90
  See this [link](https://www.twilio.com/docs/conversations/javascript/changelog).
package/builds/browser.js CHANGED
@@ -7824,7 +7824,7 @@ function PushNotification(data) {
7824
7824
  this.data = data.data || {};
7825
7825
  });
7826
7826
 
7827
- var version = "2.4.0-rc.0";
7827
+ var version = "2.4.0-rc.1";
7828
7828
 
7829
7829
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7830
7830
 
@@ -8572,7 +8572,23 @@ var QuickLRU = /*#__PURE__*/function (_Symbol$iterator) {
8572
8572
 
8573
8573
  var quickLru = QuickLRU;
8574
8574
 
8575
- var ChannelMetadata = /*#__PURE__*/_createClass__default["default"](function ChannelMetadata(type, data) {
8575
+ /**
8576
+ * Represents channel metadata.
8577
+ */
8578
+
8579
+ var ChannelMetadata = /*#__PURE__*/_createClass__default["default"](
8580
+ /**
8581
+ * Communication channel type.
8582
+ */
8583
+
8584
+ /**
8585
+ * The actual metadata.
8586
+ */
8587
+
8588
+ /**
8589
+ * @internal
8590
+ */
8591
+ function ChannelMetadata(type, data) {
8576
8592
  _classCallCheck__default["default"](this, ChannelMetadata);
8577
8593
 
8578
8594
  this.type = type;
@@ -10240,6 +10256,7 @@ Object.defineProperty(exports, 'CancellablePromise', {
10240
10256
  get: function () { return mcsClient.CancellablePromise; }
10241
10257
  });
10242
10258
  exports.AggregatedDeliveryReceipt = AggregatedDeliveryReceipt;
10259
+ exports.ChannelMetadata = ChannelMetadata;
10243
10260
  exports.ContentTemplate = ContentTemplate;
10244
10261
  exports.ContentTemplateVariable = ContentTemplateVariable;
10245
10262
  exports.Conversation = Conversation;