VersionsResource
Defined in: libs/ccs-files-user-client/src/core/resources/files.ts:41
Versions of a file. A new version uploads through the same engine as a new file.
Methods
Section titled “Methods”list()
Section titled “list()”Defined in: libs/ccs-files-user-client/src/core/resources/files.ts:51
Parameters
Section titled “Parameters”fileId
Section titled “fileId”string
query?
Section titled “query?”PageQuery = {}
Returns
Section titled “Returns”get(
fileId,versionNo):Promise<Version>
Defined in: libs/ccs-files-user-client/src/core/resources/files.ts:57
Parameters
Section titled “Parameters”fileId
Section titled “fileId”string
versionNo
Section titled “versionNo”number
Returns
Section titled “Returns”Promise<Version>
upload()
Section titled “upload()”upload(
fileId,file,input?,options?):UploadHandle<File>
Defined in: libs/ccs-files-user-client/src/core/resources/files.ts:65
Uploads file as version n + 1 (edit on the file): a ticket from POST P/files/:file_id/versions, then
the same PUTs, progress, pause, resume and cancel as client.upload. done resolves with the File.
Parameters
Section titled “Parameters”fileId
Section titled “fileId”string
Blob
input?
Section titled “input?”VersionUploadInput = {}
options?
Section titled “options?”UploadOptions = {}
Returns
Section titled “Returns”restore()
Section titled “restore()”restore(
fileId,versionNo,input?):Promise<File>
Defined in: libs/ccs-files-user-client/src/core/resources/files.ts:75
Makes a new current version copied from version versionNo.
Parameters
Section titled “Parameters”fileId
Section titled “fileId”string
versionNo
Section titled “versionNo”number
input?
Section titled “input?”comment?
Section titled “comment?”string
Returns
Section titled “Returns”Promise<File>
pin(
fileId,versionNo,pinned?):Promise<Version>
Defined in: libs/ccs-files-user-client/src/core/resources/files.ts:90
Pins (or unpins) a version so pruning keeps it.
Parameters
Section titled “Parameters”fileId
Section titled “fileId”string
versionNo
Section titled “versionNo”number
pinned?
Section titled “pinned?”boolean = true
Returns
Section titled “Returns”Promise<Version>
delete()
Section titled “delete()”delete(
fileId,versionNo):Promise<void>
Defined in: libs/ccs-files-user-client/src/core/resources/files.ts:100
Deletes a version; never the current one (409 version_is_current), and not while the file is under a legal
hold (409 file_on_hold).
Parameters
Section titled “Parameters”fileId
Section titled “fileId”string
versionNo
Section titled “versionNo”number
Returns
Section titled “Returns”Promise<void>