Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/cognitiveservices-luis-runtime

Package Overview
Dependencies
Maintainers
6
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/cognitiveservices-luis-runtime - npm Package Compare versions

Comparing version 4.0.1 to 5.0.0

58

dist/cognitiveservices-luis-runtime.js

@@ -127,9 +127,2 @@ /*

modelProperties: {
normalizedQuery: {
required: true,
serializedName: "normalizedQuery",
type: {
name: "String"
}
},
alteredQuery: {

@@ -259,4 +252,4 @@ serializedName: "alteredQuery",

},
overridePredictions: {
serializedName: "overridePredictions",
preferExternalEntities: {
serializedName: "preferExternalEntities",
type: {

@@ -301,2 +294,8 @@ name: "Boolean"

}
},
score: {
serializedName: "score",
type: {
name: "Number"
}
}

@@ -431,3 +430,3 @@ }

/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for

@@ -460,3 +459,4 @@ * license information.

* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

@@ -543,3 +543,3 @@ var appId = {

/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for

@@ -584,4 +584,12 @@ * license information.

path: "apps/{appId}/versions/{versionId}/predict",
urlParameters: [endpoint, appId, versionId],
queryParameters: [verbose, showAllIntents, log],
urlParameters: [
endpoint,
appId,
versionId
],
queryParameters: [
verbose,
showAllIntents,
log
],
requestBody: {

@@ -604,4 +612,12 @@ parameterPath: "predictionRequest",

path: "apps/{appId}/slots/{slotName}/predict",
urlParameters: [endpoint, appId, slotName],
queryParameters: [verbose, showAllIntents, log],
urlParameters: [
endpoint,
appId,
slotName
],
queryParameters: [
verbose,
showAllIntents,
log
],
requestBody: {

@@ -623,3 +639,3 @@ parameterPath: "predictionRequest",

/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for

@@ -639,3 +655,4 @@ * license information.

* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

@@ -669,3 +686,3 @@ var packageName = "@azure/cognitiveservices-luis-runtime";

_this = _super.call(this, credentials, options) || this;
_this.baseUri = "{Endpoint}/luis/v3.0-preview";
_this.baseUri = "{Endpoint}/luis/prediction/v3.0";
_this.requestContentType = "application/json; charset=utf-8";

@@ -685,3 +702,4 @@ _this.endpoint = endpoint;

* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

@@ -688,0 +706,0 @@ var LUISRuntimeClient = /** @class */ (function (_super) {

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@azure/ms-rest-js")):"function"==typeof define&&define.amd?define(["exports","@azure/ms-rest-js"],t):t((e.Azure=e.Azure||{},e.Azure.CognitiveservicesLuisRuntime={}),e.msRest)}(this,function(e,n){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function t(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var i=function(){return(i=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=Object.freeze({}),s={serializedName:"Intent",type:{name:"Composite",className:"Intent",modelProperties:{score:{serializedName:"score",type:{name:"Number"}},childApp:{serializedName:"childApp",type:{name:"Composite",className:"Prediction"}}}}},o={serializedName:"Sentiment",type:{name:"Composite",className:"Sentiment",modelProperties:{label:{serializedName:"label",type:{name:"String"}},score:{required:!0,serializedName:"score",type:{name:"Number"}}}}},m={serializedName:"Prediction",type:{name:"Composite",className:"Prediction",modelProperties:{normalizedQuery:{required:!0,serializedName:"normalizedQuery",type:{name:"String"}},alteredQuery:{serializedName:"alteredQuery",type:{name:"String"}},topIntent:{required:!0,serializedName:"topIntent",type:{name:"String"}},intents:{required:!0,serializedName:"intents",type:{name:"Dictionary",value:{type:{name:"Composite",className:"Intent"}}}},entities:{required:!0,serializedName:"entities",type:{name:"Dictionary",value:{type:{name:"Object"}}}},sentiment:{serializedName:"sentiment",type:{name:"Composite",className:"Sentiment"}}}}},p={serializedName:"PredictionResponse",type:{name:"Composite",className:"PredictionResponse",modelProperties:{query:{required:!0,serializedName:"query",type:{name:"String"}},prediction:{required:!0,serializedName:"prediction",type:{name:"Composite",className:"Prediction"}}}}},d={serializedName:"ErrorBody",type:{name:"Composite",className:"ErrorBody",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"String"}},message:{required:!0,serializedName:"message",type:{name:"String"}}}}},l={serializedName:"Error",type:{name:"Composite",className:"ErrorModel",modelProperties:{error:{required:!0,serializedName:"error",type:{name:"Composite",className:"ErrorBody"}}}}},u={serializedName:"PredictionRequestOptions",type:{name:"Composite",className:"PredictionRequestOptions",modelProperties:{datetimeReference:{serializedName:"datetimeReference",type:{name:"DateTime"}},overridePredictions:{serializedName:"overridePredictions",type:{name:"Boolean"}}}}},c={serializedName:"ExternalEntity",type:{name:"Composite",className:"ExternalEntity",modelProperties:{entityName:{required:!0,serializedName:"entityName",type:{name:"String"}},startIndex:{required:!0,serializedName:"startIndex",type:{name:"Number"}},entityLength:{required:!0,serializedName:"entityLength",type:{name:"Number"}},resolution:{serializedName:"resolution",type:{name:"Object"}}}}},y={serializedName:"RequestList",type:{name:"Composite",className:"RequestList",modelProperties:{name:{serializedName:"name",type:{name:"String"}},canonicalForm:{required:!0,serializedName:"canonicalForm",type:{name:"String"}},synonyms:{serializedName:"synonyms",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},N={serializedName:"DynamicList",type:{name:"Composite",className:"DynamicList",modelProperties:{listEntityName:{required:!0,serializedName:"listEntityName",type:{name:"String"}},requestLists:{required:!0,serializedName:"requestLists",type:{name:"Sequence",element:{type:{name:"Composite",className:"RequestList"}}}}}}},z={serializedName:"PredictionRequest",type:{name:"Composite",className:"PredictionRequest",modelProperties:{query:{required:!0,serializedName:"query",type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"PredictionRequestOptions"}},externalEntities:{serializedName:"externalEntities",type:{name:"Sequence",element:{type:{name:"Composite",className:"ExternalEntity"}}}},dynamicLists:{serializedName:"dynamicLists",type:{name:"Sequence",element:{type:{name:"Composite",className:"DynamicList"}}}}}}},q=Object.freeze({Intent:s,Sentiment:o,Prediction:m,PredictionResponse:p,ErrorBody:d,ErrorModel:l,PredictionRequestOptions:u,ExternalEntity:c,RequestList:y,DynamicList:N,PredictionRequest:z}),P=Object.freeze({DynamicList:N,ErrorBody:d,ErrorModel:l,ExternalEntity:c,Intent:s,Prediction:m,PredictionRequest:z,PredictionRequestOptions:u,PredictionResponse:p,RequestList:y,Sentiment:o}),f={parameterPath:"appId",mapper:{required:!0,serializedName:"appId",type:{name:"Uuid"}}},h={parameterPath:"endpoint",mapper:{required:!0,serializedName:"Endpoint",defaultValue:"",type:{name:"String"}},skipEncoding:!0},S={parameterPath:["options","log"],mapper:{serializedName:"log",type:{name:"Boolean"}}},g={parameterPath:["options","showAllIntents"],mapper:{serializedName:"show-all-intents",type:{name:"Boolean"}}},R={parameterPath:["options","verbose"],mapper:{serializedName:"verbose",type:{name:"Boolean"}}},v=(E.prototype.getVersionPrediction=function(e,t,i,r,a){return this.client.sendOperationRequest({appId:e,versionId:t,predictionRequest:i,options:r},I,a)},E.prototype.getSlotPrediction=function(e,t,i,r,a){return this.client.sendOperationRequest({appId:e,slotName:t,predictionRequest:i,options:r},O,a)},E);function E(e){this.client=e}var b,C=new n.Serializer(P),I={httpMethod:"POST",path:"apps/{appId}/versions/{versionId}/predict",urlParameters:[h,f,{parameterPath:"versionId",mapper:{required:!0,serializedName:"versionId",type:{name:"String"}}}],queryParameters:[R,g,S],requestBody:{parameterPath:"predictionRequest",mapper:i(i({},z),{required:!0})},responses:{200:{bodyMapper:p},default:{bodyMapper:l}},serializer:C},O={httpMethod:"POST",path:"apps/{appId}/slots/{slotName}/predict",urlParameters:[h,f,{parameterPath:"slotName",mapper:{required:!0,serializedName:"slotName",type:{name:"String"}}}],queryParameters:[R,g,S],requestBody:{parameterPath:"predictionRequest",mapper:i(i({},z),{required:!0})},responses:{200:{bodyMapper:p},default:{bodyMapper:l}},serializer:C},L=(t(j,b=n.ServiceClient),j);function j(e,t,i){var r=this;if(null==t)throw new Error("'endpoint' cannot be null.");if(null==e)throw new Error("'credentials' cannot be null.");if(!(i=i||{}).userAgent){var a=n.getDefaultUserAgentValue();i.userAgent="@azure/cognitiveservices-luis-runtime/4.0.1 "+a}return(r=b.call(this,e,i)||this).baseUri="{Endpoint}/luis/v3.0-preview",r.requestContentType="application/json; charset=utf-8",r.endpoint=t,r.credentials=e,r}var x,w=(t(M,x=L),M);function M(e,t,i){var r=x.call(this,e,t,i)||this;return r.prediction=new v(r),r}e.LUISRuntimeClient=w,e.LUISRuntimeClientContext=L,e.LUISRuntimeModels=a,e.LUISRuntimeMappers=q,e.PredictionOperations=v,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@azure/ms-rest-js")):"function"==typeof define&&define.amd?define(["exports","@azure/ms-rest-js"],t):t((e.Azure=e.Azure||{},e.Azure.CognitiveservicesLuisRuntime={}),e.msRest)}(this,function(e,n){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function t(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var i=function(){return(i=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=Object.freeze({}),s={serializedName:"Intent",type:{name:"Composite",className:"Intent",modelProperties:{score:{serializedName:"score",type:{name:"Number"}},childApp:{serializedName:"childApp",type:{name:"Composite",className:"Prediction"}}}}},o={serializedName:"Sentiment",type:{name:"Composite",className:"Sentiment",modelProperties:{label:{serializedName:"label",type:{name:"String"}},score:{required:!0,serializedName:"score",type:{name:"Number"}}}}},m={serializedName:"Prediction",type:{name:"Composite",className:"Prediction",modelProperties:{alteredQuery:{serializedName:"alteredQuery",type:{name:"String"}},topIntent:{required:!0,serializedName:"topIntent",type:{name:"String"}},intents:{required:!0,serializedName:"intents",type:{name:"Dictionary",value:{type:{name:"Composite",className:"Intent"}}}},entities:{required:!0,serializedName:"entities",type:{name:"Dictionary",value:{type:{name:"Object"}}}},sentiment:{serializedName:"sentiment",type:{name:"Composite",className:"Sentiment"}}}}},p={serializedName:"PredictionResponse",type:{name:"Composite",className:"PredictionResponse",modelProperties:{query:{required:!0,serializedName:"query",type:{name:"String"}},prediction:{required:!0,serializedName:"prediction",type:{name:"Composite",className:"Prediction"}}}}},d={serializedName:"ErrorBody",type:{name:"Composite",className:"ErrorBody",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"String"}},message:{required:!0,serializedName:"message",type:{name:"String"}}}}},l={serializedName:"Error",type:{name:"Composite",className:"ErrorModel",modelProperties:{error:{required:!0,serializedName:"error",type:{name:"Composite",className:"ErrorBody"}}}}},c={serializedName:"PredictionRequestOptions",type:{name:"Composite",className:"PredictionRequestOptions",modelProperties:{datetimeReference:{serializedName:"datetimeReference",type:{name:"DateTime"}},preferExternalEntities:{serializedName:"preferExternalEntities",type:{name:"Boolean"}}}}},u={serializedName:"ExternalEntity",type:{name:"Composite",className:"ExternalEntity",modelProperties:{entityName:{required:!0,serializedName:"entityName",type:{name:"String"}},startIndex:{required:!0,serializedName:"startIndex",type:{name:"Number"}},entityLength:{required:!0,serializedName:"entityLength",type:{name:"Number"}},resolution:{serializedName:"resolution",type:{name:"Object"}},score:{serializedName:"score",type:{name:"Number"}}}}},y={serializedName:"RequestList",type:{name:"Composite",className:"RequestList",modelProperties:{name:{serializedName:"name",type:{name:"String"}},canonicalForm:{required:!0,serializedName:"canonicalForm",type:{name:"String"}},synonyms:{serializedName:"synonyms",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},N={serializedName:"DynamicList",type:{name:"Composite",className:"DynamicList",modelProperties:{listEntityName:{required:!0,serializedName:"listEntityName",type:{name:"String"}},requestLists:{required:!0,serializedName:"requestLists",type:{name:"Sequence",element:{type:{name:"Composite",className:"RequestList"}}}}}}},z={serializedName:"PredictionRequest",type:{name:"Composite",className:"PredictionRequest",modelProperties:{query:{required:!0,serializedName:"query",type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"PredictionRequestOptions"}},externalEntities:{serializedName:"externalEntities",type:{name:"Sequence",element:{type:{name:"Composite",className:"ExternalEntity"}}}},dynamicLists:{serializedName:"dynamicLists",type:{name:"Sequence",element:{type:{name:"Composite",className:"DynamicList"}}}}}}},q=Object.freeze({Intent:s,Sentiment:o,Prediction:m,PredictionResponse:p,ErrorBody:d,ErrorModel:l,PredictionRequestOptions:c,ExternalEntity:u,RequestList:y,DynamicList:N,PredictionRequest:z}),P=Object.freeze({DynamicList:N,ErrorBody:d,ErrorModel:l,ExternalEntity:u,Intent:s,Prediction:m,PredictionRequest:z,PredictionRequestOptions:c,PredictionResponse:p,RequestList:y,Sentiment:o}),f={parameterPath:"appId",mapper:{required:!0,serializedName:"appId",type:{name:"Uuid"}}},h={parameterPath:"endpoint",mapper:{required:!0,serializedName:"Endpoint",defaultValue:"",type:{name:"String"}},skipEncoding:!0},S={parameterPath:["options","log"],mapper:{serializedName:"log",type:{name:"Boolean"}}},g={parameterPath:["options","showAllIntents"],mapper:{serializedName:"show-all-intents",type:{name:"Boolean"}}},E={parameterPath:["options","verbose"],mapper:{serializedName:"verbose",type:{name:"Boolean"}}},R=(b.prototype.getVersionPrediction=function(e,t,i,r,a){return this.client.sendOperationRequest({appId:e,versionId:t,predictionRequest:i,options:r},I,a)},b.prototype.getSlotPrediction=function(e,t,i,r,a){return this.client.sendOperationRequest({appId:e,slotName:t,predictionRequest:i,options:r},O,a)},b);function b(e){this.client=e}var v,C=new n.Serializer(P),I={httpMethod:"POST",path:"apps/{appId}/versions/{versionId}/predict",urlParameters:[h,f,{parameterPath:"versionId",mapper:{required:!0,serializedName:"versionId",type:{name:"String"}}}],queryParameters:[E,g,S],requestBody:{parameterPath:"predictionRequest",mapper:i(i({},z),{required:!0})},responses:{200:{bodyMapper:p},default:{bodyMapper:l}},serializer:C},O={httpMethod:"POST",path:"apps/{appId}/slots/{slotName}/predict",urlParameters:[h,f,{parameterPath:"slotName",mapper:{required:!0,serializedName:"slotName",type:{name:"String"}}}],queryParameters:[E,g,S],requestBody:{parameterPath:"predictionRequest",mapper:i(i({},z),{required:!0})},responses:{200:{bodyMapper:p},default:{bodyMapper:l}},serializer:C},L=(t(x,v=n.ServiceClient),x);function x(e,t,i){var r=this;if(null==t)throw new Error("'endpoint' cannot be null.");if(null==e)throw new Error("'credentials' cannot be null.");if(!(i=i||{}).userAgent){var a=n.getDefaultUserAgentValue();i.userAgent="@azure/cognitiveservices-luis-runtime/4.0.1 "+a}return(r=v.call(this,e,i)||this).baseUri="{Endpoint}/luis/prediction/v3.0",r.requestContentType="application/json; charset=utf-8",r.endpoint=t,r.credentials=e,r}var j,M=(t(w,j=L),w);function w(e,t,i){var r=j.call(this,e,t,i)||this;return r.prediction=new R(r),r}e.LUISRuntimeClient=M,e.LUISRuntimeClientContext=L,e.LUISRuntimeModels=a,e.LUISRuntimeMappers=q,e.PredictionOperations=R,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -7,3 +7,4 @@ /*

* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

@@ -10,0 +11,0 @@ import { __extends } from "tslib";

@@ -7,3 +7,4 @@ /*

* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

@@ -39,3 +40,3 @@ import { __extends } from "tslib";

_this = _super.call(this, credentials, options) || this;
_this.baseUri = "{Endpoint}/luis/v3.0-preview";
_this.baseUri = "{Endpoint}/luis/prediction/v3.0";
_this.requestContentType = "application/json; charset=utf-8";

@@ -42,0 +43,0 @@ _this.endpoint = endpoint;

@@ -33,6 +33,2 @@ import * as msRest from "@azure/ms-rest-js";

/**
* The query after pre-processing and normalization.
*/
normalizedQuery: string;
/**
* The query after spell checking. Only set if spell check was enabled and a spelling mistake was

@@ -53,3 +49,3 @@ * found.

/**
* The dictionary representing the entities that fired.
* A dictionary representing the entities that fired.
*/

@@ -108,3 +104,3 @@ entities: {

*/
overridePredictions?: boolean;
preferExternalEntities?: boolean;
}

@@ -131,2 +127,6 @@ /**

resolution?: any;
/**
* A user supplied score to return as the entity's prediction score.
*/
score?: number;
}

@@ -133,0 +133,0 @@ /**

@@ -59,9 +59,2 @@ /*

modelProperties: {
normalizedQuery: {
required: true,
serializedName: "normalizedQuery",
type: {
name: "String"
}
},
alteredQuery: {

@@ -191,4 +184,4 @@ serializedName: "alteredQuery",

},
overridePredictions: {
serializedName: "overridePredictions",
preferExternalEntities: {
serializedName: "preferExternalEntities",
type: {

@@ -233,2 +226,8 @@ name: "Boolean"

}
},
score: {
serializedName: "score",
type: {
name: "Number"
}
}

@@ -235,0 +234,0 @@ }

@@ -7,3 +7,4 @@ /*

* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

@@ -10,0 +11,0 @@ export var appId = {

/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for

@@ -4,0 +4,0 @@ * license information.

/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for

@@ -4,0 +4,0 @@ * license information.

/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for

@@ -47,4 +47,12 @@ * license information.

path: "apps/{appId}/versions/{versionId}/predict",
urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId],
queryParameters: [Parameters.verbose, Parameters.showAllIntents, Parameters.log],
urlParameters: [
Parameters.endpoint,
Parameters.appId,
Parameters.versionId
],
queryParameters: [
Parameters.verbose,
Parameters.showAllIntents,
Parameters.log
],
requestBody: {

@@ -67,4 +75,12 @@ parameterPath: "predictionRequest",

path: "apps/{appId}/slots/{slotName}/predict",
urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.slotName],
queryParameters: [Parameters.verbose, Parameters.showAllIntents, Parameters.log],
urlParameters: [
Parameters.endpoint,
Parameters.appId,
Parameters.slotName
],
queryParameters: [
Parameters.verbose,
Parameters.showAllIntents,
Parameters.log
],
requestBody: {

@@ -71,0 +87,0 @@ parameterPath: "predictionRequest",

@@ -5,3 +5,3 @@ {

"description": "LUISRuntimeClient Library with typescript type definitions for node.js and browser.",
"version": "4.0.1",
"version": "5.0.0",
"dependencies": {

@@ -33,3 +33,4 @@ "@azure/ms-rest-js": "^2.0.3",

"typescript": "^3.1.1",
"uglify-js": "^3.4.9"
"uglify-js": "^3.4.9",
"ts-mocha": "^6.0.0"
},

@@ -61,4 +62,4 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cognitiveservices/cognitiveservices-luis-runtime",

"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-luis-runtime.js.map'\" -o ./dist/cognitiveservices-luis-runtime.min.js ./dist/cognitiveservices-luis-runtime.js",
"prepack": "npm install && npm run build && npm run test",
"test": "mocha"
"prepack": "npm install && npm run build",
"test": "ts-mocha -p tsconfig.test.json test/**/*.test.ts --timeout 100000"
},

@@ -65,0 +66,0 @@ "sideEffects": false,

@@ -47,3 +47,3 @@ ## An isomorphic javascript sdk for - LUISRuntimeClient

datetimeReference: new Date(),
overridePredictions: true
preferExternalEntities: true
},

@@ -55,2 +55,3 @@ externalEntities: [

entityLength: 1,
score: 0.86,
resolution: {}

@@ -121,3 +122,3 @@ }

datetimeReference: new Date(),
overridePredictions: true
preferExternalEntities: true
},

