Skip to content

Commit

Permalink
feat: onedrive: add support for remote_created_at, remote_modified_at…
Browse files Browse the repository at this point in the history
… and drive_id
  • Loading branch information
amuwal committed Dec 18, 2024
1 parent bdb1d20 commit 8f72d18
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ export class OnedriveFileMapper implements IFileMapper {
remote_id: file.id,
remote_data: file,
remote_folder_id: file.parentReference?.id,
remote_drive_id: file.driveId || file?.parentReference?.driveId || null,
remote_created_at: file.createdDateTime
? new Date(file.createdDateTime)
: null,
remote_modified_at: file.lastModifiedDateTime
? new Date(file.lastModifiedDateTime)
: null,
name: file.name,
file_url: file.webUrl,
mime_type: file.file.mimeType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ export class OnedriveFolderMapper implements IFolderMapper {
parent_folder_id: folder.internal_parent_folder_id ?? null,
remote_id: folder.id,
remote_data: folder,
remote_drive_id:
folder.driveId || folder?.parentReference?.driveId || null,
remote_created_at: folder.createdDateTime
? new Date(folder.createdDateTime)
: null,
remote_modified_at: folder.lastModifiedDateTime
? new Date(folder.lastModifiedDateTime)
: null,
name: folder.name,
folder_url: folder.webUrl,
description: folder.description,
Expand Down

0 comments on commit 8f72d18

Please sign in to comment.