@azure/keyvault-secrets 4.10.2-alpha.20260305.1 → 4.11.0

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 (243) hide show
  1. package/README.md +16 -1
  2. package/dist/browser/api/keyVaultContext.d.ts +2 -2
  3. package/dist/browser/api/keyVaultContext.js +2 -2
  4. package/dist/browser/api/keyVaultContext.js.map +1 -1
  5. package/dist/browser/api/operations.js +2 -1
  6. package/dist/browser/api/operations.js.map +1 -1
  7. package/dist/browser/api/options.d.ts +7 -0
  8. package/dist/browser/api/options.js.map +1 -1
  9. package/dist/browser/index.d.ts +4 -3
  10. package/dist/browser/index.js +3 -3
  11. package/dist/browser/index.js.map +1 -1
  12. package/dist/browser/models/models.d.ts +20 -1
  13. package/dist/browser/models/models.js +12 -0
  14. package/dist/browser/models/models.js.map +1 -1
  15. package/dist/browser/secretsModels.d.ts +15 -3
  16. package/dist/browser/secretsModels.js +1 -1
  17. package/dist/browser/secretsModels.js.map +1 -1
  18. package/dist/browser/static-helpers/urlTemplate.js.map +1 -1
  19. package/dist/browser/transformations.js +1 -0
  20. package/dist/browser/transformations.js.map +1 -1
  21. package/dist/commonjs/api/index.js +1 -0
  22. package/dist/commonjs/api/index.js.map +1 -1
  23. package/dist/commonjs/api/keyVaultContext.d.ts +2 -2
  24. package/dist/commonjs/api/keyVaultContext.js +2 -1
  25. package/dist/commonjs/api/keyVaultContext.js.map +2 -2
  26. package/dist/commonjs/api/operations.js +4 -2
  27. package/dist/commonjs/api/operations.js.map +3 -3
  28. package/dist/commonjs/api/options.d.ts +7 -0
  29. package/dist/commonjs/api/options.js +1 -0
  30. package/dist/commonjs/api/options.js.map +2 -2
  31. package/dist/commonjs/constants.js +1 -0
  32. package/dist/commonjs/constants.js.map +1 -1
  33. package/dist/commonjs/identifier.js +1 -0
  34. package/dist/commonjs/identifier.js.map +1 -1
  35. package/dist/commonjs/index.d.ts +4 -3
  36. package/dist/commonjs/index.js +4 -1
  37. package/dist/commonjs/index.js.map +3 -3
  38. package/dist/commonjs/keyVaultClient.js +1 -0
  39. package/dist/commonjs/keyVaultClient.js.map +1 -1
  40. package/dist/commonjs/logger.js +1 -0
  41. package/dist/commonjs/logger.js.map +1 -1
  42. package/dist/commonjs/lro/delete/operation.js +4 -0
  43. package/dist/commonjs/lro/delete/operation.js.map +2 -2
  44. package/dist/commonjs/lro/delete/poller.js +1 -0
  45. package/dist/commonjs/lro/delete/poller.js.map +1 -1
  46. package/dist/commonjs/lro/keyVaultSecretPoller.js +2 -0
  47. package/dist/commonjs/lro/keyVaultSecretPoller.js.map +2 -2
  48. package/dist/commonjs/lro/recover/operation.js +4 -0
  49. package/dist/commonjs/lro/recover/operation.js.map +2 -2
  50. package/dist/commonjs/lro/recover/poller.js +1 -0
  51. package/dist/commonjs/lro/recover/poller.js.map +1 -1
  52. package/dist/commonjs/models/index.js +1 -0
  53. package/dist/commonjs/models/index.js.map +1 -1
  54. package/dist/commonjs/models/models.d.ts +20 -1
  55. package/dist/commonjs/models/models.js +12 -1
  56. package/dist/commonjs/models/models.js.map +4 -4
  57. package/dist/commonjs/secretsModels.d.ts +15 -3
  58. package/dist/commonjs/secretsModels.js +2 -1
  59. package/dist/commonjs/secretsModels.js.map +2 -2
  60. package/dist/commonjs/static-helpers/pagingHelpers.js +1 -0
  61. package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
  62. package/dist/commonjs/static-helpers/urlTemplate.js +1 -0
  63. package/dist/commonjs/static-helpers/urlTemplate.js.map +2 -2
  64. package/dist/commonjs/tracing.js +1 -0
  65. package/dist/commonjs/tracing.js.map +1 -1
  66. package/dist/commonjs/transformations.js +2 -0
  67. package/dist/commonjs/transformations.js.map +3 -3
  68. package/dist/commonjs/tsdoc-metadata.json +1 -1
  69. package/dist/esm/api/index.js +5 -32
  70. package/dist/esm/api/index.js.map +1 -7
  71. package/dist/esm/api/keyVaultContext.d.ts +2 -2
  72. package/dist/esm/api/keyVaultContext.js +35 -30
  73. package/dist/esm/api/keyVaultContext.js.map +1 -7
  74. package/dist/esm/api/operations.js +346 -444
  75. package/dist/esm/api/operations.js.map +1 -7
  76. package/dist/esm/api/options.d.ts +7 -0
  77. package/dist/esm/api/options.js +4 -0
  78. package/dist/esm/api/options.js.map +1 -7
  79. package/dist/esm/constants.js +4 -4
  80. package/dist/esm/constants.js.map +1 -7
  81. package/dist/esm/identifier.js +26 -10
  82. package/dist/esm/identifier.js.map +1 -7
  83. package/dist/esm/index.d.ts +4 -3
  84. package/dist/esm/index.js +496 -531
  85. package/dist/esm/index.js.map +1 -7
  86. package/dist/esm/keyVaultClient.js +68 -79
  87. package/dist/esm/keyVaultClient.js.map +1 -7
  88. package/dist/esm/logger.js +7 -4
  89. package/dist/esm/logger.js.map +1 -7
  90. package/dist/esm/lro/delete/operation.js +68 -67
  91. package/dist/esm/lro/delete/operation.js.map +1 -7
  92. package/dist/esm/lro/delete/poller.js +19 -20
  93. package/dist/esm/lro/delete/poller.js.map +1 -7
  94. package/dist/esm/lro/keyVaultSecretPoller.js +51 -44
  95. package/dist/esm/lro/keyVaultSecretPoller.js.map +1 -7
  96. package/dist/esm/lro/recover/operation.js +73 -74
  97. package/dist/esm/lro/recover/operation.js.map +1 -7
  98. package/dist/esm/lro/recover/poller.js +19 -20
  99. package/dist/esm/lro/recover/poller.js.map +1 -7
  100. package/dist/esm/models/index.js +4 -8
  101. package/dist/esm/models/index.js.map +1 -7
  102. package/dist/esm/models/models.d.ts +20 -1
  103. package/dist/esm/models/models.js +186 -157
  104. package/dist/esm/models/models.js.map +1 -7
  105. package/dist/esm/secretsModels.d.ts +15 -3
  106. package/dist/esm/secretsModels.js +7 -4
  107. package/dist/esm/secretsModels.js.map +1 -7
  108. package/dist/esm/static-helpers/pagingHelpers.js +99 -85
  109. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -7
  110. package/dist/esm/static-helpers/urlTemplate.js +142 -123
  111. package/dist/esm/static-helpers/urlTemplate.js.map +1 -7
  112. package/dist/esm/tracing.js +7 -7
  113. package/dist/esm/tracing.js.map +1 -7
  114. package/dist/esm/transformations.js +90 -76
  115. package/dist/esm/transformations.js.map +1 -7
  116. package/dist/react-native/api/index.d.ts +4 -0
  117. package/dist/react-native/api/index.js +5 -0
  118. package/dist/react-native/api/index.js.map +1 -0
  119. package/dist/react-native/api/keyVaultContext.d.ts +17 -0
  120. package/dist/react-native/api/keyVaultContext.js +38 -0
  121. package/dist/react-native/api/keyVaultContext.js.map +1 -0
  122. package/dist/react-native/api/operations.d.ts +54 -0
  123. package/dist/react-native/api/operations.js +361 -0
  124. package/dist/react-native/api/operations.js.map +1 -0
  125. package/dist/react-native/api/options.d.ts +51 -0
  126. package/dist/react-native/api/options.js +4 -0
  127. package/dist/react-native/api/options.js.map +1 -0
  128. package/dist/react-native/constants.d.ts +2 -0
  129. package/dist/react-native/constants.js +4 -0
  130. package/dist/react-native/constants.js.map +1 -0
  131. package/dist/react-native/identifier.d.ts +42 -0
  132. package/dist/react-native/identifier.js +28 -0
  133. package/dist/react-native/identifier.js.map +1 -0
  134. package/dist/react-native/index.d.ts +410 -0
  135. package/dist/react-native/index.js +508 -0
  136. package/dist/react-native/index.js.map +1 -0
  137. package/dist/react-native/keyVaultClient.d.ts +39 -0
  138. package/dist/react-native/keyVaultClient.js +70 -0
  139. package/dist/react-native/keyVaultClient.js.map +1 -0
  140. package/dist/react-native/logger.d.ts +5 -0
  141. package/dist/react-native/logger.js +8 -0
  142. package/dist/react-native/logger.js.map +1 -0
  143. package/dist/react-native/lro/delete/operation.d.ts +38 -0
  144. package/dist/react-native/lro/delete/operation.js +76 -0
  145. package/dist/react-native/lro/delete/operation.js.map +1 -0
  146. package/dist/react-native/lro/delete/poller.d.ts +11 -0
  147. package/dist/react-native/lro/delete/poller.js +23 -0
  148. package/dist/react-native/lro/delete/poller.js.map +1 -0
  149. package/dist/react-native/lro/keyVaultSecretPoller.d.ts +65 -0
  150. package/dist/react-native/lro/keyVaultSecretPoller.js +56 -0
  151. package/dist/react-native/lro/keyVaultSecretPoller.js.map +1 -0
  152. package/dist/react-native/lro/recover/operation.d.ts +38 -0
  153. package/dist/react-native/lro/recover/operation.js +81 -0
  154. package/dist/react-native/lro/recover/operation.js.map +1 -0
  155. package/dist/react-native/lro/recover/poller.d.ts +11 -0
  156. package/dist/react-native/lro/recover/poller.js +23 -0
  157. package/dist/react-native/lro/recover/poller.js.map +1 -0
  158. package/dist/react-native/models/index.d.ts +2 -0
  159. package/dist/react-native/models/index.js +4 -0
  160. package/dist/react-native/models/index.js.map +1 -0
  161. package/dist/react-native/models/models.d.ts +229 -0
  162. package/dist/react-native/models/models.js +187 -0
  163. package/dist/react-native/models/models.js.map +1 -0
  164. package/dist/react-native/package.json +3 -0
  165. package/dist/react-native/secretsModels.d.ts +342 -0
  166. package/dist/react-native/secretsModels.js +7 -0
  167. package/dist/react-native/secretsModels.js.map +1 -0
  168. package/dist/react-native/static-helpers/pagingHelpers.d.ts +72 -0
  169. package/dist/react-native/static-helpers/pagingHelpers.js +118 -0
  170. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -0
  171. package/dist/react-native/static-helpers/urlTemplate.d.ts +5 -0
  172. package/dist/react-native/static-helpers/urlTemplate.js +169 -0
  173. package/dist/react-native/static-helpers/urlTemplate.js.map +1 -0
  174. package/dist/react-native/tracing.d.ts +2 -0
  175. package/dist/react-native/tracing.js +10 -0
  176. package/dist/react-native/tracing.js.map +1 -0
  177. package/dist/react-native/transformations.d.ts +22 -0
  178. package/dist/react-native/transformations.js +95 -0
  179. package/dist/react-native/transformations.js.map +1 -0
  180. package/package.json +74 -66
  181. package/dist/browser/api/index.d.ts.map +0 -1
  182. package/dist/browser/api/keyVaultContext.d.ts.map +0 -1
  183. package/dist/browser/api/operations.d.ts.map +0 -1
  184. package/dist/browser/api/options.d.ts.map +0 -1
  185. package/dist/browser/constants.d.ts.map +0 -1
  186. package/dist/browser/identifier.d.ts.map +0 -1
  187. package/dist/browser/index.d.ts.map +0 -1
  188. package/dist/browser/keyVaultClient.d.ts.map +0 -1
  189. package/dist/browser/logger.d.ts.map +0 -1
  190. package/dist/browser/lro/delete/operation.d.ts.map +0 -1
  191. package/dist/browser/lro/delete/poller.d.ts.map +0 -1
  192. package/dist/browser/lro/keyVaultSecretPoller.d.ts.map +0 -1
  193. package/dist/browser/lro/recover/operation.d.ts.map +0 -1
  194. package/dist/browser/lro/recover/poller.d.ts.map +0 -1
  195. package/dist/browser/models/index.d.ts.map +0 -1
  196. package/dist/browser/models/models.d.ts.map +0 -1
  197. package/dist/browser/secretsModels.d.ts.map +0 -1
  198. package/dist/browser/static-helpers/pagingHelpers.d.ts.map +0 -1
  199. package/dist/browser/static-helpers/urlTemplate.d.ts.map +0 -1
  200. package/dist/browser/tracing.d.ts.map +0 -1
  201. package/dist/browser/transformations.d.ts.map +0 -1
  202. package/dist/commonjs/api/index.d.ts.map +0 -1
  203. package/dist/commonjs/api/keyVaultContext.d.ts.map +0 -1
  204. package/dist/commonjs/api/operations.d.ts.map +0 -1
  205. package/dist/commonjs/api/options.d.ts.map +0 -1
  206. package/dist/commonjs/constants.d.ts.map +0 -1
  207. package/dist/commonjs/identifier.d.ts.map +0 -1
  208. package/dist/commonjs/index.d.ts.map +0 -1
  209. package/dist/commonjs/keyVaultClient.d.ts.map +0 -1
  210. package/dist/commonjs/logger.d.ts.map +0 -1
  211. package/dist/commonjs/lro/delete/operation.d.ts.map +0 -1
  212. package/dist/commonjs/lro/delete/poller.d.ts.map +0 -1
  213. package/dist/commonjs/lro/keyVaultSecretPoller.d.ts.map +0 -1
  214. package/dist/commonjs/lro/recover/operation.d.ts.map +0 -1
  215. package/dist/commonjs/lro/recover/poller.d.ts.map +0 -1
  216. package/dist/commonjs/models/index.d.ts.map +0 -1
  217. package/dist/commonjs/models/models.d.ts.map +0 -1
  218. package/dist/commonjs/secretsModels.d.ts.map +0 -1
  219. package/dist/commonjs/static-helpers/pagingHelpers.d.ts.map +0 -1
  220. package/dist/commonjs/static-helpers/urlTemplate.d.ts.map +0 -1
  221. package/dist/commonjs/tracing.d.ts.map +0 -1
  222. package/dist/commonjs/transformations.d.ts.map +0 -1
  223. package/dist/esm/api/index.d.ts.map +0 -1
  224. package/dist/esm/api/keyVaultContext.d.ts.map +0 -1
  225. package/dist/esm/api/operations.d.ts.map +0 -1
  226. package/dist/esm/api/options.d.ts.map +0 -1
  227. package/dist/esm/constants.d.ts.map +0 -1
  228. package/dist/esm/identifier.d.ts.map +0 -1
  229. package/dist/esm/index.d.ts.map +0 -1
  230. package/dist/esm/keyVaultClient.d.ts.map +0 -1
  231. package/dist/esm/logger.d.ts.map +0 -1
  232. package/dist/esm/lro/delete/operation.d.ts.map +0 -1
  233. package/dist/esm/lro/delete/poller.d.ts.map +0 -1
  234. package/dist/esm/lro/keyVaultSecretPoller.d.ts.map +0 -1
  235. package/dist/esm/lro/recover/operation.d.ts.map +0 -1
  236. package/dist/esm/lro/recover/poller.d.ts.map +0 -1
  237. package/dist/esm/models/index.d.ts.map +0 -1
  238. package/dist/esm/models/models.d.ts.map +0 -1
  239. package/dist/esm/secretsModels.d.ts.map +0 -1
  240. package/dist/esm/static-helpers/pagingHelpers.d.ts.map +0 -1
  241. package/dist/esm/static-helpers/urlTemplate.d.ts.map +0 -1
  242. package/dist/esm/tracing.d.ts.map +0 -1
  243. package/dist/esm/transformations.d.ts.map +0 -1
