Skip to content

[AutoPR @azure/arm-sphere] [DNM] Validate typespec-azure#2607 #15682

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
4 changes: 2 additions & 2 deletions common/config/rush/pnpm-lock.yaml

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

104 changes: 97 additions & 7 deletions sdk/sphere/arm-sphere/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,105 @@
# Release History

## 1.0.1 (Unreleased)

## 2.0.0 (2025-05-13)
### Features Added

### Breaking Changes
- Added operation CatalogsOperations.createOrUpdate
- Added operation CatalogsOperations.delete
- Added operation CatalogsOperations.uploadImage
- Added operation DeploymentsOperations.createOrUpdate
- Added operation DeploymentsOperations.delete
- Added operation DeviceGroupsOperations.claimDevices
- Added operation DeviceGroupsOperations.createOrUpdate
- Added operation DeviceGroupsOperations.delete
- Added operation DeviceGroupsOperations.update
- Added operation DevicesOperations.createOrUpdate
- Added operation DevicesOperations.delete
- Added operation DevicesOperations.generateCapabilityImage
- Added operation DevicesOperations.update
- Added operation ImagesOperations.createOrUpdate
- Added operation ImagesOperations.delete
- Added operation ProductsOperations.createOrUpdate
- Added operation ProductsOperations.delete
- Added operation ProductsOperations.generateDefaultDeviceGroups
- Added operation ProductsOperations.update
- Added Interface AzureSphereClientOptionalParams
- Added Interface PagedAsyncIterableIterator
- Added Interface PageSettings
- Added Interface RestorePollerOptions
- Added Class AzureSphereClient
- Added Type Alias ContinuablePage
- Added Enum KnownVersions
- Added function restorePoller

### Bugs Fixed

### Other Changes
### Breaking Changes

- Removed operation Catalogs.beginCreateOrUpdate
- Removed operation Catalogs.beginCreateOrUpdateAndWait
- Removed operation Catalogs.beginDelete
- Removed operation Catalogs.beginDeleteAndWait
- Removed operation Catalogs.beginUploadImage
- Removed operation Catalogs.beginUploadImageAndWait
- Removed operation Deployments.beginCreateOrUpdate
- Removed operation Deployments.beginCreateOrUpdateAndWait
- Removed operation Deployments.beginDelete
- Removed operation Deployments.beginDeleteAndWait
- Removed operation DeviceGroups.beginClaimDevices
- Removed operation DeviceGroups.beginClaimDevicesAndWait
- Removed operation DeviceGroups.beginCreateOrUpdate
- Removed operation DeviceGroups.beginCreateOrUpdateAndWait
- Removed operation DeviceGroups.beginDelete
- Removed operation DeviceGroups.beginDeleteAndWait
- Removed operation DeviceGroups.beginUpdate
- Removed operation DeviceGroups.beginUpdateAndWait
- Removed operation Devices.beginCreateOrUpdate
- Removed operation Devices.beginCreateOrUpdateAndWait
- Removed operation Devices.beginDelete
- Removed operation Devices.beginDeleteAndWait
- Removed operation Devices.beginGenerateCapabilityImage
- Removed operation Devices.beginGenerateCapabilityImageAndWait
- Removed operation Devices.beginUpdate
- Removed operation Devices.beginUpdateAndWait
- Removed operation Images.beginCreateOrUpdate
- Removed operation Images.beginCreateOrUpdateAndWait
- Removed operation Images.beginDelete
- Removed operation Images.beginDeleteAndWait
- Removed operation Products.beginCreateOrUpdate
- Removed operation Products.beginCreateOrUpdateAndWait
- Removed operation Products.beginDelete
- Removed operation Products.beginDeleteAndWait
- Removed operation Products.beginUpdate
- Removed operation Products.beginUpdateAndWait
- Removed operation Products.listGenerateDefaultDeviceGroups
- Deleted Class AzureSphereManagementClient
- Interface CatalogsCreateOrUpdateOptionalParams no longer has parameter resumeFrom
- Interface CatalogsDeleteOptionalParams no longer has parameter resumeFrom
- Interface CatalogsUploadImageOptionalParams no longer has parameter resumeFrom
- Interface DeploymentsCreateOrUpdateOptionalParams no longer has parameter resumeFrom
- Interface DeploymentsDeleteOptionalParams no longer has parameter resumeFrom
- Interface DeviceGroupsClaimDevicesOptionalParams no longer has parameter resumeFrom
- Interface DeviceGroupsCreateOrUpdateOptionalParams no longer has parameter resumeFrom
- Interface DeviceGroupsDeleteOptionalParams no longer has parameter resumeFrom
- Interface DeviceGroupsUpdateOptionalParams no longer has parameter resumeFrom
- Interface DevicesCreateOrUpdateOptionalParams no longer has parameter resumeFrom
- Interface DevicesDeleteOptionalParams no longer has parameter resumeFrom
- Interface DevicesGenerateCapabilityImageOptionalParams no longer has parameter resumeFrom
- Interface DevicesUpdateOptionalParams no longer has parameter resumeFrom
- Interface ImagesCreateOrUpdateOptionalParams no longer has parameter resumeFrom
- Interface ImagesDeleteOptionalParams no longer has parameter resumeFrom
- Interface ProductsCreateOrUpdateOptionalParams no longer has parameter resumeFrom
- Interface ProductsDeleteOptionalParams no longer has parameter resumeFrom
- Interface ProductsUpdateOptionalParams no longer has parameter resumeFrom
- Type of parameter tags of interface CatalogUpdate is changed from {
[propertyName: string]: string;
} to Record<string, string>
- Type of parameter info of interface ErrorAdditionalInfo is changed from Record<string, unknown> to Record<string, any>
- Type of parameter tags of interface TrackedResource is changed from {
[propertyName: string]: string;
} to Record<string, string>
- Removed function getContinuationToken


