@azure/keyvault-certificates 4.10.2-alpha.20251128.1 → 4.10.2-alpha.20251201.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/browser/certificatesModels.d.ts.map +1 -1
  2. package/dist/browser/certificatesModels.js.map +1 -1
  3. package/dist/browser/lro/create/operation.d.ts.map +1 -1
  4. package/dist/browser/lro/create/operation.js.map +1 -1
  5. package/dist/browser/lro/delete/operation.d.ts.map +1 -1
  6. package/dist/browser/lro/delete/operation.js.map +1 -1
  7. package/dist/browser/lro/keyVaultCertificatePoller.d.ts.map +1 -1
  8. package/dist/browser/lro/keyVaultCertificatePoller.js.map +1 -1
  9. package/dist/browser/lro/operation/operation.d.ts.map +1 -1
  10. package/dist/browser/lro/operation/operation.js.map +1 -1
  11. package/dist/commonjs/certificatesModels.d.ts.map +1 -1
  12. package/dist/commonjs/certificatesModels.js.map +1 -1
  13. package/dist/commonjs/lro/create/operation.d.ts.map +1 -1
  14. package/dist/commonjs/lro/create/operation.js.map +1 -1
  15. package/dist/commonjs/lro/delete/operation.d.ts.map +1 -1
  16. package/dist/commonjs/lro/delete/operation.js.map +1 -1
  17. package/dist/commonjs/lro/keyVaultCertificatePoller.d.ts.map +1 -1
  18. package/dist/commonjs/lro/keyVaultCertificatePoller.js.map +1 -1
  19. package/dist/commonjs/lro/operation/operation.d.ts.map +1 -1
  20. package/dist/commonjs/lro/operation/operation.js.map +1 -1
  21. package/dist/esm/certificatesModels.d.ts.map +1 -1
  22. package/dist/esm/certificatesModels.js.map +1 -1
  23. package/dist/esm/lro/create/operation.d.ts.map +1 -1
  24. package/dist/esm/lro/create/operation.js.map +1 -1
  25. package/dist/esm/lro/delete/operation.d.ts.map +1 -1
  26. package/dist/esm/lro/delete/operation.js.map +1 -1
  27. package/dist/esm/lro/keyVaultCertificatePoller.d.ts.map +1 -1
  28. package/dist/esm/lro/keyVaultCertificatePoller.js.map +1 -1
  29. package/dist/esm/lro/operation/operation.d.ts.map +1 -1
  30. package/dist/esm/lro/operation/operation.js.map +1 -1
  31. package/dist/react-native/certificatesModels.d.ts.map +1 -1
  32. package/dist/react-native/certificatesModels.js.map +1 -1
  33. package/dist/react-native/lro/create/operation.d.ts.map +1 -1
  34. package/dist/react-native/lro/create/operation.js.map +1 -1
  35. package/dist/react-native/lro/delete/operation.d.ts.map +1 -1
  36. package/dist/react-native/lro/delete/operation.js.map +1 -1
  37. package/dist/react-native/lro/keyVaultCertificatePoller.d.ts.map +1 -1
  38. package/dist/react-native/lro/keyVaultCertificatePoller.js.map +1 -1
  39. package/dist/react-native/lro/operation/operation.d.ts.map +1 -1
  40. package/dist/react-native/lro/operation/operation.js.map +1 -1
  41. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/operation/operation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC,OAAO,EAAE,UAAU,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAE/F,OAAO,EACL,wCAAwC,EACxC,6CAA6C,GAC9C,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAajD;;;GAGG;AACH,MAAM,OAAO,iCAAkC,SAAQ,gCAGtD;IAEU;IACC;IACA;IAHV,YACS,KAAgC,EAC/B,MAAsB,EACtB,mBAAqC,EAAE;QAE/C,KAAK,CAAC,KAAK,CAAC,CAAC;QAJN,UAAK,GAAL,KAAK,CAA2B;QAC/B,WAAM,GAAN,MAAM,CAAgB;QACtB,qBAAgB,GAAhB,gBAAgB,CAAuB;IAGjD,CAAC;IAED;;OAEG;IACK,0BAA0B,CAChC,eAAuB,EACvB,UAA6C,EAAE;QAE/C,OAAO,aAAa,CAAC,QAAQ,CAC3B,uDAAuD,EACvD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,QAAQ,GA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ACf,IAAI,CAAC,gBAAgB,CACtB,CAAC;QAEF,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,MAAM,KAAK,GAA8B;YACvC,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB;YACrD,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;SAC1B,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK;SACN,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type {\n CancelCertificateOperationOptions,\n CertificateOperation,\n GetCertificateOptions,\n GetPlainCertificateOperationOptions,\n KeyVaultCertificateWithPolicy,\n} from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollOperationState } from \"../keyVaultCertificatePoller.js\";\nimport { cleanState, KeyVaultCertificatePollOperation } from \"../keyVaultCertificatePoller.js\";\nimport type { KeyVaultClient } from \"../../keyVaultClient.js\";\nimport {\n getCertificateOperationFromCoreOperation,\n getCertificateWithPolicyFromCertificateBundle,\n} from \"../../transformations.js\";\nimport { tracingClient } from \"../../tracing.js\";\n\n/**\n * An interface representing the publicly available properties of the state of the CertificateOperationPoller.\n */\nexport interface CertificateOperationState\n extends KeyVaultCertificatePollOperationState<KeyVaultCertificateWithPolicy> {\n /**\n * The operation of the certificate\n */\n certificateOperation?: CertificateOperation;\n}\n\n/**\n * An interface representing the active operation of a certificate's creation,\n * which is represented locally as the \"operation\" of an active LRO Poller.\n */\nexport class CertificateOperationPollOperation extends KeyVaultCertificatePollOperation<\n CertificateOperationState,\n KeyVaultCertificateWithPolicy\n> {\n constructor(\n public state: CertificateOperationState,\n private client: KeyVaultClient,\n private operationOptions: OperationOptions = {},\n ) {\n super(state);\n }\n\n /**\n * Cancels a certificate creation operation that is already in progress. This operation requires the certificates/update permission.\n */\n private cancelCertificateOperation(\n certificateName: string,\n options: CancelCertificateOperationOptions = {},\n ): Promise<CertificateOperation> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.cancelCertificateOperation\",\n options,\n async (updatedOptions) => {\n const response = await this.client.updateCertificateOperation(\n certificateName,\n { cancellationRequested: true },\n updatedOptions,\n );\n return getCertificateOperationFromCoreOperation(certificateName, response);\n },\n );\n }\n\n /**\n * Gets the latest information available from a specific certificate, including the certificate's policy. This operation requires the certificates/get permission.\n */\n private getCertificate(\n certificateName: string,\n options: GetCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.getCertificate\",\n options,\n async (updatedOptions) => {\n const result = await this.client.getCertificate(certificateName, \"\", updatedOptions);\n return getCertificateWithPolicyFromCertificateBundle(result);\n },\n );\n }\n\n /**\n * Gets the certificate operation.\n */\n private getPlainCertificateOperation(\n certificateName: string,\n options: GetPlainCertificateOperationOptions = {},\n ): Promise<CertificateOperation> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.getPlainCertificateOperation\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getCertificateOperation(certificateName, updatedOptions);\n return getCertificateOperationFromCoreOperation(certificateName, response);\n },\n );\n }\n\n /**\n * Reaches to the service and updates the poll operation.\n */\n async update(\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: CertificateOperationState) => void;\n } = {},\n ): Promise<CertificateOperationPollOperation> {\n const state = this.state;\n const certificateName = state.certificateName!;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n state.isStarted = true;\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n state.certificateOperation = await this.getPlainCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n } else if (!state.isCompleted) {\n state.certificateOperation = await this.getPlainCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n }\n\n if (state.certificateOperation && state.certificateOperation.status !== \"inProgress\") {\n state.isCompleted = true;\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n if (state.certificateOperation.error) {\n state.error = new Error(state.certificateOperation.error.message);\n }\n }\n\n return this;\n }\n\n /**\n * Reaches to the service and cancels the certificate's operation, also updating the poll operation.\n */\n async cancel(\n this: CertificateOperationPollOperation,\n options: { abortSignal?: AbortSignal } = {},\n ): Promise<CertificateOperationPollOperation> {\n const state = this.state;\n const certificateName = state.certificateName!;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n state.certificateOperation = await this.cancelCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n\n this.state.isCancelled = true;\n return this;\n }\n\n /**\n * Serializes the certificate's poll operation\n */\n public toString(): string {\n const state: CertificateOperationState = {\n certificateOperation: this.state.certificateOperation,\n ...cleanState(this.state),\n };\n return JSON.stringify({\n state,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/operation/operation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC,OAAO,EAAE,UAAU,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAE/F,OAAO,EACL,wCAAwC,EACxC,6CAA6C,GAC9C,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAYjD;;;GAGG;AACH,MAAM,OAAO,iCAAkC,SAAQ,gCAGtD;IAEU;IACC;IACA;IAHV,YACS,KAAgC,EAC/B,MAAsB,EACtB,mBAAqC,EAAE;QAE/C,KAAK,CAAC,KAAK,CAAC,CAAC;QAJN,UAAK,GAAL,KAAK,CAA2B;QAC/B,WAAM,GAAN,MAAM,CAAgB;QACtB,qBAAgB,GAAhB,gBAAgB,CAAuB;IAGjD,CAAC;IAED;;OAEG;IACK,0BAA0B,CAChC,eAAuB,EACvB,UAA6C,EA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WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAC1D,CAAC;QAED,KAAK,CAAC,oBAAoB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAChE,eAAe,EACf,IAAI,CAAC,gBAAgB,CACtB,CAAC;QAEF,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,MAAM,KAAK,GAA8B;YACvC,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB;YACrD,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;SAC1B,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK;SACN,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type {\n CancelCertificateOperationOptions,\n CertificateOperation,\n GetCertificateOptions,\n GetPlainCertificateOperationOptions,\n KeyVaultCertificateWithPolicy,\n} from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollOperationState } from \"../keyVaultCertificatePoller.js\";\nimport { cleanState, KeyVaultCertificatePollOperation } from \"../keyVaultCertificatePoller.js\";\nimport type { KeyVaultClient } from \"../../keyVaultClient.js\";\nimport {\n getCertificateOperationFromCoreOperation,\n getCertificateWithPolicyFromCertificateBundle,\n} from \"../../transformations.js\";\nimport { tracingClient } from \"../../tracing.js\";\n\n/**\n * An interface representing the publicly available properties of the state of the CertificateOperationPoller.\n */\nexport interface CertificateOperationState extends KeyVaultCertificatePollOperationState<KeyVaultCertificateWithPolicy> {\n /**\n * The operation of the certificate\n */\n certificateOperation?: CertificateOperation;\n}\n\n/**\n * An interface representing the active operation of a certificate's creation,\n * which is represented locally as the \"operation\" of an active LRO Poller.\n */\nexport class CertificateOperationPollOperation extends KeyVaultCertificatePollOperation<\n CertificateOperationState,\n KeyVaultCertificateWithPolicy\n> {\n constructor(\n public state: CertificateOperationState,\n private client: KeyVaultClient,\n private operationOptions: OperationOptions = {},\n ) {\n super(state);\n }\n\n /**\n * Cancels a certificate creation operation that is already in progress. This operation requires the certificates/update permission.\n */\n private cancelCertificateOperation(\n certificateName: string,\n options: CancelCertificateOperationOptions = {},\n ): Promise<CertificateOperation> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.cancelCertificateOperation\",\n options,\n async (updatedOptions) => {\n const response = await this.client.updateCertificateOperation(\n certificateName,\n { cancellationRequested: true },\n updatedOptions,\n );\n return getCertificateOperationFromCoreOperation(certificateName, response);\n },\n );\n }\n\n /**\n * Gets the latest information available from a specific certificate, including the certificate's policy. This operation requires the certificates/get permission.\n */\n private getCertificate(\n certificateName: string,\n options: GetCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.getCertificate\",\n options,\n async (updatedOptions) => {\n const result = await this.client.getCertificate(certificateName, \"\", updatedOptions);\n return getCertificateWithPolicyFromCertificateBundle(result);\n },\n );\n }\n\n /**\n * Gets the certificate operation.\n */\n private getPlainCertificateOperation(\n certificateName: string,\n options: GetPlainCertificateOperationOptions = {},\n ): Promise<CertificateOperation> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.getPlainCertificateOperation\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getCertificateOperation(certificateName, updatedOptions);\n return getCertificateOperationFromCoreOperation(certificateName, response);\n },\n );\n }\n\n /**\n * Reaches to the service and updates the poll operation.\n */\n async update(\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: CertificateOperationState) => void;\n } = {},\n ): Promise<CertificateOperationPollOperation> {\n const state = this.state;\n const certificateName = state.certificateName!;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n state.isStarted = true;\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n state.certificateOperation = await this.getPlainCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n } else if (!state.isCompleted) {\n state.certificateOperation = await this.getPlainCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n }\n\n if (state.certificateOperation && state.certificateOperation.status !== \"inProgress\") {\n state.isCompleted = true;\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n if (state.certificateOperation.error) {\n state.error = new Error(state.certificateOperation.error.message);\n }\n }\n\n return this;\n }\n\n /**\n * Reaches to the service and cancels the certificate's operation, also updating the poll operation.\n */\n async cancel(\n this: CertificateOperationPollOperation,\n options: { abortSignal?: AbortSignal } = {},\n ): Promise<CertificateOperationPollOperation> {\n const state = this.state;\n const certificateName = state.certificateName!;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n state.certificateOperation = await this.cancelCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n\n this.state.isCancelled = true;\n return this;\n }\n\n /**\n * Serializes the certificate's poll operation\n */\n public toString(): string {\n const state: CertificateOperationState = {\n certificateOperation: this.state.certificateOperation,\n ...cleanState(this.state),\n };\n return JSON.stringify({\n state,\n });\n }\n}\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@azure/keyvault-certificates",
3
3
  "sdk-type": "client",
4
4
  "author": "Microsoft Corporation",
5
- "version": "4.10.2-alpha.20251128.1",
5
+ "version": "4.10.2-alpha.20251201.1",
6
6
  "license": "MIT",
7
7
  "description": "Isomorphic client library for Azure KeyVault's certificates.",
8
8
  "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-certificates/README.md",
@@ -90,8 +90,8 @@
90
90
  "tshy": "^3.0.3",
91
91
  "typescript": "~5.9.3",
92
92
  "vitest": "^4.0.8",
93
- "@azure-tools/test-recorder": "^4.1.1",
94
93
  "@azure-tools/test-credential": "^2.1.2",
94
+ "@azure-tools/test-recorder": "^4.1.1",
95
95
  "@azure-tools/test-utils-vitest": "^2.0.1",
96
96
  "@azure/dev-tool": "^1.0.0",
97
97
  "@azure/eslint-plugin-azure-sdk": "^3.0.0"