@twilio/conversations 2.0.0 → 2.0.1-canary.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.
Files changed (68) hide show
  1. package/README.md +4 -12
  2. package/dist/browser.js +11 -20
  3. package/dist/browser.js.map +1 -1
  4. package/dist/docs/index.html +4 -10
  5. package/dist/docs/modules.html +4 -10
  6. package/dist/lib/aggregated-delivery-receipt.js +227 -0
  7. package/dist/lib/aggregated-delivery-receipt.js.map +1 -0
  8. package/dist/lib/client.js +872 -0
  9. package/dist/lib/client.js.map +1 -0
  10. package/dist/lib/command-executor.js +203 -0
  11. package/dist/lib/command-executor.js.map +1 -0
  12. package/dist/lib/configuration.js +196 -0
  13. package/dist/lib/configuration.js.map +1 -0
  14. package/dist/lib/conversation.js +973 -0
  15. package/dist/lib/conversation.js.map +1 -0
  16. package/dist/lib/data/conversations.js +443 -0
  17. package/dist/lib/data/conversations.js.map +1 -0
  18. package/dist/lib/data/messages.js +341 -0
  19. package/dist/lib/data/messages.js.map +1 -0
  20. package/dist/lib/data/participants.js +313 -0
  21. package/dist/lib/data/participants.js.map +1 -0
  22. package/dist/lib/data/users.js +228 -0
  23. package/dist/lib/data/users.js.map +1 -0
  24. package/dist/lib/detailed-delivery-receipt.js +154 -0
  25. package/dist/lib/detailed-delivery-receipt.js.map +1 -0
  26. package/dist/lib/index.js +167 -0
  27. package/dist/lib/index.js.map +1 -0
  28. package/dist/lib/interfaces/notification-types.js +143 -0
  29. package/dist/lib/interfaces/notification-types.js.map +1 -0
  30. package/dist/lib/logger.js +190 -0
  31. package/dist/lib/logger.js.map +1 -0
  32. package/dist/lib/media.js +213 -0
  33. package/dist/lib/media.js.map +1 -0
  34. package/dist/lib/message-builder.js +209 -0
  35. package/dist/lib/message-builder.js.map +1 -0
  36. package/dist/lib/message.js +450 -0
  37. package/dist/lib/message.js.map +1 -0
  38. package/dist/lib/node_modules/tslib/tslib.es6.js +161 -0
  39. package/dist/lib/node_modules/tslib/tslib.es6.js.map +1 -0
  40. package/dist/lib/packages/conversations/package.json.js +136 -0
  41. package/dist/lib/packages/conversations/package.json.js.map +1 -0
  42. package/dist/lib/participant.js +346 -0
  43. package/dist/lib/participant.js.map +1 -0
  44. package/dist/lib/push-notification.js +152 -0
  45. package/dist/lib/push-notification.js.map +1 -0
  46. package/dist/lib/rest-paginator.js +175 -0
  47. package/dist/lib/rest-paginator.js.map +1 -0
  48. package/dist/lib/services/network.js +205 -0
  49. package/dist/lib/services/network.js.map +1 -0
  50. package/dist/lib/services/typing-indicator.js +235 -0
  51. package/dist/lib/services/typing-indicator.js.map +1 -0
  52. package/dist/lib/unsent-message.js +159 -0
  53. package/dist/lib/unsent-message.js.map +1 -0
  54. package/dist/lib/user.js +392 -0
  55. package/dist/lib/user.js.map +1 -0
  56. package/dist/lib/util/deferred.js +154 -0
  57. package/dist/lib/util/deferred.js.map +1 -0
  58. package/dist/lib/util/index.js +206 -0
  59. package/dist/lib/util/index.js.map +1 -0
  60. package/dist/lib.js +11 -20
  61. package/dist/lib.js.map +1 -1
  62. package/dist/twilio-conversations.js +1937 -1097
  63. package/dist/twilio-conversations.min.js +3 -3
  64. package/package.json +15 -14
  65. package/CHANGELOG.md +0 -219
  66. package/dist/post-install.js +0 -29
  67. package/dist/react-native.js +0 -4039
  68. package/dist/react-native.js.map +0 -1
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@twilio/conversations",
3
- "version": "2.0.0",
3
+ "version": "2.0.1-canary.1+a593ec5",
4
4
  "description": "Twilio Conversations client library",
5
5
  "main": "./dist/lib.js",
6
6
  "browser": "./dist/browser.js",
