@twilio/conversations 2.1.0-rc.5 → 2.1.0-rc.6

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 (42) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/builds/browser.js +3 -5
  3. package/builds/browser.js.map +1 -1
  4. package/builds/lib.d.ts +15 -6
  5. package/builds/lib.js +3 -5
  6. package/builds/lib.js.map +1 -1
  7. package/builds/twilio-conversations.js +3 -5
  8. package/builds/twilio-conversations.min.js +1 -1
  9. package/dist/configuration.js.map +1 -1
  10. package/dist/conversation.js.map +1 -1
  11. package/dist/message-builder.js.map +1 -1
  12. package/dist/message.js +2 -3
  13. package/dist/message.js.map +1 -1
  14. package/dist/packages/conversations/package.json.js +1 -1
  15. package/docs/assets/js/search.js +1 -1
  16. package/docs/classes/AggregatedDeliveryReceipt.html +0 -117
  17. package/docs/classes/Client.html +0 -117
  18. package/docs/classes/Conversation.html +12 -129
  19. package/docs/classes/DetailedDeliveryReceipt.html +0 -117
  20. package/docs/classes/Media.html +0 -117
  21. package/docs/classes/Message.html +4 -121
  22. package/docs/classes/MessageBuilder.html +2 -119
  23. package/docs/classes/Participant.html +4 -121
  24. package/docs/classes/PushNotification.html +0 -117
  25. package/docs/classes/RestPaginator.html +0 -117
  26. package/docs/classes/UnsentMessage.html +0 -117
  27. package/docs/classes/User.html +4 -121
  28. package/docs/index.html +56 -0
  29. package/docs/interfaces/ClientOptions.html +0 -117
  30. package/docs/interfaces/ConversationBindings.html +0 -117
  31. package/docs/interfaces/ConversationEmailBinding.html +0 -117
  32. package/docs/interfaces/ConversationState.html +0 -117
  33. package/docs/interfaces/CreateConversationOptions.html +1 -118
  34. package/docs/interfaces/LastMessage.html +0 -117
  35. package/docs/interfaces/Paginator.html +0 -117
  36. package/docs/interfaces/ParticipantBindings.html +0 -117
  37. package/docs/interfaces/ParticipantEmailBinding.html +0 -117
  38. package/docs/interfaces/PushNotificationData.html +0 -117
  39. package/docs/interfaces/SendEmailOptions.html +0 -117
  40. package/docs/interfaces/SendMediaOptions.html +0 -117
  41. package/docs/modules.html +56 -0
  42. package/package.json +1 -1
package/builds/lib.d.ts CHANGED
@@ -55,7 +55,7 @@ declare class Logger {
55
55
  static warn(...args: any[]): void;
56
56
  static error(...args: any[]): void;
57
57
  }
