Skip to content

Commit

Permalink
9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PureCloud Jenkins committed May 13, 2022
1 parent 2bb2f28 commit bd8de27
Show file tree
Hide file tree
Showing 360 changed files with 2,898 additions and 3,050 deletions.
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ title: Guest Chat Client - JavaScript

[Platform release notes](releaseNotes.md)

* **Documentation** https://developer.mypurecloud.com/api/rest/client-libraries/javascript-guest/
* **Documentation** https://developer.genesys.cloud/devapps/sdk/docexplorer/purecloudjavascriptGuest/
* **Source** https://github.com/MyPureCloud/purecloud-guest-chat-client-javascript
* **Guest chat documentation** https://developer.mypurecloud.com/api/webchat/guestchat.html
* **Guest chat documentation** https://developer.genesys.cloud/commdigital/digital/webchat/guestchat

## CommonJS

For node.js via [NPM](https://www.npmjs.com/package/purecloud-guest-chat-client):

```{"language":"sh"}
```sh
npm install purecloud-guest-chat-client
```

```{"language":"javascript"}
```javascript
// Obtain a reference to the platformClient object
const platformClient = require('purecloud-guest-chat-client');
```

For direct use in a browser script:

```{"language":"html"}
```html
<!-- Include the CJS SDK -->
<script src="https://sdk-cdn.mypurecloud.com/javascript-guest/8.1.3/purecloud-guest-chat-client.min.js"></script>
<script src="https://sdk-cdn.mypurecloud.com/javascript-guest/9.0.0/purecloud-guest-chat-client.min.js"></script>

<script type="text/javascript">
// Obtain a reference to the platformClient object
Expand All @@ -42,13 +42,13 @@ For direct use in a browser script:

## AMD

```{"language":"html"}
```html
<!-- Include requirejs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js"></script>

<script type="text/javascript">
// Obtain a reference to the platformClient object
requirejs(['https://sdk-cdn.mypurecloud.com/javascript-guest/amd/8.1.3/purecloud-guest-chat-client.min.js'], (platformClient) => {
requirejs(['https://sdk-cdn.mypurecloud.com/javascript-guest/amd/9.0.0/purecloud-guest-chat-client.min.js'], (platformClient) => {
console.log(platformClient);
});
</script>
Expand Down Expand Up @@ -82,7 +82,7 @@ Want your app to always use the most recent version of the SDK? To do this, simp

The guest chat APIs do not require standard Genesys Cloud authentication, but do require the JWT to be set for all API calls other than creating a new chat.

```{"language":"javascript"}
```javascript
const client = platformClient.ApiClient.instance;
let chatInfo, socket;

Expand Down Expand Up @@ -167,7 +167,8 @@ By default, the request and response bodies are not logged because these can con
To log to a file, provide a `log_file_path` value. SDK users are responsible for the rotation of the log file. This feature is not available in browser-based applications.

Example logging configuration:
```{"language":"javascript"}

```javascript
client.config.logger.log_level = client.config.logger.logLevelEnum.level.LTrace;
client.config.logger.log_format = client.config.logger.logFormatEnum.formats.JSON;
client.config.logger.log_request_body = true;
Expand All @@ -191,7 +192,8 @@ The SDK will constantly check to see if the config file has been updated, regard
INI and JSON formats are supported. See below for examples of configuration values in both formats:

INI:
```{"language":"ini"}

```ini
[logging]
log_level = trace
log_format = text
Expand All @@ -205,7 +207,8 @@ host = https://api.mypurecloud.com
```

JSON:
```{"language":"json"}

```json
{
"logging": {
"log_level": "trace",
Expand All @@ -226,7 +229,7 @@ JSON:

If connecting to a Genesys Cloud environment other than mypurecloud.com (e.g. mypurecloud.ie), set the environment on the `ApiClient` instance.

```{"language":"javascript"}
```javascript
const client = platformClient.ApiClient.instance;
client.setEnvironment(platformClient.PureCloudRegionHosts.eu_west_1);
```
Expand All @@ -236,7 +239,7 @@ client.setEnvironment(platformClient.PureCloudRegionHosts.eu_west_1);

All API requests return a Promise which resolves to the response body, otherwise it rejects with an error. After setting the JWT, the following code will make an authenticated request:

```{"language":"javascript"}
```javascript
// Create API instance
const webChatApi = new platformClient.WebChatApi();

Expand Down Expand Up @@ -265,14 +268,14 @@ webChatApi.postWebchatGuestConversations(createChatBody)

By default, the SDK will return only the response body as the result of an API function call. To retrieve additional information about the response, enable extended responses. This will return the extended response for all API function calls:

```{"language":"javascript"}
```javascript
const client = platformClient.ApiClient.instance;
client.setReturnExtendedResponses(true);
```

Extended response object example (`body` and `text` have been truncated):

```{"language":"json"}
```json
{
"status": 200,
"statusText": "",
Expand Down Expand Up @@ -301,7 +304,7 @@ After both steps have been completed, the configured proxy server will be used f

NOTE: SDK proxy configuration is only available in the node.js package due to `superagent-proxy`'s incompatibility with browserify. Additionally, `superagent-proxy` is not included a dependency of the SDK and must be provided by your node application's dependencies.

```{"language":"javascript"}
```javascript
const client = platformClient.ApiClient.instance;
require('superagent-proxy')(client.superagent);
// Configure settings for your proxy here
Expand All @@ -320,7 +323,7 @@ Error responses will always be thrown as an extended response object. Note that

Example error response object:

```{"language":"json"}
```json
{
"status": 404,
"statusText": "",
Expand Down Expand Up @@ -356,4 +359,4 @@ The SDK's version is incremented according to the [Semantic Versioning Specifica

This package is intended to be forwards compatible with v2 of Genesys Cloud's Platform API. While the general policy for the API is not to introduce breaking changes, there are certain additions and changes to the API that cause breaking changes for the SDK, often due to the way the API is expressed in its swagger definition. Because of this, the SDK can have a major version bump while the API remains at major version 2. While the SDK is intended to be forward compatible, patches will only be released to the latest version. For these reasons, it is strongly recommended that all applications using this SDK are kept up to date and use the latest version of the SDK.

For any issues, questions, or suggestions for the SDK, visit the [Genesys Cloud Developer Forum](https://developer.mypurecloud.com/forum/).
For any issues, questions, or suggestions for the SDK, visit the [Genesys Cloud Developer Forum](https://developer.genesys.cloud/forum/).
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
Expand All @@ -14,7 +14,7 @@

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
Expand Down
25 changes: 25 additions & 0 deletions build/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.openapi-generator-ignore
README.md
docs/WebChatApi.json
docs/WebChatApi.md
docs/deleteWebchatGuestConversationMember-example.txt
docs/getWebchatGuestConversationMediarequest-example.txt
docs/getWebchatGuestConversationMediarequests-example.txt
docs/getWebchatGuestConversationMember-example.txt
docs/getWebchatGuestConversationMembers-example.txt
docs/getWebchatGuestConversationMessage-example.txt
docs/getWebchatGuestConversationMessages-example.txt
docs/patchWebchatGuestConversationMediarequest-example.txt
docs/postWebchatGuestConversationMemberMessages-example.txt
docs/postWebchatGuestConversationMemberTyping-example.txt
docs/postWebchatGuestConversations-example.txt
index.d.ts
package.json
rollup-amd.config.js
rollup-cjs-for-browserify.config.js
rollup-cjs-for-node.config.js
src/purecloud-guest-chat-client/ApiClient.js
src/purecloud-guest-chat-client/api/WebChatApi.js
src/purecloud-guest-chat-client/configuration.js
src/purecloud-guest-chat-client/index.js
src/purecloud-guest-chat-client/logger.js
1 change: 1 addition & 0 deletions build/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.2.0-SNAPSHOT
Loading

0 comments on commit bd8de27

Please sign in to comment.