Skip to content

Commit

Permalink
2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PureCloud Jenkins committed Feb 8, 2019
1 parent 9751150 commit fd01ecd
Show file tree
Hide file tree
Showing 60 changed files with 812 additions and 103 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For direct use in a browser script:

```{"language":"html"}
<!-- Include the CJS SDK -->
<script src="https://sdk-cdn.mypurecloud.com/javascript-guest/1.0.2/purecloud-guest-chat-client.min.js"></script>
<script src="https://sdk-cdn.mypurecloud.com/javascript-guest/2.0.0/purecloud-guest-chat-client.min.js"></script>
<script type="text/javascript">
// Obtain a reference to the platformClient object
Expand All @@ -46,7 +46,7 @@ For direct use in a browser script:
<script type="text/javascript">
// Obtain a reference to the platformClient object
requirejs(['https://sdk-cdn.mypurecloud.com/javascript-guest/amd/1.0.2/purecloud-guest-chat-client.min.js'], (platformClient) => {
requirejs(['https://sdk-cdn.mypurecloud.com/javascript-guest/amd/2.0.0/purecloud-guest-chat-client.min.js'], (platformClient) => {
console.log(platformClient);
});
</script>
Expand Down
4 changes: 2 additions & 2 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For direct use in a browser script:

```{"language":"html"}
<!-- Include the CJS SDK -->
<script src="https://sdk-cdn.mypurecloud.com/javascript-guest/1.0.2/purecloud-guest-chat-client.min.js"></script>
<script src="https://sdk-cdn.mypurecloud.com/javascript-guest/2.0.0/purecloud-guest-chat-client.min.js"></script>
<script type="text/javascript">
// Obtain a reference to the platformClient object
Expand All @@ -46,7 +46,7 @@ For direct use in a browser script:
<script type="text/javascript">
// Obtain a reference to the platformClient object
requirejs(['https://sdk-cdn.mypurecloud.com/javascript-guest/amd/1.0.2/purecloud-guest-chat-client.min.js'], (platformClient) => {
requirejs(['https://sdk-cdn.mypurecloud.com/javascript-guest/amd/2.0.0/purecloud-guest-chat-client.min.js'], (platformClient) => {
console.log(platformClient);
});
</script>
Expand Down
103 changes: 97 additions & 6 deletions build/dist/node/purecloud-guest-chat-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var superagent = _interopDefault(require('superagent'));

/**
* @module purecloud-guest-chat-client/ApiClient
* @version 1.0.2
* @version 2.0.0
*/
class ApiClient {
/**
Expand Down Expand Up @@ -535,7 +535,7 @@ class ApiClient {

// set header parameters
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
//request.set({ 'purecloud-sdk': '1.0.2' });
//request.set({ 'purecloud-sdk': '2.0.0' });

// set request timeout
request.timeout(this.timeout);
Expand Down Expand Up @@ -662,7 +662,7 @@ class WebChatApi {
/**
* WebChat service.
* @module purecloud-guest-chat-client/api/WebChatApi
* @version 1.0.2
* @version 2.0.0
*/

/**
Expand Down Expand Up @@ -707,6 +707,61 @@ class WebChatApi {
);
}

/**
* Get a media request in the conversation
*
* @param {String} conversationId conversationId
* @param {String} mediaRequestId mediaRequestId
*/
getWebchatGuestConversationMediarequest(conversationId, mediaRequestId) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling getWebchatGuestConversationMediarequest';
}
// verify the required parameter 'mediaRequestId' is set
if (mediaRequestId === undefined || mediaRequestId === null) {
throw 'Missing the required parameter "mediaRequestId" when calling getWebchatGuestConversationMediarequest';
}

return this.apiClient.callApi(
'/api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}',
'GET',
{ 'conversationId': conversationId,'mediaRequestId': mediaRequestId },
{ },
{ },
{ },
null,
['Guest Chat JWT'],
['application/json'],
['application/json']
);
}

/**
* Get all media requests to the guest in the conversation
*
* @param {String} conversationId conversationId
*/
getWebchatGuestConversationMediarequests(conversationId) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling getWebchatGuestConversationMediarequests';
}

return this.apiClient.callApi(
'/api/v2/webchat/guest/conversations/{conversationId}/mediarequests',
'GET',
{ 'conversationId': conversationId },
{ },
{ },
{ },
null,
['Guest Chat JWT'],
['application/json'],
['application/json']
);
}

