Skip to content

Commit cfd10eb

Browse files
committed
fix: build problem
1 parent dfdc1d1 commit cfd10eb

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

new-deepnotes/apps/web/src/api/api-types.generated.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3767,11 +3767,14 @@ export interface paths {
37673767
};
37683768
/**
37693769
* List encrypted Yjs page updates (Postgres)
3770-
* @description Bootstrap for the editor: returns all `page_updates` rows for the page, ordered by `index`. Does not use legacy Redis collab cache — Postgres only. Full duplex collab remains a separate WebSocket track (Phase 3).
3770+
* @description Bootstrap for the editor: returns `page_updates` rows for the page, ordered by `index`. Use `sinceIndex` to paginate incrementally (default limit 100, max 500). Does not use legacy Redis collab cache — Postgres only. Full duplex collab remains a separate WebSocket track (Phase 3).
37713771
*/
37723772
get: {
37733773
parameters: {
3774-
query?: never;
3774+
query?: {
3775+
sinceIndex?: string;
3776+
limit?: string;
3777+
};
37753778
header?: never;
37763779
path: {
37773780
pageId: string;

new-deepnotes/apps/web/src/api/openapi.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5453,7 +5453,7 @@
54535453
"/api/pages/{pageId}/collab-updates": {
54545454
"get": {
54555455
"summary": "List encrypted Yjs page updates (Postgres)",
5456-
"description": "Bootstrap for the editor: returns all `page_updates` rows for the page, ordered by `index`. Does not use legacy Redis collab cache — Postgres only. Full duplex collab remains a separate WebSocket track (Phase 3).",
5456+
"description": "Bootstrap for the editor: returns `page_updates` rows for the page, ordered by `index`. Use `sinceIndex` to paginate incrementally (default limit 100, max 500). Does not use legacy Redis collab cache — Postgres only. Full duplex collab remains a separate WebSocket track (Phase 3).",
54575457
"parameters": [
54585458
{
54595459
"schema": {
@@ -5465,6 +5465,24 @@
54655465
"required": true,
54665466
"name": "pageId",
54675467
"in": "path"
5468+
},
5469+
{
5470+
"schema": {
5471+
"type": "string",
5472+
"description": "If provided, only returns updates with `index > sinceIndex` (exclusive). Used for incremental bootstrap after the first batch."
5473+
},
5474+
"required": false,
5475+
"name": "sinceIndex",
5476+
"in": "query"
5477+
},
5478+
{
5479+
"schema": {
5480+
"type": "string",
5481+
"description": "Max updates to return per request (default 100, max 500)."
5482+
},
5483+
"required": false,
5484+
"name": "limit",
5485+
"in": "query"
54685486
}
54695487
],
54705488
"responses": {

new-deepnotes/apps/web/src/features/pages/usePageCollabEditor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ export function usePageCollabEditor(opts: {
136136
{
137137
params: {
138138
path: { pageId: id },
139-
query: { sinceIndex, limit: "100" } as any,
139+
query: { sinceIndex, limit: "100" },
140140
},
141141
},
142142
) as {
143143
data: components["schemas"]["PageCollabUpdatesGetResponse"] | undefined;
144-
error: any;
144+
error: unknown;
145145
response: Response;
146146
};
147147
if (response.status !== 200 || !data) {

0 commit comments

Comments
 (0)