synapse-react-client 4.0.9 → 4.0.11

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 (613) hide show
  1. package/dist/SWC.index.d.ts +1 -0
  2. package/dist/SWC.index.d.ts.map +1 -1
  3. package/dist/SWC.index.js +2 -1
  4. package/dist/SWC.index.js.map +1 -1
  5. package/dist/aridhia-queries/aridhiaTokenExchange.js.map +1 -1
  6. package/dist/aridhia-queries/useGetAridhiaRequests.js.map +1 -1
  7. package/dist/assets/icons/CloudWarning.d.ts +5 -0
  8. package/dist/assets/icons/CloudWarning.d.ts.map +1 -0
  9. package/dist/assets/icons/CloudWarning.js +47 -0
  10. package/dist/assets/icons/CloudWarning.js.map +1 -0
  11. package/dist/assets/icons/TasksIcon.d.ts.map +1 -1
  12. package/dist/assets/icons/TasksIcon.js +6 -10
  13. package/dist/assets/icons/TasksIcon.js.map +1 -1
  14. package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.d.ts.map +1 -1
  15. package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.js +69 -63
  16. package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.js.map +1 -1
  17. package/dist/components/AccessRequirementList/AccessApprovalCheckMark.js.map +1 -1
  18. package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
  19. package/dist/components/AccessRequirementList/AccessRequirementListUtils.js.map +1 -1
  20. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.js.map +1 -1
  21. package/dist/components/AccessRequirementList/RequirementItem/SelfSignAccessRequirementItem.js.map +1 -1
  22. package/dist/components/AccessRequirementRelatedProjectsList/AccessRequirementRelatedProjectsList.js.map +1 -1
  23. package/dist/components/AccessTokenPage/AccessTokenCard/AccessTokenCard.js.map +1 -1
  24. package/dist/components/AcknowledgementsPage/StudyAcknowledgements.js.map +1 -1
  25. package/dist/components/AclEditor/PermissionLevelMenu.js.map +1 -1
  26. package/dist/components/AclEditor/ResourceAccessAndUserGroupHeader.js.map +1 -1
  27. package/dist/components/AclEditor/useSortResourceAccessList.js.map +1 -1
  28. package/dist/components/AclEditor/useUpdateAcl.js.map +1 -1
  29. package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
  30. package/dist/components/Authentication/AuthenticationMethodSelection.d.ts.map +1 -1
  31. package/dist/components/Authentication/AuthenticationMethodSelection.js +38 -37
  32. package/dist/components/Authentication/AuthenticationMethodSelection.js.map +1 -1
  33. package/dist/components/Authentication/Constants.d.ts +1 -0
  34. package/dist/components/Authentication/Constants.d.ts.map +1 -1
  35. package/dist/components/Authentication/Constants.js +2 -2
  36. package/dist/components/Authentication/Constants.js.map +1 -1
  37. package/dist/components/Authentication/LastLoginInfo.js.map +1 -1
  38. package/dist/components/Authentication/RecoveryCodeForm.js.map +1 -1
  39. package/dist/components/Authentication/RecoveryCodeGrid.js.map +1 -1
  40. package/dist/components/Authentication/RegenerateBackupCodesWarning.js.map +1 -1
  41. package/dist/components/Authentication/Reset2FAWarning.js.map +1 -1
  42. package/dist/components/Authentication/StandaloneLoginForm.js +1 -1
  43. package/dist/components/Authentication/TwoFactorBackupCodes.js.map +1 -1
  44. package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
  45. package/dist/components/Authentication/TwoFactorEnrollmentForm.js +2 -1
  46. package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
  47. package/dist/components/BasePortalCard/ColorfulPortalCardWithChips/ColorfulPortalCardWithChips.js.map +1 -1
  48. package/dist/components/CardContainer/CardContainer.js.map +1 -1
  49. package/dist/components/CardDeck/CardDeck.Mobile.js.map +1 -1
  50. package/dist/components/CardDeck/TableQueryCardDeck.js.map +1 -1
  51. package/dist/components/CertificationQuiz/CertificationQuiz.js.map +1 -1
  52. package/dist/components/ChallengeDataDownload/ChallengeDataDownload.js.map +1 -1
  53. package/dist/components/ChallengeSubmission/ChallengeSubmission.js.map +1 -1
  54. package/dist/components/ChallengeSubmission/ChallengeSubmissionStepper.js.map +1 -1
  55. package/dist/components/ChallengeSubmission/EvaluationQueueCurrentRoundInfo.js.map +1 -1
  56. package/dist/components/ChallengeSubmission/EvaluationQueueList.js.map +1 -1
  57. package/dist/components/ChallengeSubmission/SubmissionDirectoryList.d.ts.map +1 -1
  58. package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js +143 -140
  59. package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js.map +1 -1
  60. package/dist/components/ChallengeTeamWizard/ChallengeTeamWizard.js.map +1 -1
  61. package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js.map +1 -1
  62. package/dist/components/ChangePassword/ChangePassword.js.map +1 -1
  63. package/dist/components/ChangePassword/ChangePasswordWithToken.js.map +1 -1
  64. package/dist/components/ChangePassword/useChangePasswordFormState.js +1 -1
  65. package/dist/components/ChangePassword/useChangePasswordFormState.js.map +1 -1
  66. package/dist/components/CitationPopover/CitationPopoverContent.js.map +1 -1
  67. package/dist/components/ColumnFilter/ColumnFilter.js.map +1 -1
  68. package/dist/components/ComponentCollapse.js.map +1 -1
  69. package/dist/components/CookiesNotification/CookiesNotification.js.map +1 -1
  70. package/dist/components/CreateProjectModal/CreateProjectModal.js.map +1 -1
  71. package/dist/components/CreateTableViewWizard/CreateTableViewWizardUtils.js.map +1 -1
  72. package/dist/components/DataGrid/DataGrid.d.ts +0 -1
  73. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
  74. package/dist/components/DataGrid/DataGrid.js +72 -72
  75. package/dist/components/DataGrid/DataGrid.js.map +1 -1
  76. package/dist/components/DataGrid/DataGridWebSocket.d.ts +4 -0
  77. package/dist/components/DataGrid/DataGridWebSocket.d.ts.map +1 -1
  78. package/dist/components/DataGrid/DataGridWebSocket.js +9 -8
  79. package/dist/components/DataGrid/DataGridWebSocket.js.map +1 -1
  80. package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
  81. package/dist/components/DataGrid/SynapseGrid.js +326 -268
  82. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  83. package/dist/components/DataGrid/columns/AutocompleteColumn.d.ts +2 -0
  84. package/dist/components/DataGrid/columns/AutocompleteColumn.d.ts.map +1 -1
  85. package/dist/components/DataGrid/columns/AutocompleteColumn.js +124 -67
  86. package/dist/components/DataGrid/columns/AutocompleteColumn.js.map +1 -1
  87. package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.d.ts +2 -1
  88. package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.d.ts.map +1 -1
  89. package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.js +126 -122
  90. package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.js.map +1 -1
  91. package/dist/components/DataGrid/columns/useGridAutocompleteState.d.ts +58 -0
  92. package/dist/components/DataGrid/columns/useGridAutocompleteState.d.ts.map +1 -0
  93. package/dist/components/DataGrid/columns/useGridAutocompleteState.js +52 -0
  94. package/dist/components/DataGrid/columns/useGridAutocompleteState.js.map +1 -0
  95. package/dist/components/DataGrid/components/ValidationAlert.d.ts +5 -2
  96. package/dist/components/DataGrid/components/ValidationAlert.d.ts.map +1 -1
  97. package/dist/components/DataGrid/components/ValidationAlert.js +429 -24
  98. package/dist/components/DataGrid/components/ValidationAlert.js.map +1 -1
  99. package/dist/components/DataGrid/hooks/useColumnResizeHandles.js.map +1 -1
  100. package/dist/components/DataGrid/hooks/useGetSchemaForGrid.js.map +1 -1
  101. package/dist/components/DataGrid/hooks/useGridUndoRedo.js.map +1 -1
  102. package/dist/components/DataGrid/hooks/useStack.js.map +1 -1
  103. package/dist/components/DataGrid/useCRDTModelView.js.map +1 -1
  104. package/dist/components/DataGrid/useDataGridWebsocket.d.ts +7 -0
  105. package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
  106. package/dist/components/DataGrid/useDataGridWebsocket.js +16 -2
  107. package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
  108. package/dist/components/DataGrid/useInitializeGridConnection.js.map +1 -1
  109. package/dist/components/DataGrid/useMergeGridWithRecordSet.js.map +1 -1
  110. package/dist/components/DataGrid/useMergeGridWithSource.js.map +1 -1
  111. package/dist/components/DataGrid/useMergeGridWithTable.js.map +1 -1
  112. package/dist/components/DataGrid/utils/DataGridUtils.js.map +1 -1
  113. package/dist/components/DataGrid/utils/applyModelChange.d.ts +1 -1
  114. package/dist/components/DataGrid/utils/applyModelChange.d.ts.map +1 -1
  115. package/dist/components/DataGrid/utils/applyModelChange.js +27 -24
  116. package/dist/components/DataGrid/utils/applyModelChange.js.map +1 -1
  117. package/dist/components/DataGrid/utils/columnFactory.d.ts +8 -0
  118. package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
  119. package/dist/components/DataGrid/utils/columnFactory.js +47 -44
  120. package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
  121. package/dist/components/DataGrid/utils/computeReplicaSelectionModel.js.map +1 -1
  122. package/dist/components/DataGrid/utils/extractColumnValidationMessages.js.map +1 -1
  123. package/dist/components/DataGrid/utils/getCellClassName.d.ts.map +1 -1
  124. package/dist/components/DataGrid/utils/getCellClassName.js +8 -8
  125. package/dist/components/DataGrid/utils/getCellClassName.js.map +1 -1
  126. package/dist/components/DataGrid/utils/getEmptyValue.d.ts +2 -0
  127. package/dist/components/DataGrid/utils/getEmptyValue.d.ts.map +1 -0
  128. package/dist/components/DataGrid/utils/getEmptyValue.js +8 -0
  129. package/dist/components/DataGrid/utils/getEmptyValue.js.map +1 -0
  130. package/dist/components/DataGrid/utils/json-rx/JsonRx.js.map +1 -1
  131. package/dist/components/DataGrid/utils/modelColsToGrid.d.ts.map +1 -1
  132. package/dist/components/DataGrid/utils/modelColsToGrid.js +2 -1
  133. package/dist/components/DataGrid/utils/modelColsToGrid.js.map +1 -1
  134. package/dist/components/DataGrid/utils/modelRowsToGrid.js.map +1 -1
  135. package/dist/components/DataGrid/utils/parseFreeTextUsingJsonSchemaType.js.map +1 -1
  136. package/dist/components/DataGrid/utils/schemaAwarePasteValue.d.ts +32 -0
  137. package/dist/components/DataGrid/utils/schemaAwarePasteValue.d.ts.map +1 -0
  138. package/dist/components/DataGrid/utils/schemaAwarePasteValue.js +22 -0
  139. package/dist/components/DataGrid/utils/schemaAwarePasteValue.js.map +1 -0
  140. package/dist/components/DataGrid/utils/splitPatch.js.map +1 -1
  141. package/dist/components/DateTimePicker/DateTimePicker.js.map +1 -1
  142. package/dist/components/DirectDownload/DirectDownload.js.map +1 -1
  143. package/dist/components/DirectDownloadButton.js.map +1 -1
  144. package/dist/components/DownloadCart/CreatePackageV2.js.map +1 -1
  145. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.css +1 -0
  146. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.d.ts.map +1 -1
  147. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js +199 -132
  148. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js.map +1 -1
  149. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.module.js +22 -0
  150. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.module.js.map +1 -0
  151. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.module.scss +170 -0
  152. package/dist/components/DownloadCart/DownloadListActionsRequired.js.map +1 -1
  153. package/dist/components/DownloadCart/DownloadListTable.js.map +1 -1
  154. package/dist/components/DownloadCart/fileNameUtils.js.map +1 -1
  155. package/dist/components/DraggableDialog/DraggableDialog.js.map +1 -1
  156. package/dist/components/DynamicForm/DynamicFormModal.js.map +1 -1
  157. package/dist/components/Ecosystem/TableQueryEcosystem.js.map +1 -1
  158. package/dist/components/EntityAclEditor/EntityAclEditor.d.ts.map +1 -1
  159. package/dist/components/EntityAclEditor/EntityAclEditor.js +103 -103
  160. package/dist/components/EntityAclEditor/EntityAclEditor.js.map +1 -1
  161. package/dist/components/EntityAclEditor/useNotifyNewACLUsers.js.map +1 -1
  162. package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js.map +1 -1
  163. package/dist/components/EntityCitation/EntityCitation.js.map +1 -1
  164. package/dist/components/EntityDownloadButton/EntityDownloadButton.d.ts.map +1 -1
  165. package/dist/components/EntityDownloadButton/EntityDownloadButton.js +1 -0
  166. package/dist/components/EntityDownloadButton/EntityDownloadButton.js.map +1 -1
  167. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.d.ts.map +1 -1
  168. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js +36 -30
  169. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js.map +1 -1
  170. package/dist/components/EntityFinder/EntityFinder.js.map +1 -1
  171. package/dist/components/EntityFinder/VersionSelectionType.js.map +1 -1
  172. package/dist/components/EntityFinder/details/configurations/EntityChildrenDetails.js.map +1 -1
  173. package/dist/components/EntityFinder/details/configurations/FavoritesDetails.js.map +1 -1
  174. package/dist/components/EntityFinder/details/configurations/ProjectListDetails.js.map +1 -1
  175. package/dist/components/EntityFinder/details/view/DetailsView.js.map +1 -1
  176. package/dist/components/EntityFinder/tree/EntityTree.js.map +1 -1
  177. package/dist/components/EntityFinder/tree/VirtualizedTree.js.map +1 -1
  178. package/dist/components/EntityFinder/useEntitySelection.js.map +1 -1
  179. package/dist/components/EntityForm/EntityForm.js.map +1 -1
  180. package/dist/components/EntityHeaderTable/EntityHeaderTable.js.map +1 -1
  181. package/dist/components/EntityHeaderTable/Filter.js.map +1 -1
  182. package/dist/components/EntityHeaderTable/useEntityHeaderTableState.js.map +1 -1
  183. package/dist/components/EntitySubjectsSelector/EntitySubjectsSelector.js.map +1 -1
  184. package/dist/components/EntityTreeTable/components/IdColumnHeader.js.map +1 -1
  185. package/dist/components/EntityTreeTable/hooks/useEntityTreeState.js.map +1 -1
  186. package/dist/components/EntityTreeTable/hooks/useTableColumns.js.map +1 -1
  187. package/dist/components/EntityTreeTable/hooks/useTableData.js.map +1 -1
  188. package/dist/components/EntityTreeTable/hooks/useTreeOperationsWithDirectFetch.js.map +1 -1
  189. package/dist/components/EntityUpload/EntityUpload.js.map +1 -1
  190. package/dist/components/EntityViewScopeEditor/EntityViewMaskEditor.d.ts.map +1 -1
  191. package/dist/components/EntityViewScopeEditor/EntityViewMaskEditor.js +15 -14
  192. package/dist/components/EntityViewScopeEditor/EntityViewMaskEditor.js.map +1 -1
  193. package/dist/components/ExperimentalMode/ExperimentalMode.js.map +1 -1
  194. package/dist/components/ExternalFileHandleLink/ExternalFileHandleLink.js.map +1 -1
  195. package/dist/components/FeaturedDataTabs/FacetPlotsCard.js.map +1 -1
  196. package/dist/components/FeaturedDataTabs/QueryPerFacetPlotsCard.js.map +1 -1
  197. package/dist/components/FeaturedDataTabs/SingleQueryFacetPlotsCards.js.map +1 -1
  198. package/dist/components/FeaturedResearch/FeaturedResearch.js.map +1 -1
  199. package/dist/components/FeaturedToolsList/FeaturedToolsList.js.map +1 -1
  200. package/dist/components/FilePreview/FileHandleContentRenderer.js.map +1 -1
  201. package/dist/components/FilePreview/HtmlPreview/HtmlPreview.js.map +1 -1
  202. package/dist/components/FilePreview/PreviewRendererType.js.map +1 -1
  203. package/dist/components/Forum/DiscussionReply.d.ts +1 -0
  204. package/dist/components/Forum/DiscussionReply.d.ts.map +1 -1
  205. package/dist/components/Forum/DiscussionReply.js +19 -19
  206. package/dist/components/Forum/DiscussionReply.js.map +1 -1
  207. package/dist/components/Forum/DiscussionSearchResult.js.map +1 -1
  208. package/dist/components/Forum/DiscussionThread.d.ts +1 -0
  209. package/dist/components/Forum/DiscussionThread.d.ts.map +1 -1
  210. package/dist/components/Forum/DiscussionThread.js +73 -72
  211. package/dist/components/Forum/DiscussionThread.js.map +1 -1
  212. package/dist/components/Forum/ForumTable.js.map +1 -1
  213. package/dist/components/Forum/ForumThreadEditor.js.map +1 -1
  214. package/dist/components/FullTextSearch/FullTextSearchUtils.js.map +1 -1
  215. package/dist/components/GenericCard/BioregistryRules.d.ts.map +1 -1
  216. package/dist/components/GenericCard/BioregistryRules.js +7 -3
  217. package/dist/components/GenericCard/BioregistryRules.js.map +1 -1
  218. package/dist/components/GenericCard/GenericCard.d.ts.map +1 -1
  219. package/dist/components/GenericCard/GenericCard.js +12 -7
  220. package/dist/components/GenericCard/GenericCard.js.map +1 -1
  221. package/dist/components/GenericCard/Linkify.js.map +1 -1
  222. package/dist/components/GenericCard/SynapseCardLabel.js.map +1 -1
  223. package/dist/components/GenericCard/TableRowGenericCard.js +105 -105
  224. package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
  225. package/dist/components/Goals/Goals.Mobile.js.map +1 -1
  226. package/dist/components/Goals/Goals.js.map +1 -1
  227. package/dist/components/GoalsV2/GoalsV2.Mobile.js.map +1 -1
  228. package/dist/components/GoalsV2/GoalsV2.js.map +1 -1
  229. package/dist/components/GoalsV3/GoalsV3.Mobile.js.map +1 -1
  230. package/dist/components/GoalsV3/GoalsV3.js.map +1 -1
  231. package/dist/components/GoogleMap/SynapseUserMarker.js.map +1 -1
  232. package/dist/components/HasAccess/AccessIcon.js.map +1 -1
  233. package/dist/components/HasAccess/useHasAccess.js.map +1 -1
  234. package/dist/components/HeaderCard/HeaderCardV2.js.map +1 -1
  235. package/dist/components/HeaderCard.d.ts +6 -1
  236. package/dist/components/HeaderCard.d.ts.map +1 -1
  237. package/dist/components/HeaderCard.js +107 -76
  238. package/dist/components/HeaderCard.js.map +1 -1
  239. package/dist/components/HexGrid/HexGrid.js.map +1 -1
  240. package/dist/components/IconList.js.map +1 -1
  241. package/dist/components/IconSvg/IconSvg.d.ts.map +1 -1
  242. package/dist/components/IconSvg/IconSvg.js +2 -1
  243. package/dist/components/IconSvg/IconSvg.js.map +1 -1
  244. package/dist/components/ImageCardGridWithLinks/ImageCardGridWithLinks.js.map +1 -1
  245. package/dist/components/ImageFromSynapseTable.js.map +1 -1
  246. package/dist/components/JSONArrayEditor/useParseCsv.js.map +1 -1
  247. package/dist/components/JsonSchemaForm/templates/ArrayFieldDescriptionTemplate.js.map +1 -1
  248. package/dist/components/JsonSchemaForm/templates/ArrayFieldItemTemplate.js.map +1 -1
  249. package/dist/components/JsonSchemaForm/templates/BaseInputTemplate.js.map +1 -1
  250. package/dist/components/JsonSchemaForm/templates/FieldTemplate.js.map +1 -1
  251. package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js.map +1 -1
  252. package/dist/components/Markdown/MarkdownGithub.js.map +1 -1
  253. package/dist/components/Markdown/MarkdownSynapse.js.map +1 -1
  254. package/dist/components/Markdown/MarkdownUtils.js.map +1 -1
  255. package/dist/components/Markdown/SynapseWikiContext.js.map +1 -1
  256. package/dist/components/Markdown/UserMentionModal.js.map +1 -1
  257. package/dist/components/Markdown/widget/MarkdownProvenanceGraph.js.map +1 -1
  258. package/dist/components/MissingQueryResultsWarning/MissingQueryResultsWarning.js.map +1 -1
  259. package/dist/components/ModalDownload/ModalDownload.js.map +1 -1
  260. package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.d.ts.map +1 -1
  261. package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.js +45 -39
  262. package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.js.map +1 -1
  263. package/dist/components/OAuthClientManagement/OAuthManagement.js.map +1 -1
  264. package/dist/components/PageProgress/PageProgress.js.map +1 -1
  265. package/dist/components/Plot/DotPlot.js.map +1 -1
  266. package/dist/components/Plot/Plot.js.map +1 -1
  267. package/dist/components/Plot/SynapsePlot.js.map +1 -1
  268. package/dist/components/Plot/ThemesPlot.js.map +1 -1
  269. package/dist/components/Plot/UpsetPlot.js.map +1 -1
  270. package/dist/components/PortalAclEditor/PortalAclEditor.d.ts.map +1 -1
  271. package/dist/components/PortalAclEditor/PortalAclEditor.js +43 -41
  272. package/dist/components/PortalAclEditor/PortalAclEditor.js.map +1 -1
  273. package/dist/components/PortalFeaturedPartners/PortalFeaturedPartners.js.map +1 -1
  274. package/dist/components/PortalList/CreatePortalModal.js.map +1 -1
  275. package/dist/components/ProgrammaticInstructionsModal/ProgrammaticInstructionsModal.js.map +1 -1
  276. package/dist/components/ProgrammaticTableDownload/ProgrammaticTableDownload.js.map +1 -1
  277. package/dist/components/Programs/Programs.Mobile.js.map +1 -1
  278. package/dist/components/Programs/Programs.js.map +1 -1
  279. package/dist/components/ProvenanceGraph/ProvenanceExternalIcon.js.map +1 -1
  280. package/dist/components/ProvenanceGraph/ProvenanceGraph.js.map +1 -1
  281. package/dist/components/ProvenanceGraph/ProvenanceGraphUtils.js.map +1 -1
  282. package/dist/components/ProvenanceGraph/ProvenanceUtils.js.map +1 -1
  283. package/dist/components/QueryCount/QueryCount.js.map +1 -1
  284. package/dist/components/QueryCountButton/QueryCountButton.js.map +1 -1
  285. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
  286. package/dist/components/QueryWrapper/QueryWrapper.js.map +1 -1
  287. package/dist/components/QueryWrapper/TableQueryUseQueryOptions.js.map +1 -1
  288. package/dist/components/QueryWrapper/TableRowSelectionState.js.map +1 -1
  289. package/dist/components/QueryWrapper/generateEncodedPathAndQueryForSelectedFacetURL.js.map +1 -1
  290. package/dist/components/QueryWrapper/useGetQueryMetadata.js.map +1 -1
  291. package/dist/components/QueryWrapperErrorBoundary.js.map +1 -1
  292. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
  293. package/dist/components/QueryWrapperPlotNav/UseRowSet.js.map +1 -1
  294. package/dist/components/RecentPublicationsGrid/RecentPublicationsGrid.js.map +1 -1
  295. package/dist/components/ReleaseCard/ReleaseCardUtils.js.map +1 -1
  296. package/dist/components/ResizableContainer/hooks/useResizable.js.map +1 -1
  297. package/dist/components/Resources/Resources.Mobile.js.map +1 -1
  298. package/dist/components/Resources/Resources.js.map +1 -1
  299. package/dist/components/RowDataTable/RowDataTableWithQuery.js.map +1 -1
  300. package/dist/components/SageResourcesPopover/SageResourcesPopover.js.map +1 -1
  301. package/dist/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.js.map +1 -1
  302. package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js.map +1 -1
  303. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
  304. package/dist/components/SmartLink/SmartButton.js.map +1 -1
  305. package/dist/components/SmartLink/SmartLink.js.map +1 -1
  306. package/dist/components/SourceAppImage.js.map +1 -1
  307. package/dist/components/StandaloneQueryWrapper/StandaloneQueryWrapper.js.map +1 -1
  308. package/dist/components/StatisticsPlot.js.map +1 -1
  309. package/dist/components/StorybookComponentWrapper.js.map +1 -1
  310. package/dist/components/SubsectionRowRenderer/SubsectionRowRenderer.js.map +1 -1
  311. package/dist/components/SustainabilityScorecard/SustainabilityScorecard.js.map +1 -1
  312. package/dist/components/SynapseChat/GridAgentChat.js.map +1 -1
  313. package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
  314. package/dist/components/SynapseChat/SynapseChatMessage.js.map +1 -1
  315. package/dist/components/SynapseChat/extractMessageFromTraceEvent.js.map +1 -1
  316. package/dist/components/SynapseForm/StepsSideNav.js.map +1 -1
  317. package/dist/components/SynapseForm/SummaryTable.js.map +1 -1
  318. package/dist/components/SynapseForm/SynapseForm.js +4 -2
  319. package/dist/components/SynapseForm/SynapseForm.js.map +1 -1
  320. package/dist/components/SynapseForm/SynapseFormWrapper.js.map +1 -1
  321. package/dist/components/SynapseHomepageV2/SynapseByTheNumbersItem.js.map +1 -1
  322. package/dist/components/SynapseHomepageV2/SynapseFeatureItem.js.map +1 -1
  323. package/dist/components/SynapseHomepageV2/SynapseHomepageChatSearch.js.map +1 -1
  324. package/dist/components/SynapseHomepageV2/SynapseHomepageSearch.js.map +1 -1
  325. package/dist/components/SynapseHomepageV2/SynapseInActionItem.js.map +1 -1
  326. package/dist/components/SynapseHomepageV2/SynapsePlans.js.map +1 -1
  327. package/dist/components/SynapseHomepageV2/SynapseTrendingProjects.js.map +1 -1
  328. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.d.ts +8 -7
  329. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.d.ts.map +1 -1
  330. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.js +173 -164
  331. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.js.map +1 -1
  332. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js.map +1 -1
  333. package/dist/components/SynapseSearchPageResults/SearchFacetPanel/SearchFacetPanel.js.map +1 -1
  334. package/dist/components/SynapseSearchPageResults/SearchFacetPanel/SearchFacetPanelUtils.js.map +1 -1
  335. package/dist/components/SynapseSearchPageResults/SynapseSearchPageResults.js.map +1 -1
  336. package/dist/components/SynapseTable/EntityIDColumnCopyIcon.js.map +1 -1
  337. package/dist/components/SynapseTable/NoContentPlaceholderType.js.map +1 -1
  338. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js.map +1 -1
  339. package/dist/components/SynapseTable/SynapseTableCell/SynapseTableCell.js.map +1 -1
  340. package/dist/components/SynapseTable/SynapseTableRenderers.js.map +1 -1
  341. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
  342. package/dist/components/SynapseTable/table-top/ColumnSelection.js.map +1 -1
  343. package/dist/components/SynapseTable/table-top/DownloadOptions.js.map +1 -1
  344. package/dist/components/SynapseTable/usePrefetchTableData.js.map +1 -1
  345. package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js.map +1 -1
  346. package/dist/components/TableColumnSchemaEditor/ColumnModelFormFields/DefaultValueField.js.map +1 -1
  347. package/dist/components/TableColumnSchemaEditor/ImportTableColumnsButton.js.map +1 -1
  348. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.d.ts +1 -1
  349. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.d.ts.map +1 -1
  350. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.js.map +1 -1
  351. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js.map +1 -1
  352. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormReducer.js.map +1 -1
  353. package/dist/components/TableColumnSchemaEditor/Validators/ColumnModelValidator.js.map +1 -1
  354. package/dist/components/TableColumnSchemaEditor/Validators/DatetimeSchema.js.map +1 -1
  355. package/dist/components/TanStackTable/ColumnHeader.d.ts +1 -0
  356. package/dist/components/TanStackTable/ColumnHeader.d.ts.map +1 -1
  357. package/dist/components/TanStackTable/ColumnHeader.js +8 -8
  358. package/dist/components/TanStackTable/ColumnHeader.js.map +1 -1
  359. package/dist/components/TanStackTable/ColumnHeaderEnumFilter.js.map +1 -1
  360. package/dist/components/TanStackTable/TableBody.js.map +1 -1
  361. package/dist/components/TeamSubjectsSelector/TeamSubjectsSelector.js.map +1 -1
  362. package/dist/components/TextField/TextField.js.map +1 -1
  363. package/dist/components/TimelinePlot/TimelinePhase.js.map +1 -1
  364. package/dist/components/TimelinePlot/TimelinePlot.js.map +1 -1
  365. package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.js.map +1 -1
  366. package/dist/components/UserCard/Avatar.js.map +1 -1
  367. package/dist/components/UserCardList/UserCardList.js.map +1 -1
  368. package/dist/components/UserCardList/UserCardListGroups/UserCardListGroups.Mobile.js.map +1 -1
  369. package/dist/components/UserCardList/UserCardListRotate.js.map +1 -1
  370. package/dist/components/UserOrTeamBadge/useUserOrTeam.js.map +1 -1
  371. package/dist/components/UserProfileLinks/UserProjects.js.map +1 -1
  372. package/dist/components/UserSearchBox/UserSearchBox.js.map +1 -1
  373. package/dist/components/Webhook/WebhookDashboard.js.map +1 -1
  374. package/dist/components/WikiMarkdownEditor/WikiMarkdownEditor.js.map +1 -1
  375. package/dist/components/WikiMarkdownEditorButton/WikiMarkdownEditorButton.js.map +1 -1
  376. package/dist/components/dataaccess/AccessApprovalsTable.js.map +1 -1
  377. package/dist/components/dataaccess/AccessRequestSubmissionTable.js.map +1 -1
  378. package/dist/components/dataaccess/SubmissionPage/SubmissionPage.d.ts.map +1 -1
  379. package/dist/components/dataaccess/SubmissionPage/SubmissionPage.js +157 -148
  380. package/dist/components/dataaccess/SubmissionPage/SubmissionPage.js.map +1 -1
  381. package/dist/components/dataaccess/UseAccessRequirementTable.js.map +1 -1
  382. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryTable.js.map +1 -1
  383. package/dist/components/doi/CreateOrUpdateDoiModal.d.ts.map +1 -1
  384. package/dist/components/doi/CreateOrUpdateDoiModal.js +20 -19
  385. package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
  386. package/dist/components/entity/page/CreatedByModifiedBy.js.map +1 -1
  387. package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
  388. package/dist/components/entity/page/title_bar/useDataCiteUsage.js.map +1 -1
  389. package/dist/components/entity/page/title_bar/useGetMentions.js.map +1 -1
  390. package/dist/components/error/ErrorPage.js.map +1 -1
  391. package/dist/components/favorites/FavoritesPage.js.map +1 -1
  392. package/dist/components/file/upload/BasicFileHandleUpload.js.map +1 -1
  393. package/dist/components/layout/SWCHeader.d.ts +9 -0
  394. package/dist/components/layout/SWCHeader.d.ts.map +1 -0
  395. package/dist/components/layout/SWCHeader.js +19 -0
  396. package/dist/components/layout/SWCHeader.js.map +1 -0
  397. package/dist/components/layout/SWCPageLayout.d.ts +9 -0
  398. package/dist/components/layout/SWCPageLayout.d.ts.map +1 -0
  399. package/dist/components/layout/SWCPageLayout.js +14 -0
  400. package/dist/components/layout/SWCPageLayout.js.map +1 -0
  401. package/dist/components/menu/ComplexMenu.js.map +1 -1
  402. package/dist/components/row_renderers/utils/ChipContainer.js.map +1 -1
  403. package/dist/components/styled/StyledPopover.js.map +1 -1
  404. package/dist/components/table/CsvPreview/CsvPreview.js +2 -1
  405. package/dist/components/table/CsvPreview/CsvPreview.js.map +1 -1
  406. package/dist/components/table/CsvPreview/CsvPreviewDialog.js.map +1 -1
  407. package/dist/components/trash/TrashCanList.js.map +1 -1
  408. package/dist/components/widgets/FileHandleLink.js.map +1 -1
  409. package/dist/components/widgets/RangeSlider/RangeSlider.js.map +1 -1
  410. package/dist/components/widgets/SynapseVideo.js.map +1 -1
  411. package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
  412. package/dist/components/widgets/facet-nav/PlotsContainer.js.map +1 -1
  413. package/dist/components/widgets/facet-nav/SelectionCriteriaPills.js.map +1 -1
  414. package/dist/components/widgets/facet-nav/useFacetPlots.js.map +1 -1
  415. package/dist/components/widgets/query-filter/CombinedRangeFacetFilter.js.map +1 -1
  416. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
  417. package/dist/components/widgets/query-filter/FacetFilterControls.js.map +1 -1
  418. package/dist/components/widgets/query-filter/RangeFacetFilter.js.map +1 -1
  419. package/dist/components/widgets/query-filter/RangeFacetFilterUI.js.map +1 -1
  420. package/dist/features/curator/GridPage/components/GridPageTitle.d.ts.map +1 -1
  421. package/dist/features/curator/GridPage/components/GridPageTitle.js +23 -30
  422. package/dist/features/curator/GridPage/components/GridPageTitle.js.map +1 -1
  423. package/dist/features/curator/dashboard/CuratorDashboard.d.ts +2 -0
  424. package/dist/features/curator/dashboard/CuratorDashboard.d.ts.map +1 -0
  425. package/dist/features/curator/dashboard/CuratorDashboard.js +45 -0
  426. package/dist/features/curator/dashboard/CuratorDashboard.js.map +1 -0
  427. package/dist/features/curator/dashboard/components/CurationTaskCard.css +1 -0
  428. package/dist/features/curator/dashboard/components/CurationTaskCard.d.ts +9 -0
  429. package/dist/features/curator/dashboard/components/CurationTaskCard.d.ts.map +1 -0
  430. package/dist/features/curator/dashboard/components/CurationTaskCard.js +106 -0
  431. package/dist/features/curator/dashboard/components/CurationTaskCard.js.map +1 -0
  432. package/dist/features/curator/dashboard/components/CurationTaskCard.module.js +12 -0
  433. package/dist/features/curator/dashboard/components/CurationTaskCard.module.js.map +1 -0
  434. package/dist/features/curator/dashboard/components/CurationTaskCard.module.scss +52 -0
  435. package/dist/features/curator/dashboard/components/NextStepButton.css +1 -0
  436. package/dist/features/curator/dashboard/components/NextStepButton.d.ts +14 -0
  437. package/dist/features/curator/dashboard/components/NextStepButton.d.ts.map +1 -0
  438. package/dist/features/curator/dashboard/components/NextStepButton.js +35 -0
  439. package/dist/features/curator/dashboard/components/NextStepButton.js.map +1 -0
  440. package/dist/features/curator/dashboard/components/NextStepButton.module.js +11 -0
  441. package/dist/features/curator/dashboard/components/NextStepButton.module.js.map +1 -0
  442. package/dist/features/curator/dashboard/components/NextStepButton.module.scss +57 -0
  443. package/dist/features/curator/dashboard/components/UserOrTeamChip.css +1 -1
  444. package/dist/features/curator/dashboard/components/UserOrTeamChip.module.js +1 -1
  445. package/dist/features/curator/dashboard/components/UserOrTeamChip.module.js.map +1 -1
  446. package/dist/features/curator/dashboard/components/UserOrTeamChip.module.scss +5 -5
  447. package/dist/features/curator/dashboard/components/shared.css +1 -0
  448. package/dist/features/curator/dashboard/components/shared.module.js +5 -0
  449. package/dist/features/curator/dashboard/components/shared.module.js.map +1 -0
  450. package/dist/features/curator/dashboard/components/shared.module.scss +8 -0
  451. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts +0 -2
  452. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts.map +1 -1
  453. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +16 -34
  454. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
  455. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.d.ts.map +1 -1
  456. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js +1 -1
  457. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js.map +1 -1
  458. package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.js.map +1 -1
  459. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js.map +1 -1
  460. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.js.map +1 -1
  461. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js +1 -1
  462. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js.map +1 -1
  463. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts +10 -0
  464. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts.map +1 -0
  465. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js +37 -0
  466. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js.map +1 -0
  467. package/dist/features/entity/metadata-task/utils/constants.d.ts +5 -0
  468. package/dist/features/entity/metadata-task/utils/constants.d.ts.map +1 -0
  469. package/dist/features/entity/metadata-task/utils/constants.js +6 -0
  470. package/dist/features/entity/metadata-task/utils/constants.js.map +1 -0
  471. package/dist/mocks/challenge/mockChallenge.js.map +1 -1
  472. package/dist/mocks/entity/mockDataset.js.map +1 -1
  473. package/dist/mocks/entity/mockDatasetCollection.js.map +1 -1
  474. package/dist/mocks/entity/mockFileEntity.js.map +1 -1
  475. package/dist/mocks/entity/mockFileView.js.map +1 -1
  476. package/dist/mocks/entity/mockGeneratedEntityData.js.map +1 -1
  477. package/dist/mocks/entity/mockProject.js.map +1 -1
  478. package/dist/mocks/entity/mockProjectView.js.map +1 -1
  479. package/dist/mocks/entity/mockRootEntity.js.map +1 -1
  480. package/dist/mocks/entity/mockTableEntity.js.map +1 -1
  481. package/dist/mocks/mockWiki.js.map +1 -1
  482. package/dist/mocks/msw/handlers/asyncJobHandlers.js.map +1 -1
  483. package/dist/mocks/msw/handlers/challengeHandlers.js.map +1 -1
  484. package/dist/mocks/msw/handlers/changePasswordHandlers.js.map +1 -1
  485. package/dist/mocks/msw/handlers/discussionHandlers.js.map +1 -1
  486. package/dist/mocks/msw/handlers/entityHandlers.js.map +1 -1
  487. package/dist/mocks/msw/handlers/fileHandlers.js.map +1 -1
  488. package/dist/mocks/msw/handlers/gridHandlers.js.map +1 -1
  489. package/dist/mocks/msw/handlers/personalAccessTokenHandlers.js.map +1 -1
  490. package/dist/mocks/msw/handlers/subscriptionHandlers.js.map +1 -1
  491. package/dist/mocks/msw/handlers/teamHandlers.js.map +1 -1
  492. package/dist/mocks/msw/handlers/userProfileHandlers.js.map +1 -1
  493. package/dist/mocks/msw/handlers/wikiHandlers.js.map +1 -1
  494. package/dist/mocks/provenance/mockActivity.js.map +1 -1
  495. package/dist/mocks/query/mockReleaseCardsTableQueryResultBundle.js.map +1 -1
  496. package/dist/ror-client/index.js.map +1 -1
  497. package/dist/style/components/_cards.scss +4 -0
  498. package/dist/style/components/_data-grid-extra.css +1 -1
  499. package/dist/style/components/_data-grid-extra.scss +2 -0
  500. package/dist/style/main.css +1 -1
  501. package/dist/synapse-client/HttpClient.js.map +1 -1
  502. package/dist/synapse-client/SynapseClient.js.map +1 -1
  503. package/dist/synapse-queries/KeyFactory.d.ts +1 -0
  504. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  505. package/dist/synapse-queries/KeyFactory.js +3 -0
  506. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  507. package/dist/synapse-queries/QueryMatching.test-utils.js.map +1 -1
  508. package/dist/synapse-queries/auth/useTwoFactorEnrollment.js.map +1 -1
  509. package/dist/synapse-queries/curation/task/useCurationTask.d.ts +1 -1
  510. package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
  511. package/dist/synapse-queries/curation/task/useCurationTask.js +1 -1
  512. package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
  513. package/dist/synapse-queries/dataaccess/useRestrictionInformation.js.map +1 -1
  514. package/dist/synapse-queries/doi/useDOI.js.map +1 -1
  515. package/dist/synapse-queries/download/useDownloadList.js.map +1 -1
  516. package/dist/synapse-queries/entity/useEntity.js.map +1 -1
  517. package/dist/synapse-queries/entity/useEntityBundle.js.map +1 -1
  518. package/dist/synapse-queries/entity/useExportTableQueryToAnalysisPlatform.js.map +1 -1
  519. package/dist/synapse-queries/entity/useExportToTerra.js.map +1 -1
  520. package/dist/synapse-queries/entity/useGetQueryResultBundle.js.map +1 -1
  521. package/dist/synapse-queries/entity/useSchema.js.map +1 -1
  522. package/dist/synapse-queries/file/UploadToS3.js.map +1 -1
  523. package/dist/synapse-queries/file/useDirectUploadToS3.js.map +1 -1
  524. package/dist/synapse-queries/file/useFiles.js.map +1 -1
  525. package/dist/synapse-queries/forum/useReply.js.map +1 -1
  526. package/dist/synapse-queries/forum/useThread.d.ts +1 -0
  527. package/dist/synapse-queries/forum/useThread.d.ts.map +1 -1
  528. package/dist/synapse-queries/forum/useThread.js +19 -12
  529. package/dist/synapse-queries/forum/useThread.js.map +1 -1
  530. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.d.ts +2 -0
  531. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.d.ts.map +1 -1
  532. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.js.map +1 -1
  533. package/dist/synapse-queries/grid/useExportGrid.js.map +1 -1
  534. package/dist/synapse-queries/grid/useGridSession.js.map +1 -1
  535. package/dist/synapse-queries/grid/useImportCsvIntoGrid.js.map +1 -1
  536. package/dist/synapse-queries/subscription/useSubscription.js.map +1 -1
  537. package/dist/synapse-queries/table/useGetCsvPreview.js.map +1 -1
  538. package/dist/synapse-queries/table/useTableUpdateTransaction.js.map +1 -1
  539. package/dist/synapse-queries/team/useTeamMembers.js.map +1 -1
  540. package/dist/synapse-queries/user/useGetUserChallenges.js.map +1 -1
  541. package/dist/synapse-queries/user/useUserBundle.js.map +1 -1
  542. package/dist/synapse-queries/user/useUserGroupHeader.js.map +1 -1
  543. package/dist/testutils/ReactQueryMockUtils.js.map +1 -1
  544. package/dist/theme/ThemeProvider.js.map +1 -1
  545. package/dist/tsconfig.build.tsbuildinfo +1 -1
  546. package/dist/utils/APIConstants.d.ts +1 -0
  547. package/dist/utils/APIConstants.d.ts.map +1 -1
  548. package/dist/utils/APIConstants.js +2 -2
  549. package/dist/utils/APIConstants.js.map +1 -1
  550. package/dist/utils/AppUtils/session/ApplicationSessionManager.d.ts.map +1 -1
  551. package/dist/utils/AppUtils/session/ApplicationSessionManager.js +7 -4
  552. package/dist/utils/AppUtils/session/ApplicationSessionManager.js.map +1 -1
  553. package/dist/utils/AppUtils/session/SynapseSessionManager.js.map +1 -1
  554. package/dist/utils/AppUtils/session/useSessionManager.js.map +1 -1
  555. package/dist/utils/PermissionLevelToAccessType.js.map +1 -1
  556. package/dist/utils/challenge/evaluation/EvaluationUtils.js.map +1 -1
  557. package/dist/utils/context/SynapseContext.js.map +1 -1
  558. package/dist/utils/functions/AccessControlListUtils.d.ts +4 -0
  559. package/dist/utils/functions/AccessControlListUtils.d.ts.map +1 -1
  560. package/dist/utils/functions/AccessControlListUtils.js +12 -1
  561. package/dist/utils/functions/AccessControlListUtils.js.map +1 -1
  562. package/dist/utils/functions/EntityTypeUtils.d.ts.map +1 -1
  563. package/dist/utils/functions/EntityTypeUtils.js +15 -4
  564. package/dist/utils/functions/EntityTypeUtils.js.map +1 -1
  565. package/dist/utils/functions/GridApiUtils.js.map +1 -1
  566. package/dist/utils/functions/QueryFilterUtils.js.map +1 -1
  567. package/dist/utils/functions/RealmUtils.d.ts +4 -0
  568. package/dist/utils/functions/RealmUtils.d.ts.map +1 -1
  569. package/dist/utils/functions/RealmUtils.js +9 -3
  570. package/dist/utils/functions/RealmUtils.js.map +1 -1
  571. package/dist/utils/functions/SanitizeHtmlUtils.js.map +1 -1
  572. package/dist/utils/functions/SanitizeHtmlUtils.test-utils.js.map +1 -1
  573. package/dist/utils/functions/SqlFunctions.js.map +1 -1
  574. package/dist/utils/functions/StringUtils.js.map +1 -1
  575. package/dist/utils/functions/deepLinkingUtils.js.map +1 -1
  576. package/dist/utils/functions/getDataFromFromStorage.js.map +1 -1
  577. package/dist/utils/functions/getEndpoint.js.map +1 -1
  578. package/dist/utils/functions/getUserData.js.map +1 -1
  579. package/dist/utils/functions/queryUtils.js.map +1 -1
  580. package/dist/utils/functions/testDownloadSpeed.js.map +1 -1
  581. package/dist/utils/hooks/useConfirmItems.js.map +1 -1
  582. package/dist/utils/hooks/useCookiePreferences.js.map +1 -1
  583. package/dist/utils/hooks/useCreateShortUrl.js.map +1 -1
  584. package/dist/utils/hooks/useDetectSSOCode.js.map +1 -1
  585. package/dist/utils/hooks/useDirectDownloadHandler.js.map +1 -1
  586. package/dist/utils/hooks/useGetGoalData.js.map +1 -1
  587. package/dist/utils/hooks/useGetInfoFromIds.js.map +1 -1
  588. package/dist/utils/hooks/useImageUrlUtils.js.map +1 -1
  589. package/dist/utils/hooks/useImmutableTableQuery/useImmutableTableQuery.js.map +1 -1
  590. package/dist/utils/hooks/useImmutableTableQuery/useTableQueryReducer.js.map +1 -1
  591. package/dist/utils/hooks/useIsBot.js.map +1 -1
  592. package/dist/utils/hooks/useListState.js.map +1 -1
  593. package/dist/utils/hooks/useLogin.d.ts.map +1 -1
  594. package/dist/utils/hooks/useLogin.js +53 -52
  595. package/dist/utils/hooks/useLogin.js.map +1 -1
  596. package/dist/utils/hooks/useMutuallyExclusiveState.js.map +1 -1
  597. package/dist/utils/hooks/useOverlay.js.map +1 -1
  598. package/dist/utils/hooks/usePreFetchResource.js.map +1 -1
  599. package/dist/utils/hooks/useQuerySearchParam.js.map +1 -1
  600. package/dist/utils/hooks/useScrollFadeTransition.js.map +1 -1
  601. package/dist/utils/hooks/useSet.js.map +1 -1
  602. package/dist/utils/hooks/useSourceAppConfigs.js.map +1 -1
  603. package/dist/utils/hooks/useTableImageUrl.js.map +1 -1
  604. package/dist/utils/hooks/useUploadFileEntity/useCreatePathsAndGetParentId.js.map +1 -1
  605. package/dist/utils/hooks/useUploadFileEntity/useLinkFileEntityToURL.js.map +1 -1
  606. package/dist/utils/hooks/useUploadFileEntity/usePrepareFileEntityUpload.js.map +1 -1
  607. package/dist/utils/hooks/useUploadFileEntity/useTrackFileUploads.js.map +1 -1
  608. package/dist/utils/hooks/useUploadFileEntity/useUploadFileEntities.js.map +1 -1
  609. package/dist/utils/hooks/useUploadFileEntity/useUploadFiles.js.map +1 -1
  610. package/dist/utils/hooks/useUploadFileEntity/willUploadsExceedStorageLimit.js.map +1 -1
  611. package/dist/utils/html/TargetEnum.js.map +1 -1
  612. package/dist/utils/jsonschema/SchemaAnnotationUtils.js.map +1 -1
  613. package/package.json +5 -5
