Skip to content

Commit 5c03d60

Browse files
Merge branch 'master' of github.com:watson-developer-cloud/node-sdk into update_dependencies
2 parents 60c8139 + c6953c0 commit 5c03d60

19 files changed

Lines changed: 451 additions & 173 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# [5.5.0](https://github.com/watson-developer-cloud/node-sdk/compare/v5.4.0...v5.5.0) (2020-04-24)
2+
3+
4+
### Bug Fixes
5+
6+
* **discovery-v1:** property `indexed` corrected to `available` for model `EnvironmentDocuments` ([7bc2ccd](https://github.com/watson-developer-cloud/node-sdk/commit/7bc2ccdb303f621068e964bf147672b0c8e0db8e))
7+
8+
9+
### Features
10+
11+
* **assistant-v1:** `RuntimeEntityAlternative` model added ([9ad75d7](https://github.com/watson-developer-cloud/node-sdk/commit/9ad75d7cbc94a6f686d72dfe71a7ef6b2188fda9))
12+
* **assistant-v2:** `MessageContextSkillSystem` model added ([40fd822](https://github.com/watson-developer-cloud/node-sdk/commit/40fd822b668104ab11ba9e6711c7d6c85785c39e))
13+
* **speech-to-text-v1:** parameters `speechDetectorSensitivity`, `backgroundAudioSuppression`, added to `recognize` ([7c91ea2](https://github.com/watson-developer-cloud/node-sdk/commit/7c91ea2263e9a4c7a1ac47bae9dffefc06082692))
14+
* **text-to-speech-v1:** new voices and languages added ([dad6e0e](https://github.com/watson-developer-cloud/node-sdk/commit/dad6e0edcd86aeed5815809e7cb685734cb3deb7))
15+
116
# [5.4.0](https://github.com/watson-developer-cloud/node-sdk/compare/v5.3.1...v5.4.0) (2020-02-13)
217

318

@@ -608,7 +623,7 @@
608623
* Visual Recognition
609624
* New method `getCoreMlModel` adds support for CoreML
610625
* Breaking: `detectFaces` no longer supports identity information in the response.
611-
* `name`, `score`, `type_hierarchy` removed from response [Release notes](https://console.bluemix.net/docs/services/visual-recognition/release-notes.html#2april2018)
626+
* `name`, `score`, `type_hierarchy` removed from response [Release notes](https://cloud.ibm.com/docs/visual-recognition?topic=visual-recognition-release-notes#2april2018)
612627

613628
* Natural Language Classifier
614629
* New method 'classifyCollection`

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Some services use token-based Identity and Access Management (IAM) authenticatio
165165

166166
To use IAM authentication, you must use an `IamAuthenticator` or a `BearerTokenAuthenticator`.
167167
- Use the `IamAuthenticator` to have the SDK manage the lifecycle of the access token. The SDK requests an access token, ensures that the access token is valid, and refreshes it if necessary.
168-
- Use the `BearerTokenAuthenticator` if you want to manage the lifecycle yourself. For details, see [Authenticating with IAM tokens](https://cloud.ibm.com/docs/services/watson/getting-started-iam.html). If you want to switch your authenticator, you must override the `authenticator` property directly.
168+
- Use the `BearerTokenAuthenticator` if you want to manage the lifecycle yourself. For details, see [Authenticating with IAM tokens](https://cloud.ibm.com/docs/watson/getting-started-iam.html). If you want to switch your authenticator, you must override the `authenticator` property directly.
169169

170170
##### ICP
171171

@@ -310,7 +310,7 @@ recognizeStream.getTransactionId().then(
310310

311311
## Data collection opt-out
312312

313-
By default, [all requests are logged](https://cloud.ibm.com/docs/services/watson/getting-started-logging.html). This can be disabled of by setting the `X-Watson-Learning-Opt-Out` header when creating the service instance:
313+
By default, [all requests are logged](https://cloud.ibm.com/docs/watson/getting-started-logging.html). This can be disabled of by setting the `X-Watson-Learning-Opt-Out` header when creating the service instance:
314314

315315
```js
316316
const myInstance = new watson.WhateverServiceV1({
@@ -411,7 +411,7 @@ The Authorization service can generate auth tokens for situations where providin
411411
Tokens are valid for 1 hour and may be sent using the `X-Watson-Authorization-Token` header or the `watson-token` query param.
412412
Note that the token is supplied URL-encoded, and will not be accepted if it is double-encoded in a querystring.
413413

414-
> _NOTE_: Authenticating with the `X-Watson-Authorization-Token` header or the `watson-token` query param is now deprecated. The token continues to work with Cloud Foundry services, but is not supported for services that use Identity and Access Management (IAM) authentication. For details see [Authenticating with IAM tokens](https://cloud.ibm.com/docs/services/watson?topic=watson-iam#iam) or the README in the IBM Watson SDK you use.
414+
> _NOTE_: Authenticating with the `X-Watson-Authorization-Token` header or the `watson-token` query param is now deprecated. The token continues to work with Cloud Foundry services, but is not supported for services that use Identity and Access Management (IAM) authentication. For details see [Authenticating with IAM tokens](https://cloud.ibm.com/docs/watson?topic=watson-iam#iam) or the README in the IBM Watson SDK you use.
415415
The Authorization SDK now supports returning IAM Access Tokens when instantiated with an IAM API key.
416416

417417
```js
@@ -454,7 +454,7 @@ function (err, token) {
454454

455455
Use the [Assistant][assistant] service to determine the intent of a message.
456456

457-
Note: You must first create a workspace via IBM Cloud. See [the documentation](https://cloud.ibm.com/docs/services/conversation/index.html#about) for details.
457+
Note: You must first create a workspace via IBM Cloud. See [the documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-index#about) for details.
458458

459459
```js
460460
const AssistantV2 = require('ibm-watson/assistant/v2');
@@ -484,7 +484,7 @@ assistant.message(
484484

485485
Use the [Assistant][assistant] service to determine the intent of a message.
486486

487-
Note: You must first create a workspace via IBM Cloud. See [the documentation](https://cloud.ibm.com/docs/services/conversation/index.html#about) for details.
487+
Note: You must first create a workspace via IBM Cloud. See [the documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-index#about) for details.
488488

489489
```js
490490
const AssistantV1 = require('ibm-watson/assistant/v1');
@@ -611,7 +611,7 @@ languageTranslator.identify(
611611

612612
### Natural Language Classifier
613613

614-
Use [Natural Language Classifier](https://cloud.ibm.com/docs/services/natural-language-classifier/getting-started.html) service to create a classifier instance by providing a set of representative strings and a set of one or more correct classes for each as training. Then use the trained classifier to classify your new question for best matching answers or to retrieve next actions for your application.
614+
Use [Natural Language Classifier](https://cloud.ibm.com/docs/natural-language-classifier/getting-started.html) service to create a classifier instance by providing a set of representative strings and a set of one or more correct classes for each as training. Then use the trained classifier to classify your new question for best matching answers or to retrieve next actions for your application.
615615

616616
```js
617617
const NaturalLanguageClassifierV1 = require('ibm-watson/natural-language-classifier/v1');
@@ -640,8 +640,7 @@ See this [example](https://github.com/watson-developer-cloud/node-sdk/blob/maste
640640

641641
### Natural Language Understanding
642642

643-
Use Natural Language Understanding is a collection of natural language processing APIs that help you understand sentiment,
644-
keywords, entities, high-level concepts and more.
643+
[Natural Language Understanding](https://cloud.ibm.com/docs/services/natural-language-understanding/getting-started.html) is a collection of natural language processing APIs that help you understand sentiment, keywords, entities, high-level concepts and more.
645644

646645
```js
647646
const fs = require('fs');

assistant/v1.ts

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ class AssistantV1 extends BaseService {
11001100
*
11011101
* Add a new user input example to an intent.
11021102
*
1103-
* If you want to add multiple exaples with a single API call, consider using the **[Update intent](#update-intent)**
1103+
* If you want to add multiple examples with a single API call, consider using the **[Update intent](#update-intent)**
11041104
* method instead.
11051105
*
11061106
* This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**.
@@ -3325,7 +3325,7 @@ class AssistantV1 extends BaseService {
33253325
* @param {string} [params.userLabel] - A label that can be displayed externally to describe the purpose of the node
33263326
* to users.
33273327
* @param {boolean} [params.disambiguationOptOut] - Whether the dialog node should be excluded from disambiguation
3328-
* suggestions.
3328+
* suggestions. Valid only when **type**=`standard` or `frame`.
33293329
* @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated`
33303330
* timestamps) in the response.
33313331
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -3532,7 +3532,7 @@ class AssistantV1 extends BaseService {
35323532
* @param {string} [params.newUserLabel] - A label that can be displayed externally to describe the purpose of the
35333533
* node to users.
35343534
* @param {boolean} [params.newDisambiguationOptOut] - Whether the dialog node should be excluded from disambiguation
3535-
* suggestions.
3535+
* suggestions. Valid only when **type**=`standard` or `frame`.
35363536
* @param {boolean} [params.includeAudit] - Whether to include the audit properties (`created` and `updated`
35373537
* timestamps) in the response.
35383538
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -4836,7 +4836,9 @@ namespace AssistantV1 {
48364836
digressOutSlots?: CreateDialogNodeConstants.DigressOutSlots | string;
48374837
/** A label that can be displayed externally to describe the purpose of the node to users. */
48384838
userLabel?: string;
4839-
/** Whether the dialog node should be excluded from disambiguation suggestions. */
4839+
/** Whether the dialog node should be excluded from disambiguation suggestions. Valid only when
4840+
* **type**=`standard` or `frame`.
4841+
*/
48404842
disambiguationOptOut?: boolean;
48414843
/** Whether to include the audit properties (`created` and `updated` timestamps) in the response. */
48424844
includeAudit?: boolean;
@@ -4949,7 +4951,9 @@ namespace AssistantV1 {
49494951
newDigressOutSlots?: UpdateDialogNodeConstants.DigressOutSlots | string;
49504952
/** A label that can be displayed externally to describe the purpose of the node to users. */
49514953
newUserLabel?: string;
4952-
/** Whether the dialog node should be excluded from disambiguation suggestions. */
4954+
/** Whether the dialog node should be excluded from disambiguation suggestions. Valid only when
4955+
* **type**=`standard` or `frame`.
4956+
*/
49534957
newDisambiguationOptOut?: boolean;
49544958
/** Whether to include the audit properties (`created` and `updated` timestamps) in the response. */
49554959
includeAudit?: boolean;
@@ -5214,7 +5218,9 @@ namespace AssistantV1 {
52145218
digress_out_slots?: string;
52155219
/** A label that can be displayed externally to describe the purpose of the node to users. */
52165220
user_label?: string;
5217-
/** Whether the dialog node should be excluded from disambiguation suggestions. */
5221+
/** Whether the dialog node should be excluded from disambiguation suggestions. Valid only when
5222+
* **type**=`standard` or `frame`.
5223+
*/
52185224
disambiguation_opt_out?: boolean;
52195225
/** For internal use only. */
52205226
disabled?: boolean;
@@ -5330,16 +5336,15 @@ namespace AssistantV1 {
53305336
message_to_human_agent?: string;
53315337
/** The text of the search query. This can be either a natural-language query or a query that uses the Discovery
53325338
* query language syntax, depending on the value of the **query_type** property. For more information, see the
5333-
* [Discovery service
5334-
* documentation](https://cloud.ibm.com/docs/services/discovery/query-operators.html#query-operators). Required
5335-
* when **response_type**=`search_skill`.
5339+
* [Discovery service documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-operators#query-operators).
5340+
* Required when **response_type**=`search_skill`.
53365341
*/
53375342
query?: string;
53385343
/** The type of the search query. Required when **response_type**=`search_skill`. */
53395344
query_type?: string;
53405345
/** An optional filter that narrows the set of documents to be searched. For more information, see the
53415346
* [Discovery service documentation]([Discovery service
5342-
* documentation](https://cloud.ibm.com/docs/services/discovery/query-parameters.html#filter).
5347+
* documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-parameters#filter).
53435348
*/
53445349
filter?: string;
53455350
/** The version of the Discovery service API to use for the query. */
@@ -5469,12 +5474,10 @@ namespace AssistantV1 {
54695474
options?: DialogNodeOutputOptionsElement[];
54705475
/** A message to be sent to the human agent who will be taking over the conversation. */
54715476
message_to_human_agent?: string;
5472-
/** A label identifying the topic of the conversation, derived from the **user_label** property of the relevant
5473-
* node.
5474-
*/
5477+
/** A label identifying the topic of the conversation, derived from the **title** property of the relevant node. */
54755478
topic?: string;
54765479
/** The ID of the dialog node that the **topic** property is taken from. The **topic** property is populated
5477-
* using the value of the dialog node's **user_label** property.
5480+
* using the value of the dialog node's **title** property.
54785481
*/
54795482
dialog_node?: string;
54805483
}
@@ -5769,13 +5772,28 @@ namespace AssistantV1 {
57695772
* [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-beta-system-entities).
57705773
*/
57715774
interpretation?: RuntimeEntityInterpretation;
5775+
/** An array of possible alternative values that the user might have intended instead of the value returned in
5776+
* the **value** property. This property is returned only for `@sys-time` and `@sys-date` entities when the user's
5777+
* input is ambiguous.
5778+
*
5779+
* This property is included only if the new system entities are enabled for the workspace.
5780+
*/
5781+
alternatives?: RuntimeEntityAlternative[];
57725782
/** An object describing the role played by a system entity that is specifies the beginning or end of a range
57735783
* recognized in the user input. This property is included only if the new system entities are enabled for the
57745784
* workspace.
57755785
*/
57765786
role?: RuntimeEntityRole;
57775787
}
57785788

5789+
/** An alternative value for the recognized entity. */
5790+
export interface RuntimeEntityAlternative {
5791+
/** The entity value that was recognized in the user input. */
5792+
value?: string;
5793+
/** A decimal percentage that represents Watson's confidence in the recognized entity. */
5794+
confidence?: number;
5795+
}
5796+
57795797
/** RuntimeEntityInterpretation. */
57805798
export interface RuntimeEntityInterpretation {
57815799
/** The calendar used to represent a recognized date (for example, `Gregorian`). */
@@ -5905,12 +5923,10 @@ namespace AssistantV1 {
59055923
options?: DialogNodeOutputOptionsElement[];
59065924
/** A message to be sent to the human agent who will be taking over the conversation. */
59075925
message_to_human_agent?: string;
5908-
/** A label identifying the topic of the conversation, derived from the **user_label** property of the relevant
5909-
* node.
5910-
*/
5926+
/** A label identifying the topic of the conversation, derived from the **title** property of the relevant node. */
59115927
topic?: string;
59125928
/** The ID of the dialog node that the **topic** property is taken from. The **topic** property is populated
5913-
* using the value of the dialog node's **user_label** property.
5929+
* using the value of the dialog node's **title** property.
59145930
*/
59155931
dialog_node?: string;
59165932
/** An array of objects describing the possible matching dialog nodes from which the user can choose.

assistant/v2.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ namespace AssistantV2 {
519519
export interface MessageContextSkill {
520520
/** Arbitrary variables that can be read and written by a particular skill. */
521521
user_defined?: JsonObject;
522-
/** For internal use only. */
522+
/** System context data used by the skill. */
523523
system?: JsonObject;
524524
}
525525

@@ -551,8 +551,9 @@ namespace AssistantV2 {
551551

552552
/** Optional properties that control how the assistant responds. */
553553
export interface MessageInputOptions {
554-
/** Whether to return additional diagnostic information. Set to `true` to return additional information under
555-
* the `output.debug` key.
554+
/** Whether to return additional diagnostic information. Set to `true` to return additional information in the
555+
* `output.debug` property. If you also specify **return_context**=`true`, the returned skill context includes the
556+
* `system.state` property.
556557
*/
557558
debug?: boolean;
558559
/** Whether to restart dialog processing at the root of the dialog, regardless of any previously visited nodes.
@@ -561,10 +562,17 @@ namespace AssistantV2 {
561562
restart?: boolean;
562563
/** Whether to return more than one intent. Set to `true` to return all matching intents. */
563564
alternate_intents?: boolean;
564-
/** Whether to return session context with the response. If you specify `true`, the response will include the
565-
* `context` property.
565+
/** Whether to return session context with the response. If you specify `true`, the response includes the
566+
* `context` property. If you also specify **debug**=`true`, the returned skill context includes the `system.state`
567+
* property.
566568
*/
567569
return_context?: boolean;
570+
/** Whether to return session context, including full conversation state. If you specify `true`, the response
571+
* includes the `context` property, and the skill context includes the `system.state` property.
572+
*
573+
* **Note:** If **export**=`true`, the context is returned regardless of the value of **return_context**.
574+
*/
575+
_export?: boolean;
568576
}
569577

570578
/** Assistant output to be rendered or processed by the client. */
@@ -607,8 +615,8 @@ namespace AssistantV2 {
607615
export interface MessageResponse {
608616
/** Assistant output to be rendered or processed by the client. */
609617
output: MessageOutput;
610-
/** State information for the conversation. The context is stored by the assistant on a per-session basis. You
611-
* can use this property to access context variables.
618+
/** Context data for the conversation. The context is stored by the assistant on a per-session basis. You can
619+
* use this property to access context variables.
612620
*
613621
* **Note:** The context is included in message responses only if **return_context**=`true` in the message request.
614622
*/

compare-comply/v1.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,9 @@ class CompareComplyV1 extends BaseService {
735735
* Run Compare and Comply methods over a collection of input documents.
736736
*
737737
* **Important:** Batch processing requires the use of the [IBM Cloud Object Storage
738-
* service](https://cloud.ibm.com/docs/services/cloud-object-storage?topic=cloud-object-storage-about#about-ibm-cloud-object-storage).
738+
* service](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-about#about-ibm-cloud-object-storage).
739739
* The use of IBM Cloud Object Storage with Compare and Comply is discussed at [Using batch
740-
* processing](https://cloud.ibm.com/docs/services/compare-comply?topic=compare-comply-batching#before-you-batch).
740+
* processing](https://cloud.ibm.com/docs/compare-comply?topic=compare-comply-batching#before-you-batch).
741741
*
742742
* @param {Object} params - The parameters to send to the service.
743743
* @param {string} params._function - The Compare and Comply method to run across the submitted input documents.

0 commit comments

Comments
 (0)