mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #17859 from overleaf/mj-project-history-ranges-at-version
[overleaf-editor-core+project-history] Add endpoint to fetch ranges from version GitOrigin-RevId: fbe8e8ef3636b344006375a92057cfc580a74616
This commit is contained in:
committed by
Copybot
parent
635d0525eb
commit
5b8d8fa39f
@@ -17,6 +17,7 @@ const StringFileData = require('./file_data/string_file_data')
|
||||
* @typedef {import("./types").CommentRawData} CommentRawData
|
||||
* @typedef {import("./file_data/comment_list")} CommentList
|
||||
* @typedef {import("./operation/text_operation")} TextOperation
|
||||
* @typedef {import("./file_data/tracked_change_list")} TrackedChangeList
|
||||
* @typedef {{filterTrackedDeletes?: boolean}} FileGetContentOptions
|
||||
*/
|
||||
|
||||
@@ -210,6 +211,14 @@ class File {
|
||||
return this.data.getComments()
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tracked changes for this file.
|
||||
* @return {TrackedChangeList}
|
||||
*/
|
||||
getTrackedChanges() {
|
||||
return this.data.getTrackedChanges()
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone a file.
|
||||
*
|
||||
|
||||
@@ -21,6 +21,7 @@ let StringFileData = null
|
||||
* @typedef {import("../operation/edit_operation")} EditOperation
|
||||
* @typedef {import("../file_data/comment_list")} CommentList
|
||||
* @typedef {import("../types").CommentRawData} CommentRawData
|
||||
* @typedef {import("../file_data/tracked_change_list")} TrackedChangeList
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -199,6 +200,18 @@ class FileData {
|
||||
getComments() {
|
||||
throw new Error('getComments not implemented for ' + JSON.stringify(this))
|
||||
}
|
||||
|
||||
/**
|
||||
* @see File#getTrackedChanges
|
||||
* @function
|
||||
* @return {TrackedChangeList}
|
||||
* @abstract
|
||||
*/
|
||||
getTrackedChanges() {
|
||||
throw new Error(
|
||||
'getTrackedChanges not implemented for ' + JSON.stringify(this)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = FileData
|
||||
|
||||
@@ -112,6 +112,11 @@ class StringFileData extends FileData {
|
||||
return this.comments
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
getTrackedChanges() {
|
||||
return this.trackedChanges
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @returns {Promise<StringFileData>}
|
||||
|
||||
Reference in New Issue
Block a user