Files
pwa-push-server/src/VapidKeys.ts
Matthew Raymer ecc2f809bc docs: Add comprehensive JSDoc documentation to all source files
- Add detailed file-level documentation with @fileoverview tags
- Document all classes, methods, interfaces, and properties with JSDoc
- Include author attribution (Matthew Raymer) and version information
- Add rich logging with tagged console messages throughout codebase
- Update all @since dates to reflect actual project timeline (2023-09-06)
- Add current documentation update date (2025-07-23) to README
- Document singleton patterns, async methods, and security considerations
- Add parameter and return value documentation for all functions
- Include TypeORM entity documentation with property descriptions
- Enhance README with project intent and middleware architecture details

Files updated:
- src/main.ts: Server entry point and API route documentation
- src/notificationService.ts: Push delivery and encryption documentation
- src/subscriptionService.ts: Subscription management documentation
- src/vapidService.ts: VAPID key generation and authentication docs
- src/worker.ts: Background worker thread documentation
- src/db.ts: Database service and TypeORM integration docs
- src/Subscription.ts: Database entity documentation
- src/VapidKeys.ts: VAPID keys entity documentation
- README.md: Enhanced project documentation and timeline

This commit significantly improves code maintainability and developer
onboarding by providing comprehensive documentation for the entire
push notification middleware codebase.
2025-07-23 07:36:37 +00:00

36 lines
1.0 KiB
TypeScript

/**
* @fileoverview VAPID keys entity for Time Safari push notifications
*
* This file defines the VapidKeys entity used by TypeORM for database persistence.
* It represents a VAPID (Voluntary Application Server Identification) key pair
* used for authenticating push notification requests.
*
* @author Matthew Raymer
* @version 1.0.0
* @since 2023-09-06
*/
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
/**
* Entity class representing a VAPID key pair
*
* @class VapidKeys
* @description TypeORM entity that maps to the vapid_keys table in the database.
* Stores VAPID public and private keys used for push notification authentication.
*/
@Entity()
export class VapidKeys {
/** Unique identifier for the VAPID key pair */
@PrimaryGeneratedColumn()
id: number;
/** Base64-encoded public key for client-side subscription */
@Column()
publicKey: string;
/** Base64-encoded private key for server-side authentication */
@Column()
privateKey: string;
}