@@ -129,2 +130,3 @@ externalEntities: [

entityLength: 1,
score: 0.9,
resolution: {}

@@ -131,0 +133,0 @@ }

@@ -10,3 +10,6 @@ import rollup from "rollup";

input: "./esm/lUISRuntimeClient.js",
external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
external: [
"@azure/ms-rest-js",
"@azure/ms-rest-azure-js"
],
output: {

@@ -31,5 +34,8 @@ file: "./dist/cognitiveservices-luis-runtime.js",

},
plugins: [nodeResolve({ module: true }), sourcemaps()]
plugins: [
nodeResolve({ mainFields: ['module', 'main'] }),
sourcemaps()
]
};
export default config;

@@ -7,3 +7,4 @@ /*

* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

@@ -10,0 +11,0 @@

@@ -7,3 +7,4 @@ /*

* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

@@ -46,3 +47,3 @@

this.baseUri = "{Endpoint}/luis/v3.0-preview";
this.baseUri = "{Endpoint}/luis/prediction/v3.0";
this.requestContentType = "application/json; charset=utf-8";

@@ -49,0 +50,0 @@ this.endpoint = endpoint;

@@ -46,6 +46,2 @@ /*

/**
* The query after pre-processing and normalization.
*/
normalizedQuery: string;
/**
* The query after spell checking. Only set if spell check was enabled and a spelling mistake was

@@ -64,3 +60,3 @@ * found.

/**
* The dictionary representing the entities that fired.
* A dictionary representing the entities that fired.
*/