@@ -88,6 +88,7 @@ export declare const FORUM = "/repo/v1/forum";
88
88
  export declare const FORUM_THREAD: (id: string) => string;
89
89
  export declare const THREAD = "/repo/v1/thread";
90
90
  export declare const THREAD_ID: (id: string) => string;
91
+ export declare const THREAD_FOR_SUBMISSION: (submissionId: string | number) => string;
91
92
  export declare const THREAD_REPLIES: (id: string) => string;
92
93
  export declare const AGENT = "/repo/v1/agent";
93
94
  export declare const AGENT_SESSION = "/repo/v1/agent/session";
@@ -1 +1 @@
1
- {"version":3,"file":"APIConstants.d.ts","sourceRoot":"","sources":["../../src/utils/APIConstants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAG5D,eAAO,MAAM,gBAAgB,QAE1B,CAAA;AAEH,eAAO,MAAM,IAAI,aAAa,CAAA;AAC9B,eAAO,MAAM,IAAI,aAAa,CAAA;AAC9B,eAAO,MAAM,IAAI,aAAa,CAAA;AAK9B,eAAO,MAAM,QAAQ,GAAI,IAAI,MAAM,GAAG,MAAM,WAAkC,CAAA;AAC9E,eAAO,MAAM,gBAAgB,GAAI,IAAI,MAAM,GAAG,MAAM,WAA0B,CAAA;AAE9E,eAAO,MAAM,MAAM,oBAAmB,CAAA;AACtC,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,WAAoC,CAAA;AAC9E,eAAO,MAAM,SAAS,GAAI,IAAI,MAAM,GAAG,MAAM,WAA2B,CAAA;AACxE;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,IAAI,MAAM,GAAG,MAAM,EACnB,UAAU,MAAM,GAAG,MAAM,WACuC,CAAA;AAClE,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,GAAG,MAAM,WACtB,CAAA;AAChC,eAAO,MAAM,gBAA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AAG,MAAM,WACvB,CAAA;AAEhC,eAAO,MAAM,GAAG,iBAAgB,CAAA;AAChC,eAAO,MAAM,eAAe,6BAAuB,CAAA;AAEnD,eAAO,MAAM,eAAe,4BAA2B,CAAA;AACvD,eAAO,MAAM,qBAAqB,GAAI,IAAI,MAAM,GAAG,MAAM,WAC7B,CAAA;AAE5B,eAAO,MAAM,mBAAmB,+BAA8B,CAAA;AAC9D,eAAO,MAAM,8BAA8B,GAAI,IAAI,MAAM,GAAG,MAAM,WACvB,CAAA;AAC3C,eAAO,MAAM,iDAAiD,GAC5D,qBAAqB,MAAM,GAAG,MAAM,WAEyC,CAAA;AAE/E,eAAO,MAAM,gBAAgB,6BAA4B,CAAA;AACzD,eAAO,MAAM,8CAA8C,GACzD,qBAAqB,MAAM,GAAG,MAAM,WAC0C,CAAA;AAEhF,eAAO,MAAM,WAAW,wBAAuB,CAAA;AAC/C,eAAO,MAAM,iBAAiB,8BAAyB,CAAA;AAEvD,eAAO,MAAM,QAAQ,sBAAqB,CAAA;AAC1C,eAAO,MAAM,uBAAuB,GAAI,UAAU,MAAM,WACT,CAAA;AAE/C,eAAO,MAAM,gBAAgB,GAAI,YAAY,UAAU,WAEtD,CAAA;AAED,eAAO,MAAM,SAAS,GACpB,iBAAiB,UAAU,EAC3B,eAAe,MAAM,WAGtB,CAAA;AACD,eAAO,MAAM,YAAY,GACvB,iBAAiB,UAAU,EAC3B,eAAe,MAAM,EACrB,YAAY,MAAM,GAAG,SAAS,WAG/B,CAAA;AAED,eAAO,MAAM,oBAAoB,gCAA+B,CAAA;AAChE,eAAO,MAAM,uBAAuB,GAAI,cAAc,MAAM,GAAG,MAAM,WACd,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { BackendDestinationEnum as e, getEndpoint as t } from "./functions/getEndpoint.js";
2
2
  import { ObjectType as n } from "@sage-bionetworks/synapse-types";
3
3
  //#region src/utils/APIConstants.ts
4
- var ee = `${t(e.REPO_ENDPOINT)}`, r = "/repo/v1", i = "/auth/v1", a = "/file/v1", o = "/async/start", s = "/async/get", c = (e) => `${i}/oauth2/client/${e}`, te = (e) => `${c(e)}/acl`, l = `${r}/entity`, u = (e) => `${r}/entity/alias/${e}`, d = (e) => `${r}/entity/${e}`, f = (e, t) => `${r}/entity/${e}${t ? `/version/${t}` : ""}`, p = (e) => `${r}/entity/${e}/version`, ne = (e, t) => `${f(e, t)}/bundle2`, re = (e) => `${r}/entity/${e}/access`, ie = (e) => `${d(e)}/acl`, ae = (e) => `${d(e)}/evaluation`, oe = (e) => `${d(e)}/path`, se = (e) => `${d(e)}/permissions`, ce = (e) => `${d(e)}/type`, le = `${r}/entity/header`, ue = (e) => `${r}/entity/${e}/json`, de = (e, t) => `${r}/entity/${e}/version/${t}/json`, m = (e) => `${r}/entity/${e}/schema`, fe = (e) => `${m(e)}/binding`, pe = (e) => `${m(e)}/validation`, me = (e) => `${d(e)}/accessRequirement`, he = (e) => `${d(e)}/table/query/async/start`, ge = (e, t) => `${d(e)}/table/query/async/get/${t}`, _e = (e) => `${r}/asynchronous/job/${e}`, ve = `${r}/userProfile`, h = `${r}/schema`, ye = `${r}/schema/type/registered`, be = (e) => `${r}/schema/type/registered/${e}`, g = `${h}/type/validation${o}`, _ = (e) => `${h}/type/validation${s}/${e}`, v = `${r}/user`, y = `${v}/bundle`, b = (e) => `${v}/${e}`, x = (e) => `${b(e)}/bundle`, S = `${r}/userProfile`, C = (e) => `${S}/${e}`, w = `${r}/notificationEmail`, T = `${r}/principal/available`, E = (e) => `${r}/account/emailValidation?portalEndpoint=${e}`, D = `${r}/account2`, O = `${i}/termsOfUse2`, k = `${O}/info`, A = `${O}/status`, j = (e) => `${r}/project/${e}`, M = (e) => `${j(e)}/storage/usage`, N = `${r}/verificationSubmission`, xe = (e) => `${N}/${e}/state`, Se = `${i}/user/changePassword`, P = `${r}/accessRequirement`, Ce = `${P}/search`, we = `${r}/dataAccessSubmission/search`, F = (e) => `${P}/${e}`, Te = (e) => F(e) + "/acl", Ee = (e) => F(e) + "/status", De = (e) => `${r}/access_requirement/${e}/wikikey`, Oe = `${r}/favorite`, ke = `${r}/userGroupHeaders`, Ae = `${r}/userGroupHeaders/batch`, je = (e) => `${r}/dataAccessSubmission/${e}`, Me = (e) => `${r}/userProfile/${e}/image/preview`, Ne = (e) => F(e) + "/approvedSubmissionInfo", I = `${r}/evaluation`, Pe = (e) => I + `/${e}`, Fe = (e, t) => t ? `${r}/entity/${e}/version/${t}/generatedBy` : `${r}/entity/${e}/generatedBy`, L = `${r}/trashcan`, Ie = `${L}/view`, Le = (e) => `${L}/restore/${e}`, Re = (e) => `${L}/purge/${e}`, R = (e) => `${r}/team/${e}`, z = (e, t) => R(e) + `/member/${t}`, ze = (e) => `${r}/teamMembers/${e}`, B = "https://www.synapse.org/SignedToken:", V = "https://www.synapse.org/Team:", Be = `${r}/teamMember/?teamEndpoint=${V}&notificationUnsubscribeEndpoint=${B}`, Ve = (e, t) => z(e, t) + `?teamEndpoint=${V}&notificationUnsubscribeEndpoint=${B}`, He = (e) => `${r}/membershipInvitation/${e}`, Ue = (e) => `${r}/membershipInvitation/${e}/inviteeVerificationSignedToken`, We = (e) => `${r}/membershipInvitation/${e}/inviteeId`, H = `${r}/forum`, Ge = (e) => `${H}/${e}/threads`, U = `${r}/thread`, W = (e) => `${U}/${e}`, Ke = (e) => `${W(e)}/replies`, G = `${r}/agent`, K = `${G}/session`, qe = (e) => `${K}/${e}`, Je = `${K}s/list`, Ye = (e) => `${K}/history/${e}`, Xe = `${G}/chat/async/start`, Ze = (e) => `${G}/chat/async/get/${e}`, Qe = (e) => `${G}/chat/trace/${e}`, q = `${r}/doi`, $e = `${q}/association`, J = `${r}/accessApproval`, et = (e) => `${J}/${e}`, Y = `${r}/dataAccessRequest`, X = (e) => `${Y}/${e}/submission`, tt = (e) => `${F(e)}/dataAccessRequestForUpdate`, nt = `${r}/researchProject`, rt = (e) => `${F(e)}/researchProjectForUpdate`, Z = `${a}/fileHandle`, it = `${Z}/batch`, at = `${r}/projects`, ot = (e) => `${r}/entity/${e}/actions/download`, Q = (e) => `${r}/${n[e].toLowerCase()}`, $ = (e, t) => `${Q(e)}/${t}/wiki`, st = (e, t, n) => `${$(e, t)}/${n ?? ""}`, ct = `${i}/sessionAccessToken`, lt = (e) => `${i}/user/${e}/sessionAccessToken/all`;
4
+ var ee = `${t(e.REPO_ENDPOINT)}`, r = "/repo/v1", i = "/auth/v1", a = "/file/v1", o = "/async/start", s = "/async/get", c = (e) => `${i}/oauth2/client/${e}`, te = (e) => `${c(e)}/acl`, l = `${r}/entity`, u = (e) => `${r}/entity/alias/${e}`, d = (e) => `${r}/entity/${e}`, f = (e, t) => `${r}/entity/${e}${t ? `/version/${t}` : ""}`, p = (e) => `${r}/entity/${e}/version`, ne = (e, t) => `${f(e, t)}/bundle2`, re = (e) => `${r}/entity/${e}/access`, ie = (e) => `${d(e)}/acl`, ae = (e) => `${d(e)}/evaluation`, oe = (e) => `${d(e)}/path`, se = (e) => `${d(e)}/permissions`, ce = (e) => `${d(e)}/type`, le = `${r}/entity/header`, ue = (e) => `${r}/entity/${e}/json`, de = (e, t) => `${r}/entity/${e}/version/${t}/json`, m = (e) => `${r}/entity/${e}/schema`, fe = (e) => `${m(e)}/binding`, pe = (e) => `${m(e)}/validation`, me = (e) => `${d(e)}/accessRequirement`, he = (e) => `${d(e)}/table/query/async/start`, ge = (e, t) => `${d(e)}/table/query/async/get/${t}`, _e = (e) => `${r}/asynchronous/job/${e}`, ve = `${r}/userProfile`, h = `${r}/schema`, ye = `${r}/schema/type/registered`, be = (e) => `${r}/schema/type/registered/${e}`, g = `${h}/type/validation${o}`, _ = (e) => `${h}/type/validation${s}/${e}`, v = `${r}/user`, y = `${v}/bundle`, b = (e) => `${v}/${e}`, x = (e) => `${b(e)}/bundle`, S = `${r}/userProfile`, C = (e) => `${S}/${e}`, w = `${r}/notificationEmail`, T = `${r}/principal/available`, E = (e) => `${r}/account/emailValidation?portalEndpoint=${e}`, D = `${r}/account2`, O = `${i}/termsOfUse2`, k = `${O}/info`, A = `${O}/status`, j = (e) => `${r}/project/${e}`, M = (e) => `${j(e)}/storage/usage`, N = `${r}/verificationSubmission`, xe = (e) => `${N}/${e}/state`, Se = `${i}/user/changePassword`, P = `${r}/accessRequirement`, Ce = `${P}/search`, we = `${r}/dataAccessSubmission/search`, F = (e) => `${P}/${e}`, Te = (e) => F(e) + "/acl", Ee = (e) => F(e) + "/status", De = (e) => `${r}/access_requirement/${e}/wikikey`, Oe = `${r}/favorite`, ke = `${r}/userGroupHeaders`, Ae = `${r}/userGroupHeaders/batch`, je = (e) => `${r}/dataAccessSubmission/${e}`, Me = (e) => `${r}/userProfile/${e}/image/preview`, Ne = (e) => F(e) + "/approvedSubmissionInfo", I = `${r}/evaluation`, Pe = (e) => I + `/${e}`, Fe = (e, t) => t ? `${r}/entity/${e}/version/${t}/generatedBy` : `${r}/entity/${e}/generatedBy`, L = `${r}/trashcan`, Ie = `${L}/view`, Le = (e) => `${L}/restore/${e}`, Re = (e) => `${L}/purge/${e}`, R = (e) => `${r}/team/${e}`, z = (e, t) => R(e) + `/member/${t}`, ze = (e) => `${r}/teamMembers/${e}`, B = "https://www.synapse.org/SignedToken:", V = "https://www.synapse.org/Team:", Be = `${r}/teamMember/?teamEndpoint=${V}&notificationUnsubscribeEndpoint=${B}`, Ve = (e, t) => z(e, t) + `?teamEndpoint=${V}&notificationUnsubscribeEndpoint=${B}`, He = (e) => `${r}/membershipInvitation/${e}`, Ue = (e) => `${r}/membershipInvitation/${e}/inviteeVerificationSignedToken`, We = (e) => `${r}/membershipInvitation/${e}/inviteeId`, H = `${r}/forum`, Ge = (e) => `${H}/${e}/threads`, U = `${r}/thread`, W = (e) => `${U}/${e}`, Ke = (e) => `${U}/submission/${e}`, qe = (e) => `${W(e)}/replies`, G = `${r}/agent`, K = `${G}/session`, Je = (e) => `${K}/${e}`, Ye = `${K}s/list`, Xe = (e) => `${K}/history/${e}`, Ze = `${G}/chat/async/start`, Qe = (e) => `${G}/chat/async/get/${e}`, $e = (e) => `${G}/chat/trace/${e}`, q = `${r}/doi`, J = `${q}/association`, Y = `${r}/accessApproval`, et = (e) => `${Y}/${e}`, X = `${r}/dataAccessRequest`, tt = (e) => `${X}/${e}/submission`, nt = (e) => `${F(e)}/dataAccessRequestForUpdate`, rt = `${r}/researchProject`, it = (e) => `${F(e)}/researchProjectForUpdate`, Z = `${a}/fileHandle`, at = `${Z}/batch`, ot = `${r}/projects`, st = (e) => `${r}/entity/${e}/actions/download`, Q = (e) => `${r}/${n[e].toLowerCase()}`, $ = (e, t) => `${Q(e)}/${t}/wiki`, ct = (e, t, n) => `${$(e, t)}/${n ?? ""}`, lt = `${i}/sessionAccessToken`, ut = (e) => `${i}/user/${e}/sessionAccessToken/all`;
5
5
  //#endregion
6
- export { J as ACCESS_APPROVAL, et as ACCESS_APPROVAL_BY_ID, we as ACCESS_REQUEST_SUBMISSION_SEARCH, P as ACCESS_REQUIREMENT, Te as ACCESS_REQUIREMENT_ACL, F as ACCESS_REQUIREMENT_BY_ID, tt as ACCESS_REQUIREMENT_DATA_ACCESS_REQUEST_FOR_UPDATE, rt as ACCESS_REQUIREMENT_RESEARCH_PROJECT_FOR_UPDATE, Ce as ACCESS_REQUIREMENT_SEARCH, Ee as ACCESS_REQUIREMENT_STATUS, De as ACCESS_REQUIREMENT_WIKI_PAGE_KEY, Fe as ACTIVITY_FOR_ENTITY, G as AGENT, Qe as AGENT_CHAT_TRACE, K as AGENT_SESSION, Ye as AGENT_SESSION_HISTORY, T as ALIAS_AVAILABLE, lt as ALL_USER_SESSION_TOKENS, Ne as APPROVED_SUBMISSION_INFO, _e as ASYNCHRONOUS_JOB_TOKEN, i as AUTH, ee as BACKEND_ENDPOINT, We as BIND_INVITATION_TO_AUTHENTICATED_USER, Se as CHANGE_PASSWORD, Y as DATA_ACCESS_REQUEST, X as DATA_ACCESS_REQUEST_SUBMISSION, je as DATA_ACCESS_SUBMISSION_BY_ID, q as DOI, $e as DOI_ASSOCIATION, l as ENTITY, re as ENTITY_ACCESS, me as ENTITY_ACCESS_REQUIREMENTS, ie as ENTITY_ACL, ot as ENTITY_ACTIONS_REQUIRED, u as ENTITY_ALIAS, ne as ENTITY_BUNDLE_V2, ae as ENTITY_EVALUATION, le as ENTITY_HEADERS, ce as ENTITY_HEADER_BY_ID, d as ENTITY_ID, f as ENTITY_ID_VERSION, p as ENTITY_ID_VERSIONS, ue as ENTITY_JSON, oe as ENTITY_PATH, se as ENTITY_PERMISSIONS, m as ENTITY_SCHEMA, fe as ENTITY_SCHEMA_BINDING, pe as ENTITY_SCHEMA_VALIDATION, de as ENTITY_VERSION_JSON, I as EVALUATION, Pe as EVALUATION_BY_ID, Oe as FAVORITES, a as FILE, Z as FILE_HANDLE, it as FILE_HANDLE_BATCH, H as FORUM, Ge as FORUM_THREAD, Ze as GET_CHAT_ASYNC, Ue as INVITEE_VERIFICATION_SIGNED_TOKEN, Je as LIST_AGENT_SESSIONS, He as MEMBERSHIP_INVITATION, w as NOTIFICATION_EMAIL, te as OAUTH_CLIENT_ACL, c as OAUTH_ID, Me as PROFILE_IMAGE_PREVIEW, at as PROJECTS, M as PROJECT_STORAGE_USAGE, ye as REGISTERED_SCHEMA, be as REGISTERED_SCHEMA_ID, E as REGISTER_ACCOUNT_STEP_1, D as REGISTER_ACCOUNT_STEP_2, r as REPO, nt as RESEARCH_PROJECT, h as SCHEMA, _ as SCHEMA_VALIDATION_GET, g as SCHEMA_VALIDATION_START, ct as SESSION_ACCESS_TOKEN, Xe as START_CHAT_ASYNC, ge as TABLE_QUERY_ASYNC_GET, he as TABLE_QUERY_ASYNC_START, R as TEAM, z as TEAM_ID_MEMBER_ID, Ve as TEAM_ID_MEMBER_ID_WITH_NOTIFICATION, Be as TEAM_MEMBER, ze as TEAM_MEMBERS, O as TERMS_OF_USE, k as TERMS_OF_USE_INFO, A as TERMS_OF_USE_STATUS, U as THREAD, W as THREAD_ID, Ke as THREAD_REPLIES, L as TRASHCAN, Re as TRASHCAN_PURGE, Le as TRASHCAN_RESTORE, Ie as TRASHCAN_VIEW, qe as UPDATE_AGENT_SESSION, v as USER, y as USER_BUNDLE, ke as USER_GROUP_HEADERS, Ae as USER_GROUP_HEADERS_BATCH, b as USER_ID, x as USER_ID_BUNDLE, S as USER_PROFILE, ve as USER_PROFILE_ENDPOINT, C as USER_PROFILE_ID, N as VERIFICATION_SUBMISSION, xe as VERIFICATION_SUBMISSION_STATE, Q as WIKI_OBJECT_TYPE, $ as WIKI_PAGE, st as WIKI_PAGE_ID };
6
+ export { Y as ACCESS_APPROVAL, et as ACCESS_APPROVAL_BY_ID, we as ACCESS_REQUEST_SUBMISSION_SEARCH, P as ACCESS_REQUIREMENT, Te as ACCESS_REQUIREMENT_ACL, F as ACCESS_REQUIREMENT_BY_ID, nt as ACCESS_REQUIREMENT_DATA_ACCESS_REQUEST_FOR_UPDATE, it as ACCESS_REQUIREMENT_RESEARCH_PROJECT_FOR_UPDATE, Ce as ACCESS_REQUIREMENT_SEARCH, Ee as ACCESS_REQUIREMENT_STATUS, De as ACCESS_REQUIREMENT_WIKI_PAGE_KEY, Fe as ACTIVITY_FOR_ENTITY, G as AGENT, $e as AGENT_CHAT_TRACE, K as AGENT_SESSION, Xe as AGENT_SESSION_HISTORY, T as ALIAS_AVAILABLE, ut as ALL_USER_SESSION_TOKENS, Ne as APPROVED_SUBMISSION_INFO, _e as ASYNCHRONOUS_JOB_TOKEN, i as AUTH, ee as BACKEND_ENDPOINT, We as BIND_INVITATION_TO_AUTHENTICATED_USER, Se as CHANGE_PASSWORD, X as DATA_ACCESS_REQUEST, tt as DATA_ACCESS_REQUEST_SUBMISSION, je as DATA_ACCESS_SUBMISSION_BY_ID, q as DOI, J as DOI_ASSOCIATION, l as ENTITY, re as ENTITY_ACCESS, me as ENTITY_ACCESS_REQUIREMENTS, ie as ENTITY_ACL, st as ENTITY_ACTIONS_REQUIRED, u as ENTITY_ALIAS, ne as ENTITY_BUNDLE_V2, ae as ENTITY_EVALUATION, le as ENTITY_HEADERS, ce as ENTITY_HEADER_BY_ID, d as ENTITY_ID, f as ENTITY_ID_VERSION, p as ENTITY_ID_VERSIONS, ue as ENTITY_JSON, oe as ENTITY_PATH, se as ENTITY_PERMISSIONS, m as ENTITY_SCHEMA, fe as ENTITY_SCHEMA_BINDING, pe as ENTITY_SCHEMA_VALIDATION, de as ENTITY_VERSION_JSON, I as EVALUATION, Pe as EVALUATION_BY_ID, Oe as FAVORITES, a as FILE, Z as FILE_HANDLE, at as FILE_HANDLE_BATCH, H as FORUM, Ge as FORUM_THREAD, Qe as GET_CHAT_ASYNC, Ue as INVITEE_VERIFICATION_SIGNED_TOKEN, Ye as LIST_AGENT_SESSIONS, He as MEMBERSHIP_INVITATION, w as NOTIFICATION_EMAIL, te as OAUTH_CLIENT_ACL, c as OAUTH_ID, Me as PROFILE_IMAGE_PREVIEW, ot as PROJECTS, M as PROJECT_STORAGE_USAGE, ye as REGISTERED_SCHEMA, be as REGISTERED_SCHEMA_ID, E as REGISTER_ACCOUNT_STEP_1, D as REGISTER_ACCOUNT_STEP_2, r as REPO, rt as RESEARCH_PROJECT, h as SCHEMA, _ as SCHEMA_VALIDATION_GET, g as SCHEMA_VALIDATION_START, lt as SESSION_ACCESS_TOKEN, Ze as START_CHAT_ASYNC, ge as TABLE_QUERY_ASYNC_GET, he as TABLE_QUERY_ASYNC_START, R as TEAM, z as TEAM_ID_MEMBER_ID, Ve as TEAM_ID_MEMBER_ID_WITH_NOTIFICATION, Be as TEAM_MEMBER, ze as TEAM_MEMBERS, O as TERMS_OF_USE, k as TERMS_OF_USE_INFO, A as TERMS_OF_USE_STATUS, U as THREAD, Ke as THREAD_FOR_SUBMISSION, W as THREAD_ID, qe as THREAD_REPLIES, L as TRASHCAN, Re as TRASHCAN_PURGE, Le as TRASHCAN_RESTORE, Ie as TRASHCAN_VIEW, Je as UPDATE_AGENT_SESSION, v as USER, y as USER_BUNDLE, ke as USER_GROUP_HEADERS, Ae as USER_GROUP_HEADERS_BATCH, b as USER_ID, x as USER_ID_BUNDLE, S as USER_PROFILE, ve as USER_PROFILE_ENDPOINT, C as USER_PROFILE_ID, N as VERIFICATION_SUBMISSION, xe as VERIFICATION_SUBMISSION_STATE, Q as WIKI_OBJECT_TYPE, $ as WIKI_PAGE, ct as WIKI_PAGE_ID };
7
7
 
8
8
  //# sourceMappingURL=APIConstants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"APIConstants.js","names":[],"sources":["../../src/utils/APIConstants.ts"],"sourcesContent":["/**\n * Separating API endpoints into their own constants file\n */\n\nimport { ObjectType } from '@sage-bionetworks/synapse-types'\nimport { getEndpoint, BackendDestinationEnum } from './functions/getEndpoint'\n\nexport const BACKEND_ENDPOINT = `${getEndpoint(\n BackendDestinationEnum.REPO_ENDPOINT,\n)}`\n\nexport const REPO = `/repo/v1`\nexport const AUTH = `/auth/v1`\nexport const FILE = `/file/v1`\n\nconst ASYNC_START = '/async/start'\nconst ASYNC_GET = '/async/get'\n\nexport const OAUTH_ID = (id: string | number) => `${AUTH}/oauth2/client/${id}`\nexport const OAUTH_CLIENT_ACL = (id: string | number) => `${OAUTH_ID(id)}/acl`\n\nexport const ENTITY = `${REPO}/entity`\nexport const ENTITY_ALIAS = (alias: string) => `${REPO}/entity/alias/${alias}`\nexport const ENTITY_ID = (id: string | number) => `${REPO}/entity/${id}`\n/**\n * Some services allow (but do not require) you to specify the version in the path.\n */\nexport const ENTITY_ID_VERSION = (\n id: string | number,\n version?: string | number,\n) => `${REPO}/entity/${id}${version ? `/version/${version}` : ''}`\nexport const ENTITY_ID_VERSIONS = (id: string | number) =>\n `${REPO}/entity/${id}/version`\nexport const ENTITY_BUNDLE_V2 = (\n id: string | number,\n version?: string | number,\n) => `${ENTITY_ID_VERSION(id, version)}/bundle2`\nexport const ENTITY_ACCESS = (id: string | number) =>\n `${REPO}/entity/${id}/access`\nexport const ENTITY_ACL = (id: string | number) => `${ENTITY_ID(id)}/acl`\nexport const ENTITY_EVALUATION = (id: string | number) =>\n `${ENTITY_ID(id)}/evaluation`\nexport const ENTITY_PATH = (id: string | number) => `${ENTITY_ID(id)}/path`\nexport const ENTITY_PERMISSIONS = (id: string | number) =>\n `${ENTITY_ID(id)}/permissions`\nexport const ENTITY_HEADER_BY_ID = (id: string | number) =>\n `${ENTITY_ID(id)}/type`\nexport const ENTITY_HEADERS = `${REPO}/entity/header`\n\nexport const ENTITY_JSON = (id: string | number) => `${REPO}/entity/${id}/json`\nexport const ENTITY_VERSION_JSON = (\n id: string | number,\n versionNumber: number,\n) => `${REPO}/entity/${id}/version/${versionNumber}/json`\n\nexport const ENTITY_SCHEMA = (id: string | number) =>\n `${REPO}/entity/${id}/schema`\nexport const ENTITY_SCHEMA_BINDING = (id: string | number) =>\n `${ENTITY_SCHEMA(id)}/binding`\nexport const ENTITY_SCHEMA_VALIDATION = (id: string | number) =>\n `${ENTITY_SCHEMA(id)}/validation`\n\nexport const ENTITY_ACCESS_REQUIREMENTS = (entityId: string | number) =>\n `${ENTITY_ID(entityId)}/accessRequirement`\n\nexport const TABLE_QUERY_ASYNC_START = (id: string | number) =>\n `${ENTITY_ID(id)}/table/query/async/start`\n\nexport const TABLE_QUERY_ASYNC_GET = (\n entityId: string | number,\n asyncJobToken: string,\n) => `${ENTITY_ID(entityId)}/table/query/async/get/${asyncJobToken}`\n\nexport const ASYNCHRONOUS_JOB_TOKEN = (asyncJobToken: string) =>\n `${REPO}/asynchronous/job/${asyncJobToken}`\n\nexport const USER_PROFILE_ENDPOINT = `${REPO}/userProfile`\n\nexport const SCHEMA = `${REPO}/schema`\nexport const REGISTERED_SCHEMA = `${REPO}/schema/type/registered`\nexport const REGISTERED_SCHEMA_ID = (schema$id: string | number) =>\n `${REPO}/schema/type/registered/${schema$id}`\nexport const SCHEMA_VALIDATION_START = `${SCHEMA}/type/validation${ASYNC_START}`\nexport const SCHEMA_VALIDATION_GET = (asyncJobId: string | number) =>\n `${SCHEMA}/type/validation${ASYNC_GET}/${asyncJobId}`\n\nexport const USER = `${REPO}/user`\nexport const USER_BUNDLE = `${USER}/bundle`\nexport const USER_ID = (id: string | number) => `${USER}/${id}`\nexport const USER_ID_BUNDLE = (id: string | number) => `${USER_ID(id)}/bundle`\n\nexport const USER_PROFILE = `${REPO}/userProfile`\nexport const USER_PROFILE_ID = (id: string | number) => `${USER_PROFILE}/${id}`\n\nexport const NOTIFICATION_EMAIL = `${REPO}/notificationEmail`\nexport const ALIAS_AVAILABLE = `${REPO}/principal/available`\nexport const REGISTER_ACCOUNT_STEP_1 = (portalEndpoint: string) =>\n `${REPO}/account/emailValidation?portalEndpoint=${portalEndpoint}`\nexport const REGISTER_ACCOUNT_STEP_2 = `${REPO}/account2`\nexport const TERMS_OF_USE = `${AUTH}/termsOfUse2`\nexport const TERMS_OF_USE_INFO = `${TERMS_OF_USE}/info`\nexport const TERMS_OF_USE_STATUS = `${TERMS_OF_USE}/status`\nconst PROJECT = (projectId: string) => `${REPO}/project/${projectId}`\nexport const PROJECT_STORAGE_USAGE = (projectId: string) =>\n `${PROJECT(projectId)}/storage/usage`\nexport const VERIFICATION_SUBMISSION = `${REPO}/verificationSubmission`\nexport const VERIFICATION_SUBMISSION_STATE = (id: string) =>\n `${VERIFICATION_SUBMISSION}/${id}/state`\nexport const CHANGE_PASSWORD = `${AUTH}/user/changePassword`\n\nexport const ACCESS_REQUIREMENT = `${REPO}/accessRequirement`\nexport const ACCESS_REQUIREMENT_SEARCH = `${ACCESS_REQUIREMENT}/search`\nexport const ACCESS_REQUEST_SUBMISSION_SEARCH = `${REPO}/dataAccessSubmission/search`\n\nexport const ACCESS_REQUIREMENT_BY_ID = (id: string | number) =>\n `${ACCESS_REQUIREMENT}/${id}`\n\nexport const ACCESS_REQUIREMENT_ACL = (id: string | number) =>\n ACCESS_REQUIREMENT_BY_ID(id) + '/acl'\n\nexport const ACCESS_REQUIREMENT_STATUS = (id: string | number) =>\n ACCESS_REQUIREMENT_BY_ID(id) + '/status'\n\nexport const ACCESS_REQUIREMENT_WIKI_PAGE_KEY = (id: string | number) =>\n // Note that this is `access_requirement` not `accessRequirement`!\n `${REPO}/access_requirement/${id}/wikikey`\n\nexport const FAVORITES = `${REPO}/favorite`\n\nexport const USER_GROUP_HEADERS = `${REPO}/userGroupHeaders`\nexport const USER_GROUP_HEADERS_BATCH = `${REPO}/userGroupHeaders/batch`\n\nexport const DATA_ACCESS_SUBMISSION_BY_ID = (id: string | number) =>\n `${REPO}/dataAccessSubmission/${id}`\n\nexport const PROFILE_IMAGE_PREVIEW = (userId: string) =>\n `${REPO}/userProfile/${userId}/image/preview`\n\nexport const APPROVED_SUBMISSION_INFO = (\n accessRequirementId: string | number,\n) => ACCESS_REQUIREMENT_BY_ID(accessRequirementId) + `/approvedSubmissionInfo`\n\nexport const EVALUATION = `${REPO}/evaluation`\nexport const EVALUATION_BY_ID = (id: string | number) => EVALUATION + `/${id}`\n\nexport const ACTIVITY_FOR_ENTITY = (entityId: string, versionNumber?: string) =>\n versionNumber\n ? `${REPO}/entity/${entityId}/version/${versionNumber}/generatedBy`\n : `${REPO}/entity/${entityId}/generatedBy`\nexport const TRASHCAN = `${REPO}/trashcan`\nexport const TRASHCAN_VIEW = `${TRASHCAN}/view`\nexport const TRASHCAN_RESTORE = (id: string) => `${TRASHCAN}/restore/${id}`\nexport const TRASHCAN_PURGE = (id: string) => `${TRASHCAN}/purge/${id}`\n\nexport const TEAM = (teamId: string | number) => `${REPO}/team/${teamId}`\nexport const TEAM_ID_MEMBER_ID = (\n teamId: string | number,\n memberId: string | number,\n) => TEAM(teamId) + `/member/${memberId}`\nexport const TEAM_MEMBERS = (teamId: string | number) =>\n `${REPO}/teamMembers/${teamId}`\n\nconst notificationUnsubscribeEndpoint = 'https://www.synapse.org/SignedToken:'\nconst teamEndpoint = 'https://www.synapse.org/Team:'\n\nexport const TEAM_MEMBER = `${REPO}/teamMember/?teamEndpoint=${teamEndpoint}&notificationUnsubscribeEndpoint=${notificationUnsubscribeEndpoint}`\nexport const TEAM_ID_MEMBER_ID_WITH_NOTIFICATION = (\n teamId: string | number,\n memberId: string | number,\n) =>\n TEAM_ID_MEMBER_ID(teamId, memberId) +\n `?teamEndpoint=${teamEndpoint}&notificationUnsubscribeEndpoint=${notificationUnsubscribeEndpoint}`\nexport const MEMBERSHIP_INVITATION = (id: string) =>\n `${REPO}/membershipInvitation/${id}`\nexport const INVITEE_VERIFICATION_SIGNED_TOKEN = (id: string) =>\n `${REPO}/membershipInvitation/${id}/inviteeVerificationSignedToken`\nexport const BIND_INVITATION_TO_AUTHENTICATED_USER = (id: string) =>\n `${REPO}/membershipInvitation/${id}/inviteeId`\n\nexport const FORUM = `${REPO}/forum`\nexport const FORUM_THREAD = (id: string) => `${FORUM}/${id}/threads`\n\nexport const THREAD = `${REPO}/thread`\nexport const THREAD_ID = (id: string) => `${THREAD}/${id}`\nexport const THREAD_REPLIES = (id: string) => `${THREAD_ID(id)}/replies`\n\nexport const AGENT = `${REPO}/agent`\nexport const AGENT_SESSION = `${AGENT}/session`\nexport const UPDATE_AGENT_SESSION = (sessionId?: string) =>\n `${AGENT_SESSION}/${sessionId}`\nexport const LIST_AGENT_SESSIONS = `${AGENT_SESSION}s/list`\nexport const AGENT_SESSION_HISTORY = (sessionId?: string) =>\n `${AGENT_SESSION}/history/${sessionId}`\nexport const START_CHAT_ASYNC = `${AGENT}/chat/async/start`\nexport const GET_CHAT_ASYNC = (jobId: string | number) =>\n `${AGENT}/chat/async/get/${jobId}`\n\nexport const AGENT_CHAT_TRACE = (jobId: string | number) =>\n `${AGENT}/chat/trace/${jobId}`\n\nexport const DOI = `${REPO}/doi`\nexport const DOI_ASSOCIATION = `${DOI}/association`\n\nexport const ACCESS_APPROVAL = `${REPO}/accessApproval`\nexport const ACCESS_APPROVAL_BY_ID = (id: string | number) =>\n `${ACCESS_APPROVAL}/${id}`\n\nexport const DATA_ACCESS_REQUEST = `${REPO}/dataAccessRequest`\nexport const DATA_ACCESS_REQUEST_SUBMISSION = (id: string | number) =>\n `${DATA_ACCESS_REQUEST}/${id}/submission`\nexport const ACCESS_REQUIREMENT_DATA_ACCESS_REQUEST_FOR_UPDATE = (\n accessRequirementId: string | number,\n) =>\n `${ACCESS_REQUIREMENT_BY_ID(accessRequirementId)}/dataAccessRequestForUpdate`\n\nexport const RESEARCH_PROJECT = `${REPO}/researchProject`\nexport const ACCESS_REQUIREMENT_RESEARCH_PROJECT_FOR_UPDATE = (\n accessRequirementId: string | number,\n) => `${ACCESS_REQUIREMENT_BY_ID(accessRequirementId)}/researchProjectForUpdate`\n\nexport const FILE_HANDLE = `${FILE}/fileHandle`\nexport const FILE_HANDLE_BATCH = `${FILE_HANDLE}/batch`\n\nexport const PROJECTS = `${REPO}/projects`\nexport const ENTITY_ACTIONS_REQUIRED = (entityId: string) =>\n `${REPO}/entity/${entityId}/actions/download`\n\nexport const WIKI_OBJECT_TYPE = (objectType: ObjectType) => {\n return `${REPO}/${ObjectType[objectType].toLowerCase()}`\n}\n\nexport const WIKI_PAGE = (\n ownerObjectType: ObjectType,\n ownerObjectId: string,\n) => {\n return `${WIKI_OBJECT_TYPE(ownerObjectType)}/${ownerObjectId}/wiki`\n}\nexport const WIKI_PAGE_ID = (\n ownerObjectType: ObjectType,\n ownerObjectId: string,\n wikiPageId: string | undefined,\n) => {\n return `${WIKI_PAGE(ownerObjectType, ownerObjectId)}/${wikiPageId ?? ''}`\n}\n\nexport const SESSION_ACCESS_TOKEN = `${AUTH}/sessionAccessToken`\nexport const ALL_USER_SESSION_TOKENS = (targetUserId: string | number) =>\n `${AUTH}/user/${targetUserId}/sessionAccessToken/all`\n"],"mappings":";;;AAOA,IAAa,KAAmB,GAAG,EACjC,EAAuB,cACxB,IAEY,IAAO,YACP,IAAO,YACP,IAAO,YAEd,IAAc,gBACd,IAAY,cAEL,KAAY,MAAwB,GAAG,EAAK,iBAAiB,KAC7D,MAAoB,MAAwB,GAAG,EAAS,EAAG,CAAC,OAE5D,IAAS,GAAG,EAAK,UACjB,KAAgB,MAAkB,GAAG,EAAK,gBAAgB,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G,EAAK,GAAG,EAAW,GAAY,aAAa,IAG3C,KACX,GACA,MAEO,GAAG,EAAiB,EAAgB,CAAC,GAAG,EAAc,QAElD,MACX,GACA,GACA,MAEO,GAAG,EAAU,GAAiB,EAAc,CAAC,GAAG,KAAc,MAG1D,KAAuB,GAAG,EAAK,sBAC/B,MAA2B,MACtC,GAAG,EAAK,QAAQ,EAAa"}
1
+ {"version":3,"file":"APIConstants.js","names":[],"sources":["../../src/utils/APIConstants.ts"],"sourcesContent":["/**\n * Separating API endpoints into their own constants file\n */\n\nimport { ObjectType } from '@sage-bionetworks/synapse-types'\nimport { getEndpoint, BackendDestinationEnum } from './functions/getEndpoint'\n\nexport const BACKEND_ENDPOINT = `${getEndpoint(\n BackendDestinationEnum.REPO_ENDPOINT,\n)}`\n\nexport const REPO = `/repo/v1`\nexport const AUTH = `/auth/v1`\nexport const FILE = `/file/v1`\n\nconst ASYNC_START = '/async/start'\nconst ASYNC_GET = '/async/get'\n\nexport const OAUTH_ID = (id: string | number) => `${AUTH}/oauth2/client/${id}`\nexport const OAUTH_CLIENT_ACL = (id: string | number) => `${OAUTH_ID(id)}/acl`\n\nexport const ENTITY = `${REPO}/entity`\nexport const ENTITY_ALIAS = (alias: string) => `${REPO}/entity/alias/${alias}`\nexport const ENTITY_ID = (id: string | number) => `${REPO}/entity/${id}`\n/**\n * Some services allow (but do not require) you to specify the version in the path.\n */\nexport const ENTITY_ID_VERSION = (\n id: string | number,\n version?: string | number,\n) => `${REPO}/entity/${id}${version ? `/version/${version}` : ''}`\nexport const ENTITY_ID_VERSIONS = (id: string | number) =>\n `${REPO}/entity/${id}/version`\nexport const ENTITY_BUNDLE_V2 = (\n id: string | number,\n version?: string | number,\n) => `${ENTITY_ID_VERSION(id, version)}/bundle2`\nexport const ENTITY_ACCESS = (id: string | number) =>\n `${REPO}/entity/${id}/access`\nexport const ENTITY_ACL = (id: string | number) => `${ENTITY_ID(id)}/acl`\nexport const ENTITY_EVALUATION = (id: string | number) =>\n `${ENTITY_ID(id)}/evaluation`\nexport const ENTITY_PATH = (id: string | number) => `${ENTITY_ID(id)}/path`\nexport const ENTITY_PERMISSIONS = (id: string | number) =>\n `${ENTITY_ID(id)}/permissions`\nexport const ENTITY_HEADER_BY_ID = (id: string | number) =>\n `${ENTITY_ID(id)}/type`\nexport const ENTITY_HEADERS = `${REPO}/entity/header`\n\nexport const ENTITY_JSON = (id: string | number) => `${REPO}/entity/${id}/json`\nexport const ENTITY_VERSION_JSON = (\n id: string | number,\n versionNumber: number,\n) => `${REPO}/entity/${id}/version/${versionNumber}/json`\n\nexport const ENTITY_SCHEMA = (id: string | number) =>\n `${REPO}/entity/${id}/schema`\nexport const ENTITY_SCHEMA_BINDING = (id: string | number) =>\n `${ENTITY_SCHEMA(id)}/binding`\nexport const ENTITY_SCHEMA_VALIDATION = (id: string | number) =>\n `${ENTITY_SCHEMA(id)}/validation`\n\nexport const ENTITY_ACCESS_REQUIREMENTS = (entityId: string | number) =>\n `${ENTITY_ID(entityId)}/accessRequirement`\n\nexport const TABLE_QUERY_ASYNC_START = (id: string | number) =>\n `${ENTITY_ID(id)}/table/query/async/start`\n\nexport const TABLE_QUERY_ASYNC_GET = (\n entityId: string | number,\n asyncJobToken: string,\n) => `${ENTITY_ID(entityId)}/table/query/async/get/${asyncJobToken}`\n\nexport const ASYNCHRONOUS_JOB_TOKEN = (asyncJobToken: string) =>\n `${REPO}/asynchronous/job/${asyncJobToken}`\n\nexport const USER_PROFILE_ENDPOINT = `${REPO}/userProfile`\n\nexport const SCHEMA = `${REPO}/schema`\nexport const REGISTERED_SCHEMA = `${REPO}/schema/type/registered`\nexport const REGISTERED_SCHEMA_ID = (schema$id: string | number) =>\n `${REPO}/schema/type/registered/${schema$id}`\nexport const SCHEMA_VALIDATION_START = `${SCHEMA}/type/validation${ASYNC_START}`\nexport const SCHEMA_VALIDATION_GET = (asyncJobId: string | number) =>\n `${SCHEMA}/type/validation${ASYNC_GET}/${asyncJobId}`\n\nexport const USER = `${REPO}/user`\nexport const USER_BUNDLE = `${USER}/bundle`\nexport const USER_ID = (id: string | number) => `${USER}/${id}`\nexport const USER_ID_BUNDLE = (id: string | number) => `${USER_ID(id)}/bundle`\n\nexport const USER_PROFILE = `${REPO}/userProfile`\nexport const USER_PROFILE_ID = (id: string | number) => `${USER_PROFILE}/${id}`\n\nexport const NOTIFICATION_EMAIL = `${REPO}/notificationEmail`\nexport const ALIAS_AVAILABLE = `${REPO}/principal/available`\nexport const REGISTER_ACCOUNT_STEP_1 = (portalEndpoint: string) =>\n `${REPO}/account/emailValidation?portalEndpoint=${portalEndpoint}`\nexport const REGISTER_ACCOUNT_STEP_2 = `${REPO}/account2`\nexport const TERMS_OF_USE = `${AUTH}/termsOfUse2`\nexport const TERMS_OF_USE_INFO = `${TERMS_OF_USE}/info`\nexport const TERMS_OF_USE_STATUS = `${TERMS_OF_USE}/status`\nconst PROJECT = (projectId: string) => `${REPO}/project/${projectId}`\nexport const PROJECT_STORAGE_USAGE = (projectId: string) =>\n `${PROJECT(projectId)}/storage/usage`\nexport const VERIFICATION_SUBMISSION = `${REPO}/verificationSubmission`\nexport const VERIFICATION_SUBMISSION_STATE = (id: string) =>\n `${VERIFICATION_SUBMISSION}/${id}/state`\nexport const CHANGE_PASSWORD = `${AUTH}/user/changePassword`\n\nexport const ACCESS_REQUIREMENT = `${REPO}/accessRequirement`\nexport const ACCESS_REQUIREMENT_SEARCH = `${ACCESS_REQUIREMENT}/search`\nexport const ACCESS_REQUEST_SUBMISSION_SEARCH = `${REPO}/dataAccessSubmission/search`\n\nexport const ACCESS_REQUIREMENT_BY_ID = (id: string | number) =>\n `${ACCESS_REQUIREMENT}/${id}`\n\nexport const ACCESS_REQUIREMENT_ACL = (id: string | number) =>\n ACCESS_REQUIREMENT_BY_ID(id) + '/acl'\n\nexport const ACCESS_REQUIREMENT_STATUS = (id: string | number) =>\n ACCESS_REQUIREMENT_BY_ID(id) + '/status'\n\nexport const ACCESS_REQUIREMENT_WIKI_PAGE_KEY = (id: string | number) =>\n // Note that this is `access_requirement` not `accessRequirement`!\n `${REPO}/access_requirement/${id}/wikikey`\n\nexport const FAVORITES = `${REPO}/favorite`\n\nexport const USER_GROUP_HEADERS = `${REPO}/userGroupHeaders`\nexport const USER_GROUP_HEADERS_BATCH = `${REPO}/userGroupHeaders/batch`\n\nexport const DATA_ACCESS_SUBMISSION_BY_ID = (id: string | number) =>\n `${REPO}/dataAccessSubmission/${id}`\n\nexport const PROFILE_IMAGE_PREVIEW = (userId: string) =>\n `${REPO}/userProfile/${userId}/image/preview`\n\nexport const APPROVED_SUBMISSION_INFO = (\n accessRequirementId: string | number,\n) => ACCESS_REQUIREMENT_BY_ID(accessRequirementId) + `/approvedSubmissionInfo`\n\nexport const EVALUATION = `${REPO}/evaluation`\nexport const EVALUATION_BY_ID = (id: string | number) => EVALUATION + `/${id}`\n\nexport const ACTIVITY_FOR_ENTITY = (entityId: string, versionNumber?: string) =>\n versionNumber\n ? `${REPO}/entity/${entityId}/version/${versionNumber}/generatedBy`\n : `${REPO}/entity/${entityId}/generatedBy`\nexport const TRASHCAN = `${REPO}/trashcan`\nexport const TRASHCAN_VIEW = `${TRASHCAN}/view`\nexport const TRASHCAN_RESTORE = (id: string) => `${TRASHCAN}/restore/${id}`\nexport const TRASHCAN_PURGE = (id: string) => `${TRASHCAN}/purge/${id}`\n\nexport const TEAM = (teamId: string | number) => `${REPO}/team/${teamId}`\nexport const TEAM_ID_MEMBER_ID = (\n teamId: string | number,\n memberId: string | number,\n) => TEAM(teamId) + `/member/${memberId}`\nexport const TEAM_MEMBERS = (teamId: string | number) =>\n `${REPO}/teamMembers/${teamId}`\n\nconst notificationUnsubscribeEndpoint = 'https://www.synapse.org/SignedToken:'\nconst teamEndpoint = 'https://www.synapse.org/Team:'\n\nexport const TEAM_MEMBER = `${REPO}/teamMember/?teamEndpoint=${teamEndpoint}&notificationUnsubscribeEndpoint=${notificationUnsubscribeEndpoint}`\nexport const TEAM_ID_MEMBER_ID_WITH_NOTIFICATION = (\n teamId: string | number,\n memberId: string | number,\n) =>\n TEAM_ID_MEMBER_ID(teamId, memberId) +\n `?teamEndpoint=${teamEndpoint}&notificationUnsubscribeEndpoint=${notificationUnsubscribeEndpoint}`\nexport const MEMBERSHIP_INVITATION = (id: string) =>\n `${REPO}/membershipInvitation/${id}`\nexport const INVITEE_VERIFICATION_SIGNED_TOKEN = (id: string) =>\n `${REPO}/membershipInvitation/${id}/inviteeVerificationSignedToken`\nexport const BIND_INVITATION_TO_AUTHENTICATED_USER = (id: string) =>\n `${REPO}/membershipInvitation/${id}/inviteeId`\n\nexport const FORUM = `${REPO}/forum`\nexport const FORUM_THREAD = (id: string) => `${FORUM}/${id}/threads`\n\nexport const THREAD = `${REPO}/thread`\nexport const THREAD_ID = (id: string) => `${THREAD}/${id}`\nexport const THREAD_FOR_SUBMISSION = (submissionId: string | number) =>\n `${THREAD}/submission/${submissionId}`\nexport const THREAD_REPLIES = (id: string) => `${THREAD_ID(id)}/replies`\n\nexport const AGENT = `${REPO}/agent`\nexport const AGENT_SESSION = `${AGENT}/session`\nexport const UPDATE_AGENT_SESSION = (sessionId?: string) =>\n `${AGENT_SESSION}/${sessionId}`\nexport const LIST_AGENT_SESSIONS = `${AGENT_SESSION}s/list`\nexport const AGENT_SESSION_HISTORY = (sessionId?: string) =>\n `${AGENT_SESSION}/history/${sessionId}`\nexport const START_CHAT_ASYNC = `${AGENT}/chat/async/start`\nexport const GET_CHAT_ASYNC = (jobId: string | number) =>\n `${AGENT}/chat/async/get/${jobId}`\n\nexport const AGENT_CHAT_TRACE = (jobId: string | number) =>\n `${AGENT}/chat/trace/${jobId}`\n\nexport const DOI = `${REPO}/doi`\nexport const DOI_ASSOCIATION = `${DOI}/association`\n\nexport const ACCESS_APPROVAL = `${REPO}/accessApproval`\nexport const ACCESS_APPROVAL_BY_ID = (id: string | number) =>\n `${ACCESS_APPROVAL}/${id}`\n\nexport const DATA_ACCESS_REQUEST = `${REPO}/dataAccessRequest`\nexport const DATA_ACCESS_REQUEST_SUBMISSION = (id: string | number) =>\n `${DATA_ACCESS_REQUEST}/${id}/submission`\nexport const ACCESS_REQUIREMENT_DATA_ACCESS_REQUEST_FOR_UPDATE = (\n accessRequirementId: string | number,\n) =>\n `${ACCESS_REQUIREMENT_BY_ID(accessRequirementId)}/dataAccessRequestForUpdate`\n\nexport const RESEARCH_PROJECT = `${REPO}/researchProject`\nexport const ACCESS_REQUIREMENT_RESEARCH_PROJECT_FOR_UPDATE = (\n accessRequirementId: string | number,\n) => `${ACCESS_REQUIREMENT_BY_ID(accessRequirementId)}/researchProjectForUpdate`\n\nexport const FILE_HANDLE = `${FILE}/fileHandle`\nexport const FILE_HANDLE_BATCH = `${FILE_HANDLE}/batch`\n\nexport const PROJECTS = `${REPO}/projects`\nexport const ENTITY_ACTIONS_REQUIRED = (entityId: string) =>\n `${REPO}/entity/${entityId}/actions/download`\n\nexport const WIKI_OBJECT_TYPE = (objectType: ObjectType) => {\n return `${REPO}/${ObjectType[objectType].toLowerCase()}`\n}\n\nexport const WIKI_PAGE = (\n ownerObjectType: ObjectType,\n ownerObjectId: string,\n) => {\n return `${WIKI_OBJECT_TYPE(ownerObjectType)}/${ownerObjectId}/wiki`\n}\nexport const WIKI_PAGE_ID = (\n ownerObjectType: ObjectType,\n ownerObjectId: string,\n wikiPageId: string | undefined,\n) => {\n return `${WIKI_PAGE(ownerObjectType, ownerObjectId)}/${wikiPageId ?? ''}`\n}\n\nexport const SESSION_ACCESS_TOKEN = `${AUTH}/sessionAccessToken`\nexport const ALL_USER_SESSION_TOKENS = (targetUserId: string | number) =>\n `${AUTH}/user/${targetUserId}/sessionAccessToken/all`\n"],"mappings":";;;AAOA,IAAa,KAAmB,GAAG,EACjC,EAAuB,cACxB,IAEY,IAAO,YACP,IAAO,YACP,IAAO,YAEd,IAAc,gBACd,IAAY,cAEL,KAAY,MAAwB,GAAG,EAAK,iBAAiB,KAC7D,MAAoB,MAAwB,GAAG,EAAS,EAAG,CAAC,OA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EAAY,SAEnC,KAAW,GAAG,EAAK,YACnB,MAA2B,MACtC,GAAG,EAAK,UAAU,EAAS,oBAEhB,KAAoB,MACxB,GAAG,EAAK,GAAG,EAAW,GAAY,aAAa,IAG3C,KACX,GACA,MAEO,GAAG,EAAiB,EAAgB,CAAC,GAAG,EAAc,QAElD,MACX,GACA,GACA,MAEO,GAAG,EAAU,GAAiB,EAAc,CAAC,GAAG,KAAc,MAG1D,KAAuB,GAAG,EAAK,sBAC/B,MAA2B,MACtC,GAAG,EAAK,QAAQ,EAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationSessionManager.d.ts","sourceRoot":"","sources":["../../../../src/utils/AppUtils/session/ApplicationSessionManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8EAA8E,CAAA;AACzH,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAA0B,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAK1E,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,+GAA+G;IAC/G,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,8IAA8I;IAC9I,+BAA+B,CAAC,EAAE,MAAM,IAAI,CAAA;IAM5C,8BAA8B,CAAC,EAAE,CAC/B,qBAAqB,EAAE,0BAA0B,EACjD,eAAe,EAAE,MAAM,KACpB,IAAI,CAAA;IACT,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAEnC,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAC,CAAA;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,8BAA8B,2CA+BtC;AAED,eAAe,yBAAyB,CAAA"}
1
+ {"version":3,"file":"ApplicationSessionManager.d.ts","sourceRoot":"","sources":["../../../../src/utils/AppUtils/session/ApplicationSessionManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8EAA8E,CAAA;AACzH,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAA0B,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAK1E,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,+GAA+G;IAC/G,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,8IAA8I;IAC9I,+BAA+B,CAAC,EAAE,MAAM,IAAI,CAAA;IAM5C,8BAA8B,CAAC,EAAE,CAC/B,qBAAqB,EAAE,0BAA0B,EACjD,eAAe,EAAE,MAAM,KACpB,IAAI,CAAA;IACT,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAEnC,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAC,CAAA;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,8BAA8B,2CAmCtC;AAED,eAAe,yBAAyB,CAAA"}
@@ -7,13 +7,16 @@ import { useSessionManager as a } from "./useSessionManager.js";
7
7
  import { jsx as o } from "react/jsx-runtime";
8
8
  //#region src/utils/AppUtils/session/ApplicationSessionManager.tsx
9
9
  function s(s) {
10
- let { children: c, downloadCartPageUrl: l, appId: u, requireAuthentication: d, ...f } = s, { sessionContext: p, token: m } = a(f);
10
+ let { children: c, downloadCartPageUrl: l, appId: u, requireAuthentication: d, defaultRealmId: f, ...p } = s, { sessionContext: m, token: h } = a({
11
+ ...p,
12
+ defaultRealm: f
13
+ });
11
14
  return /* @__PURE__ */ o(r, {
12
- context: p,
15
+ context: m,
13
16
  children: /* @__PURE__ */ o(n, {
14
17
  synapseContext: {
15
- accessToken: m,
16
- isAuthenticated: p.isAuthenticated,
18
+ accessToken: h,
19
+ isAuthenticated: m.isAuthenticated,
17
20
  isInExperimentalMode: t(),
18
21
  utcTime: e(),
19
22
  downloadCartPageUrl: l,
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationSessionManager.js","names":[],"sources":["../../../../src/utils/AppUtils/session/ApplicationSessionManager.tsx"],"sourcesContent":["import {\n getUseUtcTimeFromCookie,\n isInSynapseExperimentalMode,\n} from '@/synapse-client/SynapseClient'\nimport { TwoFactorAuthErrorResponse } from '@sage-bionetworks/synapse-client/generated/models/TwoFactorAuthErrorResponse'\nimport { PropsWithChildren } from 'react'\nimport { SynapseContextProvider, SynapseContextType } from '../../context'\nimport { ApplicationSessionContextProvider } from './ApplicationSessionContext'\nimport { AuthenticationGuard } from './AuthenticationGuard'\nimport { useSessionManager } from './useSessionManager'\n\nexport type ApplicationSessionManagerProps = PropsWithChildren<{\n /** The realm that an unauthenticated user should be signed in to. Defaults to \"0\", the public Synapse realm */\n defaultRealmId?: string\n downloadCartPageUrl?: string\n /* If defined, specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated. If the elapsed time is greater than this value, the session will be cleared and the user will have to re-authenticate. */\n maxAge?: number\n /** Called if the user is not authenticated when the session is initialized. Can be used to trigger an error if authentication is expected. */\n onMissingExpectedAuthentication?: () => void\n /*\n * Callback invoked after the user has successfully signed in through SSO when the purpose of signing in is to disable 2FA on the account.\n * The twoFactorAuthSSOError and twoFaResetToken are passed in the callback and can be used to complete the 2FA reset process.\n * This only needs to be implemented if the app implements the workflow to disable 2FA (i.e. only if the app supports account management).\n */\n onTwoFactorAuthResetThroughSSO?: (\n twoFactorAuthSSOError: TwoFactorAuthErrorResponse,\n twoFaResetToken: string,\n ) => void\n appId?: SynapseContextType['appId']\n /* If true, redirects unauthenticated users to OneSage login after session initialization */\n requireAuthentication?: boolean\n}>\n\n/**\n * The ApplicationSessionManager will manage Synapse user session in an app. The goal is that any custom app should\n * just be able to add this component near the top of its component tree and have the full Synapse login lifecycle managed\n * while exposing minimal complexity to the app itself.\n *\n * Custom per-app behavior should be customized with generalizable props to this component.\n *\n * The session data can be accessed with useApplicationSessionContext.\n *\n * This component must be called within a react-router Router. ApplicationSessionManager also wraps all of its children\n * in a SynapseContextProvider.\n * @param props\n * @constructor\n */\nexport function ApplicationSessionManager(\n props: ApplicationSessionManagerProps,\n) {\n const {\n children,\n downloadCartPageUrl,\n appId,\n requireAuthentication,\n ...hookOptions\n } = props\n const { sessionContext, token } = useSessionManager(hookOptions)\n\n return (\n <ApplicationSessionContextProvider context={sessionContext}>\n <SynapseContextProvider\n synapseContext={{\n accessToken: token,\n isAuthenticated: sessionContext.isAuthenticated,\n isInExperimentalMode: isInSynapseExperimentalMode(),\n utcTime: getUseUtcTimeFromCookie(),\n downloadCartPageUrl,\n appId: appId,\n }}\n >\n {requireAuthentication ? (\n <AuthenticationGuard>{children}</AuthenticationGuard>\n ) : (\n children\n )}\n </SynapseContextProvider>\n </ApplicationSessionContextProvider>\n )\n}\n\nexport default ApplicationSessionManager\n"],"mappings":";;;;;;;;AA+CA,SAAgB,EACd,GACA;CACA,IAAM,EACJ,aACA,wBACA,UACA,0BACA,GAAG,MACD,GACE,EAAE,mBAAgB,aAAU,EAAkB,EAAY;AAEhE,QACE,kBAAC,GAAD;EAAmC,SAAS;YAC1C,kBAAC,GAAD;GACE,gBAAgB;IACd,aAAa;IACb,iBAAiB,EAAe;IAChC,sBAAsB,GAA6B;IACnD,SAAS,GAAyB;IAClC;IACO;IACR;aAEA,IACC,kBAAC,GAAD,EAAsB,aAA+B,CAAA,GAErD;GAEqB,CAAA;EACS,CAAA"}
1
+ {"version":3,"file":"ApplicationSessionManager.js","names":[],"sources":["../../../../src/utils/AppUtils/session/ApplicationSessionManager.tsx"],"sourcesContent":["import {\n getUseUtcTimeFromCookie,\n isInSynapseExperimentalMode,\n} from '@/synapse-client/SynapseClient'\nimport { TwoFactorAuthErrorResponse } from '@sage-bionetworks/synapse-client/generated/models/TwoFactorAuthErrorResponse'\nimport { PropsWithChildren } from 'react'\nimport { SynapseContextProvider, SynapseContextType } from '../../context'\nimport { ApplicationSessionContextProvider } from './ApplicationSessionContext'\nimport { AuthenticationGuard } from './AuthenticationGuard'\nimport { useSessionManager } from './useSessionManager'\n\nexport type ApplicationSessionManagerProps = PropsWithChildren<{\n /** The realm that an unauthenticated user should be signed in to. Defaults to \"0\", the public Synapse realm */\n defaultRealmId?: string\n downloadCartPageUrl?: string\n /* If defined, specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated. If the elapsed time is greater than this value, the session will be cleared and the user will have to re-authenticate. */\n maxAge?: number\n /** Called if the user is not authenticated when the session is initialized. Can be used to trigger an error if authentication is expected. */\n onMissingExpectedAuthentication?: () => void\n /*\n * Callback invoked after the user has successfully signed in through SSO when the purpose of signing in is to disable 2FA on the account.\n * The twoFactorAuthSSOError and twoFaResetToken are passed in the callback and can be used to complete the 2FA reset process.\n * This only needs to be implemented if the app implements the workflow to disable 2FA (i.e. only if the app supports account management).\n */\n onTwoFactorAuthResetThroughSSO?: (\n twoFactorAuthSSOError: TwoFactorAuthErrorResponse,\n twoFaResetToken: string,\n ) => void\n appId?: SynapseContextType['appId']\n /* If true, redirects unauthenticated users to OneSage login after session initialization */\n requireAuthentication?: boolean\n}>\n\n/**\n * The ApplicationSessionManager will manage Synapse user session in an app. The goal is that any custom app should\n * just be able to add this component near the top of its component tree and have the full Synapse login lifecycle managed\n * while exposing minimal complexity to the app itself.\n *\n * Custom per-app behavior should be customized with generalizable props to this component.\n *\n * The session data can be accessed with useApplicationSessionContext.\n *\n * This component must be called within a react-router Router. ApplicationSessionManager also wraps all of its children\n * in a SynapseContextProvider.\n * @param props\n * @constructor\n */\nexport function ApplicationSessionManager(\n props: ApplicationSessionManagerProps,\n) {\n const {\n children,\n downloadCartPageUrl,\n appId,\n requireAuthentication,\n defaultRealmId,\n ...hookOptions\n } = props\n const { sessionContext, token } = useSessionManager({\n ...hookOptions,\n defaultRealm: defaultRealmId,\n })\n\n return (\n <ApplicationSessionContextProvider context={sessionContext}>\n <SynapseContextProvider\n synapseContext={{\n accessToken: token,\n isAuthenticated: sessionContext.isAuthenticated,\n isInExperimentalMode: isInSynapseExperimentalMode(),\n utcTime: getUseUtcTimeFromCookie(),\n downloadCartPageUrl,\n appId: appId,\n }}\n >\n {requireAuthentication ? (\n <AuthenticationGuard>{children}</AuthenticationGuard>\n ) : (\n children\n )}\n </SynapseContextProvider>\n </ApplicationSessionContextProvider>\n )\n}\n\nexport default ApplicationSessionManager\n"],"mappings":";;;;;;;;AA+CA,SAAgB,EACd,GACA;CACA,IAAM,EACJ,aACA,wBACA,UACA,0BACA,mBACA,GAAG,MACD,GACE,EAAE,mBAAgB,aAAU,EAAkB;EAClD,GAAG;EACH,cAAc;EACf,CAAC;AAEF,QACE,kBAAC,GAAD;EAAmC,SAAS;YAC1C,kBAAC,GAAD;GACE,gBAAgB;IACd,aAAa;IACb,iBAAiB,EAAe;IAChC,sBAAsB,GAA6B;IACnD,SAAS,GAAyB;IAClC;IACO;IACR;aAEA,IACC,kBAAC,GAAD,EAAsB,aAA+B,CAAA,GAErD;GAEqB,CAAA;EACS,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SynapseSessionManager.js","names":[],"sources":["../../../../src/utils/AppUtils/session/SynapseSessionManager.ts"],"sourcesContent":["import SynapseClient from '@/synapse-client'\nimport {\n BackendDestinationEnum,\n getEndpoint,\n} from '@/utils/functions/getEndpoint'\nimport {\n OAuthTokenIntrospectionResponse,\n RealmPrincipal,\n SynapseClient as SynapseOpenApiClient,\n SynapseClientError,\n} from '@sage-bionetworks/synapse-client'\n\nconst REFRESH_INTERVAL_MS = 60_000\n\nexport type SessionState = {\n token: string | undefined\n realmId: string | undefined\n userId: string | undefined\n isAuthenticated: boolean\n hasInitializedSession: boolean\n}\n\nexport type SynapseSessionManagerOptions = {\n /** The realm that an unauthenticated user should be signed in to. Defaults to \"0\", the public Synapse realm */\n defaultRealm?: string\n /** If defined, specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated.\n * If the elapsed time is greater than this value, the session will be cleared and the user will have to re-authenticate. */\n maxAge?: number\n /** Called if the user is not authenticated when the session is initialized. */\n onMissingExpectedAuthentication?: () => void\n /** Called when a stored token fails validation (e.g. expired). Called after the session manager signs out.\n * If not provided, the session manager will call `window.location.reload()` after signing out. */\n onSessionInvalid?: () => void\n}\n\nconst INITIAL_STATE: SessionState = {\n token: undefined,\n realmId: undefined,\n userId: undefined,\n isAuthenticated: false,\n hasInitializedSession: false,\n}\n\n/**\n * Framework-agnostic session manager for Synapse applications.\n *\n * Handles the full session lifecycle: token retrieval from browser cookies,\n * token validation via OAuth2 introspection, periodic refresh, and sign-out.\n *\n * Can be used directly from any JavaScript context (GWT/JsInterop, vanilla JS, etc.)\n * or wrapped by a framework-specific adapter (e.g. a React hook via `useSyncExternalStore`).\n *\n * Implements the external store contract: use {@link subscribe} and {@link getSnapshot}\n * to integrate with React's `useSyncExternalStore`, or any other subscription-based framework.\n */\nexport class SynapseSessionManager {\n private state: SessionState = INITIAL_STATE\n private listeners = new Set<() => void>()\n private intervalId: ReturnType<typeof setInterval> | null = null\n private options: Required<\n Pick<SynapseSessionManagerOptions, 'defaultRealm'>\n > &\n SynapseSessionManagerOptions\n\n constructor(options: SynapseSessionManagerOptions = {}) {\n this.options = {\n ...options,\n defaultRealm: options.defaultRealm ?? '0',\n }\n // Bind methods so they can be passed directly to useSyncExternalStore\n this.subscribe = this.subscribe.bind(this)\n this.getSnapshot = this.getSnapshot.bind(this)\n this.getServerSnapshot = this.getServerSnapshot.bind(this)\n }\n\n /**\n * Subscribe to state changes. The listener is called whenever session state is updated.\n * @returns an unsubscribe function.\n *\n * Compatible with React's `useSyncExternalStore(manager.subscribe, manager.getSnapshot)`.\n */\n subscribe(listener: () => void): () => void {\n this.listeners.add(listener)\n return () => {\n this.listeners.delete(listener)\n }\n }\n\n /**\n * Get the current session state snapshot. Returns a stable reference that only\n * changes when the state is updated.\n *\n * Compatible with React's `useSyncExternalStore(manager.subscribe, manager.getSnapshot)`.\n */\n getSnapshot(): SessionState {\n return this.state\n }\n\n /**\n * Get the server-side (SSR) snapshot: always returns the unauthenticated initial state.\n * Required by React's `useSyncExternalStore` when rendering on the server.\n */\n getServerSnapshot(): SessionState {\n return INITIAL_STATE\n }\n\n /**\n * Update mutable options. Values are read at `refreshSession`/`clearSession` call time,\n * so changes take effect on the next refresh cycle.\n */\n setOptions(\n options: Pick<SynapseSessionManagerOptions, 'defaultRealm' | 'maxAge'>,\n ): void {\n if (options.defaultRealm !== undefined) {\n this.options.defaultRealm = options.defaultRealm\n }\n if (options.maxAge !== undefined) {\n this.options.maxAge = options.maxAge\n }\n }\n\n /**\n * Start the session manager: performs an initial refresh and sets up the periodic refresh interval.\n */\n start(): void {\n this.refreshSession()\n this.intervalId = setInterval(() => {\n this.refreshSession()\n }, REFRESH_INTERVAL_MS)\n }\n\n /**\n * Stop the periodic refresh and clean up resources.\n */\n dispose(): void {\n if (this.intervalId !== null) {\n clearInterval(this.intervalId)\n this.intervalId = null\n }\n }\n\n /**\n * Refresh the session by reading the stored token, validating it, and updating state.\n * If no token is stored, initializes an anonymous session.\n * If the token is invalid, signs out and triggers onSessionInvalid (or reloads the page).\n */\n async refreshSession(): Promise<void> {\n let token = await SynapseSessionManager.getStoredToken()\n\n if (!token) {\n token = await this.initAnonymousUserState()\n }\n\n const introspectionResponse = await SynapseSessionManager.validateToken(\n token,\n this.options.maxAge,\n )\n if (introspectionResponse === null) {\n // Token was invalid (e.g. expired). Clear from browser storage and get a fresh anonymous token.\n await SynapseClient.signOut(this.options.defaultRealm)\n if (this.options.onSessionInvalid) {\n this.options.onSessionInvalid()\n } else {\n window.location.reload()\n }\n return\n }\n\n const currentUserId = introspectionResponse.sub\n\n let realmPrincipals: RealmPrincipal | undefined\n try {\n realmPrincipals = await SynapseSessionManager.getCurrentRealmPrincipals(\n token,\n )\n } catch (error) {\n // Special handling for Terms of Service and 2FA errors - allow initialization to continue\n // so the app can prompt the user to complete the required action\n const isTosError =\n error instanceof SynapseClientError &&\n error.reason?.toLowerCase().includes('terms of service')\n const isTwoFaError =\n error instanceof SynapseClientError &&\n error.errorResponse &&\n 'errorCode' in error.errorResponse &&\n error.errorResponse.errorCode === 'TWO_FA_ENABLED_REQUIRED'\n\n if (isTosError || isTwoFaError) {\n const errorType = isTosError\n ? 'Terms of Service not accepted'\n : 'Two factor authentication required'\n console.warn(\n `${errorType}. Session will be initialized without realm principals.`,\n )\n // Continue initialization with partial data - the app's flow will handle this\n this.updateState({\n token,\n hasInitializedSession: true,\n realmId: this.options.defaultRealm,\n userId: currentUserId,\n isAuthenticated: true, // User has a valid token, even if ToS/2FA not complete\n })\n return\n }\n // For any other error, re-throw to be handled by caller\n console.error('Error fetching realm principals: ', error)\n throw error\n }\n\n const isAuthenticated = currentUserId !== realmPrincipals.anonymousUser\n\n /*\n NOTE: It's possible for a user to possess an anonymous token from a different realm (e.g. if they started on an app with a default realm, \n then navigated to a different app with a different default realm). Currently, we will do nothing, so the user will stay in the realm in which they started.\n We may consider different approaches in the future as new requirements arise, such as\n - Replacing the anonymous token with a new one from the default realm (could cause issues if two apps with different realms are used in different tabs)\n - Storing anonymous tokens per-realm\n - Adding UI to choose a realm or account to use\n */\n\n this.updateState({\n token,\n hasInitializedSession: true,\n realmId: realmPrincipals.realmId,\n userId: currentUserId,\n isAuthenticated,\n })\n }\n\n /**\n * Clear the current session by signing out and initializing an anonymous session.\n * Does NOT handle navigation/reload — the caller is responsible for that.\n */\n async clearSession(): Promise<void> {\n await this.initAnonymousUserState()\n await this.refreshSession()\n }\n\n /**\n * Attempt to get the stored access token from the browser cookie.\n * Returns the token string, or undefined if not found or on error.\n */\n static async getStoredToken(): Promise<string | undefined> {\n try {\n return await SynapseClient.getAccessTokenFromCookie()\n } catch (e) {\n console.error('Unable to get the access token: ', e)\n return undefined\n }\n }\n\n /**\n * Validate the token by calling the token introspection service.\n * @return the introspection response if valid, or null if the token is invalid\n */\n static async validateToken(\n accessToken: string,\n maxAge?: number,\n ): Promise<OAuthTokenIntrospectionResponse | null> {\n const synapseClient = new SynapseOpenApiClient({\n accessToken,\n basePath: getEndpoint(BackendDestinationEnum.REPO_ENDPOINT),\n })\n try {\n const response =\n await synapseClient.openIDConnectServicesClient.postAuthV1Oauth2Introspect(\n {\n oAuthTokenIntrospectionRequest: {\n token: accessToken,\n max_age: maxAge,\n },\n },\n )\n if (!response.active) {\n throw new Error('Token is not active.')\n }\n return response\n } catch (e) {\n console.error(\n 'Error validating the access token. Clearing session. Error: ',\n (e as Error).message,\n )\n }\n\n return null\n }\n\n /**\n * Get the realm principals for the current token.\n */\n static async getCurrentRealmPrincipals(\n accessToken: string,\n ): Promise<RealmPrincipal> {\n const synapseClient = new SynapseOpenApiClient({\n accessToken,\n basePath: getEndpoint(BackendDestinationEnum.REPO_ENDPOINT),\n })\n return synapseClient.realmServicesClient.getRepoV1RealmPrincipals()\n }\n\n /**\n * Initialize the session for an anonymous user.\n * @return the new anonymous token.\n */\n private async initAnonymousUserState(): Promise<string> {\n if (this.options.onMissingExpectedAuthentication) {\n this.options.onMissingExpectedAuthentication()\n }\n return SynapseClient.signOut(this.options.defaultRealm)\n }\n\n private updateState(newState: SessionState): void {\n this.state = newState\n this.emitChange()\n }\n\n private emitChange(): void {\n for (const listener of this.listeners) {\n listener()\n }\n }\n}\n"],"mappings":";;;;AAYA,IAAM,IAAsB,KAuBtB,IAA8B;CAClC,OAAO,KAAA;CACP,SAAS,KAAA;CACT,QAAQ,KAAA;CACR,iBAAiB;CACjB,uBAAuB;CACxB,EAcY,IAAb,MAAa,EAAsB;CACjC,QAA8B;CAC9B,4BAAoB,IAAI,KAAiB;CACzC,aAA4D;CAC5D;CAKA,YAAY,IAAwC,EAAE,EAAE;AAQtD,EAPA,KAAK,UAAU;GACb,GAAG;GACH,cAAc,EAAQ,gBAAgB;GACvC,EAED,KAAK,YAAY,KAAK,UAAU,KAAK,KAAK,EAC1C,KAAK,cAAc,KAAK,YAAY,KAAK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AAQ;KACtB,QAAQ;KACR,iBAAiB;KAClB,CAAC;AACF;;AAIF,SADA,QAAQ,MAAM,qCAAqC,EAAM,EACnD;;EAGR,IAAM,IAAkB,MAAkB,EAAgB;AAW1D,OAAK,YAAY;GACf;GACA,uBAAuB;GACvB,SAAS,EAAgB;GACzB,QAAQ;GACR;GACD,CAAC;;CAOJ,MAAM,eAA8B;AAElC,EADA,MAAM,KAAK,wBAAwB,EACnC,MAAM,KAAK,gBAAgB;;CAO7B,aAAa,iBAA8C;AACzD,MAAI;AACF,UAAO,MAAM,EAAc,0BAA0B;WAC9C,GAAG;AACV,WAAQ,MAAM,oCAAoC,EAAE;AACpD;;;CAQJ,aAAa,cACX,GACA,GACiD;EACjD,IAAM,IAAgB,IAAI,EAAqB;GAC7C;GACA,UAAU,EAAY,EAAuB,cAAc;GAC5D,CAAC;AACF,MAAI;GACF,IAAM,IACJ,MAAM,EAAc,4BAA4B,2BAC9C,EACE,gCAAgC;IAC9B,OAAO;IACP,SAAS;IACV,EACF,CACF;AACH,OAAI,CAAC,EAAS,OACZ,OAAU,MAAM,uBAAuB;AAEzC,UAAO;WACA,GAAG;AACV,WAAQ,MACN,gEACC,EAAY,QACd;;AAGH,SAAO;;CAMT,aAAa,0BACX,GACyB;AAKzB,SAJsB,IAAI,EAAqB;GAC7C;GACA,UAAU,EAAY,EAAuB,cAAc;GAC5D,CAAC,CACmB,oBAAoB,0BAA0B;;CAOrE,MAAc,yBAA0C;AAItD,SAHI,KAAK,QAAQ,mCACf,KAAK,QAAQ,iCAAiC,EAEzC,EAAc,QAAQ,KAAK,QAAQ,aAAa;;CAGzD,YAAoB,GAA8B;AAEhD,EADA,KAAK,QAAQ,GACb,KAAK,YAAY;;CAGnB,aAA2B;AACzB,OAAK,IAAM,KAAY,KAAK,UAC1B,IAAU"}
1
+ {"version":3,"file":"SynapseSessionManager.js","names":[],"sources":["../../../../src/utils/AppUtils/session/SynapseSessionManager.ts"],"sourcesContent":["import SynapseClient from '@/synapse-client'\nimport {\n BackendDestinationEnum,\n getEndpoint,\n} from '@/utils/functions/getEndpoint'\nimport {\n OAuthTokenIntrospectionResponse,\n RealmPrincipal,\n SynapseClient as SynapseOpenApiClient,\n SynapseClientError,\n} from '@sage-bionetworks/synapse-client'\n\nconst REFRESH_INTERVAL_MS = 60_000\n\nexport type SessionState = {\n token: string | undefined\n realmId: string | undefined\n userId: string | undefined\n isAuthenticated: boolean\n hasInitializedSession: boolean\n}\n\nexport type SynapseSessionManagerOptions = {\n /** The realm that an unauthenticated user should be signed in to. Defaults to \"0\", the public Synapse realm */\n defaultRealm?: string\n /** If defined, specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated.\n * If the elapsed time is greater than this value, the session will be cleared and the user will have to re-authenticate. */\n maxAge?: number\n /** Called if the user is not authenticated when the session is initialized. */\n onMissingExpectedAuthentication?: () => void\n /** Called when a stored token fails validation (e.g. expired). Called after the session manager signs out.\n * If not provided, the session manager will call `window.location.reload()` after signing out. */\n onSessionInvalid?: () => void\n}\n\nconst INITIAL_STATE: SessionState = {\n token: undefined,\n realmId: undefined,\n userId: undefined,\n isAuthenticated: false,\n hasInitializedSession: false,\n}\n\n/**\n * Framework-agnostic session manager for Synapse applications.\n *\n * Handles the full session lifecycle: token retrieval from browser cookies,\n * token validation via OAuth2 introspection, periodic refresh, and sign-out.\n *\n * Can be used directly from any JavaScript context (GWT/JsInterop, vanilla JS, etc.)\n * or wrapped by a framework-specific adapter (e.g. a React hook via `useSyncExternalStore`).\n *\n * Implements the external store contract: use {@link subscribe} and {@link getSnapshot}\n * to integrate with React's `useSyncExternalStore`, or any other subscription-based framework.\n */\nexport class SynapseSessionManager {\n private state: SessionState = INITIAL_STATE\n private listeners = new Set<() => void>()\n private intervalId: ReturnType<typeof setInterval> | null = null\n private options: Required<\n Pick<SynapseSessionManagerOptions, 'defaultRealm'>\n > &\n SynapseSessionManagerOptions\n\n constructor(options: SynapseSessionManagerOptions = {}) {\n this.options = {\n ...options,\n defaultRealm: options.defaultRealm ?? '0',\n }\n // Bind methods so they can be passed directly to useSyncExternalStore\n this.subscribe = this.subscribe.bind(this)\n this.getSnapshot = this.getSnapshot.bind(this)\n this.getServerSnapshot = this.getServerSnapshot.bind(this)\n }\n\n /**\n * Subscribe to state changes. The listener is called whenever session state is updated.\n * @returns an unsubscribe function.\n *\n * Compatible with React's `useSyncExternalStore(manager.subscribe, manager.getSnapshot)`.\n */\n subscribe(listener: () => void): () => void {\n this.listeners.add(listener)\n return () => {\n this.listeners.delete(listener)\n }\n }\n\n /**\n * Get the current session state snapshot. Returns a stable reference that only\n * changes when the state is updated.\n *\n * Compatible with React's `useSyncExternalStore(manager.subscribe, manager.getSnapshot)`.\n */\n getSnapshot(): SessionState {\n return this.state\n }\n\n /**\n * Get the server-side (SSR) snapshot: always returns the unauthenticated initial state.\n * Required by React's `useSyncExternalStore` when rendering on the server.\n */\n getServerSnapshot(): SessionState {\n return INITIAL_STATE\n }\n\n /**\n * Update mutable options. Values are read at `refreshSession`/`clearSession` call time,\n * so changes take effect on the next refresh cycle.\n */\n setOptions(\n options: Pick<SynapseSessionManagerOptions, 'defaultRealm' | 'maxAge'>,\n ): void {\n if (options.defaultRealm !== undefined) {\n this.options.defaultRealm = options.defaultRealm\n }\n if (options.maxAge !== undefined) {\n this.options.maxAge = options.maxAge\n }\n }\n\n /**\n * Start the session manager: performs an initial refresh and sets up the periodic refresh interval.\n */\n start(): void {\n this.refreshSession()\n this.intervalId = setInterval(() => {\n this.refreshSession()\n }, REFRESH_INTERVAL_MS)\n }\n\n /**\n * Stop the periodic refresh and clean up resources.\n */\n dispose(): void {\n if (this.intervalId !== null) {\n clearInterval(this.intervalId)\n this.intervalId = null\n }\n }\n\n /**\n * Refresh the session by reading the stored token, validating it, and updating state.\n * If no token is stored, initializes an anonymous session.\n * If the token is invalid, signs out and triggers onSessionInvalid (or reloads the page).\n */\n async refreshSession(): Promise<void> {\n let token = await SynapseSessionManager.getStoredToken()\n\n if (!token) {\n token = await this.initAnonymousUserState()\n }\n\n const introspectionResponse = await SynapseSessionManager.validateToken(\n token,\n this.options.maxAge,\n )\n if (introspectionResponse === null) {\n // Token was invalid (e.g. expired). Clear from browser storage and get a fresh anonymous token.\n await SynapseClient.signOut(this.options.defaultRealm)\n if (this.options.onSessionInvalid) {\n this.options.onSessionInvalid()\n } else {\n window.location.reload()\n }\n return\n }\n\n const currentUserId = introspectionResponse.sub\n\n let realmPrincipals: RealmPrincipal | undefined\n try {\n realmPrincipals = await SynapseSessionManager.getCurrentRealmPrincipals(\n token,\n )\n } catch (error) {\n // Special handling for Terms of Service and 2FA errors - allow initialization to continue\n // so the app can prompt the user to complete the required action\n const isTosError =\n error instanceof SynapseClientError &&\n error.reason?.toLowerCase().includes('terms of service')\n const isTwoFaError =\n error instanceof SynapseClientError &&\n error.errorResponse &&\n 'errorCode' in error.errorResponse &&\n error.errorResponse.errorCode === 'TWO_FA_ENABLED_REQUIRED'\n\n if (isTosError || isTwoFaError) {\n const errorType = isTosError\n ? 'Terms of Service not accepted'\n : 'Two factor authentication required'\n console.warn(\n `${errorType}. Session will be initialized without realm principals.`,\n )\n // Continue initialization with partial data - the app's flow will handle this\n this.updateState({\n token,\n hasInitializedSession: true,\n realmId: this.options.defaultRealm,\n userId: currentUserId,\n isAuthenticated: true, // User has a valid token, even if ToS/2FA not complete\n })\n return\n }\n // For any other error, re-throw to be handled by caller\n console.error('Error fetching realm principals: ', error)\n throw error\n }\n\n const isAuthenticated = currentUserId !== realmPrincipals.anonymousUser\n\n /*\n NOTE: It's possible for a user to possess an anonymous token from a different realm (e.g. if they started on an app with a default realm, \n then navigated to a different app with a different default realm). Currently, we will do nothing, so the user will stay in the realm in which they started.\n We may consider different approaches in the future as new requirements arise, such as\n - Replacing the anonymous token with a new one from the default realm (could cause issues if two apps with different realms are used in different tabs)\n - Storing anonymous tokens per-realm\n - Adding UI to choose a realm or account to use\n */\n\n this.updateState({\n token,\n hasInitializedSession: true,\n realmId: realmPrincipals.realmId,\n userId: currentUserId,\n isAuthenticated,\n })\n }\n\n /**\n * Clear the current session by signing out and initializing an anonymous session.\n * Does NOT handle navigation/reload — the caller is responsible for that.\n */\n async clearSession(): Promise<void> {\n await this.initAnonymousUserState()\n await this.refreshSession()\n }\n\n /**\n * Attempt to get the stored access token from the browser cookie.\n * Returns the token string, or undefined if not found or on error.\n */\n static async getStoredToken(): Promise<string | undefined> {\n try {\n return await SynapseClient.getAccessTokenFromCookie()\n } catch (e) {\n console.error('Unable to get the access token: ', e)\n return undefined\n }\n }\n\n /**\n * Validate the token by calling the token introspection service.\n * @return the introspection response if valid, or null if the token is invalid\n */\n static async validateToken(\n accessToken: string,\n maxAge?: number,\n ): Promise<OAuthTokenIntrospectionResponse | null> {\n const synapseClient = new SynapseOpenApiClient({\n accessToken,\n basePath: getEndpoint(BackendDestinationEnum.REPO_ENDPOINT),\n })\n try {\n const response =\n await synapseClient.openIDConnectServicesClient.postAuthV1Oauth2Introspect(\n {\n oAuthTokenIntrospectionRequest: {\n token: accessToken,\n max_age: maxAge,\n },\n },\n )\n if (!response.active) {\n throw new Error('Token is not active.')\n }\n return response\n } catch (e) {\n console.error(\n 'Error validating the access token. Clearing session. Error: ',\n (e as Error).message,\n )\n }\n\n return null\n }\n\n /**\n * Get the realm principals for the current token.\n */\n static async getCurrentRealmPrincipals(\n accessToken: string,\n ): Promise<RealmPrincipal> {\n const synapseClient = new SynapseOpenApiClient({\n accessToken,\n basePath: getEndpoint(BackendDestinationEnum.REPO_ENDPOINT),\n })\n return synapseClient.realmServicesClient.getRepoV1RealmPrincipals()\n }\n\n /**\n * Initialize the session for an anonymous user.\n * @return the new anonymous token.\n */\n private async initAnonymousUserState(): Promise<string> {\n if (this.options.onMissingExpectedAuthentication) {\n this.options.onMissingExpectedAuthentication()\n }\n return SynapseClient.signOut(this.options.defaultRealm)\n }\n\n private updateState(newState: SessionState): void {\n this.state = newState\n this.emitChange()\n }\n\n private emitChange(): void {\n for (const listener of this.listeners) {\n listener()\n }\n }\n}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Y,EAAuB,cAAc;GAC5D,CACM,CAAc,oBAAoB,0BAA0B;;CAOrE,MAAc,yBAA0C;AAItD,SAHI,KAAK,QAAQ,mCACf,KAAK,QAAQ,iCAAiC,EAEzC,EAAc,QAAQ,KAAK,QAAQ,aAAa;;CAGzD,YAAoB,GAA8B;AAEhD,EADA,KAAK,QAAQ,GACb,KAAK,YAAY;;CAGnB,aAA2B;AACzB,OAAK,IAAM,KAAY,KAAK,UAC1B,IAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSessionManager.js","names":[],"sources":["../../../../src/utils/AppUtils/session/useSessionManager.ts"],"sourcesContent":["import { useTermsOfServiceStatus } from '@/synapse-queries/termsOfService/useTermsOfService'\nimport { useGetTwoFactorEnrollmentStatusWithAccessToken } from '@/synapse-queries/auth/useTwoFactorEnrollment'\nimport { TwoFactorAuthErrorResponse } from '@sage-bionetworks/synapse-client/generated/models/TwoFactorAuthErrorResponse'\nimport {\n useCallback,\n useEffect,\n useRef,\n useState,\n useSyncExternalStore,\n} from 'react'\nimport { useNavigate } from 'react-router'\nimport useDetectSSOCode from '../../hooks/useDetectSSOCode'\nimport { restoreLastPlace } from '../AppUtils'\nimport { ApplicationSessionContextType } from './ApplicationSessionContext'\nimport { SynapseSessionManager } from './SynapseSessionManager'\n\nexport type UseSessionManagerOptions = {\n /** The realm that an unauthenticated user should be signed in to. Defaults to \"0\", the public Synapse realm */\n defaultRealm?: string\n /* If defined, specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated. If the elapsed time is greater than this value, the session will be cleared and the user will have to re-authenticate. */\n maxAge?: number\n /** Called if the user is not authenticated when the session is initialized. Can be used to trigger an error if authentication is expected. */\n onMissingExpectedAuthentication?: () => void\n /*\n * Callback invoked after the user has successfully signed in through SSO when the purpose of signing in is to disable 2FA on the account.\n * The twoFactorAuthSSOError and twoFaResetToken are passed in the callback and can be used to complete the 2FA reset process.\n * This only needs to be implemented if the app implements the workflow to disable 2FA (i.e. only if the app supports account management).\n */\n onTwoFactorAuthResetThroughSSO?: (\n twoFactorAuthSSOError: TwoFactorAuthErrorResponse,\n twoFaResetToken: string,\n ) => void\n}\n\nexport type UseSessionManagerReturn = {\n sessionContext: ApplicationSessionContextType\n token: string | undefined\n}\n\n/**\n * Hook that manages the Synapse user session lifecycle.\n *\n * Handles token acquisition, validation, SSO detection, and provides\n * all values needed for the ApplicationSessionContext and SynapseContext.\n *\n * This is a React wrapper around {@link SynapseSessionManager}, which contains\n * the framework-agnostic session logic. Session state is synchronized via\n * `useSyncExternalStore`.\n *\n * Must be called within a react-router Router and a react-query QueryClientProvider.\n */\nexport function useSessionManager(\n options: UseSessionManagerOptions = {},\n): UseSessionManagerReturn {\n const {\n defaultRealm = '0',\n maxAge,\n onMissingExpectedAuthentication,\n onTwoFactorAuthResetThroughSSO,\n } = options\n\n const navigate = useNavigate()\n\n const [twoFactorAuthSSOError, setTwoFactorAuthSSOError] = useState<\n TwoFactorAuthErrorResponse | undefined\n >()\n\n // Store latest callback refs so the manager doesn't need to be recreated when callbacks change\n const onMissingExpectedAuthenticationRef = useRef(\n onMissingExpectedAuthentication,\n )\n onMissingExpectedAuthenticationRef.current = onMissingExpectedAuthentication\n\n const [manager] = useState(\n () =>\n new SynapseSessionManager({\n defaultRealm,\n maxAge,\n onMissingExpectedAuthentication: () => {\n onMissingExpectedAuthenticationRef.current?.()\n },\n }),\n )\n\n // Keep mutable options in sync with props\n useEffect(() => {\n manager.setOptions({ defaultRealm, maxAge })\n }, [manager, defaultRealm, maxAge])\n\n const sessionState = useSyncExternalStore(\n manager.subscribe,\n manager.getSnapshot,\n manager.getServerSnapshot,\n )\n\n useEffect(() => {\n manager.start()\n return () => manager.dispose()\n }, [manager])\n\n const { data: tosStatus } = useTermsOfServiceStatus(sessionState.token, {\n enabled: sessionState.isAuthenticated,\n })\n const { data: twoFactorStatus } =\n useGetTwoFactorEnrollmentStatusWithAccessToken(sessionState.token, {\n enabled: sessionState.isAuthenticated,\n })\n\n const refreshSession = useCallback(async () => {\n setTwoFactorAuthSSOError(undefined)\n await manager.refreshSession()\n }, [manager])\n\n const clearSession = useCallback(\n async (onBeforeReload?: () => void) => {\n await manager.clearSession()\n if (onBeforeReload) {\n onBeforeReload()\n }\n // In all cases when the session is cleared we should refresh the page to ensure private data is not being shown\n navigate(0)\n },\n [navigate, manager],\n )\n\n const { isLoading: isLoadingSSO } = useDetectSSOCode({\n onSignInComplete: () => {\n restoreLastPlace(navigate)\n refreshSession()\n },\n onTwoFactorAuthRequired: twoFactorAuthError => {\n setTwoFactorAuthSSOError(twoFactorAuthError)\n },\n onTwoFactorAuthResetTokenPresent: (twoFactorAuthError, twoFaResetToken) => {\n setTwoFactorAuthSSOError(twoFactorAuthError)\n if (onTwoFactorAuthResetThroughSSO) {\n onTwoFactorAuthResetThroughSSO(twoFactorAuthError, twoFaResetToken)\n }\n },\n onError: (err: unknown) => {\n // Throw the error so it propagates to an error boundary\n throw err\n },\n isInitializingSession: !sessionState.hasInitializedSession,\n isAuthenticated: sessionState.isAuthenticated,\n })\n\n const sessionContext: ApplicationSessionContextType = {\n token: sessionState.token,\n userId: sessionState.userId,\n realmId: sessionState.realmId,\n isAuthenticated: sessionState.isAuthenticated,\n termsOfServiceStatus: tosStatus,\n refreshSession,\n clearSession,\n isLoadingSSO,\n twoFactorAuthSSOErrorResponse: twoFactorAuthSSOError,\n hasInitializedSession: sessionState.hasInitializedSession,\n twoFactorStatus,\n }\n\n return { sessionContext, token: sessionState.token }\n}\n"],"mappings":";;;;;;;;AAmDA,SAAgB,EACd,IAAoC,EAAE,EACb;CACzB,IAAM,EACJ,kBAAe,KACf,WACA,oCACA,sCACE,GAEE,IAAW,GAAa,EAExB,CAAC,GAAuB,KAA4B,GAEvD,EAGG,IAAqC,EACzC,EACD;AACD,GAAmC,UAAU;CAE7C,IAAM,CAAC,KAAW,QAEd,IAAI,EAAsB;EACxB;EACA;EACA,uCAAuC;AACrC,KAAmC,WAAW;;EAEjD,CAAC,CACL;AAGD,SAAgB;AACd,IAAQ,WAAW;GAAE;GAAc;GAAQ,CAAC;IAC3C;EAAC;EAAS;EAAc;EAAO,CAAC;CAEnC,IAAM,IAAe,EACnB,EAAQ,WACR,EAAQ,aACR,EAAQ,kBACT;AAED,UACE,EAAQ,OAAO,QACF,EAAQ,SAAS,GAC7B,CAAC,EAAQ,CAAC;CAEb,IAAM,EAAE,MAAM,MAAc,EAAwB,EAAa,OAAO,EACtE,SAAS,EAAa,iBACvB,CAAC,EACI,EAAE,MAAM,MACZ,EAA+C,EAAa,OAAO,EACjE,SAAS,EAAa,iBACvB,CAAC,EAEE,IAAiB,EAAY,YAAY;AAE7C,EADA,EAAyB,KAAA,EAAU,EACnC,MAAM,EAAQ,gBAAgB;IAC7B,CAAC,EAAQ,CAAC,EAEP,IAAe,EACnB,OAAO,MAAgC;AAMrC,EALA,MAAM,EAAQ,cAAc,EACxB,KACF,GAAgB,EAGlB,EAAS,EAAE;IAEb,CAAC,GAAU,EAAQ,CACpB,EAEK,EAAE,WAAW,MAAiB,EAAiB;EACnD,wBAAwB;AAEtB,GADA,EAAiB,EAAS,EAC1B,GAAgB;;EAElB,0BAAyB,MAAsB;AAC7C,KAAyB,EAAmB;;EAE9C,mCAAmC,GAAoB,MAAoB;AAEzE,GADA,EAAyB,EAAmB,EACxC,KACF,EAA+B,GAAoB,EAAgB;;EAGvE,UAAU,MAAiB;AAEzB,SAAM;;EAER,uBAAuB,CAAC,EAAa;EACrC,iBAAiB,EAAa;EAC/B,CAAC;AAgBF,QAAO;EAAE,gBAd6C;GACpD,OAAO,EAAa;GACpB,QAAQ,EAAa;GACrB,SAAS,EAAa;GACtB,iBAAiB,EAAa;GAC9B,sBAAsB;GACtB;GACA;GACA;GACA,+BAA+B;GAC/B,uBAAuB,EAAa;GACpC;GACD;EAEwB,OAAO,EAAa;EAAO"}
1
+ {"version":3,"file":"useSessionManager.js","names":[],"sources":["../../../../src/utils/AppUtils/session/useSessionManager.ts"],"sourcesContent":["import { useTermsOfServiceStatus } from '@/synapse-queries/termsOfService/useTermsOfService'\nimport { useGetTwoFactorEnrollmentStatusWithAccessToken } from '@/synapse-queries/auth/useTwoFactorEnrollment'\nimport { TwoFactorAuthErrorResponse } from '@sage-bionetworks/synapse-client/generated/models/TwoFactorAuthErrorResponse'\nimport {\n useCallback,\n useEffect,\n useRef,\n useState,\n useSyncExternalStore,\n} from 'react'\nimport { useNavigate } from 'react-router'\nimport useDetectSSOCode from '../../hooks/useDetectSSOCode'\nimport { restoreLastPlace } from '../AppUtils'\nimport { ApplicationSessionContextType } from './ApplicationSessionContext'\nimport { SynapseSessionManager } from './SynapseSessionManager'\n\nexport type UseSessionManagerOptions = {\n /** The realm that an unauthenticated user should be signed in to. Defaults to \"0\", the public Synapse realm */\n defaultRealm?: string\n /* If defined, specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated. If the elapsed time is greater than this value, the session will be cleared and the user will have to re-authenticate. */\n maxAge?: number\n /** Called if the user is not authenticated when the session is initialized. Can be used to trigger an error if authentication is expected. */\n onMissingExpectedAuthentication?: () => void\n /*\n * Callback invoked after the user has successfully signed in through SSO when the purpose of signing in is to disable 2FA on the account.\n * The twoFactorAuthSSOError and twoFaResetToken are passed in the callback and can be used to complete the 2FA reset process.\n * This only needs to be implemented if the app implements the workflow to disable 2FA (i.e. only if the app supports account management).\n */\n onTwoFactorAuthResetThroughSSO?: (\n twoFactorAuthSSOError: TwoFactorAuthErrorResponse,\n twoFaResetToken: string,\n ) => void\n}\n\nexport type UseSessionManagerReturn = {\n sessionContext: ApplicationSessionContextType\n token: string | undefined\n}\n\n/**\n * Hook that manages the Synapse user session lifecycle.\n *\n * Handles token acquisition, validation, SSO detection, and provides\n * all values needed for the ApplicationSessionContext and SynapseContext.\n *\n * This is a React wrapper around {@link SynapseSessionManager}, which contains\n * the framework-agnostic session logic. Session state is synchronized via\n * `useSyncExternalStore`.\n *\n * Must be called within a react-router Router and a react-query QueryClientProvider.\n */\nexport function useSessionManager(\n options: UseSessionManagerOptions = {},\n): UseSessionManagerReturn {\n const {\n defaultRealm = '0',\n maxAge,\n onMissingExpectedAuthentication,\n onTwoFactorAuthResetThroughSSO,\n } = options\n\n const navigate = useNavigate()\n\n const [twoFactorAuthSSOError, setTwoFactorAuthSSOError] = useState<\n TwoFactorAuthErrorResponse | undefined\n >()\n\n // Store latest callback refs so the manager doesn't need to be recreated when callbacks change\n const onMissingExpectedAuthenticationRef = useRef(\n onMissingExpectedAuthentication,\n )\n onMissingExpectedAuthenticationRef.current = onMissingExpectedAuthentication\n\n const [manager] = useState(\n () =>\n new SynapseSessionManager({\n defaultRealm,\n maxAge,\n onMissingExpectedAuthentication: () => {\n onMissingExpectedAuthenticationRef.current?.()\n },\n }),\n )\n\n // Keep mutable options in sync with props\n useEffect(() => {\n manager.setOptions({ defaultRealm, maxAge })\n }, [manager, defaultRealm, maxAge])\n\n const sessionState = useSyncExternalStore(\n manager.subscribe,\n manager.getSnapshot,\n manager.getServerSnapshot,\n )\n\n useEffect(() => {\n manager.start()\n return () => manager.dispose()\n }, [manager])\n\n const { data: tosStatus } = useTermsOfServiceStatus(sessionState.token, {\n enabled: sessionState.isAuthenticated,\n })\n const { data: twoFactorStatus } =\n useGetTwoFactorEnrollmentStatusWithAccessToken(sessionState.token, {\n enabled: sessionState.isAuthenticated,\n })\n\n const refreshSession = useCallback(async () => {\n setTwoFactorAuthSSOError(undefined)\n await manager.refreshSession()\n }, [manager])\n\n const clearSession = useCallback(\n async (onBeforeReload?: () => void) => {\n await manager.clearSession()\n if (onBeforeReload) {\n onBeforeReload()\n }\n // In all cases when the session is cleared we should refresh the page to ensure private data is not being shown\n navigate(0)\n },\n [navigate, manager],\n )\n\n const { isLoading: isLoadingSSO } = useDetectSSOCode({\n onSignInComplete: () => {\n restoreLastPlace(navigate)\n refreshSession()\n },\n onTwoFactorAuthRequired: twoFactorAuthError => {\n setTwoFactorAuthSSOError(twoFactorAuthError)\n },\n onTwoFactorAuthResetTokenPresent: (twoFactorAuthError, twoFaResetToken) => {\n setTwoFactorAuthSSOError(twoFactorAuthError)\n if (onTwoFactorAuthResetThroughSSO) {\n onTwoFactorAuthResetThroughSSO(twoFactorAuthError, twoFaResetToken)\n }\n },\n onError: (err: unknown) => {\n // Throw the error so it propagates to an error boundary\n throw err\n },\n isInitializingSession: !sessionState.hasInitializedSession,\n isAuthenticated: sessionState.isAuthenticated,\n })\n\n const sessionContext: ApplicationSessionContextType = {\n token: sessionState.token,\n userId: sessionState.userId,\n realmId: sessionState.realmId,\n isAuthenticated: sessionState.isAuthenticated,\n termsOfServiceStatus: tosStatus,\n refreshSession,\n clearSession,\n isLoadingSSO,\n twoFactorAuthSSOErrorResponse: twoFactorAuthSSOError,\n hasInitializedSession: sessionState.hasInitializedSession,\n twoFactorStatus,\n }\n\n return { sessionContext, token: sessionState.token }\n}\n"],"mappings":";;;;;;;;AAmDA,SAAgB,EACd,IAAoC,EAAE,EACb;CACzB,IAAM,EACJ,kBAAe,KACf,WACA,oCACA,sCACE,GAEE,IAAW,GAAa,EAExB,CAAC,GAAuB,KAA4B,GAEvD,EAGG,IAAqC,EACzC,EACD;AACD,GAAmC,UAAU;CAE7C,IAAM,CAAC,KAAW,QAEd,IAAI,EAAsB;EACxB;EACA;EACA,uCAAuC;AACrC,KAAmC,WAAW;;EAEjD,CAAC,CACL;AAGD,SAAgB;AACd,IAAQ,WAAW;GAAE;GAAc;GAAQ,CAAC;IAC3C;EAAC;EAAS;EAAc;EAAO,CAAC;CAEnC,IAAM,IAAe,EACnB,EAAQ,WACR,EAAQ,aACR,EAAQ,kBACT;AAED,UACE,EAAQ,OAAO,QACF,EAAQ,SAAS,GAC7B,CAAC,EAAQ,CAAC;CAEb,IAAM,EAAE,MAAM,MAAc,EAAwB,EAAa,OAAO,EACtE,SAAS,EAAa,iBACvB,CAAC,EACI,EAAE,MAAM,MACZ,EAA+C,EAAa,OAAO,EACjE,SAAS,EAAa,iBACvB,CAAC,EAEE,IAAiB,EAAY,YAAY;AAE7C,EADA,EAAyB,KAAA,EAAU,EACnC,MAAM,EAAQ,gBAAgB;IAC7B,CAAC,EAAQ,CAAC,EAEP,IAAe,EACnB,OAAO,MAAgC;AAMrC,EALA,MAAM,EAAQ,cAAc,EACxB,KACF,GAAgB,EAGlB,EAAS,EAAE;IAEb,CAAC,GAAU,EAAQ,CACpB,EAEK,EAAE,WAAW,MAAiB,EAAiB;EACnD,wBAAwB;AAEtB,GADA,EAAiB,EAAS,EAC1B,GAAgB;;EAElB,0BAAyB,MAAsB;AAC7C,KAAyB,EAAmB;;EAE9C,mCAAmC,GAAoB,MAAoB;AAEzE,GADA,EAAyB,EAAmB,EACxC,KACF,EAA+B,GAAoB,EAAgB;;EAGvE,UAAU,MAAiB;AAEzB,SAAM;;EAER,uBAAuB,CAAC,EAAa;EACrC,iBAAiB,EAAa;EAC/B,CAAC;AAgBF,QAAO;EAAE,gBAAA;GAbP,OAAO,EAAa;GACpB,QAAQ,EAAa;GACrB,SAAS,EAAa;GACtB,iBAAiB,EAAa;GAC9B,sBAAsB;GACtB;GACA;GACA;GACA,+BAA+B;GAC/B,uBAAuB,EAAa;GACpC;GAGO;EAAgB,OAAO,EAAa;EAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"PermissionLevelToAccessType.js","names":[],"sources":["../../src/utils/PermissionLevelToAccessType.ts"],"sourcesContent":["import { ACCESS_TYPE } from '@sage-bionetworks/synapse-types'\n\nconst entityPermissionLevels = [\n 'CAN_VIEW',\n 'CAN_DOWNLOAD',\n 'CAN_EDIT',\n 'CAN_EDIT_DELETE',\n 'CAN_ADMINISTER',\n] as const\nexport type EntityPermissionsLevel = (typeof entityPermissionLevels)[number]\n\nconst accessRequirementPermissionLevels = [\n 'CAN_REVIEW_SUBMISSIONS',\n 'IS_EXEMPTION_ELIGIBLE',\n 'CAN_REVIEW_SUBMISSIONS_AND_IS_EXEMPTION_ELIGIBLE',\n] as const\n\nexport type AccessRequirementPermissionsLevel =\n (typeof accessRequirementPermissionLevels)[number]\n\nconst oauthClientPermissionLevels = ['CAN_ADMINISTER_OAUTH_CLIENT'] as const\n\nexport type OAuthClientPermissionsLevel =\n (typeof oauthClientPermissionLevels)[number]\n\nconst portalClientPermissionLevels = ['CAN_ADMINISTER_PORTAL'] as const\n\nexport type PortalClientPermissionsLevel =\n (typeof portalClientPermissionLevels)[number]\n\nexport type PermissionLevel =\n | EntityPermissionsLevel\n | AccessRequirementPermissionsLevel\n | OAuthClientPermissionsLevel\n | PortalClientPermissionsLevel\n\nconst permissionLevelToAccessType: Record<PermissionLevel, ACCESS_TYPE[]> = {\n // Entity\n CAN_VIEW: [ACCESS_TYPE.READ],\n CAN_DOWNLOAD: [ACCESS_TYPE.READ, ACCESS_TYPE.DOWNLOAD],\n CAN_EDIT: [\n ACCESS_TYPE.CREATE,\n ACCESS_TYPE.READ,\n ACCESS_TYPE.DOWNLOAD,\n ACCESS_TYPE.UPDATE,\n ],\n CAN_EDIT_DELETE: [\n ACCESS_TYPE.CREATE,\n ACCESS_TYPE.READ,\n ACCESS_TYPE.DOWNLOAD,\n ACCESS_TYPE.UPDATE,\n ACCESS_TYPE.DELETE,\n ],\n CAN_ADMINISTER: [\n ACCESS_TYPE.READ,\n ACCESS_TYPE.DOWNLOAD,\n ACCESS_TYPE.UPDATE,\n ACCESS_TYPE.DELETE,\n ACCESS_TYPE.CREATE,\n ACCESS_TYPE.CHANGE_PERMISSIONS,\n ACCESS_TYPE.CHANGE_SETTINGS,\n ACCESS_TYPE.MODERATE,\n ],\n\n // Access Requirements\n CAN_REVIEW_SUBMISSIONS: [ACCESS_TYPE.REVIEW_SUBMISSIONS],\n IS_EXEMPTION_ELIGIBLE: [ACCESS_TYPE.EXEMPTION_ELIGIBLE],\n CAN_REVIEW_SUBMISSIONS_AND_IS_EXEMPTION_ELIGIBLE: [\n ACCESS_TYPE.EXEMPTION_ELIGIBLE,\n ACCESS_TYPE.REVIEW_SUBMISSIONS,\n ],\n CAN_ADMINISTER_OAUTH_CLIENT: [\n ACCESS_TYPE.READ,\n ACCESS_TYPE.CHANGE_PERMISSIONS,\n ACCESS_TYPE.DELETE,\n ACCESS_TYPE.UPDATE,\n ],\n CAN_ADMINISTER_PORTAL: [\n ACCESS_TYPE.CHANGE_PERMISSIONS,\n ACCESS_TYPE.CREATE,\n ACCESS_TYPE.UPDATE,\n ACCESS_TYPE.READ,\n ACCESS_TYPE.DELETE,\n ],\n}\n\nconst prepAccessTypeForComparison = (accessType: ACCESS_TYPE[]) => {\n return JSON.stringify(accessType.sort())\n}\n\nexport const getPermissionLevelFromAccessType = (accessType: ACCESS_TYPE[]) => {\n const lookupValue = prepAccessTypeForComparison(accessType)\n const permissionLevel = Object.keys(permissionLevelToAccessType).find(key => {\n return (\n lookupValue ===\n prepAccessTypeForComparison(\n permissionLevelToAccessType[key as PermissionLevel],\n )\n )\n })\n\n return permissionLevel as PermissionLevel\n}\n\nexport const getAccessTypeFromPermissionLevel = (\n permissionLevel: PermissionLevel,\n) => {\n return permissionLevelToAccessType[permissionLevel]\n}\n\nexport const permissionLevelToLabel: Record<PermissionLevel, string> = {\n // Entity\n CAN_VIEW: 'Can view',\n CAN_DOWNLOAD: 'Can download',\n CAN_EDIT: 'Can edit',\n CAN_EDIT_DELETE: 'Can edit & delete',\n CAN_ADMINISTER: 'Administrator',\n\n // Access requirement\n CAN_REVIEW_SUBMISSIONS: 'Can Review',\n IS_EXEMPTION_ELIGIBLE: 'Exempt Eligible',\n CAN_REVIEW_SUBMISSIONS_AND_IS_EXEMPTION_ELIGIBLE:\n 'Can Review & Exempt Eligible',\n\n // OAuth Client\n CAN_ADMINISTER_OAUTH_CLIENT: 'Administrator',\n\n // Portal\n CAN_ADMINISTER_PORTAL: 'Administrator',\n}\n"],"mappings":";;;;;;;IAoCM,IAAsE;CAE1E,UAAU,CAAC,EAAY,KAAK;CAC5B,cAAc,CAAC,EAAY,MAAM,EAAY,SAAS;CACtD,UAAU;EACR,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACb;CACD,iBAAiB;EACf,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACb;CACD,gBAAgB;EACd,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACb;CAGD,wBAAwB,CAAC,EAAY,mBAAmB;CACxD,uBAAuB,CAAC,EAAY,mBAAmB;CACvD,kDAAkD,CAChD,EAAY,oBACZ,EAAY,mBACb;CACD,6BAA6B;EAC3B,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACb;CACD,uBAAuB;EACrB,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACb;CACF,EAEK,KAA+B,MAC5B,KAAK,UAAU,EAAW,MAAM,CAAC,EAG7B,KAAoC,MAA8B;CAC7E,IAAM,IAAc,EAA4B,EAAW;AAU3D,QATwB,OAAO,KAAK,EAA4B,CAAC,MAAK,MAElE,MACA,EACE,EAA4B,GAC7B,CAEH;GAKS,KACX,MAEO,EAA4B,IAGxB,IAA0D;CAErE,UAAU;CACV,cAAc;CACd,UAAU;CACV,iBAAiB;CACjB,gBAAgB;CAGhB,wBAAwB;CACxB,uBAAuB;CACvB,kDACE;CAGF,6BAA6B;CAG7B,uBAAuB;CACxB"}
1
+ {"version":3,"file":"PermissionLevelToAccessType.js","names":[],"sources":["../../src/utils/PermissionLevelToAccessType.ts"],"sourcesContent":["import { ACCESS_TYPE } from '@sage-bionetworks/synapse-types'\n\nconst entityPermissionLevels = [\n 'CAN_VIEW',\n 'CAN_DOWNLOAD',\n 'CAN_EDIT',\n 'CAN_EDIT_DELETE',\n 'CAN_ADMINISTER',\n] as const\nexport type EntityPermissionsLevel = (typeof entityPermissionLevels)[number]\n\nconst accessRequirementPermissionLevels = [\n 'CAN_REVIEW_SUBMISSIONS',\n 'IS_EXEMPTION_ELIGIBLE',\n 'CAN_REVIEW_SUBMISSIONS_AND_IS_EXEMPTION_ELIGIBLE',\n] as const\n\nexport type AccessRequirementPermissionsLevel =\n (typeof accessRequirementPermissionLevels)[number]\n\nconst oauthClientPermissionLevels = ['CAN_ADMINISTER_OAUTH_CLIENT'] as const\n\nexport type OAuthClientPermissionsLevel =\n (typeof oauthClientPermissionLevels)[number]\n\nconst portalClientPermissionLevels = ['CAN_ADMINISTER_PORTAL'] as const\n\nexport type PortalClientPermissionsLevel =\n (typeof portalClientPermissionLevels)[number]\n\nexport type PermissionLevel =\n | EntityPermissionsLevel\n | AccessRequirementPermissionsLevel\n | OAuthClientPermissionsLevel\n | PortalClientPermissionsLevel\n\nconst permissionLevelToAccessType: Record<PermissionLevel, ACCESS_TYPE[]> = {\n // Entity\n CAN_VIEW: [ACCESS_TYPE.READ],\n CAN_DOWNLOAD: [ACCESS_TYPE.READ, ACCESS_TYPE.DOWNLOAD],\n CAN_EDIT: [\n ACCESS_TYPE.CREATE,\n ACCESS_TYPE.READ,\n ACCESS_TYPE.DOWNLOAD,\n ACCESS_TYPE.UPDATE,\n ],\n CAN_EDIT_DELETE: [\n ACCESS_TYPE.CREATE,\n ACCESS_TYPE.READ,\n ACCESS_TYPE.DOWNLOAD,\n ACCESS_TYPE.UPDATE,\n ACCESS_TYPE.DELETE,\n ],\n CAN_ADMINISTER: [\n ACCESS_TYPE.READ,\n ACCESS_TYPE.DOWNLOAD,\n ACCESS_TYPE.UPDATE,\n ACCESS_TYPE.DELETE,\n ACCESS_TYPE.CREATE,\n ACCESS_TYPE.CHANGE_PERMISSIONS,\n ACCESS_TYPE.CHANGE_SETTINGS,\n ACCESS_TYPE.MODERATE,\n ],\n\n // Access Requirements\n CAN_REVIEW_SUBMISSIONS: [ACCESS_TYPE.REVIEW_SUBMISSIONS],\n IS_EXEMPTION_ELIGIBLE: [ACCESS_TYPE.EXEMPTION_ELIGIBLE],\n CAN_REVIEW_SUBMISSIONS_AND_IS_EXEMPTION_ELIGIBLE: [\n ACCESS_TYPE.EXEMPTION_ELIGIBLE,\n ACCESS_TYPE.REVIEW_SUBMISSIONS,\n ],\n CAN_ADMINISTER_OAUTH_CLIENT: [\n ACCESS_TYPE.READ,\n ACCESS_TYPE.CHANGE_PERMISSIONS,\n ACCESS_TYPE.DELETE,\n ACCESS_TYPE.UPDATE,\n ],\n CAN_ADMINISTER_PORTAL: [\n ACCESS_TYPE.CHANGE_PERMISSIONS,\n ACCESS_TYPE.CREATE,\n ACCESS_TYPE.UPDATE,\n ACCESS_TYPE.READ,\n ACCESS_TYPE.DELETE,\n ],\n}\n\nconst prepAccessTypeForComparison = (accessType: ACCESS_TYPE[]) => {\n return JSON.stringify(accessType.sort())\n}\n\nexport const getPermissionLevelFromAccessType = (accessType: ACCESS_TYPE[]) => {\n const lookupValue = prepAccessTypeForComparison(accessType)\n const permissionLevel = Object.keys(permissionLevelToAccessType).find(key => {\n return (\n lookupValue ===\n prepAccessTypeForComparison(\n permissionLevelToAccessType[key as PermissionLevel],\n )\n )\n })\n\n return permissionLevel as PermissionLevel\n}\n\nexport const getAccessTypeFromPermissionLevel = (\n permissionLevel: PermissionLevel,\n) => {\n return permissionLevelToAccessType[permissionLevel]\n}\n\nexport const permissionLevelToLabel: Record<PermissionLevel, string> = {\n // Entity\n CAN_VIEW: 'Can view',\n CAN_DOWNLOAD: 'Can download',\n CAN_EDIT: 'Can edit',\n CAN_EDIT_DELETE: 'Can edit & delete',\n CAN_ADMINISTER: 'Administrator',\n\n // Access requirement\n CAN_REVIEW_SUBMISSIONS: 'Can Review',\n IS_EXEMPTION_ELIGIBLE: 'Exempt Eligible',\n CAN_REVIEW_SUBMISSIONS_AND_IS_EXEMPTION_ELIGIBLE:\n 'Can Review & Exempt Eligible',\n\n // OAuth Client\n CAN_ADMINISTER_OAUTH_CLIENT: 'Administrator',\n\n // Portal\n CAN_ADMINISTER_PORTAL: 'Administrator',\n}\n"],"mappings":";;;;;;;IAoCM,IAAsE;CAE1E,UAAU,CAAC,EAAY,KAAK;CAC5B,cAAc,CAAC,EAAY,MAAM,EAAY,SAAS;CACtD,UAAU;EACR,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACb;CACD,iBAAiB;EACf,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACb;CACD,gBAAgB;EACd,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACb;CAGD,wBAAwB,CAAC,EAAY,mBAAmB;CACxD,uBAAuB,CAAC,EAAY,mBAAmB;CACvD,kDAAkD,CAChD,EAAY,oBACZ,EAAY,mBACb;CACD,6BAA6B;EAC3B,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACb;CACD,uBAAuB;EACrB,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACZ,EAAY;EACb;CACF,EAEK,KAA+B,MAC5B,KAAK,UAAU,EAAW,MAAM,CAAC,EAG7B,KAAoC,MAA8B;CAC7E,IAAM,IAAc,EAA4B,EAAW;AAU3D,QATwB,OAAO,KAAK,EAA4B,CAAC,MAAK,MAElE,MACA,EACE,EAA4B,GAC7B,CAIE;GAGI,KACX,MAEO,EAA4B,IAGxB,IAA0D;CAErE,UAAU;CACV,cAAc;CACd,UAAU;CACV,iBAAiB;CACjB,gBAAgB;CAGhB,wBAAwB;CACxB,uBAAuB;CACvB,kDACE;CAGF,6BAA6B;CAG7B,uBAAuB;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"EvaluationUtils.js","names":[],"sources":["../../../../src/utils/challenge/evaluation/EvaluationUtils.ts"],"sourcesContent":["import { EvaluationRound } from '@sage-bionetworks/synapse-client'\nimport dayjs from 'dayjs'\n\n/**\n * Given a list of evaluation rounds:\n * - If there is a current round, return it\n * - Else if there is one or more upcoming rounds, return the soonest\n * - Else return the most recent round in the past\n * @param rounds\n */\nexport function getCurrentOrNextOrLatestRound(\n rounds: EvaluationRound[],\n): EvaluationRound | undefined {\n // See if there is a current round. If so, return it!\n const currentRound = rounds.find(\n round =>\n dayjs().isAfter(dayjs(round.roundStart)) &&\n dayjs().isBefore(dayjs(round.roundEnd)),\n )\n if (currentRound) {\n return currentRound\n }\n\n // If there are rounds in the future, return the soonest one.\n const nextRound = rounds.reduce((prev: EvaluationRound | undefined, curr) => {\n const isFutureRound = dayjs().isBefore(curr.roundStart)\n if (!isFutureRound) return prev\n if (prev == undefined) {\n return curr\n } else if (dayjs(curr.roundStart).isBefore(prev.roundStart)) return curr\n return prev\n }, undefined)\n\n if (nextRound) {\n return nextRound\n }\n\n // There are no current or future rounds, so return the most recent round in the past\n const latestRound = rounds.reduce((prev, curr) => {\n const isLater = dayjs(curr.roundEnd).isAfter(dayjs(prev.roundEnd))\n if (isLater) {\n return curr\n }\n return prev\n }, rounds[0])\n return latestRound\n}\n"],"mappings":";;AAUA,SAAgB,EACd,GAC6B;AAiC7B,QA/BqB,EAAO,MAC1B,MACE,GAAO,CAAC,QAAQ,EAAM,EAAM,WAAW,CAAC,IACxC,GAAO,CAAC,SAAS,EAAM,EAAM,SAAS,CAAC,CAC1C,IAMiB,EAAO,QAAQ,GAAmC,MAC5C,GAAO,CAAC,SAAS,EAAK,WAAW,KAEnD,KAAQ,QAED,EAAM,EAAK,WAAW,CAAC,SAAS,EAAK,WAAW,IADlD,IAEF,GACN,KAAA,EAAU,IAOO,EAAO,QAAQ,GAAM,MACvB,EAAM,EAAK,SAAS,CAAC,QAAQ,EAAM,EAAK,SAAS,CAAC,GAEzD,IAEF,GACN,EAAO,GAAG"}
1
+ {"version":3,"file":"EvaluationUtils.js","names":[],"sources":["../../../../src/utils/challenge/evaluation/EvaluationUtils.ts"],"sourcesContent":["import { EvaluationRound } from '@sage-bionetworks/synapse-client'\nimport dayjs from 'dayjs'\n\n/**\n * Given a list of evaluation rounds:\n * - If there is a current round, return it\n * - Else if there is one or more upcoming rounds, return the soonest\n * - Else return the most recent round in the past\n * @param rounds\n */\nexport function getCurrentOrNextOrLatestRound(\n rounds: EvaluationRound[],\n): EvaluationRound | undefined {\n // See if there is a current round. If so, return it!\n const currentRound = rounds.find(\n round =>\n dayjs().isAfter(dayjs(round.roundStart)) &&\n dayjs().isBefore(dayjs(round.roundEnd)),\n )\n if (currentRound) {\n return currentRound\n }\n\n // If there are rounds in the future, return the soonest one.\n const nextRound = rounds.reduce((prev: EvaluationRound | undefined, curr) => {\n const isFutureRound = dayjs().isBefore(curr.roundStart)\n if (!isFutureRound) return prev\n if (prev == undefined) {\n return curr\n } else if (dayjs(curr.roundStart).isBefore(prev.roundStart)) return curr\n return prev\n }, undefined)\n\n if (nextRound) {\n return nextRound\n }\n\n // There are no current or future rounds, so return the most recent round in the past\n const latestRound = rounds.reduce((prev, curr) => {\n const isLater = dayjs(curr.roundEnd).isAfter(dayjs(prev.roundEnd))\n if (isLater) {\n return curr\n }\n return prev\n }, rounds[0])\n return latestRound\n}\n"],"mappings":";;AAUA,SAAgB,EACd,GAC6B;AAiC7B,QA/BqB,EAAO,MAC1B,MACE,GAAO,CAAC,QAAQ,EAAM,EAAM,WAAW,CAAC,IACxC,GAAO,CAAC,SAAS,EAAM,EAAM,SAAS,CAAC,CAEvC,IAKc,EAAO,QAAQ,GAAmC,MAC5C,GAAO,CAAC,SAAS,EAAK,WACvC,KACD,KAAQ,QAED,EAAM,EAAK,WAAW,CAAC,SAAS,EAAK,WAAW,IADlD,IAEF,GACN,KAAA,EAEC,IAKgB,EAAO,QAAQ,GAAM,MACvB,EAAM,EAAK,SAAS,CAAC,QAAQ,EAAM,EAAK,SAAS,CAC7D,GACK,IAEF,GACN,EAAO,GACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"SynapseContext.js","names":[],"sources":["../../../src/utils/context/SynapseContext.tsx"],"sourcesContent":["import { SynapseErrorBoundary } from '@/components/error/ErrorBanner'\nimport { KeyFactory } from '@/synapse-queries/KeyFactory'\nimport { SynapseClient } from '@sage-bionetworks/synapse-client/SynapseClient'\nimport { createContext, PropsWithChildren, useContext, useMemo } from 'react'\nimport { BackendDestinationEnum, getEndpoint } from '../functions/getEndpoint'\n\nexport type SynapseContextType = {\n /** The user's access token. If undefined, the user is not logged in */\n accessToken: string | undefined\n /** Whether the user is authenticated */\n isAuthenticated: boolean\n /** If the user has enabled experimental mode */\n isInExperimentalMode: boolean\n /** If the user prefers time to be displayed in UTC format */\n utcTime: boolean\n /** Whether to wrap all children of this context in an error boundary. Useful if this context wraps just one component. */\n withErrorBoundary: boolean\n /** The URL of the download cart page in the current app. Used to properly link components */\n downloadCartPageUrl: string\n /** The URL of the people search page in the current app */\n peopleSearchPageUrl?: string\n /** The key factory to use for react-query. Generated automatically. */\n keyFactory: KeyFactory\n /** The appId identifying the product. Used to brand the Synapse account management site, aka OneSage. */\n appId?: string\n /* API client objects for Synapse. Generated automatically. */\n synapseClient: SynapseClient\n}\n\nconst defaultContext = {\n accessToken: undefined,\n isAuthenticated: false,\n isInExperimentalMode: false,\n utcTime: false,\n withErrorBoundary: false,\n keyFactory: new KeyFactory(undefined),\n downloadCartPageUrl: '/DownloadCart',\n peopleSearchPageUrl: '/PeopleSearch:',\n appId: undefined,\n synapseClient: new SynapseClient(),\n} satisfies SynapseContextType\n\n/**\n * This must be exported to use the context in class components.\n */\nexport const SynapseContext = createContext<SynapseContextType>(defaultContext)\n\nexport type SynapseContextProviderProps = PropsWithChildren<{\n synapseContext?: Partial<SynapseContextType>\n}>\n\n/**\n * Provides context necessary for most components in SRC.\n *\n * The SynapseContextProvider must be wrapped in a react-query QueryClientProvider.\n * @returns\n */\nexport function SynapseContextProvider(props: SynapseContextProviderProps) {\n const { children, synapseContext: providedContext } = props\n const queryKeyFactory = useMemo(\n () => new KeyFactory(providedContext?.accessToken),\n [providedContext?.accessToken],\n )\n\n const basePath = getEndpoint(BackendDestinationEnum.REPO_ENDPOINT)\n\n const synapseApiClient = useMemo(() => {\n if (providedContext?.synapseClient) {\n return providedContext?.synapseClient\n }\n const configurationParameters = {\n accessToken: providedContext?.accessToken,\n basePath: basePath,\n }\n return new SynapseClient(configurationParameters)\n }, [providedContext?.synapseClient, providedContext?.accessToken, basePath])\n\n const synapseContext: SynapseContextType = useMemo(\n () => ({\n accessToken: providedContext?.accessToken,\n isAuthenticated: providedContext?.isAuthenticated ?? false,\n isInExperimentalMode: providedContext?.isInExperimentalMode ?? false,\n utcTime: providedContext?.utcTime ?? false,\n withErrorBoundary: providedContext?.withErrorBoundary ?? false,\n downloadCartPageUrl:\n providedContext?.downloadCartPageUrl ?? '/DownloadCart',\n peopleSearchPageUrl:\n providedContext?.peopleSearchPageUrl ?? '/PeopleSearch:',\n keyFactory: providedContext?.keyFactory ?? queryKeyFactory,\n appId: providedContext?.appId,\n synapseClient: synapseApiClient,\n }),\n [\n providedContext?.accessToken,\n providedContext?.isAuthenticated,\n providedContext?.downloadCartPageUrl,\n providedContext?.peopleSearchPageUrl,\n providedContext?.isInExperimentalMode,\n providedContext?.keyFactory,\n providedContext?.utcTime,\n providedContext?.withErrorBoundary,\n providedContext?.appId,\n queryKeyFactory,\n synapseApiClient,\n ],\n )\n\n return (\n <SynapseContext.Provider value={synapseContext}>\n {synapseContext?.withErrorBoundary ? (\n <SynapseErrorBoundary>{children}</SynapseErrorBoundary>\n ) : (\n children\n )}\n </SynapseContext.Provider>\n )\n}\n\nexport const SynapseContextConsumer = SynapseContext.Consumer\n\nexport function useSynapseContext(): SynapseContextType {\n const context = useContext(SynapseContext)\n if (context === undefined) {\n throw new Error(\n 'useSynapseContext must be used within a SynapseContextProvider',\n )\n }\n return context\n}\n"],"mappings":";;;;;;AA6CA,IAAa,IAAiB,EAhBP;CACrB,aAAa,KAAA;CACb,iBAAiB;CACjB,sBAAsB;CACtB,SAAS;CACT,mBAAmB;CACnB,YAAY,IAAI,EAAW,KAAA,EAAU;CACrC,qBAAqB;CACrB,qBAAqB;CACrB,OAAO,KAAA;CACP,eAAe,IAAI,GAAe;CACnC,CAK8E;AAY/E,SAAgB,EAAuB,GAAoC;CACzE,IAAM,EAAE,aAAU,gBAAgB,MAAoB,GAChD,IAAkB,QAChB,IAAI,EAAW,GAAiB,YAAY,EAClD,CAAC,GAAiB,YAAY,CAC/B,EAEK,IAAW,EAAY,EAAuB,cAAc,EAE5D,IAAmB,QACnB,GAAiB,gBACZ,GAAiB,gBAMnB,IAAI,EAJqB;EAC9B,aAAa,GAAiB;EACpB;EACX,CACgD,EAChD;EAAC,GAAiB;EAAe,GAAiB;EAAa;EAAS,CAAC,EAEtE,IAAqC,SAClC;EACL,aAAa,GAAiB;EAC9B,iBAAiB,GAAiB,mBAAmB;EACrD,sBAAsB,GAAiB,wBAAwB;EAC/D,SAAS,GAAiB,WAAW;EACrC,mBAAmB,GAAiB,qBAAqB;EACzD,qBACE,GAAiB,uBAAuB;EAC1C,qBACE,GAAiB,uBAAuB;EAC1C,YAAY,GAAiB,cAAc;EAC3C,OAAO,GAAiB;EACxB,eAAe;EAChB,GACD;EACE,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB;EACA;EACD,CACF;AAED,QACE,kBAAC,EAAe,UAAhB;EAAyB,OAAO;YAC7B,GAAgB,oBACf,kBAAC,GAAD,EAAuB,aAAgC,CAAA,GAEvD;EAEsB,CAAA;;AAI9B,IAAa,IAAyB,EAAe;AAErD,SAAgB,IAAwC;CACtD,IAAM,IAAU,EAAW,EAAe;AAC1C,KAAI,MAAY,KAAA,EACd,OAAU,MACR,iEACD;AAEH,QAAO"}
1
+ {"version":3,"file":"SynapseContext.js","names":[],"sources":["../../../src/utils/context/SynapseContext.tsx"],"sourcesContent":["import { SynapseErrorBoundary } from '@/components/error/ErrorBanner'\nimport { KeyFactory } from '@/synapse-queries/KeyFactory'\nimport { SynapseClient } from '@sage-bionetworks/synapse-client/SynapseClient'\nimport { createContext, PropsWithChildren, useContext, useMemo } from 'react'\nimport { BackendDestinationEnum, getEndpoint } from '../functions/getEndpoint'\n\nexport type SynapseContextType = {\n /** The user's access token. If undefined, the user is not logged in */\n accessToken: string | undefined\n /** Whether the user is authenticated */\n isAuthenticated: boolean\n /** If the user has enabled experimental mode */\n isInExperimentalMode: boolean\n /** If the user prefers time to be displayed in UTC format */\n utcTime: boolean\n /** Whether to wrap all children of this context in an error boundary. Useful if this context wraps just one component. */\n withErrorBoundary: boolean\n /** The URL of the download cart page in the current app. Used to properly link components */\n downloadCartPageUrl: string\n /** The URL of the people search page in the current app */\n peopleSearchPageUrl?: string\n /** The key factory to use for react-query. Generated automatically. */\n keyFactory: KeyFactory\n /** The appId identifying the product. Used to brand the Synapse account management site, aka OneSage. */\n appId?: string\n /* API client objects for Synapse. Generated automatically. */\n synapseClient: SynapseClient\n}\n\nconst defaultContext = {\n accessToken: undefined,\n isAuthenticated: false,\n isInExperimentalMode: false,\n utcTime: false,\n withErrorBoundary: false,\n keyFactory: new KeyFactory(undefined),\n downloadCartPageUrl: '/DownloadCart',\n peopleSearchPageUrl: '/PeopleSearch:',\n appId: undefined,\n synapseClient: new SynapseClient(),\n} satisfies SynapseContextType\n\n/**\n * This must be exported to use the context in class components.\n */\nexport const SynapseContext = createContext<SynapseContextType>(defaultContext)\n\nexport type SynapseContextProviderProps = PropsWithChildren<{\n synapseContext?: Partial<SynapseContextType>\n}>\n\n/**\n * Provides context necessary for most components in SRC.\n *\n * The SynapseContextProvider must be wrapped in a react-query QueryClientProvider.\n * @returns\n */\nexport function SynapseContextProvider(props: SynapseContextProviderProps) {\n const { children, synapseContext: providedContext } = props\n const queryKeyFactory = useMemo(\n () => new KeyFactory(providedContext?.accessToken),\n [providedContext?.accessToken],\n )\n\n const basePath = getEndpoint(BackendDestinationEnum.REPO_ENDPOINT)\n\n const synapseApiClient = useMemo(() => {\n if (providedContext?.synapseClient) {\n return providedContext?.synapseClient\n }\n const configurationParameters = {\n accessToken: providedContext?.accessToken,\n basePath: basePath,\n }\n return new SynapseClient(configurationParameters)\n }, [providedContext?.synapseClient, providedContext?.accessToken, basePath])\n\n const synapseContext: SynapseContextType = useMemo(\n () => ({\n accessToken: providedContext?.accessToken,\n isAuthenticated: providedContext?.isAuthenticated ?? false,\n isInExperimentalMode: providedContext?.isInExperimentalMode ?? false,\n utcTime: providedContext?.utcTime ?? false,\n withErrorBoundary: providedContext?.withErrorBoundary ?? false,\n downloadCartPageUrl:\n providedContext?.downloadCartPageUrl ?? '/DownloadCart',\n peopleSearchPageUrl:\n providedContext?.peopleSearchPageUrl ?? '/PeopleSearch:',\n keyFactory: providedContext?.keyFactory ?? queryKeyFactory,\n appId: providedContext?.appId,\n synapseClient: synapseApiClient,\n }),\n [\n providedContext?.accessToken,\n providedContext?.isAuthenticated,\n providedContext?.downloadCartPageUrl,\n providedContext?.peopleSearchPageUrl,\n providedContext?.isInExperimentalMode,\n providedContext?.keyFactory,\n providedContext?.utcTime,\n providedContext?.withErrorBoundary,\n providedContext?.appId,\n queryKeyFactory,\n synapseApiClient,\n ],\n )\n\n return (\n <SynapseContext.Provider value={synapseContext}>\n {synapseContext?.withErrorBoundary ? (\n <SynapseErrorBoundary>{children}</SynapseErrorBoundary>\n ) : (\n children\n )}\n </SynapseContext.Provider>\n )\n}\n\nexport const SynapseContextConsumer = SynapseContext.Consumer\n\nexport function useSynapseContext(): SynapseContextType {\n const context = useContext(SynapseContext)\n if (context === undefined) {\n throw new Error(\n 'useSynapseContext must be used within a SynapseContextProvider',\n )\n }\n return context\n}\n"],"mappings":";;;;;;AA6CA,IAAa,IAAiB,EAAkC;CAf9D,aAAa,KAAA;CACb,iBAAiB;CACjB,sBAAsB;CACtB,SAAS;CACT,mBAAmB;CACnB,YAAY,IAAI,EAAW,KAAA,EAAU;CACrC,qBAAqB;CACrB,qBAAqB;CACrB,OAAO,KAAA;CACP,eAAe,IAAI,GAAe;CAM4B,CAAe;AAY/E,SAAgB,EAAuB,GAAoC;CACzE,IAAM,EAAE,aAAU,gBAAgB,MAAoB,GAChD,IAAkB,QAChB,IAAI,EAAW,GAAiB,YAAY,EAClD,CAAC,GAAiB,YAAY,CAC/B,EAEK,IAAW,EAAY,EAAuB,cAAc,EAE5D,IAAmB,QACnB,GAAiB,gBACZ,GAAiB,gBAMnB,IAAI,EAAc;EAHvB,aAAa,GAAiB;EACpB;EAEa,CAAwB,EAChD;EAAC,GAAiB;EAAe,GAAiB;EAAa;EAAS,CAAC,EAEtE,IAAqC,SAClC;EACL,aAAa,GAAiB;EAC9B,iBAAiB,GAAiB,mBAAmB;EACrD,sBAAsB,GAAiB,wBAAwB;EAC/D,SAAS,GAAiB,WAAW;EACrC,mBAAmB,GAAiB,qBAAqB;EACzD,qBACE,GAAiB,uBAAuB;EAC1C,qBACE,GAAiB,uBAAuB;EAC1C,YAAY,GAAiB,cAAc;EAC3C,OAAO,GAAiB;EACxB,eAAe;EAChB,GACD;EACE,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB,GAAiB;EACjB;EACA;EACD,CACF;AAED,QACE,kBAAC,EAAe,UAAhB;EAAyB,OAAO;YAC7B,GAAgB,oBACf,kBAAC,GAAD,EAAuB,aAAgC,CAAA,GAEvD;EAEsB,CAAA;;AAI9B,IAAa,IAAyB,EAAe;AAErD,SAAgB,IAAwC;CACtD,IAAM,IAAU,EAAW,EAAe;AAC1C,KAAI,MAAY,KAAA,EACd,OAAU,MACR,iEACD;AAEH,QAAO"}
@@ -26,4 +26,8 @@ export declare function isEntityPublic(resourceAccess: ResourceAccess[], realmPr
26
26
  publicGroup?: string;
27
27
  anonymousUser?: string;
28
28
  }): boolean;
29
+ /**
30
+ * Consolidate access types for duplicate entries for the same principal into a single entry with the union of all access types.
31
+ */
32
+ export declare function consolidateResourceAccessList(list: ResourceAccess[]): ResourceAccess[];
29
33
  //# sourceMappingURL=AccessControlListUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccessControlListUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/functions/AccessControlListUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC7E,OAAO,EACL,iBAAiB,EACjB,cAAc,IAAI,2BAA2B,EAC9C,MAAM,kCAAkC,CAAA;AAazC;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,CAAC,EAAE,cAAc,EAAE,EACnB,CAAC,EAAE,cAAc,EAAE,WAMpB;AAED,qHAAqH;AACrH,wBAAgB,6BAA6B,CAC3C,iBAAiB,CAAC,EAAE,GAAG,CAAC,2BAA2B,CAAC,GACnD,cAAc,EAAE,CAOlB;AAED,6HAA6H;AAC7H,wBAAgB,kCAAkC,CAChD,GAAG,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,EACzC,kBAAkB,EAAE,cAAc,EAAE,GACnC,iBAAiB,CASnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,cAAc,EAAE,cAAc,EAAE,EAChC,eAAe,EAAE;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,GACA,OAAO,CAUT"}
1
+ {"version":3,"file":"AccessControlListUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/functions/AccessControlListUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC7E,OAAO,EACL,iBAAiB,EACjB,cAAc,IAAI,2BAA2B,EAC9C,MAAM,kCAAkC,CAAA;AAazC;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,CAAC,EAAE,cAAc,EAAE,EACnB,CAAC,EAAE,cAAc,EAAE,WAMpB;AAED,qHAAqH;AACrH,wBAAgB,6BAA6B,CAC3C,iBAAiB,CAAC,EAAE,GAAG,CAAC,2BAA2B,CAAC,GACnD,cAAc,EAAE,CAOlB;AAED,6HAA6H;AAC7H,wBAAgB,kCAAkC,CAChD,GAAG,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,EACzC,kBAAkB,EAAE,cAAc,EAAE,GACnC,iBAAiB,CASnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,cAAc,EAAE,cAAc,EAAE,EAChC,eAAe,EAAE;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,GACA,OAAO,CAUT;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,cAAc,EAAE,GACrB,cAAc,EAAE,CAgBlB"}
@@ -28,7 +28,18 @@ function o(e, t) {
28
28
  ].filter((e) => e !== void 0);
29
29
  return e.some((e) => n.includes(String(e.principalId)));
30
30
  }
31
+ function s(e) {
32
+ let t = /* @__PURE__ */ new Map();
33
+ for (let n of e) {
34
+ let e = t.get(n.principalId);
35
+ e ? n.accessType.forEach((t) => e.add(t)) : t.set(n.principalId, new Set(n.accessType));
36
+ }
37
+ return Array.from(t, ([e, t]) => ({
38
+ principalId: e,
39
+ accessType: Array.from(t)
40
+ }));
41
+ }
31
42
  //#endregion
32
- export { i as convertResourceAccessSetToSRC, o as isEntityPublic, r as resourceAccessListIsEqual, a as updateACLWithSRCResourceAccessList };
43
+ export { s as consolidateResourceAccessList, i as convertResourceAccessSetToSRC, o as isEntityPublic, r as resourceAccessListIsEqual, a as updateACLWithSRCResourceAccessList };
33
44
 
34
45
  //# sourceMappingURL=AccessControlListUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccessControlListUtils.js","names":[],"sources":["../../../src/utils/functions/AccessControlListUtils.ts"],"sourcesContent":["import { cloneDeep, isEqual } from 'lodash-es'\nimport { ACCESS_TYPE, ResourceAccess } from '@sage-bionetworks/synapse-types'\nimport {\n AccessControlList,\n ResourceAccess as SynapseClientResourceAccess,\n} from '@sage-bionetworks/synapse-client'\n\nfunction sortResourceAccessList(\n resourceAccessList: ResourceAccess[],\n): ResourceAccess[] {\n const clone = cloneDeep(resourceAccessList)\n // Sort the resource access list by principal ID\n clone.sort((a, b) => b.principalId - a.principalId)\n // In each resource access, sort the access type set\n clone.forEach(ra => ra.accessType.sort())\n return clone\n}\n\n/**\n * Compares two objects for equality, ignoring the order of elements in arrays.\n * @param a\n * @param b\n */\nexport function resourceAccessListIsEqual(\n a: ResourceAccess[],\n b: ResourceAccess[],\n) {\n const aSorted = sortResourceAccessList(a)\n const bSorted = sortResourceAccessList(b)\n\n return isEqual(aSorted, bSorted)\n}\n\n/** Conversion utility to go from synapse-client ResourceAccess Set to the SRC SynapseClient ResourceAccess[] type */\nexport function convertResourceAccessSetToSRC(\n resourceAccessSet?: Set<SynapseClientResourceAccess>,\n): ResourceAccess[] {\n return Array.from(resourceAccessSet ?? []).map(item => ({\n principalId: item.principalId ?? -1,\n accessType: Array.isArray(item.accessType)\n ? (item.accessType as ACCESS_TYPE[])\n : (Array.from(item.accessType ?? []) as ACCESS_TYPE[]),\n }))\n}\n\n/** Conversion utility to go from synapse-react-client ResourceAccess[] to the synapse-client ResourceAccess Set in an ACL */\nexport function updateACLWithSRCResourceAccessList(\n acl: AccessControlList | null | undefined,\n resourceAccessList: ResourceAccess[],\n): AccessControlList {\n const newAcl = { ...acl }\n newAcl.resourceAccess = new Set(\n resourceAccessList.map(ra => ({\n principalId: ra.principalId,\n accessType: new Set(ra.accessType),\n })),\n )\n return newAcl\n}\n\n/**\n * Determines if an entity is publicly accessible by checking if any public principals\n * (authenticated users, public group, or anonymous user) have access in the resource access list.\n *\n * @param resourceAccess - The list of resource access entries to check\n * @param realmPrincipals - An object containing the principal IDs for public groups\n * @param realmPrincipals.authenticatedUsers - The principal ID for authenticated users\n * @param realmPrincipals.publicGroup - The principal ID for the public group\n * @param realmPrincipals.anonymousUser - The principal ID for anonymous users\n * @returns true if any public principal has access, false otherwise\n */\nexport function isEntityPublic(\n resourceAccess: ResourceAccess[],\n realmPrincipals: {\n authenticatedUsers?: string\n publicGroup?: string\n anonymousUser?: string\n },\n): boolean {\n const publicPrincipalIds = [\n realmPrincipals.authenticatedUsers,\n realmPrincipals.publicGroup,\n realmPrincipals.anonymousUser,\n ].filter((id): id is string => id !== undefined)\n\n return resourceAccess.some(ra =>\n publicPrincipalIds.includes(String(ra.principalId)),\n )\n}\n"],"mappings":";;AAOA,SAAS,EACP,GACkB;CAClB,IAAM,IAAQ,EAAU,EAAmB;AAK3C,QAHA,EAAM,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,YAAY,EAEnD,EAAM,SAAQ,MAAM,EAAG,WAAW,MAAM,CAAC,EAClC;;AAQT,SAAgB,EACd,GACA,GACA;AAIA,QAAO,EAHS,EAAuB,EAAE,EACzB,EAAuB,EAAE,CAET;;AAIlC,SAAgB,EACd,GACkB;AAClB,QAAO,MAAM,KAAK,KAAqB,EAAE,CAAC,CAAC,KAAI,OAAS;EACtD,aAAa,EAAK,eAAe;EACjC,YAAY,MAAM,QAAQ,EAAK,WAAW,GACrC,EAAK,aACL,MAAM,KAAK,EAAK,cAAc,EAAE,CAAC;EACvC,EAAE;;AAIL,SAAgB,EACd,GACA,GACmB;CACnB,IAAM,IAAS,EAAE,GAAG,GAAK;AAOzB,QANA,EAAO,iBAAiB,IAAI,IAC1B,EAAmB,KAAI,OAAO;EAC5B,aAAa,EAAG;EAChB,YAAY,IAAI,IAAI,EAAG,WAAW;EACnC,EAAE,CACJ,EACM;;AAcT,SAAgB,EACd,GACA,GAKS;CACT,IAAM,IAAqB;EACzB,EAAgB;EAChB,EAAgB;EAChB,EAAgB;EACjB,CAAC,QAAQ,MAAqB,MAAO,KAAA,EAAU;AAEhD,QAAO,EAAe,MAAK,MACzB,EAAmB,SAAS,OAAO,EAAG,YAAY,CAAC,CACpD"}
1
+ {"version":3,"file":"AccessControlListUtils.js","names":[],"sources":["../../../src/utils/functions/AccessControlListUtils.ts"],"sourcesContent":["import { cloneDeep, isEqual } from 'lodash-es'\nimport { ACCESS_TYPE, ResourceAccess } from '@sage-bionetworks/synapse-types'\nimport {\n AccessControlList,\n ResourceAccess as SynapseClientResourceAccess,\n} from '@sage-bionetworks/synapse-client'\n\nfunction sortResourceAccessList(\n resourceAccessList: ResourceAccess[],\n): ResourceAccess[] {\n const clone = cloneDeep(resourceAccessList)\n // Sort the resource access list by principal ID\n clone.sort((a, b) => b.principalId - a.principalId)\n // In each resource access, sort the access type set\n clone.forEach(ra => ra.accessType.sort())\n return clone\n}\n\n/**\n * Compares two objects for equality, ignoring the order of elements in arrays.\n * @param a\n * @param b\n */\nexport function resourceAccessListIsEqual(\n a: ResourceAccess[],\n b: ResourceAccess[],\n) {\n const aSorted = sortResourceAccessList(a)\n const bSorted = sortResourceAccessList(b)\n\n return isEqual(aSorted, bSorted)\n}\n\n/** Conversion utility to go from synapse-client ResourceAccess Set to the SRC SynapseClient ResourceAccess[] type */\nexport function convertResourceAccessSetToSRC(\n resourceAccessSet?: Set<SynapseClientResourceAccess>,\n): ResourceAccess[] {\n return Array.from(resourceAccessSet ?? []).map(item => ({\n principalId: item.principalId ?? -1,\n accessType: Array.isArray(item.accessType)\n ? (item.accessType as ACCESS_TYPE[])\n : (Array.from(item.accessType ?? []) as ACCESS_TYPE[]),\n }))\n}\n\n/** Conversion utility to go from synapse-react-client ResourceAccess[] to the synapse-client ResourceAccess Set in an ACL */\nexport function updateACLWithSRCResourceAccessList(\n acl: AccessControlList | null | undefined,\n resourceAccessList: ResourceAccess[],\n): AccessControlList {\n const newAcl = { ...acl }\n newAcl.resourceAccess = new Set(\n resourceAccessList.map(ra => ({\n principalId: ra.principalId,\n accessType: new Set(ra.accessType),\n })),\n )\n return newAcl\n}\n\n/**\n * Determines if an entity is publicly accessible by checking if any public principals\n * (authenticated users, public group, or anonymous user) have access in the resource access list.\n *\n * @param resourceAccess - The list of resource access entries to check\n * @param realmPrincipals - An object containing the principal IDs for public groups\n * @param realmPrincipals.authenticatedUsers - The principal ID for authenticated users\n * @param realmPrincipals.publicGroup - The principal ID for the public group\n * @param realmPrincipals.anonymousUser - The principal ID for anonymous users\n * @returns true if any public principal has access, false otherwise\n */\nexport function isEntityPublic(\n resourceAccess: ResourceAccess[],\n realmPrincipals: {\n authenticatedUsers?: string\n publicGroup?: string\n anonymousUser?: string\n },\n): boolean {\n const publicPrincipalIds = [\n realmPrincipals.authenticatedUsers,\n realmPrincipals.publicGroup,\n realmPrincipals.anonymousUser,\n ].filter((id): id is string => id !== undefined)\n\n return resourceAccess.some(ra =>\n publicPrincipalIds.includes(String(ra.principalId)),\n )\n}\n\n/**\n * Consolidate access types for duplicate entries for the same principal into a single entry with the union of all access types.\n */\nexport function consolidateResourceAccessList(\n list: ResourceAccess[],\n): ResourceAccess[] {\n const permissionsMap = new Map<number, Set<ACCESS_TYPE>>()\n for (const item of list) {\n const permissions = permissionsMap.get(item.principalId)\n\n if (permissions) {\n item.accessType.forEach(type => permissions.add(type))\n } else {\n permissionsMap.set(item.principalId, new Set(item.accessType))\n }\n }\n\n return Array.from(permissionsMap, ([principalId, accessTypeSet]) => ({\n principalId,\n accessType: Array.from(accessTypeSet),\n }))\n}\n"],"mappings":";;AAOA,SAAS,EACP,GACkB;CAClB,IAAM,IAAQ,EAAU,EAAmB;AAK3C,QAHA,EAAM,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,YAAY,EAEnD,EAAM,SAAQ,MAAM,EAAG,WAAW,MAAM,CAAC,EAClC;;AAQT,SAAgB,EACd,GACA,GACA;AAIA,QAAO,EAHS,EAAuB,EAGxB,EAFC,EAAuB,EAEf,CAAQ;;AAIlC,SAAgB,EACd,GACkB;AAClB,QAAO,MAAM,KAAK,KAAqB,EAAE,CAAC,CAAC,KAAI,OAAS;EACtD,aAAa,EAAK,eAAe;EACjC,YAAY,MAAM,QAAQ,EAAK,WAAW,GACrC,EAAK,aACL,MAAM,KAAK,EAAK,cAAc,EAAE,CAAC;EACvC,EAAE;;AAIL,SAAgB,EACd,GACA,GACmB;CACnB,IAAM,IAAS,EAAE,GAAG,GAAK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AA;AAED,eAAO,MAAM,MAAM,oCAElB,CAAA;AAED,eAAO,MAAM,aAAa,2CAEzB,CAAA;AAED,eAAO,MAAM,gBAAgB,8CAGS,CAAA;AAEtC,eAAO,MAAM,kBAAkB,gDAGS,CAAA;AAExC,eAAO,MAAM,SAAS,uCAErB,CAAA;AACD,eAAO,MAAM,mBAAmB,iDAGS,CAAA;AAEzC,eAAO,MAAM,yBAAyB,GACpC,QAAQ,MAAM,KACb,MAAM,IAAI,OAAO,GAAG,iBAC2B,CAAA;AAElD,eAAO,MAAM,YAAY,0CAExB,CAAA;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,UAAU,WAEpD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,UAAU,WAEhD;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,GACb,MAAM,IAAI,iBAAiB,CAE7B;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAkBxD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,UAKlD;AAiCD;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,EAAE,CA+CjE,CAAA;AAED,KAAK,kBAAkB,GAAG,YAAY,GAAG,WAAW,CAAA;AAEpD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,kBAAkB,EAAE,UAAU,EAAE,CAWpE,CAAA"}
@@ -19,7 +19,8 @@ function v(e) {
19
19
  case g.dataset:
20
20
  case g.datasetcollection:
21
21
  case g.materializedview:
22
- case g.virtualtable: return !1;
22
+ case g.virtualtable:
23
+ case g.searchindex: return !1;
23
24
  default: throw Error(`Unknown entity type: ${e}`);
24
25
  }
25
26
  }
@@ -30,7 +31,8 @@ function y(e) {
30
31
  case g.link:
31
32
  case g.dockerrepo:
32
33
  case g.file:
33
- case g.recordset: return !1;
34
+ case g.recordset:
35
+ case g.searchindex: return !1;
34
36
  case g.table:
35
37
  case g.submissionview:
36
38
  case g.entityview:
@@ -56,6 +58,7 @@ function b(e) {
56
58
  case g.materializedview: return "Materialized View";
57
59
  case g.virtualtable: return "Virtual Table";
58
60
  case g.recordset: return "Record Set";
61
+ case g.searchindex: return "Search Index";
59
62
  default: return console.warn("Entity type could not be mapped to name:", e), "";
60
63
  }
61
64
  }
@@ -75,6 +78,7 @@ function x(e) {
75
78
  case l: return g.materializedview;
76
79
  case h: return g.virtualtable;
77
80
  case "org.sagebionetworks.repo.model.RecordSet": return g.recordset;
81
+ case "org.sagebionetworks.repo.model.search.table.SearchIndex": return g.searchindex;
78
82
  default: throw Error(`Unknown entity type: ${e}`);
79
83
  }
80
84
  }
@@ -93,6 +97,7 @@ function S(e) {
93
97
  case g.materializedview: return "org.sagebionetworks.repo.model.table.MaterializedView";
94
98
  case g.virtualtable: return "org.sagebionetworks.repo.model.table.VirtualTable";
95
99
  case g.recordset: return "org.sagebionetworks.repo.model.RecordSet";
100
+ case g.searchindex: return "org.sagebionetworks.repo.model.search.table.SearchIndex";
96
101
  default: throw Error(`Unknown entity type: ${e}`);
97
102
  }
98
103
  }
@@ -104,7 +109,8 @@ function C(e) {
104
109
  case g.dockerrepo:
105
110
  case g.submissionview:
106
111
  case g.materializedview:
107
- case g.virtualtable: return !1;
112
+ case g.virtualtable:
113
+ case g.searchindex: return !1;
108
114
  case g.file:
109
115
  case g.recordset:
110
116
  case g.table:
@@ -192,7 +198,12 @@ var R = [
192
198
  "csvDescriptor"
193
199
  ],
194
200
  "org.sagebionetworks.repo.model.Preview": [],
195
- "org.sagebionetworks.repo.model.ExampleEntity": []
201
+ "org.sagebionetworks.repo.model.ExampleEntity": [],
202
+ "org.sagebionetworks.repo.model.search.table.SearchIndex": [
203
+ ...R,
204
+ "definingSQL",
205
+ "searchConfigurationId"
206
+ ]
196
207
  }, W = {
197
208
  ALL_TABLES: [
198
209
  g.table,