Skip to content

Commit 737e212

Browse files
committed
docs: regenerate services 9/19/18
1 parent b9acff6 commit 737e212

File tree

4 files changed

+42
-65
lines changed

4 files changed

+42
-65
lines changed

assistant/v1.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3976,8 +3976,6 @@ namespace AssistantV1 {
39763976
nodes_visited?: string[];
39773977
/** An array of objects containing detailed diagnostic information about the nodes that were triggered during processing of the input message. Included only if **nodes_visited_details** is set to `true` in the message request. */
39783978
nodes_visited_details?: DialogNodeVisitedDetails[];
3979-
/** An array of objects describing any actions requested by the dialog node. */
3980-
actions?: DialogNodeAction[];
39813979
/** OutputData accepts additional properties. */
39823980
[propName: string]: any;
39833981
}

language-translator/v2-generated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { getMissingParams } from '../lib/helper';
2121
import { FileObject } from '../lib/helper';
2222

2323
/**
24-
* @deprecated Language Translator v3 is [available](https://www.ibm.com/watson/developercloud/language-translator/api/v3/). See the [migration guide](https://console.bluemix.net/docs/services/language-translator/migrating.html). --- IBM Watson™ Language Translator translates text from one language to another. The service offers multiple domain-specific models that you can customize based on your unique terminology and language. Use Language Translator to take news from across the globe and present it in your language, communicate with your customers in their own language, and more.
24+
* --- Language Translator v3 is [available](https://www.ibm.com/watson/developercloud/language-translator/api/v3/). See the [migration guide](https://console.bluemix.net/docs/services/language-translator/migrating.html). --- IBM Watson™ Language Translator translates text from one language to another. The service offers multiple domain-specific models that you can customize based on your unique terminology and language. Use Language Translator to take news from across the globe and present it in your language, communicate with your customers in their own language, and more.
2525
*/
2626

