File request objects represent a file request associated with a folder.
- Get a File Request's Information
- Copy a File Request's Information
- Update a File Request's Information
- Delete a File Request
Calling fileRequests.getById(fileRequestId: string)
returns information on a file request
FileRequest.
client.fileRequests.getById(fileRequestId)
Calling fileRequests.copy(fileRequestId: string, copyBody: FileRequestCopyBody)
copies an existing file request that is already present
on one folder, and applies it to another folder. If you want to set certain fields of the newly copied file request when
it is created, set those fields in the FileRequestCopyBody
that you pass into copy method.
client.fileRequests.copy(fileRequestId, {
folder: {
id: '157979815648',
type: 'folder'
}
}).then((r: FileRequest) => {
// do something with the copied file request
console.log(r)
});
Calling fileRequests.update(fileRequestId: string, updateBody: FileRequestUpdateBody)
updates a file request. This can be used to activate or deactivate a file request using
FileRequestUpdateBody
that you pass into update method.
client.fileRequests.update(fileRequestId, {
title: 'Updated title'
}).then((r: FileRequest) => {
// do something with the updated file request
console.log(r)
});
Calling fileRequests.delete(fileRequestId: string)
]delete deletes a file request permanently.
client.fileRequests.delete('2484517969').then(() => console.log('Removed file request'));