Changelog for Messaging Platform SDK

1.12.13

  • Fixing missing messageAudience for the latest message while calling the queryMessages method.
  • Adding content-type header when using uploadFile method.

1.12.12

  • Fixed typo when emitting a warning about outdated conversations over a certain threshold.

1.12.11

  • Added configuration parameter unsubscribeFromOutdatedConversationsOnReconnect (defaults to true) whether to close outdated conversations on reconnect or not. True is recommended, but should be set to false if issues with lost messages are encountered.

1.12.10

  • Updating url path for all message/conversation related endpoints
  • Fixed issue with agentId being null if message is sent by an agent that has been removed from the conversation before the connection

1.12.9

  • Adding anonymous async function as param of the ring which could be resolved if rings need to use directly the conversation
  • Adding ringConversationTimeout param to createConnection so brands can configure it.
  • Adding conversation.getLatestConsumerMessage() to allow brand users to get latest consumer message.

1.12.8

  • Fixed issue with consumer connection not properly reflecting assigned agent change on skill transfer.
  • conversation-deleted now emitted when DELETE notification is received, previously this was only emitted when a conversation was removed during disconnect.

1.12.7

  • Bumped axios version to 1.6.5 due to security vulnerabilities.

1.12.6

  • Adding check for existing dialog before trying to transfer conversation on the transfer method.

1.12.5

  • Omit Accept-Encoding header when invoking UMS REST API

1.12.4

  • Support additional query parameters for getMessages in BrandRestConnection

1.12.3

  • Fixing proxy web socket connection configuration issue

1.12.2

  • Adding responseTimeout param to createConnection so brands can configure it.

1.12.1

  • Add support for proxy http request
  • Fix documenting example inside of the README about createConversationSubscription

1.11.3

  • Fixing missing metadata for some messages while calling the queryMessages method.

1.11.2

  • Fix a race condition when creating a new conversation which caused some conversations to have multiple conversation objects
  • add originatorId and originatorRole as optional args for the rest publishMessage

1.11.1

  • RoutingTaskSubscriptions are now restored upon reconnect.

1.11.0

  • For Brand Rest Connections, getConversationById will now make a fetch call, parse the data, and return a conversation object. Previously it would only return the raw result of the HTTP request.

1.10.0

  • Added await connection.getMessageStatisticsForUser() and await connection.getMessageStatisticsForBrand() to allow brand users to get message statistics information.
  • Added conversation.resumeConversation() to allow brand users to resume previously closed conversation with a consumer.
  • Added connection.on('failed-to-connect') event which will fire when moving to FAILED_TO_CONNECT state, ie when failed attempt occurs while trying to establish websocket connection.

1.9.6

  • connection.closeConversation(conversationId) is now available. With this function conversations can be closed without a conversation object.

1.9.5

  • Conversation.assignedAgent should return active assigned agent only. Also handled edge case where suggested agents do not have userId

1.9.4

  • Fix chatStateEvent for unknown participant undefined error after moving message originator transformation in 1.9.2

1.9.3

  • Exposed TTRType enum
  • Added message.sentByCurrentUser method to the Message class
  • Added getConversationById & getAllKnownConversations methods to Connection
  • Added notificationType of child for deferred notifications from child subscriptions

1.9.2

  • Move message originator transformation from connection to MessageFactory, fixes issues where Message objects created from lastContentEventNotification and queryMessages did not have the correct sender

1.9.1

  • Use HTTPS for the baseURI call to CSDS

1.9.0

  • Rename waitForFirstNotification to waitForReady. waitForFirstNotification will still function to ensure backwards compatibility, but is now deprecated.
  • Use of notificationType in ConversationSubscription to determine notification type, fixes issues around onFirstNotification and child subscriptions
  • userId for brand connections is now userId uuid, rather than the un-prefixed agentId
  • Fix limit-break chain for subscriptions with more than 2002 conversations

1.8.2

  • Truncate setAgentNote to 5000-character limit, throw error if note cannot be added

1.8.1

  • Don't delete lastContentEventNotification when emitting it to subscriptions
  • Update participant role when they are removed and then re-added

1.8.0

  • Add setAgentNote method to conversation, which deprecates setNote
  • BrandWebsocketConnection now has userProfile parameter, available after opening the connection
  • Fix to allow connection with existing unauthenticated token to step up
  • Added documentation for continuing an anonymous user session between two connections

1.7.2

  • Add consumer-step-up event to the conversation

1.7.1

  • Removed reference to a test module that was preventing code execution

1.7.0

  • File sharing - Upload and Download for both node.js and browser
  • Authenticated consumer flow
  • Consumer stepup via connection.stepUp() function
  • participant.getUserProfile() is now available
  • dialog.leave() and conversation.leave() are now available
  • Arbitrary websocket requests with connection.send()
  • Listen to all websocket notifications via connection.on('notification')
  • Expanded documentation

1.6.6

  • added conversation.consumer getter to help get the conversation's consumer participant

1.6.5

  • Fixed bug in 1001 conversation limit break for LP originating disconnects
  • Lower default max reconnection time limit from 4 hours to 10 minutes

1.6.4

  • Bug fixes
    • When reconnecting, only drop conversations that have actually been closed while we were disconnected
    • When a conversation is dropped for any reason and it is later seen in a notification, re-add it to the cache

1.6.3

  • Added assignedAgent getter to Conversation class

1.6.2

  • Update appId with correct capitalization

1.6.1

  • appId must be limited to alphanumeric plus special characters -_.