2727
class LanguageTranslatorV2 extends BaseService {

speech-to-text/v1-generated.ts

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,9 +1126,13 @@ class SpeechToTextV1 extends BaseService {
11261126
* @param {Object} params - The parameters to send to the service.
11271127
* @param {string} params.customization_id - The customization ID (GUID) of the custom language model. You must make
11281128
* the request with service credentials created for the instance of the service that owns the custom model.
1129-
* @param {string} params.corpus_name - The name of the corpus for the custom language model. When adding a corpus, do
1130-
* not include spaces in the name; use a localized name that matches the language of the custom model; and do not use
1131-
* the name `user`, which is reserved by the service to denote custom words added or modified by the user.
1129+
* @param {string} params.corpus_name - The name of the new corpus for the custom language model. Use a localized name
1130+
* that matches the language of the custom model and reflects the contents of the corpus.
1131+
* * Include a maximum of 128 characters in the name.
1132+
* * Do not include spaces, slashes, or backslashes in the name.
1133+
* * Do not use the name of a corpus that has already been added to the custom model.
1134+
* * Do not use the name `user`, which is reserved by the service to denote custom words that are added or modified by
1135+
* the user.
11321136
* @param {NodeJS.ReadableStream|FileObject|Buffer} params.corpus_file - A plain text file that contains the training
11331137
* data for the corpus. Encode the file in UTF-8 if it contains non-ASCII characters; the service assumes UTF-8
11341138
* encoding if it encounters non-ASCII characters. With cURL, use the `--data-binary` option to upload the file for
@@ -1194,9 +1198,7 @@ class SpeechToTextV1 extends BaseService {
11941198
* @param {Object} params - The parameters to send to the service.
11951199
* @param {string} params.customization_id - The customization ID (GUID) of the custom language model. You must make
11961200
* the request with service credentials created for the instance of the service that owns the custom model.
1197-
* @param {string} params.corpus_name - The name of the corpus for the custom language model. When adding a corpus, do
1198-
* not include spaces in the name; use a localized name that matches the language of the custom model; and do not use
1199-
* the name `user`, which is reserved by the service to denote custom words added or modified by the user.
1201+
* @param {string} params.corpus_name - The name of the corpus for the custom language model.
12001202
* @param {Object} [params.headers] - Custom request headers
12011203
* @param {Function} [callback] - The callback that handles the response.
12021204
* @returns {NodeJS.ReadableStream|void}
@@ -1239,9 +1241,7 @@ class SpeechToTextV1 extends BaseService {
12391241
* @param {Object} params - The parameters to send to the service.
12401242
* @param {string} params.customization_id - The customization ID (GUID) of the custom language model. You must make
12411243
* the request with service credentials created for the instance of the service that owns the custom model.
1242-
* @param {string} params.corpus_name - The name of the corpus for the custom language model. When adding a corpus, do
1243-
* not include spaces in the name; use a localized name that matches the language of the custom model; and do not use
1244-
* the name `user`, which is reserved by the service to denote custom words added or modified by the user.
1244+
* @param {string} params.corpus_name - The name of the corpus for the custom language model.
12451245
* @param {Object} [params.headers] - Custom request headers
12461246
* @param {Function} [callback] - The callback that handles the response.
12471247
* @returns {NodeJS.ReadableStream|void}
@@ -2082,12 +2082,22 @@ class SpeechToTextV1 extends BaseService {
20822082
* supported for use with speech recognition and with the `Content-Type` header, including the `rate`, `channels`, and
20832083
* `endianness` parameters that are used with some formats. The default contained audio format is `audio/wav`.
20842084
*
2085+
* ### Naming restrictions for embedded audio files
2086+
*
2087+
* The name of an audio file that is embedded within an archive-type resource must meet the following restrictions:
2088+
* * Include a maximum of 128 characters in the file name; this includes the file extension.
2089+
* * Do not include spaces, slashes, or backslashes in the file name.
2090+
* * Do not use the name of an audio file that has already been added to the custom model as part of an archive-type
2091+
* resource.
2092+
*
20852093
* @param {Object} params - The parameters to send to the service.
20862094
* @param {string} params.customization_id - The customization ID (GUID) of the custom acoustic model. You must make
20872095
* the request with service credentials created for the instance of the service that owns the custom model.
2088-
* @param {string} params.audio_name - The name of the audio resource for the custom acoustic model. When adding an
2089-
* audio resource, do not include spaces in the name; use a localized name that matches the language of the custom
2090-
* model.
2096+
* @param {string} params.audio_name - The name of the new audio resource for the custom acoustic model. Use a
2097+
* localized name that matches the language of the custom model and reflects the contents of the resource.
2098+
* * Include a maximum of 128 characters in the name.
2099+
* * Do not include spaces, slashes, or backslashes in the name.
2100+
* * Do not use the name of an audio resource that has already been added to the custom model.
20912101
* @param {NodeJS.ReadableStream|FileObject|Buffer} params.audio_resource - The audio resource that is to be added to
20922102
* the custom acoustic model, an individual audio file or an archive file.
20932103
* @param {string} params.content_type - The type of the input.
@@ -2151,9 +2161,7 @@ class SpeechToTextV1 extends BaseService {
21512161
* @param {Object} params - The parameters to send to the service.
21522162
* @param {string} params.customization_id - The customization ID (GUID) of the custom acoustic model. You must make
21532163
* the request with service credentials created for the instance of the service that owns the custom model.
2154-
* @param {string} params.audio_name - The name of the audio resource for the custom acoustic model. When adding an
2155-
* audio resource, do not include spaces in the name; use a localized name that matches the language of the custom
2156-
* model.
2164+
* @param {string} params.audio_name - The name of the audio resource for the custom acoustic model.
21572165
* @param {Object} [params.headers] - Custom request headers
21582166
* @param {Function} [callback] - The callback that handles the response.
21592167
* @returns {NodeJS.ReadableStream|void}
@@ -2208,9 +2216,7 @@ class SpeechToTextV1 extends BaseService {
22082216
* @param {Object} params - The parameters to send to the service.
22092217
* @param {string} params.customization_id - The customization ID (GUID) of the custom acoustic model. You must make
22102218
* the request with service credentials created for the instance of the service that owns the custom model.
2211-
* @param {string} params.audio_name - The name of the audio resource for the custom acoustic model. When adding an
2212-
* audio resource, do not include spaces in the name; use a localized name that matches the language of the custom
2213-
* model.
2219+
* @param {string} params.audio_name - The name of the audio resource for the custom acoustic model.
22142220
* @param {Object} [params.headers] - Custom request headers
22152221
* @param {Function} [callback] - The callback that handles the response.
22162222
* @returns {NodeJS.ReadableStream|void}
@@ -2705,7 +2711,7 @@ namespace SpeechToTextV1 {
27052711
export interface AddCorpusParams {
27062712
/** The customization ID (GUID) of the custom language model. You must make the request with service credentials created for the instance of the service that owns the custom model. */
27072713
customization_id: string;
2708-
/** The name of the corpus for the custom language model. When adding a corpus, do not include spaces in the name; use a localized name that matches the language of the custom model; and do not use the name `user`, which is reserved by the service to denote custom words added or modified by the user. */
2714+
/** The name of the new corpus for the custom language model. Use a localized name that matches the language of the custom model and reflects the contents of the corpus. * Include a maximum of 128 characters in the name. * Do not include spaces, slashes, or backslashes in the name. * Do not use the name of a corpus that has already been added to the custom model. * Do not use the name `user`, which is reserved by the service to denote custom words that are added or modified by the user. */
27092715
corpus_name: string;
27102716
/** A plain text file that contains the training data for the corpus. Encode the file in UTF-8 if it contains non-ASCII characters; the service assumes UTF-8 encoding if it encounters non-ASCII characters. With cURL, use the `--data-binary` option to upload the file for the request. */
27112717
corpus_file: NodeJS.ReadableStream|FileObject|Buffer;
@@ -2720,7 +2726,7 @@ namespace SpeechToTextV1 {
27202726
export interface DeleteCorpusParams {
27212727
/** The customization ID (GUID) of the custom language model. You must make the request with service credentials created for the instance of the service that owns the custom model. */
27222728
customization_id: string;
2723-
/** The name of the corpus for the custom language model. When adding a corpus, do not include spaces in the name; use a localized name that matches the language of the custom model; and do not use the name `user`, which is reserved by the service to denote custom words added or modified by the user. */
2729+
/** The name of the corpus for the custom language model. */
27242730
corpus_name: string;
27252731
headers?: Object;
27262732
}
@@ -2729,7 +2735,7 @@ namespace SpeechToTextV1 {
27292735
export interface GetCorpusParams {
27302736
/** The customization ID (GUID) of the custom language model. You must make the request with service credentials created for the instance of the service that owns the custom model. */
27312737
customization_id: string;
2732-
/** The name of the corpus for the custom language model. When adding a corpus, do not include spaces in the name; use a localized name that matches the language of the custom model; and do not use the name `user`, which is reserved by the service to denote custom words added or modified by the user. */
2738+
/** The name of the corpus for the custom language model. */
27332739
corpus_name: string;
27342740
headers?: Object;
27352741
}
@@ -2894,7 +2900,7 @@ namespace SpeechToTextV1 {
28942900
export interface AddAudioParams {
28952901
/** The customization ID (GUID) of the custom acoustic model. You must make the request with service credentials created for the instance of the service that owns the custom model. */
28962902
customization_id: string;
2897-
/** The name of the audio resource for the custom acoustic model. When adding an audio resource, do not include spaces in the name; use a localized name that matches the language of the custom model. */
2903+
/** The name of the new audio resource for the custom acoustic model. Use a localized name that matches the language of the custom model and reflects the contents of the resource. * Include a maximum of 128 characters in the name. * Do not include spaces, slashes, or backslashes in the name. * Do not use the name of an audio resource that has already been added to the custom model. */
28982904
audio_name: string;
28992905
/** The audio resource that is to be added to the custom acoustic model, an individual audio file or an archive file. */
29002906
audio_resource: NodeJS.ReadableStream|FileObject|Buffer;
@@ -2949,7 +2955,7 @@ namespace SpeechToTextV1 {
29492955
export interface DeleteAudioParams {
29502956
/** The customization ID (GUID) of the custom acoustic model. You must make the request with service credentials created for the instance of the service that owns the custom model. */
29512957
customization_id: string;
2952-
/** The name of the audio resource for the custom acoustic model. When adding an audio resource, do not include spaces in the name; use a localized name that matches the language of the custom model. */
2958+
/** The name of the audio resource for the custom acoustic model. */
29532959
audio_name: string;
29542960
headers?: Object;
29552961
}
@@ -2958,7 +2964,7 @@ namespace SpeechToTextV1 {
29582964
export interface GetAudioParams {
29592965
/** The customization ID (GUID) of the custom acoustic model. You must make the request with service credentials created for the instance of the service that owns the custom model. */
29602966
customization_id: string;
2961-
/** The name of the audio resource for the custom acoustic model. When adding an audio resource, do not include spaces in the name; use a localized name that matches the language of the custom model. */
2967+
/** The name of the audio resource for the custom acoustic model. */
29622968
audio_name: string;
29632969
headers?: Object;
29642970
}

visual-recognition/v3-generated.ts

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,6 @@ class VisualRecognitionV3 extends BaseService {
233233
*
234234
* Encode special characters in the file name in UTF-8.
235235
* @param {string} [params.classname_positive_examples_filename] - The filename for classname_positive_examples.
236-
*
237-
* Specify the filename by appending `_positive_examples_filename` to the class name. For example,
238-
* the filename parameter for `goldenretriever_positive_examples` would be `goldenretriever_positive_examples_filename`
239-
*
240236
* @param {string} [params.negative_examples_filename] - The filename for negative_examples.
241237
* @param {Object} [params.headers] - Custom request headers
242238
* @param {Function} [callback] - The callback that handles the response.
@@ -245,14 +241,16 @@ class VisualRecognitionV3 extends BaseService {
245241
public createClassifier(params: VisualRecognitionV3.CreateClassifierParams, callback?: VisualRecognitionV3.Callback<VisualRecognitionV3.Classifier>): NodeJS.ReadableStream | void {
246242
const _params = extend({}, params);
247243
const _callback = (callback) ? callback : () => { /* noop */ };
248-
const positiveExampleClasses = Object.keys(_params).filter(key => {
249-
return key.match(/^.+positive_examples$/);
250-
}) || ['<classname>_positive_examples'];
251-
const requiredParams = ['name', ...positiveExampleClasses];
244+
const requiredParams = ['name', 'classname_positive_examples'];
252245
const missingParams = getMissingParams(_params, requiredParams);
253246
if (missingParams) {
254247
return _callback(missingParams);
255248
}
249+
if (_params.classname_positive_examples && !_params.classname_positive_examples_filename) {
250+
console.warn(
251+
'WARNING: `classname_positive_examples_filename` should be provided if `classname_positive_examples` is not null. This will be REQUIRED in the next major release.'
252+
);
253+
}
256254
if (_params.negative_examples && !_params.negative_examples_filename) {
257255
console.warn(
258256
'WARNING: `negative_examples_filename` should be provided if `negative_examples` is not null. This will be REQUIRED in the next major release.'
@@ -271,18 +269,6 @@ class VisualRecognitionV3 extends BaseService {
271269
contentType: 'application/octet-stream'
272270
}
273271
};
274-
positiveExampleClasses.forEach(positiveExampleClass => {
275-
if (!_params[`${positiveExampleClass}_filename`]) {
276-
console.warn(
277-
`WARNING: \`${positiveExampleClass}_filename\` should be provided if \`${positiveExampleClass}\` is not null. This will be REQUIRED in the next major release.`
278-
);
279-
}
280-
formData[positiveExampleClass] = {
281-
data: _params[positiveExampleClass],
282-
filename: _params[`${positiveExampleClass}_filename`],
283-
contentType: 'application/octet-stream',
284-
};
285-
});
286272
const parameters = {
287273
options: {
288274
url: '/v3/classifiers',
@@ -438,9 +424,6 @@ class VisualRecognitionV3 extends BaseService {
438424
*
439425
* Encode special characters in the file name in UTF-8.
440426
* @param {string} [params.classname_positive_examples_filename] - The filename for classname_positive_examples.
441-
*
442-
* Specify the filename by appending `_positive_examples_filename` to the class name. For example,
443-
* the filename parameter for `goldenretriever_positive_examples` would be `goldenretriever_positive_examples_filename`
444427
* @param {string} [params.negative_examples_filename] - The filename for negative_examples.
445428
* @param {Object} [params.headers] - Custom request headers
446429
* @param {Function} [callback] - The callback that handles the response.
@@ -449,14 +432,16 @@ class VisualRecognitionV3 extends BaseService {
449432
public updateClassifier(params: VisualRecognitionV3.UpdateClassifierParams, callback?: VisualRecognitionV3.Callback<VisualRecognitionV3.Classifier>): NodeJS.ReadableStream | void {
450433
const _params = extend({}, params);
451434
const _callback = (callback) ? callback : () => { /* noop */ };
452-
const positiveExampleClasses = Object.keys(_params).filter(key => {
453-
return key.match(/^.+positive_examples$/);
454-
});
455435
const requiredParams = ['classifier_id'];
456436
const missingParams = getMissingParams(_params, requiredParams);
457437
if (missingParams) {
458438
return _callback(missingParams);
459439
}
440+
if (_params.classname_positive_examples && !_params.classname_positive_examples_filename) {
441+
console.warn(
442+
'WARNING: `classname_positive_examples_filename` should be provided if `classname_positive_examples` is not null. This will be REQUIRED in the next major release.'
443+
);
444+
}
460445
if (_params.negative_examples && !_params.negative_examples_filename) {
461446
console.warn(
462447
'WARNING: `negative_examples_filename` should be provided if `negative_examples` is not null. This will be REQUIRED in the next major release.'
@@ -477,18 +462,6 @@ class VisualRecognitionV3 extends BaseService {
477462
const path = {
478463
'classifier_id': _params.classifier_id
479464
};
480-
positiveExampleClasses.forEach(positiveExampleClass => {
481-
if (!_params[`${positiveExampleClass}_filename`]) {
482-
console.warn(
483-
`WARNING: \`${positiveExampleClass}_filename\` should be provided if \`${positiveExampleClass}\` is not null. This will be REQUIRED in the next major release.`
484-
);
485-
}
486-
formData[positiveExampleClass] = {
487-
data: _params[positiveExampleClass],
488-
filename: _params[`${positiveExampleClass}_filename`],
489-
contentType: 'application/octet-stream',
490-
};
491-
});
492465
const parameters = {
493466
options: {
494467
url: '/v3/classifiers/{classifier_id}',

0 commit comments

Comments
 (0)