From cea2c59c341ca6a05f2b3c95ba2269de4c4be7c8 Mon Sep 17 00:00:00 2001 From: ctwomblyamzn <58004580+ctwomblyamzn@users.noreply.github.com> Date: Thu, 16 Apr 2020 12:04:23 -0400 Subject: [PATCH] Update README and bump version (#238) * README and Documentation.md updates * version bump --- Documentation.md | 58 ++++++++++++++++++++++++++++++++++++------------ README.md | 7 ++++++ package.json | 2 +- 3 files changed, 52 insertions(+), 15 deletions(-) diff --git a/Documentation.md b/Documentation.md index b71d8477..f7bb84c0 100644 --- a/Documentation.md +++ b/Documentation.md @@ -3,12 +3,13 @@ ## Overview The Amazon Connect Streams API (Streams) gives you the power to integrate your -existing web applications with Amazon Connect. Streams gives you the power to +existing web applications with Amazon Connect. Streams lets you embed the Contact Control Panel (CCP) UI components into your page, and/or handle agent and contact state events directly giving you the power to control agent and contact state through an object oriented event driven interface. You can use the built in interface or build your own from scratch: Streams gives you -the power to choose. +the choice. This library must be used in conjunction with [amazon-connect-chatjs](https://github.com/amazon-connect/amazon-connect-chatjs) +in order to utilize Amazon Connect's Chat functionality. ## Architecture Click [here](Architecture.md) to view a quick architecture overview of how the @@ -40,8 +41,20 @@ To whitelist your pages: * All open tabs that contain an initialized Streams library or any other CCP tabs opened will be synchronized. This means that state changes made in one open window will be communicated to all open windows. +* Using multiple browsers at the same time for the same connect instance is not supported, and causes issues with the rtc communication. -### Downloading Streams + +### Downloading Streams with npm + +`npm install amazon-connect-streams` + +# Importing Streams with npm and ES6 + +`import "amazon-connect-streams";` + +This will make the `connect` variable available in the current context. + +### Downloading Streams from Github The next step to embedding Amazon Connect into your application is to download the Streams library from GitHub. You can do that by cloning our public repository here: @@ -90,17 +103,34 @@ everything set up correctly and that you are able to listen for events. ### `connect.core.initCCP()` ``` -connect.core.initCCP(containerDiv, { - ccpUrl: ccpUrl, /*REQUIRED*/ - loginPopup: true, /*optional, default TRUE*/ - loginUrl: loginUrl, /*optional*/ - loginPopupAutoClose: true, /*optional*/ - region: region /*REQUIRED*/ - softphone: { /*optional*/ - disableRingtone: true, /*optional*/ - ringtoneUrl: ringtoneUrl /*optional*/ - } -}); + + + +
+ + + + + + + + ``` Integrates with Amazon Connect by loading the pre-built CCP located at `ccpUrl` into an iframe and placing it into the `containerDiv` provided. API requests are diff --git a/README.md b/README.md index 3a0ede2c..7ef3f034 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,13 @@ To whitelist your pages: website is hosted on a non-standard port. #### A few things to note: +* Whitelisted domains must be HTTPS. * All of the pages that attempt to initialize the Streams library must be hosted on domains that are whitelisted as per the above steps. * All open tabs that contain an initialized Streams library or any other CCP tabs opened will be synchronized. This means that state changes made in one open window will be communicated to all open windows. +* Using multiple browsers at the same time for the same connect instance is not supported, and causes issues with the rtc communication. ### Downloading Streams with npm `npm install amazon-connect-streams` @@ -144,6 +146,11 @@ and made available to your JS client code. * `region`: Amazon connect instance region. ex: us-west-2 for PDX ccp instance. only required for chat channel. * `loginPopup`: Optional, defaults to `true`. Set to `false` to disable the login popup which is shown when the user's authentication expires. +* `loginPopupAutoClose`: Optional, defaults to `false`. Set to `true` in conjunction with the `loginPopup` parameter + to automatically close the login Popup window once the authentication step has completed. + If the login page opened in a new tab, this parameter will also auto-close that tab. +* `loginUrl`: Optional. Allows custom URL to be used to initiate the ccp, as in + the case of SAML authentication. * `softphone`: This object is optional and allows you to specify some settings surrounding the softphone feature of Connect. * `allowFramedSoftphone`: Normally, the softphone microphone and speaker diff --git a/package.json b/package.json index 51c04f5a..20ebad91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amazon-connect-streams", - "version": "1.4.6", + "version": "1.4.7", "description": "Amazon Connect Streams Library", "engines": { "node": ">=12.0.0"