Skip to content

Commit 379d55d

Browse files
author
SDKAuto
committed
CodeGen from PR 32359 in Azure/azure-rest-api-specs
Merge 032bdd53f7dfa81da52fd8d19fc821dfded55af9 into f6848c909282e981f186df3c3b27f6d5ec5864d2
1 parent 0f3bde6 commit 379d55d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+22732
-33
lines changed

common/config/rush/pnpm-lock.yaml

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

rush.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,6 +2331,11 @@
23312331
"packageName": "@azure/arm-databasewatcher",
23322332
"projectFolder": "sdk/databasewatcher/arm-databasewatcher",
23332333
"versionPolicyName": "management"
2334+
},
2335+
{
2336+
"packageName": "@azure/arm-mission",
2337+
"projectFolder": "sdk/mission/arm-mission",
2338+
"versionPolicyName": "management"
23342339
}
23352340
]
23362341
}

sdk/core/core-rest-pipeline/review/core-rest-pipeline.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,9 @@ export type RequestBodyType = NodeJS.ReadableStream | (() => NodeJS.ReadableStre
375375

376376
// @public
377377
export class RestError extends Error {
378+
// Warning: (ae-forgotten-export) The symbol "custom" needs to be exported by the entry point index.d.ts
379+
[custom]: () => string;
378380
constructor(message: string, options?: RestErrorOptions);
379-
// (undocumented)
380-
[x: symbol]: () => string;
381381
code?: string;
382382
details?: unknown;
383383
static readonly PARSE_ERROR: string;

sdk/mission/arm-mission/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (2025-03-09)
4+
5+
### Features Added
6+
7+
The package of @azure/arm-mission is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).

sdk/mission/arm-mission/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) Microsoft Corporation.
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

