@twilio/conversations 2.6.0 → 2.6.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 (74) hide show
  1. package/README.md +1 -1
  2. package/builds/browser.esm.js +11 -5
  3. package/builds/browser.esm.js.map +1 -1
  4. package/builds/browser.js +11 -5
  5. package/builds/browser.js.map +1 -1
  6. package/builds/lib.d.ts +5 -0
  7. package/builds/lib.esm.d.ts +5 -0
  8. package/builds/lib.esm.js +11 -5
  9. package/builds/lib.js +11 -5
  10. package/builds/lib.js.map +1 -1
  11. package/builds/twilio-conversations.js +13 -6
  12. package/builds/twilio-conversations.js.map +1 -0
  13. package/builds/twilio-conversations.min.js +2 -1
  14. package/builds/twilio-conversations.min.js.map +1 -0
  15. package/dist/aggregated-delivery-receipt.js +0 -2
  16. package/dist/aggregated-delivery-receipt.js.map +1 -1
  17. package/dist/channel-metadata-client.js +0 -3
  18. package/dist/channel-metadata-client.js.map +1 -1
  19. package/dist/client.js +1 -37
  20. package/dist/client.js.map +1 -1
  21. package/dist/command-executor.js +0 -5
  22. package/dist/command-executor.js.map +1 -1
  23. package/dist/configuration.js +0 -7
  24. package/dist/configuration.js.map +1 -1
  25. package/dist/content-client.js +0 -7
  26. package/dist/content-client.js.map +1 -1
  27. package/dist/content-template.js +0 -4
  28. package/dist/content-template.js.map +1 -1
  29. package/dist/conversation.js +0 -34
  30. package/dist/conversation.js.map +1 -1
  31. package/dist/data/conversations.js +9 -3
  32. package/dist/data/conversations.js.map +1 -1
  33. package/dist/data/messages.js +0 -6
  34. package/dist/data/messages.js.map +1 -1
  35. package/dist/data/participants.js +0 -6
  36. package/dist/data/participants.js.map +1 -1
  37. package/dist/data/users.js +0 -6
  38. package/dist/data/users.js.map +1 -1
  39. package/dist/detailed-delivery-receipt.js +0 -2
  40. package/dist/detailed-delivery-receipt.js.map +1 -1
  41. package/dist/interfaces/rules.js +0 -9
  42. package/dist/interfaces/rules.js.map +1 -1
  43. package/dist/logger.js +0 -23
  44. package/dist/logger.js.map +1 -1
  45. package/dist/media.js +0 -7
  46. package/dist/media.js.map +1 -1
  47. package/dist/message-builder.js +0 -12
  48. package/dist/message-builder.js.map +1 -1
  49. package/dist/message-recipients-client.js +0 -4
  50. package/dist/message-recipients-client.js.map +1 -1
  51. package/dist/message.js +0 -21
  52. package/dist/message.js.map +1 -1
  53. package/dist/packages/conversations/package.json.js +1 -1
  54. package/dist/participant.js +0 -13
  55. package/dist/participant.js.map +1 -1
  56. package/dist/push-notification.js +0 -5
  57. package/dist/push-notification.js.map +1 -1
  58. package/dist/rest-paginator.js +0 -6
  59. package/dist/rest-paginator.js.map +1 -1
  60. package/dist/services/network.js +0 -7
  61. package/dist/services/network.js.map +1 -1
  62. package/dist/services/typing-indicator.js +2 -1
  63. package/dist/services/typing-indicator.js.map +1 -1
  64. package/dist/unsent-message.js +0 -5
  65. package/dist/unsent-message.js.map +1 -1
  66. package/dist/user.js +0 -11
  67. package/dist/user.js.map +1 -1
  68. package/dist/util/deferred.js +0 -6
  69. package/dist/util/deferred.js.map +1 -1
  70. package/docs/assets/js/search.js +1 -1
  71. package/docs/index.html +2 -2
  72. package/docs/interfaces/CreateConversationOptions.html +17 -0
  73. package/docs/modules.html +1 -1
  74. package/package.json +2 -2
