Skip to content

Commit

Permalink
207.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PureCloud Jenkins committed Oct 29, 2024
1 parent 9661500 commit 0d52429
Show file tree
Hide file tree
Showing 178 changed files with 26,448 additions and 2,194 deletions.
103 changes: 100 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A JavaScript library to interface with the Genesys Cloud Platform API. View the
[![npm](https://img.shields.io/npm/v/purecloud-platform-client-v2.svg)](https://www.npmjs.com/package/purecloud-platform-client-v2)
[![Release Notes Badge](https://developer-content.genesys.cloud/images/sdk-release-notes.png)](https://github.com/MyPureCloud/platform-client-sdk-javascript/blob/master/releaseNotes.md)

Documentation version purecloud-platform-client-v2@206.0.0
Documentation version purecloud-platform-client-v2@207.0.0

## Preview APIs

Expand All @@ -29,7 +29,7 @@ For direct use in a browser script:

```html
<!-- Include the CJS SDK -->
<script src="https://sdk-cdn.mypurecloud.com/javascript/206.0.0/purecloud-platform-client-v2.min.js"></script>
<script src="https://sdk-cdn.mypurecloud.com/javascript/207.0.0/purecloud-platform-client-v2.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/amd/206.0.0/purecloud-platform-client-v2.min.js'], (platformClient) => {
requirejs(['https://sdk-cdn.mypurecloud.com/javascript/amd/207.0.0/purecloud-platform-client-v2.min.js'], (platformClient) => {
console.log(platformClient);
});
</script>
Expand Down Expand Up @@ -346,6 +346,79 @@ JSON:
}
```

The Genesys Cloud Login and API URL path can be overridden if necessary (i.e. if the Genesys Cloud requests must be sent through to an intermediate API gateway or equivalent).

This can be achieved defining a "gateway" configuration, in the INI or the JSON configuration file.

* "host" is the address of your gateway.
* "protocol" is not mandatory. It will default to "https" if the parameter is not defined or empty.
* "port" is not mandatory. This parameter can be defined if a non default port is used and needs to be specified in the url (value must be greater or equal to 0).
* "path_params_login" and "path_params_api" are not mandatory. They will be appended to the gateway url path if these parameters are defined and non empty (for Login requests and for API requests).
* "username" and "password" are not used at this stage. This is for a possible future use.

With the configuration below, this would result in:

* Login requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/oauth/token")
* API requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforapi" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/api/v2/users/me")

INI:

```ini
[logging]
log_level = trace
log_format = text
log_to_console = false
log_file_path = /var/log/javascriptsdk.log
log_response_body = false
log_request_body = false
[reauthentication]
refresh_access_token = true
refresh_token_wait_max = 10
[general]
live_reload_config = true
host = https://api.mypurecloud.com
[gateway]
host = mygateway.mydomain.myextension
protocol = https
port = 1443
path_params_login = myadditionalpathforlogin
path_params_api = myadditionalpathforapi
username = username
password = password
```

JSON:

```json
{
"logging": {
"log_level": "trace",
"log_format": "text",
"log_to_console": false,
"log_file_path": "/var/log/javascriptsdk.log",
"log_response_body": false,
"log_request_body": false
},
"reauthentication": {
"refresh_access_token": true,
"refresh_token_wait_max": 10
},
"general": {
"live_reload_config": true,
"host": "https://api.mypurecloud.com"
},
"gateway": {
"host": "mygateway.mydomain.myextension",
"protocol": "https",
"port": 1443,
"path_params_login": "myadditionalpathforlogin",
"path_params_api": "myadditionalpathforapi",
"username": "username",
"password": "password"
}
}
```

## Environments

If connecting to a Genesys Cloud environment other than mypurecloud.com (e.g. mypurecloud.ie), set the environment on the `ApiClient` instance with the PureCloudRegionHosts object.
Expand All @@ -355,6 +428,30 @@ const client = platformClient.ApiClient.instance;
client.setEnvironment(platformClient.PureCloudRegionHosts.eu_west_1);
```

### Setting an intermediate Gateway

The Genesys Cloud Login and API URL path can be overridden if necessary (i.e. if the Genesys Cloud requests must be sent through to an intermediate API gateway or equivalent).

This can be achieved setting the gateway configuration on the `ApiClient` instance.

```javascript
const client = platformClient.ApiClient.instance;
client.setGateway({host: 'mygateway.mydomain.myextension', protocol: 'https', port: 1443, path_params_login: 'myadditionalpathforlogin', path_params_api: 'myadditionalpathforapi'});

// If you need, you can later remove the Gateway Configuration and fallback to the Enviroment setting using: client.setGateway();
```

* "host" is the address of your gateway.
* "protocol" is not mandatory. It will default to "https" if the parameter is not defined or empty.
* "port" is not mandatory. This parameter can be defined if a non default port is used and needs to be specified in the url (value must be greater or equal to 0).
* "path_params_login" and "path_params_api" are not mandatory. They will be appended to the gateway url path if these parameters are defined and non empty (for Login requests and for API requests).
* "username" and "password" are not used at this stage. This is for a possible future use.

With the configuration below, this would result in:

* Login requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/oauth/token")
* API requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforapi" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/api/v2/users/me")


## Access Token persistence

Expand Down
18 changes: 18 additions & 0 deletions build/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ docs/deleteExternalcontactsContact-example.txt
docs/deleteExternalcontactsContactNote-example.txt
docs/deleteExternalcontactsContactsSchema-example.txt
docs/deleteExternalcontactsExternalsource-example.txt
docs/deleteExternalcontactsImportCsvSetting-example.txt
docs/deleteExternalcontactsOrganization-example.txt
docs/deleteExternalcontactsOrganizationNote-example.txt
docs/deleteExternalcontactsOrganizationTrustor-example.txt
Expand Down Expand Up @@ -747,6 +748,10 @@ docs/getExternalcontactsContactsSchemaVersions-example.txt
docs/getExternalcontactsContactsSchemas-example.txt
docs/getExternalcontactsExternalsource-example.txt
docs/getExternalcontactsExternalsources-example.txt
docs/getExternalcontactsImportCsvSetting-example.txt
docs/getExternalcontactsImportCsvSettings-example.txt
docs/getExternalcontactsImportCsvUploadDetails-example.txt
docs/getExternalcontactsImportCsvUploadPreview-example.txt
docs/getExternalcontactsOrganization-example.txt
docs/getExternalcontactsOrganizationContacts-example.txt
docs/getExternalcontactsOrganizationNote-example.txt
Expand Down Expand Up @@ -1110,6 +1115,7 @@ docs/getOrgauthorizationTrusteeUser-example.txt
docs/getOrgauthorizationTrusteeUserRoles-example.txt
docs/getOrgauthorizationTrusteeUsers-example.txt
docs/getOrgauthorizationTrustees-example.txt
docs/getOrgauthorizationTrusteesCare-example.txt
docs/getOrgauthorizationTrusteesDefault-example.txt
docs/getOrgauthorizationTrustor-example.txt
docs/getOrgauthorizationTrustorCloneduser-example.txt
Expand Down Expand Up @@ -1540,6 +1546,7 @@ docs/getUserrecordingsSummary-example.txt
docs/getUsers-example.txt
docs/getUsersAgentuiAgentsAutoanswerAgentIdSettings-example.txt
docs/getUsersAgentuiAgentsAutoanswerAgentIdSettings-example.txt
docs/getUsersChatsMe-example.txt
docs/getUsersDevelopmentActivities-example.txt
docs/getUsersDevelopmentActivitiesMe-example.txt
docs/getUsersDevelopmentActivity-example.txt
Expand All @@ -1562,6 +1569,8 @@ docs/getVoicemailPolicy-example.txt
docs/getVoicemailQueueMessages-example.txt
docs/getVoicemailSearch-example.txt
docs/getVoicemailSearch-example.txt
docs/getVoicemailUserMailbox-example.txt
docs/getVoicemailUserMessages-example.txt
docs/getVoicemailUserpolicy-example.txt
docs/getWebchatDeployment-example.txt
docs/getWebchatDeployments-example.txt
Expand Down Expand Up @@ -2127,6 +2136,9 @@ docs/postExternalcontactsContacts-example.txt
docs/postExternalcontactsContactsSchemas-example.txt
docs/postExternalcontactsExternalsources-example.txt
docs/postExternalcontactsIdentifierlookup-example.txt
docs/postExternalcontactsImportCsvJobs-example.txt
docs/postExternalcontactsImportCsvSettings-example.txt
docs/postExternalcontactsImportCsvUploads-example.txt
docs/postExternalcontactsMergeContacts-example.txt
docs/postExternalcontactsOrganizationNotes-example.txt
docs/postExternalcontactsOrganizations-example.txt
Expand Down Expand Up @@ -2291,13 +2303,16 @@ docs/postOrgauthorizationTrusteeGroups-example.txt
docs/postOrgauthorizationTrusteeUsers-example.txt
docs/postOrgauthorizationTrustees-example.txt
docs/postOrgauthorizationTrusteesAudits-example.txt
docs/postOrgauthorizationTrusteesCare-example.txt
docs/postOrgauthorizationTrusteesDefault-example.txt
docs/postOrgauthorizationTrustorAudits-example.txt
docs/postOutboundAttemptlimits-example.txt
docs/postOutboundCallabletimesets-example.txt
docs/postOutboundCallanalysisresponsesets-example.txt
docs/postOutboundCampaignAgentownedmappingpreview-example.txt
docs/postOutboundCampaignCallbackSchedule-example.txt
docs/postOutboundCampaignStart-example.txt
docs/postOutboundCampaignStop-example.txt
docs/postOutboundCampaignrules-example.txt
docs/postOutboundCampaigns-example.txt
docs/postOutboundCampaignsProgress-example.txt
Expand All @@ -2324,6 +2339,8 @@ docs/postOutboundDnclists-example.txt
docs/postOutboundFilespecificationtemplates-example.txt
docs/postOutboundImporttemplates-example.txt
docs/postOutboundImporttemplatesBulkAdd-example.txt
docs/postOutboundMessagingcampaignStart-example.txt
docs/postOutboundMessagingcampaignStop-example.txt
docs/postOutboundMessagingcampaigns-example.txt
docs/postOutboundMessagingcampaignsProgress-example.txt
docs/postOutboundRulesets-example.txt
Expand Down Expand Up @@ -2626,6 +2643,7 @@ docs/putExternalcontactsContactNote-example.txt
docs/putExternalcontactsContactsSchema-example.txt
docs/putExternalcontactsConversation-example.txt
docs/putExternalcontactsExternalsource-example.txt
docs/putExternalcontactsImportCsvSetting-example.txt
docs/putExternalcontactsOrganization-example.txt
docs/putExternalcontactsOrganizationNote-example.txt
docs/putExternalcontactsOrganizationTrustorTrustorId-example.txt
Expand Down
Loading

0 comments on commit 0d52429

Please sign in to comment.