Skip to content
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

[mgmt] impactreporting release #32705

Merged
merged 33 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
fa7cf64
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Jan 24, 2025
2fa6684
Migration: Update test config
kazrael2119 Jan 24, 2025
8ac53c9
Migration: Clean up files
kazrael2119 Jan 24, 2025
bbb1ac0
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Jan 24, 2025
a3feafa
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Jan 24, 2025
f9ae67a
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Jan 24, 2025
0d0ecc0
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Jan 24, 2025
481ff12
Migration: Apply codemod: "addViHelper"
kazrael2119 Jan 24, 2025
4a566bb
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Jan 24, 2025
19042f3
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Jan 24, 2025
be28d7d
Migration: rushx format
kazrael2119 Jan 24, 2025
c958d1c
update
kazrael2119 Jan 24, 2025
bfe5aa3
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Feb 20, 2025
1237c11
Migration: Update test config
kazrael2119 Feb 20, 2025
96b3c96
Migration: Clean up files
kazrael2119 Feb 20, 2025
ef4a0b8
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Feb 20, 2025
b391a23
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Feb 20, 2025
9fd245a
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Feb 20, 2025
efceab4
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Feb 20, 2025
6f371e6
Migration: Apply codemod: "addViHelper"
kazrael2119 Feb 20, 2025
2c79010
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Feb 20, 2025
27c14f8
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Feb 20, 2025
613ea9f
Migration: rushx format
kazrael2119 Feb 20, 2025
a13e912
update
kazrael2119 Feb 20, 2025
3ef39d6
merge main
kazrael2119 Feb 20, 2025
bbacdbc
update
kazrael2119 Feb 20, 2025
94b1067
update
kazrael2119 Feb 20, 2025
989dd8f
merge mian
kazrael2119 Feb 24, 2025
5263a3e
format
kazrael2119 Feb 24, 2025
a337dbe
merge main
kazrael2119 Feb 25, 2025
2d1bade
update
kazrael2119 Feb 28, 2025
88cdac9
update
kazrael2119 Feb 28, 2025
7eff08b
update
kazrael2119 Feb 28, 2025
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
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
55 changes: 49 additions & 6 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 @@ -565,7 +565,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 @@ -605,7 +607,9 @@
{
"packageName": "@azure/identity",
"projectFolder": "sdk/identity/identity",
"decoupledLocalDependencies": ["@azure/keyvault-keys"],
"decoupledLocalDependencies": [
"@azure/keyvault-keys"
],
"versionPolicyName": "client"
},
{
Expand Down Expand Up @@ -2318,6 +2322,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