diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 738fed458ab5..8f62066875ff 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4136,7 +4136,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20230811 + typescript: 5.3.0-dev.20230817 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8721,8 +8721,8 @@ packages: hasBin: true dev: false - /typescript/5.3.0-dev.20230811: - resolution: {integrity: sha512-C4bwx7ZpBwX7bKxrrNl+M1j8yNGmwQ5M58X0mT4VYI1+FHqRvb/uJ4F1uJsVJ+X7iy22iXSICR/Vxnpc1gNk7w==} + /typescript/5.3.0-dev.20230817: + resolution: {integrity: sha512-WbPb4NIGIcx8fQG4JPh54lALvzPUJTcDLCP9xVsrfOMrMAWswPqqekMZ7jVpasCOmYtC9e+oUCpW+jgVVcW7UQ==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -15713,7 +15713,7 @@ packages: dev: false file:projects/arm-webpubsub.tgz: - resolution: {integrity: sha512-CN0txyH6QqBAIPB8IY5o2WT51sONyNFaFMEoh8nRbmZmm6mTtvvrxxhuC1L526M8JYGzRRSc9Zw3zOtK+QI7aA==, tarball: file:projects/arm-webpubsub.tgz} + resolution: {integrity: sha512-Kyw5ChHBcQdkTHkpjD51B+GejfkUXC50v8uAApxEnALhLzgEQzsSlbXiF7Z4FOtNkgr88AjpHqqxSAYypO8rbw==, tarball: file:projects/arm-webpubsub.tgz} name: '@rush-temp/arm-webpubsub' version: 0.0.0 dependencies: @@ -15733,10 +15733,13 @@ packages: rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_dmbj5memikchm63lpeyt6ukdau + ts-node: 10.9.1_n7tz6hmpirns3flqdptizaxofa tslib: 2.6.1 typescript: 5.0.4 uglify-js: 3.17.4 transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' - supports-color dev: false @@ -17642,7 +17645,7 @@ packages: version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.36.3_@types+node@14.18.54 + '@microsoft/api-extractor': 7.36.4_@types+node@14.18.54 '@types/chai': 4.3.5 '@types/mocha': 7.0.2 '@types/node': 14.18.54 @@ -17650,7 +17653,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.3.1 - eslint: 8.45.0 + eslint: 8.46.0 karma: 6.4.2 karma-chrome-launcher: 3.2.0 karma-coverage: 2.2.1 @@ -17668,7 +17671,7 @@ packages: prettier: 2.8.8 rimraf: 3.0.2 source-map-support: 0.5.21 - tslib: 2.6.0 + tslib: 2.6.1 typescript: 5.0.4 transitivePeerDependencies: - bufferutil @@ -17683,7 +17686,7 @@ packages: version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.36.3_@types+node@14.18.54 + '@microsoft/api-extractor': 7.36.4_@types+node@14.18.54 '@types/chai': 4.3.5 '@types/mocha': 7.0.2 '@types/node': 14.18.54 @@ -17691,7 +17694,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.3.1 - eslint: 8.45.0 + eslint: 8.46.0 karma: 6.4.2 karma-chrome-launcher: 3.2.0 karma-coverage: 2.2.1 @@ -17709,7 +17712,7 @@ packages: prettier: 2.8.8 rimraf: 3.0.2 source-map-support: 0.5.21 - tslib: 2.6.0 + tslib: 2.6.1 typescript: 5.0.4 transitivePeerDependencies: - bufferutil diff --git a/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md b/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md index d68a0f26bebc..a8b4d47c748f 100644 --- a/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md +++ b/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md @@ -1,21 +1,12 @@ # Release History - -## 2.0.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 2.0.0-beta.1 (2023-07-11) + +## 2.0.0-beta.2 (2023-08-18) **Features** - Added operation group WebPubSubReplicas - Added operation WebPubSub.listReplicaSkus + - Added Interface IPRule - Added Interface Replica - Added Interface ReplicaList - Added Interface WebPubSubListReplicaSkusOptionalParams @@ -41,17 +32,20 @@ - Added Type Alias WebPubSubReplicasUpdateResponse - Added Type Alias WebPubSubRestartResponse - Interface Resource has a new optional parameter systemData + - Interface WebPubSubNetworkACLs has a new optional parameter ipRules - Interface WebPubSubResource has a new optional parameter kind + - Interface WebPubSubResource has a new optional parameter regionEndpointEnabled + - Interface WebPubSubResource has a new optional parameter resourceStopped - Added Enum KnownServiceKind + +**Breaking Changes** + - Interface CustomCertificate no longer has parameter systemData - Interface CustomDomain no longer has parameter systemData - Interface PrivateEndpointConnection no longer has parameter systemData - Interface SharedPrivateLinkResource no longer has parameter systemData - Interface WebPubSubHub no longer has parameter systemData - Interface WebPubSubResource no longer has parameter systemData - -**Breaking Changes** - - Parameter location of interface TrackedResource is now required diff --git a/sdk/web-pubsub/arm-webpubsub/_meta.json b/sdk/web-pubsub/arm-webpubsub/_meta.json index 3d549e471efe..53e4d95bee57 100644 --- a/sdk/web-pubsub/arm-webpubsub/_meta.json +++ b/sdk/web-pubsub/arm-webpubsub/_meta.json @@ -1,8 +1,8 @@ { - "commit": "9975d3476c05bcc6bd9535ad3dfb564e6a168fa5", + "commit": "e4f05ae0d0ec8fd2258803174f88602cd6ad31cb", "readme": "specification/webpubsub/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\webpubsub\\resource-manager\\readme.md --use=@autorest/typescript@6.0.5 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/webpubsub/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", - "use": "@autorest/typescript@6.0.5" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/web-pubsub/arm-webpubsub/package.json b/sdk/web-pubsub/arm-webpubsub/package.json index 7165619de886..8b00c224b126 100644 --- a/sdk/web-pubsub/arm-webpubsub/package.json +++ b/sdk/web-pubsub/arm-webpubsub/package.json @@ -8,12 +8,12 @@ "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.3", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -48,6 +48,7 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", + "ts-node": "^10.0.0", "@azure/dev-tool": "^1.0.0" }, "repository": { @@ -111,13 +112,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/arm-webpubsub", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-webpubsub?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/arm-webpubsub" +} \ No newline at end of file diff --git a/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md b/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md index cc87fc72417f..cf834b2bbbbc 100644 --- a/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md +++ b/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md @@ -125,6 +125,12 @@ export interface EventNameFilter extends EventListenerFilter { // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export interface IPRule { + action?: ACLAction; + value?: string; +} + // @public type KeyType_2 = string; export { KeyType_2 as KeyType } @@ -409,6 +415,8 @@ export interface RegenerateKeyParameters { // @public export interface Replica extends TrackedResource { readonly provisioningState?: ProvisioningState; + regionEndpointEnabled?: string; + resourceStopped?: string; sku?: ResourceSku; } @@ -890,6 +898,7 @@ export interface WebPubSubManagementClientOptionalParams extends coreClient.Serv // @public export interface WebPubSubNetworkACLs { defaultAction?: ACLAction; + ipRules?: IPRule[]; privateEndpoints?: PrivateEndpointACL[]; publicNetwork?: NetworkACL; } @@ -1066,7 +1075,9 @@ export interface WebPubSubResource extends TrackedResource { readonly provisioningState?: ProvisioningState; publicNetworkAccess?: string; readonly publicPort?: number; + regionEndpointEnabled?: string; resourceLogConfiguration?: ResourceLogConfiguration; + resourceStopped?: string; readonly serverPort?: number; readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; sku?: ResourceSku; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/index.ts b/sdk/web-pubsub/arm-webpubsub/src/models/index.ts index 85aca7121da1..a9ed6aeb88a5 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/models/index.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/models/index.ts @@ -376,6 +376,8 @@ export interface WebPubSubNetworkACLs { publicNetwork?: NetworkACL; /** ACLs for requests from private endpoints */ privateEndpoints?: PrivateEndpointACL[]; + /** IP rules for filtering public traffic */ + ipRules?: IPRule[]; } /** Network ACL */ @@ -386,6 +388,14 @@ export interface NetworkACL { deny?: WebPubSubRequestType[]; } +/** An IP rule */ +export interface IPRule { + /** An IP or CIDR or ServiceTag */ + value?: string; + /** Azure Networking ACL Action. */ + action?: ACLAction; +} + /** A class represent managed identities used for request and response */ export interface ManagedIdentity { /** Represents the identity type: systemAssigned, userAssigned, None */ @@ -880,6 +890,18 @@ export interface WebPubSubResource extends TrackedResource { * When set as true, connection with AuthType=aad won't work. */ disableAadAuth?: boolean; + /** + * Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. + * This property is replica specific. Disable the regional endpoint without replica is not allowed. + */ + regionEndpointEnabled?: string; + /** + * Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + */ + resourceStopped?: string; } /** A class represent a replica resource. */ @@ -891,6 +913,17 @@ export interface Replica extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; + /** + * Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. + */ + regionEndpointEnabled?: string; + /** + * Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + */ + resourceStopped?: string; } /** Defines headers for WebPubSub_update operation. */ diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts index d55f3bde14ad..129949e13ed6 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts @@ -838,6 +838,21 @@ export const WebPubSubNetworkACLs: coreClient.CompositeMapper = { } } } + }, + ipRules: { + constraints: { + MaxItems: 30 + }, + serializedName: "ipRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPRule" + } + } + } } } } @@ -874,6 +889,27 @@ export const NetworkACL: coreClient.CompositeMapper = { } }; +export const IPRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPRule", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + type: { + name: "String" + } + } + } + } +}; + export const ManagedIdentity: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2008,6 +2044,20 @@ export const WebPubSubResource: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + regionEndpointEnabled: { + defaultValue: "Enabled", + serializedName: "properties.regionEndpointEnabled", + type: { + name: "String" + } + }, + resourceStopped: { + defaultValue: "false", + serializedName: "properties.resourceStopped", + type: { + name: "String" + } } } } @@ -2032,6 +2082,20 @@ export const Replica: coreClient.CompositeMapper = { type: { name: "String" } + }, + regionEndpointEnabled: { + defaultValue: "Enabled", + serializedName: "properties.regionEndpointEnabled", + type: { + name: "String" + } + }, + resourceStopped: { + defaultValue: "false", + serializedName: "properties.resourceStopped", + type: { + name: "String" + } } } } diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts b/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts index 2cb46857de44..64a21cfb7d2b 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts @@ -50,7 +50,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-06-01-preview", + defaultValue: "2023-08-01-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts b/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts index 46d9358c2a1d..ec5c7fa34228 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts @@ -125,7 +125,7 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-06-01-preview"; + this.apiVersion = options.apiVersion || "2023-08-01-preview"; this.operations = new OperationsImpl(this); this.webPubSub = new WebPubSubImpl(this); this.usages = new UsagesImpl(this); diff --git a/sdk/web-pubsub/arm-webpubsub/test/sampleTest.ts b/sdk/web-pubsub/arm-webpubsub/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/web-pubsub/arm-webpubsub/tsconfig.json b/sdk/web-pubsub/arm-webpubsub/tsconfig.json index d4e1110ff459..3e6ae96443f3 100644 --- a/sdk/web-pubsub/arm-webpubsub/tsconfig.json +++ b/sdk/web-pubsub/arm-webpubsub/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-webpubsub": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"