cs-models 0.0.606__py3-none-any.whl → 0.0.827__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cs_models/database/operations.py +17 -5
- cs_models/resources/ArtifactVectorIndex/__init__.py +0 -0
- cs_models/resources/ArtifactVectorIndex/models.py +32 -0
- cs_models/resources/ArtifactVectorIndex/schemas.py +16 -0
- cs_models/resources/ArtifactVectorIndexQueue/__init__.py +0 -0
- cs_models/resources/ArtifactVectorIndexQueue/models.py +34 -0
- cs_models/resources/ArtifactVectorIndexQueue/schemas.py +17 -0
- cs_models/resources/AssistantCommand/models.py +14 -1
- cs_models/resources/AssistantCommand/schemas.py +2 -0
- cs_models/resources/AssistantCommandArtifact/__init__.py +0 -0
- cs_models/resources/AssistantCommandArtifact/models.py +33 -0
- cs_models/resources/AssistantCommandArtifact/schemas.py +15 -0
- cs_models/resources/AssistantCommandChart/__init__.py +0 -0
- cs_models/resources/AssistantCommandChart/models.py +37 -0
- cs_models/resources/AssistantCommandChart/schemas.py +16 -0
- cs_models/resources/AssistantSession/models.py +9 -1
- cs_models/resources/AssistantSession/schemas.py +4 -0
- cs_models/resources/AssistantUserQuery/models.py +5 -1
- cs_models/resources/AssistantUserQuery/schemas.py +40 -1
- cs_models/resources/B3CRSS/__init__.py +0 -0
- cs_models/resources/B3CRSS/models.py +25 -0
- cs_models/resources/B3CRSS/schemas.py +14 -0
- cs_models/resources/CampaignTracker/__init__.py +0 -0
- cs_models/resources/CampaignTracker/models.py +29 -0
- cs_models/resources/CampaignTracker/schemas.py +17 -0
- cs_models/resources/CompanyDrugCount/__init__.py +0 -0
- cs_models/resources/CompanyDrugCount/models.py +28 -0
- cs_models/resources/CompanyDrugCount/schemas.py +11 -0
- cs_models/resources/CompanyFiling/models.py +1 -0
- cs_models/resources/CompanyFiling/schemas.py +1 -0
- cs_models/resources/CompanyMarketCap/__init__.py +0 -0
- cs_models/resources/CompanyMarketCap/models.py +29 -0
- cs_models/resources/CompanyMarketCap/schemas.py +11 -0
- cs_models/resources/CompanyOUS/models.py +2 -0
- cs_models/resources/CompanyOUS/schemas.py +2 -0
- cs_models/resources/CompanyOutbox/models.py +1 -0
- cs_models/resources/CompanyOutbox/schemas.py +1 -0
- cs_models/resources/CompanyReview/models.py +4 -1
- cs_models/resources/CompanyReview/schemas.py +3 -0
- cs_models/resources/CompanySEC/models.py +2 -0
- cs_models/resources/CompanySEC/schemas.py +2 -0
- cs_models/resources/Config/models.py +2 -0
- cs_models/resources/Config/schemas.py +3 -0
- cs_models/resources/CoverPage13F/__init__.py +0 -0
- cs_models/resources/CoverPage13F/models.py +29 -0
- cs_models/resources/CoverPage13F/schemas.py +27 -0
- cs_models/resources/Cusip13FSubsidiary/__init__.py +0 -0
- cs_models/resources/Cusip13FSubsidiary/models.py +28 -0
- cs_models/resources/Cusip13FSubsidiary/schemas.py +14 -0
- cs_models/resources/Deal/models.py +4 -0
- cs_models/resources/Deal/schemas.py +3 -0
- cs_models/resources/DealAdvisor/__init__.py +0 -0
- cs_models/resources/DealAdvisor/models.py +35 -0
- cs_models/resources/DealAdvisor/schemas.py +15 -0
- cs_models/resources/DealInvestor/models.py +1 -0
- cs_models/resources/DealInvestor/schemas.py +1 -0
- cs_models/resources/DealType/__init__.py +0 -0
- cs_models/resources/DealType/models.py +33 -0
- cs_models/resources/DealType/schemas.py +14 -0
- cs_models/resources/DealUnderwriter/__init__.py +0 -0
- cs_models/resources/DealUnderwriter/models.py +35 -0
- cs_models/resources/DealUnderwriter/schemas.py +15 -0
- cs_models/resources/Designation/models.py +7 -0
- cs_models/resources/Designation/schemas.py +2 -0
- cs_models/resources/DesignationOutbox/models.py +2 -0
- cs_models/resources/DesignationOutbox/schemas.py +1 -0
- cs_models/resources/Digest/models.py +1 -0
- cs_models/resources/Digest/schemas.py +1 -0
- cs_models/resources/DocChunk/__init__.py +0 -0
- cs_models/resources/DocChunk/models.py +33 -0
- cs_models/resources/DocChunk/schemas.py +20 -0
- cs_models/resources/DocMarkdownTable/__init__.py +0 -0
- cs_models/resources/DocMarkdownTable/models.py +29 -0
- cs_models/resources/DocMarkdownTable/schemas.py +16 -0
- cs_models/resources/EventLLM/__init__.py +0 -0
- cs_models/resources/EventLLM/models.py +41 -0
- cs_models/resources/EventLLM/schemas.py +39 -0
- cs_models/resources/EventsQueue/__init__.py +0 -0
- cs_models/resources/EventsQueue/models.py +33 -0
- cs_models/resources/EventsQueue/schemas.py +18 -0
- cs_models/resources/ExplorerColumn/__init__.py +0 -0
- cs_models/resources/ExplorerColumn/models.py +33 -0
- cs_models/resources/ExplorerColumn/schemas.py +16 -0
- cs_models/resources/ExternalDrive/__init__.py +0 -0
- cs_models/resources/ExternalDrive/models.py +29 -0
- cs_models/resources/ExternalDrive/schemas.py +14 -0
- cs_models/resources/FDADrugReview/__init__.py +0 -0
- cs_models/resources/FDADrugReview/models.py +29 -0
- cs_models/resources/FDADrugReview/schemas.py +19 -0
- cs_models/resources/FDADrugReviewFile/__init__.py +0 -0
- cs_models/resources/FDADrugReviewFile/models.py +43 -0
- cs_models/resources/FDADrugReviewFile/schemas.py +22 -0
- cs_models/resources/FDADrugReviewFileCondition/__init__.py +0 -0
- cs_models/resources/FDADrugReviewFileCondition/models.py +42 -0
- cs_models/resources/FDADrugReviewFileCondition/schemas.py +18 -0
- cs_models/resources/FDADrugReviewFileIntervention/__init__.py +0 -0
- cs_models/resources/FDADrugReviewFileIntervention/models.py +42 -0
- cs_models/resources/FDADrugReviewFileIntervention/schemas.py +18 -0
- cs_models/resources/FDADrugReviewFileTarget/__init__.py +0 -0
- cs_models/resources/FDADrugReviewFileTarget/models.py +42 -0
- cs_models/resources/FDADrugReviewFileTarget/schemas.py +18 -0
- cs_models/resources/FDALabel/models.py +3 -0
- cs_models/resources/FDALabel/schemas.py +2 -0
- cs_models/resources/FDAMeetingFiling/models.py +1 -0
- cs_models/resources/FDAMeetingFiling/schemas.py +1 -0
- cs_models/resources/FinancingDealType/__init__.py +0 -0
- cs_models/resources/FinancingDealType/models.py +28 -0
- cs_models/resources/FinancingDealType/schemas.py +13 -0
- cs_models/resources/InfoTable13F/__init__.py +0 -0
- cs_models/resources/InfoTable13F/models.py +26 -0
- cs_models/resources/InfoTable13F/schemas.py +20 -0
- cs_models/resources/InterventionInterventionSalesData/__init__.py +0 -0
- cs_models/resources/InterventionInterventionSalesData/models.py +40 -0
- cs_models/resources/InterventionInterventionSalesData/schemas.py +16 -0
- cs_models/resources/InterventionSalesData/__init__.py +0 -0
- cs_models/resources/InterventionSalesData/models.py +51 -0
- cs_models/resources/InterventionSalesData/schemas.py +43 -0
- cs_models/resources/LicensingCollab/models.py +2 -1
- cs_models/resources/LicensingCollab/schemas.py +1 -0
- cs_models/resources/Meeting/models.py +8 -0
- cs_models/resources/Meeting/schemas.py +84 -0
- cs_models/resources/MeetingDataOutbox/__init__.py +0 -0
- cs_models/resources/MeetingDataOutbox/models.py +53 -0
- cs_models/resources/MeetingDataOutbox/schemas.py +27 -0
- cs_models/resources/MeetingDataOutboxRow/__init__.py +0 -0
- cs_models/resources/MeetingDataOutboxRow/models.py +30 -0
- cs_models/resources/MeetingDataOutboxRow/schemas.py +14 -0
- cs_models/resources/MindgramOAuth/__init__.py +0 -0
- cs_models/resources/MindgramOAuth/models.py +35 -0
- cs_models/resources/MindgramOAuth/schemas.py +33 -0
- cs_models/resources/NCTFDADrugReviewFile/__init__.py +0 -0
- cs_models/resources/NCTFDADrugReviewFile/models.py +37 -0
- cs_models/resources/NCTFDADrugReviewFile/schemas.py +16 -0
- cs_models/resources/NCTFacilities/models.py +1 -0
- cs_models/resources/NCTFacilities/schemas.py +1 -0
- cs_models/resources/NCTParticipationCriteria/__init__.py +0 -0
- cs_models/resources/NCTParticipationCriteria/models.py +28 -0
- cs_models/resources/NCTParticipationCriteria/schemas.py +14 -0
- cs_models/resources/NCTStudy/models.py +2 -0
- cs_models/resources/NCTStudy/schemas.py +2 -0
- cs_models/resources/NCTUserDocument/__init__.py +0 -0
- cs_models/resources/NCTUserDocument/models.py +37 -0
- cs_models/resources/NCTUserDocument/schemas.py +16 -0
- cs_models/resources/NotificationReadStatus/__init__.py +0 -0
- cs_models/resources/NotificationReadStatus/models.py +30 -0
- cs_models/resources/NotificationReadStatus/schemas.py +15 -0
- cs_models/resources/OCRJobs/__init__.py +0 -0
- cs_models/resources/OCRJobs/models.py +41 -0
- cs_models/resources/OCRJobs/schemas.py +22 -0
- cs_models/resources/OtherManager13F/__init__.py +0 -0
- cs_models/resources/OtherManager13F/models.py +18 -0
- cs_models/resources/OtherManager13F/schemas.py +12 -0
- cs_models/resources/OtherManager213F/__init__.py +0 -0
- cs_models/resources/OtherManager213F/models.py +15 -0
- cs_models/resources/OtherManager213F/schemas.py +13 -0
- cs_models/resources/Patent/models.py +3 -0
- cs_models/resources/Patent/schemas.py +2 -0
- cs_models/resources/PatentApplication/models.py +3 -0
- cs_models/resources/PatentApplication/schemas.py +2 -0
- cs_models/resources/PromptIndices/__init__.py +0 -0
- cs_models/resources/PromptIndices/models.py +27 -0
- cs_models/resources/PromptIndices/schemas.py +17 -0
- cs_models/resources/PubmedUserDocument/__init__.py +0 -0
- cs_models/resources/PubmedUserDocument/models.py +35 -0
- cs_models/resources/PubmedUserDocument/schemas.py +15 -0
- cs_models/resources/PubmedVectorIndex/__init__.py +0 -0
- cs_models/resources/PubmedVectorIndex/models.py +33 -0
- cs_models/resources/PubmedVectorIndex/schemas.py +16 -0
- cs_models/resources/PurpleBookPatent/__init__.py +0 -0
- cs_models/resources/PurpleBookPatent/models.py +30 -0
- cs_models/resources/PurpleBookPatent/schemas.py +18 -0
- cs_models/resources/SalesEstimate/__init__.py +0 -0
- cs_models/resources/SalesEstimate/models.py +39 -0
- cs_models/resources/SalesEstimate/schemas.py +26 -0
- cs_models/resources/SalesEstimateCompany/__init__.py +0 -0
- cs_models/resources/SalesEstimateCompany/models.py +38 -0
- cs_models/resources/SalesEstimateCompany/schemas.py +35 -0
- cs_models/resources/SalesEstimateCondition/__init__.py +0 -0
- cs_models/resources/SalesEstimateCondition/models.py +41 -0
- cs_models/resources/SalesEstimateCondition/schemas.py +17 -0
- cs_models/resources/SalesEstimateIntervention/__init__.py +0 -0
- cs_models/resources/SalesEstimateIntervention/models.py +41 -0
- cs_models/resources/SalesEstimateIntervention/schemas.py +17 -0
- cs_models/resources/SalesEstimateTarget/__init__.py +0 -0
- cs_models/resources/SalesEstimateTarget/models.py +41 -0
- cs_models/resources/SalesEstimateTarget/schemas.py +17 -0
- cs_models/resources/SalesTable/__init__.py +0 -0
- cs_models/resources/SalesTable/models.py +34 -0
- cs_models/resources/SalesTable/schemas.py +20 -0
- cs_models/resources/SearchLink/__init__.py +0 -0
- cs_models/resources/SearchLink/models.py +29 -0
- cs_models/resources/SearchLink/schemas.py +16 -0
- cs_models/resources/Signature13F/__init__.py +0 -0
- cs_models/resources/Signature13F/models.py +15 -0
- cs_models/resources/Signature13F/schemas.py +13 -0
- cs_models/resources/SmartDefGrid/__init__.py +0 -0
- cs_models/resources/SmartDefGrid/models.py +30 -0
- cs_models/resources/SmartDefGrid/schemas.py +52 -0
- cs_models/resources/SmartDefGridCell/__init__.py +0 -0
- cs_models/resources/SmartDefGridCell/models.py +51 -0
- cs_models/resources/SmartDefGridCell/schemas.py +39 -0
- cs_models/resources/SmartDefGridCellAnswer/__init__.py +0 -0
- cs_models/resources/SmartDefGridCellAnswer/models.py +45 -0
- cs_models/resources/SmartDefGridCellAnswer/schemas.py +23 -0
- cs_models/resources/SmartDefGridCellAnswerCitation/__init__.py +0 -0
- cs_models/resources/SmartDefGridCellAnswerCitation/models.py +21 -0
- cs_models/resources/SmartDefGridCellAnswerCitation/schemas.py +14 -0
- cs_models/resources/SmartDefGridCellQuestion/__init__.py +0 -0
- cs_models/resources/SmartDefGridCellQuestion/models.py +76 -0
- cs_models/resources/SmartDefGridCellQuestion/schemas.py +41 -0
- cs_models/resources/SmartDefGridCellValue/__init__.py +0 -0
- cs_models/resources/SmartDefGridCellValue/models.py +54 -0
- cs_models/resources/SmartDefGridCellValue/schemas.py +19 -0
- cs_models/resources/SmartDefGridRun/__init__.py +0 -0
- cs_models/resources/SmartDefGridRun/models.py +60 -0
- cs_models/resources/SmartDefGridRun/schemas.py +31 -0
- cs_models/resources/SmartGrid/__init__.py +0 -0
- cs_models/resources/SmartGrid/models.py +34 -0
- cs_models/resources/SmartGrid/schemas.py +18 -0
- cs_models/resources/SmartGridCell/__init__.py +0 -0
- cs_models/resources/SmartGridCell/models.py +44 -0
- cs_models/resources/SmartGridCell/schemas.py +22 -0
- cs_models/resources/Submission13F/__init__.py +0 -0
- cs_models/resources/Submission13F/models.py +12 -0
- cs_models/resources/Submission13F/schemas.py +10 -0
- cs_models/resources/SummaryPage13F/__init__.py +0 -0
- cs_models/resources/SummaryPage13F/models.py +12 -0
- cs_models/resources/SummaryPage13F/schemas.py +9 -0
- cs_models/resources/TableFigure/__init__.py +0 -0
- cs_models/resources/TableFigure/models.py +40 -0
- cs_models/resources/TableFigure/schemas.py +61 -0
- cs_models/resources/TableOutbox/models.py +4 -0
- cs_models/resources/TableOutbox/schemas.py +2 -0
- cs_models/resources/TargetSyn/models.py +4 -0
- cs_models/resources/TargetSyn/schemas.py +3 -0
- cs_models/resources/Transcript/__init__.py +0 -0
- cs_models/resources/Transcript/models.py +31 -0
- cs_models/resources/Transcript/schemas.py +20 -0
- cs_models/resources/TranscriptCondition/__init__.py +0 -0
- cs_models/resources/TranscriptCondition/models.py +41 -0
- cs_models/resources/TranscriptCondition/schemas.py +17 -0
- cs_models/resources/TranscriptEquity/__init__.py +0 -0
- cs_models/resources/TranscriptEquity/models.py +28 -0
- cs_models/resources/TranscriptEquity/schemas.py +15 -0
- cs_models/resources/TranscriptEquityCompany/__init__.py +0 -0
- cs_models/resources/TranscriptEquityCompany/models.py +34 -0
- cs_models/resources/TranscriptEquityCompany/schemas.py +16 -0
- cs_models/resources/TranscriptGrouping/__init__.py +0 -0
- cs_models/resources/TranscriptGrouping/models.py +23 -0
- cs_models/resources/TranscriptGrouping/schemas.py +14 -0
- cs_models/resources/TranscriptGroupingMap/__init__.py +0 -0
- cs_models/resources/TranscriptGroupingMap/models.py +31 -0
- cs_models/resources/TranscriptGroupingMap/schemas.py +14 -0
- cs_models/resources/TranscriptIntervention/__init__.py +0 -0
- cs_models/resources/TranscriptIntervention/models.py +41 -0
- cs_models/resources/TranscriptIntervention/schemas.py +17 -0
- cs_models/resources/TranscriptItem/__init__.py +0 -0
- cs_models/resources/TranscriptItem/models.py +35 -0
- cs_models/resources/TranscriptItem/schemas.py +20 -0
- cs_models/resources/TranscriptTarget/__init__.py +0 -0
- cs_models/resources/TranscriptTarget/models.py +41 -0
- cs_models/resources/TranscriptTarget/schemas.py +17 -0
- cs_models/resources/UserAutomatedDigest/__init__.py +0 -0
- cs_models/resources/UserAutomatedDigest/models.py +35 -0
- cs_models/resources/UserAutomatedDigest/schemas.py +19 -0
- cs_models/resources/UserDocument/__init__.py +0 -0
- cs_models/resources/UserDocument/models.py +42 -0
- cs_models/resources/UserDocument/schemas.py +24 -0
- cs_models/resources/UserDocumentAccess/__init__.py +0 -0
- cs_models/resources/UserDocumentAccess/models.py +29 -0
- cs_models/resources/UserDocumentAccess/schemas.py +18 -0
- cs_models/resources/UserDocumentChunk/__init__.py +0 -0
- cs_models/resources/UserDocumentChunk/models.py +35 -0
- cs_models/resources/UserDocumentChunk/schemas.py +18 -0
- cs_models/resources/UserDocumentCompany/__init__.py +0 -0
- cs_models/resources/UserDocumentCompany/models.py +40 -0
- cs_models/resources/UserDocumentCompany/schemas.py +36 -0
- cs_models/resources/UserDocumentCondition/__init__.py +0 -0
- cs_models/resources/UserDocumentCondition/models.py +42 -0
- cs_models/resources/UserDocumentCondition/schemas.py +18 -0
- cs_models/resources/UserDocumentHierarchy/__init__.py +0 -0
- cs_models/resources/UserDocumentHierarchy/models.py +51 -0
- cs_models/resources/UserDocumentHierarchy/schemas.py +24 -0
- cs_models/resources/UserDocumentIntervention/__init__.py +0 -0
- cs_models/resources/UserDocumentIntervention/models.py +42 -0
- cs_models/resources/UserDocumentIntervention/schemas.py +18 -0
- cs_models/resources/UserDocumentMeeting/__init__.py +0 -0
- cs_models/resources/UserDocumentMeeting/models.py +33 -0
- cs_models/resources/UserDocumentMeeting/schemas.py +14 -0
- cs_models/resources/UserDocumentTag/__init__.py +0 -0
- cs_models/resources/UserDocumentTag/models.py +31 -0
- cs_models/resources/UserDocumentTag/schemas.py +15 -0
- cs_models/resources/UserDocumentTarget/__init__.py +0 -0
- cs_models/resources/UserDocumentTarget/models.py +42 -0
- cs_models/resources/UserDocumentTarget/schemas.py +18 -0
- cs_models/resources/UserExplorerColumn/__init__.py +0 -0
- cs_models/resources/UserExplorerColumn/models.py +30 -0
- cs_models/resources/UserExplorerColumn/schemas.py +14 -0
- cs_models/resources/UserInternalDocWorkflow/__init__.py +0 -0
- cs_models/resources/UserInternalDocWorkflow/models.py +28 -0
- cs_models/resources/UserInternalDocWorkflow/schemas.py +11 -0
- cs_models/resources/UserMeeting/__init__.py +0 -0
- cs_models/resources/UserMeeting/models.py +31 -0
- cs_models/resources/UserMeeting/schemas.py +12 -0
- cs_models/resources/UserMeetingFavorite/__init__.py +0 -0
- cs_models/resources/UserMeetingFavorite/models.py +36 -0
- cs_models/resources/UserMeetingFavorite/schemas.py +13 -0
- cs_models/resources/UserOrganization/__init__.py +0 -0
- cs_models/resources/UserOrganization/models.py +26 -0
- cs_models/resources/UserOrganization/schemas.py +12 -0
- cs_models/resources/UserSavedSearch/models.py +1 -0
- cs_models/resources/UserSavedSearch/schemas.py +1 -0
- cs_models/resources/UserSavedSearchAccess/__init__.py +0 -0
- cs_models/resources/UserSavedSearchAccess/models.py +34 -0
- cs_models/resources/UserSavedSearchAccess/schemas.py +18 -0
- cs_models/resources/UserSavedSearchCollectionMap/__init__.py +0 -0
- cs_models/resources/UserSavedSearchCollectionMap/models.py +33 -0
- cs_models/resources/UserSavedSearchCollectionMap/schemas.py +14 -0
- cs_models/resources/UserSavedSearchDigest/__init__.py +0 -0
- cs_models/resources/UserSavedSearchDigest/models.py +36 -0
- cs_models/resources/UserSavedSearchDigest/schemas.py +16 -0
- cs_models/resources/UserVAParameterView/__init__.py +0 -0
- cs_models/resources/UserVAParameterView/models.py +27 -0
- cs_models/resources/UserVAParameterView/schemas.py +13 -0
- cs_models/resources/UserWatchlistAccess/__init__.py +0 -0
- cs_models/resources/UserWatchlistAccess/models.py +31 -0
- cs_models/resources/UserWatchlistAccess/schemas.py +15 -0
- cs_models/resources/UserWorkbook/__init__.py +0 -0
- cs_models/resources/UserWorkbook/models.py +31 -0
- cs_models/resources/UserWorkbook/schemas.py +15 -0
- cs_models/resources/UserWorkbookWorkflows/__init__.py +0 -0
- cs_models/resources/UserWorkbookWorkflows/models.py +27 -0
- cs_models/resources/UserWorkbookWorkflows/schemas.py +15 -0
- cs_models/resources/UserWorkbookWorkflowsShared/__init__.py +0 -0
- cs_models/resources/UserWorkbookWorkflowsShared/models.py +31 -0
- cs_models/resources/UserWorkbookWorkflowsShared/schemas.py +15 -0
- cs_models/resources/VACompanyMap/__init__.py +0 -0
- cs_models/resources/VACompanyMap/models.py +37 -0
- cs_models/resources/VACompanyMap/schemas.py +38 -0
- cs_models/resources/VAParameter/__init__.py +0 -0
- cs_models/resources/VAParameter/models.py +36 -0
- cs_models/resources/VAParameter/schemas.py +25 -0
- cs_models/resources/VAParameterCondition/__init__.py +0 -0
- cs_models/resources/VAParameterCondition/models.py +41 -0
- cs_models/resources/VAParameterCondition/schemas.py +17 -0
- cs_models/resources/VAParameterGeography/__init__.py +0 -0
- cs_models/resources/VAParameterGeography/models.py +0 -0
- cs_models/resources/VAParameterGeography/schemas.py +0 -0
- cs_models/resources/VAParameterIntervention/__init__.py +0 -0
- cs_models/resources/VAParameterIntervention/models.py +41 -0
- cs_models/resources/VAParameterIntervention/schemas.py +17 -0
- cs_models/resources/VAParameterValue/__init__.py +0 -0
- cs_models/resources/VAParameterValue/models.py +42 -0
- cs_models/resources/VAParameterValue/schemas.py +27 -0
- cs_models/resources/VAParameterView/__init__.py +0 -0
- cs_models/resources/VAParameterView/models.py +35 -0
- cs_models/resources/VAParameterView/schemas.py +15 -0
- cs_models/resources/ViewPublicAssistantUserQuery/__init__.py +0 -0
- cs_models/resources/ViewPublicAssistantUserQuery/models.py +30 -0
- cs_models/resources/ViewPublicAssistantUserQuery/schemas.py +14 -0
- cs_models/resources/ViewPublicWorkbook/__init__.py +0 -0
- cs_models/resources/ViewPublicWorkbook/models.py +30 -0
- cs_models/resources/ViewPublicWorkbook/schemas.py +14 -0
- cs_models/resources/ViewPublicationCondition/__init__.py +0 -0
- cs_models/resources/ViewPublicationCondition/models.py +32 -0
- cs_models/resources/ViewPublicationCondition/schemas.py +16 -0
- cs_models/resources/WatchlistDigest/__init__.py +0 -0
- cs_models/resources/WatchlistDigest/models.py +36 -0
- cs_models/resources/WatchlistDigest/schemas.py +16 -0
- cs_models/resources/Workbook/__init__.py +0 -0
- cs_models/resources/Workbook/models.py +37 -0
- cs_models/resources/Workbook/schemas.py +26 -0
- cs_models/resources/WorkbookBlock/__init__.py +0 -0
- cs_models/resources/WorkbookBlock/models.py +50 -0
- cs_models/resources/WorkbookBlock/schemas.py +63 -0
- cs_models/resources/WorkbookBlockComment/__init__.py +0 -0
- cs_models/resources/WorkbookBlockComment/models.py +36 -0
- cs_models/resources/WorkbookBlockComment/schemas.py +15 -0
- cs_models/resources/WorkbookMeta/__init__.py +0 -0
- cs_models/resources/WorkbookMeta/models.py +14 -0
- cs_models/resources/WorkbookMeta/schemas.py +9 -0
- cs_models/resources/WorkbookWorkflow/__init__.py +0 -0
- cs_models/resources/WorkbookWorkflow/models.py +39 -0
- cs_models/resources/WorkbookWorkflow/schemas.py +24 -0
- cs_models/resources/WorkbookWorkflowBlock/__init__.py +0 -0
- cs_models/resources/WorkbookWorkflowBlock/models.py +37 -0
- cs_models/resources/WorkbookWorkflowBlock/schemas.py +60 -0
- cs_models/utils/utils.py +27 -1
- cs_models-0.0.827.dist-info/METADATA +29 -0
- {cs_models-0.0.606.dist-info → cs_models-0.0.827.dist-info}/RECORD +392 -56
- {cs_models-0.0.606.dist-info → cs_models-0.0.827.dist-info}/WHEEL +1 -1
- cs_models-0.0.606.dist-info/METADATA +0 -29
- {cs_models-0.0.606.dist-info → cs_models-0.0.827.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import (
|
|
4
|
+
Column,
|
|
5
|
+
Integer,
|
|
6
|
+
DateTime,
|
|
7
|
+
ForeignKey,
|
|
8
|
+
Float,
|
|
9
|
+
Boolean,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from ...database import Base
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class SalesEstimateConditionModel(Base):
|
|
16
|
+
__tablename__ = "sales_estimate_conditions"
|
|
17
|
+
|
|
18
|
+
id = Column(Integer, primary_key=True)
|
|
19
|
+
sales_estimate_id = Column(
|
|
20
|
+
Integer,
|
|
21
|
+
ForeignKey('sales_estimates.id'),
|
|
22
|
+
nullable=False,
|
|
23
|
+
)
|
|
24
|
+
condition_id = Column(
|
|
25
|
+
Integer,
|
|
26
|
+
ForeignKey('conditions.id'),
|
|
27
|
+
nullable=False,
|
|
28
|
+
)
|
|
29
|
+
score = Column(
|
|
30
|
+
Float,
|
|
31
|
+
nullable=False,
|
|
32
|
+
)
|
|
33
|
+
preferred = Column(Boolean, nullable=True)
|
|
34
|
+
date = Column(DateTime, nullable=True)
|
|
35
|
+
updated_at = Column(
|
|
36
|
+
DateTime,
|
|
37
|
+
nullable=False,
|
|
38
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
39
|
+
default=lambda: datetime.utcnow(),
|
|
40
|
+
onupdate=lambda: datetime.utcnow(),
|
|
41
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
validate,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SalesEstimateConditionResourceSchema(Schema):
|
|
9
|
+
not_blank = validate.Length(min=1, error='Field cannot be blank')
|
|
10
|
+
|
|
11
|
+
id = fields.Integer(dump_only=True)
|
|
12
|
+
sales_estimate_id = fields.Integer(required=True)
|
|
13
|
+
condition_id = fields.Integer(required=True)
|
|
14
|
+
score = fields.Float(required=True)
|
|
15
|
+
preferred = fields.Boolean(allow_none=True)
|
|
16
|
+
date = fields.DateTime(allow_none=True)
|
|
17
|
+
updated_at = fields.DateTime()
|
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import (
|
|
4
|
+
Column,
|
|
5
|
+
Integer,
|
|
6
|
+
DateTime,
|
|
7
|
+
ForeignKey,
|
|
8
|
+
Boolean,
|
|
9
|
+
Float,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from ...database import Base
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class SalesEstimateInterventionModel(Base):
|
|
16
|
+
__tablename__ = "sales_estimate_interventions"
|
|
17
|
+
|
|
18
|
+
id = Column(Integer, primary_key=True)
|
|
19
|
+
sales_estimate_id = Column(
|
|
20
|
+
Integer,
|
|
21
|
+
ForeignKey('sales_estimates.id'),
|
|
22
|
+
nullable=False,
|
|
23
|
+
)
|
|
24
|
+
intervention_id = Column(
|
|
25
|
+
Integer,
|
|
26
|
+
ForeignKey('interventions.id'),
|
|
27
|
+
nullable=False,
|
|
28
|
+
)
|
|
29
|
+
score = Column(
|
|
30
|
+
Float,
|
|
31
|
+
nullable=False,
|
|
32
|
+
)
|
|
33
|
+
preferred = Column(Boolean, nullable=True)
|
|
34
|
+
date = Column(DateTime, nullable=True)
|
|
35
|
+
updated_at = Column(
|
|
36
|
+
DateTime,
|
|
37
|
+
nullable=False,
|
|
38
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
39
|
+
default=lambda: datetime.utcnow(),
|
|
40
|
+
onupdate=lambda: datetime.utcnow(),
|
|
41
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
validate,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SalesEstimateInterventionResourceSchema(Schema):
|
|
9
|
+
not_blank = validate.Length(min=1, error='Field cannot be blank')
|
|
10
|
+
|
|
11
|
+
id = fields.Integer(dump_only=True)
|
|
12
|
+
sales_estimate_id = fields.Integer(required=True)
|
|
13
|
+
intervention_id = fields.Integer(required=True)
|
|
14
|
+
score = fields.Float(required=True)
|
|
15
|
+
preferred = fields.Boolean(allow_none=True)
|
|
16
|
+
date = fields.DateTime(allow_none=True)
|
|
17
|
+
updated_at = fields.DateTime()
|
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import (
|
|
4
|
+
Column,
|
|
5
|
+
Integer,
|
|
6
|
+
DateTime,
|
|
7
|
+
ForeignKey,
|
|
8
|
+
Float,
|
|
9
|
+
Boolean,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from ...database import Base
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class SalesEstimateTargetModel(Base):
|
|
16
|
+
__tablename__ = "sales_estimate_targets"
|
|
17
|
+
|
|
18
|
+
id = Column(Integer, primary_key=True)
|
|
19
|
+
sales_estimate_id = Column(
|
|
20
|
+
Integer,
|
|
21
|
+
ForeignKey('sales_estimates.id'),
|
|
22
|
+
nullable=False,
|
|
23
|
+
)
|
|
24
|
+
target_id = Column(
|
|
25
|
+
Integer,
|
|
26
|
+
ForeignKey('targets.id'),
|
|
27
|
+
nullable=False,
|
|
28
|
+
)
|
|
29
|
+
score = Column(
|
|
30
|
+
Float,
|
|
31
|
+
nullable=False,
|
|
32
|
+
)
|
|
33
|
+
preferred = Column(Boolean, nullable=True)
|
|
34
|
+
date = Column(DateTime, nullable=True)
|
|
35
|
+
updated_at = Column(
|
|
36
|
+
DateTime,
|
|
37
|
+
nullable=False,
|
|
38
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
39
|
+
default=lambda: datetime.utcnow(),
|
|
40
|
+
onupdate=lambda: datetime.utcnow(),
|
|
41
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
validate,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SalesEstimateTargetResourceSchema(Schema):
|
|
9
|
+
not_blank = validate.Length(min=1, error='Field cannot be blank')
|
|
10
|
+
|
|
11
|
+
id = fields.Integer(dump_only=True)
|
|
12
|
+
sales_estimate_id = fields.Integer(required=True)
|
|
13
|
+
target_id = fields.Integer(required=True)
|
|
14
|
+
score = fields.Float(required=True)
|
|
15
|
+
preferred = fields.Boolean(allow_none=True)
|
|
16
|
+
date = fields.DateTime(allow_none=True)
|
|
17
|
+
updated_at = fields.DateTime()
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import (
|
|
4
|
+
Column,
|
|
5
|
+
Integer,
|
|
6
|
+
DateTime,
|
|
7
|
+
Text,
|
|
8
|
+
Float,
|
|
9
|
+
String,
|
|
10
|
+
Boolean,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
from ...database import Base
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class SalesTableModel(Base):
|
|
17
|
+
__tablename__ = "sales_tables"
|
|
18
|
+
|
|
19
|
+
id = Column(Integer, primary_key=True)
|
|
20
|
+
sec_accession_number = Column(String(128), nullable=False, index=True)
|
|
21
|
+
sec_cik = Column(String(128), nullable=False)
|
|
22
|
+
sec_file_name = Column(String(128), nullable=False)
|
|
23
|
+
table_number = Column(Integer, nullable=False)
|
|
24
|
+
table_preceding_info = Column(Text, nullable=True)
|
|
25
|
+
table_html = Column(Text, nullable=True)
|
|
26
|
+
score = Column(Float, nullable=True)
|
|
27
|
+
processed = Column(Boolean, nullable=True)
|
|
28
|
+
updated_at = Column(
|
|
29
|
+
DateTime,
|
|
30
|
+
nullable=False,
|
|
31
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
32
|
+
default=lambda: datetime.utcnow(),
|
|
33
|
+
onupdate=lambda: datetime.utcnow(),
|
|
34
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
validate,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SalesTableResourceSchema(Schema):
|
|
9
|
+
not_blank = validate.Length(min=1, error='Field cannot be blank')
|
|
10
|
+
|
|
11
|
+
id = fields.Integer(dump_only=True)
|
|
12
|
+
sec_accession_number = fields.String(required=True)
|
|
13
|
+
sec_cik = fields.String(required=True)
|
|
14
|
+
sec_file_name = fields.String(required=True)
|
|
15
|
+
table_number = fields.Integer(required=True)
|
|
16
|
+
table_html = fields.String(required=True)
|
|
17
|
+
table_preceding_info = fields.String(required=True)
|
|
18
|
+
score = fields.Float(allow_none=True)
|
|
19
|
+
processed = fields.Boolean(allow_none=True)
|
|
20
|
+
updated_at = fields.DateTime()
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import (
|
|
4
|
+
Column,
|
|
5
|
+
Integer,
|
|
6
|
+
DateTime,
|
|
7
|
+
Text,
|
|
8
|
+
String,
|
|
9
|
+
Boolean,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from ...database import Base
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class SearchLinkModel(Base):
|
|
16
|
+
__tablename__ = "search_links"
|
|
17
|
+
|
|
18
|
+
id = Column(Integer, primary_key=True)
|
|
19
|
+
user_id = Column(String(128), nullable=False)
|
|
20
|
+
type = Column(String(50), nullable=False)
|
|
21
|
+
payload = Column(Text, nullable=True)
|
|
22
|
+
is_active = Column(Boolean, nullable=True)
|
|
23
|
+
updated_at = Column(
|
|
24
|
+
DateTime,
|
|
25
|
+
nullable=False,
|
|
26
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
27
|
+
default=lambda: datetime.utcnow(),
|
|
28
|
+
onupdate=lambda: datetime.utcnow(),
|
|
29
|
+
)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
validate,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SearchLinkResourceSchema(Schema):
|
|
9
|
+
not_blank = validate.Length(min=1, error='Field cannot be blank')
|
|
10
|
+
|
|
11
|
+
id = fields.Integer(dump_only=True)
|
|
12
|
+
user_id = fields.String(required=True, validate=not_blank)
|
|
13
|
+
type = fields.String(required=True)
|
|
14
|
+
payload = fields.String(required=True)
|
|
15
|
+
is_active = fields.Boolean(allow_none=True)
|
|
16
|
+
updated_at = fields.DateTime()
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from sqlalchemy import Column, Integer, String, Date
|
|
2
|
+
from ...database import Base
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Signature13FModel(Base):
|
|
6
|
+
__tablename__ = '13fsignature'
|
|
7
|
+
|
|
8
|
+
ACCESSION_NUMBER = Column(String(25), primary_key=True)
|
|
9
|
+
NAME = Column(String(150), nullable=False)
|
|
10
|
+
TITLE = Column(String(60), nullable=False)
|
|
11
|
+
PHONE = Column(String(20))
|
|
12
|
+
SIGNATURE = Column(String(150), nullable=False)
|
|
13
|
+
CITY = Column(String(30), nullable=False)
|
|
14
|
+
STATEORCOUNTRY = Column(String(2), nullable=False)
|
|
15
|
+
SIGNATUREDATE = Column(Date, nullable=False)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from marshmallow import Schema, fields
|
|
2
|
+
from ...utils.utils import Safe13FDate
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Signature13FSchema(Schema):
|
|
6
|
+
ACCESSION_NUMBER = fields.String(required=True)
|
|
7
|
+
NAME = fields.String(required=True)
|
|
8
|
+
TITLE = fields.String(required=True)
|
|
9
|
+
PHONE = fields.String()
|
|
10
|
+
SIGNATURE = fields.String(required=True)
|
|
11
|
+
CITY = fields.String(required=True)
|
|
12
|
+
STATEORCOUNTRY = fields.String(required=True)
|
|
13
|
+
SIGNATUREDATE = Safe13FDate(required=True)
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from sqlalchemy import Column, DateTime, ForeignKey, Integer, String, JSON
|
|
3
|
+
from sqlalchemy.orm import relationship
|
|
4
|
+
from ...database import Base
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class SmartDefGridModel(Base):
|
|
8
|
+
"""
|
|
9
|
+
One extracted BlockNote table artifact.
|
|
10
|
+
You can link to your workbook/doc via source_* fields.
|
|
11
|
+
"""
|
|
12
|
+
__tablename__ = "smart_def_grids"
|
|
13
|
+
|
|
14
|
+
id = Column(Integer, primary_key=True, autoincrement=True) # table_id (uuid string)
|
|
15
|
+
workbook_id = Column(
|
|
16
|
+
Integer,
|
|
17
|
+
ForeignKey('workbooks.id'),
|
|
18
|
+
nullable=True,
|
|
19
|
+
primary_key=True,
|
|
20
|
+
)
|
|
21
|
+
source_block_id = Column(String(64), nullable=True) # BlockNote block id (if any)
|
|
22
|
+
|
|
23
|
+
outline_version = Column(Integer, nullable=False, default=1) # your normalize() version
|
|
24
|
+
outline_json = Column(JSON, nullable=False) # semantic outline payload
|
|
25
|
+
original_table_json = Column(JSON, nullable=False) # raw BlockNote table node (for rebuilds)
|
|
26
|
+
|
|
27
|
+
created_at = Column(DateTime, default=datetime.utcnow, nullable=False)
|
|
28
|
+
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, nullable=False)
|
|
29
|
+
|
|
30
|
+
cells = relationship("SmartDefGridCellModel", back_populates="table", cascade="all, delete-orphan")
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from marshmallow import Schema, fields, validate
|
|
2
|
+
from ..SmartDefGridCell.schemas import SmartDefGridCellResourceSchema
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class SmartDefGridResourceSchema(Schema):
|
|
6
|
+
"""
|
|
7
|
+
The user-defined table artifact (aka 'SmartDefGrid' resource).
|
|
8
|
+
- id is your table_id (UUID string or int—your choice).
|
|
9
|
+
- outline_json/original_table_json can be dicts (preferred) or JSON strings if you’d rather store serialized blobs.
|
|
10
|
+
"""
|
|
11
|
+
not_blank = validate.Length(min=1, error="Field cannot be blank")
|
|
12
|
+
|
|
13
|
+
id = fields.String(dump_only=True) # table_id
|
|
14
|
+
workbook_id = fields.Integer(allow_none=True) # if you link to a workbook
|
|
15
|
+
source_block_id = fields.String(allow_none=True)
|
|
16
|
+
|
|
17
|
+
outline_version = fields.Integer(allow_none=True)
|
|
18
|
+
# prefer dicts; switch to fields.String if you store JSON-serialized strings
|
|
19
|
+
outline_json = fields.Raw(required=True)
|
|
20
|
+
original_table_json = fields.Raw(required=True)
|
|
21
|
+
|
|
22
|
+
# read-only expansion of cells
|
|
23
|
+
cells = fields.Nested(
|
|
24
|
+
SmartDefGridCellResourceSchema(exclude=["smart_def_grid_id"]),
|
|
25
|
+
many=True,
|
|
26
|
+
dump_only=True,
|
|
27
|
+
# if you strictly want to hide 'table_id' inside each cell in this view:
|
|
28
|
+
# exclude=("table_id",),
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
created_at = fields.DateTime(dump_only=True)
|
|
32
|
+
updated_at = fields.DateTime(dump_only=True)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class SmartDefGridDetailResourceSchema(Schema):
|
|
36
|
+
id = fields.String(dump_only=True)
|
|
37
|
+
workbook_id = fields.String(allow_none=True)
|
|
38
|
+
source_block_id = fields.String(allow_none=True)
|
|
39
|
+
outline_version = fields.Integer(allow_none=True)
|
|
40
|
+
outline_json = fields.Raw(required=True)
|
|
41
|
+
original_table_json = fields.Raw(required=True)
|
|
42
|
+
created_at = fields.DateTime(dump_only=True)
|
|
43
|
+
updated_at = fields.DateTime(dump_only=True)
|
|
44
|
+
|
|
45
|
+
cells = fields.Nested(
|
|
46
|
+
SmartDefGridCellResourceSchema(),
|
|
47
|
+
many=True,
|
|
48
|
+
dump_only=True,
|
|
49
|
+
# include answers inlined under latest_question if you like:
|
|
50
|
+
only=("table_id","cell_id","row","col","is_header","formatting_spec",
|
|
51
|
+
"latest_question","applied_value"),
|
|
52
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from sqlalchemy import Column, DateTime, ForeignKey, Integer, String, JSON, Boolean, Index, UniqueConstraint
|
|
3
|
+
from sqlalchemy.orm import relationship
|
|
4
|
+
from ...database import Base
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class SmartDefGridCellModel(Base):
|
|
8
|
+
"""
|
|
9
|
+
One logical 'master' cell from the outline; the cell_id is stable.
|
|
10
|
+
Header cells exist too (is_header), in case you later want header questions.
|
|
11
|
+
"""
|
|
12
|
+
__tablename__ = "smart_def_grid_cells"
|
|
13
|
+
|
|
14
|
+
# Composite natural key (table_id, cell_id)
|
|
15
|
+
smart_def_grid_id = Column(Integer, ForeignKey("smart_def_grids.id", ondelete="CASCADE"), primary_key=True)
|
|
16
|
+
cell_id = Column(String(36), primary_key=True) # stable UUID you generated
|
|
17
|
+
|
|
18
|
+
# Positional metadata + spans help future reflow/debug, not needed at runtime for writeback
|
|
19
|
+
row = Column(Integer, nullable=False)
|
|
20
|
+
col = Column(Integer, nullable=False)
|
|
21
|
+
row_span = Column(Integer, nullable=False, default=1)
|
|
22
|
+
col_span = Column(Integer, nullable=False, default=1)
|
|
23
|
+
is_header = Column(Boolean, nullable=False, default=False)
|
|
24
|
+
|
|
25
|
+
header_path_row = Column(JSON, nullable=False, default=list) # ["Efficacy (vs PBO)", "Clinical Remission"]
|
|
26
|
+
header_path_col = Column(JSON, nullable=False, default=list) # ["Humira"] etc.
|
|
27
|
+
|
|
28
|
+
# Formatting guidance to apply when writing display strings
|
|
29
|
+
formatting_spec = Column(JSON, nullable=True)
|
|
30
|
+
|
|
31
|
+
# Optional: cache of the latest generated question id
|
|
32
|
+
latest_question_id = Column(Integer, ForeignKey("smart_def_grid_cell_questions.id"), nullable=True)
|
|
33
|
+
|
|
34
|
+
created_at = Column(DateTime, default=datetime.utcnow, nullable=False)
|
|
35
|
+
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, nullable=False)
|
|
36
|
+
|
|
37
|
+
table = relationship("SmartDefGridModel", back_populates="cells")
|
|
38
|
+
latest_question = relationship("SmartDefGridCellQuestionModel", foreign_keys=[latest_question_id], uselist=False)
|
|
39
|
+
|
|
40
|
+
# Canonical applied cell value (write-back)
|
|
41
|
+
applied_value = relationship(
|
|
42
|
+
"SmartDefGridCellValueModel",
|
|
43
|
+
back_populates="cell",
|
|
44
|
+
uselist=False,
|
|
45
|
+
cascade="all, delete-orphan",
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
__table_args__ = (
|
|
49
|
+
UniqueConstraint("smart_def_grid_id", "row", "col", name="uq_sdg_cell_pos"),
|
|
50
|
+
Index("ix_smart_def_grid_cells_header", "smart_def_grid_id", "is_header"),
|
|
51
|
+
)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from marshmallow import Schema, fields, validate
|
|
2
|
+
from ..SmartDefGridCellQuestion.schemas import SmartDefGridCellQuestionResourceSchema
|
|
3
|
+
from ..SmartDefGridCellValue.schemas import SmartDefGridCellValueResourceSchema
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class SmartDefGridCellResourceSchema(Schema):
|
|
7
|
+
"""
|
|
8
|
+
One logical (master) cell from the user-defined table.
|
|
9
|
+
"""
|
|
10
|
+
not_blank = validate.Length(min=1, error="Field cannot be blank")
|
|
11
|
+
|
|
12
|
+
smart_def_grid_id = fields.Integer(required=True)
|
|
13
|
+
cell_id = fields.String(required=True)
|
|
14
|
+
|
|
15
|
+
row = fields.Integer(required=True)
|
|
16
|
+
col = fields.Integer(required=True)
|
|
17
|
+
row_span = fields.Integer(required=True, data_key="rowSpan")
|
|
18
|
+
col_span = fields.Integer(required=True, data_key="colSpan")
|
|
19
|
+
is_header = fields.Boolean(required=True)
|
|
20
|
+
|
|
21
|
+
header_path_row = fields.List(fields.String(), required=True, data_key="headerPathRow")
|
|
22
|
+
header_path_col = fields.List(fields.String(), required=True, data_key="headerPathCol")
|
|
23
|
+
|
|
24
|
+
formatting_spec = fields.Raw(allow_none=True, data_key="formattingSpec")
|
|
25
|
+
|
|
26
|
+
latest_question_id = fields.String(allow_none=True)
|
|
27
|
+
created_at = fields.DateTime(dump_only=True)
|
|
28
|
+
updated_at = fields.DateTime(dump_only=True)
|
|
29
|
+
|
|
30
|
+
# optional, read-only projections
|
|
31
|
+
latest_question = fields.Nested(
|
|
32
|
+
SmartDefGridCellQuestionResourceSchema(),
|
|
33
|
+
dump_only=True,
|
|
34
|
+
exclude=("answers",),
|
|
35
|
+
)
|
|
36
|
+
applied_value = fields.Nested(
|
|
37
|
+
SmartDefGridCellValueResourceSchema(),
|
|
38
|
+
dump_only=True,
|
|
39
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from sqlalchemy import Column, DateTime, ForeignKey, Float, String, JSON, Integer, Index, Text, BigInteger, ForeignKeyConstraint
|
|
3
|
+
from sqlalchemy.orm import relationship
|
|
4
|
+
from ...database import Base
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class SmartDefGridCellAnswerModel(Base):
|
|
8
|
+
"""
|
|
9
|
+
Answers emitted by workers. Keep multiple rows per question (retries, models).
|
|
10
|
+
"""
|
|
11
|
+
__tablename__ = "smart_def_grid_cell_answers"
|
|
12
|
+
|
|
13
|
+
id = Column(BigInteger, primary_key=True, autoincrement=True)
|
|
14
|
+
question_id = Column(Integer, ForeignKey("smart_def_grid_cell_questions.id", ondelete="CASCADE"), nullable=False)
|
|
15
|
+
|
|
16
|
+
smart_def_grid_id = Column(Integer, ForeignKey("smart_def_grids.id", ondelete="CASCADE"), nullable=False)
|
|
17
|
+
run_id = Column(Integer, ForeignKey("smart_def_grid_runs.id", ondelete="SET NULL"), nullable=True)
|
|
18
|
+
cell_id = Column(String(36), nullable=False)
|
|
19
|
+
|
|
20
|
+
# canonical payload
|
|
21
|
+
raw_value = Column(Float, nullable=True) # numeric scalar (if any)
|
|
22
|
+
text_value = Column(Text, nullable=True) # string/summary
|
|
23
|
+
display_text = Column(Text, nullable=True) # preformatted; writeback may still reformat
|
|
24
|
+
citations = Column(JSON, nullable=True) # list of {url|doi|title|snippet|...}
|
|
25
|
+
extra_payload = Column(JSON, nullable=True) # any provider-specific structure
|
|
26
|
+
|
|
27
|
+
# provenance
|
|
28
|
+
provider = Column(String(64), nullable=True) # e.g., "gpt-4.1"
|
|
29
|
+
provider_meta = Column(JSON, nullable=True) # tokens, latency, etc.
|
|
30
|
+
|
|
31
|
+
created_at = Column(DateTime, default=datetime.utcnow, nullable=False)
|
|
32
|
+
|
|
33
|
+
# convenience index to quickly get latest by created_at
|
|
34
|
+
__table_args__ = (
|
|
35
|
+
ForeignKeyConstraint(
|
|
36
|
+
["smart_def_grid_id", "cell_id"],
|
|
37
|
+
["smart_def_grid_cells.smart_def_grid_id", "smart_def_grid_cells.cell_id"],
|
|
38
|
+
ondelete="CASCADE",
|
|
39
|
+
),
|
|
40
|
+
Index("ix_smart_def_grid_cell_answers_cell", "smart_def_grid_id", "cell_id", "created_at"),
|
|
41
|
+
Index("ix_sdgca_run_cell", "run_id", "smart_def_grid_id", "cell_id", "created_at"),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
question = relationship("SmartDefGridCellQuestionModel", back_populates="answers")
|
|
45
|
+
run = relationship("SmartDefGridRunModel")
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from marshmallow import Schema, fields
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class SmartDefGridCellAnswerResourceSchema(Schema):
|
|
5
|
+
id = fields.String(dump_only=True)
|
|
6
|
+
question_id = fields.Integer(required=True)
|
|
7
|
+
smart_def_grid_id = fields.Integer(required=True)
|
|
8
|
+
cell_id = fields.String(required=True)
|
|
9
|
+
|
|
10
|
+
raw_value = fields.Float(allow_none=True)
|
|
11
|
+
text_value = fields.String(allow_none=True)
|
|
12
|
+
display_text = fields.String(allow_none=True)
|
|
13
|
+
|
|
14
|
+
citations = fields.Raw(allow_none=True) # list/dict (or keep normalized rows separately)
|
|
15
|
+
extra_payload = fields.Raw(allow_none=True) # provider-specific data
|
|
16
|
+
|
|
17
|
+
provider = fields.String(allow_none=True)
|
|
18
|
+
provider_meta = fields.Raw(allow_none=True)
|
|
19
|
+
|
|
20
|
+
created_at = fields.DateTime(dump_only=True)
|
|
21
|
+
|
|
22
|
+
# if you materialize normalized citations, expose them here:
|
|
23
|
+
# citations_rel = fields.Nested(AnswerCitationResourceSchema, many=True, dump_only=True)
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from sqlalchemy import Column, DateTime, ForeignKey, String, JSON, Integer, Index, Text, BigInteger
|
|
2
|
+
from ...database import Base
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class SmartDefGridCellAnswerCitationModel(Base):
|
|
6
|
+
__tablename__ = "smart_def_grid_cell_answer_citations"
|
|
7
|
+
|
|
8
|
+
id = Column(BigInteger, primary_key=True, autoincrement=True)
|
|
9
|
+
answer_id = Column(Integer, ForeignKey("smart_def_grid_cell_answers.id", ondelete="CASCADE"), nullable=False)
|
|
10
|
+
|
|
11
|
+
source_type = Column(String(16), nullable=True) # 'url','doi','patent','pubmed'
|
|
12
|
+
source_id = Column(String(256), nullable=True) # doi, pubmed id, etc.
|
|
13
|
+
url = Column(Text, nullable=True)
|
|
14
|
+
title = Column(Text, nullable=True)
|
|
15
|
+
snippet = Column(Text, nullable=True)
|
|
16
|
+
published_at = Column(DateTime, nullable=True)
|
|
17
|
+
extra = Column(JSON, nullable=True)
|
|
18
|
+
|
|
19
|
+
__table_args__ = (
|
|
20
|
+
Index("ix_smart_def_grid_cell_answer_citations_source", "source_type", "source_id"),
|
|
21
|
+
)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from marshmallow import Schema, fields, validate
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class SmartDefGridCellAnswerCitationResourceSchema(Schema):
|
|
5
|
+
id = fields.Integer(dump_only=True)
|
|
6
|
+
answer_id = fields.Integer(required=True)
|
|
7
|
+
|
|
8
|
+
source_type = fields.String(allow_none=True)
|
|
9
|
+
source_id = fields.String(allow_none=True)
|
|
10
|
+
url = fields.String(allow_none=True)
|
|
11
|
+
title = fields.String(allow_none=True)
|
|
12
|
+
snippet = fields.String(allow_none=True)
|
|
13
|
+
published_at = fields.DateTime(allow_none=True)
|
|
14
|
+
extra = fields.Raw(allow_none=True) # any additional normalized payload
|
|
File without changes
|