prebuilt.company_researcher.state¶

Classes¶

KYCDecisionStatus

Possible decision statuses in KYC workflow.

KYCWorkflowStage

Stages in the KYC workflow.

KYCWorkflowState

Comprehensive state model for KYC workflow.

Module Contents¶

class prebuilt.company_researcher.state.KYCDecisionStatus¶

Bases: str, enum.Enum

Possible decision statuses in KYC workflow.

APPROVED = 'approved'¶
CONDITIONAL_APPROVAL = 'conditional_approval'¶
PENDING = 'pending'¶
PENDING_REVIEW = 'pending_review'¶
REJECTED = 'rejected'¶
class prebuilt.company_researcher.state.KYCWorkflowStage¶

Bases: str, enum.Enum

Stages in the KYC workflow.

COMPLETED = 'completed'¶
ENHANCED_DUE_DILIGENCE = 'enhanced_due_diligence'¶
ERROR = 'error'¶
FINAL_DECISION = 'final_decision'¶
INITIAL_SCREENING = 'initial_screening'¶
RISK_ASSESSMENT = 'risk_assessment'¶
class prebuilt.company_researcher.state.KYCWorkflowState(/, **data: Any)¶

Bases: pydantic.BaseModel

Comprehensive state model for KYC workflow.

Captures the entire state of the KYC processing pipeline

log_error(error_details: dict[str, Any]) None¶

Log error details and update workflow state.

Parameters:

error_details – Dictionary of error information

set_decision_status(status: KYCDecisionStatus) None¶

Set the decision status and update stage.

Parameters:

status – New decision status

update_stage(new_stage: KYCWorkflowStage) None¶

Update the current workflow stage.

Parameters:

new_stage – New workflow stage

created_at: datetime.datetime = None¶
current_stage: KYCWorkflowStage = None¶
customer_profile: haive.prebuilt.company_researcher.models.EnhancedKYCCustomerProfile | None = None¶
decision_status: KYCDecisionStatus = None¶
error_details: dict[str, Any] | None = None¶
last_updated: datetime.datetime = None¶
messages: Annotated[list[langchain_core.messages.BaseMessage], langgraph.graph.add_messages] = None¶
model_config¶

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

next_stage: KYCWorkflowStage | None = None¶
screening_iterations: int = None¶
workflow_id: str = None¶