Releases: Pinta365/oura_api
1.0.6
- Types: API types are now generated from Oura’s OpenAPI spec (
openapi-typegen) and timestamps are typed asstring. Manual type files are no longer used. - Auth: README updated: Personal Access Tokens are deprecated; OAuth2 is the supported way to authenticate.
- Publish: Added a GitHub Actions workflow to publish the package to npm when you create a release.
1.0.5
-
New Client-Side Only OAuth Development Flow: Added a simple development server to help you quickly get an access token for testing. Just run
deno run --allow-net examples/client-oauth.ts, open your browser tohttp://localhost:3000, and follow the prompts to get your token. This is perfect for quick development cycles and testing API endpoints without needing a full server-side setup. -
Updated OAuth Server Example: The
full-oauth-server.tsexample has been renamed and reworked to provide a clearer, more complete demonstration of a full OAuth 2.0 authorization code flow. -
Deprecation Warning for PATs: The README has been updated with a clear warning about the upcoming deprecation of Personal Access Tokens by Oura. We highly recommend all developers transition to using OAuth 2.0 for both development and production.
Full Changelog: 1.0.4...1.0.5
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
1.0.3
Adding some new error types and more error detail.
Full Changelog: 1.0.2...1.0.3
1.0.2
Small type changes to align with 1.23 of the api.
- Adding breathing_disturbance_index to the DailySpo2-interface
- Adding "gen4" to the RingHardwareType union-type.
Full Changelog: 1.0.1...1.0.2
1.0.1
- Small type change for OAuth to align with 1.22 of the api.
- Explicitly mark fetchData as an overridden method.
Full Changelog: 1.0.0...1.0.1
1.0.0
Version 1.
Full Changelog: 0.7.0...1.0.0
0.7.0
Quite a large refactor of the code base as well as helper functions to simplify OAuth2 usage.
Breaking changes
The data fetching functions like for example getDailyActivityDocuments, getDailyReadinessDocuments etc, that returns an array of documents now only return the data array object and not the complete return object. Paginated responses will be resolved before they are returned to the user.
Before:
{ "data": [ {}, {}, {} ], "next_token": "string" }
After:
[ {}, {}, {} ]
See example codes for more info.
New features
- A new OuraOAuth class containing helper functions to simplify OAuth2 usage.
- Adding Cardiovascular Age routes
- Adding VO2 Max routes
- Example files to show case using a Personal Access Token, OAuth2 and the Sandbox environment.
Full Changelog: 0.6.0...0.7.0
0.6.0
Version bump
Full Changelog: 0.5.9...0.6.0
0.5.9
- Adding support for the Sandbox routes (cloud.ouraring.com/v2/docs#tag/Sandbox-Routes)
See this readme section for info.
Full Changelog: 0.5.8...0.5.9