58
- interface Limits {
58
+ interface ConversationLimits {
59
59
  mediaAttachmentsCountLimit: number;
60
60
  mediaAttachmentSizeLimitInMb: number;
61
61
  mediaAttachmentsTotalSizeLimitInMb: number;
@@ -78,7 +78,7 @@ declare class Configuration {
78
78
  mediaSetService: string;
79
79
  messagesReceipts: string;
80
80
  };
81
- readonly limits: Limits;
81
+ readonly limits: ConversationLimits;
82
82
  readonly productId?: string;
83
83
  readonly typingIndicatorTimeoutOverride?: number;
84
84
  readonly typingIndicatorTimeoutDefault: number;
@@ -106,10 +106,19 @@ declare class CommandExecutor {
106
106
  fetchResource<REQ = void, RESP = void>(url: string, requestBody?: REQ): Promise<RESP>;
107
107
  mutateResource<REQ = void, RESP = void>(method: "post" | "delete", url: string, requestBody?: REQ): Promise<RESP>;
108
108
  }
109
+ /**
110
+ * Represents a JSON value.
111
+ */
109
112
  type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
113
+ /**
114
+ * Represents a JSON object.
115
+ */
110
116
  type JSONObject = {
111
117
  [x: string]: JSONValue;
112
118
  };
119
+ /**
120
+ * Represents a JSON array.
121
+ */
113
122
  type JSONArray = JSONValue[];
114
123
  type UserEvents = {
115
124
  updated: (data: {
@@ -824,7 +833,7 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
824
833
  /**
825
834
  * The server-assigned unique identifier of the authoring participant.
826
835
  */
827
- get participantSid(): string;
836
+ get participantSid(): string | null;
828
837
  /**
829
838
  * Aggregated information about the message delivery statuses across all participants of a conversation..
830
839
  */
@@ -1140,7 +1149,7 @@ declare class MessageBuilder {
1140
1149
  /**
1141
1150
  * @internal
1142
1151
  */
1143
- constructor(limits: Limits, messagesEntity: Messages);
1152
+ constructor(limits: ConversationLimits, messagesEntity: Messages);
1144
1153
  /**
1145
1154
  * Sets the message body.
1146
1155
  * @param text Contents of the body.
@@ -1468,7 +1477,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1468
1477
  */
1469
1478
  get notificationLevel(): NotificationLevel;
1470
1479
  get bindings(): ConversationBindings;
1471
- get limits(): Limits;
1480
+ get limits(): ConversationLimits;
1472
1481
  /**
1473
1482
  * State of the conversation.
1474
1483
  */
@@ -2204,4 +2213,4 @@ declare class NotificationTypes {
2204
2213
  static readonly REMOVED_FROM_CONVERSATION = "twilio.conversations.removed_from_conversation";
2205
2214
  static readonly CONSUMPTION_UPDATE = "twilio.channel.consumption_update";
2206
2215
  }
2207
- export { Conversation, ConversationBindings, ConversationEmailBinding, ConversationUpdateReason, ConversationStatus, NotificationLevel, ConversationState, ConversationUpdatedEventArgs, SendMediaOptions, SendEmailOptions, LastMessage, Participant, ParticipantUpdateReason, ParticipantType, ParticipantUpdatedEventArgs, ParticipantBindings, ParticipantEmailBinding, ParticipantEmailLevel, Message, MessageUpdateReason, MessageType, MessageUpdatedEventArgs, Media, MediaCategory$0 as MediaCategory, AggregatedDeliveryReceipt, DeliveryAmount, DetailedDeliveryReceipt, DeliveryStatus, RestPaginator, MessageBuilder, UnsentMessage, Paginator, ParticipantBindingOptions, User, UserUpdateReason, UserUpdatedEventArgs, PushNotification, PushNotificationType, PushNotificationDescriptor, PushNotificationData, NotificationTypes, Client, State, ConnectionState, NotificationsChannelType, ClientOptions, CreateConversationOptions };
2216
+ export { Conversation, ConversationBindings, ConversationEmailBinding, ConversationUpdateReason, ConversationStatus, NotificationLevel, ConversationState, ConversationUpdatedEventArgs, SendMediaOptions, SendEmailOptions, LastMessage, Participant, ParticipantUpdateReason, ParticipantType, ParticipantUpdatedEventArgs, ParticipantBindings, ParticipantEmailBinding, ParticipantEmailLevel, Message, MessageUpdateReason, MessageType, MessageUpdatedEventArgs, Media, MediaCategory$0 as MediaCategory, AggregatedDeliveryReceipt, DeliveryAmount, DetailedDeliveryReceipt, DeliveryStatus, RestPaginator, MessageBuilder, UnsentMessage, Paginator, ParticipantBindingOptions, User, UserUpdateReason, UserUpdatedEventArgs, PushNotification, PushNotificationType, PushNotificationDescriptor, PushNotificationData, NotificationTypes, Client, State, ConnectionState, NotificationsChannelType, ClientOptions, CreateConversationOptions, ConversationLimits, JSONValue, JSONObject, JSONArray };
package/builds/lib.js CHANGED
@@ -2646,9 +2646,7 @@ var Message = /*#__PURE__*/function (_ReplayEventEmitter) {
2646
2646
  }, {
2647
2647
  key: "participantSid",
2648
2648
  get: function get() {
2649
- var _this$state$participa;
2650
-
2651
- return (_this$state$participa = this.state.participantSid) !== null && _this$state$participa !== void 0 ? _this$state$participa : "";
2649
+ return this.state.participantSid;
2652
2650
  }
2653
2651
  /**
2654
2652
  * Aggregated information about the message delivery statuses across all participants of a conversation..
@@ -2794,7 +2792,7 @@ var Message = /*#__PURE__*/function (_ReplayEventEmitter) {
2794
2792
  }
2795
2793
 
2796
2794
  _context.next = 4;
2797
- return this.conversation.getParticipantBySid(this.participantSid).catch(function () {
2795
+ return this.conversation.getParticipantBySid(this.state.participantSid).catch(function () {
2798
2796
  log$5.debug("Participant with sid \"".concat(_this2.participantSid, "\" not found for message ").concat(_this2.sid));
2799
2797
  return null;
2800
2798
  });
@@ -6858,7 +6856,7 @@ function PushNotification(data) {
6858
6856
  this.data = data.data || {};
6859
6857
  };
6860
6858
 
6861
- var version = "2.1.0-rc.5";
6859
+ var version = "2.1.0-rc.6";
6862
6860
 
6863
6861
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
6864
6862