@azure/app-configuration 1.10.0-alpha.20251121.1 → 1.10.0-alpha.20251127.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/browser/appConfigurationClient.d.ts.map +1 -1
  2. package/dist/browser/appConfigurationClient.js +5 -0
  3. package/dist/browser/appConfigurationClient.js.map +1 -1
  4. package/dist/browser/internal/audienceErrorHandlingPolicy.d.ts +6 -0
  5. package/dist/browser/internal/audienceErrorHandlingPolicy.d.ts.map +1 -0
  6. package/dist/browser/internal/audienceErrorHandlingPolicy.js +31 -0
  7. package/dist/browser/internal/audienceErrorHandlingPolicy.js.map +1 -0
  8. package/dist/commonjs/appConfigurationClient.d.ts.map +1 -1
  9. package/dist/commonjs/appConfigurationClient.js +5 -0
  10. package/dist/commonjs/appConfigurationClient.js.map +1 -1
  11. package/dist/commonjs/internal/audienceErrorHandlingPolicy.d.ts +6 -0
  12. package/dist/commonjs/internal/audienceErrorHandlingPolicy.d.ts.map +1 -0
  13. package/dist/commonjs/internal/audienceErrorHandlingPolicy.js +34 -0
  14. package/dist/commonjs/internal/audienceErrorHandlingPolicy.js.map +1 -0
  15. package/dist/commonjs/tsdoc-metadata.json +1 -1
  16. package/dist/esm/appConfigurationClient.d.ts.map +1 -1
  17. package/dist/esm/appConfigurationClient.js +5 -0
  18. package/dist/esm/appConfigurationClient.js.map +1 -1
  19. package/dist/esm/internal/audienceErrorHandlingPolicy.d.ts +6 -0
  20. package/dist/esm/internal/audienceErrorHandlingPolicy.d.ts.map +1 -0
  21. package/dist/esm/internal/audienceErrorHandlingPolicy.js +31 -0
  22. package/dist/esm/internal/audienceErrorHandlingPolicy.js.map +1 -0
  23. package/dist/react-native/appConfigurationClient.d.ts.map +1 -1
  24. package/dist/react-native/appConfigurationClient.js +5 -0
  25. package/dist/react-native/appConfigurationClient.js.map +1 -1
  26. package/dist/react-native/internal/audienceErrorHandlingPolicy.d.ts +6 -0
  27. package/dist/react-native/internal/audienceErrorHandlingPolicy.d.ts.map +1 -0
  28. package/dist/react-native/internal/audienceErrorHandlingPolicy.js +31 -0
  29. package/dist/react-native/internal/audienceErrorHandlingPolicy.js.map +1 -0
  30. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"appConfigurationClient.js","sourceRoot":"","sources":["../../src/appConfigurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAsDlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAKrD,OAAO,EACL,cAAc,EACd,8BAA8B,EAC9B,+BAA+B,EAC/B,6BAA6B,EAC7B,oBAAoB,EACpB,2CAA2C,EAC3C,qBAAqB,EACrB,sBAAsB,EACtB,4BAA4B,EAC5B,8BAA8B,EAC9B,QAAQ,EACR,6BAA6B,EAC7B,oCAAoC,EACpC,iBAAiB,EACjB,yBAAyB,EACzB,uCAAuC,EACvC,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAIvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,qBAAqB,GAAG,mCAAmC,CAAC;AAClE,MAAM,2BAA2B,GAAG;IAClC,IAAI,EAAE;QACJ,gDAAgD;QAChD,6CAA6C;QAC7C,8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// https://azure.github.io/azure-sdk/typescript_design.html#ts-config-lib\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport {\n type AddConfigurationSettingOptions,\n type AddConfigurationSettingParam,\n type AddConfigurationSettingResponse,\n type AppConfigurationClientOptions,\n type ConfigurationSetting,\n type ConfigurationSettingId,\n type CreateSnapshotOptions,\n type CreateSnapshotResponse,\n type DeleteConfigurationSettingOptions,\n type DeleteConfigurationSettingResponse,\n type GetConfigurationSettingOptions,\n type GetConfigurationSettingResponse,\n type GetSnapshotOptions,\n type GetSnapshotResponse,\n type HttpResponseField,\n type ListConfigurationSettingPage,\n type ListConfigurationSettingsForSnapshotOptions,\n type ListConfigurationSettingsOptions,\n type ListLabelsOptions,\n type ListLabelsPage,\n type ListRevisionsOptions,\n type ListRevisionsPage,\n type ListSnapshotsOptions,\n type ListSnapshotsPage,\n type PageSettings,\n type SetConfigurationSettingOptions,\n type SetConfigurationSettingParam,\n type SetConfigurationSettingResponse,\n type SetReadOnlyOptions,\n type SetReadOnlyResponse,\n type SettingLabel,\n type SnapshotInfo,\n type UpdateSnapshotOptions,\n type UpdateSnapshotResponse,\n} from \"./models.js\";\nimport type {\n AppConfigurationGetKeyValuesHeaders,\n AppConfigurationGetRevisionsHeaders,\n AppConfigurationGetSnapshotsHeaders,\n GetKeyValuesResponse,\n GetRevisionsResponse,\n GetSnapshotsResponse,\n ConfigurationSnapshot,\n GetLabelsResponse,\n AppConfigurationGetLabelsHeaders,\n} from \"./generated/src/models/index.js\";\nimport type { InternalClientPipelineOptions } from \"@azure/core-client\";\nimport type { PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { getPagedAsyncIterator } from \"@azure/core-paging\";\nimport type { PipelinePolicy, RestError } from \"@azure/core-rest-pipeline\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { SyncTokens, syncTokenPolicy } from \"./internal/syncTokenPolicy.js\";\nimport { queryParamPolicy } from \"./internal/queryParamPolicy.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type {\n SendConfigurationSettingsOptions,\n SendLabelsRequestOptions,\n} from \"./internal/helpers.js\";\nimport {\n assertResponse,\n checkAndFormatIfAndIfNoneMatch,\n extractAfterTokenFromLinkHeader,\n extractAfterTokenFromNextLink,\n formatAcceptDateTime,\n formatConfigurationSettingsFiltersAndSelect,\n formatFieldsForSelect,\n formatFiltersAndSelect,\n formatLabelsFiltersAndSelect,\n formatSnapshotFiltersAndSelect,\n getScope,\n makeConfigurationSettingEmpty,\n serializeAsConfigurationSettingParam,\n transformKeyValue,\n transformKeyValueResponse,\n transformKeyValueResponseWithStatusCode,\n transformSnapshotResponse,\n} from \"./internal/helpers.js\";\nimport { AppConfiguration } from \"./generated/src/appConfiguration.js\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport { appConfigKeyCredentialPolicy } from \"./appConfigCredential.js\";\nimport { tracingClient } from \"./internal/tracing.js\";\nimport { logger } from \"./logger.js\";\nimport type { OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport { appConfigurationApiVersion } from \"./internal/constants.js\";\n\nconst ConnectionStringRegex = /Endpoint=(.*);Id=(.*);Secret=(.*)/;\nconst deserializationContentTypes = {\n json: [\n \"application/vnd.microsoft.appconfig.kvset+json\",\n \"application/vnd.microsoft.appconfig.kv+json\",\n \"application/vnd.microsoft.appconfig.kvs+json\",\n \"application/vnd.microsoft.appconfig.keyset+json\",\n \"application/vnd.microsoft.appconfig.revs+json\",\n \"application/vnd.microsoft.appconfig.snapshotset+json\",\n \"application/vnd.microsoft.appconfig.snapshot+json\",\n \"application/vnd.microsoft.appconfig.labelset+json\",\n \"application/json\",\n ],\n};\n\n/**\n * Provides internal configuration options for AppConfigurationClient.\n * @internal\n */\nexport interface InternalAppConfigurationClientOptions extends AppConfigurationClientOptions {\n /**\n * The sync token cache to use for this client.\n * NOTE: this is an internal option, not for general client usage.\n */\n syncTokens?: SyncTokens;\n}\n\n/**\n * Client for the Azure App Configuration service.\n */\nexport class AppConfigurationClient {\n private client: AppConfiguration;\n private _syncTokens: SyncTokens;\n\n /**\n * Initializes a new instance of the AppConfigurationClient class.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(connectionString: string, options?: AppConfigurationClientOptions);\n /**\n * Initializes a new instance of the AppConfigurationClient class using\n * a TokenCredential.\n * @param endpoint - The endpoint of the App Configuration service (ex: https://sample.azconfig.io).\n * @param tokenCredential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(\n endpoint: string,\n tokenCredential: TokenCredential,\n options?: AppConfigurationClientOptions,\n );\n constructor(\n connectionStringOrEndpoint: string,\n tokenCredentialOrOptions?: TokenCredential | AppConfigurationClientOptions,\n options?: AppConfigurationClientOptions,\n ) {\n let appConfigOptions: InternalAppConfigurationClientOptions = {};\n let appConfigCredential: TokenCredential;\n let appConfigEndpoint: string;\n let authPolicy: PipelinePolicy;\n let scope: string;\n\n if (isTokenCredential(tokenCredentialOrOptions)) {\n appConfigOptions = (options as InternalAppConfigurationClientOptions) || {};\n appConfigCredential = tokenCredentialOrOptions;\n appConfigEndpoint = connectionStringOrEndpoint.endsWith(\"/\")\n ? connectionStringOrEndpoint.slice(0, -1)\n : connectionStringOrEndpoint;\n scope = getScope(appConfigEndpoint, appConfigOptions.audience);\n authPolicy = bearerTokenAuthenticationPolicy({\n scopes: scope,\n credential: appConfigCredential,\n });\n } else {\n appConfigOptions = (tokenCredentialOrOptions as InternalAppConfigurationClientOptions) || {};\n const regexMatch = connectionStringOrEndpoint?.match(ConnectionStringRegex);\n if (regexMatch) {\n appConfigEndpoint = regexMatch[1];\n authPolicy = appConfigKeyCredentialPolicy(regexMatch[2], regexMatch[3]);\n } else {\n throw new Error(\n `Invalid connection string. Valid connection strings should match the regex '${ConnectionStringRegex.source}'.` +\n ` To mitigate the issue, please refer to the troubleshooting guide here at https://aka.ms/azsdk/js/app-configuration/troubleshoot.`,\n );\n }\n }\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...appConfigOptions,\n loggingOptions: {\n logger: logger.info,\n },\n deserializationOptions: {\n expectedContentTypes: deserializationContentTypes,\n },\n };\n\n this._syncTokens = appConfigOptions.syncTokens || new SyncTokens();\n this.client = new AppConfiguration(\n appConfigEndpoint,\n options?.apiVersion ?? appConfigurationApiVersion,\n internalClientPipelineOptions,\n );\n this.client.pipeline.addPolicy(authPolicy, { phase: \"Sign\" });\n this.client.pipeline.addPolicy(queryParamPolicy());\n this.client.pipeline.addPolicy(syncTokenPolicy(this._syncTokens), { afterPhase: \"Retry\" });\n }\n\n /**\n * Add a setting into the Azure App Configuration service, failing if it\n * already exists.\n *\n * Example usage:\n * ```ts snippet:AddConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.addConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * value: \"MyValue\",\n * });\n * ```\n * @param configurationSetting - A configuration setting.\n * @param options - Optional parameters for the request.\n */\n addConfigurationSetting(\n configurationSetting:\n | AddConfigurationSettingParam\n | AddConfigurationSettingParam<FeatureFlagValue>\n | AddConfigurationSettingParam<SecretReferenceValue>\n | AddConfigurationSettingParam<SnapshotReferenceValue>,\n options: AddConfigurationSettingOptions = {},\n ): Promise<AddConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.addConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[addConfigurationSetting] Creating a key value pair\");\n try {\n const originalResponse = await this.client.putKeyValue(configurationSetting.key, {\n ifNoneMatch: \"*\",\n label: configurationSetting.label,\n entity: keyValue,\n ...updatedOptions,\n });\n const response = transformKeyValueResponse(originalResponse);\n assertResponse(response);\n return response;\n } catch (error) {\n const err = error as RestError;\n // Service does not return an error message. Raise a 412 error similar to .NET\n if (err.statusCode === 412) {\n err.message = `Status 412: Setting was already present`;\n }\n throw err;\n }\n throw new Error(\"Unreachable code\");\n },\n );\n }\n\n /**\n * Delete a setting from the Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:DeleteConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const deletedSetting = await client.deleteConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * });\n * ```\n * @param id - The id of the configuration setting to delete.\n * @param options - Optional parameters for the request (ex: etag, label)\n */\n deleteConfigurationSetting(\n id: ConfigurationSettingId,\n options: DeleteConfigurationSettingOptions = {},\n ): Promise<DeleteConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.deleteConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n logger.info(\"[deleteConfigurationSetting] Deleting key value pair\");\n const originalResponse = await this.client.deleteKeyValue(id.key, {\n label: id.label,\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Gets a setting from the Azure App Configuration service.\n *\n * Example code:\n * ```ts snippet:GetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const setting = await client.getConfigurationSetting({ key: \"MyKey\", label: \"MyLabel\" });\n * ```\n * @param id - The id of the configuration setting to get.\n * @param options - Optional parameters for the request.\n */\n async getConfigurationSetting(\n id: ConfigurationSettingId,\n options: GetConfigurationSettingOptions = {},\n ): Promise<GetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n logger.info(\"[getConfigurationSetting] Getting key value pair\");\n const originalResponse = await this.client.getKeyValue(id.key, {\n ...updatedOptions,\n label: id.label,\n select: formatFieldsForSelect(options.fields),\n ...formatAcceptDateTime(options),\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n\n // 304 only comes back if the user has passed a conditional option in their\n // request _and_ the remote object has the same etag as what the user passed.\n if (response.statusCode === 304) {\n // this is one of our few 'required' fields so we'll make sure it does get initialized\n // with a value\n response.key = id.key;\n\n // and now we'll undefine all the other properties that are not HTTP related\n makeConfigurationSettingEmpty(response);\n }\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Lists settings from the Azure App Configuration service, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettings\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettings({ labelFilter: \"MyLabel\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettings(\n options: ListConfigurationSettingsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pageEtags = options.pageEtags ? [...options.pageEtags] : undefined;\n delete options.pageEtags;\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const etag = pageEtags?.shift();\n try {\n const response = await this.sendConfigurationSettingsRequest(\n { ...options, etag },\n pageLink,\n );\n const currentResponse: ListConfigurationSettingPage = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n } catch (error) {\n const err = error as RestError;\n\n const link = err.response?.headers?.get(\"link\");\n const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n\n if (err.statusCode === 304) {\n err.message = `Status 304: No updates for this page`;\n logger.info(\n `[listConfigurationSettings] No updates for this page. The current etag for the page is ${etag}`,\n );\n return {\n page: {\n items: [],\n etag,\n _response: { ...err.response, status: 304 },\n } as unknown as ListConfigurationSettingPage,\n nextPageLink: continuationToken,\n };\n }\n\n throw err;\n }\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Lists settings from the Azure App Configuration service for snapshots based on name, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettingsForSnashots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettingsForSnashots({\n * snapshotName: \"MySnapshot\",\n * });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettingsForSnapshot(\n snapshotName: string,\n options: ListConfigurationSettingsForSnapshotOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendConfigurationSettingsRequest(\n { snapshotName, ...options },\n pageLink,\n );\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Get a list of labels from the Azure App Configuration service\n *\n * Example code:\n * ```ts snippet:ListLabels\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listLabels({ nameFilter: \"prod*\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listLabels(\n options: ListLabelsOptions = {},\n ): PagedAsyncIterableIterator<SettingLabel, ListLabelsPage, PageSettings> {\n const pagedResult: PagedResult<ListLabelsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendLabelsRequest(options, pageLink);\n const currentResponse: ListLabelsPage = {\n ...response,\n items: response.items ?? [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendLabelsRequest(\n options: SendLabelsRequestOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetLabelsResponse & HttpResponseField<AppConfigurationGetLabelsHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getLabels({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatLabelsFiltersAndSelect(options),\n after: pageLink,\n });\n\n return response as GetLabelsResponse & HttpResponseField<AppConfigurationGetLabelsHeaders>;\n },\n );\n }\n\n private async sendConfigurationSettingsRequest(\n options: SendConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetKeyValuesResponse & HttpResponseField<AppConfigurationGetKeyValuesHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getKeyValues({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatConfigurationSettingsFiltersAndSelect(options),\n ...checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, { onlyIfChanged: true }),\n after: pageLink,\n });\n\n return response as GetKeyValuesResponse &\n HttpResponseField<AppConfigurationGetKeyValuesHeaders>;\n },\n );\n }\n\n /**\n * Lists revisions of a set of keys, optionally filtered by key names,\n * labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListRevisions\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const revisionsIterator = client.listRevisions({ keys: [\"MyKey\"] });\n * ```\n * @param options - Optional parameters for the request.\n */\n listRevisions(\n options?: ListRevisionsOptions,\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListRevisionsPage, PageSettings> {\n const pagedResult: PagedResult<ListRevisionsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendRevisionsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n // let itemList = currentResponse.items;\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendRevisionsRequest(\n options: ListConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetKeyValuesResponse & HttpResponseField<AppConfigurationGetKeyValuesHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listRevisions\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getRevisions({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatFiltersAndSelect(updatedOptions),\n after: pageLink,\n });\n\n return response as GetRevisionsResponse &\n HttpResponseField<AppConfigurationGetRevisionsHeaders>;\n },\n );\n }\n\n /**\n * Sets the value of a key in the Azure App Configuration service, allowing for an optional etag.\n * @param key - The name of the key.\n * @param configurationSetting - A configuration value.\n * @param options - Optional parameters for the request.\n *\n * Example code:\n * ```ts snippet:SetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * await client.setConfigurationSetting({ key: \"MyKey\", value: \"MyValue\" });\n * ```\n */\n async setConfigurationSetting(\n configurationSetting:\n | SetConfigurationSettingParam\n | SetConfigurationSettingParam<FeatureFlagValue>\n | SetConfigurationSettingParam<SecretReferenceValue>\n | SetConfigurationSettingParam<SnapshotReferenceValue>,\n options: SetConfigurationSettingOptions = {},\n ): Promise<SetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[setConfigurationSetting] Setting new key value\");\n const response = transformKeyValueResponse(\n await this.client.putKeyValue(configurationSetting.key, {\n ...updatedOptions,\n label: configurationSetting.label,\n entity: keyValue,\n ...checkAndFormatIfAndIfNoneMatch(configurationSetting, options),\n }),\n );\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Sets or clears a key's read-only status.\n * @param id - The id of the configuration setting to modify.\n */\n async setReadOnly(\n id: ConfigurationSettingId,\n readOnly: boolean,\n options: SetReadOnlyOptions = {},\n ): Promise<SetReadOnlyResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setReadOnly\",\n options,\n async (newOptions) => {\n let response;\n if (readOnly) {\n logger.info(\"[setReadOnly] Setting read-only status to ${readOnly}\");\n response = await this.client.putLock(id.key, {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n });\n } else {\n logger.info(\"[setReadOnly] Deleting read-only lock\");\n response = await this.client.deleteLock(id.key, {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n });\n }\n response = transformKeyValueResponse(response);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Adds an external synchronization token to ensure service requests receive up-to-date values.\n *\n * @param syncToken - The synchronization token value.\n */\n updateSyncToken(syncToken: string): void {\n this._syncTokens.addSyncTokenFromHeaderValue(syncToken);\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, fails if it\n * already exists.\n */\n beginCreateSnapshot(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<SimplePollerLike<OperationState<CreateSnapshotResponse>, CreateSnapshotResponse>> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshot`,\n options,\n (updatedOptions) =>\n this.client.beginCreateSnapshot(snapshot.name, snapshot, { ...updatedOptions }),\n );\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, waits until it is done,\n * fails if it already exists.\n */\n beginCreateSnapshotAndWait(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<CreateSnapshotResponse> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshotAndWait`,\n options,\n (updatedOptions) =>\n this.client.beginCreateSnapshotAndWait(snapshot.name, snapshot, { ...updatedOptions }),\n );\n }\n\n /**\n * Get a snapshot from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:GetSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const retrievedSnapshot = await client.getSnapshot(\"testsnapshot\");\n * console.log(\"Retrieved snapshot:\", retrievedSnapshot);\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n getSnapshot(name: string, options: GetSnapshotOptions = {}): Promise<GetSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[getSnapshot] Get a snapshot\");\n const originalResponse = await this.client.getSnapshot(name, {\n ...updatedOptions,\n });\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Recover an archived snapshot back to ready status\n *\n * Example usage:\n * ```ts snippet:RecoverSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.recoverSnapshot(\"MySnapshot\");\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n recoverSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.recoverSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[recoverSnapshot] Recover a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n name,\n { status: \"ready\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n /**\n * Archive a ready snapshot\n *\n * Example usage:\n * ```ts snippet:ArchiveSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.archiveSnapshot({ name: \"MySnapshot\" });\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n archiveSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.archiveSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[archiveSnapshot] Archive a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n name,\n { status: \"archived\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * List all snapshots from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:ListSnapshots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const snapshots = await client.listSnapshots();\n *\n * for await (const snapshot of snapshots) {\n * console.log(`Found snapshot: ${snapshot.name}`);\n * }\n * ```\n * @param options - Optional parameters for the request.\n */\n listSnapshots(\n options: ListSnapshotsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSnapshot, ListSnapshotsPage, PageSettings> {\n const pagedResult: PagedResult<ListSnapshotsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendSnapShotsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendSnapShotsRequest(\n options: ListSnapshotsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetSnapshotsResponse & HttpResponseField<AppConfigurationGetSnapshotsHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listSnapshots\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getSnapshots({\n ...updatedOptions,\n ...formatSnapshotFiltersAndSelect(options),\n after: pageLink,\n });\n\n return response as GetSnapshotsResponse &\n HttpResponseField<AppConfigurationGetSnapshotsHeaders>;\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"appConfigurationClient.js","sourceRoot":"","sources":["../../src/appConfigurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAsDlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,+BAA+B,EAAE,MAAM,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OAAO,EAAE,KAAK,EAAE,QAA4B,EAAE,EAAE;gBAC9C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;gBACpE,MAAM,eAAe,GAAG;oBACtB,GAAG,QAAQ;oBACX,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;oBACnD,iBAAiB,EAAE,QAAQ,CAAC,QAAQ;wBAClC,CAAC,CAAC,6BAA6B,CAAC,QAAQ,CAAC,QAAQ,CAAC;wBAClD,CAAC,CAAC,SAAS;iBACd,CAAC;gBACF,OAAO;oBACL,IAAI,EAAE,eAAe;oBACrB,YAAY,EAAE,eAAe,CAAC,iBAAiB;iBAChD,CAAC;YACJ,CAAC;YACD,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK;SACjC,CAAC;QACF,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;IAEO,KAAK,CAAC,oBAAoB,CAChC,UAA+C,EAAE,EACjD,QAA4B;QAE5B,OAAO,aAAa,CAAC,QAAQ,CAC3B,sCAAsC,EACtC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;gBAC9C,GAAG,cAAc;gBACjB,GAAG,8BAA8B,CAAC,OAAO,CAAC;gBAC1C,KAAK,EAAE,QAAQ;aAChB,CAAC,CAAC;YAEH,OAAO,QACiD,CAAC;QAC3D,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// https://azure.github.io/azure-sdk/typescript_design.html#ts-config-lib\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport {\n type AddConfigurationSettingOptions,\n type AddConfigurationSettingParam,\n type AddConfigurationSettingResponse,\n type AppConfigurationClientOptions,\n type ConfigurationSetting,\n type ConfigurationSettingId,\n type CreateSnapshotOptions,\n type CreateSnapshotResponse,\n type DeleteConfigurationSettingOptions,\n type DeleteConfigurationSettingResponse,\n type GetConfigurationSettingOptions,\n type GetConfigurationSettingResponse,\n type GetSnapshotOptions,\n type GetSnapshotResponse,\n type HttpResponseField,\n type ListConfigurationSettingPage,\n type ListConfigurationSettingsForSnapshotOptions,\n type ListConfigurationSettingsOptions,\n type ListLabelsOptions,\n type ListLabelsPage,\n type ListRevisionsOptions,\n type ListRevisionsPage,\n type ListSnapshotsOptions,\n type ListSnapshotsPage,\n type PageSettings,\n type SetConfigurationSettingOptions,\n type SetConfigurationSettingParam,\n type SetConfigurationSettingResponse,\n type SetReadOnlyOptions,\n type SetReadOnlyResponse,\n type SettingLabel,\n type SnapshotInfo,\n type UpdateSnapshotOptions,\n type UpdateSnapshotResponse,\n} from \"./models.js\";\nimport type {\n AppConfigurationGetKeyValuesHeaders,\n AppConfigurationGetRevisionsHeaders,\n AppConfigurationGetSnapshotsHeaders,\n GetKeyValuesResponse,\n GetRevisionsResponse,\n GetSnapshotsResponse,\n ConfigurationSnapshot,\n GetLabelsResponse,\n AppConfigurationGetLabelsHeaders,\n} from \"./generated/src/models/index.js\";\nimport type { InternalClientPipelineOptions } from \"@azure/core-client\";\nimport type { PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { getPagedAsyncIterator } from \"@azure/core-paging\";\nimport type { PipelinePolicy, RestError } from \"@azure/core-rest-pipeline\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { audienceErrorHandlingPolicy } from \"./internal/audienceErrorHandlingPolicy.js\";\nimport { SyncTokens, syncTokenPolicy } from \"./internal/syncTokenPolicy.js\";\nimport { queryParamPolicy } from \"./internal/queryParamPolicy.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type {\n SendConfigurationSettingsOptions,\n SendLabelsRequestOptions,\n} from \"./internal/helpers.js\";\nimport {\n assertResponse,\n checkAndFormatIfAndIfNoneMatch,\n extractAfterTokenFromLinkHeader,\n extractAfterTokenFromNextLink,\n formatAcceptDateTime,\n formatConfigurationSettingsFiltersAndSelect,\n formatFieldsForSelect,\n formatFiltersAndSelect,\n formatLabelsFiltersAndSelect,\n formatSnapshotFiltersAndSelect,\n getScope,\n makeConfigurationSettingEmpty,\n serializeAsConfigurationSettingParam,\n transformKeyValue,\n transformKeyValueResponse,\n transformKeyValueResponseWithStatusCode,\n transformSnapshotResponse,\n} from \"./internal/helpers.js\";\nimport { AppConfiguration } from \"./generated/src/appConfiguration.js\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport { appConfigKeyCredentialPolicy } from \"./appConfigCredential.js\";\nimport { tracingClient } from \"./internal/tracing.js\";\nimport { logger } from \"./logger.js\";\nimport type { OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport { appConfigurationApiVersion } from \"./internal/constants.js\";\n\nconst ConnectionStringRegex = /Endpoint=(.*);Id=(.*);Secret=(.*)/;\nconst deserializationContentTypes = {\n json: [\n \"application/vnd.microsoft.appconfig.kvset+json\",\n \"application/vnd.microsoft.appconfig.kv+json\",\n \"application/vnd.microsoft.appconfig.kvs+json\",\n \"application/vnd.microsoft.appconfig.keyset+json\",\n \"application/vnd.microsoft.appconfig.revs+json\",\n \"application/vnd.microsoft.appconfig.snapshotset+json\",\n \"application/vnd.microsoft.appconfig.snapshot+json\",\n \"application/vnd.microsoft.appconfig.labelset+json\",\n \"application/json\",\n ],\n};\n\n/**\n * Provides internal configuration options for AppConfigurationClient.\n * @internal\n */\nexport interface InternalAppConfigurationClientOptions extends AppConfigurationClientOptions {\n /**\n * The sync token cache to use for this client.\n * NOTE: this is an internal option, not for general client usage.\n */\n syncTokens?: SyncTokens;\n}\n\n/**\n * Client for the Azure App Configuration service.\n */\nexport class AppConfigurationClient {\n private client: AppConfiguration;\n private _syncTokens: SyncTokens;\n\n /**\n * Initializes a new instance of the AppConfigurationClient class.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(connectionString: string, options?: AppConfigurationClientOptions);\n /**\n * Initializes a new instance of the AppConfigurationClient class using\n * a TokenCredential.\n * @param endpoint - The endpoint of the App Configuration service (ex: https://sample.azconfig.io).\n * @param tokenCredential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(\n endpoint: string,\n tokenCredential: TokenCredential,\n options?: AppConfigurationClientOptions,\n );\n constructor(\n connectionStringOrEndpoint: string,\n tokenCredentialOrOptions?: TokenCredential | AppConfigurationClientOptions,\n options?: AppConfigurationClientOptions,\n ) {\n let appConfigOptions: InternalAppConfigurationClientOptions = {};\n let appConfigCredential: TokenCredential;\n let appConfigEndpoint: string;\n let authPolicy: PipelinePolicy;\n let scope: string;\n\n if (isTokenCredential(tokenCredentialOrOptions)) {\n appConfigOptions = (options as InternalAppConfigurationClientOptions) || {};\n appConfigCredential = tokenCredentialOrOptions;\n appConfigEndpoint = connectionStringOrEndpoint.endsWith(\"/\")\n ? connectionStringOrEndpoint.slice(0, -1)\n : connectionStringOrEndpoint;\n scope = getScope(appConfigEndpoint, appConfigOptions.audience);\n authPolicy = bearerTokenAuthenticationPolicy({\n scopes: scope,\n credential: appConfigCredential,\n });\n } else {\n appConfigOptions = (tokenCredentialOrOptions as InternalAppConfigurationClientOptions) || {};\n const regexMatch = connectionStringOrEndpoint?.match(ConnectionStringRegex);\n if (regexMatch) {\n appConfigEndpoint = regexMatch[1];\n authPolicy = appConfigKeyCredentialPolicy(regexMatch[2], regexMatch[3]);\n } else {\n throw new Error(\n `Invalid connection string. Valid connection strings should match the regex '${ConnectionStringRegex.source}'.` +\n ` To mitigate the issue, please refer to the troubleshooting guide here at https://aka.ms/azsdk/js/app-configuration/troubleshoot.`,\n );\n }\n }\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...appConfigOptions,\n loggingOptions: {\n logger: logger.info,\n },\n deserializationOptions: {\n expectedContentTypes: deserializationContentTypes,\n },\n };\n\n this._syncTokens = appConfigOptions.syncTokens || new SyncTokens();\n this.client = new AppConfiguration(\n appConfigEndpoint,\n options?.apiVersion ?? appConfigurationApiVersion,\n internalClientPipelineOptions,\n );\n this.client.pipeline.addPolicy(\n audienceErrorHandlingPolicy(appConfigOptions?.audience !== undefined),\n {\n phase: \"Sign\",\n beforePolicies: [authPolicy.name],\n },\n );\n this.client.pipeline.addPolicy(authPolicy, { phase: \"Sign\" });\n this.client.pipeline.addPolicy(queryParamPolicy());\n this.client.pipeline.addPolicy(syncTokenPolicy(this._syncTokens), { afterPhase: \"Retry\" });\n }\n\n /**\n * Add a setting into the Azure App Configuration service, failing if it\n * already exists.\n *\n * Example usage:\n * ```ts snippet:AddConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.addConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * value: \"MyValue\",\n * });\n * ```\n * @param configurationSetting - A configuration setting.\n * @param options - Optional parameters for the request.\n */\n addConfigurationSetting(\n configurationSetting:\n | AddConfigurationSettingParam\n | AddConfigurationSettingParam<FeatureFlagValue>\n | AddConfigurationSettingParam<SecretReferenceValue>\n | AddConfigurationSettingParam<SnapshotReferenceValue>,\n options: AddConfigurationSettingOptions = {},\n ): Promise<AddConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.addConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[addConfigurationSetting] Creating a key value pair\");\n try {\n const originalResponse = await this.client.putKeyValue(configurationSetting.key, {\n ifNoneMatch: \"*\",\n label: configurationSetting.label,\n entity: keyValue,\n ...updatedOptions,\n });\n const response = transformKeyValueResponse(originalResponse);\n assertResponse(response);\n return response;\n } catch (error) {\n const err = error as RestError;\n // Service does not return an error message. Raise a 412 error similar to .NET\n if (err.statusCode === 412) {\n err.message = `Status 412: Setting was already present`;\n }\n throw err;\n }\n throw new Error(\"Unreachable code\");\n },\n );\n }\n\n /**\n * Delete a setting from the Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:DeleteConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const deletedSetting = await client.deleteConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * });\n * ```\n * @param id - The id of the configuration setting to delete.\n * @param options - Optional parameters for the request (ex: etag, label)\n */\n deleteConfigurationSetting(\n id: ConfigurationSettingId,\n options: DeleteConfigurationSettingOptions = {},\n ): Promise<DeleteConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.deleteConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n logger.info(\"[deleteConfigurationSetting] Deleting key value pair\");\n const originalResponse = await this.client.deleteKeyValue(id.key, {\n label: id.label,\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Gets a setting from the Azure App Configuration service.\n *\n * Example code:\n * ```ts snippet:GetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const setting = await client.getConfigurationSetting({ key: \"MyKey\", label: \"MyLabel\" });\n * ```\n * @param id - The id of the configuration setting to get.\n * @param options - Optional parameters for the request.\n */\n async getConfigurationSetting(\n id: ConfigurationSettingId,\n options: GetConfigurationSettingOptions = {},\n ): Promise<GetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n logger.info(\"[getConfigurationSetting] Getting key value pair\");\n const originalResponse = await this.client.getKeyValue(id.key, {\n ...updatedOptions,\n label: id.label,\n select: formatFieldsForSelect(options.fields),\n ...formatAcceptDateTime(options),\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n\n // 304 only comes back if the user has passed a conditional option in their\n // request _and_ the remote object has the same etag as what the user passed.\n if (response.statusCode === 304) {\n // this is one of our few 'required' fields so we'll make sure it does get initialized\n // with a value\n response.key = id.key;\n\n // and now we'll undefine all the other properties that are not HTTP related\n makeConfigurationSettingEmpty(response);\n }\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Lists settings from the Azure App Configuration service, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettings\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettings({ labelFilter: \"MyLabel\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettings(\n options: ListConfigurationSettingsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pageEtags = options.pageEtags ? [...options.pageEtags] : undefined;\n delete options.pageEtags;\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const etag = pageEtags?.shift();\n try {\n const response = await this.sendConfigurationSettingsRequest(\n { ...options, etag },\n pageLink,\n );\n const currentResponse: ListConfigurationSettingPage = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n } catch (error) {\n const err = error as RestError;\n\n const link = err.response?.headers?.get(\"link\");\n const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n\n if (err.statusCode === 304) {\n err.message = `Status 304: No updates for this page`;\n logger.info(\n `[listConfigurationSettings] No updates for this page. The current etag for the page is ${etag}`,\n );\n return {\n page: {\n items: [],\n etag,\n _response: { ...err.response, status: 304 },\n } as unknown as ListConfigurationSettingPage,\n nextPageLink: continuationToken,\n };\n }\n\n throw err;\n }\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Lists settings from the Azure App Configuration service for snapshots based on name, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettingsForSnashots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettingsForSnashots({\n * snapshotName: \"MySnapshot\",\n * });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettingsForSnapshot(\n snapshotName: string,\n options: ListConfigurationSettingsForSnapshotOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendConfigurationSettingsRequest(\n { snapshotName, ...options },\n pageLink,\n );\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Get a list of labels from the Azure App Configuration service\n *\n * Example code:\n * ```ts snippet:ListLabels\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listLabels({ nameFilter: \"prod*\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listLabels(\n options: ListLabelsOptions = {},\n ): PagedAsyncIterableIterator<SettingLabel, ListLabelsPage, PageSettings> {\n const pagedResult: PagedResult<ListLabelsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendLabelsRequest(options, pageLink);\n const currentResponse: ListLabelsPage = {\n ...response,\n items: response.items ?? [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendLabelsRequest(\n options: SendLabelsRequestOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetLabelsResponse & HttpResponseField<AppConfigurationGetLabelsHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getLabels({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatLabelsFiltersAndSelect(options),\n after: pageLink,\n });\n\n return response as GetLabelsResponse & HttpResponseField<AppConfigurationGetLabelsHeaders>;\n },\n );\n }\n\n private async sendConfigurationSettingsRequest(\n options: SendConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetKeyValuesResponse & HttpResponseField<AppConfigurationGetKeyValuesHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getKeyValues({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatConfigurationSettingsFiltersAndSelect(options),\n ...checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, { onlyIfChanged: true }),\n after: pageLink,\n });\n\n return response as GetKeyValuesResponse &\n HttpResponseField<AppConfigurationGetKeyValuesHeaders>;\n },\n );\n }\n\n /**\n * Lists revisions of a set of keys, optionally filtered by key names,\n * labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListRevisions\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const revisionsIterator = client.listRevisions({ keys: [\"MyKey\"] });\n * ```\n * @param options - Optional parameters for the request.\n */\n listRevisions(\n options?: ListRevisionsOptions,\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListRevisionsPage, PageSettings> {\n const pagedResult: PagedResult<ListRevisionsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendRevisionsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n // let itemList = currentResponse.items;\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendRevisionsRequest(\n options: ListConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetKeyValuesResponse & HttpResponseField<AppConfigurationGetKeyValuesHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listRevisions\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getRevisions({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatFiltersAndSelect(updatedOptions),\n after: pageLink,\n });\n\n return response as GetRevisionsResponse &\n HttpResponseField<AppConfigurationGetRevisionsHeaders>;\n },\n );\n }\n\n /**\n * Sets the value of a key in the Azure App Configuration service, allowing for an optional etag.\n * @param key - The name of the key.\n * @param configurationSetting - A configuration value.\n * @param options - Optional parameters for the request.\n *\n * Example code:\n * ```ts snippet:SetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * await client.setConfigurationSetting({ key: \"MyKey\", value: \"MyValue\" });\n * ```\n */\n async setConfigurationSetting(\n configurationSetting:\n | SetConfigurationSettingParam\n | SetConfigurationSettingParam<FeatureFlagValue>\n | SetConfigurationSettingParam<SecretReferenceValue>\n | SetConfigurationSettingParam<SnapshotReferenceValue>,\n options: SetConfigurationSettingOptions = {},\n ): Promise<SetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[setConfigurationSetting] Setting new key value\");\n const response = transformKeyValueResponse(\n await this.client.putKeyValue(configurationSetting.key, {\n ...updatedOptions,\n label: configurationSetting.label,\n entity: keyValue,\n ...checkAndFormatIfAndIfNoneMatch(configurationSetting, options),\n }),\n );\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Sets or clears a key's read-only status.\n * @param id - The id of the configuration setting to modify.\n */\n async setReadOnly(\n id: ConfigurationSettingId,\n readOnly: boolean,\n options: SetReadOnlyOptions = {},\n ): Promise<SetReadOnlyResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setReadOnly\",\n options,\n async (newOptions) => {\n let response;\n if (readOnly) {\n logger.info(\"[setReadOnly] Setting read-only status to ${readOnly}\");\n response = await this.client.putLock(id.key, {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n });\n } else {\n logger.info(\"[setReadOnly] Deleting read-only lock\");\n response = await this.client.deleteLock(id.key, {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n });\n }\n response = transformKeyValueResponse(response);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Adds an external synchronization token to ensure service requests receive up-to-date values.\n *\n * @param syncToken - The synchronization token value.\n */\n updateSyncToken(syncToken: string): void {\n this._syncTokens.addSyncTokenFromHeaderValue(syncToken);\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, fails if it\n * already exists.\n */\n beginCreateSnapshot(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<SimplePollerLike<OperationState<CreateSnapshotResponse>, CreateSnapshotResponse>> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshot`,\n options,\n (updatedOptions) =>\n this.client.beginCreateSnapshot(snapshot.name, snapshot, { ...updatedOptions }),\n );\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, waits until it is done,\n * fails if it already exists.\n */\n beginCreateSnapshotAndWait(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<CreateSnapshotResponse> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshotAndWait`,\n options,\n (updatedOptions) =>\n this.client.beginCreateSnapshotAndWait(snapshot.name, snapshot, { ...updatedOptions }),\n );\n }\n\n /**\n * Get a snapshot from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:GetSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const retrievedSnapshot = await client.getSnapshot(\"testsnapshot\");\n * console.log(\"Retrieved snapshot:\", retrievedSnapshot);\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n getSnapshot(name: string, options: GetSnapshotOptions = {}): Promise<GetSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[getSnapshot] Get a snapshot\");\n const originalResponse = await this.client.getSnapshot(name, {\n ...updatedOptions,\n });\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Recover an archived snapshot back to ready status\n *\n * Example usage:\n * ```ts snippet:RecoverSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.recoverSnapshot(\"MySnapshot\");\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n recoverSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.recoverSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[recoverSnapshot] Recover a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n name,\n { status: \"ready\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n /**\n * Archive a ready snapshot\n *\n * Example usage:\n * ```ts snippet:ArchiveSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.archiveSnapshot({ name: \"MySnapshot\" });\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n archiveSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.archiveSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[archiveSnapshot] Archive a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n name,\n { status: \"archived\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * List all snapshots from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:ListSnapshots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const snapshots = await client.listSnapshots();\n *\n * for await (const snapshot of snapshots) {\n * console.log(`Found snapshot: ${snapshot.name}`);\n * }\n * ```\n * @param options - Optional parameters for the request.\n */\n listSnapshots(\n options: ListSnapshotsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSnapshot, ListSnapshotsPage, PageSettings> {\n const pagedResult: PagedResult<ListSnapshotsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendSnapShotsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendSnapShotsRequest(\n options: ListSnapshotsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetSnapshotsResponse & HttpResponseField<AppConfigurationGetSnapshotsHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listSnapshots\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getSnapshots({\n ...updatedOptions,\n ...formatSnapshotFiltersAndSelect(options),\n after: pageLink,\n });\n\n return response as GetSnapshotsResponse &\n HttpResponseField<AppConfigurationGetSnapshotsHeaders>;\n },\n );\n }\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import { type PipelinePolicy } from "@azure/core-rest-pipeline";
2
+ /**
3
+ * Creates a PipelinePolicy that provides more helpful errors when Entra ID audience misconfiguration is detected.
4
+ */
5
+ export declare function audienceErrorHandlingPolicy(isAudienceConfigured: boolean): PipelinePolicy;
6
+ //# sourceMappingURL=audienceErrorHandlingPolicy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audienceErrorHandlingPolicy.d.ts","sourceRoot":"","sources":["../../../src/internal/audienceErrorHandlingPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EAIpB,MAAM,2BAA2B,CAAC;AAQnC;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,oBAAoB,EAAE,OAAO,GAAG,cAAc,CAkBzF"}
@@ -0,0 +1,31 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { RestError, } from "@azure/core-rest-pipeline";
4
+ const AadAudienceErrorCode = "AADSTS500011";
5
+ const NoAudienceErrorMessage = "Unable to authenticate to Azure App Configuration. No authentication token audience was provided. Please set AppConfigurationClientOptions.audience to the appropriate audience for the target cloud. For details on how to configure the authentication token audience visit https://aka.ms/appconfig/client-token-audience.";
6
+ const WrongAudienceErrorMessage = "Unable to authenticate to Azure App Configuration. An incorrect token audience was provided. Please set AppConfigurationClientOptions.audience to the appropriate audience for the target cloud. For details on how to configure the authentication token audience visit https://aka.ms/appconfig/client-token-audience.";
7
+ /**
8
+ * Creates a PipelinePolicy that provides more helpful errors when Entra ID audience misconfiguration is detected.
9
+ */
10
+ export function audienceErrorHandlingPolicy(isAudienceConfigured) {
11
+ return {
12
+ name: "audienceErrorHandlingPolicy",
13
+ async sendRequest(request, next) {
14
+ try {
15
+ return await next(request);
16
+ }
17
+ catch (error) {
18
+ if (typeof error.message === "string" && error.message.includes(AadAudienceErrorCode)) {
19
+ if (isAudienceConfigured) {
20
+ throw new RestError(WrongAudienceErrorMessage);
21
+ }
22
+ else {
23
+ throw new RestError(NoAudienceErrorMessage);
24
+ }
25
+ }
26
+ throw error;
27
+ }
28
+ },
29
+ };
30
+ }
31
+ //# sourceMappingURL=audienceErrorHandlingPolicy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audienceErrorHandlingPolicy.js","sourceRoot":"","sources":["../../../src/internal/audienceErrorHandlingPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,SAAS,GAKV,MAAM,2BAA2B,CAAC;AAEnC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAC5C,MAAM,sBAAsB,GAC1B,+TAA+T,CAAC;AAClU,MAAM,yBAAyB,GAC7B,0TAA0T,CAAC;AAE7T;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,oBAA6B;IACvE,OAAO;QACL,IAAI,EAAE,6BAA6B;QACnC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,CAAC;gBACH,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC;YAC7B,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC;oBACtF,IAAI,oBAAoB,EAAE,CAAC;wBACzB,MAAM,IAAI,SAAS,CAAC,yBAAyB,CAAC,CAAC;oBACjD,CAAC;yBAAM,CAAC;wBACN,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;oBAC9C,CAAC;gBACH,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n RestError,\n type PipelinePolicy,\n type PipelineRequest,\n type PipelineResponse,\n type SendRequest,\n} from \"@azure/core-rest-pipeline\";\n\nconst AadAudienceErrorCode = \"AADSTS500011\";\nconst NoAudienceErrorMessage =\n \"Unable to authenticate to Azure App Configuration. No authentication token audience was provided. Please set AppConfigurationClientOptions.audience to the appropriate audience for the target cloud. For details on how to configure the authentication token audience visit https://aka.ms/appconfig/client-token-audience.\";\nconst WrongAudienceErrorMessage =\n \"Unable to authenticate to Azure App Configuration. An incorrect token audience was provided. Please set AppConfigurationClientOptions.audience to the appropriate audience for the target cloud. For details on how to configure the authentication token audience visit https://aka.ms/appconfig/client-token-audience.\";\n\n/**\n * Creates a PipelinePolicy that provides more helpful errors when Entra ID audience misconfiguration is detected.\n */\nexport function audienceErrorHandlingPolicy(isAudienceConfigured: boolean): PipelinePolicy {\n return {\n name: \"audienceErrorHandlingPolicy\",\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n try {\n return await next(request);\n } catch (error: any) {\n if (typeof error.message === \"string\" && error.message.includes(AadAudienceErrorCode)) {\n if (isAudienceConfigured) {\n throw new RestError(WrongAudienceErrorMessage);\n } else {\n throw new RestError(NoAudienceErrorMessage);\n }\n }\n throw error;\n }\n },\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"appConfigurationClient.d.ts","sourceRoot":"","sources":["../../src/appConfigurationClient.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,iCAAiC,EACtC,KAAK,kCAAkC,EACvC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAExB,KAAK,4BAA4B,EACjC,KAAK,2CAA2C,EAChD,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACvB,KAAK,mBAAm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jC,0BAA0B,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,YAAY,CAAC;YAsBvE,oBAAoB;CAmBnC"}
@@ -2,6 +2,7 @@
2
2
  // Licensed under the MIT License.
3
3
  import { getPagedAsyncIterator } from "@azure/core-paging";
4
4
  import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline";
5
+ import { audienceErrorHandlingPolicy } from "./internal/audienceErrorHandlingPolicy.js";
5
6
  import { SyncTokens, syncTokenPolicy } from "./internal/syncTokenPolicy.js";
6
7
  import { queryParamPolicy } from "./internal/queryParamPolicy.js";
7
8
  import { isTokenCredential } from "@azure/core-auth";
@@ -72,6 +73,10 @@ export class AppConfigurationClient {
72
73
  };
73
74
  this._syncTokens = appConfigOptions.syncTokens || new SyncTokens();
74
75
  this.client = new AppConfiguration(appConfigEndpoint, options?.apiVersion ?? appConfigurationApiVersion, internalClientPipelineOptions);
76
+ this.client.pipeline.addPolicy(audienceErrorHandlingPolicy(appConfigOptions?.audience !== undefined), {
77
+ phase: "Sign",
78
+ beforePolicies: [authPolicy.name],
79
+ });
75
80
  this.client.pipeline.addPolicy(authPolicy, { phase: "Sign" });
76
81
  this.client.pipeline.addPolicy(queryParamPolicy());
77
82
  this.client.pipeline.addPolicy(syncTokenPolicy(this._syncTokens), { afterPhase: "Retry" });
@@ -1 +1 @@
1
- {"version":3,"file":"appConfigurationClient.js","sourceRoot":"","sources":["../../src/appConfigurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAsDlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAKrD,OAAO,EACL,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E,eAAe;oBACrB,YAAY,EAAE,eAAe,CAAC,iBAAiB;iBAChD,CAAC;YACJ,CAAC;YACD,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK;SACjC,CAAC;QACF,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;IAEO,KAAK,CAAC,oBAAoB,CAChC,UAA+C,EAAE,EACjD,QAA4B;QAE5B,OAAO,aAAa,CAAC,QAAQ,CAC3B,sCAAsC,EACtC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;gBAC9C,GAAG,cAAc;gBACjB,GAAG,8BAA8B,CAAC,OAAO,CAAC;gBAC1C,KAAK,EAAE,QAAQ;aAChB,CAAC,CAAC;YAEH,OAAO,QACiD,CAAC;QAC3D,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// https://azure.github.io/azure-sdk/typescript_design.html#ts-config-lib\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport {\n type AddConfigurationSettingOptions,\n type AddConfigurationSettingParam,\n type AddConfigurationSettingResponse,\n type AppConfigurationClientOptions,\n type ConfigurationSetting,\n type ConfigurationSettingId,\n type CreateSnapshotOptions,\n type CreateSnapshotResponse,\n type DeleteConfigurationSettingOptions,\n type DeleteConfigurationSettingResponse,\n type GetConfigurationSettingOptions,\n type GetConfigurationSettingResponse,\n type GetSnapshotOptions,\n type GetSnapshotResponse,\n type HttpResponseField,\n type ListConfigurationSettingPage,\n type ListConfigurationSettingsForSnapshotOptions,\n type ListConfigurationSettingsOptions,\n type ListLabelsOptions,\n type ListLabelsPage,\n type ListRevisionsOptions,\n type ListRevisionsPage,\n type ListSnapshotsOptions,\n type ListSnapshotsPage,\n type PageSettings,\n type SetConfigurationSettingOptions,\n type SetConfigurationSettingParam,\n type SetConfigurationSettingResponse,\n type SetReadOnlyOptions,\n type SetReadOnlyResponse,\n type SettingLabel,\n type SnapshotInfo,\n type UpdateSnapshotOptions,\n type UpdateSnapshotResponse,\n} from \"./models.js\";\nimport type {\n AppConfigurationGetKeyValuesHeaders,\n AppConfigurationGetRevisionsHeaders,\n AppConfigurationGetSnapshotsHeaders,\n GetKeyValuesResponse,\n GetRevisionsResponse,\n GetSnapshotsResponse,\n ConfigurationSnapshot,\n GetLabelsResponse,\n AppConfigurationGetLabelsHeaders,\n} from \"./generated/src/models/index.js\";\nimport type { InternalClientPipelineOptions } from \"@azure/core-client\";\nimport type { PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { getPagedAsyncIterator } from \"@azure/core-paging\";\nimport type { PipelinePolicy, RestError } from \"@azure/core-rest-pipeline\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { SyncTokens, syncTokenPolicy } from \"./internal/syncTokenPolicy.js\";\nimport { queryParamPolicy } from \"./internal/queryParamPolicy.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type {\n SendConfigurationSettingsOptions,\n SendLabelsRequestOptions,\n} from \"./internal/helpers.js\";\nimport {\n assertResponse,\n checkAndFormatIfAndIfNoneMatch,\n extractAfterTokenFromLinkHeader,\n extractAfterTokenFromNextLink,\n formatAcceptDateTime,\n formatConfigurationSettingsFiltersAndSelect,\n formatFieldsForSelect,\n formatFiltersAndSelect,\n formatLabelsFiltersAndSelect,\n formatSnapshotFiltersAndSelect,\n getScope,\n makeConfigurationSettingEmpty,\n serializeAsConfigurationSettingParam,\n transformKeyValue,\n transformKeyValueResponse,\n transformKeyValueResponseWithStatusCode,\n transformSnapshotResponse,\n} from \"./internal/helpers.js\";\nimport { AppConfiguration } from \"./generated/src/appConfiguration.js\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport { appConfigKeyCredentialPolicy } from \"./appConfigCredential.js\";\nimport { tracingClient } from \"./internal/tracing.js\";\nimport { logger } from \"./logger.js\";\nimport type { OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport { appConfigurationApiVersion } from \"./internal/constants.js\";\n\nconst ConnectionStringRegex = /Endpoint=(.*);Id=(.*);Secret=(.*)/;\nconst deserializationContentTypes = {\n json: [\n \"application/vnd.microsoft.appconfig.kvset+json\",\n \"application/vnd.microsoft.appconfig.kv+json\",\n \"application/vnd.microsoft.appconfig.kvs+json\",\n \"application/vnd.microsoft.appconfig.keyset+json\",\n \"application/vnd.microsoft.appconfig.revs+json\",\n \"application/vnd.microsoft.appconfig.snapshotset+json\",\n \"application/vnd.microsoft.appconfig.snapshot+json\",\n \"application/vnd.microsoft.appconfig.labelset+json\",\n \"application/json\",\n ],\n};\n\n/**\n * Provides internal configuration options for AppConfigurationClient.\n * @internal\n */\nexport interface InternalAppConfigurationClientOptions extends AppConfigurationClientOptions {\n /**\n * The sync token cache to use for this client.\n * NOTE: this is an internal option, not for general client usage.\n */\n syncTokens?: SyncTokens;\n}\n\n/**\n * Client for the Azure App Configuration service.\n */\nexport class AppConfigurationClient {\n private client: AppConfiguration;\n private _syncTokens: SyncTokens;\n\n /**\n * Initializes a new instance of the AppConfigurationClient class.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(connectionString: string, options?: AppConfigurationClientOptions);\n /**\n * Initializes a new instance of the AppConfigurationClient class using\n * a TokenCredential.\n * @param endpoint - The endpoint of the App Configuration service (ex: https://sample.azconfig.io).\n * @param tokenCredential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(\n endpoint: string,\n tokenCredential: TokenCredential,\n options?: AppConfigurationClientOptions,\n );\n constructor(\n connectionStringOrEndpoint: string,\n tokenCredentialOrOptions?: TokenCredential | AppConfigurationClientOptions,\n options?: AppConfigurationClientOptions,\n ) {\n let appConfigOptions: InternalAppConfigurationClientOptions = {};\n let appConfigCredential: TokenCredential;\n let appConfigEndpoint: string;\n let authPolicy: PipelinePolicy;\n let scope: string;\n\n if (isTokenCredential(tokenCredentialOrOptions)) {\n appConfigOptions = (options as InternalAppConfigurationClientOptions) || {};\n appConfigCredential = tokenCredentialOrOptions;\n appConfigEndpoint = connectionStringOrEndpoint.endsWith(\"/\")\n ? connectionStringOrEndpoint.slice(0, -1)\n : connectionStringOrEndpoint;\n scope = getScope(appConfigEndpoint, appConfigOptions.audience);\n authPolicy = bearerTokenAuthenticationPolicy({\n scopes: scope,\n credential: appConfigCredential,\n });\n } else {\n appConfigOptions = (tokenCredentialOrOptions as InternalAppConfigurationClientOptions) || {};\n const regexMatch = connectionStringOrEndpoint?.match(ConnectionStringRegex);\n if (regexMatch) {\n appConfigEndpoint = regexMatch[1];\n authPolicy = appConfigKeyCredentialPolicy(regexMatch[2], regexMatch[3]);\n } else {\n throw new Error(\n `Invalid connection string. Valid connection strings should match the regex '${ConnectionStringRegex.source}'.` +\n ` To mitigate the issue, please refer to the troubleshooting guide here at https://aka.ms/azsdk/js/app-configuration/troubleshoot.`,\n );\n }\n }\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...appConfigOptions,\n loggingOptions: {\n logger: logger.info,\n },\n deserializationOptions: {\n expectedContentTypes: deserializationContentTypes,\n },\n };\n\n this._syncTokens = appConfigOptions.syncTokens || new SyncTokens();\n this.client = new AppConfiguration(\n appConfigEndpoint,\n options?.apiVersion ?? appConfigurationApiVersion,\n internalClientPipelineOptions,\n );\n this.client.pipeline.addPolicy(authPolicy, { phase: \"Sign\" });\n this.client.pipeline.addPolicy(queryParamPolicy());\n this.client.pipeline.addPolicy(syncTokenPolicy(this._syncTokens), { afterPhase: \"Retry\" });\n }\n\n /**\n * Add a setting into the Azure App Configuration service, failing if it\n * already exists.\n *\n * Example usage:\n * ```ts snippet:AddConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.addConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * value: \"MyValue\",\n * });\n * ```\n * @param configurationSetting - A configuration setting.\n * @param options - Optional parameters for the request.\n */\n addConfigurationSetting(\n configurationSetting:\n | AddConfigurationSettingParam\n | AddConfigurationSettingParam<FeatureFlagValue>\n | AddConfigurationSettingParam<SecretReferenceValue>\n | AddConfigurationSettingParam<SnapshotReferenceValue>,\n options: AddConfigurationSettingOptions = {},\n ): Promise<AddConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.addConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[addConfigurationSetting] Creating a key value pair\");\n try {\n const originalResponse = await this.client.putKeyValue(configurationSetting.key, {\n ifNoneMatch: \"*\",\n label: configurationSetting.label,\n entity: keyValue,\n ...updatedOptions,\n });\n const response = transformKeyValueResponse(originalResponse);\n assertResponse(response);\n return response;\n } catch (error) {\n const err = error as RestError;\n // Service does not return an error message. Raise a 412 error similar to .NET\n if (err.statusCode === 412) {\n err.message = `Status 412: Setting was already present`;\n }\n throw err;\n }\n throw new Error(\"Unreachable code\");\n },\n );\n }\n\n /**\n * Delete a setting from the Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:DeleteConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const deletedSetting = await client.deleteConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * });\n * ```\n * @param id - The id of the configuration setting to delete.\n * @param options - Optional parameters for the request (ex: etag, label)\n */\n deleteConfigurationSetting(\n id: ConfigurationSettingId,\n options: DeleteConfigurationSettingOptions = {},\n ): Promise<DeleteConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.deleteConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n logger.info(\"[deleteConfigurationSetting] Deleting key value pair\");\n const originalResponse = await this.client.deleteKeyValue(id.key, {\n label: id.label,\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Gets a setting from the Azure App Configuration service.\n *\n * Example code:\n * ```ts snippet:GetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const setting = await client.getConfigurationSetting({ key: \"MyKey\", label: \"MyLabel\" });\n * ```\n * @param id - The id of the configuration setting to get.\n * @param options - Optional parameters for the request.\n */\n async getConfigurationSetting(\n id: ConfigurationSettingId,\n options: GetConfigurationSettingOptions = {},\n ): Promise<GetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n logger.info(\"[getConfigurationSetting] Getting key value pair\");\n const originalResponse = await this.client.getKeyValue(id.key, {\n ...updatedOptions,\n label: id.label,\n select: formatFieldsForSelect(options.fields),\n ...formatAcceptDateTime(options),\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n\n // 304 only comes back if the user has passed a conditional option in their\n // request _and_ the remote object has the same etag as what the user passed.\n if (response.statusCode === 304) {\n // this is one of our few 'required' fields so we'll make sure it does get initialized\n // with a value\n response.key = id.key;\n\n // and now we'll undefine all the other properties that are not HTTP related\n makeConfigurationSettingEmpty(response);\n }\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Lists settings from the Azure App Configuration service, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettings\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettings({ labelFilter: \"MyLabel\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettings(\n options: ListConfigurationSettingsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pageEtags = options.pageEtags ? [...options.pageEtags] : undefined;\n delete options.pageEtags;\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const etag = pageEtags?.shift();\n try {\n const response = await this.sendConfigurationSettingsRequest(\n { ...options, etag },\n pageLink,\n );\n const currentResponse: ListConfigurationSettingPage = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n } catch (error) {\n const err = error as RestError;\n\n const link = err.response?.headers?.get(\"link\");\n const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n\n if (err.statusCode === 304) {\n err.message = `Status 304: No updates for this page`;\n logger.info(\n `[listConfigurationSettings] No updates for this page. The current etag for the page is ${etag}`,\n );\n return {\n page: {\n items: [],\n etag,\n _response: { ...err.response, status: 304 },\n } as unknown as ListConfigurationSettingPage,\n nextPageLink: continuationToken,\n };\n }\n\n throw err;\n }\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Lists settings from the Azure App Configuration service for snapshots based on name, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettingsForSnashots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettingsForSnashots({\n * snapshotName: \"MySnapshot\",\n * });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettingsForSnapshot(\n snapshotName: string,\n options: ListConfigurationSettingsForSnapshotOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendConfigurationSettingsRequest(\n { snapshotName, ...options },\n pageLink,\n );\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Get a list of labels from the Azure App Configuration service\n *\n * Example code:\n * ```ts snippet:ListLabels\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listLabels({ nameFilter: \"prod*\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listLabels(\n options: ListLabelsOptions = {},\n ): PagedAsyncIterableIterator<SettingLabel, ListLabelsPage, PageSettings> {\n const pagedResult: PagedResult<ListLabelsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendLabelsRequest(options, pageLink);\n const currentResponse: ListLabelsPage = {\n ...response,\n items: response.items ?? [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendLabelsRequest(\n options: SendLabelsRequestOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetLabelsResponse & HttpResponseField<AppConfigurationGetLabelsHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getLabels({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatLabelsFiltersAndSelect(options),\n after: pageLink,\n });\n\n return response as GetLabelsResponse & HttpResponseField<AppConfigurationGetLabelsHeaders>;\n },\n );\n }\n\n private async sendConfigurationSettingsRequest(\n options: SendConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetKeyValuesResponse & HttpResponseField<AppConfigurationGetKeyValuesHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getKeyValues({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatConfigurationSettingsFiltersAndSelect(options),\n ...checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, { onlyIfChanged: true }),\n after: pageLink,\n });\n\n return response as GetKeyValuesResponse &\n HttpResponseField<AppConfigurationGetKeyValuesHeaders>;\n },\n );\n }\n\n /**\n * Lists revisions of a set of keys, optionally filtered by key names,\n * labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListRevisions\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const revisionsIterator = client.listRevisions({ keys: [\"MyKey\"] });\n * ```\n * @param options - Optional parameters for the request.\n */\n listRevisions(\n options?: ListRevisionsOptions,\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListRevisionsPage, PageSettings> {\n const pagedResult: PagedResult<ListRevisionsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendRevisionsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n // let itemList = currentResponse.items;\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendRevisionsRequest(\n options: ListConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetKeyValuesResponse & HttpResponseField<AppConfigurationGetKeyValuesHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listRevisions\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getRevisions({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatFiltersAndSelect(updatedOptions),\n after: pageLink,\n });\n\n return response as GetRevisionsResponse &\n HttpResponseField<AppConfigurationGetRevisionsHeaders>;\n },\n );\n }\n\n /**\n * Sets the value of a key in the Azure App Configuration service, allowing for an optional etag.\n * @param key - The name of the key.\n * @param configurationSetting - A configuration value.\n * @param options - Optional parameters for the request.\n *\n * Example code:\n * ```ts snippet:SetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * await client.setConfigurationSetting({ key: \"MyKey\", value: \"MyValue\" });\n * ```\n */\n async setConfigurationSetting(\n configurationSetting:\n | SetConfigurationSettingParam\n | SetConfigurationSettingParam<FeatureFlagValue>\n | SetConfigurationSettingParam<SecretReferenceValue>\n | SetConfigurationSettingParam<SnapshotReferenceValue>,\n options: SetConfigurationSettingOptions = {},\n ): Promise<SetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[setConfigurationSetting] Setting new key value\");\n const response = transformKeyValueResponse(\n await this.client.putKeyValue(configurationSetting.key, {\n ...updatedOptions,\n label: configurationSetting.label,\n entity: keyValue,\n ...checkAndFormatIfAndIfNoneMatch(configurationSetting, options),\n }),\n );\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Sets or clears a key's read-only status.\n * @param id - The id of the configuration setting to modify.\n */\n async setReadOnly(\n id: ConfigurationSettingId,\n readOnly: boolean,\n options: SetReadOnlyOptions = {},\n ): Promise<SetReadOnlyResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setReadOnly\",\n options,\n async (newOptions) => {\n let response;\n if (readOnly) {\n logger.info(\"[setReadOnly] Setting read-only status to ${readOnly}\");\n response = await this.client.putLock(id.key, {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n });\n } else {\n logger.info(\"[setReadOnly] Deleting read-only lock\");\n response = await this.client.deleteLock(id.key, {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n });\n }\n response = transformKeyValueResponse(response);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Adds an external synchronization token to ensure service requests receive up-to-date values.\n *\n * @param syncToken - The synchronization token value.\n */\n updateSyncToken(syncToken: string): void {\n this._syncTokens.addSyncTokenFromHeaderValue(syncToken);\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, fails if it\n * already exists.\n */\n beginCreateSnapshot(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<SimplePollerLike<OperationState<CreateSnapshotResponse>, CreateSnapshotResponse>> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshot`,\n options,\n (updatedOptions) =>\n this.client.beginCreateSnapshot(snapshot.name, snapshot, { ...updatedOptions }),\n );\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, waits until it is done,\n * fails if it already exists.\n */\n beginCreateSnapshotAndWait(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<CreateSnapshotResponse> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshotAndWait`,\n options,\n (updatedOptions) =>\n this.client.beginCreateSnapshotAndWait(snapshot.name, snapshot, { ...updatedOptions }),\n );\n }\n\n /**\n * Get a snapshot from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:GetSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const retrievedSnapshot = await client.getSnapshot(\"testsnapshot\");\n * console.log(\"Retrieved snapshot:\", retrievedSnapshot);\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n getSnapshot(name: string, options: GetSnapshotOptions = {}): Promise<GetSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[getSnapshot] Get a snapshot\");\n const originalResponse = await this.client.getSnapshot(name, {\n ...updatedOptions,\n });\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Recover an archived snapshot back to ready status\n *\n * Example usage:\n * ```ts snippet:RecoverSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.recoverSnapshot(\"MySnapshot\");\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n recoverSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.recoverSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[recoverSnapshot] Recover a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n name,\n { status: \"ready\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n /**\n * Archive a ready snapshot\n *\n * Example usage:\n * ```ts snippet:ArchiveSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.archiveSnapshot({ name: \"MySnapshot\" });\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n archiveSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.archiveSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[archiveSnapshot] Archive a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n name,\n { status: \"archived\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * List all snapshots from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:ListSnapshots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const snapshots = await client.listSnapshots();\n *\n * for await (const snapshot of snapshots) {\n * console.log(`Found snapshot: ${snapshot.name}`);\n * }\n * ```\n * @param options - Optional parameters for the request.\n */\n listSnapshots(\n options: ListSnapshotsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSnapshot, ListSnapshotsPage, PageSettings> {\n const pagedResult: PagedResult<ListSnapshotsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendSnapShotsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendSnapShotsRequest(\n options: ListSnapshotsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetSnapshotsResponse & HttpResponseField<AppConfigurationGetSnapshotsHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listSnapshots\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getSnapshots({\n ...updatedOptions,\n ...formatSnapshotFiltersAndSelect(options),\n after: pageLink,\n });\n\n return response as GetSnapshotsResponse &\n HttpResponseField<AppConfigurationGetSnapshotsHeaders>;\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"appConfigurationClient.js","sourceRoot":"","sources":["../../src/appConfigurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAsDlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAKrD,OAAO,EACL,cAAc,EACd,8BAA8B,EAC9B,+BAA+B,EAC/B,6BAA6B,EAC7B,oBAAoB,EACpB,2CAA2C,EAC3C,qBAAqB,EACrB,sBAAsB,EACtB,4BAA4B,EAC5B,8BAA8B,EAC9B,QAAQ,EACR,6BAA6B,EAC7B,oCAAoC,EACpC,iBAAiB,EACjB,yBAAyB,EACzB,uCAAuC,EACvC,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;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AAI,CAAC,KAAK;SACjC,CAAC;QACF,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;IAEO,KAAK,CAAC,oBAAoB,CAChC,UAA+C,EAAE,EACjD,QAA4B;QAE5B,OAAO,aAAa,CAAC,QAAQ,CAC3B,sCAAsC,EACtC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;gBAC9C,GAAG,cAAc;gBACjB,GAAG,8BAA8B,CAAC,OAAO,CAAC;gBAC1C,KAAK,EAAE,QAAQ;aAChB,CAAC,CAAC;YAEH,OAAO,QACiD,CAAC;QAC3D,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// https://azure.github.io/azure-sdk/typescript_design.html#ts-config-lib\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport {\n type AddConfigurationSettingOptions,\n type AddConfigurationSettingParam,\n type AddConfigurationSettingResponse,\n type AppConfigurationClientOptions,\n type ConfigurationSetting,\n type ConfigurationSettingId,\n type CreateSnapshotOptions,\n type CreateSnapshotResponse,\n type DeleteConfigurationSettingOptions,\n type DeleteConfigurationSettingResponse,\n type GetConfigurationSettingOptions,\n type GetConfigurationSettingResponse,\n type GetSnapshotOptions,\n type GetSnapshotResponse,\n type HttpResponseField,\n type ListConfigurationSettingPage,\n type ListConfigurationSettingsForSnapshotOptions,\n type ListConfigurationSettingsOptions,\n type ListLabelsOptions,\n type ListLabelsPage,\n type ListRevisionsOptions,\n type ListRevisionsPage,\n type ListSnapshotsOptions,\n type ListSnapshotsPage,\n type PageSettings,\n type SetConfigurationSettingOptions,\n type SetConfigurationSettingParam,\n type SetConfigurationSettingResponse,\n type SetReadOnlyOptions,\n type SetReadOnlyResponse,\n type SettingLabel,\n type SnapshotInfo,\n type UpdateSnapshotOptions,\n type UpdateSnapshotResponse,\n} from \"./models.js\";\nimport type {\n AppConfigurationGetKeyValuesHeaders,\n AppConfigurationGetRevisionsHeaders,\n AppConfigurationGetSnapshotsHeaders,\n GetKeyValuesResponse,\n GetRevisionsResponse,\n GetSnapshotsResponse,\n ConfigurationSnapshot,\n GetLabelsResponse,\n AppConfigurationGetLabelsHeaders,\n} from \"./generated/src/models/index.js\";\nimport type { InternalClientPipelineOptions } from \"@azure/core-client\";\nimport type { PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { getPagedAsyncIterator } from \"@azure/core-paging\";\nimport type { PipelinePolicy, RestError } from \"@azure/core-rest-pipeline\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { audienceErrorHandlingPolicy } from \"./internal/audienceErrorHandlingPolicy.js\";\nimport { SyncTokens, syncTokenPolicy } from \"./internal/syncTokenPolicy.js\";\nimport { queryParamPolicy } from \"./internal/queryParamPolicy.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type {\n SendConfigurationSettingsOptions,\n SendLabelsRequestOptions,\n} from \"./internal/helpers.js\";\nimport {\n assertResponse,\n checkAndFormatIfAndIfNoneMatch,\n extractAfterTokenFromLinkHeader,\n extractAfterTokenFromNextLink,\n formatAcceptDateTime,\n formatConfigurationSettingsFiltersAndSelect,\n formatFieldsForSelect,\n formatFiltersAndSelect,\n formatLabelsFiltersAndSelect,\n formatSnapshotFiltersAndSelect,\n getScope,\n makeConfigurationSettingEmpty,\n serializeAsConfigurationSettingParam,\n transformKeyValue,\n transformKeyValueResponse,\n transformKeyValueResponseWithStatusCode,\n transformSnapshotResponse,\n} from \"./internal/helpers.js\";\nimport { AppConfiguration } from \"./generated/src/appConfiguration.js\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport { appConfigKeyCredentialPolicy } from \"./appConfigCredential.js\";\nimport { tracingClient } from \"./internal/tracing.js\";\nimport { logger } from \"./logger.js\";\nimport type { OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport { appConfigurationApiVersion } from \"./internal/constants.js\";\n\nconst ConnectionStringRegex = /Endpoint=(.*);Id=(.*);Secret=(.*)/;\nconst deserializationContentTypes = {\n json: [\n \"application/vnd.microsoft.appconfig.kvset+json\",\n \"application/vnd.microsoft.appconfig.kv+json\",\n \"application/vnd.microsoft.appconfig.kvs+json\",\n \"application/vnd.microsoft.appconfig.keyset+json\",\n \"application/vnd.microsoft.appconfig.revs+json\",\n \"application/vnd.microsoft.appconfig.snapshotset+json\",\n \"application/vnd.microsoft.appconfig.snapshot+json\",\n \"application/vnd.microsoft.appconfig.labelset+json\",\n \"application/json\",\n ],\n};\n\n/**\n * Provides internal configuration options for AppConfigurationClient.\n * @internal\n */\nexport interface InternalAppConfigurationClientOptions extends AppConfigurationClientOptions {\n /**\n * The sync token cache to use for this client.\n * NOTE: this is an internal option, not for general client usage.\n */\n syncTokens?: SyncTokens;\n}\n\n/**\n * Client for the Azure App Configuration service.\n */\nexport class AppConfigurationClient {\n private client: AppConfiguration;\n private _syncTokens: SyncTokens;\n\n /**\n * Initializes a new instance of the AppConfigurationClient class.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(connectionString: string, options?: AppConfigurationClientOptions);\n /**\n * Initializes a new instance of the AppConfigurationClient class using\n * a TokenCredential.\n * @param endpoint - The endpoint of the App Configuration service (ex: https://sample.azconfig.io).\n * @param tokenCredential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(\n endpoint: string,\n tokenCredential: TokenCredential,\n options?: AppConfigurationClientOptions,\n );\n constructor(\n connectionStringOrEndpoint: string,\n tokenCredentialOrOptions?: TokenCredential | AppConfigurationClientOptions,\n options?: AppConfigurationClientOptions,\n ) {\n let appConfigOptions: InternalAppConfigurationClientOptions = {};\n let appConfigCredential: TokenCredential;\n let appConfigEndpoint: string;\n let authPolicy: PipelinePolicy;\n let scope: string;\n\n if (isTokenCredential(tokenCredentialOrOptions)) {\n appConfigOptions = (options as InternalAppConfigurationClientOptions) || {};\n appConfigCredential = tokenCredentialOrOptions;\n appConfigEndpoint = connectionStringOrEndpoint.endsWith(\"/\")\n ? connectionStringOrEndpoint.slice(0, -1)\n : connectionStringOrEndpoint;\n scope = getScope(appConfigEndpoint, appConfigOptions.audience);\n authPolicy = bearerTokenAuthenticationPolicy({\n scopes: scope,\n credential: appConfigCredential,\n });\n } else {\n appConfigOptions = (tokenCredentialOrOptions as InternalAppConfigurationClientOptions) || {};\n const regexMatch = connectionStringOrEndpoint?.match(ConnectionStringRegex);\n if (regexMatch) {\n appConfigEndpoint = regexMatch[1];\n authPolicy = appConfigKeyCredentialPolicy(regexMatch[2], regexMatch[3]);\n } else {\n throw new Error(\n `Invalid connection string. Valid connection strings should match the regex '${ConnectionStringRegex.source}'.` +\n ` To mitigate the issue, please refer to the troubleshooting guide here at https://aka.ms/azsdk/js/app-configuration/troubleshoot.`,\n );\n }\n }\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...appConfigOptions,\n loggingOptions: {\n logger: logger.info,\n },\n deserializationOptions: {\n expectedContentTypes: deserializationContentTypes,\n },\n };\n\n this._syncTokens = appConfigOptions.syncTokens || new SyncTokens();\n this.client = new AppConfiguration(\n appConfigEndpoint,\n options?.apiVersion ?? appConfigurationApiVersion,\n internalClientPipelineOptions,\n );\n this.client.pipeline.addPolicy(\n audienceErrorHandlingPolicy(appConfigOptions?.audience !== undefined),\n {\n phase: \"Sign\",\n beforePolicies: [authPolicy.name],\n },\n );\n this.client.pipeline.addPolicy(authPolicy, { phase: \"Sign\" });\n this.client.pipeline.addPolicy(queryParamPolicy());\n this.client.pipeline.addPolicy(syncTokenPolicy(this._syncTokens), { afterPhase: \"Retry\" });\n }\n\n /**\n * Add a setting into the Azure App Configuration service, failing if it\n * already exists.\n *\n * Example usage:\n * ```ts snippet:AddConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.addConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * value: \"MyValue\",\n * });\n * ```\n * @param configurationSetting - A configuration setting.\n * @param options - Optional parameters for the request.\n */\n addConfigurationSetting(\n configurationSetting:\n | AddConfigurationSettingParam\n | AddConfigurationSettingParam<FeatureFlagValue>\n | AddConfigurationSettingParam<SecretReferenceValue>\n | AddConfigurationSettingParam<SnapshotReferenceValue>,\n options: AddConfigurationSettingOptions = {},\n ): Promise<AddConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.addConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[addConfigurationSetting] Creating a key value pair\");\n try {\n const originalResponse = await this.client.putKeyValue(configurationSetting.key, {\n ifNoneMatch: \"*\",\n label: configurationSetting.label,\n entity: keyValue,\n ...updatedOptions,\n });\n const response = transformKeyValueResponse(originalResponse);\n assertResponse(response);\n return response;\n } catch (error) {\n const err = error as RestError;\n // Service does not return an error message. Raise a 412 error similar to .NET\n if (err.statusCode === 412) {\n err.message = `Status 412: Setting was already present`;\n }\n throw err;\n }\n throw new Error(\"Unreachable code\");\n },\n );\n }\n\n /**\n * Delete a setting from the Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:DeleteConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const deletedSetting = await client.deleteConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * });\n * ```\n * @param id - The id of the configuration setting to delete.\n * @param options - Optional parameters for the request (ex: etag, label)\n */\n deleteConfigurationSetting(\n id: ConfigurationSettingId,\n options: DeleteConfigurationSettingOptions = {},\n ): Promise<DeleteConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.deleteConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n logger.info(\"[deleteConfigurationSetting] Deleting key value pair\");\n const originalResponse = await this.client.deleteKeyValue(id.key, {\n label: id.label,\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Gets a setting from the Azure App Configuration service.\n *\n * Example code:\n * ```ts snippet:GetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const setting = await client.getConfigurationSetting({ key: \"MyKey\", label: \"MyLabel\" });\n * ```\n * @param id - The id of the configuration setting to get.\n * @param options - Optional parameters for the request.\n */\n async getConfigurationSetting(\n id: ConfigurationSettingId,\n options: GetConfigurationSettingOptions = {},\n ): Promise<GetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n logger.info(\"[getConfigurationSetting] Getting key value pair\");\n const originalResponse = await this.client.getKeyValue(id.key, {\n ...updatedOptions,\n label: id.label,\n select: formatFieldsForSelect(options.fields),\n ...formatAcceptDateTime(options),\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n\n // 304 only comes back if the user has passed a conditional option in their\n // request _and_ the remote object has the same etag as what the user passed.\n if (response.statusCode === 304) {\n // this is one of our few 'required' fields so we'll make sure it does get initialized\n // with a value\n response.key = id.key;\n\n // and now we'll undefine all the other properties that are not HTTP related\n makeConfigurationSettingEmpty(response);\n }\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Lists settings from the Azure App Configuration service, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettings\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettings({ labelFilter: \"MyLabel\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettings(\n options: ListConfigurationSettingsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pageEtags = options.pageEtags ? [...options.pageEtags] : undefined;\n delete options.pageEtags;\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const etag = pageEtags?.shift();\n try {\n const response = await this.sendConfigurationSettingsRequest(\n { ...options, etag },\n pageLink,\n );\n const currentResponse: ListConfigurationSettingPage = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n } catch (error) {\n const err = error as RestError;\n\n const link = err.response?.headers?.get(\"link\");\n const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n\n if (err.statusCode === 304) {\n err.message = `Status 304: No updates for this page`;\n logger.info(\n `[listConfigurationSettings] No updates for this page. The current etag for the page is ${etag}`,\n );\n return {\n page: {\n items: [],\n etag,\n _response: { ...err.response, status: 304 },\n } as unknown as ListConfigurationSettingPage,\n nextPageLink: continuationToken,\n };\n }\n\n throw err;\n }\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Lists settings from the Azure App Configuration service for snapshots based on name, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettingsForSnashots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettingsForSnashots({\n * snapshotName: \"MySnapshot\",\n * });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettingsForSnapshot(\n snapshotName: string,\n options: ListConfigurationSettingsForSnapshotOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendConfigurationSettingsRequest(\n { snapshotName, ...options },\n pageLink,\n );\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Get a list of labels from the Azure App Configuration service\n *\n * Example code:\n * ```ts snippet:ListLabels\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listLabels({ nameFilter: \"prod*\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listLabels(\n options: ListLabelsOptions = {},\n ): PagedAsyncIterableIterator<SettingLabel, ListLabelsPage, PageSettings> {\n const pagedResult: PagedResult<ListLabelsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendLabelsRequest(options, pageLink);\n const currentResponse: ListLabelsPage = {\n ...response,\n items: response.items ?? [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendLabelsRequest(\n options: SendLabelsRequestOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetLabelsResponse & HttpResponseField<AppConfigurationGetLabelsHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getLabels({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatLabelsFiltersAndSelect(options),\n after: pageLink,\n });\n\n return response as GetLabelsResponse & HttpResponseField<AppConfigurationGetLabelsHeaders>;\n },\n );\n }\n\n private async sendConfigurationSettingsRequest(\n options: SendConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetKeyValuesResponse & HttpResponseField<AppConfigurationGetKeyValuesHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getKeyValues({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatConfigurationSettingsFiltersAndSelect(options),\n ...checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, { onlyIfChanged: true }),\n after: pageLink,\n });\n\n return response as GetKeyValuesResponse &\n HttpResponseField<AppConfigurationGetKeyValuesHeaders>;\n },\n );\n }\n\n /**\n * Lists revisions of a set of keys, optionally filtered by key names,\n * labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListRevisions\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const revisionsIterator = client.listRevisions({ keys: [\"MyKey\"] });\n * ```\n * @param options - Optional parameters for the request.\n */\n listRevisions(\n options?: ListRevisionsOptions,\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListRevisionsPage, PageSettings> {\n const pagedResult: PagedResult<ListRevisionsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendRevisionsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n // let itemList = currentResponse.items;\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendRevisionsRequest(\n options: ListConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetKeyValuesResponse & HttpResponseField<AppConfigurationGetKeyValuesHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listRevisions\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getRevisions({\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatFiltersAndSelect(updatedOptions),\n after: pageLink,\n });\n\n return response as GetRevisionsResponse &\n HttpResponseField<AppConfigurationGetRevisionsHeaders>;\n },\n );\n }\n\n /**\n * Sets the value of a key in the Azure App Configuration service, allowing for an optional etag.\n * @param key - The name of the key.\n * @param configurationSetting - A configuration value.\n * @param options - Optional parameters for the request.\n *\n * Example code:\n * ```ts snippet:SetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * await client.setConfigurationSetting({ key: \"MyKey\", value: \"MyValue\" });\n * ```\n */\n async setConfigurationSetting(\n configurationSetting:\n | SetConfigurationSettingParam\n | SetConfigurationSettingParam<FeatureFlagValue>\n | SetConfigurationSettingParam<SecretReferenceValue>\n | SetConfigurationSettingParam<SnapshotReferenceValue>,\n options: SetConfigurationSettingOptions = {},\n ): Promise<SetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[setConfigurationSetting] Setting new key value\");\n const response = transformKeyValueResponse(\n await this.client.putKeyValue(configurationSetting.key, {\n ...updatedOptions,\n label: configurationSetting.label,\n entity: keyValue,\n ...checkAndFormatIfAndIfNoneMatch(configurationSetting, options),\n }),\n );\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Sets or clears a key's read-only status.\n * @param id - The id of the configuration setting to modify.\n */\n async setReadOnly(\n id: ConfigurationSettingId,\n readOnly: boolean,\n options: SetReadOnlyOptions = {},\n ): Promise<SetReadOnlyResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setReadOnly\",\n options,\n async (newOptions) => {\n let response;\n if (readOnly) {\n logger.info(\"[setReadOnly] Setting read-only status to ${readOnly}\");\n response = await this.client.putLock(id.key, {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n });\n } else {\n logger.info(\"[setReadOnly] Deleting read-only lock\");\n response = await this.client.deleteLock(id.key, {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n });\n }\n response = transformKeyValueResponse(response);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Adds an external synchronization token to ensure service requests receive up-to-date values.\n *\n * @param syncToken - The synchronization token value.\n */\n updateSyncToken(syncToken: string): void {\n this._syncTokens.addSyncTokenFromHeaderValue(syncToken);\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, fails if it\n * already exists.\n */\n beginCreateSnapshot(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<SimplePollerLike<OperationState<CreateSnapshotResponse>, CreateSnapshotResponse>> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshot`,\n options,\n (updatedOptions) =>\n this.client.beginCreateSnapshot(snapshot.name, snapshot, { ...updatedOptions }),\n );\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, waits until it is done,\n * fails if it already exists.\n */\n beginCreateSnapshotAndWait(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<CreateSnapshotResponse> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshotAndWait`,\n options,\n (updatedOptions) =>\n this.client.beginCreateSnapshotAndWait(snapshot.name, snapshot, { ...updatedOptions }),\n );\n }\n\n /**\n * Get a snapshot from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:GetSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const retrievedSnapshot = await client.getSnapshot(\"testsnapshot\");\n * console.log(\"Retrieved snapshot:\", retrievedSnapshot);\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n getSnapshot(name: string, options: GetSnapshotOptions = {}): Promise<GetSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[getSnapshot] Get a snapshot\");\n const originalResponse = await this.client.getSnapshot(name, {\n ...updatedOptions,\n });\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Recover an archived snapshot back to ready status\n *\n * Example usage:\n * ```ts snippet:RecoverSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.recoverSnapshot(\"MySnapshot\");\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n recoverSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.recoverSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[recoverSnapshot] Recover a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n name,\n { status: \"ready\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n /**\n * Archive a ready snapshot\n *\n * Example usage:\n * ```ts snippet:ArchiveSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.archiveSnapshot({ name: \"MySnapshot\" });\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n archiveSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.archiveSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[archiveSnapshot] Archive a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n name,\n { status: \"archived\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * List all snapshots from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:ListSnapshots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const snapshots = await client.listSnapshots();\n *\n * for await (const snapshot of snapshots) {\n * console.log(`Found snapshot: ${snapshot.name}`);\n * }\n * ```\n * @param options - Optional parameters for the request.\n */\n listSnapshots(\n options: ListSnapshotsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSnapshot, ListSnapshotsPage, PageSettings> {\n const pagedResult: PagedResult<ListSnapshotsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendSnapShotsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendSnapShotsRequest(\n options: ListSnapshotsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<GetSnapshotsResponse & HttpResponseField<AppConfigurationGetSnapshotsHeaders>> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listSnapshots\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getSnapshots({\n ...updatedOptions,\n ...formatSnapshotFiltersAndSelect(options),\n after: pageLink,\n });\n\n return response as GetSnapshotsResponse &\n HttpResponseField<AppConfigurationGetSnapshotsHeaders>;\n },\n );\n }\n}\n"]}