From 0995dcdb1738778202a314563705c4eaf2c978b8 Mon Sep 17 00:00:00 2001 From: Minh-Anh Phan <111523473+minhanh-phan@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:20:11 -0800 Subject: [PATCH] [App Config] Add ApiVersion in the Options Bag (#31648) ### Packages impacted by this PR @azure/app-configuration --- sdk/appconfiguration/app-configuration/CHANGELOG.md | 8 ++------ sdk/appconfiguration/app-configuration/package.json | 2 +- .../app-configuration/review/app-configuration.api.md | 1 + .../app-configuration/src/appConfigurationClient.ts | 2 +- .../src/generated/src/appConfiguration.ts | 2 +- .../app-configuration/src/internal/constants.ts | 2 +- sdk/appconfiguration/app-configuration/src/models.ts | 8 +++++++- sdk/appconfiguration/app-configuration/swagger/swagger.md | 2 +- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sdk/appconfiguration/app-configuration/CHANGELOG.md b/sdk/appconfiguration/app-configuration/CHANGELOG.md index 7176d1d73291..468fa4933673 100644 --- a/sdk/appconfiguration/app-configuration/CHANGELOG.md +++ b/sdk/appconfiguration/app-configuration/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.7.1 (Unreleased) +## 1.8.0 (2024-11-05) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Add `apiVersion` in `AppConfigurationClientOptions` so that customers can specify the API version instead of using the default. ## 1.7.0 (2024-08-06) diff --git a/sdk/appconfiguration/app-configuration/package.json b/sdk/appconfiguration/app-configuration/package.json index 8269b75f2753..9f85407ddba4 100644 --- a/sdk/appconfiguration/app-configuration/package.json +++ b/sdk/appconfiguration/app-configuration/package.json @@ -2,7 +2,7 @@ "name": "@azure/app-configuration", "author": "Microsoft Corporation", "description": "An isomorphic client library for the Azure App Configuration service.", - "version": "1.7.1", + "version": "1.8.0", "sdk-type": "client", "keywords": [ "node", diff --git a/sdk/appconfiguration/app-configuration/review/app-configuration.api.md b/sdk/appconfiguration/app-configuration/review/app-configuration.api.md index c4f47e5058b1..17c06746da3c 100644 --- a/sdk/appconfiguration/app-configuration/review/app-configuration.api.md +++ b/sdk/appconfiguration/app-configuration/review/app-configuration.api.md @@ -47,6 +47,7 @@ export class AppConfigurationClient { // @public export interface AppConfigurationClientOptions extends CommonClientOptions { + apiVersion?: string; } // @public diff --git a/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts b/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts index 1d3c3b843114..be6f446b54de 100644 --- a/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts +++ b/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts @@ -189,7 +189,7 @@ export class AppConfigurationClient { this._syncTokens = appConfigOptions.syncTokens || new SyncTokens(); this.client = new AppConfiguration( appConfigEndpoint, - appConfigurationApiVersion, + options?.apiVersion ?? appConfigurationApiVersion, internalClientPipelineOptions, ); this.client.pipeline.addPolicy(authPolicy, { phase: "Sign" }); diff --git a/sdk/appconfiguration/app-configuration/src/generated/src/appConfiguration.ts b/sdk/appconfiguration/app-configuration/src/generated/src/appConfiguration.ts index 22918f534730..4a6f56a57353 100644 --- a/sdk/appconfiguration/app-configuration/src/generated/src/appConfiguration.ts +++ b/sdk/appconfiguration/app-configuration/src/generated/src/appConfiguration.ts @@ -112,7 +112,7 @@ export class AppConfiguration extends coreHttpCompat.ExtendedServiceClient { requestContentType: "application/json; charset=utf-8", }; - const packageDetails = `azsdk-js-app-configuration/1.7.1`; + const packageDetails = `azsdk-js-app-configuration/1.8.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/appconfiguration/app-configuration/src/internal/constants.ts b/sdk/appconfiguration/app-configuration/src/internal/constants.ts index d4cac2927c3f..681ab445b8dd 100644 --- a/sdk/appconfiguration/app-configuration/src/internal/constants.ts +++ b/sdk/appconfiguration/app-configuration/src/internal/constants.ts @@ -4,7 +4,7 @@ /** * @internal */ -export const packageVersion = "1.7.1"; +export const packageVersion = "1.8.0"; /** * @internal diff --git a/sdk/appconfiguration/app-configuration/src/models.ts b/sdk/appconfiguration/app-configuration/src/models.ts index d45074ec6f16..d2d8f8f40db8 100644 --- a/sdk/appconfiguration/app-configuration/src/models.ts +++ b/sdk/appconfiguration/app-configuration/src/models.ts @@ -16,7 +16,13 @@ import type { /** * Provides configuration options for AppConfigurationClient. */ -export interface AppConfigurationClientOptions extends CommonClientOptions {} +export interface AppConfigurationClientOptions extends CommonClientOptions { + /** + * The API version to use when interacting with the service. The default value is `2023-11-01`. + * Note that overriding this default value may result in unsupported behavior. + */ + apiVersion?: string; +} /** * Fields that uniquely identify a configuration setting diff --git a/sdk/appconfiguration/app-configuration/swagger/swagger.md b/sdk/appconfiguration/app-configuration/swagger/swagger.md index eb3f122ca063..66cac1beaeff 100644 --- a/sdk/appconfiguration/app-configuration/swagger/swagger.md +++ b/sdk/appconfiguration/app-configuration/swagger/swagger.md @@ -4,7 +4,7 @@ ```yaml package-name: app-configuration -package-version: "1.7.1" +package-version: "1.8.0" title: AppConfiguration description: App Configuration client enable-xml: true