Sequence Diagrambehavior/uml_sequence_diagram.puml

Describes API client interaction with controllers/services, including action-item extraction, task creation, and bulk deal deletion.

Highlights

Key Components

Diagram Source

@startuml
actor ApiClient
participant "OpenAITestController" as Controller
participant "ActionItemExtractorService" as Extractor
participant "OpenAIService" as OpenAI
participant "HubSpotTaskService" as HubSpot
participant "HubSpotTaskCreationReport" as CreationReport
participant "HubSpotDealDeletionReport" as DeletionReport

ApiClient -> Controller: POST /create-deal-from-transcript
Controller -> Extractor: extractActionItems(transcript)
Extractor -> OpenAI: getCompletion(prompt)
OpenAI --> Extractor: raw response
Extractor --> Controller: parsed action items
Controller -> HubSpot: createTasksFromActionItems(items)
HubSpot --> CreationReport: creation summary

activate Controller
Controller -> HubSpot: deleteAllHubSpotDeals()
HubSpot -> HubSpot: paginate deals
HubSpot -> HubSpot: delete deal
HubSpot --> DeletionReport: deletion summary
deactivate Controller

ApiClient <-- Controller: Response { creationReport, deletionReport }
@enduml

Guidance

Use this diagram when jumping into the Sequence Diagram context or when you need to explain the sequence diagram interactions.