Skip to content

Commit

Permalink
CodeGen from PR 31071 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge c3a3162655847a7ef92fdfd35859e2ac6a912461 into 0f300277e21972f20b32ffbff96180217875909b
  • Loading branch information
SDKAuto committed Oct 23, 2024
1 parent af5c6a8 commit 0ce222e
Show file tree
Hide file tree
Showing 107 changed files with 1,731 additions and 3,785 deletions.
816 changes: 408 additions & 408 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions sdk/mongocluster/arm-mongocluster/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Release History

## 2.0.0-beta.1 (2024-10-23)
Compared with version 1.0.1

### Features Added

- Added Interface DataApiProperties
- Added Interface ErrorAdditionalInfo
- Added Interface ErrorDetail
- Added Interface ErrorResponse
- Added Type Alias DataApiMode
- Added Type Alias ResourceProvisioningState
- Added Type Alias Versions
- Interface MongoClusterProperties has a new optional parameter dataApi
- Interface MongoClusterUpdateProperties has a new optional parameter dataApi
- Added Enum KnownDataApiMode
- Added Enum KnownResourceProvisioningState
- Enum KnownOrigin has a new value "user,system"
- Enum KnownOrigin has a new value system
- Enum KnownOrigin has a new value user

### Breaking Changes

- Removed Enum KnownProvisioningState
- Enum KnownOrigin no longer has value System
- Enum KnownOrigin no longer has value User
- Enum KnownOrigin no longer has value UserSystem


## 1.0.1 (2024-10-14)

### Bugs Fixed
Expand Down
13 changes: 6 additions & 7 deletions sdk/mongocluster/arm-mongocluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f

The Microsoft Azure management API provides create, read, update, and delete functionality for Azure Cosmos DB for MongoDB vCore resources including clusters and firewall rules.

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

Expand All @@ -29,7 +28,7 @@ Install the Azure MongoClusterManagement client library for JavaScript with `npm
npm install @azure/arm-mongocluster
```

### Create and authenticate a `MongoClusterManagementClient`
### Create and authenticate a `DocumentDBClient`

To create a client object to access the Azure MongoClusterManagement API, you will need the `endpoint` of your Azure MongoClusterManagement resource and a `credential`. The Azure MongoClusterManagement client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure MongoClusterManagement resource in the [Azure Portal][azure_portal].
Expand All @@ -48,19 +47,19 @@ Set the values of the client ID, tenant ID, and client secret of the AAD applica
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

```javascript
const { MongoClusterManagementClient } = require("@azure/arm-mongocluster");
const { DocumentDBClient } = require("@azure/arm-mongocluster");
const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new MongoClusterManagementClient(new DefaultAzureCredential(), subscriptionId);
const client = new DocumentDBClient(new DefaultAzureCredential(), subscriptionId);

// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new MongoClusterManagementClient(credential, subscriptionId);
// const client = new DocumentDBClient(credential, subscriptionId);
```


Expand All @@ -69,9 +68,9 @@ To use this client library in the browser, first you need to use a bundler. For

## Key concepts

### MongoClusterManagementClient
### DocumentDBClient

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

## Troubleshooting

Expand Down
6 changes: 0 additions & 6 deletions sdk/mongocluster/arm-mongocluster/assets.json

This file was deleted.

