Socket
Socket
Sign inDemoInstall

@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 8.0.0 to 8.1.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({__proto__:null}),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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}}}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},N={serializedName:"ImageUrl",type:{name:"Composite",className:"ImageUrl",modelProperties:{url:{required:!0,serializedName:"url",type:{name:"String"}}}}},g={serializedName:"ComputerVisionErrorResponse",type:{name:"Composite",className:"ComputerVisionErrorResponse",modelProperties:{error:{required:!0,serializedName:"error",type:{name:"Composite",className:"ComputerVisionError"}}}}},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:"ComputerVisionOcrError",type:{name:"Composite",className:"ComputerVisionOcrError",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"Object"}},message:{required:!0,serializedName:"message",type:{name:"String"}},requestId:{serializedName:"requestId",type:{name:"String"}}}}},h={serializedName:"read-headers",type:{name:"Composite",className:"ReadHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},C={serializedName:"readinstream-headers",type:{name:"Composite",className:"ReadInStreamHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},q=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: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,ComputerVisionInnerError:{serializedName:"ComputerVisionInnerError",type:{name:"Composite",className:"ComputerVisionInnerError",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"String"}},message:{required:!0,serializedName:"message",type:{name:"String"}}}}},ComputerVisionError:{serializedName:"ComputerVisionError",type:{name:"Composite",className:"ComputerVisionError",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"String"}},message:{required:!0,serializedName:"message",type:{name:"String"}},innererror:{serializedName:"innererror",type:{name:"Composite",className:"ComputerVisionInnerError"}}}}},ComputerVisionErrorResponse:g,Style:{serializedName:"Style",type:{name:"Composite",className:"Style",modelProperties:{name:{required:!0,serializedName:"name",type:{name:"String"}},confidence:{required:!0,serializedName:"confidence",type:{name:"Number"}}}}},Appearance:{serializedName:"Appearance",type:{name:"Composite",className:"Appearance",modelProperties:{style:{required:!0,serializedName:"style",type:{name:"Composite",className:"Style"}}}}},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"}}}},appearance:{serializedName:"appearance",type:{name:"Composite",className:"Appearance"}},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"}},modelVersion:{required:!0,serializedName:"modelVersion",constraints:{Pattern:/^(latest|\d{4}-\d{2}-\d{2})(-preview)?$/},type:{name:"String"}},readResults:{required:!0,serializedName:"readResults",type:{name:"Sequence",element:{type:{name:"Composite",className:"ReadResult"}}}}}}},ReadOperationResult:z,ComputerVisionOcrError:b,ReadHeaders:h,ReadInStreamHeaders:C}),P={parameterPath:["options","descriptionExclude"],mapper:{serializedName:"descriptionExclude",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Celebrities","Landmarks"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},S={parameterPath:["options","details"],mapper:{serializedName:"details",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Celebrities","Landmarks"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},f={parameterPath:"detectOrientation",mapper:{required:!0,serializedName:"detectOrientation",defaultValue:!0,type:{name:"Boolean"}}},I={parameterPath:"endpoint",mapper:{required:!0,serializedName:"Endpoint",defaultValue:"",type:{name:"String"}},skipEncoding:!0},O={parameterPath:"height",mapper:{required:!0,serializedName:"height",constraints:{InclusiveMaximum:1024,InclusiveMinimum:1},type:{name:"Number"}}},M={parameterPath:["options","language"],mapper:{serializedName:"language",defaultValue:"en",type:{name:"String"}}},R={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"]}}},T={parameterPath:["options","language"],mapper:{serializedName:"language",type:{name:"String"}}},B={parameterPath:["options","maxCandidates"],mapper:{serializedName:"maxCandidates",defaultValue:1,type:{name:"Number"}}},V={parameterPath:"model",mapper:{required:!0,serializedName:"model",type:{name:"String"}}},D={parameterPath:["options","modelVersion"],mapper:{serializedName:"model-version",defaultValue:"latest",constraints:{Pattern:/^(latest|\d{4}-\d{2}-\d{2})(-preview)?$/},type:{name:"String"}}},j={parameterPath:["options","pages"],mapper:{serializedName:"pages",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:n.QueryCollectionFormat.Csv},w={parameterPath:["options","smartCropping"],mapper:{serializedName:"smartCropping",defaultValue:!1,type:{name:"Boolean"}}},x={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},v={parameterPath:"width",mapper:{required:!0,serializedName:"width",constraints:{InclusiveMaximum:1024,InclusiveMinimum:1},type:{name:"Number"}}},A=(a(E,s=n.ServiceClient),E);function E(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/8.0.0 "+r),(i=s.call(this,e,t)||this).baseUri="{Endpoint}/vision/v3.2",i.requestContentType="application/json; charset=utf-8",i.endpoint=a,i.credentials=e,i}var F,L=(a(_,F=A),_.prototype.analyzeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},H,t)},_.prototype.describeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},W,t)},_.prototype.detectObjects=function(e,a,t){return this.sendOperationRequest({url:e,options:a},U,t)},_.prototype.listModels=function(e,a){return this.sendOperationRequest({options:e},G,a)},_.prototype.analyzeImageByDomain=function(e,a,t,r){return this.sendOperationRequest({model:e,url:a,options:t},Q,r)},_.prototype.recognizePrintedText=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,url:a,options:t},$,r)},_.prototype.tagImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},J,t)},_.prototype.generateThumbnail=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,url:t,options:r},K,i)},_.prototype.getAreaOfInterest=function(e,a,t){return this.sendOperationRequest({url:e,options:a},X,t)},_.prototype.read=function(e,a,t){return this.sendOperationRequest({url:e,options:a},Y,t)},_.prototype.getReadResult=function(e,a,t){return this.sendOperationRequest({operationId:e,options:a},Z,t)},_.prototype.analyzeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ee,t)},_.prototype.getAreaOfInterestInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ae,t)},_.prototype.describeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},te,t)},_.prototype.detectObjectsInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},re,t)},_.prototype.generateThumbnailInStream=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,image:t,options:r},ie,i)},_.prototype.analyzeImageByDomainInStream=function(e,a,t,r){return this.sendOperationRequest({model:e,image:a,options:t},ne,r)},_.prototype.recognizePrintedTextInStream=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,image:a,options:t},se,r)},_.prototype.tagImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},me,t)},_.prototype.readInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},le,t)},_);function _(e,a,t){return F.call(this,e,a,t)||this}var k=new n.Serializer(q),H={httpMethod:"POST",path:"analyze",urlParameters:[I],queryParameters:[x,S,M,P,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:m},default:{bodyMapper:g}},serializer:k},W={httpMethod:"POST",path:"describe",urlParameters:[I],queryParameters:[B,M,P,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:l},default:{bodyMapper:g}},serializer:k},U={httpMethod:"POST",path:"detect",urlParameters:[I],queryParameters:[D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:o},default:{bodyMapper:g}},serializer:k},G={httpMethod:"GET",path:"models",urlParameters:[I],responses:{200:{bodyMapper:p},default:{bodyMapper:g}},serializer:k},Q={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[I,V],queryParameters:[M,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:d},default:{bodyMapper:g}},serializer:k},$={httpMethod:"POST",path:"ocr",urlParameters:[I],queryParameters:[f,R,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:u},default:{bodyMapper:g}},serializer:k},J={httpMethod:"POST",path:"tag",urlParameters:[I],queryParameters:[M,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:c},default:{bodyMapper:g}},serializer:k},K={httpMethod:"POST",path:"generateThumbnail",urlParameters:[I],queryParameters:[v,O,w,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},default:{}},serializer:k},X={httpMethod:"POST",path:"areaOfInterest",urlParameters:[I],queryParameters:[D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:y},default:{bodyMapper:g}},serializer:k},Y={httpMethod:"POST",path:"read/analyze",urlParameters:[I],queryParameters:[T,j,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{202:{headersMapper:h},default:{bodyMapper:b,headersMapper:h}},serializer:k},Z={httpMethod:"GET",path:"read/analyzeResults/{operationId}",urlParameters:[I,{parameterPath:"operationId",mapper:{required:!0,serializedName:"operationId",type:{name:"Uuid"}}}],responses:{200:{bodyMapper:z},default:{bodyMapper:b}},serializer:k},ee={httpMethod:"POST",path:"analyze",urlParameters:[I],queryParameters:[x,S,M,P,D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:m},default:{bodyMapper:g}},serializer:k},ae={httpMethod:"POST",path:"areaOfInterest",urlParameters:[I],queryParameters:[D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:y},default:{bodyMapper:g}},serializer:k},te={httpMethod:"POST",path:"describe",urlParameters:[I],queryParameters:[B,M,P,D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:l},default:{bodyMapper:g}},serializer:k},re={httpMethod:"POST",path:"detect",urlParameters:[I],queryParameters:[D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:o},default:{bodyMapper:g}},serializer:k},ie={httpMethod:"POST",path:"generateThumbnail",urlParameters:[I],queryParameters:[v,O,w,D],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},ne={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[I,V],queryParameters:[M,D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:d},default:{bodyMapper:g}},serializer:k},se={httpMethod:"POST",path:"ocr",urlParameters:[I],queryParameters:[f,R,D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:u},default:{bodyMapper:g}},serializer:k},me={httpMethod:"POST",path:"tag",urlParameters:[I],queryParameters:[M,D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:c},default:{bodyMapper:g}},serializer:k},le={httpMethod:"POST",path:"read/analyze",urlParameters:[I],queryParameters:[T,j],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{202:{headersMapper:C},default:{bodyMapper:b,headersMapper:C}},serializer:k};e.ComputerVisionClient=L,e.ComputerVisionClientContext=A,e.ComputerVisionMappers=q,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}),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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}}}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},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"}},modelVersion:{serializedName:"modelVersion",type:{name:"String"}}}}},N={serializedName:"ImageUrl",type:{name:"Composite",className:"ImageUrl",modelProperties:{url:{required:!0,serializedName:"url",type:{name:"String"}}}}},g={serializedName:"ComputerVisionErrorResponse",type:{name:"Composite",className:"ComputerVisionErrorResponse",modelProperties:{error:{required:!0,serializedName:"error",type:{name:"Composite",className:"ComputerVisionError"}}}}},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:"ComputerVisionOcrError",type:{name:"Composite",className:"ComputerVisionOcrError",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"Object"}},message:{required:!0,serializedName:"message",type:{name:"String"}},requestId:{serializedName:"requestId",type:{name:"String"}}}}},h={serializedName:"read-headers",type:{name:"Composite",className:"ReadHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},C={serializedName:"readinstream-headers",type:{name:"Composite",className:"ReadInStreamHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},q=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: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,ComputerVisionInnerError:{serializedName:"ComputerVisionInnerError",type:{name:"Composite",className:"ComputerVisionInnerError",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"String"}},message:{required:!0,serializedName:"message",type:{name:"String"}}}}},ComputerVisionError:{serializedName:"ComputerVisionError",type:{name:"Composite",className:"ComputerVisionError",modelProperties:{code:{required:!0,serializedName:"code",type:{name:"String"}},message:{required:!0,serializedName:"message",type:{name:"String"}},innererror:{serializedName:"innererror",type:{name:"Composite",className:"ComputerVisionInnerError"}}}}},ComputerVisionErrorResponse:g,Style:{serializedName:"Style",type:{name:"Composite",className:"Style",modelProperties:{name:{required:!0,serializedName:"name",type:{name:"String"}},confidence:{required:!0,serializedName:"confidence",type:{name:"Number"}}}}},Appearance:{serializedName:"Appearance",type:{name:"Composite",className:"Appearance",modelProperties:{style:{required:!0,serializedName:"style",type:{name:"Composite",className:"Style"}}}}},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"}}}},appearance:{serializedName:"appearance",type:{name:"Composite",className:"Appearance"}},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"}},modelVersion:{required:!0,serializedName:"modelVersion",constraints:{Pattern:/^(latest|\d{4}-\d{2}-\d{2})(-preview)?$/},type:{name:"String"}},readResults:{required:!0,serializedName:"readResults",type:{name:"Sequence",element:{type:{name:"Composite",className:"ReadResult"}}}}}}},ReadOperationResult:z,ComputerVisionOcrError:b,ReadHeaders:h,ReadInStreamHeaders:C}),P={parameterPath:["options","descriptionExclude"],mapper:{serializedName:"descriptionExclude",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Celebrities","Landmarks"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},S={parameterPath:["options","details"],mapper:{serializedName:"details",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Celebrities","Landmarks"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},f={parameterPath:"detectOrientation",mapper:{required:!0,serializedName:"detectOrientation",defaultValue:!0,type:{name:"Boolean"}}},I={parameterPath:"endpoint",mapper:{required:!0,serializedName:"Endpoint",defaultValue:"",type:{name:"String"}},skipEncoding:!0},O={parameterPath:"height",mapper:{required:!0,serializedName:"height",constraints:{InclusiveMaximum:1024,InclusiveMinimum:1},type:{name:"Number"}}},M={parameterPath:["options","language"],mapper:{serializedName:"language",defaultValue:"en",type:{name:"String"}}},R={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"]}}},T={parameterPath:["options","language"],mapper:{serializedName:"language",type:{name:"String"}}},B={parameterPath:["options","maxCandidates"],mapper:{serializedName:"maxCandidates",defaultValue:1,type:{name:"Number"}}},V={parameterPath:"model",mapper:{required:!0,serializedName:"model",type:{name:"String"}}},D={parameterPath:["options","modelVersion"],mapper:{serializedName:"model-version",defaultValue:"latest",constraints:{Pattern:/^(latest|\d{4}-\d{2}-\d{2})(-preview)?$/},type:{name:"String"}}},j={parameterPath:["options","pages"],mapper:{serializedName:"pages",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:n.QueryCollectionFormat.Csv},w={parameterPath:["options","readingOrder"],mapper:{serializedName:"readingOrder",defaultValue:"basic",type:{name:"String"}}},x={parameterPath:["options","smartCropping"],mapper:{serializedName:"smartCropping",defaultValue:!1,type:{name:"Boolean"}}},v={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"}}},E=(a(F,s=n.ServiceClient),F);function F(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/8.1.0 "+r),(i=s.call(this,e,t)||this).baseUri="{Endpoint}/vision/v3.2",i.requestContentType="application/json; charset=utf-8",i.endpoint=a,i.credentials=e,i}var L,_=(a(k,L=E),k.prototype.analyzeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},W,t)},k.prototype.describeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},U,t)},k.prototype.detectObjects=function(e,a,t){return this.sendOperationRequest({url:e,options:a},G,t)},k.prototype.listModels=function(e,a){return this.sendOperationRequest({options:e},Q,a)},k.prototype.analyzeImageByDomain=function(e,a,t,r){return this.sendOperationRequest({model:e,url:a,options:t},$,r)},k.prototype.recognizePrintedText=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,url:a,options:t},J,r)},k.prototype.tagImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},K,t)},k.prototype.generateThumbnail=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,url:t,options:r},X,i)},k.prototype.getAreaOfInterest=function(e,a,t){return this.sendOperationRequest({url:e,options:a},Y,t)},k.prototype.read=function(e,a,t){return this.sendOperationRequest({url:e,options:a},Z,t)},k.prototype.getReadResult=function(e,a,t){return this.sendOperationRequest({operationId:e,options:a},ee,t)},k.prototype.analyzeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ae,t)},k.prototype.getAreaOfInterestInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},te,t)},k.prototype.describeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},re,t)},k.prototype.detectObjectsInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ie,t)},k.prototype.generateThumbnailInStream=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,image:t,options:r},ne,i)},k.prototype.analyzeImageByDomainInStream=function(e,a,t,r){return this.sendOperationRequest({model:e,image:a,options:t},se,r)},k.prototype.recognizePrintedTextInStream=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,image:a,options:t},me,r)},k.prototype.tagImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},le,t)},k.prototype.readInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},oe,t)},k);function k(e,a,t){return L.call(this,e,a,t)||this}var H=new n.Serializer(q),W={httpMethod:"POST",path:"analyze",urlParameters:[I],queryParameters:[v,S,M,P,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:m},default:{bodyMapper:g}},serializer:H},U={httpMethod:"POST",path:"describe",urlParameters:[I],queryParameters:[B,M,P,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:l},default:{bodyMapper:g}},serializer:H},G={httpMethod:"POST",path:"detect",urlParameters:[I],queryParameters:[D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:o},default:{bodyMapper:g}},serializer:H},Q={httpMethod:"GET",path:"models",urlParameters:[I],responses:{200:{bodyMapper:p},default:{bodyMapper:g}},serializer:H},$={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[I,V],queryParameters:[M,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:d},default:{bodyMapper:g}},serializer:H},J={httpMethod:"POST",path:"ocr",urlParameters:[I],queryParameters:[f,R,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:u},default:{bodyMapper:g}},serializer:H},K={httpMethod:"POST",path:"tag",urlParameters:[I],queryParameters:[M,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:c},default:{bodyMapper:g}},serializer:H},X={httpMethod:"POST",path:"generateThumbnail",urlParameters:[I],queryParameters:[A,O,x,D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},default:{}},serializer:H},Y={httpMethod:"POST",path:"areaOfInterest",urlParameters:[I],queryParameters:[D],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{200:{bodyMapper:y},default:{bodyMapper:g}},serializer:H},Z={httpMethod:"POST",path:"read/analyze",urlParameters:[I],queryParameters:[T,j,D,w],requestBody:{parameterPath:{url:"url"},mapper:t(t({},N),{required:!0})},responses:{202:{headersMapper:h},default:{bodyMapper:b,headersMapper:h}},serializer:H},ee={httpMethod:"GET",path:"read/analyzeResults/{operationId}",urlParameters:[I,{parameterPath:"operationId",mapper:{required:!0,serializedName:"operationId",type:{name:"Uuid"}}}],responses:{200:{bodyMapper:z},default:{bodyMapper:b}},serializer:H},ae={httpMethod:"POST",path:"analyze",urlParameters:[I],queryParameters:[v,S,M,P,D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:m},default:{bodyMapper:g}},serializer:H},te={httpMethod:"POST",path:"areaOfInterest",urlParameters:[I],queryParameters:[D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:y},default:{bodyMapper:g}},serializer:H},re={httpMethod:"POST",path:"describe",urlParameters:[I],queryParameters:[B,M,P,D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:l},default:{bodyMapper:g}},serializer:H},ie={httpMethod:"POST",path:"detect",urlParameters:[I],queryParameters:[D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:o},default:{bodyMapper:g}},serializer:H},ne={httpMethod:"POST",path:"generateThumbnail",urlParameters:[I],queryParameters:[A,O,x,D],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:H},se={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[I,V],queryParameters:[M,D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:d},default:{bodyMapper:g}},serializer:H},me={httpMethod:"POST",path:"ocr",urlParameters:[I],queryParameters:[f,R,D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:u},default:{bodyMapper:g}},serializer:H},le={httpMethod:"POST",path:"tag",urlParameters:[I],queryParameters:[M,D],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:c},default:{bodyMapper:g}},serializer:H},oe={httpMethod:"POST",path:"read/analyze",urlParameters:[I],queryParameters:[T,j,D,w],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{202:{headersMapper:C},default:{bodyMapper:b,headersMapper:C}},serializer:H};e.ComputerVisionClient=_,e.ComputerVisionClientContext=E,e.ComputerVisionMappers=q,e.ComputerVisionModels=i,Object.defineProperty(e,"__esModule",{value:!0})});
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*

