@twilio/conversations 2.1.0-rc.1 → 2.1.0-rc.8

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 (87) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/NOTICE.txt +679 -0
  3. package/builds/browser.js +674 -587
  4. package/builds/browser.js.map +1 -1
  5. package/builds/lib.d.ts +319 -122
  6. package/builds/lib.js +674 -587
  7. package/builds/lib.js.map +1 -1
  8. package/builds/twilio-conversations.js +852 -909
  9. package/builds/twilio-conversations.min.js +2 -14
  10. package/dist/aggregated-delivery-receipt.js +6 -1
  11. package/dist/aggregated-delivery-receipt.js.map +1 -1
  12. package/dist/client.js +165 -142
  13. package/dist/client.js.map +1 -1
  14. package/dist/command-executor.js +16 -14
  15. package/dist/command-executor.js.map +1 -1
  16. package/dist/configuration.js +14 -10
  17. package/dist/configuration.js.map +1 -1
  18. package/dist/conversation.js +212 -153
  19. package/dist/conversation.js.map +1 -1
  20. package/dist/data/conversations.js +81 -77
  21. package/dist/data/conversations.js.map +1 -1
  22. package/dist/data/messages.js +42 -38
  23. package/dist/data/messages.js.map +1 -1
  24. package/dist/data/participants.js +93 -75
  25. package/dist/data/participants.js.map +1 -1
  26. package/dist/data/users.js +24 -22
  27. package/dist/data/users.js.map +1 -1
  28. package/dist/detailed-delivery-receipt.js +1 -1
  29. package/dist/detailed-delivery-receipt.js.map +1 -1
  30. package/dist/interfaces/attributes.js +4 -4
  31. package/dist/interfaces/attributes.js.map +1 -1
  32. package/dist/interfaces/notification-types.js +5 -5
  33. package/dist/interfaces/notification-types.js.map +1 -1
  34. package/dist/logger.js +36 -15
  35. package/dist/logger.js.map +1 -1
  36. package/dist/media.js +21 -9
  37. package/dist/media.js.map +1 -1
  38. package/dist/message-builder.js +10 -9
  39. package/dist/message-builder.js.map +1 -1
  40. package/dist/message.js +131 -83
  41. package/dist/message.js.map +1 -1
  42. package/dist/packages/conversations/package.json.js +1 -1
  43. package/dist/participant.js +85 -51
  44. package/dist/participant.js.map +1 -1
  45. package/dist/push-notification.js.map +1 -1
  46. package/dist/rest-paginator.js +16 -6
  47. package/dist/rest-paginator.js.map +1 -1
  48. package/dist/services/network.js +18 -14
  49. package/dist/services/network.js.map +1 -1
  50. package/dist/services/typing-indicator.js +20 -17
  51. package/dist/services/typing-indicator.js.map +1 -1
  52. package/dist/unsent-message.js.map +1 -1
  53. package/dist/user.js +85 -59
  54. package/dist/user.js.map +1 -1
  55. package/dist/util/deferred.js +3 -1
  56. package/dist/util/deferred.js.map +1 -1
  57. package/dist/util/index.js +6 -6
  58. package/dist/util/index.js.map +1 -1
  59. package/docs/assets/js/search.js +1 -1
  60. package/docs/classes/AggregatedDeliveryReceipt.html +0 -117
  61. package/docs/classes/Client.html +24 -147
  62. package/docs/classes/Conversation.html +30 -147
  63. package/docs/classes/DetailedDeliveryReceipt.html +1 -118
  64. package/docs/classes/Media.html +0 -117
  65. package/docs/classes/Message.html +7 -124
  66. package/docs/classes/MessageBuilder.html +2 -119
  67. package/docs/classes/Participant.html +7 -124
  68. package/docs/classes/PushNotification.html +0 -117
  69. package/docs/classes/RestPaginator.html +0 -117
  70. package/docs/classes/UnsentMessage.html +0 -117
  71. package/docs/classes/User.html +7 -124
  72. package/docs/index.html +60 -0
  73. package/docs/interfaces/ClientOptions.html +0 -117
  74. package/docs/interfaces/ConversationBindings.html +0 -117
  75. package/docs/interfaces/ConversationEmailBinding.html +0 -117
  76. package/docs/interfaces/ConversationLimits.html +3098 -0
  77. package/docs/interfaces/ConversationState.html +0 -117
  78. package/docs/interfaces/CreateConversationOptions.html +1 -118
  79. package/docs/interfaces/LastMessage.html +0 -117
  80. package/docs/interfaces/Paginator.html +0 -117
  81. package/docs/interfaces/ParticipantBindings.html +0 -117
  82. package/docs/interfaces/ParticipantEmailBinding.html +0 -117
  83. package/docs/interfaces/PushNotificationData.html +0 -117
  84. package/docs/interfaces/SendEmailOptions.html +0 -117
  85. package/docs/interfaces/SendMediaOptions.html +0 -117
  86. package/docs/modules.html +60 -0
  87. package/package.json +23 -17