6 changes: 3 additions & 3 deletions sdk/mongocluster/arm-mongocluster/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default [
"@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",
},
},
"tsdoc/syntax": "warn"
}
}
];
116 changes: 70 additions & 46 deletions sdk/mongocluster/arm-mongocluster/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure/arm-mongocluster",
"version": "1.0.1",
"version": "2.0.0-beta.1",
"description": "A generated SDK for DocumentDBClient.",
"engines": {
"node": ">=18.0.0"
Expand All @@ -11,6 +11,7 @@
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts",
"./api": "./src/api/index.ts",
"./models": "./src/models/index.ts"
},
"dialects": [
Expand Down Expand Up @@ -50,107 +51,130 @@
"//metadata": {
"constantPaths": [
{
"path": "src/api/mongoClusterManagementContext.ts",
"path": "src/rest/documentDBClient.ts",
"prefix": "userAgentInfo"
}
]
},
"dependencies": {
"@azure/core-util": "^1.9.2",
"@azure-rest/core-client": "^2.1.0",
"@azure/abort-controller": "^2.1.2",
"@azure/core-auth": "^1.6.0",
"@azure/core-lro": "^3.0.0",
"@azure/core-rest-pipeline": "^1.5.0",
"@azure/core-util": "^1.9.2",
"@azure/logger": "^1.0.0",
"tslib": "^2.6.2"
"tslib": "^2.6.2",
"@azure/core-lro": "^3.0.0",
"@azure/abort-controller": "^2.1.2"
},
"devDependencies": {
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.0.0",
"@azure/arm-network": "^33.2.0",
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/identity": "^4.2.1",
"dotenv": "^16.0.0",
"@microsoft/api-extractor": "^7.40.3",
"@types/node": "^18.0.0",
"eslint": "^8.55.0",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"mkdirp": "^3.0.1",
"typescript": "~5.5.3",
"tshy": "^1.11.1",
"@azure/identity": "^4.2.1",
"@vitest/browser": "^2.0.5",
"@vitest/coverage-istanbul": "^2.0.5",
"dotenv": "^16.0.0",
"eslint": "^8.55.0",
"playwright": "^1.41.2",
"prettier": "^3.2.5",
"tshy": "^2.0.0",
"typescript": "~5.6.2",
"vitest": "^2.0.5"
"vitest": "^2.0.5",
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0"
},
"scripts": {
"audit": "node ../../../common/scripts/rush-audit.js && dev-tool run vendored rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
"build:samples": "dev-tool run typecheck --paths samples-dev/*.ts && dev-tool samples publish -f",
"build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
"extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
"generate:client": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"lint": "echo skipped",
"lint:fix": "echo skipped",
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"extract-api": "rimraf review && mkdirp ./review && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
"test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node",
"lint": "eslint package.json api-extractor.json src test",
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
"//sampleConfiguration": {
"productName": "@azure/arm-mongocluster",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-mongocluster?view=azure-node-preview"
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": "echo skipped",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
"execute:samples": "echo skipped",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
"generate:client": "echo skipped",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"build:test": "npm run clean && tshy && dev-tool run build-test",
"build": "npm run clean && tshy && mkdirp ./review && dev-tool run extract-api",
"test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node",
"test": "npm run clean && tshy && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test"
},
"exports": {
"./package.json": "./package.json",
".": {
"browser": {
"source": "./src/index.ts",
"types": "./dist/browser/index.d.ts",
"default": "./dist/browser/index.js"
},
"react-native": {
"source": "./src/index.ts",
"types": "./dist/react-native/index.d.ts",
"default": "./dist/react-native/index.js"
},
"import": {
"source": "./src/index.ts",
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"source": "./src/index.ts",
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
},
"./api": {
"browser": {
"source": "./src/api/index.ts",
"types": "./dist/browser/api/index.d.ts",
"default": "./dist/browser/api/index.js"
},
"react-native": {
"source": "./src/api/index.ts",
"types": "./dist/react-native/api/index.d.ts",
"default": "./dist/react-native/api/index.js"
},
"import": {
"source": "./src/api/index.ts",
"types": "./dist/esm/api/index.d.ts",
"default": "./dist/esm/api/index.js"
},
"require": {
"source": "./src/api/index.ts",
"types": "./dist/commonjs/api/index.d.ts",
"default": "./dist/commonjs/api/index.js"
}
},
"./models": {
"browser": {
"source": "./src/models/index.ts",
"types": "./dist/browser/models/index.d.ts",
"default": "./dist/browser/models/index.js"
},
"react-native": {
"source": "./src/models/index.ts",
"types": "./dist/react-native/models/index.d.ts",
"default": "./dist/react-native/models/index.js"
},
"import": {
"source": "./src/models/index.ts",
"types": "./dist/esm/models/index.d.ts",
"default": "./dist/esm/models/index.js"
},
"require": {
"source": "./src/models/index.ts",
"types": "./dist/commonjs/models/index.d.ts",
"default": "./dist/commonjs/models/index.js"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
## API Report File for "@azure/arm-mongocluster"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

import { Client } from '@azure-rest/core-client';
import { ClientOptions } from '@azure-rest/core-client';
import { OperationOptions } from '@azure-rest/core-client';
import { OperationState } from '@azure/core-lro';
import { PollerLike } from '@azure/core-lro';
import { TokenCredential } from '@azure/core-auth';

// @public
export function createMongoClusterManagement(credential: TokenCredential, options?: MongoClusterManagementClientOptionalParams): DocumentDBContext;

// @public (undocumented)
export interface DocumentDBContext extends Client {
}

// @public
export function firewallRulesCreateOrUpdate(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, firewallRuleName: string, resource: FirewallRule, options?: FirewallRulesCreateOrUpdateOptionalParams): PollerLike<OperationState<FirewallRule>, FirewallRule>;

// @public
export function firewallRulesDelete(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, firewallRuleName: string, options?: FirewallRulesDeleteOptionalParams): PollerLike<OperationState<void>, void>;

// @public
export function firewallRulesGet(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, firewallRuleName: string, options?: FirewallRulesGetOptionalParams): Promise<FirewallRule>;

// @public
export function firewallRulesListByMongoCluster(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, options?: FirewallRulesListByMongoClusterOptionalParams): PagedAsyncIterableIterator<FirewallRule>;

// @public
export interface MongoClusterManagementClientOptionalParams extends ClientOptions {
apiVersion?: string;
}

// @public
export function mongoClustersCheckNameAvailability(context: DocumentDBContext, subscriptionId: string, location: string, body: CheckNameAvailabilityRequest, options?: MongoClustersCheckNameAvailabilityOptionalParams): Promise<CheckNameAvailabilityResponse>;

// @public
export function mongoClustersCreateOrUpdate(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, resource: MongoCluster, options?: MongoClustersCreateOrUpdateOptionalParams): PollerLike<OperationState<MongoCluster>, MongoCluster>;

// @public
export function mongoClustersDelete(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, options?: MongoClustersDeleteOptionalParams): PollerLike<OperationState<void>, void>;

// @public
export function mongoClustersGet(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, options?: MongoClustersGetOptionalParams): Promise<MongoCluster>;

// @public
export function mongoClustersList(context: DocumentDBContext, subscriptionId: string, options?: MongoClustersListOptionalParams): PagedAsyncIterableIterator<MongoCluster>;

// @public
export function mongoClustersListByResourceGroup(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, options?: MongoClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator<MongoCluster>;

// @public
export function mongoClustersListConnectionStrings(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, options?: MongoClustersListConnectionStringsOptionalParams): Promise<ListConnectionStringsResult>;

// @public
export function mongoClustersPromote(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, body: PromoteReplicaRequest, options?: MongoClustersPromoteOptionalParams): PollerLike<OperationState<void>, void>;

// @public
export function mongoClustersUpdate(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, properties: MongoClusterUpdate, options?: MongoClustersUpdateOptionalParams): PollerLike<OperationState<MongoCluster>, MongoCluster>;

// @public
export function operationsList(context: DocumentDBContext, options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;

// @public
export function privateEndpointConnectionsCreate(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, privateEndpointConnectionName: string, resource: PrivateEndpointConnectionResource, options?: PrivateEndpointConnectionsCreateOptionalParams): PollerLike<OperationState<PrivateEndpointConnectionResource>, PrivateEndpointConnectionResource>;

// @public
export function privateEndpointConnectionsDelete(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): PollerLike<OperationState<void>, void>;

// @public
export function privateEndpointConnectionsGet(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise<PrivateEndpointConnectionResource>;

// @public
export function privateEndpointConnectionsListByMongoCluster(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, options?: PrivateEndpointConnectionsListByMongoClusterOptionalParams): PagedAsyncIterableIterator<PrivateEndpointConnectionResource>;

// @public
export function privateLinksListByMongoCluster(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, options?: PrivateLinksListByMongoClusterOptionalParams): PagedAsyncIterableIterator<PrivateLinkResource>;

// @public
export function replicasListByParent(context: DocumentDBContext, subscriptionId: string, resourceGroupName: string, mongoClusterName: string, options?: ReplicasListByParentOptionalParams): PagedAsyncIterableIterator<Replica>;

// (No @packageDocumentation comment for this package)

```
Loading

0 comments on commit 0ce222e

Please sign in to comment.