purecloud-platform-client-v2 206.0.0 → 208.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -3
- package/dist/node/purecloud-platform-client-v2.js +979 -173
- package/dist/web-amd/purecloud-platform-client-v2.js +979 -173
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +341 -176
- package/dist/web-cjs/purecloud-platform-client-v2.js +358 -179
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +1646 -606
- package/package.json +1 -1
- package/src/purecloud-platform-client-v2/ApiClient.js +40 -18
- package/src/purecloud-platform-client-v2/api/AgentAssistantsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AgentCopilotApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AgentUIApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AlertingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +7 -6
- package/src/purecloud-platform-client-v2/api/ArchitectApi.js +2 -2
- package/src/purecloud-platform-client-v2/api/AuditApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CarrierServicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +2 -3
- package/src/purecloud-platform-client-v2/api/ConversationsApi.js +3 -2
- package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DownloadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EmailsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EmployeeEngagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EventsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +234 -8
- package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GamificationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/InfrastructureAsCodeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +31 -11
- package/src/purecloud-platform-client-v2/api/JourneyApi.js +136 -4
- package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +5 -21
- package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LogCaptureApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OperationalEventsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +48 -1
- package/src/purecloud-platform-client-v2/api/OutboundApi.js +101 -1
- package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ProcessAutomationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RoutingApi.js +12 -12
- package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScreenRecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SearchApi.js +55 -1
- package/src/purecloud-platform-client-v2/api/SettingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +4 -4
- package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TaskManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TeamsApi.js +7 -3
- package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +55 -1
- package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsersApi.js +38 -12
- package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/VoicemailApi.js +56 -1
- package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/configuration.js +81 -0
- package/src/purecloud-platform-client-v2/index.js +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A JavaScript library to interface with the Genesys Cloud Platform API. View the
|
|
|
6
6
|
[](https://www.npmjs.com/package/purecloud-platform-client-v2)
|
|
7
7
|
[](https://github.com/MyPureCloud/platform-client-sdk-javascript/blob/master/releaseNotes.md)
|
|
8
8
|
|
|
9
|
-
Documentation version purecloud-platform-client-v2@
|
|
9
|
+
Documentation version purecloud-platform-client-v2@208.0.0
|
|
10
10
|
|
|
11
11
|
## Preview APIs
|
|
12
12
|
|
|
@@ -29,7 +29,7 @@ For direct use in a browser script:
|
|
|
29
29
|
|
|
30
30
|
```html
|
|
31
31
|
<!-- Include the CJS SDK -->
|
|
32
|
-
<script src="https://sdk-cdn.mypurecloud.com/javascript/
|
|
32
|
+
<script src="https://sdk-cdn.mypurecloud.com/javascript/208.0.0/purecloud-platform-client-v2.min.js"></script>
|
|
33
33
|
|
|
34
34
|
<script type="text/javascript">
|
|
35
35
|
// Obtain a reference to the platformClient object
|
|
@@ -46,7 +46,7 @@ For direct use in a browser script:
|
|
|
46
46
|
|
|
47
47
|
<script type="text/javascript">
|
|
48
48
|
// Obtain a reference to the platformClient object
|
|
49
|
-
requirejs(['https://sdk-cdn.mypurecloud.com/javascript/amd/
|
|
49
|
+
requirejs(['https://sdk-cdn.mypurecloud.com/javascript/amd/208.0.0/purecloud-platform-client-v2.min.js'], (platformClient) => {
|
|
50
50
|
console.log(platformClient);
|
|
51
51
|
});
|
|
52
52
|
</script>
|
|
@@ -346,6 +346,79 @@ JSON:
|
|
|
346
346
|
}
|
|
347
347
|
```
|
|
348
348
|
|
|
349
|
+
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).
|
|
350
|
+
|
|
351
|
+
This can be achieved defining a "gateway" configuration, in the INI or the JSON configuration file.
|
|
352
|
+
|
|
353
|
+
* "host" is the address of your gateway.
|
|
354
|
+
* "protocol" is not mandatory. It will default to "https" if the parameter is not defined or empty.
|
|
355
|
+
* "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).
|
|
356
|
+
* "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).
|
|
357
|
+
* "username" and "password" are not used at this stage. This is for a possible future use.
|
|
358
|
+
|
|
359
|
+
With the configuration below, this would result in:
|
|
360
|
+
|
|
361
|
+
* Login requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/oauth/token")
|
|
362
|
+
* API requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforapi" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/api/v2/users/me")
|
|
363
|
+
|
|
364
|
+
INI:
|
|
365
|
+
|
|
366
|
+
```ini
|
|
367
|
+
[logging]
|
|
368
|
+
log_level = trace
|
|
369
|
+
log_format = text
|
|
370
|
+
log_to_console = false
|
|
371
|
+
log_file_path = /var/log/javascriptsdk.log
|
|
372
|
+
log_response_body = false
|
|
373
|
+
log_request_body = false
|
|
374
|
+
[reauthentication]
|
|
375
|
+
refresh_access_token = true
|
|
376
|
+
refresh_token_wait_max = 10
|
|
377
|
+
[general]
|
|
378
|
+
live_reload_config = true
|
|
379
|
+
host = https://api.mypurecloud.com
|
|
380
|
+
[gateway]
|
|
381
|
+
host = mygateway.mydomain.myextension
|
|
382
|
+
protocol = https
|
|
383
|
+
port = 1443
|
|
384
|
+
path_params_login = myadditionalpathforlogin
|
|
385
|
+
path_params_api = myadditionalpathforapi
|
|
386
|
+
username = username
|
|
387
|
+
password = password
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
JSON:
|
|
391
|
+
|
|
392
|
+
```json
|
|
393
|
+
{
|
|
394
|
+
"logging": {
|
|
395
|
+
"log_level": "trace",
|
|
396
|
+
"log_format": "text",
|
|
397
|
+
"log_to_console": false,
|
|
398
|
+
"log_file_path": "/var/log/javascriptsdk.log",
|
|
399
|
+
"log_response_body": false,
|
|
400
|
+
"log_request_body": false
|
|
401
|
+
},
|
|
402
|
+
"reauthentication": {
|
|
403
|
+
"refresh_access_token": true,
|
|
404
|
+
"refresh_token_wait_max": 10
|
|
405
|
+
},
|
|
406
|
+
"general": {
|
|
407
|
+
"live_reload_config": true,
|
|
408
|
+
"host": "https://api.mypurecloud.com"
|
|
409
|
+
},
|
|
410
|
+
"gateway": {
|
|
411
|
+
"host": "mygateway.mydomain.myextension",
|
|
412
|
+
"protocol": "https",
|
|
413
|
+
"port": 1443,
|
|
414
|
+
"path_params_login": "myadditionalpathforlogin",
|
|
415
|
+
"path_params_api": "myadditionalpathforapi",
|
|
416
|
+
"username": "username",
|
|
417
|
+
"password": "password"
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
```
|
|
421
|
+
|
|
349
422
|
## Environments
|
|
350
423
|
|
|
351
424
|
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.
|
|
@@ -355,6 +428,30 @@ const client = platformClient.ApiClient.instance;
|
|
|
355
428
|
client.setEnvironment(platformClient.PureCloudRegionHosts.eu_west_1);
|
|
356
429
|
```
|
|
357
430
|
|
|
431
|
+
### Setting an intermediate Gateway
|
|
432
|
+
|
|
433
|
+
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).
|
|
434
|
+
|
|
435
|
+
This can be achieved setting the gateway configuration on the `ApiClient` instance.
|
|
436
|
+
|
|
437
|
+
```javascript
|
|
438
|
+
const client = platformClient.ApiClient.instance;
|
|
439
|
+
client.setGateway({host: 'mygateway.mydomain.myextension', protocol: 'https', port: 1443, path_params_login: 'myadditionalpathforlogin', path_params_api: 'myadditionalpathforapi'});
|
|
440
|
+
|
|
441
|
+
// If you need, you can later remove the Gateway Configuration and fallback to the Enviroment setting using: client.setGateway();
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
* "host" is the address of your gateway.
|
|
445
|
+
* "protocol" is not mandatory. It will default to "https" if the parameter is not defined or empty.
|
|
446
|
+
* "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).
|
|
447
|
+
* "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).
|
|
448
|
+
* "username" and "password" are not used at this stage. This is for a possible future use.
|
|
449
|
+
|
|
450
|
+
With the configuration below, this would result in:
|
|
451
|
+
|
|
452
|
+
* Login requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/oauth/token")
|
|
453
|
+
* API requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforapi" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/api/v2/users/me")
|
|
454
|
+
|
|
358
455
|
|
|
359
456
|
## Access Token persistence
|
|
360
457
|
|