From 0a97aef04bb405e5d3052c007d31598b6e61811e Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Mon, 8 Apr 2024 16:50:11 -0500 Subject: [PATCH] Added model types --- .../userVariable/user-variable-item.tsx | 2 +- .../userVariable/user-variable-list.tsx | 1 + apps/nextjs/types/models/AppSettings.ts | 178 ++ .../types/models/AppSettingsResponse.ts | 115 ++ apps/nextjs/types/models/AuthorizedClients.ts | 59 + apps/nextjs/types/models/Button.ts | 228 +++ apps/nextjs/types/models/Card.ts | 242 +++ apps/nextjs/types/models/Chart.ts | 88 + apps/nextjs/types/models/CommonResponse.ts | 107 ++ .../types/models/ConnectInstructions.ts | 58 + apps/nextjs/types/models/ConversionStep.ts | 51 + apps/nextjs/types/models/Correlation.ts | 1056 ++++++++++++ apps/nextjs/types/models/DataSource.ts | 392 +++++ apps/nextjs/types/models/DeviceToken.ts | 58 + apps/nextjs/types/models/ErrorResponse.ts | 38 + apps/nextjs/types/models/Explanation.ts | 84 + .../types/models/ExplanationStartTracking.ts | 56 + apps/nextjs/types/models/FeedResponse.ts | 114 ++ .../types/models/GetConnectorsResponse.ts | 115 ++ .../models/GetCorrelationsDataResponse.ts | 123 ++ apps/nextjs/types/models/GetSharesResponse.ts | 115 ++ .../nextjs/types/models/GetStudiesResponse.ts | 112 ++ ...etTrackingReminderNotificationsResponse.ts | 115 ++ .../GetUserVariableRelationshipsResponse.ts | 125 ++ .../types/models/HyperParameterCorrelation.ts | 1015 +++++++++++ apps/nextjs/types/models/Image.ts | 58 + apps/nextjs/types/models/InputField.ts | 211 +++ apps/nextjs/types/models/JsonErrorResponse.ts | 117 ++ apps/nextjs/types/models/Measurement.ts | 499 ++++++ apps/nextjs/types/models/MeasurementItem.ts | 122 ++ apps/nextjs/types/models/MeasurementUpdate.ts | 68 + apps/nextjs/types/models/ObjectSerializer.ts | 458 +++++ apps/nextjs/types/models/Pair.ts | 128 ++ .../types/models/ParticipantInstruction.ts | 48 + .../models/PostMeasurementsDataResponse.ts | 115 ++ .../types/models/PostMeasurementsResponse.ts | 125 ++ .../types/models/PostStudyCreateResponse.ts | 115 ++ .../types/models/PostStudyPublishResponse.ts | 107 ++ .../PostTrackingRemindersDataResponse.ts | 131 ++ .../models/PostTrackingRemindersResponse.ts | 125 ++ .../models/PostUserSettingsDataResponse.ts | 117 ++ .../types/models/PostUserSettingsResponse.ts | 125 ++ .../types/models/ShareInvitationBody.ts | 78 + apps/nextjs/types/models/Study.ts | 186 ++ apps/nextjs/types/models/StudyCharts.ts | 67 + apps/nextjs/types/models/StudyCreationBody.ts | 71 + apps/nextjs/types/models/StudyHtml.ts | 162 ++ apps/nextjs/types/models/StudyImages.ts | 128 ++ apps/nextjs/types/models/StudyJoinResponse.ts | 131 ++ apps/nextjs/types/models/StudyLinks.ts | 98 ++ apps/nextjs/types/models/StudySharing.ts | 58 + apps/nextjs/types/models/StudyText.ts | 268 +++ apps/nextjs/types/models/StudyVotes.ts | 48 + apps/nextjs/types/models/TagVariable.ts | 1365 +++++++++++++++ apps/nextjs/types/models/TrackingReminder.ts | 901 ++++++++++ .../models/TrackingReminderNotification.ts | 845 +++++++++ .../TrackingReminderNotificationAction.ts | 88 + .../TrackingReminderNotificationPost.ts | 61 + ...ckingReminderNotificationTrackAllAction.ts | 68 + apps/nextjs/types/models/Unit.ts | 180 ++ apps/nextjs/types/models/UnitCategory.ts | 58 + apps/nextjs/types/models/User.ts | 536 ++++++ apps/nextjs/types/models/UserPostBody.ts | 311 ++++ apps/nextjs/types/models/UserTag.ts | 58 + apps/nextjs/types/models/UserVariable.ts | 1522 +++++++++++++++++ .../nextjs/types/models/UserVariableDelete.ts | 38 + apps/nextjs/types/models/UsersResponse.ts | 153 ++ apps/nextjs/types/models/Variable.ts | 1512 ++++++++++++++++ apps/nextjs/types/models/VariableCategory.ts | 321 ++++ apps/nextjs/types/models/VariableCharts.ts | 74 + apps/nextjs/types/models/Vote.ts | 122 ++ apps/nextjs/types/models/all.ts | 68 + 72 files changed, 16891 insertions(+), 1 deletion(-) create mode 100644 apps/nextjs/types/models/AppSettings.ts create mode 100644 apps/nextjs/types/models/AppSettingsResponse.ts create mode 100644 apps/nextjs/types/models/AuthorizedClients.ts create mode 100644 apps/nextjs/types/models/Button.ts create mode 100644 apps/nextjs/types/models/Card.ts create mode 100644 apps/nextjs/types/models/Chart.ts create mode 100644 apps/nextjs/types/models/CommonResponse.ts create mode 100644 apps/nextjs/types/models/ConnectInstructions.ts create mode 100644 apps/nextjs/types/models/ConversionStep.ts create mode 100644 apps/nextjs/types/models/Correlation.ts create mode 100644 apps/nextjs/types/models/DataSource.ts create mode 100644 apps/nextjs/types/models/DeviceToken.ts create mode 100644 apps/nextjs/types/models/ErrorResponse.ts create mode 100644 apps/nextjs/types/models/Explanation.ts create mode 100644 apps/nextjs/types/models/ExplanationStartTracking.ts create mode 100644 apps/nextjs/types/models/FeedResponse.ts create mode 100644 apps/nextjs/types/models/GetConnectorsResponse.ts create mode 100644 apps/nextjs/types/models/GetCorrelationsDataResponse.ts create mode 100644 apps/nextjs/types/models/GetSharesResponse.ts create mode 100644 apps/nextjs/types/models/GetStudiesResponse.ts create mode 100644 apps/nextjs/types/models/GetTrackingReminderNotificationsResponse.ts create mode 100644 apps/nextjs/types/models/GetUserVariableRelationshipsResponse.ts create mode 100644 apps/nextjs/types/models/HyperParameterCorrelation.ts create mode 100644 apps/nextjs/types/models/Image.ts create mode 100644 apps/nextjs/types/models/InputField.ts create mode 100644 apps/nextjs/types/models/JsonErrorResponse.ts create mode 100644 apps/nextjs/types/models/Measurement.ts create mode 100644 apps/nextjs/types/models/MeasurementItem.ts create mode 100644 apps/nextjs/types/models/MeasurementUpdate.ts create mode 100644 apps/nextjs/types/models/ObjectSerializer.ts create mode 100644 apps/nextjs/types/models/Pair.ts create mode 100644 apps/nextjs/types/models/ParticipantInstruction.ts create mode 100644 apps/nextjs/types/models/PostMeasurementsDataResponse.ts create mode 100644 apps/nextjs/types/models/PostMeasurementsResponse.ts create mode 100644 apps/nextjs/types/models/PostStudyCreateResponse.ts create mode 100644 apps/nextjs/types/models/PostStudyPublishResponse.ts create mode 100644 apps/nextjs/types/models/PostTrackingRemindersDataResponse.ts create mode 100644 apps/nextjs/types/models/PostTrackingRemindersResponse.ts create mode 100644 apps/nextjs/types/models/PostUserSettingsDataResponse.ts create mode 100644 apps/nextjs/types/models/PostUserSettingsResponse.ts create mode 100644 apps/nextjs/types/models/ShareInvitationBody.ts create mode 100644 apps/nextjs/types/models/Study.ts create mode 100644 apps/nextjs/types/models/StudyCharts.ts create mode 100644 apps/nextjs/types/models/StudyCreationBody.ts create mode 100644 apps/nextjs/types/models/StudyHtml.ts create mode 100644 apps/nextjs/types/models/StudyImages.ts create mode 100644 apps/nextjs/types/models/StudyJoinResponse.ts create mode 100644 apps/nextjs/types/models/StudyLinks.ts create mode 100644 apps/nextjs/types/models/StudySharing.ts create mode 100644 apps/nextjs/types/models/StudyText.ts create mode 100644 apps/nextjs/types/models/StudyVotes.ts create mode 100644 apps/nextjs/types/models/TagVariable.ts create mode 100644 apps/nextjs/types/models/TrackingReminder.ts create mode 100644 apps/nextjs/types/models/TrackingReminderNotification.ts create mode 100644 apps/nextjs/types/models/TrackingReminderNotificationAction.ts create mode 100644 apps/nextjs/types/models/TrackingReminderNotificationPost.ts create mode 100644 apps/nextjs/types/models/TrackingReminderNotificationTrackAllAction.ts create mode 100644 apps/nextjs/types/models/Unit.ts create mode 100644 apps/nextjs/types/models/UnitCategory.ts create mode 100644 apps/nextjs/types/models/User.ts create mode 100644 apps/nextjs/types/models/UserPostBody.ts create mode 100644 apps/nextjs/types/models/UserTag.ts create mode 100644 apps/nextjs/types/models/UserVariable.ts create mode 100644 apps/nextjs/types/models/UserVariableDelete.ts create mode 100644 apps/nextjs/types/models/UsersResponse.ts create mode 100644 apps/nextjs/types/models/Variable.ts create mode 100644 apps/nextjs/types/models/VariableCategory.ts create mode 100644 apps/nextjs/types/models/VariableCharts.ts create mode 100644 apps/nextjs/types/models/Vote.ts create mode 100644 apps/nextjs/types/models/all.ts diff --git a/apps/nextjs/components/userVariable/user-variable-item.tsx b/apps/nextjs/components/userVariable/user-variable-item.tsx index 031302716..5bd296dc2 100644 --- a/apps/nextjs/components/userVariable/user-variable-item.tsx +++ b/apps/nextjs/components/userVariable/user-variable-item.tsx @@ -11,7 +11,7 @@ import { QuickMeasurementButton } from '@/components/userVariable/measurements/q interface UserVariableItemProps { userVariable: Pick< UserVariable, - "id" | "name" | "description" | "colorCode" | "createdAt" + "id" | "name" | "description" | "createdAt" > } diff --git a/apps/nextjs/components/userVariable/user-variable-list.tsx b/apps/nextjs/components/userVariable/user-variable-list.tsx index 4eece3934..dcaf314a5 100644 --- a/apps/nextjs/components/userVariable/user-variable-list.tsx +++ b/apps/nextjs/components/userVariable/user-variable-list.tsx @@ -5,6 +5,7 @@ import { Icons } from "@/components/icons" import { UserVariableAddButton } from "./user-variable-add-button" import { UserVariableItem } from "./user-variable-item" import { useEffect, useState } from "react"; +import { UserVariable } from "@/types/models/UserVariable"; export function UserVariableList() { diff --git a/apps/nextjs/types/models/AppSettings.ts b/apps/nextjs/types/models/AppSettings.ts new file mode 100644 index 000000000..7eaa94bdd --- /dev/null +++ b/apps/nextjs/types/models/AppSettings.ts @@ -0,0 +1,178 @@ +/** + * Decentralized FDA API + * A platform for quantifying the effects of every drug, supplement, food, and other factor on your health. + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { User } from '../models/User'; +import { HttpFile } from '../http/http'; + +export class AppSettings { + 'additionalSettings'?: any; + 'appDescription'?: string; + 'appDesign'?: any; + 'appDisplayName'?: string; + 'appStatus'?: any; + 'appType'?: string; + 'buildEnabled'?: string; + /** + * Get yours at https:://builder.quantimo.do + */ + 'clientId'?: string; + /** + * Get yours at https:://builder.quantimo.do + */ + 'clientSecret'?: string; + 'collaborators'?: Array; + 'createdAt'?: string; + /** + * User id of the owner of the application + */ + 'userId'?: number; + 'users'?: Array; + 'redirectUri'?: string; + 'companyName'?: string; + 'homepageUrl'?: string; + 'iconUrl'?: string; + 'longDescription'?: string; + 'splashScreen'?: string; + 'textLogo'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "additionalSettings", + "baseName": "additionalSettings", + "type": "any", + "format": "" + }, + { + "name": "appDescription", + "baseName": "appDescription", + "type": "string", + "format": "" + }, + { + "name": "appDesign", + "baseName": "appDesign", + "type": "any", + "format": "" + }, + { + "name": "appDisplayName", + "baseName": "appDisplayName", + "type": "string", + "format": "" + }, + { + "name": "appStatus", + "baseName": "appStatus", + "type": "any", + "format": "" + }, + { + "name": "appType", + "baseName": "appType", + "type": "string", + "format": "" + }, + { + "name": "buildEnabled", + "baseName": "buildEnabled", + "type": "string", + "format": "" + }, + { + "name": "clientId", + "baseName": "clientId", + "type": "string", + "format": "" + }, + { + "name": "clientSecret", + "baseName": "clientSecret", + "type": "string", + "format": "" + }, + { + "name": "collaborators", + "baseName": "collaborators", + "type": "Array", + "format": "" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string", + "format": "" + }, + { + "name": "userId", + "baseName": "userId", + "type": "number", + "format": "int32" + }, + { + "name": "users", + "baseName": "users", + "type": "Array", + "format": "" + }, + { + "name": "redirectUri", + "baseName": "redirectUri", + "type": "string", + "format": "" + }, + { + "name": "companyName", + "baseName": "companyName", + "type": "string", + "format": "" + }, + { + "name": "homepageUrl", + "baseName": "homepageUrl", + "type": "string", + "format": "" + }, + { + "name": "iconUrl", + "baseName": "iconUrl", + "type": "string", + "format": "" + }, + { + "name": "longDescription", + "baseName": "longDescription", + "type": "string", + "format": "" + }, + { + "name": "splashScreen", + "baseName": "splashScreen", + "type": "string", + "format": "" + }, + { + "name": "textLogo", + "baseName": "textLogo", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AppSettings.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/apps/nextjs/types/models/AppSettingsResponse.ts b/apps/nextjs/types/models/AppSettingsResponse.ts new file mode 100644 index 000000000..9478a838b --- /dev/null +++ b/apps/nextjs/types/models/AppSettingsResponse.ts @@ -0,0 +1,115 @@ +/** + * Decentralized FDA API + * A platform for quantifying the effects of every drug, supplement, food, and other factor on your health. + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AppSettings } from '../models/AppSettings'; +import { Card } from '../models/Card'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { HttpFile } from '../http/http'; + +export class AppSettingsResponse { + 'appSettings'?: AppSettings; + /** + * Can be used as body of help info popup + */ + 'description': string; + /** + * Can be used as title in help info popup + */ + 'summary': string; + /** + * Array of error objects with message property + */ + 'errors'?: Array; + /** + * ex. OK or ERROR + */ + 'status'?: string; + /** + * true or false + */ + 'success'?: boolean; + /** + * Response code such as 200 + */ + 'code'?: number; + /** + * A super neat url you might want to share with your users! + */ + 'link'?: string; + 'card'?: Card; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "appSettings", + "baseName": "appSettings", + "type": "AppSettings", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "summary", + "baseName": "summary", + "type": "string", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "success", + "baseName": "success", + "type": "boolean", + "format": "" + }, + { + "name": "code", + "baseName": "code", + "type": "number", + "format": "" + }, + { + "name": "link", + "baseName": "link", + "type": "string", + "format": "" + }, + { + "name": "card", + "baseName": "card", + "type": "Card", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AppSettingsResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/apps/nextjs/types/models/AuthorizedClients.ts b/apps/nextjs/types/models/AuthorizedClients.ts new file mode 100644 index 000000000..eda070b92 --- /dev/null +++ b/apps/nextjs/types/models/AuthorizedClients.ts @@ -0,0 +1,59 @@ +/** + * Decentralized FDA API + * A platform for quantifying the effects of every drug, supplement, food, and other factor on your health. + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AppSettings } from '../models/AppSettings'; +import { HttpFile } from '../http/http'; + +export class AuthorizedClients { + /** + * Applications with access to user measurements for all variables + */ + 'apps': Array; + /** + * Individuals such as physicians or family members with access to user measurements for all variables + */ + 'individuals': Array; + /** + * Studies with access to generally anonymous user measurements for a specific predictor and outcome variable + */ + 'studies': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "apps", + "baseName": "apps", + "type": "Array", + "format": "" + }, + { + "name": "individuals", + "baseName": "individuals", + "type": "Array", + "format": "" + }, + { + "name": "studies", + "baseName": "studies", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AuthorizedClients.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/apps/nextjs/types/models/Button.ts b/apps/nextjs/types/models/Button.ts new file mode 100644 index 000000000..465043064 --- /dev/null +++ b/apps/nextjs/types/models/Button.ts @@ -0,0 +1,228 @@ +/** + * Decentralized FDA API + * A platform for quantifying the effects of every drug, supplement, food, and other factor on your health. + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class Button { + /** + * Ex: connect + */ + 'accessibilityText'?: string; + /** + * Action data + */ + 'action'?: any; + /** + * Ex: connect + */ + 'additionalInformation'?: string; + /** + * Ex: #f2f2f2 + */ + 'color'?: string; + /** + * Text to show user before executing functionName + */ + 'confirmationText'?: string; + /** + * Name of function to call + */ + 'functionName'?: string; + /** + * Data to provide to functionName or be copied to the card parameters when button is clicked and card is posted to the API + */ + 'parameters'?: any; + /** + * Ex: connect + */ + 'html'?: string; + /** + * HTML element id + */ + 'id'?: string; + /** + * Ex: https://image.jpg + */ + 'image'?: string; + /** + * Ex: ion-refresh + */ + 'ionIcon'?: string; + /** + * Ex: https://local.quantimo.do + */ + 'link': string; + /** + * State to go to + */ + 'stateName'?: string; + /** + * Data to provide to the state + */ + 'stateParams'?: any; + /** + * Text to show user after executing functionName + */ + 'successToastText'?: string; + /** + * Text to show user after executing functionName + */ + 'successAlertTitle'?: string; + /** + * Text to show user after executing functionName + */ + 'successAlertBody'?: string; + /** + * Ex: Connect + */ + 'text': string; + /** + * Ex: This is a tooltip + */ + 'tooltip'?: string; + /** + * Post here on button click + */ + 'webhookUrl'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accessibilityText", + "baseName": "accessibilityText", + "type": "string", + "format": "" + }, + { + "name": "action", + "baseName": "action", + "type": "any", + "format": "" + }, + { + "name": "additionalInformation", + "baseName": "additionalInformation", + "type": "string", + "format": "" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + }, + { + "name": "confirmationText", + "baseName": "confirmationText", + "type": "string", + "format": "" + }, + { + "name": "functionName", + "baseName": "functionName", + "type": "string", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "any", + "format": "" + }, + { + "name": "html", + "baseName": "html", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "image", + "baseName": "image", + "type": "string", + "format": "" + }, + { + "name": "ionIcon", + "baseName": "ionIcon", + "type": "string", + "format": "" + }, + { + "name": "link", + "baseName": "link", + "type": "string", + "format": "" + }, + { + "name": "stateName", + "baseName": "stateName", + "type": "string", + "format": "" + }, + { + "name": "stateParams", + "baseName": "stateParams", + "type": "any", + "format": "" + }, + { + "name": "successToastText", + "baseName": "successToastText", + "type": "string", + "format": "" + }, + { + "name": "successAlertTitle", + "baseName": "successAlertTitle", + "type": "string", + "format": "" + }, + { + "name": "successAlertBody", + "baseName": "successAlertBody", + "type": "string", + "format": "" + }, + { + "name": "text", + "baseName": "text", + "type": "string", + "format": "" + }, + { + "name": "tooltip", + "baseName": "tooltip", + "type": "string", + "format": "" + }, + { + "name": "webhookUrl", + "baseName": "webhookUrl", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Button.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/apps/nextjs/types/models/Card.ts b/apps/nextjs/types/models/Card.ts new file mode 100644 index 000000000..aaf395f27 --- /dev/null +++ b/apps/nextjs/types/models/Card.ts @@ -0,0 +1,242 @@ +/** + * Decentralized FDA API + * A platform for quantifying the effects of every drug, supplement, food, and other factor on your health. + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Button } from '../models/Button'; +import { InputField } from '../models/InputField'; +import { HttpFile } from '../http/http'; + +export class Card { + 'actionSheetButtons'?: Array