Closed greinard closed 3 weeks ago
[!CAUTION]
Review failed
The pull request is closed.
This pull request introduces several new asynchronous functions across multiple files to retrieve mindful and therapy minutes data from various health data providers, including Apple Health and Google Fit. Each function accepts startDate
and endDate
parameters and returns a promise resolving to a DailyDataQueryResult
. Additionally, new data types and localization strings have been added to support these features, enhancing the application's ability to track and display mindfulness and therapy metrics.
File Path | Change Summary |
---|---|
src/helpers/daily-data-providers/apple-health-mindful-minutes.ts |
Added async function to retrieve mindful minutes data from Apple Health. |
src/helpers/daily-data-providers/apple-health-therapy-minutes.ts |
Added async function to retrieve therapy minutes data from Apple Health. |
src/helpers/daily-data-providers/combined-mindful-minutes.ts |
Added async function to combine mindful minutes data from various providers based on user settings. |
src/helpers/daily-data-providers/combined-therapy-minutes.ts |
Added async function to combine therapy minutes data from various providers based on user settings. |
src/helpers/daily-data-providers/common-mindful-and-therapy.ts |
Introduced functions for data point processing: isSilverCloudCbtDataPoint , collateDataPoints , and combineResults . |
src/helpers/daily-data-providers/google-fit-mindful-minutes.ts |
Added async function to retrieve mindful minutes data from Google Fit. |
src/helpers/daily-data-providers/google-fit-therapy-minutes.ts |
Added async function to retrieve therapy minutes data from Google Fit. |
src/helpers/daily-data-providers/index.ts |
Added new exports for the newly created data providers. |
src/helpers/daily-data-types.tsx |
Added new enum values for daily data types related to mindful and therapy minutes. |
src/helpers/daily-data-types/apple-health.tsx |
Added new data types for Apple Health mindful and therapy minutes. |
src/helpers/daily-data-types/combined.tsx |
Added new data types for combined mindful and therapy minutes. |
src/helpers/daily-data-types/google-fit.tsx |
Added new data types for Google Fit mindful and therapy minutes. |
src/helpers/strings-de.ts |
Added German translations for mindful and therapy minutes. |
src/helpers/strings-en.ts |
Added English translations for mindful and therapy minutes. |
src/helpers/strings-es.ts |
Added Spanish translations for mindful and therapy minutes. |
src/helpers/strings-fr.ts |
Added French translations for mindful and therapy minutes. |
src/helpers/strings-it.ts |
Added Italian translations for mindful and therapy minutes. |
src/helpers/strings-nl.ts |
Added Dutch translations for mindful and therapy minutes. |
src/helpers/strings-pl.ts |
Added Polish translations for mindful and therapy minutes. |
src/helpers/strings-pt.ts |
Added Portuguese translations for mindful and therapy minutes. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Thanks @ajmenca.
Overview
This branch adds a couple new daily data types for Mindful and Therapy minutes.
Some technical notes:
MindfulSession
data points that are NOT SilverCloud CBT sessions.ActivitySegment
data points with a value of "meditation".MindfulSession
data points that are SilverCloud CBT sessions.SilverCloudSession
data points.For the Apple Health data points, a SilverCloud CBT session is defined as a
MindfulSession
data point with aSourceIdentifier
source property set to "com.silvercloudhealth.SilverCloud" and aMetadata_sub-type
source property set to "CBT".Security
REMINDER: All file contents are public.
[x] I have ensured no secure credentials or sensitive information remain in code, metadata, comments, etc.
[x] These changes do not introduce any security risks, or any such risks have been properly mitigated.
No new security risks. This just adds a couple pre-defined queries for use as daily data types. The data is already available via the delegated API.
Checklist
Testing
Documentation
N/A
Summary by CodeRabbit
Release Notes
New Features
Localization
Bug Fixes