rename addedAt to lastModified on user/friends

This commit is contained in:
Christian Fehmer 2025-09-12 15:03:06 +02:00
parent eb93599131
commit a2a30d1e67
No known key found for this signature in database
GPG key ID: FE53784A69964062

View file

@ -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<typeof FriendSchema>;