
    "gi                     |   d dl mZmZmZmZ d dlmZmZmZ  G d de      Z	 G d de	      Z
 G d de	      Z G d	 d
e	      Z G d de	      Z G d de	      Z G d de	      Z G d de	      Z G d de	      Z G d de      Z G d de      Z G d de      Z G d de	      Z G d de	      Z G d d e	      Z G d! d"e	      Z G d# d$e	      Z G d% d&e	      Z G d' d(e	      Z G d) d*e	      Z G d+ d,e	      Z G d- d.e	      Z G d/ d.e	      Z G d0 d1e	      Z G d2 d3e	      Z  G d4 d5e	      Z! G d6 d7e	      Z" G d8 d9e	      Z# G d: d;e	      Z$ G d< d=e	      Z% G d> d?e	      Z& G d@ dAe	      Z' G dB dCe	      Z( G dD de	      Z G dE dFe	      Z) G dG dHe	      Z* G dI dJe	      Z+ G dK dLe	      Z, G dM dNe	      Z- G dO dPe	      Z. G dQ dRe	      Z/ G dS dTe	      Z0 G dU dVe	      Z1 G dW dXe	      Z2 G dY dZe	      Z3 G d[ d\e	      Z4 G d] d^e	      Z5 G d_ d`e	      Z6 G da dbe	      Z7 G dc dde	      Z8 G de dfe	      Z9 G dg dhe	      Z: G di dje	      Z; G dk dle	      Z< G dm dne	      Z= G do dpe	      Z> G dq dre	      Z? G ds dte	      Z@ G du dve	      ZA G dw dxe	      ZB G dy dze	      ZC G d{ d|e	      ZD G d} d~e	      ZE G d de	      ZF G d de	      ZG G d de	      ZH G d de	      ZI G d de	      ZJ G d de	      ZK G d de	      ZL G d de	      ZM G d de	      ZN G d de	      ZO G d de	      ZP G d de	      ZQi dedededededededede
dedededededededei dededededededededededede de!de"de#de$de%i de&de'de(dede)de*de+de,de-de.de/de0de1de2de3de4de5i de6de7de8de9de:de;de<de=de>de?de@deAdeBdeCdeDdeEdeFeGeIeJeKeLeHeMeNeOePeQdۜZR G d܄ de      ZSy)    )	BaseModelFieldHttpUrlmodel_validator)OptionalListUnionc                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)		BasicInfoN
First namedefaultdescription
first_nameMiddle name (optional)middle_name	Last name	last_name)
__name__
__module____qualname__r   r   r   str__annotations__r   r        S/var/www/html/BankruptcyAI-uat/bankruptcy-ai/src/modules/prompt/schemas/requests.pyr   r      sB     %d MJM!&tAY!ZK#Z$T{KIx}Kr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	
RealEStateNr   r   namer   sharer   value)
r   r   r   r   r   r   r   r   r    r!   r   r   r   r   r   
   sB    ,GD(3-G ;STE8C=T ;GE8C=Gr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)RetirementDocumentDataNbalancer   r   account_type)
r   r   r   r   r$   r   r   r   r   r%   r   r   r   r#   r#      sA    "4YGGXc]G!&t!OK#O"'."QL(3-Qr   r#   c                   v   e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd      Z
ee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd	      Zee   ed	<    edd
      Zee   ed