7
+ "react-native": "./dist/lib/index.js",
7
8
  "types": "./dist/lib.d.ts",
8
9
  "author": "Twilio",
9
10
  "license": "MIT",
@@ -29,24 +30,23 @@
29
30
  "sourceMapReport:html": "npx source-map-explorer@2.5.2 ./dist/lib.js --html ./dist/lib.report.html",
30
31
  "sourceMapReport:json": "npx source-map-explorer@2.5.2 ./dist/lib.js --json ./dist/lib.report.json",
31
32
  "docs": "npx typedoc && npx ts-node docs-postprocess.ts",
32
- "ci": "yarn clean && yarn lint && yarn build && yarn ssri && yarn sourceMapReport:html && yarn sourceMapReport:json && yarn docs",
33
- "postinstall": "if [ -f ./dist/post-install.js ]; then node ./dist/post-install.js; fi"
33
+ "ci": "yarn clean && yarn lint && yarn build && yarn ssri && yarn sourceMapReport:html && yarn sourceMapReport:json && yarn docs"
34
34
  },
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.14.5",
37
- "@twilio/declarative-type-validator": "^0.1.9",
38
- "@twilio/mcs-client": "^0.5.1",
39
- "@twilio/notifications": "^1.0.3",
40
- "@twilio/operation-retrier": "^4.0.5",
41
- "@twilio/replay-event-emitter": "^0.2.2",
37
+ "@twilio/declarative-type-validator": "^0.1.10-canary.1+a593ec5",
38
+ "@twilio/mcs-client": "^0.5.2-canary.1+a593ec5",
39
+ "@twilio/notifications": "^1.0.4-canary.1+a593ec5",
40
+ "@twilio/operation-retrier": "^4.0.6-canary.1+a593ec5",
41
+ "@twilio/replay-event-emitter": "^0.2.3-canary.1+a593ec5",
42
42
  "core-js": "^3.17.3",
43
43
  "glob": "^7.1.7",
44
44
  "iso8601-duration": "=1.2.0",
45
+ "lodash.isequal": "^4.5.0",
45
46
  "loglevel": "^1.6.6",
46
47
  "platform": "^1.3.6",
47
- "rfc6902": "^3.0.2",
48
- "twilio-sync": "^3.0.5",
49
- "twilsock": "^0.12.0",
48
+ "twilio-sync": "^3.0.6-canary.1+a593ec5",
49
+ "twilsock": "^0.12.1-canary.1+a593ec5",
50
50
  "uuid": "^3.4.0"
51
51
  },
52
52
  "devDependencies": {
@@ -59,6 +59,7 @@
59
59
  "@types/chai": "^4.2.5",
60
60
  "@types/chai-as-promised": "^7.1.2",
61
61
  "@types/chai-string": "^1.4.1",
62
+ "@types/lodash.isequal": "^4.5.5",
62
63
  "@types/mocha": "^5.2.7",
63
64
  "@types/node": "^12.12.12",
64
65
  "@types/sinon": "^10.0.0",
@@ -82,7 +83,6 @@
82
83
  "nyc": "^14.1.1",
83
84
  "path": "^0.12.7",
84
85
  "rollup": "^2.51.1",
85
- "rollup-plugin-copy": "^3.4.0",
86
86
  "rollup-plugin-polyfill-node": "^0.6.2",
87
87
  "rollup-plugin-terser": "^7.0.2",
88
88
  "rollup-plugin-ts": "^1.4.0",
@@ -97,7 +97,7 @@
97
97
  "vinyl-source-stream": "^2.0.0"
98
98
  },
99
99
  "engines": {
100
- "node": ">=10"
100
+ "node": ">=14"
101
101
  },
102
102
  "browserslist": [
103
103
  "IE 11",
@@ -110,5 +110,6 @@
110
110
  "last 2 FirefoxAndroid version",
111
111
  "last 2 Samsung versions",
112
112
  "last 2 UCAndroid versions"
113
- ]
113
+ ],
114
+ "gitHead": "a593ec59cbb34801a5bf478866f8597ff2aab27c"
114
115
  }