/**
* Get a web chat conversation member
*
Expand Down Expand Up @@ -805,6 +860,7 @@ class WebChatApi {
* @param {Object} opts Optional parameters
* @param {String} opts.after If available, get the messages chronologically after the id of this message
* @param {String} opts.before If available, get the messages chronologically before the id of this message
* @param {Object} opts.sortOrder Sort order (default to ascending)
*/
getWebchatGuestConversationMessages(conversationId, opts) {
opts = opts || {};
Expand All @@ -818,7 +874,7 @@ class WebChatApi {
'/api/v2/webchat/guest/conversations/{conversationId}/messages',
'GET',
{ 'conversationId': conversationId },
{ 'after': opts['after'],'before': opts['before'] },
{ 'after': opts['after'],'before': opts['before'],'sortOrder': opts['sortOrder'] },
{ },
{ },
null,
Expand All @@ -828,6 +884,41 @@ class WebChatApi {
);
}

/**
* Update a media request in the conversation, setting the state to ACCEPTED/DECLINED/ERRORED
*
* @param {String} conversationId conversationId
* @param {String} mediaRequestId mediaRequestId
* @param {Object} body Request
*/
patchWebchatGuestConversationMediarequest(conversationId, mediaRequestId, body) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling patchWebchatGuestConversationMediarequest';
}
// verify the required parameter 'mediaRequestId' is set
if (mediaRequestId === undefined || mediaRequestId === null) {
throw 'Missing the required parameter "mediaRequestId" when calling patchWebchatGuestConversationMediarequest';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling patchWebchatGuestConversationMediarequest';
}

return this.apiClient.callApi(
'/api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}',
'PATCH',
{ 'conversationId': conversationId,'mediaRequestId': mediaRequestId },
{ },
{ },
{ },
body,
['Guest Chat JWT'],
['application/json'],
['application/json']
);
}

