- 
                Notifications
    You must be signed in to change notification settings 
- Fork 661
v5 Migration Guide
Note: If migrating from a version less than 4.0, also see the v4 migration guide wiki.
The SDK service constructors now accept Authenticator objects that are used to authenticate requests. The constructors no longer accept individual credentials like username and password. Rather, an Authenticator must be instantiated and passed to the constructor.
An Authenticator can either be initialized programmatically or read from the environment using the method getAuthenticatorFromEnvironment.
More details to come.
To maintain a consistent style for the SDK, parameter names will now be formatted with the case convention "lowerCamelCase". For example, the parameter workspace_id is now workspaceId. This applies to all top-level parameters passed in to any method or constructor. This does not apply to sub-properties of models, which will still use "lower_snake_case".
The "detailed response" (the full response, including headers and status code) is now always returned. Before we would preferentially return the body. The body is available under the key result. The key data is no longer used. This applies to both Promises and Callbacks.
The detailed response is always returned. The return_response parameter is removed.
const response = await listWorkspaces();
console.log(response.result); // prints the body
console.log(response.headers); // prints the headersThe detailed response is sent in the second argument position, after the error. There is no third argument position.
listWorkspaces((err, res) => {
  console.log(res.result); // prints the body
  console.log(res.headers); // prints the headers
});The SDK no longer supports Node versions 6 and 8, as reflected in the engines property in the package.json file. Version 6 reached end of life in April 2019 and Version 8 reaches end of life on 31 December 2019.
- All parameters are now lower camel case
- Support for the tokenparameter has been removed
- Support for the customization_idparameter has been removed
- Method setAuthorizationHeaderTokenhas been removed from the WebSocket Stream classes. It now exists as a shared function calledsetAuthorizationHeaderinlib/websocket-utils.ts.
- 
RecognizeStream.readableObjectModewill always be a Boolean value - before, it could have beenundefined. This is to align with the new convention in Node 12.
The variable name for the stored, URL parameter has been changed from url to serviceUrl. Note that url can still be compatibility passed into the constructor as an alias for serviceUrl. However, if you try to access the url property directly in your code, this is a breaking change.
The order of priority has changed to give a file in the current working directory higher priority than one in the home directory. This will only impact your code if you have different files in each location.
- Parameter include_countremoved from methodlistEntities
- Parameter include_countremoved from methodlistValues
- Parameter include_countremoved from methodlistSynonyms
- Parameter include_countremoved from methodlistDialogNodes
- Parameter include_countremoved from methodlistWorkspaces
- Parameter include_countremoved from methodlistIntents
- Parameter include_countremoved from methodlistExamples
- Parameter include_countremoved from methodlistCounterexamples
- Parameter value_typerenamed totypein methodcreateValue
- Parameter new_value_typerenamed tonewTypein methodupdateValue
- Parameter node_typerenamed totypein methodcreateDialogNode
- Parameter new_node_typerenamed tonewTypein methodupdateDialogNode
- Interface DialogRuntimeResponseGenericrenamed toRuntimeResponseGeneric
- Interface DialogSuggestionsremoved
- Additional properties no longer supported for interface LogMessage
- Additional properties no longer supported for interface RuntimeEntity
- Additional properties no longer supported for interface RuntimeIntent
- Property value_typerenamed totypein interfaceValue
- Property value_typerenamed totypein interfaceCreateValue
- Property node_typerenamed totypein interfaceDialogNode
- Property action_typerenamed totypein interfaceDialogNodeAction
- Property outputchanged type fromJsonObjecttoDialogSuggestionOutputin interfaceDialogSuggestion
- Property action_typerenamed totypein interfaceDialogNodeAction
- Interface DialogRuntimeResponseGenericrenamed toRuntimeResponseGeneric
- Parameter filenameremoved from methodconvertToHtml
- Parameter collectionIdsremoved from methodquery
- Parameter return_fieldsrenamed to_returnin methodquery
- Parameter logging_opt_outrenamed toxWatsonLoggingOptOutin methodquery
- Parameter return_fieldsrenamed to_returnin methodfederatedQuery
- Parameter logging_opt_outrenamed toxWatsonLoggingOptOutin methodfederatedQuery
- Parameter return_fieldsrenamed to_returnin methodqueryNotices
- Parameter return_fieldsrenamed to_returnin methodfederatedQueryNotices
- Property field_namerenamed tofieldin interfaceField
- Property field_typerenamed totypein interfaceField
- Property enrichment_namerenamed toenrichmentin interfaceEnrichment
- Method queryEntities()removed
- Method queryRelations()removed
- Method testConfigurationInEnvironment()removed
- Parameter default_modelsrenamed to_defaultin methodlistModels
- Property translation_outputrenamed totranslationin interfaceTranslation
- Parameter metadatarenamed totrainingMetadatain methodcreateClassifier
- Property final_resultsrenamed tofinalin interfaceSpeakerLabelsResult
- Property final_resultsrenamed tofinalin interfaceSpeechRecognitionResult
- The following voices are removed:
- DE_DE_BIRGITV2VOICE
- DE_DE_DIETERV2VOICE
- EN_US_ALLISONV2VOICE
- EN_US_LISAV2VOICE
- EN_US_MICHAELV2VOICE
- IT_IT_FRANCESCAV2VOICE
 
- Property class_namerenamed to_classin interfaceClassResult
- Method detectFaces()removed