Livoa LogoLivoa
User clicks Delete button
UI Component (e.g., MailListItem.tsx)


- handleDelete() called

- Calls: deleteItems(itemIds, 'MoveToDeletedItems', ...)

deleteItems.ts::deleteItems()


- Validates permissions

- Checks retention policies

- Shows confirmation if needed

- Dispatches: deleteItemsWithoutConfirmDialog()

SatchelJS Action: deleteItemsWithoutConfirmDialog


- Creates action message

- Broadcasts to all registered orchestrators

deleteItems.ts::orchestrator()


- Optimistic UI: deleteItemsStoreUpdate()

- Call GraphQL: invokeDeleteItemMutation()

- Setup undo action

- Handle response/errors

deleteItems.ts::invokeDeleteItemMutation()


- Formats data for Apollo

- Calls: mutate(DeleteItemDocument, variables)

Apollo Client


- Manages GraphQL request

- Routes to registered resolver

- Applies middleware (caching, queuing)

deleteItemMutationWeb.ts::deleteItemMutationWeb()


- Receives GraphQL args

- Extracts: itemIds, disposalType, mailboxInfo

- Calls: deleteItemService()

- Transforms response to GraphQL format

deleteItemService.ts::deleteItemService()


- Builds EWS request structure

- Configures: ItemIds, DeleteType, options

- Calls: deleteItemOperation()

deleteItemOperation.ts::deleteItemOperation()


- Calls: makeServiceRequest('DeleteItem', req)

ServiceRequest.ts::makeServiceRequest()


- Constructs URL: service.svc?action=DeleteItem

- Adds headers (auth, canary, tenant)

- Makes HTTP POST with fetch()

Exchange Server (service.svc)


- Processes delete request

- Moves item to Deleted Items or soft deletes

- Returns success/error response

Flowchart DeleteItem workflow

by Garry

0
0 uses