New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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

to
3.0.0

esm/models/predictionOperationsMappers.d.ts

481

dist/cognitiveservices-luis-runtime.js

@@ -73,22 +73,18 @@ /*

*/
var IntentModel = {
serializedName: "IntentModel",
var PredictionRequestOptions = {
serializedName: "PredictionRequestOptions",
type: {
name: "Composite",
className: "IntentModel",
className: "PredictionRequestOptions",
modelProperties: {
intent: {
serializedName: "intent",
datetimeReference: {
serializedName: "datetimeReference",
type: {
name: "String"
name: "DateTime"
}
},
score: {
serializedName: "score",
constraints: {
InclusiveMaximum: 1,
InclusiveMinimum: 0
},
overridePredictions: {
serializedName: "overridePredictions",
type: {
name: "Number"
name: "Boolean"
}

@@ -99,11 +95,11 @@ }

};
var EntityModel = {
serializedName: "EntityModel",
var ExternalEntity = {
serializedName: "ExternalEntity",
type: {
name: "Composite",
className: "EntityModel",
className: "ExternalEntity",
modelProperties: {
entity: {
entityName: {
required: true,
serializedName: "entity",
serializedName: "entityName",
type: {

@@ -113,9 +109,2 @@ name: "String"

},
type: {
required: true,
serializedName: "type",
type: {
name: "String"
}
},
startIndex: {

@@ -128,26 +117,26 @@ required: true,

},
endIndex: {
entityLength: {
required: true,
serializedName: "endIndex",
serializedName: "entityLength",
type: {
name: "Number"
}
},
resolution: {
serializedName: "resolution",
type: {
name: "Object"
}
}
},
additionalProperties: {
type: {
name: "Object"
}
}
}
};
var CompositeChildModel = {
serializedName: "CompositeChildModel",
var RequestList = {
serializedName: "RequestList",
type: {
name: "Composite",
className: "CompositeChildModel",
className: "RequestList",
modelProperties: {
type: {
required: true,
serializedName: "type",
name: {
serializedName: "name",
type: {

@@ -157,8 +146,19 @@ name: "String"

},
value: {
canonicalForm: {
required: true,
serializedName: "value",
serializedName: "canonicalForm",
type: {
name: "String"
}
},
synonyms: {
serializedName: "synonyms",
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
}

@@ -168,11 +168,11 @@ }

};
var CompositeEntityModel = {
serializedName: "CompositeEntityModel",
var DynamicList = {
serializedName: "DynamicList",
type: {
name: "Composite",
className: "CompositeEntityModel",
className: "DynamicList",
modelProperties: {
parentType: {
listEntityName: {
required: true,
serializedName: "parentType",
serializedName: "listEntityName",
type: {

@@ -182,13 +182,41 @@ name: "String"

},
value: {
requestLists: {
required: true,
serializedName: "value",
serializedName: "requestLists",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "RequestList"
}
}
}
}
}
}
};
var PredictionRequest = {
serializedName: "PredictionRequest",
type: {
name: "Composite",
className: "PredictionRequest",
modelProperties: {
query: {
required: true,
serializedName: "query",
type: {
name: "String"
}
},
children: {
required: true,
serializedName: "children",
options: {
serializedName: "options",
type: {
name: "Composite",
className: "PredictionRequestOptions"
}
},
externalEntities: {
serializedName: "externalEntities",
type: {
name: "Sequence",

@@ -198,6 +226,18 @@ element: {

name: "Composite",
className: "CompositeChildModel"
className: "ExternalEntity"
}
}
}
},
dynamicLists: {
serializedName: "dynamicLists",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "DynamicList"
}
}
}
}

@@ -207,2 +247,24 @@ }

};
var Intent = {
serializedName: "Intent",
type: {
name: "Composite",
className: "Intent",
modelProperties: {
score: {
serializedName: "score",
type: {
name: "Number"
}
},
childApp: {
serializedName: "childApp",
type: {
name: "Composite",
className: "Prediction"
}
}
}
}
};
var Sentiment = {

@@ -214,2 +276,9 @@ serializedName: "Sentiment",

modelProperties: {
score: {
required: true,
serializedName: "score",
type: {
name: "Number"
}
},
label: {

@@ -220,8 +289,2 @@ serializedName: "label",

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

@@ -231,10 +294,11 @@ }

};
var LuisResult = {
serializedName: "LuisResult",
var Prediction = {
serializedName: "Prediction",
type: {
name: "Composite",
className: "LuisResult",
className: "Prediction",
modelProperties: {
query: {
serializedName: "query",
normalizedQuery: {
required: true,
serializedName: "normalizedQuery",
type: {

@@ -250,17 +314,18 @@ name: "String"

},
topScoringIntent: {
serializedName: "topScoringIntent",
topIntent: {
required: true,
serializedName: "topIntent",
type: {
name: "Composite",
className: "IntentModel"
name: "String"
}
},
intents: {
required: true,
serializedName: "intents",
type: {
name: "Sequence",
element: {
name: "Dictionary",
value: {
type: {
name: "Composite",
className: "IntentModel"
className: "Intent"
}

@@ -271,14 +336,9 @@ }

entities: {
required: true,
serializedName: "entities",
type: {
name: "Sequence",
element: {
name: "Dictionary",
value: {
type: {
name: "Composite",
className: "EntityModel",
additionalProperties: {
type: {
name: "Object"
}
}
name: "Object"
}

@@ -288,27 +348,8 @@ }

},
compositeEntities: {
serializedName: "compositeEntities",
sentiment: {
serializedName: "sentiment",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "CompositeEntityModel"
}
}
}
},
sentimentAnalysis: {
serializedName: "sentimentAnalysis",
type: {
name: "Composite",
className: "Sentiment"
}
},
connectedServiceResult: {
serializedName: "connectedServiceResult",
type: {
name: "Composite",
className: "LuisResult"
}
}

@@ -318,44 +359,35 @@ }

};
var EntityWithScore = {
serializedName: "EntityWithScore",
var PredictionResponse = {
serializedName: "PredictionResponse",
type: {
name: "Composite",
className: "EntityWithScore",
modelProperties: __assign({}, EntityModel.type.modelProperties, { score: {
className: "PredictionResponse",
modelProperties: {
query: {
required: true,
serializedName: "score",
constraints: {
InclusiveMaximum: 1,
InclusiveMinimum: 0
},
serializedName: "query",
type: {
name: "Number"
name: "String"
}
} }),
additionalProperties: EntityModel.type.additionalProperties
}
};
var EntityWithResolution = {
serializedName: "EntityWithResolution",
type: {
name: "Composite",
className: "EntityWithResolution",
modelProperties: __assign({}, EntityModel.type.modelProperties, { resolution: {
},
prediction: {
required: true,
serializedName: "resolution",
serializedName: "prediction",
type: {
name: "Object"
name: "Composite",
className: "Prediction"
}
} }),
additionalProperties: EntityModel.type.additionalProperties
}
}
}
};
var APIError = {
serializedName: "APIError",
var ErrorBody = {
serializedName: "ErrorBody",
type: {
name: "Composite",
className: "APIError",
className: "ErrorBody",
modelProperties: {
statusCode: {
serializedName: "statusCode",
code: {
required: true,
serializedName: "code",
type: {

@@ -366,2 +398,3 @@ name: "String"

message: {
required: true,
serializedName: "message",

@@ -375,13 +408,32 @@ type: {

};
var ErrorModel = {
serializedName: "Error",
type: {
name: "Composite",
className: "ErrorModel",
modelProperties: {
error: {
required: true,
serializedName: "error",
type: {
name: "Composite",
className: "ErrorBody"
}
}
}
}
};
var mappers = /*#__PURE__*/Object.freeze({
IntentModel: IntentModel,
EntityModel: EntityModel,
CompositeChildModel: CompositeChildModel,
CompositeEntityModel: CompositeEntityModel,
PredictionRequestOptions: PredictionRequestOptions,
ExternalEntity: ExternalEntity,
RequestList: RequestList,
DynamicList: DynamicList,
PredictionRequest: PredictionRequest,
Intent: Intent,
Sentiment: Sentiment,
LuisResult: LuisResult,
EntityWithScore: EntityWithScore,
EntityWithResolution: EntityWithResolution,
APIError: APIError
Prediction: Prediction,
PredictionResponse: PredictionResponse,
ErrorBody: ErrorBody,
ErrorModel: ErrorModel
});

@@ -398,10 +450,12 @@

var Mappers = /*#__PURE__*/Object.freeze({
APIError: APIError,
CompositeChildModel: CompositeChildModel,
CompositeEntityModel: CompositeEntityModel,
EntityModel: EntityModel,
EntityWithResolution: EntityWithResolution,
EntityWithScore: EntityWithScore,
IntentModel: IntentModel,
LuisResult: LuisResult,
DynamicList: DynamicList,
ErrorBody: ErrorBody,
ErrorModel: ErrorModel,
ExternalEntity: ExternalEntity,
Intent: Intent,
Prediction: Prediction,
PredictionRequest: PredictionRequest,
PredictionRequestOptions: PredictionRequestOptions,
PredictionResponse: PredictionResponse,
RequestList: RequestList,
Sentiment: Sentiment

@@ -425,18 +479,6 @@ });

type: {
name: "String"
name: "Uuid"
}
}
};
var bingSpellCheckSubscriptionKey = {
parameterPath: [
"options",
"bingSpellCheckSubscriptionKey"
],
mapper: {
serializedName: "bing-spell-check-subscription-key",
type: {
name: "String"
}
}
};
var endpoint = {

@@ -466,9 +508,9 @@ parameterPath: "endpoint",

};
var spellCheck = {
var showAllIntents = {
parameterPath: [
"options",
"spellCheck"
"showAllIntents"
],
mapper: {
serializedName: "spellCheck",
serializedName: "show-all-intents",
type: {

@@ -479,35 +521,31 @@ name: "Boolean"

};
var staging = {
parameterPath: [
"options",
"staging"
],
var slotName = {
parameterPath: "slotName",
mapper: {
serializedName: "staging",
required: true,
serializedName: "slotName",
type: {
name: "Boolean"
name: "String"
}
}
};
var timezoneOffset = {
var verbose = {
parameterPath: [
"options",
"timezoneOffset"
"verbose"
],
mapper: {
serializedName: "timezoneOffset",
serializedName: "verbose",
type: {
name: "Number"
name: "Boolean"
}
}
};
var verbose = {
parameterPath: [
"options",
"verbose"
],
var versionId = {
parameterPath: "versionId",
mapper: {
serializedName: "verbose",
required: true,
serializedName: "versionId",
type: {
name: "Boolean"
name: "String"
}

@@ -526,56 +564,81 @@ }

*/
/** Class representing a Prediction. */
var Prediction = /** @class */ (function () {
/** Class representing a PredictionOperations. */
var PredictionOperations = /** @class */ (function () {
/**
* Create a Prediction.
* Create a PredictionOperations.
* @param {LUISRuntimeClientContext} client Reference to the service client.
*/
function Prediction(client) {
function PredictionOperations(client) {
this.client = client;
}
Prediction.prototype.resolve = function (appId$$1, query, options, callback) {
PredictionOperations.prototype.getVersionPrediction = function (appId$$1, versionId$$1, predictionRequest, options, callback) {
return this.client.sendOperationRequest({
appId: appId$$1,
query: query,
versionId: versionId$$1,
predictionRequest: predictionRequest,
options: options
}, resolveOperationSpec, callback);
}, getVersionPredictionOperationSpec, callback);
};
return Prediction;
PredictionOperations.prototype.getSlotPrediction = function (appId$$1, slotName$$1, predictionRequest, options, callback) {
return this.client.sendOperationRequest({
appId: appId$$1,
slotName: slotName$$1,
predictionRequest: predictionRequest,
options: options
}, getSlotPredictionOperationSpec, callback);
};
return PredictionOperations;
}());
// Operation Specifications
var serializer = new msRest.Serializer(Mappers);
var resolveOperationSpec = {
var getVersionPredictionOperationSpec = {
httpMethod: "POST",
path: "apps/{appId}",
path: "apps/{appId}/versions/{versionId}/predict",
urlParameters: [
endpoint,
appId
appId,
versionId
],
queryParameters: [
timezoneOffset,
verbose,
staging,
spellCheck,
bingSpellCheckSubscriptionKey,
showAllIntents,
log
],
requestBody: {
parameterPath: "query",
mapper: {
required: true,
serializedName: "query",
constraints: {
MaxLength: 500
},
type: {
name: "String"
}
parameterPath: "predictionRequest",
mapper: __assign({}, PredictionRequest, { required: true })
},
responses: {
200: {
bodyMapper: PredictionResponse
},
default: {
bodyMapper: ErrorModel
}
},
serializer: serializer
};
var getSlotPredictionOperationSpec = {
httpMethod: "POST",
path: "apps/{appId}/slots/{slotName}/predict",
urlParameters: [
endpoint,
appId,
slotName
],
queryParameters: [
verbose,
showAllIntents,
log
],
requestBody: {
parameterPath: "predictionRequest",
mapper: __assign({}, PredictionRequest, { required: true })
},
responses: {
200: {
bodyMapper: LuisResult
bodyMapper: PredictionResponse
},
default: {
bodyMapper: APIError
bodyMapper: ErrorModel
}

@@ -606,3 +669,3 @@ },

var packageName = "@azure/cognitiveservices-luis-runtime";
var packageVersion = "2.0.0";
var packageVersion = "3.0.0";
var LUISRuntimeClientContext = /** @class */ (function (_super) {

@@ -633,3 +696,3 @@ __extends(LUISRuntimeClientContext, _super);

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

@@ -663,3 +726,3 @@ _this.endpoint = endpoint;

var _this = _super.call(this, credentials, endpoint, options) || this;
_this.prediction = new Prediction(_this);
_this.prediction = new PredictionOperations(_this);
return _this;

@@ -674,3 +737,3 @@ }

exports.LUISRuntimeMappers = mappers;
exports.Prediction = Prediction;
exports.PredictionOperations = PredictionOperations;

@@ -677,0 +740,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

@@ -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,o){"use strict";var n=function(e,t){return(n=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}n(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,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=Object.freeze({}),a={serializedName:"IntentModel",type:{name:"Composite",className:"IntentModel",modelProperties:{intent:{serializedName:"intent",type:{name:"String"}},score:{serializedName:"score",constraints:{InclusiveMaximum:1,InclusiveMinimum:0},type:{name:"Number"}}}}},s={serializedName:"EntityModel",type:{name:"Composite",className:"EntityModel",modelProperties:{entity:{required:!0,serializedName:"entity",type:{name:"String"}},type:{required:!0,serializedName:"type",type:{name:"String"}},startIndex:{required:!0,serializedName:"startIndex",type:{name:"Number"}},endIndex:{required:!0,serializedName:"endIndex",type:{name:"Number"}}},additionalProperties:{type:{name:"Object"}}}},m={serializedName:"CompositeChildModel",type:{name:"Composite",className:"CompositeChildModel",modelProperties:{type:{required:!0,serializedName:"type",type:{name:"String"}},value:{required:!0,serializedName:"value",type:{name:"String"}}}}},p={serializedName:"CompositeEntityModel",type:{name:"Composite",className:"CompositeEntityModel",modelProperties:{parentType:{required:!0,serializedName:"parentType",type:{name:"String"}},value:{required:!0,serializedName:"value",type:{name:"String"}},children:{required:!0,serializedName:"children",type:{name:"Sequence",element:{type:{name:"Composite",className:"CompositeChildModel"}}}}}}},l={serializedName:"Sentiment",type:{name:"Composite",className:"Sentiment",modelProperties:{label:{serializedName:"label",type:{name:"String"}},score:{serializedName:"score",type:{name:"Number"}}}}},d={serializedName:"LuisResult",type:{name:"Composite",className:"LuisResult",modelProperties:{query:{serializedName:"query",type:{name:"String"}},alteredQuery:{serializedName:"alteredQuery",type:{name:"String"}},topScoringIntent:{serializedName:"topScoringIntent",type:{name:"Composite",className:"IntentModel"}},intents:{serializedName:"intents",type:{name:"Sequence",element:{type:{name:"Composite",className:"IntentModel"}}}},entities:{serializedName:"entities",type:{name:"Sequence",element:{type:{name:"Composite",className:"EntityModel",additionalProperties:{type:{name:"Object"}}}}}},compositeEntities:{serializedName:"compositeEntities",type:{name:"Sequence",element:{type:{name:"Composite",className:"CompositeEntityModel"}}}},sentimentAnalysis:{serializedName:"sentimentAnalysis",type:{name:"Composite",className:"Sentiment"}},connectedServiceResult:{serializedName:"connectedServiceResult",type:{name:"Composite",className:"LuisResult"}}}}},u={serializedName:"EntityWithScore",type:{name:"Composite",className:"EntityWithScore",modelProperties:i({},s.type.modelProperties,{score:{required:!0,serializedName:"score",constraints:{InclusiveMaximum:1,InclusiveMinimum:0},type:{name:"Number"}}}),additionalProperties:s.type.additionalProperties}},y={serializedName:"EntityWithResolution",type:{name:"Composite",className:"EntityWithResolution",modelProperties:i({},s.type.modelProperties,{resolution:{required:!0,serializedName:"resolution",type:{name:"Object"}}}),additionalProperties:s.type.additionalProperties}},c={serializedName:"APIError",type:{name:"Composite",className:"APIError",modelProperties:{statusCode:{serializedName:"statusCode",type:{name:"String"}},message:{serializedName:"message",type:{name:"String"}}}}},N=Object.freeze({IntentModel:a,EntityModel:s,CompositeChildModel:m,CompositeEntityModel:p,Sentiment:l,LuisResult:d,EntityWithScore:u,EntityWithResolution:y,APIError:c}),z=Object.freeze({APIError:c,CompositeChildModel:m,CompositeEntityModel:p,EntityModel:s,EntityWithResolution:y,EntityWithScore:u,IntentModel:a,LuisResult:d,Sentiment:l}),h=function(){function e(e){this.client=e}return e.prototype.resolve=function(e,t,i,n){return this.client.sendOperationRequest({appId:e,query:t,options:i},f,n)},e}(),f={httpMethod:"POST",path:"apps/{appId}",urlParameters:[{parameterPath:"endpoint",mapper:{required:!0,serializedName:"Endpoint",defaultValue:"",type:{name:"String"}},skipEncoding:!0},{parameterPath:"appId",mapper:{required:!0,serializedName:"appId",type:{name:"String"}}}],queryParameters:[{parameterPath:["options","timezoneOffset"],mapper:{serializedName:"timezoneOffset",type:{name:"Number"}}},{parameterPath:["options","verbose"],mapper:{serializedName:"verbose",type:{name:"Boolean"}}},{parameterPath:["options","staging"],mapper:{serializedName:"staging",type:{name:"Boolean"}}},{parameterPath:["options","spellCheck"],mapper:{serializedName:"spellCheck",type:{name:"Boolean"}}},{parameterPath:["options","bingSpellCheckSubscriptionKey"],mapper:{serializedName:"bing-spell-check-subscription-key",type:{name:"String"}}},{parameterPath:["options","log"],mapper:{serializedName:"log",type:{name:"Boolean"}}}],requestBody:{parameterPath:"query",mapper:{required:!0,serializedName:"query",constraints:{MaxLength:500},type:{name:"String"}}},responses:{200:{bodyMapper:d},default:{bodyMapper:c}},serializer:new o.Serializer(z)},C=function(a){function e(e,t,i){var n=this;if(null==t)throw new Error("'endpoint' cannot be null.");if(null==e)throw new Error("'credentials' cannot be null.");if(i||(i={}),!i.userAgent){var r=o.getDefaultUserAgentValue();i.userAgent="@azure/cognitiveservices-luis-runtime/2.0.0 "+r}return(n=a.call(this,e,i)||this).baseUri="{Endpoint}/luis/v2.0",n.requestContentType="application/json; charset=utf-8",n.endpoint=t,n.credentials=e,n}return t(e,a),e}(o.ServiceClient),S=function(r){function e(e,t,i){var n=r.call(this,e,t,i)||this;return n.prediction=new h(n),n}return t(e,r),e}(C);e.LUISRuntimeClient=S,e.LUISRuntimeClientContext=C,e.LUISRuntimeModels=r,e.LUISRuntimeMappers=N,e.Prediction=h,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:"PredictionRequestOptions",type:{name:"Composite",className:"PredictionRequestOptions",modelProperties:{datetimeReference:{serializedName:"datetimeReference",type:{name:"DateTime"}},overridePredictions:{serializedName:"overridePredictions",type:{name:"Boolean"}}}}},o={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"}}}}},m={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"}}}}}}},p={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"}}}}}}},d={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"}}}}}}},l={serializedName:"Intent",type:{name:"Composite",className:"Intent",modelProperties:{score:{serializedName:"score",type:{name:"Number"}},childApp:{serializedName:"childApp",type:{name:"Composite",className:"Prediction"}}}}},u={serializedName:"Sentiment",type:{name:"Composite",className:"Sentiment",modelProperties:{score:{required:!0,serializedName:"score",type:{name:"Number"}},label:{serializedName:"label",type:{name:"String"}}}}},c={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"}}}}},y={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"}}}}},N={serializedName:"ErrorBody",type:{name:"Composite",className:"ErrorBody",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"String"}},message:{required:!0,serializedName:"message",type:{name:"String"}}}}},z={serializedName:"Error",type:{name:"Composite",className:"ErrorModel",modelProperties:{error:{required:!0,serializedName:"error",type:{name:"Composite",className:"ErrorBody"}}}}},q=Object.freeze({PredictionRequestOptions:s,ExternalEntity:o,RequestList:m,DynamicList:p,PredictionRequest:d,Intent:l,Sentiment:u,Prediction:c,PredictionResponse:y,ErrorBody:N,ErrorModel:z}),P=Object.freeze({DynamicList:p,ErrorBody:N,ErrorModel:z,ExternalEntity:o,Intent:l,Prediction:c,PredictionRequest:d,PredictionRequestOptions:s,PredictionResponse:y,RequestList:m,Sentiment:u}),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({},d,{required:!0})},responses:{200:{bodyMapper:y},default:{bodyMapper:z}},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({},d,{required:!0})},responses:{200:{bodyMapper:y},default:{bodyMapper:z}},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={}),!i.userAgent){var a=n.getDefaultUserAgentValue();i.userAgent="@azure/cognitiveservices-luis-runtime/3.0.0 "+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})});

@@ -7,3 +7,3 @@ import * as msRest from "@azure/ms-rest-js";

declare class LUISRuntimeClient extends LUISRuntimeClientContext {
prediction: operations.Prediction;
prediction: operations.PredictionOperations;
/**

@@ -10,0 +10,0 @@ * Initializes a new instance of the LUISRuntimeClient class.

@@ -26,3 +26,3 @@ /*

var _this = _super.call(this, credentials, endpoint, options) || this;
_this.prediction = new operations.Prediction(_this);
_this.prediction = new operations.PredictionOperations(_this);
return _this;

@@ -29,0 +29,0 @@ }

@@ -13,3 +13,3 @@ /*

var packageName = "@azure/cognitiveservices-luis-runtime";
var packageVersion = "2.0.0";
var packageVersion = "3.0.0";
var LUISRuntimeClientContext = /** @class */ (function (_super) {

@@ -40,3 +40,3 @@ tslib_1.__extends(LUISRuntimeClientContext, _super);

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

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

import * as msRest from "@azure/ms-rest-js";
/**
* An intent detected from the utterance.
* The custom options for the prediction request.
*/
export interface IntentModel {
export interface PredictionRequestOptions {
/**
* Name of the intent, as defined in LUIS.
* The reference DateTime used for predicting datetime entities.
*/
intent?: string;
datetimeReference?: Date;
/**
* Associated prediction score for the intent (float).
* Whether to make the external entities resolution override the predictions if an overlap
* occurs.
*/
score?: number;
overridePredictions?: boolean;
}
/**
* An entity extracted from the utterance.
* Defines a user predicted entity that extends an already existing one.
*/
export interface EntityModel {
export interface ExternalEntity {
/**
* Name of the entity, as defined in LUIS.
* The name of the entity to extend.
*/
entity: string;
entityName: string;
/**
* Type of the entity, as defined in LUIS.
* The start character index of the predicted entity.
*/
type: string;
startIndex: number;
/**
* The position of the first character of the matched entity within the utterance.
* The length of the predicted entity.
*/
startIndex: number;
entityLength: number;
/**
* The position of the last character of the matched entity within the utterance.
* A user supplied custom resolution to return as the entity's prediction.
*/
endIndex: number;
resolution?: any;
}
/**
* Defines a sub-list to append to an existing list entity.
*/
export interface RequestList {
/**
* Describes unknown properties. The value of an unknown property can be of "any" type.
* The name of the sub-list.
*/
[property: string]: any;
name?: string;
/**
* The canonical form of the sub-list.
*/
canonicalForm: string;
/**
* The synonyms of the canonical form.
*/
synonyms?: string[];
}
/**
* Child entity in a LUIS Composite Entity.
* Defines an extension for a list entity.
*/
export interface CompositeChildModel {
export interface DynamicList {
/**
* Type of child entity.
* The name of the list entity to extend.
*/
type: string;
listEntityName: string;
/**
* Value extracted by LUIS.
* The lists to append on the extended list entity.
*/
value: string;
requestLists: RequestList[];
}
/**
* LUIS Composite Entity.
* Represents the prediction request parameters.
*/
export interface CompositeEntityModel {
export interface PredictionRequest {
/**
* Type/name of parent entity.
* The query to predict
*/
parentType: string;
query: string;
/**
* Value for composite entity extracted by LUIS.
* The custom options defined for this request.
*/
value: string;
options?: PredictionRequestOptions;
/**
* Child entities.
* The externally predicted entities for this request
*/
children: CompositeChildModel[];
externalEntities?: ExternalEntity[];
/**
* The dynamically created list entities for this request
*/
dynamicLists?: DynamicList[];
}
/**
* Sentiment of the input utterance.
* Represents an intent prediction.
*/
export interface Intent {
/**
* The score of the fired intent.
*/
score?: number;
/**
* The prediction of the dispatched application.
*/
childApp?: Prediction;
}
/**
* The result of the sentiment analysis.
*/
export interface Sentiment {
/**
* The polarity of the sentiment, can be positive, neutral or negative.
* The sentiment score of the query.
*/
label?: string;
score: number;
/**
* Score of the sentiment, ranges from 0 (most negative) to 1 (most positive).
* The label of the sentiment analysis result.
*/
score?: number;
label?: string;
}
/**
* Prediction, based on the input query, containing intent(s) and entities.
* Represents the prediction of a query.
*/
export interface LuisResult {
export interface Prediction {
/**
* The input utterance that was analyzed.
* The query after pre-processing and normalization.
*/
query?: string;
normalizedQuery: string;
/**
* The corrected utterance (when spell checking was enabled).
* The query after spell checking. Only set if spell check was enabled and a spelling mistake was
* found.
*/
alteredQuery?: string;
topScoringIntent?: IntentModel;
/**
* All the intents (and their score) that were detected from utterance.
* The name of the top scoring intent.
*/
intents?: IntentModel[];
topIntent: string;
/**
* The entities extracted from the utterance.
* A dictionary representing the intents that fired.
*/
entities?: EntityModel[];
intents: {
[propertyName: string]: Intent;
};
/**
* The composite entities extracted from the utterance.
* The dictionary representing the entities that fired.
*/
compositeEntities?: CompositeEntityModel[];
sentimentAnalysis?: Sentiment;
connectedServiceResult?: LuisResult;
}
/**
* An interface representing EntityWithScore.
*/
export interface EntityWithScore extends EntityModel {
entities: {
[propertyName: string]: any;
};
/**
* Associated prediction score for the intent (float).
* The result of the sentiment analysis.
*/
score: number;
sentiment?: Sentiment;
}
/**
* An interface representing EntityWithResolution.
* Represents the prediction response.
*/
export interface EntityWithResolution extends EntityModel {
export interface PredictionResponse {
/**
* Resolution values for pre-built LUIS entities.
* The query used in the prediction.
*/
resolution: any;
query: string;
/**
* The prediction of the requested query.
*/
prediction: Prediction;
}
/**
* Error information returned by the API
* Represents the definition of the error that occurred.
*/
export interface APIError {
export interface ErrorBody {
/**
* HTTP Status code
* The error code.
*/
statusCode?: string;
code: string;
/**
* Cause of the error.
* The error message.
*/
message?: string;
message: string;
}
/**
* Represents the error that occurred.
*/
export interface ErrorModel {
error: ErrorBody;
}
/**
* Optional Parameters.
*/
export interface PredictionResolveOptionalParams extends msRest.RequestOptionsBase {
export interface PredictionGetVersionPredictionOptionalParams extends msRest.RequestOptionsBase {
/**
* The timezone offset for the location of the request.
* Indicates whether to get extra metadata for the entities predictions or not.
*/
timezoneOffset?: number;
verbose?: boolean;
/**
* If true, return all intents instead of just the top scoring intent.
* Indicates whether to return all the intents in the response or just the top intent.
*/
verbose?: boolean;
showAllIntents?: boolean;
/**
* Use the staging endpoint slot.
* Indicates whether to log the endpoint query or not.
*/
staging?: boolean;
log?: boolean;
}
/**
* Optional Parameters.
*/
export interface PredictionGetSlotPredictionOptionalParams extends msRest.RequestOptionsBase {
/**
* Enable spell checking.
* Indicates whether to get extra metadata for the entities predictions or not.
*/
spellCheck?: boolean;
verbose?: boolean;
/**
* The subscription key to use when enabling bing spell check
* Indicates whether to return all the intents in the response or just the top intent.
*/
bingSpellCheckSubscriptionKey?: string;
showAllIntents?: boolean;
/**
* Log query (default is true)
* Indicates whether to log the endpoint query or not.
*/

@@ -172,5 +215,5 @@ log?: boolean;

/**
* Contains response data for the resolve operation.
* Contains response data for the getVersionPrediction operation.
*/
export declare type PredictionResolveResponse = LuisResult & {
export declare type PredictionGetVersionPredictionResponse = PredictionResponse & {
/**

@@ -187,5 +230,23 @@ * The underlying HTTP response.

*/
parsedBody: LuisResult;
parsedBody: PredictionResponse;
};
};
/**
* Contains response data for the getSlotPrediction operation.
*/
export declare type PredictionGetSlotPredictionResponse = PredictionResponse & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: PredictionResponse;
};
};
//# sourceMappingURL=index.d.ts.map
import * as msRest from "@azure/ms-rest-js";
export declare const IntentModel: msRest.CompositeMapper;
export declare const EntityModel: msRest.CompositeMapper;
export declare const CompositeChildModel: msRest.CompositeMapper;
export declare const CompositeEntityModel: msRest.CompositeMapper;
export declare const PredictionRequestOptions: msRest.CompositeMapper;
export declare const ExternalEntity: msRest.CompositeMapper;
export declare const RequestList: msRest.CompositeMapper;
export declare const DynamicList: msRest.CompositeMapper;
export declare const PredictionRequest: msRest.CompositeMapper;
export declare const Intent: msRest.CompositeMapper;
export declare const Sentiment: msRest.CompositeMapper;
export declare const LuisResult: msRest.CompositeMapper;
export declare const EntityWithScore: msRest.CompositeMapper;
export declare const EntityWithResolution: msRest.CompositeMapper;
export declare const APIError: msRest.CompositeMapper;
export declare const Prediction: msRest.CompositeMapper;
export declare const PredictionResponse: msRest.CompositeMapper;
export declare const ErrorBody: msRest.CompositeMapper;
export declare const ErrorModel: msRest.CompositeMapper;
//# sourceMappingURL=mappers.d.ts.map

@@ -8,23 +8,18 @@ /*

*/
import * as tslib_1 from "tslib";
export var IntentModel = {
serializedName: "IntentModel",
export var PredictionRequestOptions = {
serializedName: "PredictionRequestOptions",
type: {
name: "Composite",
className: "IntentModel",
className: "PredictionRequestOptions",
modelProperties: {
intent: {
serializedName: "intent",
datetimeReference: {
serializedName: "datetimeReference",
type: {
name: "String"
name: "DateTime"
}
},
score: {
serializedName: "score",
constraints: {
InclusiveMaximum: 1,
InclusiveMinimum: 0
},
overridePredictions: {
serializedName: "overridePredictions",
type: {
name: "Number"
name: "Boolean"
}

@@ -35,11 +30,11 @@ }

};
export var EntityModel = {
serializedName: "EntityModel",
export var ExternalEntity = {
serializedName: "ExternalEntity",
type: {
name: "Composite",
className: "EntityModel",
className: "ExternalEntity",
modelProperties: {
entity: {
entityName: {
required: true,
serializedName: "entity",
serializedName: "entityName",
type: {

@@ -49,9 +44,2 @@ name: "String"

},
type: {
required: true,
serializedName: "type",
type: {
name: "String"
}
},
startIndex: {

@@ -64,26 +52,26 @@ required: true,

},
endIndex: {
entityLength: {
required: true,
serializedName: "endIndex",
serializedName: "entityLength",
type: {
name: "Number"
}
},
resolution: {
serializedName: "resolution",
type: {
name: "Object"
}
}
},
additionalProperties: {
type: {
name: "Object"
}
}
}
};
export var CompositeChildModel = {
serializedName: "CompositeChildModel",
export var RequestList = {
serializedName: "RequestList",
type: {
name: "Composite",
className: "CompositeChildModel",
className: "RequestList",
modelProperties: {
type: {
required: true,
serializedName: "type",
name: {
serializedName: "name",
type: {

@@ -93,8 +81,19 @@ name: "String"

},
value: {
canonicalForm: {
required: true,
serializedName: "value",
serializedName: "canonicalForm",
type: {
name: "String"
}
},
synonyms: {
serializedName: "synonyms",
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
}

@@ -104,11 +103,11 @@ }

};
export var CompositeEntityModel = {
serializedName: "CompositeEntityModel",
export var DynamicList = {
serializedName: "DynamicList",
type: {
name: "Composite",
className: "CompositeEntityModel",
className: "DynamicList",
modelProperties: {
parentType: {
listEntityName: {
required: true,
serializedName: "parentType",
serializedName: "listEntityName",
type: {

@@ -118,13 +117,41 @@ name: "String"

},
value: {
requestLists: {
required: true,
serializedName: "value",
serializedName: "requestLists",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "RequestList"
}
}
}
}
}
}
};
export var PredictionRequest = {
serializedName: "PredictionRequest",
type: {
name: "Composite",
className: "PredictionRequest",
modelProperties: {
query: {
required: true,
serializedName: "query",
type: {
name: "String"
}
},
children: {
required: true,
serializedName: "children",
options: {
serializedName: "options",
type: {
name: "Composite",
className: "PredictionRequestOptions"
}
},
externalEntities: {
serializedName: "externalEntities",
type: {
name: "Sequence",

@@ -134,6 +161,18 @@ element: {

name: "Composite",
className: "CompositeChildModel"
className: "ExternalEntity"
}
}
}
},
dynamicLists: {
serializedName: "dynamicLists",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "DynamicList"
}
}
}
}

@@ -143,2 +182,24 @@ }

};
export var Intent = {
serializedName: "Intent",
type: {
name: "Composite",
className: "Intent",
modelProperties: {
score: {
serializedName: "score",
type: {
name: "Number"
}
},
childApp: {
serializedName: "childApp",
type: {
name: "Composite",
className: "Prediction"
}
}
}
}
};
export var Sentiment = {

@@ -150,2 +211,9 @@ serializedName: "Sentiment",

modelProperties: {
score: {
required: true,
serializedName: "score",
type: {
name: "Number"
}
},
label: {

@@ -156,8 +224,2 @@ serializedName: "label",

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

@@ -167,10 +229,11 @@ }

};
export var LuisResult = {
serializedName: "LuisResult",
export var Prediction = {
serializedName: "Prediction",
type: {
name: "Composite",
className: "LuisResult",
className: "Prediction",
modelProperties: {
query: {
serializedName: "query",
normalizedQuery: {
required: true,
serializedName: "normalizedQuery",
type: {

@@ -186,17 +249,18 @@ name: "String"

},
topScoringIntent: {
serializedName: "topScoringIntent",
topIntent: {
required: true,
serializedName: "topIntent",
type: {
name: "Composite",
className: "IntentModel"
name: "String"
}
},
intents: {
required: true,
serializedName: "intents",
type: {
name: "Sequence",
element: {
name: "Dictionary",
value: {
type: {
name: "Composite",
className: "IntentModel"
className: "Intent"
}

@@ -207,14 +271,9 @@ }

entities: {
required: true,
serializedName: "entities",
type: {
name: "Sequence",
element: {
name: "Dictionary",
value: {
type: {
name: "Composite",
className: "EntityModel",
additionalProperties: {
type: {
name: "Object"
}
}
name: "Object"
}

@@ -224,27 +283,8 @@ }

},
compositeEntities: {
serializedName: "compositeEntities",
sentiment: {
serializedName: "sentiment",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "CompositeEntityModel"
}
}
}
},
sentimentAnalysis: {
serializedName: "sentimentAnalysis",
type: {
name: "Composite",
className: "Sentiment"
}
},
connectedServiceResult: {
serializedName: "connectedServiceResult",
type: {
name: "Composite",
className: "LuisResult"
}
}

@@ -254,44 +294,35 @@ }

};
export var EntityWithScore = {
serializedName: "EntityWithScore",
export var PredictionResponse = {
serializedName: "PredictionResponse",
type: {
name: "Composite",
className: "EntityWithScore",
modelProperties: tslib_1.__assign({}, EntityModel.type.modelProperties, { score: {
className: "PredictionResponse",
modelProperties: {
query: {
required: true,
serializedName: "score",
constraints: {
InclusiveMaximum: 1,
InclusiveMinimum: 0
},
serializedName: "query",
type: {
name: "Number"
name: "String"
}
} }),
additionalProperties: EntityModel.type.additionalProperties
}
};
export var EntityWithResolution = {
serializedName: "EntityWithResolution",
type: {
name: "Composite",
className: "EntityWithResolution",
modelProperties: tslib_1.__assign({}, EntityModel.type.modelProperties, { resolution: {
},
prediction: {
required: true,
serializedName: "resolution",
serializedName: "prediction",
type: {
name: "Object"
name: "Composite",
className: "Prediction"
}
} }),
additionalProperties: EntityModel.type.additionalProperties
}
}
}
};
export var APIError = {
serializedName: "APIError",
export var ErrorBody = {
serializedName: "ErrorBody",
type: {
name: "Composite",
className: "APIError",
className: "ErrorBody",
modelProperties: {
statusCode: {
serializedName: "statusCode",
code: {
required: true,
serializedName: "code",
type: {

@@ -302,2 +333,3 @@ name: "String"

message: {
required: true,
serializedName: "message",

@@ -311,2 +343,19 @@ type: {

};
export var ErrorModel = {
serializedName: "Error",
type: {
name: "Composite",
className: "ErrorModel",
modelProperties: {
error: {
required: true,
serializedName: "error",
type: {
name: "Composite",
className: "ErrorBody"
}
}
}
}
};
//# sourceMappingURL=mappers.js.map
import * as msRest from "@azure/ms-rest-js";
export declare const appId: msRest.OperationURLParameter;
export declare const bingSpellCheckSubscriptionKey: msRest.OperationQueryParameter;
export declare const endpoint: msRest.OperationURLParameter;
export declare const log: msRest.OperationQueryParameter;
export declare const spellCheck: msRest.OperationQueryParameter;
export declare const staging: msRest.OperationQueryParameter;
export declare const timezoneOffset: msRest.OperationQueryParameter;
export declare const showAllIntents: msRest.OperationQueryParameter;
export declare const slotName: msRest.OperationURLParameter;
export declare const verbose: msRest.OperationQueryParameter;
export declare const versionId: msRest.OperationURLParameter;
//# sourceMappingURL=parameters.d.ts.map

@@ -16,18 +16,6 @@ /*

type: {
name: "String"
name: "Uuid"
}
}
};
export var bingSpellCheckSubscriptionKey = {
parameterPath: [
"options",
"bingSpellCheckSubscriptionKey"
],
mapper: {
serializedName: "bing-spell-check-subscription-key",
type: {
name: "String"
}
}
};
export var endpoint = {

@@ -57,9 +45,9 @@ parameterPath: "endpoint",

};
export var spellCheck = {
export var showAllIntents = {
parameterPath: [
"options",
"spellCheck"
"showAllIntents"
],
mapper: {
serializedName: "spellCheck",
serializedName: "show-all-intents",
type: {

@@ -70,35 +58,31 @@ name: "Boolean"

};
export var staging = {
parameterPath: [
"options",
"staging"
],
export var slotName = {
parameterPath: "slotName",
mapper: {
serializedName: "staging",
required: true,
serializedName: "slotName",
type: {
name: "Boolean"
name: "String"
}
}
};
export var timezoneOffset = {
export var verbose = {
parameterPath: [
"options",
"timezoneOffset"
"verbose"
],
mapper: {
serializedName: "timezoneOffset",
serializedName: "verbose",
type: {
name: "Number"
name: "Boolean"
}
}
};
export var verbose = {
parameterPath: [
"options",
"verbose"
],
export var versionId = {
parameterPath: "versionId",
mapper: {
serializedName: "verbose",
required: true,
serializedName: "versionId",
type: {
name: "Boolean"
name: "String"
}

@@ -105,0 +89,0 @@ }

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

export * from "./prediction";
export * from "./predictionOperations";
//# sourceMappingURL=index.d.ts.map

@@ -10,3 +10,3 @@ /*

*/
export * from "./prediction";
export * from "./predictionOperations";
//# sourceMappingURL=index.js.map

@@ -0,0 +0,0 @@ The MIT License (MIT)

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

"description": "LUISRuntimeClient Library with typescript type definitions for node.js and browser.",
"version": "2.0.0",
"version": "3.0.0",
"dependencies": {
"@azure/ms-rest-js": "^1.6.0",
"@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"

@@ -29,3 +29,3 @@ },

},
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/cognitiveservices-luis-runtime",
"homepage": "https://github.com/azure/azure-sdk-for-js",
"repository": {

@@ -47,3 +47,3 @@ "type": "git",

"esm/**/*.d.ts.map",
"lib/**/*.ts",
"src/**/*.ts",
"README.md",

@@ -50,0 +50,0 @@ "rollup.config.js",

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

#### nodejs - Authentication, client creation and resolve prediction as an example written in TypeScript.
#### nodejs - Authentication, client creation and getVersionPrediction prediction as an example written in TypeScript.

@@ -37,11 +37,29 @@ ##### Install @azure/ms-rest-nodeauth

const client = new LUISRuntimeClient(creds, subscriptionId);
const appId = "testappId";
const query = "testquery";
const timezoneOffset = 1.01;
const appId = ec7b1657-199d-4d8a-bbb2-89a11a42e02a;
const versionId = "testversionId";
const predictionRequest: LUISRuntimeModels.PredictionRequest = {
query: "testquery",
options: {
datetimeReference: new Date().toISOString(),
overridePredictions: true
},
externalEntities: [{
entityName: "testentityName",
startIndex: 1,
entityLength: 1,
resolution: {}
}],
dynamicLists: [{
listEntityName: "testlistEntityName",
requestLists: [{
name: "testname",
canonicalForm: "testcanonicalForm",
synonyms: ["testsynonyms"]
}]
}]
};
const verbose = true;
const staging = true;
const spellCheck = true;
const bingSpellCheckSubscriptionKey = "testbingSpellCheckSubscriptionKey";
const showAllIntents = true;
const log = true;
client.prediction.resolve(appId, query, timezoneOffset, verbose, staging, spellCheck, bingSpellCheckSubscriptionKey, log).then((result) => {
client.prediction.getVersionPrediction(appId, versionId, predictionRequest, verbose, showAllIntents, log).then((result) => {
console.log("The result is:");

@@ -55,3 +73,3 @@ console.log(result);

#### browser - Authentication, client creation and resolve prediction as an example written in JavaScript.
#### browser - Authentication, client creation and getVersionPrediction prediction as an example written in JavaScript.

@@ -89,11 +107,29 @@ ##### Install @azure/ms-rest-browserauth

const client = new Azure.CognitiveservicesLuisRuntime.LUISRuntimeClient(res.creds, subscriptionId);
const appId = "testappId";
const query = "testquery";
const timezoneOffset = 1.01;
const appId = ec7b1657-199d-4d8a-bbb2-89a11a42e02a;
const versionId = "testversionId";
const predictionRequest = {
query: "testquery",
options: {
datetimeReference: new Date().toISOString(),
overridePredictions: true
},
externalEntities: [{
entityName: "testentityName",
startIndex: 1,
entityLength: 1,
resolution: {}
}],
dynamicLists: [{
listEntityName: "testlistEntityName",
requestLists: [{
name: "testname",
canonicalForm: "testcanonicalForm",
synonyms: ["testsynonyms"]
}]
}]
};
const verbose = true;
const staging = true;
const spellCheck = true;
const bingSpellCheckSubscriptionKey = "testbingSpellCheckSubscriptionKey";
const showAllIntents = true;
const log = true;
client.prediction.resolve(appId, query, timezoneOffset, verbose, staging, spellCheck, bingSpellCheckSubscriptionKey, log).then((result) => {
client.prediction.getVersionPrediction(appId, versionId, predictionRequest, verbose, showAllIntents, log).then((result) => {
console.log("The result is:");

@@ -115,4 +151,1 @@ console.log(result);

- [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%2Fpackages%2F%40azure%2Fcognitiveservices-luis-runtime%2FREADME.png)

@@ -17,4 +17,4 @@ {

},
"include": ["./lib/**/*.ts"],
"include": ["./src/**/*.ts"],
"exclude": ["node_modules"]
}

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

Sorry, the diff of this file is not supported yet