Skip to content

Commit 2e3cae2

Browse files
committed
docs: add deprecation messages for conversation v1 and language translator v2
1 parent 87d06d8 commit 2e3cae2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

conversation/v1.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ class ConversationV1 extends GeneratedConversationV1 {
3838
const _options = extend({}, options);
3939
_options.version = _options.version_date || _options.version;
4040
super(_options);
41+
if (!options['silent']) {
42+
// eslint-disable-next-line no-console
43+
console.warn(
44+
'WARNING: Conversation V1 is deprecated and will be removed in the next major release of the SDK. Use Assistant V1 or Assistant V2.' +
45+
' Set {silent: true} to disable this message.'
46+
);
47+
}
4148
}
4249

4350
workspaceStatus(params, callback) {

language-translator/v2.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ import GeneratedLanguageTranslatorV2 = require('./v2-generated');
2121
class LanguageTranslatorV2 extends GeneratedLanguageTranslatorV2 {
2222
constructor(options) {
2323
super(options);
24+
if (!options['silent']) {
25+
// eslint-disable-next-line no-console
26+
console.warn(
27+
'WARNING: Language Translator V2 is deprecated and will be removed in the next major release of the SDK. Use Language Translator V3.' +
28+
' Set {silent: true} to disable this message.'
29+
);
30+
}
2431
}
2532

2633
getModels(params, callback) {

0 commit comments

Comments
 (0)