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 4.0.0 to 5.0.0

src/computerVisionClient.ts

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.Azure=e.Azure||{},e.Azure.CognitiveservicesComputervision={}),e.msRest)}(this,function(e,s){"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 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({}),n={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"}}}}},m={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"}}}}},o={serializedName:"ListModelsResult",type:{name:"Composite",className:"ListModelsResult",modelProperties:{modelsProperty:{nullable:!0,readOnly:!0,serializedName:"models",type:{name:"Sequence",element:{type:{name:"Composite",className:"ModelDescription"}}}}}}},p={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"}}}}},d={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"}}}}}}},u={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"}}}}},c={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"}}}}},y={serializedName:"ImageUrl",type:{name:"Composite",className:"ImageUrl",modelProperties:{url:{required:!0,serializedName:"url",type:{name:"String"}}}}},N={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"}}}}},g={serializedName:"TextOperationResult",type:{name:"Composite",className:"TextOperationResult",modelProperties:{status:{nullable:!1,serializedName:"status",type:{name:"Enum",allowedValues:["Not Started","Running","Failed","Succeeded"]}},recognitionResult:{serializedName:"recognitionResult",type:{name:"Composite",className:"TextRecognitionResult"}}}}},z={serializedName:"ReadOperationResult",type:{name:"Composite",className:"ReadOperationResult",modelProperties:{status:{nullable:!1,serializedName:"status",type:{name:"Enum",allowedValues:["Not Started","Running","Failed","Succeeded"]}},recognitionResults:{serializedName:"recognitionResults",type:{name:"Sequence",element:{type:{name:"Composite",className:"TextRecognitionResult"}}}}}}},b={serializedName:"recognizetext-headers",type:{name:"Composite",className:"RecognizeTextHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},h={serializedName:"batchreadfile-headers",type:{name:"Composite",className:"BatchReadFileHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},C={serializedName:"recognizetextinstream-headers",type:{name:"Composite",className:"RecognizeTextInStreamHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},P={serializedName:"batchreadfileinstream-headers",type:{name:"Composite",className:"BatchReadFileInStreamHeaders",modelProperties:{operationLocation:{serializedName:"operation-location",type:{name:"String"}}}}},q=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"}},adultScore:{nullable:!1,serializedName:"adultScore",type:{name:"Number"}},racyScore:{nullable:!1,serializedName:"racyScore",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:n,ImageDescription:l,DetectResult:m,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:o,DomainModelResults:p,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:d,TagResult:u,AreaOfInterestResult:c,ImageUrl:y,ComputerVisionError:N,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:g,ReadOperationResult:z,RecognizeTextHeaders:b,BatchReadFileHeaders:h,RecognizeTextInStreamHeaders:C,BatchReadFileInStreamHeaders:P}),f={parameterPath:["options","details"],mapper:{nullable:!0,serializedName:"details",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Celebrities","Landmarks"]}}}},collectionFormat:s.QueryCollectionFormat.Csv},S={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,nullable:!1,serializedName:"height",constraints:{InclusiveMaximum:1024,InclusiveMinimum:1},type:{name:"Number"}}},R={parameterPath:["options","language"],mapper:{nullable:!1,serializedName:"language",defaultValue:"en",type:{name:"String"}}},M={parameterPath:["options","language"],mapper:{nullable:!1,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","maxCandidates"],mapper:{nullable:!0,serializedName:"maxCandidates",defaultValue:1,type:{name:"Number"}}},B={parameterPath:"mode",mapper:{required:!0,serializedName:"mode",type:{name:"Enum",allowedValues:["Handwritten","Printed"]}}},x={parameterPath:"model",mapper:{required:!0,nullable:!0,serializedName:"model",type:{name:"String"}}},D={parameterPath:"operationId",mapper:{required:!0,serializedName:"operationId",type:{name:"String"}}},w={parameterPath:["options","smartCropping"],mapper:{nullable:!0,serializedName:"smartCropping",defaultValue:!1,type:{name:"Boolean"}}},j={parameterPath:["options","visualFeatures"],mapper:{serializedName:"visualFeatures",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["ImageType","Faces","Adult","Categories","Color","Tags","Description","Objects","Brands"]}}}},collectionFormat:s.QueryCollectionFormat.Csv},A={parameterPath:"width",mapper:{required:!0,nullable:!1,serializedName:"width",constraints:{InclusiveMaximum:1024,InclusiveMinimum:1},type:{name:"Number"}}},F=function(n){function e(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={}),!t.userAgent){var i=s.getDefaultUserAgentValue();t.userAgent="@azure/cognitiveservices-computervision/3.2.0 "+i}return(r=n.call(this,e,t)||this).baseUri="{Endpoint}/vision/v2.0",r.requestContentType="application/json; charset=utf-8",r.endpoint=a,r.credentials=e,r}return a(e,n),e}(s.ServiceClient),v=function(r){function e(e,a,t){return r.call(this,e,a,t)||this}return a(e,r),e.prototype.analyzeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},V,t)},e.prototype.describeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},k,t)},e.prototype.detectObjects=function(e,a,t){return this.sendOperationRequest({url:e,options:a},E,t)},e.prototype.listModels=function(e,a){return this.sendOperationRequest({options:e},H,a)},e.prototype.analyzeImageByDomain=function(e,a,t,r){return this.sendOperationRequest({model:e,url:a,options:t},W,r)},e.prototype.recognizePrintedText=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,url:a,options:t},_,r)},e.prototype.tagImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},U,t)},e.prototype.generateThumbnail=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,url:t,options:r},G,i)},e.prototype.getAreaOfInterest=function(e,a,t){return this.sendOperationRequest({url:e,options:a},Q,t)},e.prototype.recognizeText=function(e,a,t,r){return this.sendOperationRequest({mode:e,url:a,options:t},J,r)},e.prototype.getTextOperationResult=function(e,a,t){return this.sendOperationRequest({operationId:e,options:a},K,t)},e.prototype.batchReadFile=function(e,a,t,r){return this.sendOperationRequest({mode:e,url:a,options:t},X,r)},e.prototype.getReadOperationResult=function(e,a,t){return this.sendOperationRequest({operationId:e,options:a},Y,t)},e.prototype.analyzeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},Z,t)},e.prototype.getAreaOfInterestInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},$,t)},e.prototype.describeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ee,t)},e.prototype.detectObjectsInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ae,t)},e.prototype.generateThumbnailInStream=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,image:t,options:r},te,i)},e.prototype.analyzeImageByDomainInStream=function(e,a,t,r){return this.sendOperationRequest({model:e,image:a,options:t},re,r)},e.prototype.recognizePrintedTextInStream=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,image:a,options:t},ie,r)},e.prototype.tagImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ne,t)},e.prototype.recognizeTextInStream=function(e,a,t,r){return this.sendOperationRequest({image:e,mode:a,options:t},se,r)},e.prototype.batchReadFileInStream=function(e,a,t,r){return this.sendOperationRequest({image:e,mode:a,options:t},le,r)},e}(F),L=new s.Serializer(q),V={httpMethod:"POST",path:"analyze",urlParameters:[I],queryParameters:[j,f,R],requestBody:{parameterPath:{url:"url"},mapper:t({},y,{required:!0})},responses:{200:{bodyMapper:n},default:{bodyMapper:N}},serializer:L},k={httpMethod:"POST",path:"describe",urlParameters:[I],queryParameters:[T,R],requestBody:{parameterPath:{url:"url"},mapper:t({},y,{required:!0})},responses:{200:{bodyMapper:l},default:{bodyMapper:N}},serializer:L},E={httpMethod:"POST",path:"detect",urlParameters:[I],requestBody:{parameterPath:{url:"url"},mapper:t({},y,{required:!0})},responses:{200:{bodyMapper:m},default:{bodyMapper:N}},serializer:L},H={httpMethod:"GET",path:"models",urlParameters:[I],responses:{200:{bodyMapper:o},default:{bodyMapper:N}},serializer:L},W={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[I,x],queryParameters:[R],requestBody:{parameterPath:{url:"url"},mapper:t({},y,{required:!0})},responses:{200:{bodyMapper:p},default:{bodyMapper:N}},serializer:L},_={httpMethod:"POST",path:"ocr",urlParameters:[I],queryParameters:[S,M],requestBody:{parameterPath:{url:"url"},mapper:t({},y,{required:!0})},responses:{200:{bodyMapper:d},default:{bodyMapper:N}},serializer:L},U={httpMethod:"POST",path:"tag",urlParameters:[I],queryParameters:[R],requestBody:{parameterPath:{url:"url"},mapper:t({},y,{required:!0})},responses:{200:{bodyMapper:u},default:{bodyMapper:N}},serializer:L},G={httpMethod:"POST",path:"generateThumbnail",urlParameters:[I],queryParameters:[A,O,w],requestBody:{parameterPath:{url:"url"},mapper:t({},y,{required:!0})},responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},default:{}},serializer:L},Q={httpMethod:"POST",path:"areaOfInterest",urlParameters:[I],requestBody:{parameterPath:{url:"url"},mapper:t({},y,{required:!0})},responses:{200:{bodyMapper:c},default:{bodyMapper:N}},serializer:L},J={httpMethod:"POST",path:"recognizeText",urlParameters:[I],queryParameters:[B],requestBody:{parameterPath:{url:"url"},mapper:t({},y,{required:!0})},responses:{202:{headersMapper:b},default:{bodyMapper:N}},serializer:L},K={httpMethod:"GET",path:"textOperations/{operationId}",urlParameters:[I,D],responses:{200:{bodyMapper:g},default:{bodyMapper:N}},serializer:L},X={httpMethod:"POST",path:"read/core/asyncBatchAnalyze",urlParameters:[I],queryParameters:[B],requestBody:{parameterPath:{url:"url"},mapper:t({},y,{required:!0})},responses:{202:{headersMapper:h},default:{bodyMapper:N}},serializer:L},Y={httpMethod:"GET",path:"read/operations/{operationId}",urlParameters:[I,D],responses:{200:{bodyMapper:z},default:{bodyMapper:N}},serializer:L},Z={httpMethod:"POST",path:"analyze",urlParameters:[I],queryParameters:[j,f,R],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:n},default:{bodyMapper:N}},serializer:L},$={httpMethod:"POST",path:"areaOfInterest",urlParameters:[I],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:c},default:{bodyMapper:N}},serializer:L},ee={httpMethod:"POST",path:"describe",urlParameters:[I],queryParameters:[T,R],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:l},default:{bodyMapper:N}},serializer:L},ae={httpMethod:"POST",path:"detect",urlParameters:[I],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:m},default:{bodyMapper:N}},serializer:L},te={httpMethod:"POST",path:"generateThumbnail",urlParameters:[I],queryParameters:[A,O,w],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:L},re={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[I,x],queryParameters:[R],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:p},default:{bodyMapper:N}},serializer:L},ie={httpMethod:"POST",path:"ocr",urlParameters:[I],queryParameters:[S,M],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:d},default:{bodyMapper:N}},serializer:L},ne={httpMethod:"POST",path:"tag",urlParameters:[I],queryParameters:[R],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:u},default:{bodyMapper:N}},serializer:L},se={httpMethod:"POST",path:"recognizeText",urlParameters:[I],queryParameters:[B],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{202:{headersMapper:C},default:{bodyMapper:N}},serializer:L},le={httpMethod:"POST",path:"read/core/asyncBatchAnalyze",urlParameters:[I],queryParameters:[B],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{202:{headersMapper:P},default:{bodyMapper:N}},serializer:L};e.ComputerVisionClient=v,e.ComputerVisionClientContext=F,e.ComputerVisionModels=i,e.ComputerVisionMappers=q,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.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"}},adultScore:{nullable:!1,serializedName:"adultScore",type:{name:"Number"}},racyScore:{nullable:!1,serializedName:"racyScore",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","details"],mapper:{serializedName:"details",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["Celebrities","Landmarks"]}}}},collectionFormat:n.QueryCollectionFormat.Csv},I={parameterPath:"detectOrientation",mapper:{required:!0,serializedName:"detectOrientation",defaultValue:!0,type:{name:"Boolean"}}},O={parameterPath:"endpoint",mapper:{required:!0,serializedName:"Endpoint",defaultValue:"",type:{name:"String"}},skipEncoding:!0},R={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"}}},T={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"]}}},B={parameterPath:["options","maxCandidates"],mapper:{serializedName:"maxCandidates",defaultValue:1,type:{name:"Number"}}},x={parameterPath:"mode",mapper:{required:!0,serializedName:"mode",type:{name:"Enum",allowedValues:["Handwritten","Printed"]}}},D={parameterPath:"model",mapper:{required:!0,serializedName:"model",type:{name:"String"}}},w={parameterPath:"operationId",mapper:{required:!0,serializedName:"operationId",type:{name:"String"}}},j={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"}}},F=(a(L,s=n.ServiceClient),L);function L(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/5.0.0 "+i}return(r=s.call(this,e,t)||this).baseUri="{Endpoint}/vision/v2.0",r.requestContentType="application/json; charset=utf-8",r.endpoint=a,r.credentials=e,r}var V,k=(a(E,V=F),E.prototype.analyzeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},W,t)},E.prototype.describeImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},_,t)},E.prototype.detectObjects=function(e,a,t){return this.sendOperationRequest({url:e,options:a},U,t)},E.prototype.listModels=function(e,a){return this.sendOperationRequest({options:e},G,a)},E.prototype.analyzeImageByDomain=function(e,a,t,r){return this.sendOperationRequest({model:e,url:a,options:t},Q,r)},E.prototype.recognizePrintedText=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,url:a,options:t},J,r)},E.prototype.tagImage=function(e,a,t){return this.sendOperationRequest({url:e,options:a},K,t)},E.prototype.generateThumbnail=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,url:t,options:r},X,i)},E.prototype.getAreaOfInterest=function(e,a,t){return this.sendOperationRequest({url:e,options:a},Y,t)},E.prototype.recognizeText=function(e,a,t,r){return this.sendOperationRequest({mode:e,url:a,options:t},Z,r)},E.prototype.getTextOperationResult=function(e,a,t){return this.sendOperationRequest({operationId:e,options:a},$,t)},E.prototype.batchReadFile=function(e,a,t){return this.sendOperationRequest({url:e,options:a},ee,t)},E.prototype.getReadOperationResult=function(e,a,t){return this.sendOperationRequest({operationId:e,options:a},ae,t)},E.prototype.analyzeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},te,t)},E.prototype.getAreaOfInterestInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},re,t)},E.prototype.describeImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ie,t)},E.prototype.detectObjectsInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},ne,t)},E.prototype.generateThumbnailInStream=function(e,a,t,r,i){return this.sendOperationRequest({width:e,height:a,image:t,options:r},se,i)},E.prototype.analyzeImageByDomainInStream=function(e,a,t,r){return this.sendOperationRequest({model:e,image:a,options:t},me,r)},E.prototype.recognizePrintedTextInStream=function(e,a,t,r){return this.sendOperationRequest({detectOrientation:e,image:a,options:t},le,r)},E.prototype.tagImageInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},oe,t)},E.prototype.recognizeTextInStream=function(e,a,t,r){return this.sendOperationRequest({image:e,mode:a,options:t},pe,r)},E.prototype.batchReadFileInStream=function(e,a,t){return this.sendOperationRequest({image:e,options:a},de,t)},E);function E(e,a,t){return V.call(this,e,a,t)||this}var H=new n.Serializer(f),W={httpMethod:"POST",path:"analyze",urlParameters:[O],queryParameters:[v,S,M],requestBody:{parameterPath:{url:"url"},mapper:t({},N,{required:!0})},responses:{200:{bodyMapper:m},default:{bodyMapper:g}},serializer:H},_={httpMethod:"POST",path:"describe",urlParameters:[O],queryParameters:[B,M],requestBody:{parameterPath:{url:"url"},mapper:t({},N,{required:!0})},responses:{200:{bodyMapper:l},default:{bodyMapper:g}},serializer:H},U={httpMethod:"POST",path:"detect",urlParameters:[O],requestBody:{parameterPath:{url:"url"},mapper:t({},N,{required:!0})},responses:{200:{bodyMapper:o},default:{bodyMapper:g}},serializer:H},G={httpMethod:"GET",path:"models",urlParameters:[O],responses:{200:{bodyMapper:p},default:{bodyMapper:g}},serializer:H},Q={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[O,D],queryParameters:[M],requestBody:{parameterPath:{url:"url"},mapper:t({},N,{required:!0})},responses:{200:{bodyMapper:d},default:{bodyMapper:g}},serializer:H},J={httpMethod:"POST",path:"ocr",urlParameters:[O],queryParameters:[I,T],requestBody:{parameterPath:{url:"url"},mapper:t({},N,{required:!0})},responses:{200:{bodyMapper:u},default:{bodyMapper:g}},serializer:H},K={httpMethod:"POST",path:"tag",urlParameters:[O],queryParameters:[M],requestBody:{parameterPath:{url:"url"},mapper:t({},N,{required:!0})},responses:{200:{bodyMapper:c},default:{bodyMapper:g}},serializer:H},X={httpMethod:"POST",path:"generateThumbnail",urlParameters:[O],queryParameters:[A,R,j],requestBody:{parameterPath:{url:"url"},mapper:t({},N,{required:!0})},responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},default:{}},serializer:H},Y={httpMethod:"POST",path:"areaOfInterest",urlParameters:[O],requestBody:{parameterPath:{url:"url"},mapper:t({},N,{required:!0})},responses:{200:{bodyMapper:y},default:{bodyMapper:g}},serializer:H},Z={httpMethod:"POST",path:"recognizeText",urlParameters:[O],queryParameters:[x],requestBody:{parameterPath:{url:"url"},mapper:t({},N,{required:!0})},responses:{202:{headersMapper:h},default:{bodyMapper:g}},serializer:H},$={httpMethod:"GET",path:"textOperations/{operationId}",urlParameters:[O,w],responses:{200:{bodyMapper:z},default:{bodyMapper:g}},serializer:H},ee={httpMethod:"POST",path:"read/core/asyncBatchAnalyze",urlParameters:[O],requestBody:{parameterPath:{url:"url"},mapper:t({},N,{required:!0})},responses:{202:{headersMapper:C},default:{bodyMapper:g}},serializer:H},ae={httpMethod:"GET",path:"read/operations/{operationId}",urlParameters:[O,w],responses:{200:{bodyMapper:b},default:{bodyMapper:g}},serializer:H},te={httpMethod:"POST",path:"analyze",urlParameters:[O],queryParameters:[v,S,M],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:m},default:{bodyMapper:g}},serializer:H},re={httpMethod:"POST",path:"areaOfInterest",urlParameters:[O],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:y},default:{bodyMapper:g}},serializer:H},ie={httpMethod:"POST",path:"describe",urlParameters:[O],queryParameters:[B,M],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:l},default:{bodyMapper:g}},serializer:H},ne={httpMethod:"POST",path:"detect",urlParameters:[O],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:o},default:{bodyMapper:g}},serializer:H},se={httpMethod:"POST",path:"generateThumbnail",urlParameters:[O],queryParameters:[A,R,j],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},me={httpMethod:"POST",path:"models/{model}/analyze",urlParameters:[O,D],queryParameters:[M],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:d},default:{bodyMapper:g}},serializer:H},le={httpMethod:"POST",path:"ocr",urlParameters:[O],queryParameters:[I,T],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:u},default:{bodyMapper:g}},serializer:H},oe={httpMethod:"POST",path:"tag",urlParameters:[O],queryParameters:[M],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{200:{bodyMapper:c},default:{bodyMapper:g}},serializer:H},pe={httpMethod:"POST",path:"recognizeText",urlParameters:[O],queryParameters:[x],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{202:{headersMapper:P},default:{bodyMapper:g}},serializer:H},de={httpMethod:"POST",path:"read/core/asyncBatchAnalyze",urlParameters:[O],requestBody:{parameterPath:"image",mapper:{required:!0,serializedName:"Image",type:{name:"Stream"}}},contentType:"application/octet-stream",responses:{202:{headersMapper:q},default:{bodyMapper:g}},serializer:H};e.ComputerVisionClient=k,e.ComputerVisionClientContext=F,e.ComputerVisionModels=i,e.ComputerVisionMappers=f,Object.defineProperty(e,"__esModule",{value:!0})});

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

