@twilio/conversations 2.1.0-rc.9 → 2.2.0-rc.11
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 +214 -0
- package/README.md +8 -4
- package/builds/browser.js +2911 -1974
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +572 -285
- package/builds/lib.js +2911 -1974
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +27160 -11795
- package/builds/twilio-conversations.min.js +1 -16
- package/dist/aggregated-delivery-receipt.js.map +1 -1
- package/dist/client.js +466 -281
- package/dist/client.js.map +1 -1
- package/dist/command-executor.js.map +1 -1
- package/dist/configuration.js +2 -2
- package/dist/configuration.js.map +1 -1
- package/dist/conversation.js +426 -370
- package/dist/conversation.js.map +1 -1
- package/dist/data/conversations.js +25 -13
- package/dist/data/conversations.js.map +1 -1
- package/dist/data/messages.js +56 -32
- package/dist/data/messages.js.map +1 -1
- package/dist/data/participants.js +21 -12
- 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 +36 -25
- package/dist/media.js.map +1 -1
- package/dist/message-builder.js +24 -18
- package/dist/message-builder.js.map +1 -1
- package/dist/message.js +89 -17
- 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 +13 -3
- package/dist/unsent-message.js.map +1 -1
- package/dist/user.js +2 -2
- 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 +243 -58
- package/docs/classes/Conversation.html +76 -47
- package/docs/classes/Media.html +2 -28
- package/docs/classes/Message.html +94 -39
- package/docs/classes/MessageBuilder.html +31 -8
- package/docs/classes/PushNotification.html +1 -1
- package/docs/classes/UnsentMessage.html +2 -2
- package/docs/index.html +25 -28
- package/docs/interfaces/ConversationLimits.html +12 -12
- 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 +24 -27
- package/package.json +24 -20
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,220 @@
|
|
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
|
+
## [2.2.0-rc.11](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.2.0-rc.10...@twilio/conversations@2.2.0-rc.11) (2022-07-26)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @twilio/conversations
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## [2.2.0-rc.10](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.2.0-rc.9...@twilio/conversations@2.2.0-rc.10) (2022-07-26)
|
15
|
+
|
16
|
+
**Note:** Version bump only for package @twilio/conversations
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
## [2.2.0-rc.9](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.2.0-rc.8...@twilio/conversations@2.2.0-rc.9) (2022-07-25)
|
23
|
+
|
24
|
+
**Note:** Version bump only for package @twilio/conversations
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
## [2.2.0-rc.8](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.2.0-rc.7...@twilio/conversations@2.2.0-rc.8) (2022-07-25)
|
31
|
+
|
32
|
+
**Note:** Version bump only for package @twilio/conversations
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
## [2.2.0-rc.7](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.2.0-rc.6...@twilio/conversations@2.2.0-rc.7) (2022-07-25)
|
39
|
+
|
40
|
+
**Note:** Version bump only for package @twilio/conversations
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
## [2.2.0-rc.6](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.2.0-rc.5...@twilio/conversations@2.2.0-rc.6) (2022-07-25)
|
47
|
+
|
48
|
+
**Note:** Version bump only for package @twilio/conversations
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
## [2.2.0-rc.5](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.2.0-rc.4...@twilio/conversations@2.2.0-rc.5) (2022-07-25)
|
55
|
+
|
56
|
+
**Note:** Version bump only for package @twilio/conversations
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
## [2.2.0-rc.4](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.2.0-rc.3...@twilio/conversations@2.2.0-rc.4) (2022-07-25)
|
63
|
+
|
64
|
+
**Note:** Version bump only for package @twilio/conversations
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
## [2.2.0-rc.3](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.2.0-rc.2...@twilio/conversations@2.2.0-rc.3) (2022-07-25)
|
71
|
+
|
72
|
+
**Note:** Version bump only for package @twilio/conversations
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
## [2.2.0-rc.2](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.2.0-rc.1...@twilio/conversations@2.2.0-rc.2) (2022-07-21)
|
79
|
+
|
80
|
+
**Note:** Version bump only for package @twilio/conversations
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
## [2.2.0-rc.1](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.11...@twilio/conversations@2.2.0-rc.1) (2022-07-21)
|
87
|
+
|
88
|
+
|
89
|
+
### Bug Fixes
|
90
|
+
|
91
|
+
* Add deprecation notice for Conversation.create, fix packages versions ([5c3232f](https://github.com/twilio/rtd-sdk-monorepo-js/commit/5c3232f68b77d465a37e9c110881fee6c02ed8de))
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
## [3.0.0-rc.11](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.10...@twilio/conversations@3.0.0-rc.11) (2022-07-20)
|
96
|
+
|
97
|
+
|
98
|
+
### Features
|
99
|
+
|
100
|
+
* Deprecate methods for the multiple media release ([40ed0b2](https://github.com/twilio/rtd-sdk-monorepo-js/commit/40ed0b2d3d29dba0d3767d9991991bfacc5e7a6a))
|
101
|
+
* Deprecate stateChanged event ([4da9f60](https://github.com/twilio/rtd-sdk-monorepo-js/commit/4da9f6056957e4fac159a71d10968145ed145651))
|
102
|
+
* Revert add/addNonChatParticipant return value ([6e37bff](https://github.com/twilio/rtd-sdk-monorepo-js/commit/6e37bffe2b4ccd4da81f1217bdc536dd476aa291))
|
103
|
+
* Revert and deprecate peek conversation breaking changes ([3dda9f4](https://github.com/twilio/rtd-sdk-monorepo-js/commit/3dda9f44fe422e39c67ac1a95d23a5070199751e))
|
104
|
+
|
105
|
+
|
106
|
+
### Bug Fixes
|
107
|
+
|
108
|
+
* Rollback twilsock type, update loglevel version ([b8c4b2c](https://github.com/twilio/rtd-sdk-monorepo-js/commit/b8c4b2c174a8a2cf413b0ef6c719fd45e0cfce6d))
|
109
|
+
* Update stateChanged event name ([300fa58](https://github.com/twilio/rtd-sdk-monorepo-js/commit/300fa58df18ddb1d786cd0471fa525f4f59dad53))
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
## [3.0.0-rc.10](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.9...@twilio/conversations@3.0.0-rc.10) (2022-07-05)
|
114
|
+
|
115
|
+
|
116
|
+
### Bug Fixes
|
117
|
+
|
118
|
+
* Fix IE11 behavior on participant add ([56e71e4](https://github.com/twilio/rtd-sdk-monorepo-js/commit/56e71e403dac7dd7a32e1fa9201c7a72c1b61083))
|
119
|
+
* Ignore broken conversations on client init. RTDSDK-2085 ([4a812d1](https://github.com/twilio/rtd-sdk-monorepo-js/commit/4a812d14af9c91428d778f4cd26ea682f6390e69))
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
## [3.0.0-rc.9](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.8...@twilio/conversations@3.0.0-rc.9) (2022-05-19)
|
124
|
+
|
125
|
+
**Note:** Version bump only for package @twilio/conversations
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
## [3.0.0-rc.8](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.7...@twilio/conversations@3.0.0-rc.8) (2022-05-18)
|
132
|
+
|
133
|
+
|
134
|
+
### Bug Fixes
|
135
|
+
|
136
|
+
* Fix convo 3.0 docs, and disconnecting client issue ([c65cf01](https://github.com/twilio/rtd-sdk-monorepo-js/commit/c65cf011406a80ca83da7ecba961aa31caf061bf))
|
137
|
+
* Fix double parsing participant attributes ([682ed94](https://github.com/twilio/rtd-sdk-monorepo-js/commit/682ed94c791a4b2bc9dac6aa987f9aae80201365))
|
138
|
+
|
139
|
+
|
140
|
+
### Reverts
|
141
|
+
|
142
|
+
* Revert "chore(release): Publish" ([097a200](https://github.com/twilio/rtd-sdk-monorepo-js/commit/097a2004f233688bf9a97d1defc976a9fb5da96d))
|
143
|
+
* Revert "chore(release): Publish" ([03b27ca](https://github.com/twilio/rtd-sdk-monorepo-js/commit/03b27ca9830bc6aba2d37febebe6e53f7abddb2d))
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
## [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)
|
148
|
+
|
149
|
+
|
150
|
+
### Bug Fixes
|
151
|
+
|
152
|
+
* Add cancellable promise export from conversations ([04bd2fc](https://github.com/twilio/rtd-sdk-monorepo-js/commit/04bd2fc10ca1331fbcddf94a186eec351ea922f1))
|
153
|
+
* Fix promise cancelling retrier ([9b30ce2](https://github.com/twilio/rtd-sdk-monorepo-js/commit/9b30ce2750b7447f28e745513f7e1a29e2c48127))
|
154
|
+
* Make stateChanged failed error informative ([a301fdb](https://github.com/twilio/rtd-sdk-monorepo-js/commit/a301fdbe0950a87d0c12ee55688d461bd603cbda))
|
155
|
+
* Map media to empty medias field ([75ee36d](https://github.com/twilio/rtd-sdk-monorepo-js/commit/75ee36d600ec19a45ac5e471c61b6c68bdc47bc8))
|
156
|
+
* Parse APN with undefined alert ([f1d86d8](https://github.com/twilio/rtd-sdk-monorepo-js/commit/f1d86d86d949f8dd6eb96526364bf8c68067a403))
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
## [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)
|
161
|
+
|
162
|
+
**Note:** Version bump only for package @twilio/conversations
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
## [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)
|
169
|
+
|
170
|
+
|
171
|
+
### ⚠ BREAKING CHANGES
|
172
|
+
|
173
|
+
* Participant add methods now return the added participants
|
174
|
+
|
175
|
+
### Features
|
176
|
+
|
177
|
+
* Participant add methods now return the added participants ([6547478](https://github.com/twilio/rtd-sdk-monorepo-js/commit/6547478aaa3c358c9f78e2c2c178c9eb36b28485))
|
178
|
+
|
179
|
+
|
180
|
+
### Bug Fixes
|
181
|
+
|
182
|
+
* Add runtime validation, fix error messages wording ([c03fd6c](https://github.com/twilio/rtd-sdk-monorepo-js/commit/c03fd6cda5b38032916835734ea002799f460eec))
|
183
|
+
* Add runtime validation, fix error messages wording ([e0e986d](https://github.com/twilio/rtd-sdk-monorepo-js/commit/e0e986d33ac7a5a0c98588dc38ffbd41a22b823e))
|
184
|
+
* Fix faulty type definitions by upgrading tooling ([b6d25ce](https://github.com/twilio/rtd-sdk-monorepo-js/commit/b6d25cecb08ab4e0d369430b90a786e1b275af91))
|
185
|
+
* Update pinning tools to new Python version ([50a6c78](https://github.com/twilio/rtd-sdk-monorepo-js/commit/50a6c78b9d717b0e7531919e1f7cb409474c3df5))
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
## [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)
|
190
|
+
|
191
|
+
|
192
|
+
### Features
|
193
|
+
|
194
|
+
* Migrate Twilsock to ReplayEventEmitter ([6db99dd](https://github.com/twilio/rtd-sdk-monorepo-js/commit/6db99dd3cc207298870aff1835acad6f866d7c05))
|
195
|
+
|
196
|
+
|
197
|
+
### Bug Fixes
|
198
|
+
|
199
|
+
* Fix client initialization when a connected Twilsock is passed ([49aa87e](https://github.com/twilio/rtd-sdk-monorepo-js/commit/49aa87ecc8cc0dd30ac56fd563fb4a2af832610b))
|
200
|
+
* Fix push notification data type ([fa44301](https://github.com/twilio/rtd-sdk-monorepo-js/commit/fa44301c985f23efa5a7299d2987ba3772d51a24))
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
## [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)
|
205
|
+
|
206
|
+
**Note:** Version bump only for package @twilio/conversations
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
## [2.1.0](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.1.0-rc.9...@twilio/conversations@2.1.0) (2022-03-03)
|
213
|
+
|
214
|
+
**Note:** Version bump only for package @twilio/conversations
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
6
220
|
## [2.1.0-rc.9](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.1.0-rc.8...@twilio/conversations@2.1.0-rc.9) (2022-02-08)
|
7
221
|
|
8
222
|
**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
|
|
@@ -34,7 +38,7 @@ import { Client } from '@twilio/conversations';
|
|
34
38
|
const client = new Client(token);
|
35
39
|
// Before you use the client, subscribe to the `'stateChanged'` event and wait
|
36
40
|
// for the `'initialized'` state to be reported.
|
37
|
-
client.on('stateChanged', (state) => {
|
41
|
+
client.on('stateChanged', ({ state, error }) => {
|
38
42
|
if (state === 'initialized') {
|
39
43
|
// Use the client
|
40
44
|
}
|
@@ -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/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
|
```
|