1.0.4
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
OuraBaseto 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.tsto use Deno’s test runner. - The test file now covers all major Oura API endpoints (except
getPersonalInfoandgetRingConfigurationDocuments) 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)
- Reuses a single Oura client instance with
Full Changelog: 1.0.3...1.0.4