From a2a30d1e6793c8f13a713124cac7bb4ed94a8933 Mon Sep 17 00:00:00 2001 From: Christian Fehmer Date: Fri, 12 Sep 2025 15:03:06 +0200 Subject: [PATCH] rename addedAt to lastModified on user/friends --- packages/schemas/src/users.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/schemas/src/users.ts b/packages/schemas/src/users.ts index 552731602..12635d627 100644 --- a/packages/schemas/src/users.ts +++ b/packages/schemas/src/users.ts @@ -13,6 +13,7 @@ import { } from "./shared"; import { CustomThemeColorsSchema, FunboxNameSchema } from "./configs"; import { doesNotContainProfanity } from "./validation/validation"; +import { ConnectionSchema } from "./connections"; const NoneFilterSchema = z.literal("none"); export const ResultFiltersSchema = z.object({ @@ -384,14 +385,15 @@ export const FriendSchema = UserSchema.pick({ xp: true, banned: true, lbOptOut: true, -}).extend({ - addedAt: z.number().int().nonnegative().optional(), - connectionId: IdSchema.optional(), - top15: PersonalBestSchema.optional(), - top60: PersonalBestSchema.optional(), - badgeId: z.number().int().optional(), - isPremium: z.boolean().optional(), - streak: UserStreakSchema.pick({ length: true, maxLength: true }), -}); +}) + .extend({ + connectionId: IdSchema.optional(), + top15: PersonalBestSchema.optional(), + top60: PersonalBestSchema.optional(), + badgeId: z.number().int().optional(), + isPremium: z.boolean().optional(), + streak: UserStreakSchema.pick({ length: true, maxLength: true }), + }) + .merge(ConnectionSchema.pick({ lastModified: true }).partial()); export type Friend = z.infer;