diff --git a/src/index.ts b/src/index.ts index 90c761a0bd..5b4990f7d6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,13 +1,21 @@ export { compactDecrypt } from './jwe/compact/decrypt.js' +export type { CompactDecryptGetKey } from './jwe/compact/decrypt.js' export { flattenedDecrypt } from './jwe/flattened/decrypt.js' +export type { FlattenedDecryptGetKey } from './jwe/flattened/decrypt.js' export { generalDecrypt } from './jwe/general/decrypt.js' +export type { GeneralDecryptGetKey } from './jwe/general/decrypt.js' export { compactVerify } from './jws/compact/verify.js' +export type { CompactVerifyGetKey } from './jws/compact/verify.js' export { flattenedVerify } from './jws/flattened/verify.js' +export type { FlattenedVerifyGetKey } from './jws/flattened/verify.js' export { generalVerify } from './jws/general/verify.js' +export type { GeneralVerifyGetKey } from './jws/general/verify.js' export { jwtVerify } from './jwt/verify.js' +export type { JWTVerifyOptions, JWTVerifyGetKey } from './jwt/verify.js' export { jwtDecrypt } from './jwt/decrypt.js' +export type { JWTDecryptOptions, JWTDecryptGetKey } from './jwt/decrypt.js' export { CompactEncrypt } from './jwe/compact/encrypt.js' export { FlattenedEncrypt } from './jwe/flattened/encrypt.js' @@ -15,6 +23,7 @@ export { FlattenedEncrypt } from './jwe/flattened/encrypt.js' export { CompactSign } from './jws/compact/sign.js' export { FlattenedSign } from './jws/flattened/sign.js' export { GeneralSign } from './jws/general/sign.js' +export type { Signature } from './jws/general/sign.js' export { SignJWT } from './jwt/sign.js' export { EncryptJWT } from './jwt/encrypt.js' @@ -23,18 +32,57 @@ export { calculateJwkThumbprint } from './jwk/thumbprint.js' export { EmbeddedJWK } from './jwk/embedded.js' export { createRemoteJWKSet } from './jwks/remote.js' +export type { RemoteJWKSetOptions } from './jwks/remote.js' export { UnsecuredJWT } from './jwt/unsecured.js' +export type { UnsecuredResult } from './jwt/unsecured.js' export { exportPKCS8, exportSPKI, exportJWK } from './key/export.js' export { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js' +export type { PEMImportOptions } from './key/import.js' export { decodeProtectedHeader } from './util/decode_protected_header.js' +export type { ProtectedHeaderParameters } from './util/decode_protected_header.js' export * as errors from './util/errors.js' export { generateKeyPair } from './key/generate_key_pair.js' +export type { GenerateKeyPairResult, GenerateKeyPairOptions } from './key/generate_key_pair.js' export { generateSecret } from './key/generate_secret.js' +export type { GenerateSecretOptions } from './key/generate_secret.js' export * as base64url from './util/base64url.js' + +export type { + KeyLike, + JWK, + FlattenedJWSInput, + GeneralJWSInput, + FlattenedJWS, + GeneralJWS, + JoseHeaderParameters, + JWSHeaderParameters, + JWEKeyManagementHeaderParameters, + FlattenedJWE, + GeneralJWE, + JWEHeaderParameters, + CritOption, + DecryptOptions, + EncryptOptions, + JWTClaimVerificationOptions, + VerifyOptions, + SignOptions, + JWTPayload, + DeflateFunction, + InflateFunction, + FlattenedDecryptResult, + GeneralDecryptResult, + CompactDecryptResult, + FlattenedVerifyResult, + GeneralVerifyResult, + CompactVerifyResult, + JWTVerifyResult, + JWTDecryptResult, + ResolvedKey, +} from './types.d'