Skip to content

Commit

Permalink
Streams 2.13.1 release (#835)
Browse files Browse the repository at this point in the history
- Added permissions for Clipboard APIs when using embedded apps
- Added getAgentARN() API
- Minor documentation + linting updates
  • Loading branch information
hngan authored Jan 23, 2024
1 parent 1aa9933 commit 6943b56
Show file tree
Hide file tree
Showing 11 changed files with 168 additions and 120 deletions.
102 changes: 67 additions & 35 deletions Documentation.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amazon-connect-streams",
"version": "2.13.0",
"version": "2.13.1",
"description": "Amazon Connect Streams Library",
"engines": {
"node": ">=12.0.0"
Expand Down
2 changes: 1 addition & 1 deletion release/connect-streams-dr-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/connect-streams-dr.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/connect-streams-min.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions release/connect-streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
iframe.id = appName;
iframe['aria-label'] = appName;
iframe.onload = onLoad;
iframe.allow = "clipboard-read; clipboard-write";
iframe.setAttribute(
"sandbox",
"allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
Expand Down Expand Up @@ -807,6 +808,10 @@
return this.getConfiguration().name;
};

Agent.prototype.getAgentARN = function () {
return this.getConfiguration().agentARN;
};

Agent.prototype.getExtension = function () {
return this.getConfiguration().extension;
};
Expand Down Expand Up @@ -26768,7 +26773,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017-

connect.core = {};
connect.core.initialized = false;
connect.version = "2.13.0";
connect.version = "2.13.1";
connect.outerContextStreamsVersion = null;
connect.DEFAULT_BATCH_SIZE = 500;

Expand Down Expand Up @@ -28960,45 +28965,45 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017-
};

connect.core.contactEventGraph = new connect.EventGraph()
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.INCOMING,
connect.ContactEvents.INCOMING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.PENDING,
connect.ContactEvents.PENDING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.CONNECTING,
connect.ContactEvents.CONNECTING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.CONNECTED,
connect.ContactEvents.CONNECTED)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.ERROR,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.ERROR,
connect.ContactEvents.MISSED)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.ENDED,
connect.ContactEvents.ACW)
.assoc(connect.values(connect.CONTACT_ACTIVE_STATES),
connect.values(connect.relativeComplement(connect.CONTACT_ACTIVE_STATES, connect.ContactStateType)),
connect.ContactEvents.ENDED)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.ERROR,
connect.ContactEvents.ERROR)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.MISSED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.MISSED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.REJECTED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.REJECTED,
connect.ContactEvents.MISSED);
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.INCOMING,
connect.ContactEvents.INCOMING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.PENDING,
connect.ContactEvents.PENDING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.CONNECTING,
connect.ContactEvents.CONNECTING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.CONNECTED,
connect.ContactEvents.CONNECTED)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.ERROR,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.ERROR,
connect.ContactEvents.MISSED)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.ENDED,
connect.ContactEvents.ACW)
.assoc(connect.values(connect.CONTACT_ACTIVE_STATES),
connect.values(connect.relativeComplement(connect.CONTACT_ACTIVE_STATES, connect.ContactStateType)),
connect.ContactEvents.ENDED)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.ERROR,
connect.ContactEvents.ERROR)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.MISSED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.MISSED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.REJECTED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.REJECTED,
connect.ContactEvents.MISSED);

/**-----------------------------------------------------------------------*/
connect.core.getClient = function () {
Expand Down
1 change: 1 addition & 0 deletions src/agent-app/app-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
iframe.id = appName;
iframe['aria-label'] = appName;
iframe.onload = onLoad;
iframe.allow = "clipboard-read; clipboard-write";
iframe.setAttribute(
"sandbox",
"allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
Expand Down
4 changes: 4 additions & 0 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,10 @@
return this.getConfiguration().name;
};

Agent.prototype.getAgentARN = function () {
return this.getConfiguration().agentARN;
};

Agent.prototype.getExtension = function () {
return this.getConfiguration().extension;
};
Expand Down
78 changes: 39 additions & 39 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2203,45 +2203,45 @@
};

connect.core.contactEventGraph = new connect.EventGraph()
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.INCOMING,
connect.ContactEvents.INCOMING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.PENDING,
connect.ContactEvents.PENDING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.CONNECTING,
connect.ContactEvents.CONNECTING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.CONNECTED,
connect.ContactEvents.CONNECTED)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.ERROR,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.ERROR,
connect.ContactEvents.MISSED)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.ENDED,
connect.ContactEvents.ACW)
.assoc(connect.values(connect.CONTACT_ACTIVE_STATES),
connect.values(connect.relativeComplement(connect.CONTACT_ACTIVE_STATES, connect.ContactStateType)),
connect.ContactEvents.ENDED)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.ERROR,
connect.ContactEvents.ERROR)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.MISSED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.MISSED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.REJECTED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.REJECTED,
connect.ContactEvents.MISSED);
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.INCOMING,
connect.ContactEvents.INCOMING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.PENDING,
connect.ContactEvents.PENDING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.CONNECTING,
connect.ContactEvents.CONNECTING)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.CONNECTED,
connect.ContactEvents.CONNECTED)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.ERROR,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.ERROR,
connect.ContactEvents.MISSED)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.ENDED,
connect.ContactEvents.ACW)
.assoc(connect.values(connect.CONTACT_ACTIVE_STATES),
connect.values(connect.relativeComplement(connect.CONTACT_ACTIVE_STATES, connect.ContactStateType)),
connect.ContactEvents.ENDED)
.assoc(connect.EventGraph.ANY,
connect.ContactStateType.ERROR,
connect.ContactEvents.ERROR)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.MISSED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.MISSED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.CONNECTING,
connect.ContactStateType.REJECTED,
connect.ContactEvents.MISSED)
.assoc(connect.ContactStateType.INCOMING,
connect.ContactStateType.REJECTED,
connect.ContactEvents.MISSED);

/**-----------------------------------------------------------------------*/
connect.core.getClient = function () {
Expand Down
6 changes: 6 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,9 @@ declare namespace connect {
*/
getChannelConcurrency(channel: ChannelType): number;

/** Gets the agent's ARN. */
getAgentARN(): string;

/** Gets the agent's user friendly display name. */
getName(): string;

Expand Down Expand Up @@ -1346,6 +1349,9 @@ declare namespace connect {

/** The username for the agent as entered in their Amazon Connect user account. */
readonly username: string;

/** The ARN of the agent */
readonly agentARN: string;
}

interface AgentRoutingProfile {
Expand Down

0 comments on commit 6943b56

Please sign in to comment.