* 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 "Read Operation Result"
* 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.​
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image.

@@ -301,11 +300,9 @@ * @param [options] The optional parameters

*/
batchReadFile(mode: Models.TextRecognitionMode, url: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchReadFileResponse>;
batchReadFile(url: string, options?: msRest.RequestOptionsBase): Promise<Models.BatchReadFileResponse>;
/**
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image.
* @param callback The callback
*/
batchReadFile(mode: Models.TextRecognitionMode, url: string, callback: msRest.ServiceCallback<void>): void;
batchReadFile(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.

@@ -315,7 +312,7 @@ * @param options The optional parameters

*/
batchReadFile(mode: Models.TextRecognitionMode, url: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
batchReadFile(url: string, options: msRest.RequestOptionsBase, 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"
* 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.

@@ -327,3 +324,3 @@ * @param [options] The optional parameters

/**
* @param operationId Id of read operation returned in the response of the "Batch Read File"
* @param operationId Id of read operation returned in the response of the 'Batch Read File'
* interface.

@@ -334,3 +331,3 @@ * @param callback The callback

/**
* @param operationId Id of read operation returned in the response of the "Batch Read File"
* @param operationId Id of read operation returned in the response of the 'Batch Read File'
* interface.

@@ -583,25 +580,22 @@ * @param options The optional parameters

* 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.​
* '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 mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param [options] The optional parameters
* @returns Promise<Models.BatchReadFileInStreamResponse>
*/
batchReadFileInStream(image: msRest.HttpRequestBody, mode: Models.TextRecognitionMode, options?: msRest.RequestOptionsBase): Promise<Models.BatchReadFileInStreamResponse>;
batchReadFileInStream(image: msRest.HttpRequestBody, options?: msRest.RequestOptionsBase): Promise<Models.BatchReadFileInStreamResponse>;
/**
* @param image An image stream.
* @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param callback The callback
*/
batchReadFileInStream(image: msRest.HttpRequestBody, mode: Models.TextRecognitionMode, callback: msRest.ServiceCallback<void>): void;
batchReadFileInStream(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
*/
batchReadFileInStream(image: msRest.HttpRequestBody, mode: Models.TextRecognitionMode, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
batchReadFileInStream(image: msRest.HttpRequestBody, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
}
export { ComputerVisionClient, ComputerVisionClientContext, Models as ComputerVisionModels, Mappers as ComputerVisionMappers };
//# sourceMappingURL=computerVisionClient.d.ts.map

@@ -97,5 +97,4 @@ /*

};
ComputerVisionClient.prototype.batchReadFile = function (mode, url, options, callback) {
ComputerVisionClient.prototype.batchReadFile = function (url, options, callback) {
return this.sendOperationRequest({
mode: mode,
url: url,

@@ -170,6 +169,5 @@ options: options

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

@@ -450,5 +448,2 @@ }, batchReadFileInStreamOperationSpec, callback);

],
queryParameters: [
Parameters.mode
],
requestBody: {

@@ -767,5 +762,2 @@ parameterPath: {

],
queryParameters: [
Parameters.mode
],
requestBody: {

@@ -772,0 +764,0 @@ parameterPath: "image",

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

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

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

@@ -588,3 +588,3 @@ /// <reference types="node" />

/**
* Json object representing a recognized word.
* An object representing a recognized word.
*/

@@ -606,3 +606,3 @@ export interface Word {

/**
* Json object representing a recognized text line.
* An object representing a recognized text line.
*/

@@ -624,3 +624,3 @@ export interface Line {

/**
* Json object representing a recognized text region
* An object representing a recognized text region
*/

@@ -645,4 +645,4 @@ export interface TextRecognitionResult {

/**
* The unit used in the Width, Height and BoundingBox. For images, the unit is "pixel". For PDF,
* the unit is "inch". Possible values include: 'pixel', 'inch'
* The unit used in the Width, Height and BoundingBox. For images, the unit is 'pixel'. For PDF,
* the unit is 'inch'. Possible values include: 'pixel', 'inch'
*/

@@ -660,3 +660,3 @@ unit?: TextRecognitionResultDimensionUnit;

/**
* Status of the text operation. Possible values include: 'Not Started', 'Running', 'Failed',
* Status of the text operation. Possible values include: 'NotStarted', 'Running', 'Failed',
* 'Succeeded'

@@ -675,3 +675,3 @@ */

/**
* Status of the read operation. Possible values include: 'Not Started', 'Running', 'Failed',
* Status of the read operation. Possible values include: 'NotStarted', 'Running', 'Failed',
* 'Succeeded'

@@ -681,3 +681,3 @@ */

/**
* A array of text recognition result of the read operation.
* An array of text recognition result of the read operation.
*/

@@ -919,7 +919,7 @@ recognitionResults?: TextRecognitionResult[];

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

@@ -926,0 +926,0 @@ * Defines values for TextRecognitionResultDimensionUnit.

@@ -1296,3 +1296,3 @@ /*

allowedValues: [
"Not Started",
"NotStarted",
"Running",

@@ -1326,3 +1326,3 @@ "Failed",

allowedValues: [
"Not Started",
"NotStarted",
"Running",

@@ -1329,0 +1329,0 @@ "Failed",

@@ -17,3 +17,2 @@ /*

mapper: {
nullable: true,
serializedName: "details",

@@ -62,3 +61,2 @@ type: {

required: true,
nullable: false,
serializedName: "height",

@@ -80,3 +78,2 @@ constraints: {

mapper: {
nullable: false,
serializedName: "language",

@@ -95,3 +92,2 @@ defaultValue: 'en',

mapper: {
nullable: false,
serializedName: "language",

@@ -139,3 +135,2 @@ defaultValue: 'unk',

mapper: {
nullable: true,
serializedName: "maxCandidates",

@@ -166,3 +161,2 @@ defaultValue: 1,

required: true,
nullable: true,
serializedName: "model",

@@ -190,3 +184,2 @@ type: {

mapper: {
nullable: true,
serializedName: "smartCropping",

@@ -232,3 +225,2 @@ defaultValue: false,

required: true,
nullable: false,
serializedName: "width",

@@ -235,0 +227,0 @@ constraints: {

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

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

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

@@ -29,9 +29,9 @@ },

},
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/cognitiveservices-computervision",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cognitiveservices/cognitiveservices-computervision",
"repository": {
"type": "git",
"url": "https://github.com/azure/azure-sdk-for-js.git"
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/azure/azure-sdk-for-js/issues"
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},

@@ -47,3 +47,3 @@ "files": [

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

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

@@ -95,1 +95,3 @@ ## An isomorphic javascript sdk for - ComputerVisionClient

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/cognitiveservices/cognitiveservices-computervision/README.png)

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

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

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

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