@azure/template 1.0.13-beta.4363791 → 1.0.13-beta.4700172

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 (33) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +4 -6
  3. package/dist/browser/configurationClient.d.ts +1 -1
  4. package/dist/browser/configurationClient.js +1 -1
  5. package/dist/browser/configurationClient.js.map +1 -1
  6. package/dist/browser/constants.js +1 -1
  7. package/dist/browser/constants.js.map +1 -1
  8. package/dist/browser/generated/generatedClientContext.js +1 -1
  9. package/dist/browser/generated/generatedClientContext.js.map +1 -1
  10. package/dist/commonjs/configurationClient.d.ts +1 -1
  11. package/dist/commonjs/configurationClient.js +1 -1
  12. package/dist/commonjs/configurationClient.js.map +1 -1
  13. package/dist/commonjs/constants.js +1 -1
  14. package/dist/commonjs/constants.js.map +1 -1
  15. package/dist/commonjs/generated/generatedClientContext.js +1 -1
  16. package/dist/commonjs/generated/generatedClientContext.js.map +1 -1
  17. package/dist/commonjs/tsdoc-metadata.json +1 -1
  18. package/dist/esm/configurationClient.d.ts +1 -1
  19. package/dist/esm/configurationClient.js +1 -1
  20. package/dist/esm/configurationClient.js.map +1 -1
  21. package/dist/esm/constants.js +1 -1
  22. package/dist/esm/constants.js.map +1 -1
  23. package/dist/esm/generated/generatedClientContext.js +1 -1
  24. package/dist/esm/generated/generatedClientContext.js.map +1 -1
  25. package/dist/react-native/configurationClient.d.ts +1 -1
  26. package/dist/react-native/configurationClient.js +1 -1
  27. package/dist/react-native/configurationClient.js.map +1 -1
  28. package/dist/react-native/constants.js +1 -1
  29. package/dist/react-native/constants.js.map +1 -1
  30. package/dist/react-native/generated/generatedClientContext.js +1 -1
  31. package/dist/react-native/generated/generatedClientContext.js.map +1 -1
  32. package/package.json +24 -23
  33. package/dist/template.d.ts +0 -88
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ Copyright (c) Microsoft Corporation.
2
2
 
3
- Copyright (c) 2020 Microsoft
3
+ MIT License
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -12,7 +12,7 @@ furnished to do so, subject to the following conditions:
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
14
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
package/README.md CHANGED
@@ -43,7 +43,7 @@ Due to Azure template service CORS limitation this library cannot be used to mak
43
43
 
44
44
  -->
45
45
 