@@ -401,3 +400,4 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

Parameters.pages,
Parameters.modelVersion
Parameters.modelVersion,
Parameters.readingOrder
],

@@ -704,3 +704,5 @@ requestBody: {

Parameters.language2,
Parameters.pages
Parameters.pages,
Parameters.modelVersion,
Parameters.readingOrder
],

@@ -707,0 +709,0 @@ requestBody: {

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

@@ -13,3 +12,3 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

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

@@ -16,0 +15,0 @@ __extends(ComputerVisionClientContext, _super);

@@ -942,2 +942,8 @@ /// <reference types="node" />

modelVersion?: string;
/**
* Optional parameter to specify which reading order algorithm should be applied when ordering
* the extract text elements. Can be either 'basic' or 'natural'. Will default to 'basic' if not
* specified. Default value: 'basic'.
*/
readingOrder?: string;
}

@@ -1119,2 +1125,14 @@ /**

pages?: string[];
/**
* Optional parameter to specify the version of the OCR model used for text extraction. Accepted
* values are: "latest", "latest-preview", "2021-04-12". Defaults to "latest". Default value:
* 'latest'.
*/
modelVersion?: string;
/**
* Optional parameter to specify which reading order algorithm should be applied when ordering
* the extract text elements. Can be either 'basic' or 'natural'. Will default to 'basic' if not
* specified. Default value: 'basic'.
*/
readingOrder?: string;
}

