amazon-connect / amazon-connect-chatjs

Amazon Connect ChatJS - a browser-based contact center integration API for Chat on the Agent and Customer side.
https://docs.aws.amazon.com/connect/latest/adminguide/what-is-amazon-connect.html
Apache License 2.0
91 stars 53 forks source link

Move aws js sdk as a seperate dependency. #2

Open devansvd opened 4 years ago

devansvd commented 4 years ago

File - src/client/aws-client.js contains custom bundled sdk contents, if we need to include other dependencies like Lex, including the full sdk conflicts with the contents inside the src/client/aws-client.js. It's hard to debug what are included when custom bundled.

Is it possible to move amazon-connect-chat.js and aws-sdk as two seperate dependencies ?

Including like below Overrides the AWS global contents, Which leads to AWS.LexRuntime is not a constructor error. Had to remove all the contents inside src/client/aws-client.js and rebuilt the amazon-connect-chat.js to make it work.

<script src="js/aws-sdk-2.591.0.min.js"></script>
<script src="js/amazon-connect-chat.js"></script>
ctwomblyamzn commented 4 years ago

We will look into changing this, thanks for the input! At the time of release, the version of the AWS SDK with the Connect Chat APIs was unreleased, so we baked that version into Chatjs.

wilberh commented 4 years ago

Does the latest AWS SDK now comes with Connect Chat APIs?

dbhimwal commented 4 years ago

Does the latest AWS SDK now comes with Connect Chat APIs?

Yes, it does. You can find more information here - https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ConnectParticipant.html

trivikr commented 3 years ago

Since the connect chat APIs are now available in AWS SDKs since June 2020, can the custom bundled dependency be removed?

spenlep-amzn commented 4 months ago

ChatJS currently uses AWS SDK JavaScript v2.1459.0 [ref]

Team is not currently planning to make any changes to the baked-in SD. It needs to stay compatible with the Amazon Connect Streams library.

For this issue, I have drafted the required changes (https://github.com/amazon-connect/amazon-connect-chatjs/pull/200/files), but this needs additional testing to ensure it's compatible (w/ streams and other implementation)