@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.IDK.11.54 → 0.34.1-next.299
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/index.cjs +61 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +61 -62
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/agent/KmsRestClient.ts +82 -62
package/dist/index.d.cts
CHANGED
|
@@ -3922,6 +3922,7 @@ declare class KmsRestClient implements IAgentPlugin {
|
|
|
3922
3922
|
private assertedAgentBaseUrl;
|
|
3923
3923
|
private createHeaders;
|
|
3924
3924
|
private addSearchParams;
|
|
3925
|
+
private handleHttpError;
|
|
3925
3926
|
}
|
|
3926
3927
|
|
|
3927
3928
|
export { type AwsAssumeRoleCredentials, AwsAssumeRoleCredentialsFromJSON, AwsAssumeRoleCredentialsFromJSONTyped, AwsAssumeRoleCredentialsToJSON, AwsAssumeRoleCredentialsToJSONTyped, type AwsClientConfiguration, AwsClientConfigurationFromJSON, AwsClientConfigurationFromJSONTyped, AwsClientConfigurationToJSON, AwsClientConfigurationToJSONTyped, type AwsKmsSetting, AwsKmsSettingFromJSON, AwsKmsSettingFromJSONTyped, AwsKmsSettingToJSON, AwsKmsSettingToJSONTyped, type AwsStaticCredentials, AwsStaticCredentialsFromJSON, AwsStaticCredentialsFromJSONTyped, AwsStaticCredentialsToJSON, AwsStaticCredentialsToJSONTyped, type AwsWebIdentityTokenCredentials, AwsWebIdentityTokenCredentialsFromJSON, AwsWebIdentityTokenCredentialsFromJSONTyped, AwsWebIdentityTokenCredentialsToJSON, AwsWebIdentityTokenCredentialsToJSONTyped, type AzureClientSecretCredentialOpts, AzureClientSecretCredentialOptsFromJSON, AzureClientSecretCredentialOptsFromJSONTyped, AzureClientSecretCredentialOptsToJSON, AzureClientSecretCredentialOptsToJSONTyped, type AzureCredentialOpts, AzureCredentialOptsFromJSON, AzureCredentialOptsFromJSONTyped, AzureCredentialOptsToJSON, AzureCredentialOptsToJSONTyped, type AzureKeyVaultSetting, AzureKeyVaultSettingFromJSON, AzureKeyVaultSettingFromJSONTyped, AzureKeyVaultSettingToJSON, AzureKeyVaultSettingToJSONTyped, type CoseKey, CoseKeyFromJSON, CoseKeyFromJSONTyped, type CoseKeyPair, CoseKeyPairFromJSON, CoseKeyPairFromJSONTyped, CoseKeyPairToJSON, CoseKeyPairToJSONTyped, CoseKeyToJSON, CoseKeyToJSONTyped, CoseKeyType, CoseKeyTypeFromJSON, CoseKeyTypeFromJSONTyped, CoseKeyTypeToJSON, CoseKeyTypeToJSONTyped, type CreateKeyProvider, CreateKeyProviderFromJSON, CreateKeyProviderFromJSONTyped, CreateKeyProviderToJSON, CreateKeyProviderToJSONTyped, type CreateRawSignature, CreateRawSignatureFromJSON, CreateRawSignatureFromJSONTyped, type CreateRawSignatureResponse, CreateRawSignatureResponseFromJSON, CreateRawSignatureResponseFromJSONTyped, CreateRawSignatureResponseToJSON, CreateRawSignatureResponseToJSONTyped, CreateRawSignatureToJSON, CreateRawSignatureToJSONTyped, type CreateSimpleSignature, CreateSimpleSignatureFromJSON, CreateSimpleSignatureFromJSONTyped, CreateSimpleSignatureToJSON, CreateSimpleSignatureToJSONTyped, CryptoAlg, CryptoAlgFromJSON, CryptoAlgFromJSONTyped, CryptoAlgToJSON, CryptoAlgToJSONTyped, Curve, CurveFromJSON, CurveFromJSONTyped, CurveToJSON, CurveToJSONTyped, DigestAlg, DigestAlgFromJSON, DigestAlgFromJSONTyped, DigestAlgToJSON, DigestAlgToJSONTyped, type ErrorResponse, ErrorResponseFromJSON, ErrorResponseFromJSONTyped, ErrorResponseToJSON, ErrorResponseToJSONTyped, type GenerateKey, GenerateKeyFromJSON, GenerateKeyFromJSONTyped, type GenerateKeyGlobal, GenerateKeyGlobalFromJSON, GenerateKeyGlobalFromJSONTyped, GenerateKeyGlobalToJSON, GenerateKeyGlobalToJSONTyped, type GenerateKeyResponse, GenerateKeyResponseFromJSON, GenerateKeyResponseFromJSONTyped, GenerateKeyResponseToJSON, GenerateKeyResponseToJSONTyped, GenerateKeyToJSON, GenerateKeyToJSONTyped, type GetKeyResponse, GetKeyResponseFromJSON, GetKeyResponseFromJSONTyped, GetKeyResponseToJSON, GetKeyResponseToJSONTyped, type IKmsRestClient, type IRequiredContext, IdentifierMethod, IdentifierMethodFromJSON, IdentifierMethodFromJSONTyped, IdentifierMethodToJSON, IdentifierMethodToJSONTyped, type JoseKeyPair, JoseKeyPairFromJSON, JoseKeyPairFromJSONTyped, JoseKeyPairToJSON, JoseKeyPairToJSONTyped, type Jwk, JwkFromJSON, JwkFromJSONTyped, JwkKeyType, JwkKeyTypeFromJSON, JwkKeyTypeFromJSONTyped, JwkKeyTypeToJSON, JwkKeyTypeToJSONTyped, JwkToJSON, JwkToJSONTyped, JwkUse, JwkUseFromJSON, JwkUseFromJSONTyped, JwkUseToJSON, JwkUseToJSONTyped, KeyEncoding, KeyEncodingFromJSON, KeyEncodingFromJSONTyped, KeyEncodingToJSON, KeyEncodingToJSONTyped, type KeyInfo, KeyInfoFromJSON, KeyInfoFromJSONTyped, KeyInfoToJSON, KeyInfoToJSONTyped, KeyOperations, KeyOperationsFromJSON, KeyOperationsFromJSONTyped, KeyOperationsToJSON, KeyOperationsToJSONTyped, type KeyProvider, KeyProviderFromJSON, KeyProviderFromJSONTyped, type KeyProviderResponse, KeyProviderResponseFromJSON, KeyProviderResponseFromJSONTyped, KeyProviderResponseToJSON, KeyProviderResponseToJSONTyped, KeyProviderToJSON, KeyProviderToJSONTyped, KeyProviderType, KeyProviderTypeFromJSON, KeyProviderTypeFromJSONTyped, KeyProviderTypeToJSON, KeyProviderTypeToJSONTyped, type KeyResolver, KeyResolverFromJSON, KeyResolverFromJSONTyped, KeyResolverToJSON, KeyResolverToJSONTyped, KeyType, KeyTypeFromJSON, KeyTypeFromJSONTyped, KeyTypeToJSON, KeyTypeToJSONTyped, KeyVisibility, KeyVisibilityFromJSON, KeyVisibilityFromJSONTyped, KeyVisibilityToJSON, KeyVisibilityToJSONTyped, type KmsClientCreateRawSignatureArgs, type KmsClientDeleteKeyArgs, type KmsClientGenerateKeyArgs, type KmsClientGetKeyArgs, type KmsClientGetKeyProviderArgs, type KmsClientIsValidRawSignatureArgs, type KmsClientListKeyProvidersArgs, type KmsClientListKeysArgs, type KmsClientListResolversArgs, type KmsClientProviderDeleteKeyArgs, type KmsClientProviderGenerateKeyArgs, type KmsClientProviderGetKeyArgs, type KmsClientProviderListKeysArgs, type KmsClientProviderStoreKeyArgs, type KmsClientResolveKeyArgs, type KmsClientStoreKeyArgs, KmsRestClient, type KmsRestClientArgs, type ListKeyProvidersResponse, ListKeyProvidersResponseFromJSON, ListKeyProvidersResponseFromJSONTyped, ListKeyProvidersResponseToJSON, ListKeyProvidersResponseToJSONTyped, type ListKeysResponse, ListKeysResponseFromJSON, ListKeysResponseFromJSONTyped, ListKeysResponseToJSON, ListKeysResponseToJSONTyped, type ListResolversResponse, ListResolversResponseFromJSON, ListResolversResponseFromJSONTyped, ListResolversResponseToJSON, ListResolversResponseToJSONTyped, LookupMode, LookupModeFromJSON, LookupModeFromJSONTyped, LookupModeToJSON, LookupModeToJSONTyped, type ManagedKeyInfo, ManagedKeyInfoFromJSON, ManagedKeyInfoFromJSONTyped, ManagedKeyInfoToJSON, ManagedKeyInfoToJSONTyped, type ManagedKeyPair, ManagedKeyPairFromJSON, ManagedKeyPairFromJSONTyped, ManagedKeyPairToJSON, ManagedKeyPairToJSONTyped, MaskGenFunction, MaskGenFunctionFromJSON, MaskGenFunctionFromJSONTyped, MaskGenFunctionToJSON, MaskGenFunctionToJSONTyped, type ProviderCapabilities, ProviderCapabilitiesFromJSON, ProviderCapabilitiesFromJSONTyped, ProviderCapabilitiesToJSON, ProviderCapabilitiesToJSONTyped, type ResolvePublicKey, ResolvePublicKeyFromJSON, ResolvePublicKeyFromJSONTyped, ResolvePublicKeyToJSON, ResolvePublicKeyToJSONTyped, type ResolvedKeyInfo, ResolvedKeyInfoFromJSON, ResolvedKeyInfoFromJSONTyped, ResolvedKeyInfoToJSON, ResolvedKeyInfoToJSONTyped, type Resolver, ResolverFromJSON, ResolverFromJSONTyped, ResolverToJSON, ResolverToJSONTyped, type RestClientAuthenticationOpts, type SignInput, SignInputFromJSON, SignInputFromJSONTyped, SignInputModeEnum, SignInputToJSON, SignInputToJSONTyped, type SignOutput, SignOutputFromJSON, SignOutputFromJSONTyped, SignOutputToJSON, SignOutputToJSONTyped, type Signature, SignatureAlgorithm, SignatureAlgorithmFromJSON, SignatureAlgorithmFromJSONTyped, SignatureAlgorithmToJSON, SignatureAlgorithmToJSONTyped, SignatureFromJSON, SignatureFromJSONTyped, SignatureToJSON, SignatureToJSONTyped, type StoreKey, StoreKeyFromJSON, StoreKeyFromJSONTyped, type StoreKeyResponse, StoreKeyResponseFromJSON, StoreKeyResponseFromJSONTyped, StoreKeyResponseToJSON, StoreKeyResponseToJSONTyped, StoreKeyToJSON, StoreKeyToJSONTyped, type UpdateKeyProvider, UpdateKeyProviderFromJSON, UpdateKeyProviderFromJSONTyped, UpdateKeyProviderToJSON, UpdateKeyProviderToJSONTyped, type VerifyRawSignature, VerifyRawSignatureFromJSON, VerifyRawSignatureFromJSONTyped, type VerifyRawSignatureResponse, VerifyRawSignatureResponseFromJSON, VerifyRawSignatureResponseFromJSONTyped, VerifyRawSignatureResponseToJSON, VerifyRawSignatureResponseToJSONTyped, VerifyRawSignatureToJSON, VerifyRawSignatureToJSONTyped, type VerifySimpleSignature, VerifySimpleSignatureFromJSON, VerifySimpleSignatureFromJSONTyped, VerifySimpleSignatureToJSON, VerifySimpleSignatureToJSONTyped, instanceOfAwsAssumeRoleCredentials, instanceOfAwsClientConfiguration, instanceOfAwsKmsSetting, instanceOfAwsStaticCredentials, instanceOfAwsWebIdentityTokenCredentials, instanceOfAzureClientSecretCredentialOpts, instanceOfAzureCredentialOpts, instanceOfAzureKeyVaultSetting, instanceOfCoseKey, instanceOfCoseKeyPair, instanceOfCoseKeyType, instanceOfCreateKeyProvider, instanceOfCreateRawSignature, instanceOfCreateRawSignatureResponse, instanceOfCreateSimpleSignature, instanceOfCryptoAlg, instanceOfCurve, instanceOfDigestAlg, instanceOfErrorResponse, instanceOfGenerateKey, instanceOfGenerateKeyGlobal, instanceOfGenerateKeyResponse, instanceOfGetKeyResponse, instanceOfIdentifierMethod, instanceOfJoseKeyPair, instanceOfJwk, instanceOfJwkKeyType, instanceOfJwkUse, instanceOfKeyEncoding, instanceOfKeyInfo, instanceOfKeyOperations, instanceOfKeyProvider, instanceOfKeyProviderResponse, instanceOfKeyProviderType, instanceOfKeyResolver, instanceOfKeyType, instanceOfKeyVisibility, instanceOfListKeyProvidersResponse, instanceOfListKeysResponse, instanceOfListResolversResponse, instanceOfLookupMode, instanceOfManagedKeyInfo, instanceOfManagedKeyPair, instanceOfMaskGenFunction, instanceOfProviderCapabilities, instanceOfResolvePublicKey, instanceOfResolvedKeyInfo, instanceOfResolver, instanceOfSignInput, instanceOfSignOutput, instanceOfSignature, instanceOfSignatureAlgorithm, instanceOfStoreKey, instanceOfStoreKeyResponse, instanceOfUpdateKeyProvider, instanceOfVerifyRawSignature, instanceOfVerifyRawSignatureResponse, instanceOfVerifySimpleSignature, type kmsClientGetResolverArgs, plugin_schema as schema };
|
package/dist/index.d.ts
CHANGED
|
@@ -3922,6 +3922,7 @@ declare class KmsRestClient implements IAgentPlugin {
|
|
|
3922
3922
|
private assertedAgentBaseUrl;
|
|
3923
3923
|
private createHeaders;
|
|
3924
3924
|
private addSearchParams;
|
|
3925
|
+
private handleHttpError;
|
|
3925
3926
|
}
|
|
3926
3927
|
|
|
3927
3928
|
export { type AwsAssumeRoleCredentials, AwsAssumeRoleCredentialsFromJSON, AwsAssumeRoleCredentialsFromJSONTyped, AwsAssumeRoleCredentialsToJSON, AwsAssumeRoleCredentialsToJSONTyped, type AwsClientConfiguration, AwsClientConfigurationFromJSON, AwsClientConfigurationFromJSONTyped, AwsClientConfigurationToJSON, AwsClientConfigurationToJSONTyped, type AwsKmsSetting, AwsKmsSettingFromJSON, AwsKmsSettingFromJSONTyped, AwsKmsSettingToJSON, AwsKmsSettingToJSONTyped, type AwsStaticCredentials, AwsStaticCredentialsFromJSON, AwsStaticCredentialsFromJSONTyped, AwsStaticCredentialsToJSON, AwsStaticCredentialsToJSONTyped, type AwsWebIdentityTokenCredentials, AwsWebIdentityTokenCredentialsFromJSON, AwsWebIdentityTokenCredentialsFromJSONTyped, AwsWebIdentityTokenCredentialsToJSON, AwsWebIdentityTokenCredentialsToJSONTyped, type AzureClientSecretCredentialOpts, AzureClientSecretCredentialOptsFromJSON, AzureClientSecretCredentialOptsFromJSONTyped, AzureClientSecretCredentialOptsToJSON, AzureClientSecretCredentialOptsToJSONTyped, type AzureCredentialOpts, AzureCredentialOptsFromJSON, AzureCredentialOptsFromJSONTyped, AzureCredentialOptsToJSON, AzureCredentialOptsToJSONTyped, type AzureKeyVaultSetting, AzureKeyVaultSettingFromJSON, AzureKeyVaultSettingFromJSONTyped, AzureKeyVaultSettingToJSON, AzureKeyVaultSettingToJSONTyped, type CoseKey, CoseKeyFromJSON, CoseKeyFromJSONTyped, type CoseKeyPair, CoseKeyPairFromJSON, CoseKeyPairFromJSONTyped, CoseKeyPairToJSON, CoseKeyPairToJSONTyped, CoseKeyToJSON, CoseKeyToJSONTyped, CoseKeyType, CoseKeyTypeFromJSON, CoseKeyTypeFromJSONTyped, CoseKeyTypeToJSON, CoseKeyTypeToJSONTyped, type CreateKeyProvider, CreateKeyProviderFromJSON, CreateKeyProviderFromJSONTyped, CreateKeyProviderToJSON, CreateKeyProviderToJSONTyped, type CreateRawSignature, CreateRawSignatureFromJSON, CreateRawSignatureFromJSONTyped, type CreateRawSignatureResponse, CreateRawSignatureResponseFromJSON, CreateRawSignatureResponseFromJSONTyped, CreateRawSignatureResponseToJSON, CreateRawSignatureResponseToJSONTyped, CreateRawSignatureToJSON, CreateRawSignatureToJSONTyped, type CreateSimpleSignature, CreateSimpleSignatureFromJSON, CreateSimpleSignatureFromJSONTyped, CreateSimpleSignatureToJSON, CreateSimpleSignatureToJSONTyped, CryptoAlg, CryptoAlgFromJSON, CryptoAlgFromJSONTyped, CryptoAlgToJSON, CryptoAlgToJSONTyped, Curve, CurveFromJSON, CurveFromJSONTyped, CurveToJSON, CurveToJSONTyped, DigestAlg, DigestAlgFromJSON, DigestAlgFromJSONTyped, DigestAlgToJSON, DigestAlgToJSONTyped, type ErrorResponse, ErrorResponseFromJSON, ErrorResponseFromJSONTyped, ErrorResponseToJSON, ErrorResponseToJSONTyped, type GenerateKey, GenerateKeyFromJSON, GenerateKeyFromJSONTyped, type GenerateKeyGlobal, GenerateKeyGlobalFromJSON, GenerateKeyGlobalFromJSONTyped, GenerateKeyGlobalToJSON, GenerateKeyGlobalToJSONTyped, type GenerateKeyResponse, GenerateKeyResponseFromJSON, GenerateKeyResponseFromJSONTyped, GenerateKeyResponseToJSON, GenerateKeyResponseToJSONTyped, GenerateKeyToJSON, GenerateKeyToJSONTyped, type GetKeyResponse, GetKeyResponseFromJSON, GetKeyResponseFromJSONTyped, GetKeyResponseToJSON, GetKeyResponseToJSONTyped, type IKmsRestClient, type IRequiredContext, IdentifierMethod, IdentifierMethodFromJSON, IdentifierMethodFromJSONTyped, IdentifierMethodToJSON, IdentifierMethodToJSONTyped, type JoseKeyPair, JoseKeyPairFromJSON, JoseKeyPairFromJSONTyped, JoseKeyPairToJSON, JoseKeyPairToJSONTyped, type Jwk, JwkFromJSON, JwkFromJSONTyped, JwkKeyType, JwkKeyTypeFromJSON, JwkKeyTypeFromJSONTyped, JwkKeyTypeToJSON, JwkKeyTypeToJSONTyped, JwkToJSON, JwkToJSONTyped, JwkUse, JwkUseFromJSON, JwkUseFromJSONTyped, JwkUseToJSON, JwkUseToJSONTyped, KeyEncoding, KeyEncodingFromJSON, KeyEncodingFromJSONTyped, KeyEncodingToJSON, KeyEncodingToJSONTyped, type KeyInfo, KeyInfoFromJSON, KeyInfoFromJSONTyped, KeyInfoToJSON, KeyInfoToJSONTyped, KeyOperations, KeyOperationsFromJSON, KeyOperationsFromJSONTyped, KeyOperationsToJSON, KeyOperationsToJSONTyped, type KeyProvider, KeyProviderFromJSON, KeyProviderFromJSONTyped, type KeyProviderResponse, KeyProviderResponseFromJSON, KeyProviderResponseFromJSONTyped, KeyProviderResponseToJSON, KeyProviderResponseToJSONTyped, KeyProviderToJSON, KeyProviderToJSONTyped, KeyProviderType, KeyProviderTypeFromJSON, KeyProviderTypeFromJSONTyped, KeyProviderTypeToJSON, KeyProviderTypeToJSONTyped, type KeyResolver, KeyResolverFromJSON, KeyResolverFromJSONTyped, KeyResolverToJSON, KeyResolverToJSONTyped, KeyType, KeyTypeFromJSON, KeyTypeFromJSONTyped, KeyTypeToJSON, KeyTypeToJSONTyped, KeyVisibility, KeyVisibilityFromJSON, KeyVisibilityFromJSONTyped, KeyVisibilityToJSON, KeyVisibilityToJSONTyped, type KmsClientCreateRawSignatureArgs, type KmsClientDeleteKeyArgs, type KmsClientGenerateKeyArgs, type KmsClientGetKeyArgs, type KmsClientGetKeyProviderArgs, type KmsClientIsValidRawSignatureArgs, type KmsClientListKeyProvidersArgs, type KmsClientListKeysArgs, type KmsClientListResolversArgs, type KmsClientProviderDeleteKeyArgs, type KmsClientProviderGenerateKeyArgs, type KmsClientProviderGetKeyArgs, type KmsClientProviderListKeysArgs, type KmsClientProviderStoreKeyArgs, type KmsClientResolveKeyArgs, type KmsClientStoreKeyArgs, KmsRestClient, type KmsRestClientArgs, type ListKeyProvidersResponse, ListKeyProvidersResponseFromJSON, ListKeyProvidersResponseFromJSONTyped, ListKeyProvidersResponseToJSON, ListKeyProvidersResponseToJSONTyped, type ListKeysResponse, ListKeysResponseFromJSON, ListKeysResponseFromJSONTyped, ListKeysResponseToJSON, ListKeysResponseToJSONTyped, type ListResolversResponse, ListResolversResponseFromJSON, ListResolversResponseFromJSONTyped, ListResolversResponseToJSON, ListResolversResponseToJSONTyped, LookupMode, LookupModeFromJSON, LookupModeFromJSONTyped, LookupModeToJSON, LookupModeToJSONTyped, type ManagedKeyInfo, ManagedKeyInfoFromJSON, ManagedKeyInfoFromJSONTyped, ManagedKeyInfoToJSON, ManagedKeyInfoToJSONTyped, type ManagedKeyPair, ManagedKeyPairFromJSON, ManagedKeyPairFromJSONTyped, ManagedKeyPairToJSON, ManagedKeyPairToJSONTyped, MaskGenFunction, MaskGenFunctionFromJSON, MaskGenFunctionFromJSONTyped, MaskGenFunctionToJSON, MaskGenFunctionToJSONTyped, type ProviderCapabilities, ProviderCapabilitiesFromJSON, ProviderCapabilitiesFromJSONTyped, ProviderCapabilitiesToJSON, ProviderCapabilitiesToJSONTyped, type ResolvePublicKey, ResolvePublicKeyFromJSON, ResolvePublicKeyFromJSONTyped, ResolvePublicKeyToJSON, ResolvePublicKeyToJSONTyped, type ResolvedKeyInfo, ResolvedKeyInfoFromJSON, ResolvedKeyInfoFromJSONTyped, ResolvedKeyInfoToJSON, ResolvedKeyInfoToJSONTyped, type Resolver, ResolverFromJSON, ResolverFromJSONTyped, ResolverToJSON, ResolverToJSONTyped, type RestClientAuthenticationOpts, type SignInput, SignInputFromJSON, SignInputFromJSONTyped, SignInputModeEnum, SignInputToJSON, SignInputToJSONTyped, type SignOutput, SignOutputFromJSON, SignOutputFromJSONTyped, SignOutputToJSON, SignOutputToJSONTyped, type Signature, SignatureAlgorithm, SignatureAlgorithmFromJSON, SignatureAlgorithmFromJSONTyped, SignatureAlgorithmToJSON, SignatureAlgorithmToJSONTyped, SignatureFromJSON, SignatureFromJSONTyped, SignatureToJSON, SignatureToJSONTyped, type StoreKey, StoreKeyFromJSON, StoreKeyFromJSONTyped, type StoreKeyResponse, StoreKeyResponseFromJSON, StoreKeyResponseFromJSONTyped, StoreKeyResponseToJSON, StoreKeyResponseToJSONTyped, StoreKeyToJSON, StoreKeyToJSONTyped, type UpdateKeyProvider, UpdateKeyProviderFromJSON, UpdateKeyProviderFromJSONTyped, UpdateKeyProviderToJSON, UpdateKeyProviderToJSONTyped, type VerifyRawSignature, VerifyRawSignatureFromJSON, VerifyRawSignatureFromJSONTyped, type VerifyRawSignatureResponse, VerifyRawSignatureResponseFromJSON, VerifyRawSignatureResponseFromJSONTyped, VerifyRawSignatureResponseToJSON, VerifyRawSignatureResponseToJSONTyped, VerifyRawSignatureToJSON, VerifyRawSignatureToJSONTyped, type VerifySimpleSignature, VerifySimpleSignatureFromJSON, VerifySimpleSignatureFromJSONTyped, VerifySimpleSignatureToJSON, VerifySimpleSignatureToJSONTyped, instanceOfAwsAssumeRoleCredentials, instanceOfAwsClientConfiguration, instanceOfAwsKmsSetting, instanceOfAwsStaticCredentials, instanceOfAwsWebIdentityTokenCredentials, instanceOfAzureClientSecretCredentialOpts, instanceOfAzureCredentialOpts, instanceOfAzureKeyVaultSetting, instanceOfCoseKey, instanceOfCoseKeyPair, instanceOfCoseKeyType, instanceOfCreateKeyProvider, instanceOfCreateRawSignature, instanceOfCreateRawSignatureResponse, instanceOfCreateSimpleSignature, instanceOfCryptoAlg, instanceOfCurve, instanceOfDigestAlg, instanceOfErrorResponse, instanceOfGenerateKey, instanceOfGenerateKeyGlobal, instanceOfGenerateKeyResponse, instanceOfGetKeyResponse, instanceOfIdentifierMethod, instanceOfJoseKeyPair, instanceOfJwk, instanceOfJwkKeyType, instanceOfJwkUse, instanceOfKeyEncoding, instanceOfKeyInfo, instanceOfKeyOperations, instanceOfKeyProvider, instanceOfKeyProviderResponse, instanceOfKeyProviderType, instanceOfKeyResolver, instanceOfKeyType, instanceOfKeyVisibility, instanceOfListKeyProvidersResponse, instanceOfListKeysResponse, instanceOfListResolversResponse, instanceOfLookupMode, instanceOfManagedKeyInfo, instanceOfManagedKeyPair, instanceOfMaskGenFunction, instanceOfProviderCapabilities, instanceOfResolvePublicKey, instanceOfResolvedKeyInfo, instanceOfResolver, instanceOfSignInput, instanceOfSignOutput, instanceOfSignature, instanceOfSignatureAlgorithm, instanceOfStoreKey, instanceOfStoreKeyResponse, instanceOfUpdateKeyProvider, instanceOfVerifyRawSignature, instanceOfVerifyRawSignatureResponse, instanceOfVerifySimpleSignature, type kmsClientGetResolverArgs, plugin_schema as schema };
|
package/dist/index.js
CHANGED
|
@@ -3275,11 +3275,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3275
3275
|
method: "GET"
|
|
3276
3276
|
});
|
|
3277
3277
|
logger.debug(`get resolver response: ${response}`);
|
|
3278
|
-
|
|
3279
|
-
return
|
|
3280
|
-
} catch (error) {
|
|
3281
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3278
|
+
if (!response.ok) {
|
|
3279
|
+
return this.handleHttpError(url, response);
|
|
3282
3280
|
}
|
|
3281
|
+
return ResolverFromJSONTyped(await response.json(), false);
|
|
3283
3282
|
}
|
|
3284
3283
|
/** {@inheritDoc IKmsRestClient.kmsListResolvers} */
|
|
3285
3284
|
async kmsClientListResolvers(args) {
|
|
@@ -3289,11 +3288,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3289
3288
|
method: "GET"
|
|
3290
3289
|
});
|
|
3291
3290
|
logger.debug(`list resolvers response: ${response}`);
|
|
3292
|
-
|
|
3293
|
-
return
|
|
3294
|
-
} catch (error) {
|
|
3295
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3291
|
+
if (!response.ok) {
|
|
3292
|
+
return this.handleHttpError(url, response);
|
|
3296
3293
|
}
|
|
3294
|
+
return ListResolversResponseFromJSONTyped(await response.json(), false);
|
|
3297
3295
|
}
|
|
3298
3296
|
/** {@inheritDoc IKmsRestClient.kmsResolveKey} */
|
|
3299
3297
|
async kmsClientResolveKey(args) {
|
|
@@ -3313,11 +3311,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3313
3311
|
body: JSON.stringify(ResolvePublicKeyToJSONTyped(body))
|
|
3314
3312
|
});
|
|
3315
3313
|
logger.debug(`resolve key response: ${response}`);
|
|
3316
|
-
|
|
3317
|
-
return
|
|
3318
|
-
} catch (error) {
|
|
3319
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3314
|
+
if (!response.ok) {
|
|
3315
|
+
return this.handleHttpError(url, response);
|
|
3320
3316
|
}
|
|
3317
|
+
return ResolvedKeyInfoFromJSONTyped(await response.json(), false);
|
|
3321
3318
|
}
|
|
3322
3319
|
/** {@inheritDoc IKmsRestClient.kmsCreateRawSignature} */
|
|
3323
3320
|
async kmsClientCreateRawSignature(args) {
|
|
@@ -3335,11 +3332,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3335
3332
|
body: JSON.stringify(CreateRawSignatureToJSONTyped(body))
|
|
3336
3333
|
});
|
|
3337
3334
|
logger.debug(`create raw signature response: ${response}`);
|
|
3338
|
-
|
|
3339
|
-
return
|
|
3340
|
-
} catch (error) {
|
|
3341
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3335
|
+
if (!response.ok) {
|
|
3336
|
+
return this.handleHttpError(url, response);
|
|
3342
3337
|
}
|
|
3338
|
+
return CreateRawSignatureResponseFromJSONTyped(await response.json(), false);
|
|
3343
3339
|
}
|
|
3344
3340
|
/** {@inheritDoc IKmsRestClient.kmsIsValidRawSignature} */
|
|
3345
3341
|
async kmsClientIsValidRawSignature(args) {
|
|
@@ -3358,11 +3354,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3358
3354
|
body: JSON.stringify(VerifyRawSignatureToJSONTyped(body))
|
|
3359
3355
|
});
|
|
3360
3356
|
logger.debug(`verify raw signature response: ${response}`);
|
|
3361
|
-
|
|
3362
|
-
return
|
|
3363
|
-
} catch (error) {
|
|
3364
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3357
|
+
if (!response.ok) {
|
|
3358
|
+
return this.handleHttpError(url, response);
|
|
3365
3359
|
}
|
|
3360
|
+
return VerifyRawSignatureResponseFromJSONTyped(await response.json(), false);
|
|
3366
3361
|
}
|
|
3367
3362
|
/** {@inheritDoc IKmsRestClient.kmsGetKey} */
|
|
3368
3363
|
async kmsClientGetKey(args) {
|
|
@@ -3372,11 +3367,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3372
3367
|
method: "GET"
|
|
3373
3368
|
});
|
|
3374
3369
|
logger.debug(`get key response: ${response}`);
|
|
3375
|
-
|
|
3376
|
-
return
|
|
3377
|
-
} catch (error) {
|
|
3378
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3370
|
+
if (!response.ok) {
|
|
3371
|
+
return this.handleHttpError(url, response);
|
|
3379
3372
|
}
|
|
3373
|
+
return GetKeyResponseFromJSONTyped(await response.json(), false);
|
|
3380
3374
|
}
|
|
3381
3375
|
/** {@inheritDoc IKmsRestClient.kmsListKeys} */
|
|
3382
3376
|
async kmsClientListKeys(args) {
|
|
@@ -3390,11 +3384,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3390
3384
|
method: "GET"
|
|
3391
3385
|
});
|
|
3392
3386
|
logger.debug(`list keys response: ${response}`);
|
|
3393
|
-
|
|
3394
|
-
return
|
|
3395
|
-
} catch (error) {
|
|
3396
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3387
|
+
if (!response.ok) {
|
|
3388
|
+
return this.handleHttpError(url.toString(), response);
|
|
3397
3389
|
}
|
|
3390
|
+
return ListKeysResponseFromJSONTyped(await response.json(), false);
|
|
3398
3391
|
}
|
|
3399
3392
|
/** {@inheritDoc IKmsRestClient.kmsStoreKey} */
|
|
3400
3393
|
async kmsClientStoreKey(args) {
|
|
@@ -3412,11 +3405,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3412
3405
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3413
3406
|
});
|
|
3414
3407
|
logger.debug(`store key response: ${response}`);
|
|
3415
|
-
|
|
3416
|
-
return
|
|
3417
|
-
} catch (error) {
|
|
3418
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3408
|
+
if (!response.ok) {
|
|
3409
|
+
return this.handleHttpError(url, response);
|
|
3419
3410
|
}
|
|
3411
|
+
return StoreKeyResponseFromJSONTyped(await response.json(), false);
|
|
3420
3412
|
}
|
|
3421
3413
|
/** {@inheritDoc IKmsRestClient.kmsGenerateKey} */
|
|
3422
3414
|
async kmsClientGenerateKey(args) {
|
|
@@ -3436,19 +3428,22 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3436
3428
|
body: JSON.stringify(GenerateKeyGlobalToJSONTyped(body))
|
|
3437
3429
|
});
|
|
3438
3430
|
logger.debug(`generate key response: ${response}`);
|
|
3439
|
-
|
|
3440
|
-
return
|
|
3441
|
-
} catch (error) {
|
|
3442
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3431
|
+
if (!response.ok) {
|
|
3432
|
+
return this.handleHttpError(url, response);
|
|
3443
3433
|
}
|
|
3434
|
+
return GenerateKeyResponseFromJSONTyped(await response.json(), false);
|
|
3444
3435
|
}
|
|
3445
3436
|
/** {@inheritDoc IKmsRestClient.kmsDeleteKey} */
|
|
3446
3437
|
async kmsClientDeleteKey(args) {
|
|
3447
3438
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3448
3439
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3449
|
-
await fetch(url, {
|
|
3440
|
+
const response = await fetch(url, {
|
|
3450
3441
|
method: "DELETE"
|
|
3451
3442
|
});
|
|
3443
|
+
logger.debug(`delete key response: ${response}`);
|
|
3444
|
+
if (!response.ok) {
|
|
3445
|
+
return this.handleHttpError(url, response);
|
|
3446
|
+
}
|
|
3452
3447
|
return true;
|
|
3453
3448
|
}
|
|
3454
3449
|
/** {@inheritDoc IKmsRestClient.kmsGetKeyProvider} */
|
|
@@ -3459,11 +3454,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3459
3454
|
method: "GET"
|
|
3460
3455
|
});
|
|
3461
3456
|
logger.debug(`get provider response: ${response}`);
|
|
3462
|
-
|
|
3463
|
-
return
|
|
3464
|
-
} catch (error) {
|
|
3465
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3457
|
+
if (!response.ok) {
|
|
3458
|
+
return this.handleHttpError(url, response);
|
|
3466
3459
|
}
|
|
3460
|
+
return KeyProviderResponseFromJSONTyped(await response.json(), false);
|
|
3467
3461
|
}
|
|
3468
3462
|
/** {@inheritDoc IKmsRestClient.kmsListKeyProviders} */
|
|
3469
3463
|
async kmsClientListKeyProviders(args) {
|
|
@@ -3473,11 +3467,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3473
3467
|
method: "GET"
|
|
3474
3468
|
});
|
|
3475
3469
|
logger.debug(`list providers response: ${response}`);
|
|
3476
|
-
|
|
3477
|
-
return
|
|
3478
|
-
} catch (error) {
|
|
3479
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3470
|
+
if (!response.ok) {
|
|
3471
|
+
return this.handleHttpError(url, response);
|
|
3480
3472
|
}
|
|
3473
|
+
return ListKeyProvidersResponseFromJSONTyped(await response.json(), false);
|
|
3481
3474
|
}
|
|
3482
3475
|
/** {@inheritDoc IKmsRestClient.kmsProviderListKeys} */
|
|
3483
3476
|
async kmsClientProviderListKeys(args) {
|
|
@@ -3487,11 +3480,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3487
3480
|
method: "GET"
|
|
3488
3481
|
});
|
|
3489
3482
|
logger.debug(`list provider keys response: ${response}`);
|
|
3490
|
-
|
|
3491
|
-
return
|
|
3492
|
-
} catch (error) {
|
|
3493
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3483
|
+
if (!response.ok) {
|
|
3484
|
+
return this.handleHttpError(url, response);
|
|
3494
3485
|
}
|
|
3486
|
+
return ListKeysResponseFromJSONTyped(await response.json(), false);
|
|
3495
3487
|
}
|
|
3496
3488
|
/** {@inheritDoc IKmsRestClient.kmsProviderStoreKey} */
|
|
3497
3489
|
async kmsClientProviderStoreKey(args) {
|
|
@@ -3509,11 +3501,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3509
3501
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3510
3502
|
});
|
|
3511
3503
|
logger.debug(`provider store key response: ${response}`);
|
|
3512
|
-
|
|
3513
|
-
return
|
|
3514
|
-
} catch (error) {
|
|
3515
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3504
|
+
if (!response.ok) {
|
|
3505
|
+
return this.handleHttpError(url, response);
|
|
3516
3506
|
}
|
|
3507
|
+
return StoreKeyResponseFromJSONTyped(await response.json(), false);
|
|
3517
3508
|
}
|
|
3518
3509
|
/** {@inheritDoc IKmsRestClient.kmsProviderGenerateKey} */
|
|
3519
3510
|
async kmsClientProviderGenerateKey(args) {
|
|
@@ -3532,11 +3523,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3532
3523
|
body: JSON.stringify(GenerateKeyToJSONTyped(body))
|
|
3533
3524
|
});
|
|
3534
3525
|
logger.debug(`provider generate key response: ${response}`);
|
|
3535
|
-
|
|
3536
|
-
return
|
|
3537
|
-
} catch (error) {
|
|
3538
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3526
|
+
if (!response.ok) {
|
|
3527
|
+
return this.handleHttpError(url, response);
|
|
3539
3528
|
}
|
|
3529
|
+
return GenerateKeyResponseFromJSONTyped(await response.json(), false);
|
|
3540
3530
|
}
|
|
3541
3531
|
/** {@inheritDoc IKmsRestClient.kmsProviderGetKey} */
|
|
3542
3532
|
async kmsClientProviderGetKey(args) {
|
|
@@ -3546,19 +3536,22 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3546
3536
|
method: "GET"
|
|
3547
3537
|
});
|
|
3548
3538
|
logger.debug(`get provider key response: ${response}`);
|
|
3549
|
-
|
|
3550
|
-
return
|
|
3551
|
-
} catch (error) {
|
|
3552
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3539
|
+
if (!response.ok) {
|
|
3540
|
+
return this.handleHttpError(url, response);
|
|
3553
3541
|
}
|
|
3542
|
+
return GetKeyResponseFromJSONTyped(await response.json(), false);
|
|
3554
3543
|
}
|
|
3555
3544
|
/** {@inheritDoc IKmsRestClient.kmsProviderDeleteKey} */
|
|
3556
3545
|
async kmsClientProviderDeleteKey(args) {
|
|
3557
3546
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3558
3547
|
const url = _KmsRestClient.urlWithBase(`providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3559
|
-
await fetch(url, {
|
|
3548
|
+
const response = await fetch(url, {
|
|
3560
3549
|
method: "DELETE"
|
|
3561
3550
|
});
|
|
3551
|
+
logger.debug(`delete key response: ${response}`);
|
|
3552
|
+
if (!response.ok) {
|
|
3553
|
+
return this.handleHttpError(url, response);
|
|
3554
|
+
}
|
|
3562
3555
|
return true;
|
|
3563
3556
|
}
|
|
3564
3557
|
assertedAgentBaseUrl(baseUrl) {
|
|
@@ -3589,6 +3582,12 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3589
3582
|
}
|
|
3590
3583
|
return url;
|
|
3591
3584
|
}
|
|
3585
|
+
async handleHttpError(url, response) {
|
|
3586
|
+
const contentType = response.headers.get("content-type");
|
|
3587
|
+
const isJson = contentType?.includes("application/json");
|
|
3588
|
+
const responseBody = isJson ? JSON.stringify(await response.json()) : await response.text();
|
|
3589
|
+
return Promise.reject(Error(`request to ${url} returned http error ${response.status} - ${responseBody}`));
|
|
3590
|
+
}
|
|
3592
3591
|
};
|
|
3593
3592
|
export {
|
|
3594
3593
|
AwsAssumeRoleCredentialsFromJSON,
|