@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.IDK.11.297 → 0.34.1-feature.IDK.11.298
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 +55 -117
- 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 +55 -117
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/agent/KmsRestClient.ts +74 -132
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,14 +3275,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3275
3275
|
method: "GET"
|
|
3276
3276
|
});
|
|
3277
3277
|
logger.debug(`get resolver response: ${response}`);
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
return Promise.reject(await response.json());
|
|
3281
|
-
}
|
|
3282
|
-
return ResolverFromJSONTyped(await response.json(), false);
|
|
3283
|
-
} catch (error) {
|
|
3284
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3278
|
+
if (!response.ok) {
|
|
3279
|
+
return this.handleHttpError(url, response);
|
|
3285
3280
|
}
|
|
3281
|
+
return ResolverFromJSONTyped(await response.json(), false);
|
|
3286
3282
|
}
|
|
3287
3283
|
/** {@inheritDoc IKmsRestClient.kmsListResolvers} */
|
|
3288
3284
|
async kmsClientListResolvers(args) {
|
|
@@ -3292,14 +3288,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3292
3288
|
method: "GET"
|
|
3293
3289
|
});
|
|
3294
3290
|
logger.debug(`list resolvers response: ${response}`);
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
return Promise.reject(await response.json());
|
|
3298
|
-
}
|
|
3299
|
-
return ListResolversResponseFromJSONTyped(await response.json(), false);
|
|
3300
|
-
} catch (error) {
|
|
3301
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3291
|
+
if (!response.ok) {
|
|
3292
|
+
return this.handleHttpError(url, response);
|
|
3302
3293
|
}
|
|
3294
|
+
return ListResolversResponseFromJSONTyped(await response.json(), false);
|
|
3303
3295
|
}
|
|
3304
3296
|
/** {@inheritDoc IKmsRestClient.kmsResolveKey} */
|
|
3305
3297
|
async kmsClientResolveKey(args) {
|
|
@@ -3319,14 +3311,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3319
3311
|
body: JSON.stringify(ResolvePublicKeyToJSONTyped(body))
|
|
3320
3312
|
});
|
|
3321
3313
|
logger.debug(`resolve key response: ${response}`);
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
return Promise.reject(await response.json());
|
|
3325
|
-
}
|
|
3326
|
-
return ResolvedKeyInfoFromJSONTyped(await response.json(), false);
|
|
3327
|
-
} catch (error) {
|
|
3328
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3314
|
+
if (!response.ok) {
|
|
3315
|
+
return this.handleHttpError(url, response);
|
|
3329
3316
|
}
|
|
3317
|
+
return ResolvedKeyInfoFromJSONTyped(await response.json(), false);
|
|
3330
3318
|
}
|
|
3331
3319
|
/** {@inheritDoc IKmsRestClient.kmsCreateRawSignature} */
|
|
3332
3320
|
async kmsClientCreateRawSignature(args) {
|
|
@@ -3344,14 +3332,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3344
3332
|
body: JSON.stringify(CreateRawSignatureToJSONTyped(body))
|
|
3345
3333
|
});
|
|
3346
3334
|
logger.debug(`create raw signature response: ${response}`);
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
return Promise.reject(await response.json());
|
|
3350
|
-
}
|
|
3351
|
-
return CreateRawSignatureResponseFromJSONTyped(await response.json(), false);
|
|
3352
|
-
} catch (error) {
|
|
3353
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3335
|
+
if (!response.ok) {
|
|
3336
|
+
return this.handleHttpError(url, response);
|
|
3354
3337
|
}
|
|
3338
|
+
return CreateRawSignatureResponseFromJSONTyped(await response.json(), false);
|
|
3355
3339
|
}
|
|
3356
3340
|
/** {@inheritDoc IKmsRestClient.kmsIsValidRawSignature} */
|
|
3357
3341
|
async kmsClientIsValidRawSignature(args) {
|
|
@@ -3370,14 +3354,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3370
3354
|
body: JSON.stringify(VerifyRawSignatureToJSONTyped(body))
|
|
3371
3355
|
});
|
|
3372
3356
|
logger.debug(`verify raw signature response: ${response}`);
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
return Promise.reject(await response.json());
|
|
3376
|
-
}
|
|
3377
|
-
return VerifyRawSignatureResponseFromJSONTyped(await response.json(), false);
|
|
3378
|
-
} catch (error) {
|
|
3379
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3357
|
+
if (!response.ok) {
|
|
3358
|
+
return this.handleHttpError(url, response);
|
|
3380
3359
|
}
|
|
3360
|
+
return VerifyRawSignatureResponseFromJSONTyped(await response.json(), false);
|
|
3381
3361
|
}
|
|
3382
3362
|
/** {@inheritDoc IKmsRestClient.kmsGetKey} */
|
|
3383
3363
|
async kmsClientGetKey(args) {
|
|
@@ -3387,14 +3367,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3387
3367
|
method: "GET"
|
|
3388
3368
|
});
|
|
3389
3369
|
logger.debug(`get key response: ${response}`);
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
return Promise.reject(await response.json());
|
|
3393
|
-
}
|
|
3394
|
-
return GetKeyResponseFromJSONTyped(await response.json(), false);
|
|
3395
|
-
} catch (error) {
|
|
3396
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3370
|
+
if (!response.ok) {
|
|
3371
|
+
return this.handleHttpError(url, response);
|
|
3397
3372
|
}
|
|
3373
|
+
return GetKeyResponseFromJSONTyped(await response.json(), false);
|
|
3398
3374
|
}
|
|
3399
3375
|
/** {@inheritDoc IKmsRestClient.kmsListKeys} */
|
|
3400
3376
|
async kmsClientListKeys(args) {
|
|
@@ -3408,14 +3384,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3408
3384
|
method: "GET"
|
|
3409
3385
|
});
|
|
3410
3386
|
logger.debug(`list keys response: ${response}`);
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
return Promise.reject(await response.json());
|
|
3414
|
-
}
|
|
3415
|
-
return ListKeysResponseFromJSONTyped(await response.json(), false);
|
|
3416
|
-
} catch (error) {
|
|
3417
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3387
|
+
if (!response.ok) {
|
|
3388
|
+
return this.handleHttpError(url.toString(), response);
|
|
3418
3389
|
}
|
|
3390
|
+
return ListKeysResponseFromJSONTyped(await response.json(), false);
|
|
3419
3391
|
}
|
|
3420
3392
|
/** {@inheritDoc IKmsRestClient.kmsStoreKey} */
|
|
3421
3393
|
async kmsClientStoreKey(args) {
|
|
@@ -3433,14 +3405,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3433
3405
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3434
3406
|
});
|
|
3435
3407
|
logger.debug(`store key response: ${response}`);
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
return Promise.reject(await response.json());
|
|
3439
|
-
}
|
|
3440
|
-
return StoreKeyResponseFromJSONTyped(await response.json(), false);
|
|
3441
|
-
} catch (error) {
|
|
3442
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3408
|
+
if (!response.ok) {
|
|
3409
|
+
return this.handleHttpError(url, response);
|
|
3443
3410
|
}
|
|
3411
|
+
return StoreKeyResponseFromJSONTyped(await response.json(), false);
|
|
3444
3412
|
}
|
|
3445
3413
|
/** {@inheritDoc IKmsRestClient.kmsGenerateKey} */
|
|
3446
3414
|
async kmsClientGenerateKey(args) {
|
|
@@ -3460,14 +3428,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3460
3428
|
body: JSON.stringify(GenerateKeyGlobalToJSONTyped(body))
|
|
3461
3429
|
});
|
|
3462
3430
|
logger.debug(`generate key response: ${response}`);
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
return Promise.reject(await response.json());
|
|
3466
|
-
}
|
|
3467
|
-
return GenerateKeyResponseFromJSONTyped(await response.json(), false);
|
|
3468
|
-
} catch (error) {
|
|
3469
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3431
|
+
if (!response.ok) {
|
|
3432
|
+
return this.handleHttpError(url, response);
|
|
3470
3433
|
}
|
|
3434
|
+
return GenerateKeyResponseFromJSONTyped(await response.json(), false);
|
|
3471
3435
|
}
|
|
3472
3436
|
/** {@inheritDoc IKmsRestClient.kmsDeleteKey} */
|
|
3473
3437
|
async kmsClientDeleteKey(args) {
|
|
@@ -3477,12 +3441,8 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3477
3441
|
method: "DELETE"
|
|
3478
3442
|
});
|
|
3479
3443
|
logger.debug(`delete key response: ${response}`);
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
return Promise.reject(await response.json());
|
|
3483
|
-
}
|
|
3484
|
-
} catch (error) {
|
|
3485
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3444
|
+
if (!response.ok) {
|
|
3445
|
+
return this.handleHttpError(url, response);
|
|
3486
3446
|
}
|
|
3487
3447
|
return true;
|
|
3488
3448
|
}
|
|
@@ -3494,14 +3454,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3494
3454
|
method: "GET"
|
|
3495
3455
|
});
|
|
3496
3456
|
logger.debug(`get provider response: ${response}`);
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
return Promise.reject(await response.json());
|
|
3500
|
-
}
|
|
3501
|
-
return KeyProviderResponseFromJSONTyped(await response.json(), false);
|
|
3502
|
-
} catch (error) {
|
|
3503
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3457
|
+
if (!response.ok) {
|
|
3458
|
+
return this.handleHttpError(url, response);
|
|
3504
3459
|
}
|
|
3460
|
+
return KeyProviderResponseFromJSONTyped(await response.json(), false);
|
|
3505
3461
|
}
|
|
3506
3462
|
/** {@inheritDoc IKmsRestClient.kmsListKeyProviders} */
|
|
3507
3463
|
async kmsClientListKeyProviders(args) {
|
|
@@ -3511,14 +3467,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3511
3467
|
method: "GET"
|
|
3512
3468
|
});
|
|
3513
3469
|
logger.debug(`list providers response: ${response}`);
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
return Promise.reject(await response.json());
|
|
3517
|
-
}
|
|
3518
|
-
return ListKeyProvidersResponseFromJSONTyped(await response.json(), false);
|
|
3519
|
-
} catch (error) {
|
|
3520
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3470
|
+
if (!response.ok) {
|
|
3471
|
+
return this.handleHttpError(url, response);
|
|
3521
3472
|
}
|
|
3473
|
+
return ListKeyProvidersResponseFromJSONTyped(await response.json(), false);
|
|
3522
3474
|
}
|
|
3523
3475
|
/** {@inheritDoc IKmsRestClient.kmsProviderListKeys} */
|
|
3524
3476
|
async kmsClientProviderListKeys(args) {
|
|
@@ -3528,14 +3480,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3528
3480
|
method: "GET"
|
|
3529
3481
|
});
|
|
3530
3482
|
logger.debug(`list provider keys response: ${response}`);
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
return Promise.reject(await response.json());
|
|
3534
|
-
}
|
|
3535
|
-
return ListKeysResponseFromJSONTyped(await response.json(), false);
|
|
3536
|
-
} catch (error) {
|
|
3537
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3483
|
+
if (!response.ok) {
|
|
3484
|
+
return this.handleHttpError(url, response);
|
|
3538
3485
|
}
|
|
3486
|
+
return ListKeysResponseFromJSONTyped(await response.json(), false);
|
|
3539
3487
|
}
|
|
3540
3488
|
/** {@inheritDoc IKmsRestClient.kmsProviderStoreKey} */
|
|
3541
3489
|
async kmsClientProviderStoreKey(args) {
|
|
@@ -3553,14 +3501,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3553
3501
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3554
3502
|
});
|
|
3555
3503
|
logger.debug(`provider store key response: ${response}`);
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
return Promise.reject(await response.json());
|
|
3559
|
-
}
|
|
3560
|
-
return StoreKeyResponseFromJSONTyped(await response.json(), false);
|
|
3561
|
-
} catch (error) {
|
|
3562
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3504
|
+
if (!response.ok) {
|
|
3505
|
+
return this.handleHttpError(url, response);
|
|
3563
3506
|
}
|
|
3507
|
+
return StoreKeyResponseFromJSONTyped(await response.json(), false);
|
|
3564
3508
|
}
|
|
3565
3509
|
/** {@inheritDoc IKmsRestClient.kmsProviderGenerateKey} */
|
|
3566
3510
|
async kmsClientProviderGenerateKey(args) {
|
|
@@ -3579,14 +3523,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3579
3523
|
body: JSON.stringify(GenerateKeyToJSONTyped(body))
|
|
3580
3524
|
});
|
|
3581
3525
|
logger.debug(`provider generate key response: ${response}`);
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
return Promise.reject(await response.json());
|
|
3585
|
-
}
|
|
3586
|
-
return GenerateKeyResponseFromJSONTyped(await response.json(), false);
|
|
3587
|
-
} catch (error) {
|
|
3588
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3526
|
+
if (!response.ok) {
|
|
3527
|
+
return this.handleHttpError(url, response);
|
|
3589
3528
|
}
|
|
3529
|
+
return GenerateKeyResponseFromJSONTyped(await response.json(), false);
|
|
3590
3530
|
}
|
|
3591
3531
|
/** {@inheritDoc IKmsRestClient.kmsProviderGetKey} */
|
|
3592
3532
|
async kmsClientProviderGetKey(args) {
|
|
@@ -3596,14 +3536,10 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3596
3536
|
method: "GET"
|
|
3597
3537
|
});
|
|
3598
3538
|
logger.debug(`get provider key response: ${response}`);
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
return Promise.reject(await response.json());
|
|
3602
|
-
}
|
|
3603
|
-
return GetKeyResponseFromJSONTyped(await response.json(), false);
|
|
3604
|
-
} catch (error) {
|
|
3605
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3539
|
+
if (!response.ok) {
|
|
3540
|
+
return this.handleHttpError(url, response);
|
|
3606
3541
|
}
|
|
3542
|
+
return GetKeyResponseFromJSONTyped(await response.json(), false);
|
|
3607
3543
|
}
|
|
3608
3544
|
/** {@inheritDoc IKmsRestClient.kmsProviderDeleteKey} */
|
|
3609
3545
|
async kmsClientProviderDeleteKey(args) {
|
|
@@ -3613,12 +3549,8 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3613
3549
|
method: "DELETE"
|
|
3614
3550
|
});
|
|
3615
3551
|
logger.debug(`delete key response: ${response}`);
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
return Promise.reject(await response.json());
|
|
3619
|
-
}
|
|
3620
|
-
} catch (error) {
|
|
3621
|
-
return Promise.reject(Error(`request to ${url} returned ${error}`));
|
|
3552
|
+
if (!response.ok) {
|
|
3553
|
+
return this.handleHttpError(url, response);
|
|
3622
3554
|
}
|
|
3623
3555
|
return true;
|
|
3624
3556
|
}
|
|
@@ -3650,6 +3582,12 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3650
3582
|
}
|
|
3651
3583
|
return url;
|
|
3652
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
|
+
}
|
|
3653
3591
|
};
|
|
3654
3592
|
export {
|
|
3655
3593
|
AwsAssumeRoleCredentialsFromJSON,
|