Ë
    uPêjp"  ã                   ó  — d Z ddlmZmZmZmZ ddlmZ ddlm	Z	m
Z
 erddlmZ  G d„ dee	   «      Z G d„ d	ed
   «      Z G d„ ded   «      Z G d„ ded   «      Z G d„ ded   «      Z G d„ ded   «      Z G d„ ded   «      Z G d„ ded   «      Z G d„ ded   «      Z G d „ d!ed"   «      Z G d#„ d$ed%   «      Z G d&„ d'ed(   «      Z G d)„ d*ed+   «      Z G d,„ d-ed.   «      Z G d/„ d0ed1   «      Z G d2„ d3ed4   «      Z G d5„ d6ed7   «      Z G d8„ d9ed:   «      Z G d;„ d<ed=   «      Z  G d>„ d?ed@   «      Z! G dA„ dBedC   «      Z" G dD„ dEedF   «      Z# G dG„ dHedI   «      Z$ G dJ„ dKedL   «      Z% G dM„ dNedO   «      Z& G dP„ dQedR   «      Z' G dS„ dTedU   «      Z( G dV„ dWedX   «      Z) G dY„ dZed[   «      Z* G d\„ d]ed^   «      Z+ G d_„ d`eda   «      Z, G db„ dcedd   «      Z- G de„ dfedg   «      Z. G dh„ diedj   «      Z/ G dk„ dledm   «      Z0 G dn„ doedp   «      Z1 G dq„ dreds   «      Z2 G dt„ duedv   «      Z3 G dw„ dxedy   «      Z4 G dz„ d{ed|   «      Z5 G d}„ d~ed   «      Z6 G d€„ d�ed‚   «      Z7 G dƒ„ d„ed…   «      Z8 G d†„ d‡edˆ   «      Z9 G d‰„ dŠed‹   «      Z: G dŒ„ d�edŽ   «      Z; G d�„ d�ed‘   «      Z< G d’„ d“ed”   «      Z= G d•„ d–ed—   «      Z> G d˜„ d™edš   «      Z? G d›„ dœed�   «      Z@ G dž„ dŸed    «      ZA G d¡„ d¢ed£   «      ZBy¤)¥aH  
Passthrough table repositories.