package/CHANGELOG.md DELETED
@@ -1,219 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [2.0.0](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.0.0-rc.4...@twilio/conversations@2.0.0) (2021-10-19)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * Add an export to NotificationTypes ([0986564](https://github.com/twilio/rtd-sdk-monorepo-js/commit/09865645750f8ae2f930471284de9d9f7445f1e8))
12
-
13
-
14
-
15
- ## [2.0.0-rc.4](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.0.0-rc.3...@twilio/conversations@2.0.0-rc.4) (2021-10-14)
16
-
17
-
18
- ### Bug Fixes
19
-
20
- * Fix passing JSON attributes into conversation.addNonChatParticipant ([c3da243](https://github.com/twilio/rtd-sdk-monorepo-js/commit/c3da243469f5c33663c756d9f714a38240c4dd48))
21
-
22
-
23
-
24
- ## [2.0.0-rc.3](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.0.0-rc.2...@twilio/conversations@2.0.0-rc.3) (2021-10-13)
25
-
26
- **Note:** Version bump only for package @twilio/conversations
27
-
28
-
29
-
30
-
31
-
32
- ## [2.0.0-rc.2](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.0.0-rc.1...@twilio/conversations@2.0.0-rc.2) (2021-10-13)
33
-
34
-
35
- ### ⚠ BREAKING CHANGES
36
-
37
- * Disallow null Conversation.updateFriendlyName
38
- * Disallow null for client options
39
- * Remove default exports from Conversations
40
- * Client.reachabilityEnabled can now throw an error.
41
-
42
- ### Bug Fixes
43
-
44
- * Add missing exports ([74d08ce](https://github.com/twilio/rtd-sdk-monorepo-js/commit/74d08ce00a8a4cf0b961dde3570f5c7bd7a1e1f9))
45
- * Allow all JSON values as properties in addNonChatParticipant ([ddbea1c](https://github.com/twilio/rtd-sdk-monorepo-js/commit/ddbea1c0d0d26b488661ef123883316f7926b456))
46
- * Disallow null Conversation.updateFriendlyName ([7e4b556](https://github.com/twilio/rtd-sdk-monorepo-js/commit/7e4b5563e2a016f1904d9b37cfc063592712f0a6))
47
- * Disallow null for client options ([c5435f9](https://github.com/twilio/rtd-sdk-monorepo-js/commit/c5435f9fb9dadf11483e2c7884c334a040c06330))
48
- * Fix client user initialization problem ([043546d](https://github.com/twilio/rtd-sdk-monorepo-js/commit/043546d872300fda4db70d9c04461f944dfa5936))
49
- * Remove default exports from Conversations ([38e2e24](https://github.com/twilio/rtd-sdk-monorepo-js/commit/38e2e24512425da4ba0f1670dcf37d8ccf1ac67e))
50
- * Reset currentState on push unregister ([590991c](https://github.com/twilio/rtd-sdk-monorepo-js/commit/590991c841a78b3c7e88a05629090a2de5a8f9da))
51
- * Resubscribe to push notification on re-register ([709847f](https://github.com/twilio/rtd-sdk-monorepo-js/commit/709847f8462890214197cf1af769f41b56bfbccc))
52
- * Throw an error if reachabilityEnabled was accessed before client init ([3fd3293](https://github.com/twilio/rtd-sdk-monorepo-js/commit/3fd32937d7e42d6df815efab35ded3b93a671556))
53
- * UnsentMessage.send now returns a proper value ([c71a0a9](https://github.com/twilio/rtd-sdk-monorepo-js/commit/c71a0a9a9618c09f5d02dbee6bc2d122d9008383))
54
-
55
-
56
-
57
- ## [2.0.0-rc.1](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@2.0.0-rc.0...@twilio/conversations@2.0.0-rc.1) (2021-10-04)
58
-
59
-
60
- ### ⚠ BREAKING CHANGES
61
-
62
- * User.updateFriendlyName no longer accepts
63
- null as the value.
64
- * Passing null to Conversation.sendMessage
65
- will result with the message body being empty.
66
-
67
- ### Features
68
-
69
- * Add getCachedTemporaryUrl() ([c453e70](https://github.com/twilio/rtd-sdk-monorepo-js/commit/c453e70d0e0bc8bb6f0cd80ef0e2a3309b5ba804))
70
- * Add limits support ([b471295](https://github.com/twilio/rtd-sdk-monorepo-js/commit/b4712954bf6f0cf82c47c77b96a98ed1ebe9c158))
71
- * Add Media category field ([0672c20](https://github.com/twilio/rtd-sdk-monorepo-js/commit/0672c202d000736dda37be66387692e2befe24bd))
72
- * Add mediaSet GET operation support ([424bd4a](https://github.com/twilio/rtd-sdk-monorepo-js/commit/424bd4abe42312ea01740bc142ed1c6ec3b1913d))
73
- * Add multiple media accessors ([99e78e6](https://github.com/twilio/rtd-sdk-monorepo-js/commit/99e78e6239b87d36b23e6bbbd0bc68f19b869f85))
74
- * Add sendMessageV2 and prepareMessage() builder ([fd5ae39](https://github.com/twilio/rtd-sdk-monorepo-js/commit/fd5ae39816e45cce83a37120bfff3f2d530f09d3))
75
- * Allow specifying filename when uploading media file ([abd6126](https://github.com/twilio/rtd-sdk-monorepo-js/commit/abd61266135b14c27c3d076c009a3fd331a0f810))
76
- * Dispose of session in favour of the sessionless protocol ([8b46fbd](https://github.com/twilio/rtd-sdk-monorepo-js/commit/8b46fbdac04d7e2cf55a74fb13b3016661f869b8))
77
- * Do not filter out body for media messages ([3eeeabc](https://github.com/twilio/rtd-sdk-monorepo-js/commit/3eeeabc7c32b2798bef40e50466610d155aa68e5))
78
-
79
-
80
- ### Bug Fixes
81
-
82
- * Add token update for notificationClient ([5cda351](https://github.com/twilio/rtd-sdk-monorepo-js/commit/5cda3513c0df4aac8df01034d2764bb0e970a476))
83
- * Default addNonChatParticipant options to empty if not provided ([84e205b](https://github.com/twilio/rtd-sdk-monorepo-js/commit/84e205b7e4c4c2faebce6fe79521751765dde8c5))
84
- * Deprecate unsetPushRegistrationId and add removePushRegistrations ([82ef892](https://github.com/twilio/rtd-sdk-monorepo-js/commit/82ef892537942efd1e47302dad33086a2d8a5f22))
85
- * Fix setPushRegistrationId and unsetPushRegistrationId impls ([9120a65](https://github.com/twilio/rtd-sdk-monorepo-js/commit/9120a65834c9fb38c184c55bfa961d2e1cddb8ca))
86
- * Return correct type from function ([5353810](https://github.com/twilio/rtd-sdk-monorepo-js/commit/5353810e32de201415f1e93d25d1b679eac2d974))
87
- * Streamline Message state initialization ([a29331f](https://github.com/twilio/rtd-sdk-monorepo-js/commit/a29331f3d7e75ed85d4919efd67a5766482af06b))
88
-
89
-
90
- ### Code Refactoring
91
-
92
- * Migrate to Sessionless EditUser command ([060b96b](https://github.com/twilio/rtd-sdk-monorepo-js/commit/060b96b5019311a47e7fdb71b12cbdd4996f3e44))
93
- * Migrate to Sessionless SendMessage command ([997e17f](https://github.com/twilio/rtd-sdk-monorepo-js/commit/997e17fd04426aebe04e1fa734752aee4ddecaf5))
94
-
95
-
96
-
97
- ## [2.0.0-rc.0](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.12...@twilio/conversations@2.0.0-rc.0) (2021-09-23)
98
-
99
-
100
- ### ⚠ BREAKING CHANGES
101
-
102
- * Add init registrations
103
- * Use twilsock connection state
104
-
105
- ### Features
106
-
107
- * Add init registrations ([d09c52d](https://github.com/twilio/rtd-sdk-monorepo-js/commit/d09c52d2b1894fb0db2e3a084937350ee1a73f01))
108
- * Export Telemetry from Twilsock ([eb261ec](https://github.com/twilio/rtd-sdk-monorepo-js/commit/eb261ecdb366b6381462c377431735c5c09f1094))
109
- * Use twilsock connection state ([2a6a4be](https://github.com/twilio/rtd-sdk-monorepo-js/commit/2a6a4be6384037ca80f1a02663cb126cbff3797a))
110
-
111
-
112
- ### Bug Fixes
113
-
114
- * Fix getMessages()' usage of sync pagination ([4563227](https://github.com/twilio/rtd-sdk-monorepo-js/commit/45632271337affeb3af7dcf8bec78b555b5db6b1))
115
- * Start client connection state in 'unknown' ([a78acd1](https://github.com/twilio/rtd-sdk-monorepo-js/commit/a78acd1e5dde7532cfd64ed6ed09178d5009399e))
116
- * Use Transport from Twilsock ([7f0ce1e](https://github.com/twilio/rtd-sdk-monorepo-js/commit/7f0ce1e8e74b39d38cb4feff685e19807cba5ff0))
117
-
118
-
119
-
120
- ### [1.2.4-rc.12](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.11...@twilio/conversations@1.2.4-rc.12) (2021-09-12)
121
-
122
- **Note:** Version bump only for package @twilio/conversations
123
-
124
-
125
-
126
-
127
-
128
- ### [1.2.4-rc.11](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.10...@twilio/conversations@1.2.4-rc.11) (2021-09-12)
129
-
130
- **Note:** Version bump only for package @twilio/conversations
131
-
132
-
133
-
134
-
135
-
136
- ### [1.2.4-rc.10](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.9...@twilio/conversations@1.2.4-rc.10) (2021-09-12)
137
-
138
- **Note:** Version bump only for package @twilio/conversations
139
-
140
-
141
-
142
-
143
-
144
- ### [1.2.4-rc.9](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.8...@twilio/conversations@1.2.4-rc.9) (2021-09-12)
145
-
146
- **Note:** Version bump only for package @twilio/conversations
147
-
148
-
149
-
150
-
151
-
152
- ### [1.2.4-rc.8](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.7...@twilio/conversations@1.2.4-rc.8) (2021-09-12)
153
-
154
- **Note:** Version bump only for package @twilio/conversations
155
-
156
-
157
-
158
-
159
-
160
- ### [1.2.4-rc.7](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.5...@twilio/conversations@1.2.4-rc.7) (2021-09-12)
161
-
162
- **Note:** Version bump only for package @twilio/conversations
163
-
164
-
165
-
166
-
167
-
168
- ### [1.2.4-rc.6](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.5...@twilio/conversations@1.2.4-rc.6) (2021-09-12)
169
-
170
- **Note:** Version bump only for package @twilio/conversations
171
-
172
-
173
-
174
-
175
-
176
- ### [1.2.4-rc.5](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.4...@twilio/conversations@1.2.4-rc.5) (2021-09-10)
177
-
178
- **Note:** Version bump only for package @twilio/conversations
179
-
180
-
181
-
182
-
183
-
184
- ### [1.2.4-rc.4](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.3...@twilio/conversations@1.2.4-rc.4) (2021-09-10)
185
-
186
- **Note:** Version bump only for package @twilio/conversations
187
-
188
-
189
-
190
-
191
-
192
- ### [1.2.4-rc.3](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.4-rc.2...@twilio/conversations@1.2.4-rc.3) (2021-09-09)
193
-
194
-
195
- ### Bug Fixes
196
-
197
- * Fix Rollup type export issue ([02f9d73](https://github.com/twilio/rtd-sdk-monorepo-js/commit/02f9d7307ce982afbd1a8e92f8e8bdd6646b74f0))
198
-
199
-
200
-
201
- ### [1.2.4-rc.2](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.3-rc.1...@twilio/conversations@1.2.4-rc.2) (2021-09-07)
202
-
203
- **Note:** Version bump only for package @twilio/conversations
204
-
205
-
206
-
207
-
208
-
209
- ### [1.2.3-rc.1](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@1.2.3-rc.0...@twilio/conversations@1.2.3-rc.1) (2021-08-23)
210
-
211
- **Note:** Version bump only for package @twilio/conversations
212
-
213
-
214
-
215
-
216
-
217
- ### 1.2.3-rc.0 (2021-08-23)
218
-
219
- **Note:** Version bump only for package @twilio/conversations
@@ -1,29 +0,0 @@
1
- // Abort if the script is being run after "npm install" or "yarn" is executed on
2
- // the monorepo project itself.
3
- try {
4
- const monorepoPackageJson = require("../../../package.json");
5
-
6
- if (monorepoPackageJson.name === "root") {
7
- return;
8
- }
9
- } catch {}
10
-
11
- // Change the "browser" property to "./dist/react-native.js" if React Native
12
- // is detected.
13
- const fs = require("fs");
14
-
15
- const mainProjectPackageJsonPath =
16
- require.main.paths[0].split("node_modules")[0] + "package.json";
17
- const mainProjectPackageJson = require(mainProjectPackageJsonPath);
18
- const dependencyPackageJsonPath = `${__dirname}/../package.json`;
19
- const dependencyPackageJson = require(dependencyPackageJsonPath);
20
-
21
- if (
22
- typeof mainProjectPackageJson?.dependencies?.["react-native"] !== "undefined"
23
- ) {
24
- dependencyPackageJson["browser"] = "./dist/react-native.js";
25
- fs.writeFileSync(
26
- dependencyPackageJsonPath,
27
- JSON.stringify(dependencyPackageJson, null, 2)
28
- );
29
- }