@twilio/conversations 2.1.0-rc.9 → 3.0.0-canary.9

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 (89) hide show
  1. package/README.md +7 -3
  2. package/builds/browser.js +2707 -1986
  3. package/builds/browser.js.map +1 -1
  4. package/builds/lib.d.ts +513 -305
  5. package/builds/lib.js +2707 -1986
  6. package/builds/lib.js.map +1 -1
  7. package/builds/twilio-conversations.js +5232 -5070
  8. package/builds/twilio-conversations.min.js +1 -16
  9. package/dist/aggregated-delivery-receipt.js.map +1 -1
  10. package/dist/client.js +417 -283
  11. package/dist/client.js.map +1 -1
  12. package/dist/command-executor.js.map +1 -1
  13. package/dist/configuration.js +2 -2
  14. package/dist/configuration.js.map +1 -1
  15. package/dist/conversation.js +407 -374
  16. package/dist/conversation.js.map +1 -1
  17. package/dist/data/conversations.js +10 -11
  18. package/dist/data/conversations.js.map +1 -1
  19. package/dist/data/messages.js +46 -26
  20. package/dist/data/messages.js.map +1 -1
  21. package/dist/data/participants.js +19 -10
  22. package/dist/data/participants.js.map +1 -1
  23. package/dist/data/users.js +2 -2
  24. package/dist/data/users.js.map +1 -1
  25. package/dist/detailed-delivery-receipt.js.map +1 -1
  26. package/dist/index.js +1 -4
  27. package/dist/index.js.map +1 -1
  28. package/dist/interfaces/attributes.js.map +1 -1
  29. package/dist/interfaces/notification-types.js.map +1 -1
  30. package/dist/logger.js +2 -4
  31. package/dist/logger.js.map +1 -1
  32. package/dist/media.js +36 -25
  33. package/dist/media.js.map +1 -1
  34. package/dist/message-builder.js +24 -18
  35. package/dist/message-builder.js.map +1 -1
  36. package/dist/message.js +53 -26
  37. package/dist/message.js.map +1 -1
  38. package/dist/node_modules/tslib/tslib.es6.js +1 -1
  39. package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
  40. package/dist/packages/conversations/package.json.js +1 -1
  41. package/dist/participant.js +2 -2
  42. package/dist/participant.js.map +1 -1
  43. package/dist/push-notification.js.map +1 -1
  44. package/dist/rest-paginator.js.map +1 -1
  45. package/dist/services/network.js.map +1 -1
  46. package/dist/services/typing-indicator.js +1 -1
  47. package/dist/services/typing-indicator.js.map +1 -1
  48. package/dist/unsent-message.js +13 -3
  49. package/dist/unsent-message.js.map +1 -1
  50. package/dist/user.js +1 -1
  51. package/dist/user.js.map +1 -1
  52. package/dist/util/deferred.js.map +1 -1
  53. package/dist/util/index.js.map +1 -1
  54. package/package.json +22 -18
  55. package/CHANGELOG.md +0 -412
  56. package/docs/assets/css/main.css +0 -2660
  57. package/docs/assets/images/icons.png +0 -0
  58. package/docs/assets/images/icons@2x.png +0 -0
  59. package/docs/assets/images/widgets.png +0 -0
  60. package/docs/assets/images/widgets@2x.png +0 -0
  61. package/docs/assets/js/main.js +0 -248
  62. package/docs/assets/js/search.js +0 -1
  63. package/docs/classes/AggregatedDeliveryReceipt.html +0 -3184
  64. package/docs/classes/Client.html +0 -4073
  65. package/docs/classes/Conversation.html +0 -4325
  66. package/docs/classes/DetailedDeliveryReceipt.html +0 -3163
  67. package/docs/classes/Media.html +0 -3193
  68. package/docs/classes/Message.html +0 -3677
  69. package/docs/classes/MessageBuilder.html +0 -3254
  70. package/docs/classes/Participant.html +0 -3444
  71. package/docs/classes/PushNotification.html +0 -3130
  72. package/docs/classes/RestPaginator.html +0 -3160
  73. package/docs/classes/UnsentMessage.html +0 -3042
  74. package/docs/classes/User.html +0 -3349
  75. package/docs/index.html +0 -3512
  76. package/docs/interfaces/ClientOptions.html +0 -3034
  77. package/docs/interfaces/ConversationBindings.html +0 -3001
  78. package/docs/interfaces/ConversationEmailBinding.html +0 -3001
  79. package/docs/interfaces/ConversationLimits.html +0 -3098
  80. package/docs/interfaces/ConversationState.html +0 -3050
  81. package/docs/interfaces/CreateConversationOptions.html +0 -3066
  82. package/docs/interfaces/LastMessage.html +0 -3050
  83. package/docs/interfaces/Paginator.html +0 -3141
  84. package/docs/interfaces/ParticipantBindings.html +0 -3001
  85. package/docs/interfaces/ParticipantEmailBinding.html +0 -3001
  86. package/docs/interfaces/PushNotificationData.html +0 -3066
  87. package/docs/interfaces/SendEmailOptions.html +0 -3034
  88. package/docs/interfaces/SendMediaOptions.html +0 -3068
  89. package/docs/modules.html +0 -3513
