mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
[monorepo] downgrade ranges ids back to strings for now (#36857)
GitOrigin-RevId: 6c85715bc85adc2f641bfd0e9f3bb6a8f2c839c2
This commit is contained in:
@@ -62,13 +62,13 @@ const trackedChangeMetadata = z.strictObject({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const comment = z.strictObject({
|
const comment = z.strictObject({
|
||||||
id: zz.objectId().optional(),
|
id: z.string().optional(),
|
||||||
op: commentOp,
|
op: commentOp,
|
||||||
metadata: commentMetadata.optional(),
|
metadata: commentMetadata.optional(),
|
||||||
})
|
})
|
||||||
|
|
||||||
const trackedChange = z.strictObject({
|
const trackedChange = z.strictObject({
|
||||||
id: zz.objectId().optional(),
|
id: z.string().optional(),
|
||||||
op: insertOp.or(deleteOp),
|
op: insertOp.or(deleteOp),
|
||||||
metadata: trackedChangeMetadata,
|
metadata: trackedChangeMetadata,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ describe('schemas', function () {
|
|||||||
expect(result.success).to.equal(true)
|
expect(result.success).to.equal(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('rejects a tracked change with a non-ObjectId id', function () {
|
// eslint-disable-next-line mocha/no-pending-tests
|
||||||
|
it.skip('rejects a tracked change with a non-ObjectId id', function () {
|
||||||
const result = ranges.safeParse({
|
const result = ranges.safeParse({
|
||||||
changes: [{ id: 'tc_1000001', op: { i: 'foo', p: 0 }, metadata }],
|
changes: [{ id: 'tc_1000001', op: { i: 'foo', p: 0 }, metadata }],
|
||||||
})
|
})
|
||||||
@@ -119,7 +120,8 @@ describe('schemas', function () {
|
|||||||
expect(result.success).to.equal(true)
|
expect(result.success).to.equal(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('rejects a comment with a non-ObjectId id', function () {
|
// eslint-disable-next-line mocha/no-pending-tests
|
||||||
|
it.skip('rejects a comment with a non-ObjectId id', function () {
|
||||||
const result = ranges.safeParse({
|
const result = ranges.safeParse({
|
||||||
comments: [{ id: 'thread-id-1', op: { c: 'foo', p: 0, t: threadId } }],
|
comments: [{ id: 'thread-id-1', op: { c: 'foo', p: 0, t: threadId } }],
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ const acceptChangesSchema = z.object({
|
|||||||
change_id: zz.objectId().optional(),
|
change_id: zz.objectId().optional(),
|
||||||
}),
|
}),
|
||||||
body: z.strictObject({
|
body: z.strictObject({
|
||||||
change_ids: z.array(zz.objectId()).optional(),
|
change_ids: z.array(z.string()).optional(),
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user