Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ctwomblyamzn authored Dec 20, 2019
2 parents 1c26b7e + 86bd007 commit 2dfe6ec
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 15 deletions.
2 changes: 1 addition & 1 deletion release/connect-streams-min.js

Large diffs are not rendered by default.

26 changes: 19 additions & 7 deletions release/connect-streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -22778,6 +22778,7 @@ AWS.apiLoader.services['sts']['2011-06-15'] = require('../apis/sts-2011-06-15.mi
'updateAgentConfiguration',
'acceptContact',
'createOutboundContact',
'completeContact',
'destroyContact',
'notifyContactIssue',
'updateContactAttributes',
Expand Down Expand Up @@ -22925,10 +22926,6 @@ AWS.apiLoader.services['sts']['2011-06-15'] = require('../apis/sts-2011-06-15.mi
var self = this;
var log = connect.getLog();

params.authentication = {
authToken: this.authToken
};

if (! connect.contains(this.client, method)) {
var message = connect.sprintf('No such method exists on AWS client: %s', method);
callbacks.failure(new connect.ValueError(message), {message: message});
Expand Down Expand Up @@ -22974,6 +22971,10 @@ AWS.apiLoader.services['sts']['2011-06-15'] = require('../apis/sts-2011-06-15.mi
}
};

AWSClient.prototype._requiresAuthenticationParam = function(method) {
return method !== connect.ClientMethods.COMPLETE_CONTACT;
};

AWSClient.prototype._translateParams = function(method, params) {
switch (method) {
case connect.ClientMethods.UPDATE_AGENT_CONFIGURATION:
Expand All @@ -22993,6 +22994,12 @@ AWS.apiLoader.services['sts']['2011-06-15'] = require('../apis/sts-2011-06-15.mi
break;
}

if (this._requiresAuthenticationParam(method)) {
params.authentication = {
authToken: this.authToken
};
}

return params;
};

Expand Down Expand Up @@ -23873,6 +23880,13 @@ AWS.apiLoader.services['sts']['2011-06-15'] = require('../apis/sts-2011-06-15.mi
}, callbacks);
};

Contact.prototype.complete = function (callbacks) {
var client = connect.core.getClient();
client.call(connect.ClientMethods.COMPLETE_CONTACT, {
contactId: this.getContactId()
}, callbacks);
};

Contact.prototype.notifyIssue = function (issueCode, description, callbacks) {
var client = connect.core.getClient();
client.call(connect.ClientMethods.NOTIFY_CONTACT_ISSUE, {
Expand Down Expand Up @@ -24037,10 +24051,8 @@ AWS.apiLoader.services['sts']['2011-06-15'] = require('../apis/sts-2011-06-15.mi
return this._getData().monitoringInfo;
};


Connection.prototype.destroy = function (callbacks) {
var client = connect.core.getClient(), self = this;

var client = connect.core.getClient();
client.call(connect.ClientMethods.DESTROY_CONNECTION, {
contactId: this.getContactId(),
connectionId: this.getConnectionId()
Expand Down
11 changes: 8 additions & 3 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,13 @@
}, callbacks);
};

Contact.prototype.complete = function (callbacks) {
var client = connect.core.getClient();
client.call(connect.ClientMethods.COMPLETE_CONTACT, {
contactId: this.getContactId()
}, callbacks);
};

Contact.prototype.notifyIssue = function (issueCode, description, callbacks) {
var client = connect.core.getClient();
client.call(connect.ClientMethods.NOTIFY_CONTACT_ISSUE, {
Expand Down Expand Up @@ -800,10 +807,8 @@
return this._getData().monitoringInfo;
};


Connection.prototype.destroy = function (callbacks) {
var client = connect.core.getClient(), self = this;

var client = connect.core.getClient();
client.call(connect.ClientMethods.DESTROY_CONNECTION, {
contactId: this.getContactId(),
connectionId: this.getConnectionId()
Expand Down
15 changes: 11 additions & 4 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
'updateAgentConfiguration',
'acceptContact',
'createOutboundContact',
'completeContact',
'destroyContact',
'notifyContactIssue',
'updateContactAttributes',
Expand Down Expand Up @@ -170,10 +171,6 @@
var self = this;
var log = connect.getLog();

params.authentication = {
authToken: this.authToken
};

if (! connect.contains(this.client, method)) {
var message = connect.sprintf('No such method exists on AWS client: %s', method);
callbacks.failure(new connect.ValueError(message), {message: message});
Expand Down Expand Up @@ -219,6 +216,10 @@
}
};

AWSClient.prototype._requiresAuthenticationParam = function(method) {
return method !== connect.ClientMethods.COMPLETE_CONTACT;
};

AWSClient.prototype._translateParams = function(method, params) {
switch (method) {
case connect.ClientMethods.UPDATE_AGENT_CONFIGURATION:
Expand All @@ -238,6 +239,12 @@
break;
}

if (this._requiresAuthenticationParam(method)) {
params.authentication = {
authToken: this.authToken
};
}

return params;
};

Expand Down

0 comments on commit 2dfe6ec

Please sign in to comment.