update api

This commit is contained in:
2024-11-24 15:12:05 +07:00
parent ccfe7bf1f1
commit 675460c39c
12 changed files with 234 additions and 45 deletions

View File

@@ -4,6 +4,7 @@ import Delta, { Op } from 'quill-delta'
import { MinioService } from '../Minio/minio.service'
import { DocumentDelta } from './document.type'
import { JSDOM } from 'jsdom'
import { Logger } from '@nestjs/common'
@Injectable()
export class DocumentService {
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
@@ -32,11 +33,34 @@ export class DocumentService {
this.quill = Quill
}
// TODO: maybe never do :)
async handleOnChange(delta: DocumentDelta) {}
async handleOnChange(documentId: string, delta: DocumentDelta) {}
async handleOnSave() {}
async handleOnSave(documentId: string) {}
async handleOnSync() {}
async handleOnSync(documentId: string) {}
async requestSync() {}
async requestSync(documentId: string, page?: number) {
// using pubsub to broadcast to all clients
// this.pubSub.publish(`document:sync:${documentId}`, {
// documentId,
// page,
// })
}
async clientRequestSave(documentId: string) {
// using pubsub to broadcast to all clients
// this.pubSub.publish(`document:save:${documentId}`, {
// documentId,
// })
}
async serverRequestSave(documentId: string) {}
async generatePreviewImage(documentId: string) {}
async allPageToDelta(documentId: string) {}
async toDocx(documentId: string) {}
}
// epess/documents/<id>/<page>