<    edd      Zee   ed<    edd      Zee   ed<   y)CreditorDocumentDataNaddressr   lien_natureclaim_amounthas_codebtorcreditor_namedate_incurredaccount_numbercollateral_valueunsecured_portionproperty_description)r   r   r   r   r(   r   r   r   r)   r*   r+   r,   r-   r.   r/   r0   r1   r   r   r   r'   r'      s    "4YGGXc]G!&t!OK#O"'."QL(3-Q"'."QL(3-Q#(?#SM8C=S#(?#SM8C=S$)$DT$UNHSMU&+DFX&YhsmY',TGZ'[x}[*/J`*a(3-ar   r'   c                       e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<    edd      Zee   ed<   y)"PriorityUnsecuredClaimDocumentDataNz5Full address listed in the creditor or claim documentr   r(   zEReason or basis for the claim (e.g., medical bills, credit card debt)claim_basisz>Name of the creditor or financial institution making the claimr,   z,Date on which the debt or claim was incurredr-   z8Account number or reference ID associated with the claimr.   )r   r   r   r   r(   r   r   r   r4   r,   r-   r.   r   r   r   r3   r3   $   s    "KGXc]  "'["K#  $)T$M8C=  $)B$M8C=  %*N%NHSM r   r3   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee	   ed<    edd      Z
ee	   ed<   y)	InsuranceDataNz:Monetary value of the insurance, savings, or policy amountr   r!   zGDescription of the insurance document (e.g., 401k retirement statement)r   zLType of insurance or financial policy (e.g., Saving, Life Insurance, Health)policy_type)r   r   r   r   r!   r   floatr   r   r   r7   r   r   r   r6   r6   <   sW    "PE8E?  "']"K#  "'b"K# r   r6   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)ExecutoryContractDataNzDescription of contractr   r   zThird party nameother_party_name)	r   r   r   r   r   r   r   r   r;   r   r   r   r:   r:   L   s;    !&-"K#  ',&'hsm r   r:   c                       e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<   y)ThirdPartyClaimDataNz
Claim typer   
claim_typezClaim indexclaim_indexzdescription about contractr   zvalue of assetsestimated_value)r   r   r   r   r>   r   r   r   r?   r   r@   r   r   r   r=   r=   W   st     % !J 
 "'!"K# 
 "'0"K# 
 &+%&OXc] r   r=   c                       e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<   y)EmploymentDataNNamer   employer_nameYearyearsAddressr(   Designationdesignation)r   r   r   r   rD   r   r   r   rF   r(   rI   r   r   r   rB   rB   l   sV    #(6#JM8C=J 6BE8C=B"4YGGXc]G!&t!OK#Or   rB   c                      e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    G d d      Zy)AddressDataNr   r   r   r   r   r   r   z	City namecityz
State namestatezCounty namecountyzZIP codezip_codezStreet namestreet_namezHouse numberhouse_numberzFull SSNssn_fullz	From date	from_datezTo dateto_datezFull addressfull_addressc                   0    e Zd Zddddddddd	d
dddddiZy)AddressData.ConfigexampleJohn Doez
Dummy CityTorontoCanada90001zStreet 7134	409522002z
09-30-2025z
10-01-2024zSarah M. Chen, John R. Chen)r   r   r   rL   rM   rN   rO   rP   rQ   rR   rT   rS   rU   Nr   r   r   json_schema_extrar   r   r   ConfigrW      s9    $!"$""#) %'') =
r   rc   )r   r   r   r   r   r   r   r   r   r   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rc   r   r   r   rK   rK   s   s    %d MJM!&tAY!ZK#Z$T{KIx}K+FD(3-F <HE8C=H!$MJFHSMJ#DjIHhsmI!&t!OK#O"'."QL(3-Q#DjIHhsmI$T{KIx}K"4YGGXc]G"'."QL(3-Q
 
