From 043b47bde4cd754cfd0a351cb6779b5d742019db Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Mon, 18 Nov 2024 14:13:33 -0600 Subject: [PATCH] additional fields in the Unit and VariableCategory classes to support enhanced functionality. Took 48 seconds --- types/models/GlobalVariable.ts | 2 +- types/models/TagVariable.ts | 4 +- types/models/Unit.ts | 165 +++++++++++++++++++++--------- types/models/UserVariable.ts | 4 +- types/models/VariableCategory.ts | 169 +++++++++++++++++++++++++++++-- 5 files changed, 286 insertions(+), 58 deletions(-) diff --git a/types/models/GlobalVariable.ts b/types/models/GlobalVariable.ts index 8cb047c8..55baf7b0 100644 --- a/types/models/GlobalVariable.ts +++ b/types/models/GlobalVariable.ts @@ -1510,7 +1510,7 @@ export class GlobalVariable { } export type VariableCombinationOperationEnum = "MEAN" | "SUM" -export type VariableFillingTypeEnum = "none" | "zero-filling" | "value-filling" +export type VariableFillingTypeEnum = "none" | "zero" | "value" export type VariableVariableCategoryNameEnum = | "Activity" | "Books" diff --git a/types/models/TagVariable.ts b/types/models/TagVariable.ts index e5a97dfc..5bc2e683 100644 --- a/types/models/TagVariable.ts +++ b/types/models/TagVariable.ts @@ -1365,8 +1365,8 @@ export class TagVariable { export type TagVariableCombinationOperationEnum = "MEAN" | "SUM" export type TagVariableFillingTypeEnum = | "none" - | "zero-filling" - | "value-filling" + | "zero" + | "value" export type TagVariableVariableCategoryNameEnum = | "Activity" | "Books" diff --git a/types/models/Unit.ts b/types/models/Unit.ts index d9d45a2e..6ee3f98e 100644 --- a/types/models/Unit.ts +++ b/types/models/Unit.ts @@ -12,6 +12,7 @@ import { ConversionStep } from "../models/ConversionStep" import { UnitCategory } from "../models/UnitCategory" +import { VariableCombinationOperationEnum, VariableFillingTypeEnum } from "./GlobalVariable" export class Unit { /** @@ -23,54 +24,88 @@ export class Unit { */ "advanced"?: number /** - * Unit category + * Unit category name */ - "category": UnitCategoryEnum + "categoryName": string /** - * Ex: 6 + * Unit category ID */ - "categoryId"?: number + "unitCategoryId": number /** - * Ex: Miscellany + * How measurements should be combined */ - "categoryName"?: string + combinationOperation?: VariableCombinationOperationEnum | null /** * Conversion steps list */ "conversionSteps": Array /** - * Ex: 29 + * How missing values should be handled */ - "id"?: number + "fillingType": VariableFillingTypeEnum /** - * Ex: https://static.quantimo.do/img/medical/png/pill.png + * Value to use when filling missing data */ - "image"?: string + "fillingValue": number | null /** - * Ex: 0 + * Hint text for input */ - "manualTracking"?: number + "hint"?: string | null /** - * The maximum allowed value for measurements. While you can record a value above this maximum, it will be excluded from the correlation analysis. + * Unit ID */ - "maximumAllowedValue"?: number + "id": number /** - * Ex: 4 + * Icon image URL */ - "maximumValue": number + "image"?: string /** - * The minimum allowed value for measurements. While you can record a value below this minimum, it will be excluded from the correlation analysis. + * Whether unit can be tracked manually */ - "minimumAllowedValue"?: number + "manualTracking": number /** - * Ex: 0 + * Maximum allowed value */ - "minimumValue"?: number + "maximumValue": number | null + /** + * Minimum allowed value + */ + "minimumValue": number | null /** * Unit name */ "name": string - "unitCategory": UnitCategory + /** + * Measurement scale type + */ + "scale"?: "ratio" | "interval" | "ordinal" + /** + * Unit suffix + */ + "suffix"?: string | null + /** + * Alternative names for the unit + */ + "synonyms"?: string[] + /** + * Font Awesome icon name + */ + "fontAwesome"?: string | null + /** + * Input type for form fields + */ + "inputType"?: string | null + /** + * Maximum daily value allowed + */ + "maximumDailyValue"?: number | null + /** + * Default value + */ + "defaultValue"?: number | null + + "add"?: number | null + "multiply"?: number | null static readonly discriminator: string | undefined = undefined @@ -93,29 +128,41 @@ export class Unit { format: "", }, { - name: "category", - baseName: "category", - type: "UnitCategoryEnum", + name: "categoryName", + baseName: "categoryName", + type: "string", format: "", }, { - name: "categoryId", - baseName: "categoryId", + name: "unitCategoryId", + baseName: "unitCategoryId", type: "number", format: "", }, - { - name: "categoryName", - baseName: "categoryName", - type: "string", - format: "", - }, { name: "conversionSteps", baseName: "conversionSteps", type: "Array", format: "", }, + { + name: "fillingType", + baseName: "fillingType", + type: "VariableFillingTypeEnum", + format: "", + }, + { + name: "fillingValue", + baseName: "fillingValue", + type: "number", + format: "", + }, + { + name: "hint", + baseName: "hint", + type: "string", + format: "", + }, { name: "id", baseName: "id", @@ -134,24 +181,12 @@ export class Unit { type: "number", format: "", }, - { - name: "maximumAllowedValue", - baseName: "maximumAllowedValue", - type: "number", - format: "double", - }, { name: "maximumValue", baseName: "maximumValue", type: "number", format: "", }, - { - name: "minimumAllowedValue", - baseName: "minimumAllowedValue", - type: "number", - format: "double", - }, { name: "minimumValue", baseName: "minimumValue", @@ -165,9 +200,45 @@ export class Unit { format: "", }, { - name: "unitCategory", - baseName: "unitCategory", - type: "UnitCategory", + name: "scale", + baseName: "scale", + type: "string", + format: "", + }, + { + name: "suffix", + baseName: "suffix", + type: "string", + format: "", + }, + { + name: "synonyms", + baseName: "synonyms", + type: "Array", + format: "", + }, + { + name: "fontAwesome", + baseName: "fontAwesome", + type: "string", + format: "", + }, + { + name: "inputType", + baseName: "inputType", + type: "string", + format: "", + }, + { + name: "maximumDailyValue", + baseName: "maximumDailyValue", + type: "number", + format: "", + }, + { + name: "defaultValue", + baseName: "defaultValue", + type: "number", format: "", }, ] diff --git a/types/models/UserVariable.ts b/types/models/UserVariable.ts index 72de560a..f36228ed 100644 --- a/types/models/UserVariable.ts +++ b/types/models/UserVariable.ts @@ -1522,8 +1522,8 @@ export class UserVariable { export type UserVariableCombinationOperationEnum = "MEAN" | "SUM" export type UserVariableFillingTypeEnum = | "none" - | "zero-filling" - | "value-filling" + | "zero" + | "value" export type UserVariableVariableCategoryNameEnum = | "Activity" | "Books" diff --git a/types/models/VariableCategory.ts b/types/models/VariableCategory.ts index 32197750..733e639a 100644 --- a/types/models/VariableCategory.ts +++ b/types/models/VariableCategory.ts @@ -11,10 +11,16 @@ */ export class VariableCategory { + amazonProductCategory?: string|null /** * Ex: mood */ "appType"?: string + boring?: boolean|null + common?: boolean|null + defaultUnitAbbreviatedName?: string|null + defaultUnitId?: number|null + defaultValueLabel?: string|null /** * Ex: false */ @@ -27,6 +33,7 @@ export class VariableCategory { * UTC ISO 8601 YYYY-MM-DDThh:mm:ss */ "createdTime"?: string + effectOnly?: boolean|null /** * Ex: /5 */ @@ -42,7 +49,7 @@ export class VariableCategory { /** * Ex: -1. Unit: Variable category default unit. */ - "fillingValue"?: number + "fillingValue"?: number|null /** * Ex: What emotion do you want to rate? */ @@ -62,11 +69,11 @@ export class VariableCategory { /** * Ex: true */ - "manualTracking"?: boolean + "manualTracking"?: boolean|null /** * Unit: Variable category default unit. */ - "maximumAllowedValue"?: string + "maximumAllowedValue"?: number|null /** * Ex: rating */ @@ -74,7 +81,7 @@ export class VariableCategory { /** * Unit: Variable category default unit. */ - "minimumAllowedValue"?: string + "minimumAllowedValue"?: number|null /** * Ex: Do you have any emotions that fluctuate regularly? If so, add them so I can try to determine which factors are influencing them. */ @@ -90,7 +97,7 @@ export class VariableCategory { /** * Ex: true */ - "outcome"?: boolean + "outcome"?: boolean|null /** * Ex: img/variable_categories/emotions.png */ @@ -126,7 +133,30 @@ export class VariableCategory { /** * Ex: Emotion */ - "variableCategoryNameSingular"?: string + "variableCategoryNameSingular"?: string|null + fillingType?: string|null + fontAwesome?: string|null + minimumAllowedSecondsBetweenMeasurements?: number|null + predictor?: boolean|null + setupQuestion?: string|null + studyImageFileName?: string|null + public?: boolean|null + suffix?: string|null + synonyms?: string[] + valence?: string|null + averageSecondsBetweenMeasurements?: number|null + isPublic?: boolean|null + medianSecondsBetweenMeasurements?: number|null + nameSingular?: string|null + numberOfMeasurements?: number|null + numberOfOutcomeCaseStudies?: number|null + numberOfOutcomePopulationStudies?: number|null + numberOfPredictorCaseStudies?: number|null + numberOfPredictorPopulationStudies?: number|null + numberOfUserVariables?: number|null + numberOfVariables?: number|null + wpPostId?: number|null + defaultValuePlaceholderText?: string|null static readonly discriminator: string | undefined = undefined @@ -310,6 +340,132 @@ export class VariableCategory { type: "string", format: "", }, + { + name: "fillingType", + baseName: "fillingType", + type: "string", + format: "" + }, + { + name: "fontAwesome", + baseName: "fontAwesome", + type: "string", + format: "" + }, + { + name: "minimumAllowedSecondsBetweenMeasurements", + baseName: "minimumAllowedSecondsBetweenMeasurements", + type: "number", + format: "" + }, + { + name: "predictor", + baseName: "predictor", + type: "boolean", + format: "" + }, + { + name: "setupQuestion", + baseName: "setupQuestion", + type: "string", + format: "" + }, + { + name: "studyImageFileName", + baseName: "studyImageFileName", + type: "string", + format: "" + }, + { + name: "suffix", + baseName: "suffix", + type: "string", + format: "" + }, + { + name: "synonyms", + baseName: "synonyms", + type: "Array", + format: "" + }, + { + name: "valence", + baseName: "valence", + type: "string", + format: "" + }, + { + name: "averageSecondsBetweenMeasurements", + baseName: "averageSecondsBetweenMeasurements", + type: "number", + format: "" + }, + { + name: "isPublic", + baseName: "isPublic", + type: "boolean", + format: "" + }, + { + name: "medianSecondsBetweenMeasurements", + baseName: "medianSecondsBetweenMeasurements", + type: "number", + format: "" + }, + { + name: "nameSingular", + baseName: "nameSingular", + type: "string", + format: "" + }, + { + name: "numberOfMeasurements", + baseName: "numberOfMeasurements", + type: "number", + format: "" + }, + { + name: "numberOfOutcomeCaseStudies", + baseName: "numberOfOutcomeCaseStudies", + type: "number", + format: "" + }, + { + name: "numberOfOutcomePopulationStudies", + baseName: "numberOfOutcomePopulationStudies", + type: "number", + format: "" + }, + { + name: "numberOfPredictorCaseStudies", + baseName: "numberOfPredictorCaseStudies", + type: "number", + format: "" + }, + { + name: "numberOfPredictorPopulationStudies", + baseName: "numberOfPredictorPopulationStudies", + type: "number", + format: "" + }, + { + name: "numberOfUserVariables", + baseName: "numberOfUserVariables", + type: "number", + format: "" + }, + { + name: "numberOfVariables", + baseName: "numberOfVariables", + type: "number", + format: "" + }, + { + name: "wpPostId", + baseName: "wpPostId", + type: "number", + format: "" + } ] static getAttributeTypeMap() { @@ -325,6 +481,7 @@ export type VariableCategoryVariableCategoryNameEnum = | "Causes of Illness" | "Cognitive Performance" | "Conditions" + | "Electronics" | "Emotions" | "Environment" | "Foods"