Skip to content

Commit 7c97754

Browse files
Anwesha NaskarAnwesha Naskar
authored andcommitted
Regenerates code with multiple producers and adds support for content-language in tone-analyzer for tone-chat
1 parent 910f67d commit 7c97754

File tree

5 files changed

+179
-27
lines changed

5 files changed

+179
-27
lines changed

discovery/v1-generated.ts

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,9 @@ class DiscoveryV1 extends BaseService {
11661166
* @param {boolean} [params.highlight] - When true a highlight field is returned for each result which contains the fields that match the query with `<em></em>` tags around the matching query terms. Defaults to false.
11671167
* @param {boolean} [params.deduplicate] - When `true` and used with a Watson Discovery News collection, duplicate results (based on the contents of the `title` field) are removed. Duplicate comparison is limited to the current query only, `offset` is not considered. Defaults to `false`. This parameter is currently Beta functionality.
11681168
* @param {string} [params.deduplicate_field] - When specified, duplicate results based on the field specified are removed from the returned results. Duplicate comparison is limited to the current query only, `offset` is not considered. This parameter is currently Beta functionality.
1169+
* @param {boolean} [params.similar] - When `true`, results are returned based on their similarity to the document IDs specified in the `similar.document_ids` parameter. The default is `false`.
1170+
* @param {string[]} [params.similar_document_ids] - A comma-separated list of document IDs that will be used to find similar documents. **Note:** If the `natural_language_query` parameter is also specified, it will be used to expand the scope of the document similarity search to include the natural language query. Other query parameters, such as `filter` and `query` are subsequently applied and reduce the query scope.
1171+
* @param {string[]} [params.similar_fields] - A comma-separated list of field names that will be used as a basis for comparison to identify similar documents. If not specified, the entire document is used for comparison.
11691172
* @param {Function} [callback] - The callback that handles the response.
11701173
* @returns {NodeJS.ReadableStream|void}
11711174
*/
@@ -1189,7 +1192,10 @@ class DiscoveryV1 extends BaseService {
11891192
'sort': _params.sort,
11901193
'highlight': _params.highlight,
11911194
'deduplicate': _params.deduplicate,
1192-
'deduplicate.field': _params.deduplicate_field
1195+
'deduplicate.field': _params.deduplicate_field,
1196+
'similar': _params.similar,
1197+
'similar.document_ids': _params.similar_document_ids,
1198+
'similar.fields': _params.similar_fields
11931199
};
11941200
const path = {
11951201
'environment_id': _params.environment_id
@@ -1229,6 +1235,9 @@ class DiscoveryV1 extends BaseService {
12291235
* @param {string[]} [params.sort] - A comma separated list of fields in the document to sort on. You can optionally specify a sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending is the default sort direction if no prefix is specified.
12301236
* @param {boolean} [params.highlight] - When true a highlight field is returned for each result which contains the fields that match the query with `<em></em>` tags around the matching query terms. Defaults to false.
12311237
* @param {string} [params.deduplicate_field] - When specified, duplicate results based on the field specified are removed from the returned results. Duplicate comparison is limited to the current query only, `offset` is not considered. This parameter is currently Beta functionality.
1238+
* @param {boolean} [params.similar] - When `true`, results are returned based on their similarity to the document IDs specified in the `similar.document_ids` parameter. The default is `false`.
1239+
* @param {string[]} [params.similar_document_ids] - A comma-separated list of document IDs that will be used to find similar documents. **Note:** If the `natural_language_query` parameter is also specified, it will be used to expand the scope of the document similarity search to include the natural language query. Other query parameters, such as `filter` and `query` are subsequently applied and reduce the query scope.
1240+
* @param {string[]} [params.similar_fields] - A comma-separated list of field names that will be used as a basis for comparison to identify similar documents. If not specified, the entire document is used for comparison.
12321241
* @param {Function} [callback] - The callback that handles the response.
12331242
* @returns {NodeJS.ReadableStream|void}
12341243
*/
@@ -1251,7 +1260,10 @@ class DiscoveryV1 extends BaseService {
12511260
'offset': _params.offset,
12521261
'sort': _params.sort,
12531262
'highlight': _params.highlight,
1254-
'deduplicate.field': _params.deduplicate_field
1263+
'deduplicate.field': _params.deduplicate_field,
1264+
'similar': _params.similar,
1265+
'similar.document_ids': _params.similar_document_ids,
1266+
'similar.fields': _params.similar_fields
12551267
};
12561268
const path = {
12571269
'environment_id': _params.environment_id
@@ -1287,7 +1299,7 @@ class DiscoveryV1 extends BaseService {
12871299
* @param {boolean} [params.passages] - A passages query that returns the most relevant passages from the results.
12881300
* @param {string} [params.aggregation] - An aggregation search uses combinations of filters and query search to return an exact answer. Aggregations are useful for building applications, because you can use them to build lists, tables, and time series. For a full list of possible aggregrations, see the Query reference.
12891301
* @param {number} [params.count] - Number of documents to return.
1290-
* @param {string[]} [params.return_fields] - A comma separated list of the portion of the document hierarchy to return_fields.
1302+
* @param {string[]} [params.return_fields] - A comma separated list of the portion of the document hierarchy to return.
12911303
* @param {number} [params.offset] - The number of query results to skip at the beginning. For example, if the total number of results that are returned is 10, and the offset is 8, it returns the last two results.
12921304
* @param {string[]} [params.sort] - A comma separated list of fields in the document to sort on. You can optionally specify a sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending is the default sort direction if no prefix is specified.
12931305
* @param {boolean} [params.highlight] - When true a highlight field is returned for each result which contains the fields that match the query with `<em></em>` tags around the matching query terms. Defaults to false.
@@ -1296,6 +1308,9 @@ class DiscoveryV1 extends BaseService {
12961308
* @param {number} [params.passages_characters] - The approximate number of characters that any one passage will have. The default is `400`. The minimum is `50`. The maximum is `2000`.
12971309
* @param {boolean} [params.deduplicate] - When `true` and used with a Watson Discovery News collection, duplicate results (based on the contents of the `title` field) are removed. Duplicate comparison is limited to the current query only, `offset` is not considered. Defaults to `false`. This parameter is currently Beta functionality.
12981310
* @param {string} [params.deduplicate_field] - When specified, duplicate results based on the field specified are removed from the returned results. Duplicate comparison is limited to the current query only, `offset` is not considered. This parameter is currently Beta functionality.
1311+
* @param {boolean} [params.similar] - When `true`, results are returned based on their similarity to the document IDs specified in the `similar.document_ids` parameter. The default is `false`.
1312+
* @param {string[]} [params.similar_document_ids] - A comma-separated list of document IDs that will be used to find similar documents. **Note:** If the `natural_language_query` parameter is also specified, it will be used to expand the scope of the document similarity search to include the natural language query. Other query parameters, such as `filter` and `query` are subsequently applied and reduce the query scope.
1313+
* @param {string[]} [params.similar_fields] - A comma-separated list of field names that will be used as a basis for comparison to identify similar documents. If not specified, the entire document is used for comparison.
12991314
* @param {Function} [callback] - The callback that handles the response.
13001315
* @returns {NodeJS.ReadableStream|void}
13011316
*/
@@ -1322,7 +1337,10 @@ class DiscoveryV1 extends BaseService {
13221337
'passages.count': _params.passages_count,
13231338
'passages.characters': _params.passages_characters,
13241339
'deduplicate': _params.deduplicate,
1325-
'deduplicate.field': _params.deduplicate_field
1340+
'deduplicate.field': _params.deduplicate_field,
1341+
'similar': _params.similar,
1342+
'similar.document_ids': _params.similar_document_ids,
1343+
'similar.fields': _params.similar_fields
13261344
};
13271345
const path = {
13281346
'environment_id': _params.environment_id,
@@ -1418,6 +1436,9 @@ class DiscoveryV1 extends BaseService {
14181436
* @param {number} [params.passages_count] - The maximum number of passages to return. The search returns fewer passages if the requested total is not found. The default is `10`. The maximum is `100`.
14191437
* @param {number} [params.passages_characters] - The approximate number of characters that any one passage will have. The default is `400`. The minimum is `50`. The maximum is `2000`.
14201438
* @param {string} [params.deduplicate_field] - When specified, duplicate results based on the field specified are removed from the returned results. Duplicate comparison is limited to the current query only, `offset` is not considered. This parameter is currently Beta functionality.
1439+
* @param {boolean} [params.similar] - When `true`, results are returned based on their similarity to the document IDs specified in the `similar.document_ids` parameter. The default is `false`.
1440+
* @param {string[]} [params.similar_document_ids] - A comma-separated list of document IDs that will be used to find similar documents. **Note:** If the `natural_language_query` parameter is also specified, it will be used to expand the scope of the document similarity search to include the natural language query. Other query parameters, such as `filter` and `query` are subsequently applied and reduce the query scope.
1441+
* @param {string[]} [params.similar_fields] - A comma-separated list of field names that will be used as a basis for comparison to identify similar documents. If not specified, the entire document is used for comparison.
14211442
* @param {Function} [callback] - The callback that handles the response.
14221443
* @returns {NodeJS.ReadableStream|void}
14231444
*/
@@ -1443,7 +1464,10 @@ class DiscoveryV1 extends BaseService {
14431464
'passages.fields': _params.passages_fields,
14441465
'passages.count': _params.passages_count,
14451466
'passages.characters': _params.passages_characters,
1446-
'deduplicate.field': _params.deduplicate_field
1467+
'deduplicate.field': _params.deduplicate_field,
1468+
'similar': _params.similar,
1469+
'similar.document_ids': _params.similar_document_ids,
1470+
'similar.fields': _params.similar_fields
14471471
};
14481472
const path = {
14491473
'environment_id': _params.environment_id,
@@ -2342,6 +2366,12 @@ namespace DiscoveryV1 {
23422366
deduplicate?: boolean;
23432367
/** When specified, duplicate results based on the field specified are removed from the returned results. Duplicate comparison is limited to the current query only, `offset` is not considered. This parameter is currently Beta functionality. */
23442368
deduplicate_field?: string;
2369+
/** When `true`, results are returned based on their similarity to the document IDs specified in the `similar.document_ids` parameter. The default is `false`. */
2370+
similar?: boolean;
2371+
/** A comma-separated list of document IDs that will be used to find similar documents. **Note:** If the `natural_language_query` parameter is also specified, it will be used to expand the scope of the document similarity search to include the natural language query. Other query parameters, such as `filter` and `query` are subsequently applied and reduce the query scope. */
2372+
similar_document_ids?: string[];
2373+
/** A comma-separated list of field names that will be used as a basis for comparison to identify similar documents. If not specified, the entire document is used for comparison. */
2374+
similar_fields?: string[];
23452375
}
23462376

23472377
/** Parameters for the `federatedQueryNotices` operation. */
@@ -2370,6 +2400,12 @@ namespace DiscoveryV1 {
23702400
highlight?: boolean;
23712401
/** When specified, duplicate results based on the field specified are removed from the returned results. Duplicate comparison is limited to the current query only, `offset` is not considered. This parameter is currently Beta functionality. */
23722402
deduplicate_field?: string;
2403+
/** When `true`, results are returned based on their similarity to the document IDs specified in the `similar.document_ids` parameter. The default is `false`. */
2404+
similar?: boolean;
2405+
/** A comma-separated list of document IDs that will be used to find similar documents. **Note:** If the `natural_language_query` parameter is also specified, it will be used to expand the scope of the document similarity search to include the natural language query. Other query parameters, such as `filter` and `query` are subsequently applied and reduce the query scope. */
2406+
similar_document_ids?: string[];
2407+
/** A comma-separated list of field names that will be used as a basis for comparison to identify similar documents. If not specified, the entire document is used for comparison. */
2408+
similar_fields?: string[];
23732409
}
23742410

23752411
/** Parameters for the `query` operation. */
@@ -2390,7 +2426,7 @@ namespace DiscoveryV1 {
23902426
aggregation?: string;
23912427
/** Number of documents to return. */
23922428
count?: number;
2393-
/** A comma separated list of the portion of the document hierarchy to return_fields. */
2429+
/** A comma separated list of the portion of the document hierarchy to return. */
23942430
return_fields?: string[];
23952431
/** The number of query results to skip at the beginning. For example, if the total number of results that are returned is 10, and the offset is 8, it returns the last two results. */
23962432
offset?: number;
@@ -2408,6 +2444,12 @@ namespace DiscoveryV1 {
24082444
deduplicate?: boolean;
24092445
/** When specified, duplicate results based on the field specified are removed from the returned results. Duplicate comparison is limited to the current query only, `offset` is not considered. This parameter is currently Beta functionality. */
24102446
deduplicate_field?: string;
2447+
/** When `true`, results are returned based on their similarity to the document IDs specified in the `similar.document_ids` parameter. The default is `false`. */
2448+
similar?: boolean;
2449+
/** A comma-separated list of document IDs that will be used to find similar documents. **Note:** If the `natural_language_query` parameter is also specified, it will be used to expand the scope of the document similarity search to include the natural language query. Other query parameters, such as `filter` and `query` are subsequently applied and reduce the query scope. */
2450+
similar_document_ids?: string[];
2451+
/** A comma-separated list of field names that will be used as a basis for comparison to identify similar documents. If not specified, the entire document is used for comparison. */
2452+
similar_fields?: string[];
24112453
}
24122454

24132455
/** Parameters for the `queryEntities` operation. */
@@ -2460,6 +2502,12 @@ namespace DiscoveryV1 {
24602502
passages_characters?: number;
24612503
/** When specified, duplicate results based on the field specified are removed from the returned results. Duplicate comparison is limited to the current query only, `offset` is not considered. This parameter is currently Beta functionality. */
24622504
deduplicate_field?: string;
2505+
/** When `true`, results are returned based on their similarity to the document IDs specified in the `similar.document_ids` parameter. The default is `false`. */
2506+
similar?: boolean;
2507+
/** A comma-separated list of document IDs that will be used to find similar documents. **Note:** If the `natural_language_query` parameter is also specified, it will be used to expand the scope of the document similarity search to include the natural language query. Other query parameters, such as `filter` and `query` are subsequently applied and reduce the query scope. */
2508+
similar_document_ids?: string[];
2509+
/** A comma-separated list of field names that will be used as a basis for comparison to identify similar documents. If not specified, the entire document is used for comparison. */
2510+
similar_fields?: string[];
24632511
}
24642512

24652513
/** Parameters for the `queryRelations` operation. */

language-translator/v2-generated.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,17 @@
1414
* limitations under the License.
1515
*/
1616

17-
1817
import * as extend from 'extend';
1918
import { RequestResponse } from 'request';
2019
import { BaseService } from '../lib/base_service';
2120
import { FileObject } from '../lib/helper';
2221
import { getMissingParams } from '../lib/helper';
2322
import { createRequest } from '../lib/requestwrapper';
2423

25-
2624
/**
2725
* 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.
2826
*/
2927

30-
31-
3228
class LanguageTranslatorV2 extends BaseService {
3329

3430
static URL: string = 'https://gateway.watsonplatform.net/language-translator/api';
@@ -307,7 +303,7 @@ class LanguageTranslatorV2 extends BaseService {
307303
* @param {Object} [params] - The parameters to send to the service.
308304
* @param {string} [params.source] - Specify a language code to filter results by source language.
309305
* @param {string} [params.target] - Specify a language code to filter results by target language.
310-
* @param {boolean} [params.default_models] - If the default_models parameter isn't specified, the service will return all models (default_models and non-default_models) for each language pair. To return only default_models models, set this to `true`. To return only non-default_models models, set this to `false`.
306+
* @param {boolean} [params.default_models] - If the default parameter isn't specified, the service will return all models (default and non-default) for each language pair. To return only default models, set this to `true`. To return only non-default models, set this to `false`.
311307
* @param {Function} [callback] - The callback that handles the response.
312308
* @returns {NodeJS.ReadableStream|void}
313309
*/
@@ -418,7 +414,7 @@ namespace LanguageTranslatorV2 {
418414
source?: string;
419415
/** Specify a language code to filter results by target language. */
420416
target?: string;
421-
/** If the default_models parameter isn't specified, the service will return all models (default_models and non-default_models) for each language pair. To return only default_models models, set this to `true`. To return only non-default_models models, set this to `false`. */
417+
/** If the default parameter isn't specified, the service will return all models (default and non-default) for each language pair. To return only default models, set this to `true`. To return only non-default models, set this to `false`. */
422418
default_models?: boolean;
423419
}
424420

@@ -508,4 +504,4 @@ namespace LanguageTranslatorV2 {
508504

509505
}
510506

511-
export = LanguageTranslatorV2;
507+
export = LanguageTranslatorV2;

0 commit comments

Comments
 (0)