r   rK   c                   z    e Zd ZU dZ ed      Zeed<    ed      Ze	ed<    ed      Z
eed<    G d	 d
      Zy)DocumentVerificationRequesta`  Request payload for the refactored /verify-address endpoint.

    Fields:
    - file_type: Type/category of the document being analyzed (e.g., 'residence_documents').
    - file_url: Direct URL to the document (image/PDF) to analyze.
    - data: Structured data relevant for the file_type. For 'residence_documents', this is personal/address info.
    z1Type of the document, e.g., 'residence_documents'r   	file_typez2Publicly accessible URL of the document to analyzefile_urlzAStructured data to verify against the document for this file_typedatac                   J    e Zd Zdddej                  j
                  d   diZy)"DocumentVerificationRequest.ConfigrX   residence_documentsz&https://example.com/uploads/doc123.png)rg   rh   ri   N)r   r   r   rK   rc   rb   r   r   r   rc   rk      s,    2D#**<<YG
r   rc   N)r   r   r   __doc__r   rg   r   r   rh   r   ri   rK   rc   r   r   r   re   re      sC     'Z[Is[*^_Hg_*mnD+n
 
r   re   c                       e Zd ZU dZ ed      Zeed<    edd      Ze	e   ed<    ed	      Z
eed
<    ed      Zeed<    ed      Zeed<    ed      Zeed<    G d d      Zy)BankStatementDataaQ  Structured input for bank statement verification (updated format).

    New required JSON body (for file_type=bank_statement):
    {
        "first_name": "MP",
        "middle_name": "",
        "last_name": "Convergent",
        "bank_name": "Bank of America",
        "account_type": "Saving",
        "balance": "10000.00"
    }
    zFirst name present on statementrf   r   rZ   r   r   r   z Last name / surname on statementr   zExpected bank name on statement	bank_namez+Account type (Saving/Checking/Savings/etc.)r%   z+Provided final balance for the latest monthr$   c                   "    e Zd ZddddddddiZy	)
BankStatementData.ConfigrX   MPrZ   
ConvergentzBank of AmericaSaving10000.00)r   r   r   rp   r%   r$   Nra   r   r   r   rc   rr      s$    "!). (%	
r   rc   N)r   r   r   rm   r   r   r   r   r   r   r   rp   r%   r$   rc   r   r   r   ro   ro      sy     (IJJJ!&r?W!XK#X'IJIsJ'HIIsI*WXL#X%RSGSS

 

r   ro   c                       e Zd ZU dZ edd      Zee   ed<    edd      Z	ee   ed<    edd      Z
ee   ed	<    edd
      Zee   ed<    eddd      Zee   ed<    edd      Zee   ed<    G d d      Zy)VehicleDocumentDataa  Structured input for vehicle document verification.

    Expected JSON body (for file_type=vehicle_document):
    {
        "year": "2020",
        "maker": "Honda",
        "model": "Honda Shine",
        "mileage": "60",
        "value": "10000.00",
        "vehicle_no": "WB051BE2494"
    }

    Notes:
    - The system will also extract expiry date from the document and determine if it's expired; you do not need to supply expiry.
    Nz)Vehicle year (optional if not applicable)r   yearzVehicle manufacturer/makermakerzVehicle model namemodelz+Vehicle mileage/odometer reading (optional)mileage
vehicle_noz!Vehicle registration/plate number)r   aliasr   vehicle_numberzVehicle value (optional)current_valuec                   "    e Zd ZddddddddiZy	)
VehicleDocumentData.ConfigrX   2020HondazHonda Shine60rv   WB051BE2494)ry   rz   r{   r|   r!   r}   Nra   r   r   r   rc   r      s$     &#+	
r   rc   )r   r   r   rm   r   ry   r   r   r   rz   r{   r|   r   r   rc   r   r   r   rx   rx      s      :efD(3-f ;WXE8C=X ;OPE8C=P"4=jkGXc]k %*$lX{$|NHSM|#(C]#^M8C=^

 

r   rx   c                       e Zd ZU dZ ed      Zeed<    edd      Zeed<    ed	      Z	eed
<    ed      Z
eed<    G d d      Zy)BusinessDocumentDataa  Structured input for business document verification.

    Expected JSON body (for file_type=business_documents):
    {
        "ein": "B2",
        "type": "Stock Broker",
        "location": "LK",
        "business_name": "Business2"
    }

    Notes:
    - Field name 'type' is accepted from input but internally stored as 'business_type' to avoid ambiguity.
    - All fields are required for a positive overall match.
    z@Employer Identification Number or equivalent business identifierrf   eintypez.Business type or category (e.g., Stock Broker))r~   r   business_typez.Business location (country/state code or city)locationzRegistered business namebusiness_namec                   "    e Zd ZdZddddddiZy)	BusinessDocumentData.ConfigTrX   B2zStock BrokerLK	Business2)r   r   r   r   N)r   r   r   populate_by_namerb   r   r   r   rc   r     s$    & !,	
r   rc   N)r   r   r   rm   r   r   r   r   r   r   r   rc   r   r   r   r   r      sU     !cdCdV9ijM3j&VWHcW+EFM3F	
 	
r   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)
IncomeDataNPayerr   payerYearsrF   monthly_avg)
r   r   r   r   r   r   r   r   rF   r   r   r   r   r   r     sA     7CE8C=C 7CE8C=C!&t!OK#Or   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	GrossOvertimeDataNzEmployment yearr   rF   zEmployer namerD   zMonthly average incomer   )
r   r   r   r   rF   r   r   r   rD   r   r   r   r   r   r     sC     ;LME8C=M#(?#SM8C=S!&tAY!ZK#Zr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	RentalIncomeDataNzYear of rental activityr   rF   zRental property descriptionpropertyzAverage monthly rental incomer   )
r   r   r   r   rF   r   r   r   r   r   r   r   r   r   r     sD     ;TUE8C=U#D>[\Hhsm\!&tA`!aK#ar   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	RoyaltiesIncomeDataNzYear of royalty incomer   rF   zRoyalty income sourcesourcez Average monthly royalties incomer   
r   r   r   r   rF   r   r   r   r   r   r   r   r   r   r   !  sD     ;STE8C=T!$<STFHSMT!&tAc!dK#dr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	PensionIncomeDataNzYear of pension incomer   rF   zPension provider or sourcer   zAverage monthly pension incomer   r   r   r   r   r   r   &  sD     ;STE8C=T!$<XYFHSMY!&tAa!bK#br   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	FamilySupportIncomeDataNzYear of family support incomer   rF   z1Source of family support (alimony, child support)r   z%Average monthly family support incomer   r   r   r   r   r   r   +  sD     ;Z[E8C=[!$<opFHSMp!&tAh!iK#ir   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	SecurityIncomeDataNzYear of Social Security incomer   rF   zSocial Security sourcer   z&Average monthly Social Security incomer   r   r   r   r   r   r   0  sD     ;[\E8C=\!$<TUFHSMU!&tAi!jK#jr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y	SocialSecurityActBenefitsDataNz$Year of Social Security Act benefitsr   rF   zSource of benefitsr   zAverage monthly benefit amountr   r   r   r   r   r   r   5  D     ;abE8C=b!$<PQFHSMQ!&tAa!bK#br   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   yr   r   r   r   r   r   r   :  r   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	PublicAssistanceDataNzYear of public assistancer   rF   zProgram or assistance sourcer   z!Average monthly assistance incomer   r   r   r   r   r   r   ?  sD     ;VWE8C=W!$<Z[FHSM[!&tAd!eK#er   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	OtherIncomeDataNzYear of other incomer   rF   zSource of other incomer   zAverage monthly other incomer   r   r   r   r   r   r   D  sD     ;QRE8C=R!$<TUFHSMU!&tA_!`K#`r   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	SpouseIncomeDataNzYear of spouse incomer   rF   zSpouse income sourcer   zAverage monthly spouse incomer   r   r   r   r   r   r   I  sD     ;RSE8C=S!$<RSFHSMS!&tA`!aK#ar   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)RentHomeDataNAmountr   amountDescriptionr   	r   r   r   r   r   r   r   r   r   r   r   r   r   r   N  ,    !$HEFHSME!&t!OK#Or   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)UtilitiesDataNr   r   r   r   r   r   r   r   r   r   r   R  r   r   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)TransportationDataNr   r   r   r   r   r   r   r   r   r   r   V  r   r   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)VehicleInsuranceDataNr   r   r   zVehicle numberr   )	r   r   r   r   r   r   r   r   r   r   r   r   r   r   Z  s-    !$HEFHSME$)$DT$UNHSMUr   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)	TaxesDataNr   r   r   r   r   r   r   r   r   r   r   ^  r   r   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)InstallmentPaymentsDataNr   r   r   r   r   r   r   r   r   r   r   b  r   r   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)AlimonySupportDataNr   r   r   r   r   r   r   r   r   r   r   f  r   r   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)r6   Nr   r   r   r   r   r   r   r   r   r6   r6   j  r   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)RetirementContributionsDataNr   r   r   r   r   r   r   r   r   r   r   n  r   r   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)OtherExpensesDataNr   r   r   r   r   r   r   r   r   r   r   r  r   r   r   c                   2    e Zd ZU  edd      Zee   ed<   y)InsiderPaymentDataNz!Details about the insider paymentr   details)r   r   r   r   r   r   r   r   r   r   r   r   r   v  s    "4=`aGXc]ar   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	PaidTransferredPropertyDataNAmount paid or transferredr   r   z#Details about the property transferr   Recipient name	recipient
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   y  sD    !$<XYFHSMY"4=bcGXc]c$T?OPIx}Pr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	PaidTransferHelpCreditorsDataNr   r   r   z$Details about helping with creditorsr   r   r   r   r   r   r   r   r   ~  sD    !$<XYFHSMY"4=cdGXc]d$T?OPIx}Pr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	!SoldTradedTransferredPropertyDataNz)Value of property sold/traded/transferredr   r!   z&Details about the property transactionr   zRecipient or buyer namer   )
r   r   r   r   r!   r   r   r   r   r   r   r   r   r   r     sD     ;fgE8C=g"4=efGXc]f$T?XYIx}Yr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	OweMoneyCreditorsDataNAmount owedr   r   zDetails about the debtr   Creditor namecreditor)
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r     sB    !$MJFHSMJ"4=UVGXc]V#DoNHhsmNr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	PropertyTakenCollateralDebtDataNzDetails about collateralr   r   r   r   Property descriptionr   )
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r     sC    "4=WXGXc]X#DoNHhsmN#D>TUHhsmUr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	CourtActionDataNzCase details or numberr   r   z
Court namecourtzCase statusstatus)
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r     sB    "4=UVGXc]V <HE8C=H!$MJFHSMJr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	PropertyRepossessedDataNr   r   r   r   r   zRepossession details or numberr   )
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r     sC    #DoNHhsmN#D>TUHhsmU"4=]^GXc]^r   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)CreditorsLegalProcessClaimsDataNr   r   r   zLegal process detailsr   )	r   r   r   r   r   r   r   r   r   r   r   r   r   r     s-    #DoNHhsmN"4=TUGXc]Ur   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	GaveGiftsOver600LastYearDataNzGift amountr   r   zDate of giftdater   r   )
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r     sB    !$MJFHSMJ.ID(3-I$T?OPIx}Pr   r   c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	$FinancialAccountsChangedLastYearDataNzFinancial institution namer   institutionzDate of changer   zDetails about the changer   )
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r     sD    !&tA]!^K#^:JKD(3-K"4=WXGXc]Xr   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)HousingMortgageDataNz'Monthly mortgage or rent payment amountr   monthly_amountzDescription of housing paymentr   	r   r   r   r   r   r   r   r   r   r   r   r   r   r     s.    $)$Dm$nNHSMn!&tAa!bK#br   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)PublicTransportationDataNz"Monthly public transportation costr   r   z&Description of transportation expensesr   r   r   r   r   r   r     s.    $)$Dh$iNHSMi!&tAi!jK#jr   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)SecuredDebtPaymentsDataNz#Monthly secured debt payment amountr   r   z#Description of secured debt paymentr   r   r   r   r   r   r     s.    $)$Di$jNHSMj!&tAf!gK#gr   r   c                   2    e Zd ZU  edd      Zee   ed<   y)OtherNecessaryExpensesDataNz'Description of other necessary expensesr   r   )r   r   r   r   r   r   r   r   r   r   r   r   r     s    !&tAj!kK#kr   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)PriorityClaimsDataNzMonthly priority claims amountr   r   zDescription of priority claimsr   r   r   r   r   r   r     s.    $)$Dd$eNHSMe!&tAa!bK#br   r   c                       e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<    edd      Zee   ed<    edd      Zee   ed<   y)CharitableContributionsDataNz&Monthly charitable contribution amountr   r   z&Description of charitable contributionr   zName of recipient organizationrecipient_namez!Type of recipient (e.g., Charity)recipient_typez!Address of recipient organizationrecipient_addresszFrequency of contributionsrecipient_frequency)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r     s    $)$Dl$mNHSMm!&tAi!jK#j$)$Dd$eNHSMe$)$Dg$hNHSMh',TGj'kx}k).tIe)f#fr   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)AdditionalSecurityDataNz)Monthly additional food/clothing expensesr   r   z"Description of additional expensesr   r   r   r   r   r  r    s.    $)$Do$pNHSMp!&tAe!fK#fr   r  c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)HomeEnergyCostsDataNz*Monthly home energy costs beyond standardsr   r   z&Description of additional energy costsr   r   r   r   r   r  r    s.    $)$Dp$qNHSMq!&tAi!jK#jr   r  c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	EducationDependentsDataNz)Monthly education expenses for dependentsr   r   !Description of education expensesr   z)Name of school or educational institutionschool)
r   r   r   r   r   r   r   r   r   r  r   r   r   r  r    sD    $)$Do$pNHSMp!&tAd!eK#e!$<ghFHSMhr   r  c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	ElderlyDisabledCareDataNz*Monthly care expenses for elderly/disabledr   r   zDescription of care servicesr   z%Detailed description of care providedcare_details)
r   r   r   r   r   r   r   r   r   r  r   r   r   r
  r
    sD    $)$Dp$qNHSMq!&tA_!`K#`"'Bi"jL(3-jr   r
  c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)HealthDisabilityInsuranceDataNz3Monthly health/disability insurance or HSA expensesr   r   z7Description of health insurance premium or HSA expensesr   r   r   r   r   r  r    s.    $)$Dy$zNHSMz!&tAz!{K#{r   r  c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)TelecommunicationsDataNz'Monthly telecommunication service costsr   r   z)Description of telecommunication servicesr   r   r   r   r   r  r    .    $)$Dm$nNHSMn!&tAl!mK#mr   r  c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)HealthcareBeyondStandardsDataNz)Monthly healthcare costs beyond standardsr   r   z8Description of healthcare expenses (e.g., prescriptions)r   r   r   r   r   r  r    s.    $)$Do$pNHSMp!&tA{!|K#|r   r  c                       e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<    edd      Zee   ed<   y)ChildcareExpensesDataNzMonthly childcare expensesr   r   z!Description of childcare servicesr   zAge of child receiving care	child_agezName of childcare providerprovider_namezAddress of childcare providerprovider_address)r   r   r   r   r   r   r   r   r   r  r  r  r   r   r   r  r    sq    $)$D`$aNHSMa!&tAd!eK#e$T?\]Ix}]#(C_#`M8C=`&+DFe&fhsmfr   r  c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	EducationExpensesDataNz;Monthly education expenses for employment or disabled childr   r   r  r   z$Name of school or education providerschool_provider)
r   r   r   r   r   r   r   r   r   r  r   r   r   r  r    sN    $)$  EB  %CNHSM  C!&tAd!eK#e%*4Ek%lOXc]lr   r  c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)CourtOrderedPaymentsDataNz$Monthly court-ordered payment amountr   r   zCDescription of court-ordered payment (e.g., alimony, child support)r   r   r   r   r   r  r    s8    $)$Dj$kNHSMk!&t  BG  "HK#  Hr   r  c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)LifeInsuranceDataNzMonthly life insurance premiumr   r   z$Description of life insurance policyr   r   r   r   r   r  r    s.    $)$Dd$eNHSMe!&tAg!hK#hr   r  c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)InvoluntaryDeductionsDataNz%Monthly involuntary deductions amountr   r   z>Description of involuntary deductions (e.g., wage garnishment)r   r   r   r   r   r   r     s8    $)$Dk$lNHSMl!&t  BB  "CK#  Cr   r   c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)TaxesActualDataNz1Monthly tax payment amount (actual, not withheld)r   r   zDescription of tax paymentsr   r   r   r   r   r"  r"    s.    $)$Dw$xNHSMx!&tA^!_K#_r   r"  c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)VehicleOwnershipDataNz'Monthly vehicle ownership/lease paymentr   r   z)Description of vehicle ownership or leaser   r   r   r   r   r$  r$    r  r   r$  c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)HealthcareExpensesDataNz>Monthly out-of-pocket healthcare expenses beyond IRS standardsr   r   z"Description of healthcare expensesr   r   r   r   r   r&  r&    s8    $)$  EE  %FNHSM  F!&tAe!fK#fr   r&  c                   V    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<   y)HousingInsuranceDataNz/Monthly housing insurance or operating expensesr   r   z,Description of housing insurance/maintenancer   r   r   r   r   r(  r(    s.    $)$Du$vNHSMv!&tAo!pK#pr   r(  c                   z    e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<   y)	VehicleOperationDataNz"Monthly vehicle operation expensesr   r   z)Description of vehicle operation expensesr   zNumber of vehicles operatednumbers_of_vehicles)
r   r   r   r   r   r   r   r   r   r+  r   r   r   r*  r*    sE    $)$Dh$iNHSMi!&tAl!mK#m).tIf)g#gr   r*  c                   R   e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<   y)SpouseBusinessPLDataNzSpouse's business EINr   spouse_business_einzSpouse's business ZIP codespouse_business_zipzSpouse's business cityspouse_business_cityzSpouse's business namespouse_business_namezSpouse's business typespouse_business_typez#Spouse's business unit/suite numberspouse_business_unitzSpouse's business phonespouse_business_phonezSpouse's business statespouse_business_statez Spouse's business street addressspouse_business_address)r   r   r   r   r.  r   r   r   r/  r0  r1  r2  r3  r4  r5  r6  r   r   r   r-  r-    s    ).tI`)a#a).tIe)f#f*/Jb*c(3-c*/Jb*c(3-c*/Jb*c(3-c*/Jo*p(3-p+0Kd+e8C=e+0Kd+e8C=e-24Mo-pXc]pr   r-  c                   R   e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<   y)SelfEmploymentPLDataNzSelf-employed business EINr   self_business_einzSelf-employed business ZIP codeself_business_zipzSelf-employed business cityself_business_cityzSelf-employed business nameself_business_namezSelf-employed business typeself_business_typez(Self-employed business unit/suite numberself_business_unitzSelf-employed business phoneself_business_phonezSelf-employed business stateself_business_statez%Self-employed business street addressself_business_address)r   r   r   r   r9  r   r   r   r:  r;  r<  r=  r>  r?  r@  rA  r   r   r   r8  r8    s    ',TGc'dx}d',TGh'ix}i(-dHe(ff(-dHe(ff(-dHe(ff(-dHr(ss).tIg)h#h).tIg)h#h+0Kr+s8C=sr   r8  c                   
   e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<    edd      Zee   ed<    edd      Zee   ed<    edd      Zee   ed<   y)CreditorPaymentDataNPayment date (MM/YYYY format)r   r   r   r   zCreditor addressr(   Payment descriptionr   r   owed_amountAmount paidpaid_amountz'Type of creditor (e.g., Loan repayment)creditor_type)r   r   r   r   r   r   r   r   r   r(   r   rF  rH  rI  r   r   r   rC  rC  '  s    :YZD(3-Z/JD(3-J"4=OPGXc]P!&tAV!WK#W!&t!OK#O!&t!OK#O#(Cl#mM8C=mr   rC  c                       e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<    edd      Zee   ed<    edd      Zee   ed<   y)InsiderBenefitDataNzBenefit date (MM/YYYY format)r   payment_dateInsider namer   Insider addressr(   zBenefit descriptionr   r   rF  zBenefit amount receivedrH  )r   r   r   r   rL  r   r   r   r   r(   r   rF  rH  r   r   r   rK  rK  1  s    "'Ba"bL(3-b.ID(3-I"4=NOGXc]O!&tAV!WK#W!&t!OK#O!&tAZ![K#[r   rK  c                       e Zd ZU  edd      Zee   ed<    edd      Zee   ed<    edd      Z	ee   ed<    edd	      Z
ee   ed
<    edd      Zee   ed<    edd      Zee   ed<   y)InsiderPaymentDocumentDataNrD  r   r   rM  r   rN  r(   rE  r   r   rF  rG  rH  )r   r   r   r   r   r   r   r   r   r(   r   rF  rH  r   r   r   rP  rP  :  s    :YZD(3-Z.ID(3-I"4=NOGXc]O!&tAV!WK#W!&t!OK#O!&t!OK#Or   rP  bank_statementrl   billing_address_documentvehicle_documentsbusiness_documentsaddress_documentsssn_documentslease_documentsreal_estate_documentsrecreational_vehicle_documentsequipment_documentsretirement_documentscreditor_documents"priority_unsecured_claim_documentsinsurance_policiesexecutory_contract_documentsthird_party_claim_documentsemployment_documentsspouse_employment_documentsnet_income_documentsgross_overtime_documentsrental_income_documentsroyalties_income_documentspension_income_documentsfamily_support_income_documentssecurity_income_documents&social_security_act_benefits_documentspublic_assistance_documentsother_income_documentsspouse_income_documentsrent_home_recordsutilities_recordstransportation_recordsvehicle_insurance_recordstaxes_recordsinstallment_payments_recordsalimony_support_recordsinsurance_records retirement_contributions_recordsother_expenses_recordsinsider_payment_documents#paid_transferred_property_documents&paid_transfer_help_creditors_documents*sold_traded_transferred_property_documents owe_money_to_creditors_documents+property_taken_as_collateral_debt_documentscourt_action_documentsproperty_repossessed_documents(creditors_legal_process_claims_documents'gave_gifts_over_600_last_year_documents.financial_accounts_changed_last_year_documentshousing_mortgage_recordspublic_transportation_recordssecured_debt_payments_records other_necessary_expenses_recordspriority_claims_records charitable_contributions_recordsadditional_security_recordshome_energy_costs_recordseducation_dependents_recordselderly_disabled_care_records#health_disability_insurance_recordstelecommunications_records#healthcare_beyond_standards_recordschildcare_expenses_recordseducation_expenses_recordscourt_ordered_payments_recordslife_insurance_records)involuntary_deductions_recordsvehicle_ownership_recordshealthcare_expenses_recordshousing_insurance_recordsvehicle_operation_recordstaxes_actual_recordsspouse_business_pl_documentsself_employment_pl_documentscreditor_payment_documentsinsider_benefit_documentsrx  c                       e Zd ZU dZeed<   ee   ed<   eed<   dZ	e
e   ed<    ed      d	        Zed
efd       Z G d d      Zy) MultiDocumentVerificationRequestaQ  Unified request schema for multi-file document verification.

    Supports:
    - file_type == 'bank_statement' -> data must conform to BankStatementData
    - file_type in ['residence_documents', 'billing_address_document'] -> data must conform to AddressData
    - file_urls: list of one or more public URLs (image or PDF). For backward compatibility caller can also send a single URL.

    Example:
    {
        "file_type": "bank_statement",
        "file_urls": [
            "https://example.com/storage/stmt_may.pdf",
            "https://example.com/storage/stmt_june.pdf"
        ],
        "data": {
            "first_name": "MP",
            "middle_name": "",
            "last_name": "Convergent",
            "bank_name": "Bank of America",
            "account_type": "Saving",
            "balance": "10000.00"
        }
    }
    rg   	file_urlsri   Ncallback_urlafter)modec                     | j                   t        vrt        d| j                          t        | j                      } |di | j                  | _        | S )NzInvalid file_type: r   )rg   FILE_TYPE_MAP
