Fixes for person v2

This commit is contained in:
Manav Rathi
2024-08-14 15:29:28 +05:30
parent b6b87c196f
commit e946749b2e
2 changed files with 13 additions and 9 deletions

View File

@@ -109,11 +109,7 @@ const openMLDB = async () => {
}
// TODO-Cluster
if (oldVersion < 3) {
if (
newVersion &&
newVersion > 10 &&
process.env.NEXT_PUBLIC_ENTE_WIP_CL
) {
if (process.env.NEXT_PUBLIC_ENTE_WIP_CL) {
db.createObjectStore("face-cluster", { keyPath: "id" });
db.createObjectStore("person", { keyPath: "id" });
}

View File

@@ -76,10 +76,18 @@ interface UserEntity {
const RemoteUserEntity = z.object({
id: z.string(),
/** Base64 string containing the encrypted contents of the entity. */
encryptedData: z.string(),
/** Base64 string containing the decryption header. */
header: z.string(),
/**
* Base64 string containing the encrypted contents of the entity.
*
* Will be `null` when isDeleted is true.
*/
encryptedData: z.string().nullable(),
/**
* Base64 string containing the decryption header.
*
* Will be `null` when isDeleted is true.
*/
header: z.string().nullable(),
isDeleted: z.boolean(),
updatedAt: z.number(),
});