@@ -121,3 +117,3 @@ entities: { [propertyName: string]: any };

*/
overridePredictions?: boolean;
preferExternalEntities?: boolean;
}

@@ -145,2 +141,6 @@

resolution?: any;
/**
* A user supplied score to return as the entity's prediction score.
*/
score?: number;
}

@@ -246,12 +246,12 @@

_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: PredictionResponse;
};
/**
* The response body as parsed JSON or XML
*/
parsedBody: PredictionResponse;
};
};

@@ -267,12 +267,12 @@

_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: PredictionResponse;
};
/**
* The response body as parsed JSON or XML
*/
parsedBody: PredictionResponse;
};
};

@@ -65,9 +65,2 @@ /*

modelProperties: {
normalizedQuery: {
required: true,
serializedName: "normalizedQuery",
type: {
name: "String"
}
},
alteredQuery: {

@@ -201,4 +194,4 @@ serializedName: "alteredQuery",

},
overridePredictions: {
serializedName: "overridePredictions",
preferExternalEntities: {
serializedName: "preferExternalEntities",
type: {

@@ -244,2 +237,8 @@ name: "Boolean"

}
},
score: {
serializedName: "score",
type: {
name: "Number"
}
}

@@ -246,0 +245,0 @@ }

@@ -7,3 +7,4 @@ /*

* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

@@ -10,0 +11,0 @@

/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for

@@ -4,0 +4,0 @@ * license information.

/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for

@@ -4,0 +4,0 @@ * license information.

/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for

@@ -37,8 +37,3 @@ * license information.

*/
getVersionPrediction(
appId: string,
versionId: string,
predictionRequest: Models.PredictionRequest,
options?: Models.PredictionGetVersionPredictionOptionalParams
): Promise<Models.PredictionGetVersionPredictionResponse>;
getVersionPrediction(appId: string, versionId: string, predictionRequest: Models.PredictionRequest, options?: Models.PredictionGetVersionPredictionOptionalParams): Promise<Models.PredictionGetVersionPredictionResponse>;
/**

@@ -50,8 +45,3 @@ * @param appId The application ID.

*/
getVersionPrediction(
appId: string,
versionId: string,
predictionRequest: Models.PredictionRequest,
callback: msRest.ServiceCallback<Models.PredictionResponse>
): void;
getVersionPrediction(appId: string, versionId: string, predictionRequest: Models.PredictionRequest, callback: msRest.ServiceCallback<Models.PredictionResponse>): void;
/**

@@ -64,18 +54,4 @@ * @param appId The application ID.

*/
getVersionPrediction(
appId: string,
versionId: string,
predictionRequest: Models.PredictionRequest,
options: Models.PredictionGetVersionPredictionOptionalParams,
callback: msRest.ServiceCallback<Models.PredictionResponse>
): void;
getVersionPrediction(
appId: string,
versionId: string,
predictionRequest: Models.PredictionRequest,
options?:
| Models.PredictionGetVersionPredictionOptionalParams
| msRest.ServiceCallback<Models.PredictionResponse>,
callback?: msRest.ServiceCallback<Models.PredictionResponse>
): Promise<Models.PredictionGetVersionPredictionResponse> {
getVersionPrediction(appId: string, versionId: string, predictionRequest: Models.PredictionRequest, options: Models.PredictionGetVersionPredictionOptionalParams, callback: msRest.ServiceCallback<Models.PredictionResponse>): void;
getVersionPrediction(appId: string, versionId: string, predictionRequest: Models.PredictionRequest, options?: Models.PredictionGetVersionPredictionOptionalParams | msRest.ServiceCallback<Models.PredictionResponse>, callback?: msRest.ServiceCallback<Models.PredictionResponse>): Promise<Models.PredictionGetVersionPredictionResponse> {
return this.client.sendOperationRequest(

@@ -89,4 +65,3 @@ {

getVersionPredictionOperationSpec,
callback
) as Promise<Models.PredictionGetVersionPredictionResponse>;
callback) as Promise<Models.PredictionGetVersionPredictionResponse>;
}

@@ -102,8 +77,3 @@

*/
getSlotPrediction(
appId: string,
slotName: string,
predictionRequest: Models.PredictionRequest,
options?: Models.PredictionGetSlotPredictionOptionalParams
): Promise<Models.PredictionGetSlotPredictionResponse>;
getSlotPrediction(appId: string, slotName: string, predictionRequest: Models.PredictionRequest, options?: Models.PredictionGetSlotPredictionOptionalParams): Promise<Models.PredictionGetSlotPredictionResponse>;
/**

@@ -115,8 +85,3 @@ * @param appId The application ID.

*/
getSlotPrediction(
appId: string,
slotName: string,
predictionRequest: Models.PredictionRequest,
callback: msRest.ServiceCallback<Models.PredictionResponse>
): void;
getSlotPrediction(appId: string, slotName: string, predictionRequest: Models.PredictionRequest, callback: msRest.ServiceCallback<Models.PredictionResponse>): void;
/**

@@ -129,18 +94,4 @@ * @param appId The application ID.

*/
getSlotPrediction(
appId: string,
slotName: string,
predictionRequest: Models.PredictionRequest,
options: Models.PredictionGetSlotPredictionOptionalParams,
callback: msRest.ServiceCallback<Models.PredictionResponse>
): void;
getSlotPrediction(
appId: string,
slotName: string,
predictionRequest: Models.PredictionRequest,
options?:
| Models.PredictionGetSlotPredictionOptionalParams
| msRest.ServiceCallback<Models.PredictionResponse>,
callback?: msRest.ServiceCallback<Models.PredictionResponse>
): Promise<Models.PredictionGetSlotPredictionResponse> {
getSlotPrediction(appId: string, slotName: string, predictionRequest: Models.PredictionRequest, options: Models.PredictionGetSlotPredictionOptionalParams, callback: msRest.ServiceCallback<Models.PredictionResponse>): void;
getSlotPrediction(appId: string, slotName: string, predictionRequest: Models.PredictionRequest, options?: Models.PredictionGetSlotPredictionOptionalParams | msRest.ServiceCallback<Models.PredictionResponse>, callback?: msRest.ServiceCallback<Models.PredictionResponse>): Promise<Models.PredictionGetSlotPredictionResponse> {
return this.client.sendOperationRequest(

@@ -154,4 +105,3 @@ {

getSlotPredictionOperationSpec,
callback
) as Promise<Models.PredictionGetSlotPredictionResponse>;
callback) as Promise<Models.PredictionGetSlotPredictionResponse>;
}

@@ -165,4 +115,12 @@ }

path: "apps/{appId}/versions/{versionId}/predict",
urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.versionId],
queryParameters: [Parameters.verbose, Parameters.showAllIntents, Parameters.log],
urlParameters: [
Parameters.endpoint,
Parameters.appId,
Parameters.versionId
],
queryParameters: [
Parameters.verbose,
Parameters.showAllIntents,
Parameters.log
],
requestBody: {

@@ -189,4 +147,12 @@ parameterPath: "predictionRequest",

path: "apps/{appId}/slots/{slotName}/predict",
urlParameters: [Parameters.endpoint, Parameters.appId, Parameters.slotName],
queryParameters: [Parameters.verbose, Parameters.showAllIntents, Parameters.log],
urlParameters: [
Parameters.endpoint,
Parameters.appId,
Parameters.slotName
],
queryParameters: [
Parameters.verbose,
Parameters.showAllIntents,
Parameters.log
],
requestBody: {

@@ -193,0 +159,0 @@ parameterPath: "predictionRequest",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc