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

@azure/cognitiveservices-computervision

Package Overview
Dependencies
Maintainers
6
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/cognitiveservices-computervision - npm Package Compare versions

Comparing version 6.0.0 to 7.0.0

2

dist/cognitiveservices-computervision.min.js

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

!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports,require("@azure/ms-rest-js")):"function"==typeof define&&define.amd?define(["exports","@azure/ms-rest-js"],a):a(((e=e||self).Azure=e.Azure||{},e.Azure.CognitiveservicesComputervision={}),e.msRest)}(this,function(e,n){"use strict";var r=function(e,a){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])})(e,a)};function a(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}var s,t=function(){return(t=Object.assign||function(e){for(var a,t=1,r=arguments.length;t<r;t++)for(var i in a=arguments[t])Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i]);return e}).apply(this,arguments)},i=Object.freeze({}),m={serializedName:"ImageAnalysis",type:{name:"Composite",className:"ImageAnalysis",modelProperties:{categories:{nullable:!0,serializedName:"categories",type:{name:"Sequence",element:{type:{name:"Composite",className:"Category"}}}},adult:{serializedName:"adult",type:{name:"Composite",className:"AdultInfo"}},color:{serializedName:"color",type:{name:"Composite",className:"ColorInfo"}},imageType:{serializedName:"imageType",type:{name:"Composite",className:"ImageType"}},tags:{nullable:!0,serializedName:"tags",type:{name:"Sequence",element:{type:{name:"Composite",className:"ImageTag"}}}},description:{serializedName:"description",type:{name:"Composite",className:"ImageDescriptionDetails"}},faces:{nullable:!0,serializedName:"faces",type:{name:"Sequence",element:{type:{name:"Composite",className:"FaceDescription"}}}},objects:{nullable:!0,serializedName:"objects",type:{name:"Sequence",element:{type:{name:"Composite",className:"DetectedObject"}}}},brands:{nullable:!0,serializedName:"brands",type:{name:"Sequence",element:{type:{name:"Composite",className:"DetectedBrand"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},l={serializedName:"ImageDescription",type:{name:"Composite",className:"ImageDescription",modelProperties:{tags:{nullable:!0,serializedName:"description.tags",type:{name:"Sequence",element:{type:{name:"String"}}}},captions:{nullable:!0,serializedName:"description.captions",type:{name:"Sequence",element:{type:{name:"Composite",className:"ImageCaption"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},o={serializedName:"DetectResult",type:{name:"Composite",className:"DetectResult",modelProperties:{objects:{nullable:!0,readOnly:!0,serializedName:"objects",type:{name:"Sequence",element:{type:{name:"Composite",className:"DetectedObject"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},p={serializedName:"ListModelsResult",type:{name:"Composite",className:"ListModelsResult",modelProperties:{modelsProperty:{nullable:!0,readOnly:!0,serializedName:"models",type:{name:"Sequence",element:{type:{name:"Composite",className:"ModelDescription"}}}}}}},d={serializedName:"DomainModelResults",type:{name:"Composite",className:"DomainModelResults",modelProperties:{result:{serializedName:"result",type:{name:"Object"}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},u={serializedName:"OcrResult",type:{name:"Composite",className:"OcrResult",modelProperties:{language:{nullable:!0,serializedName:"language",type:{name:"String"}},textAngle:{nullable:!1,serializedName:"textAngle",type:{name:"Number"}},orientation:{nullable:!0,serializedName:"orientation",type:{name:"String"}},regions:{nullable:!0,serializedName:"regions",type:{name:"Sequence",element:{type:{name:"Composite",className:"OcrRegion"}}}}}}},c={serializedName:"TagResult",type:{name:"Composite",className:"TagResult",modelProperties:{tags:{nullable:!0,serializedName:"tags",type:{name:"Sequence",element:{type:{name:"Composite",className:"ImageTag"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},y={serializedName:"AreaOfInterestResult",type:{name:"Composite",className:"AreaOfInterestResult",modelProperties:{areaOfInterest:{readOnly:!0,serializedName:"areaOfInterest",type:{name:"Composite",className:"BoundingRect"}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},N={serializedName:"ImageUrl",type:{name:"Composite",className:"ImageUrl",modelProperties:{url:{required:!0,serializedName:"url",type:{name:"String"}}}}},g={serializedName:"ComputerVisionError",type:{name:"Composite",className:"ComputerVisionError",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"Object"}},message:{required:!0,serializedName:"message",type:{name:"String"}},requestId:{serializedName:"requestId",type:{name:"String"}}}}},z={serializedName:"TextOperationResult",type:{name:"Composite",className:"TextOperationResult",modelProperties:{status:{nullable:!1,serializedName:"status",type:{name:"Enum",allowedValues:["NotStarted","Running","Failed","Succeeded"]}},recognitionResult:{serializedName:"recognitionResult",type:{name:"Composite",className:"TextRecognitionResult"}}}}},b={serializedName:"ReadOperationResult",type:{name:"Composite",className:"ReadOperationResult",modelProperties:{status:{nullable:!1,serializedName:"status",type:{name:"Enum",allowedValues:["NotStarted","Running","Failed","Succeeded"]}},recognitionResults:{serializedName:"recognitionResults",type:{name:"Sequence",element:{type:{name:"Composite",className:"TextRecognitionResult"}}}}}}},h={serializedName:"recognizetext-headers",type:{name:"Composite",className:"RecognizeTextHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},C={serializedName:"batchreadfile-headers",type:{name:"Composite",className:"BatchReadFileHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},P={serializedName:"recognizetextinstream-headers",type:{name:"Composite",className:"RecognizeTextInStreamHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},q={serializedName:"batchreadfileinstream-headers",type:{name:"Composite",className:"BatchReadFileInStreamHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},f=Object.freeze({FaceRectangle:{serializedName:"FaceRectangle",type:{name:"Composite",className:"FaceRectangle",modelProperties:{left:{nullable:!1,serializedName:"left",type:{name:"Number"}},top:{nullable:!1,serializedName:"top",type:{name:"Number"}},width:{nullable:!1,serializedName:"width",type:{name:"Number"}},height:{nullable:!1,serializedName:"height",type:{name:"Number"}}}}},CelebritiesModel:{serializedName:"CelebritiesModel",type:{name:"Composite",className:"CelebritiesModel",modelProperties:{name:{nullable:!0,serializedName:"name",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}},faceRectangle:{serializedName:"faceRectangle",type:{name:"Composite",className:"FaceRectangle"}}}}},LandmarksModel:{serializedName:"LandmarksModel",type:{name:"Composite",className:"LandmarksModel",modelProperties:{name:{nullable:!0,serializedName:"name",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}}}}},CategoryDetail:{serializedName:"CategoryDetail",type:{name:"Composite",className:"CategoryDetail",modelProperties:{celebrities:{nullable:!0,serializedName:"celebrities",type:{name:"Sequence",element:{type:{name:"Composite",className:"CelebritiesModel"}}}},landmarks:{nullable:!0,serializedName:"landmarks",type:{name:"Sequence",element:{type:{name:"Composite",className:"LandmarksModel"}}}}}}},Category:{serializedName:"Category",type:{name:"Composite",className:"Category",modelProperties:{name:{nullable:!0,serializedName:"name",type:{name:"String"}},score:{nullable:!1,serializedName:"score",type:{name:"Number"}},detail:{serializedName:"detail",type:{name:"Composite",className:"CategoryDetail"}}}}},AdultInfo:{serializedName:"AdultInfo",type:{name:"Composite",className:"AdultInfo",modelProperties:{isAdultContent:{nullable:!1,serializedName:"isAdultContent",type:{name:"Boolean"}},isRacyContent:{nullable:!1,serializedName:"isRacyContent",type:{name:"Boolean"}},isGoryContent:{nullable:!1,serializedName:"isGoryContent",type:{name:"Boolean"}},adultScore:{nullable:!1,serializedName:"adultScore",type:{name:"Number"}},racyScore:{nullable:!1,serializedName:"racyScore",type:{name:"Number"}},goreScore:{nullable:!1,serializedName:"goreScore",type:{name:"Number"}}}}},ColorInfo:{serializedName:"ColorInfo",type:{name:"Composite",className:"ColorInfo",modelProperties:{dominantColorForeground:{nullable:!0,serializedName:"dominantColorForeground",type:{name:"String"}},dominantColorBackground:{nullable:!0,serializedName:"dominantColorBackground",type:{name:"String"}},dominantColors:{nullable:!0,serializedName:"dominantColors",type:{name:"Sequence",element:{type:{name:"String"}}}},accentColor:{nullable:!0,serializedName:"accentColor",type:{name:"String"}},isBWImg:{nullable:!1,serializedName:"isBWImg",type:{name:"Boolean"}}}}},ImageType:{serializedName:"ImageType",type:{name:"Composite",className:"ImageType",modelProperties:{clipArtType:{nullable:!1,serializedName:"clipArtType",type:{name:"Number"}},lineDrawingType:{nullable:!1,serializedName:"lineDrawingType",type:{name:"Number"}}}}},ImageTag:{serializedName:"ImageTag",type:{name:"Composite",className:"ImageTag",modelProperties:{name:{nullable:!0,serializedName:"name",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}},hint:{nullable:!0,serializedName:"hint",type:{name:"String"}}}}},ImageCaption:{serializedName:"ImageCaption",type:{name:"Composite",className:"ImageCaption",modelProperties:{text:{nullable:!0,serializedName:"text",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}}}}},ImageDescriptionDetails:{serializedName:"ImageDescriptionDetails",type:{name:"Composite",className:"ImageDescriptionDetails",modelProperties:{tags:{nullable:!0,serializedName:"tags",type:{name:"Sequence",element:{type:{name:"String"}}}},captions:{nullable:!0,serializedName:"captions",type:{name:"Sequence",element:{type:{name:"Composite",className:"ImageCaption"}}}}}}},FaceDescription:{serializedName:"FaceDescription",type:{name:"Composite",className:"FaceDescription",modelProperties:{age:{nullable:!1,serializedName:"age",type:{name:"Number"}},gender:{nullable:!0,serializedName:"gender",type:{name:"Enum",allowedValues:["Male","Female"]}},faceRectangle:{serializedName:"faceRectangle",type:{name:"Composite",className:"FaceRectangle"}}}}},BoundingRect:{serializedName:"BoundingRect",type:{name:"Composite",className:"BoundingRect",modelProperties:{x:{nullable:!1,serializedName:"x",type:{name:"Number"}},y:{nullable:!1,serializedName:"y",type:{name:"Number"}},w:{nullable:!1,serializedName:"w",type:{name:"Number"}},h:{nullable:!1,serializedName:"h",type:{name:"Number"}}}}},ObjectHierarchy:{serializedName:"ObjectHierarchy",type:{name:"Composite",className:"ObjectHierarchy",modelProperties:{object:{nullable:!0,serializedName:"object",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}},parent:{serializedName:"parent",type:{name:"Composite",className:"ObjectHierarchy"}}}}},DetectedObject:{serializedName:"DetectedObject",type:{name:"Composite",className:"DetectedObject",modelProperties:{rectangle:{readOnly:!0,serializedName:"rectangle",type:{name:"Composite",className:"BoundingRect"}},object:{nullable:!0,serializedName:"object",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}},parent:{serializedName:"parent",type:{name:"Composite",className:"ObjectHierarchy"}}}}},DetectedBrand:{serializedName:"DetectedBrand",type:{name:"Composite",className:"DetectedBrand",modelProperties:{name:{nullable:!0,readOnly:!0,serializedName:"name",type:{name:"String"}},confidence:{nullable:!1,readOnly:!0,serializedName:"confidence",type:{name:"Number"}},rectangle:{readOnly:!0,serializedName:"rectangle",type:{name:"Composite",className:"BoundingRect"}}}}},ImageMetadata:{serializedName:"ImageMetadata",type:{name:"Composite",className:"ImageMetadata",modelProperties:{width:{nullable:!1,serializedName:"width",type:{name:"Number"}},height:{nullable:!1,serializedName:"height",type:{name:"Number"}},format:{nullable:!0,serializedName:"format",type:{name:"String"}}}}},ImageAnalysis:m,ImageDescription:l,DetectResult:o,ModelDescription:{serializedName:"ModelDescription",type:{name:"Composite",className:"ModelDescription",modelProperties:{name:{nullable:!0,serializedName:"name",type:{name:"String"}},categories:{nullable:!0,serializedName:"categories",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},ListModelsResult:p,DomainModelResults:d,OcrWord:{serializedName:"OcrWord",type:{name:"Composite",className:"OcrWord",modelProperties:{boundingBox:{nullable:!0,serializedName:"boundingBox",type:{name:"String"}},text:{nullable:!0,serializedName:"text",type:{name:"String"}}}}},OcrLine:{serializedName:"OcrLine",type:{name:"Composite",className:"OcrLine",modelProperties:{boundingBox:{nullable:!0,serializedName:"boundingBox",type:{name:"String"}},words:{nullable:!0,serializedName:"words",type:{name:"Sequence",element:{type:{name:"Composite",className:"OcrWord"}}}}}}},OcrRegion:{serializedName:"OcrRegion",type:{name:"Composite",className:"OcrRegion",modelProperties:{boundingBox:{nullable:!0,serializedName:"boundingBox",type:{name:"String"}},lines:{nullable:!0,serializedName:"lines",type:{name:"Sequence",element:{type:{name:"Composite",className:"OcrLine"}}}}}}},OcrResult:u,TagResult:c,AreaOfInterestResult:y,ImageUrl:N,ComputerVisionError:g,LandmarkResults:{serializedName:"LandmarkResults",type:{name:"Composite",className:"LandmarkResults",modelProperties:{landmarks:{nullable:!0,serializedName:"landmarks",type:{name:"Sequence",element:{type:{name:"Composite",className:"LandmarksModel"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},CelebrityResults:{serializedName:"CelebrityResults",type:{name:"Composite",className:"CelebrityResults",modelProperties:{celebrities:{nullable:!0,serializedName:"celebrities",type:{name:"Sequence",element:{type:{name:"Composite",className:"CelebritiesModel"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},Word:{serializedName:"Word",type:{name:"Composite",className:"Word",modelProperties:{boundingBox:{required:!0,serializedName:"boundingBox",type:{name:"Sequence",element:{type:{name:"Number"}}}},text:{required:!0,serializedName:"text",type:{name:"String"}},confidence:{nullable:!0,serializedName:"confidence",type:{name:"Enum",allowedValues:["High","Low"]}}}}},Line:{serializedName:"Line",type:{name:"Composite",className:"Line",modelProperties:{boundingBox:{serializedName:"boundingBox",type:{name:"Sequence",element:{type:{name:"Number"}}}},text:{serializedName:"text",type:{name:"String"}},words:{serializedName:"words",type:{name:"Sequence",element:{type:{name:"Composite",className:"Word"}}}}}}},TextRecognitionResult:{serializedName:"TextRecognitionResult",type:{name:"Composite",className:"TextRecognitionResult",modelProperties:{page:{serializedName:"page",type:{name:"Number"}},clockwiseOrientation:{serializedName:"clockwiseOrientation",type:{name:"Number"}},width:{serializedName:"width",type:{name:"Number"}},height:{serializedName:"height",type:{name:"Number"}},unit:{nullable:!0,serializedName:"unit",type:{name:"Enum",allowedValues:["pixel","inch"]}},lines:{required:!0,serializedName:"lines",type:{name:"Sequence",element:{type:{name:"Composite",className:"Line"}}}}}}},TextOperationResult:z,ReadOperationResult:b,RecognizeTextHeaders:h,BatchReadFileHeaders:C,RecognizeTextInStreamHeaders:P,BatchReadFileInStreamHeaders:q}),S={parameterPath:["options","descriptionExclude"],mapper:{serializedName:"descriptionExclude",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Celebrities","Landmarks"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},I={parameterPath:["options","details"],mapper:{serializedName:"details",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Celebrities","Landmarks"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},O={parameterPath:"detectOrientation",mapper:{required:!0,serializedName:"detectOrientation",defaultValue:!0,type:{name:"Boolean"}}},R={parameterPath:"endpoint",mapper:{required:!0,serializedName:"Endpoint",defaultValue:"",type:{name:"String"}},skipEncoding:!0},M={parameterPath:"height",mapper:{required:!0,serializedName:"height",constraints:{InclusiveMaximum:1024,InclusiveMinimum:1},type:{name:"Number"}}},T={parameterPath:["options","language"],mapper:{serializedName:"language",defaultValue:"en",type:{name:"String"}}},B={parameterPath:["options","language"],mapper:{serializedName:"language",defaultValue:"unk",type:{name:"Enum",allowedValues:["unk","zh-Hans","zh-Hant","cs","da","nl","en","fi","fr","de","el","hu","it","ja","ko","nb","pl","pt","ru","es","sv","tr","ar","ro","sr-Cyrl","sr-Latn","sk"]}}},x={parameterPath:["options","maxCandidates"],mapper:{serializedName:"maxCandidates",defaultValue:1,type:{name:"Number"}}},D={parameterPath:"mode",mapper:{required:!0,serializedName:"mode",type:{name:"Enum",allowedValues:["Handwritten","Printed"]}}},w={parameterPath:"model",mapper:{required:!0,serializedName:"model",type:{name:"String"}}},j={parameterPath:"operationId",mapper:{required:!0,serializedName:"operationId",type:{name:"String"}}},v={parameterPath:["options","smartCropping"],mapper:{serializedName:"smartCropping",defaultValue:!1,type:{name:"Boolean"}}},F={parameterPath:["options","visualFeatures"],mapper:{serializedName:"visualFeatures",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["ImageType","Faces","Adult","Categories","Color","Tags","Description","Objects","Brands"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},A={parameterPath:"width",mapper:{required:!0,serializedName:"width",constraints:{InclusiveMaximum:1024,InclusiveMinimum:1},type:{name:"Number"}}},L=(a(V,s=n.ServiceClient),V);function V(e,a,t){var r=this;if(null==a)throw new Error("'endpoint' cannot be null.");if(null==e)throw new Error("'credentials' cannot be null.");if(!(t=t||{}).userAgent){var i=n.getDefaultUserAgentValue();t.userAgent="@azure/cognitiveservices-computervision/6.0.0 "+i}return(r=s.call(this,e,t)||this).baseUri="{Endpoint}/vision/v2.1",r.requestContentType="application/json; charset=utf-8",r.endpoint=a,r.credentials=e,r}var k,E=(a(H,k=L),H.prototype.analyzeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},_,t)},H.prototype.describeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},G,t)},H.prototype.detectObjects=function(e,a,t){return this.sendOperationRequest({url:e,options:a},U,t)},H.prototype.listModels=function(e,a){return this.sendOperationRequest({options:e},Q,a)},H.prototype.analyzeImageByDomain=function(e,a,t,r){return this.sendOperationRequest({model:e,url:a,options:t},J,r)},H.prototype.recognizePrintedText=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,url:a,options:t},K,r)},H.prototype.tagImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},X,t)},H.prototype.generateThumbnail=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,url:t,options:r},Y,i)},H.prototype.getAreaOfInterest=function(e,a,t){return this.sendOperationRequest({url:e,options:a},Z,t)},H.prototype.recognizeText=function(e,a,t,r){return this.sendOperationRequest({mode:e,url:a,options:t},$,r)},H.prototype.getTextOperationResult=function(e,a,t){return this.sendOperationRequest({operationId:e,options:a},ee,t)},H.prototype.batchReadFile=function(e,a,t){return this.sendOperationRequest({url:e,options:a},ae,t)},H.prototype.getReadOperationResult=function(e,a,t){return this.sendOperationRequest({operationId:e,options:a},te,t)},H.prototype.analyzeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},re,t)},H.prototype.getAreaOfInterestInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ie,t)},H.prototype.describeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ne,t)},H.prototype.detectObjectsInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},se,t)},H.prototype.generateThumbnailInStream=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,image:t,options:r},me,i)},H.prototype.analyzeImageByDomainInStream=function(e,a,t,r){return this.sendOperationRequest({model:e,image:a,options:t},le,r)},H.prototype.recognizePrintedTextInStream=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,image:a,options:t},oe,r)},H.prototype.tagImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},pe,t)},H.prototype.recognizeTextInStream=function(e,a,t,r){return this.sendOperationRequest({image:e,mode:a,options:t},de,r)},H.prototype.batchReadFileInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ue,t)},H);function H(e,a,t){return k.call(this,e,a,t)||this}var W=new n.Serializer(f),_={httpMethod:"POST",path:"analyze",urlParameters:[R],queryParameters:[F,I,T,S],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:m},default:{bodyMapper:g}},serializer:W},G={httpMethod:"POST",path:"describe",urlParameters:[R],queryParameters:[x,T,S],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:l},default:{bodyMapper:g}},serializer:W},U={httpMethod:"POST",path:"detect",urlParameters:[R],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:o},default:{bodyMapper:g}},serializer:W},Q={httpMethod:"GET",path:"models",urlParameters:[R],responses:{200:{bodyMapper:p},default:{bodyMapper:g}},serializer:W},J={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[R,w],queryParameters:[T],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:d},default:{bodyMapper:g}},serializer:W},K={httpMethod:"POST",path:"ocr",urlParameters:[R],queryParameters:[O,B],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:u},default:{bodyMapper:g}},serializer:W},X={httpMethod:"POST",path:"tag",urlParameters:[R],queryParameters:[T],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:c},default:{bodyMapper:g}},serializer:W},Y={httpMethod:"POST",path:"generateThumbnail",urlParameters:[R],queryParameters:[A,M,v],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},default:{}},serializer:W},Z={httpMethod:"POST",path:"areaOfInterest",urlParameters:[R],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:y},default:{bodyMapper:g}},serializer:W},$={httpMethod:"POST",path:"recognizeText",urlParameters:[R],queryParameters:[D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{202:{headersMapper:h},default:{bodyMapper:g}},serializer:W},ee={httpMethod:"GET",path:"textOperations/{operationId}",urlParameters:[R,j],responses:{200:{bodyMapper:z},default:{bodyMapper:g}},serializer:W},ae={httpMethod:"POST",path:"read/core/asyncBatchAnalyze",urlParameters:[R],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{202:{headersMapper:C},default:{bodyMapper:g}},serializer:W},te={httpMethod:"GET",path:"read/operations/{operationId}",urlParameters:[R,j],responses:{200:{bodyMapper:b},default:{bodyMapper:g}},serializer:W},re={httpMethod:"POST",path:"analyze",urlParameters:[R],queryParameters:[F,I,T,S],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:m},default:{bodyMapper:g}},serializer:W},ie={httpMethod:"POST",path:"areaOfInterest",urlParameters:[R],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:y},default:{bodyMapper:g}},serializer:W},ne={httpMethod:"POST",path:"describe",urlParameters:[R],queryParameters:[x,T,S],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:l},default:{bodyMapper:g}},serializer:W},se={httpMethod:"POST",path:"detect",urlParameters:[R],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:o},default:{bodyMapper:g}},serializer:W},me={httpMethod:"POST",path:"generateThumbnail",urlParameters:[R],queryParameters:[A,M,v],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},default:{}},serializer:W},le={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[R,w],queryParameters:[T],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:d},default:{bodyMapper:g}},serializer:W},oe={httpMethod:"POST",path:"ocr",urlParameters:[R],queryParameters:[O,B],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:u},default:{bodyMapper:g}},serializer:W},pe={httpMethod:"POST",path:"tag",urlParameters:[R],queryParameters:[T],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:c},default:{bodyMapper:g}},serializer:W},de={httpMethod:"POST",path:"recognizeText",urlParameters:[R],queryParameters:[D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{202:{headersMapper:P},default:{bodyMapper:g}},serializer:W},ue={httpMethod:"POST",path:"read/core/asyncBatchAnalyze",urlParameters:[R],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{202:{headersMapper:q},default:{bodyMapper:g}},serializer:W};e.ComputerVisionClient=E,e.ComputerVisionClientContext=L,e.ComputerVisionMappers=f,e.ComputerVisionModels=i,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports,require("@azure/ms-rest-js")):"function"==typeof define&&define.amd?define(["exports","@azure/ms-rest-js"],a):a(((e=e||self).Azure=e.Azure||{},e.Azure.CognitiveservicesComputervision={}),e.msRest)}(this,function(e,n){"use strict";var r=function(e,a){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])})(e,a)};function a(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}var s,t=function(){return(t=Object.assign||function(e){for(var a,t=1,r=arguments.length;t<r;t++)for(var i in a=arguments[t])Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i]);return e}).apply(this,arguments)},i=Object.freeze({__proto__:null}),l={serializedName:"ImageAnalysis",type:{name:"Composite",className:"ImageAnalysis",modelProperties:{categories:{nullable:!0,serializedName:"categories",type:{name:"Sequence",element:{type:{name:"Composite",className:"Category"}}}},adult:{serializedName:"adult",type:{name:"Composite",className:"AdultInfo"}},color:{serializedName:"color",type:{name:"Composite",className:"ColorInfo"}},imageType:{serializedName:"imageType",type:{name:"Composite",className:"ImageType"}},tags:{nullable:!0,serializedName:"tags",type:{name:"Sequence",element:{type:{name:"Composite",className:"ImageTag"}}}},description:{serializedName:"description",type:{name:"Composite",className:"ImageDescriptionDetails"}},faces:{nullable:!0,serializedName:"faces",type:{name:"Sequence",element:{type:{name:"Composite",className:"FaceDescription"}}}},objects:{nullable:!0,serializedName:"objects",type:{name:"Sequence",element:{type:{name:"Composite",className:"DetectedObject"}}}},brands:{nullable:!0,serializedName:"brands",type:{name:"Sequence",element:{type:{name:"Composite",className:"DetectedBrand"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},m={serializedName:"ImageDescription",type:{name:"Composite",className:"ImageDescription",modelProperties:{tags:{nullable:!0,serializedName:"description.tags",type:{name:"Sequence",element:{type:{name:"String"}}}},captions:{nullable:!0,serializedName:"description.captions",type:{name:"Sequence",element:{type:{name:"Composite",className:"ImageCaption"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},o={serializedName:"DetectResult",type:{name:"Composite",className:"DetectResult",modelProperties:{objects:{nullable:!0,readOnly:!0,serializedName:"objects",type:{name:"Sequence",element:{type:{name:"Composite",className:"DetectedObject"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},p={serializedName:"ListModelsResult",type:{name:"Composite",className:"ListModelsResult",modelProperties:{modelsProperty:{nullable:!0,readOnly:!0,serializedName:"models",type:{name:"Sequence",element:{type:{name:"Composite",className:"ModelDescription"}}}}}}},d={serializedName:"DomainModelResults",type:{name:"Composite",className:"DomainModelResults",modelProperties:{result:{serializedName:"result",type:{name:"Object"}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},u={serializedName:"OcrResult",type:{name:"Composite",className:"OcrResult",modelProperties:{language:{nullable:!0,serializedName:"language",type:{name:"String"}},textAngle:{nullable:!1,serializedName:"textAngle",type:{name:"Number"}},orientation:{nullable:!0,serializedName:"orientation",type:{name:"String"}},regions:{nullable:!0,serializedName:"regions",type:{name:"Sequence",element:{type:{name:"Composite",className:"OcrRegion"}}}}}}},c={serializedName:"TagResult",type:{name:"Composite",className:"TagResult",modelProperties:{tags:{nullable:!0,serializedName:"tags",type:{name:"Sequence",element:{type:{name:"Composite",className:"ImageTag"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},y={serializedName:"AreaOfInterestResult",type:{name:"Composite",className:"AreaOfInterestResult",modelProperties:{areaOfInterest:{readOnly:!0,serializedName:"areaOfInterest",type:{name:"Composite",className:"BoundingRect"}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},N={serializedName:"ImageUrl",type:{name:"Composite",className:"ImageUrl",modelProperties:{url:{required:!0,serializedName:"url",type:{name:"String"}}}}},g={serializedName:"ComputerVisionError",type:{name:"Composite",className:"ComputerVisionError",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"Object"}},message:{required:!0,serializedName:"message",type:{name:"String"}},requestId:{serializedName:"requestId",type:{name:"String"}}}}},z={serializedName:"ReadOperationResult",type:{name:"Composite",className:"ReadOperationResult",modelProperties:{status:{nullable:!1,serializedName:"status",type:{name:"Enum",allowedValues:["notStarted","running","failed","succeeded"]}},createdDateTime:{nullable:!1,serializedName:"createdDateTime",type:{name:"String"}},lastUpdatedDateTime:{nullable:!1,serializedName:"lastUpdatedDateTime",type:{name:"String"}},analyzeResult:{serializedName:"analyzeResult",type:{name:"Composite",className:"AnalyzeResults"}}}}},b={serializedName:"read-headers",type:{name:"Composite",className:"ReadHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},h={serializedName:"readinstream-headers",type:{name:"Composite",className:"ReadInStreamHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},C=Object.freeze({__proto__:null,FaceRectangle:{serializedName:"FaceRectangle",type:{name:"Composite",className:"FaceRectangle",modelProperties:{left:{nullable:!1,serializedName:"left",type:{name:"Number"}},top:{nullable:!1,serializedName:"top",type:{name:"Number"}},width:{nullable:!1,serializedName:"width",type:{name:"Number"}},height:{nullable:!1,serializedName:"height",type:{name:"Number"}}}}},CelebritiesModel:{serializedName:"CelebritiesModel",type:{name:"Composite",className:"CelebritiesModel",modelProperties:{name:{nullable:!0,serializedName:"name",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}},faceRectangle:{serializedName:"faceRectangle",type:{name:"Composite",className:"FaceRectangle"}}}}},LandmarksModel:{serializedName:"LandmarksModel",type:{name:"Composite",className:"LandmarksModel",modelProperties:{name:{nullable:!0,serializedName:"name",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}}}}},CategoryDetail:{serializedName:"CategoryDetail",type:{name:"Composite",className:"CategoryDetail",modelProperties:{celebrities:{nullable:!0,serializedName:"celebrities",type:{name:"Sequence",element:{type:{name:"Composite",className:"CelebritiesModel"}}}},landmarks:{nullable:!0,serializedName:"landmarks",type:{name:"Sequence",element:{type:{name:"Composite",className:"LandmarksModel"}}}}}}},Category:{serializedName:"Category",type:{name:"Composite",className:"Category",modelProperties:{name:{nullable:!0,serializedName:"name",type:{name:"String"}},score:{nullable:!1,serializedName:"score",type:{name:"Number"}},detail:{serializedName:"detail",type:{name:"Composite",className:"CategoryDetail"}}}}},AdultInfo:{serializedName:"AdultInfo",type:{name:"Composite",className:"AdultInfo",modelProperties:{isAdultContent:{nullable:!1,serializedName:"isAdultContent",type:{name:"Boolean"}},isRacyContent:{nullable:!1,serializedName:"isRacyContent",type:{name:"Boolean"}},isGoryContent:{nullable:!1,serializedName:"isGoryContent",type:{name:"Boolean"}},adultScore:{nullable:!1,serializedName:"adultScore",type:{name:"Number"}},racyScore:{nullable:!1,serializedName:"racyScore",type:{name:"Number"}},goreScore:{nullable:!1,serializedName:"goreScore",type:{name:"Number"}}}}},ColorInfo:{serializedName:"ColorInfo",type:{name:"Composite",className:"ColorInfo",modelProperties:{dominantColorForeground:{nullable:!0,serializedName:"dominantColorForeground",type:{name:"String"}},dominantColorBackground:{nullable:!0,serializedName:"dominantColorBackground",type:{name:"String"}},dominantColors:{nullable:!0,serializedName:"dominantColors",type:{name:"Sequence",element:{type:{name:"String"}}}},accentColor:{nullable:!0,serializedName:"accentColor",type:{name:"String"}},isBWImg:{nullable:!1,serializedName:"isBWImg",type:{name:"Boolean"}}}}},ImageType:{serializedName:"ImageType",type:{name:"Composite",className:"ImageType",modelProperties:{clipArtType:{nullable:!1,serializedName:"clipArtType",type:{name:"Number"}},lineDrawingType:{nullable:!1,serializedName:"lineDrawingType",type:{name:"Number"}}}}},ImageTag:{serializedName:"ImageTag",type:{name:"Composite",className:"ImageTag",modelProperties:{name:{nullable:!0,serializedName:"name",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}},hint:{nullable:!0,serializedName:"hint",type:{name:"String"}}}}},ImageCaption:{serializedName:"ImageCaption",type:{name:"Composite",className:"ImageCaption",modelProperties:{text:{nullable:!0,serializedName:"text",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}}}}},ImageDescriptionDetails:{serializedName:"ImageDescriptionDetails",type:{name:"Composite",className:"ImageDescriptionDetails",modelProperties:{tags:{nullable:!0,serializedName:"tags",type:{name:"Sequence",element:{type:{name:"String"}}}},captions:{nullable:!0,serializedName:"captions",type:{name:"Sequence",element:{type:{name:"Composite",className:"ImageCaption"}}}}}}},FaceDescription:{serializedName:"FaceDescription",type:{name:"Composite",className:"FaceDescription",modelProperties:{age:{nullable:!1,serializedName:"age",type:{name:"Number"}},gender:{nullable:!0,serializedName:"gender",type:{name:"Enum",allowedValues:["Male","Female"]}},faceRectangle:{serializedName:"faceRectangle",type:{name:"Composite",className:"FaceRectangle"}}}}},BoundingRect:{serializedName:"BoundingRect",type:{name:"Composite",className:"BoundingRect",modelProperties:{x:{nullable:!1,serializedName:"x",type:{name:"Number"}},y:{nullable:!1,serializedName:"y",type:{name:"Number"}},w:{nullable:!1,serializedName:"w",type:{name:"Number"}},h:{nullable:!1,serializedName:"h",type:{name:"Number"}}}}},ObjectHierarchy:{serializedName:"ObjectHierarchy",type:{name:"Composite",className:"ObjectHierarchy",modelProperties:{object:{nullable:!0,serializedName:"object",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}},parent:{serializedName:"parent",type:{name:"Composite",className:"ObjectHierarchy"}}}}},DetectedObject:{serializedName:"DetectedObject",type:{name:"Composite",className:"DetectedObject",modelProperties:{rectangle:{readOnly:!0,serializedName:"rectangle",type:{name:"Composite",className:"BoundingRect"}},object:{nullable:!0,serializedName:"object",type:{name:"String"}},confidence:{nullable:!1,serializedName:"confidence",type:{name:"Number"}},parent:{serializedName:"parent",type:{name:"Composite",className:"ObjectHierarchy"}}}}},DetectedBrand:{serializedName:"DetectedBrand",type:{name:"Composite",className:"DetectedBrand",modelProperties:{name:{nullable:!0,readOnly:!0,serializedName:"name",type:{name:"String"}},confidence:{nullable:!1,readOnly:!0,serializedName:"confidence",type:{name:"Number"}},rectangle:{readOnly:!0,serializedName:"rectangle",type:{name:"Composite",className:"BoundingRect"}}}}},ImageMetadata:{serializedName:"ImageMetadata",type:{name:"Composite",className:"ImageMetadata",modelProperties:{width:{nullable:!1,serializedName:"width",type:{name:"Number"}},height:{nullable:!1,serializedName:"height",type:{name:"Number"}},format:{nullable:!0,serializedName:"format",type:{name:"String"}}}}},ImageAnalysis:l,ImageDescription:m,DetectResult:o,ModelDescription:{serializedName:"ModelDescription",type:{name:"Composite",className:"ModelDescription",modelProperties:{name:{nullable:!0,serializedName:"name",type:{name:"String"}},categories:{nullable:!0,serializedName:"categories",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},ListModelsResult:p,DomainModelResults:d,OcrWord:{serializedName:"OcrWord",type:{name:"Composite",className:"OcrWord",modelProperties:{boundingBox:{nullable:!0,serializedName:"boundingBox",type:{name:"String"}},text:{nullable:!0,serializedName:"text",type:{name:"String"}}}}},OcrLine:{serializedName:"OcrLine",type:{name:"Composite",className:"OcrLine",modelProperties:{boundingBox:{nullable:!0,serializedName:"boundingBox",type:{name:"String"}},words:{nullable:!0,serializedName:"words",type:{name:"Sequence",element:{type:{name:"Composite",className:"OcrWord"}}}}}}},OcrRegion:{serializedName:"OcrRegion",type:{name:"Composite",className:"OcrRegion",modelProperties:{boundingBox:{nullable:!0,serializedName:"boundingBox",type:{name:"String"}},lines:{nullable:!0,serializedName:"lines",type:{name:"Sequence",element:{type:{name:"Composite",className:"OcrLine"}}}}}}},OcrResult:u,TagResult:c,AreaOfInterestResult:y,ImageUrl:N,ComputerVisionError:g,LandmarkResults:{serializedName:"LandmarkResults",type:{name:"Composite",className:"LandmarkResults",modelProperties:{landmarks:{nullable:!0,serializedName:"landmarks",type:{name:"Sequence",element:{type:{name:"Composite",className:"LandmarksModel"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},CelebrityResults:{serializedName:"CelebrityResults",type:{name:"Composite",className:"CelebrityResults",modelProperties:{celebrities:{nullable:!0,serializedName:"celebrities",type:{name:"Sequence",element:{type:{name:"Composite",className:"CelebritiesModel"}}}},requestId:{nullable:!0,serializedName:"requestId",type:{name:"String"}},metadata:{serializedName:"metadata",type:{name:"Composite",className:"ImageMetadata"}}}}},Word:{serializedName:"Word",type:{name:"Composite",className:"Word",modelProperties:{boundingBox:{required:!0,serializedName:"boundingBox",type:{name:"Sequence",element:{type:{name:"Number"}}}},text:{required:!0,serializedName:"text",type:{name:"String"}},confidence:{required:!0,serializedName:"confidence",type:{name:"Number"}}}}},Line:{serializedName:"Line",type:{name:"Composite",className:"Line",modelProperties:{language:{serializedName:"language",type:{name:"String"}},boundingBox:{required:!0,serializedName:"boundingBox",type:{name:"Sequence",element:{type:{name:"Number"}}}},text:{required:!0,serializedName:"text",type:{name:"String"}},words:{required:!0,serializedName:"words",type:{name:"Sequence",element:{type:{name:"Composite",className:"Word"}}}}}}},ReadResult:{serializedName:"ReadResult",type:{name:"Composite",className:"ReadResult",modelProperties:{page:{required:!0,serializedName:"page",type:{name:"Number"}},language:{serializedName:"language",type:{name:"String"}},angle:{required:!0,serializedName:"angle",type:{name:"Number"}},width:{required:!0,serializedName:"width",type:{name:"Number"}},height:{required:!0,serializedName:"height",type:{name:"Number"}},unit:{required:!0,nullable:!1,serializedName:"unit",type:{name:"Enum",allowedValues:["pixel","inch"]}},lines:{required:!0,serializedName:"lines",type:{name:"Sequence",element:{type:{name:"Composite",className:"Line"}}}}}}},AnalyzeResults:{serializedName:"analyzeResults",type:{name:"Composite",className:"AnalyzeResults",modelProperties:{version:{required:!0,serializedName:"version",type:{name:"String"}},readResults:{required:!0,serializedName:"readResults",type:{name:"Sequence",element:{type:{name:"Composite",className:"ReadResult"}}}}}}},ReadOperationResult:z,ReadHeaders:b,ReadInStreamHeaders:h}),q={parameterPath:["options","descriptionExclude"],mapper:{serializedName:"descriptionExclude",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Celebrities","Landmarks"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},P={parameterPath:["options","details"],mapper:{serializedName:"details",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Celebrities","Landmarks"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},S={parameterPath:"detectOrientation",mapper:{required:!0,serializedName:"detectOrientation",defaultValue:!0,type:{name:"Boolean"}}},f={parameterPath:"endpoint",mapper:{required:!0,serializedName:"Endpoint",defaultValue:"",type:{name:"String"}},skipEncoding:!0},I={parameterPath:"height",mapper:{required:!0,serializedName:"height",constraints:{InclusiveMaximum:1024,InclusiveMinimum:1},type:{name:"Number"}}},O={parameterPath:["options","language"],mapper:{serializedName:"language",defaultValue:"en",type:{name:"String"}}},M={parameterPath:["options","language"],mapper:{serializedName:"language",defaultValue:"unk",type:{name:"Enum",allowedValues:["unk","zh-Hans","zh-Hant","cs","da","nl","en","fi","fr","de","el","hu","it","ja","ko","nb","pl","pt","ru","es","sv","tr","ar","ro","sr-Cyrl","sr-Latn","sk"]}}},R={parameterPath:["options","maxCandidates"],mapper:{serializedName:"maxCandidates",defaultValue:1,type:{name:"Number"}}},T={parameterPath:"model",mapper:{required:!0,serializedName:"model",type:{name:"String"}}},B={parameterPath:["options","smartCropping"],mapper:{serializedName:"smartCropping",defaultValue:!1,type:{name:"Boolean"}}},D={parameterPath:["options","visualFeatures"],mapper:{serializedName:"visualFeatures",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["ImageType","Faces","Adult","Categories","Color","Tags","Description","Objects","Brands"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},j={parameterPath:"width",mapper:{required:!0,serializedName:"width",constraints:{InclusiveMaximum:1024,InclusiveMinimum:1},type:{name:"Number"}}},x=(a(w,s=n.ServiceClient),w);function w(e,a,t){var r,i=this;if(null==a)throw new Error("'endpoint' cannot be null.");if(null==e)throw new Error("'credentials' cannot be null.");return(t=t||{}).userAgent||(r=n.getDefaultUserAgentValue(),t.userAgent="@azure/cognitiveservices-computervision/7.0.0 "+r),(i=s.call(this,e,t)||this).baseUri="{Endpoint}/vision/v3.0",i.requestContentType="application/json; charset=utf-8",i.endpoint=a,i.credentials=e,i}var v,A=(a(L,v=x),L.prototype.analyzeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},F,t)},L.prototype.describeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},V,t)},L.prototype.detectObjects=function(e,a,t){return this.sendOperationRequest({url:e,options:a},E,t)},L.prototype.listModels=function(e,a){return this.sendOperationRequest({options:e},_,a)},L.prototype.analyzeImageByDomain=function(e,a,t,r){return this.sendOperationRequest({model:e,url:a,options:t},H,r)},L.prototype.recognizePrintedText=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,url:a,options:t},W,r)},L.prototype.tagImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},U,t)},L.prototype.generateThumbnail=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,url:t,options:r},G,i)},L.prototype.getAreaOfInterest=function(e,a,t){return this.sendOperationRequest({url:e,options:a},Q,t)},L.prototype.read=function(e,a,t){return this.sendOperationRequest({url:e,options:a},J,t)},L.prototype.getReadResult=function(e,a,t){return this.sendOperationRequest({operationId:e,options:a},K,t)},L.prototype.analyzeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},X,t)},L.prototype.getAreaOfInterestInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},Y,t)},L.prototype.describeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},Z,t)},L.prototype.detectObjectsInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},$,t)},L.prototype.generateThumbnailInStream=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,image:t,options:r},ee,i)},L.prototype.analyzeImageByDomainInStream=function(e,a,t,r){return this.sendOperationRequest({model:e,image:a,options:t},ae,r)},L.prototype.recognizePrintedTextInStream=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,image:a,options:t},te,r)},L.prototype.tagImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},re,t)},L.prototype.readInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ie,t)},L);function L(e,a,t){return v.call(this,e,a,t)||this}var k=new n.Serializer(C),F={httpMethod:"POST",path:"analyze",urlParameters:[f],queryParameters:[D,P,O,q],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:l},default:{bodyMapper:g}},serializer:k},V={httpMethod:"POST",path:"describe",urlParameters:[f],queryParameters:[R,O,q],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:m},default:{bodyMapper:g}},serializer:k},E={httpMethod:"POST",path:"detect",urlParameters:[f],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:o},default:{bodyMapper:g}},serializer:k},_={httpMethod:"GET",path:"models",urlParameters:[f],responses:{200:{bodyMapper:p},default:{bodyMapper:g}},serializer:k},H={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[f,T],queryParameters:[O],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:d},default:{bodyMapper:g}},serializer:k},W={httpMethod:"POST",path:"ocr",urlParameters:[f],queryParameters:[S,M],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:u},default:{bodyMapper:g}},serializer:k},U={httpMethod:"POST",path:"tag",urlParameters:[f],queryParameters:[O],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:c},default:{bodyMapper:g}},serializer:k},G={httpMethod:"POST",path:"generateThumbnail",urlParameters:[f],queryParameters:[j,I,B],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},default:{}},serializer:k},Q={httpMethod:"POST",path:"areaOfInterest",urlParameters:[f],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:y},default:{bodyMapper:g}},serializer:k},J={httpMethod:"POST",path:"read/analyze",urlParameters:[f],queryParameters:[O],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{202:{headersMapper:b},default:{bodyMapper:g,headersMapper:b}},serializer:k},K={httpMethod:"GET",path:"read/analyzeResults/{operationId}",urlParameters:[f,{parameterPath:"operationId",mapper:{required:!0,serializedName:"operationId",type:{name:"Uuid"}}}],responses:{200:{bodyMapper:z},default:{bodyMapper:g}},serializer:k},X={httpMethod:"POST",path:"analyze",urlParameters:[f],queryParameters:[D,P,O,q],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:l},default:{bodyMapper:g}},serializer:k},Y={httpMethod:"POST",path:"areaOfInterest",urlParameters:[f],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:y},default:{bodyMapper:g}},serializer:k},Z={httpMethod:"POST",path:"describe",urlParameters:[f],queryParameters:[R,O,q],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:m},default:{bodyMapper:g}},serializer:k},$={httpMethod:"POST",path:"detect",urlParameters:[f],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:o},default:{bodyMapper:g}},serializer:k},ee={httpMethod:"POST",path:"generateThumbnail",urlParameters:[f],queryParameters:[j,I,B],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},default:{}},serializer:k},ae={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[f,T],queryParameters:[O],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:d},default:{bodyMapper:g}},serializer:k},te={httpMethod:"POST",path:"ocr",urlParameters:[f],queryParameters:[S,M],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:u},default:{bodyMapper:g}},serializer:k},re={httpMethod:"POST",path:"tag",urlParameters:[f],queryParameters:[O],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:c},default:{bodyMapper:g}},serializer:k},ie={httpMethod:"POST",path:"read/analyze",urlParameters:[f],queryParameters:[O],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{202:{headersMapper:h},default:{bodyMapper:g,headersMapper:h}},serializer:k};e.ComputerVisionClient=A,e.ComputerVisionClientContext=x,e.ComputerVisionMappers=C,e.ComputerVisionModels=i,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -249,54 +249,12 @@ import * as msRest from "@azure/ms-rest-js";