@@ -34744,7 +34744,7 @@ this.Twilio.Conversations = (function (exports) {
34744
34744
  return Network;
34745
34745
  }();
34746
34746
 
34747
- var version = "0.6.8";
34747
+ var version = "0.6.9";
34748
34748
 
34749
34749
  var _class;
34750
34750
 
@@ -41015,6 +41015,7 @@ this.Twilio.Conversations = (function (exports) {
41015
41015
  return this.services.commandExecutor.mutateResource("post", this.configuration.links.conversations, {
41016
41016
  friendly_name: options.friendlyName,
41017
41017
  unique_name: options.uniqueName,
41018
+ access: options.access,
41018
41019
  attributes: typeof attributes !== "undefined" ? JSON.stringify(attributes) : undefined
41019
41020
  });
41020
41021
 
@@ -41299,6 +41300,8 @@ this.Twilio.Conversations = (function (exports) {
41299
41300
  createdBy: body.created_by,
41300
41301
  attributes: body.attributes,
41301
41302
  channel: body.sync_objects.conversation,
41303
+ roster: body.sync_objects.participants,
41304
+ messages: body.sync_objects.messages,
41302
41305
  notificationLevel: body === null || body === void 0 ? void 0 : body.notification_level,
41303
41306
  sid: sid
41304
41307
  };
@@ -41344,8 +41347,10 @@ this.Twilio.Conversations = (function (exports) {
41344
41347
  uniqueName: body.unique_name,
41345
41348
  createdBy: body.created_by,
41346
41349
  attributes: body.attributes,
41347
- channel: "".concat(sid, ".channel"),
41348
- // notificationLevel: body?.notification_level,
41350
+ channel: body.sync_objects.conversation || "".concat(sid, ".channel"),
41351
+ roster: body.sync_objects.participants,
41352
+ messages: body.sync_objects.messages,
41353
+ notificationLevel: body === null || body === void 0 ? void 0 : body.notification_level,
41349
41354
  sid: sid
41350
41355
  };
41351
41356
  return _context6.abrupt("return", this._upsertConversation("sync", sid, data));
@@ -41682,7 +41687,7 @@ this.Twilio.Conversations = (function (exports) {
41682
41687
  status: conversationDescriptor.status,
41683
41688
  channel: conversationDescriptor.sync_objects.conversation,
41684
41689
  messages: conversationDescriptor.sync_objects.messages,
41685
- roster: "".concat(conversationDescriptor.conversation_sid, ".roster"),
41690
+ roster: conversationDescriptor.sync_objects.participants || "".concat(conversationDescriptor.conversation_sid, ".roster"),
41686
41691
  lastConsumedMessageIndex: conversationDescriptor.last_read_message_index,
41687
41692
  notificationLevel: conversationDescriptor.notification_level
41688
41693
  };
@@ -42126,7 +42131,7 @@ this.Twilio.Conversations = (function (exports) {
42126
42131
  }
42127
42132
 
42128
42133
  conversation._participants.forEach(function (participant) {
42129
- if (participant.identity !== message.identity) {
42134
+ if (participant.identity !== message.identity && participant.type !== "apple") {
42130
42135
  return;
42131
42136
  }
42132
42137
 
@@ -42242,7 +42247,7 @@ this.Twilio.Conversations = (function (exports) {
42242
42247
  this.data = data.data || {};
42243
42248
  });
42244
42249
 
42245
- var version = "2.6.0";
42250
+ var version = "2.6.1";
42246
42251
 
42247
42252
  function _isNativeFunction(fn) {
42248
42253
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
@@ -44738,6 +44743,7 @@ this.Twilio.Conversations = (function (exports) {
44738
44743
  this._conversationsPromise = this._conversationsEntity.fetchConversations().then(function () {
44739
44744
  return _this3._conversationsEntity;
44740
44745
  }).catch(function (error) {
44746
+ console.error("Failed to fetch conversations _conversationsPromise -> client.ts", error);
44741
44747
  throw error;
44742
44748
  });
44743
44749
  _context17.next = 30;
@@ -45053,3 +45059,4 @@ this.Twilio.Conversations = (function (exports) {
45053
45059
  return exports;
45054
45060
 
45055
45061
  })({});
45062
+ //# sourceMappingURL=twilio-conversations.js.map