ValueErrorri   )selfModels     r   validate_and_castz2MultiDocumentVerificationRequest.validate_and_cast  sL    >>.24>>2BCDDdnn-&DII&	r   rawc                     t        |j                  d      t              rE|d   j                  d      D cg c]#  }|j	                         s|j	                         % }}||d<    | di |S c c}w )z[Helper to flexibly parse incoming raw body where file_urls may be a comma-separated string.r  ,r   )
isinstancegetr   splitstrip)clsr  uurlss       r   from_rawz)MultiDocumentVerificationRequest.from_raw  sd     cggk*C0'*;'7'='=c'BP!aggiAGGIPDP#CzSz Qs   A-A-c                   L    e Zd Zdddgej                  j
                  d   diZy)'MultiDocumentVerificationRequest.ConfigrX   vehicle_documentz,https://example.com/uploads/vehicle_card.jpg)rg   r  ri   N)r   r   r   rx   rc   rb   r   r   r   rc   r    s/    /LM+22DDYO
r   rc   )r   r   r   rm   r   r   r   r   dictr  r   r   r  classmethodr  rc   r   r   r   r  r    sg    0 NG}
J"&L(3-&'" # 4  
 
r   r  N)Tpydanticr   r   r   r   typingr   r   r	   r   r   r#   r'   r3   r6   r:   r=   rB   rK   re   ro   rx   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r
  r  r  r  r  r  r  r  r   r"  r$  r&  r(  r*  r-  r8  rC  rK  rP  r  r  r   r   r   <module>r     sL   ? ? ( (L	 LH HRY R
