90dc-core 1.12.24 → 1.12.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import { Model } from "sequelize-typescript";
|
|
2
2
|
import type { Optional } from "sequelize";
|
|
3
|
+
interface CoachSelectedMacros {
|
|
4
|
+
dailyCalories: number;
|
|
5
|
+
mealsPerDay: number;
|
|
6
|
+
mealOrder: string[];
|
|
7
|
+
dailyMacros: {
|
|
8
|
+
proteinPercent: number;
|
|
9
|
+
carbsPercent: number;
|
|
10
|
+
fatsPercent: number;
|
|
11
|
+
};
|
|
12
|
+
mealDistribution: {
|
|
13
|
+
[mealType: string]: {
|
|
14
|
+
caloriesPercent: number;
|
|
15
|
+
proteinPercent: number;
|
|
16
|
+
carbsPercent: number;
|
|
17
|
+
fatsPercent: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
3
21
|
interface UserDietPreferencesAttributes {
|
|
4
22
|
uuid: string;
|
|
5
23
|
userUuid: string;
|
|
@@ -9,6 +27,7 @@ interface UserDietPreferencesAttributes {
|
|
|
9
27
|
dislikedFoods: string[];
|
|
10
28
|
preferredCuisines: string[];
|
|
11
29
|
healthConditions: string[];
|
|
30
|
+
coachSelectedMacros?: CoachSelectedMacros | null;
|
|
12
31
|
createdAt?: Date;
|
|
13
32
|
updatedAt?: Date;
|
|
14
33
|
}
|
|
@@ -23,6 +42,7 @@ export declare class UserDietPreferences extends Model<UserDietPreferencesAttrib
|
|
|
23
42
|
dislikedFoods: string[];
|
|
24
43
|
preferredCuisines: string[];
|
|
25
44
|
healthConditions: string[];
|
|
45
|
+
coachSelectedMacros: CoachSelectedMacros | null;
|
|
26
46
|
}
|
|
27
|
-
export {};
|
|
47
|
+
export type { CoachSelectedMacros };
|
|
28
48
|
//# sourceMappingURL=UserDietPreferences.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserDietPreferences.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/UserDietPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EAMN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG1C,UAAU,6BAA6B;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,UAAU,qCACR,SAAQ,QAAQ,CAAC,6BAA6B,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,CAAC;CAAG;AAExF,qBAGa,mBAAoB,SAAQ,KAAK,CAC5C,6BAA6B,EAC7B,qCAAqC,CACtC;IAIS,IAAI,EAAE,MAAM,CAAC;IAIb,QAAQ,EAAE,MAAM,CAAC;IAIjB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAI7B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAI9B,SAAS,EAAE,MAAM,EAAE,CAAC;IAIpB,aAAa,EAAE,MAAM,EAAE,CAAC;IAIxB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAI5B,gBAAgB,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"UserDietPreferences.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/UserDietPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EAMN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,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E,MAAM,EAAE,CAAC;IAIpB,aAAa,EAAE,MAAM,EAAE,CAAC;IAIxB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAI5B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAG3B,mBAAmB,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACzD;AAED,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -63,6 +63,12 @@ _ts_decorate([
|
|
|
63
63
|
allowNull: false
|
|
64
64
|
})
|
|
65
65
|
], UserDietPreferences.prototype, "healthConditions", void 0);
|
|
66
|
+
_ts_decorate([
|
|
67
|
+
Column({
|
|
68
|
+
type: DataType.JSONB,
|
|
69
|
+
allowNull: true
|
|
70
|
+
})
|
|
71
|
+
], UserDietPreferences.prototype, "coachSelectedMacros", void 0);
|
|
66
72
|
UserDietPreferences = _ts_decorate([
|
|
67
73
|
Table({
|
|
68
74
|
timestamps: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/UserDietPreferences.ts"],"sourcesContent":["import {\n Table,\n Model,\n Column,\n DataType,\n Default,\n PrimaryKey,\n ForeignKey,\n} from \"sequelize-typescript\";\nimport type { Optional } from \"sequelize\";\nimport { PersistedUser } from \"../user/PersistedUser.js\";\n\ninterface UserDietPreferencesAttributes {\n uuid: string;\n userUuid: string;\n excludeIngredients: string[];\n dietaryRestrictions: string[];\n allergens: string[];\n dislikedFoods: string[];\n preferredCuisines: string[];\n healthConditions: string[];\n createdAt?: Date;\n updatedAt?: Date;\n}\n\ninterface UserDietPreferencesCreationAttributes\n extends Optional<UserDietPreferencesAttributes, \"uuid\" | \"createdAt\" | \"updatedAt\"> {}\n\n@Table({\n timestamps: true,\n})\nexport class UserDietPreferences extends Model<\n UserDietPreferencesAttributes,\n UserDietPreferencesCreationAttributes\n> {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @ForeignKey(() => PersistedUser)\n @Column({ type: DataType.UUID, allowNull: false, unique: true })\n declare userUuid: string;\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare excludeIngredients: string[];\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare dietaryRestrictions: string[];\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare allergens: string[];\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare dislikedFoods: string[];\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare preferredCuisines: string[];\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare healthConditions: string[];\n}\n"],"names":["Table","Model","Column","DataType","Default","PrimaryKey","ForeignKey","PersistedUser","UserDietPreferences","UUIDV4","UUID","type","allowNull","unique","ARRAY","STRING","timestamps"],"mappings":";;;;;;AAAA,SACEA,KAAK,EACLC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,UAAU,QACL,uBAAuB;AAE9B,SAASC,aAAa,QAAQ,2BAA2B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/UserDietPreferences.ts"],"sourcesContent":["import {\n Table,\n Model,\n Column,\n DataType,\n Default,\n PrimaryKey,\n ForeignKey,\n} from \"sequelize-typescript\";\nimport type { Optional } from \"sequelize\";\nimport { PersistedUser } from \"../user/PersistedUser.js\";\n\ninterface CoachSelectedMacros {\n dailyCalories: number;\n mealsPerDay: number;\n mealOrder: string[]; // Order of meals e.g. ['breakfast', 'snack', 'lunch', 'snack_2', 'dinner']\n dailyMacros: {\n proteinPercent: number;\n carbsPercent: number;\n fatsPercent: number;\n };\n mealDistribution: {\n [mealType: string]: {\n caloriesPercent: number;\n proteinPercent: number;\n carbsPercent: number;\n fatsPercent: number;\n };\n };\n}\n\ninterface UserDietPreferencesAttributes {\n uuid: string;\n userUuid: string;\n excludeIngredients: string[];\n dietaryRestrictions: string[];\n allergens: string[];\n dislikedFoods: string[];\n preferredCuisines: string[];\n healthConditions: string[];\n coachSelectedMacros?: CoachSelectedMacros | null;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\ninterface UserDietPreferencesCreationAttributes\n extends Optional<UserDietPreferencesAttributes, \"uuid\" | \"createdAt\" | \"updatedAt\"> {}\n\n@Table({\n timestamps: true,\n})\nexport class UserDietPreferences extends Model<\n UserDietPreferencesAttributes,\n UserDietPreferencesCreationAttributes\n> {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @ForeignKey(() => PersistedUser)\n @Column({ type: DataType.UUID, allowNull: false, unique: true })\n declare userUuid: string;\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare excludeIngredients: string[];\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare dietaryRestrictions: string[];\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare allergens: string[];\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare dislikedFoods: string[];\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare preferredCuisines: string[];\n\n @Default([])\n @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })\n declare healthConditions: string[];\n\n @Column({ type: DataType.JSONB, allowNull: true })\n declare coachSelectedMacros: CoachSelectedMacros | null;\n}\n\nexport type { CoachSelectedMacros };\n"],"names":["Table","Model","Column","DataType","Default","PrimaryKey","ForeignKey","PersistedUser","UserDietPreferences","UUIDV4","UUID","type","allowNull","unique","ARRAY","STRING","JSONB","timestamps"],"mappings":";;;;;;AAAA,SACEA,KAAK,EACLC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,UAAU,QACL,uBAAuB;AAE9B,SAASC,aAAa,QAAQ,2BAA2B;AAyCzD,OAAO,MAAMC,4BAA4BP;AAuCzC;;;qBAlCoBQ;oBACDC;;;mBAGCH;;QACRI,MAAMR,SAASO,IAAI;QAAEE,WAAW;QAAOC,QAAQ;;;;;;QAI/CF,MAAMR,SAASW,KAAK,CAACX,SAASY,MAAM;QAAGH,WAAW;;;;;;QAIlDD,MAAMR,SAASW,KAAK,CAACX,SAASY,MAAM;QAAGH,WAAW;;;;;;QAIlDD,MAAMR,SAASW,KAAK,CAACX,SAASY,MAAM;QAAGH,WAAW;;;;;;QAIlDD,MAAMR,SAASW,KAAK,CAACX,SAASY,MAAM;QAAGH,WAAW;;;;;;QAIlDD,MAAMR,SAASW,KAAK,CAACX,SAASY,MAAM;QAAGH,WAAW;;;;;;QAIlDD,MAAMR,SAASW,KAAK,CAACX,SAASY,MAAM;QAAGH,WAAW;;;;;QAGlDD,MAAMR,SAASa,KAAK;QAAEJ,WAAW;;;;;QAvC3CK,YAAY"}
|