@@ -1121,0 +1139,0 @@ /**

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

@@ -5,0 +5,0 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

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

@@ -5,0 +5,0 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

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

export declare const pages: msRest.OperationQueryParameter;
export declare const readingOrder: msRest.OperationQueryParameter;
export declare const smartCropping: msRest.OperationQueryParameter;

@@ -17,0 +18,0 @@ export declare const visualFeatures: msRest.OperationQueryParameter;

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

@@ -226,2 +225,15 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

};
export var readingOrder = {
parameterPath: [
"options",
"readingOrder"
],
mapper: {
serializedName: "readingOrder",
defaultValue: 'basic',
type: {
name: "String"
}
}
};
export var smartCropping = {

@@ -228,0 +240,0 @@ parameterPath: [

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

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

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

@@ -24,4 +24,4 @@ import rollup from "rollup";

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

@@ -28,0 +28,0 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

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

@@ -1028,3 +1027,4 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

Parameters.pages,
Parameters.modelVersion
Parameters.modelVersion,
Parameters.readingOrder
],

@@ -1344,3 +1344,5 @@ requestBody: {

Parameters.language2,
Parameters.pages
Parameters.pages,
Parameters.modelVersion,
Parameters.readingOrder
],

@@ -1347,0 +1349,0 @@ requestBody: {

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

@@ -14,3 +13,3 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

const packageName = "@azure/cognitiveservices-computervision";
const packageVersion = "8.0.0";
const packageVersion = "8.1.0";

@@ -17,0 +16,0 @@ export class ComputerVisionClientContext extends msRest.ServiceClient {

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

@@ -1000,2 +1000,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

modelVersion?: string;
/**
* Optional parameter to specify which reading order algorithm should be applied when ordering
* the extract text elements. Can be either 'basic' or 'natural'. Will default to 'basic' if not
* specified. Default value: 'basic'.
*/
readingOrder?: string;
}

@@ -1186,2 +1192,14 @@

pages?: string[];
/**
* Optional parameter to specify the version of the OCR model used for text extraction. Accepted
* values are: "latest", "latest-preview", "2021-04-12". Defaults to "latest". Default value:
* 'latest'.
*/
modelVersion?: string;
/**
* Optional parameter to specify which reading order algorithm should be applied when ordering
* the extract text elements. Can be either 'basic' or 'natural'. Will default to 'basic' if not
* specified. Default value: 'basic'.
*/
readingOrder?: string;
}

@@ -1188,0 +1206,0 @@

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

@@ -5,0 +5,0 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

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

@@ -228,2 +227,15 @@ * Code generated by Microsoft (R) AutoRest Code Generator.

};
export const readingOrder: msRest.OperationQueryParameter = {
parameterPath: [
"options",
"readingOrder"
],
mapper: {
serializedName: "readingOrder",
defaultValue: 'basic',
type: {
name: "String"
}
}
};
export const smartCropping: msRest.OperationQueryParameter = {

@@ -230,0 +242,0 @@ parameterPath: [

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