package/docs/modules.html CHANGED
@@ -2747,6 +2747,9 @@ img {
2747
2747
  <li class=" tsd-kind-interface">
2748
2748
  <a href="interfaces/ConversationEmailBinding.html" class="tsd-kind-icon">Conversation<wbr>Email<wbr>Binding</a>
2749
2749
  </li>
2750
+ <li class=" tsd-kind-interface">
2751
+ <a href="interfaces/ConversationLimits.html" class="tsd-kind-icon">Conversation<wbr>Limits</a>
2752
+ </li>
2750
2753
  <li class=" tsd-kind-interface">
2751
2754
  <a href="interfaces/ConversationState.html" class="tsd-kind-icon">Conversation<wbr>State</a>
2752
2755
  </li>
@@ -2789,6 +2792,15 @@ img {
2789
2792
  <li class=" tsd-kind-type-alias">
2790
2793
  <a href="modules.html#DeliveryStatus" class="tsd-kind-icon">Delivery<wbr>Status</a>
2791
2794
  </li>
2795
+ <li class=" tsd-kind-type-alias">
2796
+ <a href="modules.html#JSONArray" class="tsd-kind-icon">JSONArray</a>
2797
+ </li>
2798
+ <li class=" tsd-kind-type-alias">
2799
+ <a href="modules.html#JSONObject" class="tsd-kind-icon">JSONObject</a>
2800
+ </li>
2801
+ <li class=" tsd-kind-type-alias">
2802
+ <a href="modules.html#JSONValue" class="tsd-kind-icon">JSONValue</a>
2803
+ </li>
2792
2804
  <li class=" tsd-kind-type-alias">
2793
2805
  <a href="modules.html#MediaCategory" class="tsd-kind-icon">Media<wbr>Category</a>
2794
2806
  </li>
@@ -2919,6 +2931,7 @@ img {
2919
2931
  <li class="tsd-kind-interface"><a href="interfaces/ClientOptions.html" class="tsd-kind-icon">Client<wbr>Options</a></li>
2920
2932
  <li class="tsd-kind-interface"><a href="interfaces/ConversationBindings.html" class="tsd-kind-icon">Conversation<wbr>Bindings</a></li>
2921
2933
  <li class="tsd-kind-interface"><a href="interfaces/ConversationEmailBinding.html" class="tsd-kind-icon">Conversation<wbr>Email<wbr>Binding</a></li>
2934
+ <li class="tsd-kind-interface"><a href="interfaces/ConversationLimits.html" class="tsd-kind-icon">Conversation<wbr>Limits</a></li>
2922
2935
  <li class="tsd-kind-interface"><a href="interfaces/ConversationState.html" class="tsd-kind-icon">Conversation<wbr>State</a></li>
2923
2936
  <li class="tsd-kind-interface"><a href="interfaces/CreateConversationOptions.html" class="tsd-kind-icon">Create<wbr>Conversation<wbr>Options</a></li>
2924
2937
  <li class="tsd-kind-interface"><a href="interfaces/LastMessage.html" class="tsd-kind-icon">Last<wbr>Message</a></li>
@@ -2938,6 +2951,9 @@ img {
2938
2951
  <li class="tsd-kind-type-alias"><a href="modules.html#ConversationUpdateReason" class="tsd-kind-icon">Conversation<wbr>Update<wbr>Reason</a></li>
2939
2952
  <li class="tsd-kind-type-alias"><a href="modules.html#DeliveryAmount" class="tsd-kind-icon">Delivery<wbr>Amount</a></li>
2940
2953
  <li class="tsd-kind-type-alias"><a href="modules.html#DeliveryStatus" class="tsd-kind-icon">Delivery<wbr>Status</a></li>
2954
+ <li class="tsd-kind-type-alias"><a href="modules.html#JSONArray" class="tsd-kind-icon">JSONArray</a></li>
2955
+ <li class="tsd-kind-type-alias"><a href="modules.html#JSONObject" class="tsd-kind-icon">JSONObject</a></li>
2956
+ <li class="tsd-kind-type-alias"><a href="modules.html#JSONValue" class="tsd-kind-icon">JSONValue</a></li>
2941
2957
  <li class="tsd-kind-type-alias"><a href="modules.html#MediaCategory" class="tsd-kind-icon">Media<wbr>Category</a></li>
2942
2958
  <li class="tsd-kind-type-alias"><a href="modules.html#MessageType" class="tsd-kind-icon">Message<wbr>Type</a></li>
2943
2959
  <li class="tsd-kind-type-alias"><a href="modules.html#MessageUpdateReason" class="tsd-kind-icon">Message<wbr>Update<wbr>Reason</a></li>
@@ -3025,6 +3041,50 @@ img {
3025
3041
  </div>
3026
3042
  </div>
3027
3043
  </section>
3044
+ <section class="tsd-panel tsd-member tsd-kind-type-alias">
3045
+ <a name="JSONArray" class="tsd-anchor"></a>
3046
+ <h3>JSONArray</h3>
3047
+ <div class="tsd-signature tsd-kind-icon">JSONArray<span class="tsd-signature-symbol">:</span> <a href="modules.html#JSONValue" class="tsd-signature-type" data-tsd-kind="Type alias">JSONValue</a><span class="tsd-signature-symbol">[]</span></div>
3048
+ <aside class="tsd-sources">
3049
+ </aside>
3050
+ <div class="tsd-comment tsd-typography">
3051
+ <div class="lead">
3052
+ <p>Represents a JSON array.</p>
3053
+ </div>
3054
+ </div>
3055
+ </section>
3056
+ <section class="tsd-panel tsd-member tsd-kind-type-alias">
3057
+ <a name="JSONObject" class="tsd-anchor"></a>
3058
+ <h3>JSONObject</h3>
3059
+ <div class="tsd-signature tsd-kind-icon">JSONObject<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{}</span></div>
3060
+ <aside class="tsd-sources">
3061
+ </aside>
3062
+ <div class="tsd-comment tsd-typography">
3063
+ <div class="lead">
3064
+ <p>Represents a JSON object.</p>
3065
+ </div>
3066
+ </div>
3067
+ <div class="tsd-type-declaration">
3068
+ <h4>Type declaration</h4>
3069
+ <ul class="tsd-parameters">
3070
+ <li class="tsd-parameter-index-signature">
3071
+ <h5><span class="tsd-signature-symbol">[</span>x: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><a href="modules.html#JSONValue" class="tsd-signature-type" data-tsd-kind="Type alias">JSONValue</a></h5>
3072
+ </li>
3073
+ </ul>
3074
+ </div>
3075
+ </section>
3076
+ <section class="tsd-panel tsd-member tsd-kind-type-alias">
3077
+ <a name="JSONValue" class="tsd-anchor"></a>
3078
+ <h3>JSONValue</h3>
3079
+ <div class="tsd-signature tsd-kind-icon">JSONValue<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><a href="modules.html#JSONObject" class="tsd-signature-type" data-tsd-kind="Type alias">JSONObject</a><span class="tsd-signature-symbol"> | </span><a href="modules.html#JSONArray" class="tsd-signature-type" data-tsd-kind="Type alias">JSONArray</a></div>
3080
+ <aside class="tsd-sources">
3081
+ </aside>
3082
+ <div class="tsd-comment tsd-typography">
3083
+ <div class="lead">
3084
+ <p>Represents a JSON value.</p>
3085
+ </div>
3086
+ </div>
3087
+ </section>
3028
3088
  <section class="tsd-panel tsd-member tsd-kind-type-alias">
3029
3089
  <a name="MediaCategory" class="tsd-anchor"></a>
3030
3090
  <h3>Media<wbr>Category</h3>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twilio/conversations",
3
- "version": "2.1.0-rc.1",
3
+ "version": "2.1.0-rc.8",
4
4
  "description": "Twilio Conversations client library",
5
5
  "main": "./builds/lib.js",
6
6
  "browser": "./builds/browser.js",
@@ -15,18 +15,20 @@
15
15
  "builds/**/*.js",
16
16
  "builds/**/*.map",
17
17
  "README.md",
18
- "LICENSE"
18
+ "LICENSE",
19
+ "NOTICE.txt"
19
20
  ],
20
21
  "scripts": {
21
22
  "clean": "rm -rf ./coverage ./dist ./builds ./docs",
22
- "lint": "npx tslint -p ./tslint.json",
23
- "lint:fix": "npx tslint -p ./tslint.json --fix",
23
+ "lint:strict": "npx tsc-strict",
24
+ "lint": "yarn lint:strict && npx eslint src test --ext .ts",
25
+ "lint:fix": "yarn lint:strict && npx eslint src test --ext .ts --fix",
24
26
  "test:unit": "env FORCE_COLOR=1 NODE_ENV=test npx nyc --report-dir coverage/unit ./node_modules/.bin/mocha test/unit/index.ts",
25
27
  "test:integration": "env FORCE_COLOR=1 NODE_ENV=test npx nyc --report-dir coverage/integration ./node_modules/.bin/mocha test/integration/index.ts",
26
28
  "build": "npx rollup -c",
27
29
  "ssri": "yarn ssri:bundle && yarn ssri:min",
28
- "ssri:bundle": "openssl dgst -sha256 -binary ./builds/twilio-conversations.js | openssl base64 -A | (printf \"sha256-\" && cat) > ./builds/twilio-conversations.sri",
29
- "ssri:min": "openssl dgst -sha256 -binary ./builds/twilio-conversations.min.js | openssl base64 -A | (printf \"sha256-\" && cat) > ./builds/twilio-conversations.min.sri",
30
+ "ssri:bundle": "openssl dgst -sha256 -binary ./builds/twilio-conversations.js | openssl base64 -A | (printf \"sha256-\" && cat) | tee ./builds/twilio-conversations.sri",
31
+ "ssri:min": "openssl dgst -sha256 -binary ./builds/twilio-conversations.min.js | openssl base64 -A | (printf \"sha256-\" && cat) | tee ./builds/twilio-conversations.min.sri",
30
32
  "sourceMapReport:html": "npx source-map-explorer@2.5.2 ./builds/lib.js --html ./builds/lib.report.html",
31
33
  "sourceMapReport:json": "npx source-map-explorer@2.5.2 ./builds/lib.js --json ./builds/lib.report.json",
32
34
  "docs": "npx typedoc && npx ts-node docs-postprocess.ts",
@@ -34,20 +36,19 @@
34
36
  },
35
37
  "dependencies": {
36
38
  "@babel/runtime": "^7.14.5",
37
- "@twilio/declarative-type-validator": "^0.1.10",
38
- "@twilio/mcs-client": "^0.5.2",
39
- "@twilio/notifications": "^1.0.4",
40
- "@twilio/operation-retrier": "^4.0.6",
41
- "@twilio/replay-event-emitter": "^0.2.3",
39
+ "@twilio/declarative-type-validator": "^0.1.11-rc.0",
40
+ "@twilio/mcs-client": "^0.5.3-rc.0",
41
+ "@twilio/notifications": "^1.0.5-rc.0",
42
+ "@twilio/operation-retrier": "^4.0.7-rc.0",
43
+ "@twilio/replay-event-emitter": "^0.2.4-rc.0",
42
44
  "core-js": "^3.17.3",
43
- "glob": "^7.1.7",
44
45
  "iso8601-duration": "=1.2.0",
45
46
  "isomorphic-form-data": "^2.0.0",
46
47
  "lodash.isequal": "^4.5.0",
47
48
  "loglevel": "^1.6.6",
48
49
  "platform": "^1.3.6",
49
- "twilio-sync": "^3.0.6",
50
- "twilsock": "^0.12.1",
50
+ "twilio-sync": "^3.0.7-rc.0",
51
+ "twilsock": "^0.12.2-rc.0",
51
52
  "uuid": "^3.4.0"
52
53
  },
53
54
  "devDependencies": {
@@ -65,6 +66,8 @@
65
66
  "@types/node": "^12.12.12",
66
67
  "@types/sinon": "^10.0.0",
67
68
  "@types/sinon-chai": "^3.2.2",
69
+ "@typescript-eslint/eslint-plugin": "5.4.0",
70
+ "@typescript-eslint/parser": "5.4.0",
68
71
  "async": "^3.0.1",
69
72
  "async-test-tools": "^1.0.7",
70
73
  "backoff": "^2.5.0",
@@ -75,6 +78,9 @@
75
78
  "cheerio": "^1.0.0-rc.2",
76
79
  "cross-env": "^5.2.0",
77
80
  "dotenv": "^10.0.0",
81
+ "eslint": "8.3.0",
82
+ "eslint-config-prettier": "8.3.0",
83
+ "eslint-plugin-prettier": "4.0.0",
78
84
  "fancy-log": "^1.3.3",
79
85
  "fs": "0.0.2",
80
86
  "mocha": "^6.2.2",
@@ -82,19 +88,19 @@
82
88
  "node-fetch": "^2.6.1",
83
89
  "nyc": "^14.1.1",
84
90
  "path": "^0.12.7",
91
+ "prettier": "2.4.1",
85
92
  "rollup": "^2.51.1",
93
+ "rollup-plugin-copy": "^3.4.0",
86
94
  "rollup-plugin-polyfill-node": "^0.6.2",
87
95
  "rollup-plugin-terser": "^7.0.2",
88
96
  "rollup-plugin-ts": "^1.4.0",
89
97
  "sinon": "^9.2.4",
90
98
  "sinon-chai": "^3.3.0",
91
99
  "ts-node": "^8.5.2",
92
- "tslint": "^5.20.1",
93
100
  "twilio": "^3.37.1",
94
101
  "typedoc": "^0.21.4",
95
102
  "typescript": "^4.3.2",
96
- "vinyl-buffer": "^1.0.1",
97
- "vinyl-source-stream": "^2.0.0"
103
+ "typescript-strict-plugin": "1.1.2"
98
104
  },
99
105
  "engines": {
100
106
  "node": ">=14"