Skip to content

1.0.4

Choose a tag to compare

@Pinta365 Pinta365 released this 01 Jul 17:49
· 8 commits to main since this release

Refactored OuraBase Endpoint Methods

  • Introduced two new private generic helper methods in OuraBase:
    • getDocuments<T>(endpoint, startDate, endDate, accessToken?)
    • getDocumentById<T>(endpoint, documentId, accessToken?)
  • Refactored all repetitive endpoint methods in OuraBase to use these helpers, significantly reducing boilerplate and improving maintainability.
  • The logic for fetching lists of documents and single documents by ID is now DRY and easier to extend.

Added Sandbox API Tests

  • Created src/oura_sandbox_test.ts to use Deno’s test runner.
  • The test file now covers all major Oura API endpoints (except getPersonalInfo and getRingConfigurationDocuments) in sandbox mode.
  • Each test:
    • Reuses a single Oura client instance with { useSandbox: true }
    • Calls an endpoint with reasonable parameters
    • Asserts that the response is an array (and, for activities, that array items are objects if present)

Full Changelog: 1.0.3...1.0.4