46
- You need to set up [Cross-Origin Resource Sharing (CORS)](https://docs.microsoft.com/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) rules for your storage account if you need to develop for browsers. Go to Azure portal and Azure Storage Explorer, find your storage account, create new CORS rules for blob/queue/file/table service(s).
46
+ You need to set up [Cross-Origin Resource Sharing (CORS)](https://learn.microsoft.com/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) rules for your storage account if you need to develop for browsers. Go to Azure portal and Azure Storage Explorer, find your storage account, create new CORS rules for blob/queue/file/table service(s).
47
47
 
48
48
  For example, you can create the following CORS settings for debugging. But please customize the settings carefully according to your requirements in a production environment.
49
49
 
@@ -75,7 +75,7 @@ Create a section for each top-level service concept you want to explain.
75
75
 
76
76
  Create several code examples for how someone would use your library to accomplish a common task with the service.
77
77
 
78
- ```ts snippet:new_configurationclient
78
+ ```ts snippet:ReadmeSampleCreateClient
79
79
  import { ConfigurationClient } from "@azure/template";
80
80
  import { DefaultAzureCredential } from "@azure/identity";
81
81
 
@@ -91,7 +91,7 @@ const client = new ConfigurationClient(
91
91
 
92
92
  Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
93
93
 
94
- ```ts snippet:setloglevel
94
+ ```ts snippet:SetLogLevel
95
95
  import { setLogLevel } from "@azure/logger";
96
96
 
97
97
  setLogLevel("verbose");
@@ -111,7 +111,5 @@ If you'd like to contribute to this library, please read the [contributing guide
111
111
 
112
112
  - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
113
113
 
114
- ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Ftemplate%2Ftemplate%2FREADME.png)
115
-
116
- [azure_cli]: https://docs.microsoft.com/cli/azure
114
+ [azure_cli]: https://learn.microsoft.com/cli/azure
117
115
  [azure_sub]: https://azure.microsoft.com/free/
@@ -31,7 +31,7 @@ export declare class ConfigurationClient {
31
31
  * Creates an instance of a ConfigurationClient.
32
32
  *
33
33
  * Example usage:
34
- * ```ts snippet:new_configurationclient
34
+ * ```ts snippet:ReadmeSampleCreateClient
35
35
  * import { ConfigurationClient } from "@azure/template";
36
36
  * import { DefaultAzureCredential } from "@azure/identity";
37
37
  *
@@ -14,7 +14,7 @@ export class ConfigurationClient {
14
14
  * Creates an instance of a ConfigurationClient.
15
15
  *
16
16
  * Example usage:
17
- * ```ts snippet:new_configurationclient
17
+ * ```ts snippet:ReadmeSampleCreateClient
18
18
  * import { ConfigurationClient } from "@azure/template";
19
19
  * import { DefaultAzureCredential } from "@azure/identity";
20
20
  *
@@ -1 +1 @@
1
- {"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAA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ACL,CAAC;IAyBM,KAAK,CAAC,uBAAuB,CAClC,YAA2C,EAC3C,UAA0C,EAAE;QAE5C,IAAI,GAAW,CAAC;QAChB,IAAI,WAA+B,CAAC;QAEpC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ;QAChC,8DAA8D;QAC9D,6CAA6C,EAC7C,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;gBACrC,GAAG,GAAG,YAAY,CAAC;gBACnB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,MAAM,IAAI,UAAU,CAClB,uFAAuF,CACxF,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,YAAY,CAAC,GAAI,CAAC;gBACxB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:new_configurationclient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\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 ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../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B,+BAA+B;YAC/B,WAAW,EAAE,iBAAiB;YAC9B,cAAc,EAAE,WAAW;SAC5B,CAAC,CAAC;IACL,CAAC;IAyBM,KAAK,CAAC,uBAAuB,CAClC,YAA2C,EAC3C,UAA0C,EAAE;QAE5C,IAAI,GAAW,CAAC;QAChB,IAAI,WAA+B,CAAC;QAEpC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ;QAChC,8DAA8D;QAC9D,6CAA6C,EAC7C,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;gBACrC,GAAG,GAAG,YAAY,CAAC;gBACnB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,MAAM,IAAI,UAAU,CAClB,uFAAuF,CACxF,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,YAAY,CAAC,GAAI,CAAC;gBACxB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateClient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\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 ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- export const SDK_VERSION = "1.0.13-beta.4363791";
3
+ export const SDK_VERSION = "1.0.13-beta.4700172";
4
4
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4363791\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4700172\";\n"]}
@@ -24,7 +24,7 @@ export class GeneratedClientContext extends coreClient.ServiceClient {
24
24
  const defaults = {
25
25
  requestContentType: "application/json; charset=utf-8"
26
26
  };
27
- const packageDetails = `azsdk-js-template/1.0.13-beta.4363791`;
27
+ const packageDetails = `azsdk-js-template/1.0.13-beta.4700172`;
28
28
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
29
29
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
30
30
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4363791`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
1
+ {"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4700172`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
@@ -31,7 +31,7 @@ export declare class ConfigurationClient {
31
31
  * Creates an instance of a ConfigurationClient.
32
32
  *
33
33
  * Example usage:
34
- * ```ts snippet:new_configurationclient
34
+ * ```ts snippet:ReadmeSampleCreateClient
35
35
  * import { ConfigurationClient } from "@azure/template";
36
36
  * import { DefaultAzureCredential } from "@azure/identity";
37
37
  *
@@ -17,7 +17,7 @@ class ConfigurationClient {
17
17
  * Creates an instance of a ConfigurationClient.
18
18
  *
19
19
  * Example usage:
20
- * ```ts snippet:new_configurationclient
20
+ * ```ts snippet:ReadmeSampleCreateClient
21
21
  * import { ConfigurationClient } from "@azure/template";
22
22
  * import { DefaultAzureCredential } from "@azure/identity";
23
23
  *
@@ -1 +1 @@
1
- {"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,mDAA6E;AAM7E,kEAA4E;AAG5E,sDAA0D;AAC1D,iDAA6C;AAC7C,2CAAqC;AACrC,uCAAsC;AA2BtC;;GAEG;AACH,MAAa,mBAAmB;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACH,YACE,WAAmB,EACnB,UAA2B,EAC3B,UAAsC,EAAE;QAExC,wEAAwE;QACxE,qCAAqC;QACrC,MAAM,UAAU,GAAG,IAAA,oDAA+B,EAAC;YACjD,UAAU;YACV,MAAM,EAAE,GAAG,WAAW,WAAW;SAClC,CAAC,CAAC;QAEH,MAAM,6BAA6B,iDAC9B,OAAO,KACV,sBAAsB,EAAE;gBACtB,oBAAoB,EAAE;oBACpB,IAAI,EAAE;wBACJ,gDAAgD;wBAChD,6CAA6C;wBAC7C,8CAA8C;wBAC9C,iDAAiD;wBACjD,+CAA+C;qBAChD;iBACF;aACF,KACE;YACD,cAA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AG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA3HD,kDA2HC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:new_configurationclient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\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 ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,mDAA6E;AAM7E,kEAA4E;AAG5E,sDAA0D;AAC1D,iDAA6C;AAC7C,2CAAqC;AACrC,uCAAsC;AA2BtC;;GAEG;AACH,MAAa,mBAAmB;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACH,YACE,WAAmB,EACnB,UAA2B,EAC3B,UAAsC,EAAE;QAExC,wEAAwE;QACxE,qCAAqC;QACrC,MAAM,UAAU,GAAG,IAAA,oDAA+B,EAAC;YACjD,UAAU;YACV,MAAM,EAAE,GAAG,WAAW,WAAW;SAClC,CAAC,CAAC;QAEH,MAAM,6BAA6B,iDAC9B,OAAO,KACV,sBAAsB,EAAE;gBACtB,oBAAoB,EAAE;oBACpB,IAAI,EAAE;wBACJ,gDAAgD;wBAChD,6CAA6C;wBAC7C,8CAA8C;wBAC9C,iDAAiD;wBACjD,+CAA+C;qBAChD;iBACF;aACF,KACE;YACD,cAAc,EAAE;gBACd,MAAM,EAAE,kBAAM,CAAC,IAAI;gBACnB,uEAAuE;gBACvE,uEAAuE;gBACvE,4BAA4B,EAAE,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ourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateClient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\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 ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
@@ -3,5 +3,5 @@
3
3
  // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.SDK_VERSION = void 0;
6
- exports.SDK_VERSION = "1.0.13-beta.4363791";
6
+ exports.SDK_VERSION = "1.0.13-beta.4700172";
7
7
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4363791\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4700172\";\n"]}
@@ -28,7 +28,7 @@ class GeneratedClientContext extends coreClient.ServiceClient {
28
28
  const defaults = {
29
29
  requestContentType: "application/json; charset=utf-8"
30
30
  };
31
- const packageDetails = `azsdk-js-template/1.0.13-beta.4363791`;
31
+ const packageDetails = `azsdk-js-template/1.0.13-beta.4700172`;
32
32
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
33
33
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
34
34
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAGjD,gBAAgB;AAChB,MAAa,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF;AA5CD,wDA4CC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4363791`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
1
+ {"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAGjD,gBAAgB;AAChB,MAAa,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF;AA5CD,wDA4CC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4700172`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.48.0"
8
+ "packageVersion": "7.52.2"
9
9
  }
10
10
  ]
11
11
  }
@@ -31,7 +31,7 @@ export declare class ConfigurationClient {
31
31
  * Creates an instance of a ConfigurationClient.
32
32
  *
33
33
  * Example usage:
34
- * ```ts snippet:new_configurationclient
34
+ * ```ts snippet:ReadmeSampleCreateClient
35
35
  * import { ConfigurationClient } from "@azure/template";
36
36
  * import { DefaultAzureCredential } from "@azure/identity";
37
37
  *
@@ -14,7 +14,7 @@ export class ConfigurationClient {
14
14
  * Creates an instance of a ConfigurationClient.
15
15
  *
16
16
  * Example usage:
17
- * ```ts snippet:new_configurationclient
17
+ * ```ts snippet:ReadmeSampleCreateClient
18
18
  * import { ConfigurationClient } from "@azure/template";
19
19
  * import { DefaultAzureCredential } from "@azure/identity";
20
20
  *
@@ -1 +1 @@
1
- {"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAwB,MAAM,sBAAsB,CAAC;AAM7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,2B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AAE;QAE5C,IAAI,GAAW,CAAC;QAChB,IAAI,WAA+B,CAAC;QAEpC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ;QAChC,8DAA8D;QAC9D,6CAA6C,EAC7C,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;gBACrC,GAAG,GAAG,YAAY,CAAC;gBACnB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,MAAM,IAAI,UAAU,CAClB,uFAAuF,CACxF,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,YAAY,CAAC,GAAI,CAAC;gBACxB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:new_configurationclient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\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 ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAA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C5B,CAAC,CAAC;IACL,CAAC;IAyBM,KAAK,CAAC,uBAAuB,CAClC,YAA2C,EAC3C,UAA0C,EAAE;QAE5C,IAAI,GAAW,CAAC;QAChB,IAAI,WAA+B,CAAC;QAEpC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ;QAChC,8DAA8D;QAC9D,6CAA6C,EAC7C,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;gBACrC,GAAG,GAAG,YAAY,CAAC;gBACnB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,MAAM,IAAI,UAAU,CAClB,uFAAuF,CACxF,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,YAAY,CAAC,GAAI,CAAC;gBACxB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateClient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\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 ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- export const SDK_VERSION = "1.0.13-beta.4363791";
3
+ export const SDK_VERSION = "1.0.13-beta.4700172";
4
4
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4363791\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4700172\";\n"]}
@@ -24,7 +24,7 @@ export class GeneratedClientContext extends coreClient.ServiceClient {
24
24
  const defaults = {
25
25
  requestContentType: "application/json; charset=utf-8"
26
26
  };
27
- const packageDetails = `azsdk-js-template/1.0.13-beta.4363791`;
27
+ const packageDetails = `azsdk-js-template/1.0.13-beta.4700172`;
28
28
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
29
29
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
30
30
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4363791`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
1
+ {"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4700172`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
@@ -31,7 +31,7 @@ export declare class ConfigurationClient {
31
31
  * Creates an instance of a ConfigurationClient.
32
32
  *
33
33
  * Example usage:
34
- * ```ts snippet:new_configurationclient
34
+ * ```ts snippet:ReadmeSampleCreateClient
35
35
  * import { ConfigurationClient } from "@azure/template";
36
36
  * import { DefaultAzureCredential } from "@azure/identity";
37
37
  *
@@ -14,7 +14,7 @@ export class ConfigurationClient {
14
14
  * Creates an instance of a ConfigurationClient.
15
15
  *
16
16
  * Example usage:
17
- * ```ts snippet:new_configurationclient
17
+ * ```ts snippet:ReadmeSampleCreateClient
18
18
  * import { ConfigurationClient } from "@azure/template";
19
19
  * import { DefaultAzureCredential } from "@azure/identity";
20
20
  *
@@ -1 +1 @@
1
- {"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAwB,MAAM,sBAAsB,CAAC;AAM7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAG5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA2BtC;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACH,YACE,WAAmB,EACnB,UAA2B,EAC3B,UAAsC,EAAE;QAExC,wEAAwE;QACxE,qCAAqC;QACrC,MAAM,UAAU,GAAG,+BAA+B,CAAC;YACjD,UAAU;YACV,MAAM,EAAE,GAAG,WAAW,WAAW;SAClC,CAAC,CAAC;QAEH,MAAM,6BAA6B,iDAC9B,OAAO,KACV,sBAAsB,EAAE;gB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B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:new_configurationclient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\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 ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"configurationClient.js","sourceRoot":"","sources":["../../src/configurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAwB,MAAM,sBAAsB,CAAC;AAM7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAG5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA2BtC;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACH,YACE,WAAmB,EACnB,UAA2B,EAC3B,UAAsC,EAAE;QAExC,wEAAwE;QACxE,qCAAqC;QACrC,MAAM,UAAU,GAAG,+BAA+B,CAAC;YACjD,UAAU;YACV,MAAM,EAAE,GAAG,WA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AI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBAC1B,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,0EAA0E;YAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kCAAO,cAAc,KAAE,WAAW,IAAG,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient, ConfigurationSetting } from \"./generated/index.js\";\nimport type {\n CommonClientOptions,\n OperationOptions,\n InternalClientPipelineOptions,\n} from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { TracingClient } from \"@azure/core-tracing\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { logger } from \"./logger.js\";\nimport { quoteETag } from \"./util.js\";\n\n// re-export generated types that are used as public interfaces.\nexport { ConfigurationSetting };\n\n/**\n * Options for the `getConfigurationSetting` method of `ConfigurationClient`.\n */\nexport interface GetConfigurationSettingOptions extends OperationOptions {\n /**\n * If set to `true`, the method will use entity tags to instruct the service\n * to send an updated value only if the value has changed.\n *\n * NOTE: This option is only supported if passing a full\n * `ConfigurationSetting` object with an `etag` as the first parameter to\n * `getConfigurationSetting`.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Client options used to configure App Configuration API requests.\n */\nexport interface ConfigurationClientOptions extends CommonClientOptions {\n // Any custom options configured at the client level go here.\n}\n\n/**\n * The client class used to interact with the App Configuration service.\n */\nexport class ConfigurationClient {\n private client: GeneratedClient;\n private tracingClient: TracingClient;\n\n /**\n * Creates an instance of a ConfigurationClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateClient\n * import { ConfigurationClient } from \"@azure/template\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const client = new ConfigurationClient(\n * process.env.ENDPOINT ?? \"<app configuration endpoint>\",\n * new DefaultAzureCredential(),\n * );\n * ```\n * @param endpointUrl - the URL to the App Configuration endpoint\n * @param credential - used to authenticate requests to the service\n * @param options - optional configuration used to send requests to the service\n */\n constructor(\n endpointUrl: string,\n credential: TokenCredential,\n options: ConfigurationClientOptions = {},\n ) {\n // The AAD scope for an API is usually the baseUri + \"/.default\", but it\n // may be different for your service.\n const authPolicy = bearerTokenAuthenticationPolicy({\n credential,\n scopes: `${endpointUrl}/.default`,\n });\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n deserializationOptions: {\n expectedContentTypes: {\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 ],\n },\n },\n ...{\n loggingOptions: {\n logger: logger.info,\n // This array contains header names we want to log that are not already\n // included as safe. Unknown/unsafe headers are logged as \"<REDACTED>\".\n additionalAllowedHeaderNames: [\"x-ms-correlation-request-id\"],\n },\n },\n };\n\n this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);\n this.client.pipeline.addPolicy(authPolicy);\n this.tracingClient = createTracingClient({\n // The name of the resource provider requests are made against, as described in\n // https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15\n namespace: \"Microsoft.Learn\",\n // The package name and version\n packageName: \"@azure/template\",\n packageVersion: SDK_VERSION,\n });\n }\n\n /**\n * Retrieve the contents of an App Configuration setting by name (key).\n *\n * @param key - the unique name of the setting to get\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n key: string,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n /**\n * Retrieve an updated value of an App Configuration setting, allowing for\n * the use of entity tags to request the new value only if it has changed.\n *\n * @param setting - the setting to retrieve from the service\n * @param options - optional configuration for the operation\n */\n public async getConfigurationSetting(\n setting: ConfigurationSetting,\n options?: GetConfigurationSettingOptions,\n ): Promise<ConfigurationSetting>;\n\n public async getConfigurationSetting(\n keyOrSetting: string | ConfigurationSetting,\n options: GetConfigurationSettingOptions = {},\n ): Promise<ConfigurationSetting> {\n let key: string;\n let ifNoneMatch: string | undefined;\n\n return this.tracingClient.withSpan(\n // Span names should take the form \"<className>.<methodName>\".\n \"ConfigurationClient.getConfigurationSetting\",\n options,\n (updatedOptions) => {\n if (typeof keyOrSetting === \"string\") {\n key = keyOrSetting;\n if (options.onlyIfChanged) {\n throw new RangeError(\n \"You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.\",\n );\n }\n } else {\n key = keyOrSetting.key!;\n const etag = keyOrSetting.etag;\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(etag);\n }\n }\n\n // You must pass updatedOptions to any calls you make within the callback.\n return this.client.getKeyValue(key, { ...updatedOptions, ifNoneMatch });\n },\n );\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- export const SDK_VERSION = "1.0.13-beta.4363791";
3
+ export const SDK_VERSION = "1.0.13-beta.4700172";
4
4
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4363791\";\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.13-beta.4700172\";\n"]}
@@ -24,7 +24,7 @@ export class GeneratedClientContext extends coreClient.ServiceClient {
24
24
  const defaults = {
25
25
  requestContentType: "application/json; charset=utf-8"
26
26
  };
27
- const packageDetails = `azsdk-js-template/1.0.13-beta.4363791`;
27
+ const packageDetails = `azsdk-js-template/1.0.13-beta.4700172`;
28
28
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
29
29
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
30
30
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4363791`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
1
+ {"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,uCAAuC,CAAC;QAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models/index.js\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n syncToken?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param endpoint The endpoint of the App Configuration instance to send requests to.\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-template/1.0.13-beta.4700172`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-10-01\";\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/template",
3
- "version": "1.0.13-beta.4363791",
3
+ "version": "1.0.13-beta.4700172",
4
4
  "description": "Example project for learning how to build a client library",
5
5
  "sdk-type": "client",
6
6
  "main": "./dist/commonjs/index.js",
@@ -25,9 +25,9 @@
25
25
  "disableDocsMs": true,
26
26
  "productName": "Azure Template",
27
27
  "productSlugs": [],
28
- "apiRefLink": "https://docs.microsoft.com/javascript/api/",
28
+ "apiRefLink": "https://learn.microsoft.com/javascript/api/",
29
29
  "requiredResources": {
30
- "Azure App Configuration": "https://docs.microsoft.com/azure/azure-app-configuration/"
30
+ "Azure App Configuration": "https://learn.microsoft.com/azure/azure-app-configuration/"
31
31
  }
32
32
  },
33
33
  "migrationDate": "2023-03-08T18:36:03.000Z"
@@ -45,7 +45,7 @@
45
45
  "generate:client": "autorest --typescript ./swagger/README.md",
46
46
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
47
47
  "integration-test:browser": "dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
48
- "integration-test:node": "dev-tool run test:vitest",
48
+ "integration-test:node": "dev-tool run test:vitest --esm",
49
49
  "lint": "eslint README.md package.json api-extractor.json src test",
50
50
  "lint:fix": "eslint README.md package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
51
51
  "pack": "npm pack 2>&1",
@@ -53,9 +53,9 @@
53
53
  "test:browser": "npm run clean && npm run integration-test:browser",
54
54
  "test:node": "npm run clean && npm run build:test && npm run integration-test:node",
55
55
  "unit-test": "npm run unit-test:node && npm run unit-test:browser",
56
- "unit-test:browser": "npm run integration-test:browser",
57
- "unit-test:node": "npm run integration-test:node",
58
- "update-snippets": "dev-tool run build-package && dev-tool run update-snippets"
56
+ "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
57
+ "unit-test:node": "dev-tool run test:vitest",
58
+ "update-snippets": "dev-tool run update-snippets"
59
59
  },
60
60
  "files": [
61
61
  "dist/",
@@ -80,34 +80,33 @@
80
80
  "sideEffects": false,
81
81
  "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
82
82
  "dependencies": {
83
- "@azure/core-auth": "^1.3.0",
84
- "@azure/core-client": "^1.4.0",
83
+ "@azure/core-auth": "^1.9.0",
84
+ "@azure/core-client": "^1.9.2",
85
85
  "@azure/core-lro": "^2.7.0",
86
- "@azure/core-rest-pipeline": "^1.4.0",
87
- "@azure/core-tracing": "^1.0.0",
88
- "@azure/logger": "^1.0.0",
89
- "tslib": "^2.6.2"
86
+ "@azure/core-rest-pipeline": "^1.19.0",
87
+ "@azure/core-tracing": "^1.2.0",
88
+ "@azure/logger": "^1.1.4",
89
+ "tslib": "^2.8.1"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@azure-tools/test-credential": "^2.0.0",
93
- "@azure-tools/test-recorder": "^4.0.0",
93
+ "@azure-tools/test-recorder": "^4.1.0",
94
94
  "@azure-tools/test-utils-vitest": "^1.0.0",
95
95
  "@azure-tools/vite-plugin-browser-test-map": "^1.0.0",
96
96
  "@azure/dev-tool": "^1.0.0",
97
97
  "@azure/eslint-plugin-azure-sdk": "^3.0.0",
98
- "@azure/identity": "^4.0.1",
98
+ "@azure/identity": "^4.7.0",
99
99
  "@types/node": "^18.0.0",
100
- "@vitest/browser": "^2.1.2",
101
- "@vitest/coverage-istanbul": "^2.1.2",
100
+ "@vitest/browser": "^3.0.9",
101
+ "@vitest/coverage-istanbul": "^3.0.9",
102
102
  "dotenv": "^16.0.0",
103
103
  "eslint": "^9.9.0",
104
- "loupe": "^3.1.0",
105
- "playwright": "^1.41.2",
106
- "source-map-support": "^0.5.9",
107
- "typescript": "~5.6.2",
108
- "vitest": "^2.1.2"
104
+ "playwright": "^1.50.1",
105
+ "typescript": "~5.8.2",
106
+ "vitest": "^3.0.9"
109
107
  },
110
108
  "tshy": {
109
+ "project": "./tsconfig.src.json",
111
110
  "exports": {
112
111
  "./package.json": "./package.json",
113
112
  ".": "./src/index.ts"
@@ -144,5 +143,7 @@
144
143
  }
145
144
  },
146
145
  "type": "module",
147
- "module": "./dist/esm/index.js"
146
+ "module": "./dist/esm/index.js",
147
+ "browser": "./dist/browser/index.js",
148
+ "react-native": "./dist/react-native/index.js"
148
149
  }
@@ -1,88 +0,0 @@
1
- import type { CommonClientOptions } from '@azure/core-client';
2
- import type { OperationOptions } from '@azure/core-client';
3
- import type { TokenCredential } from '@azure/core-auth';
4
-
5
- /**
6
- * The client class used to interact with the App Configuration service.
7
- */
8
- export declare class ConfigurationClient {
9
- private client;
10
- private tracingClient;
11
- /**
12
- * Creates an instance of a ConfigurationClient.
13
- *
14
- * Example usage:
15
- * ```ts snippet:new_configurationclient
16
- * import { ConfigurationClient } from "@azure/template";
17
- * import { DefaultAzureCredential } from "@azure/identity";
18
- *
19
- * const client = new ConfigurationClient(
20
- * process.env.ENDPOINT ?? "<app configuration endpoint>",
21
- * new DefaultAzureCredential(),
22
- * );
23
- * ```
24
- * @param endpointUrl - the URL to the App Configuration endpoint
25
- * @param credential - used to authenticate requests to the service
26
- * @param options - optional configuration used to send requests to the service
27
- */
28
- constructor(endpointUrl: string, credential: TokenCredential, options?: ConfigurationClientOptions);
29
- /**
30
- * Retrieve the contents of an App Configuration setting by name (key).
31
- *
32
- * @param key - the unique name of the setting to get
33
- * @param options - optional configuration for the operation
34
- */
35
- getConfigurationSetting(key: string, options?: GetConfigurationSettingOptions): Promise<ConfigurationSetting>;
36
- /**
37
- * Retrieve an updated value of an App Configuration setting, allowing for
38
- * the use of entity tags to request the new value only if it has changed.
39
- *
40
- * @param setting - the setting to retrieve from the service
41
- * @param options - optional configuration for the operation
42
- */
43
- getConfigurationSetting(setting: ConfigurationSetting, options?: GetConfigurationSettingOptions): Promise<ConfigurationSetting>;
44
- }
45
-
46
- /**
47
- * Client options used to configure App Configuration API requests.
48
- */
49
- export declare interface ConfigurationClientOptions extends CommonClientOptions {
50
- }
51
-
52
- export declare interface ConfigurationSetting {
53
- /** The key of the key-value. */
54
- key?: string;
55
- /** The label the key-value belongs to. */
56
- label?: string;
57
- /** The content type of the value stored within the key-value. */
58
- contentType?: string;
59
- /** The value of the key-value. */
60
- value?: string;
61
- /** A date representing the last time the key-value was modified. */
62
- lastModified?: Date;
63
- /** The tags of the key-value */
64
- tags?: {
65
- [propertyName: string]: string;
66
- };
67
- /** Indicates whether the key-value is locked. */
68
- isReadOnly?: boolean;
69
- /** A value representing the current state of the resource. */
70
- etag?: string;
71
- }
72
-
73
- /**
74
- * Options for the `getConfigurationSetting` method of `ConfigurationClient`.
75
- */
76
- export declare interface GetConfigurationSettingOptions extends OperationOptions {
77
- /**
78
- * If set to `true`, the method will use entity tags to instruct the service
79
- * to send an updated value only if the value has changed.
80
- *
81
- * NOTE: This option is only supported if passing a full
82
- * `ConfigurationSetting` object with an `etag` as the first parameter to
83
- * `getConfigurationSetting`.
84
- */
85
- onlyIfChanged?: boolean;
86
- }
87
-
88
- export { }