Skip to content

Commit c962449

Browse files
author
SDKAuto
committed
CodeGen from PR 3214 in test-repo-billy/azure-rest-api-specs
Merge 74194010981b772ab04c04845b3aeee426fcab86 into 3430f822fc0e515e7215a4f50db1fd69f54788af
1 parent ba8ca02 commit c962449

26 files changed

+4287
-31
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 171 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rush.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* This is the main configuration file for Rush.
33
* For full documentation, please see https://rushjs.io
4-
*/ {
4+
*/{
55
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
66
/**
77
* (Required) This specifies the version of the Rush engine to be used in this repo.
@@ -2145,6 +2145,11 @@
21452145
"packageName": "@azure/arm-playwrighttesting",
21462146
"projectFolder": "sdk/playwrighttesting/arm-playwrighttesting",
21472147
"versionPolicyName": "management"
2148+
},
2149+
{
2150+
"packageName": "@azure-rest/health-insights-radiologyinsights",
2151+
"projectFolder": "sdk/healthinsights/azurehealthinsightsradiologyinsights-rest",
2152+
"versionPolicyName": "client"
21482153
}
21492154
]
2150-
}
2155+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"plugins": ["@azure/azure-sdk"],
3+
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"],
4+
"rules": {
5+
"@azure/azure-sdk/ts-modules-only-named": "warn",
6+
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
7+
"@azure/azure-sdk/ts-package-json-types": "warn",
8+
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
9+
"tsdoc/syntax": "warn"
10+
}
11+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.0.0-beta.1 (2024-02-10)
2+
3+
- Initial Release
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# AzureHealthInsights REST client library for JavaScript
2+
3+
Azure AI Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that perform analysis and provide inferences to be used by a human.
4+
5+
**Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library**
6+
7+
Key links:
8+
9+
- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest)
10+
- [Package (NPM)](https://www.npmjs.com/package/@azure-rest/health-insights-radiologyinsights)
11+
- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure-rest/health-insights-radiologyinsights?view=azure-node-preview)
12+
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/samples)
13+
14+
## Getting started
15+
16+
### Currently supported environments
17+
18+
- LTS versions of Node.js
19+
20+
### Prerequisites
21+
22+
- You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package.
23+
24+
### Install the `@azure-rest/health-insights-radiologyinsights` package
25+
26+
Install the AzureHealthInsights REST client REST client library for JavaScript with `npm`:
27+
28+
```bash
29+
npm install @azure-rest/health-insights-radiologyinsights
30+
```
31+
32+
### Create and authenticate a `AzureHealthInsightsClient`
33+
34+
To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token),
35+
provide an instance of the desired credential type obtained from the
36+
[@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library.
37+
38+
To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)
39+
40+
After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use.
41+
As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
42+
can be used to authenticate the client.
43+
44+
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
45+
AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
46+
47+
## Troubleshooting
48+
49+
### Logging
50+
51+
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
52+
53+
```javascript
54+
const { setLogLevel } = require("@azure/logger");
55+
56+
setLogLevel("info");
57+
```
58+
59+
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3+
"mainEntryPointFilePath": "./types/src/index.d.ts",
4+
"docModel": {
5+
"enabled": true
6+
},
7+
"apiReport": {
8+
"enabled": true,
9+
"reportFolder": "./review"
10+
},
11+
"dtsRollup": {
12+
"enabled": true,
13+
"untrimmedFilePath": "",
14+
"publicTrimmedFilePath": "./types/health-insights-radiologyinsights.d.ts"
15+
},
16+
"messages": {
17+
"tsdocMessageReporting": {
18+
"default": {
19+
"logLevel": "none"
20+
}
21+
},
22+
"extractorMessageReporting": {
23+
"ae-missing-release-tag": {
24+
"logLevel": "none"
25+
},
26+
"ae-unresolved-link": {
27+
"logLevel": "none"
28+
}
29+
}
30+
}
31+
}
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT license.
3+
4+
// https://github.com/karma-runner/karma-chrome-launcher
5+
process.env.CHROME_BIN = require("puppeteer").executablePath();
6+
require("dotenv").config();
7+
const { relativeRecordingsPath } = require("@azure-tools/test-recorder");
8+
process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath();
9+
10+
module.exports = function (config) {
11+
config.set({
12+
// base path that will be used to resolve all patterns (eg. files, exclude)
13+
basePath: "./",
14+
15+
// frameworks to use
16+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
17+
frameworks: ["source-map-support", "mocha"],
18+
19+
plugins: [
20+
"karma-mocha",
21+
"karma-mocha-reporter",
22+
"karma-chrome-launcher",
23+
"karma-firefox-launcher",
24+
"karma-env-preprocessor",
25+
"karma-coverage",
26+
"karma-sourcemap-loader",
27+
"karma-junit-reporter",
28+
"karma-source-map-support",
29+
],
30+
31+
// list of files / patterns to load in the browser
32+
files: [
33+
"dist-test/index.browser.js",
34+
{
35+
pattern: "dist-test/index.browser.js.map",
36+
type: "html",
37+
included: false,
38+
served: true,
39+
},
40+
],
41+
42+
// list of files / patterns to exclude
43+
exclude: [],
44+
45+
// preprocess matching files before serving them to the browser
46+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
47+
preprocessors: {
48+
"**/*.js": ["sourcemap", "env"],
49+
// IMPORTANT: COMMENT following line if you want to debug in your browsers!!
50+
// Preprocess source file to calculate code coverage, however this will make source file unreadable
51+
// "dist-test/index.js": ["coverage"]
52+
},
53+
54+
envPreprocessor: [
55+
"TEST_MODE",
56+
"ENDPOINT",
57+
"AZURE_CLIENT_SECRET",
58+
"AZURE_CLIENT_ID",
59+
"AZURE_TENANT_ID",
60+
"SUBSCRIPTION_ID",
61+
"RECORDINGS_RELATIVE_PATH",
62+
],
63+
64+
// test results reporter to use
65+
// possible values: 'dots', 'progress'
66+
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
67+
reporters: ["mocha", "coverage", "junit"],
68+
69+
coverageReporter: {
70+
// specify a common output directory
71+
dir: "coverage-browser/",
72+
reporters: [
73+
{ type: "json", subdir: ".", file: "coverage.json" },
74+
{ type: "lcovonly", subdir: ".", file: "lcov.info" },
75+
{ type: "html", subdir: "html" },
76+
{ type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" },
77+
],
78+
},
79+
80+
junitReporter: {
81+
outputDir: "", // results will be saved as $outputDir/$browserName.xml
82+
outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile
83+
suite: "", // suite will become the package name attribute in xml testsuite element
84+
useBrowserName: false, // add browser name to report and classes names
85+
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
86+
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
87+
properties: {}, // key value pair of properties to add to the <properties> section of the report
88+
},
89+
90+
// web server port
91+
port: 9876,
92+
93+
// enable / disable colors in the output (reporters and logs)
94+
colors: true,
95+
96+
// level of logging
97+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
98+
logLevel: config.LOG_INFO,
99+
100+
// enable / disable watching file and executing tests whenever any file changes
101+
autoWatch: false,
102+
103+
// --no-sandbox allows our tests to run in Linux without having to change the system.
104+
// --disable-web-security allows us to authenticate from the browser without having to write tests using interactive auth, which would be far more complex.
105+
browsers: ["ChromeHeadlessNoSandbox"],
106+
customLaunchers: {
107+
ChromeHeadlessNoSandbox: {
108+
base: "ChromeHeadless",
109+
flags: ["--no-sandbox", "--disable-web-security"],
110+
},
111+
},
112+
113+
// Continuous Integration mode
114+
// if true, Karma captures browsers, runs the tests and exits
115+
singleRun: false,
116+
117+
// Concurrency level
118+
// how many browser should be started simultaneous
119+
concurrency: 1,
120+
121+
browserNoActivityTimeout: 60000000,
122+
browserDisconnectTimeout: 10000,
123+
browserDisconnectTolerance: 3,
124+
125+
client: {
126+
mocha: {
127+
// change Karma's debug.html to the mocha web reporter
128+
reporter: "html",
129+
timeout: "600000",
130+
},
131+
},
132+
});
133+
};
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
{
2+
"name": "@azure-rest/health-insights-radiologyinsights",
3+
"sdk-type": "client",
4+
"author": "Microsoft Corporation",
5+
"version": "1.0.0-beta.1",
6+
"description": "undefined",
7+
"keywords": [
8+
"node",
9+
"azure",
10+
"cloud",
11+
"typescript",
12+
"browser",
13+
"isomorphic"
14+
],
15+
"license": "MIT",
16+
"main": "dist/index.js",
17+
"module": "./dist-esm/src/index.js",
18+
"types": "./types/health-insights-radiologyinsights.d.ts",
19+
"repository": "github:Azure/azure-sdk-for-js",
20+
"bugs": {
21+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
22+
},
23+
"files": [
24+
"dist/",
25+
"dist-esm/src/",
26+
"types/health-insights-radiologyinsights.d.ts",
27+
"README.md",
28+
"LICENSE",
29+
"review/*"
30+
],
31+
"engines": {
32+
"node": ">=16.0.0"
33+
},
34+
"scripts": {
35+
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
36+
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
37+
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
38+
"build:samples": "echo skipped.",
39+
"build:test": "tsc -p . && dev-tool run bundle",
40+
"build:debug": "tsc -p . && dev-tool run bundle && api-extractor run --local",
41+
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
42+
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
43+
"execute:samples": "echo skipped",
44+
"extract-api": "rimraf review && mkdirp ./review && api-extractor run --local",
45+
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
46+
"generate:client": "echo skipped",
47+
"integration-test:browser": "dev-tool run test:browser",
48+
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
49+
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
50+
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
51+
"lint": "eslint package.json api-extractor.json src test --ext .ts",
52+
"pack": "npm pack 2>&1",
53+
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
54+
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
55+
"test": "npm run clean && npm run build:test && npm run unit-test",
56+
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
57+
"unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 --exclude 'test/**/browser/*.spec.ts' 'test/**/*.spec.ts'",
58+
"unit-test:browser": "dev-tool run test:browser",
59+
"build": "npm run clean && tsc -p . && dev-tool run bundle && mkdirp ./review && api-extractor run --local"
60+
},
61+
"sideEffects": false,
62+
"autoPublish": false,
63+
"dependencies": {
64+
"@azure/core-auth": "^1.3.0",
65+
"@azure-rest/core-client": "^1.1.4",
66+
"@azure/core-rest-pipeline": "^1.12.0",
67+
"@azure/logger": "^1.0.0",
68+
"tslib": "^2.2.0",
69+
"@azure/core-lro": "^2.5.4",
70+
"@azure/abort-controller": "^1.0.0"
71+
},
72+
"devDependencies": {
73+
"@microsoft/api-extractor": "^7.31.1",
74+
"autorest": "latest",
75+
"@types/node": "^16.0.0",
76+
"dotenv": "^16.0.0",
77+
"eslint": "^8.0.0",
78+
"mkdirp": "^2.1.2",
79+
"prettier": "^2.5.1",
80+
"rimraf": "^5.0.0",
81+
"source-map-support": "^0.5.9",
82+
"typescript": "~5.0.0",
83+
"@azure/dev-tool": "^1.0.0",
84+
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
85+
"@azure-tools/test-credential": "^1.0.0",
86+
"@azure/identity": "^3.3.0",
87+
"@azure-tools/test-recorder": "^3.0.0",
88+
"mocha": "^10.0.0",
89+
"esm": "^3.2.18",
90+
"@types/mocha": "^10.0.0",
91+
"mocha-junit-reporter": "^1.18.0",
92+
"cross-env": "^7.0.2",
93+
"@types/chai": "^4.2.8",
94+
"chai": "^4.2.0",
95+
"karma-chrome-launcher": "^3.0.0",
96+
"karma-coverage": "^2.0.0",
97+
"karma-env-preprocessor": "^0.1.1",
98+
"karma-firefox-launcher": "^2.1.2",
99+
"karma-junit-reporter": "^2.0.1",
100+
"karma-mocha-reporter": "^2.2.5",
101+
"karma-mocha": "^2.0.1",
102+
"karma-source-map-support": "~1.4.0",
103+
"karma-sourcemap-loader": "^0.4.0",
104+
"karma": "^6.2.0",
105+
"nyc": "^15.0.0",
106+
"ts-node": "^10.0.0"
107+
},
108+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/README.md",
109+
"//metadata": {
110+
"constantPaths": [
111+
{
112+
"path": "src/azureHealthInsightsClient.ts",
113+
"prefix": "userAgentInfo"
114+
}
115+
]
116+
},
117+
"browser": {
118+
"./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js"
119+
}
120+
}

0 commit comments

Comments
 (0)