Each repository centralizes access to a single Prisma table behind a ``table``
property, making the repository the one place that names the underlying table.
These are thin wrappers for tables that do not (yet) need domain-specific query
methods; richer repositories live in their own modules.
é    )ÚTYPE_CHECKINGÚAnyÚFinalÚGeneric)Ú"wrap_table_actions_for_config_sync)ÚRowT_coÚTableActions)Úmodelsc                   óZ   — e Zd ZU dZeed<   defd„Zedefd„«       Z	ede
e   fd„«       Zy)	ÚPrismaTableRepositoryz8Base for repositories that expose a single Prisma table.Ú
table_nameÚprisma_clientc                 ó   — || _         y )N)Ú_prisma_client)Úselfr   s     úl/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/repositories/table_repositories.pyÚ__init__zPrismaTableRepository.__init__   s
   € Ø+ˆÕó    Úreturnc                 óH   — | j                   €t        d«      ‚| j                   S )NzFNo DB Connected. See - https://docs.litellm.ai/docs/proxy/virtual_keys)r   ÚRuntimeError)r   s    r   r   z#PrismaTableRepository.prisma_client   s&   € à×ÑÐ&ÜÐgÓhÐhØ×"Ñ"Ð"r   c                 ó„   — t        | j                  j                  | j                  «      }t	        || j                  ¬«      S )N)Úactionsr   )Úgetattrr   Údbr   r   )r   r   s     r   ÚtablezPrismaTableRepository.table!   s/   € ä07¸×8JÑ8J×8MÑ8MÈtÏÉÓ0_ˆÜ1¸'ÈdÏoÉoÔ^Ð^r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstrÚ__annotations__r   r   Úpropertyr   r	   r   r   © r   r   r   r      sT   … ÙBàƒOð, có ,ð ð#˜sò #ó ð#ð
 ð_�| GÑ,ò _ó ñ_r   r   c                   ó   — e Zd ZdZy)ÚPolicyRepositoryÚlitellm_policytableN©r   r   r   r   r$   r   r   r&   r&   '   ó   „ Ø&�Jr   r&   z!prisma_models.LiteLLM_PolicyTablec                   ó   — e Zd ZdZy)ÚAgentsRepositoryÚlitellm_agentstableNr(   r$   r   r   r+   r+   +   r)   r   r+   z!prisma_models.LiteLLM_AgentsTablec                   ó   — e Zd ZdZy)ÚObjectPermissionRepositoryÚlitellm_objectpermissiontableNr(   r$   r   r   r.   r.   /   ó   „ Ø0�Jr   r.   z+prisma_models.LiteLLM_ObjectPermissionTablec                   ó   — e Zd ZdZy)ÚGuardrailsRepositoryÚlitellm_guardrailstableNr(   r$   r   r   r2   r2   3   ó   „ Ø*�Jr   r2   z%prisma_models.LiteLLM_GuardrailsTablec                   ó   — e Zd ZdZy)ÚMCPServerRepositoryÚlitellm_mcpservertableNr(   r$   r   r   r6   r6   7   ó   „ Ø)�Jr   r6   z$prisma_models.LiteLLM_MCPServerTablec                   ó   — e Zd ZdZy)ÚManagedObjectRepositoryÚlitellm_managedobjecttableNr(   r$   r   r   r:   r:   ;   ó   „ Ø-�Jr   r:   z(prisma_models.LiteLLM_ManagedObjectTablec                   ó   — e Zd ZdZy)Ú OrganizationMembershipRepositoryÚlitellm_organizationmembershipNr(   r$   r   r   r>   r>   ?   ó   „ Ø1�Jr   r>   z,prisma_models.LiteLLM_OrganizationMembershipc                   ó   — e Zd ZdZy)ÚSpendLogsRepositoryÚlitellm_spendlogsNr(   r$   r   r   rB   rB   C   ó   „ Ø$�Jr   rB   zprisma_models.LiteLLM_SpendLogsc                   ó   — e Zd ZdZy)ÚBudgetWindowSpendRepositoryÚlitellm_budgetwindowspendNr(   r$   r   r   rF   rF   G   ó   „ Ø,�Jr   rF   z'prisma_models.LiteLLM_BudgetWindowSpendc                   ó   — e Zd ZdZy)ÚClaudeCodePluginRepositoryÚlitellm_claudecodeplugintableNr(   r$   r   r   rJ   rJ   K   r0   r   rJ   z+prisma_models.LiteLLM_ClaudeCodePluginTablec                   ó   — e Zd ZdZy)ÚTeamMembershipRepositoryÚlitellm_teammembershipNr(   r$   r   r   rM   rM   O   r8   r   rM   z$prisma_models.LiteLLM_TeamMembershipc                   ó   — e Zd ZdZy)ÚEndUserRepositoryÚlitellm_endusertableNr(   r$   r   r   rP   rP   S   s   „ Ø'�Jr   rP   z"prisma_models.LiteLLM_EndUserTablec                   ó   — e Zd ZdZy)ÚManagedVectorStoresRepositoryÚ litellm_managedvectorstorestableNr(   r$   r   r   rS   rS   W   ó   „ Ø3�Jr   rS   z.prisma_models.LiteLLM_ManagedVectorStoresTablec                   ó   — e Zd ZdZy)ÚMCPUserCredentialsRepositoryÚlitellm_mcpusercredentialsNr(   r$   r   r   rW   rW   [   r<   r   rW   z(prisma_models.LiteLLM_MCPUserCredentialsc                   ó   — e Zd ZdZy)ÚMCPServerOAuthClientRepositoryÚlitellm_mcpserveroauthclientNr(   r$   r   r   rZ   rZ   _   s   „ Ø/�Jr   rZ   z*prisma_models.LiteLLM_MCPServerOAuthClientc                   ó   — e Zd ZdZy)ÚPromptRepositoryÚlitellm_prompttableNr(   r$   r   r   r]   r]   c   r)   r   r]   z!prisma_models.LiteLLM_PromptTablec                   ó   — e Zd ZdZy)ÚTagRepositoryÚlitellm_tagtableNr(   r$   r   r   r`   r`   g   ó   „ Ø#�Jr   r`   zprisma_models.LiteLLM_TagTablec                   ó   — e Zd ZdZy)Ú ModelAccessGroupBudgetRepositoryÚ#litellm_modelaccessgroupbudgettableNr(   r$   r   r   rd   rd   k   ó   „ Ø6�Jr   rd   z1prisma_models.LiteLLM_ModelAccessGroupBudgetTablec                   ó   — e Zd ZdZy)ÚInvitationLinkRepositoryÚlitellm_invitationlinkNr(   r$   r   r   rh   rh   o   r8   r   rh   z$prisma_models.LiteLLM_InvitationLinkc                   ó   — e Zd ZdZy)ÚJWTKeyMappingRepositoryÚlitellm_jwtkeymappingNr(   r$   r   r   rk   rk   s   ó   „ Ø(�Jr   rk   z#prisma_models.LiteLLM_JWTKeyMappingc                   ó   — e Zd ZdZy)ÚManagedFileRepositoryÚlitellm_managedfiletableNr(   r$   r   r   ro   ro   w   ó   „ Ø+�Jr   ro   z&prisma_models.LiteLLM_ManagedFileTablec                   ó   — e Zd ZdZy)ÚMemoryRepositoryÚlitellm_memorytableNr(   r$   r   r   rs   rs   {   r)   r   rs   z!prisma_models.LiteLLM_MemoryTablec                   ó   — e Zd ZdZy)ÚSearchToolsRepositoryÚlitellm_searchtoolstableNr(   r$   r   r   rv   rv      rq   r   rv   z&prisma_models.LiteLLM_SearchToolsTablec                   ó   — e Zd ZdZy)ÚConfigOverridesRepositoryÚlitellm_configoverridesNr(   r$   r   r   ry   ry   ƒ   r4   r   ry   z%prisma_models.LiteLLM_ConfigOverridesc                   ó   — e Zd ZdZy)ÚMCPToolsetRepositoryÚlitellm_mcptoolsettableNr(   r$   r   r   r|   r|   ‡   r4   r   r|   z%prisma_models.LiteLLM_MCPToolsetTablec                   ó   — e Zd ZdZy)ÚToolRepositoryÚlitellm_tooltableNr(   r$   r   r   r   r   ‹   rD   r   r   zprisma_models.LiteLLM_ToolTablec                   ó   — e Zd ZdZy)Ú"DeletedVerificationTokenRepositoryÚ litellm_deletedverificationtokenNr(   r$   r   r   r‚   r‚   �   rU   r   r‚   z.prisma_models.LiteLLM_DeletedVerificationTokenc                   ó   — e Zd ZdZy)ÚWorkflowRunRepositoryÚlitellm_workflowrunNr(   r$   r   r   r…   r…   “   r)   r   r…   z!prisma_models.LiteLLM_WorkflowRunc                   ó   — e Zd ZdZy)ÚModelTableRepositoryÚlitellm_modeltableNr(   r$   r   r   rˆ   rˆ   —   ó   „ Ø%�Jr   rˆ   z prisma_models.LiteLLM_ModelTablec                   ó   — e Zd ZdZy)ÚAccessGroupRepositoryÚlitellm_accessgrouptableNr(   r$   r   r   rŒ   rŒ   ›   rq   r   rŒ   z&prisma_models.LiteLLM_AccessGroupTablec                   ó   — e Zd ZdZy)ÚSSOConfigRepositoryÚlitellm_ssoconfigNr(   r$   r   r   r�   r�   Ÿ   rD   r   r�   zprisma_models.LiteLLM_SSOConfigc                   ó   — e Zd ZdZy)ÚUISettingsRepositoryÚlitellm_uisettingsNr(   r$   r   r   r’   r’   £   rŠ   r   r’   z prisma_models.LiteLLM_UISettingsc                   ó   — e Zd ZdZy)ÚDailyGuardrailMetricsRepositoryÚlitellm_dailyguardrailmetricsNr(   r$   r   r   r•   r•   §   r0   r   r•   z+prisma_models.LiteLLM_DailyGuardrailMetricsc                   ó   — e Zd ZdZy)Ú"DailyGuardrailUsageUnitsRepositoryÚ litellm_dailyguardrailusageunitsNr(   r$   r   r   r˜   r˜   «   rU   r   r˜   z.prisma_models.LiteLLM_DailyGuardrailUsageUnitsc                   ó   — e Zd ZdZy)ÚPolicyAttachmentRepositoryÚlitellm_policyattachmenttableNr(   r$   r   r   r›   r›   ¯   r0   r   r›   z+prisma_models.LiteLLM_PolicyAttachmentTablec                   ó   — e Zd ZdZy)ÚDeletedTeamRepositoryÚlitellm_deletedteamtableNr(   r$   r   r   rž   rž   ³   rq   r   rž   z&prisma_models.LiteLLM_DeletedTeamTablec                   ó   — e Zd ZdZy)ÚSkillsRepositoryÚlitellm_skillstableNr(   r$   r   r   r¡   r¡   ·   r)   r   r¡   z!prisma_models.LiteLLM_SkillsTablec                   ó   — e Zd ZdZy)ÚCacheConfigRepositoryÚlitellm_cacheconfigNr(   r$   r   r   r¤   r¤   »   r)   r   r¤   z!prisma_models.LiteLLM_CacheConfigc                   ó   — e Zd ZdZy)Ú!ManagedVectorStoreIndexRepositoryÚ$litellm_managedvectorstoreindextableNr(   r$   r   r   r§   r§   ¿   s   „ Ø7�Jr   r§   z2prisma_models.LiteLLM_ManagedVectorStoreIndexTablec                   ó   — e Zd ZdZy)ÚWorkflowMessageRepositoryÚlitellm_workflowmessageNr(   r$   r   r   rª   rª   Ã   r4   r   rª   z%prisma_models.LiteLLM_WorkflowMessagec                   ó   — e Zd ZdZy)ÚDailyTagSpendRepositoryÚlitellm_dailytagspendNr(   r$   r   r   r­   r­   Ç   rm   r   r­   z#prisma_models.LiteLLM_DailyTagSpendc                   ó   — e Zd ZdZy)ÚSpendLogToolIndexRepositoryÚlitellm_spendlogtoolindexNr(   r$   r   r   r°   r°   Ë   rH   r   r°   z'prisma_models.LiteLLM_SpendLogToolIndexc                   ó   — e Zd ZdZy)ÚDailyToolSpendRepositoryÚlitellm_dailytoolspendNr(   r$   r   r   r³   r³   Ï   r8   r   r³   z$prisma_models.LiteLLM_DailyToolSpendc                   ó   — e Zd ZdZy)Ú SpendLogGuardrailIndexRepositoryÚlitellm_spendlogguardrailindexNr(   r$   r   r   r¶   r¶   Ó   r@   r   r¶   z,prisma_models.LiteLLM_SpendLogGuardrailIndexc                   ó   — e Zd ZdZy)ÚUserNotificationsRepositoryÚlitellm_usernotificationsNr(   r$   r   r   r¹   r¹   ×   rH   r   r¹   z'prisma_models.LiteLLM_UserNotificationsc                   ó   — e Zd ZdZy)ÚHealthCheckRepositoryÚlitellm_healthchecktableNr(   r$   r   r   r¼   r¼   Û   rq   r   r¼   z&prisma_models.LiteLLM_HealthCheckTablec                   ó   — e Zd ZdZy)Ú%DeprecatedVerificationTokenRepositoryÚ#litellm_deprecatedverificationtokenNr(   r$   r   r   r¿   r¿   ß   rf   r   r¿   z1prisma_models.LiteLLM_DeprecatedVerificationTokenc                   ó   — e Zd ZdZy)ÚWorkflowEventRepositoryÚlitellm_workfloweventNr(   r$   r   r   rÂ   rÂ   ã   rm   r   rÂ   z#prisma_models.LiteLLM_WorkflowEventc                   ó   — e Zd ZdZy)ÚDailyPolicyMetricsRepositoryÚlitellm_dailypolicymetricsNr(   r$   r   r   rÅ   rÅ   ç   r<   r   rÅ   z(prisma_models.LiteLLM_DailyPolicyMetricsc                   ó   — e Zd ZdZy)ÚAdaptiveRouterStateRepositoryÚlitellm_adaptiverouterstateNr(   r$   r   r   rÈ   rÈ   ë   s   „ Ø.�Jr   rÈ   z)prisma_models.LiteLLM_AdaptiveRouterStatec                   ó   — e Zd ZdZy)ÚAuditLogRepositoryÚlitellm_auditlogNr(   r$   r   r   rË   rË   ï   rb   r   rË   zprisma_models.LiteLLM_AuditLogc                   ó   — e Zd ZdZy)ÚAdaptiveRouterSessionRepositoryÚlitellm_adaptiveroutersessionNr(   r$   r   r   rÎ   rÎ   ó   r0   r   rÎ   z+prisma_models.LiteLLM_AdaptiveRouterSessionN)Cr    Útypingr   r   r   r   Ú-litellm.proxy.common_utils.config_sync_pubsubr   Ú%litellm.repositories.prisma_protocolsr   r	   Úprismar
   Úprisma_modelsr   r&   r+   r.   r2   r6   r:   r>   rB   rF   rJ   rM   rP   rS   rW   rZ   r]   r`   rd   rh   rk   ro   rs   rv   ry   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   ú<module>rÕ      s  ðñ÷ 6Ó 5å \ß GáÝ.ô_˜G GÑ,ô _ô('Ð,Ð-PÑQô 'ô'Ð,Ð-PÑQô 'ô1Ð!6Ð7dÑ!eô 1ô+Ð0Ð1XÑYô +ô*Ð/Ð0VÑWô *ô.Ð3Ð4^Ñ_ô .ô2Ð'<Ð=kÑ'lô 2ô%Ð/Ð0QÑRô %ô-Ð"7Ð8aÑ"bô -ô1Ð!6Ð7dÑ!eô 1ô*Ð4Ð5[Ñ\ô *ô(Ð-Ð.RÑSô (ô4Ð$9Ð:jÑ$kô 4ô.Ð#8Ð9cÑ#dô .ô0Ð%:Ð;gÑ%hô 0ô'Ð,Ð-PÑQô 'ô$Ð)Ð*JÑKô $ô7Ð'<Ð=pÑ'qô 7ô*Ð4Ð5[Ñ\ô *ô)Ð3Ð4YÑZô )ô,Ð1Ð2ZÑ[ô ,ô'Ð,Ð-PÑQô 'ô,Ð1Ð2ZÑ[ô ,ô+Ð 5Ð6]Ñ ^ô +ô+Ð0Ð1XÑYô +ô%Ð*Ð+LÑMô %ô4Ð)>Ð?oÑ)pô 4ô'Ð1Ð2UÑVô 'ô&Ð0Ð1SÑTô &ô,Ð1Ð2ZÑ[ô ,ô%Ð/Ð0QÑRô %ô&Ð0Ð1SÑTô &ô1Ð&;Ð<iÑ&jô 1ô4Ð)>Ð?oÑ)pô 4ô1Ð!6Ð7dÑ!eô 1ô,Ð1Ð2ZÑ[ô ,ô'Ð,Ð-PÑQô 'ô'Ð1Ð2UÑVô 'ô8Ð(=Ð>rÑ(sô 8ô+Ð 5Ð6]Ñ ^ô +ô)Ð3Ð4YÑZô )ô-Ð"7Ð8aÑ"bô -ô*Ð4Ð5[Ñ\ô *ô2Ð'<Ð=kÑ'lô 2ô-Ð"7Ð8aÑ"bô -ô,Ð1Ð2ZÑ[ô ,ô7Ð,AÐBuÑ,vô 7ô)Ð3Ð4YÑZô )ô.Ð#8Ð9cÑ#dô .ô/Ð$9Ð:eÑ$fô /ô$Ð.Ð/OÑPô $ô1Ð&;Ð<iÑ&jõ 1r   