Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Regenerate azure-cognitiveservices-luis-authoring package (#4693)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpajdzik authored Feb 15, 2019
1 parent 3d36029 commit 55e1e69
Show file tree
Hide file tree
Showing 19 changed files with 2,126 additions and 103 deletions.
41 changes: 41 additions & 0 deletions lib/services/luis/authoring/.scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// 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.

const resetColor = "\x1b[0m";
const brightColor = "\x1b[1m";
const highlightColor = "\x1b[31m";

try {
const invisibleCharactersLength = resetColor.length + brightColor.length + highlightColor.length;

const firstLine = `Active development of this SDK has been moved to ${highlightColor}@azure/cognitiveservices-luis-authoring${resetColor}${brightColor} package.`;
const secondLine = "This package is in maintenance mode and will be deprecated in July 2018.";
const thirdLine = "Visit https://aka.ms/azure-sdk-for-js-migration for more information.";

const framePadding = 4;
const adjustedFirstLineLength = firstLine.length - invisibleCharactersLength;
const width = Math.max(adjustedFirstLineLength, secondLine.length, thirdLine.length) + framePadding;
const getPaddingLength = (strLength) => width - strLength - framePadding;

const firstLinePaddingLength = getPaddingLength(adjustedFirstLineLength);
const secondLinePaddingLength = getPaddingLength(secondLine.length);
const thirdLinePaddingLength = getPaddingLength(thirdLine.length);
const line = "#".repeat(width);

const formatTextLine = (text, padding) => `#${" ".repeat(Math.floor(padding / 2))} ${text} ${" ".repeat(Math.ceil(padding / 2))}#`;

console.log(brightColor);
console.log("\n" + line);
console.log(formatTextLine(firstLine, firstLinePaddingLength));
console.log(formatTextLine(secondLine, secondLinePaddingLength));
console.log(formatTextLine(thirdLine, thirdLinePaddingLength));
console.log(line + "\n");
console.log(resetColor);
} catch (err) {
// ignore
}
42 changes: 21 additions & 21 deletions lib/services/luis/authoring/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
Copyright (c) 2019 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
97 changes: 49 additions & 48 deletions lib/services/luis/authoring/README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
---
uid: azure-cognitiveservices-luis-authoring
summary: *content

---
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.**
## Microsoft Azure SDK for Node.js - LUISAuthoringClient

This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**

### Features


### How to Install

```bash
npm install azure-cognitiveservices-luis-authoring
```

### How to use

#### Authentication, client creation, and listPhraseLists features as an example.

```javascript
const msRest = require("ms-rest");
const LUISAuthoringClient = require("azure-cognitiveservices-luis-authoring");
const token = "<access_token>";
const creds = new msRest.TokenCredentials(token);
const subscriptionId = "<Subscription_Id>";
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.log('An error occurred:');
console.dir(err, {depth: null, colors: true});
});
```

### Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
---
uid: azure-cognitiveservices-luis-authoring
summary: *content

---
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://www.npmjs.com/package/@azure/cognitiveservices-luis-authoring) which works on Node.js and browsers.**
**See https://aka.ms/azure-sdk-for-js-migration to learn more.**
## Microsoft Azure SDK for Node.js - LUISAuthoringClient

This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**

### Features


### How to Install

```bash
npm install azure-cognitiveservices-luis-authoring
```

### How to use

#### Authentication, client creation, and listPhraseLists features as an example.

```javascript
const msRest = require("ms-rest");
const LUISAuthoringClient = require("azure-cognitiveservices-luis-authoring");
const token = "<access_token>";
const creds = new msRest.TokenCredentials(token);
const subscriptionId = "<Subscription_Id>";
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.log('An error occurred:');
console.dir(err, {depth: null, colors: true});
});
```

### Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
1 change: 1 addition & 0 deletions lib/services/luis/authoring/lib/lUISAuthoringClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default class LUISAuthoringClient extends ServiceClient {
permissions: operations.Permissions;
pattern: operations.Pattern;
settings: operations.Settings;
azureAccounts: operations.AzureAccounts;
}

export { LUISAuthoringClient, models as LUISAuthoringModels };
1 change: 1 addition & 0 deletions lib/services/luis/authoring/lib/lUISAuthoringClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class LUISAuthoringClient extends ServiceClient {
this.permissions = new operations.Permissions(this);
this.pattern = new operations.Pattern(this);
this.settings = new operations.Settings(this);
this.azureAccounts = new operations.AzureAccounts(this);
this.models = models;
msRest.addSerializationMixin(this);
}
Expand Down
68 changes: 68 additions & 0 deletions lib/services/luis/authoring/lib/models/azureAccountInfoObject.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* 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.
*/

'use strict';

/**
* Defines the azure account information object.
*
*/
class AzureAccountInfoObject {
/**
* Create a AzureAccountInfoObject.
* @property {string} azureSubscriptionId The id for the azure subscription.
* @property {string} resourceGroup The azure resource group name.
* @property {string} accountName The azure account name.
*/
constructor() {
}

/**
* Defines the metadata of AzureAccountInfoObject
*
* @returns {object} metadata of AzureAccountInfoObject
*
*/
mapper() {
return {
required: false,
serializedName: 'AzureAccountInfoObject',
type: {
name: 'Composite',
className: 'AzureAccountInfoObject',
modelProperties: {
azureSubscriptionId: {
required: true,
serializedName: 'azureSubscriptionId',
type: {
name: 'String'
}
},
resourceGroup: {
required: true,
serializedName: 'resourceGroup',
type: {
name: 'String'
}
},
accountName: {
required: true,
serializedName: 'accountName',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = AzureAccountInfoObject;
8 changes: 8 additions & 0 deletions lib/services/luis/authoring/lib/models/endpointInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class EndpointInfo {
* published to.
* @property {string} [assignedEndpointKey] The endpoint key.
* @property {string} [endpointRegion] The endpoint's region.
* @property {string} [failedRegions] Regions where publishing failed.
* @property {string} [publishedDateTime] Timestamp when was last published.
*/
constructor() {
Expand Down Expand Up @@ -87,6 +88,13 @@ class EndpointInfo {
name: 'String'
}
},
failedRegions: {
required: false,
serializedName: 'failedRegions',
type: {
name: 'String'
}
},
publishedDateTime: {
required: false,
serializedName: 'publishedDateTime',
Expand Down
4 changes: 2 additions & 2 deletions lib/services/luis/authoring/lib/models/exampleLabelObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class ExampleLabelObject {
/**
* Create a ExampleLabelObject.
* @property {string} [text] The sample's utterance.
* @property {array} [entityLabels] The idenfied entities within the
* @property {array} [entityLabels] The identified entities within the
* utterance.
* @property {string} [intentName] The idenfitied intent representing the
* @property {string} [intentName] The identified intent representing the
* utterance.
*/
constructor() {
Expand Down
30 changes: 26 additions & 4 deletions lib/services/luis/authoring/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export interface ApplicationSettingUpdateObject {
export interface PublishSettingUpdateObject {
/**
* Setting sentiment analysis as true returns the Sentiment of the input utterance along with the
* resopnse
* response
*/
sentimentAnalysis?: boolean;
/**
Expand All @@ -182,11 +182,11 @@ export interface ExampleLabelObject {
*/
text?: string;
/**
* The idenfied entities within the utterance.
* The identified entities within the utterance.
*/
entityLabels?: EntityLabelObject[];
/**
* The idenfitied intent representing the utterance.
* The identified intent representing the utterance.
*/
intentName?: string;
}
Expand Down Expand Up @@ -1334,6 +1334,10 @@ export interface EndpointInfo {
* The endpoint's region.
*/
endpointRegion?: string;
/**
* Regions where publishing failed.
*/
failedRegions?: string;
/**
* Timestamp when was last published.
*/
Expand Down Expand Up @@ -1382,7 +1386,7 @@ export interface PublishSettings {
id: string;
/**
* Setting sentiment analysis as true returns the Sentiment of the input utterance along with the
* resopnse
* response
*/
isSentimentAnalysisEnabled: boolean;
/**
Expand Down Expand Up @@ -1757,6 +1761,24 @@ export interface AppVersionSettingObject {
value?: string;
}

/**
* Defines the azure account information object.
*/
export interface AzureAccountInfoObject {
/**
* The id for the azure subscription.
*/
azureSubscriptionId: string;
/**
* The azure resource group name.
*/
resourceGroup: string;
/**
* The azure account name.
*/
accountName: string;
}

export interface HierarchicalChildModelUpdateObject {
name?: string;
}
Expand Down
1 change: 1 addition & 0 deletions lib/services/luis/authoring/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ exports.PatternAnyEntityExtractor = require('./patternAnyEntityExtractor');
exports.PatternRuleInfo = require('./patternRuleInfo');
exports.LabelTextObject = require('./labelTextObject');
exports.AppVersionSettingObject = require('./appVersionSettingObject');
exports.AzureAccountInfoObject = require('./azureAccountInfoObject');
exports.HierarchicalChildModelUpdateObject = require('./hierarchicalChildModelUpdateObject');
exports.HierarchicalChildModelCreateObject = require('./hierarchicalChildModelCreateObject');
exports.CompositeChildModelCreateObject = require('./compositeChildModelCreateObject');
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ class ProductionOrStagingEndpointInfo extends models['EndpointInfo'] {
name: 'String'
}
},
failedRegions: {
required: false,
serializedName: 'failedRegions',
type: {
name: 'String'
}
},
publishedDateTime: {
required: false,
serializedName: 'publishedDateTime',
Expand Down
Loading

0 comments on commit 55e1e69

Please sign in to comment.