Skip to content

Commit 9451c84

Browse files
authored
postgresql-track2-ga (Azure#19317)
1 parent b57fb67 commit 9451c84

29 files changed

+177
-231
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
1-
## Release History
1+
# Release History
2+
3+
## 6.0.0 (2021-12-14)
24

3-
### 6.0.0-beta.2 (Unreleased)
5+
The package of @azure/arm-postgresql is using our next generation design principles since version 6.0.0, which contains breaking changes.
46

5-
#### Features Added
7+
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
68

7-
#### Breaking Changes
9+
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
810

9-
#### Bugs Fixed
10-
11-
#### Other Changes
12-
13-
### 6.0.0-beta.1 (2021-10-19)
14-
15-
This is the first preview for the new version of the `@azure/arm-postgresql` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
16-
17-
While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
18-
19-
Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
20-
21-
**Noteworthy changes and features**
22-
- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
23-
- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
24-
- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
25-
- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
26-
- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
11+
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).

sdk/postgresql/arm-postgresql/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ const subscriptionId = "00000000-0000-0000-0000-000000000000";
5353
const client = new PostgreSQLManagementClient(new DefaultAzureCredential(), subscriptionId);
5454
```
5555

56+
57+
### JavaScript Bundle
58+
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).
59+
5660
## Key concepts
5761

5862
### PostgreSQLManagementClient
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "01c6e5b81b5a52b433fabfa56801f5a87b942067",
2+
"commit": "6654157972dbf54b187150e389237494f35145f4",
33
"readme": "specification/postgresql/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/postgresql/resource-manager/readme.md --tag=package-2020-01-01 --use=@autorest/typescript@6.0.0-beta.13",
4+
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/postgresql/resource-manager/readme.md --tag=package-2020-01-01 --use=@autorest/typescript@6.0.0-alpha.16.20211207.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
66
"tag": "package-2020-01-01",
7-
"use": "@autorest/typescript@6.0.0-beta.13"
7+
"use": "@autorest/typescript@6.0.0-alpha.16.20211207.1"
88
}

sdk/postgresql/arm-postgresql/package.json

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,18 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for PostgreSQLManagementClient.",
6-
"version": "6.0.0-beta.2",
7-
"engines": {
8-
"node": ">=12.0.0"
9-
},
6+
"version": "6.0.0",
7+
"engines": { "node": ">=12.0.0" },
108
"dependencies": {
119
"@azure/core-lro": "^2.2.0",
1210
"@azure/abort-controller": "^1.0.0",
13-
"@azure/core-paging": "^1.1.1",
11+
"@azure/core-paging": "^1.2.0",
1412
"@azure/core-client": "^1.0.0",
1513
"@azure/core-auth": "^1.3.0",
1614
"@azure/core-rest-pipeline": "^1.1.0",
1715
"tslib": "^2.2.0"
1816
},
19-
"keywords": [
20-
"node",
21-
"azure",
22-
"typescript",
23-
"browser",
24-
"isomorphic"
25-
],
17+
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
2618
"license": "MIT",
2719
"main": "./dist/index.js",
2820
"module": "./dist-esm/src/index.js",
@@ -38,6 +30,7 @@
3830
"rollup-plugin-sourcemaps": "^0.4.2",
3931
"typescript": "~4.2.0",
4032
"uglify-js": "^3.4.9",
33+
"rimraf": "^3.0.0",
4134
"@azure/identity": "^2.0.1",
4235
"@azure-tools/test-recorder": "^1.0.0",
4336
"mocha": "^7.1.1",
@@ -48,9 +41,7 @@
4841
"type": "git",
4942
"url": "https://github.com/Azure/azure-sdk-for-js.git"
5043
},
51-
"bugs": {
52-
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
53-
},
44+
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
5445
"files": [
5546
"dist/**/*.js",
5647
"dist/**/*.js.map",
@@ -70,14 +61,14 @@
7061
"types/*"
7162
],
7263
"scripts": {
73-
"build": "tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
64+
"build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
7465
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
7566
"prepack": "npm run build",
7667
"pack": "npm pack 2>&1",
7768
"extract-api": "api-extractor run --local",
7869
"lint": "echo skipped",
7970
"audit": "echo skipped",
80-
"clean": "echo skipped",
71+
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
8172
"build:node": "echo skipped",
8273
"build:browser": "echo skipped",
8374
"build:test": "echo skipped",
@@ -86,14 +77,13 @@
8677
"execute:samples": "echo skipped",
8778
"format": "echo skipped",
8879
"test": "npm run integration-test",
89-
"prebuild": "echo skipped",
9080
"test:node": "echo skipped",
9181
"test:browser": "echo skipped",
9282
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
9383
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
9484
"unit-test:browser": "echo skipped",
9585
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
96-
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts",
86+
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
9787
"integration-test:browser": "echo skipped",
9888
"docs": "echo skipped"
9989
},

sdk/postgresql/arm-postgresql/review/arm-postgresql.api.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,9 @@ export interface PerformanceTierServiceLevelObjectives {
488488
}
489489

490490
// @public (undocumented)
491-
export class PostgreSQLManagementClient extends PostgreSQLManagementClientContext {
491+
export class PostgreSQLManagementClient extends coreClient.ServiceClient {
492+
// (undocumented)
493+
$host: string;
492494
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PostgreSQLManagementClientOptionalParams);
493495
// (undocumented)
494496
checkNameAvailability: CheckNameAvailability;
@@ -525,16 +527,9 @@ export class PostgreSQLManagementClient extends PostgreSQLManagementClientContex
525527
// (undocumented)
526528
serverSecurityAlertPolicies: ServerSecurityAlertPolicies;
527529
// (undocumented)
528-
virtualNetworkRules: VirtualNetworkRules;
529-
}
530-
531-
// @public (undocumented)
532-
export class PostgreSQLManagementClientContext extends coreClient.ServiceClient {
533-
// (undocumented)
534-
$host: string;
535-
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PostgreSQLManagementClientOptionalParams);
536-
// (undocumented)
537530
subscriptionId: string;
531+
// (undocumented)
532+
virtualNetworkRules: VirtualNetworkRules;
538533
}
539534

540535
// @public
@@ -1223,7 +1218,6 @@ export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResu
12231218
// @public
12241219
export type VirtualNetworkRuleState = string;
12251220

1226-
12271221
// (No @packageDocumentation comment for this package)
12281222

12291223
```

