import { RecordOrUndef, SimpleAuthenticatedUser } from '../types/chatbot/chatbot-types.mjs'; import '@aws-sdk/client-bedrock-agent-runtime'; import '@aws-sdk/client-bedrock-agentcore'; /** * Converts a payload containing a userId and optional customUserData into a JWT string. * * Here the generic T is the type of the customUserData field. If not known, pass unknown. * * @param payload The payload to convert to a JWT string. * @returns A JWT string. */ declare function convertToJwtString(payload: SimpleAuthenticatedUser, jwtSecret: string): string; /** * Extracts the payload from a JWT string. If successful, the first value in the tuple will be the SimpleAuthenticatedUser object. * If not successful, the first value in the tuple will be the number of the HTTP status code and the second value will be the error message, * so check the first value to see if it is a number and if it is, then the second value will be the error message. * * Here the generic T is the type of the customUserData field. If not known, pass unknown. * @param jwtToken - The JWT string to decode. Can include "Bearer " prefix which will be stripped. * @returns An object containing the userId and optional customUserData or the number of the HTTP status code and the error message. */ declare function extractFromJwtString(jwtToken: string, jwtSecret: string): [SimpleAuthenticatedUser | number, string | undefined]; export { convertToJwtString, extractFromJwtString };