diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt b/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt index b73b4a1293c3..2d3163745319 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) 2021 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 7c5bfb93e503..81a5cb0f3502 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md @@ -1,69 +1,72 @@ ## An isomorphic javascript sdk for - LUISAuthoringClient -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.3 | /luis/authoring/v3.0-preview +This package contains an isomorphic SDK (runs both in node.js and in browsers) for LUISAuthoringClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +You must have an [Azure subscription](https://azure.microsoft.com/free/). -### How to Install +### How to install +To use this SDK in your project, you will need to install two packages. +- `@azure/cognitiveservices-luis-authoring` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/cognitiveservices-luis-authoring +npm install --save @azure/cognitiveservices-luis-authoring @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. ### How to use -#### nodejs - Authentication, client creation and listPhraseLists features as an example written in TypeScript. - -##### Install @azure/ms-rest-azure-js +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -```bash -npm install @azure/ms-rest-azure-js -``` +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and listPhraseLists features as an example written in JavaScript. ##### Sample code ```javascript -const { CognitiveServicesCredentials } = require("@azure/ms-rest-azure-js"); +const { DefaultAzureCredential } = require("@azure/identity"); const { LUISAuthoringClient } = require("@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/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 subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +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); - }); +client.features.listPhraseLists(appId, versionId, skip, take).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); ``` -#### browser - Authentication, client creation and listPhraseLists features as an example written in JavaScript. +#### browser - Authentication, client creation, and listPhraseLists features as an example written in JavaScript. +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code @@ -74,31 +77,28 @@ client.features @azure/cognitiveservices-luis-authoring sample - @@ -109,4 +109,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 90a8146c7d0c..052a2d69ae92 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json @@ -4,7 +4,8 @@ "description": "LUISAuthoringClient Library with typescript type definitions for node.js and browser.", "version": "4.0.0-preview.3", "dependencies": { - "@azure/ms-rest-js": "^2.0.3", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -19,20 +20,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.6.0", + "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/main/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 +51,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..b69df658f298 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js @@ -21,10 +21,9 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * * 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 6f42b8b56a1e..1906506a5dc0 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -31,9 +30,14 @@ class LUISAuthoringClient extends LUISAuthoringClientContext { * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: * https://westus.api.cognitive.microsoft.com). * @param credentials Subscription credentials which uniquely identify client subscription. + * Credentials implementing the TokenCredential interface from the @azure/identity package are + * recommended. For more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, endpoint: string, options?: msRest.ServiceClientOptions) { super(credentials, endpoint, options); this.features = new operations.Features(this); this.examples = new operations.Examples(this); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts index 52484b1a316e..227095787f82 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -15,16 +14,21 @@ const packageVersion = "4.0.0-preview.3"; export class LUISAuthoringClientContext extends msRest.ServiceClient { endpoint: string; - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; /** * Initializes a new instance of the LUISAuthoringClientContext class. * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: * https://westus.api.cognitive.microsoft.com). * @param credentials Subscription credentials which uniquely identify client subscription. + * Credentials implementing the TokenCredential interface from the @azure/identity package are + * recommended. For more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, endpoint: string, options?: msRest.ServiceClientOptions) { if (endpoint == undefined) { throw new Error("'endpoint' cannot be null."); } @@ -43,7 +47,7 @@ export class LUISAuthoringClientContext extends msRest.ServiceClient { super(credentials, options); - this.baseUri = "{Endpoint}/luis/authoring/v3.0-preview"; + this.baseUri = "{Endpoint}/luis/authoring/v3.0"; 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 3ae7804c810a..f0243eeb6a7d 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. - * + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * * 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..1b06e0513556 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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..bdae3b0ea13e 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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..24fa9c555e9b 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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 20bf040052e1..e39f6160fa3e 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -456,6 +455,10 @@ export interface ClosedListModelUpdateObject { * The new name of the list entity. */ name?: string; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; } /** @@ -470,6 +473,10 @@ export interface ClosedListModelCreateObject { * Name of the list entity. */ name?: string; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; } /** @@ -1000,6 +1007,10 @@ export interface ModelInfo { * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; } /** @@ -1086,6 +1097,10 @@ export interface ModelInfoResponse { * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType2; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; roles?: EntityRole[]; /** * List of child entities. @@ -1140,6 +1155,10 @@ export interface HierarchicalEntityExtractor { * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType3; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; roles?: EntityRole[]; /** * List of child entities. @@ -1170,6 +1189,10 @@ export interface CompositeEntityExtractor { * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType4; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; roles?: EntityRole[]; /** * List of child entities. @@ -1200,6 +1223,10 @@ export interface ClosedListEntityExtractor { * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType5; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; roles?: EntityRole[]; /** * List of sublists. @@ -1230,6 +1257,10 @@ export interface PrebuiltEntityExtractor { * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType6; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; roles?: EntityRole[]; } @@ -1262,6 +1293,10 @@ export interface CustomPrebuiltModel { * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType7; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; /** * The domain name. */ @@ -1310,6 +1345,10 @@ export interface EntityExtractor { * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ readableType: ReadableType8; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; roles?: EntityRole[]; /** * The domain name. @@ -1324,27 +1363,7 @@ export interface EntityExtractor { /** * 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[]; +export interface NDepthEntityExtractor extends ModelInfo { /** * The domain name. */ @@ -1891,7 +1910,11 @@ export interface RegexEntityExtractor { * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ - readableType: ReadableType10; + readableType: ReadableType9; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; roles?: EntityRole[]; /** * The Regular Expression entity pattern. @@ -1921,7 +1944,11 @@ export interface PatternAnyEntityExtractor { * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', * 'Closed List Entity Extractor', 'Regex Entity Extractor' */ - readableType: ReadableType11; + readableType: ReadableType10; + /** + * Enables the fuzzy matching for the list of entities + */ + fuzzyMatchingEnabled?: boolean; roles?: EntityRole[]; explicitList?: ExplicitListItem[]; } @@ -2379,6 +2406,16 @@ export interface VersionsImportLuFormatOptionalParams extends msRest.RequestOpti versionId?: string; } +/** + * Optional Parameters. + */ +export interface TrainTrainVersionOptionalParams extends msRest.RequestOptionsBase { + /** + * An enum value specifying mode of training. + */ + mode?: string; +} + /** * Optional Parameters. */ @@ -2574,17 +2611,6 @@ export type ReadableType7 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hie */ 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. * Possible values include: 'Queued', 'InProgress', 'UpToDate', 'Fail', 'Success' @@ -2602,7 +2628,7 @@ export type Status = 'Queued' | 'InProgress' | 'UpToDate' | 'Fail' | 'Success'; export type Status1 = 'Queued' | 'InProgress' | 'UpToDate' | 'Fail' | 'Success'; /** - * Defines values for ReadableType10. + * 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', @@ -2610,10 +2636,10 @@ export type Status1 = 'Queued' | 'InProgress' | 'UpToDate' | 'Fail' | 'Success'; * @readonly * @enum {string} */ -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'; +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 ReadableType11. + * 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', @@ -2621,7 +2647,7 @@ export type ReadableType10 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hi * @readonly * @enum {string} */ -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'; +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'; /** * Contains response data for the addPhraseList operation. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts index eed8c3c2ea32..a8813b0f515b 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -785,6 +784,13 @@ export const ClosedListModelUpdateObject: msRest.CompositeMapper = { type: { name: "String" } + }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } } } } @@ -813,6 +819,13 @@ export const ClosedListModelCreateObject: msRest.CompositeMapper = { type: { name: "String" } + }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } } } } @@ -2034,6 +2047,13 @@ export const ModelInfo: msRest.CompositeMapper = { type: { name: "String" } + }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } } } } @@ -2168,6 +2188,13 @@ export const ModelInfoResponse: msRest.CompositeMapper = { name: "String" } }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } + }, roles: { serializedName: "roles", type: { @@ -2293,6 +2320,13 @@ export const HierarchicalEntityExtractor: msRest.CompositeMapper = { name: "String" } }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } + }, roles: { serializedName: "roles", type: { @@ -2353,6 +2387,13 @@ export const CompositeEntityExtractor: msRest.CompositeMapper = { name: "String" } }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } + }, roles: { serializedName: "roles", type: { @@ -2413,6 +2454,13 @@ export const ClosedListEntityExtractor: msRest.CompositeMapper = { name: "String" } }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } + }, roles: { serializedName: "roles", type: { @@ -2473,6 +2521,13 @@ export const PrebuiltEntityExtractor: msRest.CompositeMapper = { name: "String" } }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } + }, roles: { serializedName: "roles", type: { @@ -2532,6 +2587,13 @@ export const CustomPrebuiltModel: msRest.CompositeMapper = { name: "String" } }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } + }, customPrebuiltDomainName: { serializedName: "customPrebuiltDomainName", type: { @@ -2615,6 +2677,13 @@ export const EntityExtractor: msRest.CompositeMapper = { name: "String" } }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } + }, roles: { serializedName: "roles", type: { @@ -2649,44 +2718,7 @@ export const NDepthEntityExtractor: msRest.CompositeMapper = { name: "Composite", className: "NDepthEntityExtractor", modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - }, + ...ModelInfo.type.modelProperties, customPrebuiltDomainName: { serializedName: "customPrebuiltDomainName", type: { @@ -3680,6 +3712,13 @@ export const RegexEntityExtractor: msRest.CompositeMapper = { name: "String" } }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } + }, roles: { serializedName: "roles", type: { @@ -3734,6 +3773,13 @@ export const PatternAnyEntityExtractor: msRest.CompositeMapper = { name: "String" } }, + fuzzyMatchingEnabled: { + nullable: true, + serializedName: "fuzzyMatchingEnabled", + type: { + name: "Boolean" + } + }, roles: { serializedName: "roles", type: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts index f987ec4c95ab..38b46d722205 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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 917c34b5492c..0b203d28e087 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -217,6 +216,18 @@ export const itemId: msRest.OperationURLParameter = { } } }; +export const mode: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "mode" + ], + mapper: { + serializedName: "mode", + type: { + name: "String" + } + } +}; export const modelId: msRest.OperationURLParameter = { parameterPath: "modelId", 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..3003a62cad84 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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..b6edae782d27 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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..7d0be1b60941 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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..d21309f46b1a 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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 7cec0c738a67..8cf8a9c08d3f 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts index 2fffd278dd2f..9b64c049df99 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts index 628db60409d5..811596774c03 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts index 3af65368a0fa..23093f748fbd 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts index 5d8f0ff7239e..fb742889c422 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts index 22317a290eb2..f8abf15edcdf 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts index 3ad7620eff42..f3503c88af6a 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts index d4d28d088bc1..1a6f0ce1f494 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts index 53d2c9848983..e47a370fefa1 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -37,7 +36,7 @@ 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?: Models.TrainTrainVersionOptionalParams): Promise; /** * @param appId The application ID. * @param versionId The version ID. @@ -50,8 +49,8 @@ export class Train { * @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: Models.TrainTrainVersionOptionalParams, callback: msRest.ServiceCallback): void; + trainVersion(appId: string, versionId: string, options?: Models.TrainTrainVersionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -108,6 +107,9 @@ const trainVersionOperationSpec: msRest.OperationSpec = { Parameters.appId, Parameters.versionId0 ], + queryParameters: [ + Parameters.mode + ], responses: { 202: { bodyMapper: Mappers.EnqueueTrainingResponse diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts index 60b2c6ff4e9d..0cb55baecf9a 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is