/**
* Recognize Text operation. When you use the Recognize Text interface, the response contains a
* field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must
* use for your Get Recognize Text Operation Result operation.
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image.
* @param [options] The optional parameters
* @returns Promise<Models.RecognizeTextResponse>
*/
recognizeText(mode: Models.TextRecognitionMode, url: string, options?: msRest.RequestOptionsBase): Promise<Models.RecognizeTextResponse>;
/**
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image.
* @param callback The callback
*/
recognizeText(mode: Models.TextRecognitionMode, url: string, callback: msRest.ServiceCallback<void>): void;
/**
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image.
* @param options The optional parameters
* @param callback The callback
*/
recognizeText(mode: Models.TextRecognitionMode, url: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
/**
* This interface is used for getting text operation result. The URL to this interface should be
* retrieved from 'Operation-Location' field returned from Recognize Text interface.
* @param operationId Id of the text operation returned in the response of the 'Recognize Text'
* @param [options] The optional parameters
* @returns Promise<Models.GetTextOperationResultResponse>
*/
getTextOperationResult(operationId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetTextOperationResultResponse>;
/**
* @param operationId Id of the text operation returned in the response of the 'Recognize Text'
* @param callback The callback
*/
getTextOperationResult(operationId: string, callback: msRest.ServiceCallback<Models.TextOperationResult>): void;
/**
* @param operationId Id of the text operation returned in the response of the 'Recognize Text'
* @param options The optional parameters
* @param callback The callback
*/
getTextOperationResult(operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.TextOperationResult>): void;
/**
* Use this interface to get the result of a Read operation, employing the state-of-the-art Optical
* Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read
* File interface, the response contains a field called 'Operation-Location'. The
* 'Operation-Location' field contains the URL that you must use for your 'GetReadOperationResult'
* operation to access OCR results.​
* interface, the response contains a field called 'Operation-Location'. The 'Operation-Location'
* field contains the URL that you must use for your 'GetReadResult' operation to access OCR
* results.​
* @param url Publicly reachable URL of an image.
* @param [options] The optional parameters
* @returns Promise<Models.BatchReadFileResponse>
* @returns Promise<Models.ReadResponse>
*/
batchReadFile(url: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchReadFileResponse>;
read(url: string, options?: Models.ComputerVisionClientReadOptionalParams): Promise<Models.ReadResponse>;
/**

@@ -306,3 +264,3 @@ * @param url Publicly reachable URL of an image.

*/
batchReadFile(url: string, callback: msRest.ServiceCallback<void>): void;
read(url: string, callback: msRest.ServiceCallback<void>): void;
/**

@@ -313,25 +271,22 @@ * @param url Publicly reachable URL of an image.

*/
batchReadFile(url: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
read(url: string, options: Models.ComputerVisionClientReadOptionalParams, callback: msRest.ServiceCallback<void>): void;
/**
* This interface is used for getting OCR results of Read operation. The URL to this interface
* should be retrieved from 'Operation-Location' field returned from Batch Read File interface.
* @param operationId Id of read operation returned in the response of the 'Batch Read File'
* interface.
* should be retrieved from 'Operation-Location' field returned from Read interface.
* @param operationId Id of read operation returned in the response of the 'Read' interface.
* @param [options] The optional parameters
* @returns Promise<Models.GetReadOperationResultResponse>
* @returns Promise<Models.GetReadResultResponse>
*/
getReadOperationResult(operationId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetReadOperationResultResponse>;
getReadResult(operationId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetReadResultResponse>;
/**
* @param operationId Id of read operation returned in the response of the 'Batch Read File'
* interface.
* @param operationId Id of read operation returned in the response of the 'Read' interface.
* @param callback The callback
*/
getReadOperationResult(operationId: string, callback: msRest.ServiceCallback<Models.ReadOperationResult>): void;
getReadResult(operationId: string, callback: msRest.ServiceCallback<Models.ReadOperationResult>): void;
/**
* @param operationId Id of read operation returned in the response of the 'Batch Read File'
* interface.
* @param operationId Id of read operation returned in the response of the 'Read' interface.
* @param options The optional parameters
* @param callback The callback
*/
getReadOperationResult(operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ReadOperationResult>): void;
getReadResult(operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ReadOperationResult>): void;
/**

@@ -554,48 +509,25 @@ * This operation extracts a rich set of visual features based on the image content.

/**
* Recognize Text operation. When you use the Recognize Text interface, the response contains a
* field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must
* use for your Get Recognize Text Operation Result operation.
* Use this interface to get the result of a Read operation, employing the state-of-the-art Optical
* Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read
* interface, the response contains a field called 'Operation-Location'. The 'Operation-Location'
* field contains the URL that you must use for your 'GetReadResult' operation to access OCR
* results.​
* @param image An image stream.
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param [options] The optional parameters
* @returns Promise<Models.RecognizeTextInStreamResponse>
* @returns Promise<Models.ReadInStreamResponse>
*/
recognizeTextInStream(image: msRest.HttpRequestBody, mode: Models.TextRecognitionMode, options?: msRest.RequestOptionsBase): Promise<Models.RecognizeTextInStreamResponse>;
readInStream(image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientReadInStreamOptionalParams): Promise<Models.ReadInStreamResponse>;
/**
* @param image An image stream.
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param callback The callback
*/
recognizeTextInStream(image: msRest.HttpRequestBody, mode: Models.TextRecognitionMode, callback: msRest.ServiceCallback<void>): void;
readInStream(image: msRest.HttpRequestBody, callback: msRest.ServiceCallback<void>): void;
/**
* @param image An image stream.
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param options The optional parameters
* @param callback The callback
*/
recognizeTextInStream(image: msRest.HttpRequestBody, mode: Models.TextRecognitionMode, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
/**
* Use this interface to get the result of a Read Document operation, employing the
* state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy
* documents. When you use the Read Document interface, the response contains a field called
* 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your
* 'Get Read Result operation' to access OCR results.​
* @param image An image stream.
* @param [options] The optional parameters
* @returns Promise<Models.BatchReadFileInStreamResponse>
*/
batchReadFileInStream(image: msRest.HttpRequestBody, options?: msRest.RequestOptionsBase): Promise<Models.BatchReadFileInStreamResponse>;
/**
* @param image An image stream.
* @param callback The callback
*/
batchReadFileInStream(image: msRest.HttpRequestBody, callback: msRest.ServiceCallback<void>): void;
/**
* @param image An image stream.
* @param options The optional parameters
* @param callback The callback
*/
batchReadFileInStream(image: msRest.HttpRequestBody, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
readInStream(image: msRest.HttpRequestBody, options: Models.ComputerVisionClientReadInStreamOptionalParams, callback: msRest.ServiceCallback<void>): void;
}
export { ComputerVisionClient, ComputerVisionClientContext, Models as ComputerVisionModels, Mappers as ComputerVisionMappers };
//# sourceMappingURL=computerVisionClient.d.ts.map

@@ -84,27 +84,14 @@ /*

};
ComputerVisionClient.prototype.recognizeText = function (mode, url, options, callback) {
ComputerVisionClient.prototype.read = function (url, options, callback) {
return this.sendOperationRequest({
mode: mode,
url: url,
options: options
}, recognizeTextOperationSpec, callback);
}, readOperationSpec, callback);
};
ComputerVisionClient.prototype.getTextOperationResult = function (operationId, options, callback) {
ComputerVisionClient.prototype.getReadResult = function (operationId, options, callback) {
return this.sendOperationRequest({
operationId: operationId,
options: options
}, getTextOperationResultOperationSpec, callback);
}, getReadResultOperationSpec, callback);
};
ComputerVisionClient.prototype.batchReadFile = function (url, options, callback) {
return this.sendOperationRequest({
url: url,
options: options
}, batchReadFileOperationSpec, callback);
};
ComputerVisionClient.prototype.getReadOperationResult = function (operationId, options, callback) {
return this.sendOperationRequest({
operationId: operationId,
options: options
}, getReadOperationResultOperationSpec, callback);
};
ComputerVisionClient.prototype.analyzeImageInStream = function (image, options, callback) {

@@ -162,15 +149,8 @@ return this.sendOperationRequest({

};
ComputerVisionClient.prototype.recognizeTextInStream = function (image, mode, options, callback) {
ComputerVisionClient.prototype.readInStream = function (image, options, callback) {
return this.sendOperationRequest({
image: image,
mode: mode,
options: options
}, recognizeTextInStreamOperationSpec, callback);
}, readInStreamOperationSpec, callback);
};
ComputerVisionClient.prototype.batchReadFileInStream = function (image, options, callback) {
return this.sendOperationRequest({
image: image,
options: options
}, batchReadFileInStreamOperationSpec, callback);
};
return ComputerVisionClient;

@@ -402,5 +382,5 @@ }(ComputerVisionClientContext));

};
var recognizeTextOperationSpec = {
var readOperationSpec = {
httpMethod: "POST",
path: "recognizeText",
path: "read/analyze",
urlParameters: [

@@ -410,3 +390,3 @@ Parameters.endpoint

queryParameters: [
Parameters.mode
Parameters.language0
],

@@ -421,6 +401,7 @@ requestBody: {

202: {
headersMapper: Mappers.RecognizeTextHeaders
headersMapper: Mappers.ReadHeaders
},
default: {
bodyMapper: Mappers.ComputerVisionError
bodyMapper: Mappers.ComputerVisionError,
headersMapper: Mappers.ReadHeaders
}

@@ -430,5 +411,5 @@ },

};
var getTextOperationResultOperationSpec = {
var getReadResultOperationSpec = {
httpMethod: "GET",
path: "textOperations/{operationId}",
path: "read/analyzeResults/{operationId}",
urlParameters: [

@@ -440,41 +421,2 @@ Parameters.endpoint,

200: {
bodyMapper: Mappers.TextOperationResult
},
default: {
bodyMapper: Mappers.ComputerVisionError
}
},
serializer: serializer
};
var batchReadFileOperationSpec = {
httpMethod: "POST",
path: "read/core/asyncBatchAnalyze",
urlParameters: [
Parameters.endpoint
],
requestBody: {
parameterPath: {
url: "url"
},
mapper: __assign(__assign({}, Mappers.ImageUrl), { required: true })
},
responses: {
202: {
headersMapper: Mappers.BatchReadFileHeaders
},
default: {
bodyMapper: Mappers.ComputerVisionError
}
},
serializer: serializer
};
var getReadOperationResultOperationSpec = {
httpMethod: "GET",
path: "read/operations/{operationId}",
urlParameters: [
Parameters.endpoint,
Parameters.operationId
],
responses: {
200: {
bodyMapper: Mappers.ReadOperationResult

@@ -734,5 +676,5 @@ },

};
var recognizeTextInStreamOperationSpec = {
var readInStreamOperationSpec = {
httpMethod: "POST",
path: "recognizeText",
path: "read/analyze",
urlParameters: [

@@ -742,3 +684,3 @@ Parameters.endpoint

queryParameters: [
Parameters.mode
Parameters.language0
],

@@ -758,6 +700,7 @@ requestBody: {

202: {
headersMapper: Mappers.RecognizeTextInStreamHeaders
headersMapper: Mappers.ReadInStreamHeaders
},
default: {
bodyMapper: Mappers.ComputerVisionError
bodyMapper: Mappers.ComputerVisionError,
headersMapper: Mappers.ReadInStreamHeaders
}

@@ -767,30 +710,3 @@ },

};
var batchReadFileInStreamOperationSpec = {
httpMethod: "POST",
path: "read/core/asyncBatchAnalyze",
urlParameters: [
Parameters.endpoint
],
requestBody: {
parameterPath: "image",
mapper: {
required: true,
serializedName: "Image",
type: {
name: "Stream"
}
}
},
contentType: "application/octet-stream",
responses: {
202: {
headersMapper: Mappers.BatchReadFileInStreamHeaders
},
default: {
bodyMapper: Mappers.ComputerVisionError
}
},
serializer: serializer
};
export { ComputerVisionClient, ComputerVisionClientContext, Models as ComputerVisionModels, Mappers as ComputerVisionMappers };
//# sourceMappingURL=computerVisionClient.js.map

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

var packageName = "@azure/cognitiveservices-computervision";
var packageVersion = "6.0.0";
var packageVersion = "7.0.0";
var ComputerVisionClientContext = /** @class */ (function (_super) {

@@ -39,3 +39,3 @@ __extends(ComputerVisionClientContext, _super);

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

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

@@ -611,5 +611,5 @@ /// <reference types="node" />

/**
* Qualitative confidence measure. Possible values include: 'High', 'Low'
* Qualitative confidence measure.
*/
confidence?: TextRecognitionResultConfidenceClass;
confidence: number;
}

@@ -621,34 +621,43 @@ /**

/**
* The BCP-47 language code of the recognized text line. Only provided where the language of the
* line differs from the page's.
*/
language?: string;
/**
* Bounding box of a recognized line.
*/
boundingBox?: number[];
boundingBox: number[];
/**
* The text content of the line.
*/
text?: string;
text: string;
/**
* List of words in the text line.
*/
words?: Word[];
words: Word[];
}
/**
* An object representing a recognized text region
* Text extracted from a page in the input document.
*/
export interface TextRecognitionResult {
export interface ReadResult {
/**
* The 1-based page number of the recognition result.
*/
page?: number;
page: number;
/**
* The orientation of the image in degrees in the clockwise direction. Range between [0, 360).
* The BCP-47 language code of the recognized text page.
*/
clockwiseOrientation?: number;
language?: string;
/**
* The orientation of the image in degrees in the clockwise direction. Range between [-180, 180).
*/
angle: number;
/**
* The width of the image in pixels or the PDF in inches.
*/
width?: number;
width: number;
/**
* The height of the image in pixels or the PDF in inches.
*/
height?: number;
height: number;
/**

@@ -658,3 +667,3 @@ * The unit used in the Width, Height and BoundingBox. For images, the unit is 'pixel'. For PDF,

*/
unit?: TextRecognitionResultDimensionUnit;
unit: TextRecognitionResultDimensionUnit;
/**

@@ -666,14 +675,13 @@ * A list of recognized text lines.

/**
* Result of recognition text operation.
* Analyze batch operation result.
*/
export interface TextOperationResult {
export interface AnalyzeResults {
/**
* Status of the text operation. Possible values include: 'NotStarted', 'Running', 'Failed',
* 'Succeeded'
* Version of schema used for this result.
*/
status?: TextOperationStatusCodes;
version: string;
/**
* Text recognition result of the text operation.
* Text extracted from the input.
*/
recognitionResult?: TextRecognitionResult;
readResults: ReadResult[];
}

@@ -685,10 +693,18 @@ /**

/**
* Status of the read operation. Possible values include: 'NotStarted', 'Running', 'Failed',
* 'Succeeded'
* Status of the read operation. Possible values include: 'notStarted', 'running', 'failed',
* 'succeeded'
*/
status?: TextOperationStatusCodes;
status?: OperationStatusCodes;
/**
* An array of text recognition result of the read operation.
* Get UTC date time the batch operation was submitted.
*/
recognitionResults?: TextRecognitionResult[];
createdDateTime?: string;
/**
* Get last updated UTC date time of this batch operation.
*/
lastUpdatedDateTime?: string;
/**
* Analyze batch operation result.
*/
analyzeResult?: AnalyzeResults;
}

@@ -801,2 +817,16 @@ /**

*/
export interface ComputerVisionClientReadOptionalParams extends msRest.RequestOptionsBase {
/**
* The BCP-47 language code of the text to be detected in the image. In future versions, when
* language parameter is not passed, language detection will be used to determine the language.
* However, in the current version, missing language parameter will cause English to be used. To
* ensure that your document is always parsed in English without the use of language detection in
* the future, pass “en” in the language parameter. Possible values include: 'en', 'es', 'fr',
* 'de', 'it', 'nl', 'pt'. Default value: 'en'.
*/
language?: OcrDetectionLanguage;
}
/**
* Optional Parameters.
*/
export interface ComputerVisionClientAnalyzeImageInStreamOptionalParams extends msRest.RequestOptionsBase {

@@ -903,14 +933,19 @@ /**

/**
* Defines headers for RecognizeText operation.
* Optional Parameters.
*/
export interface RecognizeTextHeaders {
export interface ComputerVisionClientReadInStreamOptionalParams extends msRest.RequestOptionsBase {
/**
* URL to query for status of the operation. The operation ID will expire in 48 hours.
* The BCP-47 language code of the text to be detected in the image. In future versions, when
* language parameter is not passed, language detection will be used to determine the language.
* However, in the current version, missing language parameter will cause English to be used. To
* ensure that your document is always parsed in English without the use of language detection in
* the future, pass “en” in the language parameter. Possible values include: 'en', 'es', 'fr',
* 'de', 'it', 'nl', 'pt'. Default value: 'en'.
*/
operationLocation: string;
language?: OcrDetectionLanguage;
}
/**
* Defines headers for BatchReadFile operation.
* Defines headers for Read operation.
*/
export interface BatchReadFileHeaders {
export interface ReadHeaders {
/**

@@ -922,5 +957,5 @@ * URL to query for status of the operation. The operation ID will expire in 48 hours.

/**
* Defines headers for RecognizeTextInStream operation.
* Defines headers for ReadInStream operation.
*/
export interface RecognizeTextInStreamHeaders {
export interface ReadInStreamHeaders {
/**

@@ -932,11 +967,2 @@ * URL to query for status of the operation. The operation ID will expire in 48 hours.

/**
* Defines headers for BatchReadFileInStream operation.
*/
export interface BatchReadFileInStreamHeaders {
/**
* URL to query for status of the operation. The operation ID will expire in 48 hours.
*/
operationLocation: string;
}
/**
* Defines values for Gender.

@@ -949,8 +975,8 @@ * Possible values include: 'Male', 'Female'

/**
* Defines values for TextOperationStatusCodes.
* Possible values include: 'NotStarted', 'Running', 'Failed', 'Succeeded'
* Defines values for OperationStatusCodes.
* Possible values include: 'notStarted', 'running', 'failed', 'succeeded'
* @readonly
* @enum {string}
*/
export declare type TextOperationStatusCodes = 'NotStarted' | 'Running' | 'Failed' | 'Succeeded';
export declare type OperationStatusCodes = 'notStarted' | 'running' | 'failed' | 'succeeded';
/**

@@ -964,9 +990,2 @@ * Defines values for TextRecognitionResultDimensionUnit.

/**
* Defines values for TextRecognitionResultConfidenceClass.
* Possible values include: 'High', 'Low'
* @readonly
* @enum {string}
*/
export declare type TextRecognitionResultConfidenceClass = 'High' | 'Low';
/**
* Defines values for DescriptionExclude.

@@ -996,8 +1015,8 @@ * Possible values include: 'Celebrities', 'Landmarks'

/**
* Defines values for TextRecognitionMode.
* Possible values include: 'Handwritten', 'Printed'
* Defines values for OcrDetectionLanguage.
* Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl', 'pt'
* @readonly
* @enum {string}
*/
export declare type TextRecognitionMode = 'Handwritten' | 'Printed';
export declare type OcrDetectionLanguage = 'en' | 'es' | 'fr' | 'de' | 'it' | 'nl' | 'pt';
/**

@@ -1234,5 +1253,5 @@ * Defines values for Details.

/**
* Contains response data for the recognizeText operation.
* Contains response data for the read operation.
*/
export declare type RecognizeTextResponse = RecognizeTextHeaders & {
export declare type ReadResponse = ReadHeaders & {
/**

@@ -1245,9 +1264,9 @@ * The underlying HTTP response.

*/
parsedHeaders: RecognizeTextHeaders;
parsedHeaders: ReadHeaders;
};
};
/**
* Contains response data for the getTextOperationResult operation.
* Contains response data for the getReadResult operation.
*/
export declare type GetTextOperationResultResponse = TextOperationResult & {
export declare type GetReadResultResponse = ReadOperationResult & {
/**

@@ -1264,34 +1283,2 @@ * The underlying HTTP response.

*/
parsedBody: TextOperationResult;
};
};
/**
* Contains response data for the batchReadFile operation.
*/
export declare type BatchReadFileResponse = BatchReadFileHeaders & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The parsed HTTP response headers.
*/
parsedHeaders: BatchReadFileHeaders;
};
};
/**
* Contains response data for the getReadOperationResult operation.
*/
export declare type GetReadOperationResultResponse = ReadOperationResult & {
/**
* 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: ReadOperationResult;

@@ -1450,5 +1437,5 @@ };

/**
* Contains response data for the recognizeTextInStream operation.
* Contains response data for the readInStream operation.
*/
export declare type RecognizeTextInStreamResponse = RecognizeTextInStreamHeaders & {
export declare type ReadInStreamResponse = ReadInStreamHeaders & {
/**

@@ -1461,19 +1448,5 @@ * The underlying HTTP response.

*/
parsedHeaders: RecognizeTextInStreamHeaders;
parsedHeaders: ReadInStreamHeaders;
};
};
/**
* Contains response data for the batchReadFileInStream operation.
*/
export declare type BatchReadFileInStreamResponse = BatchReadFileInStreamHeaders & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The parsed HTTP response headers.
*/
parsedHeaders: BatchReadFileInStreamHeaders;
};
};
//# sourceMappingURL=index.d.ts.map

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

export declare const Line: msRest.CompositeMapper;
export declare const TextRecognitionResult: msRest.CompositeMapper;
export declare const TextOperationResult: msRest.CompositeMapper;
export declare const ReadResult: msRest.CompositeMapper;
export declare const AnalyzeResults: msRest.CompositeMapper;
export declare const ReadOperationResult: msRest.CompositeMapper;
export declare const RecognizeTextHeaders: msRest.CompositeMapper;
export declare const BatchReadFileHeaders: msRest.CompositeMapper;
export declare const RecognizeTextInStreamHeaders: msRest.CompositeMapper;
export declare const BatchReadFileInStreamHeaders: msRest.CompositeMapper;
export declare const ReadHeaders: msRest.CompositeMapper;
export declare const ReadInStreamHeaders: msRest.CompositeMapper;
//# sourceMappingURL=mappers.d.ts.map

@@ -1190,10 +1190,6 @@ /*

confidence: {
nullable: true,
required: true,
serializedName: "confidence",
type: {
name: "Enum",
allowedValues: [
"High",
"Low"
]
name: "Number"
}

@@ -1210,3 +1206,10 @@ }

modelProperties: {
language: {
serializedName: "language",
type: {
name: "String"
}
},
boundingBox: {
required: true,
serializedName: "boundingBox",

@@ -1223,2 +1226,3 @@ type: {

text: {
required: true,
serializedName: "text",

@@ -1230,2 +1234,3 @@ type: {

words: {
required: true,
serializedName: "words",

@@ -1245,9 +1250,10 @@ type: {

};
export var TextRecognitionResult = {
serializedName: "TextRecognitionResult",
export var ReadResult = {
serializedName: "ReadResult",
type: {
name: "Composite",
className: "TextRecognitionResult",
className: "ReadResult",
modelProperties: {
page: {
required: true,
serializedName: "page",

@@ -1258,5 +1264,12 @@ type: {

},
clockwiseOrientation: {
serializedName: "clockwiseOrientation",
language: {
serializedName: "language",
type: {
name: "String"
}
},
angle: {
required: true,
serializedName: "angle",
type: {
name: "Number"

@@ -1266,2 +1279,3 @@ }

width: {
required: true,
serializedName: "width",

@@ -1273,2 +1287,3 @@ type: {

height: {
required: true,
serializedName: "height",

@@ -1280,3 +1295,4 @@ type: {

unit: {
nullable: true,
required: true,
nullable: false,
serializedName: "unit",

@@ -1307,26 +1323,26 @@ type: {

};
export var TextOperationResult = {
serializedName: "TextOperationResult",
export var AnalyzeResults = {
serializedName: "analyzeResults",
type: {
name: "Composite",
className: "TextOperationResult",
className: "AnalyzeResults",
modelProperties: {
status: {
nullable: false,
serializedName: "status",
version: {
required: true,
serializedName: "version",
type: {
name: "Enum",
allowedValues: [
"NotStarted",
"Running",
"Failed",
"Succeeded"
]
name: "String"
}
},
recognitionResult: {
serializedName: "recognitionResult",
readResults: {
required: true,
serializedName: "readResults",
type: {
name: "Composite",
className: "TextRecognitionResult"
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ReadResult"
}
}
}

@@ -1349,49 +1365,28 @@ }

allowedValues: [
"NotStarted",
"Running",
"Failed",
"Succeeded"
"notStarted",
"running",
"failed",
"succeeded"
]
}
},
recognitionResults: {
serializedName: "recognitionResults",
createdDateTime: {
nullable: false,
serializedName: "createdDateTime",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "TextRecognitionResult"
}
}
name: "String"
}
}
}
}
};
export var RecognizeTextHeaders = {
serializedName: "recognizetext-headers",
type: {
name: "Composite",
className: "RecognizeTextHeaders",
modelProperties: {
operationLocation: {
serializedName: "operation-location",
},
lastUpdatedDateTime: {
nullable: false,
serializedName: "lastUpdatedDateTime",
type: {
name: "String"
}
}
}
}
};
export var BatchReadFileHeaders = {
serializedName: "batchreadfile-headers",
type: {
name: "Composite",
className: "BatchReadFileHeaders",
modelProperties: {
operationLocation: {
serializedName: "operation-location",
},
analyzeResult: {
serializedName: "analyzeResult",
type: {
name: "String"
name: "Composite",
className: "AnalyzeResults"
}

@@ -1402,7 +1397,7 @@ }

};
export var RecognizeTextInStreamHeaders = {
serializedName: "recognizetextinstream-headers",
export var ReadHeaders = {
serializedName: "read-headers",
type: {
name: "Composite",
className: "RecognizeTextInStreamHeaders",
className: "ReadHeaders",
modelProperties: {

@@ -1418,7 +1413,7 @@ operationLocation: {

};
export var BatchReadFileInStreamHeaders = {
serializedName: "batchreadfileinstream-headers",
export var ReadInStreamHeaders = {
serializedName: "readinstream-headers",
type: {
name: "Composite",
className: "BatchReadFileInStreamHeaders",
className: "ReadInStreamHeaders",
modelProperties: {

@@ -1425,0 +1420,0 @@ operationLocation: {

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

export declare const maxCandidates: msRest.OperationQueryParameter;
export declare const mode: msRest.OperationQueryParameter;
export declare const model: msRest.OperationURLParameter;

@@ -13,0 +12,0 @@ export declare const operationId: msRest.OperationURLParameter;

@@ -160,16 +160,2 @@ /*

};
export var mode = {
parameterPath: "mode",
mapper: {
required: true,
serializedName: "mode",
type: {
name: "Enum",
allowedValues: [
"Handwritten",
"Printed"
]
}
}
};
export var model = {

@@ -191,3 +177,3 @@ parameterPath: "model",

type: {
name: "String"
name: "Uuid"
}

@@ -194,0 +180,0 @@ }

The MIT License (MIT)
Copyright (c) 2019 Microsoft
Copyright (c) 2020 Microsoft

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

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

"description": "ComputerVisionClient Library with typescript type definitions for node.js and browser.",
"version": "6.0.0",
"version": "7.0.0",
"dependencies": {

@@ -8,0 +8,0 @@ "@azure/ms-rest-js": "^2.0.4",

@@ -117,2 +117,2 @@ ## An isomorphic javascript sdk for - ComputerVisionClient

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/cognitiveservices/cognitiveservices-computervision/README.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcognitiveservices%2Fcognitiveservices-computervision%2FREADME.png)

@@ -357,75 +357,12 @@ /*

/**
* Recognize Text operation. When you use the Recognize Text interface, the response contains a
* field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must
* use for your Get Recognize Text Operation Result operation.
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image.
* @param [options] The optional parameters
* @returns Promise<Models.RecognizeTextResponse>
*/
recognizeText(mode: Models.TextRecognitionMode, url: string, options?: msRest.RequestOptionsBase): Promise<Models.RecognizeTextResponse>;
/**
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image.
* @param callback The callback
*/
recognizeText(mode: Models.TextRecognitionMode, url: string, callback: msRest.ServiceCallback<void>): void;
/**
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image.
* @param options The optional parameters
* @param callback The callback
*/
recognizeText(mode: Models.TextRecognitionMode, url: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
recognizeText(mode: Models.TextRecognitionMode, url: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<Models.RecognizeTextResponse> {
return this.sendOperationRequest(
{
mode,
url,
options
},
recognizeTextOperationSpec,
callback) as Promise<Models.RecognizeTextResponse>;
}
/**
* This interface is used for getting text operation result. The URL to this interface should be
* retrieved from 'Operation-Location' field returned from Recognize Text interface.
* @param operationId Id of the text operation returned in the response of the 'Recognize Text'
* @param [options] The optional parameters
* @returns Promise<Models.GetTextOperationResultResponse>
*/
getTextOperationResult(operationId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetTextOperationResultResponse>;
/**
* @param operationId Id of the text operation returned in the response of the 'Recognize Text'
* @param callback The callback
*/
getTextOperationResult(operationId: string, callback: msRest.ServiceCallback<Models.TextOperationResult>): void;
/**
* @param operationId Id of the text operation returned in the response of the 'Recognize Text'
* @param options The optional parameters
* @param callback The callback
*/
getTextOperationResult(operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.TextOperationResult>): void;
getTextOperationResult(operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.TextOperationResult>, callback?: msRest.ServiceCallback<Models.TextOperationResult>): Promise<Models.GetTextOperationResultResponse> {
return this.sendOperationRequest(
{
operationId,
options
},
getTextOperationResultOperationSpec,
callback) as Promise<Models.GetTextOperationResultResponse>;
}
/**
* Use this interface to get the result of a Read operation, employing the state-of-the-art Optical
* Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read
* File interface, the response contains a field called 'Operation-Location'. The
* 'Operation-Location' field contains the URL that you must use for your 'GetReadOperationResult'
* operation to access OCR results.​
* interface, the response contains a field called 'Operation-Location'. The 'Operation-Location'
* field contains the URL that you must use for your 'GetReadResult' operation to access OCR
* results.​
* @param url Publicly reachable URL of an image.
* @param [options] The optional parameters
* @returns Promise<Models.BatchReadFileResponse>
* @returns Promise<Models.ReadResponse>
*/
batchReadFile(url: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchReadFileResponse>;
read(url: string, options?: Models.ComputerVisionClientReadOptionalParams): Promise<Models.ReadResponse>;
/**

@@ -435,3 +372,3 @@ * @param url Publicly reachable URL of an image.

*/
batchReadFile(url: string, callback: msRest.ServiceCallback<void>): void;
read(url: string, callback: msRest.ServiceCallback<void>): void;
/**

@@ -442,4 +379,4 @@ * @param url Publicly reachable URL of an image.

*/
batchReadFile(url: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
batchReadFile(url: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<Models.BatchReadFileResponse> {
read(url: string, options: Models.ComputerVisionClientReadOptionalParams, callback: msRest.ServiceCallback<void>): void;
read(url: string, options?: Models.ComputerVisionClientReadOptionalParams | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<Models.ReadResponse> {
return this.sendOperationRequest(

@@ -450,4 +387,4 @@ {

},
batchReadFileOperationSpec,
callback) as Promise<Models.BatchReadFileResponse>;
readOperationSpec,
callback) as Promise<Models.ReadResponse>;
}

@@ -457,23 +394,20 @@

* This interface is used for getting OCR results of Read operation. The URL to this interface
* should be retrieved from 'Operation-Location' field returned from Batch Read File interface.
* @param operationId Id of read operation returned in the response of the 'Batch Read File'
* interface.
* should be retrieved from 'Operation-Location' field returned from Read interface.
* @param operationId Id of read operation returned in the response of the 'Read' interface.
* @param [options] The optional parameters
* @returns Promise<Models.GetReadOperationResultResponse>
* @returns Promise<Models.GetReadResultResponse>
*/
getReadOperationResult(operationId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetReadOperationResultResponse>;
getReadResult(operationId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetReadResultResponse>;
/**
* @param operationId Id of read operation returned in the response of the 'Batch Read File'
* interface.
* @param operationId Id of read operation returned in the response of the 'Read' interface.
* @param callback The callback
*/
getReadOperationResult(operationId: string, callback: msRest.ServiceCallback<Models.ReadOperationResult>): void;
getReadResult(operationId: string, callback: msRest.ServiceCallback<Models.ReadOperationResult>): void;
/**
* @param operationId Id of read operation returned in the response of the 'Batch Read File'
* interface.
* @param operationId Id of read operation returned in the response of the 'Read' interface.
* @param options The optional parameters
* @param callback The callback
*/
getReadOperationResult(operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ReadOperationResult>): void;
getReadOperationResult(operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ReadOperationResult>, callback?: msRest.ServiceCallback<Models.ReadOperationResult>): Promise<Models.GetReadOperationResultResponse> {
getReadResult(operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ReadOperationResult>): void;
getReadResult(operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ReadOperationResult>, callback?: msRest.ServiceCallback<Models.ReadOperationResult>): Promise<Models.GetReadResultResponse> {
return this.sendOperationRequest(

@@ -484,4 +418,4 @@ {

},
getReadOperationResultOperationSpec,
callback) as Promise<Models.GetReadOperationResultResponse>;
getReadResultOperationSpec,
callback) as Promise<Models.GetReadResultResponse>;
}

@@ -790,66 +724,32 @@

/**
* Recognize Text operation. When you use the Recognize Text interface, the response contains a
* field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must
* use for your Get Recognize Text Operation Result operation.
* Use this interface to get the result of a Read operation, employing the state-of-the-art Optical
* Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read
* interface, the response contains a field called 'Operation-Location'. The 'Operation-Location'
* field contains the URL that you must use for your 'GetReadResult' operation to access OCR
* results.​
* @param image An image stream.
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param [options] The optional parameters
* @returns Promise<Models.RecognizeTextInStreamResponse>
* @returns Promise<Models.ReadInStreamResponse>
*/
recognizeTextInStream(image: msRest.HttpRequestBody, mode: Models.TextRecognitionMode, options?: msRest.RequestOptionsBase): Promise<Models.RecognizeTextInStreamResponse>;
readInStream(image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientReadInStreamOptionalParams): Promise<Models.ReadInStreamResponse>;
/**
* @param image An image stream.
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param callback The callback
*/
recognizeTextInStream(image: msRest.HttpRequestBody, mode: Models.TextRecognitionMode, callback: msRest.ServiceCallback<void>): void;
readInStream(image: msRest.HttpRequestBody, callback: msRest.ServiceCallback<void>): void;
/**
* @param image An image stream.
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param options The optional parameters
* @param callback The callback
*/
recognizeTextInStream(image: msRest.HttpRequestBody, mode: Models.TextRecognitionMode, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
recognizeTextInStream(image: msRest.HttpRequestBody, mode: Models.TextRecognitionMode, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<Models.RecognizeTextInStreamResponse> {
readInStream(image: msRest.HttpRequestBody, options: Models.ComputerVisionClientReadInStreamOptionalParams, callback: msRest.ServiceCallback<void>): void;
readInStream(image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientReadInStreamOptionalParams | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<Models.ReadInStreamResponse> {
return this.sendOperationRequest(
{
image,
mode,
options
},
recognizeTextInStreamOperationSpec,
callback) as Promise<Models.RecognizeTextInStreamResponse>;
readInStreamOperationSpec,
callback) as Promise<Models.ReadInStreamResponse>;
}
/**
* Use this interface to get the result of a Read Document operation, employing the
* state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy
* documents. When you use the Read Document interface, the response contains a field called
* 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your
* 'Get Read Result operation' to access OCR results.​
* @param image An image stream.
* @param [options] The optional parameters
* @returns Promise<Models.BatchReadFileInStreamResponse>
*/
batchReadFileInStream(image: msRest.HttpRequestBody, options?: msRest.RequestOptionsBase): Promise<Models.BatchReadFileInStreamResponse>;
/**
* @param image An image stream.
* @param callback The callback
*/
batchReadFileInStream(image: msRest.HttpRequestBody, callback: msRest.ServiceCallback<void>): void;
/**
* @param image An image stream.
* @param options The optional parameters
* @param callback The callback
*/
batchReadFileInStream(image: msRest.HttpRequestBody, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
batchReadFileInStream(image: msRest.HttpRequestBody, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<Models.BatchReadFileInStreamResponse> {
return this.sendOperationRequest(
{
image,
options
},
batchReadFileInStreamOperationSpec,
callback) as Promise<Models.BatchReadFileInStreamResponse>;
}
}

@@ -1114,5 +1014,5 @@

const recognizeTextOperationSpec: msRest.OperationSpec = {
const readOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "recognizeText",
path: "read/analyze",
urlParameters: [

@@ -1122,3 +1022,3 @@ Parameters.endpoint

queryParameters: [
Parameters.mode
Parameters.language0
],

@@ -1136,6 +1036,7 @@ requestBody: {

202: {
headersMapper: Mappers.RecognizeTextHeaders
headersMapper: Mappers.ReadHeaders
},
default: {
bodyMapper: Mappers.ComputerVisionError
bodyMapper: Mappers.ComputerVisionError,
headersMapper: Mappers.ReadHeaders
}

@@ -1146,5 +1047,5 @@ },

const getTextOperationResultOperationSpec: msRest.OperationSpec = {
const getReadResultOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "textOperations/{operationId}",
path: "read/analyzeResults/{operationId}",
urlParameters: [

@@ -1156,46 +1057,2 @@ Parameters.endpoint,

200: {
bodyMapper: Mappers.TextOperationResult
},
default: {
bodyMapper: Mappers.ComputerVisionError
}
},
serializer
};
const batchReadFileOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "read/core/asyncBatchAnalyze",
urlParameters: [
Parameters.endpoint
],
requestBody: {
parameterPath: {
url: "url"
},
mapper: {
...Mappers.ImageUrl,
required: true
}
},
responses: {
202: {
headersMapper: Mappers.BatchReadFileHeaders
},
default: {
bodyMapper: Mappers.ComputerVisionError
}
},
serializer
};
const getReadOperationResultOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "read/operations/{operationId}",
urlParameters: [
Parameters.endpoint,
Parameters.operationId
],
responses: {
200: {
bodyMapper: Mappers.ReadOperationResult

@@ -1464,5 +1321,5 @@ },

const recognizeTextInStreamOperationSpec: msRest.OperationSpec = {
const readInStreamOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "recognizeText",
path: "read/analyze",
urlParameters: [

@@ -1472,3 +1329,3 @@ Parameters.endpoint

queryParameters: [
Parameters.mode
Parameters.language0
],

@@ -1488,6 +1345,7 @@ requestBody: {

202: {
headersMapper: Mappers.RecognizeTextInStreamHeaders
headersMapper: Mappers.ReadInStreamHeaders
},
default: {
bodyMapper: Mappers.ComputerVisionError
bodyMapper: Mappers.ComputerVisionError,
headersMapper: Mappers.ReadInStreamHeaders
}

@@ -1498,30 +1356,2 @@ },

const batchReadFileInStreamOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "read/core/asyncBatchAnalyze",
urlParameters: [
Parameters.endpoint
],
requestBody: {
parameterPath: "image",
mapper: {
required: true,
serializedName: "Image",
type: {
name: "Stream"
}
}
},
contentType: "application/octet-stream",
responses: {
202: {
headersMapper: Mappers.BatchReadFileInStreamHeaders
},
default: {
bodyMapper: Mappers.ComputerVisionError
}
},
serializer
};
export {

@@ -1528,0 +1358,0 @@ ComputerVisionClient,

@@ -14,3 +14,3 @@ /*

const packageName = "@azure/cognitiveservices-computervision";
const packageVersion = "6.0.0";
const packageVersion = "7.0.0";

@@ -46,3 +46,3 @@ export class ComputerVisionClientContext extends msRest.ServiceClient {

this.baseUri = "{Endpoint}/vision/v2.1";
this.baseUri = "{Endpoint}/vision/v3.0";
this.requestContentType = "application/json; charset=utf-8";

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

@@ -653,5 +653,5 @@ /*

/**
* Qualitative confidence measure. Possible values include: 'High', 'Low'
* Qualitative confidence measure.
*/
confidence?: TextRecognitionResultConfidenceClass;
confidence: number;
}

@@ -664,35 +664,44 @@

/**
* The BCP-47 language code of the recognized text line. Only provided where the language of the
* line differs from the page's.
*/
language?: string;
/**
* Bounding box of a recognized line.
*/
boundingBox?: number[];
boundingBox: number[];
/**
* The text content of the line.
*/
text?: string;
text: string;
/**
* List of words in the text line.
*/
words?: Word[];
words: Word[];
}
/**
* An object representing a recognized text region
* Text extracted from a page in the input document.
*/
export interface TextRecognitionResult {
export interface ReadResult {
/**
* The 1-based page number of the recognition result.
*/
page?: number;
page: number;
/**
* The orientation of the image in degrees in the clockwise direction. Range between [0, 360).
* The BCP-47 language code of the recognized text page.
*/
clockwiseOrientation?: number;
language?: string;
/**
* The orientation of the image in degrees in the clockwise direction. Range between [-180, 180).
*/
angle: number;
/**
* The width of the image in pixels or the PDF in inches.
*/
width?: number;
width: number;
/**
* The height of the image in pixels or the PDF in inches.
*/
height?: number;
height: number;
/**

@@ -702,3 +711,3 @@ * The unit used in the Width, Height and BoundingBox. For images, the unit is 'pixel'. For PDF,

*/
unit?: TextRecognitionResultDimensionUnit;
unit: TextRecognitionResultDimensionUnit;
/**

@@ -711,14 +720,13 @@ * A list of recognized text lines.

/**
* Result of recognition text operation.
* Analyze batch operation result.
*/
export interface TextOperationResult {
export interface AnalyzeResults {
/**
* Status of the text operation. Possible values include: 'NotStarted', 'Running', 'Failed',
* 'Succeeded'
* Version of schema used for this result.
*/
status?: TextOperationStatusCodes;
version: string;
/**
* Text recognition result of the text operation.
* Text extracted from the input.
*/
recognitionResult?: TextRecognitionResult;
readResults: ReadResult[];
}

@@ -731,10 +739,18 @@

/**
* Status of the read operation. Possible values include: 'NotStarted', 'Running', 'Failed',
* 'Succeeded'
* Status of the read operation. Possible values include: 'notStarted', 'running', 'failed',
* 'succeeded'
*/
status?: TextOperationStatusCodes;
status?: OperationStatusCodes;
/**
* An array of text recognition result of the read operation.
* Get UTC date time the batch operation was submitted.
*/
recognitionResults?: TextRecognitionResult[];
createdDateTime?: string;
/**
* Get last updated UTC date time of this batch operation.
*/
lastUpdatedDateTime?: string;
/**
* Analyze batch operation result.
*/
analyzeResult?: AnalyzeResults;
}

@@ -854,2 +870,17 @@

*/
export interface ComputerVisionClientReadOptionalParams extends msRest.RequestOptionsBase {
/**
* The BCP-47 language code of the text to be detected in the image. In future versions, when
* language parameter is not passed, language detection will be used to determine the language.
* However, in the current version, missing language parameter will cause English to be used. To
* ensure that your document is always parsed in English without the use of language detection in
* the future, pass “en” in the language parameter. Possible values include: 'en', 'es', 'fr',
* 'de', 'it', 'nl', 'pt'. Default value: 'en'.
*/
language?: OcrDetectionLanguage;
}
/**
* Optional Parameters.
*/
export interface ComputerVisionClientAnalyzeImageInStreamOptionalParams extends msRest.RequestOptionsBase {

@@ -962,15 +993,20 @@ /**

/**
* Defines headers for RecognizeText operation.
* Optional Parameters.
*/
export interface RecognizeTextHeaders {
export interface ComputerVisionClientReadInStreamOptionalParams extends msRest.RequestOptionsBase {
/**
* URL to query for status of the operation. The operation ID will expire in 48 hours.
* The BCP-47 language code of the text to be detected in the image. In future versions, when
* language parameter is not passed, language detection will be used to determine the language.
* However, in the current version, missing language parameter will cause English to be used. To
* ensure that your document is always parsed in English without the use of language detection in
* the future, pass “en” in the language parameter. Possible values include: 'en', 'es', 'fr',
* 'de', 'it', 'nl', 'pt'. Default value: 'en'.
*/
operationLocation: string;
language?: OcrDetectionLanguage;
}
/**
* Defines headers for BatchReadFile operation.
* Defines headers for Read operation.
*/
export interface BatchReadFileHeaders {
export interface ReadHeaders {
/**

@@ -983,5 +1019,5 @@ * URL to query for status of the operation. The operation ID will expire in 48 hours.

/**
* Defines headers for RecognizeTextInStream operation.
* Defines headers for ReadInStream operation.
*/
export interface RecognizeTextInStreamHeaders {
export interface ReadInStreamHeaders {
/**

@@ -994,12 +1030,2 @@ * URL to query for status of the operation. The operation ID will expire in 48 hours.

/**
* Defines headers for BatchReadFileInStream operation.
*/
export interface BatchReadFileInStreamHeaders {
/**
* URL to query for status of the operation. The operation ID will expire in 48 hours.
*/
operationLocation: string;
}
/**
* Defines values for Gender.

@@ -1013,8 +1039,8 @@ * Possible values include: 'Male', 'Female'

/**
* Defines values for TextOperationStatusCodes.
* Possible values include: 'NotStarted', 'Running', 'Failed', 'Succeeded'
* Defines values for OperationStatusCodes.
* Possible values include: 'notStarted', 'running', 'failed', 'succeeded'
* @readonly
* @enum {string}
*/
export type TextOperationStatusCodes = 'NotStarted' | 'Running' | 'Failed' | 'Succeeded';
export type OperationStatusCodes = 'notStarted' | 'running' | 'failed' | 'succeeded';

@@ -1030,10 +1056,2 @@ /**

/**
* Defines values for TextRecognitionResultConfidenceClass.
* Possible values include: 'High', 'Low'
* @readonly
* @enum {string}
*/
export type TextRecognitionResultConfidenceClass = 'High' | 'Low';
/**
* Defines values for DescriptionExclude.

@@ -1066,8 +1084,8 @@ * Possible values include: 'Celebrities', 'Landmarks'

/**
* Defines values for TextRecognitionMode.
* Possible values include: 'Handwritten', 'Printed'
* Defines values for OcrDetectionLanguage.
* Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl', 'pt'
* @readonly
* @enum {string}
*/
export type TextRecognitionMode = 'Handwritten' | 'Printed';
export type OcrDetectionLanguage = 'en' | 'es' | 'fr' | 'de' | 'it' | 'nl' | 'pt';

@@ -1333,5 +1351,5 @@ /**

/**
* Contains response data for the recognizeText operation.
* Contains response data for the read operation.
*/
export type RecognizeTextResponse = RecognizeTextHeaders & {
export type ReadResponse = ReadHeaders & {
/**

@@ -1344,3 +1362,3 @@ * The underlying HTTP response.

*/
parsedHeaders: RecognizeTextHeaders;
parsedHeaders: ReadHeaders;
};

@@ -1350,5 +1368,5 @@ };

/**
* Contains response data for the getTextOperationResult operation.
* Contains response data for the getReadResult operation.
*/
export type GetTextOperationResultResponse = TextOperationResult & {
export type GetReadResultResponse = ReadOperationResult & {
/**

@@ -1366,37 +1384,2 @@ * The underlying HTTP response.

*/
parsedBody: TextOperationResult;
};
};
/**
* Contains response data for the batchReadFile operation.
*/
export type BatchReadFileResponse = BatchReadFileHeaders & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The parsed HTTP response headers.
*/
parsedHeaders: BatchReadFileHeaders;
};
};
/**
* Contains response data for the getReadOperationResult operation.
*/
export type GetReadOperationResultResponse = ReadOperationResult & {
/**
* 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: ReadOperationResult;

@@ -1573,5 +1556,5 @@ };

/**
* Contains response data for the recognizeTextInStream operation.
* Contains response data for the readInStream operation.
*/
export type RecognizeTextInStreamResponse = RecognizeTextInStreamHeaders & {
export type ReadInStreamResponse = ReadInStreamHeaders & {
/**

@@ -1584,19 +1567,4 @@ * The underlying HTTP response.

*/
parsedHeaders: RecognizeTextInStreamHeaders;
parsedHeaders: ReadInStreamHeaders;
};
};
/**
* Contains response data for the batchReadFileInStream operation.
*/
export type BatchReadFileInStreamResponse = BatchReadFileInStreamHeaders & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The parsed HTTP response headers.
*/
parsedHeaders: BatchReadFileInStreamHeaders;
};
};

@@ -1227,10 +1227,6 @@ /*

confidence: {
nullable: true,
required: true,
serializedName: "confidence",
type: {
name: "Enum",
allowedValues: [
"High",
"Low"
]
name: "Number"
}

@@ -1248,3 +1244,10 @@ }

modelProperties: {
language: {
serializedName: "language",
type: {
name: "String"
}
},
boundingBox: {
required: true,
serializedName: "boundingBox",

@@ -1261,2 +1264,3 @@ type: {

text: {
required: true,
serializedName: "text",

@@ -1268,2 +1272,3 @@ type: {

words: {
required: true,
serializedName: "words",

@@ -1284,9 +1289,10 @@ type: {

export const TextRecognitionResult: msRest.CompositeMapper = {
serializedName: "TextRecognitionResult",
export const ReadResult: msRest.CompositeMapper = {
serializedName: "ReadResult",
type: {
name: "Composite",
className: "TextRecognitionResult",
className: "ReadResult",
modelProperties: {
page: {
required: true,
serializedName: "page",

@@ -1297,5 +1303,12 @@ type: {

},
clockwiseOrientation: {
serializedName: "clockwiseOrientation",
language: {
serializedName: "language",
type: {
name: "String"
}
},
angle: {
required: true,
serializedName: "angle",
type: {
name: "Number"

@@ -1305,2 +1318,3 @@ }

width: {
required: true,
serializedName: "width",

@@ -1312,2 +1326,3 @@ type: {

height: {
required: true,
serializedName: "height",

@@ -1319,3 +1334,4 @@ type: {

unit: {
nullable: true,
required: true,
nullable: false,
serializedName: "unit",

@@ -1347,26 +1363,26 @@ type: {

export const TextOperationResult: msRest.CompositeMapper = {
serializedName: "TextOperationResult",
export const AnalyzeResults: msRest.CompositeMapper = {
serializedName: "analyzeResults",
type: {
name: "Composite",
className: "TextOperationResult",
className: "AnalyzeResults",
modelProperties: {
status: {
nullable: false,
serializedName: "status",
version: {
required: true,
serializedName: "version",
type: {
name: "Enum",
allowedValues: [
"NotStarted",
"Running",
"Failed",
"Succeeded"
]
name: "String"
}
},
recognitionResult: {
serializedName: "recognitionResult",
readResults: {
required: true,
serializedName: "readResults",
type: {
name: "Composite",
className: "TextRecognitionResult"
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ReadResult"
}
}
}

@@ -1390,51 +1406,28 @@ }

allowedValues: [
"NotStarted",
"Running",
"Failed",
"Succeeded"
"notStarted",
"running",
"failed",
"succeeded"
]
}
},
recognitionResults: {
serializedName: "recognitionResults",
createdDateTime: {
nullable: false,
serializedName: "createdDateTime",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "TextRecognitionResult"
}
}
name: "String"
}
}
}
}
};
export const RecognizeTextHeaders: msRest.CompositeMapper = {
serializedName: "recognizetext-headers",
type: {
name: "Composite",
className: "RecognizeTextHeaders",
modelProperties: {
operationLocation: {
serializedName: "operation-location",
},
lastUpdatedDateTime: {
nullable: false,
serializedName: "lastUpdatedDateTime",
type: {
name: "String"
}
}
}
}
};
export const BatchReadFileHeaders: msRest.CompositeMapper = {
serializedName: "batchreadfile-headers",
type: {
name: "Composite",
className: "BatchReadFileHeaders",
modelProperties: {
operationLocation: {
serializedName: "operation-location",
},
analyzeResult: {
serializedName: "analyzeResult",
type: {
name: "String"
name: "Composite",
className: "AnalyzeResults"
}

@@ -1446,7 +1439,7 @@ }

export const RecognizeTextInStreamHeaders: msRest.CompositeMapper = {
serializedName: "recognizetextinstream-headers",
export const ReadHeaders: msRest.CompositeMapper = {
serializedName: "read-headers",
type: {
name: "Composite",
className: "RecognizeTextInStreamHeaders",
className: "ReadHeaders",
modelProperties: {

@@ -1463,7 +1456,7 @@ operationLocation: {

export const BatchReadFileInStreamHeaders: msRest.CompositeMapper = {
serializedName: "batchreadfileinstream-headers",
export const ReadInStreamHeaders: msRest.CompositeMapper = {
serializedName: "readinstream-headers",
type: {
name: "Composite",
className: "BatchReadFileInStreamHeaders",
className: "ReadInStreamHeaders",
modelProperties: {

@@ -1470,0 +1463,0 @@ operationLocation: {

@@ -162,16 +162,2 @@ /*

};
export const mode: msRest.OperationQueryParameter = {
parameterPath: "mode",
mapper: {
required: true,
serializedName: "mode",
type: {
name: "Enum",
allowedValues: [
"Handwritten",
"Printed"
]
}
}
};
export const model: msRest.OperationURLParameter = {

@@ -193,3 +179,3 @@ parameterPath: "model",

type: {
name: "String"
name: "Uuid"
}

@@ -196,0 +182,0 @@ }

Sorry, the diff of this file is too big to display

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