Skip to content

Commit

Permalink
[mgmt] impactreporting release (#32705)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazrael2119 authored Feb 28, 2025
1 parent 7776894 commit 6271ff4
Show file tree
Hide file tree
Showing 104 changed files with 6,799 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,9 @@ sdk/ai/ai-projects @ganeshyb @GraceBrigham
# PRLabel: %Mgmt
/sdk/hybridkubernetes/arm-hybridkubernetes/ @qiaozha @MaryGao

# PRLabel: %Mgmt
/sdk/impactreporting/arm-impactreporting @qiaozha @MaryGao

# PRLabel: %Mgmt
/sdk/informatica/arm-informaticadatamanagement @qiaozha @MaryGao

Expand Down
43 changes: 43 additions & 0 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions eng/ignore-links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ https://docs.microsoft.com/javascript/api/@azure/arm-terraform?view=azure-node-p
https://docs.microsoft.com/javascript/api/@azure/arm-connectedcache?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-neonpostgres?view=azure-node-preview
https://learn.microsoft.com/javascript/api/@azure/arm-pineconevectordb?view=azure-node-preview
https://learn.microsoft.com/javascript/api/@azure/arm-impactreporting?view=azure-node-preview
13 changes: 11 additions & 2 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,9 @@
"projectFolder": "common/tools/dev-tool",
"versionPolicyName": "utility",
// Add Identity to decoupledLocalDependencies so that dev-tool uses the package from npm, avoiding a cyclic dependency.
"decoupledLocalDependencies": ["@azure/identity"]
"decoupledLocalDependencies": [
"@azure/identity"
]
},
{
"packageName": "@azure/eventgrid",
Expand Down Expand Up @@ -600,7 +602,9 @@
{
"packageName": "@azure/identity",
"projectFolder": "sdk/identity/identity",
"decoupledLocalDependencies": ["@azure/keyvault-keys"],
"decoupledLocalDependencies": [
"@azure/keyvault-keys"
],
"versionPolicyName": "client"
},
{
Expand Down Expand Up @@ -2313,6 +2317,11 @@
"projectFolder": "sdk/ai/ai-projects",
"versionPolicyName": "client"
},
{
"packageName": "@azure/arm-impactreporting",
"projectFolder": "sdk/impactreporting/arm-impactreporting",
"versionPolicyName": "management"
},
{
"packageName": "@azure/arm-pineconevectordb",
"projectFolder": "sdk/pineconevectordb/arm-pineconevectordb",
Expand Down
7 changes: 7 additions & 0 deletions sdk/impactreporting/arm-impactreporting/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Release History

## 1.0.0-beta.1 (2025-02-20)

### Features Added

Initial release of the Azure Impact Reporting package
21 changes: 21 additions & 0 deletions sdk/impactreporting/arm-impactreporting/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.
115 changes: 115 additions & 0 deletions sdk/impactreporting/arm-impactreporting/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Azure Impact client library for JavaScript

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Impact client.



Key links:

- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/impactreporting/arm-impactreporting)
- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-impactreporting)
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-impactreporting?view=azure-node-preview)
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/impactreporting/arm-impactreporting/samples)

## Getting started

### Currently supported environments

- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
- Latest versions of Safari, Chrome, Edge and Firefox.

See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.

### Prerequisites

- An [Azure subscription][azure_sub].

### Install the `@azure/arm-impactreporting` package

Install the Azure Impact client library for JavaScript with `npm`:

```bash
npm install @azure/arm-impactreporting
```

### Create and authenticate a `ImpactClient`

To create a client object to access the Azure Impact API, you will need the `endpoint` of your Azure Impact resource and a `credential`. The Azure Impact client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure Impact resource in the [Azure Portal][azure_portal].

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).

To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:

```bash
npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure Impact** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).

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).

Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.

```ts snippet:ReadmeSampleCreateClient_Node
import { ImpactClient } from "../src/index.js";
import { DefaultAzureCredential } from "@azure/identity";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ImpactClient(new DefaultAzureCredential(), subscriptionId);
```

For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.

```ts snippet:ReadmeSampleCreateClient_Browser
import { InteractiveBrowserCredential } from "@azure/identity";
import { ImpactClient } from "../src/index.js";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
const client = new ImpactClient(credential, subscriptionId);
```


### JavaScript Bundle
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).

## Key concepts

### ImpactClient

`ImpactClient` is the primary interface for developers using the Azure Impact client library. Explore the methods on this client object to understand the different features of the Azure Impact service that you can access.

## Troubleshooting

### Logging

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`:

```ts snippet:SetLogLevel
import { setLogLevel } from "@azure/logger";

setLogLevel("info");
```

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).

## Next steps

Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/impactreporting/arm-impactreporting/samples) directory for detailed examples on how to use this library.

## Contributing

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.

## Related projects

- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)

[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
31 changes: 31 additions & 0 deletions sdk/impactreporting/arm-impactreporting/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "dist/esm/index.d.ts",
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "dist/arm-impactreporting.d.ts"
},
"messages": {
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
6 changes: 6 additions & 0 deletions sdk/impactreporting/arm-impactreporting/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/impactreporting/arm-impactreporting",
"Tag": "js/impactreporting/arm-impactreporting_44838c8b79"
}
16 changes: 16 additions & 0 deletions sdk/impactreporting/arm-impactreporting/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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-apiextractor-json-types": "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-module": "off",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn",
},
},
]);
Loading

0 comments on commit 6271ff4

Please sign in to comment.