@azure/keyvault-certificates 4.10.2 → 4.11.0-beta.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.
- package/dist/browser/api/keyVaultContext.js +3 -2
- package/dist/browser/api/keyVaultContext.js.map +1 -1
- package/dist/browser/certificatesModels.d.ts +11 -3
- package/dist/browser/certificatesModels.js +1 -1
- package/dist/browser/certificatesModels.js.map +1 -1
- package/dist/browser/constants.js +1 -1
- package/dist/browser/constants.js.map +1 -1
- package/dist/browser/index.d.ts +2 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models/models.d.ts +16 -1
- package/dist/browser/models/models.js +21 -0
- package/dist/browser/models/models.js.map +1 -1
- package/dist/browser/transformations.js +4 -0
- package/dist/browser/transformations.js.map +1 -1
- package/dist/browser/utils.d.ts +2 -2
- package/dist/browser/utils.js +8 -29
- package/dist/browser/utils.js.map +1 -1
- package/dist/commonjs/api/keyVaultContext.js +3 -2
- package/dist/commonjs/api/keyVaultContext.js.map +2 -2
- package/dist/commonjs/certificatesModels.d.ts +11 -3
- package/dist/commonjs/certificatesModels.js +1 -1
- package/dist/commonjs/certificatesModels.js.map +2 -2
- package/dist/commonjs/constants.js +1 -1
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/commonjs/index.d.ts +2 -2
- package/dist/commonjs/index.js.map +2 -2
- package/dist/commonjs/models/models.d.ts +16 -1
- package/dist/commonjs/models/models.js +19 -2
- package/dist/commonjs/models/models.js.map +2 -2
- package/dist/commonjs/transformations.js +4 -0
- package/dist/commonjs/transformations.js.map +2 -2
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utils.d.ts +2 -2
- package/dist/commonjs/utils.js +10 -26
- package/dist/commonjs/utils.js.map +3 -3
- package/dist/esm/api/keyVaultContext.js +3 -2
- package/dist/esm/api/keyVaultContext.js.map +1 -1
- package/dist/esm/certificatesModels.d.ts +11 -3
- package/dist/esm/certificatesModels.js +1 -1
- package/dist/esm/certificatesModels.js.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/models.d.ts +16 -1
- package/dist/esm/models/models.js +21 -0
- package/dist/esm/models/models.js.map +1 -1
- package/dist/esm/transformations.js +4 -0
- package/dist/esm/transformations.js.map +1 -1
- package/dist/esm/utils.d.ts +2 -2
- package/dist/esm/utils.js +8 -29
- package/dist/esm/utils.js.map +1 -1
- package/dist/react-native/api/keyVaultContext.js +3 -2
- package/dist/react-native/api/keyVaultContext.js.map +1 -1
- package/dist/react-native/certificatesModels.d.ts +11 -3
- package/dist/react-native/certificatesModels.js +1 -1
- package/dist/react-native/certificatesModels.js.map +1 -1
- package/dist/react-native/constants.js +1 -1
- package/dist/react-native/constants.js.map +1 -1
- package/dist/react-native/index.d.ts +2 -2
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/models/models.d.ts +16 -1
- package/dist/react-native/models/models.js +21 -0
- package/dist/react-native/models/models.js.map +1 -1
- package/dist/react-native/transformations.js +4 -0
- package/dist/react-native/transformations.js.map +1 -1
- package/dist/react-native/utils.d.ts +2 -2
- package/dist/react-native/utils.js +8 -29
- package/dist/react-native/utils.js.map +1 -1
- package/package.json +25 -10
- package/dist/browser/models/index.d.ts +0 -2
- package/dist/browser/models/index.js +0 -4
- package/dist/browser/models/index.js.map +0 -1
- package/dist/commonjs/models/index.d.ts +0 -2
- package/dist/commonjs/models/index.js +0 -36
- package/dist/commonjs/models/index.js.map +0 -7
- package/dist/esm/models/index.d.ts +0 -2
- package/dist/esm/models/index.js +0 -4
- package/dist/esm/models/index.js.map +0 -1
- package/dist/react-native/models/index.d.ts +0 -2
- package/dist/react-native/models/index.js +0 -4
- package/dist/react-native/models/index.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// This file makes more sense if ordered based on how meaningful are some methods in relation to others.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type { TokenCredential } from \"@azure/core-auth\";\n\nimport { logger } from \"./logger.js\";\nimport type { PollOperationState } from \"@azure/core-lro\";\nimport type { PollerLike } from \"@azure/core-lro\";\n\nimport type {\n KeyVaultCertificate,\n KeyVaultCertificateWithPolicy,\n AdministratorContact,\n BackupCertificateOptions,\n BeginCreateCertificateOptions,\n BeginDeleteCertificateOptions,\n BeginRecoverDeletedCertificateOptions,\n CertificateIssuer,\n CertificateContact,\n CertificateContentType,\n CertificatePolicy,\n CertificateProperties,\n CreateCertificateOptions,\n DeleteCertificateOperationOptions,\n DeleteContactsOptions,\n DeleteIssuerOptions,\n DeletedCertificate,\n GetContactsOptions,\n GetIssuerOptions,\n GetCertificateOperationOptions,\n GetPlainCertificateOperationOptions,\n GetCertificateOptions,\n GetCertificatePolicyOptions,\n GetCertificateVersionOptions,\n GetDeletedCertificateOptions,\n CertificateTags,\n ImportCertificateOptions,\n ListPropertiesOfCertificatesOptions,\n ErrorModel,\n ListPropertiesOfCertificateVersionsOptions,\n ListPropertiesOfIssuersOptions,\n ListDeletedCertificatesOptions,\n MergeCertificateOptions,\n PurgeDeletedCertificateOptions,\n RestoreCertificateBackupOptions,\n SetContactsOptions,\n CreateIssuerOptions,\n CertificateOperation,\n CertificateOperationError,\n SubjectAlternativeNames,\n UpdateIssuerOptions,\n UpdateCertificatePropertiesOptions,\n UpdateCertificatePolicyOptions,\n CertificatePollerOptions,\n IssuerProperties,\n CertificateContactAll,\n ActionType,\n CertificatePolicyAction,\n LifetimeAction,\n RequireAtLeastOne,\n ArrayOneOrMore,\n SubjectAlternativeNamesAll,\n CertificatePolicyProperties,\n PolicySubjectProperties,\n CertificateClientOptions,\n CancelCertificateOperationOptions,\n ImportCertificatePolicy,\n PollerLikeWithCancellation,\n} from \"./certificatesModels.js\";\nimport {\n WellKnownIssuerNames,\n DefaultCertificatePolicy,\n LATEST_API_VERSION,\n KnownCertificateKeyCurveNames,\n KnownCertificateKeyTypes,\n KnownKeyUsageTypes,\n} from \"./certificatesModels.js\";\n\nimport type {\n CertificateIssuerSetParameters,\n CertificateIssuerUpdateParameters,\n BackupCertificateResult,\n IssuerParameters,\n IssuerCredentials,\n IssuerAttributes,\n X509CertificateProperties,\n SubjectAlternativeNames as CoreSubjectAlternativeNames,\n DeletionRecoveryLevel,\n JsonWebKeyType as CertificateKeyType,\n JsonWebKeyCurveName as CertificateKeyCurveName,\n KeyUsageType,\n} from \"./models/models.js\";\nimport { KnownDeletionRecoveryLevel as KnownDeletionRecoveryLevels } from \"./models/models.js\";\nimport type { KeyVaultClientOptionalParams } from \"./keyVaultClient.js\";\nimport { KeyVaultClient } from \"./keyVaultClient.js\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { keyVaultAuthenticationPolicy } from \"@azure/keyvault-common\";\nimport { CreateCertificatePoller } from \"./lro/create/poller.js\";\nimport { CertificateOperationPoller } from \"./lro/operation/poller.js\";\nimport { DeleteCertificatePoller } from \"./lro/delete/poller.js\";\nimport { RecoverDeletedCertificatePoller } from \"./lro/recover/poller.js\";\nimport type { CertificateOperationState } from \"./lro/operation/operation.js\";\nimport type { DeleteCertificateState } from \"./lro/delete/operation.js\";\nimport type { CreateCertificateState } from \"./lro/create/operation.js\";\nimport type { RecoverDeletedCertificateState } from \"./lro/recover/operation.js\";\nimport { parseCertificateBytes } from \"./utils.js\";\nimport type { KeyVaultCertificateIdentifier } from \"./identifier.js\";\nimport { parseKeyVaultCertificateIdentifier } from \"./identifier.js\";\nimport {\n coreContactsToCertificateContacts,\n getCertificateFromCertificateBundle,\n getCertificateOperationFromCoreOperation,\n getCertificateWithPolicyFromCertificateBundle,\n getDeletedCertificateFromDeletedCertificateBundle,\n getDeletedCertificateFromItem,\n getPropertiesFromCertificateBundle,\n mapPagedAsyncIterable,\n toCoreAttributes,\n toCorePolicy,\n toPublicIssuer,\n toPublicPolicy,\n} from \"./transformations.js\";\nimport type { KeyVaultCertificatePollOperationState } from \"./lro/keyVaultCertificatePoller.js\";\nimport { tracingClient } from \"./tracing.js\";\nimport { bearerTokenAuthenticationPolicyName } from \"@azure/core-rest-pipeline\";\nimport { SDK_VERSION } from \"./constants.js\";\n\nexport {\n type CertificateClientOptions,\n type AdministratorContact,\n type ArrayOneOrMore,\n type BackupCertificateResult,\n type BeginCreateCertificateOptions,\n type BeginDeleteCertificateOptions,\n type BeginRecoverDeletedCertificateOptions,\n type KeyVaultCertificate,\n type KeyVaultCertificateWithPolicy,\n type BackupCertificateOptions,\n type CertificateContentType,\n type CertificateProperties,\n type CertificateIssuer,\n type CertificateOperation,\n type CertificateOperationError,\n type CertificatePolicy,\n type ImportCertificatePolicy,\n type ActionType,\n type CertificatePolicyAction,\n type CertificatePolicyProperties,\n type PolicySubjectProperties,\n type CertificateTags,\n type CreateCertificateOptions,\n type CertificatePollerOptions,\n type KeyVaultCertificateIdentifier,\n parseKeyVaultCertificateIdentifier,\n type PollerLike,\n type PollerLikeWithCancellation,\n type CreateCertificateState,\n type DeleteCertificateState,\n type RecoverDeletedCertificateState,\n type CertificateOperationState,\n type CoreSubjectAlternativeNames,\n type RequireAtLeastOne,\n type CertificateContactAll,\n type CertificateContact,\n type DeleteCertificateOperationOptions,\n type DeleteContactsOptions,\n type DeleteIssuerOptions,\n type DeletedCertificate,\n type DeletionRecoveryLevel,\n DefaultCertificatePolicy,\n type ErrorModel,\n type GetContactsOptions,\n type GetIssuerOptions,\n type GetCertificateOperationOptions,\n type GetPlainCertificateOperationOptions,\n type GetCertificateOptions,\n type GetCertificatePolicyOptions,\n type GetCertificateVersionOptions,\n type GetDeletedCertificateOptions,\n type ImportCertificateOptions,\n type IssuerAttributes,\n type IssuerCredentials,\n type IssuerParameters,\n type IssuerProperties,\n type CertificateKeyType,\n type CertificateKeyCurveName,\n type KeyUsageType,\n type LifetimeAction,\n type ListPropertiesOfCertificatesOptions,\n type ListPropertiesOfCertificateVersionsOptions,\n type ListPropertiesOfIssuersOptions,\n type ListDeletedCertificatesOptions,\n type MergeCertificateOptions,\n type PurgeDeletedCertificateOptions,\n type RestoreCertificateBackupOptions,\n type SetContactsOptions,\n type SubjectAlternativeNamesAll,\n type CreateIssuerOptions,\n type SubjectAlternativeNames,\n type UpdateIssuerOptions,\n type UpdateCertificatePropertiesOptions as UpdateCertificateOptions,\n type UpdateCertificatePolicyOptions,\n WellKnownIssuerNames as WellKnownIssuer,\n type X509CertificateProperties,\n logger,\n type CancelCertificateOperationOptions,\n type KeyVaultCertificatePollOperationState,\n KnownCertificateKeyCurveNames,\n KnownDeletionRecoveryLevels,\n KnownCertificateKeyTypes,\n KnownKeyUsageTypes,\n};\n\n/**\n * Deprecated KeyVault copy of core-lro's PollerLike.\n */\nexport type KVPollerLike<TState extends PollOperationState<TResult>, TResult> = PollerLike<\n TState,\n TResult\n>;\n\n/**\n * The client to interact with the KeyVault certificates functionality\n */\nexport class CertificateClient {\n /**\n * The base URL to the vault\n */\n public readonly vaultUrl: string;\n\n private readonly client: KeyVaultClient;\n\n /**\n * Creates an instance of CertificateClient.\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 clientOptions - 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 clientOptions: CertificateClientOptions = {},\n ) {\n this.vaultUrl = vaultUrl;\n\n const internalClientPipelineOptions: KeyVaultClientOptionalParams = {\n ...clientOptions,\n apiVersion: clientOptions.serviceVersion || LATEST_API_VERSION,\n userAgentOptions: {\n userAgentPrefix: `${clientOptions.userAgentOptions?.userAgentPrefix} azsdk-js-keyvault-certificates/${SDK_VERSION}`,\n },\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, internalClientPipelineOptions);\n\n this.client.pipeline.removePolicy({ name: bearerTokenAuthenticationPolicyName });\n this.client.pipeline.addPolicy(keyVaultAuthenticationPolicy(credential, clientOptions));\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 * Iterates the latest version of all certificates in the vault. The full certificate identifier and attributes are provided\n * in the response. No values are returned for the certificates. This operations requires the certificates/list permission.\n *\n * Example usage:\n * ```ts snippet:IndexListCertificates\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * // All in one call\n * for await (const certificateProperties of client.listPropertiesOfCertificates()) {\n * console.log(certificateProperties);\n * }\n *\n * // By pages\n * for await (const page of client.listPropertiesOfCertificates().byPage()) {\n * for (const certificateProperties of page) {\n * console.log(certificateProperties);\n * }\n * }\n * ```\n * List all versions of the specified certificate.\n * @param options - The optional parameters\n */\n public listPropertiesOfCertificates(\n options: ListPropertiesOfCertificatesOptions = {},\n ): PagedAsyncIterableIterator<CertificateProperties> {\n return mapPagedAsyncIterable(\n this.client.getCertificates(options),\n getPropertiesFromCertificateBundle,\n );\n }\n\n /**\n * Returns the versions of a certificate in the specified key\n * vault. This operation requires the certificates/list permission.\n *\n * Example usage:\n * ```ts snippet:IndexListCertificateVersions\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * for await (const certificateProperties of client.listPropertiesOfCertificateVersions(\n * \"MyCertificate\",\n * )) {\n * console.log(certificateProperties.version!);\n * }\n * ```\n * List the versions of a certificate.\n * @param certificateName - The name of the certificate.\n * @param options - The optional parameters\n */\n public listPropertiesOfCertificateVersions(\n certificateName: string,\n options: ListPropertiesOfCertificateVersionsOptions = {},\n ): PagedAsyncIterableIterator<CertificateProperties> {\n return mapPagedAsyncIterable(\n this.client.getCertificateVersions(certificateName, options),\n getPropertiesFromCertificateBundle,\n );\n }\n\n /**\n * The DELETE operation applies to any certificate stored in Azure Key Vault. DELETE cannot be applied\n * to an individual version of a certificate.\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the certificate is fully recovered.\n *\n * This operation requires the certificates/delete permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleDeleteCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * const certificateName = \"MyCertificate\";\n *\n * const poller = await client.beginDeleteCertificate(certificateName);\n *\n * // You can use the deleted certificate immediately:\n * const deletedCertificate = poller.getResult();\n *\n * // The certificate is being deleted. Only wait for it if you want to restore it or purge it.\n * await poller.pollUntilDone();\n *\n * // You can also get the deleted certificate this way:\n * await client.getDeletedCertificate(certificateName);\n *\n * // Deleted certificates can also be recovered or purged.\n *\n * // recoverDeletedCertificate returns a poller, just like beginDeleteCertificate.\n * // const recoverPoller = await client.beginRecoverDeletedCertificate(certificateName);\n * // await recoverPoller.pollUntilDone();\n *\n * // If a certificate is done and the Key Vault has soft-delete enabled, the certificate can be purged with:\n * await client.purgeDeletedCertificate(certificateName);\n * ```\n * Deletes a certificate from a specified key vault.\n * @param certificateName - The name of the certificate.\n * @param options - The optional parameters\n */\n public async beginDeleteCertificate(\n certificateName: string,\n options: BeginDeleteCertificateOptions = {},\n ): Promise<PollerLike<DeleteCertificateState, DeletedCertificate>> {\n const poller = new DeleteCertificatePoller({\n certificateName,\n client: this.client,\n vaultUrl: this.vaultUrl,\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 * Deletes all of the certificate contacts. This operation requires the certificates/managecontacts permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientDeleteContacts\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.deleteContacts();\n * ```\n * Deletes all of the certificate contacts\n * @param options - The optional parameters\n */\n public deleteContacts(\n options: DeleteContactsOptions = {},\n ): Promise<CertificateContact[] | undefined> {\n let parsedBody: any;\n return tracingClient.withSpan(\n \"CertificateClient.deleteContacts\",\n options,\n async (updatedOptions) => {\n await this.client.deleteCertificateContacts({\n ...updatedOptions,\n onResponse: (response) => {\n parsedBody = response.parsedBody;\n },\n });\n return coreContactsToCertificateContacts(parsedBody);\n },\n );\n }\n\n /**\n * Sets the certificate contacts for the key vault. This operation requires the certificates/managecontacts permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientSetContacts\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.setContacts([\n * {\n * email: \"b@b.com\",\n * name: \"b\",\n * phone: \"222222222222\",\n * },\n * ]);\n * ```\n * Sets the certificate contacts.\n * @param contacts - The contacts to use\n * @param options - The optional parameters\n */\n public setContacts(\n contacts: CertificateContact[],\n options: SetContactsOptions = {},\n ): Promise<CertificateContact[] | undefined> {\n const coreContacts = contacts.map((x) => ({\n emailAddress: x ? x.email : undefined,\n name: x ? x.name : undefined,\n phone: x ? x.phone : undefined,\n }));\n\n return tracingClient.withSpan(\n \"CertificateClient.setContacts\",\n options,\n async (updatedOptions) => {\n const response = await this.client.setCertificateContacts(\n { contactList: coreContacts },\n updatedOptions,\n );\n return coreContactsToCertificateContacts(response);\n },\n );\n }\n\n /**\n * Returns the set of certificate contact resources in the specified key vault. This operation requires the certificates/managecontacts permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetContacts\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * const contacts = await client.getContacts();\n * for (const contact of contacts) {\n * console.log(contact);\n * }\n * ```\n * Sets the certificate contacts.\n * @param options - The optional parameters\n */\n public getContacts(options: GetContactsOptions = {}): Promise<CertificateContact[] | undefined> {\n return tracingClient.withSpan(\n \"CertificateClient.getContacts\",\n options,\n async (updatedOptions) => {\n const result = await this.client.getCertificateContacts(updatedOptions);\n return coreContactsToCertificateContacts(result);\n },\n );\n }\n /**\n * Returns the set of certificate issuer resources in the specified key vault. This operation requires the certificates/manageissuers/getissuers permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientListIssuers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.createIssuer(\"IssuerName\", \"Test\");\n *\n * // All in one call\n * for await (const issuerProperties of client.listPropertiesOfIssuers()) {\n * console.log(issuerProperties);\n * }\n *\n * // By pages\n * for await (const page of client.listPropertiesOfIssuers().byPage()) {\n * for (const issuerProperties of page) {\n * console.log(issuerProperties);\n * }\n * }\n * ```\n * List the certificate issuers.\n * @param options - The optional parameters\n */\n public listPropertiesOfIssuers(\n options: ListPropertiesOfIssuersOptions = {},\n ): PagedAsyncIterableIterator<IssuerProperties> {\n return this.client.getCertificateIssuers(options);\n }\n\n /**\n * The createIssuer operation adds or updates the specified certificate issuer. This\n * operation requires the certificates/setissuers permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientCreateIssuer\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.createIssuer(\"IssuerName\", \"Test\");\n * ```\n * Sets the specified certificate issuer.\n * @param issuerName - The name of the issuer.\n * @param provider - The issuer provider.\n * @param options - The optional parameters\n */\n public createIssuer(\n issuerName: string,\n provider: string,\n options: CreateIssuerOptions = {},\n ): Promise<CertificateIssuer> {\n return tracingClient.withSpan(\n \"CertificateClient.createIssuer\",\n options,\n async (updatedOptions) => {\n const { accountId, password } = updatedOptions;\n\n const parameters: CertificateIssuerSetParameters = {\n credentials: {\n accountId,\n password,\n },\n provider,\n };\n\n if (\n updatedOptions.organizationId ||\n (updatedOptions.administratorContacts && updatedOptions.administratorContacts.length)\n ) {\n parameters.organizationDetails = {\n id: updatedOptions.organizationId,\n adminDetails: updatedOptions.administratorContacts\n ? updatedOptions.administratorContacts.map((x) => ({\n emailAddress: x.email,\n phone: x.phone,\n firstName: x.firstName,\n lastName: x.lastName,\n }))\n : undefined,\n };\n }\n\n if (updatedOptions.enabled !== undefined) {\n parameters.attributes = {\n enabled: updatedOptions.enabled,\n };\n }\n\n const response = await this.client.setCertificateIssuer(\n issuerName,\n parameters,\n updatedOptions,\n );\n return toPublicIssuer(response);\n },\n );\n }\n\n /**\n * The updateIssuer operation performs an update on the specified certificate issuer\n * entity. This operation requires the certificates/setissuers permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientUpdateIssuer\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.updateIssuer(\"IssuerName\", {\n * provider: \"Provider2\",\n * });\n * ```\n * Updates the specified certificate issuer.\n * @param issuerName - The name of the issuer.\n * @param options - The optional parameters\n */\n public async updateIssuer(\n issuerName: string,\n options: UpdateIssuerOptions = {},\n ): Promise<CertificateIssuer> {\n return tracingClient.withSpan(\n \"CertificateClient.updateIssuer\",\n options,\n async (updatedOptions) => {\n const { accountId, password } = options;\n\n const parameters: CertificateIssuerUpdateParameters = {\n credentials: {\n accountId,\n password,\n },\n };\n\n if (updatedOptions.provider) {\n parameters.provider = updatedOptions.provider;\n }\n\n if (\n updatedOptions.organizationId ||\n (updatedOptions.administratorContacts && updatedOptions.administratorContacts.length)\n ) {\n parameters.organizationDetails = {\n id: updatedOptions.organizationId,\n adminDetails: updatedOptions.administratorContacts\n ? updatedOptions.administratorContacts.map((x) => ({\n emailAddress: x.email,\n phone: x.phone,\n firstName: x.firstName,\n lastName: x.lastName,\n }))\n : undefined,\n };\n }\n\n if (updatedOptions.enabled) {\n parameters.attributes = {\n enabled: updatedOptions.enabled,\n };\n }\n\n const response = await this.client.updateCertificateIssuer(\n issuerName,\n parameters,\n updatedOptions,\n );\n return toPublicIssuer(response);\n },\n );\n }\n\n /**\n * The getIssuer operation returns the specified certificate issuer resources in the\n * specified key vault. This operation requires the certificates/manageissuers/getissuers\n * permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetIssuer\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * const certificateIssuer = await client.getIssuer(\"IssuerName\");\n * console.log(certificateIssuer);\n * ```\n * Gets he specified certificate issuer.\n * @param issuerName - The name of the issuer.\n * @param options - The optional parameters\n */\n public getIssuer(issuerName: string, options: GetIssuerOptions = {}): Promise<CertificateIssuer> {\n return tracingClient.withSpan(\n \"CertificateClient.getIssuer\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getCertificateIssuer(issuerName, {\n ...updatedOptions,\n });\n return toPublicIssuer(response);\n },\n );\n }\n\n /**\n * The deleteIssuer operation permanently removes the specified certificate issuer from\n * the vault. This operation requires the certificates/manageissuers/deleteissuers permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientDeleteIssuer\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.deleteIssuer(\"IssuerName\");\n * ```\n * Deletes the specified certificate issuer.\n * @param issuerName - The name of the issuer.\n * @param options - The optional parameters\n */\n public deleteIssuer(\n issuerName: string,\n options: DeleteIssuerOptions = {},\n ): Promise<CertificateIssuer> {\n return tracingClient.withSpan(\n \"CertificateClient.deleteIssuer\",\n options,\n async (updatedOptions) => {\n const response = await this.client.deleteCertificateIssuer(issuerName, updatedOptions);\n return toPublicIssuer(response);\n },\n );\n }\n\n /**\n * Creates a new certificate. If this is the first version, the certificate resource is created.\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the certificate is fully recovered.\n *\n * **Note:** Sending `Self` as the `issuerName` of the certificate's policy will create a self-signed certificate.\n *\n * This operation requires the certificates/create permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateCertificatePoller\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const certificateName = \"MyCertificateName\";\n * const certificatePolicy = {\n * issuerName: \"Self\",\n * subject: \"cn=MyCert\",\n * };\n *\n * const poller = await client.beginCreateCertificate(certificateName, certificatePolicy);\n *\n * // You can use the pending certificate immediately:\n * const pendingCertificate = poller.getResult();\n *\n * // Or you can wait until the certificate finishes being signed:\n * const keyVaultCertificate = await poller.pollUntilDone();\n * console.log(keyVaultCertificate);\n * ```\n * Creates a certificate\n * @param certificateName - The name of the certificate\n * @param certificatePolicy - The certificate's policy\n * @param options - Optional parameters\n */\n public async beginCreateCertificate(\n certificateName: string,\n policy: CertificatePolicy,\n options: BeginCreateCertificateOptions = {},\n ): Promise<PollerLikeWithCancellation<CreateCertificateState, KeyVaultCertificateWithPolicy>> {\n const poller = new CreateCertificatePoller({\n vaultUrl: this.vaultUrl,\n client: this.client,\n certificateName,\n certificatePolicy: policy,\n createCertificateOptions: options,\n operationOptions: options,\n intervalInMs: options.intervalInMs,\n resumeFrom: options.resumeFrom,\n });\n // This will initialize the poller's operation (the creation of the secret).\n await poller.poll();\n return poller;\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 * Example usage:\n * ```ts snippet:CertificateClientGetCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * const certificateName = \"MyCertificate\";\n *\n * const result = await client.getCertificate(certificateName);\n * console.log(result.name);\n * ```\n * Retrieves a certificate from the certificate's name (includes the certificate policy)\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public getCertificate(\n certificateName: string,\n options: GetCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateClient.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 information about a specific certificate on a specific version. It won't return the certificate's policy. This operation requires the certificates/get permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetCertificateVersion\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const certificateName = \"MyCertificateName\";\n *\n * const latestCertificate = await client.getCertificate(certificateName);\n * console.log(`Latest version of the certificate ${certificateName}: `, latestCertificate);\n * const specificCertificate = await client.getCertificateVersion(\n * certificateName,\n * latestCertificate.properties.version,\n * );\n * console.log(\n * `The certificate ${certificateName} at the version ${latestCertificate.properties.version}: `,\n * specificCertificate,\n * );\n * ```\n * Retrieves a certificate from the certificate's name and a specified version\n * @param certificateName - The name of the certificate\n * @param version - The specific version of the certificate\n * @param options - The optional parameters\n */\n public getCertificateVersion(\n certificateName: string,\n version: string,\n options: GetCertificateVersionOptions = {},\n ): Promise<KeyVaultCertificate> {\n return tracingClient.withSpan(\n \"CertificateClient.getCertificateVersion\",\n options,\n async (updatedOptions) => {\n if (!version) {\n throw new Error(\"The 'version' cannot be empty.\");\n }\n const result = await this.client.getCertificate(certificateName, version, updatedOptions);\n return getCertificateFromCertificateBundle(result);\n },\n );\n }\n\n /**\n * Imports an existing valid certificate, containing a private key, into Azure Key Vault. The certificate to be imported can be in either PFX or PEM format.\n * If the certificate is in PEM format the PEM file must contain the key as well as x509 certificates. This operation requires the certificates/import permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientImportCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n * import { isNodeLike } from \"@azure/core-util\";\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 CertificateClient(url, credential);\n * const secretClient = new SecretClient(url, credential);\n *\n * const certificateSecret = await secretClient.getSecret(\"MyCertificate\");\n * const base64EncodedCertificate = certificateSecret.value!;\n *\n * const buffer = isNodeLike\n * ? Buffer.from(base64EncodedCertificate, \"base64\")\n * : Uint8Array.from(atob(base64EncodedCertificate), (c) => c.charCodeAt(0));\n * await client.importCertificate(\"MyCertificate\", buffer);\n * ```\n * Imports a certificate from a certificate's secret value\n * @param certificateName - The name of the certificate\n * @param certificateBytes - The PFX or ASCII PEM formatted value of the certificate containing both the X.509 certificates and the private key\n * @param options - The optional parameters\n */\n public importCertificate(\n certificateName: string,\n certificateBytes: Uint8Array,\n options: ImportCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateClient.importCertificate\",\n options,\n async (updatedOptions) => {\n const base64EncodedCertificate = parseCertificateBytes(\n certificateBytes,\n updatedOptions.policy?.contentType,\n );\n const result = await this.client.importCertificate(\n certificateName,\n {\n base64EncodedCertificate,\n preserveCertOrder: updatedOptions.preserveCertificateOrder,\n ...updatedOptions,\n },\n updatedOptions,\n );\n return getCertificateWithPolicyFromCertificateBundle(result);\n },\n );\n }\n\n /**\n * The getCertificatePolicy operation returns the specified certificate policy resources in the specified key vault. This operation requires the certificates/get permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetCertificatePolicy\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const policy = await client.getCertificatePolicy(\"MyCertificate\");\n * console.log(policy);\n * ```\n * Gets a certificate's policy\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public getCertificatePolicy(\n certificateName: string,\n options: GetCertificatePolicyOptions = {},\n ): Promise<CertificatePolicy> {\n return tracingClient.withSpan(\n \"CertificateClient.getCertificatePolicy\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getCertificatePolicy(certificateName, updatedOptions);\n return toPublicPolicy(response);\n },\n );\n }\n\n /**\n * Updates the certificate policy for the specified certificate. This operation requires the certificates/update permission.\n * Gets a certificate's policy\n * @param certificateName - The name of the certificate\n * @param policy - The certificate policy\n * @param options - The optional parameters\n */\n public updateCertificatePolicy(\n certificateName: string,\n policy: CertificatePolicy,\n options: UpdateCertificatePolicyOptions = {},\n ): Promise<CertificatePolicy> {\n let parsedBody: any;\n return tracingClient.withSpan(\n \"CertificateClient.updateCertificatePolicy\",\n options,\n async (updatedOptions) => {\n const corePolicy = toCorePolicy(undefined, policy);\n await this.client.updateCertificatePolicy(certificateName, corePolicy, updatedOptions);\n return toPublicPolicy(parsedBody);\n },\n );\n }\n\n /**\n * Applies the specified update on the given certificate; the only elements updated are the\n * certificate's attributes. This operation requires the certificates/update permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientUpdateCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * // You may pass an empty string for version which will update\n * // the latest version of the certificate\n * await client.updateCertificateProperties(\"MyCertificate\", \"\", {\n * tags: {\n * customTag: \"value\",\n * },\n * });\n * ```\n * Updates a certificate\n * @param certificateName - The name of the certificate\n * @param version - The version of the certificate to update (an empty string will update the latest version)\n * @param options - The options, including what to update\n */\n public updateCertificateProperties(\n certificateName: string,\n version: string,\n options: UpdateCertificatePropertiesOptions = {},\n ): Promise<KeyVaultCertificate> {\n return tracingClient.withSpan(\n \"CertificateClient.updateCertificateProperties\",\n options,\n async (updatedOptions) => {\n const response = await this.client.updateCertificate(\n certificateName,\n version,\n {\n certificateAttributes: toCoreAttributes(options),\n tags: options.tags,\n },\n updatedOptions,\n );\n return getCertificateFromCertificateBundle(response);\n },\n );\n }\n\n /**\n * Gets the creation operation associated with a specified certificate. This operation requires the certificates/get permission.\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the certificate is fully recovered.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetCertificateOperation\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const createPoller = await client.beginCreateCertificate(\"MyCertificate\", {\n * issuerName: \"Self\",\n * subject: \"cn=MyCert\",\n * });\n *\n * const poller = await client.getCertificateOperation(\"MyCertificate\");\n * const pendingCertificate = poller.getResult();\n *\n * const certificateOperation = poller.getOperationState().certificateOperation;\n * console.log(certificateOperation);\n * ```\n * Gets a certificate's poller operation\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public async getCertificateOperation(\n certificateName: string,\n options: GetCertificateOperationOptions = {},\n ): Promise<PollerLikeWithCancellation<CertificateOperationState, KeyVaultCertificateWithPolicy>> {\n const poller = new CertificateOperationPoller({\n certificateName,\n client: this.client,\n vaultUrl: this.vaultUrl,\n intervalInMs: options.intervalInMs,\n resumeFrom: options.resumeFrom,\n operationOptions: options,\n });\n // This will initialize the poller's operation, which pre-populates some necessary properties.\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the creation operation for a specified certificate that is in the process of being created.\n * The certificate is no longer created. This operation requires the certificates/update permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientDeleteCertificateOperation\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * await client.beginCreateCertificate(\"MyCertificate\", {\n * issuerName: \"Self\",\n * subject: \"cn=MyCert\",\n * });\n * await client.deleteCertificateOperation(\"MyCertificate\");\n *\n * await client.getCertificateOperation(\"MyCertificate\");\n * ```\n * Delete a certificate's operation\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public deleteCertificateOperation(\n certificateName: string,\n options: DeleteCertificateOperationOptions = {},\n ): Promise<CertificateOperation> {\n return tracingClient.withSpan(\n \"CertificateClient.deleteCertificateOperation\",\n options,\n async (updatedOptions) => {\n const operation = await this.client.deleteCertificateOperation(\n certificateName,\n updatedOptions,\n );\n return getCertificateOperationFromCoreOperation(certificateName, operation);\n },\n );\n }\n\n /**\n * Performs the merging of a certificate or certificate chain with a key pair currently available in the service. This operation requires the certificates/create permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientMergeCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n * import { writeFileSync, readFileSync } from \"node:fs\";\n * import { execSync } from \"node:child_process\";\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 CertificateClient(url, credential);\n *\n * await client.beginCreateCertificate(\"MyCertificate\", {\n * issuerName: \"Unknown\",\n * subject: \"cn=MyCert\",\n * });\n * const poller = await client.getCertificateOperation(\"MyCertificate\");\n * const { csr } = poller.getOperationState().certificateOperation!;\n * const base64Csr = Buffer.from(csr!).toString(\"base64\");\n * const wrappedCsr = [\n * \"-----BEGIN CERTIFICATE REQUEST-----\",\n * base64Csr,\n * \"-----END CERTIFICATE REQUEST-----\",\n * ].join(\"\\n\");\n *\n * writeFileSync(\"test.csr\", wrappedCsr);\n *\n * // Certificate available locally made using:\n * // openssl genrsa -out ca.key 2048\n * // openssl req -new -x509 -key ca.key -out ca.crt\n * // You can read more about how to create a fake certificate authority here: https://gist.github.com/Soarez/9688998\n *\n * execSync(\"openssl x509 -req -in test.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out test.crt\");\n * const base64Crt = readFileSync(\"test.crt\").toString().split(\"\\n\").slice(1, -1).join(\"\");\n *\n * await client.mergeCertificate(\"MyCertificate\", [Buffer.from(base64Crt)]);\n * ```\n * Merges a signed certificate request into a pending certificate\n * @param certificateName - The name of the certificate\n * @param x509Certificates - The certificate(s) to merge\n * @param options - The optional parameters\n */\n public mergeCertificate(\n certificateName: string,\n x509Certificates: Uint8Array[],\n options: MergeCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateClient.mergeCertificate\",\n options,\n async (updatedOptions) => {\n const response = await this.client.mergeCertificate(\n certificateName,\n { x509Certificates },\n\n updatedOptions,\n );\n return getCertificateWithPolicyFromCertificateBundle(response);\n },\n );\n }\n\n /**\n * Requests that a backup of the specified certificate be downloaded to the client. All versions of the certificate will be downloaded.\n * This operation requires the certificates/backup permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientBackupCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * await client.beginCreateCertificate(\"MyCertificate\", {\n * issuerName: \"Self\",\n * subject: \"cn=MyCert\",\n * });\n * const backup = await client.backupCertificate(\"MyCertificate\");\n * ```\n * Generates a backup of a certificate\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public backupCertificate(\n certificateName: string,\n options: BackupCertificateOptions = {},\n ): Promise<Uint8Array | undefined> {\n return tracingClient.withSpan(\n \"CertificateClient.backupCertificate\",\n options,\n async (updatedOptions) => {\n const response = await this.client.backupCertificate(certificateName, updatedOptions);\n return response.value;\n },\n );\n }\n\n /**\n * Restores a backed up certificate, and all its versions, to a vault. This operation requires the certificates/restore permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientRestoreCertificateBackup\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * await client.beginCreateCertificate(\"MyCertificate\", {\n * issuerName: \"Self\",\n * subject: \"cn=MyCert\",\n * });\n * const backup = await client.backupCertificate(\"MyCertificate\");\n *\n * const poller = await client.beginDeleteCertificate(\"MyCertificate\");\n * await poller.pollUntilDone();\n *\n * // Some time is required before we're able to restore the certificate\n * await client.restoreCertificateBackup(backup!);\n * ```\n * Restores a certificate from a backup\n * @param backup - The back-up certificate to restore from\n * @param options - The optional parameters\n */\n public restoreCertificateBackup(\n backup: Uint8Array,\n options: RestoreCertificateBackupOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateClient.restoreCertificateBackup\",\n options,\n async (updatedOptions) => {\n const response = await this.client.restoreCertificate(\n { certificateBundleBackup: backup },\n updatedOptions,\n );\n return getCertificateWithPolicyFromCertificateBundle(response);\n },\n );\n }\n\n /**\n * Retrieves the certificates in the current vault which are in a deleted state and ready for recovery or purging. This operation includes deletion-specific\n * information. This operation requires the certificates/get/list permission. This operation can only be enabled on soft-delete enabled vaults.\n *\n * Example usage:\n * ```ts snippet:CertificateClientListDeletedCertificates\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * for await (const deletedCertificate of client.listDeletedCertificates()) {\n * console.log(deletedCertificate);\n * }\n *\n * for await (const page of client.listDeletedCertificates().byPage()) {\n * for (const deletedCertificate of page) {\n * console.log(deletedCertificate);\n * }\n * }\n * ```\n * Lists deleted certificates\n * @param options - The optional parameters\n */\n public listDeletedCertificates(\n options: ListDeletedCertificatesOptions = {},\n ): PagedAsyncIterableIterator<DeletedCertificate> {\n return mapPagedAsyncIterable(\n this.client.getDeletedCertificates(options),\n getDeletedCertificateFromItem,\n );\n }\n\n /**\n * retrieves the deleted certificate information plus its attributes, such as retention interval, scheduled permanent deletion and the\n * current deletion recovery level. This operation requires the certificates/get permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetDeletedCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const deletedCertificate = await client.getDeletedCertificate(\"MyDeletedCertificate\");\n * console.log(\"Deleted certificate:\", deletedCertificate);\n * ```\n * Gets a deleted certificate\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public getDeletedCertificate(\n certificateName: string,\n options: GetDeletedCertificateOptions = {},\n ): Promise<DeletedCertificate> {\n return tracingClient.withSpan(\n \"CertificateClient.getDeletedCertificate\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getDeletedCertificate(certificateName, updatedOptions);\n return getDeletedCertificateFromDeletedCertificateBundle(response);\n },\n );\n }\n\n /**\n * Performs an irreversible deletion of the specified certificate, without possibility for recovery. The operation is not available if the\n * recovery level does not specify 'Purgeable'. This operation requires the certificate/purge permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientPurgeDeletedCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const deletePoller = await client.beginDeleteCertificate(\"MyCertificate\");\n * await deletePoller.pollUntilDone();\n *\n * // Deleting a certificate takes time, make sure to wait before purging it\n * client.purgeDeletedCertificate(\"MyCertificate\");\n * ```\n * Gets a deleted certificate\n * @param certificateName - The name of the deleted certificate to purge\n * @param options - The optional parameters\n */\n public async purgeDeletedCertificate(\n certificateName: string,\n options: PurgeDeletedCertificateOptions = {},\n ): Promise<null> {\n return tracingClient.withSpan(\n \"CertificateClient.purgeDeletedCertificate\",\n options,\n async (updatedOptions) => {\n await this.client.purgeDeletedCertificate(certificateName, updatedOptions);\n return null;\n },\n );\n }\n\n /**\n * Recovers the deleted certificate in the specified vault. This operation can only be performed on a soft-delete enabled vault. This operation\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the certificate is fully recovered.\n *\n * This operation requires the certificates/recover permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientRecoverDeletedCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const deletePoller = await client.beginDeleteCertificate(\"MyCertificate\");\n * await deletePoller.pollUntilDone();\n *\n * const recoverPoller = await client.beginRecoverDeletedCertificate(\"MyCertificate\");\n *\n * // Waiting until it's done\n * const certificate = await recoverPoller.pollUntilDone();\n * console.log(certificate);\n * ```\n * Recovers a deleted certificate\n * @param certificateName - The name of the deleted certificate\n * @param options - The optional parameters\n */\n public async beginRecoverDeletedCertificate(\n certificateName: string,\n options: BeginRecoverDeletedCertificateOptions = {},\n ): Promise<PollerLike<RecoverDeletedCertificateState, KeyVaultCertificateWithPolicy>> {\n const poller = new RecoverDeletedCertificatePoller({\n certificateName,\n client: this.client,\n vaultUrl: this.vaultUrl,\n ...options,\n operationOptions: options,\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"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mDAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,oBAAuB;AAgEvB,gCAOO;AAgBP,oBAA0E;AAE1E,4BAA+B;AAE/B,6BAA6C;AAC7C,oBAAwC;AACxC,IAAAC,iBAA2C;AAC3C,IAAAA,iBAAwC;AACxC,IAAAA,iBAAg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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAyBO,sBACL,iBACA,UAAwC,CAAC,GACZ;AAC7B,WAAO,6BAAc;AAAA,MACnB;AAAA,MACA;AAAA,MACA,OAAO,mBAAmB;AACxB,cAAM,WAAW,MAAM,KAAK,OAAO,sBAAsB,iBAAiB,cAAc;AACxF,mBAAO,0EAAkD,QAAQ;AAAA,MACnE;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4BA,MAAa,wBACX,iBACA,UAA0C,CAAC,GAC5B;AACf,WAAO,6BAAc;AAAA,MACnB;AAAA,MACA;AAAA,MACA,OAAO,mBAAmB;AACxB,cAAM,KAAK,OAAO,wBAAwB,iBAAiB,cAAc;AACzE,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiCA,MAAa,+BACX,iBACA,UAAiD,CAAC,GACkC;AACpF,UAAM,SAAS,IAAI,+CAAgC;AAAA,MACjD;AAAA,MACA,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,GAAG;AAAA,MACH,kBAAkB;AAAA,IACpB,CAAC;AAED,UAAM,OAAO,KAAK;AAClB,WAAO;AAAA,EACT;AACF;",
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// This file makes more sense if ordered based on how meaningful are some methods in relation to others.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type { TokenCredential } from \"@azure/core-auth\";\n\nimport { logger } from \"./logger.js\";\nimport type { PollOperationState } from \"@azure/core-lro\";\nimport type { PollerLike } from \"@azure/core-lro\";\n\nimport type {\n KeyVaultCertificate,\n KeyVaultCertificateWithPolicy,\n AdministratorContact,\n BackupCertificateOptions,\n BeginCreateCertificateOptions,\n BeginDeleteCertificateOptions,\n BeginRecoverDeletedCertificateOptions,\n CertificateIssuer,\n CertificateContact,\n CertificateContentType,\n CertificatePolicy,\n CertificateProperties,\n CreateCertificateOptions,\n DeleteCertificateOperationOptions,\n DeleteContactsOptions,\n DeleteIssuerOptions,\n DeletedCertificate,\n GetContactsOptions,\n GetIssuerOptions,\n GetCertificateOperationOptions,\n GetPlainCertificateOperationOptions,\n GetCertificateOptions,\n GetCertificatePolicyOptions,\n GetCertificateVersionOptions,\n GetDeletedCertificateOptions,\n CertificateTags,\n ImportCertificateOptions,\n ListPropertiesOfCertificatesOptions,\n ErrorModel,\n ListPropertiesOfCertificateVersionsOptions,\n ListPropertiesOfIssuersOptions,\n ListDeletedCertificatesOptions,\n MergeCertificateOptions,\n PurgeDeletedCertificateOptions,\n RestoreCertificateBackupOptions,\n SetContactsOptions,\n CreateIssuerOptions,\n CertificateOperation,\n CertificateOperationError,\n SubjectAlternativeNames,\n UpdateIssuerOptions,\n UpdateCertificatePropertiesOptions,\n UpdateCertificatePolicyOptions,\n CertificatePollerOptions,\n IssuerProperties,\n CertificateContactAll,\n ActionType,\n CertificatePolicyAction,\n LifetimeAction,\n RequireAtLeastOne,\n ArrayOneOrMore,\n SubjectAlternativeNamesAll,\n CertificatePolicyProperties,\n PolicySubjectProperties,\n CertificateClientOptions,\n CancelCertificateOperationOptions,\n ImportCertificatePolicy,\n PollerLikeWithCancellation,\n} from \"./certificatesModels.js\";\nimport {\n WellKnownIssuerNames,\n DefaultCertificatePolicy,\n LATEST_API_VERSION,\n KnownCertificateKeyCurveNames,\n KnownCertificateKeyTypes,\n KnownKeyUsageTypes,\n} from \"./certificatesModels.js\";\n\nimport type {\n CertificateIssuerSetParameters,\n CertificateIssuerUpdateParameters,\n BackupCertificateResult,\n IssuerParameters,\n IssuerCredentials,\n IssuerAttributes,\n X509CertificateProperties,\n SubjectAlternativeNames as CoreSubjectAlternativeNames,\n DeletionRecoveryLevel,\n JsonWebKeyType as CertificateKeyType,\n JsonWebKeyCurveName as CertificateKeyCurveName,\n KeyUsageType,\n PlatformManaged,\n} from \"./models/models.js\";\nimport { KnownDeletionRecoveryLevel as KnownDeletionRecoveryLevels } from \"./models/models.js\";\nimport type { KeyVaultClientOptionalParams } from \"./keyVaultClient.js\";\nimport { KeyVaultClient } from \"./keyVaultClient.js\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { keyVaultAuthenticationPolicy } from \"@azure/keyvault-common\";\nimport { CreateCertificatePoller } from \"./lro/create/poller.js\";\nimport { CertificateOperationPoller } from \"./lro/operation/poller.js\";\nimport { DeleteCertificatePoller } from \"./lro/delete/poller.js\";\nimport { RecoverDeletedCertificatePoller } from \"./lro/recover/poller.js\";\nimport type { CertificateOperationState } from \"./lro/operation/operation.js\";\nimport type { DeleteCertificateState } from \"./lro/delete/operation.js\";\nimport type { CreateCertificateState } from \"./lro/create/operation.js\";\nimport type { RecoverDeletedCertificateState } from \"./lro/recover/operation.js\";\nimport { parseCertificateBytes } from \"./utils.js\";\nimport type { KeyVaultCertificateIdentifier } from \"./identifier.js\";\nimport { parseKeyVaultCertificateIdentifier } from \"./identifier.js\";\nimport {\n coreContactsToCertificateContacts,\n getCertificateFromCertificateBundle,\n getCertificateOperationFromCoreOperation,\n getCertificateWithPolicyFromCertificateBundle,\n getDeletedCertificateFromDeletedCertificateBundle,\n getDeletedCertificateFromItem,\n getPropertiesFromCertificateBundle,\n mapPagedAsyncIterable,\n toCoreAttributes,\n toCorePolicy,\n toPublicIssuer,\n toPublicPolicy,\n} from \"./transformations.js\";\nimport type { KeyVaultCertificatePollOperationState } from \"./lro/keyVaultCertificatePoller.js\";\nimport { tracingClient } from \"./tracing.js\";\nimport { bearerTokenAuthenticationPolicyName } from \"@azure/core-rest-pipeline\";\nimport { SDK_VERSION } from \"./constants.js\";\n\nexport {\n type CertificateClientOptions,\n type AdministratorContact,\n type ArrayOneOrMore,\n type BackupCertificateResult,\n type BeginCreateCertificateOptions,\n type BeginDeleteCertificateOptions,\n type BeginRecoverDeletedCertificateOptions,\n type KeyVaultCertificate,\n type KeyVaultCertificateWithPolicy,\n type BackupCertificateOptions,\n type CertificateContentType,\n type CertificateProperties,\n type CertificateIssuer,\n type CertificateOperation,\n type CertificateOperationError,\n type CertificatePolicy,\n type ImportCertificatePolicy,\n type ActionType,\n type CertificatePolicyAction,\n type CertificatePolicyProperties,\n type PolicySubjectProperties,\n type CertificateTags,\n type CreateCertificateOptions,\n type CertificatePollerOptions,\n type KeyVaultCertificateIdentifier,\n parseKeyVaultCertificateIdentifier,\n type PollerLike,\n type PollerLikeWithCancellation,\n type CreateCertificateState,\n type DeleteCertificateState,\n type RecoverDeletedCertificateState,\n type CertificateOperationState,\n type CoreSubjectAlternativeNames,\n type RequireAtLeastOne,\n type CertificateContactAll,\n type CertificateContact,\n type DeleteCertificateOperationOptions,\n type DeleteContactsOptions,\n type DeleteIssuerOptions,\n type DeletedCertificate,\n type DeletionRecoveryLevel,\n DefaultCertificatePolicy,\n type ErrorModel,\n type GetContactsOptions,\n type GetIssuerOptions,\n type GetCertificateOperationOptions,\n type GetPlainCertificateOperationOptions,\n type GetCertificateOptions,\n type GetCertificatePolicyOptions,\n type GetCertificateVersionOptions,\n type GetDeletedCertificateOptions,\n type ImportCertificateOptions,\n type IssuerAttributes,\n type IssuerCredentials,\n type IssuerParameters,\n type IssuerProperties,\n type CertificateKeyType,\n type CertificateKeyCurveName,\n type KeyUsageType,\n type LifetimeAction,\n type PlatformManaged,\n type ListPropertiesOfCertificatesOptions,\n type ListPropertiesOfCertificateVersionsOptions,\n type ListPropertiesOfIssuersOptions,\n type ListDeletedCertificatesOptions,\n type MergeCertificateOptions,\n type PurgeDeletedCertificateOptions,\n type RestoreCertificateBackupOptions,\n type SetContactsOptions,\n type SubjectAlternativeNamesAll,\n type CreateIssuerOptions,\n type SubjectAlternativeNames,\n type UpdateIssuerOptions,\n type UpdateCertificatePropertiesOptions as UpdateCertificateOptions,\n type UpdateCertificatePolicyOptions,\n WellKnownIssuerNames as WellKnownIssuer,\n type X509CertificateProperties,\n logger,\n type CancelCertificateOperationOptions,\n type KeyVaultCertificatePollOperationState,\n KnownCertificateKeyCurveNames,\n KnownDeletionRecoveryLevels,\n KnownCertificateKeyTypes,\n KnownKeyUsageTypes,\n};\n\n/**\n * Deprecated KeyVault copy of core-lro's PollerLike.\n */\nexport type KVPollerLike<TState extends PollOperationState<TResult>, TResult> = PollerLike<\n TState,\n TResult\n>;\n\n/**\n * The client to interact with the KeyVault certificates functionality\n */\nexport class CertificateClient {\n /**\n * The base URL to the vault\n */\n public readonly vaultUrl: string;\n\n private readonly client: KeyVaultClient;\n\n /**\n * Creates an instance of CertificateClient.\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 clientOptions - 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 clientOptions: CertificateClientOptions = {},\n ) {\n this.vaultUrl = vaultUrl;\n\n const internalClientPipelineOptions: KeyVaultClientOptionalParams = {\n ...clientOptions,\n apiVersion: clientOptions.serviceVersion || LATEST_API_VERSION,\n userAgentOptions: {\n userAgentPrefix: `${clientOptions.userAgentOptions?.userAgentPrefix} azsdk-js-keyvault-certificates/${SDK_VERSION}`,\n },\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, internalClientPipelineOptions);\n\n this.client.pipeline.removePolicy({ name: bearerTokenAuthenticationPolicyName });\n this.client.pipeline.addPolicy(keyVaultAuthenticationPolicy(credential, clientOptions));\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 * Iterates the latest version of all certificates in the vault. The full certificate identifier and attributes are provided\n * in the response. No values are returned for the certificates. This operations requires the certificates/list permission.\n *\n * Example usage:\n * ```ts snippet:IndexListCertificates\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * // All in one call\n * for await (const certificateProperties of client.listPropertiesOfCertificates()) {\n * console.log(certificateProperties);\n * }\n *\n * // By pages\n * for await (const page of client.listPropertiesOfCertificates().byPage()) {\n * for (const certificateProperties of page) {\n * console.log(certificateProperties);\n * }\n * }\n * ```\n * List all versions of the specified certificate.\n * @param options - The optional parameters\n */\n public listPropertiesOfCertificates(\n options: ListPropertiesOfCertificatesOptions = {},\n ): PagedAsyncIterableIterator<CertificateProperties> {\n return mapPagedAsyncIterable(\n this.client.getCertificates(options),\n getPropertiesFromCertificateBundle,\n );\n }\n\n /**\n * Returns the versions of a certificate in the specified key\n * vault. This operation requires the certificates/list permission.\n *\n * Example usage:\n * ```ts snippet:IndexListCertificateVersions\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * for await (const certificateProperties of client.listPropertiesOfCertificateVersions(\n * \"MyCertificate\",\n * )) {\n * console.log(certificateProperties.version!);\n * }\n * ```\n * List the versions of a certificate.\n * @param certificateName - The name of the certificate.\n * @param options - The optional parameters\n */\n public listPropertiesOfCertificateVersions(\n certificateName: string,\n options: ListPropertiesOfCertificateVersionsOptions = {},\n ): PagedAsyncIterableIterator<CertificateProperties> {\n return mapPagedAsyncIterable(\n this.client.getCertificateVersions(certificateName, options),\n getPropertiesFromCertificateBundle,\n );\n }\n\n /**\n * The DELETE operation applies to any certificate stored in Azure Key Vault. DELETE cannot be applied\n * to an individual version of a certificate.\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the certificate is fully recovered.\n *\n * This operation requires the certificates/delete permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleDeleteCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * const certificateName = \"MyCertificate\";\n *\n * const poller = await client.beginDeleteCertificate(certificateName);\n *\n * // You can use the deleted certificate immediately:\n * const deletedCertificate = poller.getResult();\n *\n * // The certificate is being deleted. Only wait for it if you want to restore it or purge it.\n * await poller.pollUntilDone();\n *\n * // You can also get the deleted certificate this way:\n * await client.getDeletedCertificate(certificateName);\n *\n * // Deleted certificates can also be recovered or purged.\n *\n * // recoverDeletedCertificate returns a poller, just like beginDeleteCertificate.\n * // const recoverPoller = await client.beginRecoverDeletedCertificate(certificateName);\n * // await recoverPoller.pollUntilDone();\n *\n * // If a certificate is done and the Key Vault has soft-delete enabled, the certificate can be purged with:\n * await client.purgeDeletedCertificate(certificateName);\n * ```\n * Deletes a certificate from a specified key vault.\n * @param certificateName - The name of the certificate.\n * @param options - The optional parameters\n */\n public async beginDeleteCertificate(\n certificateName: string,\n options: BeginDeleteCertificateOptions = {},\n ): Promise<PollerLike<DeleteCertificateState, DeletedCertificate>> {\n const poller = new DeleteCertificatePoller({\n certificateName,\n client: this.client,\n vaultUrl: this.vaultUrl,\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 * Deletes all of the certificate contacts. This operation requires the certificates/managecontacts permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientDeleteContacts\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.deleteContacts();\n * ```\n * Deletes all of the certificate contacts\n * @param options - The optional parameters\n */\n public deleteContacts(\n options: DeleteContactsOptions = {},\n ): Promise<CertificateContact[] | undefined> {\n let parsedBody: any;\n return tracingClient.withSpan(\n \"CertificateClient.deleteContacts\",\n options,\n async (updatedOptions) => {\n await this.client.deleteCertificateContacts({\n ...updatedOptions,\n onResponse: (response) => {\n parsedBody = response.parsedBody;\n },\n });\n return coreContactsToCertificateContacts(parsedBody);\n },\n );\n }\n\n /**\n * Sets the certificate contacts for the key vault. This operation requires the certificates/managecontacts permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientSetContacts\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.setContacts([\n * {\n * email: \"b@b.com\",\n * name: \"b\",\n * phone: \"222222222222\",\n * },\n * ]);\n * ```\n * Sets the certificate contacts.\n * @param contacts - The contacts to use\n * @param options - The optional parameters\n */\n public setContacts(\n contacts: CertificateContact[],\n options: SetContactsOptions = {},\n ): Promise<CertificateContact[] | undefined> {\n const coreContacts = contacts.map((x) => ({\n emailAddress: x ? x.email : undefined,\n name: x ? x.name : undefined,\n phone: x ? x.phone : undefined,\n }));\n\n return tracingClient.withSpan(\n \"CertificateClient.setContacts\",\n options,\n async (updatedOptions) => {\n const response = await this.client.setCertificateContacts(\n { contactList: coreContacts },\n updatedOptions,\n );\n return coreContactsToCertificateContacts(response);\n },\n );\n }\n\n /**\n * Returns the set of certificate contact resources in the specified key vault. This operation requires the certificates/managecontacts permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetContacts\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * const contacts = await client.getContacts();\n * for (const contact of contacts) {\n * console.log(contact);\n * }\n * ```\n * Sets the certificate contacts.\n * @param options - The optional parameters\n */\n public getContacts(options: GetContactsOptions = {}): Promise<CertificateContact[] | undefined> {\n return tracingClient.withSpan(\n \"CertificateClient.getContacts\",\n options,\n async (updatedOptions) => {\n const result = await this.client.getCertificateContacts(updatedOptions);\n return coreContactsToCertificateContacts(result);\n },\n );\n }\n /**\n * Returns the set of certificate issuer resources in the specified key vault. This operation requires the certificates/manageissuers/getissuers permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientListIssuers\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.createIssuer(\"IssuerName\", \"Test\");\n *\n * // All in one call\n * for await (const issuerProperties of client.listPropertiesOfIssuers()) {\n * console.log(issuerProperties);\n * }\n *\n * // By pages\n * for await (const page of client.listPropertiesOfIssuers().byPage()) {\n * for (const issuerProperties of page) {\n * console.log(issuerProperties);\n * }\n * }\n * ```\n * List the certificate issuers.\n * @param options - The optional parameters\n */\n public listPropertiesOfIssuers(\n options: ListPropertiesOfIssuersOptions = {},\n ): PagedAsyncIterableIterator<IssuerProperties> {\n return this.client.getCertificateIssuers(options);\n }\n\n /**\n * The createIssuer operation adds or updates the specified certificate issuer. This\n * operation requires the certificates/setissuers permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientCreateIssuer\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.createIssuer(\"IssuerName\", \"Test\");\n * ```\n * Sets the specified certificate issuer.\n * @param issuerName - The name of the issuer.\n * @param provider - The issuer provider.\n * @param options - The optional parameters\n */\n public createIssuer(\n issuerName: string,\n provider: string,\n options: CreateIssuerOptions = {},\n ): Promise<CertificateIssuer> {\n return tracingClient.withSpan(\n \"CertificateClient.createIssuer\",\n options,\n async (updatedOptions) => {\n const { accountId, password } = updatedOptions;\n\n const parameters: CertificateIssuerSetParameters = {\n credentials: {\n accountId,\n password,\n },\n provider,\n };\n\n if (\n updatedOptions.organizationId ||\n (updatedOptions.administratorContacts && updatedOptions.administratorContacts.length)\n ) {\n parameters.organizationDetails = {\n id: updatedOptions.organizationId,\n adminDetails: updatedOptions.administratorContacts\n ? updatedOptions.administratorContacts.map((x) => ({\n emailAddress: x.email,\n phone: x.phone,\n firstName: x.firstName,\n lastName: x.lastName,\n }))\n : undefined,\n };\n }\n\n if (updatedOptions.enabled !== undefined) {\n parameters.attributes = {\n enabled: updatedOptions.enabled,\n };\n }\n\n const response = await this.client.setCertificateIssuer(\n issuerName,\n parameters,\n updatedOptions,\n );\n return toPublicIssuer(response);\n },\n );\n }\n\n /**\n * The updateIssuer operation performs an update on the specified certificate issuer\n * entity. This operation requires the certificates/setissuers permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientUpdateIssuer\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.updateIssuer(\"IssuerName\", {\n * provider: \"Provider2\",\n * });\n * ```\n * Updates the specified certificate issuer.\n * @param issuerName - The name of the issuer.\n * @param options - The optional parameters\n */\n public async updateIssuer(\n issuerName: string,\n options: UpdateIssuerOptions = {},\n ): Promise<CertificateIssuer> {\n return tracingClient.withSpan(\n \"CertificateClient.updateIssuer\",\n options,\n async (updatedOptions) => {\n const { accountId, password } = options;\n\n const parameters: CertificateIssuerUpdateParameters = {\n credentials: {\n accountId,\n password,\n },\n };\n\n if (updatedOptions.provider) {\n parameters.provider = updatedOptions.provider;\n }\n\n if (\n updatedOptions.organizationId ||\n (updatedOptions.administratorContacts && updatedOptions.administratorContacts.length)\n ) {\n parameters.organizationDetails = {\n id: updatedOptions.organizationId,\n adminDetails: updatedOptions.administratorContacts\n ? updatedOptions.administratorContacts.map((x) => ({\n emailAddress: x.email,\n phone: x.phone,\n firstName: x.firstName,\n lastName: x.lastName,\n }))\n : undefined,\n };\n }\n\n if (updatedOptions.enabled) {\n parameters.attributes = {\n enabled: updatedOptions.enabled,\n };\n }\n\n const response = await this.client.updateCertificateIssuer(\n issuerName,\n parameters,\n updatedOptions,\n );\n return toPublicIssuer(response);\n },\n );\n }\n\n /**\n * The getIssuer operation returns the specified certificate issuer resources in the\n * specified key vault. This operation requires the certificates/manageissuers/getissuers\n * permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetIssuer\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * const certificateIssuer = await client.getIssuer(\"IssuerName\");\n * console.log(certificateIssuer);\n * ```\n * Gets he specified certificate issuer.\n * @param issuerName - The name of the issuer.\n * @param options - The optional parameters\n */\n public getIssuer(issuerName: string, options: GetIssuerOptions = {}): Promise<CertificateIssuer> {\n return tracingClient.withSpan(\n \"CertificateClient.getIssuer\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getCertificateIssuer(issuerName, {\n ...updatedOptions,\n });\n return toPublicIssuer(response);\n },\n );\n }\n\n /**\n * The deleteIssuer operation permanently removes the specified certificate issuer from\n * the vault. This operation requires the certificates/manageissuers/deleteissuers permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientDeleteIssuer\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * await client.deleteIssuer(\"IssuerName\");\n * ```\n * Deletes the specified certificate issuer.\n * @param issuerName - The name of the issuer.\n * @param options - The optional parameters\n */\n public deleteIssuer(\n issuerName: string,\n options: DeleteIssuerOptions = {},\n ): Promise<CertificateIssuer> {\n return tracingClient.withSpan(\n \"CertificateClient.deleteIssuer\",\n options,\n async (updatedOptions) => {\n const response = await this.client.deleteCertificateIssuer(issuerName, updatedOptions);\n return toPublicIssuer(response);\n },\n );\n }\n\n /**\n * Creates a new certificate. If this is the first version, the certificate resource is created.\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the certificate is fully recovered.\n *\n * **Note:** Sending `Self` as the `issuerName` of the certificate's policy will create a self-signed certificate.\n *\n * This operation requires the certificates/create permission.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleCreateCertificatePoller\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const certificateName = \"MyCertificateName\";\n * const certificatePolicy = {\n * issuerName: \"Self\",\n * subject: \"cn=MyCert\",\n * };\n *\n * const poller = await client.beginCreateCertificate(certificateName, certificatePolicy);\n *\n * // You can use the pending certificate immediately:\n * const pendingCertificate = poller.getResult();\n *\n * // Or you can wait until the certificate finishes being signed:\n * const keyVaultCertificate = await poller.pollUntilDone();\n * console.log(keyVaultCertificate);\n * ```\n * Creates a certificate\n * @param certificateName - The name of the certificate\n * @param certificatePolicy - The certificate's policy\n * @param options - Optional parameters\n */\n public async beginCreateCertificate(\n certificateName: string,\n policy: CertificatePolicy,\n options: BeginCreateCertificateOptions = {},\n ): Promise<PollerLikeWithCancellation<CreateCertificateState, KeyVaultCertificateWithPolicy>> {\n const poller = new CreateCertificatePoller({\n vaultUrl: this.vaultUrl,\n client: this.client,\n certificateName,\n certificatePolicy: policy,\n createCertificateOptions: options,\n operationOptions: options,\n intervalInMs: options.intervalInMs,\n resumeFrom: options.resumeFrom,\n });\n // This will initialize the poller's operation (the creation of the secret).\n await poller.poll();\n return poller;\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 * Example usage:\n * ```ts snippet:CertificateClientGetCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n *\n * const credential = new DefaultAzureCredential();\n *\n * const vaultName = \"<YOUR KEYVAULT NAME>\";\n * const keyVaultUrl = `https://${vaultName}.vault.azure.net`;\n *\n * const client = new CertificateClient(keyVaultUrl, credential);\n *\n * const certificateName = \"MyCertificate\";\n *\n * const result = await client.getCertificate(certificateName);\n * console.log(result.name);\n * ```\n * Retrieves a certificate from the certificate's name (includes the certificate policy)\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public getCertificate(\n certificateName: string,\n options: GetCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateClient.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 information about a specific certificate on a specific version. It won't return the certificate's policy. This operation requires the certificates/get permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetCertificateVersion\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const certificateName = \"MyCertificateName\";\n *\n * const latestCertificate = await client.getCertificate(certificateName);\n * console.log(`Latest version of the certificate ${certificateName}: `, latestCertificate);\n * const specificCertificate = await client.getCertificateVersion(\n * certificateName,\n * latestCertificate.properties.version,\n * );\n * console.log(\n * `The certificate ${certificateName} at the version ${latestCertificate.properties.version}: `,\n * specificCertificate,\n * );\n * ```\n * Retrieves a certificate from the certificate's name and a specified version\n * @param certificateName - The name of the certificate\n * @param version - The specific version of the certificate\n * @param options - The optional parameters\n */\n public getCertificateVersion(\n certificateName: string,\n version: string,\n options: GetCertificateVersionOptions = {},\n ): Promise<KeyVaultCertificate> {\n return tracingClient.withSpan(\n \"CertificateClient.getCertificateVersion\",\n options,\n async (updatedOptions) => {\n if (!version) {\n throw new Error(\"The 'version' cannot be empty.\");\n }\n const result = await this.client.getCertificate(certificateName, version, updatedOptions);\n return getCertificateFromCertificateBundle(result);\n },\n );\n }\n\n /**\n * Imports an existing valid certificate, containing a private key, into Azure Key Vault. The certificate to be imported can be in either PFX or PEM format.\n * If the certificate is in PEM format the PEM file must contain the key as well as x509 certificates. This operation requires the certificates/import permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientImportCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n * import { SecretClient } from \"@azure/keyvault-secrets\";\n * import { isNodeLike } from \"@azure/core-util\";\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 CertificateClient(url, credential);\n * const secretClient = new SecretClient(url, credential);\n *\n * const certificateSecret = await secretClient.getSecret(\"MyCertificate\");\n * const base64EncodedCertificate = certificateSecret.value!;\n *\n * const buffer = isNodeLike\n * ? Buffer.from(base64EncodedCertificate, \"base64\")\n * : Uint8Array.from(atob(base64EncodedCertificate), (c) => c.charCodeAt(0));\n * await client.importCertificate(\"MyCertificate\", buffer);\n * ```\n * Imports a certificate from a certificate's secret value\n * @param certificateName - The name of the certificate\n * @param certificateBytes - The PFX or ASCII PEM formatted value of the certificate containing both the X.509 certificates and the private key\n * @param options - The optional parameters\n */\n public importCertificate(\n certificateName: string,\n certificateBytes: Uint8Array,\n options: ImportCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateClient.importCertificate\",\n options,\n async (updatedOptions) => {\n const base64EncodedCertificate = parseCertificateBytes(\n certificateBytes,\n updatedOptions.policy?.contentType,\n );\n const result = await this.client.importCertificate(\n certificateName,\n {\n base64EncodedCertificate,\n preserveCertOrder: updatedOptions.preserveCertificateOrder,\n ...updatedOptions,\n },\n updatedOptions,\n );\n return getCertificateWithPolicyFromCertificateBundle(result);\n },\n );\n }\n\n /**\n * The getCertificatePolicy operation returns the specified certificate policy resources in the specified key vault. This operation requires the certificates/get permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetCertificatePolicy\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const policy = await client.getCertificatePolicy(\"MyCertificate\");\n * console.log(policy);\n * ```\n * Gets a certificate's policy\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public getCertificatePolicy(\n certificateName: string,\n options: GetCertificatePolicyOptions = {},\n ): Promise<CertificatePolicy> {\n return tracingClient.withSpan(\n \"CertificateClient.getCertificatePolicy\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getCertificatePolicy(certificateName, updatedOptions);\n return toPublicPolicy(response);\n },\n );\n }\n\n /**\n * Updates the certificate policy for the specified certificate. This operation requires the certificates/update permission.\n * Gets a certificate's policy\n * @param certificateName - The name of the certificate\n * @param policy - The certificate policy\n * @param options - The optional parameters\n */\n public updateCertificatePolicy(\n certificateName: string,\n policy: CertificatePolicy,\n options: UpdateCertificatePolicyOptions = {},\n ): Promise<CertificatePolicy> {\n let parsedBody: any;\n return tracingClient.withSpan(\n \"CertificateClient.updateCertificatePolicy\",\n options,\n async (updatedOptions) => {\n const corePolicy = toCorePolicy(undefined, policy);\n await this.client.updateCertificatePolicy(certificateName, corePolicy, updatedOptions);\n return toPublicPolicy(parsedBody);\n },\n );\n }\n\n /**\n * Applies the specified update on the given certificate; the only elements updated are the\n * certificate's attributes. This operation requires the certificates/update permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientUpdateCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * // You may pass an empty string for version which will update\n * // the latest version of the certificate\n * await client.updateCertificateProperties(\"MyCertificate\", \"\", {\n * tags: {\n * customTag: \"value\",\n * },\n * });\n * ```\n * Updates a certificate\n * @param certificateName - The name of the certificate\n * @param version - The version of the certificate to update (an empty string will update the latest version)\n * @param options - The options, including what to update\n */\n public updateCertificateProperties(\n certificateName: string,\n version: string,\n options: UpdateCertificatePropertiesOptions = {},\n ): Promise<KeyVaultCertificate> {\n return tracingClient.withSpan(\n \"CertificateClient.updateCertificateProperties\",\n options,\n async (updatedOptions) => {\n const response = await this.client.updateCertificate(\n certificateName,\n version,\n {\n certificateAttributes: toCoreAttributes(options),\n tags: options.tags,\n },\n updatedOptions,\n );\n return getCertificateFromCertificateBundle(response);\n },\n );\n }\n\n /**\n * Gets the creation operation associated with a specified certificate. This operation requires the certificates/get permission.\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the certificate is fully recovered.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetCertificateOperation\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const createPoller = await client.beginCreateCertificate(\"MyCertificate\", {\n * issuerName: \"Self\",\n * subject: \"cn=MyCert\",\n * });\n *\n * const poller = await client.getCertificateOperation(\"MyCertificate\");\n * const pendingCertificate = poller.getResult();\n *\n * const certificateOperation = poller.getOperationState().certificateOperation;\n * console.log(certificateOperation);\n * ```\n * Gets a certificate's poller operation\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public async getCertificateOperation(\n certificateName: string,\n options: GetCertificateOperationOptions = {},\n ): Promise<PollerLikeWithCancellation<CertificateOperationState, KeyVaultCertificateWithPolicy>> {\n const poller = new CertificateOperationPoller({\n certificateName,\n client: this.client,\n vaultUrl: this.vaultUrl,\n intervalInMs: options.intervalInMs,\n resumeFrom: options.resumeFrom,\n operationOptions: options,\n });\n // This will initialize the poller's operation, which pre-populates some necessary properties.\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the creation operation for a specified certificate that is in the process of being created.\n * The certificate is no longer created. This operation requires the certificates/update permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientDeleteCertificateOperation\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * await client.beginCreateCertificate(\"MyCertificate\", {\n * issuerName: \"Self\",\n * subject: \"cn=MyCert\",\n * });\n * await client.deleteCertificateOperation(\"MyCertificate\");\n *\n * await client.getCertificateOperation(\"MyCertificate\");\n * ```\n * Delete a certificate's operation\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public deleteCertificateOperation(\n certificateName: string,\n options: DeleteCertificateOperationOptions = {},\n ): Promise<CertificateOperation> {\n return tracingClient.withSpan(\n \"CertificateClient.deleteCertificateOperation\",\n options,\n async (updatedOptions) => {\n const operation = await this.client.deleteCertificateOperation(\n certificateName,\n updatedOptions,\n );\n return getCertificateOperationFromCoreOperation(certificateName, operation);\n },\n );\n }\n\n /**\n * Performs the merging of a certificate or certificate chain with a key pair currently available in the service. This operation requires the certificates/create permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientMergeCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\n * import { writeFileSync, readFileSync } from \"node:fs\";\n * import { execSync } from \"node:child_process\";\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 CertificateClient(url, credential);\n *\n * await client.beginCreateCertificate(\"MyCertificate\", {\n * issuerName: \"Unknown\",\n * subject: \"cn=MyCert\",\n * });\n * const poller = await client.getCertificateOperation(\"MyCertificate\");\n * const { csr } = poller.getOperationState().certificateOperation!;\n * const base64Csr = Buffer.from(csr!).toString(\"base64\");\n * const wrappedCsr = [\n * \"-----BEGIN CERTIFICATE REQUEST-----\",\n * base64Csr,\n * \"-----END CERTIFICATE REQUEST-----\",\n * ].join(\"\\n\");\n *\n * writeFileSync(\"test.csr\", wrappedCsr);\n *\n * // Certificate available locally made using:\n * // openssl genrsa -out ca.key 2048\n * // openssl req -new -x509 -key ca.key -out ca.crt\n * // You can read more about how to create a fake certificate authority here: https://gist.github.com/Soarez/9688998\n *\n * execSync(\"openssl x509 -req -in test.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out test.crt\");\n * const base64Crt = readFileSync(\"test.crt\").toString().split(\"\\n\").slice(1, -1).join(\"\");\n *\n * await client.mergeCertificate(\"MyCertificate\", [Buffer.from(base64Crt)]);\n * ```\n * Merges a signed certificate request into a pending certificate\n * @param certificateName - The name of the certificate\n * @param x509Certificates - The certificate(s) to merge\n * @param options - The optional parameters\n */\n public mergeCertificate(\n certificateName: string,\n x509Certificates: Uint8Array[],\n options: MergeCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateClient.mergeCertificate\",\n options,\n async (updatedOptions) => {\n const response = await this.client.mergeCertificate(\n certificateName,\n { x509Certificates },\n\n updatedOptions,\n );\n return getCertificateWithPolicyFromCertificateBundle(response);\n },\n );\n }\n\n /**\n * Requests that a backup of the specified certificate be downloaded to the client. All versions of the certificate will be downloaded.\n * This operation requires the certificates/backup permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientBackupCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * await client.beginCreateCertificate(\"MyCertificate\", {\n * issuerName: \"Self\",\n * subject: \"cn=MyCert\",\n * });\n * const backup = await client.backupCertificate(\"MyCertificate\");\n * ```\n * Generates a backup of a certificate\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public backupCertificate(\n certificateName: string,\n options: BackupCertificateOptions = {},\n ): Promise<Uint8Array | undefined> {\n return tracingClient.withSpan(\n \"CertificateClient.backupCertificate\",\n options,\n async (updatedOptions) => {\n const response = await this.client.backupCertificate(certificateName, updatedOptions);\n return response.value;\n },\n );\n }\n\n /**\n * Restores a backed up certificate, and all its versions, to a vault. This operation requires the certificates/restore permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientRestoreCertificateBackup\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * await client.beginCreateCertificate(\"MyCertificate\", {\n * issuerName: \"Self\",\n * subject: \"cn=MyCert\",\n * });\n * const backup = await client.backupCertificate(\"MyCertificate\");\n *\n * const poller = await client.beginDeleteCertificate(\"MyCertificate\");\n * await poller.pollUntilDone();\n *\n * // Some time is required before we're able to restore the certificate\n * await client.restoreCertificateBackup(backup!);\n * ```\n * Restores a certificate from a backup\n * @param backup - The back-up certificate to restore from\n * @param options - The optional parameters\n */\n public restoreCertificateBackup(\n backup: Uint8Array,\n options: RestoreCertificateBackupOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateClient.restoreCertificateBackup\",\n options,\n async (updatedOptions) => {\n const response = await this.client.restoreCertificate(\n { certificateBundleBackup: backup },\n updatedOptions,\n );\n return getCertificateWithPolicyFromCertificateBundle(response);\n },\n );\n }\n\n /**\n * Retrieves the certificates in the current vault which are in a deleted state and ready for recovery or purging. This operation includes deletion-specific\n * information. This operation requires the certificates/get/list permission. This operation can only be enabled on soft-delete enabled vaults.\n *\n * Example usage:\n * ```ts snippet:CertificateClientListDeletedCertificates\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * for await (const deletedCertificate of client.listDeletedCertificates()) {\n * console.log(deletedCertificate);\n * }\n *\n * for await (const page of client.listDeletedCertificates().byPage()) {\n * for (const deletedCertificate of page) {\n * console.log(deletedCertificate);\n * }\n * }\n * ```\n * Lists deleted certificates\n * @param options - The optional parameters\n */\n public listDeletedCertificates(\n options: ListDeletedCertificatesOptions = {},\n ): PagedAsyncIterableIterator<DeletedCertificate> {\n return mapPagedAsyncIterable(\n this.client.getDeletedCertificates(options),\n getDeletedCertificateFromItem,\n );\n }\n\n /**\n * retrieves the deleted certificate information plus its attributes, such as retention interval, scheduled permanent deletion and the\n * current deletion recovery level. This operation requires the certificates/get permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientGetDeletedCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const deletedCertificate = await client.getDeletedCertificate(\"MyDeletedCertificate\");\n * console.log(\"Deleted certificate:\", deletedCertificate);\n * ```\n * Gets a deleted certificate\n * @param certificateName - The name of the certificate\n * @param options - The optional parameters\n */\n public getDeletedCertificate(\n certificateName: string,\n options: GetDeletedCertificateOptions = {},\n ): Promise<DeletedCertificate> {\n return tracingClient.withSpan(\n \"CertificateClient.getDeletedCertificate\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getDeletedCertificate(certificateName, updatedOptions);\n return getDeletedCertificateFromDeletedCertificateBundle(response);\n },\n );\n }\n\n /**\n * Performs an irreversible deletion of the specified certificate, without possibility for recovery. The operation is not available if the\n * recovery level does not specify 'Purgeable'. This operation requires the certificate/purge permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientPurgeDeletedCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const deletePoller = await client.beginDeleteCertificate(\"MyCertificate\");\n * await deletePoller.pollUntilDone();\n *\n * // Deleting a certificate takes time, make sure to wait before purging it\n * client.purgeDeletedCertificate(\"MyCertificate\");\n * ```\n * Gets a deleted certificate\n * @param certificateName - The name of the deleted certificate to purge\n * @param options - The optional parameters\n */\n public async purgeDeletedCertificate(\n certificateName: string,\n options: PurgeDeletedCertificateOptions = {},\n ): Promise<null> {\n return tracingClient.withSpan(\n \"CertificateClient.purgeDeletedCertificate\",\n options,\n async (updatedOptions) => {\n await this.client.purgeDeletedCertificate(certificateName, updatedOptions);\n return null;\n },\n );\n }\n\n /**\n * Recovers the deleted certificate in the specified vault. This operation can only be performed on a soft-delete enabled vault. This operation\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the certificate is fully recovered.\n *\n * This operation requires the certificates/recover permission.\n *\n * Example usage:\n * ```ts snippet:CertificateClientRecoverDeletedCertificate\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { CertificateClient } from \"@azure/keyvault-certificates\";\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 CertificateClient(url, credential);\n *\n * const deletePoller = await client.beginDeleteCertificate(\"MyCertificate\");\n * await deletePoller.pollUntilDone();\n *\n * const recoverPoller = await client.beginRecoverDeletedCertificate(\"MyCertificate\");\n *\n * // Waiting until it's done\n * const certificate = await recoverPoller.pollUntilDone();\n * console.log(certificate);\n * ```\n * Recovers a deleted certificate\n * @param certificateName - The name of the deleted certificate\n * @param options - The optional parameters\n */\n public async beginRecoverDeletedCertificate(\n certificateName: string,\n options: BeginRecoverDeletedCertificateOptions = {},\n ): Promise<PollerLike<RecoverDeletedCertificateState, KeyVaultCertificateWithPolicy>> {\n const poller = new RecoverDeletedCertificatePoller({\n certificateName,\n client: this.client,\n vaultUrl: this.vaultUrl,\n ...options,\n operationOptions: options,\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mDAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,oBAAuB;AAgEvB,gCAOO;AAiBP,oBAA0E;AAE1E,4BAA+B;AAE/B,6BAA6C;AAC7C,oBAAwC;AACxC,IAAAC,iBAA2C;AAC3C,IAAAA,iBAAwC;AACxC,IAAAA,iBAAgD;AAKhD,mBAAsC;AAEtC,wBAAmD;AACnD,6BAaO;AAEP,qBAA8B;AAC9B,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AAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAyBO,sBACL,iBACA,UAAwC,CAAC,GACZ;AAC7B,WAAO,6BAAc;AAAA,MACnB;AAAA,MACA;AAAA,MACA,OAAO,mBAAmB;AACxB,cAAM,WAAW,MAAM,KAAK,OAAO,sBAAsB,iBAAiB,cAAc;AACxF,mBAAO,0EAAkD,QAAQ;AAAA,MACnE;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4BA,MAAa,wBACX,iBACA,UAA0C,CAAC,GAC5B;AACf,WAAO,6BAAc;AAAA,MACnB;AAAA,MACA;AAAA,MACA,OAAO,mBAAmB;AACxB,cAAM,KAAK,OAAO,wBAAwB,iBAAiB,cAAc;AACzE,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiCA,MAAa,+BACX,iBACA,UAAiD,CAAC,GACkC;AACpF,UAAM,SAAS,IAAI,+CAAgC;AAAA,MACjD;AAAA,MACA,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,GAAG;AAAA,MACH,kBAAkB;AAAA,IACpB,CAAC;AAED,UAAM,OAAO,KAAK;AAClB,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": ["KnownDeletionRecoveryLevels", "import_poller"]
|
|
7
7
|
}
|
|
@@ -137,6 +137,8 @@ export interface CertificatePolicy {
|
|
|
137
137
|
issuerParameters?: IssuerParameters;
|
|
138
138
|
/** The certificate attributes. */
|
|
139
139
|
attributes?: CertificateAttributes;
|
|
140
|
+
/** Configuration that enables the platform to manage the certificate on behalf of the user. This feature is currently intended for internal use only. */
|
|
141
|
+
platformManaged?: PlatformManaged;
|
|
140
142
|
}
|
|
141
143
|
export declare function certificatePolicySerializer(item: CertificatePolicy): any;
|
|
142
144
|
export declare function certificatePolicyDeserializer(item: any): CertificatePolicy;
|
|
@@ -319,6 +321,15 @@ export interface IssuerParameters {
|
|
|
319
321
|
}
|
|
320
322
|
export declare function issuerParametersSerializer(item: IssuerParameters): any;
|
|
321
323
|
export declare function issuerParametersDeserializer(item: any): IssuerParameters;
|
|
324
|
+
/** Properties of the platform managed certificate. This feature is currently intended for internal use only. */
|
|
325
|
+
export interface PlatformManaged {
|
|
326
|
+
/** The intended usage of the certificate. */
|
|
327
|
+
certificateUsage: string;
|
|
328
|
+
/** JSON-formatted platform managed metadata. The schema is intentionally undefined as this feature is currently intended for internal use only. */
|
|
329
|
+
metadata?: Record<string, any>;
|
|
330
|
+
}
|
|
331
|
+
export declare function platformManagedSerializer(item: PlatformManaged): any;
|
|
332
|
+
export declare function platformManagedDeserializer(item: any): PlatformManaged;
|
|
322
333
|
/** The contacts for the vault certificates. */
|
|
323
334
|
export interface Contacts {
|
|
324
335
|
/** Identifier for the contacts collection. */
|
|
@@ -589,7 +600,11 @@ export declare enum KnownVersions {
|
|
|
589
600
|
V76Preview2 = "7.6-preview.2",
|
|
590
601
|
/** The 7.6 API version. */
|
|
591
602
|
V76 = "7.6",
|
|
603
|
+
/** The 2025-06-01-preview API version. */
|
|
604
|
+
V20250601Preview = "2025-06-01-preview",
|
|
592
605
|
/** The 2025-07-01 API version. */
|
|
593
|
-
V20250701 = "2025-07-01"
|
|
606
|
+
V20250701 = "2025-07-01",
|
|
607
|
+
/** The 2026-03-01-preview API version. */
|
|
608
|
+
V20260301Preview = "2026-03-01-preview"
|
|
594
609
|
}
|
|
595
610
|
//# sourceMappingURL=models.d.ts.map
|
|
@@ -76,6 +76,8 @@ __export(models_exports, {
|
|
|
76
76
|
lifetimeActionSerializer: () => lifetimeActionSerializer,
|
|
77
77
|
organizationDetailsDeserializer: () => organizationDetailsDeserializer,
|
|
78
78
|
organizationDetailsSerializer: () => organizationDetailsSerializer,
|
|
79
|
+
platformManagedDeserializer: () => platformManagedDeserializer,
|
|
80
|
+
platformManagedSerializer: () => platformManagedSerializer,
|
|
79
81
|
secretPropertiesDeserializer: () => secretPropertiesDeserializer,
|
|
80
82
|
secretPropertiesSerializer: () => secretPropertiesSerializer,
|
|
81
83
|
subjectAlternativeNamesDeserializer: () => subjectAlternativeNamesDeserializer,
|
|
@@ -170,7 +172,8 @@ function certificatePolicySerializer(item) {
|
|
|
170
172
|
x509_props: !item["x509CertificateProperties"] ? item["x509CertificateProperties"] : x509CertificatePropertiesSerializer(item["x509CertificateProperties"]),
|
|
171
173
|
lifetime_actions: !item["lifetimeActions"] ? item["lifetimeActions"] : lifetimeActionArraySerializer(item["lifetimeActions"]),
|
|
172
174
|
issuer: !item["issuerParameters"] ? item["issuerParameters"] : issuerParametersSerializer(item["issuerParameters"]),
|
|
173
|
-
attributes: !item["attributes"] ? item["attributes"] : certificateAttributesSerializer(item["attributes"])
|
|
175
|
+
attributes: !item["attributes"] ? item["attributes"] : certificateAttributesSerializer(item["attributes"]),
|
|
176
|
+
platformManaged: !item["platformManaged"] ? item["platformManaged"] : platformManagedSerializer(item["platformManaged"])
|
|
174
177
|
};
|
|
175
178
|
}
|
|
176
179
|
function certificatePolicyDeserializer(item) {
|
|
@@ -181,7 +184,8 @@ function certificatePolicyDeserializer(item) {
|
|
|
181
184
|
x509CertificateProperties: !item["x509_props"] ? item["x509_props"] : x509CertificatePropertiesDeserializer(item["x509_props"]),
|
|
182
185
|
lifetimeActions: !item["lifetime_actions"] ? item["lifetime_actions"] : lifetimeActionArrayDeserializer(item["lifetime_actions"]),
|
|
183
186
|
issuerParameters: !item["issuer"] ? item["issuer"] : issuerParametersDeserializer(item["issuer"]),
|
|
184
|
-
attributes: !item["attributes"] ? item["attributes"] : certificateAttributesDeserializer(item["attributes"])
|
|
187
|
+
attributes: !item["attributes"] ? item["attributes"] : certificateAttributesDeserializer(item["attributes"]),
|
|
188
|
+
platformManaged: !item["platformManaged"] ? item["platformManaged"] : platformManagedDeserializer(item["platformManaged"])
|
|
185
189
|
};
|
|
186
190
|
}
|
|
187
191
|
function keyPropertiesSerializer(item) {
|
|
@@ -358,6 +362,15 @@ function issuerParametersDeserializer(item) {
|
|
|
358
362
|
certificateTransparency: item["cert_transparency"]
|
|
359
363
|
};
|
|
360
364
|
}
|
|
365
|
+
function platformManagedSerializer(item) {
|
|
366
|
+
return { certificateUsage: item["certificateUsage"], metadata: item["metadata"] };
|
|
367
|
+
}
|
|
368
|
+
function platformManagedDeserializer(item) {
|
|
369
|
+
return {
|
|
370
|
+
certificateUsage: item["certificateUsage"],
|
|
371
|
+
metadata: !item["metadata"] ? item["metadata"] : Object.fromEntries(Object.entries(item["metadata"]).map(([k, p]) => [k, p]))
|
|
372
|
+
};
|
|
373
|
+
}
|
|
361
374
|
function contactsSerializer(item) {
|
|
362
375
|
return {
|
|
363
376
|
contacts: !item["contactList"] ? item["contactList"] : contactArraySerializer(item["contactList"])
|
|
@@ -593,7 +606,9 @@ var KnownVersions = /* @__PURE__ */ ((KnownVersions2) => {
|
|
|
593
606
|
KnownVersions2["V75"] = "7.5";
|
|
594
607
|
KnownVersions2["V76Preview2"] = "7.6-preview.2";
|
|
595
608
|
KnownVersions2["V76"] = "7.6";
|
|
609
|
+
KnownVersions2["V20250601Preview"] = "2025-06-01-preview";
|
|
596
610
|
KnownVersions2["V20250701"] = "2025-07-01";
|
|
611
|
+
KnownVersions2["V20260301Preview"] = "2026-03-01-preview";
|
|
597
612
|
return KnownVersions2;
|
|
598
613
|
})(KnownVersions || {});
|
|
599
614
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -657,6 +672,8 @@ var KnownVersions = /* @__PURE__ */ ((KnownVersions2) => {
|
|
|
657
672
|
lifetimeActionSerializer,
|
|
658
673
|
organizationDetailsDeserializer,
|
|
659
674
|
organizationDetailsSerializer,
|
|
675
|
+
platformManagedDeserializer,
|
|
676
|
+
platformManagedSerializer,
|
|
660
677
|
secretPropertiesDeserializer,
|
|
661
678
|
secretPropertiesSerializer,
|
|
662
679
|
subjectAlternativeNamesDeserializer,
|