mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
50 lines
1.3 KiB
Diff
50 lines
1.3 KiB
Diff
diff --git a/services/real-time/app/js/Router.js b/services/real-time/app/js/Router.js
|
|
index d25b804a83bc..7bd4864322b5 100644
|
|
--- a/services/real-time/app/js/Router.js
|
|
+++ b/services/real-time/app/js/Router.js
|
|
@@ -26,7 +26,43 @@ const joinDocSchema = z.object({
|
|
|
|
const applyOtUpdateSchema = z.object({
|
|
doc_id: zz.objectId(),
|
|
- update: z.object(),
|
|
+ update: z.strictObject({
|
|
+ doc: zz.objectId().optional(),
|
|
+ dupIfSource: z.array(z.string()).optional(),
|
|
+ hash: z.string().optional(),
|
|
+ lastV: z.number().optional(),
|
|
+ meta: z
|
|
+ .strictObject({
|
|
+ tc: z.string(),
|
|
+ })
|
|
+ .optional(),
|
|
+ op: z
|
|
+ .array(
|
|
+ z
|
|
+ .strictObject({
|
|
+ i: z.string(),
|
|
+ p: z.number().int().min(0),
|
|
+ u: z.boolean().optional(),
|
|
+ })
|
|
+ .or(
|
|
+ z.strictObject({
|
|
+ d: z.string(),
|
|
+ p: z.number().int().min(0),
|
|
+ u: z.boolean().optional(),
|
|
+ })
|
|
+ )
|
|
+ .or(
|
|
+ z.strictObject({
|
|
+ c: z.string(),
|
|
+ p: z.number().int().min(0),
|
|
+ t: z.string(),
|
|
+ u: z.boolean().optional(),
|
|
+ })
|
|
+ )
|
|
+ )
|
|
+ .min(1),
|
|
+ v: z.number().int().min(0),
|
|
+ }),
|
|
})
|
|
|
|
let Router
|