## 1.0.0 (2024-03-26)

The package of @azure/arm-sphere is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
2 changes: 1 addition & 1 deletion sdk/sphere/arm-sphere/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ 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.
SOFTWARE.
56 changes: 26 additions & 30 deletions sdk/sphere/arm-sphere/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# AzureSphereManagement client library for JavaScript
# AzureSphereProvider client library for JavaScript

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

Azure Sphere resource management API.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/sphere/arm-sphere) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-sphere) |
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-sphere) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
Key links:

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

## Getting started

Expand All @@ -24,16 +26,16 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP

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

Install the AzureSphereManagement client library for JavaScript with `npm`:
Install the AzureSphereProvider client library for JavaScript with `npm`:

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

### Create and authenticate a `AzureSphereManagementClient`
### Create and authenticate a `AzureSphereClient`

To create a client object to access the AzureSphereManagement API, you will need the `endpoint` of your AzureSphereManagement resource and a `credential`. The AzureSphereManagement client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your AzureSphereManagement resource in the [Azure Portal][azure_portal].
To create a client object to access the AzureSphereProvider API, you will need the `endpoint` of your AzureSphereProvider resource and a `credential`. The AzureSphereProvider client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your AzureSphereProvider 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).

Expand All @@ -43,44 +45,42 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below
npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to AzureSphereManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
You will also need to **register a new AAD application and grant access to AzureSphereProvider** 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 { AzureSphereManagementClient } from "@azure/arm-sphere";
import { AzureSphereClient } from "@azure/arm-sphere";
import { DefaultAzureCredential } from "@azure/identity";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new AzureSphereManagementClient(new DefaultAzureCredential(), subscriptionId);
const client = new AzureSphereClient(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 { AzureSphereManagementClient } from "@azure/arm-sphere";
import { AzureSphereClient } from "@azure/arm-sphere";

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

### JavaScript Bundle

### 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

### AzureSphereManagementClient
### AzureSphereClient

`AzureSphereManagementClient` is the primary interface for developers using the AzureSphereManagement client library. Explore the methods on this client object to understand the different features of the AzureSphereManagement service that you can access.
`AzureSphereClient` is the primary interface for developers using the AzureSphereProvider client library. Explore the methods on this client object to understand the different features of the AzureSphereProvider service that you can access.

## Troubleshooting

Expand All @@ -98,7 +98,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur

## Next steps

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.
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/sphere/arm-sphere/samples) directory for detailed examples on how to use this library.

## Contributing

Expand All @@ -108,10 +108,6 @@ If you'd like to contribute to this library, please read the [contributing guide

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



[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[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
Expand Down
8 changes: 0 additions & 8 deletions sdk/sphere/arm-sphere/_meta.json

This file was deleted.

6 changes: 0 additions & 6 deletions sdk/sphere/arm-sphere/assets.json

This file was deleted.

14 changes: 14 additions & 0 deletions sdk/sphere/arm-sphere/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",
},
},
]);
Loading