@twilio/conversations 3.0.0-rc.1 → 3.0.0-rc.7
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/CHANGELOG.md +57 -0
- package/README.md +7 -3
- package/builds/browser.js +1643 -1410
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +270 -182
- package/builds/lib.js +1643 -1410
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +3719 -4034
- package/builds/twilio-conversations.min.js +1 -16
- package/dist/aggregated-delivery-receipt.js.map +1 -1
- package/dist/client.js +53 -35
- package/dist/client.js.map +1 -1
- package/dist/command-executor.js.map +1 -1
- package/dist/configuration.js.map +1 -1
- package/dist/conversation.js +405 -376
- package/dist/conversation.js.map +1 -1
- package/dist/data/conversations.js +10 -11
- package/dist/data/conversations.js.map +1 -1
- package/dist/data/messages.js +9 -9
- package/dist/data/messages.js.map +1 -1
- package/dist/data/participants.js +19 -10
- package/dist/data/participants.js.map +1 -1
- package/dist/data/users.js +2 -2
- package/dist/data/users.js.map +1 -1
- package/dist/detailed-delivery-receipt.js.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/interfaces/attributes.js.map +1 -1
- package/dist/interfaces/notification-types.js.map +1 -1
- package/dist/logger.js +2 -4
- package/dist/logger.js.map +1 -1
- package/dist/media.js.map +1 -1
- package/dist/message-builder.js.map +1 -1
- package/dist/message.js +16 -12
- package/dist/message.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -1
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/packages/conversations/package.json.js +1 -1
- package/dist/participant.js +2 -2
- package/dist/participant.js.map +1 -1
- package/dist/push-notification.js.map +1 -1
- package/dist/rest-paginator.js.map +1 -1
- package/dist/services/network.js.map +1 -1
- package/dist/services/typing-indicator.js +1 -1
- package/dist/services/typing-indicator.js.map +1 -1
- package/dist/unsent-message.js.map +1 -1
- package/dist/user.js +1 -1
- package/dist/user.js.map +1 -1
- package/dist/util/deferred.js.map +1 -1
- package/dist/util/index.js.map +1 -1
- package/docs/assets/js/search.js +1 -1
- package/docs/classes/CancellablePromise.html +3213 -0
- package/docs/classes/Client.html +4 -10
- package/docs/classes/Conversation.html +80 -51
- package/docs/classes/Media.html +2 -2
- package/docs/classes/Message.html +6 -6
- package/docs/classes/MessageBuilder.html +2 -2
- package/docs/classes/PushNotification.html +1 -1
- package/docs/classes/UnsentMessage.html +2 -2
- package/docs/index.html +20 -25
- package/docs/interfaces/ConversationState.html +2 -2
- package/docs/interfaces/ConversationUpdatedEventArgs.html +3001 -0
- package/docs/interfaces/PushNotificationData.html +48 -0
- package/docs/modules.html +19 -24
- package/package.json +21 -19
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,63 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [3.0.0-rc.5](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.4...@twilio/conversations@3.0.0-rc.5) (2022-05-04)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* Add cancellable promise export from conversations ([04bd2fc](https://github.com/twilio/rtd-sdk-monorepo-js/commit/04bd2fc10ca1331fbcddf94a186eec351ea922f1))
|
12
|
+
* Fix promise cancelling retrier ([9b30ce2](https://github.com/twilio/rtd-sdk-monorepo-js/commit/9b30ce2750b7447f28e745513f7e1a29e2c48127))
|
13
|
+
* Make stateChanged failed error informative ([a301fdb](https://github.com/twilio/rtd-sdk-monorepo-js/commit/a301fdbe0950a87d0c12ee55688d461bd603cbda))
|
14
|
+
* Map media to empty medias field ([75ee36d](https://github.com/twilio/rtd-sdk-monorepo-js/commit/75ee36d600ec19a45ac5e471c61b6c68bdc47bc8))
|
15
|
+
* Parse APN with undefined alert ([f1d86d8](https://github.com/twilio/rtd-sdk-monorepo-js/commit/f1d86d86d949f8dd6eb96526364bf8c68067a403))
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
## [3.0.0-rc.4](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.3...@twilio/conversations@3.0.0-rc.4) (2022-05-02)
|
20
|
+
|
21
|
+
**Note:** Version bump only for package @twilio/conversations
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
## [3.0.0-rc.3](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.2...@twilio/conversations@3.0.0-rc.3) (2022-05-02)
|
28
|
+
|
29
|
+
|
30
|
+
### ⚠ BREAKING CHANGES
|
31
|
+
|
32
|
+
* Participant add methods now return the added participants
|
33
|
+
|
34
|
+
### Features
|
35
|
+
|
36
|
+
* Participant add methods now return the added participants ([6547478](https://github.com/twilio/rtd-sdk-monorepo-js/commit/6547478aaa3c358c9f78e2c2c178c9eb36b28485))
|
37
|
+
|
38
|
+
|
39
|
+
### Bug Fixes
|
40
|
+
|
41
|
+
* Add runtime validation, fix error messages wording ([c03fd6c](https://github.com/twilio/rtd-sdk-monorepo-js/commit/c03fd6cda5b38032916835734ea002799f460eec))
|
42
|
+
* Add runtime validation, fix error messages wording ([e0e986d](https://github.com/twilio/rtd-sdk-monorepo-js/commit/e0e986d33ac7a5a0c98588dc38ffbd41a22b823e))
|
43
|
+
* Fix faulty type definitions by upgrading tooling ([b6d25ce](https://github.com/twilio/rtd-sdk-monorepo-js/commit/b6d25cecb08ab4e0d369430b90a786e1b275af91))
|
44
|
+
* Update pinning tools to new Python version ([50a6c78](https://github.com/twilio/rtd-sdk-monorepo-js/commit/50a6c78b9d717b0e7531919e1f7cb409474c3df5))
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
## [3.0.0-rc.2](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.1...@twilio/conversations@3.0.0-rc.2) (2022-04-13)
|
49
|
+
|
50
|
+
|
51
|
+
### Features
|
52
|
+
|
53
|
+
* Migrate Twilsock to ReplayEventEmitter ([6db99dd](https://github.com/twilio/rtd-sdk-monorepo-js/commit/6db99dd3cc207298870aff1835acad6f866d7c05))
|
54
|
+
|
55
|
+
|
56
|
+
### Bug Fixes
|
57
|
+
|
58
|
+
* Fix client initialization when a connected Twilsock is passed ([49aa87e](https://github.com/twilio/rtd-sdk-monorepo-js/commit/49aa87ecc8cc0dd30ac56fd563fb4a2af832610b))
|
59
|
+
* Fix push notification data type ([fa44301](https://github.com/twilio/rtd-sdk-monorepo-js/commit/fa44301c985f23efa5a7299d2987ba3772d51a24))
|
60
|
+
|
61
|
+
|
62
|
+
|
6
63
|
## [3.0.0-rc.1](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.0...@twilio/conversations@3.0.0-rc.1) (2022-03-16)
|
7
64
|
|
8
65
|
**Note:** Version bump only for package @twilio/conversations
|
package/README.md
CHANGED
@@ -21,10 +21,14 @@ const { Client } = require('@twilio/conversations');
|
|
21
21
|
const client = new Client(token);
|
22
22
|
// Before you use the client, subscribe to the `'stateChanged'` event and wait
|
23
23
|
// for the `'initialized'` state to be reported.
|
24
|
-
client.on('stateChanged', (state) => {
|
24
|
+
client.on('stateChanged', ({ state, error }) => {
|
25
25
|
if (state === 'initialized') {
|
26
26
|
// Use the client
|
27
27
|
}
|
28
|
+
|
29
|
+
if (error) {
|
30
|
+
// Handle error
|
31
|
+
}
|
28
32
|
}
|
29
33
|
```
|
30
34
|
|
@@ -46,7 +50,7 @@ client.on('stateChanged', (state) => {
|
|
46
50
|
Releases of `twilio-conversations.js` are hosted on a CDN, and you can include these
|
47
51
|
directly in your web app using a `<script>` tag.
|
48
52
|
```html
|
49
|
-
<script src="https://media.twiliocdn.com/sdk/js/conversations/
|
53
|
+
<script src="https://media.twiliocdn.com/sdk/js/conversations/v3.0.0/twilio-conversations.min.js"></script>
|
50
54
|
```
|
51
55
|
Using this method, `twilio-conversations.js` will set a browser global `Twilio.Conversations` through which you can use the client:
|
52
56
|
```
|
@@ -64,7 +68,7 @@ number. While less flexible it is significantly more secure, which is required b
|
|
64
68
|
To consume securely use the following script snippet format:
|
65
69
|
|
66
70
|
```html
|
67
|
-
<script src="https://media.twiliocdn.com/sdk/js/conversations/releases/
|
71
|
+
<script src="https://media.twiliocdn.com/sdk/js/conversations/releases/3.0.0/twilio-conversations.min.js"
|
68
72
|
integrity="sha256-<HASH FROM THE CHANGELOGS PAGE>"
|
69
73
|
crossorigin="anonymous"></script>
|
70
74
|
```
|