b9 
b 0I  I ) *PY P!
) !
H
) 
*
	 
@#
) #
L
9 
@P P
[	 [
by b
e) e
c	 c
ji j
k k
cI c
cI c
f9 f
ai a
by b
P9 PPI PP PV9 VP	 PPi PP PPI PP) PP	 Pb bQ) Q
QI Q
Z	 Z
OI O
Vi V
Ki K
_i _
Vi VQ9 Q
Y9 Y
c) cky khi hl lc cg) ggY gk) kii i
ki k
|I |nY n}I }gI gmI m
Hy Hi	 iC	 C`i `n9 ngY gq9 qh9 h
	q9 	q	t9 	tn) n\ \P PP'P;P P ,	P
 .P P [P {P ZP %&9P .P 2P .P )*LP -P  #$9!P" "#6#P$ N%P& ">'P( Z)P*  1+P, /-P. !"5/P0  11P2 &'>3P4  !35P6 -.K7P8 "#79P: o;P< /=P> ?P@ APB 0CPD  !5EPF YGPH #$;IPJ 1KPL MPN '(COPP /QPR  !3SPT *+FUPV -.KWPX 12SYPZ '(=[P\ 23R]P^ o_P` %&=aPb /0OcPd ./KePf 56ZgPh  3iPj $%=kPl $%<mPn '(BoPp 1qPr '(CsPt "#9uPv  !4wPx #$;yPz $%<{P| *+H}P~ !"8P@ *+HAPB !"7CPD !"7EPF %&>GPH /IPJ '@!5#9!5!5+$8$8"5!3!;_Pd6
y 6
r   