Service Layer low complexity backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Backend service that manages Terms of Service versioning, serves the current version to the frontend, and records explicit acceptance events with timestamps. Called during onboarding and demo booking flows to enforce acceptance of the current ToS version before subscription activation.

Feature: Terms of Service

tos-version-service

Responsibilities

  • Serve current ToS version identifier and effective date
  • Record timestamped ToS acceptance events tied to organization and user
  • Validate that the accepted version matches the current published version
  • Expose version history for changelog display

Interfaces

getCurrentVersion(): TosVersion
recordAcceptance(userId: string, orgId: string, version: string, timestamp: Date): void
hasAcceptedCurrentVersion(orgId: string): boolean
getVersionHistory(): TosVersion[]