diff --git a/apps/chat-widget/flowise.html b/apps/chat-widget/flowise.html new file mode 100644 index 000000000..b5b06c96a --- /dev/null +++ b/apps/chat-widget/flowise.html @@ -0,0 +1,117 @@ + + + + Chat Window Iframe Example + + + + +
+ + + + + diff --git a/apps/nextjs/components/userVariable/measurements/quick-measurement-button.tsx b/apps/nextjs/components/userVariable/measurements/quick-measurement-button.tsx index 1b2030478..3de63a9b8 100644 --- a/apps/nextjs/components/userVariable/measurements/quick-measurement-button.tsx +++ b/apps/nextjs/components/userVariable/measurements/quick-measurement-button.tsx @@ -6,16 +6,15 @@ import { useRouter } from "next/navigation" import { Button, ButtonProps } from "@/components/ui/button" import { toast } from "@/components/ui/use-toast" import { Icons } from "@/components/icons" -interface UserVariable { - unitAbbreviatedName: string; - combinationOperation: string; - variableCategoryName: string; - id: string; - lastValue: number; - unitName: string; -} +import { UserVariable } from "@/types/models/UserVariable"; + interface QuickMeasurementButtonProps extends ButtonProps { - userVariable: UserVariable; + userVariable: Pick< + UserVariable, + "id" | "name" | "description" | "createdAt" | "imageUrl" | + "combinationOperation" | "unitAbbreviatedName" | "variableCategoryName" | + "lastValue" | "unitName" + > } export function QuickMeasurementButton({ userVariable, ...props }: QuickMeasurementButtonProps) { diff --git a/apps/nextjs/components/userVariable/user-variable-item.tsx b/apps/nextjs/components/userVariable/user-variable-item.tsx index 5bd296dc2..c08cde431 100644 --- a/apps/nextjs/components/userVariable/user-variable-item.tsx +++ b/apps/nextjs/components/userVariable/user-variable-item.tsx @@ -1,20 +1,20 @@ "use client" import Link from "next/link" -import { UserVariable } from "@prisma/client" -import { formatDate } from "@/lib/utils" import { Skeleton } from "@/components/ui/skeleton" import { UserVariableOperations } from "@/components/userVariable/user-variable-operations" import { QuickMeasurementButton } from '@/components/userVariable/measurements/quick-measurement-button'; +import { UserVariable } from "@/types/models/UserVariable"; interface UserVariableItemProps { userVariable: Pick< UserVariable, - "id" | "name" | "description" | "createdAt" + "id" | "name" | "description" | "createdAt" | "imageUrl" | + "combinationOperation" | "unitAbbreviatedName" | "variableCategoryName" | + "lastValue" | "unitName" > } - export function UserVariableItem({ userVariable }: UserVariableItemProps) { return (
diff --git a/apps/nextjs/components/userVariable/user-variable-operations.tsx b/apps/nextjs/components/userVariable/user-variable-operations.tsx index 3d0703f6f..db59bb389 100644 --- a/apps/nextjs/components/userVariable/user-variable-operations.tsx +++ b/apps/nextjs/components/userVariable/user-variable-operations.tsx @@ -25,8 +25,9 @@ import { toast } from "@/components/ui/use-toast" import { Icons } from "@/components/icons" import { MeasurementsAddForm } from "./measurements/measurements-add-form" +import { UserVariable } from "@/types/models/UserVariable" -async function deleteUserVariable(userVariableId: string) { +async function deleteUserVariable(userVariableId: number) { const response = await fetch(`/api/userVariables/${userVariableId}`, { method: "DELETE", }) @@ -47,7 +48,12 @@ async function deleteUserVariable(userVariableId: string) { } interface UserVariableOperationsProps { - userVariable: Pick + userVariable: Pick< + UserVariable, + "id" | "name" | "description" | "createdAt" | "imageUrl" | + "combinationOperation" | "unitAbbreviatedName" | "variableCategoryName" | + "lastValue" | "unitName" + > children?: React.ReactNode } diff --git a/apps/nextjs/prisma/migrations/20240408205952_init/migration.sql b/apps/nextjs/prisma/migrations/20240408205952_init/migration.sql new file mode 100644 index 000000000..e4261def3 --- /dev/null +++ b/apps/nextjs/prisma/migrations/20240408205952_init/migration.sql @@ -0,0 +1,132 @@ +-- CreateTable +CREATE TABLE "accounts" ( + "id" TEXT NOT NULL, + "user_id" TEXT NOT NULL, + "type" TEXT NOT NULL, + "provider" TEXT NOT NULL, + "provider_account_id" TEXT NOT NULL, + "refresh_token" TEXT, + "access_token" TEXT, + "expires_at" INTEGER, + "token_type" TEXT, + "scope" TEXT, + "id_token" TEXT, + "session_state" TEXT, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "accounts_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "sessions" ( + "id" TEXT NOT NULL, + "session_token" TEXT NOT NULL, + "user_id" TEXT NOT NULL, + "expires" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "sessions_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "users" ( + "id" TEXT NOT NULL, + "fdai_user_id" INTEGER, + "fdai_access_token" TEXT, + "fdai_refresh_token" TEXT, + "fdai_expires_in" INTEGER, + "fdai_scope" TEXT, + "fdai_access_token_expires_at" TIMESTAMP(3), + "address" TEXT, + "banned" BOOLEAN, + "birthday" TIMESTAMP(3), + "city" TEXT, + "country_code" TEXT, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "deleted_at" TIMESTAMP(3), + "email" TEXT, + "email_verified" TIMESTAMP(3), + "email_validated" BOOLEAN NOT NULL DEFAULT false, + "first_name" TEXT, + "gdpr_consent" BOOLEAN NOT NULL DEFAULT false, + "gender" TEXT, + "image" TEXT, + "ip_address" VARCHAR(45), + "language" TEXT, + "last_name" TEXT, + "last_sign_in_at" BIGINT, + "name" TEXT, + "newsletter_subscribed" BOOLEAN NOT NULL DEFAULT false, + "phone_number" TEXT, + "postal_code" TEXT, + "referrer_user_id" TEXT, + "state_province" TEXT, + "updated_at" TIMESTAMP(3) NOT NULL, + "username" TEXT NOT NULL, + "web3_wallet" TEXT, + "unsafe_metadata" JSONB, + "public_metadata" JSONB, + "private_metadata" JSONB, + + CONSTRAINT "users_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "verification_tokens" ( + "identifier" TEXT NOT NULL, + "token" TEXT NOT NULL, + "expires" TIMESTAMP(3) NOT NULL +); + +-- CreateTable +CREATE TABLE "activities" ( + "id" TEXT NOT NULL, + "user_id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "description" TEXT, + "color_code" TEXT NOT NULL, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "activities_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "activity_log" ( + "id" TEXT NOT NULL, + "activity_id" TEXT NOT NULL, + "date" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "count" INTEGER NOT NULL DEFAULT 1, + + CONSTRAINT "activity_log_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "accounts_provider_provider_account_id_key" ON "accounts"("provider", "provider_account_id"); + +-- CreateIndex +CREATE UNIQUE INDEX "sessions_session_token_key" ON "sessions"("session_token"); + +-- CreateIndex +CREATE UNIQUE INDEX "users_email_key" ON "users"("email"); + +-- CreateIndex +CREATE UNIQUE INDEX "users_username_key" ON "users"("username"); + +-- CreateIndex +CREATE UNIQUE INDEX "verification_tokens_token_key" ON "verification_tokens"("token"); + +-- CreateIndex +CREATE UNIQUE INDEX "verification_tokens_identifier_token_key" ON "verification_tokens"("identifier", "token"); + +-- AddForeignKey +ALTER TABLE "accounts" ADD CONSTRAINT "accounts_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "activities" ADD CONSTRAINT "activities_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "activity_log" ADD CONSTRAINT "activity_log_activity_id_fkey" FOREIGN KEY ("activity_id") REFERENCES "activities"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/apps/nextjs/prisma/migrations/migration_lock.toml b/apps/nextjs/prisma/migrations/migration_lock.toml new file mode 100644 index 000000000..fbffa92c2 --- /dev/null +++ b/apps/nextjs/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/docs/api-reference/openapi-abridged.yml b/docs/api-reference/openapi-abridged.yml new file mode 100644 index 000000000..660d801b2 --- /dev/null +++ b/docs/api-reference/openapi-abridged.yml @@ -0,0 +1,7707 @@ +openapi: 3.0.1 +x-stoplight: + id: e2dd35f0e728f +info: + title: Decentralized FDA API + description: A platform for quantifying the effects of every drug, supplement, food, and other factor on your health. + 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: 0.0.1 +servers: + - url: 'https://safe.fdai.earth/api' + description: Production Server +tags: + - name: units + description: Available units for measurements + externalDocs: + description: See it in action + url: 'https://web.quantimo.do/#/app/measurement-search?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: 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: 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: 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: 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: 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/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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/includeChartsParam' + - $ref: '#/components/parameters/numberOfRawMeasurementsParam' + - $ref: '#/components/parameters/variableCategoryNameParam' + - 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%' + schema: + type: string + - $ref: '#/components/parameters/variableNameParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/sourceNameParam' + - $ref: '#/components/parameters/earliestMeasurementTimeParam' + - $ref: '#/components/parameters/latestMeasurementTimeParam' + - name: id + in: query + description: Common variable id + schema: + type: integer + - $ref: '#/components/parameters/lastSourceParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/includePublicParam' + - $ref: '#/components/parameters/manualTrackingParam' + - $ref: '#/components/parameters/clientIdParam' + - name: upc + in: query + description: UPC or other barcode scan result + schema: + type: string + - $ref: '#/components/parameters/effectOrCauseParam' + - $ref: '#/components/parameters/publicEffectOrCauseParam' + - $ref: '#/components/parameters/exactMatchParam' + - $ref: '#/components/parameters/variableCategoryIdParam' + - $ref: '#/components/parameters/includePrivateParam' + - $ref: '#/components/parameters/searchPhraseParam' + - $ref: '#/components/parameters/synonymsParam' + - $ref: '#/components/parameters/taggedVariableIdParam' + - $ref: '#/components/parameters/tagVariableIdParam' + - 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.' + 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.' + 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.' + 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.' + 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.' + schema: + type: integer + - name: commonOnly + in: query + description: Return only public and aggregated common variable data instead of user-specific variables + schema: + type: boolean + - name: userOnly + in: query + description: 'Return only user-specific variables and data, excluding common aggregated variable data' + schema: + type: boolean + - $ref: '#/components/parameters/includeTagsParam' + - $ref: '#/components/parameters/recalculate' + - $ref: '#/components/parameters/variableIdParam' + - $ref: '#/components/parameters/conciseParam' + - name: refresh + in: query + description: Regenerate charts instead of getting from the cache + 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: + - bearerAuth: [] + - OAuth2: + - basic + /v3/userVariables: + 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: getUserVariables + parameters: + - $ref: '#/components/parameters/includeChartsParam' + - $ref: '#/components/parameters/numberOfRawMeasurementsParam' + - $ref: '#/components/parameters/variableCategoryNameParam' + - 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%' + schema: + type: string + - $ref: '#/components/parameters/variableNameParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/sourceNameParam' + - $ref: '#/components/parameters/earliestMeasurementTimeParam' + - $ref: '#/components/parameters/latestMeasurementTimeParam' + - name: id + in: query + description: Common variable id + schema: + type: integer + - $ref: '#/components/parameters/lastSourceParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/includePublicParam' + - $ref: '#/components/parameters/manualTrackingParam' + - $ref: '#/components/parameters/clientIdParam' + - name: upc + in: query + description: UPC or other barcode scan result + schema: + type: string + - $ref: '#/components/parameters/effectOrCauseParam' + - $ref: '#/components/parameters/publicEffectOrCauseParam' + - $ref: '#/components/parameters/exactMatchParam' + - $ref: '#/components/parameters/variableCategoryIdParam' + - $ref: '#/components/parameters/includePrivateParam' + - $ref: '#/components/parameters/searchPhraseParam' + - $ref: '#/components/parameters/synonymsParam' + - $ref: '#/components/parameters/taggedVariableIdParam' + - $ref: '#/components/parameters/tagVariableIdParam' + - 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.' + 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.' + 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.' + 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.' + 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.' + schema: + type: integer + - name: commonOnly + in: query + description: Return only public and aggregated common variable data instead of user-specific variables + schema: + type: boolean + - name: userOnly + in: query + description: 'Return only user-specific variables and data, excluding common aggregated variable data' + schema: + type: boolean + - $ref: '#/components/parameters/includeTagsParam' + - $ref: '#/components/parameters/recalculate' + - $ref: '#/components/parameters/variableIdParam' + - $ref: '#/components/parameters/conciseParam' + - name: refresh + in: query + description: Regenerate charts instead of getting from the cache + 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: + - bearerAuth: [ ] + - 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: + - $ref: '#/components/parameters/includePrivateParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/includePublicParam' + - $ref: '#/components/parameters/searchPhraseParam' + - $ref: '#/components/parameters/exactMatchParam' + - $ref: '#/components/parameters/manualTrackingParam' + - $ref: '#/components/parameters/variableCategoryNameParam' + - $ref: '#/components/parameters/variableCategoryIdParam' + - $ref: '#/components/parameters/synonymsParam' + 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: + - bearerAuth: [ ] + - OAuth2: + - basic + /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: + - $ref: '#/components/parameters/variableNameParam' + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/variableCategoryNameParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/sourceNameParam' + - $ref: '#/components/parameters/connectorNameParam' + - $ref: '#/components/parameters/valueParam' + - $ref: '#/components/parameters/unitNameParam' + - $ref: '#/components/parameters/earliestMeasurementTimeParam' + - $ref: '#/components/parameters/latestMeasurementTimeParam' + - $ref: '#/components/parameters/createdAtParam' + - name: id + in: query + description: Measurement id + schema: + type: integer + - $ref: '#/components/parameters/groupingWidthParam' + - $ref: '#/components/parameters/groupingTimezoneParam' + - $ref: '#/components/parameters/doNotProcessParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/doNotConvertParam' + - $ref: '#/components/parameters/minMaxFilterParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Measurement' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - OAuth2: + - readmeasurements + /v3/measurements/post: + post: + tags: + - measurements + summary: Save measurements + description: 'Store measurements representing things like a food eaten, a mood rating, or a medication taken. If the variable for the measurements does not already exist in the database, it will be automatically created.' + operationId: postMeasurements + requestBody: + description: An array of measurement sets containing measurement items you want to insert. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MeasurementItem' + required: true + responses: + '201': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/PostMeasurementsResponse' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - 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 startAt, 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: + - bearerAuth: [] + - OAuth2: + - basic + x-codegen-request-body-name: body + /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: + - bearerAuth: [] + - OAuth2: + - writemeasurements + x-codegen-request-body-name: body + /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: + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/clientSecretParam' + 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/spreadsheetUpload: + post: + tags: + - measurements + summary: Upload a spreadsheet with measurements + description: 'Import from a spreadsheet containing a Variable Name, Value, Measurement Event Time, and Abbreviated Unit Name field. Here is an example spreadsheet with allowed column names, units and time format.' + operationId: measurementSpreadsheetUpload + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + responses: + '201': + description: successful operation + content: + application/json: + schema: + type: integer + security: + - bearerAuth: [] + - OAuth2: + - basic + /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 + responses: + '201': + description: successful operation + content: + application/json: + schema: + type: integer + security: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/connectorNamePathParam' + 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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/connectorNamePathParam' + 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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/connectorNamePathParam' + 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: + - bearerAuth: [] + - OAuth2: + - basic + /v3/correlations: + get: + tags: + - analytics + summary: Get user variable relationships + description: 'Get a list of user variable relationships that can be used to display top predictors of a given outcome like mood, for instance.' + operationId: getUserVariableRelationships + parameters: + - $ref: '#/components/parameters/causeVariableNameParam' + - $ref: '#/components/parameters/effectVariableNameParam' + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/correlationCoefficientParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/outcomesOfInterestParam' + - $ref: '#/components/parameters/clientIdParam' + - name: commonOnly + in: query + description: 'Return only public, anonymized and aggregated population data instead of user-specific variables' + schema: + type: boolean + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetUserVariableRelationshipsResponse' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/createdAtParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/clientIdParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/FeedResponse' + security: + - bearerAuth: [] + - OAuth2: + - basic + post: + tags: + - feed + summary: Post user interactions with feed + description: Post user actions on feed cards + operationId: postFeed + parameters: + - $ref: '#/components/parameters/clientIdParam' + 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: + - bearerAuth: [] + - 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: {} + /oauth/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 `/oauth/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 /oauth/access_token endpoint for the next steps. + operationId: getOauthAuthorizationCode + parameters: + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/clientSecretParam' + - $ref: '#/components/parameters/responseTypeParam' + - $ref: '#/components/parameters/scopeParam' + - $ref: '#/components/parameters/redirectUriParam' + - $ref: '#/components/parameters/stateParam' + responses: + '200': + description: Successful Operation + content: {} + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - OAuth2: + - basic + /oauth/token: + get: + tags: + - authentication + summary: Get a user access token + description: 'Client provides authorization token obtained from /oauth/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:/api.quantimo.do/oauth/authorize endpoint, you''ll receive an authorization code to request an access token. This time make a `POST` request to `/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 `/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](https://oauth.net/2/)' + operationId: getAccessToken + parameters: + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/clientSecretParam' + - $ref: '#/components/parameters/grantTypeParam' + - $ref: '#/components/parameters/codeParam' + - $ref: '#/components/parameters/responseTypeParam' + - $ref: '#/components/parameters/scopeParam' + - $ref: '#/components/parameters/redirectUriParam' + - $ref: '#/components/parameters/stateParam' + responses: + '200': + description: Successful Operation + content: {} + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/createdAtParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/appVersionParam' + - $ref: '#/components/parameters/log' + - $ref: '#/components/parameters/pwd' + responses: + '200': + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetSharesResponse' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - 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 + schema: + type: string + - name: reason + in: query + description: 'Ex: I hate you!' + schema: + type: string + responses: + '204': + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/User' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - OAuth2: + - writemeasurements + /v3/shares/invite: + post: + tags: + - shares + summary: Delete share + description: Invite someone to view your measurements + operationId: inviteShare + parameters: + - $ref: '#/components/parameters/clientIdParam' + 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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/causeVariableNameParam' + - $ref: '#/components/parameters/effectVariableNameParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/includeChartsParam' + - $ref: '#/components/parameters/recalculate' + - $ref: '#/components/parameters/studyClientIdParam' + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/correlationCoefficientParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/outcomesOfInterestParam' + - $ref: '#/components/parameters/principalInvestigatorUserIdParam' + - $ref: '#/components/parameters/openParam' + - $ref: '#/components/parameters/joinedParam' + - $ref: '#/components/parameters/createdParam' + - $ref: '#/components/parameters/aggregatedParam' + - $ref: '#/components/parameters/downVotedParam' + 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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/causeVariableNameParam' + - $ref: '#/components/parameters/effectVariableNameParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/includeChartsParam' + - $ref: '#/components/parameters/recalculate' + - $ref: '#/components/parameters/studyClientIdParam' + 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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/causeVariableNameParam' + - $ref: '#/components/parameters/effectVariableNameParam' + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/correlationCoefficientParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/outcomesOfInterestParam' + - $ref: '#/components/parameters/clientIdParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetStudiesResponse' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/causeVariableNameParam' + - $ref: '#/components/parameters/effectVariableNameParam' + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/clientIdParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetStudiesResponse' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/causeVariableNameParam' + - $ref: '#/components/parameters/effectVariableNameParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/includeChartsParam' + - $ref: '#/components/parameters/recalculate' + - $ref: '#/components/parameters/studyClientIdParam' + 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: + - bearerAuth: [] + - OAuth2: + - basic + /v3/study/join: + post: + tags: + - studies + summary: Join a Study + description: Anonymously share measurements for specified variables + operationId: joinStudy + parameters: + - $ref: '#/components/parameters/studyClientIdParam' + - $ref: '#/components/parameters/causeVariableNameParam' + - $ref: '#/components/parameters/effectVariableNameParam' + - $ref: '#/components/parameters/clientIdParam' + 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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/clientIdParam' + 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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/createdAtParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/variableCategoryNameParam' + - $ref: '#/components/parameters/reminderTimeParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/onlyPastParam' + - $ref: '#/components/parameters/includeDeletedParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/GetTrackingReminderNotificationsResponse' + security: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/clientIdParam' + 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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/variableCategoryNameParam' + - $ref: '#/components/parameters/createdAtParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/appVersionParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TrackingReminder' + security: + - bearerAuth: [] + - 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: + - bearerAuth: [] + - 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 + responses: + '204': + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - 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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/createdAtParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/appVersionParam' + - $ref: '#/components/parameters/clientUserIdParam' + - $ref: '#/components/parameters/log' + - $ref: '#/components/parameters/pwd' + - $ref: '#/components/parameters/includeAuthorizedClientsParam' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/User' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - OAuth2: + - basic + post: + tags: + - user + summary: Create or update user + description: "Include your your system's user id as the clientUserId to make sure you can identify the user in your system. If the user already exists, the user will be updated with the new information." + operationId: postUser + requestBody: + description: User info to update + content: + application/json: + schema: + $ref: '#/components/schemas/UserPostBody' + required: true + responses: + '201': + description: Successful operation + '401': + description: Not found + security: + - ClientIdHeader: [ ] + ClientSecretHeader: [ ] + - bearerAuth: [] + - OAuth2: + - basic + x-codegen-request-body-name: body + /v3/users: + get: + tags: + - user + summary: Get users who shared data + description: Returns users who have granted access to their data + operationId: getUsers + parameters: + - $ref: '#/components/parameters/createdAtParam' + - $ref: '#/components/parameters/updatedAtParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/sortParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/appVersionParam' + - $ref: '#/components/parameters/clientUserIdParam' + - $ref: '#/components/parameters/log' + - $ref: '#/components/parameters/pwd' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/UsersResponse' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/clientIdParam' + - name: reason + in: query + description: 'Ex: I hate you!' + required: true + schema: + type: string + responses: + '204': + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - OAuth2: + - writemeasurements + /v3/userSettings: + post: + tags: + - user + summary: Post UserSettings + description: Post UserSettings + operationId: postUserSettings + parameters: + - $ref: '#/components/parameters/clientIdParam' + 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 + 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: + - bearerAuth: [] + - 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: + - $ref: '#/components/parameters/taggedVariableIdParam' + - $ref: '#/components/parameters/tagVariableIdParam' + responses: + '204': + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - 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: + - bearerAuth: [] + - 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: + - bearerAuth: [] + - 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: + - bearerAuth: [] + - OAuth2: + - basic + /v3/votes: + post: + tags: + - studies + summary: Post or update vote + description: 'I am really good at finding user_variable_relationships 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 + 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: + - bearerAuth: [] + - OAuth2: + - basic + x-codegen-request-body-name: body + /v3/votes/delete: + delete: + tags: + - studies + summary: Delete vote + description: Delete previously posted vote + operationId: deleteVote + responses: + '204': + description: Successful Operation + content: + application/json: + schema: + $ref: '#/components/schemas/CommonResponse' + '401': + description: Not Authenticated + content: {} + security: + - bearerAuth: [] + - OAuth2: + - basic + x-codegen-request-body-name: body + /v4/study: + get: + tags: + - studies + summary: Get Study + description: Get Study + operationId: getStudy + parameters: + - $ref: '#/components/parameters/causeVariableNameParam' + - $ref: '#/components/parameters/effectVariableNameParam' + - $ref: '#/components/parameters/clientIdParam' + - $ref: '#/components/parameters/includeChartsParam' + - $ref: '#/components/parameters/recalculate' + - $ref: '#/components/parameters/studyClientIdParam' + 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: + - bearerAuth: [] + - OAuth2: + - basic +components: + schemas: + AppSettings: + type: object + properties: + additionalSettings: + type: object + properties: {} + appDescription: + type: string + appDesign: + type: object + properties: {} + appDisplayName: + type: string + appStatus: + type: object + properties: {} + appType: + type: string + buildEnabled: + type: string + 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 + items: + $ref: '#/components/schemas/User' + createdAt: + type: string + userId: + type: integer + description: User id of the owner of the application + format: int32 + users: + type: array + items: + $ref: '#/components/schemas/User' + redirectUri: + type: string + companyName: + type: string + homepageUrl: + type: string + iconUrl: + type: string + longDescription: + type: string + splashScreen: + type: string + textLogo: + type: string + AppSettingsResponse: + required: + - description + - summary + type: object + properties: + appSettings: + $ref: '#/components/schemas/AppSettings' + 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/ErrorResponse' + 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' + 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 a 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/ErrorResponse' + 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 + HyperParameterCorrelation: + 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: 'User Variable Relationship 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' + 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' + 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: 'User Variable Relationship 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: VariableRelationships calculated with various duration of action hyper-parameters + items: + $ref: '#/components/schemas/HyperParameterCorrelation' + correlationsOverOnsetDelays: + type: array + description: VariableRelationships calculated with various onset delay hyper-parameters + items: + $ref: '#/components/schemas/HyperParameterCorrelation' + correlationsOverDurationsOfActionChartConfig: + type: object + properties: {} + description: Highchart config illustrating user_variable_relationships calculated with various duration of action hyper-parameters + correlationsOverOnsetDelaysChartConfig: + type: object + properties: {} + description: Highchart config illustrating user_variable_relationships 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 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: CureDAO' + 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://safe.fdai.earth/img/logos/curedao-logo-qm-rainbow-200-200.png' + imageHtml: + type: string + description: 'Ex: CureDAO' + 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: CureDAO' + longDescription: + type: string + description: 'Ex: CureDAO 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. CureDAO 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: curedao' + 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 + ErrorResponse: + 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 + helpText: + type: string + hint: + type: string + icon: + type: string + id: + type: string + description: HTML element id + image: + type: string + key: + type: string + labelLeft: + type: string + labelRight: + type: string + link: + type: string + maxLength: + type: integer + maxValue: + type: number + minLength: + type: integer + minValue: + type: number + options: + type: array + description: Selector list options + items: + type: string + placeholder: + type: string + description: 'Ex: Title' + postUrl: + type: string + required: + type: boolean + 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 https://html5pattern.com/ for examples' + value: + type: string + 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/ErrorResponse' + 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/ErrorResponse' + 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' + GetUserVariableRelationshipsResponse: + 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/ErrorResponse' + 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/ErrorResponse' + 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/ErrorResponse' + 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/ErrorResponse' + 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/ErrorResponse' + 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 + - startAt + - unitAbbreviatedName + - value + - variableName + type: object + properties: + card: + $ref: '#/components/schemas/Card' + clientId: + type: string + description: 'Ex: curedao' + 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://safe.fdai.earth/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' + startAt: + type: string + description: 'Start Time for the measurement event in UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + svgUrl: + type: string + description: 'Ex: https://safe.fdai.earth/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 the 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 the 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 Bedtime Tea' + MeasurementItem: + required: + - startAt + - value + - variableName + - unitAbbreviatedName + - variableCategoryName + - combinationOperation + type: object + properties: + startAt: + type: string + description: 'Start Time for the measurement event in UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + default: '2022-01-01T00:00:00' + value: + type: number + description: Measurement value + format: double + default: '3' + variableCategoryName: + type: string + description: 'Ex: Emotions, Treatments, Symptoms...' + default: 'Emotions' + 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 + default: 'Overall Mood' + description: Name of the variable for which we are creating the measurement records + unitAbbreviatedName: + type: string + description: Unit of measurement + default: '/5' + 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 + default: 'Mean' + sourceName: + type: string + description: Name of the application or device used to record the measurement values + upc: + type: string + description: UPC or other barcode scan result if you want to attach it to the variable name for recording measurements with a UPC scanner + note: + type: string + description: Optional note to include with the measurement + 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) + startAt: + type: string + description: 'Start Time for the measurement event in UTC ISO 8601 YYYY-MM-DDThh:mm:ss' + 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' + startAt: + 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 CureDAO to automatically import and analyze your data.' + instructionsForEffectVariable: + type: string + description: 'Ex: Obtain CureDAO and use it to record your Overall Mood. Once you have a CureDAO account, connect your CureDAO account at CureDAO 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/ErrorResponse' + 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/ErrorResponse' + 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/ErrorResponse' + 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/ErrorResponse' + 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/ErrorResponse' + 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/ErrorResponse' + 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/ErrorResponse' + 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/ErrorResponse' + 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 + studySummaryBoxHtml: + type: string + 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/curedao-docs/images/gauge-moderately-positive-relationship.png' + gaugeImageSquare: + type: string + description: 'Ex: https://s3.amazonaws.com/curedao-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/ErrorResponse' + 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%40curedao' + 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 CureDAO 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 User Variable Relationship 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 User Variable Relationship 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 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 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://safe.fdai.earth/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://safe.fdai.earth/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 the 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 the 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 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 the 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 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://safe.fdai.earth/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 startAt 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://safe.fdai.earth/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 startAt 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 the 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' + image: + type: string + description: 'Ex: https://static.quantimo.do/img/medical/png/pill.png' + 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 + 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: curedao' + 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' + UserPostBody: + type: object + description: The main thing you need here is the clientUserId that will be needed to fetch the user later. + properties: + clientUserId: + type: string + description: 'The user id from your system so you can match the user in our system to the user in your system.' + combineNotifications: + type: boolean + description: 'Whether to combine notifications for multiple variables into a single notification' + 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: 'Whether the user should get preview builds of their custom app' + hasAndroidApp: + type: boolean + description: 'Whether the user has the Android app installed' + hasChromeExtension: + type: boolean + description: 'Whether the user has the Chrome extension installed' + hasIosApp: + type: boolean + description: 'Whether the user has the iOS app installed' + lastActive: + type: string + description: 'Ex: Date the user last logged in' + lastName: + type: string + description: 'Ex: Sinn' + 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: +1-618-555-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: 'Whether the user should get push notifications' + sendPredictorEmails: + type: boolean + description: 'Whether the user should get weekly emails on the factors most predictive of their primary outcome to improve' + sendReminderNotificationEmails: + type: boolean + description: 'Whether the user should get emails when they have tracking reminders' + shareAllData: + type: boolean + description: 'Share all studies, charts, and measurement data with all other users' + smsNotificationsEnabled: + type: boolean + description: 'Whether the user should get SMS notifications' + timeZoneOffset: + type: integer + description: 'Minutes offset from UTC time' + trackLocation: + type: boolean + description: 'Whether the user wants to automatically track their location with measurements' + userUrl: + type: string + description: 'The URL the user wants to associate with their account' + 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/ErrorResponse' + 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. + TagVariable: + 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%2Fapi.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%252Fapi.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%252Fapi.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%252Fapi.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%2Fapi.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%252Fapi.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png%20%40curedao' + clientId: + type: string + description: 'Your 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' + 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 + informationalUrl: + type: string + description: 'Ex: https://google.com' + inputType: + type: string + description: Type of input field to show for recording measurements + ionIcon: + type: string + 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)' + numberOfGlobalVariableRelationshipsAsCause: + type: integer + description: 'Ex: 1' + numberOfGlobalVariableRelationshipsAsEffect: + type: integer + description: 'Ex: 310' + numberOfChanges: + type: integer + description: Number of changes + format: int32 + numberOfCorrelations: + type: integer + description: Number of user_variable_relationships for this variable + format: int32 + numberOfCorrelationsAsCause: + type: integer + description: numberOfGlobalVariableRelationshipsAsCause plus numberOfUserVariableRelationshipsAsCause + numberOfCorrelationsAsEffect: + type: integer + description: numberOfGlobalVariableRelationshipsAsEffect plus numberOfUserVariableRelationshipsAsEffect + 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' + numberOfUserVariableRelationshipsAsCause: + type: integer + description: 'Ex: 115' + numberOfUserVariableRelationshipsAsEffect: + 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? + pngPath: + type: string + description: 'Ex: img/variable_categories/treatments.png' + pngUrl: + type: string + description: 'Ex: https://safe.fdai.earth/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://safe.fdai.earth/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 + 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' + 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 the 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' + 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%2Fapi.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%252Fapi.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%252Fapi.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%252Fapi.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%2Fapi.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%252Fapi.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png%20%40curedao' + 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/TagVariable' + 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/TagVariable' + clientId: + type: string + description: 'Your 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/TagVariable' + commonTagVariables: + type: array + items: + $ref: '#/components/schemas/TagVariable' + 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 + 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/TagVariable' + 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/TagVariable' + 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/TagVariable' + 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/TagVariable' + inputType: + type: string + description: Type of input field to show for recording measurements + ionIcon: + type: string + 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/TagVariable' + 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/TagVariable' + 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)' + numberOfGlobalVariableRelationshipsAsCause: + type: integer + description: 'Ex: 1' + numberOfGlobalVariableRelationshipsAsEffect: + type: integer + description: 'Ex: 310' + numberOfChanges: + type: integer + description: Number of changes + format: int32 + numberOfCorrelations: + type: integer + description: Number of user_variable_relationships for this variable + format: int32 + numberOfCorrelationsAsCause: + type: integer + description: numberOfGlobalVariableRelationshipsAsCause plus numberOfUserVariableRelationshipsAsCause + numberOfCorrelationsAsEffect: + type: integer + description: numberOfGlobalVariableRelationshipsAsEffect plus numberOfUserVariableRelationshipsAsEffect + 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' + numberOfUserVariableRelationshipsAsCause: + type: integer + description: 'Ex: 115' + numberOfUserVariableRelationshipsAsEffect: + 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/TagVariable' + 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/TagVariable' + pngPath: + type: string + description: 'Ex: img/variable_categories/treatments.png' + pngUrl: + type: string + description: 'Ex: https://safe.fdai.earth/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://safe.fdai.earth/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/TagVariable' + userTagVariables: + type: array + items: + $ref: '#/components/schemas/TagVariable' + 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/TagVariable' + 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 the 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' + UserVariable: + 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%2Fapi.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%252Fapi.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%252Fapi.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%252Fapi.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%2Fapi.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%252Fapi.quantimo.do%252Fionic%252FModo%252Fwww%252Fimg%252Fvariable_categories%252Ftreatments.png%20%40curedao' + 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/TagVariable' + 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/TagVariable' + clientId: + type: string + description: 'Your 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/TagVariable' + commonTagVariables: + type: array + items: + $ref: '#/components/schemas/TagVariable' + 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 + 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/TagVariable' + 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/TagVariable' + 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/TagVariable' + 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/TagVariable' + inputType: + type: string + description: Type of input field to show for recording measurements + ionIcon: + type: string + 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/TagVariable' + 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/TagVariable' + 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)' + numberOfGlobalVariableRelationshipsAsCause: + type: integer + description: 'Ex: 1' + numberOfGlobalVariableRelationshipsAsEffect: + type: integer + description: 'Ex: 310' + numberOfChanges: + type: integer + description: Number of changes + format: int32 + numberOfCorrelations: + type: integer + description: Number of user_variable_relationships for this variable + format: int32 + numberOfCorrelationsAsCause: + type: integer + description: numberOfGlobalVariableRelationshipsAsCause plus numberOfUserVariableRelationshipsAsCause + numberOfCorrelationsAsEffect: + type: integer + description: numberOfGlobalVariableRelationshipsAsEffect plus numberOfUserVariableRelationshipsAsEffect + 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' + numberOfUserVariableRelationshipsAsCause: + type: integer + description: 'Ex: 115' + numberOfUserVariableRelationshipsAsEffect: + 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/TagVariable' + 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/TagVariable' + pngPath: + type: string + description: 'Ex: img/variable_categories/treatments.png' + pngUrl: + type: string + description: 'Ex: https://safe.fdai.earth/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://safe.fdai.earth/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/TagVariable' + userTagVariables: + type: array + items: + $ref: '#/components/schemas/TagVariable' + userVariableUnitAbbreviatedName: + type: string + description: 'Ex: count' + userVariableUnitCategoryId: + type: integer + description: 'Ex: 6' + userVariableUnitCategoryName: + type: string + description: 'Ex: Miscellany' + userVariableUnitId: + type: integer + description: 'Ex: 23' + userVariableId: + type: integer + description: 'Ex: 95614' + 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/TagVariable' + 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 the 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://safe.fdai.earth/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://safe.fdai.earth/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 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 client id can be obtained by creating an app at https://builder.quantimo.do' + enum: + - causality + - usefulness + parameters: + appVersionParam: + name: appVersion + in: query + description: 'Ex: 2.1.1.0' + schema: + type: string + causeVariableNameParam: + name: causeVariableName + in: query + description: 'Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration' + schema: + type: string + causeVariableIdParam: + name: causeVariableId + in: query + description: 'Variable id of the hypothetical predictor variable. Ex: 1398' + schema: + type: integer + clientIdParam: + name: clientId + in: query + description: 'Your client id can be obtained by creating an app at https://builder.quantimo.do' + 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).' + schema: + type: string + clientUserIdParam: + name: clientUserId + in: query + description: 'Ex: 74802' + schema: + type: integer + codeParam: + name: code + in: query + description: Authorization code you received with the previous request. + required: true + schema: + type: string + connectorNameParam: + name: connectorName + in: query + description: 'Ex: facebook' + 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 + 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 + schema: + type: string + createdParam: + name: created + in: query + description: These are studies that you have created + schema: + type: boolean + downVotedParam: + name: downvoted + in: query + description: These are studies that you have down-voted + 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.' + schema: + type: string + doNotConvertParam: + name: doNotConvert + in: query + description: 'Ex: 1' + schema: + type: boolean + doNotProcessParam: + name: doNotProcess + in: query + description: 'Ex: true' + schema: + type: boolean + 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.' + schema: + type: string + effectOrCauseParam: + name: effectOrCause + in: query + description: Provided variable is the effect or cause + schema: + type: string + effectVariableNameParam: + name: effectVariableName + in: query + description: 'Deprecated: Name of the outcome variable of interest. Ex: Overall Mood' + schema: + type: string + effectVariableIdParam: + name: effectVariableId + in: query + description: 'Variable id of the outcome variable of interest. Ex: 1398' + schema: + type: integer + exactMatchParam: + name: exactMatch + in: query + description: Require exact match + schema: + type: boolean + grantTypeParam: + name: grant_type + in: query + description: Grant Type can be 'authorization_code' or 'refresh_token' + required: true + schema: + type: string + groupingTimezoneParam: + name: groupingTimezone + in: query + description: The time (in seconds) over which measurements are grouped together + schema: + type: string + groupingWidthParam: + name: groupingWidth + in: query + description: The time (in seconds) over which measurements are grouped together + schema: + type: integer + includeAuthorizedClientsParam: + name: includeAuthorizedClients + in: query + description: 'Return list of apps, studies, and individuals with access to user data' + 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. + schema: + type: boolean + includeDeletedParam: + name: includeDeleted + in: query + description: Include deleted variables + schema: + type: boolean + includePrivateParam: + name: includePrivate + in: query + description: Include user-specific variables in results + schema: + type: boolean + includePublicParam: + name: includePublic + in: query + description: Include variables the user has no measurements for + schema: + type: boolean + includeTagsParam: + name: includeTags + in: query + description: 'Return parent, child, duplicate, and ingredient variables' + schema: + type: boolean + joinedParam: + name: joined + in: query + description: These are studies that you have joined + 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' + 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.' + 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.' + schema: + type: integer + default: 100 + log: + name: log + in: query + description: Username or email + schema: + type: string + manualTrackingParam: + name: manualTracking + in: query + description: Only include variables tracked manually by the user + schema: + type: boolean + minMaxFilterParam: + name: minMaxFilter + in: query + description: 'Ex: 1' + 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. + 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.' + schema: + minimum: 0 + type: integer + onlyPastParam: + name: onlyPast + in: query + description: 'Ex: 1' + schema: + type: boolean + openParam: + name: open + in: query + description: These are studies that anyone can join + schema: + type: boolean + outcomesOfInterestParam: + name: outcomesOfInterest + in: query + description: Only include user_variable_relationships for which the effect is an outcome of interest for the user + schema: + type: boolean + platform: + name: platform + in: query + description: 'Ex: chrome, android, ios, web' + schema: + type: string + enum: + - chrome + - android + - ios + - web + aggregatedParam: + name: aggregated + in: query + description: These are aggregated n=1 studies based on the entire population of users that have shared their data + schema: + type: boolean + principalInvestigatorUserIdParam: + name: principalInvestigatorUserId + in: query + description: These are studies created by a specific principal investigator + schema: + type: integer + publicEffectOrCauseParam: + name: publicEffectOrCause + in: query + description: 'Ex: ' + schema: + type: string + pwd: + name: pwd + in: query + description: User password + schema: + type: string + recalculate: + name: recalculate + in: query + description: Recalculate instead of using cached analysis + 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. + schema: + type: string + reminderTimeParam: + name: reminderTime + in: query + description: 'Ex: (lt)2017-07-31 21:43:26' + 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 + 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 + schema: + type: string + searchPhraseParam: + name: searchPhrase + in: query + description: 'Ex: %Body Fat%' + 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.' + schema: + type: string + sourceNameParam: + name: sourceName + in: query + description: ID of the source you want measurements for (supports exact name match only) + 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' + schema: + type: string + studyClientIdParam: + name: studyId + in: query + description: Client id for the study you want + schema: + type: string + synonymsParam: + name: synonyms + in: query + description: 'Ex: McDonalds hotcake' + 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). + 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). + schema: + type: integer + unitNameParam: + name: unitName + in: query + description: 'Ex: Milligrams' + 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.' + schema: + type: string + userIdParam: + name: userId + in: query + description: User's id + schema: + type: number + valueParam: + name: value + in: query + description: Value of measurement + schema: + type: string + variableCategoryIdParam: + name: variableCategoryId + in: query + description: 'Ex: 13' + schema: + type: integer + variableIdParam: + name: variableId + in: query + description: 'Ex: 13' + schema: + type: integer + variableCategoryNameParam: + name: variableCategoryName + in: query + description: 'Ex: Emotions, Treatments, Symptoms...' + 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 + 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. + 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: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: Enter your bearer token in the format `Bearer access_token_here` + client_id: + type: apiKey + name: clientId + in: query + OAuth2: + type: oauth2 + flows: + authorizationCode: + authorizationUrl: 'https://safe.fdai.earth/oauth/authorize' + tokenUrl: 'https://safe.fdai.earth/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 + ClientIdHeader: + type: apiKey + in: header + name: X-CLIENT-ID + description: Client ID for authentication from https://builder.fdai.earth + ClientSecretHeader: + type: apiKey + in: header + name: X-CLIENT-SECRET + description: Backend secret allowing you to store and retrieve data for your users. Obtain from https://builder.fdai.earth diff --git a/libs/chatflows/FDAi-API-Chatflow.json b/libs/chatflows/FDAi-API-Chatflow.json new file mode 100644 index 000000000..9924548c4 --- /dev/null +++ b/libs/chatflows/FDAi-API-Chatflow.json @@ -0,0 +1,1313 @@ +{ + "nodes": [ + { + "width": 300, + "height": 460, + "id": "getApiChain_0", + "position": { + "x": 1235.1408711478114, + "y": 306.6686384309706 + }, + "type": "customNode", + "data": { + "id": "getApiChain_0", + "label": "GET API Chain", + "version": 1, + "name": "getApiChain", + "type": "GETApiChain", + "baseClasses": [ + "GETApiChain", + "BaseChain", + "BaseLangChain" + ], + "category": "Chains", + "description": "Chain to run queries against GET API", + "inputParams": [ + { + "label": "API Documentation", + "name": "apiDocs", + "type": "string", + "description": "Description of how API works. Please refer to more examples", + "rows": 4, + "id": "getApiChain_0-input-apiDocs-string" + }, + { + "label": "Headers", + "name": "headers", + "type": "json", + "additionalParams": true, + "optional": true, + "id": "getApiChain_0-input-headers-json" + }, + { + "label": "URL Prompt", + "name": "urlPrompt", + "type": "string", + "description": "Prompt used to tell LLMs how to construct the URL. Must contains {api_docs} and {question}", + "default": "You are given the below API Documentation:\n{api_docs}\nUsing this documentation, generate the full API url to call for answering the user question.\nYou should build the API url in order to get a response that is as short as possible, while still getting the necessary information to answer the question. Pay attention to deliberately exclude any unnecessary pieces of data in the API call.\n\nQuestion:{question}\nAPI url:", + "rows": 4, + "additionalParams": true, + "id": "getApiChain_0-input-urlPrompt-string" + }, + { + "label": "Answer Prompt", + "name": "ansPrompt", + "type": "string", + "description": "Prompt used to tell LLMs how to return the API response. Must contains {api_response}, {api_url}, and {question}", + "default": "Given this {api_response} response for {api_url}. use the given response to answer this {question}", + "rows": 4, + "additionalParams": true, + "id": "getApiChain_0-input-ansPrompt-string" + } + ], + "inputAnchors": [ + { + "label": "Language Model", + "name": "model", + "type": "BaseLanguageModel", + "id": "getApiChain_0-input-model-BaseLanguageModel" + } + ], + "inputs": { + "model": "{{chatOpenAI_1.data.instance}}", + "apiDocs": "BASE URL: 'https://safe.fdai.earth/api'\n\nAPI Documentation\nThe API endpoint /v3/measurements accepts the following URL params\n- variableName: This can be anything like \"Overall Mood\", any treatment, or symptom. (optional)\n- variableCategoryName: Options are Emotions, Symptoms, Treatments, Sleep (optional)\n- sort: Use sort=-updatedAt by default so we get the most recent ones. \n\n\nIt returns a list of measurements. Measurements are any values that can be recorded, such as daily steps, a mood rating, or apples eaten.\n\n\nYou'll get back an array of measurement objects. When handling the response, focus mainly on the following properties:\nvalue\nunitName\nvariableName\nstartAt - when the measurement event occurred\n\n\n\n", + "headers": "{\"Authorization\":\"Bearer demo\"}", + "urlPrompt": "You are given the below API Documentation:\n{api_docs}\nUsing this documentation, generate the full API url to call for answering the user question.\nYou should build the API url in order to get a response that is as short as possible, while still getting the necessary information to answer the question. Pay attention to deliberately exclude any unnecessary pieces of data in the API call.\n\nQuestion:{question}\nAPI url:", + "ansPrompt": "Given this {api_response} response for {api_url}. use the given response to answer this {question}" + }, + "outputAnchors": [ + { + "id": "getApiChain_0-output-getApiChain-GETApiChain|BaseChain|BaseLangChain", + "name": "getApiChain", + "label": "GETApiChain", + "type": "GETApiChain | BaseChain | BaseLangChain" + } + ], + "outputs": {}, + "selected": false + }, + "selected": false, + "positionAbsolute": { + "x": 1235.1408711478114, + "y": 306.6686384309706 + }, + "dragging": false + }, + { + "width": 300, + "height": 603, + "id": "chainTool_0", + "position": { + "x": 1773.6414313022271, + "y": 329.6370409713994 + }, + "type": "customNode", + "data": { + "id": "chainTool_0", + "label": "Chain Tool", + "version": 1, + "name": "chainTool", + "type": "ChainTool", + "baseClasses": [ + "ChainTool", + "DynamicTool", + "Tool", + "StructuredTool", + "BaseLangChain" + ], + "category": "Tools", + "description": "Use a chain as allowed tool for agent", + "inputParams": [ + { + "label": "Chain Name", + "name": "name", + "type": "string", + "placeholder": "state-of-union-qa", + "id": "chainTool_0-input-name-string" + }, + { + "label": "Chain Description", + "name": "description", + "type": "string", + "rows": 3, + "placeholder": "State of the Union QA - useful for when you need to ask questions about the most recent state of the union address.", + "id": "chainTool_0-input-description-string" + }, + { + "label": "Return Direct", + "name": "returnDirect", + "type": "boolean", + "optional": true, + "id": "chainTool_0-input-returnDirect-boolean" + } + ], + "inputAnchors": [ + { + "label": "Base Chain", + "name": "baseChain", + "type": "BaseChain", + "id": "chainTool_0-input-baseChain-BaseChain" + } + ], + "inputs": { + "name": "measurements-qa", + "description": "useful for when you need to ask question about measurements. ", + "returnDirect": "", + "baseChain": "{{getApiChain_0.data.instance}}" + }, + "outputAnchors": [ + { + "id": "chainTool_0-output-chainTool-ChainTool|DynamicTool|Tool|StructuredTool|BaseLangChain", + "name": "chainTool", + "label": "ChainTool", + "type": "ChainTool | DynamicTool | Tool | StructuredTool | BaseLangChain" + } + ], + "outputs": {}, + "selected": false + }, + "selected": false, + "positionAbsolute": { + "x": 1773.6414313022271, + "y": 329.6370409713994 + }, + "dragging": false + }, + { + "width": 300, + "height": 378, + "id": "bufferMemory_0", + "position": { + "x": 1642.0644080121785, + "y": 1715.6131926891728 + }, + "type": "customNode", + "data": { + "id": "bufferMemory_0", + "label": "Buffer Memory", + "version": 1, + "name": "bufferMemory", + "type": "BufferMemory", + "baseClasses": [ + "BufferMemory", + "BaseChatMemory", + "BaseMemory" + ], + "category": "Memory", + "description": "Remembers previous conversational back and forths directly", + "inputParams": [ + { + "label": "Memory Key", + "name": "memoryKey", + "type": "string", + "default": "chat_history", + "id": "bufferMemory_0-input-memoryKey-string" + }, + { + "label": "Input Key", + "name": "inputKey", + "type": "string", + "default": "input", + "id": "bufferMemory_0-input-inputKey-string" + } + ], + "inputAnchors": [], + "inputs": { + "memoryKey": "chat_history", + "inputKey": "input" + }, + "outputAnchors": [ + { + "id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory", + "name": "bufferMemory", + "label": "BufferMemory", + "type": "BufferMemory | BaseChatMemory | BaseMemory" + } + ], + "outputs": {}, + "selected": false + }, + "selected": false, + "positionAbsolute": { + "x": 1642.0644080121785, + "y": 1715.6131926891728 + }, + "dragging": false + }, + { + "width": 300, + "height": 603, + "id": "chainTool_1", + "position": { + "x": 1284.7746596034926, + "y": 895.1444797047182 + }, + "type": "customNode", + "data": { + "id": "chainTool_1", + "label": "Chain Tool", + "version": 1, + "name": "chainTool", + "type": "ChainTool", + "baseClasses": [ + "ChainTool", + "DynamicTool", + "Tool", + "StructuredTool", + "BaseLangChain" + ], + "category": "Tools", + "description": "Use a chain as allowed tool for agent", + "inputParams": [ + { + "label": "Chain Name", + "name": "name", + "type": "string", + "placeholder": "state-of-union-qa", + "id": "chainTool_1-input-name-string" + }, + { + "label": "Chain Description", + "name": "description", + "type": "string", + "rows": 3, + "placeholder": "State of the Union QA - useful for when you need to ask questions about the most recent state of the union address.", + "id": "chainTool_1-input-description-string" + }, + { + "label": "Return Direct", + "name": "returnDirect", + "type": "boolean", + "optional": true, + "id": "chainTool_1-input-returnDirect-boolean" + } + ], + "inputAnchors": [ + { + "label": "Base Chain", + "name": "baseChain", + "type": "BaseChain", + "id": "chainTool_1-input-baseChain-BaseChain" + } + ], + "inputs": { + "name": "discord-bot", + "description": "useful for when you need to send message to Discord", + "returnDirect": "", + "baseChain": "{{postApiChain_0.data.instance}}" + }, + "outputAnchors": [ + { + "id": "chainTool_1-output-chainTool-ChainTool|DynamicTool|Tool|StructuredTool|BaseLangChain", + "name": "chainTool", + "label": "ChainTool", + "type": "ChainTool | DynamicTool | Tool | StructuredTool | BaseLangChain" + } + ], + "outputs": {}, + "selected": false + }, + "selected": false, + "positionAbsolute": { + "x": 1284.7746596034926, + "y": 895.1444797047182 + }, + "dragging": false + }, + { + "width": 300, + "height": 460, + "id": "postApiChain_0", + "position": { + "x": 948.0473922694291, + "y": 983.6861671985527 + }, + "type": "customNode", + "data": { + "id": "postApiChain_0", + "label": "POST API Chain", + "version": 1, + "name": "postApiChain", + "type": "POSTApiChain", + "baseClasses": [ + "POSTApiChain", + "BaseChain", + "BaseLangChain" + ], + "category": "Chains", + "description": "Chain to run queries against POST API", + "inputParams": [ + { + "label": "API Documentation", + "name": "apiDocs", + "type": "string", + "description": "Description of how API works. Please refer to more examples", + "rows": 4, + "id": "postApiChain_0-input-apiDocs-string" + }, + { + "label": "Headers", + "name": "headers", + "type": "json", + "additionalParams": true, + "optional": true, + "id": "postApiChain_0-input-headers-json" + }, + { + "label": "URL Prompt", + "name": "urlPrompt", + "type": "string", + "description": "Prompt used to tell LLMs how to construct the URL. Must contains {api_docs} and {question}", + "default": "You are given the below API Documentation:\n{api_docs}\nUsing this documentation, generate a json string with two keys: \"url\" and \"data\".\nThe value of \"url\" should be a string, which is the API url to call for answering the user question.\nThe value of \"data\" should be a dictionary of key-value pairs you want to POST to the url as a JSON body.\nBe careful to always use double quotes for strings in the json string.\nYou should build the json string in order to get a response that is as short as possible, while still getting the necessary information to answer the question. Pay attention to deliberately exclude any unnecessary pieces of data in the API call.\n\nQuestion:{question}\njson string:", + "rows": 4, + "additionalParams": true, + "id": "postApiChain_0-input-urlPrompt-string" + }, + { + "label": "Answer Prompt", + "name": "ansPrompt", + "type": "string", + "description": "Prompt used to tell LLMs how to return the API response. Must contains {api_response}, {api_url}, and {question}", + "default": "You are given the below API Documentation:\n{api_docs}\nUsing this documentation, generate a json string with two keys: \"url\" and \"data\".\nThe value of \"url\" should be a string, which is the API url to call for answering the user question.\nThe value of \"data\" should be a dictionary of key-value pairs you want to POST to the url as a JSON body.\nBe careful to always use double quotes for strings in the json string.\nYou should build the json string in order to get a response that is as short as possible, while still getting the necessary information to answer the question. Pay attention to deliberately exclude any unnecessary pieces of data in the API call.\n\nQuestion:{question}\njson string: {api_url_body}\n\nHere is the response from the API:\n\n{api_response}\n\nSummarize this response to answer the original question.\n\nSummary:", + "rows": 4, + "additionalParams": true, + "id": "postApiChain_0-input-ansPrompt-string" + } + ], + "inputAnchors": [ + { + "label": "Language Model", + "name": "model", + "type": "BaseLanguageModel", + "id": "postApiChain_0-input-model-BaseLanguageModel" + } + ], + "inputs": { + "model": "{{chatOpenAI_2.data.instance}}", + "apiDocs": "API documentation:\nEndpoint: https://eog776prcv6dg0j.m.pipedream.net\n\nThis API is for sending Discord message\n\nQuery body table:\nmessage | string | Message to send | required\n\nResponse schema (string):\nresult | string", + "headers": "", + "urlPrompt": "You are given the below API Documentation:\n{api_docs}\nUsing this documentation, generate a json string with two keys: \"url\" and \"data\".\nThe value of \"url\" should be a string, which is the API url to call for answering the user question.\nThe value of \"data\" should be a dictionary of key-value pairs you want to POST to the url as a JSON body.\nBe careful to always use double quotes for strings in the json string.\nYou should build the json string in order to get a response that is as short as possible, while still getting the necessary information to answer the question. Pay attention to deliberately exclude any unnecessary pieces of data in the API call.\n\nQuestion:{question}\njson string:", + "ansPrompt": "You are given the below API Documentation:\n{api_docs}\nUsing this documentation, generate a json string with two keys: \"url\" and \"data\".\nThe value of \"url\" should be a string, which is the API url to call for answering the user question.\nThe value of \"data\" should be a dictionary of key-value pairs you want to POST to the url as a JSON body.\nBe careful to always use double quotes for strings in the json string.\nYou should build the json string in order to get a response that is as short as possible, while still getting the necessary information to answer the question. Pay attention to deliberately exclude any unnecessary pieces of data in the API call.\n\nQuestion:{question}\njson string: {api_url_body}\n\nHere is the response from the API:\n\n{api_response}\n\nSummarize this response to answer the original question.\n\nSummary:" + }, + "outputAnchors": [ + { + "id": "postApiChain_0-output-postApiChain-POSTApiChain|BaseChain|BaseLangChain", + "name": "postApiChain", + "label": "POSTApiChain", + "type": "POSTApiChain | BaseChain | BaseLangChain" + } + ], + "outputs": {}, + "selected": false + }, + "selected": false, + "positionAbsolute": { + "x": 948.0473922694291, + "y": 983.6861671985527 + }, + "dragging": false + }, + { + "width": 300, + "height": 670, + "id": "chatOpenAI_2", + "position": { + "x": 397.46897627395833, + "y": 954.7103283664708 + }, + "type": "customNode", + "data": { + "id": "chatOpenAI_2", + "label": "ChatOpenAI", + "version": 5, + "name": "chatOpenAI", + "type": "ChatOpenAI", + "baseClasses": [ + "ChatOpenAI", + "BaseChatModel", + "BaseLanguageModel" + ], + "category": "Chat Models", + "description": "Wrapper around OpenAI large language models that use the Chat endpoint", + "inputParams": [ + { + "label": "Connect Credential", + "name": "credential", + "type": "credential", + "credentialNames": [ + "openAIApi" + ], + "id": "chatOpenAI_2-input-credential-credential" + }, + { + "label": "Model Name", + "name": "modelName", + "type": "options", + "options": [ + { + "label": "gpt-4", + "name": "gpt-4" + }, + { + "label": "gpt-4-turbo-preview", + "name": "gpt-4-turbo-preview" + }, + { + "label": "gpt-4-0125-preview", + "name": "gpt-4-0125-preview" + }, + { + "label": "gpt-4-1106-preview", + "name": "gpt-4-1106-preview" + }, + { + "label": "gpt-4-1106-vision-preview", + "name": "gpt-4-1106-vision-preview" + }, + { + "label": "gpt-4-vision-preview", + "name": "gpt-4-vision-preview" + }, + { + "label": "gpt-4-0613", + "name": "gpt-4-0613" + }, + { + "label": "gpt-4-32k", + "name": "gpt-4-32k" + }, + { + "label": "gpt-4-32k-0613", + "name": "gpt-4-32k-0613" + }, + { + "label": "gpt-3.5-turbo", + "name": "gpt-3.5-turbo" + }, + { + "label": "gpt-3.5-turbo-0125", + "name": "gpt-3.5-turbo-0125" + }, + { + "label": "gpt-3.5-turbo-1106", + "name": "gpt-3.5-turbo-1106" + }, + { + "label": "gpt-3.5-turbo-0613", + "name": "gpt-3.5-turbo-0613" + }, + { + "label": "gpt-3.5-turbo-16k", + "name": "gpt-3.5-turbo-16k" + }, + { + "label": "gpt-3.5-turbo-16k-0613", + "name": "gpt-3.5-turbo-16k-0613" + } + ], + "default": "gpt-3.5-turbo", + "optional": true, + "id": "chatOpenAI_2-input-modelName-options" + }, + { + "label": "Temperature", + "name": "temperature", + "type": "number", + "default": 0.9, + "optional": true, + "id": "chatOpenAI_2-input-temperature-number" + }, + { + "label": "Max Tokens", + "name": "maxTokens", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_2-input-maxTokens-number" + }, + { + "label": "Top Probability", + "name": "topP", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_2-input-topP-number" + }, + { + "label": "Frequency Penalty", + "name": "frequencyPenalty", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_2-input-frequencyPenalty-number" + }, + { + "label": "Presence Penalty", + "name": "presencePenalty", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_2-input-presencePenalty-number" + }, + { + "label": "Timeout", + "name": "timeout", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_2-input-timeout-number" + }, + { + "label": "BasePath", + "name": "basepath", + "type": "string", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_2-input-basepath-string" + }, + { + "label": "BaseOptions", + "name": "baseOptions", + "type": "json", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_2-input-baseOptions-json" + }, + { + "label": "Allow Image Uploads", + "name": "allowImageUploads", + "type": "boolean", + "description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent", + "default": false, + "optional": true, + "id": "chatOpenAI_2-input-allowImageUploads-boolean" + }, + { + "label": "Image Resolution", + "description": "This parameter controls the resolution in which the model views the image.", + "name": "imageResolution", + "type": "options", + "options": [ + { + "label": "Low", + "name": "low" + }, + { + "label": "High", + "name": "high" + }, + { + "label": "Auto", + "name": "auto" + } + ], + "default": "low", + "optional": false, + "additionalParams": true, + "id": "chatOpenAI_2-input-imageResolution-options" + } + ], + "inputAnchors": [ + { + "label": "Cache", + "name": "cache", + "type": "BaseCache", + "optional": true, + "id": "chatOpenAI_2-input-cache-BaseCache" + } + ], + "inputs": { + "modelName": "gpt-3.5-turbo", + "temperature": 0.9, + "maxTokens": "", + "topP": "", + "frequencyPenalty": "", + "presencePenalty": "", + "timeout": "", + "basepath": "", + "baseOptions": "", + "allowImageUploads": true, + "imageResolution": "low" + }, + "outputAnchors": [ + { + "id": "chatOpenAI_2-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel", + "name": "chatOpenAI", + "label": "ChatOpenAI", + "type": "ChatOpenAI | BaseChatModel | BaseLanguageModel" + } + ], + "outputs": {}, + "selected": false + }, + "selected": false, + "positionAbsolute": { + "x": 397.46897627395833, + "y": 954.7103283664708 + }, + "dragging": false + }, + { + "width": 300, + "height": 670, + "id": "chatOpenAI_1", + "position": { + "x": 828.7788305309582, + "y": 302.8996144964516 + }, + "type": "customNode", + "data": { + "id": "chatOpenAI_1", + "label": "ChatOpenAI", + "version": 5, + "name": "chatOpenAI", + "type": "ChatOpenAI", + "baseClasses": [ + "ChatOpenAI", + "BaseChatModel", + "BaseLanguageModel" + ], + "category": "Chat Models", + "description": "Wrapper around OpenAI large language models that use the Chat endpoint", + "inputParams": [ + { + "label": "Connect Credential", + "name": "credential", + "type": "credential", + "credentialNames": [ + "openAIApi" + ], + "id": "chatOpenAI_1-input-credential-credential" + }, + { + "label": "Model Name", + "name": "modelName", + "type": "options", + "options": [ + { + "label": "gpt-4", + "name": "gpt-4" + }, + { + "label": "gpt-4-turbo-preview", + "name": "gpt-4-turbo-preview" + }, + { + "label": "gpt-4-0125-preview", + "name": "gpt-4-0125-preview" + }, + { + "label": "gpt-4-1106-preview", + "name": "gpt-4-1106-preview" + }, + { + "label": "gpt-4-1106-vision-preview", + "name": "gpt-4-1106-vision-preview" + }, + { + "label": "gpt-4-vision-preview", + "name": "gpt-4-vision-preview" + }, + { + "label": "gpt-4-0613", + "name": "gpt-4-0613" + }, + { + "label": "gpt-4-32k", + "name": "gpt-4-32k" + }, + { + "label": "gpt-4-32k-0613", + "name": "gpt-4-32k-0613" + }, + { + "label": "gpt-3.5-turbo", + "name": "gpt-3.5-turbo" + }, + { + "label": "gpt-3.5-turbo-0125", + "name": "gpt-3.5-turbo-0125" + }, + { + "label": "gpt-3.5-turbo-1106", + "name": "gpt-3.5-turbo-1106" + }, + { + "label": "gpt-3.5-turbo-0613", + "name": "gpt-3.5-turbo-0613" + }, + { + "label": "gpt-3.5-turbo-16k", + "name": "gpt-3.5-turbo-16k" + }, + { + "label": "gpt-3.5-turbo-16k-0613", + "name": "gpt-3.5-turbo-16k-0613" + } + ], + "default": "gpt-3.5-turbo", + "optional": true, + "id": "chatOpenAI_1-input-modelName-options" + }, + { + "label": "Temperature", + "name": "temperature", + "type": "number", + "default": 0.9, + "optional": true, + "id": "chatOpenAI_1-input-temperature-number" + }, + { + "label": "Max Tokens", + "name": "maxTokens", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_1-input-maxTokens-number" + }, + { + "label": "Top Probability", + "name": "topP", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_1-input-topP-number" + }, + { + "label": "Frequency Penalty", + "name": "frequencyPenalty", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_1-input-frequencyPenalty-number" + }, + { + "label": "Presence Penalty", + "name": "presencePenalty", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_1-input-presencePenalty-number" + }, + { + "label": "Timeout", + "name": "timeout", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_1-input-timeout-number" + }, + { + "label": "BasePath", + "name": "basepath", + "type": "string", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_1-input-basepath-string" + }, + { + "label": "BaseOptions", + "name": "baseOptions", + "type": "json", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_1-input-baseOptions-json" + }, + { + "label": "Allow Image Uploads", + "name": "allowImageUploads", + "type": "boolean", + "description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent", + "default": false, + "optional": true, + "id": "chatOpenAI_1-input-allowImageUploads-boolean" + }, + { + "label": "Image Resolution", + "description": "This parameter controls the resolution in which the model views the image.", + "name": "imageResolution", + "type": "options", + "options": [ + { + "label": "Low", + "name": "low" + }, + { + "label": "High", + "name": "high" + }, + { + "label": "Auto", + "name": "auto" + } + ], + "default": "low", + "optional": false, + "additionalParams": true, + "id": "chatOpenAI_1-input-imageResolution-options" + } + ], + "inputAnchors": [ + { + "label": "Cache", + "name": "cache", + "type": "BaseCache", + "optional": true, + "id": "chatOpenAI_1-input-cache-BaseCache" + } + ], + "inputs": { + "modelName": "gpt-3.5-turbo", + "temperature": 0.9, + "maxTokens": "", + "topP": "", + "frequencyPenalty": "", + "presencePenalty": "", + "timeout": "", + "basepath": "", + "baseOptions": "", + "allowImageUploads": true, + "imageResolution": "low" + }, + "outputAnchors": [ + { + "id": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel", + "name": "chatOpenAI", + "label": "ChatOpenAI", + "type": "ChatOpenAI | BaseChatModel | BaseLanguageModel" + } + ], + "outputs": {}, + "selected": false + }, + "selected": false, + "positionAbsolute": { + "x": 828.7788305309582, + "y": 302.8996144964516 + }, + "dragging": false + }, + { + "width": 300, + "height": 670, + "id": "chatOpenAI_3", + "position": { + "x": 1148.338912314111, + "y": 1561.0888070167944 + }, + "type": "customNode", + "data": { + "id": "chatOpenAI_3", + "label": "ChatOpenAI", + "version": 5, + "name": "chatOpenAI", + "type": "ChatOpenAI", + "baseClasses": [ + "ChatOpenAI", + "BaseChatModel", + "BaseLanguageModel" + ], + "category": "Chat Models", + "description": "Wrapper around OpenAI large language models that use the Chat endpoint", + "inputParams": [ + { + "label": "Connect Credential", + "name": "credential", + "type": "credential", + "credentialNames": [ + "openAIApi" + ], + "id": "chatOpenAI_3-input-credential-credential" + }, + { + "label": "Model Name", + "name": "modelName", + "type": "options", + "options": [ + { + "label": "gpt-4", + "name": "gpt-4" + }, + { + "label": "gpt-4-turbo-preview", + "name": "gpt-4-turbo-preview" + }, + { + "label": "gpt-4-0125-preview", + "name": "gpt-4-0125-preview" + }, + { + "label": "gpt-4-1106-preview", + "name": "gpt-4-1106-preview" + }, + { + "label": "gpt-4-1106-vision-preview", + "name": "gpt-4-1106-vision-preview" + }, + { + "label": "gpt-4-vision-preview", + "name": "gpt-4-vision-preview" + }, + { + "label": "gpt-4-0613", + "name": "gpt-4-0613" + }, + { + "label": "gpt-4-32k", + "name": "gpt-4-32k" + }, + { + "label": "gpt-4-32k-0613", + "name": "gpt-4-32k-0613" + }, + { + "label": "gpt-3.5-turbo", + "name": "gpt-3.5-turbo" + }, + { + "label": "gpt-3.5-turbo-0125", + "name": "gpt-3.5-turbo-0125" + }, + { + "label": "gpt-3.5-turbo-1106", + "name": "gpt-3.5-turbo-1106" + }, + { + "label": "gpt-3.5-turbo-0613", + "name": "gpt-3.5-turbo-0613" + }, + { + "label": "gpt-3.5-turbo-16k", + "name": "gpt-3.5-turbo-16k" + }, + { + "label": "gpt-3.5-turbo-16k-0613", + "name": "gpt-3.5-turbo-16k-0613" + } + ], + "default": "gpt-3.5-turbo", + "optional": true, + "id": "chatOpenAI_3-input-modelName-options" + }, + { + "label": "Temperature", + "name": "temperature", + "type": "number", + "default": 0.9, + "optional": true, + "id": "chatOpenAI_3-input-temperature-number" + }, + { + "label": "Max Tokens", + "name": "maxTokens", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_3-input-maxTokens-number" + }, + { + "label": "Top Probability", + "name": "topP", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_3-input-topP-number" + }, + { + "label": "Frequency Penalty", + "name": "frequencyPenalty", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_3-input-frequencyPenalty-number" + }, + { + "label": "Presence Penalty", + "name": "presencePenalty", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_3-input-presencePenalty-number" + }, + { + "label": "Timeout", + "name": "timeout", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_3-input-timeout-number" + }, + { + "label": "BasePath", + "name": "basepath", + "type": "string", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_3-input-basepath-string" + }, + { + "label": "BaseOptions", + "name": "baseOptions", + "type": "json", + "optional": true, + "additionalParams": true, + "id": "chatOpenAI_3-input-baseOptions-json" + }, + { + "label": "Allow Image Uploads", + "name": "allowImageUploads", + "type": "boolean", + "description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent", + "default": false, + "optional": true, + "id": "chatOpenAI_3-input-allowImageUploads-boolean" + }, + { + "label": "Image Resolution", + "description": "This parameter controls the resolution in which the model views the image.", + "name": "imageResolution", + "type": "options", + "options": [ + { + "label": "Low", + "name": "low" + }, + { + "label": "High", + "name": "high" + }, + { + "label": "Auto", + "name": "auto" + } + ], + "default": "low", + "optional": false, + "additionalParams": true, + "id": "chatOpenAI_3-input-imageResolution-options" + } + ], + "inputAnchors": [ + { + "label": "Cache", + "name": "cache", + "type": "BaseCache", + "optional": true, + "id": "chatOpenAI_3-input-cache-BaseCache" + } + ], + "inputs": { + "modelName": "gpt-3.5-turbo-16k", + "temperature": 0.9, + "maxTokens": "", + "topP": "", + "frequencyPenalty": "", + "presencePenalty": "", + "timeout": "", + "basepath": "", + "baseOptions": "", + "allowImageUploads": true, + "imageResolution": "low" + }, + "outputAnchors": [ + { + "id": "chatOpenAI_3-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel", + "name": "chatOpenAI", + "label": "ChatOpenAI", + "type": "ChatOpenAI | BaseChatModel | BaseLanguageModel" + } + ], + "outputs": {}, + "selected": false + }, + "selected": false, + "positionAbsolute": { + "x": 1148.338912314111, + "y": 1561.0888070167944 + }, + "dragging": false + }, + { + "width": 300, + "height": 435, + "id": "conversationalAgent_0", + "position": { + "x": 2240.3800058044085, + "y": 831.7135530295203 + }, + "type": "customNode", + "data": { + "id": "conversationalAgent_0", + "label": "Conversational Agent", + "version": 3, + "name": "conversationalAgent", + "type": "AgentExecutor", + "baseClasses": [ + "AgentExecutor", + "BaseChain", + "Runnable" + ], + "category": "Agents", + "description": "Conversational agent for a chat model. It will utilize chat specific prompts", + "inputParams": [ + { + "label": "System Message", + "name": "systemMessage", + "type": "string", + "rows": 4, + "default": "Assistant is a large language model trained by OpenAI.\n\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.", + "optional": true, + "additionalParams": true, + "id": "conversationalAgent_0-input-systemMessage-string" + } + ], + "inputAnchors": [ + { + "label": "Allowed Tools", + "name": "tools", + "type": "Tool", + "list": true, + "id": "conversationalAgent_0-input-tools-Tool" + }, + { + "label": "Chat Model", + "name": "model", + "type": "BaseChatModel", + "id": "conversationalAgent_0-input-model-BaseChatModel" + }, + { + "label": "Memory", + "name": "memory", + "type": "BaseChatMemory", + "id": "conversationalAgent_0-input-memory-BaseChatMemory" + }, + { + "label": "Input Moderation", + "description": "Detect text that could generate harmful output and prevent it from being sent to the language model", + "name": "inputModeration", + "type": "Moderation", + "optional": true, + "list": true, + "id": "conversationalAgent_0-input-inputModeration-Moderation" + } + ], + "inputs": { + "inputModeration": "", + "tools": [ + "{{chainTool_0.data.instance}}", + "{{chainTool_1.data.instance}}" + ], + "model": "{{chatOpenAI_3.data.instance}}", + "memory": "{{bufferMemory_0.data.instance}}", + "systemMessage": "Assistant is a large language model trained by OpenAI.\n\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist." + }, + "outputAnchors": [ + { + "id": "conversationalAgent_0-output-conversationalAgent-AgentExecutor|BaseChain|Runnable", + "name": "conversationalAgent", + "label": "AgentExecutor", + "type": "AgentExecutor | BaseChain | Runnable" + } + ], + "outputs": {}, + "selected": false + }, + "selected": false, + "positionAbsolute": { + "x": 2240.3800058044085, + "y": 831.7135530295203 + }, + "dragging": false + } + ], + "edges": [ + { + "source": "getApiChain_0", + "sourceHandle": "getApiChain_0-output-getApiChain-GETApiChain|BaseChain|BaseLangChain", + "target": "chainTool_0", + "targetHandle": "chainTool_0-input-baseChain-BaseChain", + "type": "buttonedge", + "id": "getApiChain_0-getApiChain_0-output-getApiChain-GETApiChain|BaseChain|BaseLangChain-chainTool_0-chainTool_0-input-baseChain-BaseChain", + "data": { + "label": "" + } + }, + { + "source": "postApiChain_0", + "sourceHandle": "postApiChain_0-output-postApiChain-POSTApiChain|BaseChain|BaseLangChain", + "target": "chainTool_1", + "targetHandle": "chainTool_1-input-baseChain-BaseChain", + "type": "buttonedge", + "id": "postApiChain_0-postApiChain_0-output-postApiChain-POSTApiChain|BaseChain|BaseLangChain-chainTool_1-chainTool_1-input-baseChain-BaseChain", + "data": { + "label": "" + } + }, + { + "source": "chatOpenAI_2", + "sourceHandle": "chatOpenAI_2-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel", + "target": "postApiChain_0", + "targetHandle": "postApiChain_0-input-model-BaseLanguageModel", + "type": "buttonedge", + "id": "chatOpenAI_2-chatOpenAI_2-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel-postApiChain_0-postApiChain_0-input-model-BaseLanguageModel", + "data": { + "label": "" + } + }, + { + "source": "chatOpenAI_1", + "sourceHandle": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel", + "target": "getApiChain_0", + "targetHandle": "getApiChain_0-input-model-BaseLanguageModel", + "type": "buttonedge", + "id": "chatOpenAI_1-chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel-getApiChain_0-getApiChain_0-input-model-BaseLanguageModel", + "data": { + "label": "" + } + }, + { + "source": "chainTool_0", + "sourceHandle": "chainTool_0-output-chainTool-ChainTool|DynamicTool|Tool|StructuredTool|BaseLangChain", + "target": "conversationalAgent_0", + "targetHandle": "conversationalAgent_0-input-tools-Tool", + "type": "buttonedge", + "id": "chainTool_0-chainTool_0-output-chainTool-ChainTool|DynamicTool|Tool|StructuredTool|BaseLangChain-conversationalAgent_0-conversationalAgent_0-input-tools-Tool", + "data": { + "label": "" + } + }, + { + "source": "chainTool_1", + "sourceHandle": "chainTool_1-output-chainTool-ChainTool|DynamicTool|Tool|StructuredTool|BaseLangChain", + "target": "conversationalAgent_0", + "targetHandle": "conversationalAgent_0-input-tools-Tool", + "type": "buttonedge", + "id": "chainTool_1-chainTool_1-output-chainTool-ChainTool|DynamicTool|Tool|StructuredTool|BaseLangChain-conversationalAgent_0-conversationalAgent_0-input-tools-Tool", + "data": { + "label": "" + } + }, + { + "source": "chatOpenAI_3", + "sourceHandle": "chatOpenAI_3-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel", + "target": "conversationalAgent_0", + "targetHandle": "conversationalAgent_0-input-model-BaseChatModel", + "type": "buttonedge", + "id": "chatOpenAI_3-chatOpenAI_3-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel-conversationalAgent_0-conversationalAgent_0-input-model-BaseChatModel", + "data": { + "label": "" + } + }, + { + "source": "bufferMemory_0", + "sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory", + "target": "conversationalAgent_0", + "targetHandle": "conversationalAgent_0-input-memory-BaseChatMemory", + "type": "buttonedge", + "id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-conversationalAgent_0-conversationalAgent_0-input-memory-BaseChatMemory", + "data": { + "label": "" + } + } + ] +} \ No newline at end of file