1.6.0

  • MA-238 appId is now a required argument when calling createConnection

1.5.7

  • Handle notifications that have missing participantsDetails

1.5.5

  • Add support for quickReplies, available by setting the third argument on sendMessage and sendRichText conversation.sendMessage('test', null, quickReplies);

1.5.4

  • Pass through getShiftStatus#response & getShiftStatus#error events to the connection

1.5.3

  • TokenMaintainer fixes - prevent caching token generation errors to allow reconnections
  • getToken now blocks until token generation succeeds or TokenMaintainer is stopped

1.5.2

  • CO-6234: Add APIs to change TTR and ManualETTR of a conversation, which consequently emits ttr-change and manual-ettr-change events respectively
  • Whitelist dialog:close event and bubble up to conversation & connection

1.5.1

  • CO-6394: fix for conversation.sendRichText, metadata was populated with message audience
  • expose ConversationContextType, add conversationContext and campaignInfo to readme

1.5.0

  • shift-status polling now encapsulated and exposed in lpmsdk.ShiftStatusPoller
  • rest helper functions exposed through lpmsdk.rest

1.4.6

  • Bubble up dialog and conversation events to the connection. These will have a conversation: prefix to them e.g. conversation:close
  • Minor refactor of refreshSession internal method

1.4.5

  • Fix for serialization of rich content events

1.4.4

  • TokenMaintainer ctor now expects an object. Also added getAuthSessionInfo() method and extended support for refreshing tokens when authSessionInfo is passed in ctor

1.4.3

  • loadConversation(serializedConversationData) function on connection, which allows previously serialized conversations to be resumed by the connection.
  • unload() function on conversation that allows a conversation to bemanually removed from the SDK's memory.

1.4.2

  • Expose TokenMaintainer class

1.4.1

  • Added a queue when processing onNotificationPart

1.4.0

  • CO-6062: Create ConversationNotificationFeed, WebhooksIntake, and NullConnection classes to consume notifications from webhooks/kafka. Accessed via connection.processWebhooksNotification(notification)

1.3.0

  • Public documentation now available @ www.npmjs.com/package/lp-messaging-sdk
  • Introduced TokenMaintainer class to keep bearer tokens valid
  • TokenMaintainer now used in BrandWebsocketConnection & BrandRestConnection
  • Bug fixes for simple-websocket library related to retrieving close and error codes
  • CO-6063: Add setCsat function to conversation, available for consumers
  • CO-6099: Expose connection.getToken() async method to obtain token from connection
  • CO-5613: Static deserialize function to recreate a hydrated Conversation object from DB

1.2.31

  • add "consumer" getter helper to dialog
  • expose ParticipantChatState enum

1.2.30

  • CO-5950: Always create context and attach clientProperties

1.2.29

  • CO-5989: Add setNote function to conversation

1.2.28

  • CO-5907: Allow campaignInfo argument on createConversation to pass through correctly
  • CO-5880: RoutingTaskSubscriptions and Rings are now available
  • Browser stand alone build is now available /web/lpm-sdk.js
  • Websocket library "ws" has been replaced with "simple-websocket" for browser compatibility
  • CO-5987: use v2.1 of the WS API to allow suggested agents
  • Increased default wait to reconnect time to 2 seconds, as per UMS recommendation

1.2.23

  • Added Conversation REST APIs under lib/api/rest/conversation

1.2.22

  • Minor fix so conversationContext is passed in correctly when consumers create conversations

1.2.19

  • BrandWebsocketConnection now emits skill-entered-work-hours and skill-entered-off-hours for any of its skills

1.2.18

  • Allow access to ParticipantRole enum
  • CO-5713: Added ability to attach metadata to messages in sendMessage, sendPrivateMessage, and sendRichText
  • CO-5612: serialize method added for Conversation object to allow it to be persisted in DBs
  • Added Messaging & General REST APIs under lib/api/rest

1.2.17

  • CO-5322: Subscriptions now have a process to get more than 1001 conversations, there is now no limit to the number of conversations. This feature is enabled by default, but can be disabled by passing limitBreakEnabled: false as an option to createConnection
  • CO-5603: Removed errors when receiving duplicate read or accept message notifications from UMS
  • CO-5604: Fixed issue where onReconnect calls could be doubled up in certain scenarios

1.2.14

  • CO-5512: maintainConnection is now true by default when calling createConnection

1.2.11

  • CO-4981: Added tracking info to WS connection URL params
  • CO-5532: Mock stepup: automatic consumer take over
  • CO-5463: Shift-status will now start and retrieve initial data before default subscription is created

1.2.10

  • CO-5436: Skill.isInOffHours helper function

1.2.7

  • CO-5517: Conversation Deleted Event

1.2.5

  • CO-5295: Media Handler File upload requests
  • CO-5013: Wait for the first MS notification

1.2.4

  • CO-5322: Conversation subscriptions async .init() which must be called to create subscription

1.2.3

  • _callShiftStatus now has a return value
  • CO-5321: dialog.getAll() retrieves all messages

1.2.2

  • CO-5470: Remove optional chaining parameter for compatibility with old versions of node.js
  • CO-5470: add wait option to createSubscription

1.2.1

  • CO-4978: dialog.setChatState function
  • Shift-status poller

1.1.1

  • CO-4866: Resubscribe Subscriptions on Reconnect
  • CO-5232: Private messages
  • CO-5154: Support for Multiple Dialogs of the same Type