/** * Ductape Sessions Module * * Provides a unified API for JWT-based session management including * creating, refreshing, verifying, and revoking sessions. * * @example * ```ts * import { SessionsService } from '@ductape/sdk'; * * const sessions = new SessionsService({ * workspace_id: 'your-workspace-id', * public_key: 'your-public-key', * user_id: 'your-user-id', * token: 'your-token', * env_type: 'prd', * }); * * // Create a session * const result = await sessions.create({ * product: 'my-product', * env: 'production', * tag: 'user-session', * data: { userId: '123', email: 'user@example.com' }, * }); * * // Verify a session * const verifyResult = await sessions.verify({ * product: 'my-product', * env: 'production', * tag: 'user-session', * token: result.token, * }); * * // Refresh a session * const refreshResult = await sessions.refresh({ * product: 'my-product', * env: 'production', * tag: 'user-session', * refreshToken: result.refreshToken, * }); * ``` */ export { SessionsService, SessionError } from './sessions.service'; export { default as SessionsServiceDefault } from './sessions.service'; export { SESSION_PATTERN, SESSION_PATTERN_GLOBAL, parseSessionToken, isSessionReference, containsSessionReferences, extractSessionReferences, getNestedValue, verifySessionToken, extractSessionContext, mightContainSessions, findAllSessionReferences, createSessionsResolver, SessionResolutionError, clearSessionCache, getSessionCacheStats, } from './sessions.resolver'; export type { ISessionTokenParts, ISessionData, ISessionCheck, IResolveSessionOptions, ISessionResolutionResult, ISessionContext, } from './sessions.resolver'; export { verifyAndExtractSession, getSessionLogFields, resolveSessionReferences, processSessionForExecution, } from './sessions.helper'; export type { ISessionVerificationResult, ISessionLogFields, } from './sessions.helper'; export * from './types';