sdk/mission/arm-mission/README.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Azure mission client library for JavaScript
2+
3+
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure mission client.
4+
5+
Microsoft Mission Resource Provider management API.
6+
7+
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mission/arm-mission) |
8+
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-mission) |
9+
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-mission?view=azure-node-preview) |
10+
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
11+
12+
## Getting started
13+
14+
### Currently supported environments
15+
16+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
17+
- Latest versions of Safari, Chrome, Edge and Firefox.
18+
19+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
20+
21+
### Prerequisites
22+
23+
- An [Azure subscription][azure_sub].
24+
25+
### Install the `@azure/arm-mission` package
26+
27+
Install the Azure mission client library for JavaScript with `npm`:
28+
29+
```bash
30+
npm install @azure/arm-mission
31+
```
32+
33+
### Create and authenticate a `MissionClient`
34+
35+
To create a client object to access the Azure mission API, you will need the `endpoint` of your Azure mission resource and a `credential`. The Azure mission client can use Azure Active Directory credentials to authenticate.
36+
You can find the endpoint for your Azure mission resource in the [Azure Portal][azure_portal].
37+
38+
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
39+
40+
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
41+
42+
```bash
43+
npm install @azure/identity
44+
```
45+
46+
You will also need to **register a new AAD application and grant access to Azure mission** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
47+
48+
For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
49+
50+
Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.
51+
52+
```ts snippet:ReadmeSampleCreateClient_Node
53+
import { MissionClient } from "@azure/arm-mission";
54+
import { DefaultAzureCredential } from "@azure/identity";
55+
56+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
57+
const client = new MissionClient(new DefaultAzureCredential(), subscriptionId);
58+
```
59+
60+
For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
61+
62+
```ts snippet:ReadmeSampleCreateClient_Browser
63+
import { InteractiveBrowserCredential } from "@azure/identity";
64+
import { MissionClient } from "@azure/arm-mission";
65+
66+
const credential = new InteractiveBrowserCredential({
67+
tenantId: "<YOUR_TENANT_ID>",
68+
clientId: "<YOUR_CLIENT_ID>"
69+
});
70+
const client = new MissionClient(credential, subscriptionId);
71+
```
72+
73+
### JavaScript Bundle
74+
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
75+
76+
## Key concepts
77+
78+
### MissionClient
79+
80+
`MissionClient` is the primary interface for developers using the Azure mission client library. Explore the methods on this client object to understand the different features of the Azure mission service that you can access.
81+
82+
## Troubleshooting
83+
84+
### Logging
85+
86+
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`:
87+
88+
```ts snippet:SetLogLevel
89+
import { setLogLevel } from "@azure/logger";
90+
91+
setLogLevel("info");
92+
```
93+
94+
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).
95+
96+
## Next steps
97+
98+
Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
99+
100+
## Contributing
101+
102+
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
103+
104+
## Related projects
105+
106+
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
107+
108+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmission%2Farm-mission%2FREADME.png)
109+
110+
[azure_cli]: https://learn.microsoft.com/cli/azure
111+
[azure_sub]: https://azure.microsoft.com/free/
112+
[azure_sub]: https://azure.microsoft.com/free/
113+
[azure_portal]: https://portal.azure.com
114+
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
115+
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential

sdk/mission/arm-mission/_meta.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"commit": "a301d9dd826328ebc5a223790c3c7dffc8dfdecb",
3+
"readme": "specification/mission/resource-manager/readme.md",
4+
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/mission/resource-manager/readme.md --use=@autorest/typescript@^6.0.12",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6+
"release_tool": "@azure-tools/[email protected]",
7+
"use": "@autorest/typescript@^6.0.12"
8+
}
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": "./dist-esm/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/arm-mission.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+
}

sdk/mission/arm-mission/package.json

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
{
2+
"name": "@azure/arm-mission",
3+
"sdk-type": "mgmt",
4+
"author": "Microsoft Corporation",
5+
"description": "A generated SDK for MissionClient.",
6+
"version": "1.0.0-beta.1",
7+
"engines": {
8+
"node": ">=18.0.0"
9+
},
10+
"dependencies": {
11+
"@azure/abort-controller": "^2.1.2",
12+
"@azure/core-auth": "^1.9.0",
13+
"@azure/core-client": "^1.9.3",
14+
"@azure/core-lro": "^2.5.4",
15+
"@azure/core-paging": "^1.6.2",
16+
"@azure/core-rest-pipeline": "^1.19.1",
17+
"tslib": "^2.8.1"
18+
},
19+
"keywords": [
20+
"node",
21+
"azure",
22+
"typescript",
23+
"browser",
24+
"isomorphic"
25+
],
26+
"license": "MIT",
27+
"main": "./dist/commonjs/index.js",
28+
"module": "./dist-esm/src/index.js",
29+
"types": "./dist/commonjs/index.d.ts",
30+
"devDependencies": {
31+
"@azure-tools/test-credential": "^2.0.0",
32+
"@azure-tools/test-recorder": "^4.1.0",
33+
"@azure-tools/test-utils-vitest": "^1.0.0",
34+
"@azure/dev-tool": "^1.0.0",
35+
"@azure/identity": "^4.7.0",
36+
"@azure/logger": "^1.1.4",
37+
"@types/node": "^18.0.0",
38+
"@vitest/browser": "^3.0.6",
39+
"@vitest/coverage-istanbul": "^3.0.6",
40+
"dotenv": "^16.0.0",
41+
"playwright": "^1.51.0",
42+
"typescript": "~5.6.2",
43+
"vitest": "^3.0.6"
44+
},
45+
"repository": {
46+
"type": "git",
47+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
48+
},
49+
"bugs": {
50+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
51+
},
52+
"files": [
53+
"dist/",
54+
"README.md",
55+
"LICENSE",
56+
"review/",
57+
"CHANGELOG.md"
58+
],
59+
"scripts": {
60+
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
61+
"build:browser": "echo skipped",
62+
"build:node": "echo skipped",
63+
"build:samples": "echo skipped.",
64+
"build:test": "echo skipped",
65+
"check-format": "echo skipped",
66+
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
67+
"execute:samples": "echo skipped",
68+
"extract-api": "dev-tool run extract-api",
69+
"format": "echo skipped",
70+
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
71+
"integration-test:browser": "echo skipped",
72+
"integration-test:node": "dev-tool run test:vitest --esm",
73+
"lint": "echo skipped",
74+
"minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
75+
"pack": "npm pack 2>&1",
76+
"prepack": "npm run build",
77+
"test": "npm run integration-test",
78+
"test:browser": "echo skipped",
79+
"test:node": "echo skipped",
80+
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
81+
"unit-test:browser": "echo skipped",
82+
"unit-test:node": "dev-tool run test:vitest",
83+
"update-snippets": "dev-tool run update-snippets"
84+
},
85+
"sideEffects": false,
86+
"//metadata": {
87+
"constantPaths": [
88+
{
89+
"path": "src/missionClient.ts",
90+
"prefix": "packageDetails"
91+
}
92+
]
93+
},
94+
"autoPublish": true,
95+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mission/arm-mission",
96+
"type": "module",
97+
"tshy": {
98+
"project": "./tsconfig.src.json",
99+
"exports": {
100+
"./package.json": "./package.json",
101+
".": "./src/index.ts"
102+
},
103+
"dialects": [
104+
"esm",
105+
"commonjs"
106+
],
107+
"esmDialects": [
108+
"browser",
109+
"react-native"
110+
],
111+
"selfLink": false
112+
},
113+
"browser": "./dist/browser/index.js",
114+
"react-native": "./dist/react-native/index.js",
115+
"exports": {
116+
"./package.json": "./package.json",
117+
".": {
118+
"browser": {
119+
"types": "./dist/browser/index.d.ts",
120+
"default": "./dist/browser/index.js"
121+
},
122+
"react-native": {
123+
"types": "./dist/react-native/index.d.ts",
124+
"default": "./dist/react-native/index.js"
125+
},
126+
"import": {
127+
"types": "./dist/esm/index.d.ts",
128+
"default": "./dist/esm/index.js"
129+
},
130+
"require": {
131+
"types": "./dist/commonjs/index.d.ts",
132+
"default": "./dist/commonjs/index.js"
133+
}
134+
}
135+
}
136+
}

0 commit comments

Comments
 (0)