/**
* Send a message in a chat conversation.
*
Expand Down Expand Up @@ -895,7 +986,7 @@ class WebChatApi {

/**
* Create an ACD chat conversation from an external customer.
*
* This endpoint will create a new ACD Chat conversation under the specified Chat Deployment. The conversation will begin with a guest member in it (with a role=CUSTOMER) according to the customer information that is supplied. If the guest member is authenticated, the &#39;memberAuthToken&#39; field should include his JWT as generated by the &#39;POST /api/v2/signeddata&#39; resource; if the guest member is anonymous (and the Deployment permits it) this field can be omitted. The returned data includes the IDs of the conversation created, along with a newly-create JWT token that you can supply to all future endpoints as authentication to perform operations against that conversation. After successfully creating a conversation, you should connect a websocket to the event stream named in the &#39;eventStreamUri&#39; field of the response; the conversation is not routed until the event stream is attached.
* @param {Object} body CreateConversationRequest
*/
postWebchatGuestConversations(body) {
Expand Down Expand Up @@ -949,7 +1040,7 @@ class WebChatApi {
* </pre>
* </p>
* @module purecloud-guest-chat-client/index
* @version 1.0.2
* @version 2.0.0
*/
class platformClient {
constructor() {
Expand Down
103 changes: 97 additions & 6 deletions build/dist/web-amd/purecloud-guest-chat-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define(['superagent'], function (superagent) { 'use strict';

/**
* @module purecloud-guest-chat-client/ApiClient
* @version 1.0.2
* @version 2.0.0
*/
class ApiClient {
/**
Expand Down Expand Up @@ -533,7 +533,7 @@ define(['superagent'], function (superagent) { 'use strict';

// set header parameters
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
//request.set({ 'purecloud-sdk': '1.0.2' });
//request.set({ 'purecloud-sdk': '2.0.0' });

// set request timeout
request.timeout(this.timeout);
Expand Down Expand Up @@ -660,7 +660,7 @@ define(['superagent'], function (superagent) { 'use strict';
/**
* WebChat service.
* @module purecloud-guest-chat-client/api/WebChatApi
* @version 1.0.2
* @version 2.0.0
*/

/**
Expand Down Expand Up @@ -705,6 +705,61 @@ define(['superagent'], function (superagent) { 'use strict';
);
}

/**
* Get a media request in the conversation
*
* @param {String} conversationId conversationId
* @param {String} mediaRequestId mediaRequestId
*/
getWebchatGuestConversationMediarequest(conversationId, mediaRequestId) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling getWebchatGuestConversationMediarequest';
}
// verify the required parameter 'mediaRequestId' is set
if (mediaRequestId === undefined || mediaRequestId === null) {
throw 'Missing the required parameter "mediaRequestId" when calling getWebchatGuestConversationMediarequest';
}

return this.apiClient.callApi(
'/api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}',
'GET',
{ 'conversationId': conversationId,'mediaRequestId': mediaRequestId },
{ },
{ },
{ },
null,
['Guest Chat JWT'],
['application/json'],
['application/json']
);
}

/**
* Get all media requests to the guest in the conversation
*
* @param {String} conversationId conversationId
*/
getWebchatGuestConversationMediarequests(conversationId) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling getWebchatGuestConversationMediarequests';
}

return this.apiClient.callApi(
'/api/v2/webchat/guest/conversations/{conversationId}/mediarequests',
'GET',
{ 'conversationId': conversationId },
{ },
{ },
{ },
null,
['Guest Chat JWT'],
['application/json'],
['application/json']
);
}

/**
* Get a web chat conversation member
*
Expand Down Expand Up @@ -803,6 +858,7 @@ define(['superagent'], function (superagent) { 'use strict';
* @param {Object} opts Optional parameters
* @param {String} opts.after If available, get the messages chronologically after the id of this message
* @param {String} opts.before If available, get the messages chronologically before the id of this message
* @param {Object} opts.sortOrder Sort order (default to ascending)
*/
getWebchatGuestConversationMessages(conversationId, opts) {
opts = opts || {};
Expand All @@ -816,7 +872,7 @@ define(['superagent'], function (superagent) { 'use strict';
'/api/v2/webchat/guest/conversations/{conversationId}/messages',
'GET',
{ 'conversationId': conversationId },
{ 'after': opts['after'],'before': opts['before'] },
{ 'after': opts['after'],'before': opts['before'],'sortOrder': opts['sortOrder'] },
{ },
{ },
null,
Expand All @@ -826,6 +882,41 @@ define(['superagent'], function (superagent) { 'use strict';
);
}

/**
* Update a media request in the conversation, setting the state to ACCEPTED/DECLINED/ERRORED
*
* @param {String} conversationId conversationId
* @param {String} mediaRequestId mediaRequestId
* @param {Object} body Request
*/
patchWebchatGuestConversationMediarequest(conversationId, mediaRequestId, body) {
// verify the required parameter 'conversationId' is set
if (conversationId === undefined || conversationId === null) {
throw 'Missing the required parameter "conversationId" when calling patchWebchatGuestConversationMediarequest';
}
// verify the required parameter 'mediaRequestId' is set
if (mediaRequestId === undefined || mediaRequestId === null) {
throw 'Missing the required parameter "mediaRequestId" when calling patchWebchatGuestConversationMediarequest';
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw 'Missing the required parameter "body" when calling patchWebchatGuestConversationMediarequest';
}

return this.apiClient.callApi(
'/api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}',
'PATCH',
{ 'conversationId': conversationId,'mediaRequestId': mediaRequestId },
{ },
{ },
{ },
body,
['Guest Chat JWT'],
['application/json'],
['application/json']
);
}

/**
* Send a message in a chat conversation.
*
Expand Down Expand Up @@ -893,7 +984,7 @@ define(['superagent'], function (superagent) { 'use strict';

/**
* Create an ACD chat conversation from an external customer.
*
* This endpoint will create a new ACD Chat conversation under the specified Chat Deployment. The conversation will begin with a guest member in it (with a role=CUSTOMER) according to the customer information that is supplied. If the guest member is authenticated, the &#39;memberAuthToken&#39; field should include his JWT as generated by the &#39;POST /api/v2/signeddata&#39; resource; if the guest member is anonymous (and the Deployment permits it) this field can be omitted. The returned data includes the IDs of the conversation created, along with a newly-create JWT token that you can supply to all future endpoints as authentication to perform operations against that conversation. After successfully creating a conversation, you should connect a websocket to the event stream named in the &#39;eventStreamUri&#39; field of the response; the conversation is not routed until the event stream is attached.
* @param {Object} body CreateConversationRequest
*/
postWebchatGuestConversations(body) {
Expand Down Expand Up @@ -947,7 +1038,7 @@ define(['superagent'], function (superagent) { 'use strict';
* </pre>
* </p>
* @module purecloud-guest-chat-client/index
* @version 1.0.2
* @version 2.0.0
*/
class platformClient {
constructor() {
Expand Down
Loading

0 comments on commit fd01ecd

Please sign in to comment.