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.
Files changed (393) hide show
  1. cs_models/database/operations.py +17 -5
  2. cs_models/resources/ArtifactVectorIndex/__init__.py +0 -0
  3. cs_models/resources/ArtifactVectorIndex/models.py +32 -0
  4. cs_models/resources/ArtifactVectorIndex/schemas.py +16 -0
  5. cs_models/resources/ArtifactVectorIndexQueue/__init__.py +0 -0
  6. cs_models/resources/ArtifactVectorIndexQueue/models.py +34 -0
  7. cs_models/resources/ArtifactVectorIndexQueue/schemas.py +17 -0
  8. cs_models/resources/AssistantCommand/models.py +14 -1
  9. cs_models/resources/AssistantCommand/schemas.py +2 -0
  10. cs_models/resources/AssistantCommandArtifact/__init__.py +0 -0
  11. cs_models/resources/AssistantCommandArtifact/models.py +33 -0
  12. cs_models/resources/AssistantCommandArtifact/schemas.py +15 -0
  13. cs_models/resources/AssistantCommandChart/__init__.py +0 -0
  14. cs_models/resources/AssistantCommandChart/models.py +37 -0
  15. cs_models/resources/AssistantCommandChart/schemas.py +16 -0
  16. cs_models/resources/AssistantSession/models.py +9 -1
  17. cs_models/resources/AssistantSession/schemas.py +4 -0
  18. cs_models/resources/AssistantUserQuery/models.py +5 -1
  19. cs_models/resources/AssistantUserQuery/schemas.py +40 -1
  20. cs_models/resources/B3CRSS/__init__.py +0 -0
  21. cs_models/resources/B3CRSS/models.py +25 -0
  22. cs_models/resources/B3CRSS/schemas.py +14 -0
  23. cs_models/resources/CampaignTracker/__init__.py +0 -0
  24. cs_models/resources/CampaignTracker/models.py +29 -0
  25. cs_models/resources/CampaignTracker/schemas.py +17 -0
  26. cs_models/resources/CompanyDrugCount/__init__.py +0 -0
  27. cs_models/resources/CompanyDrugCount/models.py +28 -0
  28. cs_models/resources/CompanyDrugCount/schemas.py +11 -0
  29. cs_models/resources/CompanyFiling/models.py +1 -0
  30. cs_models/resources/CompanyFiling/schemas.py +1 -0
  31. cs_models/resources/CompanyMarketCap/__init__.py +0 -0
  32. cs_models/resources/CompanyMarketCap/models.py +29 -0
  33. cs_models/resources/CompanyMarketCap/schemas.py +11 -0
  34. cs_models/resources/CompanyOUS/models.py +2 -0
  35. cs_models/resources/CompanyOUS/schemas.py +2 -0
  36. cs_models/resources/CompanyOutbox/models.py +1 -0
  37. cs_models/resources/CompanyOutbox/schemas.py +1 -0
  38. cs_models/resources/CompanyReview/models.py +4 -1
  39. cs_models/resources/CompanyReview/schemas.py +3 -0
  40. cs_models/resources/CompanySEC/models.py +2 -0
  41. cs_models/resources/CompanySEC/schemas.py +2 -0
  42. cs_models/resources/Config/models.py +2 -0
  43. cs_models/resources/Config/schemas.py +3 -0
  44. cs_models/resources/CoverPage13F/__init__.py +0 -0
  45. cs_models/resources/CoverPage13F/models.py +29 -0
  46. cs_models/resources/CoverPage13F/schemas.py +27 -0
  47. cs_models/resources/Cusip13FSubsidiary/__init__.py +0 -0
  48. cs_models/resources/Cusip13FSubsidiary/models.py +28 -0
  49. cs_models/resources/Cusip13FSubsidiary/schemas.py +14 -0
  50. cs_models/resources/Deal/models.py +4 -0
  51. cs_models/resources/Deal/schemas.py +3 -0
  52. cs_models/resources/DealAdvisor/__init__.py +0 -0
  53. cs_models/resources/DealAdvisor/models.py +35 -0
  54. cs_models/resources/DealAdvisor/schemas.py +15 -0
  55. cs_models/resources/DealInvestor/models.py +1 -0
  56. cs_models/resources/DealInvestor/schemas.py +1 -0
  57. cs_models/resources/DealType/__init__.py +0 -0
  58. cs_models/resources/DealType/models.py +33 -0
  59. cs_models/resources/DealType/schemas.py +14 -0
  60. cs_models/resources/DealUnderwriter/__init__.py +0 -0
  61. cs_models/resources/DealUnderwriter/models.py +35 -0
  62. cs_models/resources/DealUnderwriter/schemas.py +15 -0
  63. cs_models/resources/Designation/models.py +7 -0
  64. cs_models/resources/Designation/schemas.py +2 -0
  65. cs_models/resources/DesignationOutbox/models.py +2 -0
  66. cs_models/resources/DesignationOutbox/schemas.py +1 -0
  67. cs_models/resources/Digest/models.py +1 -0
  68. cs_models/resources/Digest/schemas.py +1 -0
  69. cs_models/resources/DocChunk/__init__.py +0 -0
  70. cs_models/resources/DocChunk/models.py +33 -0
  71. cs_models/resources/DocChunk/schemas.py +20 -0
  72. cs_models/resources/DocMarkdownTable/__init__.py +0 -0
  73. cs_models/resources/DocMarkdownTable/models.py +29 -0
  74. cs_models/resources/DocMarkdownTable/schemas.py +16 -0
  75. cs_models/resources/EventLLM/__init__.py +0 -0
  76. cs_models/resources/EventLLM/models.py +41 -0
  77. cs_models/resources/EventLLM/schemas.py +39 -0
  78. cs_models/resources/EventsQueue/__init__.py +0 -0
  79. cs_models/resources/EventsQueue/models.py +33 -0
  80. cs_models/resources/EventsQueue/schemas.py +18 -0
  81. cs_models/resources/ExplorerColumn/__init__.py +0 -0
  82. cs_models/resources/ExplorerColumn/models.py +33 -0
  83. cs_models/resources/ExplorerColumn/schemas.py +16 -0
  84. cs_models/resources/ExternalDrive/__init__.py +0 -0
  85. cs_models/resources/ExternalDrive/models.py +29 -0
  86. cs_models/resources/ExternalDrive/schemas.py +14 -0
  87. cs_models/resources/FDADrugReview/__init__.py +0 -0
  88. cs_models/resources/FDADrugReview/models.py +29 -0
  89. cs_models/resources/FDADrugReview/schemas.py +19 -0
  90. cs_models/resources/FDADrugReviewFile/__init__.py +0 -0
  91. cs_models/resources/FDADrugReviewFile/models.py +43 -0
  92. cs_models/resources/FDADrugReviewFile/schemas.py +22 -0
  93. cs_models/resources/FDADrugReviewFileCondition/__init__.py +0 -0
  94. cs_models/resources/FDADrugReviewFileCondition/models.py +42 -0
  95. cs_models/resources/FDADrugReviewFileCondition/schemas.py +18 -0
  96. cs_models/resources/FDADrugReviewFileIntervention/__init__.py +0 -0
  97. cs_models/resources/FDADrugReviewFileIntervention/models.py +42 -0
  98. cs_models/resources/FDADrugReviewFileIntervention/schemas.py +18 -0
  99. cs_models/resources/FDADrugReviewFileTarget/__init__.py +0 -0
  100. cs_models/resources/FDADrugReviewFileTarget/models.py +42 -0
  101. cs_models/resources/FDADrugReviewFileTarget/schemas.py +18 -0
  102. cs_models/resources/FDALabel/models.py +3 -0
  103. cs_models/resources/FDALabel/schemas.py +2 -0
  104. cs_models/resources/FDAMeetingFiling/models.py +1 -0
  105. cs_models/resources/FDAMeetingFiling/schemas.py +1 -0
  106. cs_models/resources/FinancingDealType/__init__.py +0 -0
  107. cs_models/resources/FinancingDealType/models.py +28 -0
  108. cs_models/resources/FinancingDealType/schemas.py +13 -0
  109. cs_models/resources/InfoTable13F/__init__.py +0 -0
  110. cs_models/resources/InfoTable13F/models.py +26 -0
  111. cs_models/resources/InfoTable13F/schemas.py +20 -0
  112. cs_models/resources/InterventionInterventionSalesData/__init__.py +0 -0
  113. cs_models/resources/InterventionInterventionSalesData/models.py +40 -0
  114. cs_models/resources/InterventionInterventionSalesData/schemas.py +16 -0
  115. cs_models/resources/InterventionSalesData/__init__.py +0 -0
  116. cs_models/resources/InterventionSalesData/models.py +51 -0
  117. cs_models/resources/InterventionSalesData/schemas.py +43 -0
  118. cs_models/resources/LicensingCollab/models.py +2 -1
  119. cs_models/resources/LicensingCollab/schemas.py +1 -0
  120. cs_models/resources/Meeting/models.py +8 -0
  121. cs_models/resources/Meeting/schemas.py +84 -0
  122. cs_models/resources/MeetingDataOutbox/__init__.py +0 -0
  123. cs_models/resources/MeetingDataOutbox/models.py +53 -0
  124. cs_models/resources/MeetingDataOutbox/schemas.py +27 -0
  125. cs_models/resources/MeetingDataOutboxRow/__init__.py +0 -0
  126. cs_models/resources/MeetingDataOutboxRow/models.py +30 -0
  127. cs_models/resources/MeetingDataOutboxRow/schemas.py +14 -0
  128. cs_models/resources/MindgramOAuth/__init__.py +0 -0
  129. cs_models/resources/MindgramOAuth/models.py +35 -0
  130. cs_models/resources/MindgramOAuth/schemas.py +33 -0
  131. cs_models/resources/NCTFDADrugReviewFile/__init__.py +0 -0
  132. cs_models/resources/NCTFDADrugReviewFile/models.py +37 -0
  133. cs_models/resources/NCTFDADrugReviewFile/schemas.py +16 -0
  134. cs_models/resources/NCTFacilities/models.py +1 -0
  135. cs_models/resources/NCTFacilities/schemas.py +1 -0
  136. cs_models/resources/NCTParticipationCriteria/__init__.py +0 -0
  137. cs_models/resources/NCTParticipationCriteria/models.py +28 -0
  138. cs_models/resources/NCTParticipationCriteria/schemas.py +14 -0
  139. cs_models/resources/NCTStudy/models.py +2 -0
  140. cs_models/resources/NCTStudy/schemas.py +2 -0
  141. cs_models/resources/NCTUserDocument/__init__.py +0 -0
  142. cs_models/resources/NCTUserDocument/models.py +37 -0
  143. cs_models/resources/NCTUserDocument/schemas.py +16 -0
  144. cs_models/resources/NotificationReadStatus/__init__.py +0 -0
  145. cs_models/resources/NotificationReadStatus/models.py +30 -0
  146. cs_models/resources/NotificationReadStatus/schemas.py +15 -0
  147. cs_models/resources/OCRJobs/__init__.py +0 -0
  148. cs_models/resources/OCRJobs/models.py +41 -0
  149. cs_models/resources/OCRJobs/schemas.py +22 -0
  150. cs_models/resources/OtherManager13F/__init__.py +0 -0
  151. cs_models/resources/OtherManager13F/models.py +18 -0
  152. cs_models/resources/OtherManager13F/schemas.py +12 -0
  153. cs_models/resources/OtherManager213F/__init__.py +0 -0
  154. cs_models/resources/OtherManager213F/models.py +15 -0
  155. cs_models/resources/OtherManager213F/schemas.py +13 -0
  156. cs_models/resources/Patent/models.py +3 -0
  157. cs_models/resources/Patent/schemas.py +2 -0
  158. cs_models/resources/PatentApplication/models.py +3 -0
  159. cs_models/resources/PatentApplication/schemas.py +2 -0
  160. cs_models/resources/PromptIndices/__init__.py +0 -0
  161. cs_models/resources/PromptIndices/models.py +27 -0
  162. cs_models/resources/PromptIndices/schemas.py +17 -0
  163. cs_models/resources/PubmedUserDocument/__init__.py +0 -0
  164. cs_models/resources/PubmedUserDocument/models.py +35 -0
  165. cs_models/resources/PubmedUserDocument/schemas.py +15 -0
  166. cs_models/resources/PubmedVectorIndex/__init__.py +0 -0
  167. cs_models/resources/PubmedVectorIndex/models.py +33 -0
  168. cs_models/resources/PubmedVectorIndex/schemas.py +16 -0
  169. cs_models/resources/PurpleBookPatent/__init__.py +0 -0
  170. cs_models/resources/PurpleBookPatent/models.py +30 -0
  171. cs_models/resources/PurpleBookPatent/schemas.py +18 -0
  172. cs_models/resources/SalesEstimate/__init__.py +0 -0
  173. cs_models/resources/SalesEstimate/models.py +39 -0
  174. cs_models/resources/SalesEstimate/schemas.py +26 -0
  175. cs_models/resources/SalesEstimateCompany/__init__.py +0 -0
  176. cs_models/resources/SalesEstimateCompany/models.py +38 -0
  177. cs_models/resources/SalesEstimateCompany/schemas.py +35 -0
  178. cs_models/resources/SalesEstimateCondition/__init__.py +0 -0
  179. cs_models/resources/SalesEstimateCondition/models.py +41 -0
  180. cs_models/resources/SalesEstimateCondition/schemas.py +17 -0
  181. cs_models/resources/SalesEstimateIntervention/__init__.py +0 -0
  182. cs_models/resources/SalesEstimateIntervention/models.py +41 -0
  183. cs_models/resources/SalesEstimateIntervention/schemas.py +17 -0
  184. cs_models/resources/SalesEstimateTarget/__init__.py +0 -0
  185. cs_models/resources/SalesEstimateTarget/models.py +41 -0
  186. cs_models/resources/SalesEstimateTarget/schemas.py +17 -0
  187. cs_models/resources/SalesTable/__init__.py +0 -0
  188. cs_models/resources/SalesTable/models.py +34 -0
  189. cs_models/resources/SalesTable/schemas.py +20 -0
  190. cs_models/resources/SearchLink/__init__.py +0 -0
  191. cs_models/resources/SearchLink/models.py +29 -0
  192. cs_models/resources/SearchLink/schemas.py +16 -0
  193. cs_models/resources/Signature13F/__init__.py +0 -0
  194. cs_models/resources/Signature13F/models.py +15 -0
  195. cs_models/resources/Signature13F/schemas.py +13 -0
  196. cs_models/resources/SmartDefGrid/__init__.py +0 -0
  197. cs_models/resources/SmartDefGrid/models.py +30 -0
  198. cs_models/resources/SmartDefGrid/schemas.py +52 -0
  199. cs_models/resources/SmartDefGridCell/__init__.py +0 -0
  200. cs_models/resources/SmartDefGridCell/models.py +51 -0
  201. cs_models/resources/SmartDefGridCell/schemas.py +39 -0
  202. cs_models/resources/SmartDefGridCellAnswer/__init__.py +0 -0
  203. cs_models/resources/SmartDefGridCellAnswer/models.py +45 -0
  204. cs_models/resources/SmartDefGridCellAnswer/schemas.py +23 -0
  205. cs_models/resources/SmartDefGridCellAnswerCitation/__init__.py +0 -0
  206. cs_models/resources/SmartDefGridCellAnswerCitation/models.py +21 -0
  207. cs_models/resources/SmartDefGridCellAnswerCitation/schemas.py +14 -0
  208. cs_models/resources/SmartDefGridCellQuestion/__init__.py +0 -0
  209. cs_models/resources/SmartDefGridCellQuestion/models.py +76 -0
  210. cs_models/resources/SmartDefGridCellQuestion/schemas.py +41 -0
  211. cs_models/resources/SmartDefGridCellValue/__init__.py +0 -0
  212. cs_models/resources/SmartDefGridCellValue/models.py +54 -0
  213. cs_models/resources/SmartDefGridCellValue/schemas.py +19 -0
  214. cs_models/resources/SmartDefGridRun/__init__.py +0 -0
  215. cs_models/resources/SmartDefGridRun/models.py +60 -0
  216. cs_models/resources/SmartDefGridRun/schemas.py +31 -0
  217. cs_models/resources/SmartGrid/__init__.py +0 -0
  218. cs_models/resources/SmartGrid/models.py +34 -0
  219. cs_models/resources/SmartGrid/schemas.py +18 -0
  220. cs_models/resources/SmartGridCell/__init__.py +0 -0
  221. cs_models/resources/SmartGridCell/models.py +44 -0
  222. cs_models/resources/SmartGridCell/schemas.py +22 -0
  223. cs_models/resources/Submission13F/__init__.py +0 -0
  224. cs_models/resources/Submission13F/models.py +12 -0
  225. cs_models/resources/Submission13F/schemas.py +10 -0
  226. cs_models/resources/SummaryPage13F/__init__.py +0 -0
  227. cs_models/resources/SummaryPage13F/models.py +12 -0
  228. cs_models/resources/SummaryPage13F/schemas.py +9 -0
  229. cs_models/resources/TableFigure/__init__.py +0 -0
  230. cs_models/resources/TableFigure/models.py +40 -0
  231. cs_models/resources/TableFigure/schemas.py +61 -0
  232. cs_models/resources/TableOutbox/models.py +4 -0
  233. cs_models/resources/TableOutbox/schemas.py +2 -0
  234. cs_models/resources/TargetSyn/models.py +4 -0
  235. cs_models/resources/TargetSyn/schemas.py +3 -0
  236. cs_models/resources/Transcript/__init__.py +0 -0
  237. cs_models/resources/Transcript/models.py +31 -0
  238. cs_models/resources/Transcript/schemas.py +20 -0
  239. cs_models/resources/TranscriptCondition/__init__.py +0 -0
  240. cs_models/resources/TranscriptCondition/models.py +41 -0
  241. cs_models/resources/TranscriptCondition/schemas.py +17 -0
  242. cs_models/resources/TranscriptEquity/__init__.py +0 -0
  243. cs_models/resources/TranscriptEquity/models.py +28 -0
  244. cs_models/resources/TranscriptEquity/schemas.py +15 -0
  245. cs_models/resources/TranscriptEquityCompany/__init__.py +0 -0
  246. cs_models/resources/TranscriptEquityCompany/models.py +34 -0
  247. cs_models/resources/TranscriptEquityCompany/schemas.py +16 -0
  248. cs_models/resources/TranscriptGrouping/__init__.py +0 -0
  249. cs_models/resources/TranscriptGrouping/models.py +23 -0
  250. cs_models/resources/TranscriptGrouping/schemas.py +14 -0
  251. cs_models/resources/TranscriptGroupingMap/__init__.py +0 -0
  252. cs_models/resources/TranscriptGroupingMap/models.py +31 -0
  253. cs_models/resources/TranscriptGroupingMap/schemas.py +14 -0
  254. cs_models/resources/TranscriptIntervention/__init__.py +0 -0
  255. cs_models/resources/TranscriptIntervention/models.py +41 -0
  256. cs_models/resources/TranscriptIntervention/schemas.py +17 -0
  257. cs_models/resources/TranscriptItem/__init__.py +0 -0
  258. cs_models/resources/TranscriptItem/models.py +35 -0
  259. cs_models/resources/TranscriptItem/schemas.py +20 -0
  260. cs_models/resources/TranscriptTarget/__init__.py +0 -0
  261. cs_models/resources/TranscriptTarget/models.py +41 -0
  262. cs_models/resources/TranscriptTarget/schemas.py +17 -0
  263. cs_models/resources/UserAutomatedDigest/__init__.py +0 -0
  264. cs_models/resources/UserAutomatedDigest/models.py +35 -0
  265. cs_models/resources/UserAutomatedDigest/schemas.py +19 -0
  266. cs_models/resources/UserDocument/__init__.py +0 -0
  267. cs_models/resources/UserDocument/models.py +42 -0
  268. cs_models/resources/UserDocument/schemas.py +24 -0
  269. cs_models/resources/UserDocumentAccess/__init__.py +0 -0
  270. cs_models/resources/UserDocumentAccess/models.py +29 -0
  271. cs_models/resources/UserDocumentAccess/schemas.py +18 -0
  272. cs_models/resources/UserDocumentChunk/__init__.py +0 -0
  273. cs_models/resources/UserDocumentChunk/models.py +35 -0
  274. cs_models/resources/UserDocumentChunk/schemas.py +18 -0
  275. cs_models/resources/UserDocumentCompany/__init__.py +0 -0
  276. cs_models/resources/UserDocumentCompany/models.py +40 -0
  277. cs_models/resources/UserDocumentCompany/schemas.py +36 -0
  278. cs_models/resources/UserDocumentCondition/__init__.py +0 -0
  279. cs_models/resources/UserDocumentCondition/models.py +42 -0
  280. cs_models/resources/UserDocumentCondition/schemas.py +18 -0
  281. cs_models/resources/UserDocumentHierarchy/__init__.py +0 -0
  282. cs_models/resources/UserDocumentHierarchy/models.py +51 -0
  283. cs_models/resources/UserDocumentHierarchy/schemas.py +24 -0
  284. cs_models/resources/UserDocumentIntervention/__init__.py +0 -0
  285. cs_models/resources/UserDocumentIntervention/models.py +42 -0
  286. cs_models/resources/UserDocumentIntervention/schemas.py +18 -0
  287. cs_models/resources/UserDocumentMeeting/__init__.py +0 -0
  288. cs_models/resources/UserDocumentMeeting/models.py +33 -0
  289. cs_models/resources/UserDocumentMeeting/schemas.py +14 -0
  290. cs_models/resources/UserDocumentTag/__init__.py +0 -0
  291. cs_models/resources/UserDocumentTag/models.py +31 -0
  292. cs_models/resources/UserDocumentTag/schemas.py +15 -0
  293. cs_models/resources/UserDocumentTarget/__init__.py +0 -0
  294. cs_models/resources/UserDocumentTarget/models.py +42 -0
  295. cs_models/resources/UserDocumentTarget/schemas.py +18 -0
  296. cs_models/resources/UserExplorerColumn/__init__.py +0 -0
  297. cs_models/resources/UserExplorerColumn/models.py +30 -0
  298. cs_models/resources/UserExplorerColumn/schemas.py +14 -0
  299. cs_models/resources/UserInternalDocWorkflow/__init__.py +0 -0
  300. cs_models/resources/UserInternalDocWorkflow/models.py +28 -0
  301. cs_models/resources/UserInternalDocWorkflow/schemas.py +11 -0
  302. cs_models/resources/UserMeeting/__init__.py +0 -0
  303. cs_models/resources/UserMeeting/models.py +31 -0
  304. cs_models/resources/UserMeeting/schemas.py +12 -0
  305. cs_models/resources/UserMeetingFavorite/__init__.py +0 -0
  306. cs_models/resources/UserMeetingFavorite/models.py +36 -0
  307. cs_models/resources/UserMeetingFavorite/schemas.py +13 -0
  308. cs_models/resources/UserOrganization/__init__.py +0 -0
  309. cs_models/resources/UserOrganization/models.py +26 -0
  310. cs_models/resources/UserOrganization/schemas.py +12 -0
  311. cs_models/resources/UserSavedSearch/models.py +1 -0
  312. cs_models/resources/UserSavedSearch/schemas.py +1 -0
  313. cs_models/resources/UserSavedSearchAccess/__init__.py +0 -0
  314. cs_models/resources/UserSavedSearchAccess/models.py +34 -0
  315. cs_models/resources/UserSavedSearchAccess/schemas.py +18 -0
  316. cs_models/resources/UserSavedSearchCollectionMap/__init__.py +0 -0
  317. cs_models/resources/UserSavedSearchCollectionMap/models.py +33 -0
  318. cs_models/resources/UserSavedSearchCollectionMap/schemas.py +14 -0
  319. cs_models/resources/UserSavedSearchDigest/__init__.py +0 -0
  320. cs_models/resources/UserSavedSearchDigest/models.py +36 -0
  321. cs_models/resources/UserSavedSearchDigest/schemas.py +16 -0
  322. cs_models/resources/UserVAParameterView/__init__.py +0 -0
  323. cs_models/resources/UserVAParameterView/models.py +27 -0
  324. cs_models/resources/UserVAParameterView/schemas.py +13 -0
  325. cs_models/resources/UserWatchlistAccess/__init__.py +0 -0
  326. cs_models/resources/UserWatchlistAccess/models.py +31 -0
  327. cs_models/resources/UserWatchlistAccess/schemas.py +15 -0
  328. cs_models/resources/UserWorkbook/__init__.py +0 -0
  329. cs_models/resources/UserWorkbook/models.py +31 -0
  330. cs_models/resources/UserWorkbook/schemas.py +15 -0
  331. cs_models/resources/UserWorkbookWorkflows/__init__.py +0 -0
  332. cs_models/resources/UserWorkbookWorkflows/models.py +27 -0
  333. cs_models/resources/UserWorkbookWorkflows/schemas.py +15 -0
  334. cs_models/resources/UserWorkbookWorkflowsShared/__init__.py +0 -0
  335. cs_models/resources/UserWorkbookWorkflowsShared/models.py +31 -0
  336. cs_models/resources/UserWorkbookWorkflowsShared/schemas.py +15 -0
  337. cs_models/resources/VACompanyMap/__init__.py +0 -0
  338. cs_models/resources/VACompanyMap/models.py +37 -0
  339. cs_models/resources/VACompanyMap/schemas.py +38 -0
  340. cs_models/resources/VAParameter/__init__.py +0 -0
  341. cs_models/resources/VAParameter/models.py +36 -0
  342. cs_models/resources/VAParameter/schemas.py +25 -0
  343. cs_models/resources/VAParameterCondition/__init__.py +0 -0
  344. cs_models/resources/VAParameterCondition/models.py +41 -0
  345. cs_models/resources/VAParameterCondition/schemas.py +17 -0
  346. cs_models/resources/VAParameterGeography/__init__.py +0 -0
  347. cs_models/resources/VAParameterGeography/models.py +0 -0
  348. cs_models/resources/VAParameterGeography/schemas.py +0 -0
  349. cs_models/resources/VAParameterIntervention/__init__.py +0 -0
  350. cs_models/resources/VAParameterIntervention/models.py +41 -0
  351. cs_models/resources/VAParameterIntervention/schemas.py +17 -0
  352. cs_models/resources/VAParameterValue/__init__.py +0 -0
  353. cs_models/resources/VAParameterValue/models.py +42 -0
  354. cs_models/resources/VAParameterValue/schemas.py +27 -0
  355. cs_models/resources/VAParameterView/__init__.py +0 -0
  356. cs_models/resources/VAParameterView/models.py +35 -0
  357. cs_models/resources/VAParameterView/schemas.py +15 -0
  358. cs_models/resources/ViewPublicAssistantUserQuery/__init__.py +0 -0
  359. cs_models/resources/ViewPublicAssistantUserQuery/models.py +30 -0
  360. cs_models/resources/ViewPublicAssistantUserQuery/schemas.py +14 -0
  361. cs_models/resources/ViewPublicWorkbook/__init__.py +0 -0
  362. cs_models/resources/ViewPublicWorkbook/models.py +30 -0
  363. cs_models/resources/ViewPublicWorkbook/schemas.py +14 -0
  364. cs_models/resources/ViewPublicationCondition/__init__.py +0 -0
  365. cs_models/resources/ViewPublicationCondition/models.py +32 -0
  366. cs_models/resources/ViewPublicationCondition/schemas.py +16 -0
  367. cs_models/resources/WatchlistDigest/__init__.py +0 -0
  368. cs_models/resources/WatchlistDigest/models.py +36 -0
  369. cs_models/resources/WatchlistDigest/schemas.py +16 -0
  370. cs_models/resources/Workbook/__init__.py +0 -0
  371. cs_models/resources/Workbook/models.py +37 -0
  372. cs_models/resources/Workbook/schemas.py +26 -0
  373. cs_models/resources/WorkbookBlock/__init__.py +0 -0
  374. cs_models/resources/WorkbookBlock/models.py +50 -0
  375. cs_models/resources/WorkbookBlock/schemas.py +63 -0
  376. cs_models/resources/WorkbookBlockComment/__init__.py +0 -0
  377. cs_models/resources/WorkbookBlockComment/models.py +36 -0
  378. cs_models/resources/WorkbookBlockComment/schemas.py +15 -0
  379. cs_models/resources/WorkbookMeta/__init__.py +0 -0
  380. cs_models/resources/WorkbookMeta/models.py +14 -0
  381. cs_models/resources/WorkbookMeta/schemas.py +9 -0
  382. cs_models/resources/WorkbookWorkflow/__init__.py +0 -0
  383. cs_models/resources/WorkbookWorkflow/models.py +39 -0
  384. cs_models/resources/WorkbookWorkflow/schemas.py +24 -0
  385. cs_models/resources/WorkbookWorkflowBlock/__init__.py +0 -0
  386. cs_models/resources/WorkbookWorkflowBlock/models.py +37 -0
  387. cs_models/resources/WorkbookWorkflowBlock/schemas.py +60 -0
  388. cs_models/utils/utils.py +27 -1
  389. cs_models-0.0.827.dist-info/METADATA +29 -0
  390. {cs_models-0.0.606.dist-info → cs_models-0.0.827.dist-info}/RECORD +392 -56
  391. {cs_models-0.0.606.dist-info → cs_models-0.0.827.dist-info}/WHEEL +1 -1
  392. cs_models-0.0.606.dist-info/METADATA +0 -29
  393. {cs_models-0.0.606.dist-info → cs_models-0.0.827.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,76 @@
1
+ import enum
2
+ from datetime import datetime
3
+ from sqlalchemy import Column, DateTime, ForeignKey, Integer, String, JSON, Boolean, Index, Text, Enum, ForeignKeyConstraint
4
+ from sqlalchemy.orm import relationship
5
+ from ...database import Base
6
+
7
+
8
+ class QuestionStatus(str, enum.Enum):
9
+ pending = "pending" # created, not enqueued yet
10
+ queued = "queued" # sent to your queue
11
+ running = "running" # worker picked it up
12
+ succeeded = "succeeded" # at least one answer persisted
13
+ failed = "failed" # irrecoverable error (manual retry/override)
14
+ cancelled = "cancelled" # cancelled
15
+
16
+
17
+ class ExpectedType(str, enum.Enum):
18
+ number = "number"
19
+ text = "text"
20
+
21
+
22
+ class SmartDefGridCellQuestionModel(Base):
23
+ """
24
+ One question per cell (you may create new ones on re-ask/revision).
25
+ """
26
+ __tablename__ = "smart_def_grid_cell_questions"
27
+
28
+ id = Column(Integer, primary_key=True, autoincrement=True) # question_id (uuid)
29
+ smart_def_grid_id = Column(Integer, ForeignKey("smart_def_grids.id", ondelete="CASCADE"), nullable=False)
30
+ run_id = Column(Integer, ForeignKey("smart_def_grid_runs.id", ondelete="SET NULL"), nullable=True)
31
+ cell_id = Column(String(36), nullable=False)
32
+
33
+ question_text = Column(Text, nullable=False)
34
+ expected_type = Column(Enum(ExpectedType), nullable=False)
35
+ must_cite = Column(Boolean, nullable=False, default=True)
36
+
37
+ topic_key = Column(JSON, nullable=True)
38
+ retrieval_hints = Column(JSON, nullable=True)
39
+
40
+ # Answer
41
+ answer_text = Column(Text, nullable=True)
42
+ answer_info = Column(JSON, nullable=True)
43
+
44
+ # Queue & lifecycle
45
+ status = Column(Enum(QuestionStatus), nullable=False, default=QuestionStatus.pending)
46
+ priority = Column(Integer, nullable=False, default=5) # lower = higher priority
47
+ attempts = Column(Integer, nullable=False, default=0)
48
+ last_error = Column(Text, nullable=True)
49
+
50
+ idempotency_key = Column(String(64), nullable=True) # to avoid dup work
51
+ dedupe_hash = Column(String(64), nullable=True) # e.g., hash(table_id, cell_id, question_text)
52
+
53
+ created_at = Column(DateTime, default=datetime.utcnow, nullable=False)
54
+ updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, nullable=False)
55
+ started_at = Column(DateTime, nullable=True)
56
+ finished_at = Column(DateTime, nullable=True)
57
+
58
+ # relationships
59
+ answers = relationship("SmartDefGridCellAnswerModel", back_populates="question", cascade="all, delete-orphan")
60
+ run = relationship("SmartDefGridRunModel")
61
+
62
+ __table_args__ = (
63
+ # Useful to grab next jobs: status+priority+created
64
+ Index("ix_smart_def_grid_cell_questions_queue", "status", "priority", "created_at"),
65
+ # Quick lookup for this cell's active question(s)
66
+ Index("ix_smart_def_grid_cell_questions_cell", "smart_def_grid_id", "cell_id"),
67
+ Index("ix_sdgcq_run_status", "run_id", "status", "priority", "created_at"),
68
+ Index("ix_sdgcq_run_cell", "run_id", "smart_def_grid_id", "cell_id"),
69
+ ForeignKeyConstraint(
70
+ ["smart_def_grid_id", "cell_id"],
71
+ ["smart_def_grid_cells.smart_def_grid_id", "smart_def_grid_cells.cell_id"],
72
+ ondelete="CASCADE",
73
+ ),
74
+ # strong uniqueness if you want only one ACTIVE per cell; or enforce app-side
75
+ # UniqueConstraint("table_id", "cell_id", "status", name="uq_cell_question_cell_status"),
76
+ )
@@ -0,0 +1,41 @@
1
+ from marshmallow import Schema, fields, validate
2
+ from ..SmartDefGridCellAnswer.schemas import SmartDefGridCellAnswerResourceSchema
3
+
4
+
5
+ QUESTION_STATUS = ["pending", "queued", "running", "succeeded", "failed", "cancelled"]
6
+ EXPECTED_TYPE = ["number", "text", "citationList", "json"]
7
+
8
+
9
+ class SmartDefGridCellQuestionResourceSchema(Schema):
10
+ not_blank = validate.Length(min=1, error="Field cannot be blank")
11
+
12
+ id = fields.String(dump_only=True)
13
+ smart_def_grid_id = fields.Integer(required=True)
14
+ run_id = fields.Integer(allow_none=True)
15
+ cell_id = fields.String(required=True)
16
+
17
+ question_text = fields.String(required=True, validate=not_blank)
18
+ expected_type = fields.String(required=True, validate=validate.OneOf(EXPECTED_TYPE))
19
+ must_cite = fields.Boolean(required=True)
20
+
21
+ topic_key = fields.Raw(allow_none=True) # e.g., {"row":[...], "col":[...]}
22
+ retrieval_hints = fields.Raw(allow_none=True)
23
+
24
+ answer_text = fields.String(allow_none=True)
25
+ answer_info = fields.Raw(allow_none=True)
26
+
27
+ status = fields.String(required=True, validate=validate.OneOf(QUESTION_STATUS))
28
+ priority = fields.Integer(required=True)
29
+ attempts = fields.Integer(required=True)
30
+ last_error = fields.String(allow_none=True)
31
+
32
+ idempotency_key = fields.String(allow_none=True)
33
+ dedupe_hash = fields.String(allow_none=True)
34
+
35
+ created_at = fields.DateTime(dump_only=True)
36
+ updated_at = fields.DateTime(dump_only=True)
37
+ started_at = fields.DateTime(dump_only=True)
38
+ finished_at = fields.DateTime(dump_only=True)
39
+
40
+ # light nesting of answers on read
41
+ answers = fields.Nested(SmartDefGridCellAnswerResourceSchema(), many=True, dump_only=True)
File without changes
@@ -0,0 +1,54 @@
1
+ from datetime import datetime
2
+ from sqlalchemy import Column, DateTime, ForeignKey, Float, String, JSON, Boolean, Integer, Text, ForeignKeyConstraint, and_
3
+ from sqlalchemy.orm import relationship
4
+ from ...database import Base
5
+ from ..SmartDefGridCell.models import SmartDefGridCellModel
6
+
7
+
8
+ class SmartDefGridCellValueModel(Base):
9
+ """
10
+ The canonical, last-applied value for a cell in the user table (what's rendered back).
11
+ This is what your UI reads to show the latest state (without opening BlockNote).
12
+ """
13
+ __tablename__ = "smart_def_grid_cell_values"
14
+
15
+ smart_def_grid_id = Column(Integer, ForeignKey("smart_def_grids.id", ondelete="CASCADE"), primary_key=True)
16
+ applied_run_id = Column(Integer, ForeignKey("smart_def_grid_runs.id", ondelete="SET NULL"), nullable=True)
17
+ cell_id = Column(String(36), primary_key=True)
18
+
19
+ # applied value derived from a specific answer_id (or manual override)
20
+ answer_id = Column(Integer, ForeignKey("smart_def_grid_cell_answers.id", ondelete="SET NULL"), nullable=True)
21
+ raw_value = Column(Float, nullable=True)
22
+ display_text = Column(Text, nullable=True)
23
+ citations = Column(JSON, nullable=True)
24
+ formatting_used = Column(JSON, nullable=True) # snapshot of FormattingSpec used to render
25
+
26
+ # flags
27
+ manual_override = Column(Boolean, nullable=False, default=False)
28
+ note = Column(Text, nullable=True)
29
+
30
+ applied_at = Column(DateTime, default=datetime.utcnow, nullable=False)
31
+ updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, nullable=False)
32
+
33
+ __table_args__ = (
34
+ ForeignKeyConstraint(
35
+ ["smart_def_grid_id", "cell_id"],
36
+ ["smart_def_grid_cells.smart_def_grid_id", "smart_def_grid_cells.cell_id"],
37
+ ondelete="CASCADE",
38
+ ),
39
+ )
40
+
41
+ # relationships
42
+ cell = relationship(
43
+ "SmartDefGridCellModel",
44
+ back_populates="applied_value",
45
+ uselist=False,
46
+ primaryjoin=lambda: and_(
47
+ SmartDefGridCellValueModel.smart_def_grid_id == SmartDefGridCellModel.smart_def_grid_id,
48
+ SmartDefGridCellValueModel.cell_id == SmartDefGridCellModel.cell_id,
49
+ ),
50
+ foreign_keys=lambda: [SmartDefGridCellValueModel.smart_def_grid_id, SmartDefGridCellValueModel.cell_id],
51
+ )
52
+
53
+ answer = relationship("SmartDefGridCellAnswerModel", foreign_keys=[answer_id])
54
+ applied_run = relationship("SmartDefGridRunModel")
@@ -0,0 +1,19 @@
1
+ from marshmallow import Schema, fields
2
+
3
+
4
+ class SmartDefGridCellValueResourceSchema(Schema):
5
+ smart_def_grid_id = fields.Integer(required=True)
6
+ applied_run_id = fields.Integer(allow_none=True)
7
+ cell_id = fields.String(required=True)
8
+
9
+ answer_id = fields.Integer(allow_none=True)
10
+ raw_value = fields.Float(allow_none=True)
11
+ display_text = fields.String(allow_none=True)
12
+ citations = fields.Raw(allow_none=True)
13
+ formatting_used = fields.Raw(allow_none=True)
14
+
15
+ manual_override = fields.Boolean(required=True, default=False)
16
+ note = fields.String(allow_none=True)
17
+
18
+ applied_at = fields.DateTime(dump_only=True)
19
+ updated_at = fields.DateTime(dump_only=True)
File without changes
@@ -0,0 +1,60 @@
1
+ from enum import Enum
2
+ from datetime import datetime
3
+ from sqlalchemy import Enum as SAEnum
4
+ from sqlalchemy import Column, DateTime, ForeignKey, Integer, String, JSON, Text, Index
5
+ from sqlalchemy.orm import relationship
6
+ from ...database import Base
7
+
8
+
9
+ class SmartDefGridRunStatus(str, Enum):
10
+ created = "created"
11
+ dispatched = "dispatched"
12
+ running = "running"
13
+ succeeded = "succeeded"
14
+ failed = "failed"
15
+ cancelled = "cancelled"
16
+ partial = "partial" # finished with some failed cells
17
+
18
+
19
+ class SmartDefGridRunScope(str, Enum):
20
+ all = "all"
21
+ empty_only = "empty_only"
22
+
23
+
24
+ class SmartDefGridRunModel(Base):
25
+ __tablename__ = "smart_def_grid_runs"
26
+
27
+ id = Column(Integer, primary_key=True, autoincrement=True) # run_id
28
+ smart_def_grid_id = Column(Integer, ForeignKey("smart_def_grids.id", ondelete="CASCADE"), nullable=False)
29
+
30
+ scope_mode = Column(SAEnum(SmartDefGridRunScope), nullable=False, default=SmartDefGridRunScope.all)
31
+
32
+ # optional snapshotting to make runs reproducible/debuggable
33
+ outline_json = Column(JSON, nullable=False) # new outline created for this run
34
+ original_table_json = Column(JSON, nullable=False) # stamped block at run start
35
+ targets_json = Column(JSON, nullable=True)
36
+
37
+ # execution metadata
38
+ status = Column(
39
+ SAEnum(
40
+ SmartDefGridRunStatus,
41
+ validate_strings=True, # allow assigning "created" etc. as strings too
42
+ ),
43
+ nullable=False,
44
+ default=SmartDefGridRunStatus.created,
45
+ )
46
+
47
+ started_by_user_id = Column(String(64), nullable=False)
48
+ notes = Column(Text, nullable=True)
49
+ # optional idempotency token if you want “re-run latest”
50
+ client_token = Column(String(128), nullable=True, index=True)
51
+
52
+ created_at = Column(DateTime, default=datetime.utcnow, nullable=False)
53
+ started_at = Column(DateTime, nullable=True)
54
+ finished_at = Column(DateTime, nullable=True)
55
+ updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, nullable=False)
56
+
57
+ grid = relationship("SmartDefGridModel", backref="runs")
58
+ __table_args__ = (
59
+ Index("ix_sdgr_runs_grid_created", "smart_def_grid_id", "created_at"),
60
+ )
@@ -0,0 +1,31 @@
1
+ from marshmallow import Schema, fields, validate
2
+
3
+
4
+ class SmartDefGridRunResourceSchema(Schema):
5
+ """
6
+ The user-defined table artifact (aka 'SmartDefGrid' resource).
7
+ - id is your table_id (UUID string or int—your choice).
8
+ - outline_json/original_table_json can be dicts (preferred) or JSON strings if you’d rather store serialized blobs.
9
+ """
10
+ not_blank = validate.Length(min=1, error="Field cannot be blank")
11
+
12
+ id = fields.String(dump_only=True) # table_id
13
+ smart_def_grid_id = fields.Integer(allow_none=True) # if you link to a workbook
14
+
15
+ scope_mode = fields.String(required=True)
16
+
17
+ # prefer dicts; switch to fields.String if you store JSON-serialized strings
18
+ outline_json = fields.Raw(required=True)
19
+ original_table_json = fields.Raw(required=True)
20
+ targets_json = fields.Raw(allow_none=True)
21
+
22
+ status = fields.String(required=True)
23
+ started_by_user_id = fields.String(required=True)
24
+
25
+ notes = fields.String(allow_none=True)
26
+ client_token = fields.String(allow_none=True)
27
+
28
+ created_at = fields.DateTime(dump_only=True)
29
+ started_at = fields.DateTime(allow_none=True)
30
+ finished_at = fields.DateTime(allow_none=True)
31
+ updated_at = fields.DateTime(dump_only=True)
File without changes
@@ -0,0 +1,34 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import Column, DateTime, Boolean, ForeignKey, Integer, Text, String
4
+ from sqlalchemy.orm import relationship
5
+
6
+ from ...database import Base
7
+ from ..SmartGridCell.models import SmartGridCellModel
8
+
9
+
10
+ class SmartGridModel(Base):
11
+ __tablename__ = "smart_grids"
12
+
13
+ id = Column(Integer, primary_key=True)
14
+ user_id = Column(String(128), nullable=False)
15
+ workbook_id = Column(
16
+ Integer,
17
+ ForeignKey('workbooks.id'),
18
+ nullable=True,
19
+ )
20
+ table_info = Column(Text, nullable=True)
21
+ is_deleted = Column(Boolean, nullable=True)
22
+ updated_at = Column(
23
+ DateTime,
24
+ nullable=False,
25
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
26
+ default=lambda: datetime.utcnow(),
27
+ onupdate=lambda: datetime.utcnow(),
28
+ )
29
+
30
+ cells = relationship(
31
+ "SmartGridCellModel",
32
+ order_by=SmartGridCellModel.row,
33
+ back_populates="smart_grid",
34
+ )
@@ -0,0 +1,18 @@
1
+ from marshmallow import Schema, fields, validate
2
+ from ..SmartGridCell.schemas import SmartGridCellResourceSchema
3
+
4
+
5
+ class SmartGridResourceSchema(Schema):
6
+ not_blank = validate.Length(min=1, error="Field cannot be blank")
7
+
8
+ id = fields.Integer(dump_only=True)
9
+ user_id = fields.String(required=True, validate=not_blank)
10
+ workbook_id = fields.Integer(allow_none=True)
11
+ table_info = fields.String(allow_none=True)
12
+ is_deleted = fields.Boolean(allow_none=True)
13
+ cells = fields.Nested(
14
+ SmartGridCellResourceSchema(exclude=("smart_grid_id",)),
15
+ many=True,
16
+ dump_only=True,
17
+ )
18
+ updated_at = fields.DateTime(dump_only=True)
File without changes
@@ -0,0 +1,44 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import Column, DateTime, Boolean, ForeignKey, Integer, Text, String
4
+ from sqlalchemy.orm import relationship
5
+
6
+ from ...database import Base
7
+
8
+
9
+ class SmartGridCellModel(Base):
10
+ __tablename__ = "smart_grid_cells"
11
+
12
+ id = Column(Integer, primary_key=True)
13
+ smart_grid_id = Column(
14
+ Integer,
15
+ ForeignKey("smart_grids.id"),
16
+ nullable=False,
17
+ )
18
+ row = Column(Integer, nullable=False)
19
+ col = Column(Integer, nullable=False)
20
+ type = Column(String(20), nullable=False)
21
+ data = Column(Text, nullable=True)
22
+ user_query_id = Column(
23
+ Integer,
24
+ ForeignKey("assistant_user_queries.id"),
25
+ nullable=True,
26
+ )
27
+ reformulated_question = Column(String(Text), nullable=False)
28
+ is_deleted = Column(Boolean, nullable=True)
29
+ updated_at = Column(
30
+ DateTime,
31
+ nullable=False,
32
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
33
+ default=lambda: datetime.utcnow(),
34
+ onupdate=lambda: datetime.utcnow(),
35
+ )
36
+
37
+ user_query = relationship(
38
+ "AssistantUserQueryModel",
39
+ )
40
+
41
+ smart_grid = relationship(
42
+ "SmartGridModel",
43
+ back_populates="cells",
44
+ )
@@ -0,0 +1,22 @@
1
+ """Marshmallow Schema for AssistantCommand."""
2
+ from marshmallow import Schema, fields
3
+ from ..AssistantUserQuery.schemas import AssistantUserQueryResourceSchema
4
+
5
+
6
+ class SmartGridCellResourceSchema(Schema):
7
+ """Class for AssistantCommandResource schema"""
8
+
9
+ id = fields.Integer(dump_only=True)
10
+ smart_grid_id = fields.Integer(required=True)
11
+ row = fields.Integer(required=True)
12
+ col = fields.Integer(required=True)
13
+ type = fields.String(required=True)
14
+ data = fields.String(allow_none=True)
15
+ user_query_id = fields.Integer(allow_none=True)
16
+ user_query = fields.Nested(
17
+ AssistantUserQueryResourceSchema(),
18
+ dump_only=True,
19
+ )
20
+ reformulated_question = fields.String(allow_none=True)
21
+ is_deleted = fields.Boolean(allow_none=True)
22
+ updated_at = fields.DateTime(dump_only=True)
File without changes
@@ -0,0 +1,12 @@
1
+ from sqlalchemy import Column, Integer, String, Date
2
+ from ...database import Base
3
+
4
+
5
+ class Submission13FModel(Base):
6
+ __tablename__ = '13fsubmission'
7
+
8
+ ACCESSION_NUMBER = Column(String(25), primary_key=True)
9
+ FILING_DATE = Column(Date, nullable=False)
10
+ SUBMISSIONTYPE = Column(String(10), nullable=False)
11
+ CIK = Column(String(10), nullable=False)
12
+ PERIODOFREPORT = Column(Date, nullable=False)
@@ -0,0 +1,10 @@
1
+ from marshmallow import Schema, fields
2
+ from ...utils.utils import Safe13FDate
3
+
4
+
5
+ class Submission13FSchema(Schema):
6
+ ACCESSION_NUMBER = fields.String(required=True)
7
+ FILING_DATE = Safe13FDate(required=True)
8
+ SUBMISSIONTYPE = fields.String(required=True)
9
+ CIK = fields.String(required=True)
10
+ PERIODOFREPORT = Safe13FDate(required=True)
File without changes
@@ -0,0 +1,12 @@
1
+ from sqlalchemy import Column, Integer, String, Date
2
+ from ...database import Base
3
+
4
+
5
+ class Summarypage13FModel(Base):
6
+ __tablename__ = '13fsummarypage'
7
+
8
+ ACCESSION_NUMBER = Column(String(25), primary_key=True)
9
+ OTHERINCLUDEDMANAGERSCOUNT = Column(Integer)
10
+ TABLEENTRYTOTAL = Column(Integer)
11
+ TABLEVALUETOTAL = Column(Integer)
12
+ ISCONFIDENTIALOMITTED = Column(String(1))
@@ -0,0 +1,9 @@
1
+ from marshmallow import Schema, fields
2
+
3
+
4
+ class Summarypage13FSchema(Schema):
5
+ ACCESSION_NUMBER = fields.String(required=True)
6
+ OTHERINCLUDEDMANAGERSCOUNT = fields.Integer()
7
+ TABLEENTRYTOTAL = fields.Integer()
8
+ TABLEVALUETOTAL = fields.Integer()
9
+ ISCONFIDENTIALOMITTED = fields.String()
File without changes
@@ -0,0 +1,40 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import (
4
+ Column,
5
+ Integer,
6
+ DateTime,
7
+ String,
8
+ Text,
9
+ Boolean,
10
+ ForeignKey,
11
+ )
12
+
13
+ from ...database import Base
14
+
15
+
16
+ class TableFigureModel(Base):
17
+ __tablename__ = "table_figures"
18
+
19
+ id = Column(Integer, primary_key=True)
20
+ file_id = Column(
21
+ Integer,
22
+ ForeignKey('files.id'),
23
+ nullable=True,
24
+ )
25
+ source_type = Column(String(50), nullable=False)
26
+ source_id = Column(Integer, nullable=False)
27
+ type = Column(String(50), nullable=False)
28
+ label = Column(String(50), nullable=True)
29
+ caption = Column(Text, nullable=True)
30
+ description = Column(Text, nullable=True)
31
+ content = Column(Text, nullable=True)
32
+ link = Column(String(255), nullable=True)
33
+ llm_processed = Column(Boolean, nullable=True)
34
+ updated_at = Column(
35
+ DateTime,
36
+ nullable=False,
37
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
38
+ default=lambda: datetime.utcnow(),
39
+ onupdate=lambda: datetime.utcnow(),
40
+ )
@@ -0,0 +1,61 @@
1
+ import json
2
+ from marshmallow import (
3
+ Schema,
4
+ fields,
5
+ validate,
6
+ )
7
+
8
+
9
+ class TableFigureCaptionField(fields.Field):
10
+ """Field that stores result for the Assistant command."""
11
+
12
+ def _serialize(self, value, attr, obj, **kwargs):
13
+ """
14
+ In the DB, the `result` field is a text field. We persist
15
+ data by performing the following:
16
+
17
+ AssistantCommandModel(
18
+ ...
19
+ result=json.dumps({...}),
20
+ )
21
+
22
+ So here we need to perform the inverse operation (i.e `json.loads(..)`)
23
+ """
24
+ if value is None:
25
+ return None
26
+ return json.loads(value)
27
+
28
+ def _deserialize(self, value, attr, data, **kwargs):
29
+ """
30
+ In the DB, the `result` field is a text field. We persist
31
+ data by performing the following:
32
+
33
+
34
+
35
+ AssistantCommandModel(
36
+ ***AssistantCommandResourceSchema().load({
37
+ ...
38
+ "result": [{"some_key": 1}, {"some_key": 2}],
39
+ }),
40
+ )
41
+ """
42
+ if value is None:
43
+ return None
44
+ return json.dumps(value)
45
+
46
+
47
+ class TableFigureResourceSchema(Schema):
48
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
49
+
50
+ id = fields.Integer(dump_only=True)
51
+ file_id = fields.Integer(required=True)
52
+ source_type = fields.String(required=True)
53
+ source_id = fields.Integer(required=True)
54
+ type = fields.String(required=True)
55
+ label = fields.String(allow_none=True)
56
+ caption = TableFigureCaptionField(required=True, allow_none=True)
57
+ description = fields.String(allow_none=True)
58
+ content = fields.String(allow_none=True)
59
+ link = fields.String(allow_none=True)
60
+ llm_processed = fields.Boolean(allow_none=True)
61
+ updated_at = fields.DateTime()
@@ -3,6 +3,8 @@ from datetime import datetime
3
3
  from sqlalchemy import (
4
4
  Column,
5
5
  Integer,
6
+ Float,
7
+ Boolean,
6
8
  DateTime,
7
9
  Text,
8
10
  )