sdk/postgresql/arm-postgresql/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
/// <reference lib="esnext.asynciterable" />
1010
export * from "./models";
1111
export { PostgreSQLManagementClient } from "./postgreSQLManagementClient";
12-
export { PostgreSQLManagementClientContext } from "./postgreSQLManagementClientContext";
1312
export * from "./operationsInterfaces";

sdk/postgresql/arm-postgresql/src/models/index.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -89,25 +89,6 @@ export interface StorageProfile {
8989
storageAutogrow?: StorageAutogrow;
9090
}
9191

92-
/** Common fields that are returned in the response for all Azure Resource Manager resources */
93-
export interface Resource {
94-
/**
95-
* Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
96-
* NOTE: This property will not be serialized. It can only be populated by the server.
97-
*/
98-
readonly id?: string;
99-
/**
100-
* The name of the resource
101-
* NOTE: This property will not be serialized. It can only be populated by the server.
102-
*/
103-
readonly name?: string;
104-
/**
105-
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
106-
* NOTE: This property will not be serialized. It can only be populated by the server.
107-
*/
108-
readonly type?: string;
109-
}
110-
11192
/** A private endpoint connection under a server */
11293
export interface ServerPrivateEndpointConnection {
11394
/**
@@ -152,6 +133,25 @@ export interface ServerPrivateLinkServiceConnectionStateProperty {
152133
readonly actionsRequired?: PrivateLinkServiceConnectionStateActionsRequire;
153134
}
154135

136+
/** Common fields that are returned in the response for all Azure Resource Manager resources */
137+
export interface Resource {
138+
/**
139+
* Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
140+
* NOTE: This property will not be serialized. It can only be populated by the server.
141+
*/
142+
readonly id?: string;
143+
/**
144+
* The name of the resource
145+
* NOTE: This property will not be serialized. It can only be populated by the server.
146+
*/
147+
readonly name?: string;
148+
/**
149+
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
150+
* NOTE: This property will not be serialized. It can only be populated by the server.
151+
*/
152+
readonly type?: string;
153+
}
154+
155155
/** An error response from the Batch service. */
156156
export interface CloudError {
157157
/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.) */

sdk/postgresql/arm-postgresql/src/models/mappers.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -216,36 +216,6 @@ export const StorageProfile: coreClient.CompositeMapper = {
216216
}
217217
};
218218

219-
export const Resource: coreClient.CompositeMapper = {
220-
type: {
221-
name: "Composite",
222-
className: "Resource",
223-
modelProperties: {
224-
id: {
225-
serializedName: "id",
226-
readOnly: true,
227-
type: {
228-
name: "String"
229-
}
230-
},
231-
name: {
232-
serializedName: "name",
233-
readOnly: true,
234-
type: {
235-
name: "String"
236-
}
237-
},
238-
type: {
239-
serializedName: "type",
240-
readOnly: true,
241-
type: {
242-
name: "String"
243-
}
244-
}
245-
}
246-
}
247-
};
248-
249219
export const ServerPrivateEndpointConnection: coreClient.CompositeMapper = {
250220
type: {
251221
name: "Composite",
@@ -344,6 +314,36 @@ export const ServerPrivateLinkServiceConnectionStateProperty: coreClient.Composi
344314
}
345315
};
346316

317+
export const Resource: coreClient.CompositeMapper = {
318+
type: {
319+
name: "Composite",
320+
className: "Resource",
321+
modelProperties: {
322+
id: {
323+
serializedName: "id",
324+
readOnly: true,
325+
type: {
326+
name: "String"
327+
}
328+
},
329+
name: {
330+
serializedName: "name",
331+
readOnly: true,
332+
type: {
333+
name: "String"
334+
}
335+
},
336+
type: {
337+
serializedName: "type",
338+
readOnly: true,
339+
type: {
340+
name: "String"
341+
}
342+
}
343+
}
344+
}
345+
};
346+
347347
export const CloudError: coreClient.CompositeMapper = {
348348
type: {
349349
name: "Composite",

sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { CheckNameAvailability } from "../operationsInterfaces";
1010
import * as coreClient from "@azure/core-client";
1111
import * as Mappers from "../models/mappers";
1212
import * as Parameters from "../models/parameters";
13-
import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext";
13+
import { PostgreSQLManagementClient } from "../postgreSQLManagementClient";
1414
import {
1515
NameAvailabilityRequest,
1616
CheckNameAvailabilityExecuteOptionalParams,
@@ -19,13 +19,13 @@ import {
1919

2020
/** Class containing CheckNameAvailability operations. */
2121
export class CheckNameAvailabilityImpl implements CheckNameAvailability {
22-
private readonly client: PostgreSQLManagementClientContext;
22+
private readonly client: PostgreSQLManagementClient;
2323

2424
/**
2525
* Initialize a new instance of the class CheckNameAvailability class.
2626
* @param client Reference to the service client
2727
*/
28-
constructor(client: PostgreSQLManagementClientContext) {
28+
constructor(client: PostgreSQLManagementClient) {
2929
this.client = client;
3030
}
3131

0 commit comments

Comments
 (0)