Skip to content

Docs: Complete Heart API reference with missing methods #53

@kluth

Description

@kluth

Problem

Heart API Reference section is incomplete, missing several important methods that are documented in usage examples.

Affected Files

Documentation: /home/matthias/projects/synapse/docs/systems/circulatory/README.md (lines 676-711)

Issue Details

Severity: HIGH
Impact: Developers consulting API reference won't find important methods

Missing from API Reference

The following methods are documented in usage sections but NOT in the formal API Reference:

  1. onDeadLetter() - Documented in usage (lines 527-535) but not in API Reference
  2. getStatistics() - Documented in usage (lines 541-546) but not in API Reference
  3. getQueueSize() - Documented in usage (lines 548-554) but not in API Reference
  4. onAcknowledge() - Documented in usage but not in API Reference

Missing Type Definitions

API Reference also lacks:

  • HeartOptions interface definition
  • PublishOptions interface definition
  • HeartStatistics interface definition

Impact

Developers consulting the formal API reference will miss key methods and configuration options.

Required Additions

interface HeartOptions {
  persistence?: boolean;      // Enable message persistence (default: false)
  maxQueueSize?: number;      // Maximum queue capacity (default: 10000)
}

interface HeartStatistics {
  published: number;
  delivered: number;
  failed: number;
  deadLettered: number;
}

class Heart {
  constructor(options?: HeartOptions);
  
  // ... existing methods ...
  
  // Add these to API Reference:
  onDeadLetter(handler: (cell: BloodCell) => void): void;
  onAcknowledge(handler: (cell: BloodCell) => void): void;
  getStatistics(): HeartStatistics;
  getQueueSize(): number;
}

Priority

HIGH - API reference is critical documentation for developers

References

User Story

As a developer, I want a complete API reference for the Heart class, so that I can discover and use all available methods without searching through usage examples.

Acceptance Criteria

  • Add all missing methods to API Reference section
  • Document HeartOptions interface with defaults and descriptions
  • Document HeartStatistics interface
  • Document PublishOptions interface
  • Include return types and parameters for all methods
  • Add behavioral descriptions for each method

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationhighHigh priority - fix this sprint

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions