diff --git a/sdk/communication/arm-communication/CHANGELOG.md b/sdk/communication/arm-communication/CHANGELOG.md index 43db7a27a0aa..e84c0594429d 100644 --- a/sdk/communication/arm-communication/CHANGELOG.md +++ b/sdk/communication/arm-communication/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 4.0.0-beta.4 (2023-03-22) +## 4.0.0 (2023-03-29) **Features** diff --git a/sdk/communication/arm-communication/README.md b/sdk/communication/arm-communication/README.md index 8946cde3df04..e8f835d3286a 100644 --- a/sdk/communication/arm-communication/README.md +++ b/sdk/communication/arm-communication/README.md @@ -6,7 +6,7 @@ REST API for Azure Communication Services [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/arm-communication) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-communication) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-communication?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-communication) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/communication/arm-communication/_meta.json b/sdk/communication/arm-communication/_meta.json index 8e116bb854ec..af561b00e5c4 100644 --- a/sdk/communication/arm-communication/_meta.json +++ b/sdk/communication/arm-communication/_meta.json @@ -1,8 +1,8 @@ { - "commit": "cd2b76ce38029e1425ee024cd9403a908c60d71e", + "commit": "61ee9d9d5e9865b98cef5a019f4c37edaa8b2d5f", "readme": "specification/communication/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\\communication\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "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/communication/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", + "repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/communication/arm-communication/package.json b/sdk/communication/arm-communication/package.json index 342af1f1be78..6b98482439b1 100644 --- a/sdk/communication/arm-communication/package.json +++ b/sdk/communication/arm-communication/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for CommunicationServiceManagementClient.", - "version": "4.0.0-beta.4", + "version": "4.0.0", "engines": { "node": ">=14.0.0" }, @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/arm-communication", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-communication?view=azure-node-preview" - } + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/arm-communication" } \ No newline at end of file diff --git a/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts b/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts index 57feb7aa14f8..8fbf5d84649f 100644 --- a/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts +++ b/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts @@ -62,7 +62,7 @@ export class CommunicationServiceManagementClient extends coreClient.ServiceClie credential: credentials }; - const packageDetails = `azsdk-js-arm-communication/4.0.0-beta.4`; + const packageDetails = `azsdk-js-arm-communication/4.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -115,7 +115,7 @@ export class CommunicationServiceManagementClient extends coreClient.ServiceClie // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-03-01-preview"; + this.apiVersion = options.apiVersion || "2023-03-31"; this.operations = new OperationsImpl(this); this.communicationServices = new CommunicationServicesImpl(this); this.domains = new DomainsImpl(this); diff --git a/sdk/communication/arm-communication/src/models/parameters.ts b/sdk/communication/arm-communication/src/models/parameters.ts index 11d0291df8f9..501a2c30fce0 100644 --- a/sdk/communication/arm-communication/src/models/parameters.ts +++ b/sdk/communication/arm-communication/src/models/parameters.ts @@ -52,7 +52,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-03-01-preview", + defaultValue: "2023-03-31", isConstant: true, serializedName: "api-version", type: { @@ -125,7 +125,7 @@ export const communicationServiceName: OperationURLParameter = { parameterPath: "communicationServiceName", mapper: { constraints: { - Pattern: new RegExp("^[a-zA-Z0-9-]+$"), + Pattern: new RegExp("^[-\\w]+$"), MaxLength: 63, MinLength: 1 }, diff --git a/sdk/communication/arm-communication/test/sampleTest.ts b/sdk/communication/arm-communication/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/communication/arm-communication/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/communication/arm-communication/tsconfig.json b/sdk/communication/arm-communication/tsconfig.json index 2549bb6e5ad4..3e6ae96443f3 100644 --- a/sdk/communication/arm-communication/tsconfig.json +++ b/sdk/communication/arm-communication/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-communication": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"