From 785dd74297cfd1743ef880d6458980e9c34084a0 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Fri, 12 Apr 2024 11:02:42 +0800 Subject: [PATCH] fix types (#2316) --- interface/app/$libraryId/debug/sync.tsx | 3 +-- packages/client/src/core.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/interface/app/$libraryId/debug/sync.tsx b/interface/app/$libraryId/debug/sync.tsx index 9f89cd801..24d4f9956 100644 --- a/interface/app/$libraryId/debug/sync.tsx +++ b/interface/app/$libraryId/debug/sync.tsx @@ -1,5 +1,4 @@ import { useMemo } from 'react'; -import { stringify } from 'uuid'; import { CRDTOperation, CRDTOperationData, @@ -11,7 +10,7 @@ import { Button } from '@sd/ui'; import { useRouteTitle } from '~/hooks/useRouteTitle'; type MessageGroup = { - model: string; + model: number; id: string; messages: { data: CRDTOperationData; timestamp: number }[]; }; diff --git a/packages/client/src/core.ts b/packages/client/src/core.ts index d8930ecbc..76fc9d166 100644 --- a/packages/client/src/core.ts +++ b/packages/client/src/core.ts @@ -157,7 +157,7 @@ export type Backup = ({ id: string; timestamp: string; library_id: string; libra export type BuildInfo = { version: string; commit: string } -export type CRDTOperation = { instance: string; timestamp: number; model: string; record_id: JsonValue; data: CRDTOperationData } +export type CRDTOperation = { instance: string; timestamp: number; model: number; record_id: JsonValue; data: CRDTOperationData } export type CRDTOperationData = "c" | { u: { field: string; value: JsonValue } } | "d"