@@ -1 +1 @@
1
- {"version":3,"file":"aggregated-delivery-receipt.js","sources":["../src/aggregated-delivery-receipt.ts"],"sourcesContent":["/**\n * Signifies the amount of participants which have the status for the message.\n */\ntype DeliveryAmount = \"none\" | \"some\" | \"all\";\n\ninterface AggregatedDeliveryDescriptor {\n total: number;\n delivered: DeliveryAmount;\n failed: DeliveryAmount;\n read: DeliveryAmount;\n sent: DeliveryAmount;\n undelivered: DeliveryAmount;\n}\n\n/**\n * Contains aggregated information about delivery statuses of a message across all participants\n * of a conversation.\n *\n * At any moment during the message delivery to a participant, the message can have zero or more of following\n * delivery statuses:\n * * Message is considered as **sent** to a participant if the nearest upstream carrier accepted the message.\n * * Message is considered as **delivered** to a participant if Twilio has received confirmation of message\n * delivery from the upstream carrier, and, where available, the destination handset.\n * * Message considered as **undelivered** to a participant if Twilio has received a delivery receipt\n * indicating that the message was not delivered. This can happen for many reasons including carrier content\n * filtering and the availability of the destination handset.\n * * Message considered as **read** by a participant if the message has been delivered and opened by the\n * recipient in a conversation. The recipient must have enabled the read receipts.\n * * Message considered as **failed** to be delivered to a participant if the message could not be sent.\n * This can happen for various reasons including queue overflows, account suspensions and media\n * errors (in the case of MMS for instance).\n *\n * {@link AggregatedDeliveryReceipt} class contains an aggregated value {@link DeliveryAmount} for each delivery status.\n */\nclass AggregatedDeliveryReceipt {\n private state: AggregatedDeliveryDescriptor;\n\n /**\n * @internal\n */\n constructor(data: AggregatedDeliveryDescriptor) {\n this.state = data;\n }\n\n /**\n * Maximum number of delivery events expected for the message.\n */\n public get total(): number {\n return this.state.total;\n }\n\n /**\n * Message is considered as **sent** to a participant if the nearest upstream carrier accepted the message.\n *\n * @return Amount of participants that have the **sent** delivery status for the message.\n */\n public get sent(): DeliveryAmount {\n return this.state.sent;\n }\n\n /**\n * Message is considered as **delivered** to a participant if Twilio has received confirmation of message\n * delivery from the upstream carrier, and, where available, the destination handset.\n *\n * @return Amount of participants that have the **delivered** delivery status for the message.\n */\n public get delivered(): DeliveryAmount {\n return this.state.delivered;\n }\n\n /**\n * Message is considered as **read** by a participant, if the message has been delivered and opened by the\n * recipient in a conversation. The recipient must have enabled the read receipts.\n *\n * @return Amount of participants that have the **read** delivery status for the message.\n */\n public get read(): DeliveryAmount {\n return this.state.read;\n }\n\n /**\n * Message is considered as **undelivered** to a participant if Twilio has received a delivery receipt\n * indicating that the message was not delivered. This can happen for many reasons including carrier content\n * filtering and the availability of the destination handset.\n *\n * @return Ammount of participants that have the **undelivered** delivery status for the message.\n */\n public get undelivered(): DeliveryAmount {\n return this.state.undelivered;\n }\n\n /**\n * Message is considered as **failed** to be delivered to a participant if the message could not be sent.\n * This can happen for various reasons including queue overflows, account suspensions and media\n * errors (in the case of MMS for instance). Twilio does not charge you for failed messages.\n *\n * @return Amount of participants that have the **failed** delivery status for the message.\n */\n public get failed(): DeliveryAmount {\n return this.state.failed;\n }\n\n _update(data: AggregatedDeliveryDescriptor): void {\n this.state = data;\n }\n\n _isEquals(data: AggregatedDeliveryDescriptor): boolean {\n const isTotalSame = this.total === data.total;\n const isSentSame = this.sent === data.sent;\n const isDeliveredSame = this.delivered === data.delivered;\n const isReadSame = this.read === data.read;\n const isUndeliveredSame = this.undelivered === data.undelivered;\n const isFailedSame = this.failed === data.failed;\n\n return (\n isTotalSame &&\n isSentSame &&\n isDeliveredSame &&\n isReadSame &&\n isUndeliveredSame &&\n isFailedSame\n );\n }\n}\n\nexport {\n AggregatedDeliveryReceipt,\n AggregatedDeliveryDescriptor,\n DeliveryAmount,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACjB,YAAY,EACZ;KACH;;;;;"}
1
+ {"version":3,"file":"aggregated-delivery-receipt.js","sources":["../src/aggregated-delivery-receipt.ts"],"sourcesContent":["/**\n * Signifies the amount of participants which have the status for the message.\n */\ntype DeliveryAmount = \"none\" | \"some\" | \"all\";\n\ninterface AggregatedDeliveryDescriptor {\n total: number;\n delivered: DeliveryAmount;\n failed: DeliveryAmount;\n read: DeliveryAmount;\n sent: DeliveryAmount;\n undelivered: DeliveryAmount;\n}\n\n/**\n * Contains aggregated information about delivery statuses of a message across all participants\n * of a conversation.\n *\n * At any moment during the message delivery to a participant, the message can have zero or more of following\n * delivery statuses:\n * * Message is considered as **sent** to a participant if the nearest upstream carrier accepted the message.\n * * Message is considered as **delivered** to a participant if Twilio has received confirmation of message\n * delivery from the upstream carrier, and, where available, the destination handset.\n * * Message considered as **undelivered** to a participant if Twilio has received a delivery receipt\n * indicating that the message was not delivered. This can happen for many reasons including carrier content\n * filtering and the availability of the destination handset.\n * * Message considered as **read** by a participant if the message has been delivered and opened by the\n * recipient in a conversation. The recipient must have enabled the read receipts.\n * * Message considered as **failed** to be delivered to a participant if the message could not be sent.\n * This can happen for various reasons including queue overflows, account suspensions and media\n * errors (in the case of MMS for instance).\n *\n * {@link AggregatedDeliveryReceipt} class contains an aggregated value {@link DeliveryAmount} for each delivery status.\n */\nclass AggregatedDeliveryReceipt {\n private state: AggregatedDeliveryDescriptor;\n\n /**\n * @internal\n */\n constructor(data: AggregatedDeliveryDescriptor) {\n this.state = data;\n }\n\n /**\n * Maximum number of delivery events expected for the message.\n */\n public get total(): number {\n return this.state.total;\n }\n\n /**\n * Message is considered as **sent** to a participant if the nearest upstream carrier accepted the message.\n *\n * @return Amount of participants that have the **sent** delivery status for the message.\n */\n public get sent(): DeliveryAmount {\n return this.state.sent;\n }\n\n /**\n * Message is considered as **delivered** to a participant if Twilio has received confirmation of message\n * delivery from the upstream carrier, and, where available, the destination handset.\n *\n * @return Amount of participants that have the **delivered** delivery status for the message.\n */\n public get delivered(): DeliveryAmount {\n return this.state.delivered;\n }\n\n /**\n * Message is considered as **read** by a participant, if the message has been delivered and opened by the\n * recipient in a conversation. The recipient must have enabled the read receipts.\n *\n * @return Amount of participants that have the **read** delivery status for the message.\n */\n public get read(): DeliveryAmount {\n return this.state.read;\n }\n\n /**\n * Message is considered as **undelivered** to a participant if Twilio has received a delivery receipt\n * indicating that the message was not delivered. This can happen for many reasons including carrier content\n * filtering and the availability of the destination handset.\n *\n * @return Ammount of participants that have the **undelivered** delivery status for the message.\n */\n public get undelivered(): DeliveryAmount {\n return this.state.undelivered;\n }\n\n /**\n * Message is considered as **failed** to be delivered to a participant if the message could not be sent.\n * This can happen for various reasons including queue overflows, account suspensions and media\n * errors (in the case of MMS for instance). Twilio does not charge you for failed messages.\n *\n * @return Amount of participants that have the **failed** delivery status for the message.\n */\n public get failed(): DeliveryAmount {\n return this.state.failed;\n }\n\n _update(data: AggregatedDeliveryDescriptor): void {\n this.state = data;\n }\n\n _isEquals(data: AggregatedDeliveryDescriptor): boolean {\n const isTotalSame = this.total === data.total;\n const isSentSame = this.sent === data.sent;\n const isDeliveredSame = this.delivered === data.delivered;\n const isReadSame = this.read === data.read;\n const isUndeliveredSame = this.undelivered === data.undelivered;\n const isFailedSame = this.failed === data.failed;\n\n return (\n isTotalSame &&\n isSentSame &&\n isDeliveredSame &&\n isReadSame &&\n isUndeliveredSame &&\n isFailedSame\n );\n }\n}\n\nexport {\n AggregatedDeliveryReceipt,\n AggregatedDeliveryDescriptor,\n DeliveryAmount,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA;;;;;;;;;;;;;;;;;;;AAmBG;AACH,MAAM,yBAAyB,CAAA;AAG7B;;AAEG;AACH,IAAA,WAAA,CAAY,IAAkC,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