@@ -18,6 +20,8 @@ class TableOutboxModel(Base):
18
20
  table_html = Column(Text, nullable=False)
19
21
  table_number = Column(Integer, nullable=False)
20
22
  table_preceding_info = Column(Text, nullable=False)
23
+ score = Column(Float, nullable=True)
24
+ processed = Column(Boolean, nullable=True)
21
25
  updated_at = Column(
22
26
  DateTime,
23
27
  nullable=False,
@@ -13,4 +13,6 @@ class TableOutboxResourceSchema(Schema):
13
13
  table_number = fields.Integer(required=True)
14
14
  table_html = fields.String(required=True)
15
15
  table_preceding_info = fields.String(required=True)
16
+ score = fields.Float(allow_none=True)
17
+ processed = fields.Boolean(allow_none=True)
16
18
  updated_at = fields.DateTime()
@@ -2,6 +2,7 @@ from sqlalchemy import (
2
2
  Column,
3
3
  Integer,
4
4
  String,
5
+ Boolean,
5
6
  DateTime,
6
7
  ForeignKey,
7
8
  )
@@ -20,6 +21,9 @@ class TargetSynModel(Base):
20
21
  ForeignKey('targets.id'),
21
22
  nullable=True,
22
23
  )
24
+ source = Column(String(50), nullable=True)
25
+ obsolete = Column(Boolean, nullable=True)
26
+ synonym_type = Column(String(50), nullable=True)
23
27
  updated_at = Column(
24
28
  DateTime,
25
29
  nullable=False,
@@ -11,4 +11,7 @@ class TargetSynResourceSchema(Schema):
11
11
  id = fields.Integer(dump_only=True)
12
12
  synonym = fields.String(required=True)
13
13
  target_id = fields.Integer(required=True)
14
+ source = fields.String(allow_none=True)
15
+ obsolete = fields.Boolean(allow_none=True)
16
+ synonym_type = fields.String(allow_none=True)
14
17
  updated_at = fields.DateTime()
File without changes
@@ -0,0 +1,31 @@
1
+ from sqlalchemy import (
2
+ Column,
3
+ Integer,
4
+ String,
5
+ DateTime,
6
+ Boolean,
7
+ Text,
8
+ )
9
+ from datetime import datetime
10
+
11
+ from ...database import Base
12
+
13
+
14
+ class TranscriptModel(Base):
15
+ __tablename__ = 'transcripts'
16
+
17
+ id = Column(Integer, primary_key=True)
18
+ event_id = Column(Integer, nullable=False, index=True)
19
+ date = Column(DateTime, nullable=False)
20
+ title = Column(String(191), nullable=False)
21
+ event_type = Column(String(50), nullable=True)
22
+ event_tags = Column(Text, nullable=True)
23
+ human_verified = Column(Boolean, nullable=True)
24
+ transcription_status = Column(String(50), nullable=True)
25
+ audio_url = Column(String(191), nullable=True)
26
+ updated_at = Column(
27
+ DateTime,
28
+ nullable=False,
29
+ default=datetime.utcnow,
30
+ onupdate=datetime.utcnow,
31
+ )