export interface TokenPayload {
  sub: string;
  email?: string;
  role?: string;
  productId?: string;
  type?: 'access' | 'refresh';
  [key: string]: unknown;
}

export interface AuthPayload {
  sub: string;
  email?: string;
  role?: string;
  productId?: string;
  type?: string;
}

export interface JwtUtilsOptions {
  issuer: string;
  accessTokenExpiry?: string;
  refreshTokenExpiry?: string;
}

export interface JwtUtils {
  createAccessToken(payload: {
    sub: string;
    email: string;
    role: string;
    productId?: string;
  }): Promise<string>;
  createRefreshToken(payload: { sub: string; productId?: string }): Promise<string>;
  verifyToken(token: string): Promise<TokenPayload | null>;
}
