From e1222ba1200fae7ec8d75bf0e8e9fcc85d57b5e5 Mon Sep 17 00:00:00 2001 From: mikepsinn Date: Wed, 30 Jun 2021 16:25:47 -0500 Subject: [PATCH 01/37] SDKs --- .env.example | 24 + .gitignore | 5 +- docs/api-documentation.md | 9 + docs/contributing.md | 170 +- docs/open-api-v3.yaml | 11124 ++++++++++++++++ gulpfile.js | 2 +- secrets/.env.example | 5 - src/api/core/ApiError.js | 30 + src/api/core/ApiError.js.map | 1 + src/api/core/ApiError.ts | 20 + src/api/core/ApiRequestOptions.js | 3 + src/api/core/ApiRequestOptions.js.map | 1 + src/api/core/ApiRequestOptions.ts | 14 + src/api/core/ApiResult.js | 3 + src/api/core/ApiResult.js.map | 1 + src/api/core/ApiResult.ts | 10 + src/api/core/OpenAPI.js | 13 + src/api/core/OpenAPI.js.map | 1 + src/api/core/OpenAPI.ts | 27 + src/api/core/request.js | 272 + src/api/core/request.js.map | 1 + src/api/core/request.ts | 205 + src/api/index.js | 192 + src/api/index.js.map | 10 + src/api/index.ts | 105 + src/api/models/ActivitiesResponse.js | 6 + src/api/models/ActivitiesResponse.js.map | 1 + src/api/models/ActivitiesResponse.ts | 54 + src/api/models/Activity.js | 6 + src/api/models/Activity.js.map | 1 + src/api/models/Activity.ts | 66 + src/api/models/AppSettings.js | 6 + src/api/models/AppSettings.js.map | 1 + src/api/models/AppSettings.ts | 88 + src/api/models/AppSettingsResponse.js | 6 + src/api/models/AppSettingsResponse.js.map | 1 + src/api/models/AppSettingsResponse.ts | 40 + src/api/models/AuthorizedClients.js | 6 + src/api/models/AuthorizedClients.js.map | 1 + src/api/models/AuthorizedClients.ts | 20 + src/api/models/Button.js | 6 + src/api/models/Button.js.map | 1 + src/api/models/Button.ts | 86 + src/api/models/Card.js | 6 + src/api/models/Card.js.map | 1 + src/api/models/Card.ts | 84 + src/api/models/Chart.js | 6 + src/api/models/Chart.js.map | 1 + src/api/models/Chart.ts | 30 + src/api/models/CommonResponse.js | 6 + src/api/models/CommonResponse.js.map | 1 + src/api/models/CommonResponse.ts | 38 + src/api/models/ConnectInstructions.js | 6 + src/api/models/ConnectInstructions.js.map | 1 + src/api/models/ConnectInstructions.ts | 18 + src/api/models/ConversionStep.js | 18 + src/api/models/ConversionStep.js.map | 1 + src/api/models/ConversionStep.ts | 27 + src/api/models/Correlation.js | 6 + src/api/models/Correlation.js.map | 1 + src/api/models/Correlation.ts | 410 + src/api/models/DataSource.js | 6 + src/api/models/DataSource.js.map | 1 + src/api/models/DataSource.ts | 149 + src/api/models/DeviceToken.js | 6 + src/api/models/DeviceToken.js.map | 1 + src/api/models/DeviceToken.ts | 18 + src/api/models/Error.js | 6 + src/api/models/Error.js.map | 1 + src/api/models/Error.ts | 10 + src/api/models/Explanation.js | 6 + src/api/models/Explanation.js.map | 1 + src/api/models/Explanation.ts | 27 + src/api/models/ExplanationStartTracking.js | 6 + .../models/ExplanationStartTracking.js.map | 1 + src/api/models/ExplanationStartTracking.ts | 17 + src/api/models/FeedResponse.js | 6 + src/api/models/FeedResponse.js.map | 1 + src/api/models/FeedResponse.ts | 39 + src/api/models/Friend.js | 6 + src/api/models/Friend.js.map | 1 + src/api/models/Friend.ts | 34 + src/api/models/FriendsResponse.js | 6 + src/api/models/FriendsResponse.js.map | 1 + src/api/models/FriendsResponse.ts | 54 + src/api/models/GetConnectorsResponse.js | 6 + src/api/models/GetConnectorsResponse.js.map | 1 + src/api/models/GetConnectorsResponse.ts | 40 + src/api/models/GetCorrelationsDataResponse.js | 6 + .../models/GetCorrelationsDataResponse.js.map | 1 + src/api/models/GetCorrelationsDataResponse.ts | 42 + src/api/models/GetCorrelationsResponse.js | 6 + src/api/models/GetCorrelationsResponse.js.map | 1 + src/api/models/GetCorrelationsResponse.ts | 44 + src/api/models/GetSharesResponse.js | 6 + src/api/models/GetSharesResponse.js.map | 1 + src/api/models/GetSharesResponse.ts | 40 + src/api/models/GetStudiesResponse.js | 6 + src/api/models/GetStudiesResponse.js.map | 1 + src/api/models/GetStudiesResponse.ts | 37 + ...etTrackingReminderNotificationsResponse.js | 6 + ...ackingReminderNotificationsResponse.js.map | 1 + ...etTrackingReminderNotificationsResponse.ts | 40 + src/api/models/Group.js | 6 + src/api/models/Group.js.map | 1 + src/api/models/Group.ts | 46 + src/api/models/GroupsMember.js | 6 + src/api/models/GroupsMember.js.map | 1 + src/api/models/GroupsMember.ts | 58 + src/api/models/GroupsMembersResponse.js | 6 + src/api/models/GroupsMembersResponse.js.map | 1 + src/api/models/GroupsMembersResponse.ts | 54 + src/api/models/GroupsResponse.js | 6 + src/api/models/GroupsResponse.js.map | 1 + src/api/models/GroupsResponse.ts | 54 + src/api/models/Image.js | 6 + src/api/models/Image.js.map | 1 + src/api/models/Image.ts | 18 + src/api/models/InputField.js | 27 + src/api/models/InputField.js.map | 1 + src/api/models/InputField.ts | 119 + src/api/models/JsonErrorResponse.js | 6 + src/api/models/JsonErrorResponse.js.map | 1 + src/api/models/JsonErrorResponse.ts | 42 + src/api/models/Measurement.js | 39 + src/api/models/Measurement.js.map | 1 + src/api/models/Measurement.ts | 231 + src/api/models/MeasurementItem.js | 6 + src/api/models/MeasurementItem.js.map | 1 + src/api/models/MeasurementItem.ts | 18 + src/api/models/MeasurementSet.js | 47 + src/api/models/MeasurementSet.js.map | 1 + src/api/models/MeasurementSet.ts | 78 + src/api/models/MeasurementUpdate.js | 6 + src/api/models/MeasurementUpdate.js.map | 1 + src/api/models/MeasurementUpdate.ts | 22 + src/api/models/MessagesMessage.js | 6 + src/api/models/MessagesMessage.js.map | 1 + src/api/models/MessagesMessage.ts | 34 + src/api/models/MessagesMessagesResponse.js | 6 + .../models/MessagesMessagesResponse.js.map | 1 + src/api/models/MessagesMessagesResponse.ts | 54 + src/api/models/MessagesNotice.js | 6 + src/api/models/MessagesNotice.js.map | 1 + src/api/models/MessagesNotice.ts | 30 + src/api/models/MessagesNoticesResponse.js | 6 + src/api/models/MessagesNoticesResponse.js.map | 1 + src/api/models/MessagesNoticesResponse.ts | 62 + src/api/models/MessagesRecipient.js | 6 + src/api/models/MessagesRecipient.js.map | 1 + src/api/models/MessagesRecipient.ts | 34 + src/api/models/MessagesRecipientsResponse.js | 6 + .../models/MessagesRecipientsResponse.js.map | 1 + src/api/models/MessagesRecipientsResponse.ts | 54 + src/api/models/Notification.js | 6 + src/api/models/Notification.js.map | 1 + src/api/models/Notification.ts | 42 + src/api/models/NotificationsResponse.js | 6 + src/api/models/NotificationsResponse.js.map | 1 + src/api/models/NotificationsResponse.ts | 54 + src/api/models/Pair.js | 6 + src/api/models/Pair.js.map | 1 + src/api/models/Pair.ts | 46 + src/api/models/ParticipantInstruction.js | 6 + src/api/models/ParticipantInstruction.js.map | 1 + src/api/models/ParticipantInstruction.ts | 14 + .../models/PostMeasurementsDataResponse.js | 6 + .../PostMeasurementsDataResponse.js.map | 1 + .../models/PostMeasurementsDataResponse.ts | 40 + src/api/models/PostMeasurementsResponse.js | 6 + .../models/PostMeasurementsResponse.js.map | 1 + src/api/models/PostMeasurementsResponse.ts | 44 + src/api/models/PostStudyCreateResponse.js | 6 + src/api/models/PostStudyCreateResponse.js.map | 1 + src/api/models/PostStudyCreateResponse.ts | 40 + src/api/models/PostStudyPublishResponse.js | 6 + .../models/PostStudyPublishResponse.js.map | 1 + src/api/models/PostStudyPublishResponse.ts | 38 + .../PostTrackingRemindersDataResponse.js | 6 + .../PostTrackingRemindersDataResponse.js.map | 1 + .../PostTrackingRemindersDataResponse.ts | 44 + .../models/PostTrackingRemindersResponse.js | 6 + .../PostTrackingRemindersResponse.js.map | 1 + .../models/PostTrackingRemindersResponse.ts | 44 + .../models/PostUserSettingsDataResponse.js | 6 + .../PostUserSettingsDataResponse.js.map | 1 + .../models/PostUserSettingsDataResponse.ts | 42 + src/api/models/PostUserSettingsResponse.js | 6 + .../models/PostUserSettingsResponse.js.map | 1 + src/api/models/PostUserSettingsResponse.ts | 44 + src/api/models/ShareInvitationBody.js | 6 + src/api/models/ShareInvitationBody.js.map | 1 + src/api/models/ShareInvitationBody.ts | 26 + src/api/models/Study.js | 6 + src/api/models/Study.js.map | 1 + src/api/models/Study.ts | 57 + src/api/models/StudyCharts.js | 6 + src/api/models/StudyCharts.js.map | 1 + src/api/models/StudyCharts.ts | 16 + src/api/models/StudyCreationBody.js | 19 + src/api/models/StudyCreationBody.js.map | 1 + src/api/models/StudyCreationBody.ts | 36 + src/api/models/StudyHtml.js | 6 + src/api/models/StudyHtml.js.map | 1 + src/api/models/StudyHtml.ts | 62 + src/api/models/StudyImages.js | 6 + src/api/models/StudyImages.js.map | 1 + src/api/models/StudyImages.ts | 46 + src/api/models/StudyJoinResponse.js | 6 + src/api/models/StudyJoinResponse.js.map | 1 + src/api/models/StudyJoinResponse.ts | 44 + src/api/models/StudyLinks.js | 6 + src/api/models/StudyLinks.js.map | 1 + src/api/models/StudyLinks.ts | 34 + src/api/models/StudySharing.js | 6 + src/api/models/StudySharing.js.map | 1 + src/api/models/StudySharing.ts | 18 + src/api/models/StudyText.js | 6 + src/api/models/StudyText.js.map | 1 + src/api/models/StudyText.ts | 135 + src/api/models/StudyVotes.js | 6 + src/api/models/StudyVotes.js.map | 1 + src/api/models/StudyVotes.ts | 14 + src/api/models/TrackingReminder.js | 47 + src/api/models/TrackingReminder.js.map | 1 + src/api/models/TrackingReminder.ts | 384 + .../models/TrackingReminderNotification.js | 47 + .../TrackingReminderNotification.js.map | 1 + .../models/TrackingReminderNotification.ts | 364 + .../TrackingReminderNotificationAction.js | 6 + .../TrackingReminderNotificationAction.js.map | 1 + .../TrackingReminderNotificationAction.ts | 30 + .../TrackingReminderNotificationPost.js | 19 + .../TrackingReminderNotificationPost.js.map | 1 + .../TrackingReminderNotificationPost.ts | 32 + ...ckingReminderNotificationTrackAllAction.js | 6 + ...gReminderNotificationTrackAllAction.js.map | 1 + ...ckingReminderNotificationTrackAllAction.ts | 22 + src/api/models/Unit.js | 28 + src/api/models/Unit.js.map | 1 + src/api/models/Unit.ts | 85 + src/api/models/UnitCategory.js | 6 + src/api/models/UnitCategory.js.map | 1 + src/api/models/UnitCategory.ts | 18 + src/api/models/User.js | 6 + src/api/models/User.js.map | 1 + src/api/models/User.ts | 211 + src/api/models/UserTag.js | 6 + src/api/models/UserTag.js.map | 1 + src/api/models/UserTag.ts | 18 + src/api/models/UserVariableDelete.js | 6 + src/api/models/UserVariableDelete.js.map | 1 + src/api/models/UserVariableDelete.ts | 10 + src/api/models/UsersResponse.js | 6 + src/api/models/UsersResponse.js.map | 1 + src/api/models/UsersResponse.ts | 54 + src/api/models/Variable.js | 56 + src/api/models/Variable.js.map | 1 + src/api/models/Variable.ts | 630 + src/api/models/VariableCategory.js | 39 + src/api/models/VariableCategory.js.map | 1 + src/api/models/VariableCategory.ts | 156 + src/api/models/VariableCharts.js | 6 + src/api/models/VariableCharts.js.map | 1 + src/api/models/VariableCharts.ts | 17 + src/api/models/Vote.js | 27 + src/api/models/Vote.js.map | 1 + src/api/models/Vote.ts | 64 + src/api/services/ActivitiesService.js | 139 + src/api/services/ActivitiesService.js.map | 1 + src/api/services/ActivitiesService.ts | 101 + src/api/services/AnalyticsService.js | 144 + src/api/services/AnalyticsService.js.map | 1 + src/api/services/AnalyticsService.ts | 113 + src/api/services/AppSettingsService.js | 80 + src/api/services/AppSettingsService.js.map | 1 + src/api/services/AppSettingsService.ts | 37 + src/api/services/AuthenticationService.js | 159 + src/api/services/AuthenticationService.js.map | 1 + src/api/services/AuthenticationService.ts | 109 + src/api/services/ConnectorsService.js | 235 + src/api/services/ConnectorsService.js.map | 1 + src/api/services/ConnectorsService.ts | 163 + src/api/services/FeedService.js | 119 + src/api/services/FeedService.js.map | 1 + src/api/services/FeedService.ts | 77 + src/api/services/FriendsService.js | 139 + src/api/services/FriendsService.js.map | 1 + src/api/services/FriendsService.ts | 101 + src/api/services/GroupsService.js | 231 + src/api/services/GroupsService.js.map | 1 + src/api/services/GroupsService.ts | 194 + src/api/services/MeasurementsService.js | 286 + src/api/services/MeasurementsService.js.map | 1 + src/api/services/MeasurementsService.ts | 249 + src/api/services/MessagesService.js | 323 + src/api/services/MessagesService.js.map | 1 + src/api/services/MessagesService.ts | 287 + src/api/services/NotificationsService.js | 195 + src/api/services/NotificationsService.js.map | 1 + src/api/services/NotificationsService.ts | 144 + src/api/services/RemindersService.js | 223 + src/api/services/RemindersService.js.map | 1 + src/api/services/RemindersService.ts | 177 + src/api/services/SharesService.js | 150 + src/api/services/SharesService.js.map | 1 + src/api/services/SharesService.ts | 103 + src/api/services/StudiesService.js | 524 + src/api/services/StudiesService.js.map | 1 + src/api/services/StudiesService.ts | 516 + src/api/services/UnitsService.js | 97 + src/api/services/UnitsService.js.map | 1 + src/api/services/UnitsService.ts | 44 + src/api/services/UserService.js | 213 + src/api/services/UserService.js.map | 1 + src/api/services/UserService.ts | 174 + src/api/services/VariablesService.js | 347 + src/api/services/VariablesService.js.map | 1 + src/api/services/VariablesService.ts | 316 + src/api/tsconfig.json | 68 + ...Black-Circle-QM-Rainbow-Logo-1024-1024.png | Bin 0 -> 99947 bytes .../quantimodo-logo-qm-rainbow-150x150.jpg | Bin 0 -> 37045 bytes .../quantimodo-logo-qm-rainbow-200-200.png | Bin 0 -> 57553 bytes ...imodo-logo-qm-rainbow-black-background.png | Bin 0 -> 20980 bytes .../quantimodo-logos-rainbow-1200-630.gif | Bin 0 -> 26383 bytes .../quantimodo-logos-rainbow-1200-630.png | Bin 0 -> 8398 bytes .../quantimodo-logos-rainbow-600-315.png | Bin 0 -> 8398 bytes ts/env-helper.js | 85 +- ts/env-helper.js.map | 11 +- ts/env-helper.ts | 50 +- ts/qm.app-settings.js | 8 +- ts/qm.app-settings.js.map | 2 +- ts/qm.app-settings.ts | 46 +- 333 files changed, 25433 insertions(+), 154 deletions(-) create mode 100644 .env.example create mode 100644 docs/api-documentation.md create mode 100644 docs/open-api-v3.yaml delete mode 100644 secrets/.env.example create mode 100644 src/api/core/ApiError.js create mode 100644 src/api/core/ApiError.js.map create mode 100644 src/api/core/ApiError.ts create mode 100644 src/api/core/ApiRequestOptions.js create mode 100644 src/api/core/ApiRequestOptions.js.map create mode 100644 src/api/core/ApiRequestOptions.ts create mode 100644 src/api/core/ApiResult.js create mode 100644 src/api/core/ApiResult.js.map create mode 100644 src/api/core/ApiResult.ts create mode 100644 src/api/core/OpenAPI.js create mode 100644 src/api/core/OpenAPI.js.map create mode 100644 src/api/core/OpenAPI.ts create mode 100644 src/api/core/request.js create mode 100644 src/api/core/request.js.map create mode 100644 src/api/core/request.ts create mode 100644 src/api/index.js create mode 100644 src/api/index.js.map create mode 100644 src/api/index.ts create mode 100644 src/api/models/ActivitiesResponse.js create mode 100644 src/api/models/ActivitiesResponse.js.map create mode 100644 src/api/models/ActivitiesResponse.ts create mode 100644 src/api/models/Activity.js create mode 100644 src/api/models/Activity.js.map create mode 100644 src/api/models/Activity.ts create mode 100644 src/api/models/AppSettings.js create mode 100644 src/api/models/AppSettings.js.map create mode 100644 src/api/models/AppSettings.ts create mode 100644 src/api/models/AppSettingsResponse.js create mode 100644 src/api/models/AppSettingsResponse.js.map create mode 100644 src/api/models/AppSettingsResponse.ts create mode 100644 src/api/models/AuthorizedClients.js create mode 100644 src/api/models/AuthorizedClients.js.map create mode 100644 src/api/models/AuthorizedClients.ts create mode 100644 src/api/models/Button.js create mode 100644 src/api/models/Button.js.map create mode 100644 src/api/models/Button.ts create mode 100644 src/api/models/Card.js create mode 100644 src/api/models/Card.js.map create mode 100644 src/api/models/Card.ts create mode 100644 src/api/models/Chart.js create mode 100644 src/api/models/Chart.js.map create mode 100644 src/api/models/Chart.ts create mode 100644 src/api/models/CommonResponse.js create mode 100644 src/api/models/CommonResponse.js.map create mode 100644 src/api/models/CommonResponse.ts create mode 100644 src/api/models/ConnectInstructions.js create mode 100644 src/api/models/ConnectInstructions.js.map create mode 100644 src/api/models/ConnectInstructions.ts create mode 100644 src/api/models/ConversionStep.js create mode 100644 src/api/models/ConversionStep.js.map create mode 100644 src/api/models/ConversionStep.ts create mode 100644 src/api/models/Correlation.js create mode 100644 src/api/models/Correlation.js.map create mode 100644 src/api/models/Correlation.ts create mode 100644 src/api/models/DataSource.js create mode 100644 src/api/models/DataSource.js.map create mode 100644 src/api/models/DataSource.ts create mode 100644 src/api/models/DeviceToken.js create mode 100644 src/api/models/DeviceToken.js.map create mode 100644 src/api/models/DeviceToken.ts create mode 100644 src/api/models/Error.js create mode 100644 src/api/models/Error.js.map create mode 100644 src/api/models/Error.ts create mode 100644 src/api/models/Explanation.js create mode 100644 src/api/models/Explanation.js.map create mode 100644 src/api/models/Explanation.ts create mode 100644 src/api/models/ExplanationStartTracking.js create mode 100644 src/api/models/ExplanationStartTracking.js.map create mode 100644 src/api/models/ExplanationStartTracking.ts create mode 100644 src/api/models/FeedResponse.js create mode 100644 src/api/models/FeedResponse.js.map create mode 100644 src/api/models/FeedResponse.ts create mode 100644 src/api/models/Friend.js create mode 100644 src/api/models/Friend.js.map create mode 100644 src/api/models/Friend.ts create mode 100644 src/api/models/FriendsResponse.js create mode 100644 src/api/models/FriendsResponse.js.map create mode 100644 src/api/models/FriendsResponse.ts create mode 100644 src/api/models/GetConnectorsResponse.js create mode 100644 src/api/models/GetConnectorsResponse.js.map create mode 100644 src/api/models/GetConnectorsResponse.ts create mode 100644 src/api/models/GetCorrelationsDataResponse.js create mode 100644 src/api/models/GetCorrelationsDataResponse.js.map create mode 100644 src/api/models/GetCorrelationsDataResponse.ts create mode 100644 src/api/models/GetCorrelationsResponse.js create mode 100644 src/api/models/GetCorrelationsResponse.js.map create mode 100644 src/api/models/GetCorrelationsResponse.ts create mode 100644 src/api/models/GetSharesResponse.js create mode 100644 src/api/models/GetSharesResponse.js.map create mode 100644 src/api/models/GetSharesResponse.ts create mode 100644 src/api/models/GetStudiesResponse.js create mode 100644 src/api/models/GetStudiesResponse.js.map create mode 100644 src/api/models/GetStudiesResponse.ts create mode 100644 src/api/models/GetTrackingReminderNotificationsResponse.js create mode 100644 src/api/models/GetTrackingReminderNotificationsResponse.js.map create mode 100644 src/api/models/GetTrackingReminderNotificationsResponse.ts create mode 100644 src/api/models/Group.js create mode 100644 src/api/models/Group.js.map create mode 100644 src/api/models/Group.ts create mode 100644 src/api/models/GroupsMember.js create mode 100644 src/api/models/GroupsMember.js.map create mode 100644 src/api/models/GroupsMember.ts create mode 100644 src/api/models/GroupsMembersResponse.js create mode 100644 src/api/models/GroupsMembersResponse.js.map create mode 100644 src/api/models/GroupsMembersResponse.ts create mode 100644 src/api/models/GroupsResponse.js create mode 100644 src/api/models/GroupsResponse.js.map create mode 100644 src/api/models/GroupsResponse.ts create mode 100644 src/api/models/Image.js create mode 100644 src/api/models/Image.js.map create mode 100644 src/api/models/Image.ts create mode 100644 src/api/models/InputField.js create mode 100644 src/api/models/InputField.js.map create mode 100644 src/api/models/InputField.ts create mode 100644 src/api/models/JsonErrorResponse.js create mode 100644 src/api/models/JsonErrorResponse.js.map create mode 100644 src/api/models/JsonErrorResponse.ts create mode 100644 src/api/models/Measurement.js create mode 100644 src/api/models/Measurement.js.map create mode 100644 src/api/models/Measurement.ts create mode 100644 src/api/models/MeasurementItem.js create mode 100644 src/api/models/MeasurementItem.js.map create mode 100644 src/api/models/MeasurementItem.ts create mode 100644 src/api/models/MeasurementSet.js create mode 100644 src/api/models/MeasurementSet.js.map create mode 100644 src/api/models/MeasurementSet.ts create mode 100644 src/api/models/MeasurementUpdate.js create mode 100644 src/api/models/MeasurementUpdate.js.map create mode 100644 src/api/models/MeasurementUpdate.ts create mode 100644 src/api/models/MessagesMessage.js create mode 100644 src/api/models/MessagesMessage.js.map create mode 100644 src/api/models/MessagesMessage.ts create mode 100644 src/api/models/MessagesMessagesResponse.js create mode 100644 src/api/models/MessagesMessagesResponse.js.map create mode 100644 src/api/models/MessagesMessagesResponse.ts create mode 100644 src/api/models/MessagesNotice.js create mode 100644 src/api/models/MessagesNotice.js.map create mode 100644 src/api/models/MessagesNotice.ts create mode 100644 src/api/models/MessagesNoticesResponse.js create mode 100644 src/api/models/MessagesNoticesResponse.js.map create mode 100644 src/api/models/MessagesNoticesResponse.ts create mode 100644 src/api/models/MessagesRecipient.js create mode 100644 src/api/models/MessagesRecipient.js.map create mode 100644 src/api/models/MessagesRecipient.ts create mode 100644 src/api/models/MessagesRecipientsResponse.js create mode 100644 src/api/models/MessagesRecipientsResponse.js.map create mode 100644 src/api/models/MessagesRecipientsResponse.ts create mode 100644 src/api/models/Notification.js create mode 100644 src/api/models/Notification.js.map create mode 100644 src/api/models/Notification.ts create mode 100644 src/api/models/NotificationsResponse.js create mode 100644 src/api/models/NotificationsResponse.js.map create mode 100644 src/api/models/NotificationsResponse.ts create mode 100644 src/api/models/Pair.js create mode 100644 src/api/models/Pair.js.map create mode 100644 src/api/models/Pair.ts create mode 100644 src/api/models/ParticipantInstruction.js create mode 100644 src/api/models/ParticipantInstruction.js.map create mode 100644 src/api/models/ParticipantInstruction.ts create mode 100644 src/api/models/PostMeasurementsDataResponse.js create mode 100644 src/api/models/PostMeasurementsDataResponse.js.map create mode 100644 src/api/models/PostMeasurementsDataResponse.ts create mode 100644 src/api/models/PostMeasurementsResponse.js create mode 100644 src/api/models/PostMeasurementsResponse.js.map create mode 100644 src/api/models/PostMeasurementsResponse.ts create mode 100644 src/api/models/PostStudyCreateResponse.js create mode 100644 src/api/models/PostStudyCreateResponse.js.map create mode 100644 src/api/models/PostStudyCreateResponse.ts create mode 100644 src/api/models/PostStudyPublishResponse.js create mode 100644 src/api/models/PostStudyPublishResponse.js.map create mode 100644 src/api/models/PostStudyPublishResponse.ts create mode 100644 src/api/models/PostTrackingRemindersDataResponse.js create mode 100644 src/api/models/PostTrackingRemindersDataResponse.js.map create mode 100644 src/api/models/PostTrackingRemindersDataResponse.ts create mode 100644 src/api/models/PostTrackingRemindersResponse.js create mode 100644 src/api/models/PostTrackingRemindersResponse.js.map create mode 100644 src/api/models/PostTrackingRemindersResponse.ts create mode 100644 src/api/models/PostUserSettingsDataResponse.js create mode 100644 src/api/models/PostUserSettingsDataResponse.js.map create mode 100644 src/api/models/PostUserSettingsDataResponse.ts create mode 100644 src/api/models/PostUserSettingsResponse.js create mode 100644 src/api/models/PostUserSettingsResponse.js.map create mode 100644 src/api/models/PostUserSettingsResponse.ts create mode 100644 src/api/models/ShareInvitationBody.js create mode 100644 src/api/models/ShareInvitationBody.js.map create mode 100644 src/api/models/ShareInvitationBody.ts create mode 100644 src/api/models/Study.js create mode 100644 src/api/models/Study.js.map create mode 100644 src/api/models/Study.ts create mode 100644 src/api/models/StudyCharts.js create mode 100644 src/api/models/StudyCharts.js.map create mode 100644 src/api/models/StudyCharts.ts create mode 100644 src/api/models/StudyCreationBody.js create mode 100644 src/api/models/StudyCreationBody.js.map create mode 100644 src/api/models/StudyCreationBody.ts create mode 100644 src/api/models/StudyHtml.js create mode 100644 src/api/models/StudyHtml.js.map create mode 100644 src/api/models/StudyHtml.ts create mode 100644 src/api/models/StudyImages.js create mode 100644 src/api/models/StudyImages.js.map create mode 100644 src/api/models/StudyImages.ts create mode 100644 src/api/models/StudyJoinResponse.js create mode 100644 src/api/models/StudyJoinResponse.js.map create mode 100644 src/api/models/StudyJoinResponse.ts create mode 100644 src/api/models/StudyLinks.js create mode 100644 src/api/models/StudyLinks.js.map create mode 100644 src/api/models/StudyLinks.ts create mode 100644 src/api/models/StudySharing.js create mode 100644 src/api/models/StudySharing.js.map create mode 100644 src/api/models/StudySharing.ts create mode 100644 src/api/models/StudyText.js create mode 100644 src/api/models/StudyText.js.map create mode 100644 src/api/models/StudyText.ts create mode 100644 src/api/models/StudyVotes.js create mode 100644 src/api/models/StudyVotes.js.map create mode 100644 src/api/models/StudyVotes.ts create mode 100644 src/api/models/TrackingReminder.js create mode 100644 src/api/models/TrackingReminder.js.map create mode 100644 src/api/models/TrackingReminder.ts create mode 100644 src/api/models/TrackingReminderNotification.js create mode 100644 src/api/models/TrackingReminderNotification.js.map create mode 100644 src/api/models/TrackingReminderNotification.ts create mode 100644 src/api/models/TrackingReminderNotificationAction.js create mode 100644 src/api/models/TrackingReminderNotificationAction.js.map create mode 100644 src/api/models/TrackingReminderNotificationAction.ts create mode 100644 src/api/models/TrackingReminderNotificationPost.js create mode 100644 src/api/models/TrackingReminderNotificationPost.js.map create mode 100644 src/api/models/TrackingReminderNotificationPost.ts create mode 100644 src/api/models/TrackingReminderNotificationTrackAllAction.js create mode 100644 src/api/models/TrackingReminderNotificationTrackAllAction.js.map create mode 100644 src/api/models/TrackingReminderNotificationTrackAllAction.ts create mode 100644 src/api/models/Unit.js create mode 100644 src/api/models/Unit.js.map create mode 100644 src/api/models/Unit.ts create mode 100644 src/api/models/UnitCategory.js create mode 100644 src/api/models/UnitCategory.js.map create mode 100644 src/api/models/UnitCategory.ts create mode 100644 src/api/models/User.js create mode 100644 src/api/models/User.js.map create mode 100644 src/api/models/User.ts create mode 100644 src/api/models/UserTag.js create mode 100644 src/api/models/UserTag.js.map create mode 100644 src/api/models/UserTag.ts create mode 100644 src/api/models/UserVariableDelete.js create mode 100644 src/api/models/UserVariableDelete.js.map create mode 100644 src/api/models/UserVariableDelete.ts create mode 100644 src/api/models/UsersResponse.js create mode 100644 src/api/models/UsersResponse.js.map create mode 100644 src/api/models/UsersResponse.ts create mode 100644 src/api/models/Variable.js create mode 100644 src/api/models/Variable.js.map create mode 100644 src/api/models/Variable.ts create mode 100644 src/api/models/VariableCategory.js create mode 100644 src/api/models/VariableCategory.js.map create mode 100644 src/api/models/VariableCategory.ts create mode 100644 src/api/models/VariableCharts.js create mode 100644 src/api/models/VariableCharts.js.map create mode 100644 src/api/models/VariableCharts.ts create mode 100644 src/api/models/Vote.js create mode 100644 src/api/models/Vote.js.map create mode 100644 src/api/models/Vote.ts create mode 100644 src/api/services/ActivitiesService.js create mode 100644 src/api/services/ActivitiesService.js.map create mode 100644 src/api/services/ActivitiesService.ts create mode 100644 src/api/services/AnalyticsService.js create mode 100644 src/api/services/AnalyticsService.js.map create mode 100644 src/api/services/AnalyticsService.ts create mode 100644 src/api/services/AppSettingsService.js create mode 100644 src/api/services/AppSettingsService.js.map create mode 100644 src/api/services/AppSettingsService.ts create mode 100644 src/api/services/AuthenticationService.js create mode 100644 src/api/services/AuthenticationService.js.map create mode 100644 src/api/services/AuthenticationService.ts create mode 100644 src/api/services/ConnectorsService.js create mode 100644 src/api/services/ConnectorsService.js.map create mode 100644 src/api/services/ConnectorsService.ts create mode 100644 src/api/services/FeedService.js create mode 100644 src/api/services/FeedService.js.map create mode 100644 src/api/services/FeedService.ts create mode 100644 src/api/services/FriendsService.js create mode 100644 src/api/services/FriendsService.js.map create mode 100644 src/api/services/FriendsService.ts create mode 100644 src/api/services/GroupsService.js create mode 100644 src/api/services/GroupsService.js.map create mode 100644 src/api/services/GroupsService.ts create mode 100644 src/api/services/MeasurementsService.js create mode 100644 src/api/services/MeasurementsService.js.map create mode 100644 src/api/services/MeasurementsService.ts create mode 100644 src/api/services/MessagesService.js create mode 100644 src/api/services/MessagesService.js.map create mode 100644 src/api/services/MessagesService.ts create mode 100644 src/api/services/NotificationsService.js create mode 100644 src/api/services/NotificationsService.js.map create mode 100644 src/api/services/NotificationsService.ts create mode 100644 src/api/services/RemindersService.js create mode 100644 src/api/services/RemindersService.js.map create mode 100644 src/api/services/RemindersService.ts create mode 100644 src/api/services/SharesService.js create mode 100644 src/api/services/SharesService.js.map create mode 100644 src/api/services/SharesService.ts create mode 100644 src/api/services/StudiesService.js create mode 100644 src/api/services/StudiesService.js.map create mode 100644 src/api/services/StudiesService.ts create mode 100644 src/api/services/UnitsService.js create mode 100644 src/api/services/UnitsService.js.map create mode 100644 src/api/services/UnitsService.ts create mode 100644 src/api/services/UserService.js create mode 100644 src/api/services/UserService.js.map create mode 100644 src/api/services/UserService.ts create mode 100644 src/api/services/VariablesService.js create mode 100644 src/api/services/VariablesService.js.map create mode 100644 src/api/services/VariablesService.ts create mode 100644 src/api/tsconfig.json create mode 100644 src/img/logos/quantimodo/Black-Circle-QM-Rainbow-Logo-1024-1024.png create mode 100644 src/img/logos/quantimodo/quantimodo-logo-qm-rainbow-150x150.jpg create mode 100644 src/img/logos/quantimodo/quantimodo-logo-qm-rainbow-200-200.png create mode 100644 src/img/logos/quantimodo/quantimodo-logo-qm-rainbow-black-background.png create mode 100644 src/img/logos/quantimodo/quantimodo-logos-rainbow-1200-630.gif create mode 100644 src/img/logos/quantimodo/quantimodo-logos-rainbow-1200-630.png create mode 100644 src/img/logos/quantimodo/quantimodo-logos-rainbow-600-315.png diff --git a/.env.example b/.env.example new file mode 100644 index 0000000000..106eb3f2eb --- /dev/null +++ b/.env.example @@ -0,0 +1,24 @@ +# Never commit .env files publicly. They should be in .gitignore file to prevent this + +### REQUIRED +# Get QUANTIMODO_ACCESS_TOKEN @ from "Access Token" line at https://app.quantimo.do/api/v2/account +QUANTIMODO_ACCESS_TOKEN= +# Get QUANTIMODO_CLIENT_ID @ https://builder.quantimo.do +QUANTIMODO_CLIENT_ID= + +### OPTIONAL +ANALYTICS_PROVIDER= +ANALYTICS_TRACKING_ID= +APP_DEBUG=true +APP_ENV=local +APP_HOST_NAME= +APP_LOG_LEVEL=INFO +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY="" +BUGSNAG_API_KEY= +GITHUB_ACCESS_TOKEN= +HEROKU_API_KEY= +ELECTRON_ENABLE_LOGGING= +SLACK_WEBHOOK_URL= + + diff --git a/.gitignore b/.gitignore index 93504e27ae..3ba0abc91d 100644 --- a/.gitignore +++ b/.gitignore @@ -131,7 +131,8 @@ src/css/app.css src/css/app.min.css secrets/* -!/secrets/.env.example +.env* +!.env.example /.gradle/ /ionic.iml /cypress/reports/merged/mochawesome.json @@ -143,3 +144,5 @@ debug.log /cypress/fixtures/get/some-path-param=hi.json /cypress/reports/mocha/ /cypress/fixtures/get/api/ + + diff --git a/docs/api-documentation.md b/docs/api-documentation.md new file mode 100644 index 0000000000..f04e3055a1 --- /dev/null +++ b/docs/api-documentation.md @@ -0,0 +1,9 @@ +### Updating API Documentation + +You can edit [docs/open-api-v3.yaml](open-api-v3.yaml) with [Stoplight](https://crowdsourcingcures.stoplight.io/). + +Then regenerate the client using `npm run openapi` (defined in [package.json](../package.json)). + + + + diff --git a/docs/contributing.md b/docs/contributing.md index b1bcc95067..22c2c0d8ad 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,84 +1,86 @@ -# Contributing - -We love pull requests and would be very grateful if you'd help us abolish suffering with data! - -[ ] [Fork](https://help.github.com/articles/fork-a-repo/) a copy of the repo to your own Github account. - -[ ] [Clone](https://help.github.com/articles/cloning-a-repository/) your forked version of the repo locally. -(Ideally, use a powerful GUI git client like [SourceTree](https://www.sourcetreeapp.com/). The command line is for barbarians.) - -If you must use the command line, you can use these: - -``` -git clone git@github.com:your-username/quantimodo-android-chrome-ios-web-app.git -``` - -Set up a branch for your feature or bugfix with a link to the original repo: - -``` -git checkout -b my-awesome-new-feature -git push --set-upstream origin my-awesome-new-feature -git remote add upstream https://github.com/QuantiModo/quantimodo-android-chrome-ios-web-app.git -``` - -Commit changes: - -``` -git commit -m "Cool stuff" -``` - -Make sure your branch is up to date with the original repo: - -``` -git fetch upstream -git merge upstream/master -``` - -Review your changes and any possible conflicts and push to your fork: - -``` -git push origin -``` - -[Submit a pull request on Github.com](https://help.github.com/articles/creating-a-pull-request/). - -At this point you're waiting on me. I do my best to keep on top of all the pull requests. -I may suggest some changes, improvements or alternatives. - -Some things that will increase the chance that your pull request is accepted: - -- Write tests. -- Write a [good commit message](http://chris.beams.io/posts/git-commit/). -- Make sure the PR merges cleanly with the latest master. -- Describe your feature/bugfix and why it's needed/important in the pull request description. - -## Editor Config - -The project uses [.editorconfig](http://editorconfig.org/) to define the coding -style of each file. We recommend that you install the Editor Config extension -for your preferred IDE. Consistency is key. - -## JSHint - -The project uses [.jshint](http://jshint.com/docs) to define the JavaScript -coding conventions. Most editors now have a JSHint add-on to provide on-save -or on-edit linting. - -### Install JSHint for vim - -1. Install [jshint](https://www.npmjs.com/package/jshint). -1. Install [jshint.vim](https://github.com/wookiehangover/jshint.vim). - -### Install JSHint for Sublime - -1. Install [Package Control](https://packagecontrol.io/installation) -1. Restart Sublime -1. Type `CMD+SHIFT+P` -1. Type _Install Package_ -1. Type _JSHint Gutter_ -1. Sublime -> Preferences -> Package Settings -> JSHint Gutter -1. Set `lint_on_load` and `lint_on_save` to `true` - -Tips - -- I recommend using [SourceTree and the Gitflow model] (https://github.com/GSoft-SharePoint/Dynamite/wiki/Getting-started-with-SourceTree,-Git-and-git-flow) for development. \ No newline at end of file +# Contributing + +We love pull requests and would be very grateful if you'd help us abolish suffering with data! + +[ ] [Fork](https://help.github.com/articles/fork-a-repo/) a copy of the repo to your own Github account. + +[ ] [Clone](https://help.github.com/articles/cloning-a-repository/) your forked version of the repo locally. +(Ideally, use a powerful GUI git client like [SourceTree](https://www.sourcetreeapp.com/). The command line is for +barbarians.) + +If you must use the command line, you can use these: + +``` +git clone git@github.com:your-username/quantimodo-android-chrome-ios-web-app.git +``` + +Set up a branch for your feature or bugfix with a link to the original repo: + +``` +git checkout -b my-awesome-new-feature +git push --set-upstream origin my-awesome-new-feature +git remote add upstream https://github.com/QuantiModo/quantimodo-android-chrome-ios-web-app.git +``` + +Commit changes: + +``` +git commit -m "Cool stuff" +``` + +Make sure your branch is up to date with the original repo: + +``` +git fetch upstream +git merge upstream/master +``` + +Review your changes and any possible conflicts and push to your fork: + +``` +git push origin +``` + +[Submit a pull request on Github.com](https://help.github.com/articles/creating-a-pull-request/). + +At this point you're waiting on me. I do my best to keep on top of all the pull requests. I may suggest some changes, +improvements or alternatives. + +Some things that will increase the chance that your pull request is accepted: + +- Write tests. +- Write a [good commit message](http://chris.beams.io/posts/git-commit/). +- Make sure the PR merges cleanly with the latest master. +- Describe your feature/bugfix and why it's needed/important in the pull request description. + +## Editor Config + +The project uses [.editorconfig](http://editorconfig.org/) to define the coding +style of each file. We recommend that you install the Editor Config extension +for your preferred IDE. Consistency is key. + +## JSHint + +The project uses [.jshint](http://jshint.com/docs) to define the JavaScript +coding conventions. Most editors now have a JSHint add-on to provide on-save +or on-edit linting. + +### Install JSHint for vim + +1. Install [jshint](https://www.npmjs.com/package/jshint). +1. Install [jshint.vim](https://github.com/wookiehangover/jshint.vim). + +### Install JSHint for Sublime + +1. Install [Package Control](https://packagecontrol.io/installation) +1. Restart Sublime +1. Type `CMD+SHIFT+P` +1. Type _Install Package_ +1. Type _JSHint Gutter_ +1. Sublime -> Preferences -> Package Settings -> JSHint Gutter +1. Set `lint_on_load` and `lint_on_save` to `true` + +### Tips + +- I recommend using [SourceTree and the Gitflow model] (https://github.com/GSoft-SharePoint/Dynamite/wiki/Getting-started-with-SourceTree,-Git-and-git-flow) for development. + diff --git a/docs/open-api-v3.yaml b/docs/open-api-v3.yaml new file mode 100644 index 0000000000..0ae4d80141 --- /dev/null +++ b/docs/open-api-v3.yaml @@ -0,0 +1,11124 @@ +--- +openapi: 3.0.1 +info: + title: quantimodo + description: A platform for participant-centered research and personal data exploration. + termsOfService: https://quantimo.do/tos/ + contact: + name: hello@quantimo.do + license: + name: GNU General Public License v3 (GPL-3) + url: https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3) + version: "1" +servers: + - url: https://app.quantimo.do/api +tags: + - name: analytics + description: Identify the strongest predictors of a given outcome and generate studies + externalDocs: + description: Try it out + url: https://web.quantimo.do/#/app/predictor-search + - name: connectors + description: Import data from third-party apps and devices like Fitbit and Mint. + externalDocs: + description: Import your data now + url: https://web.quantimo.do/#/app/import + - name: measurements + description: Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + externalDocs: + description: See it in action + url: https://web.quantimo.do/#/app/history-all-category/Anything?accessToken=demo + - name: reminders + description: Users can be reminded to track certain variables at a specified frequency with a default value. + externalDocs: + description: See it in action + url: https://web.quantimo.do/#/app/reminders-inbox?accessToken=demo + - name: units + description: Available units for measurements + externalDocs: + description: See it in action + url: https://web.quantimo.do/#/app/measurement-search?accessToken=demo + - name: user + description: Get or update user info and settings + externalDocs: + description: See it in action + url: https://web.quantimo.do/#/app/settings?accessToken=demo + - name: variables + description: Can be used for search auto-complete for data types like symptoms, foods and treatments and include statistics + externalDocs: + description: Search for a variable + url: https://web.quantimo.do/#/app/reminder-search?accessToken=demo + - name: studies + description: Automatically generated natural language studies examining the relationship between a predictor and outcome variable including charts. + externalDocs: + description: Search for a study + url: https://web.quantimo.do/#/app/studies +paths: + /v3/appSettings: + get: + tags: + - AppSettings + summary: Get client app settings + description: Get the settings for your application configurable at https://builder.quantimo.do + operationId: getAppSettings + parameters: + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: true + style: form + explode: true + schema: + type: string + - name: allStaticAppData + in: query + description: "Get units, variable categories, and common variables that can be used in the app" + required: false + style: form + explode: true + schema: + type: boolean + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/AppSettingsResponse' + "401": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/JsonErrorResponse' + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + /v2/measurements/exportRequest: + post: + tags: + - measurements + summary: Post Request for Measurements CSV + description: Use this endpoint to schedule a CSV export containing all user measurements to be emailed to the user within 24 hours. + operationId: measurementExportRequest + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + responses: + "201": + description: successful operation + content: + application/json: + schema: + type: integer + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/connect/mobile: + get: + tags: + - connectors + summary: Mobile connect page + description: This page is designed to be opened in a webview. Instead of using popup authentication boxes, it uses redirection. You can include the user's access_token as a URL parameter like https://app.quantimo.do/api/v3/connect/mobile?access_token=123 + operationId: getMobileConnectPage + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + responses: + "200": + description: Mobile connect page was returned + content: { } + "401": + description: User token is missing + content: { } + "403": + description: User token is incorrect + content: { } + /v3/connectors/list: + get: + tags: + - connectors + summary: List of Connectors + description: A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. + operationId: getConnectors + parameters: + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetConnectorsResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/connectors/{connectorName}/connect: + get: + tags: + - connectors + summary: Obtain a token from 3rd party data source + description: Attempt to obtain a token from the data provider, store it in the database. With this, the connector to continue to obtain new user data until the token is revoked. + operationId: connectConnector + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: connectorName + in: path + description: Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. + required: true + style: simple + explode: false + schema: + type: string + enum: + - facebook + - fitbit + - github + - googlecalendar + - googlefit + - medhelper + - mint + - moodpanda + - moodscope + - myfitnesspal + - mynetdiary + - netatmo + - rescuetime + - runkeeper + - slack + - sleepcloud + - slice + - up + - whatpulse + - withings + - worldweatheronline + - foursquare + - strava + - gmail + responses: + "200": + description: Successful operation + content: { } + "401": + description: Not Authenticated + content: { } + "404": + description: Method not found. Could not execute the requested method. + content: { } + "500": + description: Error during update. Unsupported response from update(). + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/connectors/{connectorName}/disconnect: + get: + tags: + - connectors + summary: Delete stored connection info + description: The disconnect method deletes any stored tokens or connection information from the connectors database. + operationId: disconnectConnector + parameters: + - name: connectorName + in: path + description: Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. + required: true + style: simple + explode: false + schema: + type: string + enum: + - facebook + - fitbit + - github + - googlecalendar + - googlefit + - medhelper + - mint + - moodpanda + - moodscope + - myfitnesspal + - mynetdiary + - netatmo + - rescuetime + - runkeeper + - slack + - sleepcloud + - slice + - up + - whatpulse + - withings + - worldweatheronline + - foursquare + - strava + - gmail + responses: + "200": + description: Successful operation + content: { } + "401": + description: Not Authenticated + content: { } + "404": + description: Method not found. Could not execute the requested method. + content: { } + "500": + description: Error during update. Unsupported response from update(). + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/connectors/{connectorName}/update: + get: + tags: + - connectors + summary: Sync with data source + description: The update method tells the QM Connector Framework to check with the data provider (such as Fitbit or MyFitnessPal) and retrieve any new measurements available. + operationId: updateConnector + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: connectorName + in: path + description: Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. + required: true + style: simple + explode: false + schema: + type: string + enum: + - facebook + - fitbit + - github + - googlecalendar + - googlefit + - medhelper + - mint + - moodpanda + - moodscope + - myfitnesspal + - mynetdiary + - netatmo + - rescuetime + - runkeeper + - slack + - sleepcloud + - slice + - up + - whatpulse + - withings + - worldweatheronline + - foursquare + - strava + - gmail + responses: + "200": + description: Connection Successful + content: { } + "401": + description: Not Authenticated + content: { } + "404": + description: Method not found. Could not execute the requested method. + content: { } + "500": + description: Error during update. Unsupported response from update(). + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/correlations: + get: + tags: + - analytics + summary: Get correlations + description: Get a list of correlations that can be used to display top predictors of a given outcome like mood, for instance. + operationId: getCorrelations + parameters: + - name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: correlationCoefficient + in: query + description: Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action + required: false + style: form + explode: true + schema: + type: string + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: outcomesOfInterest + in: query + description: Only include correlations for which the effect is an outcome of interest for the user + required: false + style: form + explode: true + schema: + type: boolean + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: commonOnly + in: query + description: Return only public, anonymized and aggregated population data instead of user-specific variables + required: false + style: form + explode: true + schema: + type: boolean + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetCorrelationsResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/correlations/explanations: + get: + tags: + - analytics + summary: Get correlation explanations + description: Get explanations of correlations based on data from a single user. + operationId: getCorrelationExplanations + parameters: + - name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Correlation' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/deviceTokens: + post: + tags: + - notifications + summary: Post DeviceTokens + description: Post user token for Android, iOS, or web push notifications + operationId: postDeviceToken + requestBody: + description: The platform and token + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceToken' + required: true + responses: + "201": + description: Successful operation + content: { } + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + x-codegen-request-body-name: body + /v3/feed: + get: + tags: + - feed + summary: Tracking reminder notifications, messages, and study results + description: Tracking reminder notifications, messages, and study results + operationId: getFeed + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/FeedResponse' + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + post: + tags: + - feed + summary: Post user interactions with feed + description: Post user actions on feed cards + operationId: postFeed + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + requestBody: + description: Id of the tracking reminder notification to be snoozed + content: + application/json: + schema: + type: array + description: Array of cards to take action on + items: + $ref: '#/components/schemas/Card' + required: true + responses: + "201": + description: Returns new feed cards + content: + application/json: + schema: + $ref: '#/components/schemas/FeedResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + x-codegen-request-body-name: body + /v3/googleIdToken: + post: + tags: + - authentication + summary: Post GoogleIdToken + description: Post GoogleIdToken + operationId: postGoogleIdToken + responses: + "201": + description: Successful operation + content: { } + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + /v3/integration.js: + get: + tags: + - connectors + summary: Get embeddable connect javascript + description: |- + Get embeddable connect javascript. Usage: + - Embedding in applications with popups for 3rd-party authentication + windows. + Use `qmSetupInPopup` function after connecting `connect.js`. + - Embedding in applications with popups for 3rd-party authentication + windows. + Requires a selector to block. It will be embedded in this block. + Use `qmSetupOnPage` function after connecting `connect.js`. + - Embedding in mobile applications without popups for 3rd-party + authentication. + Use `qmSetupOnMobile` function after connecting `connect.js`. + If using in a Cordova application call `qmSetupOnIonic` function after connecting `connect.js`. + operationId: getIntegrationJs + parameters: + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Embeddable connect javascript was returned + content: { } + /v3/measurements: + get: + tags: + - measurements + summary: Get measurements for this user + description: Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + operationId: getMeasurements + parameters: + - name: variableName + in: query + description: Name of the variable you want measurements for + required: false + style: form + explode: true + schema: + type: string + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: variableCategoryName + in: query + description: 'Ex: Emotions, Treatments, Symptoms...' + required: false + style: form + explode: true + schema: + type: string + enum: + - Activities + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Location + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activity + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + - Goals + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: sourceName + in: query + description: ID of the source you want measurements for (supports exact name match only) + required: false + style: form + explode: true + schema: + type: string + - name: connectorName + in: query + description: 'Ex: facebook' + required: false + style: form + explode: true + schema: + type: string + - name: value + in: query + description: Value of measurement + required: false + style: form + explode: true + schema: + type: string + - name: unitName + in: query + description: 'Ex: Milligrams' + required: false + style: form + explode: true + schema: + type: string + enum: + - '% Recommended Daily Allowance' + - -4 to 4 Rating + - 0 to 1 Rating + - 0 to 5 Rating + - 1 to 10 Rating + - 1 to 5 Rating + - Applications + - Beats per Minute + - Calories + - Capsules + - Centimeters + - Count + - Degrees Celsius + - Degrees East + - Degrees Fahrenheit + - Degrees North + - Dollars + - Drops + - Event + - Feet + - Grams + - Hours + - Inches + - Index + - Kilocalories + - Kilograms + - Kilometers + - Liters + - Meters + - Micrograms + - Micrograms per decilitre + - Miles + - Milligrams + - Milliliters + - Millimeters + - Millimeters Merc + - Milliseconds + - Minutes + - Pascal + - Percent + - Pieces + - Pills + - Pounds + - Puffs + - Seconds + - Serving + - Sprays + - Tablets + - Torr + - Units + - Yes/No + - per Minute + - Doses + - Quarts + - Ounces + - International Units + - Meters per Second + - name: earliestMeasurementTime + in: query + description: Excluded records with measurement times earlier than this value. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: latestMeasurementTime + in: query + description: Excluded records with measurement times later than this value. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Measurement id + required: false + style: form + explode: true + schema: + type: integer + - name: groupingWidth + in: query + description: The time (in seconds) over which measurements are grouped together + required: false + style: form + explode: true + schema: + type: integer + - name: groupingTimezone + in: query + description: The time (in seconds) over which measurements are grouped together + required: false + style: form + explode: true + schema: + type: string + - name: doNotProcess + in: query + description: 'Ex: true' + required: false + style: form + explode: true + schema: + type: boolean + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: doNotConvert + in: query + description: 'Ex: 1' + required: false + style: form + explode: true + schema: + type: boolean + - name: minMaxFilter + in: query + description: 'Ex: 1' + required: false + style: form + explode: true + schema: + type: boolean + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Measurement' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + /v3/measurements/delete: + delete: + tags: + - measurements + summary: Delete a measurement + description: Delete a previously submitted measurement + operationId: deleteMeasurement + responses: + "204": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - writemeasurements + x-codegen-request-body-name: body + /v3/measurements/post: + post: + tags: + - measurements + summary: Post a new set or update existing measurements to the database + description: You can submit or update multiple measurements in a "measurements" sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. + operationId: postMeasurements + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + requestBody: + description: An array of measurement sets containing measurement items you want to insert. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MeasurementSet' + required: true + responses: + "201": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/PostMeasurementsResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - writemeasurements + x-codegen-request-body-name: body + /v3/measurements/update: + post: + tags: + - measurements + summary: Update a measurement + description: Update a previously submitted measurement + operationId: updateMeasurement + requestBody: + description: The id as well as the new startTime, note, and/or value of the measurement to be updated + content: + application/json: + schema: + $ref: '#/components/schemas/MeasurementUpdate' + required: true + responses: + "201": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + x-codegen-request-body-name: body + /v3/notificationPreferences: + get: + tags: + - notifications + summary: Get NotificationPreferences + description: Get NotificationPreferences + operationId: getNotificationPreferences + responses: + "200": + description: Successful operation + content: { } + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + /v3/oauth2/authorize: + get: + tags: + - authentication + summary: Request Authorization Code + description: You can implement OAuth2 authentication to your application using our **OAuth2** endpoints. You need to redirect users to `/api/v3/oauth2/authorize` endpoint to get an authorization code and include the parameters below. This page will ask the user if they want to allow a client's application to submit or obtain data from their QM account. It will redirect the user to the url provided by the client application with the code as a query parameter or error in case of an error. See the /api/v1/oauth/access_token endpoint for the next steps. + operationId: getOauthAuthorizationCode + parameters: + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: client_secret + in: query + description: This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://builder.quantimo.do](https://builder.quantimo.do). + required: false + style: form + explode: true + schema: + type: string + - name: response_type + in: query + description: 'If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment.' + required: true + style: form + explode: true + schema: + type: string + - name: scope + in: query + description: Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. + required: true + style: form + explode: true + schema: + type: string + - name: redirect_uri + in: query + description: The redirect URI is the URL within your client application that will receive the OAuth2 credentials. + required: false + style: form + explode: true + schema: + type: string + - name: state + in: query + description: An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful Operation + content: { } + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/oauth2/token: + get: + tags: + - authentication + summary: Get a user access token + description: 'Client provides authorization token obtained from /api/v3/oauth2/authorize to this endpoint and receives an access token. Access token can then be used to query API endpoints. ### Request Access Token After user approves your access to the given scope form the https:/app.quantimo.do/v1/oauth2/authorize endpoint, you''ll receive an authorization code to request an access token. This time make a `POST` request to `/api/v1/oauth/access_token` with parameters including: * `grant_type` Can be `authorization_code` or `refresh_token` since we are getting the `access_token` for the first time we don''t have a `refresh_token` so this must be `authorization_code`. * `code` Authorization code you received with the previous request. * `redirect_uri` Your application''s redirect url. ### Refreshing Access Token Access tokens expire at some point, to continue using our api you need to refresh them with `refresh_token` you received along with the `access_token`. To do this make a `POST` request to `/api/v1/oauth/access_token` with correct parameters, which are: * `grant_type` This time grant type must be `refresh_token` since we have it. * `clientId` Your application''s client id. * `client_secret` Your application''s client secret. * `refresh_token` The refresh token you received with the `access_token`. Every request you make to this endpoint will give you a new refresh token and make the old one expired. So you can keep getting new access tokens with new refresh tokens. ### Using Access Token Currently we support 2 ways for this, you can''t use both at the same time. * Adding access token to the request header as `Authorization: Bearer {access_token}` * Adding to the url as a query parameter `?access_token={access_token}` You can read more about OAuth2 from [here](http://oauth.net/2/)' + operationId: getAccessToken + parameters: + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: client_secret + in: query + description: This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://builder.quantimo.do](https://builder.quantimo.do). + required: false + style: form + explode: true + schema: + type: string + - name: grant_type + in: query + description: Grant Type can be 'authorization_code' or 'refresh_token' + required: true + style: form + explode: true + schema: + type: string + - name: code + in: query + description: Authorization code you received with the previous request. + required: true + style: form + explode: true + schema: + type: string + - name: response_type + in: query + description: 'If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment.' + required: true + style: form + explode: true + schema: + type: string + - name: scope + in: query + description: Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. + required: true + style: form + explode: true + schema: + type: string + - name: redirect_uri + in: query + description: The redirect URI is the URL within your client application that will receive the OAuth2 credentials. + required: false + style: form + explode: true + schema: + type: string + - name: state + in: query + description: An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful Operation + content: { } + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/pairs: + get: + tags: + - measurements + summary: Get pairs of measurements for correlational analysis + description: Pairs cause measurements with effect measurements grouped over the duration of action after the onset delay. + operationId: getPairs + parameters: + - name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: effectUnitName + in: query + description: Name for the unit effect measurements to be returned in + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: causeUnitName + in: query + description: Name for the unit cause measurements to be returned in + required: false + style: form + explode: true + schema: + type: string + - name: onsetDelay + in: query + description: The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. + required: false + style: form + explode: true + schema: + type: string + - name: durationOfAction + in: query + description: 'The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. Unit: Seconds' + required: false + style: form + explode: true + schema: + type: string + - name: earliestMeasurementTime + in: query + description: Excluded records with measurement times earlier than this value. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: latestMeasurementTime + in: query + description: Excluded records with measurement times later than this value. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pair' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/shares: + get: + tags: + - shares + summary: Get Authorized Apps, Studies, and Individuals + description: This is a list of individuals, apps, or studies with access to your measurements. + operationId: getShares + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: appVersion + in: query + description: 'Ex: 2.1.1.0' + required: false + style: form + explode: true + schema: + type: string + - name: log + in: query + description: Username or email + required: false + style: form + explode: true + schema: + type: string + - name: pwd + in: query + description: User password + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetSharesResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - writemeasurements + /v3/shares/delete: + post: + tags: + - shares + summary: Delete share + description: Remove access to user data for a given client_id associated with a given individual, app, or study + operationId: deleteShare + parameters: + - name: clientIdToRevoke + in: query + description: Client id of the individual, study, or app that the user wishes to no longer have access to their data + required: true + style: form + explode: true + schema: + type: string + - name: reason + in: query + description: 'Ex: I hate you!' + required: false + style: form + explode: true + schema: + type: string + responses: + "204": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/User' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - writemeasurements + /v3/shares/invite: + post: + tags: + - shares + summary: Delete share + description: Invite someone to view your measurements + operationId: inviteShare + parameters: + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + requestBody: + description: Details about person to share with + content: + application/json: + schema: + $ref: '#/components/schemas/ShareInvitationBody' + required: true + responses: + "204": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/User' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - writemeasurements + x-codegen-request-body-name: body + /v3/studies: + get: + tags: + - studies + summary: Get Personal or Population Studies + description: If you have enough data, this will be a list of your personal studies, otherwise it will consist of aggregated population studies. + operationId: getStudies + parameters: + - name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: includeCharts + in: query + description: Highcharts configs that can be used if you have highcharts.js included on the page. This only works if the id or name query parameter is also provided. + required: false + style: form + explode: true + schema: + type: boolean + - name: recalculate + in: query + description: Recalculate instead of using cached analysis + required: false + style: form + explode: true + schema: + type: boolean + - name: studyId + in: query + description: Client id for the study you want + required: false + style: form + explode: true + schema: + type: string + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: correlationCoefficient + in: query + description: Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action + required: false + style: form + explode: true + schema: + type: string + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: outcomesOfInterest + in: query + description: Only include correlations for which the effect is an outcome of interest for the user + required: false + style: form + explode: true + schema: + type: boolean + - name: principalInvestigatorUserId + in: query + description: These are studies created by a specific principal investigator + required: false + style: form + explode: true + schema: + type: integer + - name: open + in: query + description: These are studies that anyone can join + required: false + style: form + explode: true + schema: + type: boolean + - name: joined + in: query + description: These are studies that you have joined + required: false + style: form + explode: true + schema: + type: boolean + - name: created + in: query + description: These are studies that you have created + required: false + style: form + explode: true + schema: + type: boolean + - name: population + in: query + description: These are studies based on the entire population of users that have shared their data + required: false + style: form + explode: true + schema: + type: boolean + - name: downvoted + in: query + description: These are studies that you have down-voted + required: false + style: form + explode: true + schema: + type: boolean + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetStudiesResponse' + "401": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/JsonErrorResponse' + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/studies/open: + get: + tags: + - studies + summary: These are open studies that anyone can join + description: These are studies that anyone can join and share their data for the predictor and outcome variables of interest. + operationId: getOpenStudies + parameters: + - name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: includeCharts + in: query + description: Highcharts configs that can be used if you have highcharts.js included on the page. This only works if the id or name query parameter is also provided. + required: false + style: form + explode: true + schema: + type: boolean + - name: recalculate + in: query + description: Recalculate instead of using cached analysis + required: false + style: form + explode: true + schema: + type: boolean + - name: studyId + in: query + description: Client id for the study you want + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetStudiesResponse' + "401": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/JsonErrorResponse' + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/studies/joined: + get: + tags: + - studies + summary: Studies You Have Joined + description: These are studies that you are currently sharing your data with. + operationId: getStudiesJoined + parameters: + - name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: correlationCoefficient + in: query + description: Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action + required: false + style: form + explode: true + schema: + type: string + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: outcomesOfInterest + in: query + description: Only include correlations for which the effect is an outcome of interest for the user + required: false + style: form + explode: true + schema: + type: boolean + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetStudiesResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/studies/created: + get: + tags: + - studies + summary: Get studies you have created + description: These are studies that you have created. + operationId: getStudiesCreated + parameters: + - name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetStudiesResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/study/publish: + post: + tags: + - studies + summary: Publish Your Study + description: Make a study and all related measurements publicly visible by anyone + operationId: publishStudy + parameters: + - name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: includeCharts + in: query + description: Highcharts configs that can be used if you have highcharts.js included on the page. This only works if the id or name query parameter is also provided. + required: false + style: form + explode: true + schema: + type: boolean + - name: recalculate + in: query + description: Recalculate instead of using cached analysis + required: false + style: form + explode: true + schema: + type: boolean + - name: studyId + in: query + description: Client id for the study you want + required: false + style: form + explode: true + schema: + type: string + responses: + "201": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/PostStudyPublishResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/study/join: + post: + tags: + - studies + summary: Join a Study + description: Anonymously share measurements for specified variables + operationId: joinStudy + parameters: + - name: studyId + in: query + description: Client id for the study you want + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "201": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/StudyJoinResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/study/create: + post: + tags: + - studies + summary: Create a Study + description: Create an individual, group, or population study examining the relationship between a predictor and outcome variable. You will be given a study id which you can invite participants to join and share their measurements for the specified variables. + operationId: createStudy + parameters: + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + requestBody: + description: Details about the study you want to create + content: + application/json: + schema: + $ref: '#/components/schemas/StudyCreationBody' + required: true + responses: + "201": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/PostStudyCreateResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + x-codegen-request-body-name: body + /v3/trackingReminderNotifications: + get: + tags: + - reminders + summary: Get specific tracking reminder notifications + description: Specific tracking reminder notification instances that still need to be tracked. + operationId: getTrackingReminderNotifications + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: variableCategoryName + in: query + description: 'Ex: Emotions, Treatments, Symptoms...' + required: false + style: form + explode: true + schema: + type: string + enum: + - Activities + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Location + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activity + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + - Goals + - name: reminderTime + in: query + description: 'Ex: (lt)2017-07-31 21:43:26' + required: false + style: form + explode: true + schema: + type: string + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: onlyPast + in: query + description: 'Ex: 1' + required: false + style: form + explode: true + schema: + type: boolean + - name: includeDeleted + in: query + description: Include deleted variables + required: false + style: form + explode: true + schema: + type: boolean + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetTrackingReminderNotificationsResponse' + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + post: + tags: + - reminders + summary: Snooze, skip, or track a tracking reminder notification + description: Snooze, skip, or track a tracking reminder notification + operationId: postTrackingReminderNotifications + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + requestBody: + description: Id of the tracking reminder notification to be snoozed + content: + application/json: + schema: + type: array + description: Array of TrackingReminderNotifications to take action on + items: + $ref: '#/components/schemas/TrackingReminderNotificationPost' + required: true + responses: + "201": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + x-codegen-request-body-name: body + /v3/trackingReminders: + get: + tags: + - reminders + summary: Get repeating tracking reminder settings + description: Users can be reminded to track certain variables at a specified frequency with a default value. + operationId: getTrackingReminders + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: variableCategoryName + in: query + description: 'Ex: Emotions, Treatments, Symptoms...' + required: false + style: form + explode: true + schema: + type: string + enum: + - Activities + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Location + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activity + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + - Goals + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: appVersion + in: query + description: 'Ex: 2.1.1.0' + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TrackingReminder' + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + post: + tags: + - reminders + summary: Store a Tracking Reminder + description: This is to enable users to create reminders to track a variable with a default value at a specified frequency + operationId: postTrackingReminders + requestBody: + description: TrackingReminder that should be stored + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TrackingReminder' + required: true + responses: + "201": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrackingRemindersResponse' + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + x-codegen-request-body-name: body + /v3/trackingReminders/delete: + delete: + tags: + - reminders + summary: Delete Tracking Reminder + description: Stop getting notifications to record data for a variable. Previously recorded measurements will be preserved. + operationId: deleteTrackingReminder + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + responses: + "204": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + x-codegen-request-body-name: body + /v3/unitCategories: + get: + tags: + - units + summary: Get unit categories + description: Get a list of the categories of measurement units such as 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', and 'Weight'. + operationId: getUnitCategories + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UnitCategory' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/units: + get: + tags: + - units + summary: Get units + description: Get a list of the available measurement units + operationId: getUnits + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + description: Array of units + items: + $ref: '#/components/schemas/Unit' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/user: + get: + tags: + - user + summary: Get user info + description: Returns user info. If no userId is specified, returns info for currently authenticated user + operationId: getUser + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: appVersion + in: query + description: 'Ex: 2.1.1.0' + required: false + style: form + explode: true + schema: + type: string + - name: clientUserId + in: query + description: 'Ex: 74802' + required: false + style: form + explode: true + schema: + type: integer + - name: log + in: query + description: Username or email + required: false + style: form + explode: true + schema: + type: string + - name: pwd + in: query + description: User password + required: false + style: form + explode: true + schema: + type: string + - name: includeAuthorizedClients + in: query + description: Return list of apps, studies, and individuals with access to user data + required: false + style: form + explode: true + schema: + type: boolean + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/User' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/users: + get: + tags: + - user + summary: Get users who shared data + description: Returns users who have granted access to their data + operationId: getUsers + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: appVersion + in: query + description: 'Ex: 2.1.1.0' + required: false + style: form + explode: true + schema: + type: string + - name: clientUserId + in: query + description: 'Ex: 74802' + required: false + style: form + explode: true + schema: + type: integer + - name: log + in: query + description: Username or email + required: false + style: form + explode: true + schema: + type: string + - name: pwd + in: query + description: User password + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/UsersResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/user/delete: + delete: + tags: + - user + summary: Delete user + description: Delete user account. Only the client app that created a user can delete that user. + operationId: deleteUser + parameters: + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: reason + in: query + description: 'Ex: I hate you!' + required: true + style: form + explode: true + schema: + type: string + responses: + "204": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - writemeasurements + /v3/userSettings: + post: + tags: + - user + summary: Post UserSettings + description: Post UserSettings + operationId: postUserSettings + parameters: + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + requestBody: + description: User settings to update + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + responses: + "201": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/PostUserSettingsResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + x-codegen-request-body-name: body + /v3/userTags: + post: + tags: + - variables + summary: Post or update user tags or ingredients + description: This endpoint allows users to tag foods with their ingredients. This information will then be used to infer the user intake of the different ingredients by just entering the foods. The inferred intake levels will then be used to determine the effects of different nutrients on the user during analysis. + operationId: postUserTags + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + requestBody: + description: Contains the new user tag data + content: + application/json: + schema: + $ref: '#/components/schemas/UserTag' + required: true + responses: + "201": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + x-codegen-request-body-name: body + /v3/userTags/delete: + delete: + tags: + - variables + summary: Delete user tag or ingredient + description: Delete previously created user tags or ingredients. + operationId: deleteUserTag + parameters: + - name: taggedVariableId + in: query + description: Id of the tagged variable (i.e. Lollipop) you would like to get variables it can be tagged with (i.e. Sugar). Converted measurements of the tagged variable are included in analysis of the tag variable (i.e. ingredient). + required: false + style: form + explode: true + schema: + type: integer + - name: tagVariableId + in: query + description: Id of the tag variable (i.e. Sugar) you would like to get variables it can be tagged to (i.e. Lollipop). Converted measurements of the tagged variable are included in analysis of the tag variable (i.e. ingredient). + required: false + style: form + explode: true + schema: + type: integer + responses: + "204": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/variables: + get: + tags: + - variables + summary: Get variables along with related user-specific analysis settings and statistics + description: Get variables. If the user has specified variable settings, these are provided instead of the common variable defaults. + operationId: getVariables + parameters: + - name: includeCharts + in: query + description: Highcharts configs that can be used if you have highcharts.js included on the page. This only works if the id or name query parameter is also provided. + required: false + style: form + explode: true + schema: + type: boolean + - name: numberOfRawMeasurements + in: query + description: Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: variableCategoryName + in: query + description: 'Ex: Emotions, Treatments, Symptoms...' + required: false + style: form + explode: true + schema: + type: string + enum: + - Activities + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Location + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activity + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + - Goals + - name: name + in: query + description: 'Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood%' + required: false + style: form + explode: true + schema: + type: string + - name: variableName + in: query + description: Name of the variable you want measurements for + required: false + style: form + explode: true + schema: + type: string + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: sourceName + in: query + description: ID of the source you want measurements for (supports exact name match only) + required: false + style: form + explode: true + schema: + type: string + - name: earliestMeasurementTime + in: query + description: Excluded records with measurement times earlier than this value. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: latestMeasurementTime + in: query + description: Excluded records with measurement times later than this value. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Common variable id + required: false + style: form + explode: true + schema: + type: integer + - name: lastSourceName + in: query + description: Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: includePublic + in: query + description: Include variables the user has no measurements for + required: false + style: form + explode: true + schema: + type: boolean + - name: manualTracking + in: query + description: Only include variables tracked manually by the user + required: false + style: form + explode: true + schema: + type: boolean + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: upc + in: query + description: UPC or other barcode scan result + required: false + style: form + explode: true + schema: + type: string + - name: effectOrCause + in: query + description: Provided variable is the effect or cause + required: false + style: form + explode: true + schema: + type: string + - name: publicEffectOrCause + in: query + description: 'Ex: ' + required: false + style: form + explode: true + schema: + type: string + - name: exactMatch + in: query + description: Require exact match + required: false + style: form + explode: true + schema: + type: boolean + - name: variableCategoryId + in: query + description: 'Ex: 13' + required: false + style: form + explode: true + schema: + type: integer + - name: includePrivate + in: query + description: Include user-specific variables in results + required: false + style: form + explode: true + schema: + type: boolean + - name: searchPhrase + in: query + description: 'Ex: %Body Fat%' + required: false + style: form + explode: true + schema: + type: string + - name: synonyms + in: query + description: 'Ex: McDonalds hotcake' + required: false + style: form + explode: true + schema: + type: string + - name: taggedVariableId + in: query + description: Id of the tagged variable (i.e. Lollipop) you would like to get variables it can be tagged with (i.e. Sugar). Converted measurements of the tagged variable are included in analysis of the tag variable (i.e. ingredient). + required: false + style: form + explode: true + schema: + type: integer + - name: tagVariableId + in: query + description: Id of the tag variable (i.e. Sugar) you would like to get variables it can be tagged to (i.e. Lollipop). Converted measurements of the tagged variable are included in analysis of the tag variable (i.e. ingredient). + required: false + style: form + explode: true + schema: + type: integer + - name: joinVariableId + in: query + description: Id of the variable you would like to get variables that can be joined to. This is used to merge duplicate variables. If joinVariableId is specified, this returns only variables eligible to be joined to the variable specified by the joinVariableId. + required: false + style: form + explode: true + schema: + type: integer + - name: parentUserTagVariableId + in: query + description: Id of the parent category variable (i.e. Fruit) you would like to get eligible child sub-type variables (i.e. Apple) for. Child variable measurements will be included in analysis of the parent variable. For instance, a child sub-type of the parent category Fruit could be Apple. When Apple is tagged with the parent category Fruit, Apple measurements will be included when Fruit is analyzed. + required: false + style: form + explode: true + schema: + type: integer + - name: childUserTagVariableId + in: query + description: Id of the child sub-type variable (i.e. Apple) you would like to get eligible parent variables (i.e. Fruit) for. Child variable measurements will be included in analysis of the parent variable. For instance, a child sub-type of the parent category Fruit could be Apple. When Apple is tagged with the parent category Fruit, Apple measurements will be included when Fruit is analyzed. + required: false + style: form + explode: true + schema: + type: integer + - name: ingredientUserTagVariableId + in: query + description: Id of the ingredient variable (i.e. Fructose) you would like to get eligible ingredientOf variables (i.e. Apple) for. IngredientOf variable measurements will be included in analysis of the ingredient variable. For instance, a ingredientOf of variable Fruit could be Apple. + required: false + style: form + explode: true + schema: + type: integer + - name: ingredientOfUserTagVariableId + in: query + description: Id of the ingredientOf variable (i.e. Apple) you would like to get eligible ingredient variables (i.e. Fructose) for. IngredientOf variable measurements will be included in analysis of the ingredient variable. For instance, a ingredientOf of variable Fruit could be Apple. + required: false + style: form + explode: true + schema: + type: integer + - name: commonOnly + in: query + description: Return only public and aggregated common variable data instead of user-specific variables + required: false + style: form + explode: true + schema: + type: boolean + - name: userOnly + in: query + description: Return only user-specific variables and data, excluding common aggregated variable data + required: false + style: form + explode: true + schema: + type: boolean + - name: includeTags + in: query + description: Return parent, child, duplicate, and ingredient variables + required: false + style: form + explode: true + schema: + type: boolean + - name: recalculate + in: query + description: Recalculate instead of using cached analysis + required: false + style: form + explode: true + schema: + type: boolean + - name: variableId + in: query + description: 'Ex: 13' + required: false + style: form + explode: true + schema: + type: integer + - name: concise + in: query + description: Only return field required for variable auto-complete searches. The smaller size allows for storing more variable results locally reducing API requests. + required: false + style: form + explode: true + schema: + type: boolean + - name: refresh + in: query + description: Regenerate charts instead of getting from the cache + required: false + style: form + explode: true + schema: + type: boolean + responses: + "200": + description: Variables returned + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Variable' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + post: + tags: + - variables + summary: Update User Settings for a Variable + description: Users can change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. + operationId: postUserVariables + parameters: + - name: includePrivate + in: query + description: Include user-specific variables in results + required: false + style: form + explode: true + schema: + type: boolean + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: includePublic + in: query + description: Include variables the user has no measurements for + required: false + style: form + explode: true + schema: + type: boolean + - name: searchPhrase + in: query + description: 'Ex: %Body Fat%' + required: false + style: form + explode: true + schema: + type: string + - name: exactMatch + in: query + description: Require exact match + required: false + style: form + explode: true + schema: + type: boolean + - name: manualTracking + in: query + description: Only include variables tracked manually by the user + required: false + style: form + explode: true + schema: + type: boolean + - name: variableCategoryName + in: query + description: 'Ex: Emotions, Treatments, Symptoms...' + required: false + style: form + explode: true + schema: + type: string + enum: + - Activities + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Location + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activity + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + - Goals + - name: variableCategoryId + in: query + description: 'Ex: 13' + required: false + style: form + explode: true + schema: + type: integer + - name: synonyms + in: query + description: 'Ex: McDonalds hotcake' + required: false + style: form + explode: true + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/userVariablesParam' + responses: + "201": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + "400": + description: The received JSON was invalid or malformed + content: { } + "401": + description: Not Authenticated + content: { } + "404": + description: Unknown target user ID + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/userVariables/delete: + delete: + tags: + - variables + summary: Delete All Measurements For Variable + description: Users can delete all of their measurements for a variable + operationId: deleteUserVariable + responses: + "204": + description: Successful operation + content: { } + "400": + description: The received JSON was invalid or malformed + content: { } + "401": + description: Not Authenticated + content: { } + "404": + description: Unknown target user ID + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/userVariables/reset: + post: + tags: + - variables + summary: Reset user settings for a variable to defaults + description: Reset user settings for a variable to defaults + operationId: resetUserVariableSettings + requestBody: + $ref: '#/components/requestBodies/variableIdBodyParam' + responses: + "201": + description: Successful operation + content: { } + "400": + description: The received JSON was invalid or malformed + content: { } + "401": + description: Not Authenticated + content: { } + "404": + description: Unknown target user ID + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/variableCategories: + get: + tags: + - variables + summary: Variable categories + description: The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Goals. + operationId: getVariableCategories + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VariableCategory' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/votes: + post: + tags: + - studies + summary: Post or update vote + description: I am really good at finding correlations and even compensating for various onset delays and durations of action. However, you are much better than me at knowing if there's a way that a given factor could plausibly influence an outcome. You can help me learn and get better at my predictions by pressing the thumbs down button for relationships that you think are coincidences and thumbs up once that make logic sense. + operationId: postVote + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + requestBody: + description: Contains the cause variable, effect variable, and vote value. + content: + application/json: + schema: + $ref: '#/components/schemas/Vote' + required: true + responses: + "201": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + x-codegen-request-body-name: body + /v3/votes/delete: + delete: + tags: + - studies + summary: Delete vote + description: Delete previously posted vote + operationId: deleteVote + parameters: + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + responses: + "204": + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + "401": + description: Not Authenticated + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + x-codegen-request-body-name: body + /v4/study: + get: + tags: + - studies + summary: Get Study + description: Get Study + operationId: getStudy + parameters: + - name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + - name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + - name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + - name: includeCharts + in: query + description: Highcharts configs that can be used if you have highcharts.js included on the page. This only works if the id or name query parameter is also provided. + required: false + style: form + explode: true + schema: + type: boolean + - name: recalculate + in: query + description: Recalculate instead of using cached analysis + required: false + style: form + explode: true + schema: + type: boolean + - name: studyId + in: query + description: Client id for the study you want + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Study' + "401": + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/JsonErrorResponse' + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - basic + /v3/activities: + get: + tags: + - Activities + summary: Get Activities + description: Get Activities + operationId: getActivities + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ActivitiesResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + post: + tags: + - Activities + summary: Post Activities + description: Post Activities + operationId: postActivities + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ActivitiesResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + /v3/friends: + get: + tags: + - Friends + summary: Get Friends + description: Get Friends + operationId: getFriends + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/FriendsResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + post: + tags: + - Friends + summary: Post Friends + description: Post Friends + operationId: postFriends + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/FriendsResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + /v3/groups: + get: + tags: + - Groups + summary: Get Groups + description: Get Groups + operationId: getGroups + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupsResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + post: + tags: + - Groups + summary: Post Groups + description: Post Groups + operationId: postGroups + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupsResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + /v3/groupsMembers: + get: + tags: + - Groups + summary: Get GroupsMembers + description: Get GroupsMembers + operationId: getGroupsMembers + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupsMembersResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + post: + tags: + - Groups + summary: Post GroupsMembers + description: Post GroupsMembers + operationId: postGroupsMembers + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupsMembersResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + /v3/messagesMessages: + get: + tags: + - Messages + summary: Get MessagesMessages + description: Get MessagesMessages + operationId: getMessagesMessages + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MessagesMessagesResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + post: + tags: + - Messages + summary: Post MessagesMessages + description: Post MessagesMessages + operationId: postMessagesMessages + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MessagesMessagesResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + /v3/messagesNotices: + get: + tags: + - Messages + summary: Get MessagesNotices + description: Get MessagesNotices + operationId: getMessagesNotices + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MessagesNoticesResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + post: + tags: + - Messages + summary: Post MessagesNotices + description: Post MessagesNotices + operationId: postMessagesNotices + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MessagesNoticesResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + /v3/messagesRecipients: + get: + tags: + - Messages + summary: Get MessagesRecipients + description: Get MessagesRecipients + operationId: getMessagesRecipients + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MessagesRecipientsResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + post: + tags: + - Messages + summary: Post MessagesRecipients + description: Post MessagesRecipients + operationId: postMessagesRecipients + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MessagesRecipientsResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + /v3/notifications: + get: + tags: + - Notifications + summary: Get Notifications + description: Get Notifications + operationId: getNotifications + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationsResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements + post: + tags: + - Notifications + summary: Post Notifications + description: Post Notifications + operationId: postNotifications + parameters: + - name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + - name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + - name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + - name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + - name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + - name: id + in: query + description: Id + required: false + style: form + explode: true + schema: + type: integer + - name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationsResponse' + "401": + description: Not authenticated + content: { } + "404": + description: Not found + content: { } + "500": + description: Internal server error + content: { } + security: + - access_token: [ ] + - quantimodo_oauth2: + - readmeasurements +components: + schemas: + AppSettings: + required: + - clientId + type: object + properties: + additionalSettings: + type: object + properties: { } + description: What do you expect? + appDescription: + type: string + description: What do you expect? + appDesign: + type: object + properties: { } + description: What do you expect? + appDisplayName: + type: string + description: What do you expect? + appStatus: + type: object + properties: { } + description: What do you expect? + appType: + type: string + description: What do you expect? + buildEnabled: + type: string + description: What do you expect? + clientId: + type: string + description: Get yours at https:://builder.quantimo.do + clientSecret: + type: string + description: Get yours at https:://builder.quantimo.do + collaborators: + type: array + description: What do you expect? + items: + $ref: '#/components/schemas/User' + createdAt: + type: string + description: What do you expect? + userId: + type: integer + description: User id of the owner of the application + format: int32 + users: + type: array + description: What do you expect? + items: + $ref: '#/components/schemas/User' + redirectUri: + type: string + description: What do you expect? + companyName: + type: string + description: What do you expect? + homepageUrl: + type: string + description: What do you expect? + iconUrl: + type: string + description: What do you expect? + longDescription: + type: string + description: What do you expect? + splashScreen: + type: string + description: What do you expect? + textLogo: + type: string + description: What do you expect? + AppSettingsResponse: + required: + - description + - summary + type: object + properties: + appSettings: + $ref: '#/components/schemas/AppSettings' + staticData: + $ref: '#/components/schemas/StaticData' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + AuthorizedClients: + required: + - apps + - individuals + - studies + type: object + properties: + apps: + type: array + description: Applications with access to user measurements for all variables + items: + $ref: '#/components/schemas/AppSettings' + individuals: + type: array + description: Individuals such as physicians or family members with access to user measurements for all variables + items: + $ref: '#/components/schemas/AppSettings' + studies: + type: array + description: Studies with access to generally anonymous user measurements for a specific predictor and outcome variable + items: + $ref: '#/components/schemas/AppSettings' + Button: + required: + - link + - text + type: object + properties: + accessibilityText: + type: string + description: 'Ex: connect' + action: + type: object + properties: { } + description: Action data + additionalInformation: + type: string + description: 'Ex: connect' + color: + type: string + description: 'Ex: #f2f2f2' + confirmationText: + type: string + description: Text to show user before executing functionName + functionName: + type: string + description: Name of function to call + parameters: + type: object + properties: { } + description: Data to provide to functionName or be copied to the card parameters when button is clicked and card is posted to the API + html: + type: string + description: 'Ex: connect' + id: + type: string + description: HTML element id + image: + type: string + description: 'Ex: https://image.jpg' + ionIcon: + type: string + description: 'Ex: ion-refresh' + link: + type: string + description: 'Ex: https://local.quantimo.do' + stateName: + type: string + description: State to go to + stateParams: + type: object + properties: { } + description: Data to provide to the state + successToastText: + type: string + description: Text to show user after executing functionName + successAlertTitle: + type: string + description: Text to show user after executing functionName + successAlertBody: + type: string + description: Text to show user after executing functionName + text: + type: string + description: 'Ex: Connect' + tooltip: + type: string + description: 'Ex: This is a tooltip' + webhookUrl: + type: string + description: Post here on button click + Card: + required: + - id + type: object + properties: + actionSheetButtons: + type: array + items: + $ref: '#/components/schemas/Button' + avatar: + type: string + description: Smaller square image + avatarCircular: + type: string + description: Smaller circular image + backgroundColor: + type: string + description: 'Ex: #f2f2f2' + buttons: + type: array + items: + $ref: '#/components/schemas/Button' + buttonsSecondary: + type: array + items: + $ref: '#/components/schemas/Button' + content: + type: string + description: 'Ex: Content' + headerTitle: + type: string + description: 'Ex: Title' + html: + type: string + description: HTML for the entire card. + htmlContent: + type: string + description: 'Ex:
Content
' + id: + type: string + description: HTML element id + image: + type: string + description: Larger image of variable dimensions + inputFields: + type: array + items: + $ref: '#/components/schemas/InputField' + ionIcon: + type: string + description: 'Ex: ion-refresh' + link: + type: string + description: A link to a web page or something. Not much more to say about that. + parameters: + type: object + properties: { } + description: Key value pairs derived from user input fields, button clicks, or preset defaults + relatedCards: + type: array + items: + $ref: '#/components/schemas/Card' + selectedButton: + $ref: '#/components/schemas/Button' + sharingBody: + type: string + description: 'Ex: sharingBody' + sharingButtons: + type: array + items: + $ref: '#/components/schemas/Button' + sharingTitle: + type: string + description: 'Ex: sharingTitle' + subHeader: + type: string + description: 'Ex: subTitle' + subTitle: + type: string + description: 'Ex: subTitle' + title: + type: string + description: 'Ex: Title' + Chart: + type: object + properties: + highchartConfig: + type: object + properties: { } + description: ' Highcharts config that can be used if you have highcharts.js included on the page' + chartId: + type: string + description: 'Ex: correlationScatterPlot' + chartTitle: + type: string + description: 'Ex: Overall Mood following Sleep Duration (R = -0.173)' + explanation: + type: string + description: 'Ex: The chart above indicates that an increase in Sleep Duration is usually followed by an decrease in Overall Mood.' + svgUrl: + type: string + description: Url to a static svg of the chart + svg: + type: string + description: SVG string than can be embedded directly in HTML + CommonResponse: + required: + - description + - summary + type: object + properties: + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + ConnectInstructions: + required: + - url + type: object + properties: + parameters: + type: array + description: Create a form with these fields and post the key and user submitted value to the provided connect url + items: + type: object + properties: { } + url: + type: string + description: URL to open to connect + usePopup: + type: boolean + description: True if should open auth window in popup + ConversionStep: + required: + - operation + - value + type: object + properties: + operation: + type: string + description: ADD or MULTIPLY + enum: + - ADD + - MULTIPLY + value: + type: number + description: This specifies the order of conversion steps starting with 0 + format: double + Correlation: + required: + - causeVariableName + - effectVariableName + type: object + properties: + averageDailyHighCause: + type: number + description: 'Ex: 4.19' + format: double + averageDailyLowCause: + type: number + description: 'Ex: 1.97' + format: double + averageEffect: + type: number + description: 'Ex: 3.0791054117396' + format: double + averageEffectFollowingHighCause: + type: number + description: 'Ex: 3.55' + format: double + averageEffectFollowingLowCause: + type: number + description: 'Ex: 2.65' + format: double + averageForwardPearsonCorrelationOverOnsetDelays: + type: number + description: 'Ex: 0.396' + format: double + averageReversePearsonCorrelationOverOnsetDelays: + type: number + description: 'Ex: 0.453667' + format: double + averageVote: + type: number + description: 'Ex: 0.9855' + causeChanges: + type: integer + description: 'Ex: 164' + causeDataSource: + $ref: '#/components/schemas/DataSource' + causeUserVariableShareUserMeasurements: + type: integer + description: 'Ex: 1' + causeVariableCategoryId: + type: integer + description: 'Ex: 6' + causeVariableCategoryName: + type: string + description: 'Ex: Sleep' + causeVariableCombinationOperation: + type: string + description: 'Ex: MEAN' + causeVariableUnitAbbreviatedName: + type: string + description: 'Ex: /5' + causeVariableId: + type: integer + description: 'Ex: 1448' + causeVariableMostCommonConnectorId: + type: integer + description: 'Ex: 6' + causeVariableName: + type: string + description: 'Ex: Sleep Quality' + confidenceInterval: + type: number + description: 'Ex: 0.14344467795996' + format: double + confidenceLevel: + type: string + description: 'Ex: high' + correlationCoefficient: + type: number + description: 'Ex: 0.538' + format: double + correlationIsContradictoryToOptimalValues: + type: boolean + description: 'Ex: false' + createdAt: + type: string + description: 'Ex: 2016-12-28 20:47:30 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + criticalTValue: + type: number + description: 'Calculated Statistic: Ex: 1.646' + format: double + direction: + type: string + description: 'Ex: higher' + durationOfAction: + type: integer + description: 'User-Defined Variable Setting: The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. Unit: Seconds' + durationOfActionInHours: + type: number + description: 'User-Defined Variable Setting: The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. Unit: Hours' + format: float + degreesOfFreedom: + type: integer + description: 'Ex: 200' + effectNumberOfProcessedDailyMeasurements: + type: integer + description: 'Ex: 145' + error: + type: string + description: 'Ex: optimalPearsonProduct is not defined' + effectChanges: + type: integer + description: 'Ex: 193' + effectDataSource: + $ref: '#/components/schemas/DataSource' + effectSize: + type: string + description: 'Ex: moderately positive' + effectUnit: + type: string + description: 'Ex: /5' + effectUserVariableShareUserMeasurements: + type: integer + description: 'Ex: 1' + effectVariableCategoryId: + type: integer + description: 'Ex: 1' + effectVariableCategoryName: + type: string + description: 'Ex: Emotions' + effectVariableCombinationOperation: + type: string + description: 'Ex: MEAN' + effectVariableCommonAlias: + type: string + description: 'Ex: Mood_(psychology)' + effectVariableUnitAbbreviatedName: + type: string + description: 'Ex: /5' + effectVariableUnitId: + type: integer + description: 'Ex: 10' + effectVariableUnitName: + type: string + description: 'Ex: 1 to 5 Rating' + effectVariableId: + type: integer + description: 'Ex: 1398' + effectVariableMostCommonConnectorId: + type: integer + description: 'Ex: 10' + effectVariableName: + type: string + description: 'Ex: Overall Mood' + experimentEndTime: + type: string + description: 'Ex: 2014-07-30 12:50:00 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + experimentStartTime: + type: string + description: 'Ex: 2012-05-06 21:15:00 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + forwardSpearmanCorrelationCoefficient: + type: number + description: 'Ex: 0.528359' + format: double + numberOfPairs: + type: integer + description: 'Ex: 298' + onsetDelay: + type: integer + description: 'Ex: 0' + onsetDelayInHours: + type: number + description: 'Ex: 0' + format: float + onsetDelayWithStrongestPearsonCorrelation: + type: integer + description: 'Ex: -86400' + onsetDelayWithStrongestPearsonCorrelationInHours: + type: number + description: 'Ex: -24' + format: float + optimalPearsonProduct: + type: number + description: 'Ex: 0.68582816186982' + format: double + outcomeFillingValue: + type: integer + description: 'User-Defined Variable Setting: Ex: -1. Unit: User-specified or common.' + outcomeMaximumAllowedValue: + type: number + description: 'User-Defined Variable Setting: Ex: 23. Unit: User-specified or common.' + format: double + outcomeMinimumAllowedValue: + type: number + description: 'User-Defined Variable Setting: Ex: 0.1. Unit: User-specified or common.' + format: double + pearsonCorrelationWithNoOnsetDelay: + type: number + description: 'Ex: 0.477' + format: double + predictivePearsonCorrelation: + type: number + description: 'Ex: 0.538' + format: double + predictivePearsonCorrelationCoefficient: + type: number + description: 'Ex: 0.538' + format: double + predictorDataSources: + type: string + description: 'Ex: RescueTime' + predictorFillingValue: + type: integer + description: 'Ex: -1. Unit: User-specified or common.' + predictorMaximumAllowedValue: + type: number + description: 'Ex: 200. Unit: User-specified or common.' + format: double + predictorMinimumAllowedValue: + type: number + description: 'Ex: 30. Unit: User-specified or common.' + format: double + predictsHighEffectChange: + type: integer + description: 'Ex: 17. Unit: User-specified or common.' + predictsLowEffectChange: + type: integer + description: 'Ex: -11. Unit: User-specified or common.' + pValue: + type: number + description: 'Ex: 0.39628900511586' + format: double + qmScore: + type: number + description: 'Ex: 0.528' + format: double + reversePearsonCorrelationCoefficient: + type: number + description: 'Ex: 0.01377184270977' + format: double + shareUserMeasurements: + type: boolean + description: Would you like to make this study publicly visible? + sharingDescription: + type: string + description: 'Ex: N1 Study: Sleep Quality Predicts Higher Overall Mood' + sharingTitle: + type: string + description: 'Ex: N1 Study: Sleep Quality Predicts Higher Overall Mood' + significantDifference: + type: boolean + description: 'Ex: 1' + statisticalSignificance: + type: number + description: 'Ex: 0.9813' + format: double + strengthLevel: + type: string + description: 'Ex: moderate' + strongestPearsonCorrelationCoefficient: + type: number + description: 'Ex: 0.613' + format: double + studyHtml: + $ref: '#/components/schemas/StudyHtml' + studyImages: + $ref: '#/components/schemas/StudyImages' + studyLinks: + $ref: '#/components/schemas/StudyLinks' + studyText: + $ref: '#/components/schemas/StudyText' + tValue: + type: number + description: 'Ex: 9.6986079652717' + format: double + updatedAt: + type: string + description: 'Ex: 2017-05-06 15:40:38 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + userId: + type: integer + description: 'Ex: 230' + userVote: + type: integer + description: 'Ex: 1' + valuePredictingHighOutcome: + type: number + description: 'Ex: 4.14' + format: double + valuePredictingLowOutcome: + type: number + description: 'Ex: 3.03' + format: double + outcomeDataSources: + type: string + description: Sources used to collect data for the outcome variable + principalInvestigator: + type: string + description: Mike Sinn + reverseCorrelation: + type: number + description: Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation. + averagePearsonCorrelationCoefficientOverOnsetDelays: + type: number + description: 'Ex: ' + format: float + causeNumberOfRawMeasurements: + type: integer + description: 'Ex: 14764' + correlationsOverDurationsOfAction: + type: array + description: Correlations calculated with various duration of action hyper-parameters + items: + $ref: '#/components/schemas/Correlation' + correlationsOverOnsetDelays: + type: array + description: Correlations calculated with various onset delay hyper-parameters + items: + $ref: '#/components/schemas/Correlation' + correlationsOverDurationsOfActionChartConfig: + type: object + properties: { } + description: Highchart config illustrating correlations calculated with various duration of action hyper-parameters + correlationsOverOnsetDelaysChartConfig: + type: object + properties: { } + description: Highchart config illustrating correlations calculated with various onset delay hyper-parameters + numberOfUsers: + type: number + description: 'Ex: 1' + rawCauseMeasurementSignificance: + type: number + description: 'Ex: 1' + format: double + rawEffectMeasurementSignificance: + type: number + description: 'Ex: 1' + format: double + reversePairsCount: + type: string + description: 'Ex: 1' + voteStatisticalSignificance: + type: integer + description: 'Ex: 1' + aggregateQMScore: + type: number + description: 'Ex: 0.011598441286655' + format: double + forwardPearsonCorrelationCoefficient: + type: number + description: 'Ex: 0.0333' + format: double + numberOfCorrelations: + type: integer + description: 'Ex: 6' + vote: + type: number + description: 'Ex: 1 or 0' + DataSource: + required: + - affiliate + - connectorClientId + - defaultVariableCategoryName + - displayName + - enabled + - getItUrl + - id + - image + - imageHtml + - linkedDisplayNameHtml + - longDescription + - name + - shortDescription + type: object + properties: + affiliate: + type: boolean + description: 'Ex: true' + backgroundColor: + type: string + description: Background color HEX code that matches the icon + buttons: + type: array + items: + $ref: '#/components/schemas/Button' + card: + $ref: '#/components/schemas/Card' + clientId: + type: string + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + connected: + type: boolean + description: True if the authenticated user has this connector enabled + connectError: + type: string + description: 'Ex: Your token is expired. Please re-connect' + connectInstructions: + $ref: '#/components/schemas/ConnectInstructions' + connectorId: + type: integer + description: 'Ex: 8' + connectStatus: + type: string + description: 'Ex: CONNECTED' + count: + type: integer + description: Number of measurements from this source or number of users who have measurements from this source + createdAt: + type: string + description: 'Ex: 2000-01-01 00:00:00 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + connectorClientId: + type: string + description: 'Ex: ba7d0c12432650e23b3ce924ae2d21e2ff59e7e4e28650759633700af7ed0a30' + defaultVariableCategoryName: + type: string + description: 'Ex: Foods' + displayName: + type: string + description: 'Ex: QuantiModo' + enabled: + type: integer + description: 'Ex: 0' + getItUrl: + type: string + description: 'Ex: https://quantimo.do' + id: + type: integer + description: 'Ex: 72' + image: + type: string + description: 'Ex: https://web.quantimo.do/img/logos/quantimodo-logo-qm-rainbow-200-200.png' + imageHtml: + type: string + description: 'Ex: QuantiModo' + lastSuccessfulUpdatedAt: + type: string + description: 'Ex: 2017-07-31 10:10:34 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + lastUpdate: + type: integer + description: Epoch timestamp of last sync + linkedDisplayNameHtml: + type: string + description: 'Ex: QuantiModo' + longDescription: + type: string + description: 'Ex: QuantiModo is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, Github, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. QuantiModo then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values.' + message: + type: string + description: 'Ex: Got 412 new measurements on 2017-07-31 10:10:34' + mobileConnectMethod: + type: string + description: 'Mobile connect method: webview, cordova, google, spreadsheet, or ip' + name: + type: string + description: 'Ex: quantimodo' + platforms: + type: array + description: Platforms (chrome, android, ios, web) that you can connect on. + items: + type: string + premium: + type: boolean + description: True if connection requires upgrade + scopes: + type: array + description: Required connector scopes + items: + type: string + shortDescription: + type: string + description: 'Ex: Tracks anything' + spreadsheetUploadLink: + type: string + description: URL to POST a spreadsheet to (if available for this data source) + totalMeasurementsInLastUpdate: + type: integer + description: Number of measurements obtained during latest update + updatedAt: + type: string + description: 'Ex: 2017-07-31 10:10:34 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + updateRequestedAt: + type: string + description: 'Ex: 2017-07-18 05:16:31 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + updateStatus: + type: string + description: 'Ex: UPDATED' + userId: + type: integer + description: 'Ex: 230' + DeviceToken: + required: + - deviceToken + - platform + type: object + properties: + clientId: + type: string + description: Client id + platform: + type: string + description: ios, android, or web + deviceToken: + type: string + description: The device token + Error: + required: + - message + type: object + properties: + message: + type: string + description: Error message + Explanation: + required: + - description + - image + - ionIcon + - startTracking + - title + type: object + properties: + description: + type: string + description: 'Ex: These factors are most predictive of Overall Mood based on your own data.' + image: + $ref: '#/components/schemas/Image' + ionIcon: + type: string + description: 'Ex: ion-ios-person' + startTracking: + $ref: '#/components/schemas/ExplanationStartTracking' + title: + type: string + description: 'Ex: Top Predictors of Overall Mood' + html: + type: string + description: Embeddable list of study summaries with explanation at the top + ExplanationStartTracking: + required: + - button + - description + - title + type: object + properties: + button: + $ref: '#/components/schemas/Button' + description: + type: string + description: 'Ex: The more data I have the more accurate your results will be so track regularly!' + title: + type: string + description: 'Ex: Improve Accuracy' + InputField: + required: + - displayName + - type + type: object + properties: + displayName: + type: string + description: What do you expect? + helpText: + type: string + description: What do you expect? + hint: + type: string + description: What do you expect? + icon: + type: string + description: What do you expect? + id: + type: string + description: HTML element id + image: + type: string + description: What do you expect? + key: + type: string + description: What do you expect? + labelLeft: + type: string + description: What do you expect? + labelRight: + type: string + description: What do you expect? + link: + type: string + description: What do you expect? + maxLength: + type: integer + description: What do you expect? + maxValue: + type: number + description: What do you expect? + minLength: + type: integer + description: What do you expect? + minValue: + type: number + description: What do you expect? + options: + type: array + description: Selector list options + items: + type: string + placeholder: + type: string + description: 'Ex: Title' + postUrl: + type: string + description: What do you expect? + required: + type: boolean + description: What do you expect? + show: + type: boolean + description: 'Ex: Title' + submitButton: + $ref: '#/components/schemas/Button' + type: + type: string + description: 'Ex: Title' + enum: + - check_box + - date + - email + - number + - postal_code + - select_option + - string + - switch + - text_area + - unit + - variable_category + validationPattern: + type: string + description: See http://html5pattern.com/ for examples + value: + type: string + description: What do you expect? + GetConnectorsResponse: + required: + - description + - summary + type: object + properties: + connectors: + type: array + items: + $ref: '#/components/schemas/DataSource' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + GetCorrelationsDataResponse: + required: + - correlations + - explanation + type: object + properties: + correlations: + type: array + items: + $ref: '#/components/schemas/Correlation' + explanation: + $ref: '#/components/schemas/Explanation' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + GetCorrelationsResponse: + required: + - description + - summary + type: object + properties: + data: + $ref: '#/components/schemas/GetCorrelationsDataResponse' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + avatar: + type: string + description: Square icon png url + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + GetStudiesResponse: + required: + - description + - summary + type: object + properties: + studies: + type: array + items: + $ref: '#/components/schemas/Study' + description: + type: string + description: 'Ex: These factors are most predictive of Overall Mood based on your own data.' + summary: + type: string + description: Can be used as title in help info popup + image: + $ref: '#/components/schemas/Image' + avatar: + type: string + description: Square icon png url + ionIcon: + type: string + description: 'Ex: ion-ios-person' + startTracking: + $ref: '#/components/schemas/ExplanationStartTracking' + title: + type: string + description: 'Ex: Top Predictors of Overall Mood' + html: + type: string + description: Embeddable list of study summaries with explanation at the top + GetSharesResponse: + required: + - description + - summary + type: object + properties: + authorizedClients: + $ref: '#/components/schemas/AuthorizedClients' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + FeedResponse: + required: + - cards + - description + - summary + type: object + properties: + cards: + type: array + items: + $ref: '#/components/schemas/Card' + description: + type: string + description: Tracking reminder notifications, messages, and study result cards that can be displayed in user feed or stream + summary: + type: string + description: Tracking reminder notifications, messages, and study results + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + GetTrackingReminderNotificationsResponse: + required: + - description + - summary + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/TrackingReminderNotification' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + Image: + required: + - height + - imageUrl + - width + type: object + properties: + height: + type: string + description: 'Ex: 240' + imageUrl: + type: string + description: 'Ex: https://www.filepicker.io/api/file/TjmeNWS5Q2SFmtJlUGLf' + width: + type: string + description: 'Ex: 224' + JsonErrorResponse: + required: + - status + type: object + properties: + message: + type: string + description: Error message + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + Measurement: + required: + - sourceName + - startTimeString + - unitAbbreviatedName + - value + - variableName + type: object + properties: + card: + $ref: '#/components/schemas/Card' + clientId: + type: string + description: 'Ex: quantimodo' + connectorId: + type: integer + description: 'Ex: 13' + createdAt: + type: string + description: 'Ex: 2017-07-30 21:08:36' + displayValueAndUnitString: + type: string + description: 'Examples: 3/5, $10, or 1 count' + iconIcon: + type: string + description: 'Ex: ion-sad-outline' + id: + type: integer + description: 'Ex: 1051466127' + inputType: + type: string + description: 'Ex: value' + ionIcon: + type: string + description: 'Ex: ion-ios-medkit-outline' + manualTracking: + type: boolean + description: 'Ex: 1' + maximumAllowedValue: + type: number + description: 'Ex: 5. Unit: User-specified or common.' + format: double + minimumAllowedValue: + type: number + description: 'Ex: 1. Unit: User-specified or common.' + format: double + note: + type: string + description: Note of measurement + noteObject: + type: object + properties: { } + description: Additional meta data for the measurement + noteHtml: + type: object + properties: { } + description: Embeddable HTML with message hyperlinked with associated url + originalUnitId: + type: integer + description: 'Ex: 23' + originalValue: + type: number + description: 'Original value submitted. Unit: Originally submitted.' + format: double + pngPath: + type: string + description: 'Ex: img/variable_categories/treatments.png' + pngUrl: + type: string + description: 'Ex: https://web.quantimo.do/img/variable_categories/treatments.png' + productUrl: + type: string + description: Link to associated product for purchase + sourceName: + type: string + description: Application or device used to record the measurement values + startDate: + type: string + description: 'Ex: 2014-08-27' + startTimeEpoch: + type: integer + description: Seconds between the start of the event measured and 1970 (Unix timestamp) + startTimeString: + type: string + description: Start Time for the measurement event in UTC ISO 8601 YYYY-MM-DDThh:mm:ss + svgUrl: + type: string + description: 'Ex: https://web.quantimo.do/img/variable_categories/treatments.svg' + unitAbbreviatedName: + type: string + description: Abbreviated name for the unit of measurement + unitCategoryId: + type: integer + description: 'Ex: 6' + unitCategoryName: + type: string + description: 'Ex: Miscellany' + unitId: + type: integer + description: 'Ex: 23' + unitName: + type: string + description: 'Ex: Count' + updatedAt: + type: string + description: 'Ex: 2017-07-30 21:08:36' + url: + type: string + description: Link to associated Facebook like or Github commit, for instance + userVariableUnitAbbreviatedName: + type: string + description: 'Ex: count' + userVariableUnitCategoryId: + type: integer + description: 'Ex: 6' + userVariableUnitCategoryName: + type: string + description: 'Ex: Miscellany' + userVariableUnitId: + type: integer + description: 'Ex: 23' + userVariableUnitName: + type: string + description: 'Ex: Count' + userVariableVariableCategoryId: + type: integer + description: 'Ex: 13' + userVariableVariableCategoryName: + type: string + description: 'Ex: Treatments' + valence: + type: string + description: 'Valence indicates what type of buttons should be used when recording measurements for this variable. positive - Face buttons with the happiest face equating to a 5/5 rating where higher is better like Overall Mood. negative - Face buttons with happiest face equating to a 1/5 rating where lower is better like Headache Severity. numeric - Just 1 to 5 numeric buttons for neutral variables. ' + value: + type: number + description: Converted measurement value in requested unit + format: double + variableCategoryId: + type: integer + description: 'Ex: 13' + variableCategoryImageUrl: + type: string + description: 'Ex: https://static.quantimo.do/img/variable_categories/pill-96.png' + variableCategoryName: + type: string + description: 'Ex: Emotions, Treatments, Symptoms...' + enum: + - Activity + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Goals + - Locations + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activities + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + variableDescription: + type: string + description: 'Valence indicates what type of buttons should be used when recording measurements for this variable. positive - Face buttons with the happiest face equating to a 5/5 rating where higher is better like Overall Mood. negative - Face buttons with happiest face equating to a 1/5 rating where lower is better like Headache Severity. numeric - Just 1 to 5 numeric buttons for neutral variables. ' + variableId: + type: integer + description: 'Ex: 5956846' + variableName: + type: string + description: Name of the variable for which we are creating the measurement records + displayName: + type: string + description: 'Ex: Trader Joe''s Bedtime Tea' + MeasurementItem: + required: + - timestamp + - value + type: object + properties: + note: + type: string + description: Optional note to include with the measurement + timestamp: + type: integer + description: Timestamp for the measurement event in epoch time (unixtime) + format: int64 + value: + type: number + description: Measurement value + format: double + MeasurementSet: + required: + - measurementItems + - sourceName + - unitAbbreviatedName + - variableName + type: object + properties: + combinationOperation: + type: string + description: Way to aggregate measurements over time. SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED. + enum: + - MEAN + - SUM + measurementItems: + type: array + description: Array of timestamps, values, and optional notes + items: + $ref: '#/components/schemas/MeasurementItem' + sourceName: + type: string + description: Name of the application or device used to record the measurement values + unitAbbreviatedName: + type: string + description: Unit of measurement + variableCategoryName: + type: string + description: 'Ex: Emotions, Treatments, Symptoms...' + enum: + - Activity + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Goals + - Locations + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activities + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + variableName: + type: string + description: ORIGINAL name of the variable for which we are creating the measurement records + upc: + type: string + description: UPC or other barcode scan result + MeasurementUpdate: + required: + - id + type: object + properties: + id: + type: integer + description: Variable id of the measurement to be updated + note: + type: string + description: The new note for the measurement (optional) + startTime: + type: integer + description: The new timestamp for the the event in epoch seconds (optional) + value: + type: number + description: The new value of for the measurement (optional) + format: double + Pair: + required: + - causeMeasurement + - causeMeasurementValue + - causeVariableUnitAbbreviatedName + - effectMeasurement + - effectMeasurementValue + - effectVariableUnitAbbreviatedName + - timestamp + type: object + properties: + causeMeasurement: + type: number + description: 'Ex: 101341.66666667' + format: double + causeMeasurementValue: + type: number + description: 'Ex: 101341.66666667' + format: double + causeVariableUnitAbbreviatedName: + type: string + description: 'Ex: mg' + effectMeasurement: + type: number + description: 'Ex: 7.98' + format: double + effectMeasurementValue: + type: number + description: 'Ex: 7.98' + format: double + effectVariableUnitAbbreviatedName: + type: string + description: 'Ex: %' + eventAt: + type: string + description: 'Ex: 2015-08-06 15:49:02 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + eventAtUnixTime: + type: integer + description: 'Ex: 1438876142' + startTimeString: + type: string + description: 'Ex: 2015-08-06 15:49:02 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + timestamp: + type: integer + description: 'Ex: 1464937200' + ParticipantInstruction: + type: object + properties: + instructionsForCauseVariable: + type: string + description: 'Ex: Obtain Fitbit and use it to record your Sleep Duration. Once you have a Fitbit account, connect your Fitbit account at QuantiModo to automatically import and analyze your data.' + instructionsForEffectVariable: + type: string + description: 'Ex: Obtain QuantiModo and use it to record your Overall Mood. Once you have a QuantiModo account, connect your QuantiModo account at QuantiModo to automatically import and analyze your data.' + PostMeasurementsDataResponse: + type: object + properties: + userVariables: + type: array + items: + $ref: '#/components/schemas/Variable' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + PostMeasurementsResponse: + required: + - status + - success + type: object + properties: + data: + $ref: '#/components/schemas/PostMeasurementsDataResponse' + message: + type: string + description: Message + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + PostStudyPublishResponse: + type: object + properties: + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + PostStudyCreateResponse: + type: object + properties: + study: + $ref: '#/components/schemas/Study' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + PostTrackingRemindersDataResponse: + type: object + properties: + trackingReminderNotifications: + type: array + items: + $ref: '#/components/schemas/TrackingReminderNotification' + trackingReminders: + type: array + items: + $ref: '#/components/schemas/TrackingReminder' + userVariables: + type: array + items: + $ref: '#/components/schemas/Variable' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + PostTrackingRemindersResponse: + required: + - status + - success + type: object + properties: + data: + $ref: '#/components/schemas/PostTrackingRemindersDataResponse' + message: + type: string + description: Message + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + PostUserSettingsDataResponse: + type: object + properties: + purchaseId: + type: integer + description: 'Ex: 1' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + PostUserSettingsResponse: + required: + - status + - success + type: object + properties: + data: + $ref: '#/components/schemas/PostUserSettingsDataResponse' + message: + type: string + description: Message + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + ShareInvitationBody: + required: + - emailAddress + type: object + properties: + emailAddress: + type: string + description: Enter the email address of the friend, family member, or health-care provider that you would like to give access to your measurements + name: + type: string + description: Name of the individual that the user wishes to have access to their measurements + emailSubject: + type: string + description: 'Ex: I would like to share my measurements with you!' + emailBody: + type: string + description: 'Ex: I would like to share my data with you so you can help me identify find discover hidden causes of and new treatments for my illness.' + scopes: + type: string + description: Space separated list of scopes to grant to the recipient (i.e. readmeasurements, writemeasurements, measurements:read + + Study: + required: + - type + type: object + properties: + type: + type: string + description: 'Ex: population, cohort, or individual' + userId: + type: integer + description: The user id of the principal investigator or subject if an individual studies + format: int32 + id: + type: string + description: ID of the cohort study which is necessary to allow participants to join + causeVariable: + $ref: '#/components/schemas/Variable' + causeVariableName: + type: string + description: 'Ex: Sleep Quality' + studyCharts: + $ref: '#/components/schemas/StudyCharts' + effectVariable: + $ref: '#/components/schemas/Variable' + effectVariableName: + type: string + description: 'Ex: Overall Mood' + participantInstructions: + $ref: '#/components/schemas/ParticipantInstruction' + statistics: + $ref: '#/components/schemas/Correlation' + studyCard: + $ref: '#/components/schemas/Card' + studyHtml: + $ref: '#/components/schemas/StudyHtml' + studyImages: + $ref: '#/components/schemas/StudyImages' + studyLinks: + $ref: '#/components/schemas/StudyLinks' + studySharing: + $ref: '#/components/schemas/StudySharing' + studyText: + $ref: '#/components/schemas/StudyText' + studyVotes: + $ref: '#/components/schemas/StudyVotes' + joined: + type: boolean + description: True if you are sharing your data with this study + description: A study analyzes the relationship between a predictor variable like gluten-intake and an outcome of interest such as overall mood. + StudyCharts: + type: object + properties: + populationTraitScatterPlot: + $ref: '#/components/schemas/Chart' + outcomeDistributionColumnChart: + $ref: '#/components/schemas/Chart' + predictorDistributionColumnChart: + $ref: '#/components/schemas/Chart' + correlationScatterPlot: + $ref: '#/components/schemas/Chart' + pairsOverTimeLineChart: + $ref: '#/components/schemas/Chart' + description: An object with various chart properties each property contain and svg and Highcharts configuration + StudyCreationBody: + required: + - causeVariableName + - effectVariableName + - type + type: object + properties: + causeVariableName: + type: string + description: Name of predictor variable + effectVariableName: + type: string + description: Name of the outcome variable + studyTitle: + type: string + description: Title of your study (optional) + type: + type: string + description: Individual studies are based on data of a single user. Group studies are based on data from a specific group of individuals who have joined. Global studies are based on aggregated and anonymously shared data from all users. + enum: + - individual + - group + - global + StudyHtml: + required: + - chartHtml + - fullStudyHtml + type: object + properties: + chartHtml: + type: string + description: Embeddable chart html + downloadButtonsHtml: + type: string + description: Play Store, App Store, Chrome Web Store + fullPageWithHead: + type: string + description: Embeddable study including HTML head section charts. Modifiable css classes are study-title, study-section-header, study-section-body + fullStudyHtml: + type: string + description: Embeddable study text html including charts. Modifiable css classes are study-title, study-section-header, study-section-body + fullStudyHtmlWithCssStyles: + type: string + description: Embeddable study html including charts and css styling + participantInstructionsHtml: + type: string + description: Instructions for study participation + statisticsTableHtml: + type: string + description: Embeddable table with statistics + studyAbstractHtml: + type: string + description: Text summary + studyHeaderHtml: + type: string + description: Title, study image, abstract with CSS styling + studyImageHtml: + type: string + description: PNG image + studyMetaHtml: + type: string + description: Facebook, Twitter, Google+ + studyTextHtml: + type: string + description: Formatted study text sections + socialSharingButtonHtml: + type: string + description: What do you expect? + studySummaryBoxHtml: + type: string + description: What do you expect? + StudyImages: + required: + - gaugeImage + - gaugeImageSquare + - imageUrl + type: object + properties: + causeVariableImageUrl: + type: string + description: 'Ex: https://static.quantimo.do/img/variable_categories/sleeping_in_bed-96.png' + causeVariableIonIcon: + type: string + description: 'Ex: ion-ios-cloudy-night-outline' + effectVariableImageUrl: + type: string + description: 'Ex: https://static.quantimo.do/img/variable_categories/theatre_mask-96.png' + effectVariableIonIcon: + type: string + description: 'Ex: ion-happy-outline' + gaugeImage: + type: string + description: 'Ex: https://s3.amazonaws.com/quantimodo-docs/images/gauge-moderately-positive-relationship.png' + gaugeImageSquare: + type: string + description: 'Ex: https://s3.amazonaws.com/quantimodo-docs/images/gauge-moderately-positive-relationship-200-200.png' + gaugeSharingImageUrl: + type: string + description: Image with gauge and category images + imageUrl: + type: string + description: 'Ex: https://s3-us-west-1.amazonaws.com/qmimages/variable_categories_gauges_logo_background/gauge-moderately-positive-relationship_sleep_emotions_logo_background.png' + robotSharingImageUrl: + type: string + description: Image with robot and category images + avatar: + type: string + description: Avatar of the principal investigator + StudyJoinResponse: + type: object + properties: + study: + $ref: '#/components/schemas/Study' + trackingReminders: + type: array + items: + $ref: '#/components/schemas/TrackingReminder' + trackingReminderNotifications: + type: array + items: + $ref: '#/components/schemas/TrackingReminderNotification' + description: + type: string + description: Can be used as body of help info popup + summary: + type: string + description: Can be used as title in help info popup + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + StudyLinks: + required: + - studyLinkDynamic + - studyLinkEmail + - studyLinkFacebook + - studyLinkGoogle + - studyLinkStatic + - studyLinkTwitter + type: object + properties: + studyJoinLink: + type: string + description: Share this link with potential study participants + studyLinkEmail: + type: string + description: 'Ex: mailto:?subject=N1%20Study%3A%20Sleep%20Quality%20Predicts%20Higher%20Overall%20Mood&body=Check%20out%20my%20study%20at%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230%0A%0AHave%20a%20great%20day!' + studyLinkFacebook: + type: string + description: 'Ex: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230' + studyLinkGoogle: + type: string + description: 'Ex: https://plus.google.com/share?url=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230' + studyLinkStatic: + type: string + description: 'Ex: https://local.quantimo.do/api/v2/study?causeVariableName=Sleep%20Quality&effectVariableName=Overall%20Mood&userId=230' + studyLinkDynamic: + type: string + description: 'Ex: https://local.quantimo.do/ionic/Modo/www/index.html#/app/study?causeVariableName=Sleep%20Quality&effectVariableName=Overall%20Mood&userId=230' + studyLinkTwitter: + type: string + description: 'Ex: https://twitter.com/home?status=Sleep%20Quality%20Predicts%20Higher%20Overall%20Mood%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230%20%40quantimodo' + StudySharing: + required: + - shareUserMeasurements + - sharingDescription + - sharingTitle + type: object + properties: + shareUserMeasurements: + type: boolean + description: Would you like to make this study publicly visible? + sharingDescription: + type: string + description: 'Ex: N1 Study: Sleep Quality Predicts Higher Overall Mood' + sharingTitle: + type: string + description: 'Ex: N1 Study: Sleep Quality Predicts Higher Overall Mood' + StudyText: + required: + - studyAbstract + - studyDesign + - studyLimitations + - studyObjective + - studyResults + - studyTitle + type: object + properties: + averageEffectFollowingHighCauseExplanation: + type: string + description: 'Ex: Overall Mood is 3.55/5 (15% higher) on average after days with around 4.19/5 Sleep Quality' + averageEffectFollowingLowCauseExplanation: + type: string + description: 'Ex: Overall Mood is 2.65/5 (14% lower) on average after days with around 1.97/5 Sleep Quality' + valuePredictingHighOutcomeExplanation: + type: string + description: 'Ex: Overall Mood, on average, 17% higher after around 4.14/5 Sleep Quality' + valuePredictingLowOutcomeExplanation: + type: string + description: 'Ex: Overall Mood, on average, 11% lower after around 3.03/5 Sleep Quality' + dataAnalysis: + type: string + description: 'Ex: It was assumed that 0 hours would pass before a change in Very Distracting Time would produce an observable change in Video Activities. It was assumed that Very Distracting Time could produce an observable change in Video Activities for as much as 7 days after the stimulus event.' + dataSources: + type: string + description: 'Ex: Very Distracting Time data was primarily collected using RescueTime. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs.
Video Activities data was primarily collected using RescueTime. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs.' + dataSourcesParagraphForCause: + type: string + description: 'Ex: Very Distracting Time data was primarily collected using RescueTime. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs.
Video Activities data was primarily collected using RescueTime. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs.' + dataSourcesParagraphForEffect: + type: string + description: 'Ex: Very Distracting Time data was primarily collected using RescueTime. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs.
Video Activities data was primarily collected using RescueTime. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs.' + lastCauseDailyValueSentenceExtended: + type: string + description: 'Ex: Sleep Quality Predicts Higher Overall Mood' + lastCauseAndOptimalValueSentence: + type: string + description: 'Ex: Sleep Quality Predicts Higher Overall Mood' + lastCauseDailyValueSentence: + type: string + description: 'Ex: Sleep Quality Predicts Higher Overall Mood' + optimalDailyValueSentence: + type: string + description: 'Ex: Sleep Quality Predicts Higher Overall Mood' + participantInstructions: + type: string + description: Instructions for study participation + predictorExplanation: + type: string + description: 'Ex: Sleep Quality Predicts Higher Overall Mood' + significanceExplanation: + type: string + description: 'Ex: Using a two-tailed t-test with alpha = 0.05, it was determined that the change in Video Activities is statistically significant at 95% confidence interval.' + studyAbstract: + type: string + description: 'Ex: Aggregated data from 21 suggests with a low degree of confidence (p=0.097) that Very Distracting Time has a moderately positive predictive relationship (R=0.354) with Video Activities (Activity). The highest quartile of Video Activities measurements were observed following an average 2.03h Very Distracting Timeper day. The lowest quartile of Video Activities measurements were observed following an average 1.04h Very Distracting Timeper day.' + studyDesign: + type: string + description: 'Ex: This study is based on data donated by 21 QuantiModo users. Thus, the study design is equivalent to the aggregation of 21 separate n=1 observational natural experiments.' + studyLimitations: + type: string + description: |- + Ex: As with any human experiment, it was impossible to control for all potentially confounding variables. + Correlation does not necessarily imply correlation. We can never know for sure if one factor is definitely the cause of an outcome. + However, lack of correlation definitely implies the lack of a causal relationship. Hence, we can with great + confidence rule out non-existent relationships. For instance, if we discover no relationship between mood + and an antidepressant this information is just as or even more valuable than the discovery that there is a relationship. +
+
+ We can also take advantage of several characteristics of time series data from many subjects to infer the likelihood of a causal relationship if we do find a correlational relationship. + The criteria for causation are a group of minimal conditions necessary to provide adequate evidence of a causal relationship between an incidence and a possible consequence. + The list of the criteria is as follows: +
+ 1. Strength (effect size): A small association does not mean that there is not a causal effect, though the larger the association, the more likely that it is causal. +
+ 2. Consistency (reproducibility): Consistent findings observed by different persons in different places with different samples strengthens the likelihood of an effect. +
+ 3. Specificity: Causation is likely if a very specific population at a specific site and disease with no other likely explanation. The more specific an association between a factor and an effect is, the bigger the probability of a causal relationship. +
+ 4. Temporality: The effect has to occur after the cause (and if there is an expected delay between the cause and expected effect, then the effect must occur after that delay). +
+ 5. Biological gradient: Greater exposure should generally lead to greater incidence of the effect. However, in some cases, the mere presence of the factor can trigger the effect. In other cases, an inverse proportion is observed: greater exposure leads to lower incidence. +
+ 6. Plausibility: A plausible mechanism between cause and effect is helpful. +
+ 7. Coherence: Coherence between epidemiological and laboratory findings increases the likelihood of an effect. +
+ 8. Experiment: "Occasionally it is possible to appeal to experimental evidence". +
+ 9. Analogy: The effect of similar factors may be considered. +
+
+ The confidence in a causal relationship is bolstered by the fact that time-precedence was taken into account in all calculations. Furthermore, in accordance with the law of large numbers (LLN), the predictive power and accuracy of these results will continually grow over time. 146 paired data points were used in this analysis. Assuming that the relationship is merely coincidental, as the participant independently modifies their Very Distracting Time values, the observed strength of the relationship will decline until it is below the threshold of significance. To it another way, in the case that we do find a spurious correlation, suggesting that banana intake improves mood for instance, + one will likely increase their banana intake. Due to the fact that this correlation is spurious, it is unlikely + that you will see a continued and persistent corresponding increase in mood. So over time, the spurious correlation will + naturally dissipate.Furthermore, it will be very enlightening to aggregate this data with the data from other participants with similar genetic, diseasomic, environmentomic, and demographic profiles. + studyObjective: + type: string + description: 'Ex: The objective of this study is to determine the nature of the relationship (if any) between the Very Distracting Time and the Video Activities. Additionally, we attempt to determine the Very Distracting Time values most likely to produce optimal Video Activities values.' + studyResults: + type: string + description: 'Ex: This analysis suggests that higher Very Distracting Time generally predicts negative Video Activities (p = 0.097). Video Activities is, on average, 36% higher after around 2.03 Very Distracting Time. After an onset delay of 168 hours, Video Activities is, on average, 16% lower than its average over the 168 hours following around 1.04 Very Distracting Time. 146 data points were used in this analysis. The value for Very Distracting Time changed 2984 times, effectively running 1492 separate natural experiments. The top quartile outcome values are preceded by an average 2.03 h of Very Distracting Time. The bottom quartile outcome values are preceded by an average 1.04 h of Very Distracting Time. Forward Pearson Correlation Coefficient was 0.354 (p=0.097, 95% CI -0.437 to 1.144 onset delay = 0 hours, duration of action = 168 hours) . The Reverse Pearson Correlation Coefficient was 0.208 (P=0.097, 95% CI -0.583 to 0.998, onset delay = -0 hours, duration of action = -168 hours). When the Very Distracting Time value is closer to 2.03 h than 1.04 h, the Video Activities value which follows is, on average, 36% percent higher than its typical value. When the Very Distracting Time value is closer to 1.04 h than 2.03 h, the Video Activities value which follows is 0% lower than its typical value. Video Activities is 5 h (67% higher) on average after days with around 5 h Very Distracting Time' + studyTitle: + type: string + description: 'Ex: N1 Study: Very Distracting Time Predicts Negative Video Activities' + studyInvitation: + type: string + description: Help us determine if Remeron affects Overall Mood! + studyQuestion: + type: string + description: Does Remeron affect Overall Mood? + studyBackground: + type: string + description: In order to reduce suffering through the advancement of human knowledge... + StudyVotes: + required: + - averageVote + - userVote + type: object + properties: + averageVote: + type: number + description: 'Average of all user votes with 1 representing an up-vote and 0 representing a down-vote. Ex: 0.9855' + userVote: + type: integer + description: '1 if the current user has up-voted the study and 0 if they down-voted it. Null means no vote. Ex: 1 or 0 or null' + TrackingReminder: + required: + - reminderFrequency + - unitAbbreviatedName + - variableCategoryName + - variableName + type: object + properties: + actionArray: + type: array + items: + $ref: '#/components/schemas/TrackingReminderNotificationAction' + availableUnits: + type: array + items: + $ref: '#/components/schemas/Unit' + bestStudyLink: + type: string + description: Link to study comparing variable with strongest relationship for user or population + bestStudyCard: + $ref: '#/components/schemas/Card' + bestUserStudyLink: + type: string + description: Link to study comparing variable with strongest relationship for user + bestUserStudyCard: + $ref: '#/components/schemas/Card' + bestPopulationStudyLink: + type: string + description: Link to study comparing variable with strongest relationship for population + bestPopulationStudyCard: + $ref: '#/components/schemas/Card' + optimalValueMessage: + type: string + description: Description of relationship with variable with strongest relationship for user or population + commonOptimalValueMessage: + type: string + description: Description of relationship with variable with strongest relationship for population + userOptimalValueMessage: + type: string + description: Description of relationship with variable with strongest relationship for user + card: + $ref: '#/components/schemas/Card' + clientId: + type: string + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + combinationOperation: + type: string + description: The way multiple measurements are aggregated over time + enum: + - MEAN + - SUM + createdAt: + type: string + description: 'Ex: 2016-05-18 02:24:08 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + displayName: + type: string + description: 'Ex: Trader Joe''s Bedtime Tea' + unitAbbreviatedName: + type: string + description: 'Ex: /5' + unitCategoryId: + type: integer + description: 'Ex: 5' + unitCategoryName: + type: string + description: 'Ex: Rating' + unitId: + type: integer + description: 'Ex: 10' + unitName: + type: string + description: 'Ex: 1 to 5 Rating' + defaultValue: + type: number + description: 'Default value to use for the measurement when tracking. Unit: User-specified or common.' + format: float + enabled: + type: boolean + description: If a tracking reminder is enabled, tracking reminder notifications will be generated for this variable. + email: + type: boolean + description: True if the reminders should be delivered via email + errorMessage: + type: string + description: 'Ex: reminderStartTimeLocal is less than $user->earliestReminderTime or greater than $user->latestReminderTime' + fillingValue: + type: integer + description: 'Ex: 0. Unit: User-specified or common.' + firstDailyReminderTime: + type: string + description: 'Ex: 02:45:20 in UTC timezone' + frequencyTextDescription: + type: string + description: 'Ex: Daily' + frequencyTextDescriptionWithTime: + type: string + description: 'Ex: Daily at 09:45 PM' + id: + type: integer + description: id + format: int32 + inputType: + type: string + description: 'Ex: saddestFaceIsFive' + instructions: + type: string + description: 'Ex: I am an instruction!' + ionIcon: + type: string + description: 'Ex: ion-sad-outline' + lastTracked: + type: string + description: UTC ISO 8601 YYYY-MM-DDThh:mm:ss timestamp for the last time a measurement was received for this user and variable + lastValue: + type: number + description: 'Ex: 2' + format: double + latestTrackingReminderNotificationReminderTime: + type: string + description: UTC ISO 8601 YYYY-MM-DDThh:mm:ss timestamp for the reminder time of the latest tracking reminder notification that has been pre-emptively generated in the database + localDailyReminderNotificationTimes: + type: array + items: + type: string + localDailyReminderNotificationTimesForAllReminders: + type: array + items: + type: string + manualTracking: + type: boolean + description: 'Ex: 1' + maximumAllowedValue: + type: number + description: 'Ex: 5. Unit: User-specified or common.' + format: double + minimumAllowedValue: + type: number + description: 'Ex: 1. Unit: User-specified or common.' + format: double + nextReminderTimeEpochSeconds: + type: integer + description: 'Ex: 1501555520' + notificationBar: + type: boolean + description: True if the reminders should appear in the notification bar + numberOfRawMeasurements: + type: integer + description: 'Ex: 445' + numberOfUniqueValues: + type: integer + description: 'Ex: 1' + outcome: + type: boolean + description: Indicates whether or not the variable is usually an outcome of interest such as a symptom or emotion + pngPath: + type: string + description: 'Ex: img/variable_categories/symptoms.png' + pngUrl: + type: string + description: 'Ex: https://web.quantimo.do/img/variable_categories/symptoms.png' + productUrl: + type: string + description: Link to associated product for purchase + popUp: + type: boolean + description: True if the reminders should appear as a popup notification + question: + type: string + description: 'Ex: How is your overall mood?' + longQuestion: + type: string + description: 'Ex: How is your overall mood on a scale of 1 to 5??' + reminderEndTime: + type: string + description: Latest time of day at which reminders should appear in UTC HH:MM:SS format + reminderFrequency: + type: integer + description: Number of seconds between one reminder and the next + format: int32 + reminderSound: + type: string + description: String identifier for the sound to accompany the reminder + reminderStartEpochSeconds: + type: integer + description: 'Ex: 1469760320' + reminderStartTime: + type: string + description: Earliest time of day at which reminders should appear in UTC HH:MM:SS format + reminderStartTimeLocal: + type: string + description: 'Ex: 21:45:20' + format: string + reminderStartTimeLocalHumanFormatted: + type: string + description: 'Ex: 09:45 PM' + repeating: + type: boolean + description: 'Ex: true' + secondDailyReminderTime: + type: string + description: 'Ex: 01:00:00' + secondToLastValue: + type: number + description: 'Ex: 1. Unit: User-specified or common.' + format: double + sms: + type: boolean + description: True if the reminders should be delivered via SMS + startTrackingDate: + type: string + description: Earliest date on which the user should be reminded to track in YYYY-MM-DD format + format: string + stopTrackingDate: + type: string + description: Latest date on which the user should be reminded to track in YYYY-MM-DD format + format: string + svgUrl: + type: string + description: 'Ex: https://web.quantimo.do/img/variable_categories/symptoms.svg' + thirdDailyReminderTime: + type: string + description: 'Ex: 20:00:00' + thirdToLastValue: + type: number + description: 'Ex: 3' + format: double + trackingReminderId: + type: integer + description: 'Ex: 11841' + trackingReminderImageUrl: + type: string + description: 'Ex: Not Found' + upc: + type: string + description: UPC or other barcode scan result + updatedAt: + type: string + description: When the record in the database was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + userId: + type: integer + description: ID of User + format: int32 + userVariableUnitAbbreviatedName: + type: string + description: 'Ex: /5' + userVariableUnitCategoryId: + type: integer + description: 'Ex: 5' + userVariableUnitCategoryName: + type: string + description: 'Ex: Rating' + userVariableUnitId: + type: integer + description: 'Ex: 10' + userVariableUnitName: + type: string + description: 'Ex: 1 to 5 Rating' + userVariableVariableCategoryId: + type: integer + description: 'Ex: 10' + userVariableVariableCategoryName: + type: string + description: 'Ex: Symptoms' + valence: + type: string + description: 'Valence indicates what type of buttons should be used when recording measurements for this variable. positive - Face buttons with the happiest face equating to a 5/5 rating where higher is better like Overall Mood. negative - Face buttons with happiest face equating to a 1/5 rating where lower is better like Headache Severity. numeric - Just 1 to 5 numeric buttons for neutral variables. ' + valueAndFrequencyTextDescription: + type: string + description: 'Ex: Rate daily' + valueAndFrequencyTextDescriptionWithTime: + type: string + description: 'Ex: Rate daily at 09:45 PM' + variableCategoryId: + type: integer + description: 'Ex: 10' + variableCategoryImageUrl: + type: string + description: 'Ex: https://static.quantimo.do/img/variable_categories/sad-96.png' + variableCategoryName: + type: string + description: 'Ex: Emotions, Treatments, Symptoms...' + enum: + - Activity + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Goals + - Locations + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activities + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + variableDescription: + type: string + description: 'Valence indicates what type of buttons should be used when recording measurements for this variable. positive - Face buttons with the happiest face equating to a 5/5 rating where higher is better like Overall Mood. negative - Face buttons with happiest face equating to a 1/5 rating where lower is better like Headache Severity. numeric - Just 1 to 5 numeric buttons for neutral variables. ' + variableId: + type: integer + description: Id for the variable to be tracked + format: int32 + variableName: + type: string + description: Name of the variable to be used when sending measurements + TrackingReminderNotification: + required: + - actionArray + - availableUnits + - fillingValue + - id + - trackAllActions + type: object + properties: + actionArray: + type: array + items: + $ref: '#/components/schemas/TrackingReminderNotificationAction' + availableUnits: + type: array + items: + $ref: '#/components/schemas/Unit' + bestStudyLink: + type: string + description: Link to study comparing variable with strongest relationship for user or population + bestStudyCard: + $ref: '#/components/schemas/Card' + bestUserStudyLink: + type: string + description: Link to study comparing variable with strongest relationship for user + bestUserStudyCard: + $ref: '#/components/schemas/Card' + bestPopulationStudyLink: + type: string + description: Link to study comparing variable with strongest relationship for population + bestPopulationStudyCard: + $ref: '#/components/schemas/Card' + optimalValueMessage: + type: string + description: Description of relationship with variable with strongest relationship for user or population + commonOptimalValueMessage: + type: string + description: Description of relationship with variable with strongest relationship for population + userOptimalValueMessage: + type: string + description: Description of relationship with variable with strongest relationship for user + card: + $ref: '#/components/schemas/Card' + clientId: + type: string + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + combinationOperation: + type: string + description: The way multiple measurements are aggregated over time + enum: + - MEAN + - SUM + createdAt: + type: string + description: 'Ex: 2017-07-29 20:49:54 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + displayName: + type: string + description: 'Ex: Trader Joe''s Bedtime Tea' + modifiedValue: + type: number + description: 'Is the user specified default value or falls back to the last value in user unit. Good for initializing input fields. Unit: User-specified or common.' + format: double + unitAbbreviatedName: + type: string + description: 'Ex: /5' + unitCategoryId: + type: integer + description: 'Ex: 5' + unitCategoryName: + type: string + description: 'Ex: Rating' + unitId: + type: integer + description: 'Ex: 10' + unitName: + type: string + description: 'Ex: 1 to 5 Rating' + defaultValue: + type: number + description: Default value to use for the measurement when tracking + format: float + description: + type: string + description: 'Valence indicates what type of buttons should be used when recording measurements for this variable. positive - Face buttons with the happiest face equating to a 5/5 rating where higher is better like Overall Mood. negative - Face buttons with happiest face equating to a 1/5 rating where lower is better like Headache Severity. numeric - Just 1 to 5 numeric buttons for neutral variables. ' + email: + type: boolean + description: True if the reminders should be delivered via email + fillingValue: + type: integer + description: 'Ex: 0' + iconIcon: + type: string + description: 'Ex: ion-sad-outline' + id: + type: integer + description: id for the specific PENDING tracking remidner + format: int32 + imageUrl: + type: string + description: 'Ex: https://rximage.nlm.nih.gov/image/images/gallery/original/55111-0129-60_RXNAVIMAGE10_B051D81E.jpg' + inputType: + type: string + description: 'Ex: happiestFaceIsFive' + ionIcon: + type: string + description: 'Ex: ion-happy-outline' + lastValue: + type: number + description: 'Ex: 3' + format: double + manualTracking: + type: boolean + description: True if this variable is normally tracked via manual user input rather than automatic imports + maximumAllowedValue: + type: integer + description: 'Ex: 5' + minimumAllowedValue: + type: integer + description: 'Ex: 1' + mostCommonValue: + type: number + description: 'Ex: 3' + format: double + notificationBar: + type: boolean + description: True if the reminders should appear in the notification bar + notifiedAt: + type: string + description: 'Ex: UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + numberOfUniqueValues: + type: integer + description: 'Ex: 5' + outcome: + type: boolean + description: Indicates whether or not the variable is usually an outcome of interest such as a symptom or emotion + pngPath: + type: string + description: 'Ex: img/variable_categories/emotions.png' + pngUrl: + type: string + description: 'Ex: https://web.quantimo.do/img/variable_categories/emotions.png' + popUp: + type: boolean + description: True if the reminders should appear as a popup notification + productUrl: + type: string + description: Link to associated product for purchase + question: + type: string + description: 'Ex: How is your overall mood?' + longQuestion: + type: string + description: 'Ex: How is your overall mood on a scale of 1 to 5??' + reminderEndTime: + type: string + description: 'Ex: 01-01-2018' + reminderFrequency: + type: integer + description: 'How often user should be reminded in seconds. Ex: 86400' + reminderSound: + type: string + description: String identifier for the sound to accompany the reminder + reminderStartTime: + type: string + description: Earliest time of day at which reminders should appear in UTC HH:MM:SS format + reminderTime: + type: string + description: UTC ISO 8601 YYYY-MM-DDThh:mm:ss timestamp for the specific time the variable should be tracked in UTC. This will be used for the measurement startTime if the track endpoint is used. + secondMostCommonValue: + type: number + description: 'Ex: 4' + format: double + secondToLastValue: + type: number + description: 'Ex: 1' + format: double + sms: + type: boolean + description: True if the reminders should be delivered via SMS + svgUrl: + type: string + description: 'Ex: https://web.quantimo.do/img/variable_categories/emotions.svg' + thirdMostCommonValue: + type: number + description: 'Ex: 2' + format: double + thirdToLastValue: + type: number + description: 'Ex: 2' + format: double + title: + type: string + description: 'Ex: Rate Overall Mood' + total: + type: number + description: 'Ex: 3' + format: double + trackAllActions: + type: array + items: + $ref: '#/components/schemas/TrackingReminderNotificationTrackAllAction' + trackingReminderId: + type: integer + description: id for the repeating tracking remidner + format: int32 + trackingReminderImageUrl: + type: string + description: 'Ex: https://rximage.nlm.nih.gov/image/images/gallery/original/55111-0129-60_RXNAVIMAGE10_B051D81E.jpg' + trackingReminderNotificationId: + type: integer + description: 'Ex: 5072482' + trackingReminderNotificationTime: + type: string + description: UTC ISO 8601 YYYY-MM-DDThh:mm:ss timestamp for the specific time the variable should be tracked in UTC. This will be used for the measurement startTime if the track endpoint is used. + trackingReminderNotificationTimeEpoch: + type: integer + description: 'Ex: 1501534124' + trackingReminderNotificationTimeLocal: + type: string + description: 'Ex: 15:48:44' + trackingReminderNotificationTimeLocalHumanString: + type: string + description: 'Ex: 8PM Sun, May 1' + updatedAt: + type: string + description: When the record in the database was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + userId: + type: integer + description: ID of User + format: int32 + userVariableUnitAbbreviatedName: + type: string + description: 'Ex: /5' + userVariableUnitCategoryId: + type: integer + description: 'Ex: 5' + userVariableUnitCategoryName: + type: string + description: 'Ex: Rating' + userVariableUnitId: + type: integer + description: 'Ex: 10' + userVariableUnitName: + type: string + description: 'Ex: 1 to 5 Rating' + userVariableVariableCategoryId: + type: integer + description: 'Ex: 1' + userVariableVariableCategoryName: + type: string + description: 'Ex: Emotions' + valence: + type: string + description: 'Valence indicates what type of buttons should be used when recording measurements for this variable. positive - Face buttons with the happiest face equating to a 5/5 rating where higher is better like Overall Mood. negative - Face buttons with happiest face equating to a 1/5 rating where lower is better like Headache Severity. numeric - Just 1 to 5 numeric buttons for neutral variables. ' + variableCategoryId: + type: integer + description: 'Ex: 1' + variableCategoryImageUrl: + type: string + description: 'Ex: https://static.quantimo.do/img/variable_categories/theatre_mask-96.png' + variableCategoryName: + type: string + description: 'Ex: Emotions, Treatments, Symptoms...' + enum: + - Activity + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Goals + - Locations + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activities + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + variableId: + type: integer + description: Id for the variable to be tracked + format: int32 + variableImageUrl: + type: string + description: 'Ex: https://image.png' + variableName: + type: string + description: Name of the variable to be used when sending measurements + TrackingReminderNotificationAction: + required: + - action + - callback + - modifiedValue + - title + type: object + properties: + action: + type: string + description: 'Ex: track' + callback: + type: string + description: 'Ex: trackThreeRatingAction' + modifiedValue: + type: integer + description: 'Ex: 3' + title: + type: string + description: 'Ex: 3/5' + longTitle: + type: string + description: 'Ex: Rate 3/5' + shortTitle: + type: string + description: 'Ex: 3' + TrackingReminderNotificationPost: + required: + - action + - id + type: object + properties: + action: + type: string + description: track records a measurement for the notification. snooze changes the notification to 1 hour from now. skip deletes the notification. + enum: + - skip + - snooze + - track + id: + type: number + description: Id of the TrackingReminderNotification + modifiedValue: + type: number + description: Optional value to be recorded instead of the tracking reminder default value + TrackingReminderNotificationTrackAllAction: + required: + - action + - callback + - modifiedValue + - title + type: object + properties: + action: + type: string + description: 'Ex: trackAll' + callback: + type: string + description: 'Ex: trackThreeRatingAction' + modifiedValue: + type: integer + description: 'Ex: 3' + title: + type: string + description: 'Ex: Rate 3/5 for all' + Unit: + required: + - abbreviatedName + - category + - conversionSteps + - maximumValue + - name + - unitCategory + type: object + properties: + abbreviatedName: + type: string + description: Unit abbreviation + advanced: + type: integer + description: 'Ex: 1' + category: + type: string + description: Unit category + enum: + - Distance + - Duration + - Energy + - Frequency + - Miscellany + - Pressure + - Proportion + - Rating + - Temperature + - Volume + - Weight + - Count + categoryId: + type: integer + description: 'Ex: 6' + categoryName: + type: string + description: 'Ex: Miscellany' + conversionSteps: + type: array + description: Conversion steps list + items: + $ref: '#/components/schemas/ConversionStep' + id: + type: integer + description: 'Ex: 29' + manualTracking: + type: integer + description: 'Ex: 0' + maximumAllowedValue: + type: number + description: The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. + format: double + maximumValue: + type: integer + description: 'Ex: 4' + minimumAllowedValue: + type: number + description: The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. + format: double + minimumValue: + type: integer + description: 'Ex: 0' + name: + type: string + description: Unit name + unitCategory: + $ref: '#/components/schemas/UnitCategory' + UnitCategory: + required: + - name + type: object + properties: + id: + type: integer + description: id + name: + type: string + description: Category name + standardUnitAbbreviatedName: + type: string + description: Base unit for in which measurements are to be converted to and stored + User: + required: + - accessToken + - administrator + - displayName + - email + - id + - loginName + type: object + properties: + accessToken: + type: string + description: User access token + accessTokenExpires: + type: string + description: 'Ex: 2018-08-08 02:41:19' + accessTokenExpiresAtMilliseconds: + type: integer + description: 'Ex: 1533696079000' + administrator: + type: boolean + description: Is user administrator + authorizedClients: + $ref: '#/components/schemas/AuthorizedClients' + avatar: + type: string + description: 'Ex: https://lh6.googleusercontent.com/-BHr4hyUWqZU/AAAAAAAAAAI/AAAAAAAIG28/2Lv0en738II/photo.jpg?sz=50' + avatarImage: + type: string + description: 'Ex: https://lh6.googleusercontent.com/-BHr4hyUWqZU/AAAAAAAAAAI/AAAAAAAIG28/2Lv0en738II/photo.jpg?sz=50' + capabilities: + type: string + description: 'Ex: a:1:{s:13:"administrator";b:1;}' + card: + $ref: '#/components/schemas/Card' + clientId: + type: string + description: 'Ex: quantimodo' + clientUserId: + type: string + description: 'Ex: 118444693184829555362' + combineNotifications: + type: boolean + description: 'Ex: 1' + createdAt: + type: string + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format + description: + type: string + description: Your bio will be displayed on your published studies + displayName: + type: string + description: User display name + earliestReminderTime: + type: string + description: 'Earliest time user should get notifications. Ex: 05:00:00' + email: + type: string + description: User email + firstName: + type: string + description: 'Ex: Mike' + getPreviewBuilds: + type: boolean + description: 'Ex: false' + hasAndroidApp: + type: boolean + description: 'Ex: false' + hasChromeExtension: + type: boolean + description: 'Ex: false' + hasIosApp: + type: boolean + description: 'Ex: false' + id: + type: integer + description: User id + lastActive: + type: string + description: 'Ex: Date the user last logged in' + lastFour: + type: string + description: 'Ex: 2009' + lastName: + type: string + description: 'Ex: Sinn' + lastSmsTrackingReminderNotificationId: + type: string + description: 'Ex: 1' + latestReminderTime: + type: string + description: 'Latest time user should get notifications. Ex: 23:00:00' + loginName: + type: string + description: User login name + password: + type: string + description: 'Ex: PASSWORD' + phoneNumber: + type: string + description: 'Ex: 618-391-0002' + phoneVerificationCode: + type: string + description: 'Ex: 1234' + primaryOutcomeVariableId: + type: integer + description: 'A good primary outcome variable is something that you want to improve and that changes inexplicably. For instance, if you have anxiety, back pain or arthritis which is worse on some days than others, these would be good candidates for primary outcome variables. Recording their severity and potential factors will help you identify hidden factors exacerbating or improving them. ' + primaryOutcomeVariableName: + type: string + description: 'A good primary outcome variable is something that you want to improve and that changes inexplicably. For instance, if you have anxiety, back pain or arthritis which is worse on some days than others, these would be good candidates for primary outcome variables. Recording their severity and potential factors will help you identify hidden factors exacerbating or improving them. ' + pushNotificationsEnabled: + type: boolean + description: 'Ex: 1' + refreshToken: + type: string + description: See https://oauth.net/2/grant-types/refresh-token/ + roles: + type: string + description: 'Ex: ["admin"]' + sendPredictorEmails: + type: boolean + description: 'Ex: 1' + sendReminderNotificationEmails: + type: boolean + description: 'Ex: 1' + shareAllData: + type: boolean + description: Share all studies, charts, and measurement data with all other users + smsNotificationsEnabled: + type: boolean + description: 'Ex: false' + stripeActive: + type: boolean + description: 'Ex: 1' + stripeId: + type: string + description: 'Ex: cus_A8CEmcvl8jwLhV' + stripePlan: + type: string + description: 'Ex: monthly7' + stripeSubscription: + type: string + description: 'Ex: sub_ANTx3nOE7nzjQf' + subscriptionEndsAt: + type: string + description: UTC ISO 8601 YYYY-MM-DDThh:mm:ss + subscriptionProvider: + type: string + description: 'Ex: google' + timeZoneOffset: + type: integer + description: 'Ex: 300' + trackLocation: + type: boolean + description: 'Ex: 1' + updatedAt: + type: string + description: When the record in the database was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format + userRegistered: + type: string + description: 'Ex: 2013-12-03 15:25:13 UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + userUrl: + type: string + description: 'Ex: https://plus.google.com/+MikeSinn' + UsersResponse: + required: + - users + type: object + properties: + users: + type: array + items: + $ref: '#/components/schemas/User' + description: + type: string + description: Users who granted access to their data + summary: + type: string + description: Users who granted access to their data + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + image: + $ref: '#/components/schemas/Image' + avatar: + type: string + description: Square icon png url + ionIcon: + type: string + description: 'Ex: ion-ios-person' + html: + type: string + description: Users who granted access to their data + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + UserTag: + required: + - conversionFactor + - tagVariableId + - taggedVariableId + type: object + properties: + conversionFactor: + type: number + description: Number by which we multiply the tagged variable value to obtain the tag variable (ingredient) value + taggedVariableId: + type: integer + description: This is the id of the variable being tagged with an ingredient or something. + tagVariableId: + type: integer + description: This is the id of the ingredient variable whose value is determined based on the value of the tagged variable. + Variable: + required: + - id + - name + - userId + - variableId + type: object + properties: + actionArray: + type: array + items: + $ref: '#/components/schemas/TrackingReminderNotificationAction' + alias: + type: string + description: 'User-Defined Variable Setting: Alternative display name' + availableUnits: + type: array + items: + $ref: '#/components/schemas/Unit' + bestStudyLink: + type: string + description: Link to study comparing variable with strongest relationship for user or population + bestStudyCard: + $ref: '#/components/schemas/Card' + bestUserStudyLink: + type: string + description: Link to study comparing variable with strongest relationship for user + bestUserStudyCard: + $ref: '#/components/schemas/Card' + bestPopulationStudyLink: + type: string + description: Link to study comparing variable with strongest relationship for population + bestPopulationStudyCard: + $ref: '#/components/schemas/Card' + optimalValueMessage: + type: string + description: Description of relationship with variable with strongest relationship for user or population + commonOptimalValueMessage: + type: string + description: Description of relationship with variable with strongest relationship for population + userOptimalValueMessage: + type: string + description: Description of relationship with variable with strongest relationship for user + card: + $ref: '#/components/schemas/Card' + causeOnly: + type: boolean + description: 'User-Defined Variable Setting: True indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user' + charts: + $ref: '#/components/schemas/VariableCharts' + chartsLinkDynamic: + type: string + description: 'Ex: https://local.quantimo.do/ionic/Modo/www/#/app/charts/Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29?variableName=Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29&userId=230&pngUrl=https%3A%2F%2Fapp.quantimo.do%2Fionic%2FModo%2Fwww%2Fimg%2Fvariable_categories%2Ftreatments.png' + chartsLinkEmail: + type: string + description: 'Ex: mailto:?subject=Check%20out%20my%20Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29%20data%21&body=See%20my%20Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29%20history%20at%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png%0A%0AHave%20a%20great%20day!' + chartsLinkFacebook: + type: string + description: 'Ex: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png' + chartsLinkGoogle: + type: string + description: 'Ex: https://plus.google.com/share?url=https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png' + chartsLinkStatic: + type: string + description: 'Ex: https://local.quantimo.do/api/v2/charts?variableName=Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29&userId=230&pngUrl=https%3A%2F%2Fapp.quantimo.do%2Fionic%2FModo%2Fwww%2Fimg%2Fvariable_categories%2Ftreatments.png' + chartsLinkTwitter: + type: string + description: 'Ex: https://twitter.com/home?status=Check%20out%20my%20Trader%20Joes%20Bedtime%20Tea%20%2F%20Sleepytime%20Tea%20%28any%20Brand%29%20data%21%20https%3A%2F%2Flocal.quantimo.do%2Fapi%2Fv2%2Fcharts%3FvariableName%3DTrader%2520Joes%2520Bedtime%2520Tea%2520%252F%2520Sleepytime%2520Tea%2520%2528any%2520Brand%2529%26userId%3D230%26pngUrl%3Dhttps%253A%252F%252Fapp.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png%20%40quantimodo' + childCommonTagVariables: + type: array + description: Commonly defined for all users. An example of a parent category variable would be Fruit when tagged with the child sub-type variables Apple. Child variable (Apple) measurements will be included when the parent category (Fruit) is analyzed. This allows us to see how Fruit consumption might be affecting without having to record both Fruit and Apple intake. + items: + $ref: '#/components/schemas/Variable' + childUserTagVariables: + type: array + description: 'User-Defined Variable Setting: An example of a parent category variable would be Fruit when tagged with the child sub-type variables Apple. Child variable (Apple) measurements will be included when the parent category (Fruit) is analyzed. This allows us to see how Fruit consumption might be affecting without having to record both Fruit and Apple intake.' + items: + $ref: '#/components/schemas/Variable' + clientId: + type: string + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + combinationOperation: + type: string + description: 'User-Defined Variable Setting: How to aggregate measurements over time. SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED.' + enum: + - MEAN + - SUM + commonAlias: + type: string + description: 'Ex: Anxiety / Nervousness' + commonTaggedVariables: + type: array + items: + $ref: '#/components/schemas/Variable' + commonTagVariables: + type: array + items: + $ref: '#/components/schemas/Variable' + createdAt: + type: string + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format + dataSourceNames: + type: string + description: Comma-separated list of source names to limit variables to those sources + dataSources: + type: array + description: These are sources of measurements for this variable + items: + $ref: '#/components/schemas/DataSource' + description: + type: string + description: 'User-Defined Variable Setting: Ex: Summary to be used in studies.' + displayName: + type: string + description: 'Ex: Trader Joe''s Bedtime Tea' + durationOfAction: + type: integer + description: 'The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. Unit: Seconds' + format: int32 + durationOfActionInHours: + type: number + description: 'User-Defined Variable Setting: The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. Unit: Hours' + format: float + earliestFillingTime: + type: integer + description: Earliest filling time + format: int32 + earliestMeasurementTime: + type: integer + description: Earliest measurement time + format: int32 + earliestSourceTime: + type: integer + description: Earliest source time + format: int32 + errorMessage: + type: string + description: Error message from last analysis + experimentEndTime: + type: string + description: 'User-Defined Variable Setting: Latest measurement time to be used in analysis. Format: UTC ISO 8601 YYYY-MM-DDThh:mm:ss.' + experimentStartTime: + type: string + description: 'User-Defined Variable Setting: Earliest measurement time to be used in analysis. Format: UTC ISO 8601 YYYY-MM-DDThh:mm:ss.' + fillingType: + type: string + description: 'User-Defined Variable Setting: When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven''t taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing.' + enum: + - none + - zero-filling + - value-filling + fillingValue: + type: number + description: 'User-Defined Variable Setting: When it comes to analysis to determine the effects of this variable, knowing when it did not occur is as important as knowing when it did occur. For example, if you are tracking a medication, it is important to know when you did not take it, but you do not have to log zero values for all the days when you haven''t taken it. Hence, you can specify a filling value (typically 0) to insert whenever data is missing. Unit: User-specified or common.' + format: float + iconIcon: + type: string + description: 'Ex: ion-sad-outline' + id: + type: integer + description: 'Ex: 95614' + imageUrl: + type: string + description: What do you expect? + informationalUrl: + type: string + description: 'Ex: https://google.com' + ingredientOfCommonTagVariables: + type: array + description: Commonly defined for all users. IngredientOf variable measurements will be included in analysis of the ingredient variable. For instance, a ingredient of the variable Lollipop could be Sugar. This way you only have to record Lollipop consumption and we can use this data to see how sugar might be affecting you. + items: + $ref: '#/components/schemas/Variable' + ingredientCommonTagVariables: + type: array + description: Commonly defined for all users. IngredientOf variable measurements will be included in analysis of the ingredient variable. For instance, a ingredient of the variable Lollipop could be Sugar. This way you only have to record Lollipop consumption and we can use this data to see how sugar might be affecting you. + items: + $ref: '#/components/schemas/Variable' + ingredientOfUserTagVariables: + type: array + description: 'User-Defined Variable Setting: IngredientOf variable measurements will be included in analysis of the ingredient variable. For instance, a ingredient of the variable Lollipop could be Sugar. This way you only have to record Lollipop consumption and we can use this data to see how sugar might be affecting you.' + items: + $ref: '#/components/schemas/Variable' + ingredientUserTagVariables: + type: array + description: 'User-Defined Variable Setting: IngredientOf variable measurements will be included in analysis of the ingredient variable. For instance, a ingredient of the variable Lollipop could be Sugar. This way you only have to record Lollipop consumption and we can use this data to see how sugar might be affecting you.' + items: + $ref: '#/components/schemas/Variable' + inputType: + type: string + description: Type of input field to show for recording measurements + ionIcon: + type: string + description: What do you expect? + joinedCommonTagVariables: + type: array + description: Commonly defined for all users. Joining can be used used to merge duplicate variables. For instance, if two variables called Apples (Red Delicious) and Red Delicious Apples are joined, when one of them is analyzed, the measurements for the other will be included as well. + items: + $ref: '#/components/schemas/Variable' + joinedUserTagVariables: + type: array + description: 'User-Defined Variable Setting: Joining can be used used to merge duplicate variables. For instance, if two variables called Apples (Red Delicious) and Red Delicious Apples are joined, when one of them is analyzed, the measurements for the other will be included as well.' + items: + $ref: '#/components/schemas/Variable' + joinWith: + type: integer + description: Duplicate variables. If the variable is joined with some other variable then it is not shown to user in the list of variables + format: int32 + kurtosis: + type: number + description: Kurtosis + format: float + lastProcessedDailyValue: + type: number + description: 'Calculated Statistic: Ex: 500. Unit: User-specified or common.' + format: double + lastSuccessfulUpdateTime: + type: string + description: When this variable or its settings were last updated UTC ISO 8601 YYYY-MM-DDThh:mm:ss + lastValue: + type: number + description: 'Calculated Statistic: Last measurement value in the common unit or user unit if different. Unit: User-specified or common.' + format: float + latestFillingTime: + type: integer + description: Latest filling time + format: int32 + latestMeasurementTime: + type: integer + description: 'Latest measurement time. Format: Unix-time epoch seconds.' + format: int32 + latestSourceTime: + type: integer + description: 'Latest source time. Format: Unix-time epoch seconds.' + format: int32 + latestUserMeasurementTime: + type: integer + description: 'Ex: 1501383600. Format: Unix-time epoch seconds.' + latitude: + type: number + description: 'Latitude. Unit: User-specified or common.' + format: float + location: + type: string + description: Location + longitude: + type: number + description: Longitude + format: float + manualTracking: + type: boolean + description: True if the variable is an emotion or symptom rating that is not typically automatically collected by a device or app. + maximumAllowedDailyValue: + type: number + description: 'User-Defined Variable Setting: The maximum allowed value a daily aggregated measurement. Unit: User-specified or common.' + format: float + maximumAllowedValue: + type: number + description: 'User-Defined Variable Setting: The maximum allowed value a single measurement. While you can record a value above this maximum, it will be excluded from the correlation analysis. Unit: User-specified or common.' + format: float + maximumRecordedDailyValue: + type: number + description: 'Calculated Statistic: Maximum recorded daily value of this variable. Unit: User-specified or common.' + format: float + maximumRecordedValue: + type: number + description: 'Calculated Statistic: Ex: 1. Unit: User-specified or common.' + format: double + mean: + type: number + description: 'Mean. Unit: User-specified or common.' + format: float + measurementsAtLastAnalysis: + type: integer + description: Number of measurements at last analysis + format: int32 + median: + type: number + description: Median + format: float + minimumAllowedValue: + type: number + description: 'User-Defined Variable Setting: The minimum allowed value a single measurement. While you can record a value below this minimum, it will be excluded from the correlation analysis. Unit: User-specified or common' + format: float + minimumAllowedDailyValue: + type: number + description: 'User-Defined Variable Setting: The minimum allowed value a daily aggregated measurement. For instance, you might set to 100 for steps to keep erroneous 0 daily steps out of the analysis. Unit: User-specified or common.' + format: float + minimumNonZeroValue: + type: number + description: 'User-Defined Variable Setting: The minimum allowed non-zero value a single measurement. For instance, you might set to 100 mL for steps to keep erroneous 0 daily steps out of the analysis. Unit: User-specified or common.' + format: float + minimumRecordedValue: + type: number + description: 'Minimum recorded value of this variable. Unit: User-specified or common.' + format: float + mostCommonConnectorId: + type: integer + description: 'Ex: 51' + mostCommonOriginalUnitId: + type: integer + description: 'Ex: 23' + mostCommonUnitId: + type: integer + description: Most common Unit ID + format: int32 + mostCommonValue: + type: number + description: 'Calculated Statistic: Most common value. Unit: User-specified or common.' + format: float + name: + type: string + description: 'Ex: Trader Joes Bedtime Tea / Sleepytime Tea (any Brand)' + numberOfAggregateCorrelationsAsCause: + type: integer + description: 'Ex: 1' + numberOfAggregateCorrelationsAsEffect: + type: integer + description: 'Ex: 310' + numberOfChanges: + type: integer + description: Number of changes + format: int32 + numberOfCorrelations: + type: integer + description: Number of correlations for this variable + format: int32 + numberOfCorrelationsAsCause: + type: integer + description: numberOfAggregateCorrelationsAsCause plus numberOfUserCorrelationsAsCause + numberOfCorrelationsAsEffect: + type: integer + description: numberOfAggregateCorrelationsAsEffect plus numberOfUserCorrelationsAsEffect + numberOfProcessedDailyMeasurements: + type: integer + description: Number of processed measurements + format: int32 + numberOfRawMeasurements: + type: integer + description: 'Ex: 295' + numberOfTrackingReminders: + type: integer + description: 'Ex: 1' + numberOfUniqueDailyValues: + type: number + description: Number of unique daily values + format: float + numberOfUniqueValues: + type: integer + description: 'Ex: 2' + numberOfUserCorrelationsAsCause: + type: integer + description: 'Ex: 115' + numberOfUserCorrelationsAsEffect: + type: integer + description: 'Ex: 29014' + numberOfUserVariables: + type: integer + description: 'Ex: 2' + onsetDelay: + type: integer + description: The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. + format: int32 + onsetDelayInHours: + type: number + description: 'User-Defined Variable Setting: The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes.' + format: double + outcome: + type: boolean + description: 'User-Defined Variable Setting: True for variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables' + outcomeOfInterest: + type: boolean + description: Do you want to receive updates on newly discovered factors influencing this variable? + parentCommonTagVariables: + type: array + description: Commonly defined for all users. An example of a parent category variable would be Fruit when tagged with the child sub-type variables Apple. Child variable (Apple) measurements will be included when the parent category (Fruit) is analyzed. This allows us to see how Fruit consumption might be affecting without having to record both Fruit and Apple intake. + items: + $ref: '#/components/schemas/Variable' + parentUserTagVariables: + type: array + description: User-defined. An example of a parent category variable would be Fruit when tagged with the child sub-type variables Apple. Child variable (Apple) measurements will be included when the parent category (Fruit) is analyzed. This allows us to see how Fruit consumption might be affecting without having to record both Fruit and Apple intake. + items: + $ref: '#/components/schemas/Variable' + pngPath: + type: string + description: 'Ex: img/variable_categories/treatments.png' + pngUrl: + type: string + description: 'Ex: https://web.quantimo.do/img/variable_categories/treatments.png' + predictorOfInterest: + type: integer + description: 'Ex: 0' + price: + type: number + description: 'Ex: 95.4' + format: double + productUrl: + type: string + description: Link to associated product for purchase + public: + type: boolean + description: Should this variable show up in automcomplete searches for users who do not already have measurements for it? + question: + type: string + description: 'Ex: How is your overall mood?' + longQuestion: + type: string + description: 'Ex: How is your overall mood on a scale of 1 to 5??' + rawMeasurementsAtLastAnalysis: + type: integer + description: 'Ex: 131' + secondMostCommonValue: + type: number + description: 'Calculated Statistic: Ex: 1. Unit: User-specified or common.' + format: double + secondToLastValue: + type: number + description: 'Calculated Statistic: Ex: 250. Unit: User-specified or common.' + format: double + shareUserMeasurements: + type: boolean + description: Would you like to make your measurements publicly visible? + skewness: + type: number + description: Skewness + format: float + standardDeviation: + type: number + description: 'Standard deviation Ex: 0.46483219855434' + format: double + status: + type: string + description: status + subtitle: + type: string + description: Based on sort filter and can be shown beneath variable name on search list + svgUrl: + type: string + description: 'Ex: https://web.quantimo.do/img/variable_categories/treatments.svg' + thirdMostCommonValue: + type: number + description: 'Calculated Statistic: Ex: 6. Unit: User-specified or common.' + format: double + thirdToLastValue: + type: number + description: 'Calculated Statistic: Ex: 250. Unit: User-specified or common.' + format: double + trackingInstructions: + type: string + description: HTML instructions for tracking + trackingInstructionsCard: + $ref: '#/components/schemas/Card' + unit: + $ref: '#/components/schemas/Unit' + unitAbbreviatedName: + type: string + description: 'Ex: count' + unitCategoryId: + type: integer + description: 'Ex: 6' + unitCategoryName: + type: string + description: 'Ex: Miscellany' + unitId: + type: integer + description: ID of unit to use for this variable + format: int32 + unitName: + type: string + description: 'User-Defined Variable Setting: Count' + upc: + type: string + description: Universal product code or similar + updated: + type: integer + description: updated + format: int32 + updatedAt: + type: string + description: When the record in the database was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format + updatedTime: + type: string + description: 'Ex: 2017-07-30 14:58:26' + userId: + type: integer + description: User ID + format: int32 + userTaggedVariables: + type: array + items: + $ref: '#/components/schemas/Variable' + userTagVariables: + type: array + items: + $ref: '#/components/schemas/Variable' + userVariableUnitAbbreviatedName: + type: string + description: 'Ex: count' + userVariableUnitCategoryId: + type: integer + description: 'Ex: 6' + userVariableUnitCategoryName: + type: string + description: 'Ex: Miscellany' + userVariableUnitId: + type: integer + description: 'Ex: 23' + userVariableUnitName: + type: string + description: 'Ex: Count' + variableCategory: + $ref: '#/components/schemas/VariableCategory' + joinedVariables: + type: array + description: Array of Variables that are joined with this Variable + items: + $ref: '#/components/schemas/Variable' + valence: + type: string + description: 'Valence indicates what type of buttons should be used when recording measurements for this variable. positive - Face buttons with the happiest face equating to a 5/5 rating where higher is better like Overall Mood. negative - Face buttons with happiest face equating to a 1/5 rating where lower is better like Headache Severity. numeric - Just 1 to 5 numeric buttons for neutral variables. ' + variableCategoryId: + type: integer + description: 'Ex: 6' + variableCategoryName: + type: string + description: 'User-Defined Variable Setting: Variable category like Emotions, Sleep, Physical Activities, Treatments, Symptoms, etc.' + enum: + - Activity + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Goals + - Locations + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activities + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + variableId: + type: integer + description: 'Ex: 96380' + variableName: + type: string + description: 'Ex: Sleep Duration' + variance: + type: number + description: 'Statistic: Ex: 115947037.40816' + format: double + wikipediaTitle: + type: string + description: 'User-Defined Variable Setting: You can help to improve the studies by pasting the title of the most appropriate Wikipedia article for this variable' + UserVariableDelete: + required: + - variableId + type: object + properties: + variableId: + type: integer + description: Id of the variable whose measurements should be deleted + VariableCategory: + required: + - name + type: object + properties: + appType: + type: string + description: 'Ex: mood' + causeOnly: + type: boolean + description: 'Ex: false' + combinationOperation: + type: string + description: 'Ex: MEAN' + createdTime: + type: string + description: UTC ISO 8601 YYYY-MM-DDThh:mm:ss + unitAbbreviatedName: + type: string + description: 'Ex: /5' + unitId: + type: integer + description: 'Ex: 10' + durationOfAction: + type: integer + description: 'User-Defined Variable Setting: The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. Unit: Seconds' + fillingValue: + type: integer + description: 'Ex: -1. Unit: Variable category default unit.' + helpText: + type: string + description: 'Ex: What emotion do you want to rate?' + id: + type: integer + description: 'Ex: 1' + imageUrl: + type: string + description: 'Ex: https://static.quantimo.do/img/variable_categories/theatre_mask-96.png' + ionIcon: + type: string + description: 'Ex: ion-happy-outline' + manualTracking: + type: boolean + description: 'Ex: true' + maximumAllowedValue: + type: string + description: 'Unit: Variable category default unit.' + measurementSynonymSingularLowercase: + type: string + description: 'Ex: rating' + minimumAllowedValue: + type: string + description: 'Unit: Variable category default unit.' + moreInfo: + type: string + description: 'Ex: Do you have any emotions that fluctuate regularly? If so, add them so I can try to determine which factors are influencing them.' + name: + type: string + description: Category name + onsetDelay: + type: integer + description: 'Ex: 0' + outcome: + type: boolean + description: 'Ex: true' + pngPath: + type: string + description: 'Ex: img/variable_categories/emotions.png' + pngUrl: + type: string + description: 'Ex: https://web.quantimo.do/img/variable_categories/emotions.png' + public: + type: boolean + description: 'Ex: true' + svgPath: + type: string + description: 'Ex: img/variable_categories/emotions.svg' + svgUrl: + type: string + description: 'Ex: https://web.quantimo.do/img/variable_categories/emotions.svg' + updated: + type: integer + description: 'Ex: 1' + updatedTime: + type: string + description: UTC ISO 8601 YYYY-MM-DDThh:mm:ss + variableCategoryName: + type: string + description: 'Ex: Emotions, Treatments, Symptoms...' + enum: + - Activity + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Goals + - Locations + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activities + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + variableCategoryNameSingular: + type: string + description: 'Ex: Emotion' + VariableCharts: + type: object + properties: + hourlyColumnChart: + $ref: '#/components/schemas/Chart' + monthlyColumnChart: + $ref: '#/components/schemas/Chart' + distributionColumnChart: + $ref: '#/components/schemas/Chart' + weekdayColumnChart: + $ref: '#/components/schemas/Chart' + lineChartWithoutSmoothing: + $ref: '#/components/schemas/Chart' + lineChartWithSmoothing: + $ref: '#/components/schemas/Chart' + description: An object with various chart properties each property contain and svg and Highcharts configuration + Vote: + required: + - causeVariableId + - clientId + - effectVariableId + - userId + - value + type: object + properties: + causeVariableId: + type: integer + description: Cause variable id + clientId: + type: string + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + createdAt: + type: string + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format + effectVariableId: + type: integer + description: Effect variable id + id: + type: integer + description: id + format: int32 + updatedAt: + type: string + description: When the record in the database was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format + userId: + type: integer + description: ID of User + format: int32 + value: + type: string + description: Vote down for implausible/not-useful or up for plausible/useful. Vote none to delete a previous vote. + enum: + - up + - down + - none + type: + type: string + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + enum: + - causality + - usefulness + Activity: + required: + - action + - component + - content + - dateRecorded + - hideSitewide + - id + - isSpam + - itemId + - mpttLeft + - mpttRight + - primaryLink + - secondaryItemId + - type + - userId + type: object + properties: + id: + type: integer + description: What do you expect? + userId: + type: integer + description: What do you expect? + component: + type: string + description: What do you expect? + type: + type: string + description: What do you expect? + action: + type: string + description: What do you expect? + content: + type: string + description: What do you expect? + primaryLink: + type: string + description: What do you expect? + itemId: + type: integer + description: What do you expect? + secondaryItemId: + type: integer + description: What do you expect? + dateRecorded: + type: string + description: What do you expect? + hideSitewide: + type: integer + description: What do you expect? + mpttLeft: + type: integer + description: What do you expect? + mpttRight: + type: integer + description: What do you expect? + isSpam: + type: integer + description: What do you expect? + metaDataArray: + type: array + description: Additional activity key-value data + items: + type: object + properties: { } + ActivitiesResponse: + required: + - activities + type: object + properties: + activities: + type: array + items: + $ref: '#/components/schemas/Activity' + description: + type: string + description: Activity + summary: + type: string + description: Activity + image: + $ref: '#/components/schemas/Image' + avatar: + type: string + description: Square icon png url + ionIcon: + type: string + description: 'Ex: ion-ios-person' + html: + type: string + description: Embeddable list of study summaries with explanation at the top + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + Friend: + required: + - dateCreated + - friendUserId + - id + - initiatorUserId + - isConfirmed + - isLimited + type: object + properties: + id: + type: integer + description: What do you expect? + initiatorUserId: + type: integer + description: What do you expect? + friendUserId: + type: integer + description: What do you expect? + isConfirmed: + type: integer + description: What do you expect? + isLimited: + type: integer + description: What do you expect? + dateCreated: + type: string + description: What do you expect? + metaDataArray: + type: array + description: Additional friend key-value data + items: + type: object + properties: { } + FriendsResponse: + required: + - friends + type: object + properties: + friends: + type: array + items: + $ref: '#/components/schemas/Friend' + description: + type: string + description: Friend + summary: + type: string + description: Friend + image: + $ref: '#/components/schemas/Image' + avatar: + type: string + description: Square icon png url + ionIcon: + type: string + description: 'Ex: ion-ios-person' + html: + type: string + description: Embeddable list of study summaries with explanation at the top + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + Group: + required: + - creatorId + - dateCreated + - description + - enableForum + - id + - name + - parentId + - slug + - status + type: object + properties: + id: + type: integer + description: What do you expect? + creatorId: + type: integer + description: What do you expect? + name: + type: string + description: What do you expect? + slug: + type: string + description: What do you expect? + description: + type: string + description: What do you expect? + status: + type: string + description: What do you expect? + parentId: + type: integer + description: What do you expect? + enableForum: + type: integer + description: What do you expect? + dateCreated: + type: string + description: What do you expect? + metaDataArray: + type: array + description: Additional group key-value data + items: + type: object + properties: { } + GroupsResponse: + required: + - groups + type: object + properties: + groups: + type: array + items: + $ref: '#/components/schemas/Group' + description: + type: string + description: Group + summary: + type: string + description: Group + image: + $ref: '#/components/schemas/Image' + avatar: + type: string + description: Square icon png url + ionIcon: + type: string + description: 'Ex: ion-ios-person' + html: + type: string + description: Embeddable list of study summaries with explanation at the top + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + GroupsMember: + required: + - comments + - dateModified + - groupId + - id + - inviteSent + - inviterId + - isAdmin + - isBanned + - isConfirmed + - isMod + - userId + - userTitle + type: object + properties: + id: + type: integer + description: What do you expect? + groupId: + type: integer + description: What do you expect? + userId: + type: integer + description: What do you expect? + inviterId: + type: integer + description: What do you expect? + isAdmin: + type: integer + description: What do you expect? + isMod: + type: integer + description: What do you expect? + userTitle: + type: string + description: What do you expect? + dateModified: + type: string + description: What do you expect? + comments: + type: string + description: What do you expect? + isConfirmed: + type: integer + description: What do you expect? + isBanned: + type: integer + description: What do you expect? + inviteSent: + type: integer + description: What do you expect? + metaDataArray: + type: array + description: Additional groupsmember key-value data + items: + type: object + properties: { } + GroupsMembersResponse: + required: + - groupsMembers + type: object + properties: + groupsMembers: + type: array + items: + $ref: '#/components/schemas/GroupsMember' + description: + type: string + description: GroupsMember + summary: + type: string + description: GroupsMember + image: + $ref: '#/components/schemas/Image' + avatar: + type: string + description: Square icon png url + ionIcon: + type: string + description: 'Ex: ion-ios-person' + html: + type: string + description: Embeddable list of study summaries with explanation at the top + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + MessagesMessage: + required: + - dateSent + - id + - message + - senderId + - subject + - threadId + type: object + properties: + id: + type: integer + description: What do you expect? + threadId: + type: integer + description: What do you expect? + senderId: + type: integer + description: What do you expect? + subject: + type: string + description: What do you expect? + message: + type: string + description: What do you expect? + dateSent: + type: string + description: What do you expect? + metaDataArray: + type: array + description: Additional messagesmessage key-value data + items: + type: object + properties: { } + MessagesMessagesResponse: + required: + - messagesMessages + type: object + properties: + messagesMessages: + type: array + items: + $ref: '#/components/schemas/MessagesMessage' + description: + type: string + description: MessagesMessage + summary: + type: string + description: MessagesMessage + image: + $ref: '#/components/schemas/Image' + avatar: + type: string + description: Square icon png url + ionIcon: + type: string + description: 'Ex: ion-ios-person' + html: + type: string + description: Embeddable list of study summaries with explanation at the top + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + MessagesNotice: + required: + - dateSent + - id + - isActive + - message + - subject + type: object + properties: + id: + type: integer + description: What do you expect? + subject: + type: string + description: What do you expect? + message: + type: string + description: What do you expect? + dateSent: + type: string + description: What do you expect? + isActive: + type: integer + description: What do you expect? + metaDataArray: + type: array + description: Additional messagesnotice key-value data + items: + type: object + properties: { } + MessagesNoticesResponse: + required: + - messagesNotices + type: object + properties: + messagesNotices: + type: array + items: + $ref: '#/components/schemas/MessagesNotice' + description: + type: string + description: MessagesNotice + summary: + type: string + description: MessagesNotice + image: + $ref: '#/components/schemas/Image' + avatar: + type: string + description: Square icon png url + ionIcon: + type: string + description: 'Ex: ion-ios-person' + html: + type: string + description: Embeddable list of study summaries with explanation at the top + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + error: + type: string + description: Error message + errorMessage: + type: string + description: Error message + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + MessagesRecipient: + required: + - id + - isDeleted + - senderOnly + - threadId + - unreadCount + - userId + type: object + properties: + id: + type: integer + description: What do you expect? + userId: + type: integer + description: What do you expect? + threadId: + type: integer + description: What do you expect? + unreadCount: + type: integer + description: What do you expect? + senderOnly: + type: integer + description: What do you expect? + isDeleted: + type: integer + description: What do you expect? + metaDataArray: + type: array + description: Additional messagesrecipient key-value data + items: + type: object + properties: { } + MessagesRecipientsResponse: + required: + - messagesRecipients + type: object + properties: + messagesRecipients: + type: array + items: + $ref: '#/components/schemas/MessagesRecipient' + description: + type: string + description: MessagesRecipient + summary: + type: string + description: MessagesRecipient + image: + $ref: '#/components/schemas/Image' + avatar: + type: string + description: Square icon png url + ionIcon: + type: string + description: 'Ex: ion-ios-person' + html: + type: string + description: Embeddable list of study summaries with explanation at the top + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + Notification: + required: + - componentAction + - componentName + - dateNotified + - id + - isNew + - itemId + - secondaryItemId + - userId + type: object + properties: + id: + type: integer + description: What do you expect? + userId: + type: integer + description: What do you expect? + itemId: + type: integer + description: What do you expect? + secondaryItemId: + type: integer + description: What do you expect? + componentName: + type: string + description: What do you expect? + componentAction: + type: string + description: What do you expect? + dateNotified: + type: string + description: What do you expect? + isNew: + type: integer + description: What do you expect? + metaDataArray: + type: array + description: Additional notification key-value data + items: + type: object + properties: { } + NotificationsResponse: + required: + - notifications + type: object + properties: + notifications: + type: array + items: + $ref: '#/components/schemas/Notification' + description: + type: string + description: Notification + summary: + type: string + description: Notification + image: + $ref: '#/components/schemas/Image' + avatar: + type: string + description: Square icon png url + ionIcon: + type: string + description: 'Ex: ion-ios-person' + html: + type: string + description: Embeddable list of study summaries with explanation at the top + errors: + type: array + description: Array of error objects with message property + items: + $ref: '#/components/schemas/Error' + status: + type: string + description: ex. OK or ERROR + success: + type: boolean + description: true or false + code: + type: number + description: Response code such as 200 + link: + type: string + description: A super neat url you might want to share with your users! + card: + $ref: '#/components/schemas/Card' + parameters: + appVersionParam: + name: appVersion + in: query + description: 'Ex: 2.1.1.0' + required: false + style: form + explode: true + schema: + type: string + causeUnitNameParam: + name: causeUnitName + in: query + description: Name for the unit cause measurements to be returned in + required: false + style: form + explode: true + schema: + type: string + causeVariableNameParam: + name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + causeVariableIdParam: + name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + predictorVariableNameParam: + name: predictorVariableName + in: query + description: 'Name of the hypothetical predictor variable. Ex: Sleep Duration' + required: false + style: form + explode: true + schema: + type: string + clientIdParam: + name: clientId + in: query + description: Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do + required: false + style: form + explode: true + schema: + type: string + clientSecretParam: + name: client_secret + in: query + description: This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at [https://builder.quantimo.do](https://builder.quantimo.do). + required: false + style: form + explode: true + schema: + type: string + clientUserIdParam: + name: clientUserId + in: query + description: 'Ex: 74802' + required: false + style: form + explode: true + schema: + type: integer + codeParam: + name: code + in: query + description: Authorization code you received with the previous request. + required: true + style: form + explode: true + schema: + type: string + connectorNameParam: + name: connectorName + in: query + description: 'Ex: facebook' + required: false + style: form + explode: true + schema: + type: string + connectorNamePathParam: + name: connectorName + in: path + description: Lowercase system name of the source application or device. Get a list of available connectors from the /v3/connectors/list endpoint. + required: true + style: simple + explode: false + schema: + type: string + enum: + - facebook + - fitbit + - github + - googlecalendar + - googlefit + - medhelper + - mint + - moodpanda + - moodscope + - myfitnesspal + - mynetdiary + - netatmo + - rescuetime + - runkeeper + - slack + - sleepcloud + - slice + - up + - whatpulse + - withings + - worldweatheronline + - foursquare + - strava + - gmail + correlationCoefficientParam: + name: correlationCoefficient + in: query + description: Pearson correlation coefficient between cause and effect after lagging by onset delay and grouping by duration of action + required: false + style: form + explode: true + schema: + type: string + createdParam: + name: created + in: query + description: These are studies that you have created + required: false + style: form + explode: true + schema: + type: boolean + downVotedParam: + name: downvoted + in: query + description: These are studies that you have down-voted + required: false + style: form + explode: true + schema: + type: boolean + createdAtParam: + name: createdAt + in: query + description: When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + doNotConvertParam: + name: doNotConvert + in: query + description: 'Ex: 1' + required: false + style: form + explode: true + schema: + type: boolean + doNotProcessParam: + name: doNotProcess + in: query + description: 'Ex: true' + required: false + style: form + explode: true + schema: + type: boolean + durationOfActionParam: + name: durationOfAction + in: query + description: 'The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. Unit: Seconds' + required: false + style: form + explode: true + schema: + type: string + earliestMeasurementTimeParam: + name: earliestMeasurementTime + in: query + description: Excluded records with measurement times earlier than this value. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + effectOrCauseParam: + name: effectOrCause + in: query + description: Provided variable is the effect or cause + required: false + style: form + explode: true + schema: + type: string + effectUnitNameParam: + name: effectUnitName + in: query + description: Name for the unit effect measurements to be returned in + required: false + style: form + explode: true + schema: + type: string + effectVariableNameParam: + name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + effectVariableIdParam: + name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + required: false + style: form + explode: true + schema: + type: integer + outcomeVariableNameParam: + name: outcomeVariableName + in: query + description: 'Name of the outcome variable of interest. Ex: Overall Mood' + required: false + style: form + explode: true + schema: + type: string + exactMatchParam: + name: exactMatch + in: query + description: Require exact match + required: false + style: form + explode: true + schema: + type: boolean + grantTypeParam: + name: grant_type + in: query + description: Grant Type can be 'authorization_code' or 'refresh_token' + required: true + style: form + explode: true + schema: + type: string + groupingTimezoneParam: + name: groupingTimezone + in: query + description: The time (in seconds) over which measurements are grouped together + required: false + style: form + explode: true + schema: + type: string + groupingWidthParam: + name: groupingWidth + in: query + description: The time (in seconds) over which measurements are grouped together + required: false + style: form + explode: true + schema: + type: integer + includeAuthorizedClientsParam: + name: includeAuthorizedClients + in: query + description: Return list of apps, studies, and individuals with access to user data + required: false + style: form + explode: true + schema: + type: boolean + includeChartsParam: + name: includeCharts + in: query + description: Highcharts configs that can be used if you have highcharts.js included on the page. This only works if the id or name query parameter is also provided. + required: false + style: form + explode: true + schema: + type: boolean + includeDeletedParam: + name: includeDeleted + in: query + description: Include deleted variables + required: false + style: form + explode: true + schema: + type: boolean + includePrivateParam: + name: includePrivate + in: query + description: Include user-specific variables in results + required: false + style: form + explode: true + schema: + type: boolean + includePublicParam: + name: includePublic + in: query + description: Include variables the user has no measurements for + required: false + style: form + explode: true + schema: + type: boolean + includeTagsParam: + name: includeTags + in: query + description: Return parent, child, duplicate, and ingredient variables + required: false + style: form + explode: true + schema: + type: boolean + joinedParam: + name: joined + in: query + description: These are studies that you have joined + required: false + style: form + explode: true + schema: + type: boolean + lastSourceParam: + name: lastSourceName + in: query + description: Limit variables to those which measurements were last submitted by a specific source. So if you have a client application and you only want variables that were last updated by your app, you can include the name of your app here + required: false + style: form + explode: true + schema: + type: string + latestMeasurementTimeParam: + name: latestMeasurementTime + in: query + description: Excluded records with measurement times later than this value. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + limitParam: + name: limit + in: query + description: The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + required: false + style: form + explode: true + schema: + type: integer + default: 100 + log: + name: log + in: query + description: Username or email + required: false + style: form + explode: true + schema: + type: string + manualTrackingParam: + name: manualTracking + in: query + description: Only include variables tracked manually by the user + required: false + style: form + explode: true + schema: + type: boolean + minMaxFilterParam: + name: minMaxFilter + in: query + description: 'Ex: 1' + required: false + style: form + explode: true + schema: + type: boolean + numberOfRawMeasurementsParam: + name: numberOfRawMeasurements + in: query + description: Filter variables by the total number of measurements that they have. This could be used of you want to filter or sort by popularity. + required: false + style: form + explode: true + schema: + type: string + offsetParam: + name: offset + in: query + description: OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + required: false + style: form + explode: true + schema: + minimum: 0 + type: integer + onlyPastParam: + name: onlyPast + in: query + description: 'Ex: 1' + required: false + style: form + explode: true + schema: + type: boolean + onsetDelayParam: + name: onsetDelay + in: query + description: The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes. + required: false + style: form + explode: true + schema: + type: string + openParam: + name: open + in: query + description: These are studies that anyone can join + required: false + style: form + explode: true + schema: + type: boolean + outcomesOfInterestParam: + name: outcomesOfInterest + in: query + description: Only include correlations for which the effect is an outcome of interest for the user + required: false + style: form + explode: true + schema: + type: boolean + platform: + name: platform + in: query + description: 'Ex: chrome, android, ios, web' + required: false + style: form + explode: true + schema: + type: string + enum: + - chrome + - android + - ios + - web + populationParam: + name: population + in: query + description: These are studies based on the entire population of users that have shared their data + required: false + style: form + explode: true + schema: + type: boolean + principalInvestigatorUserIdParam: + name: principalInvestigatorUserId + in: query + description: These are studies created by a specific principal investigator + required: false + style: form + explode: true + schema: + type: integer + publicEffectOrCauseParam: + name: publicEffectOrCause + in: query + description: 'Ex: ' + required: false + style: form + explode: true + schema: + type: string + pwd: + name: pwd + in: query + description: User password + required: false + style: form + explode: true + schema: + type: string + recalculate: + name: recalculate + in: query + description: Recalculate instead of using cached analysis + required: false + style: form + explode: true + schema: + type: boolean + redirectUriParam: + name: redirect_uri + in: query + description: The redirect URI is the URL within your client application that will receive the OAuth2 credentials. + required: false + style: form + explode: true + schema: + type: string + reminderTimeParam: + name: reminderTime + in: query + description: 'Ex: (lt)2017-07-31 21:43:26' + required: false + style: form + explode: true + schema: + type: string + responseTypeParam: + name: response_type + in: query + description: 'If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment.' + required: true + style: form + explode: true + schema: + type: string + scopeParam: + name: scope + in: query + description: Scopes include basic, readmeasurements, and writemeasurements. The `basic` scope allows you to read user info (displayName, email, etc). The `readmeasurements` scope allows one to read a user's data. The `writemeasurements` scope allows you to write user data. Separate multiple scopes by a space. + required: true + style: form + explode: true + schema: + type: string + searchPhraseParam: + name: searchPhrase + in: query + description: 'Ex: %Body Fat%' + required: false + style: form + explode: true + schema: + type: string + sortParam: + name: sort + in: query + description: Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order. + required: false + style: form + explode: true + schema: + type: string + sourceNameParam: + name: sourceName + in: query + description: ID of the source you want measurements for (supports exact name match only) + required: false + style: form + explode: true + schema: + type: string + stateParam: + name: state + in: query + description: An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI + required: false + style: form + explode: true + schema: + type: string + studyClientIdParam: + name: studyId + in: query + description: Client id for the study you want + required: false + style: form + explode: true + schema: + type: string + synonymsParam: + name: synonyms + in: query + description: 'Ex: McDonalds hotcake' + required: false + style: form + explode: true + schema: + type: string + taggedVariableIdParam: + name: taggedVariableId + in: query + description: Id of the tagged variable (i.e. Lollipop) you would like to get variables it can be tagged with (i.e. Sugar). Converted measurements of the tagged variable are included in analysis of the tag variable (i.e. ingredient). + required: false + style: form + explode: true + schema: + type: integer + tagVariableIdParam: + name: tagVariableId + in: query + description: Id of the tag variable (i.e. Sugar) you would like to get variables it can be tagged to (i.e. Lollipop). Converted measurements of the tagged variable are included in analysis of the tag variable (i.e. ingredient). + required: false + style: form + explode: true + schema: + type: integer + unitNameParam: + name: unitName + in: query + description: 'Ex: Milligrams' + required: false + style: form + explode: true + schema: + type: string + enum: + - '% Recommended Daily Allowance' + - -4 to 4 Rating + - 0 to 1 Rating + - 0 to 5 Rating + - 1 to 10 Rating + - 1 to 5 Rating + - Applications + - Beats per Minute + - Calories + - Capsules + - Centimeters + - Count + - Degrees Celsius + - Degrees East + - Degrees Fahrenheit + - Degrees North + - Dollars + - Drops + - Event + - Feet + - Grams + - Hours + - Inches + - Index + - Kilocalories + - Kilograms + - Kilometers + - Liters + - Meters + - Micrograms + - Micrograms per decilitre + - Miles + - Milligrams + - Milliliters + - Millimeters + - Millimeters Merc + - Milliseconds + - Minutes + - Pascal + - Percent + - Pieces + - Pills + - Pounds + - Puffs + - Seconds + - Serving + - Sprays + - Tablets + - Torr + - Units + - Yes/No + - per Minute + - Doses + - Quarts + - Ounces + - International Units + - Meters per Second + updatedAtParam: + name: updatedAt + in: query + description: When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local. + required: false + style: form + explode: true + schema: + type: string + userIdParam: + name: userId + in: query + description: User's id + required: false + style: form + explode: true + schema: + type: number + valueParam: + name: value + in: query + description: Value of measurement + required: false + style: form + explode: true + schema: + type: string + variableCategoryIdParam: + name: variableCategoryId + in: query + description: 'Ex: 13' + required: false + style: form + explode: true + schema: + type: integer + variableIdParam: + name: variableId + in: query + description: 'Ex: 13' + required: false + style: form + explode: true + schema: + type: integer + variableCategoryNameParam: + name: variableCategoryName + in: query + description: 'Ex: Emotions, Treatments, Symptoms...' + required: false + style: form + explode: true + schema: + type: string + enum: + - Activities + - Books + - Causes of Illness + - Cognitive Performance + - Conditions + - Emotions + - Environment + - Foods + - Location + - Miscellaneous + - Movies and TV + - Music + - Nutrients + - Payments + - Physical Activity + - Physique + - Sleep + - Social Interactions + - Software + - Symptoms + - Treatments + - Vital Signs + - Goals + variableNameParam: + name: variableName + in: query + description: Name of the variable you want measurements for + required: false + style: form + explode: true + schema: + type: string + conciseParam: + name: concise + in: query + description: Only return field required for variable auto-complete searches. The smaller size allows for storing more variable results locally reducing API requests. + required: false + style: form + explode: true + schema: + type: boolean + requestBodies: + userVariablesParam: + description: Variable user settings data + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Variable' + required: true + variableIdBodyParam: + description: Id of the variable whose measurements should be deleted + content: + application/json: + schema: + $ref: '#/components/schemas/UserVariableDelete' + required: true + securitySchemes: + access_token: + type: apiKey + name: access_token + in: query + client_id: + type: apiKey + name: clientId + in: query + quantimodo_oauth2: + type: oauth2 + flows: + authorizationCode: + authorizationUrl: https://app.quantimo.do/api/v1/oauth/authorize + tokenUrl: https://app.quantimo.do/api/v1/oauth/token + scopes: + basic: Allows you to read user info (display name, email, etc) + readmeasurements: Allows one to read a user's measurements + writemeasurements: Allows you to write user measurements diff --git a/gulpfile.js b/gulpfile.js index 812e18aa0c..d32cfcbeac 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -747,7 +747,7 @@ var qmGulp = { } }; qmGulp.buildInfoHelper.setVersionNumbers(); -var Quantimodo = require('quantimodo'); +var Quantimodo = require('./plain-javascript-client/index.js'); /** @namespace Quantimodo.ApiClient */ var defaultClient = Quantimodo.ApiClient.instance; var quantimodo_oauth2 = defaultClient.authentications.quantimodo_oauth2; diff --git a/secrets/.env.example b/secrets/.env.example deleted file mode 100644 index 1f3ad6563f..0000000000 --- a/secrets/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -GITHUB_ACCESS_TOKEN= -ELECTRON_ENABLE_LOGGING= -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= -SLACK_WEBHOOK_URL= diff --git a/src/api/core/ApiError.js b/src/api/core/ApiError.js new file mode 100644 index 0000000000..e2b709f819 --- /dev/null +++ b/src/api/core/ApiError.js @@ -0,0 +1,30 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ApiError = void 0; +var ApiError = /** @class */ (function (_super) { + __extends(ApiError, _super); + function ApiError(response, message) { + var _this = _super.call(this, message) || this; + _this.url = response.url; + _this.status = response.status; + _this.statusText = response.statusText; + _this.body = response.body; + return _this; + } + return ApiError; +}(Error)); +exports.ApiError = ApiError; +//# sourceMappingURL=ApiError.js.map \ No newline at end of file diff --git a/src/api/core/ApiError.js.map b/src/api/core/ApiError.js.map new file mode 100644 index 0000000000..c4e0829e82 --- /dev/null +++ b/src/api/core/ApiError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ApiError.js","sourceRoot":"","sources":["ApiError.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKA;IAA8B,4BAAK;IAM/B,kBAAY,QAAmB,EAAE,OAAe;QAAhD,YACI,kBAAM,OAAO,CAAC,SAMjB;QAJG,KAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;QACxB,KAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC9B,KAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;QACtC,KAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;;IAC9B,CAAC;IACL,eAAC;AAAD,CAAC,AAdD,CAA8B,KAAK,GAclC;AAdY,4BAAQ"} \ No newline at end of file diff --git a/src/api/core/ApiError.ts b/src/api/core/ApiError.ts new file mode 100644 index 0000000000..be56932ebf --- /dev/null +++ b/src/api/core/ApiError.ts @@ -0,0 +1,20 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type {ApiResult} from './ApiResult'; + +export class ApiError extends Error { + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: any; + + constructor(response: ApiResult, message: string) { + super(message); + + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + } +} diff --git a/src/api/core/ApiRequestOptions.js b/src/api/core/ApiRequestOptions.js new file mode 100644 index 0000000000..e551663b94 --- /dev/null +++ b/src/api/core/ApiRequestOptions.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=ApiRequestOptions.js.map \ No newline at end of file diff --git a/src/api/core/ApiRequestOptions.js.map b/src/api/core/ApiRequestOptions.js.map new file mode 100644 index 0000000000..a3d818d398 --- /dev/null +++ b/src/api/core/ApiRequestOptions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ApiRequestOptions.js","sourceRoot":"","sources":["ApiRequestOptions.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/src/api/core/ApiRequestOptions.ts b/src/api/core/ApiRequestOptions.ts new file mode 100644 index 0000000000..ee87d8f584 --- /dev/null +++ b/src/api/core/ApiRequestOptions.ts @@ -0,0 +1,14 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ApiRequestOptions = { + readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; + readonly path: string; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly responseHeader?: string; + readonly errors?: Record; +} \ No newline at end of file diff --git a/src/api/core/ApiResult.js b/src/api/core/ApiResult.js new file mode 100644 index 0000000000..f498ac151a --- /dev/null +++ b/src/api/core/ApiResult.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=ApiResult.js.map \ No newline at end of file diff --git a/src/api/core/ApiResult.js.map b/src/api/core/ApiResult.js.map new file mode 100644 index 0000000000..451f810835 --- /dev/null +++ b/src/api/core/ApiResult.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ApiResult.js","sourceRoot":"","sources":["ApiResult.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/src/api/core/ApiResult.ts b/src/api/core/ApiResult.ts new file mode 100644 index 0000000000..7363469d79 --- /dev/null +++ b/src/api/core/ApiResult.ts @@ -0,0 +1,10 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ApiResult = { + readonly url: string; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly body: any; +} \ No newline at end of file diff --git a/src/api/core/OpenAPI.js b/src/api/core/OpenAPI.js new file mode 100644 index 0000000000..30f343f06e --- /dev/null +++ b/src/api/core/OpenAPI.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OpenAPI = void 0; +exports.OpenAPI = { + BASE: 'https://app.quantimo.do/api', + VERSION: '1', + WITH_CREDENTIALS: false, + TOKEN: undefined, + USERNAME: undefined, + PASSWORD: undefined, + HEADERS: undefined, +}; +//# sourceMappingURL=OpenAPI.js.map \ No newline at end of file diff --git a/src/api/core/OpenAPI.js.map b/src/api/core/OpenAPI.js.map new file mode 100644 index 0000000000..d73fc9aa68 --- /dev/null +++ b/src/api/core/OpenAPI.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OpenAPI.js","sourceRoot":"","sources":["OpenAPI.ts"],"names":[],"mappings":";;;AAkBa,QAAA,OAAO,GAAW;IAC3B,IAAI,EAAE,6BAA6B;IACnC,OAAO,EAAE,GAAG;IACZ,gBAAgB,EAAE,KAAK;IACvB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,SAAS;CACrB,CAAC"} \ No newline at end of file diff --git a/src/api/core/OpenAPI.ts b/src/api/core/OpenAPI.ts new file mode 100644 index 0000000000..127fe3b9f3 --- /dev/null +++ b/src/api/core/OpenAPI.ts @@ -0,0 +1,27 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type {ApiRequestOptions} from './ApiRequestOptions'; + +type Resolver = (options: ApiRequestOptions) => Promise; +type Headers = Record; + +type Config = { + BASE: string; + VERSION: string; + WITH_CREDENTIALS: boolean; + TOKEN?: string | Resolver; + USERNAME?: string | Resolver; + PASSWORD?: string | Resolver; + HEADERS?: Headers | Resolver; +} + +export const OpenAPI: Config = { + BASE: 'https://app.quantimo.do/api', + VERSION: '1', + WITH_CREDENTIALS: false, + TOKEN: undefined, + USERNAME: undefined, + PASSWORD: undefined, + HEADERS: undefined, +}; diff --git a/src/api/core/request.js b/src/api/core/request.js new file mode 100644 index 0000000000..62da9dd492 --- /dev/null +++ b/src/api/core/request.js @@ -0,0 +1,272 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.request = void 0; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +var ApiError_1 = require("./ApiError"); +var OpenAPI_1 = require("./OpenAPI"); +function isDefined(value) { + return value !== undefined && value !== null; +} +function isString(value) { + return typeof value === 'string'; +} +function isStringWithValue(value) { + return isString(value) && value !== ''; +} +function isBlob(value) { + return value instanceof Blob; +} +function getQueryString(params) { + var qs = []; + Object.keys(params).forEach(function (key) { + var value = params[key]; + if (isDefined(value)) { + if (Array.isArray(value)) { + value.forEach(function (value) { + qs.push(encodeURIComponent(key) + "=" + encodeURIComponent(String(value))); + }); + } + else { + qs.push(encodeURIComponent(key) + "=" + encodeURIComponent(String(value))); + } + } + }); + if (qs.length > 0) { + return "?" + qs.join('&'); + } + return ''; +} +function getUrl(options) { + var path = options.path.replace(/[:]/g, '_'); + var url = "" + OpenAPI_1.OpenAPI.BASE + path; + if (options.query) { + return "" + url + getQueryString(options.query); + } + return url; +} +function getFormData(params) { + var formData = new FormData(); + Object.keys(params).forEach(function (key) { + var value = params[key]; + if (isDefined(value)) { + formData.append(key, value); + } + }); + return formData; +} +function resolve(options, resolver) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (typeof resolver === 'function') { + return [2 /*return*/, resolver(options)]; + } + return [2 /*return*/, resolver]; + }); + }); +} +function getHeaders(options) { + return __awaiter(this, void 0, void 0, function () { + var token, username, password, defaultHeaders, headers, credentials; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, resolve(options, OpenAPI_1.OpenAPI.TOKEN)]; + case 1: + token = _a.sent(); + return [4 /*yield*/, resolve(options, OpenAPI_1.OpenAPI.USERNAME)]; + case 2: + username = _a.sent(); + return [4 /*yield*/, resolve(options, OpenAPI_1.OpenAPI.PASSWORD)]; + case 3: + password = _a.sent(); + return [4 /*yield*/, resolve(options, OpenAPI_1.OpenAPI.HEADERS)]; + case 4: + defaultHeaders = _a.sent(); + headers = new Headers(__assign(__assign({ Accept: 'application/json' }, defaultHeaders), options.headers)); + if (isStringWithValue(token)) { + headers.append('Authorization', "Bearer " + token); + } + if (isStringWithValue(username) && isStringWithValue(password)) { + credentials = btoa(username + ":" + password); + headers.append('Authorization', "Basic " + credentials); + } + if (options.body) { + if (isBlob(options.body)) { + headers.append('Content-Type', options.body.type || 'application/octet-stream'); + } + else if (isString(options.body)) { + headers.append('Content-Type', 'text/plain'); + } + else { + headers.append('Content-Type', 'application/json'); + } + } + return [2 /*return*/, headers]; + } + }); + }); +} +function getRequestBody(options) { + if (options.formData) { + return getFormData(options.formData); + } + if (options.body) { + if (isString(options.body) || isBlob(options.body)) { + return options.body; + } + else { + return JSON.stringify(options.body); + } + } + return undefined; +} +function sendRequest(options, url) { + return __awaiter(this, void 0, void 0, function () { + var request, _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = { + method: options.method + }; + return [4 /*yield*/, getHeaders(options)]; + case 1: + request = (_a.headers = _b.sent(), + _a.body = getRequestBody(options), + _a); + if (OpenAPI_1.OpenAPI.WITH_CREDENTIALS) { + request.credentials = 'include'; + } + return [4 /*yield*/, fetch(url, request)]; + case 2: return [2 /*return*/, _b.sent()]; + } + }); + }); +} +function getResponseHeader(response, responseHeader) { + if (responseHeader) { + var content = response.headers.get(responseHeader); + if (isString(content)) { + return content; + } + } + return null; +} +function getResponseBody(response) { + return __awaiter(this, void 0, void 0, function () { + var contentType, isJSON, error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 5, , 6]); + contentType = response.headers.get('Content-Type'); + if (!contentType) return [3 /*break*/, 4]; + isJSON = contentType.toLowerCase().startsWith('application/json'); + if (!isJSON) return [3 /*break*/, 2]; + return [4 /*yield*/, response.json()]; + case 1: return [2 /*return*/, _a.sent()]; + case 2: return [4 /*yield*/, response.text()]; + case 3: return [2 /*return*/, _a.sent()]; + case 4: return [3 /*break*/, 6]; + case 5: + error_1 = _a.sent(); + console.error(error_1); + return [3 /*break*/, 6]; + case 6: return [2 /*return*/, null]; + } + }); + }); +} +function catchErrors(options, result) { + var errors = __assign({ 400: 'Bad Request', 401: 'Unauthorized', 403: 'Forbidden', 404: 'Not Found', 500: 'Internal Server Error', 502: 'Bad Gateway', 503: 'Service Unavailable' }, options.errors); + var error = errors[result.status]; + if (error) { + throw new ApiError_1.ApiError(result, error); + } + if (!result.ok) { + throw new ApiError_1.ApiError(result, 'Generic Error'); + } +} +/** + * Request using fetch client + * @param options The request options from the the service + * @returns ApiResult + * @throws ApiError + */ +function request(options) { + return __awaiter(this, void 0, void 0, function () { + var url, response, responseBody, responseHeader, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + url = getUrl(options); + return [4 /*yield*/, sendRequest(options, url)]; + case 1: + response = _a.sent(); + return [4 /*yield*/, getResponseBody(response)]; + case 2: + responseBody = _a.sent(); + responseHeader = getResponseHeader(response, options.responseHeader); + result = { + url: url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader || responseBody, + }; + catchErrors(options, result); + return [2 /*return*/, result]; + } + }); + }); +} +exports.request = request; +//# sourceMappingURL=request.js.map \ No newline at end of file diff --git a/src/api/core/request.js.map b/src/api/core/request.js.map new file mode 100644 index 0000000000..2591fefcf0 --- /dev/null +++ b/src/api/core/request.js.map @@ -0,0 +1 @@ +{"version":3,"file":"request.js","sourceRoot":"","sources":["request.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB;AACpB,uCAAsC;AAGtC,qCAAoC;AAEpC,SAAS,SAAS,CAAI,KAA2B;IAC7C,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACjD,CAAC;AAED,SAAS,QAAQ,CAAC,KAAU;IACxB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACrC,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAU;IACjC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,MAAM,CAAC,KAAU;IACtB,OAAO,KAAK,YAAY,IAAI,CAAC;AACjC,CAAC;AAED,SAAS,cAAc,CAAC,MAA2B;IAC/C,IAAM,EAAE,GAAa,EAAE,CAAC;IACxB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAA,GAAG;QAC3B,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;YAClB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBACtB,KAAK,CAAC,OAAO,CAAC,UAAA,KAAK;oBACf,EAAE,CAAC,IAAI,CAAI,kBAAkB,CAAC,GAAG,CAAC,SAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAG,CAAC,CAAC;gBAC/E,CAAC,CAAC,CAAC;aACN;iBAAM;gBACH,EAAE,CAAC,IAAI,CAAI,kBAAkB,CAAC,GAAG,CAAC,SAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAG,CAAC,CAAC;aAC9E;SACJ;IACL,CAAC,CAAC,CAAC;IACH,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;QACf,OAAO,MAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAG,CAAC;KAC7B;IACD,OAAO,EAAE,CAAC;AACd,CAAC;AAED,SAAS,MAAM,CAAC,OAA0B;IACtC,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/C,IAAM,GAAG,GAAG,KAAG,iBAAO,CAAC,IAAI,GAAG,IAAM,CAAC;IAErC,IAAI,OAAO,CAAC,KAAK,EAAE;QACf,OAAO,KAAG,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,CAAG,CAAC;KACnD;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,MAA2B;IAC5C,IAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;IAChC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAA,GAAG;QAC3B,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;YAClB,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC/B;IACL,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AACpB,CAAC;AAID,SAAe,OAAO,CAAI,OAA0B,EAAE,QAA0B;;;YAC5E,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBAChC,sBAAQ,QAAwB,CAAC,OAAO,CAAC,EAAC;aAC7C;YACD,sBAAO,QAAQ,EAAC;;;CACnB;AAED,SAAe,UAAU,CAAC,OAA0B;;;;;wBAClC,qBAAM,OAAO,CAAC,OAAO,EAAE,iBAAO,CAAC,KAAK,CAAC,EAAA;;oBAA7C,KAAK,GAAG,SAAqC;oBAClC,qBAAM,OAAO,CAAC,OAAO,EAAE,iBAAO,CAAC,QAAQ,CAAC,EAAA;;oBAAnD,QAAQ,GAAG,SAAwC;oBACxC,qBAAM,OAAO,CAAC,OAAO,EAAE,iBAAO,CAAC,QAAQ,CAAC,EAAA;;oBAAnD,QAAQ,GAAG,SAAwC;oBAClC,qBAAM,OAAO,CAAC,OAAO,EAAE,iBAAO,CAAC,OAAO,CAAC,EAAA;;oBAAxD,cAAc,GAAG,SAAuC;oBAExD,OAAO,GAAG,IAAI,OAAO,qBACvB,MAAM,EAAE,kBAAkB,IACvB,cAAc,GACd,OAAO,CAAC,OAAO,EACpB,CAAC;oBAEH,IAAI,iBAAiB,CAAC,KAAK,CAAC,EAAE;wBAC1B,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,YAAU,KAAO,CAAC,CAAC;qBACtD;oBAED,IAAI,iBAAiB,CAAC,QAAQ,CAAC,IAAI,iBAAiB,CAAC,QAAQ,CAAC,EAAE;wBACtD,WAAW,GAAG,IAAI,CAAI,QAAQ,SAAI,QAAU,CAAC,CAAC;wBACpD,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,WAAS,WAAa,CAAC,CAAC;qBAC3D;oBAED,IAAI,OAAO,CAAC,IAAI,EAAE;wBACd,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;4BACtB,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,0BAA0B,CAAC,CAAC;yBACnF;6BAAM,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;4BAC/B,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;yBAChD;6BAAM;4BACH,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;yBACtD;qBACJ;oBACD,sBAAO,OAAO,EAAC;;;;CAClB;AAED,SAAS,cAAc,CAAC,OAA0B;IAC9C,IAAI,OAAO,CAAC,QAAQ,EAAE;QAClB,OAAO,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;KACxC;IACD,IAAI,OAAO,CAAC,IAAI,EAAE;QACd,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAChD,OAAO,OAAO,CAAC,IAAI,CAAC;SACvB;aAAM;YACH,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SACvC;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,SAAe,WAAW,CAAC,OAA0B,EAAE,GAAW;;;;;;;wBAE1D,MAAM,EAAE,OAAO,CAAC,MAAM;;oBACb,qBAAM,UAAU,CAAC,OAAO,CAAC,EAAA;;oBAFhC,OAAO,IAET,UAAO,GAAE,SAAyB;wBAClC,OAAI,GAAE,cAAc,CAAC,OAAO,CAAC;2BAChC;oBACD,IAAI,iBAAO,CAAC,gBAAgB,EAAE;wBAC1B,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;qBACnC;oBACM,qBAAM,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,EAAA;wBAAhC,sBAAO,SAAyB,EAAC;;;;CACpC;AAED,SAAS,iBAAiB,CAAC,QAAkB,EAAE,cAAuB;IAClE,IAAI,cAAc,EAAE;QAChB,IAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACrD,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE;YACnB,OAAO,OAAO,CAAC;SAClB;KACJ;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAe,eAAe,CAAC,QAAkB;;;;;;;oBAEnC,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;yBACrD,WAAW,EAAX,wBAAW;oBACL,MAAM,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;yBACpE,MAAM,EAAN,wBAAM;oBACC,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;wBAA5B,sBAAO,SAAqB,EAAC;wBAEtB,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;wBAA5B,sBAAO,SAAqB,EAAC;;;;oBAIrC,OAAO,CAAC,KAAK,CAAC,OAAK,CAAC,CAAC;;wBAEzB,sBAAO,IAAI,EAAC;;;;CACf;AAED,SAAS,WAAW,CAAC,OAA0B,EAAE,MAAiB;IAC9D,IAAM,MAAM,cACR,GAAG,EAAE,aAAa,EAClB,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,uBAAuB,EAC5B,GAAG,EAAE,aAAa,EAClB,GAAG,EAAE,qBAAqB,IACvB,OAAO,CAAC,MAAM,CACpB,CAAA;IAED,IAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,KAAK,EAAE;QACP,MAAM,IAAI,mBAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;KACrC;IAED,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;QACZ,MAAM,IAAI,mBAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;KAC/C;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAsB,OAAO,CAAC,OAA0B;;;;;;oBAC9C,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;oBACX,qBAAM,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,EAAA;;oBAA1C,QAAQ,GAAG,SAA+B;oBAC3B,qBAAM,eAAe,CAAC,QAAQ,CAAC,EAAA;;oBAA9C,YAAY,GAAG,SAA+B;oBAC9C,cAAc,GAAG,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;oBAErE,MAAM,GAAc;wBACtB,GAAG,KAAA;wBACH,EAAE,EAAE,QAAQ,CAAC,EAAE;wBACf,MAAM,EAAE,QAAQ,CAAC,MAAM;wBACvB,UAAU,EAAE,QAAQ,CAAC,UAAU;wBAC/B,IAAI,EAAE,cAAc,IAAI,YAAY;qBACvC,CAAC;oBAEF,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBAC7B,sBAAO,MAAM,EAAC;;;;CACjB;AAhBD,0BAgBC"} \ No newline at end of file diff --git a/src/api/core/request.ts b/src/api/core/request.ts new file mode 100644 index 0000000000..7d842b3953 --- /dev/null +++ b/src/api/core/request.ts @@ -0,0 +1,205 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import {ApiError} from './ApiError'; +import type {ApiRequestOptions} from './ApiRequestOptions'; +import type {ApiResult} from './ApiResult'; +import {OpenAPI} from './OpenAPI'; + +function isDefined(value: T | null | undefined): value is Exclude { + return value !== undefined && value !== null; +} + +function isString(value: any): value is string { + return typeof value === 'string'; +} + +function isStringWithValue(value: any): value is string { + return isString(value) && value !== ''; +} + +function isBlob(value: any): value is Blob { + return value instanceof Blob; +} + +function getQueryString(params: Record): string { + const qs: string[] = []; + Object.keys(params).forEach(key => { + const value = params[key]; + if (isDefined(value)) { + if (Array.isArray(value)) { + value.forEach(value => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }); + } else { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + } + } + }); + if (qs.length > 0) { + return `?${qs.join('&')}`; + } + return ''; +} + +function getUrl(options: ApiRequestOptions): string { + const path = options.path.replace(/[:]/g, '_'); + const url = `${OpenAPI.BASE}${path}`; + + if (options.query) { + return `${url}${getQueryString(options.query)}`; + } + return url; +} + +function getFormData(params: Record): FormData { + const formData = new FormData(); + Object.keys(params).forEach(key => { + const value = params[key]; + if (isDefined(value)) { + formData.append(key, value); + } + }); + return formData; +} + +type Resolver = (options: ApiRequestOptions) => Promise; + +async function resolve(options: ApiRequestOptions, resolver?: T | Resolver): Promise { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; +} + +async function getHeaders(options: ApiRequestOptions): Promise { + const token = await resolve(options, OpenAPI.TOKEN); + const username = await resolve(options, OpenAPI.USERNAME); + const password = await resolve(options, OpenAPI.PASSWORD); + const defaultHeaders = await resolve(options, OpenAPI.HEADERS); + + const headers = new Headers({ + Accept: 'application/json', + ...defaultHeaders, + ...options.headers, + }); + + if (isStringWithValue(token)) { + headers.append('Authorization', `Bearer ${token}`); + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = btoa(`${username}:${password}`); + headers.append('Authorization', `Basic ${credentials}`); + } + + if (options.body) { + if (isBlob(options.body)) { + headers.append('Content-Type', options.body.type || 'application/octet-stream'); + } else if (isString(options.body)) { + headers.append('Content-Type', 'text/plain'); + } else { + headers.append('Content-Type', 'application/json'); + } + } + return headers; +} + +function getRequestBody(options: ApiRequestOptions): BodyInit | undefined { + if (options.formData) { + return getFormData(options.formData); + } + if (options.body) { + if (isString(options.body) || isBlob(options.body)) { + return options.body; + } else { + return JSON.stringify(options.body); + } + } + return undefined; +} + +async function sendRequest(options: ApiRequestOptions, url: string): Promise { + const request: RequestInit = { + method: options.method, + headers: await getHeaders(options), + body: getRequestBody(options), + }; + if (OpenAPI.WITH_CREDENTIALS) { + request.credentials = 'include'; + } + return await fetch(url, request); +} + +function getResponseHeader(response: Response, responseHeader?: string): string | null { + if (responseHeader) { + const content = response.headers.get(responseHeader); + if (isString(content)) { + return content; + } + } + return null; +} + +async function getResponseBody(response: Response): Promise { + try { + const contentType = response.headers.get('Content-Type'); + if (contentType) { + const isJSON = contentType.toLowerCase().startsWith('application/json'); + if (isJSON) { + return await response.json(); + } else { + return await response.text(); + } + } + } catch (error) { + console.error(error); + } + return null; +} + +function catchErrors(options: ApiRequestOptions, result: ApiResult): void { + const errors: Record = { + 400: 'Bad Request', + 401: 'Unauthorized', + 403: 'Forbidden', + 404: 'Not Found', + 500: 'Internal Server Error', + 502: 'Bad Gateway', + 503: 'Service Unavailable', + ...options.errors, + } + + const error = errors[result.status]; + if (error) { + throw new ApiError(result, error); + } + + if (!result.ok) { + throw new ApiError(result, 'Generic Error'); + } +} + +/** + * Request using fetch client + * @param options The request options from the the service + * @returns ApiResult + * @throws ApiError + */ +export async function request(options: ApiRequestOptions): Promise { + const url = getUrl(options); + const response = await sendRequest(options, url); + const responseBody = await getResponseBody(response); + const responseHeader = getResponseHeader(response, options.responseHeader); + + const result: ApiResult = { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader || responseBody, + }; + + catchErrors(options, result); + return result; +} diff --git a/src/api/index.js b/src/api/index.js new file mode 100644 index 0000000000..c40caf6956 --- /dev/null +++ b/src/api/index.js @@ -0,0 +1,192 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", {value: true}); +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +var ApiError_1 = require("./core/ApiError"); +Object.defineProperty(exports, "ApiError", { + enumerable: true, get: function () { + return ApiError_1.ApiError; + } +}); +var OpenAPI_1 = require("./core/OpenAPI"); +Object.defineProperty(exports, "OpenAPI", { + enumerable: true, get: function () { + return OpenAPI_1.OpenAPI; + } +}); +var ConversionStep_1 = require("./models/ConversionStep"); +Object.defineProperty(exports, "ConversionStep", { + enumerable: true, get: function () { + return ConversionStep_1.ConversionStep; + } +}); +var InputField_1 = require("./models/InputField"); +Object.defineProperty(exports, "InputField", { + enumerable: true, get: function () { + return InputField_1.InputField; + } +}); +var Measurement_1 = require("./models/Measurement"); +Object.defineProperty(exports, "Measurement", { + enumerable: true, get: function () { + return Measurement_1.Measurement; + } +}); +var MeasurementSet_1 = require("./models/MeasurementSet"); +Object.defineProperty(exports, "MeasurementSet", { + enumerable: true, get: function () { + return MeasurementSet_1.MeasurementSet; + } +}); +var StudyCreationBody_1 = require("./models/StudyCreationBody"); +Object.defineProperty(exports, "StudyCreationBody", { + enumerable: true, get: function () { + return StudyCreationBody_1.StudyCreationBody; + } +}); +var TrackingReminder_1 = require("./models/TrackingReminder"); +Object.defineProperty(exports, "TrackingReminder", { + enumerable: true, get: function () { + return TrackingReminder_1.TrackingReminder; + } +}); +var TrackingReminderNotification_1 = require("./models/TrackingReminderNotification"); +Object.defineProperty(exports, "TrackingReminderNotification", { + enumerable: true, get: function () { + return TrackingReminderNotification_1.TrackingReminderNotification; + } +}); +var TrackingReminderNotificationPost_1 = require("./models/TrackingReminderNotificationPost"); +Object.defineProperty(exports, "TrackingReminderNotificationPost", { + enumerable: true, get: function () { + return TrackingReminderNotificationPost_1.TrackingReminderNotificationPost; + } +}); +var Unit_1 = require("./models/Unit"); +Object.defineProperty(exports, "Unit", { + enumerable: true, get: function () { + return Unit_1.Unit; + } +}); +var Variable_1 = require("./models/Variable"); +Object.defineProperty(exports, "Variable", { + enumerable: true, get: function () { + return Variable_1.Variable; + } +}); +var VariableCategory_1 = require("./models/VariableCategory"); +Object.defineProperty(exports, "VariableCategory", { + enumerable: true, get: function () { + return VariableCategory_1.VariableCategory; + } +}); +var Vote_1 = require("./models/Vote"); +Object.defineProperty(exports, "Vote", { + enumerable: true, get: function () { + return Vote_1.Vote; + } +}); +var ActivitiesService_1 = require("./services/ActivitiesService"); +Object.defineProperty(exports, "ActivitiesService", { + enumerable: true, get: function () { + return ActivitiesService_1.ActivitiesService; + } +}); +var AnalyticsService_1 = require("./services/AnalyticsService"); +Object.defineProperty(exports, "AnalyticsService", { + enumerable: true, get: function () { + return AnalyticsService_1.AnalyticsService; + } +}); +var AppSettingsService_1 = require("./services/AppSettingsService"); +Object.defineProperty(exports, "AppSettingsService", { + enumerable: true, get: function () { + return AppSettingsService_1.AppSettingsService; + } +}); +var AuthenticationService_1 = require("./services/AuthenticationService"); +Object.defineProperty(exports, "AuthenticationService", { + enumerable: true, get: function () { + return AuthenticationService_1.AuthenticationService; + } +}); +var ConnectorsService_1 = require("./services/ConnectorsService"); +Object.defineProperty(exports, "ConnectorsService", { + enumerable: true, get: function () { + return ConnectorsService_1.ConnectorsService; + } +}); +var FeedService_1 = require("./services/FeedService"); +Object.defineProperty(exports, "FeedService", { + enumerable: true, get: function () { + return FeedService_1.FeedService; + } +}); +var FriendsService_1 = require("./services/FriendsService"); +Object.defineProperty(exports, "FriendsService", { + enumerable: true, get: function () { + return FriendsService_1.FriendsService; + } +}); +var GroupsService_1 = require("./services/GroupsService"); +Object.defineProperty(exports, "GroupsService", { + enumerable: true, get: function () { + return GroupsService_1.GroupsService; + } +}); +var MeasurementsService_1 = require("./services/MeasurementsService"); +Object.defineProperty(exports, "MeasurementsService", { + enumerable: true, get: function () { + return MeasurementsService_1.MeasurementsService; + } +}); +var MessagesService_1 = require("./services/MessagesService"); +Object.defineProperty(exports, "MessagesService", { + enumerable: true, get: function () { + return MessagesService_1.MessagesService; + } +}); +var NotificationsService_1 = require("./services/NotificationsService"); +Object.defineProperty(exports, "NotificationsService", { + enumerable: true, get: function () { + return NotificationsService_1.NotificationsService; + } +}); +var RemindersService_1 = require("./services/RemindersService"); +Object.defineProperty(exports, "RemindersService", { + enumerable: true, get: function () { + return RemindersService_1.RemindersService; + } +}); +var SharesService_1 = require("./services/SharesService"); +Object.defineProperty(exports, "SharesService", { + enumerable: true, get: function () { + return SharesService_1.SharesService; + } +}); +var StudiesService_1 = require("./services/StudiesService"); +Object.defineProperty(exports, "StudiesService", { + enumerable: true, get: function () { + return StudiesService_1.StudiesService; + } +}); +var UnitsService_1 = require("./services/UnitsService"); +Object.defineProperty(exports, "UnitsService", { + enumerable: true, get: function () { + return UnitsService_1.UnitsService; + } +}); +var UserService_1 = require("./services/UserService"); +Object.defineProperty(exports, "UserService", { + enumerable: true, get: function () { + return UserService_1.UserService; + } +}); +var VariablesService_1 = require("./services/VariablesService"); +Object.defineProperty(exports, "VariablesService", { + enumerable: true, get: function () { + return VariablesService_1.VariablesService; + } +}); +//# sourceMappingURL=index.js.map diff --git a/src/api/index.js.map b/src/api/index.js.map new file mode 100644 index 0000000000..c8df0e114b --- /dev/null +++ b/src/api/index.js.map @@ -0,0 +1,10 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "index.ts" + ], + "names": [], + "mappings": ";;AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB;AACpB,4CAA2C;AAAlC,oGAAA,QAAQ,OAAA;AACjB,0CAAyC;AAAhC,kGAAA,OAAO,OAAA;AAYhB,0DAAyD;AAAhD,gHAAA,cAAc,OAAA;AAqBvB,kDAAiD;AAAxC,wGAAA,UAAU,OAAA;AAEnB,oDAAmD;AAA1C,0GAAA,WAAW,OAAA;AAEpB,0DAAyD;AAAhD,gHAAA,cAAc,OAAA;AAuBvB,gEAA+D;AAAtD,sHAAA,iBAAiB,OAAA;AAQ1B,8DAA6D;AAApD,oHAAA,gBAAgB,OAAA;AACzB,sFAAqF;AAA5E,4IAAA,4BAA4B,OAAA;AAErC,8FAA6F;AAApF,oJAAA,gCAAgC,OAAA;AAEzC,sCAAqC;AAA5B,4FAAA,IAAI,OAAA;AAMb,8CAA6C;AAApC,oGAAA,QAAQ,OAAA;AACjB,8DAA6D;AAApD,oHAAA,gBAAgB,OAAA;AAEzB,sCAAqC;AAA5B,4FAAA,IAAI,OAAA;AAEb,kEAAiE;AAAxD,sHAAA,iBAAiB,OAAA;AAC1B,gEAA+D;AAAtD,oHAAA,gBAAgB,OAAA;AACzB,oEAAmE;AAA1D,wHAAA,kBAAkB,OAAA;AAC3B,0EAAyE;AAAhE,8HAAA,qBAAqB,OAAA;AAC9B,kEAAiE;AAAxD,sHAAA,iBAAiB,OAAA;AAC1B,sDAAqD;AAA5C,0GAAA,WAAW,OAAA;AACpB,4DAA2D;AAAlD,gHAAA,cAAc,OAAA;AACvB,0DAAyD;AAAhD,8GAAA,aAAa,OAAA;AACtB,sEAAqE;AAA5D,0HAAA,mBAAmB,OAAA;AAC5B,8DAA6D;AAApD,kHAAA,eAAe,OAAA;AACxB,wEAAuE;AAA9D,4HAAA,oBAAoB,OAAA;AAC7B,gEAA+D;AAAtD,oHAAA,gBAAgB,OAAA;AACzB,0DAAyD;AAAhD,8GAAA,aAAa,OAAA;AACtB,4DAA2D;AAAlD,gHAAA,cAAc,OAAA;AACvB,wDAAuD;AAA9C,4GAAA,YAAY,OAAA;AACrB,sDAAqD;AAA5C,0GAAA,WAAW,OAAA;AACpB,gEAA+D;AAAtD,oHAAA,gBAAgB,OAAA" +} diff --git a/src/api/index.ts b/src/api/index.ts new file mode 100644 index 0000000000..7a8df2d5e5 --- /dev/null +++ b/src/api/index.ts @@ -0,0 +1,105 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export {ApiError} from './core/ApiError'; +export {OpenAPI} from './core/OpenAPI'; + +export type {ActivitiesResponse} from './models/ActivitiesResponse'; +export type {Activity} from './models/Activity'; +export type {AppSettings} from './models/AppSettings'; +export type {AppSettingsResponse} from './models/AppSettingsResponse'; +export type {AuthorizedClients} from './models/AuthorizedClients'; +export type {Button} from './models/Button'; +export type {Card} from './models/Card'; +export type {Chart} from './models/Chart'; +export type {CommonResponse} from './models/CommonResponse'; +export type {ConnectInstructions} from './models/ConnectInstructions'; +export {ConversionStep} from './models/ConversionStep'; +export type {Correlation} from './models/Correlation'; +export type {DataSource} from './models/DataSource'; +export type {DeviceToken} from './models/DeviceToken'; +export type {Error} from './models/Error'; +export type {Explanation} from './models/Explanation'; +export type {ExplanationStartTracking} from './models/ExplanationStartTracking'; +export type {FeedResponse} from './models/FeedResponse'; +export type {Friend} from './models/Friend'; +export type {FriendsResponse} from './models/FriendsResponse'; +export type {GetConnectorsResponse} from './models/GetConnectorsResponse'; +export type {GetCorrelationsDataResponse} from './models/GetCorrelationsDataResponse'; +export type {GetCorrelationsResponse} from './models/GetCorrelationsResponse'; +export type {GetSharesResponse} from './models/GetSharesResponse'; +export type {GetStudiesResponse} from './models/GetStudiesResponse'; +export type {GetTrackingReminderNotificationsResponse} from './models/GetTrackingReminderNotificationsResponse'; +export type {Group} from './models/Group'; +export type {GroupsMember} from './models/GroupsMember'; +export type {GroupsMembersResponse} from './models/GroupsMembersResponse'; +export type {GroupsResponse} from './models/GroupsResponse'; +export type {Image} from './models/Image'; +export {InputField} from './models/InputField'; +export type {JsonErrorResponse} from './models/JsonErrorResponse'; +export {Measurement} from './models/Measurement'; +export type {MeasurementItem} from './models/MeasurementItem'; +export {MeasurementSet} from './models/MeasurementSet'; +export type {MeasurementUpdate} from './models/MeasurementUpdate'; +export type {MessagesMessage} from './models/MessagesMessage'; +export type {MessagesMessagesResponse} from './models/MessagesMessagesResponse'; +export type {MessagesNotice} from './models/MessagesNotice'; +export type {MessagesNoticesResponse} from './models/MessagesNoticesResponse'; +export type {MessagesRecipient} from './models/MessagesRecipient'; +export type {MessagesRecipientsResponse} from './models/MessagesRecipientsResponse'; +export type {Notification} from './models/Notification'; +export type {NotificationsResponse} from './models/NotificationsResponse'; +export type {Pair} from './models/Pair'; +export type {ParticipantInstruction} from './models/ParticipantInstruction'; +export type {PostMeasurementsDataResponse} from './models/PostMeasurementsDataResponse'; +export type {PostMeasurementsResponse} from './models/PostMeasurementsResponse'; +export type {PostStudyCreateResponse} from './models/PostStudyCreateResponse'; +export type {PostStudyPublishResponse} from './models/PostStudyPublishResponse'; +export type {PostTrackingRemindersDataResponse} from './models/PostTrackingRemindersDataResponse'; +export type {PostTrackingRemindersResponse} from './models/PostTrackingRemindersResponse'; +export type {PostUserSettingsDataResponse} from './models/PostUserSettingsDataResponse'; +export type {PostUserSettingsResponse} from './models/PostUserSettingsResponse'; +export type {ShareInvitationBody} from './models/ShareInvitationBody'; +export type {Study} from './models/Study'; +export type {StudyCharts} from './models/StudyCharts'; +export {StudyCreationBody} from './models/StudyCreationBody'; +export type {StudyHtml} from './models/StudyHtml'; +export type {StudyImages} from './models/StudyImages'; +export type {StudyJoinResponse} from './models/StudyJoinResponse'; +export type {StudyLinks} from './models/StudyLinks'; +export type {StudySharing} from './models/StudySharing'; +export type {StudyText} from './models/StudyText'; +export type {StudyVotes} from './models/StudyVotes'; +export {TrackingReminder} from './models/TrackingReminder'; +export {TrackingReminderNotification} from './models/TrackingReminderNotification'; +export type {TrackingReminderNotificationAction} from './models/TrackingReminderNotificationAction'; +export {TrackingReminderNotificationPost} from './models/TrackingReminderNotificationPost'; +export type {TrackingReminderNotificationTrackAllAction} from './models/TrackingReminderNotificationTrackAllAction'; +export {Unit} from './models/Unit'; +export type {UnitCategory} from './models/UnitCategory'; +export type {User} from './models/User'; +export type {UsersResponse} from './models/UsersResponse'; +export type {UserTag} from './models/UserTag'; +export type {UserVariableDelete} from './models/UserVariableDelete'; +export {Variable} from './models/Variable'; +export {VariableCategory} from './models/VariableCategory'; +export type {VariableCharts} from './models/VariableCharts'; +export {Vote} from './models/Vote'; + +export {ActivitiesService} from './services/ActivitiesService'; +export {AnalyticsService} from './services/AnalyticsService'; +export {AppSettingsService} from './services/AppSettingsService'; +export {AuthenticationService} from './services/AuthenticationService'; +export {ConnectorsService} from './services/ConnectorsService'; +export {FeedService} from './services/FeedService'; +export {FriendsService} from './services/FriendsService'; +export {GroupsService} from './services/GroupsService'; +export {MeasurementsService} from './services/MeasurementsService'; +export {MessagesService} from './services/MessagesService'; +export {NotificationsService} from './services/NotificationsService'; +export {RemindersService} from './services/RemindersService'; +export {SharesService} from './services/SharesService'; +export {StudiesService} from './services/StudiesService'; +export {UnitsService} from './services/UnitsService'; +export {UserService} from './services/UserService'; +export {VariablesService} from './services/VariablesService'; diff --git a/src/api/models/ActivitiesResponse.js b/src/api/models/ActivitiesResponse.js new file mode 100644 index 0000000000..e48c14f037 --- /dev/null +++ b/src/api/models/ActivitiesResponse.js @@ -0,0 +1,6 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=ActivitiesResponse.js.map \ No newline at end of file diff --git a/src/api/models/ActivitiesResponse.js.map b/src/api/models/ActivitiesResponse.js.map new file mode 100644 index 0000000000..bf39c3a210 --- /dev/null +++ b/src/api/models/ActivitiesResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ActivitiesResponse.js","sourceRoot":"","sources":["ActivitiesResponse.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB"} \ No newline at end of file diff --git a/src/api/models/ActivitiesResponse.ts b/src/api/models/ActivitiesResponse.ts new file mode 100644 index 0000000000..e089cdda8e --- /dev/null +++ b/src/api/models/ActivitiesResponse.ts @@ -0,0 +1,54 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type {Activity} from './Activity'; +import type {Card} from './Card'; +import type {Error} from './Error'; +import type {Image} from './Image'; + +export type ActivitiesResponse = { + activities: Array; + /** + * Activity + */ + description?: string; + /** + * Activity + */ + summary?: string; + image?: Image; + /** + * Square icon png url + */ + avatar?: string; + /** + * Ex: ion-ios-person + */ + ionIcon?: string; + /** + * Embeddable list of study summaries with explanation at the top + */ + html?: string; + /** + * Array of error objects with message property + */ + errors?: Array; + /** + * ex. OK or ERROR + */ + status?: string; + /** + * true or false + */ + success?: boolean; + /** + * Response code such as 200 + */ + code?: number; + /** + * A super neat url you might want to share with your users! + */ + link?: string; + card?: Card; +} diff --git a/src/api/models/Activity.js b/src/api/models/Activity.js new file mode 100644 index 0000000000..0ee3fc2eff --- /dev/null +++ b/src/api/models/Activity.js @@ -0,0 +1,6 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=Activity.js.map \ No newline at end of file diff --git a/src/api/models/Activity.js.map b/src/api/models/Activity.js.map new file mode 100644 index 0000000000..c7b698e28e --- /dev/null +++ b/src/api/models/Activity.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Activity.js","sourceRoot":"","sources":["Activity.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB"} \ No newline at end of file diff --git a/src/api/models/Activity.ts b/src/api/models/Activity.ts new file mode 100644 index 0000000000..bb2d16a456 --- /dev/null +++ b/src/api/models/Activity.ts @@ -0,0 +1,66 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type Activity = { + /** + * What do you expect? + */ + id: number; + /** + * What do you expect? + */ + userId: number; + /** + * What do you expect? + */ + component: string; + /** + * What do you expect? + */ + type: string; + /** + * What do you expect? + */ + action: string; + /** + * What do you expect? + */ + content: string; + /** + * What do you expect? + */ + primaryLink: string; + /** + * What do you expect? + */ + itemId: number; + /** + * What do you expect? + */ + secondaryItemId: number; + /** + * What do you expect? + */ + dateRecorded: string; + /** + * What do you expect? + */ + hideSitewide: number; + /** + * What do you expect? + */ + mpttLeft: number; + /** + * What do you expect? + */ + mpttRight: number; + /** + * What do you expect? + */ + isSpam: number; + /** + * Additional activity key-value data + */ + metaDataArray?: Array; +} \ No newline at end of file diff --git a/src/api/models/AppSettings.js b/src/api/models/AppSettings.js new file mode 100644 index 0000000000..a2fd7443f5 --- /dev/null +++ b/src/api/models/AppSettings.js @@ -0,0 +1,6 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=AppSettings.js.map \ No newline at end of file diff --git a/src/api/models/AppSettings.js.map b/src/api/models/AppSettings.js.map new file mode 100644 index 0000000000..7db960ae37 --- /dev/null +++ b/src/api/models/AppSettings.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AppSettings.js","sourceRoot":"","sources":["AppSettings.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB"} \ No newline at end of file diff --git a/src/api/models/AppSettings.ts b/src/api/models/AppSettings.ts new file mode 100644 index 0000000000..1c23f416cb --- /dev/null +++ b/src/api/models/AppSettings.ts @@ -0,0 +1,88 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type {User} from './User'; + +export type AppSettings = { + /** + * What do you expect? + */ + additionalSettings?: any; + /** + * What do you expect? + */ + appDescription?: string; + /** + * What do you expect? + */ + appDesign?: any; + /** + * What do you expect? + */ + appDisplayName?: string; + /** + * What do you expect? + */ + appStatus?: any; + /** + * What do you expect? + */ + appType?: string; + /** + * What do you expect? + */ + buildEnabled?: string; + /** + * Get yours at https:://builder.quantimo.do + */ + clientId: string; + /** + * Get yours at https:://builder.quantimo.do + */ + clientSecret?: string; + /** + * What do you expect? + */ + collaborators?: Array; + /** + * What do you expect? + */ + createdAt?: string; + /** + * User id of the owner of the application + */ + userId?: number; + /** + * What do you expect? + */ + users?: Array; + /** + * What do you expect? + */ + redirectUri?: string; + /** + * What do you expect? + */ + companyName?: string; + /** + * What do you expect? + */ + homepageUrl?: string; + /** + * What do you expect? + */ + iconUrl?: string; + /** + * What do you expect? + */ + longDescription?: string; + /** + * What do you expect? + */ + splashScreen?: string; + /** + * What do you expect? + */ + textLogo?: string; +} diff --git a/src/api/models/AppSettingsResponse.js b/src/api/models/AppSettingsResponse.js new file mode 100644 index 0000000000..7ba32603e9 --- /dev/null +++ b/src/api/models/AppSettingsResponse.js @@ -0,0 +1,6 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=AppSettingsResponse.js.map \ No newline at end of file diff --git a/src/api/models/AppSettingsResponse.js.map b/src/api/models/AppSettingsResponse.js.map new file mode 100644 index 0000000000..f1b803edc3 --- /dev/null +++ b/src/api/models/AppSettingsResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AppSettingsResponse.js","sourceRoot":"","sources":["AppSettingsResponse.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB"} \ No newline at end of file diff --git a/src/api/models/AppSettingsResponse.ts b/src/api/models/AppSettingsResponse.ts new file mode 100644 index 0000000000..4d21a2d377 --- /dev/null +++ b/src/api/models/AppSettingsResponse.ts @@ -0,0 +1,40 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type {AppSettings} from './AppSettings'; +import type {Card} from './Card'; +import type {Error} from './Error'; + +export type AppSettingsResponse = { + appSettings?: AppSettings; + /** + * Can be used as body of help info popup + */ + description: string; + /** + * Can be used as title in help info popup + */ + summary: string; + /** + * Array of error objects with message property + */ + errors?: Array; + /** + * ex. OK or ERROR + */ + status?: string; + /** + * true or false + */ + success?: boolean; + /** + * Response code such as 200 + */ + code?: number; + /** + * A super neat url you might want to share with your users! + */ + link?: string; + card?: Card; +} diff --git a/src/api/models/AuthorizedClients.js b/src/api/models/AuthorizedClients.js new file mode 100644 index 0000000000..db3a5bd9a2 --- /dev/null +++ b/src/api/models/AuthorizedClients.js @@ -0,0 +1,6 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=AuthorizedClients.js.map \ No newline at end of file diff --git a/src/api/models/AuthorizedClients.js.map b/src/api/models/AuthorizedClients.js.map new file mode 100644 index 0000000000..4c20e0d8b4 --- /dev/null +++ b/src/api/models/AuthorizedClients.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AuthorizedClients.js","sourceRoot":"","sources":["AuthorizedClients.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB"} \ No newline at end of file diff --git a/src/api/models/AuthorizedClients.ts b/src/api/models/AuthorizedClients.ts new file mode 100644 index 0000000000..d07aaf9820 --- /dev/null +++ b/src/api/models/AuthorizedClients.ts @@ -0,0 +1,20 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type {AppSettings} from './AppSettings'; + +export type AuthorizedClients = { + /** + * Applications with access to user measurements for all variables + */ + apps: Array; + /** + * Individuals such as physicians or family members with access to user measurements for all variables + */ + individuals: Array; + /** + * Studies with access to generally anonymous user measurements for a specific predictor and outcome variable + */ + studies: Array; +} diff --git a/src/api/models/Button.js b/src/api/models/Button.js new file mode 100644 index 0000000000..241c7ee967 --- /dev/null +++ b/src/api/models/Button.js @@ -0,0 +1,6 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=Button.js.map \ No newline at end of file diff --git a/src/api/models/Button.js.map b/src/api/models/Button.js.map new file mode 100644 index 0000000000..9dcc452929 --- /dev/null +++ b/src/api/models/Button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.js","sourceRoot":"","sources":["Button.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB"} \ No newline at end of file diff --git a/src/api/models/Button.ts b/src/api/models/Button.ts new file mode 100644 index 0000000000..3bc24cae0a --- /dev/null +++ b/src/api/models/Button.ts @@ -0,0 +1,86 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type Button = { + /** + * Ex: connect + */ + accessibilityText?: string; + /** + * Action data + */ + action?: any; + /** + * Ex: connect + */ + additionalInformation?: string; + /** + * Ex: #f2f2f2 + */ + color?: string; + /** + * Text to show user before executing functionName + */ + confirmationText?: string; + /** + * Name of function to call + */ + functionName?: string; + /** + * Data to provide to functionName or be copied to the card parameters when button is clicked and card is posted to the API + */ + parameters?: any; + /** + * Ex: connect + */ + html?: string; + /** + * HTML element id + */ + id?: string; + /** + * Ex: https://image.jpg + */ + image?: string; + /** + * Ex: ion-refresh + */ + ionIcon?: string; + /** + * Ex: https://local.quantimo.do + */ + link: string; + /** + * State to go to + */ + stateName?: string; + /** + * Data to provide to the state + */ + stateParams?: any; + /** + * Text to show user after executing functionName + */ + successToastText?: string; + /** + * Text to show user after executing functionName + */ + successAlertTitle?: string; + /** + * Text to show user after executing functionName + */ + successAlertBody?: string; + /** + * Ex: Connect + */ + text: string; + /** + * Ex: This is a tooltip + */ + tooltip?: string; + /** + * Post here on button click + */ + webhookUrl?: string; +} \ No newline at end of file diff --git a/src/api/models/Card.js b/src/api/models/Card.js new file mode 100644 index 0000000000..079fbff081 --- /dev/null +++ b/src/api/models/Card.js @@ -0,0 +1,6 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=Card.js.map \ No newline at end of file diff --git a/src/api/models/Card.js.map b/src/api/models/Card.js.map new file mode 100644 index 0000000000..0b33b9006e --- /dev/null +++ b/src/api/models/Card.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Card.js","sourceRoot":"","sources":["Card.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB"} \ No newline at end of file diff --git a/src/api/models/Card.ts b/src/api/models/Card.ts new file mode 100644 index 0000000000..52880aab44 --- /dev/null +++ b/src/api/models/Card.ts @@ -0,0 +1,84 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type {Button} from './Button'; +import type {InputField} from './InputField'; + +export type Card = { + actionSheetButtons?: Array