package/README.md CHANGED
@@ -99,7 +99,22 @@ const credential = new DefaultAzureCredential();
99
99
  const vaultName = "<YOUR KEYVAULT NAME>";
100
100
  const url = `https://${vaultName}.vault.azure.net`;
101
101
 
102
- // Lastly, create our keys client and connect to the service
102
+ // Lastly, create our secrets client and connect to the service
103
+ const client = new SecretClient(url, credential);
104
+ ```
105
+
106
+ For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
107
+
108
+ ```ts snippet:ReadmeSampleCreateClientBrowser
109
+ import { InteractiveBrowserCredential } from "@azure/identity";
110
+ import { SecretClient } from "@azure/keyvault-secrets";
111
+
112
+ const credential = new InteractiveBrowserCredential({
113
+ tenantId: "<YOUR_TENANT_ID>",
114
+ clientId: "<YOUR_CLIENT_ID>",
115
+ });
116
+ const vaultName = "<YOUR KEYVAULT NAME>";
117
+ const url = `https://${vaultName}.vault.azure.net`;
103
118
  const client = new SecretClient(url, credential);
104
119
  ```
105
120
 
@@ -1,6 +1,6 @@
1
1
  import type { Client, ClientOptions } from "@azure-rest/core-client";
2
2
  import type { TokenCredential } from "@azure/core-auth";
3
- /** The key vault client performs cryptographic key operations and vault operations against the Key Vault service. */
3
+ /** The Azure Key Vault Secrets client manages secrets in the Key Vault service. */
4
4
  export interface KeyVaultContext extends Client {
5
5
  /** The API version to use for this operation. */
6
6
  /** Known values of {@link KnownVersions} that the service accepts. */
@@ -12,6 +12,6 @@ export interface KeyVaultClientOptionalParams extends ClientOptions {
12
12
  /** Known values of {@link KnownVersions} that the service accepts. */
13
13
  apiVersion?: string;
14
14
  }
15
- /** The key vault client performs cryptographic key operations and vault operations against the Key Vault service. */
15
+ /** Creates a new Azure Key Vault Secrets client context. */
16
16
  export declare function createKeyVault(endpointParam: string, credential: TokenCredential, options?: KeyVaultClientOptionalParams): KeyVaultContext;
17
17
  //# sourceMappingURL=keyVaultContext.d.ts.map
@@ -2,7 +2,7 @@
2
2
  // Licensed under the MIT License.
3
3
  import { logger } from "../logger.js";
4
4
  import { getClient } from "@azure-rest/core-client";
5
- /** The key vault client performs cryptographic key operations and vault operations against the Key Vault service. */
5
+ /** Creates a new Azure Key Vault Secrets client context. */
6
6
  export function createKeyVault(endpointParam, credential, options = {}) {
7
7
  const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);
8
8
  const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
@@ -20,7 +20,7 @@ export function createKeyVault(endpointParam, credential, options = {}) {
20
20
  };
21
21
  const clientContext = getClient(endpointUrl, credential, updatedOptions);
22
22
  clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" });
23
- const apiVersion = options.apiVersion ?? "7.6";
23
+ const apiVersion = options.apiVersion ?? "2025-07-01";
24
24
  clientContext.pipeline.addPolicy({
25
25
  name: "ClientApiVersionPolicy",
26
26
  sendRequest: (req, next) => {
@@ -1 +1 @@
1
- {"version":3,"file":"keyVaultContext.js","sourceRoot":"","sources":["../../../src/api/keyVaultContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAiBpD,qHAAqH;AACrH,MAAM,UAAU,cAAc,CAC5B,aAAqB,EACrB,UAA2B,EAC3B,UAAwC,EAAE;IAE1C,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC;IACjF,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,wCAAwC,CAAC;IAC/D,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE;YACX,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,kCAAkC,CAAC;SAC5E;KACF,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC;IAC/C,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAqB,CAAC;AAC7D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/** The key vault client performs cryptographic key operations and vault operations against the Key Vault service. */\nexport interface KeyVaultContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n}\n\n/** Optional parameters for the client. */\nexport interface KeyVaultClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** The key vault client performs cryptographic key operations and vault operations against the Key Vault service. */\nexport function createKeyVault(\n endpointParam: string,\n credential: TokenCredential,\n options: KeyVaultClientOptionalParams = {},\n): KeyVaultContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-keyvault-secrets/1.0.0-beta.1`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://vault.azure.net/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"7.6\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return { ...clientContext, apiVersion } as KeyVaultContext;\n}\n"]}
1
+ {"version":3,"file":"keyVaultContext.js","sourceRoot":"","sources":["../../../src/api/keyVaultContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAiBpD,4DAA4D;AAC5D,MAAM,UAAU,cAAc,CAC5B,aAAqB,EACrB,UAA2B,EAC3B,UAAwC,EAAE;IAE1C,MAAM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AAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAqB,CAAC;AAC7D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/** The Azure Key Vault Secrets client manages secrets in the Key Vault service. */\nexport interface KeyVaultContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n}\n\n/** Optional parameters for the client. */\nexport interface KeyVaultClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Creates a new Azure Key Vault Secrets client context. */\nexport function createKeyVault(\n endpointParam: string,\n credential: TokenCredential,\n options: KeyVaultClientOptionalParams = {},\n): KeyVaultContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-keyvault-secrets/1.0.0-beta.1`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://vault.azure.net/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2025-07-01\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return { ...clientContext, apiVersion } as KeyVaultContext;\n}\n"]}
@@ -236,10 +236,11 @@ export function getSecrets(context, options = { requestOptions: {} }) {
236
236
  return buildPagedAsyncIterator(context, () => _getSecretsSend(context, options), _getSecretsDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
237
237
  }
238
238
  export function _getSecretSend(context, secretName, secretVersion, options = { requestOptions: {} }) {
239
- const path = expandUrlTemplate("/secrets/{secret-name}/{secret-version}{?api%2Dversion}", {
239
+ const path = expandUrlTemplate("/secrets/{secret-name}/{secret-version}{?api%2Dversion,outContentType}", {
240
240
  "secret-name": secretName,
241
241
  "secret-version": secretVersion,
242
242
  "api%2Dversion": context.apiVersion,
243
+ outContentType: options?.outContentType,
243
244
  }, {
244
245
  allowReserved: options?.requestOptions?.skipUrlEncoding,
245
246
  });
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/api/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,yBAAyB,EACzB,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,oCAAoC,EACpC,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,qBAAqB,CAAC;AAgB7B,OAAO,EAAE,uBAA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B,EAC/B,UAAmC,EAAE,cAAc,EAAE,EAAE,EAAE;IAEzD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC9E,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { KeyVaultContext as Client } from \"./index.js\";\nimport type {\n SecretSetParameters,\n SecretBundle,\n DeletedSecretBundle,\n SecretUpdateParameters,\n _SecretListResult,\n SecretItem,\n _DeletedSecretListResult,\n DeletedSecretItem,\n BackupSecretResult,\n SecretRestoreParameters,\n} from \"../models/models.js\";\nimport {\n secretSetParametersSerializer,\n secretBundleDeserializer,\n keyVaultErrorDeserializer,\n deletedSecretBundleDeserializer,\n secretUpdateParametersSerializer,\n _secretListResultDeserializer,\n _deletedSecretListResultDeserializer,\n backupSecretResultDeserializer,\n secretRestoreParametersSerializer,\n} from \"../models/models.js\";\nimport type {\n RestoreSecretOptionalParams,\n BackupSecretOptionalParams,\n RecoverDeletedSecretOptionalParams,\n PurgeDeletedSecretOptionalParams,\n GetDeletedSecretOptionalParams,\n GetDeletedSecretsOptionalParams,\n GetSecretVersionsOptionalParams,\n GetSecretsOptionalParams,\n GetSecretOptionalParams,\n UpdateSecretOptionalParams,\n DeleteSecretOptionalParams,\n SetSecretOptionalParams,\n} from \"./options.js\";\nimport type { PagedAsyncIterableIterator } from \"../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../static-helpers/urlTemplate.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _restoreSecretSend(\n context: Client,\n parameters: SecretRestoreParameters,\n options: RestoreSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/restore{?api%2Dversion}\",\n {\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: secretRestoreParametersSerializer(parameters),\n });\n}\n\nexport async function _restoreSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<SecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return secretBundleDeserializer(result.body);\n}\n\n/** Restores a backed up secret, and all its versions, to a vault. This operation requires the secrets/restore permission. */\nexport async function restoreSecret(\n context: Client,\n parameters: SecretRestoreParameters,\n options: RestoreSecretOptionalParams = { requestOptions: {} },\n): Promise<SecretBundle> {\n const result = await _restoreSecretSend(context, parameters, options);\n return _restoreSecretDeserialize(result);\n}\n\nexport function _backupSecretSend(\n context: Client,\n secretName: string,\n options: BackupSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}/backup{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _backupSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<BackupSecretResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return backupSecretResultDeserializer(result.body);\n}\n\n/** Requests that a backup of the specified secret be downloaded to the client. All versions of the secret will be downloaded. This operation requires the secrets/backup permission. */\nexport async function backupSecret(\n context: Client,\n secretName: string,\n options: BackupSecretOptionalParams = { requestOptions: {} },\n): Promise<BackupSecretResult> {\n const result = await _backupSecretSend(context, secretName, options);\n return _backupSecretDeserialize(result);\n}\n\nexport function _recoverDeletedSecretSend(\n context: Client,\n secretName: string,\n options: RecoverDeletedSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/deletedsecrets/{secret-name}/recover{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _recoverDeletedSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<SecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return secretBundleDeserializer(result.body);\n}\n\n/** Recovers the deleted secret in the specified vault. This operation can only be performed on a soft-delete enabled vault. This operation requires the secrets/recover permission. */\nexport async function recoverDeletedSecret(\n context: Client,\n secretName: string,\n options: RecoverDeletedSecretOptionalParams = { requestOptions: {} },\n): Promise<SecretBundle> {\n const result = await _recoverDeletedSecretSend(context, secretName, options);\n return _recoverDeletedSecretDeserialize(result);\n}\n\nexport function _purgeDeletedSecretSend(\n context: Client,\n secretName: string,\n options: PurgeDeletedSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/deletedsecrets/{secret-name}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _purgeDeletedSecretDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** The purge deleted secret operation removes the secret permanently, without the possibility of recovery. This operation can only be enabled on a soft-delete enabled vault. This operation requires the secrets/purge permission. */\nexport async function purgeDeletedSecret(\n context: Client,\n secretName: string,\n options: PurgeDeletedSecretOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _purgeDeletedSecretSend(context, secretName, options);\n return _purgeDeletedSecretDeserialize(result);\n}\n\nexport function _getDeletedSecretSend(\n context: Client,\n secretName: string,\n options: GetDeletedSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/deletedsecrets/{secret-name}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeletedSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<DeletedSecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return deletedSecretBundleDeserializer(result.body);\n}\n\n/** The Get Deleted Secret operation returns the specified deleted secret along with its attributes. This operation requires the secrets/get permission. */\nexport async function getDeletedSecret(\n context: Client,\n secretName: string,\n options: GetDeletedSecretOptionalParams = { requestOptions: {} },\n): Promise<DeletedSecretBundle> {\n const result = await _getDeletedSecretSend(context, secretName, options);\n return _getDeletedSecretDeserialize(result);\n}\n\nexport function _getDeletedSecretsSend(\n context: Client,\n options: GetDeletedSecretsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/deletedsecrets{?api%2Dversion,maxresults}\",\n {\n \"api%2Dversion\": context.apiVersion,\n maxresults: options?.maxresults,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeletedSecretsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_DeletedSecretListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return _deletedSecretListResultDeserializer(result.body);\n}\n\n/** The Get Deleted Secrets operation returns the secrets that have been deleted for a vault enabled for soft-delete. This operation requires the secrets/list permission. */\nexport function getDeletedSecrets(\n context: Client,\n options: GetDeletedSecretsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<DeletedSecretItem> {\n return buildPagedAsyncIterator(\n context,\n () => _getDeletedSecretsSend(context, options),\n _getDeletedSecretsDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _getSecretVersionsSend(\n context: Client,\n secretName: string,\n options: GetSecretVersionsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}/versions{?api%2Dversion,maxresults}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n maxresults: options?.maxresults,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getSecretVersionsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_SecretListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return _secretListResultDeserializer(result.body);\n}\n\n/** The full secret identifier and attributes are provided in the response. No values are returned for the secrets. This operations requires the secrets/list permission. */\nexport function getSecretVersions(\n context: Client,\n secretName: string,\n options: GetSecretVersionsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<SecretItem> {\n return buildPagedAsyncIterator(\n context,\n () => _getSecretVersionsSend(context, secretName, options),\n _getSecretVersionsDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _getSecretsSend(\n context: Client,\n options: GetSecretsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets{?api%2Dversion,maxresults}\",\n {\n \"api%2Dversion\": context.apiVersion,\n maxresults: options?.maxresults,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getSecretsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_SecretListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return _secretListResultDeserializer(result.body);\n}\n\n/** The Get Secrets operation is applicable to the entire vault. However, only the base secret identifier and its attributes are provided in the response. Individual secret versions are not listed in the response. This operation requires the secrets/list permission. */\nexport function getSecrets(\n context: Client,\n options: GetSecretsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<SecretItem> {\n return buildPagedAsyncIterator(\n context,\n () => _getSecretsSend(context, options),\n _getSecretsDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _getSecretSend(\n context: Client,\n secretName: string,\n secretVersion: string,\n options: GetSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}/{secret-version}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"secret-version\": secretVersion,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getSecretDeserialize(result: PathUncheckedResponse): Promise<SecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return secretBundleDeserializer(result.body);\n}\n\n/** The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires the secrets/get permission. */\nexport async function getSecret(\n context: Client,\n secretName: string,\n secretVersion: string,\n options: GetSecretOptionalParams = { requestOptions: {} },\n): Promise<SecretBundle> {\n const result = await _getSecretSend(context, secretName, secretVersion, options);\n return _getSecretDeserialize(result);\n}\n\nexport function _updateSecretSend(\n context: Client,\n secretName: string,\n secretVersion: string,\n parameters: SecretUpdateParameters,\n options: UpdateSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}/{secret-version}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"secret-version\": secretVersion,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: secretUpdateParametersSerializer(parameters),\n });\n}\n\nexport async function _updateSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<SecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return secretBundleDeserializer(result.body);\n}\n\n/** The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed. This operation requires the secrets/set permission. */\nexport async function updateSecret(\n context: Client,\n secretName: string,\n secretVersion: string,\n parameters: SecretUpdateParameters,\n options: UpdateSecretOptionalParams = { requestOptions: {} },\n): Promise<SecretBundle> {\n const result = await _updateSecretSend(context, secretName, secretVersion, parameters, options);\n return _updateSecretDeserialize(result);\n}\n\nexport function _deleteSecretSend(\n context: Client,\n secretName: string,\n options: DeleteSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _deleteSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<DeletedSecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return deletedSecretBundleDeserializer(result.body);\n}\n\n/** The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret. This operation requires the secrets/delete permission. */\nexport async function deleteSecret(\n context: Client,\n secretName: string,\n options: DeleteSecretOptionalParams = { requestOptions: {} },\n): Promise<DeletedSecretBundle> {\n const result = await _deleteSecretSend(context, secretName, options);\n return _deleteSecretDeserialize(result);\n}\n\nexport function _setSecretSend(\n context: Client,\n secretName: string,\n parameters: SecretSetParameters,\n options: SetSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: secretSetParametersSerializer(parameters),\n });\n}\n\nexport async function _setSecretDeserialize(result: PathUncheckedResponse): Promise<SecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return secretBundleDeserializer(result.body);\n}\n\n/** The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requires the secrets/set permission. */\nexport async function setSecret(\n context: Client,\n secretName: string,\n parameters: SecretSetParameters,\n options: SetSecretOptionalParams = { requestOptions: {} },\n): Promise<SecretBundle> {\n const result = await _setSecretSend(context, secretName, parameters, options);\n return _setSecretDeserialize(result);\n}\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/api/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,yBAAyB,EACzB,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,oCAAoC,EACpC,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,qBAAqB,CAAC;AAgB7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE/F,MAAM,UAAU,kBAAkB,CAChC,OAAe,EACf,UAAmC,EACnC,UAAuC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE7D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,kCAAkC,EAClC;QACE,eAAe,EAAE,OAAO,CAAC,UAA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;QACE,aAAa,EAAE,UAAU;QACzB,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,GAAG,mCAAmC,CAAC,OAAO,CAAC;QAC/C,WAAW,EAAE,kBAAkB;QAC/B,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;QACD,IAAI,EAAE,6BAA6B,CAAC,UAAU,CAAC;KAChD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAA6B;IACvE,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,wBAAwB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED,4MAA4M;AAC5M,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,OAAe,EACf,UAAkB,EAClB,UAA+B,EAC/B,UAAmC,EAAE,cAAc,EAAE,EAAE,EAAE;IAEzD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC9E,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { KeyVaultContext as Client } from \"./index.js\";\nimport type {\n SecretSetParameters,\n SecretBundle,\n DeletedSecretBundle,\n SecretUpdateParameters,\n _SecretListResult,\n SecretItem,\n _DeletedSecretListResult,\n DeletedSecretItem,\n BackupSecretResult,\n SecretRestoreParameters,\n} from \"../models/models.js\";\nimport {\n secretSetParametersSerializer,\n secretBundleDeserializer,\n keyVaultErrorDeserializer,\n deletedSecretBundleDeserializer,\n secretUpdateParametersSerializer,\n _secretListResultDeserializer,\n _deletedSecretListResultDeserializer,\n backupSecretResultDeserializer,\n secretRestoreParametersSerializer,\n} from \"../models/models.js\";\nimport type {\n RestoreSecretOptionalParams,\n BackupSecretOptionalParams,\n RecoverDeletedSecretOptionalParams,\n PurgeDeletedSecretOptionalParams,\n GetDeletedSecretOptionalParams,\n GetDeletedSecretsOptionalParams,\n GetSecretVersionsOptionalParams,\n GetSecretsOptionalParams,\n GetSecretOptionalParams,\n UpdateSecretOptionalParams,\n DeleteSecretOptionalParams,\n SetSecretOptionalParams,\n} from \"./options.js\";\nimport type { PagedAsyncIterableIterator } from \"../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../static-helpers/urlTemplate.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _restoreSecretSend(\n context: Client,\n parameters: SecretRestoreParameters,\n options: RestoreSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/restore{?api%2Dversion}\",\n {\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: secretRestoreParametersSerializer(parameters),\n });\n}\n\nexport async function _restoreSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<SecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return secretBundleDeserializer(result.body);\n}\n\n/** Restores a backed up secret, and all its versions, to a vault. This operation requires the secrets/restore permission. */\nexport async function restoreSecret(\n context: Client,\n parameters: SecretRestoreParameters,\n options: RestoreSecretOptionalParams = { requestOptions: {} },\n): Promise<SecretBundle> {\n const result = await _restoreSecretSend(context, parameters, options);\n return _restoreSecretDeserialize(result);\n}\n\nexport function _backupSecretSend(\n context: Client,\n secretName: string,\n options: BackupSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}/backup{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _backupSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<BackupSecretResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return backupSecretResultDeserializer(result.body);\n}\n\n/** Requests that a backup of the specified secret be downloaded to the client. All versions of the secret will be downloaded. This operation requires the secrets/backup permission. */\nexport async function backupSecret(\n context: Client,\n secretName: string,\n options: BackupSecretOptionalParams = { requestOptions: {} },\n): Promise<BackupSecretResult> {\n const result = await _backupSecretSend(context, secretName, options);\n return _backupSecretDeserialize(result);\n}\n\nexport function _recoverDeletedSecretSend(\n context: Client,\n secretName: string,\n options: RecoverDeletedSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/deletedsecrets/{secret-name}/recover{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _recoverDeletedSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<SecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return secretBundleDeserializer(result.body);\n}\n\n/** Recovers the deleted secret in the specified vault. This operation can only be performed on a soft-delete enabled vault. This operation requires the secrets/recover permission. */\nexport async function recoverDeletedSecret(\n context: Client,\n secretName: string,\n options: RecoverDeletedSecretOptionalParams = { requestOptions: {} },\n): Promise<SecretBundle> {\n const result = await _recoverDeletedSecretSend(context, secretName, options);\n return _recoverDeletedSecretDeserialize(result);\n}\n\nexport function _purgeDeletedSecretSend(\n context: Client,\n secretName: string,\n options: PurgeDeletedSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/deletedsecrets/{secret-name}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _purgeDeletedSecretDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** The purge deleted secret operation removes the secret permanently, without the possibility of recovery. This operation can only be enabled on a soft-delete enabled vault. This operation requires the secrets/purge permission. */\nexport async function purgeDeletedSecret(\n context: Client,\n secretName: string,\n options: PurgeDeletedSecretOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _purgeDeletedSecretSend(context, secretName, options);\n return _purgeDeletedSecretDeserialize(result);\n}\n\nexport function _getDeletedSecretSend(\n context: Client,\n secretName: string,\n options: GetDeletedSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/deletedsecrets/{secret-name}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeletedSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<DeletedSecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return deletedSecretBundleDeserializer(result.body);\n}\n\n/** The Get Deleted Secret operation returns the specified deleted secret along with its attributes. This operation requires the secrets/get permission. */\nexport async function getDeletedSecret(\n context: Client,\n secretName: string,\n options: GetDeletedSecretOptionalParams = { requestOptions: {} },\n): Promise<DeletedSecretBundle> {\n const result = await _getDeletedSecretSend(context, secretName, options);\n return _getDeletedSecretDeserialize(result);\n}\n\nexport function _getDeletedSecretsSend(\n context: Client,\n options: GetDeletedSecretsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/deletedsecrets{?api%2Dversion,maxresults}\",\n {\n \"api%2Dversion\": context.apiVersion,\n maxresults: options?.maxresults,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeletedSecretsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_DeletedSecretListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return _deletedSecretListResultDeserializer(result.body);\n}\n\n/** The Get Deleted Secrets operation returns the secrets that have been deleted for a vault enabled for soft-delete. This operation requires the secrets/list permission. */\nexport function getDeletedSecrets(\n context: Client,\n options: GetDeletedSecretsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<DeletedSecretItem> {\n return buildPagedAsyncIterator(\n context,\n () => _getDeletedSecretsSend(context, options),\n _getDeletedSecretsDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _getSecretVersionsSend(\n context: Client,\n secretName: string,\n options: GetSecretVersionsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}/versions{?api%2Dversion,maxresults}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n maxresults: options?.maxresults,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getSecretVersionsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_SecretListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return _secretListResultDeserializer(result.body);\n}\n\n/** The full secret identifier and attributes are provided in the response. No values are returned for the secrets. This operations requires the secrets/list permission. */\nexport function getSecretVersions(\n context: Client,\n secretName: string,\n options: GetSecretVersionsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<SecretItem> {\n return buildPagedAsyncIterator(\n context,\n () => _getSecretVersionsSend(context, secretName, options),\n _getSecretVersionsDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _getSecretsSend(\n context: Client,\n options: GetSecretsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets{?api%2Dversion,maxresults}\",\n {\n \"api%2Dversion\": context.apiVersion,\n maxresults: options?.maxresults,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getSecretsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_SecretListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return _secretListResultDeserializer(result.body);\n}\n\n/** The Get Secrets operation is applicable to the entire vault. However, only the base secret identifier and its attributes are provided in the response. Individual secret versions are not listed in the response. This operation requires the secrets/list permission. */\nexport function getSecrets(\n context: Client,\n options: GetSecretsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<SecretItem> {\n return buildPagedAsyncIterator(\n context,\n () => _getSecretsSend(context, options),\n _getSecretsDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _getSecretSend(\n context: Client,\n secretName: string,\n secretVersion: string,\n options: GetSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}/{secret-version}{?api%2Dversion,outContentType}\",\n {\n \"secret-name\": secretName,\n \"secret-version\": secretVersion,\n \"api%2Dversion\": context.apiVersion,\n outContentType: options?.outContentType,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getSecretDeserialize(result: PathUncheckedResponse): Promise<SecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return secretBundleDeserializer(result.body);\n}\n\n/** The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires the secrets/get permission. */\nexport async function getSecret(\n context: Client,\n secretName: string,\n secretVersion: string,\n options: GetSecretOptionalParams = { requestOptions: {} },\n): Promise<SecretBundle> {\n const result = await _getSecretSend(context, secretName, secretVersion, options);\n return _getSecretDeserialize(result);\n}\n\nexport function _updateSecretSend(\n context: Client,\n secretName: string,\n secretVersion: string,\n parameters: SecretUpdateParameters,\n options: UpdateSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}/{secret-version}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"secret-version\": secretVersion,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: secretUpdateParametersSerializer(parameters),\n });\n}\n\nexport async function _updateSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<SecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return secretBundleDeserializer(result.body);\n}\n\n/** The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed. This operation requires the secrets/set permission. */\nexport async function updateSecret(\n context: Client,\n secretName: string,\n secretVersion: string,\n parameters: SecretUpdateParameters,\n options: UpdateSecretOptionalParams = { requestOptions: {} },\n): Promise<SecretBundle> {\n const result = await _updateSecretSend(context, secretName, secretVersion, parameters, options);\n return _updateSecretDeserialize(result);\n}\n\nexport function _deleteSecretSend(\n context: Client,\n secretName: string,\n options: DeleteSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _deleteSecretDeserialize(\n result: PathUncheckedResponse,\n): Promise<DeletedSecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return deletedSecretBundleDeserializer(result.body);\n}\n\n/** The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret. This operation requires the secrets/delete permission. */\nexport async function deleteSecret(\n context: Client,\n secretName: string,\n options: DeleteSecretOptionalParams = { requestOptions: {} },\n): Promise<DeletedSecretBundle> {\n const result = await _deleteSecretSend(context, secretName, options);\n return _deleteSecretDeserialize(result);\n}\n\nexport function _setSecretSend(\n context: Client,\n secretName: string,\n parameters: SecretSetParameters,\n options: SetSecretOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/secrets/{secret-name}{?api%2Dversion}\",\n {\n \"secret-name\": secretName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: secretSetParametersSerializer(parameters),\n });\n}\n\nexport async function _setSecretDeserialize(result: PathUncheckedResponse): Promise<SecretBundle> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = keyVaultErrorDeserializer(result.body);\n throw error;\n }\n\n return secretBundleDeserializer(result.body);\n}\n\n/** The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requires the secrets/set permission. */\nexport async function setSecret(\n context: Client,\n secretName: string,\n parameters: SecretSetParameters,\n options: SetSecretOptionalParams = { requestOptions: {} },\n): Promise<SecretBundle> {\n const result = await _setSecretSend(context, secretName, parameters, options);\n return _setSecretDeserialize(result);\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import type { OperationOptions } from "@azure-rest/core-client";
2
+ import type { ContentType } from "../models/models.js";
2
3
  /** Optional parameters. */
3
4
  export interface RestoreSecretOptionalParams extends OperationOptions {
4
5
  }
@@ -31,6 +32,12 @@ export interface GetSecretsOptionalParams extends OperationOptions {
31
32
  }
32
33
  /** Optional parameters. */
33
34
  export interface GetSecretOptionalParams extends OperationOptions {
35
+ /**
36
+ * The media type (MIME type) of the certificate. If a supported format is specified,
37
+ * the certificate content is converted to the requested format. Currently, only PFX to PEM
38
+ * conversion is supported.
39
+ */
40
+ outContentType?: ContentType;
34
41
  }
35
42
  /** Optional parameters. */
36
43
  export interface UpdateSecretOptionalParams extends OperationOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/api/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface RestoreSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface BackupSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface RecoverDeletedSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface PurgeDeletedSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GetDeletedSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GetDeletedSecretsOptionalParams extends OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Optional parameters. */\nexport interface GetSecretVersionsOptionalParams extends OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Optional parameters. */\nexport interface GetSecretsOptionalParams extends OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Optional parameters. */\nexport interface GetSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface UpdateSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DeleteSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface SetSecretOptionalParams extends OperationOptions {}\n"]}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/api/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { ContentType } from \"../models/models.js\";\n\n/** Optional parameters. */\nexport interface RestoreSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface BackupSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface RecoverDeletedSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface PurgeDeletedSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GetDeletedSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GetDeletedSecretsOptionalParams extends OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Optional parameters. */\nexport interface GetSecretVersionsOptionalParams extends OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Optional parameters. */\nexport interface GetSecretsOptionalParams extends OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Optional parameters. */\nexport interface GetSecretOptionalParams extends OperationOptions {\n /**\n * The media type (MIME type) of the certificate. If a supported format is specified,\n * the certificate content is converted to the requested format. Currently, only PFX to PEM\n * conversion is supported.\n */\n outContentType?: ContentType;\n}\n\n/** Optional parameters. */\nexport interface UpdateSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface DeleteSecretOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface SetSecretOptionalParams extends OperationOptions {}\n"]}
@@ -5,10 +5,11 @@ import type { PollOperationState } from "@azure/core-lro";
5
5
  import type { PollerLike } from "@azure/core-lro";
6
6
  import type { BackupSecretOptions, BeginDeleteSecretOptions, BeginRecoverDeletedSecretOptions, DeletedSecret, GetDeletedSecretOptions, GetSecretOptions, KeyVaultSecret, ListDeletedSecretsOptions, ListPropertiesOfSecretVersionsOptions, ListPropertiesOfSecretsOptions, PurgeDeletedSecretOptions, RestoreSecretBackupOptions, SecretClientOptions, SecretPollerOptions, SecretProperties, SetSecretOptions, UpdateSecretPropertiesOptions } from "./secretsModels.js";
7
7
  import type { DeletionRecoveryLevel } from "./models/models.js";
8
- import { KnownDeletionRecoveryLevel } from "./models/models.js";
8
+ import { KnownDeletionRecoveryLevel, KnownContentType } from "./models/models.js";
9
+ import type { ContentType } from "./models/models.js";
9
10
  import type { KeyVaultSecretIdentifier } from "./identifier.js";
10
11
  import { parseKeyVaultSecretIdentifier } from "./identifier.js";
11
- export { type SecretClientOptions, type DeletedSecret, type DeletionRecoveryLevel, KnownDeletionRecoveryLevel, type GetSecretOptions, type GetDeletedSecretOptions, type PurgeDeletedSecretOptions, type BackupSecretOptions, type RestoreSecretBackupOptions, type ListPropertiesOfSecretVersionsOptions, type ListPropertiesOfSecretsOptions, type ListDeletedSecretsOptions, type PagedAsyncIterableIterator, type PageSettings, type KeyVaultSecretIdentifier, parseKeyVaultSecretIdentifier, type PollerLike, type PollOperationState, type KeyVaultSecret, type SecretProperties, type SecretPollerOptions, type BeginDeleteSecretOptions, type BeginRecoverDeletedSecretOptions, type SetSecretOptions, type UpdateSecretPropertiesOptions, logger, };
12
+ export { type SecretClientOptions, type DeletedSecret, type DeletionRecoveryLevel, KnownDeletionRecoveryLevel, type ContentType, KnownContentType, type GetSecretOptions, type GetDeletedSecretOptions, type PurgeDeletedSecretOptions, type BackupSecretOptions, type RestoreSecretBackupOptions, type ListPropertiesOfSecretVersionsOptions, type ListPropertiesOfSecretsOptions, type ListDeletedSecretsOptions, type PagedAsyncIterableIterator, type PageSettings, type KeyVaultSecretIdentifier, parseKeyVaultSecretIdentifier, type PollerLike, type PollOperationState, type KeyVaultSecret, type SecretProperties, type SecretPollerOptions, type BeginDeleteSecretOptions, type BeginRecoverDeletedSecretOptions, type SetSecretOptions, type UpdateSecretPropertiesOptions, logger, };
12
13
  /**
13
14
  * The SecretClient provides methods to manage {@link KeyVaultSecret} in
14
15
  * the Azure Key Vault. The client supports creating, retrieving, updating,
@@ -39,7 +40,7 @@ export declare class SecretClient {
39
40
  * const vaultName = "<YOUR KEYVAULT NAME>";
40
41
  * const url = `https://${vaultName}.vault.azure.net`;
41
42
  *
42
- * // Lastly, create our keys client and connect to the service
43
+ * // Lastly, create our secrets client and connect to the service
43
44
  * const client = new SecretClient(url, credential);
44
45
  * ```
45
46
  * @param vaultUrl - The base URL to the vault. You should validate that this URL references a valid Key Vault resource. See https://aka.ms/azsdk/blog/vault-uri for details.
@@ -5,7 +5,7 @@ import { logger } from "./logger.js";
5
5
  import { KeyVaultClient } from "./keyVaultClient.js";
6
6
  import { keyVaultAuthenticationPolicy } from "@azure/keyvault-common";
7
7
  import { LATEST_API_VERSION } from "./secretsModels.js";
8
- import { KnownDeletionRecoveryLevel } from "./models/models.js";
8
+ import { KnownDeletionRecoveryLevel, KnownContentType } from "./models/models.js";
9
9
  import { parseKeyVaultSecretIdentifier } from "./identifier.js";
10
10
  import { getSecretFromSecretBundle, mapPagedAsyncIterable } from "./transformations.js";
11
11
  import { tracingClient } from "./tracing.js";
@@ -13,7 +13,7 @@ import { bearerTokenAuthenticationPolicyName } from "@azure/core-rest-pipeline";
13
13
  import { SDK_VERSION } from "./constants.js";
14
14
  import { DeleteSecretPoller } from "./lro/delete/poller.js";
15
15
  import { RecoverDeletedSecretPoller } from "./lro/recover/poller.js";
16
- export { KnownDeletionRecoveryLevel, parseKeyVaultSecretIdentifier, logger, };
16
+ export { KnownDeletionRecoveryLevel, KnownContentType, parseKeyVaultSecretIdentifier, logger, };
17
17
  /**
18
18
  * The SecretClient provides methods to manage {@link KeyVaultSecret} in
19
19
  * the Azure Key Vault. The client supports creating, retrieving, updating,
@@ -44,7 +44,7 @@ export class SecretClient {
44
44
  * const vaultName = "<YOUR KEYVAULT NAME>";
45
45
  * const url = `https://${vaultName}.vault.azure.net`;
46
46
  *
47
- * // Lastly, create our keys client and connect to the service
47
+ * // Lastly, create our secrets client and connect to the service
48
48
  * const client = new SecretClient(url, credential);
49
49
  * ```
50
50
  * @param vaultUrl - The base URL to the vault. You should validate that this URL references a valid Key Vault resource. See https://aka.ms/azsdk/blog/vault-uri for details.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,4CAA4C;AAI5C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAMrC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAqBtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO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ACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACI,kBAAkB,CACvB,UAAqC,EAAE;QAEvC,OAAO,qBAAqB,CAC1B,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAC/C,OAAO,EACP,yBAAyB,CAC1B,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type { TokenCredential } from \"@azure/core-auth\";\n\nimport { logger } from \"./logger.js\";\n\nimport type { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport type { PollOperationState } from \"@azure/core-lro\";\nimport type { PollerLike } from \"@azure/core-lro\";\nimport type { KeyVaultClientOptionalParams } from \"./keyVaultClient.js\";\nimport { KeyVaultClient } from \"./keyVaultClient.js\";\nimport { keyVaultAuthenticationPolicy } from \"@azure/keyvault-common\";\n\nimport type {\n BackupSecretOptions,\n BeginDeleteSecretOptions,\n BeginRecoverDeletedSecretOptions,\n DeletedSecret,\n GetDeletedSecretOptions,\n GetSecretOptions,\n KeyVaultSecret,\n ListDeletedSecretsOptions,\n ListPropertiesOfSecretVersionsOptions,\n ListPropertiesOfSecretsOptions,\n PurgeDeletedSecretOptions,\n RestoreSecretBackupOptions,\n SecretClientOptions,\n SecretPollerOptions,\n SecretProperties,\n SetSecretOptions,\n UpdateSecretPropertiesOptions,\n} from \"./secretsModels.js\";\nimport { LATEST_API_VERSION } from \"./secretsModels.js\";\nimport type { DeletionRecoveryLevel } from \"./models/models.js\";\nimport { KnownDeletionRecoveryLevel } from \"./models/models.js\";\nimport type { KeyVaultSecretIdentifier } from \"./identifier.js\";\nimport { parseKeyVaultSecretIdentifier } from \"./identifier.js\";\nimport { getSecretFromSecretBundle, mapPagedAsyncIterable } from \"./transformations.js\";\nimport { tracingClient } from \"./tracing.js\";\nimport { bearerTokenAuthenticationPolicyName } from \"@azure/core-rest-pipeline\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { DeleteSecretPoller } from \"./lro/delete/poller.js\";\nimport { RecoverDeletedSecretPoller } from \"./lro/recover/poller.js\";\n\nexport {\n type SecretClientOptions,\n type DeletedSecret,\n type DeletionRecoveryLevel,\n KnownDeletionRecoveryLevel,\n type GetSecretOptions,\n type GetDeletedSecretOptions,\n type PurgeDeletedSecretOptions,\n type BackupSecretOptions,\n type RestoreSecretBackupOptions,\n type ListPropertiesOfSecretVersionsOptions,\n type ListPropertiesOfSecretsOptions,\n type ListDeletedSecretsOptions,\n type PagedAsyncIterableIterator,\n type PageSettings,\n type KeyVaultSecretIdentifier,\n parseKeyVaultSecretIdentifier,\n type PollerLike,\n type PollOperationState,\n type KeyVaultSecret,\n type SecretProperties,\n type SecretPollerOptions,\n type BeginDeleteSecretOptions,\n type BeginRecoverDeletedSecretOptions,\n type SetSecretOptions,\n type UpdateSecretPropertiesOptions,\n logger,\n};\n\n/**\n * The SecretClient provides methods to manage {@link KeyVaultSecret} in\n * the Azure Key Vault. The client supports creating, retrieving, updating,\n * deleting, purging, backing up, restoring and listing KeyVaultSecrets. The\n * client also supports listing {@link DeletedSecret} for a soft-delete enabled Azure\n * Key Vault.\n */\nexport class SecretClient {\n /**\n * The base URL to the vault\n */\n public readonly vaultUrl: string;\n\n /**\n * A reference to the auto-generated KeyVault HTTP client.\n */\n private readonly client: KeyVaultClient;\n\n /**\n * Creates an instance of SecretClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateClient\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * // Build the URL to reach your key vault\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * // Lastly, create our keys client and connect to the service\n * const client = new SecretClient(url, credential);\n * ```\n * @param vaultUrl - The base URL to the vault. You should validate that this URL references a valid Key Vault resource. See https://aka.ms/azsdk/blog/vault-uri for details.\n * @param credential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param pipelineOptions - Pipeline options used to configure Key Vault API requests.\n * Omit this parameter to use the default pipeline configuration.\n */\n constructor(\n vaultUrl: string,\n credential: TokenCredential,\n pipelineOptions: SecretClientOptions = {},\n ) {\n this.vaultUrl = vaultUrl;\n\n const internalPipelineOptions: KeyVaultClientOptionalParams = {\n ...pipelineOptions,\n userAgentOptions: {\n userAgentPrefix: `${pipelineOptions.userAgentOptions?.userAgentPrefix ?? \"\"} azsdk-js-keyvault-secrets/${SDK_VERSION}`,\n },\n apiVersion: pipelineOptions.serviceVersion || LATEST_API_VERSION,\n loggingOptions: {\n logger: logger.info,\n additionalAllowedHeaderNames: [\n \"x-ms-keyvault-region\",\n \"x-ms-keyvault-network-info\",\n \"x-ms-keyvault-service-version\",\n ],\n },\n };\n\n this.client = new KeyVaultClient(this.vaultUrl, credential, internalPipelineOptions);\n\n // Key vault has its own authentication policy that needs to be added to the pipeline, replacing the default bearerTokenAuthenticationPolicy.\n this.client.pipeline.removePolicy({ name: bearerTokenAuthenticationPolicyName });\n this.client.pipeline.addPolicy(keyVaultAuthenticationPolicy(credential, pipelineOptions), {});\n // Workaround for: https://github.com/Azure/azure-sdk-for-js/issues/31843\n this.client.pipeline.addPolicy({\n name: \"ContentTypePolicy\",\n sendRequest(request, next) {\n const contentType = request.headers.get(\"Content-Type\") ?? \"\";\n if (contentType.startsWith(\"application/json\")) {\n request.headers.set(\"Content-Type\", \"application/json\");\n }\n return next(request);\n },\n });\n }\n\n /**\n * The setSecret method adds a secret or secret version to the Azure Key Vault. If the named secret\n * already exists, Azure Key Vault creates a new version of that secret.\n * This operation requires the secrets/set permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const result = await client.setSecret(secretName, \"MySecretValue\");\n * console.log(\"result: \", result);\n * ```\n * Adds a secret in a specified key vault.\n * @param secretName - The name of the secret.\n * @param value - The value of the secret.\n * @param options - The optional parameters.\n */\n public setSecret(\n secretName: string,\n value: string,\n options: SetSecretOptions = {},\n ): Promise<KeyVaultSecret> {\n const { enabled, notBefore, expiresOn: expires, tags, ...remainingOptions } = options;\n\n return tracingClient.withSpan(\n \"SecretClient.setSecret\",\n remainingOptions,\n async (updatedOptions) => {\n const response = await this.client.setSecret(\n secretName,\n { value, secretAttributes: { enabled, notBefore, expires }, tags },\n updatedOptions,\n );\n return getSecretFromSecretBundle(response);\n },\n );\n }\n\n /**\n * Deletes a secret stored in Azure Key Vault.\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the secret is deleted.\n *\n * This operation requires the secrets/delete permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleDeleteSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * await client.beginDeleteSecret(secretName);\n * ```\n * Deletes a secret from a specified key vault.\n * @param secretName - The name of the secret.\n * @param options - The optional parameters.\n */\n public async beginDeleteSecret(\n name: string,\n options: BeginDeleteSecretOptions = {},\n ): Promise<PollerLike<PollOperationState<DeletedSecret>, DeletedSecret>> {\n const poller = new DeleteSecretPoller({\n name,\n client: this.client,\n ...options,\n operationOptions: options,\n });\n // This will initialize the poller's operation (the deletion of the secret).\n await poller.poll();\n return poller;\n }\n\n /**\n * The updateSecret method changes specified attributes of an existing stored secret. Properties that\n * are not specified in the request are left unchanged. The value of a secret itself cannot be\n * changed. This operation requires the secrets/set permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleUpdateSecretAttributes\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const result = await client.getSecret(secretName);\n * await client.updateSecretProperties(secretName, result.properties.version, { enabled: false });\n * ```\n * Updates the attributes associated with a specified secret in a given key vault.\n * @param secretName - The name of the secret.\n * @param secretVersion - The version of the secret.\n * @param options - The optional parameters.\n */\n public async updateSecretProperties(\n secretName: string,\n secretVersion: string,\n options: UpdateSecretPropertiesOptions = {},\n ): Promise<SecretProperties> {\n const { enabled, notBefore, expiresOn: expires, tags, ...remainingOptions } = options;\n\n return tracingClient.withSpan(\n \"SecretClient.updateSecretProperties\",\n remainingOptions,\n async (updatedOptions) => {\n const response = await this.client.updateSecret(\n secretName,\n secretVersion,\n { secretAttributes: { enabled, notBefore, expires }, tags },\n updatedOptions,\n );\n return getSecretFromSecretBundle(response).properties;\n },\n );\n }\n\n /**\n * The getSecret method is applicable to any secret stored in Azure Key Vault. This operation requires\n * the secrets/get permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleGetSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const latestSecret = await client.getSecret(secretName);\n * console.log(`Latest version of the secret ${secretName}: `, latestSecret);\n *\n * const specificSecret = await client.getSecret(secretName, {\n * version: latestSecret.properties.version!,\n * });\n * console.log(\n * `The secret ${secretName} at the version ${latestSecret.properties.version!}: `,\n * specificSecret,\n * );\n * ```\n * Get a specified secret from a given key vault.\n * @param secretName - The name of the secret.\n * @param options - The optional parameters.\n */\n public getSecret(secretName: string, options: GetSecretOptions = {}): Promise<KeyVaultSecret> {\n return tracingClient.withSpan(\"SecretClient.getSecret\", options, async (updatedOptions) => {\n const response = await this.client.getSecret(\n secretName,\n options && options.version ? options.version : \"\",\n updatedOptions,\n );\n return getSecretFromSecretBundle(response);\n });\n }\n\n /**\n * The getDeletedSecret method returns the specified deleted secret along with its attributes.\n * This operation requires the secrets/get permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleGetDeletedSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const result = await client.getDeletedSecret(\"MyDeletedSecret\");\n * ```\n * Gets the specified deleted secret.\n * @param secretName - The name of the secret.\n * @param options - The optional parameters.\n */\n public getDeletedSecret(\n secretName: string,\n options: GetDeletedSecretOptions = {},\n ): Promise<DeletedSecret> {\n return tracingClient.withSpan(\n \"SecretClient.getDeletedSecret\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getDeletedSecret(secretName, updatedOptions);\n return getSecretFromSecretBundle(response);\n },\n );\n }\n\n /**\n * The purge deleted secret operation removes the secret permanently, without the possibility of\n * recovery. This operation can only be enabled on a soft-delete enabled vault. This operation\n * requires the secrets/purge permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSamplePurgeDeletedSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const deletePoller = await client.beginDeleteSecret(secretName);\n * await deletePoller.pollUntilDone();\n *\n * await client.purgeDeletedSecret(secretName);\n * ```\n * Permanently deletes the specified secret.\n * @param secretName - The name of the secret.\n * @param options - The optional parameters.\n */\n public purgeDeletedSecret(\n secretName: string,\n options: PurgeDeletedSecretOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"SecretClient.purgeDeletedSecret\",\n options,\n async (updatedOptions) => {\n await this.client.purgeDeletedSecret(secretName, updatedOptions);\n },\n );\n }\n\n /**\n * Recovers the deleted secret in the specified vault.\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the secret is recovered.\n *\n * This operation requires the secrets/recover permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleRecoverDeletedSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const deletePoller = await client.beginDeleteSecret(secretName);\n * await deletePoller.pollUntilDone();\n *\n * const recoverPoller = await client.beginRecoverDeletedSecret(secretName);\n * const deletedSecret = await recoverPoller.pollUntilDone();\n * console.log(deletedSecret);\n * ```\n * Recovers the deleted secret to the latest version.\n * @param secretName - The name of the deleted secret.\n * @param options - The optional parameters.\n */\n public async beginRecoverDeletedSecret(\n name: string,\n options: BeginRecoverDeletedSecretOptions = {},\n ): Promise<PollerLike<PollOperationState<SecretProperties>, SecretProperties>> {\n const poller = new RecoverDeletedSecretPoller({\n name,\n client: this.client,\n ...options,\n operationOptions: options,\n });\n\n // This will initialize the poller's operation (the recovery of the deleted secret).\n await poller.poll();\n return poller;\n }\n\n /**\n * Requests that a backup of the specified secret be downloaded to the client. All versions of the\n * secret will be downloaded. This operation requires the secrets/backup permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBackupSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const backupResult = await client.backupSecret(secretName);\n * ```\n * Backs up the specified secret.\n * @param secretName - The name of the secret.\n * @param options - The optional parameters.\n */\n public backupSecret(\n secretName: string,\n options: BackupSecretOptions = {},\n ): Promise<Uint8Array | undefined> {\n return tracingClient.withSpan(\"SecretClient.backupSecret\", options, async (updatedOptions) => {\n const response = await this.client.backupSecret(secretName, updatedOptions);\n\n return response.value;\n });\n }\n\n /**\n * Restores a backed up secret, and all its versions, to a vault. This operation requires the\n * secrets/restore permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleRestoreSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const backupResult = await client.backupSecret(secretName);\n *\n * await client.restoreSecretBackup(backupResult);\n * ```\n * Restores a backed up secret to a vault.\n * @param secretBundleBackup - The backup blob associated with a secret bundle.\n * @param options - The optional parameters.\n */\n public restoreSecretBackup(\n secretBundleBackup: Uint8Array,\n options: RestoreSecretBackupOptions = {},\n ): Promise<SecretProperties> {\n return tracingClient.withSpan(\n \"SecretClient.restoreSecretBackup\",\n options,\n async (updatedOptions) => {\n const response = await this.client.restoreSecret({ secretBundleBackup }, updatedOptions);\n return getSecretFromSecretBundle(response).properties;\n },\n );\n }\n\n /**\n * Iterates all versions of the given secret in the vault. The full secret identifier and attributes are provided\n * in the response. No values are returned for the secrets. This operations requires the secrets/list permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleListSecrets\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * for await (const secretProperties of client.listPropertiesOfSecrets()) {\n * console.log(\"Secret properties: \", secretProperties);\n * }\n *\n * for await (const deletedSecret of client.listDeletedSecrets()) {\n * console.log(\"Deleted secret: \", deletedSecret);\n * }\n *\n * for await (const versionProperties of client.listPropertiesOfSecretVersions(secretName)) {\n * console.log(\"Version properties: \", versionProperties);\n * }\n * ```\n * @param secretName - Name of the secret to fetch versions for.\n * @param options - The optional parameters.\n */\n public listPropertiesOfSecretVersions(\n secretName: string,\n options: ListPropertiesOfSecretVersionsOptions = {},\n ): PagedAsyncIterableIterator<SecretProperties> {\n return mapPagedAsyncIterable(\n (updatedOptions) => this.client.getSecretVersions(secretName, updatedOptions),\n options,\n (item) => getSecretFromSecretBundle(item).properties,\n );\n }\n\n /**\n * Iterates the latest version of all secrets in the vault. The full secret identifier and attributes are provided\n * in the response. No values are returned for the secrets. This operations requires the secrets/list permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleListSecrets\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * for await (const secretProperties of client.listPropertiesOfSecrets()) {\n * console.log(\"Secret properties: \", secretProperties);\n * }\n *\n * for await (const deletedSecret of client.listDeletedSecrets()) {\n * console.log(\"Deleted secret: \", deletedSecret);\n * }\n *\n * for await (const versionProperties of client.listPropertiesOfSecretVersions(secretName)) {\n * console.log(\"Version properties: \", versionProperties);\n * }\n * ```\n * List all secrets in the vault.\n * @param options - The optional parameters.\n */\n public listPropertiesOfSecrets(\n options: ListPropertiesOfSecretsOptions = {},\n ): PagedAsyncIterableIterator<SecretProperties> {\n return mapPagedAsyncIterable(\n this.client.getSecrets.bind(this.client),\n options,\n (item) => getSecretFromSecretBundle(item).properties,\n );\n }\n\n /**\n * Iterates the deleted secrets in the vault. The full secret identifier and attributes are provided\n * in the response. No values are returned for the secrets. This operations requires the secrets/list permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleListSecrets\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * for await (const secretProperties of client.listPropertiesOfSecrets()) {\n * console.log(\"Secret properties: \", secretProperties);\n * }\n *\n * for await (const deletedSecret of client.listDeletedSecrets()) {\n * console.log(\"Deleted secret: \", deletedSecret);\n * }\n *\n * for await (const versionProperties of client.listPropertiesOfSecretVersions(secretName)) {\n * console.log(\"Version properties: \", versionProperties);\n * }\n * ```\n * List all secrets in the vault.\n * @param options - The optional parameters.\n */\n public listDeletedSecrets(\n options: ListDeletedSecretsOptions = {},\n ): PagedAsyncIterableIterator<DeletedSecret> {\n return mapPagedAsyncIterable(\n this.client.getDeletedSecrets.bind(this.client),\n options,\n getSecretFromSecretBundle,\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAC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AO,EACP,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,UAAU,CACrD,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACI,uBAAuB,CAC5B,UAA0C,EAAE;QAE5C,OAAO,qBAAqB,CAC1B,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EACxC,OAAO,EACP,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,UAAU,CACrD,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACI,kBAAkB,CACvB,UAAqC,EAAE;QAEvC,OAAO,qBAAqB,CAC1B,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAC/C,OAAO,EACP,yBAAyB,CAC1B,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type { TokenCredential } from \"@azure/core-auth\";\n\nimport { logger } from \"./logger.js\";\n\nimport type { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport type { PollOperationState } from \"@azure/core-lro\";\nimport type { PollerLike } from \"@azure/core-lro\";\nimport type { KeyVaultClientOptionalParams } from \"./keyVaultClient.js\";\nimport { KeyVaultClient } from \"./keyVaultClient.js\";\nimport { keyVaultAuthenticationPolicy } from \"@azure/keyvault-common\";\n\nimport type {\n BackupSecretOptions,\n BeginDeleteSecretOptions,\n BeginRecoverDeletedSecretOptions,\n DeletedSecret,\n GetDeletedSecretOptions,\n GetSecretOptions,\n KeyVaultSecret,\n ListDeletedSecretsOptions,\n ListPropertiesOfSecretVersionsOptions,\n ListPropertiesOfSecretsOptions,\n PurgeDeletedSecretOptions,\n RestoreSecretBackupOptions,\n SecretClientOptions,\n SecretPollerOptions,\n SecretProperties,\n SetSecretOptions,\n UpdateSecretPropertiesOptions,\n} from \"./secretsModels.js\";\nimport { LATEST_API_VERSION } from \"./secretsModels.js\";\nimport type { DeletionRecoveryLevel } from \"./models/models.js\";\nimport { KnownDeletionRecoveryLevel, KnownContentType } from \"./models/models.js\";\nimport type { ContentType } from \"./models/models.js\";\nimport type { KeyVaultSecretIdentifier } from \"./identifier.js\";\nimport { parseKeyVaultSecretIdentifier } from \"./identifier.js\";\nimport { getSecretFromSecretBundle, mapPagedAsyncIterable } from \"./transformations.js\";\nimport { tracingClient } from \"./tracing.js\";\nimport { bearerTokenAuthenticationPolicyName } from \"@azure/core-rest-pipeline\";\nimport { SDK_VERSION } from \"./constants.js\";\nimport { DeleteSecretPoller } from \"./lro/delete/poller.js\";\nimport { RecoverDeletedSecretPoller } from \"./lro/recover/poller.js\";\n\nexport {\n type SecretClientOptions,\n type DeletedSecret,\n type DeletionRecoveryLevel,\n KnownDeletionRecoveryLevel,\n type ContentType,\n KnownContentType,\n type GetSecretOptions,\n type GetDeletedSecretOptions,\n type PurgeDeletedSecretOptions,\n type BackupSecretOptions,\n type RestoreSecretBackupOptions,\n type ListPropertiesOfSecretVersionsOptions,\n type ListPropertiesOfSecretsOptions,\n type ListDeletedSecretsOptions,\n type PagedAsyncIterableIterator,\n type PageSettings,\n type KeyVaultSecretIdentifier,\n parseKeyVaultSecretIdentifier,\n type PollerLike,\n type PollOperationState,\n type KeyVaultSecret,\n type SecretProperties,\n type SecretPollerOptions,\n type BeginDeleteSecretOptions,\n type BeginRecoverDeletedSecretOptions,\n type SetSecretOptions,\n type UpdateSecretPropertiesOptions,\n logger,\n};\n\n/**\n * The SecretClient provides methods to manage {@link KeyVaultSecret} in\n * the Azure Key Vault. The client supports creating, retrieving, updating,\n * deleting, purging, backing up, restoring and listing KeyVaultSecrets. The\n * client also supports listing {@link DeletedSecret} for a soft-delete enabled Azure\n * Key Vault.\n */\nexport class SecretClient {\n /**\n * The base URL to the vault\n */\n public readonly vaultUrl: string;\n\n /**\n * A reference to the auto-generated KeyVault HTTP client.\n */\n private readonly client: KeyVaultClient;\n\n /**\n * Creates an instance of SecretClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateClient\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * // Build the URL to reach your key vault\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * // Lastly, create our secrets client and connect to the service\n * const client = new SecretClient(url, credential);\n * ```\n * @param vaultUrl - The base URL to the vault. You should validate that this URL references a valid Key Vault resource. See https://aka.ms/azsdk/blog/vault-uri for details.\n * @param credential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param pipelineOptions - Pipeline options used to configure Key Vault API requests.\n * Omit this parameter to use the default pipeline configuration.\n */\n constructor(\n vaultUrl: string,\n credential: TokenCredential,\n pipelineOptions: SecretClientOptions = {},\n ) {\n this.vaultUrl = vaultUrl;\n\n const internalPipelineOptions: KeyVaultClientOptionalParams = {\n ...pipelineOptions,\n userAgentOptions: {\n userAgentPrefix: `${pipelineOptions.userAgentOptions?.userAgentPrefix ?? \"\"} azsdk-js-keyvault-secrets/${SDK_VERSION}`,\n },\n apiVersion: pipelineOptions.serviceVersion || LATEST_API_VERSION,\n loggingOptions: {\n logger: logger.info,\n additionalAllowedHeaderNames: [\n \"x-ms-keyvault-region\",\n \"x-ms-keyvault-network-info\",\n \"x-ms-keyvault-service-version\",\n ],\n },\n };\n\n this.client = new KeyVaultClient(this.vaultUrl, credential, internalPipelineOptions);\n\n // Key vault has its own authentication policy that needs to be added to the pipeline, replacing the default bearerTokenAuthenticationPolicy.\n this.client.pipeline.removePolicy({ name: bearerTokenAuthenticationPolicyName });\n this.client.pipeline.addPolicy(keyVaultAuthenticationPolicy(credential, pipelineOptions), {});\n // Workaround for: https://github.com/Azure/azure-sdk-for-js/issues/31843\n this.client.pipeline.addPolicy({\n name: \"ContentTypePolicy\",\n sendRequest(request, next) {\n const contentType = request.headers.get(\"Content-Type\") ?? \"\";\n if (contentType.startsWith(\"application/json\")) {\n request.headers.set(\"Content-Type\", \"application/json\");\n }\n return next(request);\n },\n });\n }\n\n /**\n * The setSecret method adds a secret or secret version to the Azure Key Vault. If the named secret\n * already exists, Azure Key Vault creates a new version of that secret.\n * This operation requires the secrets/set permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const result = await client.setSecret(secretName, \"MySecretValue\");\n * console.log(\"result: \", result);\n * ```\n * Adds a secret in a specified key vault.\n * @param secretName - The name of the secret.\n * @param value - The value of the secret.\n * @param options - The optional parameters.\n */\n public setSecret(\n secretName: string,\n value: string,\n options: SetSecretOptions = {},\n ): Promise<KeyVaultSecret> {\n const { enabled, notBefore, expiresOn: expires, tags, ...remainingOptions } = options;\n\n return tracingClient.withSpan(\n \"SecretClient.setSecret\",\n remainingOptions,\n async (updatedOptions) => {\n const response = await this.client.setSecret(\n secretName,\n { value, secretAttributes: { enabled, notBefore, expires }, tags },\n updatedOptions,\n );\n return getSecretFromSecretBundle(response);\n },\n );\n }\n\n /**\n * Deletes a secret stored in Azure Key Vault.\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the secret is deleted.\n *\n * This operation requires the secrets/delete permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleDeleteSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * await client.beginDeleteSecret(secretName);\n * ```\n * Deletes a secret from a specified key vault.\n * @param secretName - The name of the secret.\n * @param options - The optional parameters.\n */\n public async beginDeleteSecret(\n name: string,\n options: BeginDeleteSecretOptions = {},\n ): Promise<PollerLike<PollOperationState<DeletedSecret>, DeletedSecret>> {\n const poller = new DeleteSecretPoller({\n name,\n client: this.client,\n ...options,\n operationOptions: options,\n });\n // This will initialize the poller's operation (the deletion of the secret).\n await poller.poll();\n return poller;\n }\n\n /**\n * The updateSecret method changes specified attributes of an existing stored secret. Properties that\n * are not specified in the request are left unchanged. The value of a secret itself cannot be\n * changed. This operation requires the secrets/set permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleUpdateSecretAttributes\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const result = await client.getSecret(secretName);\n * await client.updateSecretProperties(secretName, result.properties.version, { enabled: false });\n * ```\n * Updates the attributes associated with a specified secret in a given key vault.\n * @param secretName - The name of the secret.\n * @param secretVersion - The version of the secret.\n * @param options - The optional parameters.\n */\n public async updateSecretProperties(\n secretName: string,\n secretVersion: string,\n options: UpdateSecretPropertiesOptions = {},\n ): Promise<SecretProperties> {\n const { enabled, notBefore, expiresOn: expires, tags, ...remainingOptions } = options;\n\n return tracingClient.withSpan(\n \"SecretClient.updateSecretProperties\",\n remainingOptions,\n async (updatedOptions) => {\n const response = await this.client.updateSecret(\n secretName,\n secretVersion,\n { secretAttributes: { enabled, notBefore, expires }, tags },\n updatedOptions,\n );\n return getSecretFromSecretBundle(response).properties;\n },\n );\n }\n\n /**\n * The getSecret method is applicable to any secret stored in Azure Key Vault. This operation requires\n * the secrets/get permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleGetSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const latestSecret = await client.getSecret(secretName);\n * console.log(`Latest version of the secret ${secretName}: `, latestSecret);\n *\n * const specificSecret = await client.getSecret(secretName, {\n * version: latestSecret.properties.version!,\n * });\n * console.log(\n * `The secret ${secretName} at the version ${latestSecret.properties.version!}: `,\n * specificSecret,\n * );\n * ```\n * Get a specified secret from a given key vault.\n * @param secretName - The name of the secret.\n * @param options - The optional parameters.\n */\n public getSecret(secretName: string, options: GetSecretOptions = {}): Promise<KeyVaultSecret> {\n return tracingClient.withSpan(\"SecretClient.getSecret\", options, async (updatedOptions) => {\n const response = await this.client.getSecret(\n secretName,\n options && options.version ? options.version : \"\",\n updatedOptions,\n );\n return getSecretFromSecretBundle(response);\n });\n }\n\n /**\n * The getDeletedSecret method returns the specified deleted secret along with its attributes.\n * This operation requires the secrets/get permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleGetDeletedSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const result = await client.getDeletedSecret(\"MyDeletedSecret\");\n * ```\n * Gets the specified deleted secret.\n * @param secretName - The name of the secret.\n * @param options - The optional parameters.\n */\n public getDeletedSecret(\n secretName: string,\n options: GetDeletedSecretOptions = {},\n ): Promise<DeletedSecret> {\n return tracingClient.withSpan(\n \"SecretClient.getDeletedSecret\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getDeletedSecret(secretName, updatedOptions);\n return getSecretFromSecretBundle(response);\n },\n );\n }\n\n /**\n * The purge deleted secret operation removes the secret permanently, without the possibility of\n * recovery. This operation can only be enabled on a soft-delete enabled vault. This operation\n * requires the secrets/purge permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSamplePurgeDeletedSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const deletePoller = await client.beginDeleteSecret(secretName);\n * await deletePoller.pollUntilDone();\n *\n * await client.purgeDeletedSecret(secretName);\n * ```\n * Permanently deletes the specified secret.\n * @param secretName - The name of the secret.\n * @param options - The optional parameters.\n */\n public purgeDeletedSecret(\n secretName: string,\n options: PurgeDeletedSecretOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"SecretClient.purgeDeletedSecret\",\n options,\n async (updatedOptions) => {\n await this.client.purgeDeletedSecret(secretName, updatedOptions);\n },\n );\n }\n\n /**\n * Recovers the deleted secret in the specified vault.\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the secret is recovered.\n *\n * This operation requires the secrets/recover permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleRecoverDeletedSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const deletePoller = await client.beginDeleteSecret(secretName);\n * await deletePoller.pollUntilDone();\n *\n * const recoverPoller = await client.beginRecoverDeletedSecret(secretName);\n * const deletedSecret = await recoverPoller.pollUntilDone();\n * console.log(deletedSecret);\n * ```\n * Recovers the deleted secret to the latest version.\n * @param secretName - The name of the deleted secret.\n * @param options - The optional parameters.\n */\n public async beginRecoverDeletedSecret(\n name: string,\n options: BeginRecoverDeletedSecretOptions = {},\n ): Promise<PollerLike<PollOperationState<SecretProperties>, SecretProperties>> {\n const poller = new RecoverDeletedSecretPoller({\n name,\n client: this.client,\n ...options,\n operationOptions: options,\n });\n\n // This will initialize the poller's operation (the recovery of the deleted secret).\n await poller.poll();\n return poller;\n }\n\n /**\n * Requests that a backup of the specified secret be downloaded to the client. All versions of the\n * secret will be downloaded. This operation requires the secrets/backup permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleBackupSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const backupResult = await client.backupSecret(secretName);\n * ```\n * Backs up the specified secret.\n * @param secretName - The name of the secret.\n * @param options - The optional parameters.\n */\n public backupSecret(\n secretName: string,\n options: BackupSecretOptions = {},\n ): Promise<Uint8Array | undefined> {\n return tracingClient.withSpan(\"SecretClient.backupSecret\", options, async (updatedOptions) => {\n const response = await this.client.backupSecret(secretName, updatedOptions);\n\n return response.value;\n });\n }\n\n /**\n * Restores a backed up secret, and all its versions, to a vault. This operation requires the\n * secrets/restore permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleRestoreSecret\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * const backupResult = await client.backupSecret(secretName);\n *\n * await client.restoreSecretBackup(backupResult);\n * ```\n * Restores a backed up secret to a vault.\n * @param secretBundleBackup - The backup blob associated with a secret bundle.\n * @param options - The optional parameters.\n */\n public restoreSecretBackup(\n secretBundleBackup: Uint8Array,\n options: RestoreSecretBackupOptions = {},\n ): Promise<SecretProperties> {\n return tracingClient.withSpan(\n \"SecretClient.restoreSecretBackup\",\n options,\n async (updatedOptions) => {\n const response = await this.client.restoreSecret({ secretBundleBackup }, updatedOptions);\n return getSecretFromSecretBundle(response).properties;\n },\n );\n }\n\n /**\n * Iterates all versions of the given secret in the vault. The full secret identifier and attributes are provided\n * in the response. No values are returned for the secrets. This operations requires the secrets/list permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleListSecrets\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * for await (const secretProperties of client.listPropertiesOfSecrets()) {\n * console.log(\"Secret properties: \", secretProperties);\n * }\n *\n * for await (const deletedSecret of client.listDeletedSecrets()) {\n * console.log(\"Deleted secret: \", deletedSecret);\n * }\n *\n * for await (const versionProperties of client.listPropertiesOfSecretVersions(secretName)) {\n * console.log(\"Version properties: \", versionProperties);\n * }\n * ```\n * @param secretName - Name of the secret to fetch versions for.\n * @param options - The optional parameters.\n */\n public listPropertiesOfSecretVersions(\n secretName: string,\n options: ListPropertiesOfSecretVersionsOptions = {},\n ): PagedAsyncIterableIterator<SecretProperties> {\n return mapPagedAsyncIterable(\n (updatedOptions) => this.client.getSecretVersions(secretName, updatedOptions),\n options,\n (item) => getSecretFromSecretBundle(item).properties,\n );\n }\n\n /**\n * Iterates the latest version of all secrets in the vault. The full secret identifier and attributes are provided\n * in the response. No values are returned for the secrets. This operations requires the secrets/list permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleListSecrets\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * for await (const secretProperties of client.listPropertiesOfSecrets()) {\n * console.log(\"Secret properties: \", secretProperties);\n * }\n *\n * for await (const deletedSecret of client.listDeletedSecrets()) {\n * console.log(\"Deleted secret: \", deletedSecret);\n * }\n *\n * for await (const versionProperties of client.listPropertiesOfSecretVersions(secretName)) {\n * console.log(\"Version properties: \", versionProperties);\n * }\n * ```\n * List all secrets in the vault.\n * @param options - The optional parameters.\n */\n public listPropertiesOfSecrets(\n options: ListPropertiesOfSecretsOptions = {},\n ): PagedAsyncIterableIterator<SecretProperties> {\n return mapPagedAsyncIterable(\n this.client.getSecrets.bind(this.client),\n options,\n (item) => getSecretFromSecretBundle(item).properties,\n );\n }\n\n /**\n * Iterates the deleted secrets in the vault. The full secret identifier and attributes are provided\n * in the response. No values are returned for the secrets. This operations requires the secrets/list permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleListSecrets\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const url = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new SecretClient(url, credential);\n *\n * const secretName = \"MySecretName\";\n *\n * for await (const secretProperties of client.listPropertiesOfSecrets()) {\n * console.log(\"Secret properties: \", secretProperties);\n * }\n *\n * for await (const deletedSecret of client.listDeletedSecrets()) {\n * console.log(\"Deleted secret: \", deletedSecret);\n * }\n *\n * for await (const versionProperties of client.listPropertiesOfSecretVersions(secretName)) {\n * console.log(\"Version properties: \", versionProperties);\n * }\n * ```\n * List all secrets in the vault.\n * @param options - The optional parameters.\n */\n public listDeletedSecrets(\n options: ListDeletedSecretsOptions = {},\n ): PagedAsyncIterableIterator<DeletedSecret> {\n return mapPagedAsyncIterable(\n this.client.getDeletedSecrets.bind(this.client),\n options,\n getSecretFromSecretBundle,\n );\n }\n}\n"]}
@@ -76,6 +76,8 @@ export interface SecretBundle {
76
76
  readonly kid?: string;
77
77
  /** True if the secret's lifetime is managed by key vault. If this is a secret backing a certificate, then managed will be true. */
78
78
  readonly managed?: boolean;
79
+ /** Identifier of the previous secret version. */
80
+ readonly previousVersion?: string;
79
81
  }
80
82
  export declare function secretBundleDeserializer(item: any): SecretBundle;
81
83
  /** The key vault error exception. */
@@ -116,6 +118,8 @@ export interface DeletedSecretBundle {
116
118
  readonly kid?: string;
117
119
  /** True if the secret's lifetime is managed by key vault. If this is a secret backing a certificate, then managed will be true. */
118
120
  readonly managed?: boolean;
121
+ /** Identifier of the previous secret version. */
122
+ readonly previousVersion?: string;
119
123
  /** The url of the recovery object, used to identify and recover the deleted secret. */
120
124
  recoveryId?: string;
121
125
  /** The time when the secret is scheduled to be purged, in UTC */
@@ -198,6 +202,19 @@ export interface SecretRestoreParameters {
198
202
  secretBundleBackup: Uint8Array;
199
203
  }
200
204
  export declare function secretRestoreParametersSerializer(item: SecretRestoreParameters): any;
205
+ /** Known values of {@link ContentType} that the service accepts. */
206
+ export declare enum KnownContentType {
207
+ /** The PKCS#12 (PFX) certificate format. */
208
+ PFX = "application/x-pkcs12",
209
+ /** The PEM certificate format. */
210
+ PEM = "application/x-pem-file"
211
+ }
212
+ /**
213
+ * The media type (MIME type) of the certificate. If a supported format is specified,
214
+ * the certificate content is converted to the requested format. Currently, only PFX to PEM
215
+ * conversion is supported.
216
+ */
217
+ export type ContentType = string;
201
218
  /** The available API versions. */
202
219
  export declare enum KnownVersions {
203
220
  /** The 7.5 API version. */
@@ -205,6 +222,8 @@ export declare enum KnownVersions {
205
222
  /** The 7.6-preview.2 API version. */
206
223
  V76Preview2 = "7.6-preview.2",
207
224
  /** The 7.6 API version. */
208
- V76 = "7.6"
225
+ V76 = "7.6",
226
+ /** The 2025-07-01 API version. */
227
+ V20250701 = "2025-07-01"
209
228
  }
210
229
  //# sourceMappingURL=models.d.ts.map
@@ -58,6 +58,7 @@ export function secretBundleDeserializer(item) {
58
58
  tags: item["tags"],
59
59
  kid: item["kid"],
60
60
  managed: item["managed"],
61
+ previousVersion: item["previousVersion"],
61
62
  };
62
63
  }
63
64
  export function keyVaultErrorDeserializer(item) {
@@ -85,6 +86,7 @@ export function deletedSecretBundleDeserializer(item) {
85
86
  tags: item["tags"],
86
87
  kid: item["kid"],
87
88
  managed: item["managed"],
89
+ previousVersion: item["previousVersion"],
88
90
  recoveryId: item["recoveryId"],
89
91
  scheduledPurgeDate: !item["scheduledPurgeDate"]
90
92
  ? item["scheduledPurgeDate"]
@@ -162,6 +164,14 @@ export function backupSecretResultDeserializer(item) {
162
164
  export function secretRestoreParametersSerializer(item) {
163
165
  return { value: uint8ArrayToString(item["secretBundleBackup"], "base64url") };
164
166
  }
167
+ /** Known values of {@link ContentType} that the service accepts. */
168
+ export var KnownContentType;
169
+ (function (KnownContentType) {
170
+ /** The PKCS#12 (PFX) certificate format. */
171
+ KnownContentType["PFX"] = "application/x-pkcs12";
172
+ /** The PEM certificate format. */
173
+ KnownContentType["PEM"] = "application/x-pem-file";
174
+ })(KnownContentType || (KnownContentType = {}));
165
175
  /** The available API versions. */
166
176
  export var KnownVersions;
167
177
  (function (KnownVersions) {
@@ -171,5 +181,7 @@ export var KnownVersions;
171
181
  KnownVersions["V76Preview2"] = "7.6-preview.2";
172
182
  /** The 7.6 API version. */
173
183
  KnownVersions["V76"] = "7.6";
184
+ /** The 2025-07-01 API version. */
185
+ KnownVersions["V20250701"] = "2025-07-01";
174
186
  })(KnownVersions || (KnownVersions = {}));
175
187
  //# sourceMappingURL=models.js.map