diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md b/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md index c801504a89a7..273e667adeb7 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md @@ -15,85 +15,83 @@ npm install @azure/cognitiveservices-luis-authoring ### How to use -#### nodejs - Authentication, client creation and listApplicationVersionPatternFeatures features as an example written in TypeScript. +#### nodejs - Authentication, client creation and listPhraseLists features as an example written in TypeScript. -##### Install @azure/ms-rest-azure-js +##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-azure-js +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code ```typescript -import { CognitiveServicesCredentials } from "@azure/ms-rest-azure-js"; -import { LUISAuthoringClient } from "@azure/cognitiveservices-luis-authoring"; - -let authoringKey = process.env["luis-authoring-key"]; -const creds = new CognitiveServicesCredentials(authoringKey); - -// check the following link to find your region -// https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-regions -const region = ""; -const client = new LUISAuthoringClient( - creds, - "https://" + region + ".api.cognitive.microsoft.com/" -); - -const appId = ""; // replace this with your appId. -const versionId = "0.1"; // replace with version of your luis application. Initial value will be 0.1 - -const skip = 1; -const take = 1; - -client.features - .listApplicationVersionPatternFeatures(appId, versionId, { skip, take }) - .then((result) => { +import * as msRest from "@azure/ms-rest-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import { LUISAuthoringClient, LUISAuthoringModels, LUISAuthoringMappers } from "@azure/cognitiveservices-luis-authoring"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new LUISAuthoringClient(creds, subscriptionId); + const appId = ec7b1657-199d-4d8a-bbb2-89a11a42e02a; + const versionId = "testversionId"; + const skip = 1; + const take = 1; + client.features.listPhraseLists(appId, versionId, skip, take).then((result) => { console.log("The result is:"); console.log(result); - }) - .catch((err) => { - console.error(err); }); +}).catch((err) => { + console.error(err); +}); ``` -#### browser - Authentication, client creation and listApplicationVersionPatternFeatures features as an example written in JavaScript. +#### browser - Authentication, client creation and listPhraseLists features as an example written in JavaScript. +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` ##### Sample code -- index.html +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. +- index.html ```html @azure/cognitiveservices-luis-authoring sample + diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json index 78e0892897d5..5a99bafacb1d 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json @@ -4,7 +4,7 @@ "description": "LUISAuthoringClient Library with typescript type definitions for node.js and browser.", "version": "3.0.1", "dependencies": { - "@azure/ms-rest-js": "^2.0.3", + "@azure/ms-rest-js": "^2.0.4", "tslib": "^1.10.0" }, "keywords": [ @@ -19,20 +19,13 @@ "module": "./esm/lUISAuthoringClient.js", "types": "./esm/lUISAuthoringClient.d.ts", "devDependencies": { - "@types/chai": "^4.2.0", - "@types/mocha": "^5.2.7", - "mocha": "^6.1.4", - "nock": "^10.0.0", - "rollup": "^0.66.2", - "@azure/ms-rest-azure-js": "^2.0.1", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "ts-node": "^8.3.0", - "typescript": "^3.1.1", - "uglify-js": "^3.4.9", - "ts-mocha": "^6.0.0" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/cognitiveservices/cognitiveservices-luis-authoring", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cognitiveservices/cognitiveservices-luis-authoring", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -57,8 +50,7 @@ "scripts": { "build": "tsc && rollup -c rollup.config.js && npm run minify", "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-luis-authoring.js.map'\" -o ./dist/cognitiveservices-luis-authoring.min.js ./dist/cognitiveservices-luis-authoring.js", - "prepack": "npm install && npm run build", - "test": "ts-mocha -p tsconfig.test.json test/**/*.test.ts --timeout 100000" + "prepack": "npm install && npm run build" }, "sideEffects": false, "autoPublish": true diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js b/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js index 7d2b47abc269..b37af1626a2f 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js @@ -7,7 +7,10 @@ import sourcemaps from "rollup-plugin-sourcemaps"; */ const config = { input: "./esm/lUISAuthoringClient.js", - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/cognitiveservices-luis-authoring.js", format: "umd", @@ -19,14 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * + * Licensed under the MIT License. See License.txt in the project root for license information. + * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, - plugins: [nodeResolve({ module: true }), sourcemaps()] + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] }; export default config; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts index 79629ab3941a..103308078b05 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts @@ -4,10 +4,10 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. */ - import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts index 7a83aa838beb..42d336718fe1 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts @@ -4,7 +4,8 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. */ import * as msRest from "@azure/ms-rest-js"; @@ -23,11 +24,7 @@ export class LUISAuthoringClientContext extends msRest.ServiceClient { * @param credentials Subscription credentials which uniquely identify client subscription. * @param [options] The parameter options */ - constructor( - credentials: msRest.ServiceClientCredentials, - endpoint: string, - options?: msRest.ServiceClientOptions - ) { + constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { if (endpoint == undefined) { throw new Error("'endpoint' cannot be null."); } @@ -46,7 +43,7 @@ export class LUISAuthoringClientContext extends msRest.ServiceClient { super(credentials, options); - this.baseUri = "{Endpoint}/luis/api/v2.0"; + this.baseUri = "{Endpoint}/luis/api/v3.0-preview"; this.requestContentType = "application/json; charset=utf-8"; this.endpoint = endpoint; this.credentials = credentials; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts index 0b318b5d49ed..f6e23c3abc3e 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts @@ -1,8 +1,7 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * + * Licensed under the MIT License. See License.txt in the project root for license information. + * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts index 81f421679c0e..6f0cd86cc21b 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts @@ -1,13 +1,11 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ - export { AzureAccountInfoObject, ErrorResponse, diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts index 8bd5c1ef50f1..d4cb41a958a7 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts @@ -1,7 +1,6 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts index 5613c0bd2c54..e566b87203bf 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts @@ -1,17 +1,16 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ - export { ErrorResponse, FeatureInfoObject, FeaturesResponseObject, + ModelFeatureInformation, OperationStatus, PatternFeatureInfo, PhraselistCreateObject, diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts index ca2eb44abec7..5202e3e7d53f 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts @@ -1,14 +1,12 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ - import * as msRest from "@azure/ms-rest-js"; /** @@ -28,7 +26,7 @@ export interface EntityLabelObject { */ endCharIndex: number; /** - * The role of the entity within the utterance. + * The role the entity plays in the utterance. */ role?: string; } @@ -105,9 +103,9 @@ export interface PrebuiltDomainModelCreateObject { } /** - * A hierarchical entity extractor. + * A composite entity extractor. */ -export interface HierarchicalEntityModel { +export interface CompositeEntityModel { /** * Child entities. */ @@ -119,17 +117,49 @@ export interface HierarchicalEntityModel { } /** - * A composite entity extractor. + * A child entity extractor create object. */ -export interface CompositeEntityModel { +export interface ChildEntityModelCreateObject { /** * Child entities. */ - children?: string[]; + children?: ChildEntityModelCreateObject[]; + /** + * Entity name. + */ + name?: string; + /** + * The instance of model name + */ + instanceOf?: string; +} + +/** + * An entity extractor create object. + */ +export interface EntityModelCreateObject { + /** + * Child entities. + */ + children?: ChildEntityModelCreateObject[]; + /** + * Entity name. + */ + name?: string; +} + +/** + * An entity extractor update object. + */ +export interface EntityModelUpdateObject { /** * Entity name. */ name?: string; + /** + * The instance of model name + */ + instanceOf?: string; } /** @@ -149,7 +179,7 @@ export interface JSONEntity { */ entity: string; /** - * The role of the entity within the utterance. + * The role the entity plays in the utterance. */ role?: string; } @@ -282,24 +312,6 @@ export interface JSONRegexFeature { name?: string; } -/** - * Object model for updating an existing Pattern feature. - */ -export interface PatternUpdateObject { - /** - * The Regular Expression to match. - */ - pattern?: string; - /** - * Name of the feature. - */ - name?: string; - /** - * Indicates if the Pattern feature is enabled. Default value: true. - */ - isActive?: boolean; -} - /** * Exported Model - A list entity. */ @@ -376,20 +388,6 @@ export interface ModelCreateObject { name?: string; } -/** - * Object model for creating a Pattern feature. - */ -export interface PatternCreateObject { - /** - * The Regular Expression to match. - */ - pattern?: string; - /** - * Name of the feature. - */ - name?: string; -} - /** * Object model for updating one of the list entity's sublists. */ @@ -552,6 +550,10 @@ export interface PhraselistUpdateObject { * true. Default value: true. */ isExchangeable?: boolean; + /** + * Indicates if the Phraselist is enabled for all models in the application. Default value: true. + */ + enabledForAllModels?: boolean; } /** @@ -714,11 +716,11 @@ export interface EntityLabel { */ endTokenIndex: number; /** - * The role of the entity within the utterance. + * The role of the predicted entity. */ role?: string; /** - * The role Id. + * The role id for the predicted entity. */ roleId?: string; } @@ -863,10 +865,10 @@ export interface ModelInfo { */ typeId?: number; /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType; } @@ -897,6 +899,25 @@ export interface ChildEntity { * The name of a child entity. */ name?: string; + /** + * Instance of Model. + */ + instanceOf?: string; + /** + * The type ID of the Entity Model. + */ + typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' + */ + readableType?: ReadableType1; + /** + * List of children + */ + children?: ChildEntity[]; } /** @@ -930,12 +951,12 @@ export interface ModelInfoResponse { */ typeId?: number; /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ - readableType: ReadableType1; + readableType: ReadableType2; roles?: EntityRole[]; /** * List of child entities. @@ -984,12 +1005,12 @@ export interface HierarchicalEntityExtractor { */ typeId?: number; /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ - readableType: ReadableType2; + readableType: ReadableType3; roles?: EntityRole[]; /** * List of child entities. @@ -1014,12 +1035,12 @@ export interface CompositeEntityExtractor { */ typeId?: number; /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ - readableType: ReadableType3; + readableType: ReadableType4; roles?: EntityRole[]; /** * List of child entities. @@ -1044,12 +1065,12 @@ export interface ClosedListEntityExtractor { */ typeId?: number; /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ - readableType: ReadableType4; + readableType: ReadableType5; roles?: EntityRole[]; /** * List of sublists. @@ -1074,12 +1095,12 @@ export interface PrebuiltEntityExtractor { */ typeId?: number; /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ - readableType: ReadableType5; + readableType: ReadableType6; roles?: EntityRole[]; } @@ -1087,17 +1108,6 @@ export interface PrebuiltEntityExtractor { * A Hierarchical Child Entity. */ export interface HierarchicalChildEntity extends ChildEntity { - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' - */ - readableType?: ReadableType6; } /** @@ -1117,10 +1127,10 @@ export interface CustomPrebuiltModel { */ typeId?: number; /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType7; /** @@ -1165,10 +1175,10 @@ export interface EntityExtractor { */ typeId?: number; /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType8; roles?: EntityRole[]; @@ -1182,6 +1192,41 @@ export interface EntityExtractor { customPrebuiltModelName?: string; } +/** + * N-Depth Entity Extractor. + */ +export interface NDepthEntityExtractor { + /** + * The ID of the Entity Model. + */ + id: string; + /** + * Name of the Entity Model. + */ + name?: string; + /** + * The type ID of the Entity Model. + */ + typeId?: number; + /** + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' + */ + readableType: ReadableType9; + roles?: EntityRole[]; + /** + * The domain name. + */ + customPrebuiltDomainName?: string; + /** + * The intent name or entity name. + */ + customPrebuiltModelName?: string; + children?: ChildEntity[]; +} + /** * The base class Features-related response objects inherit from. */ @@ -1198,6 +1243,10 @@ export interface FeatureInfoObject { * Indicates if the feature is enabled. */ isActive?: boolean; + /** + * Indicates if the feature is enabled for all models in the application. + */ + enabledForAllModels?: boolean; } /** @@ -1708,12 +1757,12 @@ export interface RegexEntityExtractor { */ typeId?: number; /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ - readableType: ReadableType9; + readableType: ReadableType10; roles?: EntityRole[]; /** * The Regular Expression entity pattern. @@ -1738,12 +1787,12 @@ export interface PatternAnyEntityExtractor { */ typeId?: number; /** - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt - * Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity - * Extractor', 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ - readableType: ReadableType10; + readableType: ReadableType11; roles?: EntityRole[]; explicitList?: ExplicitListItem[]; } @@ -1780,6 +1829,20 @@ export interface LabelTextObject { text?: string; } +/** + * An object containing the model feature information either the model name or feature name. + */ +export interface ModelFeatureInformation { + /** + * The name of the model used. + */ + modelName?: string; + /** + * The name of the feature used. + */ + featureName?: string; +} + /** * Object model of an application version setting. */ @@ -1819,13 +1882,6 @@ export interface HierarchicalChildModelUpdateObject { name?: string; } -/** - * An interface representing HierarchicalChildModelCreateObject. - */ -export interface HierarchicalChildModelCreateObject { - name?: string; -} - /** * An interface representing CompositeChildModelCreateObject. */ @@ -1833,20 +1889,6 @@ export interface CompositeChildModelCreateObject { name?: string; } -/** - * Optional Parameters. - */ -export interface FeaturesListApplicationVersionPatternFeaturesOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - /** * Optional Parameters. */ @@ -2197,102 +2239,113 @@ export type OperationStatusType = 'Failed' | 'FAILED' | 'Success'; /** * Defines values for ReadableType. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; +export type ReadableType = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** * Defines values for ReadableType1. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType1 = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; +export type ReadableType1 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** * Defines values for ReadableType2. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType2 = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; +export type ReadableType2 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** * Defines values for ReadableType3. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType3 = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; +export type ReadableType3 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** * Defines values for ReadableType4. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType4 = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; +export type ReadableType4 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** * Defines values for ReadableType5. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType5 = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; +export type ReadableType5 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** * Defines values for ReadableType6. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType6 = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; +export type ReadableType6 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** * Defines values for ReadableType7. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType7 = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; +export type ReadableType7 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** * Defines values for ReadableType8. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType8 = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; +export type ReadableType8 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; + +/** + * Defines values for ReadableType9. + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' + * @readonly + * @enum {string} + */ +export type ReadableType9 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** * Defines values for Status. @@ -2311,46 +2364,26 @@ export type Status = 'Queued' | 'InProgress' | 'UpToDate' | 'Fail' | 'Success'; export type Status1 = 'Queued' | 'InProgress' | 'UpToDate' | 'Fail' | 'Success'; /** - * Defines values for ReadableType9. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Defines values for ReadableType10. + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType9 = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; +export type ReadableType10 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** - * Defines values for ReadableType10. - * Possible values include: 'Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical - * Child Entity Extractor', 'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity - * Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', - * 'Regex Entity Extractor' + * Defines values for ReadableType11. + * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity + * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity + * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + * 'Closed List Entity Extractor', 'Regex Entity Extractor' * @readonly * @enum {string} */ -export type ReadableType10 = 'Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Contains response data for the listApplicationVersionPatternFeatures operation. - */ -export type FeaturesListApplicationVersionPatternFeaturesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternFeatureInfo[]; - }; -}; +export type ReadableType11 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; /** * Contains response data for the addPhraseList operation. @@ -2365,16 +2398,16 @@ export type FeaturesAddPhraseListResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: number; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: number; + }; }; /** @@ -2385,16 +2418,16 @@ export type FeaturesListPhraseListsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PhraseListFeatureInfo[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PhraseListFeatureInfo[]; + }; }; /** @@ -2405,16 +2438,16 @@ export type FeaturesListResponse = FeaturesResponseObject & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: FeaturesResponseObject; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FeaturesResponseObject; + }; }; /** @@ -2425,16 +2458,16 @@ export type FeaturesGetPhraseListResponse = PhraseListFeatureInfo & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PhraseListFeatureInfo; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PhraseListFeatureInfo; + }; }; /** @@ -2445,16 +2478,16 @@ export type FeaturesUpdatePhraseListResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -2465,147 +2498,142 @@ export type FeaturesDeletePhraseListResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** - * Contains response data for the add operation. + * Contains response data for the addIntentFeature operation. */ -export type ExamplesAddResponse = LabelExampleResponse & { +export type FeaturesAddIntentFeatureResponse = OperationStatus & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: LabelExampleResponse; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** - * Contains response data for the batch operation. + * Contains response data for the addEntityFeature operation. */ -export type ExamplesBatchResponse = Array & { +export type FeaturesAddEntityFeatureResponse = OperationStatus & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BatchLabelExample[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** - * Contains response data for the list operation. + * Contains response data for the add operation. */ -export type ExamplesListResponse = Array & { +export type ExamplesAddResponse = LabelExampleResponse & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: LabeledUtterance[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LabelExampleResponse; + }; }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the batch operation. */ -export type ExamplesDeleteMethodResponse = OperationStatus & { +export type ExamplesBatchResponse = Array & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BatchLabelExample[]; + }; }; /** - * Contains response data for the addIntent operation. + * Contains response data for the list operation. */ -export type ModelAddIntentResponse = { - /** - * The parsed response body. - */ - body: string; - +export type ExamplesListResponse = Array & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LabeledUtterance[]; + }; }; /** - * Contains response data for the listIntents operation. + * Contains response data for the deleteMethod operation. */ -export type ModelListIntentsResponse = Array & { +export type ExamplesDeleteMethodResponse = OperationStatus & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: IntentClassifier[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** - * Contains response data for the addEntity operation. + * Contains response data for the addIntent operation. */ -export type ModelAddEntityResponse = { +export type ModelAddIntentResponse = { /** * The parsed response body. */ @@ -2615,42 +2643,42 @@ export type ModelAddEntityResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** - * Contains response data for the listEntities operation. + * Contains response data for the listIntents operation. */ -export type ModelListEntitiesResponse = Array & { +export type ModelListIntentsResponse = Array & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityExtractor[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: IntentClassifier[]; + }; }; /** - * Contains response data for the addHierarchicalEntity operation. + * Contains response data for the addEntity operation. */ -export type ModelAddHierarchicalEntityResponse = { +export type ModelAddEntityResponse = { /** * The parsed response body. */ @@ -2660,61 +2688,56 @@ export type ModelAddHierarchicalEntityResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** - * Contains response data for the listHierarchicalEntities operation. + * Contains response data for the listEntities operation. */ -export type ModelListHierarchicalEntitiesResponse = Array & { +export type ModelListEntitiesResponse = Array & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: HierarchicalEntityExtractor[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: NDepthEntityExtractor[]; + }; }; /** - * Contains response data for the addCompositeEntity operation. + * Contains response data for the listHierarchicalEntities operation. */ -export type ModelAddCompositeEntityResponse = { - /** - * The parsed response body. - */ - body: string; - +export type ModelListHierarchicalEntitiesResponse = Array & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: HierarchicalEntityExtractor[]; + }; }; /** @@ -2725,16 +2748,16 @@ export type ModelListCompositeEntitiesResponse = Array * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CompositeEntityExtractor[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: CompositeEntityExtractor[]; + }; }; /** @@ -2745,16 +2768,16 @@ export type ModelListClosedListsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ClosedListEntityExtractor[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClosedListEntityExtractor[]; + }; }; /** @@ -2770,16 +2793,16 @@ export type ModelAddClosedListResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -2790,16 +2813,16 @@ export type ModelAddPrebuiltResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrebuiltEntityExtractor[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrebuiltEntityExtractor[]; + }; }; /** @@ -2810,16 +2833,16 @@ export type ModelListPrebuiltsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrebuiltEntityExtractor[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrebuiltEntityExtractor[]; + }; }; /** @@ -2830,16 +2853,16 @@ export type ModelListPrebuiltEntitiesResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ModelInfoResponse[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ModelInfoResponse[]; + }; }; /** @@ -2870,16 +2893,16 @@ export type ModelExamplesMethodResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: LabelTextObject[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LabelTextObject[]; + }; }; /** @@ -2890,16 +2913,16 @@ export type ModelGetIntentResponse = IntentClassifier & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: IntentClassifier; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: IntentClassifier; + }; }; /** @@ -2910,16 +2933,16 @@ export type ModelUpdateIntentResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -2930,76 +2953,196 @@ export type ModelDeleteIntentResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** * Contains response data for the getEntity operation. */ -export type ModelGetEntityResponse = EntityExtractor & { +export type ModelGetEntityResponse = NDepthEntityExtractor & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityExtractor; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: NDepthEntityExtractor; + }; }; /** - * Contains response data for the updateEntity operation. + * Contains response data for the deleteEntity operation. */ -export type ModelUpdateEntityResponse = OperationStatus & { +export type ModelDeleteEntityResponse = OperationStatus & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** - * Contains response data for the deleteEntity operation. + * Contains response data for the updateEntityChild operation. */ -export type ModelDeleteEntityResponse = OperationStatus & { +export type ModelUpdateEntityChildResponse = OperationStatus & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; +}; + +/** + * Contains response data for the getIntentFeatures operation. + */ +export type ModelGetIntentFeaturesResponse = Array & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ModelFeatureInformation[]; + }; +}; + +/** + * Contains response data for the replaceIntentFeatures operation. + */ +export type ModelReplaceIntentFeaturesResponse = OperationStatus & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; +}; + +/** + * Contains response data for the deleteIntentFeature operation. + */ +export type ModelDeleteIntentFeatureResponse = OperationStatus & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; +}; + +/** + * Contains response data for the getEntityFeatures operation. + */ +export type ModelGetEntityFeaturesResponse = Array & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ModelFeatureInformation[]; + }; +}; + +/** + * Contains response data for the replaceEntityFeatures operation. + */ +export type ModelReplaceEntityFeaturesResponse = OperationStatus & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; +}; + +/** + * Contains response data for the deleteEntityFeature operation. + */ +export type ModelDeleteEntityFeatureResponse = OperationStatus & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3010,16 +3153,16 @@ export type ModelGetHierarchicalEntityResponse = HierarchicalEntityExtractor & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: HierarchicalEntityExtractor; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: HierarchicalEntityExtractor; + }; }; /** @@ -3030,16 +3173,16 @@ export type ModelUpdateHierarchicalEntityResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3050,16 +3193,16 @@ export type ModelDeleteHierarchicalEntityResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3070,16 +3213,16 @@ export type ModelGetCompositeEntityResponse = CompositeEntityExtractor & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CompositeEntityExtractor; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: CompositeEntityExtractor; + }; }; /** @@ -3090,16 +3233,16 @@ export type ModelUpdateCompositeEntityResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3110,16 +3253,16 @@ export type ModelDeleteCompositeEntityResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3130,16 +3273,16 @@ export type ModelGetClosedListResponse = ClosedListEntityExtractor & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ClosedListEntityExtractor; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClosedListEntityExtractor; + }; }; /** @@ -3150,16 +3293,16 @@ export type ModelUpdateClosedListResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3170,16 +3313,16 @@ export type ModelPatchClosedListResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3190,16 +3333,16 @@ export type ModelDeleteClosedListResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3210,16 +3353,16 @@ export type ModelGetPrebuiltResponse = PrebuiltEntityExtractor & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrebuiltEntityExtractor; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrebuiltEntityExtractor; + }; }; /** @@ -3230,16 +3373,16 @@ export type ModelDeletePrebuiltResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3250,16 +3393,16 @@ export type ModelDeleteSubListResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3270,16 +3413,16 @@ export type ModelUpdateSubListResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3290,16 +3433,16 @@ export type ModelListIntentSuggestionsResponse = Array * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: IntentsSuggestionExample[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: IntentsSuggestionExample[]; + }; }; /** @@ -3310,16 +3453,16 @@ export type ModelListEntitySuggestionsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string[]; + }; }; /** @@ -3380,16 +3523,16 @@ export type ModelAddCustomPrebuiltIntentResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -3400,16 +3543,16 @@ export type ModelListCustomPrebuiltIntentsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: IntentClassifier[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: IntentClassifier[]; + }; }; /** @@ -3425,16 +3568,16 @@ export type ModelAddCustomPrebuiltEntityResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -3445,16 +3588,16 @@ export type ModelListCustomPrebuiltEntitiesResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityExtractor[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityExtractor[]; + }; }; /** @@ -3465,16 +3608,16 @@ export type ModelListCustomPrebuiltModelsResponse = Array & * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CustomPrebuiltModel[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomPrebuiltModel[]; + }; }; /** @@ -3485,101 +3628,101 @@ export type ModelDeleteCustomPrebuiltDomainResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** - * Contains response data for the getHierarchicalEntityChild operation. + * Contains response data for the addEntityChild operation. */ -export type ModelGetHierarchicalEntityChildResponse = HierarchicalChildEntity & { +export type ModelAddEntityChildResponse = { + /** + * The parsed response body. + */ + body: string; + /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: HierarchicalChildEntity; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** - * Contains response data for the updateHierarchicalEntityChild operation. + * Contains response data for the getHierarchicalEntityChild operation. */ -export type ModelUpdateHierarchicalEntityChildResponse = OperationStatus & { +export type ModelGetHierarchicalEntityChildResponse = HierarchicalChildEntity & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: HierarchicalChildEntity; + }; }; /** - * Contains response data for the deleteHierarchicalEntityChild operation. + * Contains response data for the updateHierarchicalEntityChild operation. */ -export type ModelDeleteHierarchicalEntityChildResponse = OperationStatus & { +export type ModelUpdateHierarchicalEntityChildResponse = OperationStatus & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** - * Contains response data for the addHierarchicalEntityChild operation. + * Contains response data for the deleteHierarchicalEntityChild operation. */ -export type ModelAddHierarchicalEntityChildResponse = { - /** - * The parsed response body. - */ - body: string; - +export type ModelDeleteHierarchicalEntityChildResponse = OperationStatus & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3595,16 +3738,16 @@ export type ModelAddCompositeEntityChildResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -3615,16 +3758,16 @@ export type ModelDeleteCompositeEntityChildResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -3635,16 +3778,16 @@ export type ModelListRegexEntityInfosResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RegexEntityExtractor[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegexEntityExtractor[]; + }; }; /** @@ -3660,16 +3803,16 @@ export type ModelCreateRegexEntityModelResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -3680,16 +3823,16 @@ export type ModelListPatternAnyEntityInfosResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole[]; + }; }; /** @@ -3750,16 +3893,16 @@ export type ModelCreateEntityRoleResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -3770,16 +3913,16 @@ export type ModelListPrebuiltEntityRolesResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole[]; + }; }; /** @@ -3795,16 +3938,16 @@ export type ModelCreatePrebuiltEntityRoleResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -3815,16 +3958,16 @@ export type ModelListClosedListEntityRolesResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole[]; + }; }; /** @@ -3840,16 +3983,16 @@ export type ModelCreateClosedListEntityRoleResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -3860,16 +4003,16 @@ export type ModelListRegexEntityRolesResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole[]; + }; }; /** @@ -3885,16 +4028,16 @@ export type ModelCreateRegexEntityRoleResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -3905,16 +4048,16 @@ export type ModelListCompositeEntityRolesResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole[]; + }; }; /** @@ -3930,16 +4073,16 @@ export type ModelCreateCompositeEntityRoleResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -3950,16 +4093,16 @@ export type ModelListPatternAnyEntityRolesResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole[]; + }; }; /** @@ -3975,16 +4118,16 @@ export type ModelCreatePatternAnyEntityRoleResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -3995,16 +4138,16 @@ export type ModelListHierarchicalEntityRolesResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole[]; + }; }; /** @@ -4020,16 +4163,16 @@ export type ModelCreateHierarchicalEntityRoleResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -4040,16 +4183,16 @@ export type ModelListCustomPrebuiltEntityRolesResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole[]; + }; }; /** @@ -4065,16 +4208,16 @@ export type ModelCreateCustomPrebuiltEntityRoleResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -4085,16 +4228,16 @@ export type ModelGetExplicitListResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ExplicitListItem[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExplicitListItem[]; + }; }; /** @@ -4110,16 +4253,16 @@ export type ModelAddExplicitListItemResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: number; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: number; + }; }; /** @@ -4130,16 +4273,16 @@ export type ModelGetRegexEntityEntityInfoResponse = RegexEntityExtractor & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RegexEntityExtractor; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RegexEntityExtractor; + }; }; /** @@ -4150,16 +4293,16 @@ export type ModelUpdateRegexEntityModelResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4170,16 +4313,16 @@ export type ModelDeleteRegexEntityModelResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4190,16 +4333,16 @@ export type ModelGetPatternAnyEntityInfoResponse = PatternAnyEntityExtractor & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternAnyEntityExtractor; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PatternAnyEntityExtractor; + }; }; /** @@ -4210,16 +4353,16 @@ export type ModelUpdatePatternAnyEntityModelResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4230,16 +4373,16 @@ export type ModelDeletePatternAnyEntityModelResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4250,16 +4393,16 @@ export type ModelGetEntityRoleResponse = EntityRole & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole; + }; }; /** @@ -4270,16 +4413,16 @@ export type ModelUpdateEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4290,16 +4433,16 @@ export type ModelDeleteEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4310,16 +4453,16 @@ export type ModelGetPrebuiltEntityRoleResponse = EntityRole & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole; + }; }; /** @@ -4330,16 +4473,16 @@ export type ModelUpdatePrebuiltEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4350,16 +4493,16 @@ export type ModelDeletePrebuiltEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4370,16 +4513,16 @@ export type ModelGetClosedListEntityRoleResponse = EntityRole & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole; + }; }; /** @@ -4390,16 +4533,16 @@ export type ModelUpdateClosedListEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4410,16 +4553,16 @@ export type ModelDeleteClosedListEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4430,16 +4573,16 @@ export type ModelGetRegexEntityRoleResponse = EntityRole & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole; + }; }; /** @@ -4450,16 +4593,16 @@ export type ModelUpdateRegexEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4470,16 +4613,16 @@ export type ModelDeleteRegexEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4490,16 +4633,16 @@ export type ModelGetCompositeEntityRoleResponse = EntityRole & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole; + }; }; /** @@ -4510,16 +4653,16 @@ export type ModelUpdateCompositeEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4530,16 +4673,16 @@ export type ModelDeleteCompositeEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4550,16 +4693,16 @@ export type ModelGetPatternAnyEntityRoleResponse = EntityRole & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole; + }; }; /** @@ -4570,16 +4713,16 @@ export type ModelUpdatePatternAnyEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4590,16 +4733,16 @@ export type ModelDeletePatternAnyEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4610,16 +4753,16 @@ export type ModelGetHierarchicalEntityRoleResponse = EntityRole & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole; + }; }; /** @@ -4630,16 +4773,16 @@ export type ModelUpdateHierarchicalEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4650,16 +4793,16 @@ export type ModelDeleteHierarchicalEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4670,16 +4813,16 @@ export type ModelGetCustomEntityRoleResponse = EntityRole & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityRole; + }; }; /** @@ -4690,16 +4833,16 @@ export type ModelUpdateCustomPrebuiltEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4710,16 +4853,16 @@ export type ModelDeleteCustomEntityRoleResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4730,16 +4873,16 @@ export type ModelGetExplicitListItemResponse = ExplicitListItem & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ExplicitListItem; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExplicitListItem; + }; }; /** @@ -4750,16 +4893,16 @@ export type ModelUpdateExplicitListItemResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4770,16 +4913,16 @@ export type ModelDeleteExplicitListItemResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -4795,16 +4938,16 @@ export type AppsAddResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -4815,16 +4958,16 @@ export type AppsListResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInfoResponse[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInfoResponse[]; + }; }; /** @@ -4840,16 +4983,16 @@ export type AppsImportMethodResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -4860,16 +5003,16 @@ export type AppsListCortanaEndpointsResponse = PersonalAssistantsResponse & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PersonalAssistantsResponse; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PersonalAssistantsResponse; + }; }; /** @@ -4880,16 +5023,16 @@ export type AppsListDomainsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string[]; + }; }; /** @@ -4900,16 +5043,16 @@ export type AppsListUsageScenariosResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string[]; + }; }; /** @@ -4920,16 +5063,16 @@ export type AppsListSupportedCulturesResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailableCulture[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AvailableCulture[]; + }; }; /** @@ -4966,16 +5109,16 @@ export type AppsGetResponse = ApplicationInfoResponse & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInfoResponse; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInfoResponse; + }; }; /** @@ -4986,16 +5129,16 @@ export type AppsUpdateResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5006,16 +5149,16 @@ export type AppsDeleteMethodResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5026,16 +5169,16 @@ export type AppsPublishResponse = ProductionOrStagingEndpointInfo & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProductionOrStagingEndpointInfo; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductionOrStagingEndpointInfo; + }; }; /** @@ -5046,16 +5189,16 @@ export type AppsGetSettingsResponse = ApplicationSettings & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationSettings; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationSettings; + }; }; /** @@ -5066,16 +5209,16 @@ export type AppsUpdateSettingsResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5086,16 +5229,16 @@ export type AppsGetPublishSettingsResponse = PublishSettings & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PublishSettings; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PublishSettings; + }; }; /** @@ -5106,16 +5249,16 @@ export type AppsUpdatePublishSettingsResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5131,16 +5274,16 @@ export type AppsListEndpointsResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: { [propertyName: string]: string }; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: { [propertyName: string]: string }; + }; }; /** @@ -5151,16 +5294,16 @@ export type AppsListAvailableCustomPrebuiltDomainsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VersionInfo[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VersionInfo[]; + }; }; /** @@ -5313,16 +5456,16 @@ export type VersionsGetResponse = VersionInfo & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VersionInfo; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VersionInfo; + }; }; /** @@ -5333,16 +5476,16 @@ export type VersionsUpdateResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5353,16 +5496,16 @@ export type VersionsDeleteMethodResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5373,16 +5516,16 @@ export type VersionsExportMethodResponse = LuisApp & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: LuisApp; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LuisApp; + }; }; /** @@ -5398,16 +5541,16 @@ export type VersionsImportMethodResponse = { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: string; + }; }; /** @@ -5418,16 +5561,16 @@ export type VersionsDeleteUnlabelledUtteranceResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5438,16 +5581,16 @@ export type TrainTrainVersionResponse = EnqueueTrainingResponse & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnqueueTrainingResponse; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EnqueueTrainingResponse; + }; }; /** @@ -5458,16 +5601,16 @@ export type TrainGetStatusResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ModelTrainingInfo[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ModelTrainingInfo[]; + }; }; /** @@ -5478,16 +5621,16 @@ export type PermissionsListResponse = UserAccessList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UserAccessList; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: UserAccessList; + }; }; /** @@ -5498,16 +5641,16 @@ export type PermissionsAddResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5518,16 +5661,16 @@ export type PermissionsDeleteMethodResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5538,16 +5681,16 @@ export type PermissionsUpdateResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5558,16 +5701,16 @@ export type PatternAddPatternResponse = PatternRuleInfo & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PatternRuleInfo; + }; }; /** @@ -5578,16 +5721,16 @@ export type PatternListPatternsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PatternRuleInfo[]; + }; }; /** @@ -5598,16 +5741,16 @@ export type PatternUpdatePatternsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PatternRuleInfo[]; + }; }; /** @@ -5618,16 +5761,16 @@ export type PatternBatchAddPatternsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PatternRuleInfo[]; + }; }; /** @@ -5638,16 +5781,16 @@ export type PatternDeletePatternsResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5658,16 +5801,16 @@ export type PatternUpdatePatternResponse = PatternRuleInfo & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PatternRuleInfo; + }; }; /** @@ -5678,16 +5821,16 @@ export type PatternDeletePatternResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5698,16 +5841,16 @@ export type PatternListIntentPatternsResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PatternRuleInfo[]; + }; }; /** @@ -5718,16 +5861,16 @@ export type SettingsListResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AppVersionSettingObject[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AppVersionSettingObject[]; + }; }; /** @@ -5738,16 +5881,16 @@ export type SettingsUpdateResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5758,16 +5901,16 @@ export type AzureAccountsAssignToAppResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5778,16 +5921,16 @@ export type AzureAccountsGetAssignedResponse = Array & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AzureAccountInfoObject[]; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AzureAccountInfoObject[]; + }; }; /** @@ -5798,16 +5941,16 @@ export type AzureAccountsRemoveFromAppResponse = OperationStatus & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + /** + * The response body as text (string format) + */ + bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; }; /** @@ -5818,14 +5961,14 @@ export type AzureAccountsListUserLUISAccountsResponse = Array */ - add( - applicationCreateObject: Models.ApplicationCreateObject, - options?: msRest.RequestOptionsBase - ): Promise; + add(applicationCreateObject: Models.ApplicationCreateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param applicationCreateObject An application containing Name, Description (optional), Culture, * Usage Scenario (optional), Domain (optional) and initial version ID (optional) of the @@ -46,10 +43,7 @@ export class Apps { * after the app is created. * @param callback The callback */ - add( - applicationCreateObject: Models.ApplicationCreateObject, - callback: msRest.ServiceCallback - ): void; + add(applicationCreateObject: Models.ApplicationCreateObject, callback: msRest.ServiceCallback): void; /** * @param applicationCreateObject An application containing Name, Description (optional), Culture, * Usage Scenario (optional), Domain (optional) and initial version ID (optional) of the @@ -58,24 +52,15 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - add( - applicationCreateObject: Models.ApplicationCreateObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - add( - applicationCreateObject: Models.ApplicationCreateObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + add(applicationCreateObject: Models.ApplicationCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + add(applicationCreateObject: Models.ApplicationCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { applicationCreateObject, options }, addOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -92,23 +77,14 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - list( - options: Models.AppsListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - options?: - | Models.AppsListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(options: Models.AppsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.AppsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -117,10 +93,7 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - importMethod( - luisApp: Models.LuisApp, - options?: Models.AppsImportMethodOptionalParams - ): Promise; + importMethod(luisApp: Models.LuisApp, options?: Models.AppsImportMethodOptionalParams): Promise; /** * @param luisApp A LUIS application structure. * @param callback The callback @@ -131,24 +104,15 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - importMethod( - luisApp: Models.LuisApp, - options: Models.AppsImportMethodOptionalParams, - callback: msRest.ServiceCallback - ): void; - importMethod( - luisApp: Models.LuisApp, - options?: Models.AppsImportMethodOptionalParams | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + importMethod(luisApp: Models.LuisApp, options: Models.AppsImportMethodOptionalParams, callback: msRest.ServiceCallback): void; + importMethod(luisApp: Models.LuisApp, options?: Models.AppsImportMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { luisApp, options }, importMethodOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -156,9 +120,7 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - listCortanaEndpoints( - options?: msRest.RequestOptionsBase - ): Promise; + listCortanaEndpoints(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ @@ -167,21 +129,14 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - listCortanaEndpoints( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listCortanaEndpoints( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listCortanaEndpoints(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listCortanaEndpoints(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listCortanaEndpointsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -199,17 +154,13 @@ export class Apps { * @param callback The callback */ listDomains(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listDomains( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listDomains(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listDomainsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -217,9 +168,7 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - listUsageScenarios( - options?: msRest.RequestOptionsBase - ): Promise; + listUsageScenarios(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ @@ -228,21 +177,14 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - listUsageScenarios( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listUsageScenarios( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listUsageScenarios(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listUsageScenarios(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listUsageScenariosOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -251,9 +193,7 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - listSupportedCultures( - options?: msRest.RequestOptionsBase - ): Promise; + listSupportedCultures(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ @@ -262,21 +202,14 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - listSupportedCultures( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listSupportedCultures( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listSupportedCultures(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSupportedCultures(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listSupportedCulturesOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -285,10 +218,7 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - downloadQueryLogs( - appId: string, - options?: msRest.RequestOptionsBase - ): Promise; + downloadQueryLogs(appId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param callback The callback @@ -299,24 +229,15 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - downloadQueryLogs( - appId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - downloadQueryLogs( - appId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + downloadQueryLogs(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + downloadQueryLogs(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, options }, downloadQueryLogsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -336,24 +257,15 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - get( - appId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - appId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -363,39 +275,21 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - update( - appId: string, - applicationUpdateObject: Models.ApplicationUpdateObject, - options?: msRest.RequestOptionsBase - ): Promise; + update(appId: string, applicationUpdateObject: Models.ApplicationUpdateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param applicationUpdateObject A model containing Name and Description of the application. * @param callback The callback */ - update( - appId: string, - applicationUpdateObject: Models.ApplicationUpdateObject, - callback: msRest.ServiceCallback - ): void; + update(appId: string, applicationUpdateObject: Models.ApplicationUpdateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param applicationUpdateObject A model containing Name and Description of the application. * @param options The optional parameters * @param callback The callback */ - update( - appId: string, - applicationUpdateObject: Models.ApplicationUpdateObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - update( - appId: string, - applicationUpdateObject: Models.ApplicationUpdateObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + update(appId: string, applicationUpdateObject: Models.ApplicationUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(appId: string, applicationUpdateObject: Models.ApplicationUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -403,8 +297,7 @@ export class Apps { options }, updateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -413,10 +306,7 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - appId: string, - options?: Models.AppsDeleteMethodOptionalParams - ): Promise; + deleteMethod(appId: string, options?: Models.AppsDeleteMethodOptionalParams): Promise; /** * @param appId The application ID. * @param callback The callback @@ -427,26 +317,15 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - deleteMethod( - appId: string, - options: Models.AppsDeleteMethodOptionalParams, - callback: msRest.ServiceCallback - ): void; - deleteMethod( - appId: string, - options?: - | Models.AppsDeleteMethodOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteMethod(appId: string, options: Models.AppsDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; + deleteMethod(appId: string, options?: Models.AppsDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, options }, deleteMethodOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -457,22 +336,14 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - publish( - appId: string, - applicationPublishObject: Models.ApplicationPublishObject, - options?: msRest.RequestOptionsBase - ): Promise; + publish(appId: string, applicationPublishObject: Models.ApplicationPublishObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param applicationPublishObject The application publish object. The region is the target region * that the application is published to. * @param callback The callback */ - publish( - appId: string, - applicationPublishObject: Models.ApplicationPublishObject, - callback: msRest.ServiceCallback - ): void; + publish(appId: string, applicationPublishObject: Models.ApplicationPublishObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param applicationPublishObject The application publish object. The region is the target region @@ -480,20 +351,8 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - publish( - appId: string, - applicationPublishObject: Models.ApplicationPublishObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - publish( - appId: string, - applicationPublishObject: Models.ApplicationPublishObject, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + publish(appId: string, applicationPublishObject: Models.ApplicationPublishObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + publish(appId: string, applicationPublishObject: Models.ApplicationPublishObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -501,8 +360,7 @@ export class Apps { options }, publishOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -511,10 +369,7 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - getSettings( - appId: string, - options?: msRest.RequestOptionsBase - ): Promise; + getSettings(appId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param callback The callback @@ -525,24 +380,15 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - getSettings( - appId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getSettings( - appId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getSettings(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getSettings(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, options }, getSettingsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -552,39 +398,21 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - updateSettings( - appId: string, - applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, - options?: msRest.RequestOptionsBase - ): Promise; + updateSettings(appId: string, applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param applicationSettingUpdateObject An object containing the new application settings. * @param callback The callback */ - updateSettings( - appId: string, - applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, - callback: msRest.ServiceCallback - ): void; + updateSettings(appId: string, applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param applicationSettingUpdateObject An object containing the new application settings. * @param options The optional parameters * @param callback The callback */ - updateSettings( - appId: string, - applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - updateSettings( - appId: string, - applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + updateSettings(appId: string, applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateSettings(appId: string, applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -592,8 +420,7 @@ export class Apps { options }, updateSettingsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -602,10 +429,7 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - getPublishSettings( - appId: string, - options?: msRest.RequestOptionsBase - ): Promise; + getPublishSettings(appId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param callback The callback @@ -616,24 +440,15 @@ export class Apps { * @param options The optional parameters * @param callback The callback */ - getPublishSettings( - appId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getPublishSettings( - appId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getPublishSettings(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPublishSettings(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, options }, getPublishSettingsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -643,39 +458,21 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - updatePublishSettings( - appId: string, - publishSettingUpdateObject: Models.PublishSettingUpdateObject, - options?: msRest.RequestOptionsBase - ): Promise; + updatePublishSettings(appId: string, publishSettingUpdateObject: Models.PublishSettingUpdateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param publishSettingUpdateObject An object containing the new publish application settings. * @param callback The callback */ - updatePublishSettings( - appId: string, - publishSettingUpdateObject: Models.PublishSettingUpdateObject, - callback: msRest.ServiceCallback - ): void; + updatePublishSettings(appId: string, publishSettingUpdateObject: Models.PublishSettingUpdateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param publishSettingUpdateObject An object containing the new publish application settings. * @param options The optional parameters * @param callback The callback */ - updatePublishSettings( - appId: string, - publishSettingUpdateObject: Models.PublishSettingUpdateObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - updatePublishSettings( - appId: string, - publishSettingUpdateObject: Models.PublishSettingUpdateObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + updatePublishSettings(appId: string, publishSettingUpdateObject: Models.PublishSettingUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updatePublishSettings(appId: string, publishSettingUpdateObject: Models.PublishSettingUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -683,8 +480,7 @@ export class Apps { options }, updatePublishSettingsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -693,43 +489,26 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - listEndpoints( - appId: string, - options?: msRest.RequestOptionsBase - ): Promise; + listEndpoints(appId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param callback The callback */ - listEndpoints( - appId: string, - callback: msRest.ServiceCallback<{ [propertyName: string]: string }> - ): void; + listEndpoints(appId: string, callback: msRest.ServiceCallback<{ [propertyName: string]: string }>): void; /** * @param appId The application ID. * @param options The optional parameters * @param callback The callback */ - listEndpoints( - appId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback<{ [propertyName: string]: string }> - ): void; - listEndpoints( - appId: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback<{ [propertyName: string]: string }>, - callback?: msRest.ServiceCallback<{ [propertyName: string]: string }> - ): Promise { + listEndpoints(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<{ [propertyName: string]: string }>): void; + listEndpoints(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<{ [propertyName: string]: string }>, callback?: msRest.ServiceCallback<{ [propertyName: string]: string }>): Promise { return this.client.sendOperationRequest( { appId, options }, listEndpointsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -737,34 +516,23 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - listAvailableCustomPrebuiltDomains( - options?: msRest.RequestOptionsBase - ): Promise; + listAvailableCustomPrebuiltDomains(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ - listAvailableCustomPrebuiltDomains( - callback: msRest.ServiceCallback - ): void; + listAvailableCustomPrebuiltDomains(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - listAvailableCustomPrebuiltDomains( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAvailableCustomPrebuiltDomains( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listAvailableCustomPrebuiltDomains(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAvailableCustomPrebuiltDomains(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listAvailableCustomPrebuiltDomainsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -774,43 +542,28 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - addCustomPrebuiltDomain( - prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, - options?: msRest.RequestOptionsBase - ): Promise; + addCustomPrebuiltDomain(prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param prebuiltDomainCreateObject A prebuilt domain create object containing the name and * culture of the domain. * @param callback The callback */ - addCustomPrebuiltDomain( - prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, - callback: msRest.ServiceCallback - ): void; + addCustomPrebuiltDomain(prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, callback: msRest.ServiceCallback): void; /** * @param prebuiltDomainCreateObject A prebuilt domain create object containing the name and * culture of the domain. * @param options The optional parameters * @param callback The callback */ - addCustomPrebuiltDomain( - prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - addCustomPrebuiltDomain( - prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + addCustomPrebuiltDomain(prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addCustomPrebuiltDomain(prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { prebuiltDomainCreateObject, options }, addCustomPrebuiltDomainOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -819,41 +572,26 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - listAvailableCustomPrebuiltDomainsForCulture( - culture: string, - options?: msRest.RequestOptionsBase - ): Promise; + listAvailableCustomPrebuiltDomainsForCulture(culture: string, options?: msRest.RequestOptionsBase): Promise; /** * @param culture Culture. * @param callback The callback */ - listAvailableCustomPrebuiltDomainsForCulture( - culture: string, - callback: msRest.ServiceCallback - ): void; + listAvailableCustomPrebuiltDomainsForCulture(culture: string, callback: msRest.ServiceCallback): void; /** * @param culture Culture. * @param options The optional parameters * @param callback The callback */ - listAvailableCustomPrebuiltDomainsForCulture( - culture: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAvailableCustomPrebuiltDomainsForCulture( - culture: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listAvailableCustomPrebuiltDomainsForCulture(culture: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAvailableCustomPrebuiltDomainsForCulture(culture: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { culture, options }, listAvailableCustomPrebuiltDomainsForCultureOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -864,39 +602,21 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - packagePublishedApplicationAsGzip( - appId: string, - slotName: string, - options?: msRest.RequestOptionsBase - ): Promise; + packagePublishedApplicationAsGzip(appId: string, slotName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param slotName The publishing slot name. * @param callback The callback */ - packagePublishedApplicationAsGzip( - appId: string, - slotName: string, - callback: msRest.ServiceCallback - ): void; + packagePublishedApplicationAsGzip(appId: string, slotName: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param slotName The publishing slot name. * @param options The optional parameters * @param callback The callback */ - packagePublishedApplicationAsGzip( - appId: string, - slotName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - packagePublishedApplicationAsGzip( - appId: string, - slotName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + packagePublishedApplicationAsGzip(appId: string, slotName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + packagePublishedApplicationAsGzip(appId: string, slotName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -904,8 +624,7 @@ export class Apps { options }, packagePublishedApplicationAsGzipOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -916,39 +635,21 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - packageTrainedApplicationAsGzip( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase - ): Promise; + packageTrainedApplicationAsGzip(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param callback The callback */ - packageTrainedApplicationAsGzip( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; + packageTrainedApplicationAsGzip(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - packageTrainedApplicationAsGzip( - appId: string, - versionId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - packageTrainedApplicationAsGzip( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + packageTrainedApplicationAsGzip(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + packageTrainedApplicationAsGzip(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -956,8 +657,7 @@ export class Apps { options }, packageTrainedApplicationAsGzipOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -966,7 +666,9 @@ const serializer = new msRest.Serializer(Mappers); const addOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/", - urlParameters: [Parameters.endpoint], + urlParameters: [ + Parameters.endpoint + ], requestBody: { parameterPath: "applicationCreateObject", mapper: { @@ -993,8 +695,13 @@ const addOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/", - urlParameters: [Parameters.endpoint], - queryParameters: [Parameters.skip, Parameters.take], + urlParameters: [ + Parameters.endpoint + ], + queryParameters: [ + Parameters.skip, + Parameters.take + ], responses: { 200: { bodyMapper: { @@ -1020,8 +727,12 @@ const listOperationSpec: msRest.OperationSpec = { const importMethodOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/import", - urlParameters: [Parameters.endpoint], - queryParameters: [Parameters.appName], + urlParameters: [ + Parameters.endpoint + ], + queryParameters: [ + Parameters.appName + ], requestBody: { parameterPath: "luisApp", mapper: { @@ -1048,7 +759,9 @@ const importMethodOperationSpec: msRest.OperationSpec = { const listCortanaEndpointsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/assistants", - urlParameters: [Parameters.endpoint], + urlParameters: [ + Parameters.endpoint + ], responses: { 200: { bodyMapper: Mappers.PersonalAssistantsResponse @@ -1063,7 +776,9 @@ const listCortanaEndpointsOperationSpec: msRest.OperationSpec = { const listDomainsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/domains", - urlParameters: [Parameters.endpoint], + urlParameters: [ + Parameters.endpoint + ], responses: { 200: { bodyMapper: { @@ -1088,7 +803,9 @@ const listDomainsOperationSpec: msRest.OperationSpec = { const listUsageScenariosOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/usagescenarios", - urlParameters: [Parameters.endpoint], + urlParameters: [ + Parameters.endpoint + ], responses: { 200: { bodyMapper: { @@ -1113,7 +830,9 @@ const listUsageScenariosOperationSpec: msRest.OperationSpec = { const listSupportedCulturesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/cultures", - urlParameters: [Parameters.endpoint], + urlParameters: [ + Parameters.endpoint + ], responses: { 200: { bodyMapper: { @@ -1139,7 +858,10 @@ const listSupportedCulturesOperationSpec: msRest.OperationSpec = { const downloadQueryLogsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/querylogs", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], responses: { 200: { bodyMapper: { @@ -1157,7 +879,10 @@ const downloadQueryLogsOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], responses: { 200: { bodyMapper: Mappers.ApplicationInfoResponse @@ -1172,7 +897,10 @@ const getOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "apps/{appId}", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], requestBody: { parameterPath: "applicationUpdateObject", mapper: { @@ -1194,8 +922,13 @@ const updateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "apps/{appId}", - urlParameters: [Parameters.endpoint, Parameters.appId], - queryParameters: [Parameters.force], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], + queryParameters: [ + Parameters.force + ], responses: { 200: { bodyMapper: Mappers.OperationStatus @@ -1210,7 +943,10 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const publishOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/publish", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], requestBody: { parameterPath: "applicationPublishObject", mapper: { @@ -1235,7 +971,10 @@ const publishOperationSpec: msRest.OperationSpec = { const getSettingsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/settings", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], responses: { 200: { bodyMapper: Mappers.ApplicationSettings @@ -1250,7 +989,10 @@ const getSettingsOperationSpec: msRest.OperationSpec = { const updateSettingsOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "apps/{appId}/settings", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], requestBody: { parameterPath: "applicationSettingUpdateObject", mapper: { @@ -1272,7 +1014,10 @@ const updateSettingsOperationSpec: msRest.OperationSpec = { const getPublishSettingsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/publishsettings", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], responses: { 200: { bodyMapper: Mappers.PublishSettings @@ -1287,7 +1032,10 @@ const getPublishSettingsOperationSpec: msRest.OperationSpec = { const updatePublishSettingsOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "apps/{appId}/publishsettings", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], requestBody: { parameterPath: "publishSettingUpdateObject", mapper: { @@ -1309,7 +1057,10 @@ const updatePublishSettingsOperationSpec: msRest.OperationSpec = { const listEndpointsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/endpoints", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], responses: { 200: { bodyMapper: { @@ -1334,7 +1085,9 @@ const listEndpointsOperationSpec: msRest.OperationSpec = { const listAvailableCustomPrebuiltDomainsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/customprebuiltdomains", - urlParameters: [Parameters.endpoint], + urlParameters: [ + Parameters.endpoint + ], responses: { 200: { bodyMapper: { @@ -1360,7 +1113,9 @@ const listAvailableCustomPrebuiltDomainsOperationSpec: msRest.OperationSpec = { const addCustomPrebuiltDomainOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/customprebuiltdomains", - urlParameters: [Parameters.endpoint], + urlParameters: [ + Parameters.endpoint + ], requestBody: { parameterPath: "prebuiltDomainCreateObject", mapper: { @@ -1387,7 +1142,10 @@ const addCustomPrebuiltDomainOperationSpec: msRest.OperationSpec = { const listAvailableCustomPrebuiltDomainsForCultureOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/customprebuiltdomains/{culture}", - urlParameters: [Parameters.endpoint, Parameters.culture], + urlParameters: [ + Parameters.endpoint, + Parameters.culture + ], responses: { 200: { bodyMapper: { @@ -1413,7 +1171,11 @@ const listAvailableCustomPrebuiltDomainsForCultureOperationSpec: msRest.Operatio const packagePublishedApplicationAsGzipOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "package/{appId}/slot/{slotName}/gzip", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.slotName], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.slotName + ], responses: { 200: { bodyMapper: { @@ -1433,7 +1195,11 @@ const packagePublishedApplicationAsGzipOperationSpec: msRest.OperationSpec = { const packageTrainedApplicationAsGzipOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "package/{appId}/versions/{versionId}/gzip", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], responses: { 200: { bodyMapper: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts index d3318ac5c7d3..e1cfd31a3720 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts @@ -33,10 +33,7 @@ export class AzureAccounts { * @param [options] The optional parameters * @returns Promise */ - assignToApp( - appId: string, - options?: Models.AzureAccountsAssignToAppOptionalParams - ): Promise; + assignToApp(appId: string, options?: Models.AzureAccountsAssignToAppOptionalParams): Promise; /** * @param appId The application ID. * @param callback The callback @@ -47,26 +44,15 @@ export class AzureAccounts { * @param options The optional parameters * @param callback The callback */ - assignToApp( - appId: string, - options: Models.AzureAccountsAssignToAppOptionalParams, - callback: msRest.ServiceCallback - ): void; - assignToApp( - appId: string, - options?: - | Models.AzureAccountsAssignToAppOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + assignToApp(appId: string, options: Models.AzureAccountsAssignToAppOptionalParams, callback: msRest.ServiceCallback): void; + assignToApp(appId: string, options?: Models.AzureAccountsAssignToAppOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, options }, assignToAppOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -76,41 +62,26 @@ export class AzureAccounts { * @param [options] The optional parameters * @returns Promise */ - getAssigned( - appId: string, - options?: msRest.RequestOptionsBase - ): Promise; + getAssigned(appId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param callback The callback */ - getAssigned( - appId: string, - callback: msRest.ServiceCallback - ): void; + getAssigned(appId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param options The optional parameters * @param callback The callback */ - getAssigned( - appId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getAssigned( - appId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getAssigned(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getAssigned(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, options }, getAssignedOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -120,10 +91,7 @@ export class AzureAccounts { * @param [options] The optional parameters * @returns Promise */ - removeFromApp( - appId: string, - options?: Models.AzureAccountsRemoveFromAppOptionalParams - ): Promise; + removeFromApp(appId: string, options?: Models.AzureAccountsRemoveFromAppOptionalParams): Promise; /** * @param appId The application ID. * @param callback The callback @@ -134,26 +102,15 @@ export class AzureAccounts { * @param options The optional parameters * @param callback The callback */ - removeFromApp( - appId: string, - options: Models.AzureAccountsRemoveFromAppOptionalParams, - callback: msRest.ServiceCallback - ): void; - removeFromApp( - appId: string, - options?: - | Models.AzureAccountsRemoveFromAppOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + removeFromApp(appId: string, options: Models.AzureAccountsRemoveFromAppOptionalParams, callback: msRest.ServiceCallback): void; + removeFromApp(appId: string, options?: Models.AzureAccountsRemoveFromAppOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, options }, removeFromAppOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -162,9 +119,7 @@ export class AzureAccounts { * @param [options] The optional parameters * @returns Promise */ - listUserLUISAccounts( - options?: msRest.RequestOptionsBase - ): Promise; + listUserLUISAccounts(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ @@ -173,21 +128,14 @@ export class AzureAccounts { * @param options The optional parameters * @param callback The callback */ - listUserLUISAccounts( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listUserLUISAccounts( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listUserLUISAccounts(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listUserLUISAccounts(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listUserLUISAccountsOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -196,9 +144,15 @@ const serializer = new msRest.Serializer(Mappers); const assignToAppOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/azureaccounts", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], requestBody: { - parameterPath: ["options", "azureAccountInfoObject"], + parameterPath: [ + "options", + "azureAccountInfoObject" + ], mapper: Mappers.AzureAccountInfoObject }, responses: { @@ -215,7 +169,10 @@ const assignToAppOperationSpec: msRest.OperationSpec = { const getAssignedOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/azureaccounts", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], responses: { 200: { bodyMapper: { @@ -241,9 +198,15 @@ const getAssignedOperationSpec: msRest.OperationSpec = { const removeFromAppOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "apps/{appId}/azureaccounts", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], requestBody: { - parameterPath: ["options", "azureAccountInfoObject"], + parameterPath: [ + "options", + "azureAccountInfoObject" + ], mapper: Mappers.AzureAccountInfoObject }, responses: { @@ -260,7 +223,9 @@ const removeFromAppOperationSpec: msRest.OperationSpec = { const listUserLUISAccountsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "azureaccounts", - urlParameters: [Parameters.endpoint], + urlParameters: [ + Parameters.endpoint + ], responses: { 200: { bodyMapper: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts index fded2675c6c6..4e2903a5248a 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts @@ -34,24 +34,14 @@ export class Examples { * @param [options] The optional parameters * @returns Promise */ - add( - appId: string, - versionId: string, - exampleLabelObject: Models.ExampleLabelObject, - options?: msRest.RequestOptionsBase - ): Promise; + add(appId: string, versionId: string, exampleLabelObject: Models.ExampleLabelObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param exampleLabelObject A labeled example utterance with the expected intent and entities. * @param callback The callback */ - add( - appId: string, - versionId: string, - exampleLabelObject: Models.ExampleLabelObject, - callback: msRest.ServiceCallback - ): void; + add(appId: string, versionId: string, exampleLabelObject: Models.ExampleLabelObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -59,20 +49,8 @@ export class Examples { * @param options The optional parameters * @param callback The callback */ - add( - appId: string, - versionId: string, - exampleLabelObject: Models.ExampleLabelObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - add( - appId: string, - versionId: string, - exampleLabelObject: Models.ExampleLabelObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + add(appId: string, versionId: string, exampleLabelObject: Models.ExampleLabelObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + add(appId: string, versionId: string, exampleLabelObject: Models.ExampleLabelObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -81,8 +59,7 @@ export class Examples { options }, addOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -93,24 +70,14 @@ export class Examples { * @param [options] The optional parameters * @returns Promise */ - batch( - appId: string, - versionId: string, - exampleLabelObjectArray: Models.ExampleLabelObject[], - options?: msRest.RequestOptionsBase - ): Promise; + batch(appId: string, versionId: string, exampleLabelObjectArray: Models.ExampleLabelObject[], options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param exampleLabelObjectArray Array of example utterances. * @param callback The callback */ - batch( - appId: string, - versionId: string, - exampleLabelObjectArray: Models.ExampleLabelObject[], - callback: msRest.ServiceCallback - ): void; + batch(appId: string, versionId: string, exampleLabelObjectArray: Models.ExampleLabelObject[], callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -118,20 +85,8 @@ export class Examples { * @param options The optional parameters * @param callback The callback */ - batch( - appId: string, - versionId: string, - exampleLabelObjectArray: Models.ExampleLabelObject[], - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - batch( - appId: string, - versionId: string, - exampleLabelObjectArray: Models.ExampleLabelObject[], - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + batch(appId: string, versionId: string, exampleLabelObjectArray: Models.ExampleLabelObject[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + batch(appId: string, versionId: string, exampleLabelObjectArray: Models.ExampleLabelObject[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -140,8 +95,7 @@ export class Examples { options }, batchOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -151,39 +105,21 @@ export class Examples { * @param [options] The optional parameters * @returns Promise */ - list( - appId: string, - versionId: string, - options?: Models.ExamplesListOptionalParams - ): Promise; + list(appId: string, versionId: string, options?: Models.ExamplesListOptionalParams): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param callback The callback */ - list( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; + list(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - list( - appId: string, - versionId: string, - options: Models.ExamplesListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - appId: string, - versionId: string, - options?: Models.ExamplesListOptionalParams | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(appId: string, versionId: string, options: Models.ExamplesListOptionalParams, callback: msRest.ServiceCallback): void; + list(appId: string, versionId: string, options?: Models.ExamplesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -191,8 +127,7 @@ export class Examples { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -203,24 +138,14 @@ export class Examples { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - appId: string, - versionId: string, - exampleId: number, - options?: msRest.RequestOptionsBase - ): Promise; + deleteMethod(appId: string, versionId: string, exampleId: number, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param exampleId The example ID. * @param callback The callback */ - deleteMethod( - appId: string, - versionId: string, - exampleId: number, - callback: msRest.ServiceCallback - ): void; + deleteMethod(appId: string, versionId: string, exampleId: number, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -228,20 +153,8 @@ export class Examples { * @param options The optional parameters * @param callback The callback */ - deleteMethod( - appId: string, - versionId: string, - exampleId: number, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteMethod( - appId: string, - versionId: string, - exampleId: number, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteMethod(appId: string, versionId: string, exampleId: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(appId: string, versionId: string, exampleId: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -250,8 +163,7 @@ export class Examples { options }, deleteMethodOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -260,7 +172,11 @@ const serializer = new msRest.Serializer(Mappers); const addOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/versions/{versionId}/example", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "exampleLabelObject", mapper: { @@ -282,7 +198,11 @@ const addOperationSpec: msRest.OperationSpec = { const batchOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/versions/{versionId}/examples", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "exampleLabelObjectArray", mapper: { @@ -338,8 +258,15 @@ const batchOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/examples", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], - queryParameters: [Parameters.skip, Parameters.take], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], + queryParameters: [ + Parameters.skip, + Parameters.take + ], responses: { 200: { bodyMapper: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts index 12ca06d4a2d9..3af65368a0fa 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts @@ -26,62 +26,6 @@ export class Features { this.client = client; } - /** - * [DEPRECATED NOTICE: This operation will soon be removed] Gets all the pattern features. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @deprecated This operation is deprecated. Please do not use it any longer. - * @returns Promise - */ - listApplicationVersionPatternFeatures( - appId: string, - versionId: string, - options?: Models.FeaturesListApplicationVersionPatternFeaturesOptionalParams - ): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - * @deprecated This operation is deprecated. Please do not use it any longer. - */ - listApplicationVersionPatternFeatures( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - * @deprecated This operation is deprecated. Please do not use it any longer. - */ - listApplicationVersionPatternFeatures( - appId: string, - versionId: string, - options: Models.FeaturesListApplicationVersionPatternFeaturesOptionalParams, - callback: msRest.ServiceCallback - ): void; - listApplicationVersionPatternFeatures( - appId: string, - versionId: string, - options?: - | Models.FeaturesListApplicationVersionPatternFeaturesOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listApplicationVersionPatternFeaturesOperationSpec, - callback - ) as Promise; - } - /** * Creates a new phraselist feature in a version of the application. * @param appId The application ID. @@ -91,12 +35,7 @@ export class Features { * @param [options] The optional parameters * @returns Promise */ - addPhraseList( - appId: string, - versionId: string, - phraselistCreateObject: Models.PhraselistCreateObject, - options?: msRest.RequestOptionsBase - ): Promise; + addPhraseList(appId: string, versionId: string, phraselistCreateObject: Models.PhraselistCreateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. @@ -104,12 +43,7 @@ export class Features { * the isExchangeable boolean. Default value for isExchangeable is true. * @param callback The callback */ - addPhraseList( - appId: string, - versionId: string, - phraselistCreateObject: Models.PhraselistCreateObject, - callback: msRest.ServiceCallback - ): void; + addPhraseList(appId: string, versionId: string, phraselistCreateObject: Models.PhraselistCreateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -118,20 +52,8 @@ export class Features { * @param options The optional parameters * @param callback The callback */ - addPhraseList( - appId: string, - versionId: string, - phraselistCreateObject: Models.PhraselistCreateObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - addPhraseList( - appId: string, - versionId: string, - phraselistCreateObject: Models.PhraselistCreateObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + addPhraseList(appId: string, versionId: string, phraselistCreateObject: Models.PhraselistCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addPhraseList(appId: string, versionId: string, phraselistCreateObject: Models.PhraselistCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -140,8 +62,7 @@ export class Features { options }, addPhraseListOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -151,41 +72,21 @@ export class Features { * @param [options] The optional parameters * @returns Promise */ - listPhraseLists( - appId: string, - versionId: string, - options?: Models.FeaturesListPhraseListsOptionalParams - ): Promise; + listPhraseLists(appId: string, versionId: string, options?: Models.FeaturesListPhraseListsOptionalParams): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param callback The callback */ - listPhraseLists( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; + listPhraseLists(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - listPhraseLists( - appId: string, - versionId: string, - options: Models.FeaturesListPhraseListsOptionalParams, - callback: msRest.ServiceCallback - ): void; - listPhraseLists( - appId: string, - versionId: string, - options?: - | Models.FeaturesListPhraseListsOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listPhraseLists(appId: string, versionId: string, options: Models.FeaturesListPhraseListsOptionalParams, callback: msRest.ServiceCallback): void; + listPhraseLists(appId: string, versionId: string, options?: Models.FeaturesListPhraseListsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -193,8 +94,7 @@ export class Features { options }, listPhraseListsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -204,41 +104,21 @@ export class Features { * @param [options] The optional parameters * @returns Promise */ - list( - appId: string, - versionId: string, - options?: Models.FeaturesListOptionalParams - ): Promise; + list(appId: string, versionId: string, options?: Models.FeaturesListOptionalParams): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param callback The callback */ - list( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; + list(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - list( - appId: string, - versionId: string, - options: Models.FeaturesListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - appId: string, - versionId: string, - options?: - | Models.FeaturesListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(appId: string, versionId: string, options: Models.FeaturesListOptionalParams, callback: msRest.ServiceCallback): void; + list(appId: string, versionId: string, options?: Models.FeaturesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -246,8 +126,7 @@ export class Features { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -258,24 +137,14 @@ export class Features { * @param [options] The optional parameters * @returns Promise */ - getPhraseList( - appId: string, - versionId: string, - phraselistId: number, - options?: msRest.RequestOptionsBase - ): Promise; + getPhraseList(appId: string, versionId: string, phraselistId: number, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param phraselistId The ID of the feature to be retrieved. * @param callback The callback */ - getPhraseList( - appId: string, - versionId: string, - phraselistId: number, - callback: msRest.ServiceCallback - ): void; + getPhraseList(appId: string, versionId: string, phraselistId: number, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -283,20 +152,8 @@ export class Features { * @param options The optional parameters * @param callback The callback */ - getPhraseList( - appId: string, - versionId: string, - phraselistId: number, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getPhraseList( - appId: string, - versionId: string, - phraselistId: number, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getPhraseList(appId: string, versionId: string, phraselistId: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPhraseList(appId: string, versionId: string, phraselistId: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -305,8 +162,7 @@ export class Features { options }, getPhraseListOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -318,24 +174,14 @@ export class Features { * @param [options] The optional parameters * @returns Promise */ - updatePhraseList( - appId: string, - versionId: string, - phraselistId: number, - options?: Models.FeaturesUpdatePhraseListOptionalParams - ): Promise; + updatePhraseList(appId: string, versionId: string, phraselistId: number, options?: Models.FeaturesUpdatePhraseListOptionalParams): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param phraselistId The ID of the feature to be updated. * @param callback The callback */ - updatePhraseList( - appId: string, - versionId: string, - phraselistId: number, - callback: msRest.ServiceCallback - ): void; + updatePhraseList(appId: string, versionId: string, phraselistId: number, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -343,22 +189,8 @@ export class Features { * @param options The optional parameters * @param callback The callback */ - updatePhraseList( - appId: string, - versionId: string, - phraselistId: number, - options: Models.FeaturesUpdatePhraseListOptionalParams, - callback: msRest.ServiceCallback - ): void; - updatePhraseList( - appId: string, - versionId: string, - phraselistId: number, - options?: - | Models.FeaturesUpdatePhraseListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + updatePhraseList(appId: string, versionId: string, phraselistId: number, options: Models.FeaturesUpdatePhraseListOptionalParams, callback: msRest.ServiceCallback): void; + updatePhraseList(appId: string, versionId: string, phraselistId: number, options?: Models.FeaturesUpdatePhraseListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -367,8 +199,7 @@ export class Features { options }, updatePhraseListOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -379,24 +210,14 @@ export class Features { * @param [options] The optional parameters * @returns Promise */ - deletePhraseList( - appId: string, - versionId: string, - phraselistId: number, - options?: msRest.RequestOptionsBase - ): Promise; + deletePhraseList(appId: string, versionId: string, phraselistId: number, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param phraselistId The ID of the feature to be deleted. * @param callback The callback */ - deletePhraseList( - appId: string, - versionId: string, - phraselistId: number, - callback: msRest.ServiceCallback - ): void; + deletePhraseList(appId: string, versionId: string, phraselistId: number, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -404,20 +225,8 @@ export class Features { * @param options The optional parameters * @param callback The callback */ - deletePhraseList( - appId: string, - versionId: string, - phraselistId: number, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deletePhraseList( - appId: string, - versionId: string, - phraselistId: number, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deletePhraseList(appId: string, versionId: string, phraselistId: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deletePhraseList(appId: string, versionId: string, phraselistId: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -426,44 +235,100 @@ export class Features { options }, deletePhraseListOperationSpec, - callback - ) as Promise; + callback) as Promise; + } + + /** + * Adds a new feature relation to be used by the intent in a version of the application. + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param featureRelationCreateObject A Feature relation information object. + * @param [options] The optional parameters + * @returns Promise + */ + addIntentFeature(appId: string, versionId: string, intentId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase): Promise; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param featureRelationCreateObject A Feature relation information object. + * @param callback The callback + */ + addIntentFeature(appId: string, versionId: string, intentId: string, featureRelationCreateObject: Models.ModelFeatureInformation, callback: msRest.ServiceCallback): void; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param featureRelationCreateObject A Feature relation information object. + * @param options The optional parameters + * @param callback The callback + */ + addIntentFeature(appId: string, versionId: string, intentId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addIntentFeature(appId: string, versionId: string, intentId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + appId, + versionId, + intentId, + featureRelationCreateObject, + options + }, + addIntentFeatureOperationSpec, + callback) as Promise; + } + + /** + * Adds a new feature relation to be used by the entity in a version of the application. + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor ID. + * @param featureRelationCreateObject A Feature relation information object. + * @param [options] The optional parameters + * @returns Promise + */ + addEntityFeature(appId: string, versionId: string, entityId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase): Promise; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor ID. + * @param featureRelationCreateObject A Feature relation information object. + * @param callback The callback + */ + addEntityFeature(appId: string, versionId: string, entityId: string, featureRelationCreateObject: Models.ModelFeatureInformation, callback: msRest.ServiceCallback): void; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor ID. + * @param featureRelationCreateObject A Feature relation information object. + * @param options The optional parameters + * @param callback The callback + */ + addEntityFeature(appId: string, versionId: string, entityId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addEntityFeature(appId: string, versionId: string, entityId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + appId, + versionId, + entityId, + featureRelationCreateObject, + options + }, + addEntityFeatureOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listApplicationVersionPatternFeaturesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/patterns", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], - queryParameters: [Parameters.skip, Parameters.take], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternFeatureInfo" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - const addPhraseListOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/versions/{versionId}/phraselists", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "phraselistCreateObject", mapper: { @@ -490,8 +355,15 @@ const addPhraseListOperationSpec: msRest.OperationSpec = { const listPhraseListsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/phraselists", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], - queryParameters: [Parameters.skip, Parameters.take], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], + queryParameters: [ + Parameters.skip, + Parameters.take + ], responses: { 200: { bodyMapper: { @@ -517,8 +389,15 @@ const listPhraseListsOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/features", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], - queryParameters: [Parameters.skip, Parameters.take], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], + queryParameters: [ + Parameters.skip, + Parameters.take + ], responses: { 200: { bodyMapper: Mappers.FeaturesResponseObject @@ -560,7 +439,10 @@ const updatePhraseListOperationSpec: msRest.OperationSpec = { Parameters.phraselistId ], requestBody: { - parameterPath: ["options", "phraselistUpdateObject"], + parameterPath: [ + "options", + "phraselistUpdateObject" + ], mapper: Mappers.PhraselistUpdateObject }, responses: { @@ -593,3 +475,57 @@ const deletePhraseListOperationSpec: msRest.OperationSpec = { }, serializer }; + +const addIntentFeatureOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "apps/{appId}/versions/{versionId}/intents/{intentId}/features", + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0, + Parameters.intentId + ], + requestBody: { + parameterPath: "featureRelationCreateObject", + mapper: { + ...Mappers.ModelFeatureInformation, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const addEntityFeatureOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "apps/{appId}/versions/{versionId}/entities/{entityId}/features", + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0, + Parameters.entityId + ], + requestBody: { + parameterPath: "featureRelationCreateObject", + mapper: { + ...Mappers.ModelFeatureInformation, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts index 58d0aa356fd8..3f8a3ece765b 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts @@ -95,35 +95,38 @@ export class Model { } /** - * Adds a simple entity extractor to a version of the application. + * Adds an entity extractor to a version of the application. * @param appId The application ID. * @param versionId The version ID. - * @param modelCreateObject A model object containing the name for the new simple entity extractor. + * @param entityModelCreateObject A model object containing the name of the new entity extractor + * and its children. * @param [options] The optional parameters * @returns Promise */ - addEntity(appId: string, versionId: string, modelCreateObject: Models.ModelCreateObject, options?: msRest.RequestOptionsBase): Promise; + addEntity(appId: string, versionId: string, entityModelCreateObject: Models.EntityModelCreateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. - * @param modelCreateObject A model object containing the name for the new simple entity extractor. + * @param entityModelCreateObject A model object containing the name of the new entity extractor + * and its children. * @param callback The callback */ - addEntity(appId: string, versionId: string, modelCreateObject: Models.ModelCreateObject, callback: msRest.ServiceCallback): void; + addEntity(appId: string, versionId: string, entityModelCreateObject: Models.EntityModelCreateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. - * @param modelCreateObject A model object containing the name for the new simple entity extractor. + * @param entityModelCreateObject A model object containing the name of the new entity extractor + * and its children. * @param options The optional parameters * @param callback The callback */ - addEntity(appId: string, versionId: string, modelCreateObject: Models.ModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addEntity(appId: string, versionId: string, modelCreateObject: Models.ModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + addEntity(appId: string, versionId: string, entityModelCreateObject: Models.EntityModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addEntity(appId: string, versionId: string, entityModelCreateObject: Models.EntityModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, versionId, - modelCreateObject, + entityModelCreateObject, options }, addEntityOperationSpec, @@ -143,15 +146,15 @@ export class Model { * @param versionId The version ID. * @param callback The callback */ - listEntities(appId: string, versionId: string, callback: msRest.ServiceCallback): void; + listEntities(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - listEntities(appId: string, versionId: string, options: Models.ModelListEntitiesOptionalParams, callback: msRest.ServiceCallback): void; - listEntities(appId: string, versionId: string, options?: Models.ModelListEntitiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listEntities(appId: string, versionId: string, options: Models.ModelListEntitiesOptionalParams, callback: msRest.ServiceCallback): void; + listEntities(appId: string, versionId: string, options?: Models.ModelListEntitiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -162,45 +165,6 @@ export class Model { callback) as Promise; } - /** - * Adds a hierarchical entity extractor to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hierarchicalModelCreateObject A model containing the name and children of the new entity - * extractor. - * @param [options] The optional parameters - * @returns Promise - */ - addHierarchicalEntity(appId: string, versionId: string, hierarchicalModelCreateObject: Models.HierarchicalEntityModel, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hierarchicalModelCreateObject A model containing the name and children of the new entity - * extractor. - * @param callback The callback - */ - addHierarchicalEntity(appId: string, versionId: string, hierarchicalModelCreateObject: Models.HierarchicalEntityModel, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hierarchicalModelCreateObject A model containing the name and children of the new entity - * extractor. - * @param options The optional parameters - * @param callback The callback - */ - addHierarchicalEntity(appId: string, versionId: string, hierarchicalModelCreateObject: Models.HierarchicalEntityModel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addHierarchicalEntity(appId: string, versionId: string, hierarchicalModelCreateObject: Models.HierarchicalEntityModel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hierarchicalModelCreateObject, - options - }, - addHierarchicalEntityOperationSpec, - callback) as Promise; - } - /** * Gets information about all the hierarchical entity models in a version of the application. * @param appId The application ID. @@ -233,45 +197,6 @@ export class Model { callback) as Promise; } - /** - * Adds a composite entity extractor to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param compositeModelCreateObject A model containing the name and children of the new entity - * extractor. - * @param [options] The optional parameters - * @returns Promise - */ - addCompositeEntity(appId: string, versionId: string, compositeModelCreateObject: Models.CompositeEntityModel, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param compositeModelCreateObject A model containing the name and children of the new entity - * extractor. - * @param callback The callback - */ - addCompositeEntity(appId: string, versionId: string, compositeModelCreateObject: Models.CompositeEntityModel, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param compositeModelCreateObject A model containing the name and children of the new entity - * extractor. - * @param options The optional parameters - * @param callback The callback - */ - addCompositeEntity(appId: string, versionId: string, compositeModelCreateObject: Models.CompositeEntityModel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addCompositeEntity(appId: string, versionId: string, compositeModelCreateObject: Models.CompositeEntityModel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - compositeModelCreateObject, - options - }, - addCompositeEntityOperationSpec, - callback) as Promise; - } - /** * Gets information about all the composite entity models in a version of the application. * @param appId The application ID. @@ -671,7 +596,7 @@ export class Model { * @param entityId The entity extractor ID. * @param callback The callback */ - getEntity(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; + getEntity(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -679,8 +604,8 @@ export class Model { * @param options The optional parameters * @param callback The callback */ - getEntity(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getEntity(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getEntity(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getEntity(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -693,79 +618,329 @@ export class Model { } /** - * Updates the name of an entity in a version of the application. + * Deletes an entity or a child from a version of the application. + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor or the child entity extractor ID. + * @param [options] The optional parameters + * @returns Promise + */ + deleteEntity(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor or the child entity extractor ID. + * @param callback The callback + */ + deleteEntity(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor or the child entity extractor ID. + * @param options The optional parameters + * @param callback The callback + */ + deleteEntity(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteEntity(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + appId, + versionId, + entityId, + options + }, + deleteEntityOperationSpec, + callback) as Promise; + } + + /** + * Updates the name of an entity extractor or the name and instanceOf model of a child entity + * extractor. + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor or the child entity extractor ID. + * @param entityModelUpdateObject A model object containing the name new entity extractor or the + * name and instance of model of a child entity extractor + * @param [options] The optional parameters + * @returns Promise + */ + updateEntityChild(appId: string, versionId: string, entityId: string, entityModelUpdateObject: Models.EntityModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor or the child entity extractor ID. + * @param entityModelUpdateObject A model object containing the name new entity extractor or the + * name and instance of model of a child entity extractor + * @param callback The callback + */ + updateEntityChild(appId: string, versionId: string, entityId: string, entityModelUpdateObject: Models.EntityModelUpdateObject, callback: msRest.ServiceCallback): void; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor or the child entity extractor ID. + * @param entityModelUpdateObject A model object containing the name new entity extractor or the + * name and instance of model of a child entity extractor + * @param options The optional parameters + * @param callback The callback + */ + updateEntityChild(appId: string, versionId: string, entityId: string, entityModelUpdateObject: Models.EntityModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateEntityChild(appId: string, versionId: string, entityId: string, entityModelUpdateObject: Models.EntityModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + appId, + versionId, + entityId, + entityModelUpdateObject, + options + }, + updateEntityChildOperationSpec, + callback) as Promise; + } + + /** + * Gets the information of the features used by the intent in a version of the application. + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param [options] The optional parameters + * @returns Promise + */ + getIntentFeatures(appId: string, versionId: string, intentId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param callback The callback + */ + getIntentFeatures(appId: string, versionId: string, intentId: string, callback: msRest.ServiceCallback): void; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param options The optional parameters + * @param callback The callback + */ + getIntentFeatures(appId: string, versionId: string, intentId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getIntentFeatures(appId: string, versionId: string, intentId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + appId, + versionId, + intentId, + options + }, + getIntentFeaturesOperationSpec, + callback) as Promise; + } + + /** + * Updates the information of the features used by the intent in a version of the application. + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param featureRelationsUpdateObject A list of feature information objects containing the new + * feature relations. + * @param [options] The optional parameters + * @returns Promise + */ + replaceIntentFeatures(appId: string, versionId: string, intentId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options?: msRest.RequestOptionsBase): Promise; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param featureRelationsUpdateObject A list of feature information objects containing the new + * feature relations. + * @param callback The callback + */ + replaceIntentFeatures(appId: string, versionId: string, intentId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], callback: msRest.ServiceCallback): void; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param featureRelationsUpdateObject A list of feature information objects containing the new + * feature relations. + * @param options The optional parameters + * @param callback The callback + */ + replaceIntentFeatures(appId: string, versionId: string, intentId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + replaceIntentFeatures(appId: string, versionId: string, intentId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + appId, + versionId, + intentId, + featureRelationsUpdateObject, + options + }, + replaceIntentFeaturesOperationSpec, + callback) as Promise; + } + + /** + * Deletes a relation from the feature relations used by the intent in a version of the + * application. + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param featureRelationDeleteObject A feature information object containing the feature relation + * to delete. + * @param [options] The optional parameters + * @returns Promise + */ + deleteIntentFeature(appId: string, versionId: string, intentId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase): Promise; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param featureRelationDeleteObject A feature information object containing the feature relation + * to delete. + * @param callback The callback + */ + deleteIntentFeature(appId: string, versionId: string, intentId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, callback: msRest.ServiceCallback): void; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param intentId The intent classifier ID. + * @param featureRelationDeleteObject A feature information object containing the feature relation + * to delete. + * @param options The optional parameters + * @param callback The callback + */ + deleteIntentFeature(appId: string, versionId: string, intentId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteIntentFeature(appId: string, versionId: string, intentId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + appId, + versionId, + intentId, + featureRelationDeleteObject, + options + }, + deleteIntentFeatureOperationSpec, + callback) as Promise; + } + + /** + * Gets the information of the features used by the entity in a version of the application. * @param appId The application ID. * @param versionId The version ID. * @param entityId The entity extractor ID. - * @param modelUpdateObject A model object containing the new entity extractor name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - updateEntity(appId: string, versionId: string, entityId: string, modelUpdateObject: Models.ModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; + getEntityFeatures(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param entityId The entity extractor ID. - * @param modelUpdateObject A model object containing the new entity extractor name. * @param callback The callback */ - updateEntity(appId: string, versionId: string, entityId: string, modelUpdateObject: Models.ModelUpdateObject, callback: msRest.ServiceCallback): void; + getEntityFeatures(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param entityId The entity extractor ID. - * @param modelUpdateObject A model object containing the new entity extractor name. * @param options The optional parameters * @param callback The callback */ - updateEntity(appId: string, versionId: string, entityId: string, modelUpdateObject: Models.ModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateEntity(appId: string, versionId: string, entityId: string, modelUpdateObject: Models.ModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getEntityFeatures(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getEntityFeatures(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, versionId, entityId, - modelUpdateObject, options }, - updateEntityOperationSpec, - callback) as Promise; + getEntityFeaturesOperationSpec, + callback) as Promise; } /** - * Deletes an entity from a version of the application. + * Updates the information of the features used by the entity in a version of the application. * @param appId The application ID. * @param versionId The version ID. * @param entityId The entity extractor ID. + * @param featureRelationsUpdateObject A list of feature information objects containing the new + * feature relations. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteEntity(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; + replaceEntityFeatures(appId: string, versionId: string, entityId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param entityId The entity extractor ID. + * @param featureRelationsUpdateObject A list of feature information objects containing the new + * feature relations. * @param callback The callback */ - deleteEntity(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; + replaceEntityFeatures(appId: string, versionId: string, entityId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param entityId The entity extractor ID. + * @param featureRelationsUpdateObject A list of feature information objects containing the new + * feature relations. * @param options The optional parameters * @param callback The callback */ - deleteEntity(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteEntity(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + replaceEntityFeatures(appId: string, versionId: string, entityId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + replaceEntityFeatures(appId: string, versionId: string, entityId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, versionId, entityId, + featureRelationsUpdateObject, options }, - deleteEntityOperationSpec, - callback) as Promise; + replaceEntityFeaturesOperationSpec, + callback) as Promise; + } + + /** + * Deletes a relation from the feature relations used by the entity in a version of the + * application. + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor ID. + * @param featureRelationDeleteObject A feature information object containing the feature relation + * to delete. + * @param [options] The optional parameters + * @returns Promise + */ + deleteEntityFeature(appId: string, versionId: string, entityId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase): Promise; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor ID. + * @param featureRelationDeleteObject A feature information object containing the feature relation + * to delete. + * @param callback The callback + */ + deleteEntityFeature(appId: string, versionId: string, entityId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, callback: msRest.ServiceCallback): void; + /** + * @param appId The application ID. + * @param versionId The version ID. + * @param entityId The entity extractor ID. + * @param featureRelationDeleteObject A feature information object containing the feature relation + * to delete. + * @param options The optional parameters + * @param callback The callback + */ + deleteEntityFeature(appId: string, versionId: string, entityId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteEntityFeature(appId: string, versionId: string, entityId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + appId, + versionId, + entityId, + featureRelationDeleteObject, + options + }, + deleteEntityFeatureOperationSpec, + callback) as Promise; } /** @@ -805,42 +980,39 @@ export class Model { } /** - * Updates the name and children of a hierarchical entity model in a version of the application. + * Updates the name of a hierarchical entity model in a version of the application. * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. - * @param hierarchicalModelUpdateObject Model containing names of the children of the hierarchical - * entity. + * @param modelUpdateObject Model containing names of the hierarchical entity. * @param [options] The optional parameters * @returns Promise */ - updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, hierarchicalModelUpdateObject: Models.HierarchicalEntityModel, options?: msRest.RequestOptionsBase): Promise; + updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, modelUpdateObject: Models.ModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. - * @param hierarchicalModelUpdateObject Model containing names of the children of the hierarchical - * entity. + * @param modelUpdateObject Model containing names of the hierarchical entity. * @param callback The callback */ - updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, hierarchicalModelUpdateObject: Models.HierarchicalEntityModel, callback: msRest.ServiceCallback): void; + updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, modelUpdateObject: Models.ModelUpdateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. - * @param hierarchicalModelUpdateObject Model containing names of the children of the hierarchical - * entity. + * @param modelUpdateObject Model containing names of the hierarchical entity. * @param options The optional parameters * @param callback The callback */ - updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, hierarchicalModelUpdateObject: Models.HierarchicalEntityModel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, hierarchicalModelUpdateObject: Models.HierarchicalEntityModel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, modelUpdateObject: Models.ModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, modelUpdateObject: Models.ModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, versionId, hEntityId, - hierarchicalModelUpdateObject, + modelUpdateObject, options }, updateHierarchicalEntityOperationSpec, @@ -1671,174 +1843,174 @@ export class Model { } /** - * Gets information about the child's model contained in an hierarchical entity child model in a - * version of the application. + * Creates a single child in an existing entity model hierarchy in a version of the application. * @param appId The application ID. * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. + * @param entityId The entity extractor ID. + * @param childEntityModelCreateObject A model object containing the name of the new child model + * and its children. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase): Promise; + addEntityChild(appId: string, versionId: string, entityId: string, childEntityModelCreateObject: Models.ChildEntityModelCreateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. + * @param entityId The entity extractor ID. + * @param childEntityModelCreateObject A model object containing the name of the new child model + * and its children. * @param callback The callback */ - getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, callback: msRest.ServiceCallback): void; + addEntityChild(appId: string, versionId: string, entityId: string, childEntityModelCreateObject: Models.ChildEntityModelCreateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. + * @param entityId The entity extractor ID. + * @param childEntityModelCreateObject A model object containing the name of the new child model + * and its children. * @param options The optional parameters * @param callback The callback */ - getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + addEntityChild(appId: string, versionId: string, entityId: string, childEntityModelCreateObject: Models.ChildEntityModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addEntityChild(appId: string, versionId: string, entityId: string, childEntityModelCreateObject: Models.ChildEntityModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, versionId, - hEntityId, - hChildId, + entityId, + childEntityModelCreateObject, options }, - getHierarchicalEntityChildOperationSpec, - callback) as Promise; + addEntityChildOperationSpec, + callback) as Promise; } /** - * Renames a single child in an existing hierarchical entity model in a version of the application. + * Gets information about the child's model contained in an hierarchical entity child model in a + * version of the application. * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. * @param hChildId The hierarchical entity extractor child ID. - * @param hierarchicalChildModelUpdateObject Model object containing new name of the hierarchical - * entity child. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; + getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. * @param hChildId The hierarchical entity extractor child ID. - * @param hierarchicalChildModelUpdateObject Model object containing new name of the hierarchical - * entity child. * @param callback The callback */ - updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, callback: msRest.ServiceCallback): void; + getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. * @param hChildId The hierarchical entity extractor child ID. - * @param hierarchicalChildModelUpdateObject Model object containing new name of the hierarchical - * entity child. * @param options The optional parameters * @param callback The callback */ - updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, versionId, hEntityId, hChildId, - hierarchicalChildModelUpdateObject, options }, - updateHierarchicalEntityChildOperationSpec, - callback) as Promise; + getHierarchicalEntityChildOperationSpec, + callback) as Promise; } /** - * Deletes a hierarchical entity extractor child in a version of the application. + * Renames a single child in an existing hierarchical entity model in a version of the application. * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. * @param hChildId The hierarchical entity extractor child ID. + * @param hierarchicalChildModelUpdateObject Model object containing new name of the hierarchical + * entity child. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase): Promise; + updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. * @param hChildId The hierarchical entity extractor child ID. + * @param hierarchicalChildModelUpdateObject Model object containing new name of the hierarchical + * entity child. * @param callback The callback */ - deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, callback: msRest.ServiceCallback): void; + updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. * @param hChildId The hierarchical entity extractor child ID. + * @param hierarchicalChildModelUpdateObject Model object containing new name of the hierarchical + * entity child. * @param options The optional parameters * @param callback The callback */ - deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, versionId, hEntityId, hChildId, + hierarchicalChildModelUpdateObject, options }, - deleteHierarchicalEntityChildOperationSpec, - callback) as Promise; + updateHierarchicalEntityChildOperationSpec, + callback) as Promise; } /** - * Creates a single child in an existing hierarchical entity model in a version of the application. + * Deletes a hierarchical entity extractor child in a version of the application. * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. - * @param hierarchicalChildModelCreateObject A model object containing the name of the new - * hierarchical child model. + * @param hChildId The hierarchical entity extractor child ID. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - addHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hierarchicalChildModelCreateObject: Models.HierarchicalChildModelCreateObject, options?: msRest.RequestOptionsBase): Promise; + deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. - * @param hierarchicalChildModelCreateObject A model object containing the name of the new - * hierarchical child model. + * @param hChildId The hierarchical entity extractor child ID. * @param callback The callback */ - addHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hierarchicalChildModelCreateObject: Models.HierarchicalChildModelCreateObject, callback: msRest.ServiceCallback): void; + deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param hEntityId The hierarchical entity extractor ID. - * @param hierarchicalChildModelCreateObject A model object containing the name of the new - * hierarchical child model. + * @param hChildId The hierarchical entity extractor child ID. * @param options The optional parameters * @param callback The callback */ - addHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hierarchicalChildModelCreateObject: Models.HierarchicalChildModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hierarchicalChildModelCreateObject: Models.HierarchicalChildModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, versionId, hEntityId, - hierarchicalChildModelCreateObject, + hChildId, options }, - addHierarchicalEntityChildOperationSpec, - callback) as Promise; + deleteHierarchicalEntityChildOperationSpec, + callback) as Promise; } /** @@ -4174,9 +4346,9 @@ const addEntityOperationSpec: msRest.OperationSpec = { Parameters.versionId0 ], requestBody: { - parameterPath: "modelCreateObject", + parameterPath: "entityModelCreateObject", mapper: { - ...Mappers.ModelCreateObject, + ...Mappers.EntityModelCreateObject, required: true } }, @@ -4217,7 +4389,7 @@ const listEntitiesOperationSpec: msRest.OperationSpec = { element: { type: { name: "Composite", - className: "EntityExtractor" + className: "NDepthEntityExtractor" } } } @@ -4230,37 +4402,6 @@ const listEntitiesOperationSpec: msRest.OperationSpec = { serializer }; -const addHierarchicalEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "hierarchicalModelCreateObject", - mapper: { - ...Mappers.HierarchicalEntityModel, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - const listHierarchicalEntitiesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/hierarchicalentities", @@ -4295,37 +4436,6 @@ const listHierarchicalEntitiesOperationSpec: msRest.OperationSpec = { serializer }; -const addCompositeEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/compositeentities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "compositeModelCreateObject", - mapper: { - ...Mappers.CompositeEntityModel, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - const listCompositeEntitiesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/compositeentities", @@ -4684,7 +4794,7 @@ const getEntityOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.EntityExtractor + bodyMapper: Mappers.NDepthEntityExtractor }, default: { bodyMapper: Mappers.ErrorResponse @@ -4693,8 +4803,28 @@ const getEntityOperationSpec: msRest.OperationSpec = { serializer }; -const updateEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const deleteEntityOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "apps/{appId}/versions/{versionId}/entities/{entityId}", + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0, + Parameters.entityId + ], + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateEntityChildOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", path: "apps/{appId}/versions/{versionId}/entities/{entityId}", urlParameters: [ Parameters.endpoint, @@ -4703,9 +4833,9 @@ const updateEntityOperationSpec: msRest.OperationSpec = { Parameters.entityId ], requestBody: { - parameterPath: "modelUpdateObject", + parameterPath: "entityModelUpdateObject", mapper: { - ...Mappers.ModelUpdateObject, + ...Mappers.EntityModelUpdateObject, required: true } }, @@ -4720,15 +4850,183 @@ const updateEntityOperationSpec: msRest.OperationSpec = { serializer }; -const deleteEntityOperationSpec: msRest.OperationSpec = { +const getIntentFeaturesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "apps/{appId}/versions/{versionId}/intents/{intentId}/features", + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0, + Parameters.intentId + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ModelFeatureInformation" + } + } + } + } + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const replaceIntentFeaturesOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "apps/{appId}/versions/{versionId}/intents/{intentId}/features", + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0, + Parameters.intentId + ], + requestBody: { + parameterPath: "featureRelationsUpdateObject", + mapper: { + required: true, + serializedName: "featureRelationsUpdateObject", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ModelFeatureInformation" + } + } + } + } + }, + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteIntentFeatureOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}", + path: "apps/{appId}/versions/{versionId}/intents/{intentId}/features", + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0, + Parameters.intentId + ], + requestBody: { + parameterPath: "featureRelationDeleteObject", + mapper: { + ...Mappers.ModelFeatureInformation, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getEntityFeaturesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "apps/{appId}/versions/{versionId}/entities/{entityId}/features", urlParameters: [ Parameters.endpoint, Parameters.appId, Parameters.versionId0, Parameters.entityId ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ModelFeatureInformation" + } + } + } + } + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const replaceEntityFeaturesOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "apps/{appId}/versions/{versionId}/entities/{entityId}/features", + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0, + Parameters.entityId + ], + requestBody: { + parameterPath: "featureRelationsUpdateObject", + mapper: { + required: true, + serializedName: "featureRelationsUpdateObject", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ModelFeatureInformation" + } + } + } + } + }, + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteEntityFeatureOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "apps/{appId}/versions/{versionId}/entities/{entityId}/features", + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0, + Parameters.entityId + ], + requestBody: { + parameterPath: "featureRelationDeleteObject", + mapper: { + ...Mappers.ModelFeatureInformation, + required: true + } + }, responses: { 200: { bodyMapper: Mappers.OperationStatus @@ -4761,7 +5059,7 @@ const getHierarchicalEntityOperationSpec: msRest.OperationSpec = { }; const updateHierarchicalEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", + httpMethod: "PATCH", path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", urlParameters: [ Parameters.endpoint, @@ -4770,9 +5068,9 @@ const updateHierarchicalEntityOperationSpec: msRest.OperationSpec = { Parameters.hEntityId ], requestBody: { - parameterPath: "hierarchicalModelUpdateObject", + parameterPath: "modelUpdateObject", mapper: { - ...Mappers.HierarchicalEntityModel, + ...Mappers.ModelUpdateObject, required: true } }, @@ -5365,6 +5663,38 @@ const deleteCustomPrebuiltDomainOperationSpec: msRest.OperationSpec = { serializer }; +const addEntityChildOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "apps/{appId}/versions/{versionId}/entities/{entityId}/children", + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0, + Parameters.entityId + ], + requestBody: { + parameterPath: "childEntityModelCreateObject", + mapper: { + ...Mappers.ChildEntityModelCreateObject, + required: true + } + }, + responses: { + 201: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Uuid" + } + } + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const getHierarchicalEntityChildOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", @@ -5387,7 +5717,7 @@ const getHierarchicalEntityChildOperationSpec: msRest.OperationSpec = { }; const updateHierarchicalEntityChildOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", + httpMethod: "PATCH", path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", urlParameters: [ Parameters.endpoint, @@ -5435,38 +5765,6 @@ const deleteHierarchicalEntityChildOperationSpec: msRest.OperationSpec = { serializer }; -const addHierarchicalEntityChildOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId - ], - requestBody: { - parameterPath: "hierarchicalChildModelCreateObject", - mapper: { - ...Mappers.HierarchicalChildModelCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - const addCompositeEntityChildOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children", diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts index 62366219a560..3ad7620eff42 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts @@ -4,7 +4,8 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. */ import * as msRest from "@azure/ms-rest-js"; @@ -33,24 +34,14 @@ export class Pattern { * @param [options] The optional parameters * @returns Promise */ - addPattern( - appId: string, - versionId: string, - pattern: Models.PatternRuleCreateObject, - options?: msRest.RequestOptionsBase - ): Promise; + addPattern(appId: string, versionId: string, pattern: Models.PatternRuleCreateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param pattern The input pattern. * @param callback The callback */ - addPattern( - appId: string, - versionId: string, - pattern: Models.PatternRuleCreateObject, - callback: msRest.ServiceCallback - ): void; + addPattern(appId: string, versionId: string, pattern: Models.PatternRuleCreateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -58,20 +49,8 @@ export class Pattern { * @param options The optional parameters * @param callback The callback */ - addPattern( - appId: string, - versionId: string, - pattern: Models.PatternRuleCreateObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - addPattern( - appId: string, - versionId: string, - pattern: Models.PatternRuleCreateObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + addPattern(appId: string, versionId: string, pattern: Models.PatternRuleCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addPattern(appId: string, versionId: string, pattern: Models.PatternRuleCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -80,8 +59,7 @@ export class Pattern { options }, addPatternOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -91,41 +69,21 @@ export class Pattern { * @param [options] The optional parameters * @returns Promise */ - listPatterns( - appId: string, - versionId: string, - options?: Models.PatternListPatternsOptionalParams - ): Promise; + listPatterns(appId: string, versionId: string, options?: Models.PatternListPatternsOptionalParams): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param callback The callback */ - listPatterns( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; + listPatterns(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - listPatterns( - appId: string, - versionId: string, - options: Models.PatternListPatternsOptionalParams, - callback: msRest.ServiceCallback - ): void; - listPatterns( - appId: string, - versionId: string, - options?: - | Models.PatternListPatternsOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listPatterns(appId: string, versionId: string, options: Models.PatternListPatternsOptionalParams, callback: msRest.ServiceCallback): void; + listPatterns(appId: string, versionId: string, options?: Models.PatternListPatternsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -133,8 +91,7 @@ export class Pattern { options }, listPatternsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -145,24 +102,14 @@ export class Pattern { * @param [options] The optional parameters * @returns Promise */ - updatePatterns( - appId: string, - versionId: string, - patterns: Models.PatternRuleUpdateObject[], - options?: msRest.RequestOptionsBase - ): Promise; + updatePatterns(appId: string, versionId: string, patterns: Models.PatternRuleUpdateObject[], options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param patterns An array represents the patterns. * @param callback The callback */ - updatePatterns( - appId: string, - versionId: string, - patterns: Models.PatternRuleUpdateObject[], - callback: msRest.ServiceCallback - ): void; + updatePatterns(appId: string, versionId: string, patterns: Models.PatternRuleUpdateObject[], callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -170,20 +117,8 @@ export class Pattern { * @param options The optional parameters * @param callback The callback */ - updatePatterns( - appId: string, - versionId: string, - patterns: Models.PatternRuleUpdateObject[], - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - updatePatterns( - appId: string, - versionId: string, - patterns: Models.PatternRuleUpdateObject[], - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + updatePatterns(appId: string, versionId: string, patterns: Models.PatternRuleUpdateObject[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updatePatterns(appId: string, versionId: string, patterns: Models.PatternRuleUpdateObject[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -192,8 +127,7 @@ export class Pattern { options }, updatePatternsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -204,24 +138,14 @@ export class Pattern { * @param [options] The optional parameters * @returns Promise */ - batchAddPatterns( - appId: string, - versionId: string, - patterns: Models.PatternRuleCreateObject[], - options?: msRest.RequestOptionsBase - ): Promise; + batchAddPatterns(appId: string, versionId: string, patterns: Models.PatternRuleCreateObject[], options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param patterns A JSON array containing patterns. * @param callback The callback */ - batchAddPatterns( - appId: string, - versionId: string, - patterns: Models.PatternRuleCreateObject[], - callback: msRest.ServiceCallback - ): void; + batchAddPatterns(appId: string, versionId: string, patterns: Models.PatternRuleCreateObject[], callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -229,20 +153,8 @@ export class Pattern { * @param options The optional parameters * @param callback The callback */ - batchAddPatterns( - appId: string, - versionId: string, - patterns: Models.PatternRuleCreateObject[], - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - batchAddPatterns( - appId: string, - versionId: string, - patterns: Models.PatternRuleCreateObject[], - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + batchAddPatterns(appId: string, versionId: string, patterns: Models.PatternRuleCreateObject[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + batchAddPatterns(appId: string, versionId: string, patterns: Models.PatternRuleCreateObject[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -251,8 +163,7 @@ export class Pattern { options }, batchAddPatternsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -263,24 +174,14 @@ export class Pattern { * @param [options] The optional parameters * @returns Promise */ - deletePatterns( - appId: string, - versionId: string, - patternIds: string[], - options?: msRest.RequestOptionsBase - ): Promise; + deletePatterns(appId: string, versionId: string, patternIds: string[], options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param patternIds The patterns IDs. * @param callback The callback */ - deletePatterns( - appId: string, - versionId: string, - patternIds: string[], - callback: msRest.ServiceCallback - ): void; + deletePatterns(appId: string, versionId: string, patternIds: string[], callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -288,20 +189,8 @@ export class Pattern { * @param options The optional parameters * @param callback The callback */ - deletePatterns( - appId: string, - versionId: string, - patternIds: string[], - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deletePatterns( - appId: string, - versionId: string, - patternIds: string[], - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deletePatterns(appId: string, versionId: string, patternIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deletePatterns(appId: string, versionId: string, patternIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -310,8 +199,7 @@ export class Pattern { options }, deletePatternsOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -323,13 +211,7 @@ export class Pattern { * @param [options] The optional parameters * @returns Promise */ - updatePattern( - appId: string, - versionId: string, - patternId: string, - pattern: Models.PatternRuleUpdateObject, - options?: msRest.RequestOptionsBase - ): Promise; + updatePattern(appId: string, versionId: string, patternId: string, pattern: Models.PatternRuleUpdateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. @@ -337,13 +219,7 @@ export class Pattern { * @param pattern An object representing a pattern. * @param callback The callback */ - updatePattern( - appId: string, - versionId: string, - patternId: string, - pattern: Models.PatternRuleUpdateObject, - callback: msRest.ServiceCallback - ): void; + updatePattern(appId: string, versionId: string, patternId: string, pattern: Models.PatternRuleUpdateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -352,22 +228,8 @@ export class Pattern { * @param options The optional parameters * @param callback The callback */ - updatePattern( - appId: string, - versionId: string, - patternId: string, - pattern: Models.PatternRuleUpdateObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - updatePattern( - appId: string, - versionId: string, - patternId: string, - pattern: Models.PatternRuleUpdateObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + updatePattern(appId: string, versionId: string, patternId: string, pattern: Models.PatternRuleUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updatePattern(appId: string, versionId: string, patternId: string, pattern: Models.PatternRuleUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -377,8 +239,7 @@ export class Pattern { options }, updatePatternOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -389,24 +250,14 @@ export class Pattern { * @param [options] The optional parameters * @returns Promise */ - deletePattern( - appId: string, - versionId: string, - patternId: string, - options?: msRest.RequestOptionsBase - ): Promise; + deletePattern(appId: string, versionId: string, patternId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param patternId The pattern ID. * @param callback The callback */ - deletePattern( - appId: string, - versionId: string, - patternId: string, - callback: msRest.ServiceCallback - ): void; + deletePattern(appId: string, versionId: string, patternId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -414,20 +265,8 @@ export class Pattern { * @param options The optional parameters * @param callback The callback */ - deletePattern( - appId: string, - versionId: string, - patternId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deletePattern( - appId: string, - versionId: string, - patternId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deletePattern(appId: string, versionId: string, patternId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deletePattern(appId: string, versionId: string, patternId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -436,8 +275,7 @@ export class Pattern { options }, deletePatternOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -448,24 +286,14 @@ export class Pattern { * @param [options] The optional parameters * @returns Promise */ - listIntentPatterns( - appId: string, - versionId: string, - intentId: string, - options?: Models.PatternListIntentPatternsOptionalParams - ): Promise; + listIntentPatterns(appId: string, versionId: string, intentId: string, options?: Models.PatternListIntentPatternsOptionalParams): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param intentId The intent classifier ID. * @param callback The callback */ - listIntentPatterns( - appId: string, - versionId: string, - intentId: string, - callback: msRest.ServiceCallback - ): void; + listIntentPatterns(appId: string, versionId: string, intentId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -473,22 +301,8 @@ export class Pattern { * @param options The optional parameters * @param callback The callback */ - listIntentPatterns( - appId: string, - versionId: string, - intentId: string, - options: Models.PatternListIntentPatternsOptionalParams, - callback: msRest.ServiceCallback - ): void; - listIntentPatterns( - appId: string, - versionId: string, - intentId: string, - options?: - | Models.PatternListIntentPatternsOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listIntentPatterns(appId: string, versionId: string, intentId: string, options: Models.PatternListIntentPatternsOptionalParams, callback: msRest.ServiceCallback): void; + listIntentPatterns(appId: string, versionId: string, intentId: string, options?: Models.PatternListIntentPatternsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -497,8 +311,7 @@ export class Pattern { options }, listIntentPatternsOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -507,7 +320,11 @@ const serializer = new msRest.Serializer(Mappers); const addPatternOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/versions/{versionId}/patternrule", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "pattern", mapper: { @@ -529,8 +346,15 @@ const addPatternOperationSpec: msRest.OperationSpec = { const listPatternsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/patternrules", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], - queryParameters: [Parameters.skip, Parameters.take], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], + queryParameters: [ + Parameters.skip, + Parameters.take + ], responses: { 200: { bodyMapper: { @@ -556,7 +380,11 @@ const listPatternsOperationSpec: msRest.OperationSpec = { const updatePatternsOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "apps/{appId}/versions/{versionId}/patternrules", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "patterns", mapper: { @@ -598,7 +426,11 @@ const updatePatternsOperationSpec: msRest.OperationSpec = { const batchAddPatternsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/versions/{versionId}/patternrules", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "patterns", mapper: { @@ -640,7 +472,11 @@ const batchAddPatternsOperationSpec: msRest.OperationSpec = { const deletePatternsOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "apps/{appId}/versions/{versionId}/patternrules", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "patternIds", mapper: { @@ -723,7 +559,10 @@ const listIntentPatternsOperationSpec: msRest.OperationSpec = { Parameters.versionId0, Parameters.intentId ], - queryParameters: [Parameters.skip, Parameters.take], + queryParameters: [ + Parameters.skip, + Parameters.take + ], responses: { 200: { bodyMapper: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/permissions.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/permissions.ts index f1f678009e1a..81a1b15f8103 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/permissions.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/permissions.ts @@ -4,7 +4,8 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. */ import * as msRest from "@azure/ms-rest-js"; @@ -42,24 +43,15 @@ export class Permissions { * @param options The optional parameters * @param callback The callback */ - list( - appId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - appId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -70,39 +62,21 @@ export class Permissions { * @param [options] The optional parameters * @returns Promise */ - add( - appId: string, - userToAdd: Models.UserCollaborator, - options?: msRest.RequestOptionsBase - ): Promise; + add(appId: string, userToAdd: Models.UserCollaborator, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param userToAdd A model containing the user's email address. * @param callback The callback */ - add( - appId: string, - userToAdd: Models.UserCollaborator, - callback: msRest.ServiceCallback - ): void; + add(appId: string, userToAdd: Models.UserCollaborator, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param userToAdd A model containing the user's email address. * @param options The optional parameters * @param callback The callback */ - add( - appId: string, - userToAdd: Models.UserCollaborator, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - add( - appId: string, - userToAdd: Models.UserCollaborator, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + add(appId: string, userToAdd: Models.UserCollaborator, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + add(appId: string, userToAdd: Models.UserCollaborator, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -110,8 +84,7 @@ export class Permissions { options }, addOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -122,39 +95,21 @@ export class Permissions { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - appId: string, - userToDelete: Models.UserCollaborator, - options?: msRest.RequestOptionsBase - ): Promise; + deleteMethod(appId: string, userToDelete: Models.UserCollaborator, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param userToDelete A model containing the user's email address. * @param callback The callback */ - deleteMethod( - appId: string, - userToDelete: Models.UserCollaborator, - callback: msRest.ServiceCallback - ): void; + deleteMethod(appId: string, userToDelete: Models.UserCollaborator, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param userToDelete A model containing the user's email address. * @param options The optional parameters * @param callback The callback */ - deleteMethod( - appId: string, - userToDelete: Models.UserCollaborator, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteMethod( - appId: string, - userToDelete: Models.UserCollaborator, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteMethod(appId: string, userToDelete: Models.UserCollaborator, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(appId: string, userToDelete: Models.UserCollaborator, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -162,8 +117,7 @@ export class Permissions { options }, deleteMethodOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -174,39 +128,21 @@ export class Permissions { * @param [options] The optional parameters * @returns Promise */ - update( - appId: string, - collaborators: Models.CollaboratorsArray, - options?: msRest.RequestOptionsBase - ): Promise; + update(appId: string, collaborators: Models.CollaboratorsArray, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param collaborators A model containing a list of user email addresses. * @param callback The callback */ - update( - appId: string, - collaborators: Models.CollaboratorsArray, - callback: msRest.ServiceCallback - ): void; + update(appId: string, collaborators: Models.CollaboratorsArray, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param collaborators A model containing a list of user email addresses. * @param options The optional parameters * @param callback The callback */ - update( - appId: string, - collaborators: Models.CollaboratorsArray, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - update( - appId: string, - collaborators: Models.CollaboratorsArray, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + update(appId: string, collaborators: Models.CollaboratorsArray, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(appId: string, collaborators: Models.CollaboratorsArray, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -214,8 +150,7 @@ export class Permissions { options }, updateOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -224,7 +159,10 @@ const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/permissions", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], responses: { 200: { bodyMapper: Mappers.UserAccessList @@ -239,7 +177,10 @@ const listOperationSpec: msRest.OperationSpec = { const addOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/permissions", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], requestBody: { parameterPath: "userToAdd", mapper: { @@ -261,7 +202,10 @@ const addOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "apps/{appId}/permissions", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], requestBody: { parameterPath: "userToDelete", mapper: { @@ -283,7 +227,10 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "apps/{appId}/permissions", - urlParameters: [Parameters.endpoint, Parameters.appId], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], requestBody: { parameterPath: "collaborators", mapper: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts index 9824afbf1b37..d4d28d088bc1 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts @@ -33,39 +33,21 @@ export class Settings { * @param [options] The optional parameters * @returns Promise */ - list( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase - ): Promise; + list(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param callback The callback */ - list( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; + list(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - list( - appId: string, - versionId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -73,8 +55,7 @@ export class Settings { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -85,24 +66,14 @@ export class Settings { * @param [options] The optional parameters * @returns Promise */ - update( - appId: string, - versionId: string, - listOfAppVersionSettingObject: Models.AppVersionSettingObject[], - options?: msRest.RequestOptionsBase - ): Promise; + update(appId: string, versionId: string, listOfAppVersionSettingObject: Models.AppVersionSettingObject[], options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param listOfAppVersionSettingObject A list of the updated application version settings. * @param callback The callback */ - update( - appId: string, - versionId: string, - listOfAppVersionSettingObject: Models.AppVersionSettingObject[], - callback: msRest.ServiceCallback - ): void; + update(appId: string, versionId: string, listOfAppVersionSettingObject: Models.AppVersionSettingObject[], callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -110,20 +81,8 @@ export class Settings { * @param options The optional parameters * @param callback The callback */ - update( - appId: string, - versionId: string, - listOfAppVersionSettingObject: Models.AppVersionSettingObject[], - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - update( - appId: string, - versionId: string, - listOfAppVersionSettingObject: Models.AppVersionSettingObject[], - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + update(appId: string, versionId: string, listOfAppVersionSettingObject: Models.AppVersionSettingObject[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(appId: string, versionId: string, listOfAppVersionSettingObject: Models.AppVersionSettingObject[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -132,8 +91,7 @@ export class Settings { options }, updateOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -142,7 +100,11 @@ const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/settings", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], responses: { 200: { bodyMapper: { @@ -168,7 +130,11 @@ const listOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "apps/{appId}/versions/{versionId}/settings", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "listOfAppVersionSettingObject", mapper: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts index d3b18f6986a6..53d2c9848983 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts @@ -37,39 +37,21 @@ export class Train { * @param [options] The optional parameters * @returns Promise */ - trainVersion( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase - ): Promise; + trainVersion(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param callback The callback */ - trainVersion( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; + trainVersion(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - trainVersion( - appId: string, - versionId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - trainVersion( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + trainVersion(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + trainVersion(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -77,8 +59,7 @@ export class Train { options }, trainVersionOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -91,39 +72,21 @@ export class Train { * @param [options] The optional parameters * @returns Promise */ - getStatus( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase - ): Promise; + getStatus(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param callback The callback */ - getStatus( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; + getStatus(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - getStatus( - appId: string, - versionId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getStatus( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getStatus(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getStatus(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -131,8 +94,7 @@ export class Train { options }, getStatusOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -141,7 +103,11 @@ const serializer = new msRest.Serializer(Mappers); const trainVersionOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/versions/{versionId}/train", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], responses: { 202: { bodyMapper: Mappers.EnqueueTrainingResponse @@ -156,7 +122,11 @@ const trainVersionOperationSpec: msRest.OperationSpec = { const getStatusOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/train", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], responses: { 200: { bodyMapper: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts index e5db380e5fa7..c1ce1801e57c 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts @@ -34,24 +34,14 @@ export class Versions { * @param [options] The optional parameters * @returns Promise */ - clone( - appId: string, - versionId: string, - versionCloneObject: Models.TaskUpdateObject, - options?: msRest.RequestOptionsBase - ): Promise; + clone(appId: string, versionId: string, versionCloneObject: Models.TaskUpdateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param versionCloneObject A model containing the new version ID. * @param callback The callback */ - clone( - appId: string, - versionId: string, - versionCloneObject: Models.TaskUpdateObject, - callback: msRest.ServiceCallback - ): void; + clone(appId: string, versionId: string, versionCloneObject: Models.TaskUpdateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -59,20 +49,8 @@ export class Versions { * @param options The optional parameters * @param callback The callback */ - clone( - appId: string, - versionId: string, - versionCloneObject: Models.TaskUpdateObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - clone( - appId: string, - versionId: string, - versionCloneObject: Models.TaskUpdateObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + clone(appId: string, versionId: string, versionCloneObject: Models.TaskUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + clone(appId: string, versionId: string, versionCloneObject: Models.TaskUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -81,8 +59,7 @@ export class Versions { options }, cloneOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -91,10 +68,7 @@ export class Versions { * @param [options] The optional parameters * @returns Promise */ - list( - appId: string, - options?: Models.VersionsListOptionalParams - ): Promise; + list(appId: string, options?: Models.VersionsListOptionalParams): Promise; /** * @param appId The application ID. * @param callback The callback @@ -105,24 +79,15 @@ export class Versions { * @param options The optional parameters * @param callback The callback */ - list( - appId: string, - options: Models.VersionsListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - appId: string, - options?: Models.VersionsListOptionalParams | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(appId: string, options: Models.VersionsListOptionalParams, callback: msRest.ServiceCallback): void; + list(appId: string, options?: Models.VersionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -133,11 +98,7 @@ export class Versions { * @param [options] The optional parameters * @returns Promise */ - get( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. @@ -150,18 +111,8 @@ export class Versions { * @param options The optional parameters * @param callback The callback */ - get( - appId: string, - versionId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -169,8 +120,7 @@ export class Versions { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -181,24 +131,14 @@ export class Versions { * @param [options] The optional parameters * @returns Promise */ - update( - appId: string, - versionId: string, - versionUpdateObject: Models.TaskUpdateObject, - options?: msRest.RequestOptionsBase - ): Promise; + update(appId: string, versionId: string, versionUpdateObject: Models.TaskUpdateObject, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param versionUpdateObject A model containing Name and Description of the application. * @param callback The callback */ - update( - appId: string, - versionId: string, - versionUpdateObject: Models.TaskUpdateObject, - callback: msRest.ServiceCallback - ): void; + update(appId: string, versionId: string, versionUpdateObject: Models.TaskUpdateObject, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -206,20 +146,8 @@ export class Versions { * @param options The optional parameters * @param callback The callback */ - update( - appId: string, - versionId: string, - versionUpdateObject: Models.TaskUpdateObject, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - update( - appId: string, - versionId: string, - versionUpdateObject: Models.TaskUpdateObject, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + update(appId: string, versionId: string, versionUpdateObject: Models.TaskUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(appId: string, versionId: string, versionUpdateObject: Models.TaskUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -228,8 +156,7 @@ export class Versions { options }, updateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -239,39 +166,21 @@ export class Versions { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteMethod(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param callback The callback */ - deleteMethod( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; + deleteMethod(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - deleteMethod( - appId: string, - versionId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteMethod( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteMethod(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -279,8 +188,7 @@ export class Versions { options }, deleteMethodOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -290,39 +198,21 @@ export class Versions { * @param [options] The optional parameters * @returns Promise */ - exportMethod( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase - ): Promise; + exportMethod(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param callback The callback */ - exportMethod( - appId: string, - versionId: string, - callback: msRest.ServiceCallback - ): void; + exportMethod(appId: string, versionId: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. * @param options The optional parameters * @param callback The callback */ - exportMethod( - appId: string, - versionId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - exportMethod( - appId: string, - versionId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + exportMethod(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + exportMethod(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -330,8 +220,7 @@ export class Versions { options }, exportMethodOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -341,39 +230,21 @@ export class Versions { * @param [options] The optional parameters * @returns Promise */ - importMethod( - appId: string, - luisApp: Models.LuisApp, - options?: Models.VersionsImportMethodOptionalParams - ): Promise; + importMethod(appId: string, luisApp: Models.LuisApp, options?: Models.VersionsImportMethodOptionalParams): Promise; /** * @param appId The application ID. * @param luisApp A LUIS application structure. * @param callback The callback */ - importMethod( - appId: string, - luisApp: Models.LuisApp, - callback: msRest.ServiceCallback - ): void; + importMethod(appId: string, luisApp: Models.LuisApp, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param luisApp A LUIS application structure. * @param options The optional parameters * @param callback The callback */ - importMethod( - appId: string, - luisApp: Models.LuisApp, - options: Models.VersionsImportMethodOptionalParams, - callback: msRest.ServiceCallback - ): void; - importMethod( - appId: string, - luisApp: Models.LuisApp, - options?: Models.VersionsImportMethodOptionalParams | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + importMethod(appId: string, luisApp: Models.LuisApp, options: Models.VersionsImportMethodOptionalParams, callback: msRest.ServiceCallback): void; + importMethod(appId: string, luisApp: Models.LuisApp, options?: Models.VersionsImportMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -381,8 +252,7 @@ export class Versions { options }, importMethodOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -393,24 +263,14 @@ export class Versions { * @param [options] The optional parameters * @returns Promise */ - deleteUnlabelledUtterance( - appId: string, - versionId: string, - utterance: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteUnlabelledUtterance(appId: string, versionId: string, utterance: string, options?: msRest.RequestOptionsBase): Promise; /** * @param appId The application ID. * @param versionId The version ID. * @param utterance The utterance text to delete. * @param callback The callback */ - deleteUnlabelledUtterance( - appId: string, - versionId: string, - utterance: string, - callback: msRest.ServiceCallback - ): void; + deleteUnlabelledUtterance(appId: string, versionId: string, utterance: string, callback: msRest.ServiceCallback): void; /** * @param appId The application ID. * @param versionId The version ID. @@ -418,20 +278,8 @@ export class Versions { * @param options The optional parameters * @param callback The callback */ - deleteUnlabelledUtterance( - appId: string, - versionId: string, - utterance: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteUnlabelledUtterance( - appId: string, - versionId: string, - utterance: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteUnlabelledUtterance(appId: string, versionId: string, utterance: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteUnlabelledUtterance(appId: string, versionId: string, utterance: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -440,8 +288,7 @@ export class Versions { options }, deleteUnlabelledUtteranceOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -450,7 +297,11 @@ const serializer = new msRest.Serializer(Mappers); const cloneOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/versions/{versionId}/clone", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "versionCloneObject", mapper: { @@ -477,8 +328,14 @@ const cloneOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions", - urlParameters: [Parameters.endpoint, Parameters.appId], - queryParameters: [Parameters.skip, Parameters.take], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], + queryParameters: [ + Parameters.skip, + Parameters.take + ], responses: { 200: { bodyMapper: { @@ -504,7 +361,11 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], responses: { 200: { bodyMapper: Mappers.VersionInfo @@ -519,7 +380,11 @@ const getOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "apps/{appId}/versions/{versionId}/", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "versionUpdateObject", mapper: { @@ -541,7 +406,11 @@ const updateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "apps/{appId}/versions/{versionId}/", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], responses: { 200: { bodyMapper: Mappers.OperationStatus @@ -556,7 +425,11 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const exportMethodOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "apps/{appId}/versions/{versionId}/export", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], responses: { 200: { bodyMapper: Mappers.LuisApp @@ -571,8 +444,13 @@ const exportMethodOperationSpec: msRest.OperationSpec = { const importMethodOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/{appId}/versions/import", - urlParameters: [Parameters.endpoint, Parameters.appId], - queryParameters: [Parameters.versionId1], + urlParameters: [ + Parameters.endpoint, + Parameters.appId + ], + queryParameters: [ + Parameters.versionId1 + ], requestBody: { parameterPath: "luisApp", mapper: { @@ -599,7 +477,11 @@ const importMethodOperationSpec: msRest.OperationSpec = { const deleteUnlabelledUtteranceOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "apps/{appId}/versions/{versionId}/suggest", - urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId0], + urlParameters: [ + Parameters.endpoint, + Parameters.appId, + Parameters.versionId0 + ], requestBody: { parameterPath: "utterance", mapper: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/apps.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/apps.test.ts deleted file mode 100644 index d919d0b5d8b5..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/apps.test.ts +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; - -describe("Apps Module Functionality Tests", () => { - - it('should list all luis applications', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - const list = await client.apps.list(); - await client.apps.deleteMethod(appId.body); - chai.expect(list).not.to.be.null; - chai.expect(list.length).not.eql(0); - chai.expect(BaseTest.doesListContain(list, 'name', "Existing LUIS App")).to.be.true; - }); - }); - - it("should add application", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "New LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let saved_app = await client.apps.get(appId.body); - await client.apps.deleteMethod(appId.body); - chai.expect(saved_app).not.to.be.null; - chai.expect(saved_app.name).to.eql("New LUIS App"); - chai.expect(saved_app.description).to.eql("New LUIS App"); - chai.expect(saved_app.culture).to.eql("en-us"); - chai.expect(saved_app.domain).to.eql("Comics"); - chai.expect(saved_app.usageScenario).to.eql("IoT"); - }); - - it("should get application", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let result = await client.apps.get(appId.body); - await client.apps.deleteMethod(appId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.id).to.eql(appId.body); - chai.expect(result.name).to.eql("Existing LUIS App"); - chai.expect(result.culture).to.eql("en-us"); - chai.expect(result.domain).to.eql("Comics"); - chai.expect(result.usageScenario).to.eql("IoT"); - }); - }); - }); - - it("should update application", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "LUIS App to be renamed", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.apps.update(appId.body, { name: "LUIS App name updated", description: "LUIS App description updated" }); - let app = await client.apps.get(appId.body); - await client.apps.deleteMethod(appId.body); - chai.expect(app).not.to.be.null; - chai.expect(app.name).to.eql("LUIS App name updated"); - chai.expect(app.description).to.eql("LUIS App description updated"); - }); - }); - - it("should delete application", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const appId = await client.apps.add({ - name: "LUIS App to be deleted", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.apps.deleteMethod(appId.body); - const list = await client.apps.list(); - chai.expect(BaseTest.doesListContain(list, "name", "LUIS App to be deleted")).to.be.false; - }); - }); - - it("should list all endpoints", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - - const result = await client.apps.listEndpoints(appId.body); - await client.apps.deleteMethod(appId.body); - chai.expect(result["westus"]).to.eql("https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/" + appId.body); - chai.expect(result["eastus2"]).to.eql("https://eastus2.api.cognitive.microsoft.com/luis/v2.0/apps/" + appId.body); - chai.expect(result["westcentralus"]).to.eql("https://westcentralus.api.cognitive.microsoft.com/luis/v2.0/apps/" + appId.body); - chai.expect(result["southeastasia"]).to.eql("https://southeastasia.api.cognitive.microsoft.com/luis/v2.0/apps/" + appId.body); - - }); - }); - - it("should publish application", async () => { - - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const result = await client.apps.publish(BaseTest.GlobalAppId, { - isStaging: false, - versionId: "0.1" - }); - chai.expect(result["endpointUrl"]).to.eql("https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/" + BaseTest.GlobalAppId); - chai.expect(result["endpointRegion"]).to.eql("westus"); - chai.expect(result["isStaging"]).to.be.false; - }); - }); - - it("download query logs", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - const stream = await client.apps.downloadQueryLogs(appId.body); - const csv = stream.readableStreamBody.read().toString(); - chai.expect(csv).to.be.exist; - await client.apps.deleteMethod(appId.body); - }); - }); - - it("should get settings", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - - const settings = await client.apps.getSettings(appId.body); - await client.apps.deleteMethod(appId.body); - chai.expect(settings.isPublic).to.be.false; - chai.expect(settings.id).to.eql(appId.body); - }); - }); - - it("should update settings", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.apps.updateSettings(appId.body, { - isPublic: true - }); - const settings = await client.apps.getSettings(appId.body); - await client.apps.deleteMethod(appId.body); - - chai.expect(settings.isPublic).to.be.true; - }); - - }); - - it("should get publish settings", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - const settings = await client.apps.getPublishSettings(appId.body); - await client.apps.deleteMethod(appId.body); - chai.expect(settings.id).to.eql(appId.body); - chai.expect(settings.isSentimentAnalysisEnabled).to.be.false; - chai.expect(settings.isSpeechEnabled).to.be.false; - chai.expect(settings.isSpellCheckerEnabled).to.be.false; - }); - }); - - it("should update publish settings", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.apps.updatePublishSettings(appId.body, { - sentimentAnalysis: true, - speech: true, - spellChecker: true - }); - const settings = await client.apps.getPublishSettings(appId.body); - await client.apps.deleteMethod(appId.body); - chai.expect(settings.isSentimentAnalysisEnabled).to.be.true; - chai.expect(settings.isSpeechEnabled).to.be.true; - chai.expect(settings.isSpellCheckerEnabled).to.be.true; - }); - }); - - - it("should list domains", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const result = await client.apps.listDomains(); - for (let domain of result) { - chai.expect(domain).to.exist; - } - }); - }); - - it("should list supported cultures", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let cultures_map = { - 'en-us': 'English', - 'zh-cn': 'Chinese', - 'fr-fr': 'French', - 'fr-ca': 'French Canadian', - 'es-es': 'Spanish', - 'es-mx': 'Spanish Mexican', - 'it-it': 'Italian', - 'de-de': 'German', - 'ja-jp': 'Japanese', - 'pt-br': 'Brazilian Portuguese', - 'ko-kr': 'Korean', - 'nl-nl': 'Dutch', - 'tr-tr': 'Turkish' - }; - - const result = await client.apps.listSupportedCultures(); - - for (let culture of result) { - const culture_name: string = cultures_map[culture.code]; - chai.expect(culture_name.toLowerCase()).to.eql(culture.name.toLowerCase()); - } - }); - }); - - it("should list usage scenarios", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const result = await client.apps.listUsageScenarios(); - for (let scenario of result) { - chai.expect(scenario).to.exist; - } - }); - }); - - it("should list available custom prebuild domains", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const result = await client.apps.listAvailableCustomPrebuiltDomains(); - for (let prebuilt of result) { - chai.expect(prebuilt).not.to.be.null; - chai.expect(prebuilt.description).to.exist; - chai.expect(prebuilt["intents"]).not.to.be.null; - chai.expect(prebuilt["entities"]).not.to.be.null; - } - }); - }); - - it.skip("should list available custom prebuilt domains for culture", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let resultsUS = await client.apps.listAvailableCustomPrebuiltDomainsForCulture("en-us"); - let resultsCN = await client.apps.listAvailableCustomPrebuiltDomainsForCulture("zh-cn"); - - for (let resultUS of resultsUS) { - chai.expect(BaseTest.doesListContain(resultsCN, "description", resultUS.description)).to.be.false; - } - for (let resultCN of resultsCN) { - chai.expect(BaseTest.doesListContain(resultsUS, "description", resultCN.description)).to.be.false; - } - }); - }); - - - it("should add custom prebuilt application", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.addCustomPrebuiltDomain({ - culture: "en-us", - domainName: "Communication" - }); - await client.apps.deleteMethod(appId.body); - chai.expect(appId.body).not.to.eql(BaseTest.EmptyId); - }); - }); - -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/entityRole.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/entityRole.test.ts deleted file mode 100644 index 6b4d66027f03..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/entityRole.test.ts +++ /dev/null @@ -1,478 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import * as chai from "chai"; - -let closedListSample = { name: "closed list model", subLists: [{ canonicalForm: "Test", list: [] }] }; - -describe("Entity Role Tests", () => { - it("should add simple entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "simple entity" }); - await client.model.createEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should add prebuilt entitiy role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["datetimeV2"]))[0].id; - await client.model.createPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, { name: "simple role" }); - const roles = await client.model.listPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", entityId); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should add closed list entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.createClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listClosedListEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should add regex entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, "0.1", { name: "regex model", regexPattern: "a+" }); - await client.model.createRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listRegexEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - - it("should add composite entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["datetimeV2"]); - const entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, "0.1", { name: "composite model", children: ["datetimeV2"] }); - await client.model.createCompositeEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listCompositeEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", added.id); - } - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should add patternAny entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", explicitList: [] }); - await client.model.createPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listPatternAnyEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - - // Fails: The model (Pattern.Any Model) cannot contain an entity role. - it.skip("should add hierarchical entity role ", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", children: ["child1"] }); - await client.model.createHierarchicalEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listHierarchicalEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should add custom prebuilt domain entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addCustomPrebuiltEntity(BaseTest.GlobalAppId, "0.1", { modelName: "ContactName", domainName: "Communication" }); - await client.model.createCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listCustomPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body) - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should get simple entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "simple entity" }); - const roleId = await client.model.createEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - - it("should get prebuilt entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["datetimeV2"]))[0].id; - const roleId = await client.model.createPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, { name: "simple role" }); - const role = await client.model.getPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, roleId.body); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", entityId); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get closed list entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const roleId = await client.model.createClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get regex entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, "0.1", { name: "regex model", regexPattern: "a+" }); - const roleId = await client.model.createRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get composite entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["datetimeV2"]); - const entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, "0.1", { name: "composite model", children: ["datetimeV2"] }); - const roleId = await client.model.createCompositeEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getCompositeEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", added.id); - } - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get patterAny entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", explicitList: [] }); - const roleId = await client.model.createPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - // Fails: The model (Pattern.Any Model) cannot contain an entity role. - it.skip("should get hierarchical entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any Model", children: ["child1"] }); - const roleId = await client.model.createHierarchicalEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getHierarchicalEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get custom prebuilt domain entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addCustomPrebuiltEntity(BaseTest.GlobalAppId, "0.1", { modelName: "ContactName", domainName: "Communication" }); - const roleId = await client.model.createCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getCustomEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get simple entity roles", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "simple entity" }); - await client.model.createEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - - it("should get prebuilt entity roles", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["datetimeV2"]))[0].id; - await client.model.createPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, { name: "simple role" }); - const roles = await client.model.listPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", entityId); - - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should get closed list entity roles", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const roleId = await client.model.createClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listClosedListEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should get regex entity roles", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, "0.1", { name: "regex model", regexPattern: "a+" }); - - const roleId = await client.model.createRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - - const roles = await client.model.listRegexEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should get composite entity roles", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["datetimeV2"]); - const entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, "0.1", { name: "composite model", children: ["datetimeV2"] }); - await client.model.createCompositeEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listCompositeEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", added.id); - } - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should get patterAny entity roles", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", explicitList: [] }); - - await client.model.createPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listPatternAnyEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - // Fails: The model (Pattern.Any Model) cannot contain an entity role. - it.skip("should get hierarchical entity roles", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any Model", children: ["child1"] }); - await client.model.createHierarchicalEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listHierarchicalEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should get custom prebuilt domain entity roles", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addCustomPrebuiltEntity(BaseTest.GlobalAppId, "0.1", { modelName: "ContactName", domainName: "Communication" }); - await client.model.createCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listCustomPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body) - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should update simple entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "simple entity" }); - const roleId = await client.model.createEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updateEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - it("should update prebuilt entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["datetimeV2"]))[0].id; - const roleId = await client.model.createPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, { name: "simple role" }); - await client.model.updatePrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, roleId.body, { name: "simple role 2" }); - const role = await client.model.getPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, roleId.body); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", entityId); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - - it("should update closed list entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const roleId = await client.model.createClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updateClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - it("should update regex entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, "0.1", { name: "regex model", regexPattern: "a+" }); - const roleId = await client.model.createRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updateRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - it("should update composite entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["datetimeV2"]); - const entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, "0.1", { name: "composite model", children: ["datetimeV2"] }); - const roleId = await client.model.createCompositeEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updateCompositeEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getCompositeEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", added.id); - } - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - - it("should update patterAny entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", explicitList: [] }); - const roleId = await client.model.createPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updatePatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - - // Fails: The model (Pattern.Any Model) cannot contain an entity role. - it.skip("should update hierarchical entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any Model", children: ["child1"] }); - const roleId = await client.model.createHierarchicalEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updateHierarchicalEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getHierarchicalEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - it("should update custom prebuilt domain entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addCustomPrebuiltEntity(BaseTest.GlobalAppId, "0.1", { modelName: "ContactName", domainName: "Communication" }); - const roleId = await client.model.createCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updateCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getCustomEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - it("should delete simple entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "simple entity" }); - const roleId = await client.model.createEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deleteEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - const roles = await client.model.listEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); - - it("should delete prebuilt entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["datetimeV2"]))[0].id; - const roleId = await client.model.createPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, { name: "simple role" }); - await client.model.deletePrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, roleId.body); - const roles = await client.model.listPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", entityId); - chai.expect(roles.length).to.eql(0); - }); - }); - - it("should delete closed list entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const roleId = await client.model.createClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deleteClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - - const roles = await client.model.listClosedListEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); - - it("should delete regex entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, "0.1", { name: "regex model", regexPattern: "a+" }); - const roleId = await client.model.createRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deleteRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - const roles = await client.model.listRegexEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); - - it("should delete composite entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["datetimeV2"]); - const entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, "0.1", { name: "composite model", children: ["datetimeV2"] }); - const roleId = await client.model.createCompositeEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deleteCompositeEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - const roles = await client.model.listCompositeEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", added.id); - } - chai.expect(roles.length).to.eql(0); - }); - }); - - it("should delete patterAny entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", explicitList: [] }); - const roleId = await client.model.createPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deletePatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - const roles = await client.model.listPatternAnyEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); - - - // Fails: The model (Pattern.Any Model) cannot contain an entity role. - it.skip("should delete hierarchical entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any Model", children: ["child1"] }); - const roleId = await client.model.createHierarchicalEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deleteHierarchicalEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - const roles = await client.model.listHierarchicalEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); - - it("should delete custom prebuilt domain entity role", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addCustomPrebuiltEntity(BaseTest.GlobalAppId, "0.1", { modelName: "ContactName", domainName: "Communication" }); - const roleId = await client.model.createCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deleteCustomEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - const roles = await client.model.listCustomPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body) - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/examples.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/examples.test.ts deleted file mode 100644 index a5029cf2ee53..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/examples.test.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import * as chai from "chai"; - - -describe("Example Module Functionality Tests", () => { - it("should list all examples", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const examples = await client.examples.list(BaseTest.GlobalAppId, "0.1"); - chai.expect(examples.length).not.to.eql(0); - }); - }); - - it("should list all examples in empty application returning empty", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - const examples = await client.examples.list(appId.body, "0.1"); - await client.apps.deleteMethod(appId.body); - chai.expect(examples.length).to.eql(0); - }); - }); - - - it("should add example", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.model.addIntent(appId.body, "0.1", { name: "WeatherInPlace" }); - await client.model.addEntity(appId.body, "0.1", { name: "Place" }); - let example = { - text: "whats the weather in buenos aires?", - intentName: "WeatherInPlace", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 34 - }] - }; - const result = await client.examples.add(appId.body, "0.1", example); - await client.apps.deleteMethod(appId.body); - chai.expect(result.utteranceText).to.eql(example.text) - }); - }); - - it("should add examples in batch", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.model.addIntent(appId.body, "0.1", { name: "WeatherInPlace" }); - await client.model.addEntity(appId.body, "0.1", { name: "Place" }); - let examples = [{ - text: "whats the weather in seattle?", - intentName: "WeatherInPlace", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 34 - }] - }, { - text: "whats the weather in buenos aires?", - intentName: "WeatherInPlace", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 29 - }] - }]; - const result = await client.examples.batch(appId.body, "0.1", examples); - await client.apps.deleteMethod(appId.body); - chai.expect(examples.length).to.eql(result.length); - let pass = true; - for (let r of result) { - if (r.hasError) - pass = false; - - let found = false; - for (let e of examples) - if (e.text.toLowerCase() == r.value.utteranceText.toLowerCase()) - found = true; - - pass = (pass && found); - } - chai.expect(pass).to.be.true; - }); - }); - - - it("should add examples in batch with some invalid examples returning some errors", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.model.addIntent(appId.body, "0.1", { name: "WeatherInPlace" }); - await client.model.addEntity(appId.body, "0.1", { name: "Place" }); - let examples = [{ - text: "whats the weather in seattle?", - intentName: "InvalidIntent", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 29 - }] - }, { - text: "whats the weather in buenos aires?", - intentName: "IntentDoesNotExist", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 34 - }] - }]; - const result = await client.examples.batch(appId.body, "0.1", examples); - await client.apps.deleteMethod(appId.body); - chai.expect(examples.length).to.eql(result.length); - let pass = true; - for (let r of result) { - if (r.hasError) - pass = false; - } - chai.expect(pass).to.be.false; - }); - }); - - - it("should delete example", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let example = { - text: "Abuamra is awesome", - intentName: "None", - entityLabels: [] - }; - const result = await client.examples.add(appId.body, "0.1", example); - let exampleId = result.exampleId; - await client.examples.deleteMethod(appId.body, "0.1", exampleId); - const examples = await client.examples.list(appId.body, "0.1"); - await client.apps.deleteMethod(appId.body); - chai.expect(BaseTest.doesListContain(examples, "id", exampleId)).to.be.false; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/features.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/features.test.ts deleted file mode 100644 index c47725431bbf..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/features.test.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import * as fs from "fs"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - -describe("Features Module Functionality", () => { - it('should list features', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - await fs.readFile("test/SessionRecords/ImportApp.json", "utf-8", async (err, data) => { - if (err) { - throw err; - } - let app = JSON.parse(data); - let appId = await client.apps.importMethod(app, { appName: "features of LUIS App" }); - var versionId = "0.1"; - var features = await client.features.list(appId.body, versionId); - await client.apps.deleteMethod(appId.body); - chai.expect(features.patternFeatures.length > 0).to.be.true; - chai.expect(features.phraselistFeatures.length > 0).to.be.true; - }); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/featuresPhraseLists.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/featuresPhraseLists.test.ts deleted file mode 100644 index 3595a6a568b7..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/featuresPhraseLists.test.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import * as chai from "chai"; - -describe("featuresPhraseLists.test.ts", () => { - - it("should add phrase list", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const id = await client.features.addPhraseList(BaseTest.GlobalAppId, "0.1", { - name: "DayOfWeek", - phrases: "monday,tuesday,wednesday,thursday,friday,saturday,sunday", - isExchangeable: true - }); - const phrases = await client.features.getPhraseList(BaseTest.GlobalAppId, "0.1", id.body); - await client.features.deletePhraseList(BaseTest.GlobalAppId, "0.1", id.body); - chai.expect(phrases).not.to.be.null; - chai.expect(phrases.name).to.eq("DayOfWeek"); - chai.expect(phrases.phrases).to.eq("monday,tuesday,wednesday,thursday,friday,saturday,sunday") - }); - }); - - - it("should list phrase lists", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const id = await client.features.addPhraseList(BaseTest.GlobalAppId, "0.1", { - name: "DayOfWeek", - phrases: "monday,tuesday,wednesday,thursday,friday,saturday,sunday", - isExchangeable: true - }); - let phrases = await client.features.listPhraseLists(BaseTest.GlobalAppId, "0.1"); - await client.features.deletePhraseList(BaseTest.GlobalAppId, "0.1", id.body); - chai.expect(phrases).not.to.be.null; - chai.expect(phrases.length).not.to.eq(0); - }); - }); - - it("should get phrase list", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const id = await client.features.addPhraseList(BaseTest.GlobalAppId, "0.1", { - name: "DayOfWeek", - phrases: "monday,tuesday,wednesday,thursday,friday,saturday,sunday", - isExchangeable: true - }); - - const phrases = await client.features.getPhraseList(BaseTest.GlobalAppId, "0.1", id.body); - await client.features.deletePhraseList(BaseTest.GlobalAppId, "0.1", id.body); - chai.expect(phrases).not.to.be.null; - chai.expect(phrases.name).to.eq("DayOfWeek"); - chai.expect(phrases.isActive).to.eq(true); - chai.expect(phrases.isExchangeable).to.eq(true); - }); - }); - - - it("should update phrase list", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const id = await client.features.addPhraseList(BaseTest.GlobalAppId, "0.1", { - name: "DayOfWeek", - phrases: "monday,tuesday,wednesday,thursday,friday,saturday,sunday", - isExchangeable: true - }); - - await client.features.updatePhraseList(BaseTest.GlobalAppId, "0.1", id.body, { - phraselistUpdateObject: { - isActive: false, - name: "Month", - phrases: "january,february,march,april,may,june,july,august,september,october,november,december" - } - }); - - const phrases = await client.features.getPhraseList(BaseTest.GlobalAppId, "0.1", id.body); - await client.features.deletePhraseList(BaseTest.GlobalAppId, "0.1", id.body); - chai.expect(phrases).not.to.be.null; - chai.expect(phrases.name).to.eq("Month"); - chai.expect(phrases.phrases).to.eq("january,february,march,april,may,june,july,august,september,october,november,december"); - chai.expect(phrases.isActive).to.eq(false); - }); - }); - - it("should delete phrase list", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const id = await client.features.addPhraseList(BaseTest.GlobalAppId, "0.1", { - name: "DayOfWeek", - phrases: "monday,tuesday,wednesday,thursday,friday,saturday,sunday", - isExchangeable: true - }); - let phrase = await client.features.getPhraseList(BaseTest.GlobalAppId, "0.1", id.body); - await client.features.deletePhraseList(BaseTest.GlobalAppId, "0.1", id.body); - let phrases = await client.features.listPhraseLists(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(phrases, "id", id)).to.be.false; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/import_export.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/import_export.test.ts deleted file mode 100644 index c52021861915..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/import_export.test.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as fs from "fs"; -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - -describe("Import and Export Tests", () => { - it("should export version", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "LUIS App to be exported", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - const luisApp = await client.versions.exportMethod(appId.body, "0.1"); - await client.apps.deleteMethod(appId.body); - chai.expect(luisApp).to.exist; - chai.expect(luisApp.name).to.eql("LUIS App to be exported"); - }); - }); - - it("should import version", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - fs.readFile("test/SessionRecords/ImportApp.json", "utf-8", async (err, data) => { - if (err) { - throw err; - } - let app = JSON.parse(data); - const testAppId = await client.apps.add({ - name: "LUIS App to be exported", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - - const newVersion = await client.versions.importMethod(testAppId.body, app, { versionId: "0.2" }); - await client.apps.deleteMethod(testAppId.body); - - chai.expect(newVersion.body, "0.2"); - }); - }); - }); - - it("should import application", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - fs.readFile("test/SessionRecords/ImportApp.json", "utf-8", async (err, data) => { - if (err) { - throw err; - } - let app = JSON.parse(data); - var testAppId = await client.apps.importMethod(app, { appName: "Test Import LUIS App" }); - var testApp = await client.apps.get(testAppId.body); - await client.apps.deleteMethod(testAppId.body); - chai.expect(testApp).to.exist; - }); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/model.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/model.test.ts deleted file mode 100644 index a1cfad7068d7..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/model.test.ts +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; -import { HierarchicalEntityExtractor } from "../../src/models"; - - -describe("model Module Functionality", () => { - it('should list composite entities', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let childEntity = await client.model.addPrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, ["datetimeV2"]); - let entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["datetimeV2"], name: "CompositeTest" }); - let result = await client.model.listCompositeEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, childEntity[0].id); - chai.expect(result).not.to.be.null; - }); - }); - - it('should add composite entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let childEntity = await client.model.addPrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, ["datetimeV2"]); - let result = await client.model.addCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { name: "CompositeTest", children: ["datetimeV2"] }); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, result.body); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, childEntity[0].id); - - chai.expect(result.body != BaseTest.EmptyId); - - }); - - }); - - it('should get composite entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let childEntity = await client.model.addPrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, ["datetimeV2"]); - let entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["datetimeV2"], name: "CompositeTest" }); - let result = await client.model.getCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, childEntity[0].id); - chai.expect(result.id).not.to.eql(BaseTest.EmptyId); - }); - - }); - - it('should update composite entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let childEntity = await client.model.addPrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, ["datetimeV2"]); - let entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["datetimeV2"], name: "CompositeTest" }); - await client.model.updateCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body, { children: ["datetimeV2"], name: "CompositeTestUpdate" }); - - let entities = await client.model.listCompositeEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, childEntity[0].id); - - chai.expect(BaseTest.doesListContain(entities, "id", entityId.body)).to.be.true; - chai.expect(BaseTest.doesListContain(entities, "name", "CompositeTestUpdate")); - }); - - - }); - - it('should delete composite entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let childEntity = await client.model.addPrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, ["datetimeV2"]); - let entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { name: "CompositeTest", children: [childEntity[0].name] }); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - let entities = await client.model.listCompositeEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", childEntity[0].id); - chai.expect(BaseTest.doesListContain(entities, "id", entityId.body)).to.be.false; - }); - }); - - it('should add composite entity child', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let childEntityId = await client.model.addEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { name: "ChildTest" }); - let childEntityId2 = await client.model.addEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { name: "ChildTest2" }); - let entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["ChildTest"], name: "CompositeTest" }); - let result = await client.model.addCompositeEntityChild(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body, { name: "ChildTest2" }); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, childEntityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, childEntityId2.body); - chai.expect(result.body != BaseTest.EmptyId); - }); - - }); - - - it('should delete composite entity child', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let childEntity = await client.model.addPrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, ["datetimeV2"]); - let childEntity2 = await client.model.addPrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, ["number"]); - let entityId = await client.model.addCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: [childEntity[0].name, childEntity2[0].name], name: "CompositeTest" }); - let childEntityId = childEntity2[0].id; - - await client.model.deleteCompositeEntityChild(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body, childEntityId); - - let entities = await client.model.listCompositeEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteCompositeEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - - await client.model.deletePrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, childEntity[0].id); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, childEntity2[0].id); - - let found = false; - for (let e of entities) - for (let c of e.children) - if (e.id == entityId.body && c.id == childEntityId) - found = true; - chai.expect(found).to.be.false; - }); - - }); - - it('should list hierarchical entities', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["ChildTest"], name: "HierarchicalTest" }); - let result = await client.model.listHierarchicalEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - chai.expect(result).to.not.empty; - }); - - }); - - it('should add hierarchical entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["ChildTest"], name: "HierarchicalTest" }); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - - chai.expect(entityId.body).not.to.eql(BaseTest.EmptyId); - }); - - }); - - it('should get hierarchical entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["ChildTest"], name: "HierarchicalTest" }); - let result = await client.model.getHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - - chai.expect(result.id).not.to.eql(BaseTest.EmptyId); - }); - - }); - - it('should update hierarchical entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["ChildTest"], name: "HierarchicalTest" }); - await client.model.updateHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body, { children: ["ChildTest"], name: "HierarchicalTestUpdate" }); - let entities = await client.model.listHierarchicalEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - - chai.expect(BaseTest.doesListContain(entities, "id", entityId.body)).to.be.true; - chai.expect(BaseTest.doesListContain(entities, "name", "HierarchicalTestUpdate")).to.be.true; - }); - - }); - - it('should delete hierarchical entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["ChildTest"], name: "HierarchicalTest" }); - let entities = await client.model.listHierarchicalEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - - entities = await client.model.listHierarchicalEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - chai.expect(BaseTest.doesListContain(entities, "id", entityId.body)).to.be.false; - }); - - }); - - it('should get hierarchical entity child', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["ChildTest"], name: "HierarchicalTest" }); - let entity = await client.model.getHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - let result = await client.model.getHierarchicalEntityChild(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body, entity.children[0].id); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - - chai.expect(result.id).not.to.eql(BaseTest.EmptyId); - - }); - - }); - - it('should delete hierarchical entity child', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["ChildTest", "AnotherChildTest"], name: "HierarchicalTest" }); - let list = (await client.model.listHierarchicalEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId)); - let entity: HierarchicalEntityExtractor = null; - for (let o of list) - if (o.id == entityId.body) - entity = o; - let childEntityId = entity.children[0].id; - await client.model.deleteHierarchicalEntityChild(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body, childEntityId); - let entities = await client.model.listHierarchicalEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - let found = false; - for (let e of entities) - for (let c of e.children) - if (e.id == entityId.body && c.id == childEntityId) - found = true; - chai.expect(found).to.be.false; - }); - }); - - it('should update hierarchical entity child', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["ChildTest"], name: "HierarchicalTest" }); - let entity = await client.model.getHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - let childEntity = entity.children[entity.children.length - 1]; - - await client.model.updateHierarchicalEntityChild(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entity.id, childEntity.id, { name: "RenamedChildEntity" }); - - let entities = await client.model.listHierarchicalEntities(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - - let _entity: HierarchicalEntityExtractor = null; - for (let e of entities) { - if (e.id == entity.id) { - _entity = e; - } - } - let _childEntity = null; - for (let c of _entity.children) { - if (c.id == childEntity.id) - _childEntity = c; - } - chai.expect(_childEntity.name).to.eql("RenamedChildEntity"); - }); - }); - - it('should add hierarchical entity child', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let entityId = await client.model.addHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, { children: ["ChildTest"], name: "HierarchicalTest" }); - - let result = await client.model.addHierarchicalEntityChild(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body, { name: "NewChildEntity" }); - await client.model.deleteHierarchicalEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - - chai.expect(result.body).not.to.eql(BaseTest.EmptyId); - - }); - }); - - it('should list models', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = BaseTest.GlobalVersionId; - let entities = await client.model.listModels(BaseTest.GlobalAppId, versionId); - for (let entity of entities) { - let entityInfo = await client.model.getEntity(BaseTest.GlobalAppId, versionId, entity.id); - chai.expect(entity.name).to.eql(entityInfo.name); - } - }); - }); - -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelClosedLists.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelClosedLists.test.ts deleted file mode 100644 index 13f0b4a570fb..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelClosedLists.test.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - -var closedListSample = { - name: "States", - subLists: [ - { - canonicalForm: "New York", - list: ["NY", "New York"] - }, - { - canonicalForm: "Washington", - list: ["WA", "Washington"] - }, - { - canonicalForm: "California", - list: ["CA", "California", "Calif.", "Cal."] - } - ] -}; - - -describe("Model Closed Lists Tests", () => { - it("should list closed lists", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const result = await client.model.listClosedLists(BaseTest.GlobalAppId, "0.1"); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(result).to.have.length.above(0); - }); - }); - - it("should add closed list", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(listId).not.to.eql(BaseTest.EmptyId); - }); - }); - it("should get closed list", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const result = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(result.name).to.eql("States"); - chai.expect(result.subLists.length).to.eql(3); - }); - }); - - it("should update closed list", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.updateClosedList(BaseTest.GlobalAppId, "0.1", listId.body, { - name: "New States", subLists: [{ - canonicalForm: "Texas", - list: ["tx", "texas"] - }] - }); - const updated = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(updated.name).to.eql("New States"); - chai.expect(updated.subLists.length).to.eql(1); - chai.expect(updated.subLists[0].canonicalForm).to.eql("Texas"); - }); - }); - - it("should delete closed list", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - const lists = await client.model.listClosedLists(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(lists, "id", listId)).to.be.false; - }); - }); - - it("should patch closed list", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.patchClosedList(BaseTest.GlobalAppId, "0.1", listId.body, { - subLists: [{ - canonicalForm: "Texas", - list: ["tx", "texas"] - }, { - canonicalForm: "Florida", - list: ["fl", "florida"] - }] - }); - const list = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(list.subLists.length).to.eql(5); - chai.expect(BaseTest.doesListContain(list.subLists, "canonicalForm", "Texas")).to.be.true; - chai.expect(BaseTest.doesListContain(list.subLists, "canonicalForm", "Florida")).to.be.true; - }); - }); - - - - it("should add sublist", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.addSubList(BaseTest.GlobalAppId, "0.1", listId.body, { canonicalForm: "Texas", list: ["tx", "texas"] }); - const list = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(list.subLists.length).to.eql(4); - chai.expect(BaseTest.doesListContain(list.subLists, "canonicalForm", "Texas")).to.be.true; - }); - }); - - it("should delete sublist", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - let list = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - let sublistId = null; - for (var sublist of list.subLists) { - if (sublist.canonicalForm == "New York") { - sublistId = sublist.id; - } - } - await client.model.deleteSubList(BaseTest.GlobalAppId, "0.1", listId.body, sublistId); - list = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(list.subLists.length).to.eql(2); - chai.expect(BaseTest.doesListContain(list.subLists, "canonicalForm", "New York")).to.be.false; - }); - }); - - it("should update sublist", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const list = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - let sublistId = null; - for (var sublist of list.subLists) { - if (sublist.canonicalForm == "New York") { - sublistId = sublist.id; - } - } - await client.model.updateSubList(BaseTest.GlobalAppId, "0.1", listId.body, sublistId, { - canonicalForm: "New Yorkers", - list: ["NYC", "NY", "New York"], - }); - const newlist = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(newlist.subLists.length).to.eql(3); - chai.expect(BaseTest.doesListContain(newlist.subLists, "canonicalForm", "New York")).to.be.false; - chai.expect(BaseTest.doesListContain(newlist.subLists, "canonicalForm", "New Yorkers")).to.be.true; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelEntities.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelEntities.test.ts deleted file mode 100644 index 873c25b7fa8b..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelEntities.test.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - -describe("Model Entities Tests", () => { - - it("should list Entities", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "Existing Entity Test" }) - const results = await client.model.listEntities(BaseTest.GlobalAppId, "0.1"); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(results.length).not.to.eql(0); - chai.expect(BaseTest.doesListContain(results, "name", "Existing Entity Test")).to.be.true; - }); - }); - - - it("should get entity", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test" }) - const result = await client.model.getEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("New Entity Test"); - chai.expect(result.readableType).to.eql("Entity Extractor"); - }); "Suggestions Entity Test" - }); - - - it("should add entity", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test" }) - const result = await client.model.getEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("New Entity Test"); - chai.expect(result.readableType).to.eql("Entity Extractor"); - }) - }); - - it("should update entity", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "Rename Entity Test" }) - await client.model.updateEntity(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "Entity Test Renamed" }); - const result = await client.model.getEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("Entity Test Renamed"); - }); - }); - - it("should delete entity", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "Delete Entity Test" }) - - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - const results = await client.model.listEntities(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(results, "id", entityId)).to.be.false; - }); - }); - - it("should get entity suggestions returning empty", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "Suggestions Entity Test" }) - const results = await client.model.listEntitySuggestions(BaseTest.GlobalAppId, "0.1", entityId.body); - let cnt = 0; - for (var result of results) - for (var prediction of result.entityPredictions) - if (prediction.entityName == "Suggestions Entity Test") - cnt++; - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(cnt).to.eql(0); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelIntents.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelIntents.test.ts deleted file mode 100644 index ac0ab1adfe9f..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelIntents.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; - -describe("Model Intents Tests", () => { - it("should list intents", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const intents = await client.model.listIntents(BaseTest.GlobalAppId, "0.1"); - let checker: boolean = true; - for (var intent of intents) { - if (intent.readableType != "Intent Classifier") - checker = false; - } - chai.expect(checker).to.be.true; - }); - }); - - it("should add intent", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const newIntentId = await client.model.addIntent(BaseTest.GlobalAppId, "0.1", { name: "TestIntent" }); - const intents = await client.model.listIntents(BaseTest.GlobalAppId, "0.1"); - await client.model.deleteIntent(BaseTest.GlobalAppId, "0.1", newIntentId.body); - chai.expect(newIntentId).not.to.eql(BaseTest.EmptyId); - chai.expect(BaseTest.doesListContain(intents, "id", newIntentId.body)).to.be.true; - chai.expect(BaseTest.doesListContain(intents, "name", "TestIntent")).to.be.true; - }); - }); - - it("should get intent", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const newIntentId = await client.model.addIntent(BaseTest.GlobalAppId, "0.1", { name: "TestIntent" }); - const intent = await client.model.getIntent(BaseTest.GlobalAppId, "0.1", newIntentId.body); - await client.model.deleteIntent(BaseTest.GlobalAppId, "0.1", newIntentId.body); - chai.expect(intent.id).to.eql(newIntentId.body); - chai.expect(intent.name).to.eql("TestIntent"); - }); - }) - - it("should update intent", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const intentId = await client.model.addIntent(BaseTest.GlobalAppId, "0.1", { name: "TestIntent" }); - const intent = await client.model.getIntent(BaseTest.GlobalAppId, "0.1", intentId.body); - await client.model.updateIntent(BaseTest.GlobalAppId, "0.1", intentId.body, { name: "UpdateTest" }) - const newintent = await client.model.getIntent(BaseTest.GlobalAppId, "0.1", intentId.body); - await client.model.deleteIntent(BaseTest.GlobalAppId, "0.1", intentId.body); - chai.expect(intent.id).to.eql(newintent.id); - chai.expect(newintent.name).not.to.eql(intent.name); - chai.expect(newintent.name).to.eql("UpdateTest"); - }); - }); - - it("should delete intent", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const intentId = await client.model.addIntent(BaseTest.GlobalAppId, "0.1", { name: "TestIntent" }); - const intents = await client.model.listIntents(BaseTest.GlobalAppId, "0.1"); - await client.model.deleteIntent(BaseTest.GlobalAppId, "0.1", intentId.body); - const intentsWithoutDeleted = await client.model.listIntents(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(intents, "id", intentId.body)).to.be.true; - chai.expect(BaseTest.doesListContain(intentsWithoutDeleted, "id", intentId.body)).to.be.false; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPatternAny.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPatternAny.test.ts deleted file mode 100644 index f20d9dc7724f..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPatternAny.test.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { ModelGetPatternAnyEntityInfoResponse } from "../../src/models"; - - -describe("Model Patters Tests", () => { - - it("should list entities", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any entity", explicitList: ["item"] }); - const results = await client.model.listPatternAnyEntityInfos(BaseTest.GlobalAppId, "0.1"); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - let model: ModelGetPatternAnyEntityInfoResponse = null; - for (var result of results) { - if (result.name == "Pattern.Any entity") - model = result as ModelGetPatternAnyEntityInfoResponse; - } - chai.expect(model).not.to.be.null; - chai.expect(model.name).to.eql("Pattern.Any entity"); - chai.expect(model.explicitList[0].explicitListItem).to.eql("item"); - }); - }); - - - it("should get entity", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item"] }); - const result = await client.model.getPatternAnyEntityInfo(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("New Entity Test"); - chai.expect(result.readableType).to.eql("Pattern.Any Entity Extractor") - chai.expect(result.explicitList[0].explicitListItem).to.eql("item"); - }); - }); - - it("should add entity", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item"] }); - - const result = await client.model.getPatternAnyEntityInfo(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("New Entity Test"); - chai.expect(result.readableType).to.eql("Pattern.Any Entity Extractor") - chai.expect(result.explicitList[0].explicitListItem).to.eql("item"); - }); - }); - - - it("should update entity", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item"] }); - await client.model.updatePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body, { - name: "Entity Test Renamed", explicitList: ["item1"] - }); - const result = await client.model.getPatternAnyEntityInfo(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("Entity Test Renamed"); - chai.expect(result.readableType).to.eql("Pattern.Any Entity Extractor") - chai.expect(result.explicitList[0].explicitListItem).to.eql("item1"); - }); - }); - - - it("should delete entity", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item"] }); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - const results = await client.model.listPatternAnyEntityInfos(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(results, "id", entityId)).to.be.false; - }); - }); - - it("should get explicit list", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item1", "item2"] }); - const result = await client.model.getExplicitList(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(BaseTest.doesListContain(result, "explicitListItem", "item1")).to.be.true; - chai.expect(BaseTest.doesListContain(result, "explicitListItem", "item2")).to.be.true; - }); - }); - - - it("should add explicit list item", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item1"] }); - const itemId = await client.model.addExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, { explicitListItem: "item2" }); - const item = await client.model.getExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, itemId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(item).not.to.be.null; - chai.expect(item.explicitListItem).to.eql("item2"); - }); - }); - - - it("should get explicit list item", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: [] }); - const itemId = await client.model.addExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, { explicitListItem: "item" }); - const item = await client.model.getExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, itemId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(item).not.to.be.null; - chai.expect(item.explicitListItem).to.eql("item"); - }); - }); - - it("should update explicit list item", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: [] }); - const itemId = await client.model.addExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, { explicitListItem: "item" }); - await client.model.updateExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, itemId.body, { explicitListItem: "item1" }); - const item = await client.model.getExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, itemId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(item).not.to.be.null; - chai.expect(item.explicitListItem).to.eql("item1"); - }); - }); - - - it("should delete explicit list item", async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: [] }); - const itemId = await client.model.addExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, { explicitListItem: "item" }); - await client.model.deleteExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, itemId.body); - const list = await client.model.getExplicitList(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(list).not.to.be.null; - chai.expect(list).to.be.empty; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuiltDomain.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuiltDomain.test.ts deleted file mode 100644 index 7eea9596d998..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuiltDomain.test.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; - -describe("Model Prebuilt Domain Tests", () => { - it('should add custom prebuilt domain', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let results = await client.model.addCustomPrebuiltDomain(appId.body, version, { domainName: "Communication" }); - let prebuiltModels = await client.model.listCustomPrebuiltModels(appId.body, version); - await client.model.deleteCustomPrebuiltDomain(appId.body, version, "Communication"); - await client.apps.deleteMethod(appId.body); - // to check if prebuiltModels is subset of results - let fine = true; - for (let model of prebuiltModels) { - let found = false; - for (let result of results) - if (result == model.id) - found = true; - fine = (found && fine); - } - chai.expect(fine).to.be.true; - }); - }); - - it('should delete custom prebuilt domain', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let results = await client.model.addCustomPrebuiltDomain(appId.body, version, { domainName: "Communication" }); - let prebuiltModels = await client.model.listCustomPrebuiltModels(appId.body, version); - chai.expect(BaseTest.doesListContain(prebuiltModels, "customPrebuiltDomainName", "Communication")).to.be.true; - - await client.model.deleteCustomPrebuiltDomain(appId.body, version, "Communication") - - prebuiltModels = await client.model.listCustomPrebuiltModels(appId.body, version); - await client.apps.deleteMethod(appId.body); - chai.expect(BaseTest.doesListContain(prebuiltModels, "customPrebuiltDomainName", "Communication")).to.be.false; - - }); - }); - - it('should list custom prebuilt entities', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - - let results = await client.model.addCustomPrebuiltDomain(appId.body, version, { - domainName: "Communication" - }); - let prebuiltEntities = await client.model.listCustomPrebuiltEntities(appId.body, version); - await client.model.deleteCustomPrebuiltDomain(appId.body, version, "Communication") - await client.apps.deleteMethod(appId.body); - - chai.expect(BaseTest.doesListContain(prebuiltEntities, "customPrebuiltDomainName", "Communication")).to.be.true; - - - }); - }); - - it('should add custom prebuilt entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let guidModel = await client.model.addCustomPrebuiltEntity(appId.body, version, { - domainName: "Communication", - modelName: "Category" - }); - let prebuiltEntities = await client.model.listCustomPrebuiltEntities(appId.body, version); - await client.model.deleteEntity(appId.body, "0.1", guidModel.body); - await client.apps.deleteMethod(appId.body); - chai.expect(BaseTest.doesListContain(prebuiltEntities, "id", guidModel.body)).to.be.true; - }); - }); - - - it('should list custom prebuilt intents', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let results = await client.model.addCustomPrebuiltDomain(appId.body, version, { domainName: "Communication" }); - let prebuiltIntents = await client.model.listCustomPrebuiltIntents(appId.body, version); - await client.model.deleteCustomPrebuiltDomain(appId.body, version, "Communication") - await client.apps.deleteMethod(appId.body); - chai.expect(BaseTest.doesListContain(prebuiltIntents, "customPrebuiltDomainName", "Communication")).to.be.true; - }); - }); - - it('should add custom prebuilt intent', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let guidModel = await client.model.addCustomPrebuiltIntent(appId.body, version, { domainName: "Communication", modelName: "AddContact" }); - let prebuiltIntents = await client.model.listCustomPrebuiltIntents(appId.body, version); - await client.model.deleteIntent(appId.body, version, guidModel.body); - await client.apps.deleteMethod(appId.body); - chai.expect(BaseTest.doesListContain(prebuiltIntents, "id", guidModel.body)).to.be.true; - }); - }); - - it('should list custom prebuilt models', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let results = await client.model.addCustomPrebuiltDomain(appId.body, version, { domainName: "Communication" }); - let prebuiltModels = await client.model.listCustomPrebuiltModels(appId.body, version); - await client.model.deleteCustomPrebuiltDomain(appId.body, version, "Communication") - await client.apps.deleteMethod(appId.body); - let found: boolean = false; - for (let model of prebuiltModels) { - if (model.readableType == "Intent Classifier" || model.readableType == "Entity Extractor") - found = true; - } - chai.expect(found).to.be.true; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuilts.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuilts.test.ts deleted file mode 100644 index cfab7d88e1c4..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuilts.test.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - -describe("Model Prebuilts Tests", () => { - - it('should list prebuilt entities', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var version = "0.1"; - var prebuiltEntities = await client.model.listPrebuiltEntities(BaseTest.GlobalAppId, version); - chai.expect(prebuiltEntities).to.have.length.above(0); - }); - }); - - it('should list prebuilts', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var version = "0.1"; - var addedId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, version, ["number"]))[0].id; - var prebuiltEntities = await client.model.listPrebuilts(BaseTest.GlobalAppId, version); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, addedId); - chai.expect(prebuiltEntities).to.have.length.above(0); - chai.expect(BaseTest.doesListContain(prebuiltEntities, "readableType", "Prebuilt Entity Extractor")) - }); - }); - - it('should add prebuilt', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var version = "0.1"; - var prebuiltEntitiesToAdd = ["number", "ordinal"]; - var prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, version, prebuiltEntitiesToAdd); - for (var added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, added.id); - } - for (var entity of prebuiltEntitiesToAdd) { - chai.expect(BaseTest.doesListContain(prebuiltEntitiesAdded, "name", entity)).to.be.true; - } - }); - }); - - it('should get prebuilt', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var version = "0.1"; - var addedId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, version, ["number"]))[0].id; - var prebuiltEntity = await client.model.getPrebuilt(BaseTest.GlobalAppId, version, addedId); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, addedId); - chai.expect(addedId).to.eql(prebuiltEntity.id); - }); - }); - - it('should delete prebuilt', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var version = "0.1"; - var addedId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, version, ["number"]))[0].id; - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, addedId); - var prebuiltEntitiesWithoutDeleted = await client.model.listPrebuilts(BaseTest.GlobalAppId, version); - chai.expect(BaseTest.doesListContain(prebuiltEntitiesWithoutDeleted, "id", addedId)); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelRegexEntities.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelRegexEntities.test.ts deleted file mode 100644 index 3c1f916cc653..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelRegexEntities.test.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - -const regextEntitySample = { - name: "regex entity 1", - regexPattern: "regex pattern 1" -}; - - -describe("Model Regex Entities Tests", () => { - it('should get regex entities', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const regexEntityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regextEntitySample); - const regexEntities = await client.model.listRegexEntityInfos(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - chai.expect(regexEntities).not.to.be.null; - }); - }); - - - it('should create regex entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const regexEntityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regextEntitySample); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - chai.expect(regexEntityId.body).not.to.eql(BaseTest.EmptyId); - }); - }); - - - it('should get regex entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const regexEntityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regextEntitySample); - const regexEntity = await client.model.getRegexEntityEntityInfo(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - chai.expect(regexEntity.name).to.eql("regex entity 1"); - chai.expect(regexEntity.regexPattern).to.eql("regex pattern 1"); - }); - }); - - - it('should update regex entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const regexEntityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regextEntitySample); - await client.model.updateRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body, { name: "regex entity 2", regexPattern: "regex pattern 2" }); - const updatedRegexEntity = await client.model.getRegexEntityEntityInfo(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - chai.expect(updatedRegexEntity.name).to.eql("regex entity 2"); - chai.expect(updatedRegexEntity.regexPattern).to.eql("regex pattern 2"); - }); - }); - - it('should delete regex entity', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const regexEntityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regextEntitySample); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - const regexEntities = await client.model.listRegexEntityInfos(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - chai.expect(BaseTest.doesListContain(regexEntities, "id", regexEntityId.body)).to.be.false; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/patterns.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/patterns.test.ts deleted file mode 100644 index 491c0c8674c8..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/patterns.test.ts +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - -describe("Patterns Module Functionality Tests", () => { - it('should add pattern', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let version = "0.1"; - let prebuiltEntitiesToAdd = ["datetimeV2"] - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, version, prebuiltEntitiesToAdd); - let result = await client.pattern.addPattern(BaseTest.GlobalAppId, "0.1", { intent: "None", pattern: "This is a {datetimeV2}" }); - await client.pattern.deletePattern(BaseTest.GlobalAppId, "0.1", result.id); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, added.id); - } - chai.expect(result).not.to.be.null; - chai.expect(result.id).not.to.be.null; - chai.expect(result.intent).to.eql("None"); - chai.expect(result.pattern).to.eql("this is a {datetimeV2}"); - chai.expect(result.id).not.to.eql(BaseTest.EmptyId); - }); - }); - - it('should add patterns', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let version = "0.1"; - let prebuiltEntitiesToAdd = ["datetimeV2", "number"] - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, version, prebuiltEntitiesToAdd); - let patterns = [{ intent: "None", pattern: "This is a {number}" }, { intent: "None", pattern: "This is a {datetimeV2}" }] - let result = await client.pattern.batchAddPatterns(BaseTest.GlobalAppId, "0.1", patterns); - await client.pattern.deletePatterns(BaseTest.GlobalAppId, "0.1", result.map(p => p.id)); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, added.id); - } - chai.expect(result).not.to.be.null; - for (let pattern of result) { - chai.expect(pattern.id).not.to.be.null; - chai.expect(pattern.intent).to.eql("None"); - chai.expect(pattern.id).not.to.eql(BaseTest.EmptyId); - } - }); - }); - - it('should update pattern', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let version = "0.1"; - let prebuiltEntitiesToAdd = ["datetimeV2"] - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, version, prebuiltEntitiesToAdd); - let pattern = { intent: "None", pattern: "This is a {datetimeV2}" }; - let updatedPattern = { intent: "None", pattern: "This [is] a {datetimeV2}" }; - let addResult = await client.pattern.addPattern(BaseTest.GlobalAppId, "0.1", pattern); - let updateResult = await client.pattern.updatePattern(BaseTest.GlobalAppId, "0.1", addResult.id, updatedPattern); - await client.pattern.deletePattern(BaseTest.GlobalAppId, "0.1", addResult.id); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, added.id); - } - chai.expect(updateResult).not.to.be.null; - chai.expect(updateResult.id).not.to.be.null; - chai.expect(updateResult.intent).to.eql("None"); - chai.expect(updateResult.id).to.eql(addResult.id); - chai.expect(updateResult.id).not.to.eql(BaseTest.EmptyId); - chai.expect(updateResult.pattern).to.eql("this [is] a {datetimeV2}") - }); - }); - - it('should update patterns', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let version = "0.1"; - let prebuiltEntitiesToAdd = ["datetimeV2", "number"]; - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, version, prebuiltEntitiesToAdd); - let patterns = [{ intent: "None", pattern: "This is a {number}" }]; - let addResult = await client.pattern.batchAddPatterns(BaseTest.GlobalAppId, "0.1", patterns); - let updatedPatterns = [{ - intent: "None", pattern: "This [is] a {datetimeV2}", id: addResult[0].id - }] - let updateResult = await client.pattern.updatePatterns(BaseTest.GlobalAppId, "0.1", updatedPatterns); - await client.pattern.deletePatterns(BaseTest.GlobalAppId, "0.1", updateResult.map(p => p.id)); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, added.id); - } - chai.expect(updateResult).not.to.be.null; - chai.expect(updateResult[0].id).not.to.be.null; - chai.expect(updateResult[0].intent).to.eql("None"); - chai.expect(updateResult[0].id).not.to.eql(BaseTest.EmptyId); - chai.expect(updateResult[0].id).to.eql(addResult[0].id); - chai.expect(updateResult[0].intent).to.eql("None"); - chai.expect(updateResult[0].id).to.eql(addResult[0].id); - chai.expect(updateResult[0].pattern).to.eql("this [is] a {datetimeV2}"); - }); - }); - - it('should get patterns', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let version = "0.1"; - let prebuiltEntitiesToAdd = ["datetimeV2", "number"]; - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, version, prebuiltEntitiesToAdd); - let patternsToAdd = [{ intent: "None", pattern: "This is a {number}" }, { intent: "None", pattern: "This is a {datetimeV2}" }] - let result = await client.pattern.batchAddPatterns(BaseTest.GlobalAppId, "0.1", patternsToAdd); - let patterns = await client.pattern.listPatterns(BaseTest.GlobalAppId, "0.1"); - await client.pattern.deletePatterns(BaseTest.GlobalAppId, "0.1", result.map(p => p.id)); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, added.id); - } - chai.expect(patterns).to.be.exist; - chai.expect(patterns).not.to.be.empty; - for (let pattern of patterns) { - chai.expect(pattern.id).not.to.be.null; - chai.expect(pattern.intent).not.to.be.null; - chai.expect(pattern.pattern).not.to.be.null; - } - }); - }); - - - it('should get intent patterns', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let version = "0.1"; - let prebuiltEntitiesToAdd = ["datetimeV2", "number"] - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, version, prebuiltEntitiesToAdd); - let patternsToAdd = [{ intent: "None", pattern: "This is a {number}" }, { intent: "None", pattern: "This is a {datetimeV2}" }] - let result = await client.pattern.batchAddPatterns(BaseTest.GlobalAppId, "0.1", patternsToAdd); - let patterns = await client.pattern.listIntentPatterns(BaseTest.GlobalAppId, "0.1", BaseTest.GlobalNoneId); - await client.pattern.deletePatterns(BaseTest.GlobalAppId, "0.1", result.map(p => p.id)); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, added.id); - } - chai.expect(patterns).to.be.exist; - chai.expect(patterns).not.to.be.empty; - for (let pattern of patterns) { - chai.expect(pattern.id).not.to.be.null; - chai.expect(pattern.intent).not.to.be.null; - chai.expect(pattern.pattern).not.to.be.null; - chai.expect(pattern.intent).to.eql("None"); - } - }); - }); - - it('should delete pattern', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let version = "0.1"; - let prebuiltEntitiesToAdd = ["datetimeV2"] - - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, version, prebuiltEntitiesToAdd); - let pattern = { intent: "None", pattern: "This is a {datetimeV2}" }; - let result = await client.pattern.addPattern(BaseTest.GlobalAppId, "0.1", pattern); - await client.pattern.deletePattern(BaseTest.GlobalAppId, "0.1", result.id); - let existingPatterns = await client.pattern.listPatterns(BaseTest.GlobalAppId, "0.1"); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, added.id); - } - chai.expect(BaseTest.doesListContain(existingPatterns, "id", result.id)).not.to.be.true; - }); - }); - - it('should delete patterns', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let version = "0.1"; - let prebuiltEntitiesToAdd = ["datetimeV2", "number"]; - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, version, prebuiltEntitiesToAdd); - let patterns = [{ intent: "None", pattern: "This is a {number}" }, { intent: "None", pattern: "This is a {datetimeV2}" }] - - let result = await client.pattern.batchAddPatterns(BaseTest.GlobalAppId, "0.1", patterns); - await client.pattern.deletePatterns(BaseTest.GlobalAppId, "0.1", result.map(p => p.id)); - let existingPatterns = await client.pattern.listPatterns(BaseTest.GlobalAppId, "0.1"); - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, added.id); - } - - for (let p in result) { - chai.expect(BaseTest.doesListContain(existingPatterns, "id", p)).not.to.be.true; - } - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/pernissions.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/pernissions.test.ts deleted file mode 100644 index 1a0370515805..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/pernissions.test.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - -describe("Permissions Module Functionality Tests", () => { - - it('should list permissions', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - await client.permissions.update(BaseTest.GlobalAppId, { emails: ["guest@outlook.com", "invited.user@live.com"] }); - let result = await client.permissions.list(BaseTest.GlobalAppId); - await client.permissions.deleteMethod(BaseTest.GlobalAppId, { email: "guest@outlook.com" }); - await client.permissions.deleteMethod(BaseTest.GlobalAppId, { email: "invited.user@live.com" }); - chai.expect(result.owner).to.eql(BaseTest.OwnerEmail); - chai.expect(result.emails).to.eql(["guest@outlook.com", "invited.user@live.com"]) - }); - }); - - it('should add permissions', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - await client.permissions.add(BaseTest.GlobalAppId, { email: "guest@outlook.com" }); - let result = await client.permissions.list(BaseTest.GlobalAppId); - await client.permissions.deleteMethod(BaseTest.GlobalAppId, { email: "guest@outlook.com" }); - let found: boolean = false; - for (let e of result.emails) { - if (e == "guest@outlook.com") { - found = true; - } - } - chai.expect(found).to.be.true; - }); - }); - - it('should delete permissions', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - await client.permissions.add(BaseTest.GlobalAppId, { email: "guest@outlook.com" }); - await client.permissions.deleteMethod(BaseTest.GlobalAppId, { email: "guest@outlook.com" }); - let result = await client.permissions.list(BaseTest.GlobalAppId); - - let found: boolean = false; - for (let e of result.emails) { - if (e == "guest@outlook.com") { - found = true; - } - } - chai.expect(found).to.be.false; - - - }); - }); - - it('should update permission', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let collaborators = { emails: ["guest@outlook.com", "invited.user@live.com"] }; - await client.permissions.update(BaseTest.GlobalAppId, collaborators); - let result = await client.permissions.list(BaseTest.GlobalAppId); - await client.permissions.update(BaseTest.GlobalAppId, { emails: ["guest@outlook.com"] }); - chai.expect(result.emails).to.eql(collaborators.emails); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/train.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/train.test.ts deleted file mode 100644 index e7b71966a63e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/train.test.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { BaseTest } from "../baseTest"; -import { TrainGetStatusResponse } from "../../src/models"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; - - - -function checkStatus(statusArr: TrainGetStatusResponse) { - for (let s of statusArr) { - if (s.details.status != "Success" && s.details.status != "UpToDate") - return true; - } - return false; -} - - -describe("Train Module Functionality", () => { - - it('should get status', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = "0.1"; - await client.train.trainVersion(BaseTest.GlobalAppId, versionId); - let result = await client.train.getStatus(BaseTest.GlobalAppId, versionId); - - while (checkStatus(result)) { - await setTimeout(async () => { - result = await client.train.getStatus(BaseTest.GlobalAppId, versionId); - }, 1000); - } - - for (let trainResult of result) { - switch (trainResult.details.status) { - case "Success": - case "UpToDate": - chai.expect(trainResult.details.failureReason).not.to.be.exist; - break; - case "Fail": - case "InProgress": - default: - chai.expect(true).to.be.false; - break; - } - } - }); - }); - - it('should train version', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = "0.1"; - await client.train.trainVersion(BaseTest.GlobalAppId, versionId); - let result = await client.train.getStatus(BaseTest.GlobalAppId, versionId); - while (checkStatus(result)) { - setTimeout(async () => { - result = await client.train.getStatus(BaseTest.GlobalAppId, versionId); - }, 1000); - } - let secondTrainResult = await client.train.trainVersion(BaseTest.GlobalAppId, versionId); - chai.expect(secondTrainResult.status).to.eql("UpToDate"); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/versions.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/versions.test.ts deleted file mode 100644 index 7b5bbf483cba..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/versions.test.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - - -describe("Versions Module Functionality Tests", () => { - - it('should list all versions', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let results = await client.versions.list(BaseTest.GlobalAppId); - chai.expect(results.length > 0).to.be.true; - for (let version of results) { - chai.expect(version.version).not.to.be.null; - } - }); - }); - - it('should get version', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versions = await client.versions.list(BaseTest.GlobalAppId); - for (let version of versions) { - let result = await client.versions.get(BaseTest.GlobalAppId, version.version); - chai.expect(version.version).to.eql(result.version); - chai.expect(version.trainingStatus).to.eql(result.trainingStatus); - } - }); - }); - - it('should update version', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - await client.versions.update(BaseTest.GlobalAppId, first.version, { version: "test" }); - let versionsWithUpdate = await client.versions.list(BaseTest.GlobalAppId); - chai.expect(BaseTest.doesListContain(versionsWithUpdate, "version", "test")).to.be.true; - chai.expect(BaseTest.doesListContain(versionsWithUpdate, "version", first.version)).to.be.false; - await client.versions.update(BaseTest.GlobalAppId, "test", { version: first.version }); - }); - }); - - it('should delete version', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - let newVersion = await client.versions.clone(BaseTest.GlobalAppId, first.version, { version: "test" }); - let versionsWithTest = await client.versions.list(BaseTest.GlobalAppId); - chai.expect(BaseTest.doesListContain(versionsWithTest, "version", newVersion.body)).to.be.true; - await client.versions.deleteMethod(BaseTest.GlobalAppId, newVersion.body); - let versionsWithoutTest = await client.versions.list(BaseTest.GlobalAppId); - chai.expect(BaseTest.doesListContain(versionsWithoutTest, "version", newVersion.body)).to.be.false; - }); - }); - - it('should clone version', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - let testVersion = { version: "test" }; - chai.expect(BaseTest.doesListContain(versions, "version", testVersion.version)).to.be.false; - let newVersion = await client.versions.clone(BaseTest.GlobalAppId, first.version, testVersion); - let versionsWithTest = await client.versions.list(BaseTest.GlobalAppId); - chai.expect(BaseTest.doesListContain(versionsWithTest, "version", newVersion.body)).to.be.true; - await client.versions.deleteMethod(BaseTest.GlobalAppId, newVersion.body); - }); - }); - - - it('should list versions with error subsription key', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "401"; - await client.versions.list(BaseTest.GlobalAppId, { - customHeaders: { - "Ocp-Apim-Subscription-Key": "3eff76bb229942899255402725b72933" - } - }).catch(err => { - let error = err.body.error; - console.log(error); - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); - - it('should list versions with error app id', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "BadArgument"; - client.versions.list(BaseTest.GlobalAppIdError).catch(err => { - let error = err.body.error; - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); - - it('should get version with error version', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "BadArgument"; - let versions = await client.versions.list(BaseTest.GlobalAppId); - let errorVersion = versions[0].version + "_"; - client.versions.get(BaseTest.GlobalAppId, errorVersion).catch(err => { - let error = err.body.error; - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); - - it('should update version with error model', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "BadArgument"; - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - let versionToUpdate = { version: "" }; - - client.versions.update(BaseTest.GlobalAppId, first.version, versionToUpdate).catch(err => { - let error = err.body.error; - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); - - it('should delete version with error model', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "BadArgument"; - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - client.versions.deleteMethod(BaseTest.GlobalAppId, first.version + "0").catch(err => { - let error = err.body.error; - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); - - it('should clone version with error model', async () => { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "BadArgument"; - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - let testVersion = { version: "" }; - chai.expect(BaseTest.doesListContain(versions, "version", testVersion.version)); - client.versions.clone(BaseTest.GlobalAppId, first.version, testVersion).catch(err => { - let error = err.body.error; - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportApp.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportApp.json deleted file mode 100644 index 39b74ca47672..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportApp.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "luis_schema_version": "2.1.0", - "versionId": "0.1", - "name": "LuisBot", - "desc": "", - "culture": "en-us", - "intents": [ - { - "name": "dateintent" - }, - { - "name": "Help" - }, - { - "name": "None" - }, - { - "name": "SearchHotels" - }, - { - "name": "ShowHotelsReviews" - } - ], - "entities": [ - { - "name": "AirportCode" - }, - { - "name": "Hotel" - } - ], - "composites": [], - "closedLists": [], - "bing_entities": [ - "datetimeV2", - "geographyV2" - ], - "model_features": [ - { - "name": "Near", - "mode": true, - "words": "near,around,close,nearby", - "activated": true - }, - { - "name": "Show", - "mode": true, - "words": "show,find,look,search", - "activated": true - } - ], - "regex_features": [ - { - "name": "AirportCodeRegex", - "pattern": "[a-z]{3}", - "activated": true - } - ], - "utterances": [ - { - "text": "i need help", - "intent": "Help", - "entities": [] - }, - { - "text": "help me", - "intent": "Help", - "entities": [] - }, - { - "text": "tomorrow", - "intent": "dateintent", - "entities": [] - }, - { - "text": "search for hotels in seattle", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "what can i do?", - "intent": "Help", - "entities": [] - }, - { - "text": "next monday", - "intent": "dateintent", - "entities": [] - }, - { - "text": "next year", - "intent": "dateintent", - "entities": [] - }, - { - "text": "look for hotels in miami", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "show me hotels in california", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "show me the reviews of the amazing bot resort", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 23, - "endPos": 44 - } - ] - }, - { - "text": "can i see the reviews of extended bot hotel?", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 25, - "endPos": 42 - } - ] - }, - { - "text": "find reviews of hotelxya", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 16, - "endPos": 23 - } - ] - }, - { - "text": "show me reviews of the amazing hotel", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 19, - "endPos": 35 - } - ] - }, - { - "text": "what are the available options?", - "intent": "Help", - "entities": [] - }, - { - "text": "best hotels in seattle", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "hotels in los angeles", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "can you show me hotels from los angeles?", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "can you show me the reviews of the amazing resort & hotel", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 31, - "endPos": 56 - } - ] - }, - { - "text": "what are the reviews of the hotel bot framework?", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 24, - "endPos": 46 - } - ] - }, - { - "text": "find hotels near eze", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 17, - "endPos": 19 - } - ] - }, - { - "text": "where can i stay near nnn?", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 22, - "endPos": 24 - } - ] - }, - { - "text": "show hotels near att airport", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 17, - "endPos": 19 - } - ] - }, - { - "text": "find hotels near agl", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 17, - "endPos": 19 - } - ] - }, - { - "text": "find hotels around eze airport", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 19, - "endPos": 21 - } - ] - }, - { - "text": "01/7", - "intent": "dateintent", - "entities": [] - } - ] -} \ No newline at end of file diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/baseTest.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/baseTest.ts deleted file mode 100644 index fe3f9dddd3a7..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/baseTest.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import { CognitiveServicesCredentials } from "@azure/ms-rest-azure-js"; -import { LUISAuthoringClient } from "../src/lUISAuthoringClient"; - -export class BaseTest { - static GlobalAppId = process.env['global_app_id']; - static GlobalVersionId = "0.1"; - static GlobalAppIdError = process.env['global_app_id_error']; - static GlobalNoneId = process.env['global_none_id']; - static AuthoringKey = process.env['authoring_key']; - static EmptyId = "00000000-0000-0000-0000-000000000000"; - static OwnerEmail = process.env['owner_email']; - - static async useClientFor(test) { - let client = new LUISAuthoringClient( - new CognitiveServicesCredentials(this.AuthoringKey), - "https://westus.api.cognitive.microsoft.com" - ); - await test(client); - } - - static doesListContain(list: any[], key: string, value: any) { - let found = false; - for (var item of list) { - if (item[key] == value) { - found = true; - } - } - return found; - } -} diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.test.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.test.json deleted file mode 100644 index 9b7a87806063..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.test.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "moduleResolution": "node", - "strict": true, - "target": "es5", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./esm", - "importHelpers": true - }, - "include": [ - "./test/**/*.ts" - ], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index a4f763911359..0387101043cb 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -5,7 +5,8 @@ "typescript": "", "license-header": "MICROSOFT_MIT_NO_VERSION", "sdkrel:typescript-sdks-folder": ".", - "use": "@microsoft.azure/autorest.typescript@4.1.1" + "typescript.clear-output-folder": "", + "use": "@microsoft.azure/autorest.typescript@4.2.2" }, "advanced_options": { "clone_dir": "./azure-sdk-for-js",