90dc-core 1.16.22 → 1.16.24

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 +1 @@
1
- {"version":3,"file":"WeeklyCheckIn.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/coaching/WeeklyCheckIn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,EAAoD,MAAM,sBAAsB,CAAC;AAEtG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,mBAAmB,EAAE,IAAI,GAAG,IAAI,CAAC;IACjC,wBAAwB,EAAE,IAAI,GAAG,IAAI,CAAC;IACtC,iBAAiB,EAAE,IAAI,GAAG,IAAI,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAClD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC3C,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,+BAAgC,SAAQ,QAAQ,CAAC,uBAAuB,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,CAAC;CAC7H;AAED,qBACa,aAAc,SAAQ,KAAK,CAAC,uBAAuB,EAAE,+BAA+B,CAAC;IAItF,IAAI,EAAE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object.defineProperty(target, key, r), r;
6
6
  }
7
7
  import { Table, Model, Column, DataType, PrimaryKey, Default, AllowNull } from "sequelize-typescript";
8
- import { randomUUID } from "crypto";
9
8
  export class WeeklyCheckin extends Model {
10
9
  get allPartsSubmitted() {
11
10
  return Boolean(this.weightInSubmittedAt && this.questionnaireSubmittedAt && this.photosSubmittedAt);
@@ -13,7 +12,7 @@ export class WeeklyCheckin extends Model {
13
12
  }
14
13
  _ts_decorate([
15
14
  PrimaryKey,
16
- Default(randomUUID()),
15
+ Default(DataType.UUIDV4),
17
16
  Column(DataType.UUID)
18
17
  ], WeeklyCheckin.prototype, "uuid", void 0);
19
18
  _ts_decorate([
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/dbmodels/coaching/WeeklyCheckIn.ts"],"sourcesContent":["import { Table, Model, Column, DataType, PrimaryKey, Default, AllowNull } from \"sequelize-typescript\";\nimport { randomUUID } from \"crypto\";\nimport type { Optional } from \"sequelize\";\n\nexport interface WeeklyCheckinAttributes {\n uuid: string;\n userUuid: string;\n weekStartLocal: string;\n timezone: string;\n submittedAt: Date | null;\n weightInSubmittedAt: Date | null;\n questionnaireSubmittedAt: Date | null;\n photosSubmittedAt: Date | null;\n weightInMeta: Record<string, unknown> | null;\n questionnaireMeta: Record<string, unknown> | null;\n photosMeta: Record<string, unknown> | null;\n reviewedAt: Date | null;\n reviewedByCoachUuid: string | null;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\nexport interface WeeklyCheckinCreationAttributes extends Optional<WeeklyCheckinAttributes, \"uuid\" | \"createdAt\" | \"updatedAt\"> {\n}\n\n@Table({ timestamps: true })\nexport class WeeklyCheckin extends Model<WeeklyCheckinAttributes, WeeklyCheckinCreationAttributes> {\n @PrimaryKey\n @Default(randomUUID())\n @Column(DataType.UUID)\n declare uuid: string;\n\n @AllowNull(false)\n @Column(DataType.UUID)\n declare userUuid: string;\n\n @AllowNull(false)\n @Column(DataType.DATEONLY)\n declare weekStartLocal: string;\n\n @AllowNull(false)\n @Column(DataType.STRING(64))\n declare timezone: string;\n\n @AllowNull(true)\n @Column(DataType.DATE)\n declare submittedAt: Date | null;\n\n @Column(DataType.DATE) declare weightInSubmittedAt: Date | null;\n\n @Column(DataType.DATE) declare questionnaireSubmittedAt: Date | null;\n\n @Column(DataType.DATE) declare photosSubmittedAt: Date | null;\n\n @Column(DataType.JSONB) declare weightInMeta: Record<string, unknown> | null;\n @Column(DataType.JSONB) declare questionnaireMeta: Record<string, unknown> | null;\n @Column(DataType.JSONB) declare photosMeta: Record<string, unknown> | null;\n\n @AllowNull(true)\n @Column(DataType.DATE)\n declare reviewedAt: Date | null;\n\n @AllowNull(true)\n @Column(DataType.UUID)\n declare reviewedByCoachUuid: string | null;\n\n @Column(DataType.VIRTUAL)\n get allPartsSubmitted(): boolean {\n return Boolean(this.weightInSubmittedAt && this.questionnaireSubmittedAt && this.photosSubmittedAt);\n }\n}\n"],"names":["Table","Model","Column","DataType","PrimaryKey","Default","AllowNull","randomUUID","WeeklyCheckin","allPartsSubmitted","Boolean","weightInSubmittedAt","questionnaireSubmittedAt","photosSubmittedAt","UUID","DATEONLY","STRING","DATE","JSONB","VIRTUAL","timestamps"],"mappings":";;;;;;AAAA,SAASA,KAAK,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,OAAO,EAAEC,SAAS,QAAQ,uBAAuB;AACtG,SAASC,UAAU,QAAQ,SAAS;AAyBpC,OAAO,MAAMC,sBAAsBP;IAwC/B,IACIQ,oBAA6B;QAC7B,OAAOC,QAAQ,IAAI,CAACC,mBAAmB,IAAI,IAAI,CAACC,wBAAwB,IAAI,IAAI,CAACC,iBAAiB;IACtG;AACJ;;;;oBAzCqBC;;;;oBAIAA;;;;oBAIAC;;;;oBAIAC;;;;oBAIAC;;;oBAGAA;;;oBAEAA;;;oBAEAA;;;oBAEAC;;;oBACAA;;;oBACAA;;;;oBAGAD;;;;oBAIAH;;;oBAGAK;;;;QAzCZC,YAAY"}
1
+ {"version":3,"sources":["../../../../src/lib/dbmodels/coaching/WeeklyCheckIn.ts"],"sourcesContent":["import { Table, Model, Column, DataType, PrimaryKey, Default, AllowNull } from \"sequelize-typescript\";\nimport type { Optional } from \"sequelize\";\n\nexport interface WeeklyCheckinAttributes {\n uuid: string;\n userUuid: string;\n weekStartLocal: string;\n timezone: string;\n submittedAt: Date | null;\n weightInSubmittedAt: Date | null;\n questionnaireSubmittedAt: Date | null;\n photosSubmittedAt: Date | null;\n weightInMeta: Record<string, unknown> | null;\n questionnaireMeta: Record<string, unknown> | null;\n photosMeta: Record<string, unknown> | null;\n reviewedAt: Date | null;\n reviewedByCoachUuid: string | null;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\nexport interface WeeklyCheckinCreationAttributes extends Optional<WeeklyCheckinAttributes, \"uuid\" | \"createdAt\" | \"updatedAt\"> {\n}\n\n@Table({ timestamps: true })\nexport class WeeklyCheckin extends Model<WeeklyCheckinAttributes, WeeklyCheckinCreationAttributes> {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @AllowNull(false)\n @Column(DataType.UUID)\n declare userUuid: string;\n\n @AllowNull(false)\n @Column(DataType.DATEONLY)\n declare weekStartLocal: string;\n\n @AllowNull(false)\n @Column(DataType.STRING(64))\n declare timezone: string;\n\n @AllowNull(true)\n @Column(DataType.DATE)\n declare submittedAt: Date | null;\n\n @Column(DataType.DATE) declare weightInSubmittedAt: Date | null;\n\n @Column(DataType.DATE) declare questionnaireSubmittedAt: Date | null;\n\n @Column(DataType.DATE) declare photosSubmittedAt: Date | null;\n\n @Column(DataType.JSONB) declare weightInMeta: Record<string, unknown> | null;\n @Column(DataType.JSONB) declare questionnaireMeta: Record<string, unknown> | null;\n @Column(DataType.JSONB) declare photosMeta: Record<string, unknown> | null;\n\n @AllowNull(true)\n @Column(DataType.DATE)\n declare reviewedAt: Date | null;\n\n @AllowNull(true)\n @Column(DataType.UUID)\n declare reviewedByCoachUuid: string | null;\n\n @Column(DataType.VIRTUAL)\n get allPartsSubmitted(): boolean {\n return Boolean(this.weightInSubmittedAt && this.questionnaireSubmittedAt && this.photosSubmittedAt);\n }\n}\n"],"names":["Table","Model","Column","DataType","PrimaryKey","Default","AllowNull","WeeklyCheckin","allPartsSubmitted","Boolean","weightInSubmittedAt","questionnaireSubmittedAt","photosSubmittedAt","UUIDV4","UUID","DATEONLY","STRING","DATE","JSONB","VIRTUAL","timestamps"],"mappings":";;;;;;AAAA,SAASA,KAAK,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,OAAO,EAAEC,SAAS,QAAQ,uBAAuB;AAyBtG,OAAO,MAAMC,sBAAsBN;IAwC/B,IACIO,oBAA6B;QAC7B,OAAOC,QAAQ,IAAI,CAACC,mBAAmB,IAAI,IAAI,CAACC,wBAAwB,IAAI,IAAI,CAACC,iBAAiB;IACtG;AACJ;;;qBA1CsBC;oBACDC;;;;oBAIAA;;;;oBAIAC;;;;oBAIAC;;;;oBAIAC;;;oBAGAA;;;oBAEAA;;;oBAEAA;;;oBAEAC;;;oBACAA;;;oBACAA;;;;oBAGAD;;;;oBAIAH;;;oBAGAK;;;;QAzCZC,YAAY"}
@@ -1,6 +1,7 @@
1
1
  import { Model } from "sequelize-typescript";
2
2
  import { DietDay } from "./DietDay.js";
3
3
  import { DietMealRecipe } from "./DietMealRecipe.js";
4
+ import { DietMealCompletion } from "./DietMealCompletion.js";
4
5
  export declare enum MealType {
5
6
  BREAKFAST = "breakfast",
6
7
  LUNCH = "lunch",
@@ -12,6 +13,7 @@ export declare class DietMeal extends Model<DietMeal> {
12
13
  dietDayUuid: string;
13
14
  day: DietDay;
14
15
  recipes: DietMealRecipe[];
16
+ completions: DietMealCompletion[];
15
17
  type: MealType;
16
18
  order: number;
17
19
  isFinished: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"DietMeal.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/D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EAAE,MAAM,CAAC;IAKb,WAAW,EAAE,MAAM,CAAC;IAGpB,GAAG,EAAE,OAAO,CAAC;IAMb,OAAO,EAAE,cAAc,EAAE,CAAC;IAM1B,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAGlC,IAAI,EAAE,QAAQ,CAAC;IAGf,KAAK,EAAE,MAAM,CAAC;IAId,UAAU,EAAE,OAAO,CAAC;IAGpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAGvB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAGnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,mBAAmB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC9C"}
@@ -7,6 +7,7 @@ function _ts_decorate(decorators, target, key, desc) {
7
7
  import { BelongsTo, Column, DataType, Default, ForeignKey, HasMany, Index, Model, PrimaryKey, Table } from "sequelize-typescript";
8
8
  import { DietDay } from "./DietDay.js";
9
9
  import { DietMealRecipe } from "./DietMealRecipe.js";
10
+ import { DietMealCompletion } from "./DietMealCompletion.js";
10
11
  export var MealType = /*#__PURE__*/ function(MealType) {
11
12
  MealType["BREAKFAST"] = "breakfast";
12
13
  MealType["LUNCH"] = "lunch";
@@ -35,6 +36,12 @@ _ts_decorate([
35
36
  onDelete: "CASCADE"
36
37
  })
37
38
  ], DietMeal.prototype, "recipes", void 0);
39
+ _ts_decorate([
40
+ HasMany(()=>DietMealCompletion, {
41
+ foreignKey: "dietMealUuid",
42
+ onDelete: "CASCADE"
43
+ })
44
+ ], DietMeal.prototype, "completions", void 0);
38
45
  _ts_decorate([
39
46
  Column(DataType.ENUM(...Object.values(MealType)))
40
47
  ], DietMeal.prototype, "type", void 0);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/dbmodels/diet/DietMeal.ts"],"sourcesContent":["import {\n BelongsTo,\n Column,\n DataType,\n Default,\n ForeignKey,\n HasMany,\n Index,\n Model,\n PrimaryKey,\n Table,\n} from \"sequelize-typescript\";\nimport { DietDay } from \"./DietDay.js\";\nimport { DietMealRecipe } from \"./DietMealRecipe.js\";\n\nexport enum MealType {\n BREAKFAST = \"breakfast\",\n LUNCH = \"lunch\",\n DINNER = \"dinner\",\n SNACK = \"snack\",\n}\n\n@Table\nexport class DietMeal extends Model<DietMeal> {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @Index\n @ForeignKey(() => DietDay)\n @Column(DataType.UUID)\n declare dietDayUuid: string;\n\n @BelongsTo(() => DietDay)\n declare day: DietDay;\n\n @HasMany(() => DietMealRecipe, {\n foreignKey: \"dietMealUuid\",\n onDelete: \"CASCADE\",\n })\n declare recipes: DietMealRecipe[];\n\n @Column(DataType.ENUM(...Object.values(MealType)))\n declare type: MealType;\n\n @Column(DataType.INTEGER)\n declare order: number;\n\n @Default(false)\n @Column(DataType.BOOLEAN)\n declare isFinished: boolean;\n\n @Column(DataType.INTEGER)\n declare calories: number | null;\n\n @Column(DataType.FLOAT)\n declare protein: number | null;\n\n @Column(DataType.FLOAT)\n declare fat: number | null;\n\n @Column(DataType.FLOAT)\n declare carbs: number | null;\n\n @Column(DataType.JSONB)\n declare selectedRecipeUuids: string[] | null;\n}\n"],"names":["BelongsTo","Column","DataType","Default","ForeignKey","HasMany","Index","Model","PrimaryKey","Table","DietDay","DietMealRecipe","MealType","DietMeal","UUIDV4","UUID","foreignKey","onDelete","ENUM","values","INTEGER","BOOLEAN","FLOAT","JSONB"],"mappings":";;;;;;AAAA,SACEA,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,OAAO,EACPC,KAAK,EACLC,KAAK,EACLC,UAAU,EACVC,KAAK,QACA,uBAAuB;AAC9B,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,cAAc,QAAQ,sBAAsB;AAErD,OAAO,IAAA,AAAKC,kCAAAA;;;;;WAAAA;MAKX;AAGD,OAAO,MAAMC,iBAAiBN;AA4C9B;;;qBA1CoBO;oBACDC;;;;mBAICL;oBACDK;;;kBAGAL;;;gBAGFC;QACbK,YAAY;QACZC,UAAU;;;;oBAIKC,eAAeC;;;oBAGfC;;;;oBAIAC;;;oBAGAD;;;oBAGAE;;;oBAGAA;;;oBAGAA;;;oBAGAC"}
1
+ {"version":3,"sources":["../../../../src/lib/dbmodels/diet/DietMeal.ts"],"sourcesContent":["import {\n BelongsTo,\n Column,\n DataType,\n Default,\n ForeignKey,\n HasMany,\n Index,\n Model,\n PrimaryKey,\n Table,\n} from \"sequelize-typescript\";\nimport { DietDay } from \"./DietDay.js\";\nimport { DietMealRecipe } from \"./DietMealRecipe.js\";\nimport { DietMealCompletion } from \"./DietMealCompletion.js\";\n\nexport enum MealType {\n BREAKFAST = \"breakfast\",\n LUNCH = \"lunch\",\n DINNER = \"dinner\",\n SNACK = \"snack\",\n}\n\n@Table\nexport class DietMeal extends Model<DietMeal> {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @Index\n @ForeignKey(() => DietDay)\n @Column(DataType.UUID)\n declare dietDayUuid: string;\n\n @BelongsTo(() => DietDay)\n declare day: DietDay;\n\n @HasMany(() => DietMealRecipe, {\n foreignKey: \"dietMealUuid\",\n onDelete: \"CASCADE\",\n })\n declare recipes: DietMealRecipe[];\n\n @HasMany(() => DietMealCompletion, {\n foreignKey: \"dietMealUuid\",\n onDelete: \"CASCADE\",\n })\n declare completions: DietMealCompletion[];\n\n @Column(DataType.ENUM(...Object.values(MealType)))\n declare type: MealType;\n\n @Column(DataType.INTEGER)\n declare order: number;\n\n @Default(false)\n @Column(DataType.BOOLEAN)\n declare isFinished: boolean;\n\n @Column(DataType.INTEGER)\n declare calories: number | null;\n\n @Column(DataType.FLOAT)\n declare protein: number | null;\n\n @Column(DataType.FLOAT)\n declare fat: number | null;\n\n @Column(DataType.FLOAT)\n declare carbs: number | null;\n\n @Column(DataType.JSONB)\n declare selectedRecipeUuids: string[] | null;\n}\n"],"names":["BelongsTo","Column","DataType","Default","ForeignKey","HasMany","Index","Model","PrimaryKey","Table","DietDay","DietMealRecipe","DietMealCompletion","MealType","DietMeal","UUIDV4","UUID","foreignKey","onDelete","ENUM","values","INTEGER","BOOLEAN","FLOAT","JSONB"],"mappings":";;;;;;AAAA,SACEA,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,OAAO,EACPC,KAAK,EACLC,KAAK,EACLC,UAAU,EACVC,KAAK,QACA,uBAAuB;AAC9B,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,kBAAkB,QAAQ,0BAA0B;AAE7D,OAAO,IAAA,AAAKC,kCAAAA;;;;;WAAAA;MAKX;AAGD,OAAO,MAAMC,iBAAiBP;AAkD9B;;;qBAhDoBQ;oBACDC;;;;mBAICN;oBACDM;;;kBAGAN;;;gBAGFC;QACbM,YAAY;QACZC,UAAU;;;;gBAIGN;QACbK,YAAY;QACZC,UAAU;;;;oBAIKC,eAAeC;;;oBAGfC;;;;oBAIAC;;;oBAGAD;;;oBAGAE;;;oBAGAA;;;oBAGAA;;;oBAGAC"}
@@ -166,9 +166,9 @@ export declare const USER_MODELS: (typeof PersistedUser | typeof UserBadges | ty
166
166
  export declare const SUBSCRIPTION_MODELS: (typeof SubscriptionLog | typeof Subscription | typeof SubscriptionRefund)[];
167
167
  export declare const PROGRAM_MODELS: (typeof TranslatedChallenge | typeof Challenge | typeof ProgressEntry | typeof Exercise | typeof UserChallenge | typeof TranslatedStrengthTestExercise | typeof StrengthTestExercise | typeof UserStrengthTests | typeof TranslatedExerciseModel | typeof ExercisesModels | typeof Workout | typeof Superset | typeof Program | typeof TranslatedStrengthTest | typeof StrengthTest | typeof ChallengeBlueprint | typeof CustomProgramBlueprint | typeof CustomStrengthTestExercise | typeof CustomWorkoutBlueprint | typeof RestDay | typeof WorkoutSession | typeof ThirtyDayChallenge | typeof ThirtyDayChallengeStrengthTest | typeof StrengthTestSession | typeof WorkoutCompletion | typeof CircularProgramDraft | typeof CoachExerciseNote | typeof UserExerciseNote)[];
168
168
  export declare const NON_CONSUMABLE_PROGRAM_MODELS: (typeof TranslatedConsumableProgram | typeof NonConsumableProgram | typeof UserPrograms | typeof TranslatedNonConsumableProgramWebContent | typeof NonConsumableProgramWebContent)[];
169
- export declare const DIET_MODELS: (typeof RecipeTags | typeof Recipe | typeof RecipeTag | typeof TranslatedRecipeTag | typeof TranslatedRecipeTags | typeof TranslatedRecipe | typeof IngredientTags | typeof Ingredient | typeof IngredientTag | typeof RecipeIngredient | typeof DietMealRecipeIngredient | typeof DietMealRecipe | typeof DietMeal | typeof DietDay | typeof DietProgram | typeof ShoppingListItem | typeof ShoppingList | typeof DietMealCompletion | typeof UserDietPreferences)[];
169
+ export declare const DIET_MODELS: (typeof RecipeTags | typeof Recipe | typeof RecipeTag | typeof TranslatedRecipeTag | typeof TranslatedRecipeTags | typeof TranslatedRecipe | typeof IngredientTags | typeof Ingredient | typeof IngredientTag | typeof RecipeIngredient | typeof DietMealRecipeIngredient | typeof DietMealRecipe | typeof DietMeal | typeof DietMealCompletion | typeof DietDay | typeof DietProgram | typeof ShoppingListItem | typeof ShoppingList | typeof UserDietPreferences)[];
170
170
  export declare const COACHING_MODELS: (typeof WeeklyCheckin | typeof WeightRecord | typeof Question | typeof Questionnaire | typeof Answer | typeof QuestionnaireResponse | typeof ClientTag | typeof ClientNote)[];
171
171
  export declare const GAMIFICATION_MODELS: (typeof TranslatedBadge | typeof Badge | typeof StreaksLog | typeof XpEvent | typeof XpTransaction | typeof UserRankHistory)[];
172
172
  export declare const NOTIFICATION_MODELS: (typeof TranslatedNotification | typeof NotificationModels)[];
173
- export declare const ALL_CORE_MODELS: (typeof TranslatedChallenge | typeof Challenge | typeof ProgressEntry | typeof Exercise | typeof UserChallenge | typeof TranslatedStrengthTestExercise | typeof StrengthTestExercise | typeof UserStrengthTests | typeof TranslatedExerciseModel | typeof ExercisesModels | typeof Workout | typeof Superset | typeof Program | typeof TranslatedConsumableProgram | typeof NonConsumableProgram | typeof SubscriptionLog | typeof Subscription | typeof PersistedUser | typeof UserPrograms | typeof TranslatedNonConsumableProgramWebContent | typeof NonConsumableProgramWebContent | typeof TranslatedStrengthTest | typeof StrengthTest | typeof TranslatedBadge | typeof Badge | typeof UserBadges | typeof UserStreak | typeof UsersFriends | typeof UserCoach | typeof UserDiscount | typeof UserOptions | typeof UserAddons | typeof DeviceTokens | typeof SubscriptionRefund | typeof ChallengeBlueprint | typeof CustomProgramBlueprint | typeof CustomStrengthTestExercise | typeof CustomWorkoutBlueprint | typeof RestDay | typeof WorkoutSession | typeof ThirtyDayChallenge | typeof ThirtyDayChallengeStrengthTest | typeof StrengthTestSession | typeof WorkoutCompletion | typeof CircularProgramDraft | typeof CoachExerciseNote | typeof UserExerciseNote | typeof RecipeTags | typeof Recipe | typeof RecipeTag | typeof TranslatedRecipeTag | typeof TranslatedRecipeTags | typeof TranslatedRecipe | typeof IngredientTags | typeof Ingredient | typeof IngredientTag | typeof RecipeIngredient | typeof DietMealRecipeIngredient | typeof DietMealRecipe | typeof DietMeal | typeof DietDay | typeof DietProgram | typeof ShoppingListItem | typeof ShoppingList | typeof DietMealCompletion | typeof UserDietPreferences | typeof WeeklyCheckin | typeof WeightRecord | typeof Question | typeof Questionnaire | typeof Answer | typeof QuestionnaireResponse | typeof ClientTag | typeof ClientNote | typeof StreaksLog | typeof XpEvent | typeof XpTransaction | typeof UserRankHistory | typeof TranslatedNotification | typeof NotificationModels)[];
173
+ export declare const ALL_CORE_MODELS: (typeof TranslatedChallenge | typeof Challenge | typeof ProgressEntry | typeof Exercise | typeof UserChallenge | typeof TranslatedStrengthTestExercise | typeof StrengthTestExercise | typeof UserStrengthTests | typeof TranslatedExerciseModel | typeof ExercisesModels | typeof Workout | typeof Superset | typeof Program | typeof TranslatedConsumableProgram | typeof NonConsumableProgram | typeof SubscriptionLog | typeof Subscription | typeof PersistedUser | typeof UserPrograms | typeof TranslatedNonConsumableProgramWebContent | typeof NonConsumableProgramWebContent | typeof TranslatedStrengthTest | typeof StrengthTest | typeof TranslatedBadge | typeof Badge | typeof UserBadges | typeof UserStreak | typeof UsersFriends | typeof UserCoach | typeof UserDiscount | typeof UserOptions | typeof UserAddons | typeof DeviceTokens | typeof SubscriptionRefund | typeof ChallengeBlueprint | typeof CustomProgramBlueprint | typeof CustomStrengthTestExercise | typeof CustomWorkoutBlueprint | typeof RestDay | typeof WorkoutSession | typeof ThirtyDayChallenge | typeof ThirtyDayChallengeStrengthTest | typeof StrengthTestSession | typeof WorkoutCompletion | typeof CircularProgramDraft | typeof CoachExerciseNote | typeof UserExerciseNote | typeof RecipeTags | typeof Recipe | typeof RecipeTag | typeof TranslatedRecipeTag | typeof TranslatedRecipeTags | typeof TranslatedRecipe | typeof IngredientTags | typeof Ingredient | typeof IngredientTag | typeof RecipeIngredient | typeof DietMealRecipeIngredient | typeof DietMealRecipe | typeof DietMeal | typeof DietMealCompletion | typeof DietDay | typeof DietProgram | typeof ShoppingListItem | typeof ShoppingList | typeof UserDietPreferences | typeof WeeklyCheckin | typeof WeightRecord | typeof Question | typeof Questionnaire | typeof Answer | typeof QuestionnaireResponse | typeof ClientTag | typeof ClientNote | typeof StreaksLog | typeof XpEvent | typeof XpTransaction | typeof UserRankHistory | typeof TranslatedNotification | typeof NotificationModels)[];
174
174
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "90dc-core",
3
- "version": "1.16.22",
3
+ "version": "1.16.24",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",