Skip to content

[AutoPR @azure-rest/ai-vision-image-analysis] Test js generation #14722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 50 additions & 125 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

20 changes: 3 additions & 17 deletions sdk/vision/ai-vision-image-analysis-rest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
# Release History

## 1.0.0 (2024-10-18)

### Other Changes
Stable Release.

## 1.0.0-beta.3 (2024-07-18)

## 1.0.0 (2025-04-21)

### Features Added
Added EntraID support to client.

## 1.0.0-beta.2 (2024-02-14)

### Breaking Changes
The type names for AnalyzeFromBuffer* have changed to AnalyzeFromImageData*

## 1.0.0-beta.1 (2024-01-09)

### Features Added
Initial release of Image Analysis SDK. Uses the generally available [Computer Vision REST API (2023-10-01)](https://eastus.dev.cognitive.microsoft.com/docs/services/Cognitive_Services_Unified_Vision_API_2023-10-01).
The package of @azure-rest/ai-vision-image-analysis is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
21 changes: 21 additions & 0 deletions sdk/vision/ai-vision-image-analysis-rest/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright (c) Microsoft Corporation.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
314 changes: 18 additions & 296 deletions sdk/vision/ai-vision-image-analysis-rest/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
}
}
}
}
}
6 changes: 0 additions & 6 deletions sdk/vision/ai-vision-image-analysis-rest/assets.json

This file was deleted.

14 changes: 14 additions & 0 deletions sdk/vision/ai-vision-image-analysis-rest/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn",
},
},
]);
140 changes: 69 additions & 71 deletions sdk/vision/ai-vision-image-analysis-rest/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
{
"name": "@azure-rest/ai-vision-image-analysis",
"sdk-type": "client",
"author": "Microsoft Corporation",
"version": "1.0.0",
"description": "undefined",
"description": "A generated SDK for ImageAnalysisClient.",
"engines": {
"node": ">=18.0.0"
},
"sideEffects": false,
"autoPublish": false,
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
},
"dialects": [
"esm",
"commonjs"
],
"esmDialects": [
"browser",
"react-native"
],
"selfLink": false,
"project": "./tsconfig.src.json"
},
"type": "module",
"keywords": [
"node",
"azure",
Expand All @@ -12,55 +32,32 @@
"browser",
"isomorphic"
],
"author": "Microsoft Corporation",
"license": "MIT",
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/commonjs/index.d.ts",
"repository": "github:Azure/azure-sdk-for-js",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/vision/ai-vision-image-analysis-rest/README.md",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/",
"README.md",
"LICENSE",
"review/",
"CHANGELOG.md"
"LICENSE"
],
"engines": {
"node": ">=18.0.0"
"sdk-type": "client",
"repository": "github:Azure/azure-sdk-for-js",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"build:samples": "echo skipped.",
"build:test": "echo skipped.",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",
"extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
"generate:client": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"integration-test:node": "dev-tool run test:vitest --esm",
"lint": "eslint package.json api-extractor.json src test",
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"pack": "npm pack 2>&1",
"test": "npm run clean && npm run build:test && npm run unit-test",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "dev-tool run update-snippets"
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/vision/ai-vision-image-analysis-rest/README.md",
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
"//metadata": {
"constantPaths": [
{
"path": "src/imageAnalysisClient.ts",
"prefix": "userAgentInfo"
}
]
},
"sideEffects": false,
"autoPublish": false,
"dependencies": {
"@azure-rest/core-client": "^2.3.1",
"@azure/core-auth": "^1.9.0",
"@azure/core-rest-pipeline": "^1.19.0",
"@azure/core-rest-pipeline": "^1.19.1",
"@azure/logger": "^1.1.4",
"tslib": "^2.8.1"
},
Expand All @@ -70,43 +67,43 @@
"@azure-tools/test-utils-vitest": "^1.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/identity": "^4.7.0",
"@azure/identity": "^4.9.0",
"@types/node": "^18.0.0",
"@vitest/browser": "^3.0.9",
"@vitest/coverage-istanbul": "^3.0.9",
"autorest": "latest",
"dotenv": "^16.0.0",
"eslint": "^9.9.0",
"playwright": "^1.50.1",
"playwright": "^1.52.0",
"typescript": "~5.8.2",
"vitest": "^3.0.9"
},
"//metadata": {
"constantPaths": [
{
"path": "src/imageAnalysisClient.ts",
"prefix": "userAgentInfo"
}
]
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"build:samples": "echo skipped",
"build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",
"extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
"generate:client": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"lint": "eslint package.json api-extractor.json src test",
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"pack": "npm pack 2>&1",
"test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
"test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "dev-tool run update-snippets"
},
"browser": "./dist/browser/index.js",
"type": "module",
"tshy": {
"project": "./tsconfig.src.json",
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
},
"dialects": [
"esm",
"commonjs"
],
"esmDialects": [
"browser",
"react-native"
],
"selfLink": false
},
"react-native": "./dist/react-native/index.js",
"exports": {
"./package.json": "./package.json",
".": {
Expand All @@ -128,5 +125,6 @@
}
}
},
"react-native": "./dist/react-native/index.js"
}
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ export interface AnalyzeFromImageDataDefaultResponse extends HttpResponse {
status: string;
}

// @public
export interface AnalyzeFromImageDataFeaturesQueryParam {
explode: false;
style: "form";
value: VisualFeatures[];
}

// @public (undocumented)
export interface AnalyzeFromImageDataMediaTypesParam {
contentType: "application/octet-stream";
Expand All @@ -66,11 +73,18 @@ export interface AnalyzeFromImageDataQueryParam {
export interface AnalyzeFromImageDataQueryParamProperties {
"gender-neutral-caption"?: boolean;
"model-version"?: string;
"smartcrops-aspect-ratios"?: number[];
features: VisualFeatures[];
"smartcrops-aspect-ratios"?: number[] | AnalyzeFromImageDataSmartcropsAspectRatiosQueryParam;
features: VisualFeatures[] | AnalyzeFromImageDataFeaturesQueryParam;
language?: string;
}

// @public
export interface AnalyzeFromImageDataSmartcropsAspectRatiosQueryParam {
explode: false;
style: "form";
value: number[];
}

// @public
export interface AnalyzeFromUrl200Response extends HttpResponse {
// (undocumented)
Expand Down Expand Up @@ -99,6 +113,13 @@ export interface AnalyzeFromUrlDefaultResponse extends HttpResponse {
status: string;
}

// @public
export interface AnalyzeFromUrlFeaturesQueryParam {
explode: false;
style: "form";
value: VisualFeatures[];
}

// @public (undocumented)
export interface AnalyzeFromUrlMediaTypesParam {
contentType: "application/json";
Expand All @@ -117,11 +138,18 @@ export interface AnalyzeFromUrlQueryParam {
export interface AnalyzeFromUrlQueryParamProperties {
"gender-neutral-caption"?: boolean;
"model-version"?: string;
"smartcrops-aspect-ratios"?: number[];
features: VisualFeatures[];
"smartcrops-aspect-ratios"?: number[] | AnalyzeFromUrlSmartcropsAspectRatiosQueryParam;
features: VisualFeatures[] | AnalyzeFromUrlFeaturesQueryParam;
language?: string;
}

// @public
export interface AnalyzeFromUrlSmartcropsAspectRatiosQueryParam {
explode: false;
style: "form";
value: number[];
}

// @public
export interface CaptionResultOutput {
confidence: number;
Expand Down
Loading