-
Create Draft
-
View Draft
-
View Attached Drive Files
-
Remove Attached Drive File
-
Download Attached Drive File
-
Send draft by ID
-
Update existing draft
-
Delete Draft
- TODOS - Frontend actions
- Service : Overflow Drive Owners -> Indicate whether drive is usable or not
- Service : Cleaner Service for older folders than X months
--> <> Drafts Create
- if there exists a driveservice, return that token id as well to be used as a hidden field X-otwl-dserv-id & X-otwl-dserv-owner
--> <> Drafts List Drafts View
- When viewing ask to bring hidden X-otwl-dserv-vsid & X-otwl-dserv-owner ==> indicate to front end that there is a drive resource from older mails
- This front end DRIVE_VIEWSTATE_ID, DRIVE_VIEWSTATE_OWNER is important.
--> <> Drive List Files
- Use the front end DRIVE_VIEWSTATE_ID & DRIVE_VIEWSTATE_OWNER to get the files in that drive.
- Files should be downloadable
- Call returns list of files in that drive of type Model.DriveResourceType.FileListResource
--> <> Drive Remove File
- Use the front end DRIVE_VIEWSTATE_OWNER & Model.DriveResourceType.FileListResource.files[].id to remove files from the attached drive
- Singular file call only
--> <>
- Currently single file download & view available inside Model.DriveResourceType.FileListResource.files[].webviewLink
- PENDING : Can be configured for zip approach if needed, but expensive and unnecessary in my opinion.
--> <> Only Send Existing Draft
- Only send the existing draft that is on the server (Either consume directly or call after updating a draft)
- Make sure the DraftId being sent is the correct Id. (In this case i think msgList[].ThreadId)
--> <> Drafts Update
- To, Cc, Bcc, Subject, Body
- inlineAttachments, actionType
- draft_msgId, draft_attachIds, TokenPossession, lstFsOrderFiles,
- eml, att_sub
PENDING TO COMMIT
--> <> Drafts Delete
- This will permanently remove the draft from server.
- You MUST provide the existing DRIVE_VIEWSTATE_ID & DRIVE_VIEWSTATE_OWNER of the draft IF IT SO EXISTS. MAKE SURE TO PASS "" (empty quotes) for both ID and Owner if they dont exist. If that draft has no allocated drive resource then it is fine, otherwise the backend automatically attempt to first trash the drive folder then it will trash the mail.
--> Update Draft
- accept incoming draft with X-otwl-dserv-vsid
Flow ==>
-
[Frontend] -> iF Ask to Create new draft =] <> GO to PostNewMail -> MultipartEmailGenerator -> Allocate drive.id and .webviewlink Embed beautified .webviewlink into mail body Embed .id into X-otwl-dserv-vsid property inside mail packet Post Draft
-
[Frontend] -> iF ask to view existing draft =] <> While fetching draft data OR draft thread list -> initialize the DRIVE_VIEWSTATE_ID using the "X-otwl-dserv-vsid" header property in Thread.cs object Make Sure the send this as a NEW PARAMETER from frontend when updating/sending the draft
-
[Frontend] -> iF ask to list files inside drive folder While fetching folder contents using DRIVE_VIEWSTATE_ID, make sure send this as a parameter to get a list of items that you can show in the "Drive Attached" files Dialog.
-
[Frontend] -> iF ask to send existing draft