diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt b/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md b/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md index dbfde7e80912..273e667adeb7 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md @@ -2,11 +2,6 @@ This package contains an isomorphic SDK for LUISAuthoringClient. -Package version | LUIS Authoring API version ---------------- | -------------------------- -3.0.0 | /luis/api/v2.0 -4.0.0-preview.2 | /luis/authoring/v3.0-preview - ### Currently supported environments - Node.js version 6.x.x or higher @@ -22,83 +17,81 @@ npm install @azure/cognitiveservices-luis-authoring #### 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 - .listPhraseLists(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 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 + @@ -109,4 +102,4 @@ client.features - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcognitiveservices%2Fcognitiveservices-luis-authoring%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.png) diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json index b7de5ee6d9da..3c48fe53f88a 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": "4.0.0-preview.2", "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 25387e1c881a..b37af1626a2f 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js @@ -22,9 +22,8 @@ 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. */` diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts index 103308078b05..6f42b8b56a1e 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts @@ -22,7 +22,6 @@ class LUISAuthoringClient extends LUISAuthoringClientContext { apps: operations.Apps; versions: operations.Versions; train: operations.Train; - permissions: operations.Permissions; pattern: operations.Pattern; settings: operations.Settings; azureAccounts: operations.AzureAccounts; @@ -42,7 +41,6 @@ class LUISAuthoringClient extends LUISAuthoringClientContext { this.apps = new operations.Apps(this); this.versions = new operations.Versions(this); this.train = new operations.Train(this); - this.permissions = new operations.Permissions(this); this.pattern = new operations.Pattern(this); this.settings = new operations.Settings(this); this.azureAccounts = new operations.AzureAccounts(this); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts index 3ae7804c810a..cd702108eb6c 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 02170a2a2818..6f0cd86cc21b 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.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/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 d58acc7b47f7..e566b87203bf 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.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/index.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts index 4139d2548fe4..dad9baf5315a 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.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. @@ -30,6 +29,10 @@ export interface EntityLabelObject { * The role the entity plays in the utterance. */ role?: string; + /** + * The identified entities within the example utterance. + */ + children?: EntityLabelObject[]; } /** @@ -183,6 +186,7 @@ export interface JSONEntity { * The role the entity plays in the utterance. */ role?: string; + children?: JSONEntity[]; } /** @@ -677,6 +681,10 @@ export interface PatternRule { * Exported Model - An exported LUIS Application. */ export interface LuisAppV2 { + /** + * Luis schema deserialization version. + */ + luisSchemaVersion?: string; /** * The name of the application. */ @@ -709,10 +717,6 @@ export interface LuisAppV2 { * List of composite entities. */ composites?: HierarchicalModelV2[]; - /** - * List of hierarchical entities. - */ - hierarchicals?: HierarchicalModelV2[]; /** * List of Pattern.Any entities. */ @@ -732,7 +736,7 @@ export interface LuisAppV2 { /** * List of model features. */ - phraselists?: JSONModelFeature[]; + modelFeatures?: JSONModelFeature[]; /** * List of patterns. */ @@ -845,6 +849,7 @@ export interface EntityLabel { * The role id for the predicted entity. */ roleId?: string; + children?: EntityLabel[]; } /** @@ -881,6 +886,7 @@ export interface EntityPrediction { * The actual token(s) that comprise the entity. */ phrase: string; + children?: EntityPrediction[]; } /** @@ -1963,6 +1969,7 @@ export interface ModelFeatureInformation { * The name of the feature used. */ featureName?: string; + isRequired?: boolean; } /** @@ -2050,6 +2057,26 @@ export interface FeaturesUpdatePhraseListOptionalParams extends msRest.RequestOp phraselistUpdateObject?: PhraselistUpdateObject; } +/** + * Optional Parameters. + */ +export interface ExamplesAddOptionalParams extends msRest.RequestOptionsBase { + /** + * Toggles nested/flat format. Default value: false. + */ + enableNestedChildren?: boolean; +} + +/** + * Optional Parameters. + */ +export interface ExamplesBatchOptionalParams extends msRest.RequestOptionsBase { + /** + * Toggles nested/flat format. Default value: false. + */ + enableNestedChildren?: boolean; +} + /** * Optional Parameters. */ @@ -2062,6 +2089,10 @@ export interface ExamplesListOptionalParams extends msRest.RequestOptionsBase { * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. */ take?: number; + /** + * Toggles nested/flat format. Default value: false. + */ + enableNestedChildren?: boolean; } /** @@ -2195,6 +2226,10 @@ export interface ModelListIntentSuggestionsOptionalParams extends msRest.Request * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. */ take?: number; + /** + * Toggles nested/flat format. Default value: false. + */ + enableNestedChildren?: boolean; } /** @@ -2205,6 +2240,10 @@ export interface ModelListEntitySuggestionsOptionalParams extends msRest.Request * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. */ take?: number; + /** + * Toggles nested/flat format. Default value: false. + */ + enableNestedChildren?: boolean; } /** @@ -2284,7 +2323,7 @@ export interface AppsImportV2AppOptionalParams extends msRest.RequestOptionsBase /** * Optional Parameters. */ -export interface AppsImportLuFromatOptionalParams extends msRest.RequestOptionsBase { +export interface AppsImportLuFormatOptionalParams extends msRest.RequestOptionsBase { /** * The application name to create. If not specified, the application name will be read from the * imported object. If the application name already exists, an error is returned. @@ -5627,9 +5666,9 @@ export type AppsImportV2AppResponse = { }; /** - * Contains response data for the importLuFromat operation. + * Contains response data for the importLuFormat operation. */ -export type AppsImportLuFromatResponse = { +export type AppsImportLuFormatResponse = { /** * The parsed response body. */ @@ -5937,86 +5976,6 @@ export type TrainGetStatusResponse = Array & { }; }; -/** - * Contains response data for the list operation. - */ -export type PermissionsListResponse = UserAccessList & { - /** - * 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: UserAccessList; - }; -}; - -/** - * Contains response data for the add operation. - */ -export type PermissionsAddResponse = 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 deleteMethod operation. - */ -export type PermissionsDeleteMethodResponse = 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 update operation. - */ -export type PermissionsUpdateResponse = 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 addPattern operation. */ diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts index dffaf4a24fa0..e7ae8f3266ff 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.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. @@ -42,6 +41,18 @@ export const EntityLabelObject: msRest.CompositeMapper = { type: { name: "String" } + }, + children: { + serializedName: "children", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EntityLabelObject" + } + } + } } } } @@ -298,6 +309,18 @@ export const JSONEntity: msRest.CompositeMapper = { type: { name: "String" } + }, + children: { + serializedName: "children", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JSONEntity" + } + } + } } } } @@ -1289,6 +1312,12 @@ export const LuisAppV2: msRest.CompositeMapper = { name: "Composite", className: "LuisAppV2", modelProperties: { + luisSchemaVersion: { + serializedName: "luis_schema_version", + type: { + name: "String" + } + }, name: { serializedName: "name", type: { @@ -1361,18 +1390,6 @@ export const LuisAppV2: msRest.CompositeMapper = { } } }, - hierarchicals: { - serializedName: "hierarchicals", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HierarchicalModelV2" - } - } - } - }, patternAnyEntities: { serializedName: "patternAnyEntities", type: { @@ -1421,8 +1438,8 @@ export const LuisAppV2: msRest.CompositeMapper = { } } }, - phraselists: { - serializedName: "phraselists", + modelFeatures: { + serializedName: "model_features", type: { name: "Sequence", element: { @@ -1687,6 +1704,18 @@ export const EntityLabel: msRest.CompositeMapper = { type: { name: "Uuid" } + }, + children: { + serializedName: "children", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EntityLabel" + } + } + } } } } @@ -1747,6 +1776,18 @@ export const EntityPrediction: msRest.CompositeMapper = { type: { name: "String" } + }, + children: { + serializedName: "children", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EntityPrediction" + } + } + } } } } @@ -3787,6 +3828,12 @@ export const ModelFeatureInformation: msRest.CompositeMapper = { type: { name: "String" } + }, + isRequired: { + serializedName: "isRequired", + type: { + name: "Boolean" + } } } } diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts index f987ec4c95ab..8f5d95f9f58e 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.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/parameters.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts index 523f98cc1d94..917c34b5492c 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts @@ -107,6 +107,19 @@ export const domainName: msRest.OperationURLParameter = { } } }; +export const enableNestedChildren: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "enableNestedChildren" + ], + mapper: { + serializedName: "enableNestedChildren", + defaultValue: false, + type: { + name: "Boolean" + } + } +}; export const endpoint: msRest.OperationURLParameter = { parameterPath: "endpoint", mapper: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts index 778a7cb98895..9f1faa030ec8 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.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/settingsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.ts index d74e113055f1..d63ba99f76e8 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.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/trainMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.ts index 590e1033b18e..e1343a5e9476 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.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/versionsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.ts index 2062726dc097..e0b06f95b292 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.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/operations/apps.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts index 7aab12d4054d..7cec0c738a67 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts @@ -690,30 +690,30 @@ export class Apps { /** * Imports an application to LUIS, the application's structure is included in the request body. - * @param luisApplu A LUIS application structure. + * @param luisAppLu A LUIS application structure. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - importLuFromat(luisApplu: string, options?: Models.AppsImportLuFromatOptionalParams): Promise; + importLuFormat(luisAppLu: string, options?: Models.AppsImportLuFormatOptionalParams): Promise; /** - * @param luisApplu A LUIS application structure. + * @param luisAppLu A LUIS application structure. * @param callback The callback */ - importLuFromat(luisApplu: string, callback: msRest.ServiceCallback): void; + importLuFormat(luisAppLu: string, callback: msRest.ServiceCallback): void; /** - * @param luisApplu A LUIS application structure. + * @param luisAppLu A LUIS application structure. * @param options The optional parameters * @param callback The callback */ - importLuFromat(luisApplu: string, options: Models.AppsImportLuFromatOptionalParams, callback: msRest.ServiceCallback): void; - importLuFromat(luisApplu: string, options?: Models.AppsImportLuFromatOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + importLuFormat(luisAppLu: string, options: Models.AppsImportLuFormatOptionalParams, callback: msRest.ServiceCallback): void; + importLuFormat(luisAppLu: string, options?: Models.AppsImportLuFormatOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - luisApplu, + luisAppLu, options }, - importLuFromatOperationSpec, - callback) as Promise; + importLuFormatOperationSpec, + callback) as Promise; } } @@ -1304,7 +1304,7 @@ const importV2AppOperationSpec: msRest.OperationSpec = { serializer }; -const importLuFromatOperationSpec: msRest.OperationSpec = { +const importLuFormatOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "apps/import", urlParameters: [ @@ -1314,10 +1314,10 @@ const importLuFromatOperationSpec: msRest.OperationSpec = { Parameters.appName ], requestBody: { - parameterPath: "luisApplu", + parameterPath: "luisAppLu", mapper: { required: true, - serializedName: "luisApplu", + serializedName: "luisAppLu", type: { name: "String" } diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts index 4e2903a5248a..628db60409d5 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts @@ -34,7 +34,7 @@ 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?: Models.ExamplesAddOptionalParams): Promise; /** * @param appId The application ID. * @param versionId The version ID. @@ -49,8 +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: Models.ExamplesAddOptionalParams, callback: msRest.ServiceCallback): void; + add(appId: string, versionId: string, exampleLabelObject: Models.ExampleLabelObject, options?: Models.ExamplesAddOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -70,7 +70,7 @@ 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?: Models.ExamplesBatchOptionalParams): Promise; /** * @param appId The application ID. * @param versionId The version ID. @@ -85,8 +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: Models.ExamplesBatchOptionalParams, callback: msRest.ServiceCallback): void; + batch(appId: string, versionId: string, exampleLabelObjectArray: Models.ExampleLabelObject[], options?: Models.ExamplesBatchOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -177,6 +177,9 @@ const addOperationSpec: msRest.OperationSpec = { Parameters.appId, Parameters.versionId0 ], + queryParameters: [ + Parameters.enableNestedChildren + ], requestBody: { parameterPath: "exampleLabelObject", mapper: { @@ -203,6 +206,9 @@ const batchOperationSpec: msRest.OperationSpec = { Parameters.appId, Parameters.versionId0 ], + queryParameters: [ + Parameters.enableNestedChildren + ], requestBody: { parameterPath: "exampleLabelObjectArray", mapper: { @@ -265,7 +271,8 @@ const listOperationSpec: msRest.OperationSpec = { ], queryParameters: [ Parameters.skip, - Parameters.take + Parameters.take, + Parameters.enableNestedChildren ], responses: { 200: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts index 213f356bb13f..5d8f0ff7239e 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts @@ -14,7 +14,6 @@ export * from "./model"; export * from "./apps"; export * from "./versions"; export * from "./train"; -export * from "./permissions"; export * from "./pattern"; export * from "./settings"; export * from "./azureAccounts"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts index 3f8a3ece765b..22317a290eb2 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts @@ -5365,7 +5365,8 @@ const listIntentSuggestionsOperationSpec: msRest.OperationSpec = { Parameters.intentId ], queryParameters: [ - Parameters.take + Parameters.take, + Parameters.enableNestedChildren ], responses: { 200: { @@ -5399,7 +5400,8 @@ const listEntitySuggestionsOperationSpec: msRest.OperationSpec = { Parameters.entityId ], queryParameters: [ - Parameters.take + Parameters.take, + Parameters.enableNestedChildren ], responses: { 200: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts index b798aa11f7d9..60b2c6ff4e9d 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts @@ -689,9 +689,7 @@ const exportLuFormatOperationSpec: msRest.OperationSpec = { } } }, - default: { - bodyMapper: Mappers.ErrorResponse - } + default: {} }, serializer };