synapse-react-client 3.0.32 → 3.0.35

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 (253) hide show
  1. package/dist/containers/CardContainer.js +3 -1
  2. package/dist/containers/CardContainer.js.map +1 -1
  3. package/dist/containers/Carousel.js +5 -2
  4. package/dist/containers/Carousel.js.map +1 -1
  5. package/dist/containers/CopyToClipboardInput.js +2 -2
  6. package/dist/containers/CopyToClipboardInput.js.map +1 -1
  7. package/dist/containers/EntityIcon.d.ts +1 -0
  8. package/dist/containers/EntityIcon.js +3 -2
  9. package/dist/containers/EntityIcon.js.map +1 -1
  10. package/dist/containers/GenericCard.d.ts +20 -9
  11. package/dist/containers/GenericCard.js +85 -93
  12. package/dist/containers/GenericCard.js.map +1 -1
  13. package/dist/containers/IconSvg.d.ts +1 -1
  14. package/dist/containers/IconSvg.js +6 -0
  15. package/dist/containers/IconSvg.js.map +1 -1
  16. package/dist/containers/MarkdownSynapse.d.ts +23 -9
  17. package/dist/containers/MarkdownSynapse.js +30 -30
  18. package/dist/containers/MarkdownSynapse.js.map +1 -1
  19. package/dist/containers/QueryContext.d.ts +1 -1
  20. package/dist/containers/QueryVisualizationWrapper.js +7 -5
  21. package/dist/containers/QueryVisualizationWrapper.js.map +1 -1
  22. package/dist/containers/QueryWrapper.js +5 -10
  23. package/dist/containers/QueryWrapper.js.map +1 -1
  24. package/dist/containers/SubsectionRowRenderer.js +5 -1
  25. package/dist/containers/SubsectionRowRenderer.js.map +1 -1
  26. package/dist/containers/SynapseNavDrawer.js +1 -1
  27. package/dist/containers/SynapseNavDrawer.js.map +1 -1
  28. package/dist/containers/TableFeedCards.js +8 -4
  29. package/dist/containers/TableFeedCards.js.map +1 -1
  30. package/dist/containers/UpsetPlot.js +3 -0
  31. package/dist/containers/UpsetPlot.js.map +1 -1
  32. package/dist/containers/UserCardList.js +7 -4
  33. package/dist/containers/UserCardList.js.map +1 -1
  34. package/dist/containers/UserCardListRotate.js +3 -1
  35. package/dist/containers/UserCardListRotate.js.map +1 -1
  36. package/dist/containers/UserCardSmall.js +18 -20
  37. package/dist/containers/UserCardSmall.js.map +1 -1
  38. package/dist/containers/dataaccess/SubmissionPage.js +6 -6
  39. package/dist/containers/dataaccess/SubmissionPage.js.map +1 -1
  40. package/dist/containers/download_list_v2/DownloadCartPage.js +10 -5
  41. package/dist/containers/download_list_v2/DownloadCartPage.js.map +1 -1
  42. package/dist/containers/entity_finder/EntityFinder.js +12 -49
  43. package/dist/containers/entity_finder/EntityFinder.js.map +1 -1
  44. package/dist/containers/entity_finder/EntityFinderHeader.d.ts +21 -0
  45. package/dist/containers/entity_finder/EntityFinderHeader.js +3 -0
  46. package/dist/containers/entity_finder/EntityFinderHeader.js.map +1 -0
  47. package/dist/containers/entity_finder/details/EntityDetailsList.d.ts +5 -2
  48. package/dist/containers/entity_finder/details/EntityDetailsList.js +3 -3
  49. package/dist/containers/entity_finder/details/EntityDetailsList.js.map +1 -1
  50. package/dist/containers/entity_finder/details/configurations/EntityChildrenDetails.js +1 -1
  51. package/dist/containers/entity_finder/details/configurations/EntityChildrenDetails.js.map +1 -1
  52. package/dist/containers/entity_finder/details/configurations/FavoritesDetails.js +1 -1
  53. package/dist/containers/entity_finder/details/configurations/FavoritesDetails.js.map +1 -1
  54. package/dist/containers/entity_finder/details/configurations/ProjectListDetails.d.ts +3 -0
  55. package/dist/containers/entity_finder/details/configurations/ProjectListDetails.js +7 -3
  56. package/dist/containers/entity_finder/details/configurations/ProjectListDetails.js.map +1 -1
  57. package/dist/containers/entity_finder/details/configurations/SearchDetails.js +13 -1
  58. package/dist/containers/entity_finder/details/configurations/SearchDetails.js.map +1 -1
  59. package/dist/containers/entity_finder/details/view/DetailsView.d.ts +4 -4
  60. package/dist/containers/entity_finder/details/view/DetailsView.js +2 -2
  61. package/dist/containers/entity_finder/details/view/DetailsView.js.map +1 -1
  62. package/dist/containers/entity_finder/details/view/DetailsViewTableRenderers.js +2 -2
  63. package/dist/containers/entity_finder/details/view/DetailsViewTableRenderers.js.map +1 -1
  64. package/dist/containers/entity_finder/tree/EntityTree.js +3 -3
  65. package/dist/containers/entity_finder/tree/EntityTree.js.map +1 -1
  66. package/dist/containers/entity_finder/tree/VirtualizedTree.d.ts +3 -3
  67. package/dist/containers/entity_finder/tree/VirtualizedTree.js +26 -3
  68. package/dist/containers/entity_finder/tree/VirtualizedTree.js.map +1 -1
  69. package/dist/containers/entity_finder/useEntitySelection.d.ts +4 -0
  70. package/dist/containers/entity_finder/useEntitySelection.js +56 -0
  71. package/dist/containers/entity_finder/useEntitySelection.js.map +1 -0
  72. package/dist/containers/evaluation_queues/CalendarWithIconFormGroup.js +5 -2
  73. package/dist/containers/evaluation_queues/CalendarWithIconFormGroup.js.map +1 -1
  74. package/dist/containers/evaluation_queues/EvaluationCard.js +4 -4
  75. package/dist/containers/evaluation_queues/EvaluationCard.js.map +1 -1
  76. package/dist/containers/evaluation_queues/EvaluationEditor.js +15 -15
  77. package/dist/containers/evaluation_queues/EvaluationEditor.js.map +1 -1
  78. package/dist/containers/evaluation_queues/EvaluationEditorPage.js +1 -1
  79. package/dist/containers/evaluation_queues/EvaluationEditorPage.js.map +1 -1
  80. package/dist/containers/evaluation_queues/EvaluationRoundEditor.js +1 -1
  81. package/dist/containers/evaluation_queues/EvaluationRoundEditor.js.map +1 -1
  82. package/dist/containers/evaluation_queues/EvaluationRoundEditorDropdown.js +1 -1
  83. package/dist/containers/evaluation_queues/EvaluationRoundEditorDropdown.js.map +1 -1
  84. package/dist/containers/evaluation_queues/round_limits/EvaluationRoundLimitOptionsList.js +1 -1
  85. package/dist/containers/evaluation_queues/round_limits/EvaluationRoundLimitOptionsList.js.map +1 -1
  86. package/dist/containers/home_page/featured_tools/FeaturedToolsList.js +10 -5
  87. package/dist/containers/home_page/featured_tools/FeaturedToolsList.js.map +1 -1
  88. package/dist/containers/home_page/goals/Goals.js +9 -1
  89. package/dist/containers/home_page/goals/Goals.js.map +1 -1
  90. package/dist/containers/home_page/programs/Programs.js +13 -6
  91. package/dist/containers/home_page/programs/Programs.js.map +1 -1
  92. package/dist/containers/home_page/project_view_carousel/ProjectViewCarousel.js +17 -5
  93. package/dist/containers/home_page/project_view_carousel/ProjectViewCarousel.js.map +1 -1
  94. package/dist/containers/home_page/resources/Resources.js +3 -0
  95. package/dist/containers/home_page/resources/Resources.js.map +1 -1
  96. package/dist/containers/oauth/CreateOAuthClient.d.ts +12 -0
  97. package/dist/containers/oauth/CreateOAuthClient.js +204 -0
  98. package/dist/containers/oauth/CreateOAuthClient.js.map +1 -0
  99. package/dist/containers/oauth/OAuthManagement.d.ts +2 -0
  100. package/dist/containers/oauth/OAuthManagement.js +128 -0
  101. package/dist/containers/oauth/OAuthManagement.js.map +1 -0
  102. package/dist/containers/personal_access_token/AccessTokenPage.js +11 -39
  103. package/dist/containers/personal_access_token/AccessTokenPage.js.map +1 -1
  104. package/dist/containers/personal_access_token/CreateAccessTokenModal.js +4 -4
  105. package/dist/containers/personal_access_token/CreateAccessTokenModal.js.map +1 -1
  106. package/dist/containers/provenance/ActivityNodeLabel.d.ts +3 -0
  107. package/dist/containers/provenance/ActivityNodeLabel.js +27 -0
  108. package/dist/containers/provenance/ActivityNodeLabel.js.map +1 -0
  109. package/dist/containers/provenance/EntityNodeLabel.d.ts +3 -0
  110. package/dist/containers/provenance/EntityNodeLabel.js +29 -0
  111. package/dist/containers/provenance/EntityNodeLabel.js.map +1 -0
  112. package/dist/containers/provenance/EntityPlaceholderNodeLabel.d.ts +6 -0
  113. package/dist/containers/provenance/EntityPlaceholderNodeLabel.js +23 -0
  114. package/dist/containers/provenance/EntityPlaceholderNodeLabel.js.map +1 -0
  115. package/dist/containers/provenance/ExpandGraphNodeLabel.d.ts +7 -0
  116. package/dist/containers/provenance/ExpandGraphNodeLabel.js +18 -0
  117. package/dist/containers/provenance/ExpandGraphNodeLabel.js.map +1 -0
  118. package/dist/containers/provenance/ExternalGraphNodeLabel.d.ts +3 -0
  119. package/dist/containers/provenance/ExternalGraphNodeLabel.js +16 -0
  120. package/dist/containers/provenance/ExternalGraphNodeLabel.js.map +1 -0
  121. package/dist/containers/provenance/ProvenanceEntityIcon.d.ts +6 -0
  122. package/dist/containers/provenance/ProvenanceEntityIcon.js +87 -0
  123. package/dist/containers/provenance/ProvenanceEntityIcon.js.map +1 -0
  124. package/dist/containers/provenance/ProvenanceExternalIcon.d.ts +5 -0
  125. package/dist/containers/provenance/ProvenanceExternalIcon.js +26 -0
  126. package/dist/containers/provenance/ProvenanceExternalIcon.js.map +1 -0
  127. package/dist/containers/provenance/ProvenanceGraph.d.ts +12 -0
  128. package/dist/containers/provenance/ProvenanceGraph.js +309 -0
  129. package/dist/containers/provenance/ProvenanceGraph.js.map +1 -0
  130. package/dist/containers/provenance/ProvenanceGraphUtils.d.ts +66 -0
  131. package/dist/containers/provenance/ProvenanceGraphUtils.js +175 -0
  132. package/dist/containers/provenance/ProvenanceGraphUtils.js.map +1 -0
  133. package/dist/containers/provenance/ProvenanceUtils.d.ts +32 -0
  134. package/dist/containers/provenance/ProvenanceUtils.js +145 -0
  135. package/dist/containers/provenance/ProvenanceUtils.js.map +1 -0
  136. package/dist/containers/provenance/UndefinedNodeLabel.d.ts +2 -0
  137. package/dist/containers/provenance/UndefinedNodeLabel.js +14 -0
  138. package/dist/containers/provenance/UndefinedNodeLabel.js.map +1 -0
  139. package/dist/containers/row_renderers/utils/CardFooter.js +1 -1
  140. package/dist/containers/row_renderers/utils/CardFooter.js.map +1 -1
  141. package/dist/containers/synapse_form_wrapper/SynapseFormUtils.d.ts +6 -0
  142. package/dist/containers/synapse_form_wrapper/SynapseFormUtils.js +43 -0
  143. package/dist/containers/synapse_form_wrapper/SynapseFormUtils.js.map +1 -0
  144. package/dist/containers/synapse_form_wrapper/SynapseFormWrapper.d.ts +0 -4
  145. package/dist/containers/synapse_form_wrapper/SynapseFormWrapper.js +14 -45
  146. package/dist/containers/synapse_form_wrapper/SynapseFormWrapper.js.map +1 -1
  147. package/dist/containers/synapse_table_functions/SynapseTableCell.d.ts +2 -2
  148. package/dist/containers/synapse_table_functions/SynapseTableCell.js +3 -1
  149. package/dist/containers/synapse_table_functions/SynapseTableCell.js.map +1 -1
  150. package/dist/containers/table/SynapseTable.d.ts +0 -7
  151. package/dist/containers/table/SynapseTable.js +4 -21
  152. package/dist/containers/table/SynapseTable.js.map +1 -1
  153. package/dist/containers/table/TablePagination.js +7 -2
  154. package/dist/containers/table/TablePagination.js.map +1 -1
  155. package/dist/containers/table/TopLevelControls.js +1 -1
  156. package/dist/containers/table/TopLevelControls.js.map +1 -1
  157. package/dist/containers/table/datasets/DatasetItemsEditor.d.ts +18 -7
  158. package/dist/containers/table/datasets/DatasetItemsEditor.js +95 -28
  159. package/dist/containers/table/datasets/DatasetItemsEditor.js.map +1 -1
  160. package/dist/containers/table/table-top/ColumnSelection.js +2 -6
  161. package/dist/containers/table/table-top/ColumnSelection.js.map +1 -1
  162. package/dist/containers/trash/TrashCanList.d.ts +2 -0
  163. package/dist/containers/trash/TrashCanList.js +144 -0
  164. package/dist/containers/trash/TrashCanList.js.map +1 -0
  165. package/dist/containers/widgets/Checkbox.d.ts +1 -0
  166. package/dist/containers/widgets/Checkbox.js +4 -4
  167. package/dist/containers/widgets/Checkbox.js.map +1 -1
  168. package/dist/containers/widgets/ElementWithTooltip.js +2 -8
  169. package/dist/containers/widgets/ElementWithTooltip.js.map +1 -1
  170. package/dist/containers/widgets/Range.d.ts +1 -1
  171. package/dist/containers/widgets/Range.js +2 -2
  172. package/dist/containers/widgets/Range.js.map +1 -1
  173. package/dist/containers/widgets/SynapseImage.d.ts +1 -1
  174. package/dist/containers/widgets/facet-nav/FacetNavPanel.js +9 -1
  175. package/dist/containers/widgets/facet-nav/FacetNavPanel.js.map +1 -1
  176. package/dist/containers/widgets/query-filter/RangeFacetFilter.d.ts +1 -1
  177. package/dist/containers/widgets/query-filter/RangeFacetFilter.js.map +1 -1
  178. package/dist/index.d.ts +2 -1
  179. package/dist/index.js +4 -2
  180. package/dist/index.js.map +1 -1
  181. package/dist/style/base/_core.scss +1 -2
  182. package/dist/style/bootstrap4_backports/_base-import.scss +3 -0
  183. package/dist/style/bootstrap4_backports/_overrides.scss +7 -2
  184. package/dist/style/components/_all.scss +2 -1
  185. package/dist/style/components/_copy-to-clipboard.scss +2 -0
  186. package/dist/style/components/_dataset-editor.scss +4 -1
  187. package/dist/style/components/_oauth-editor.scss +33 -0
  188. package/dist/style/components/_provenance.scss +71 -0
  189. package/dist/style/components/entity_finder/_tree-node-browse.scss +2 -1
  190. package/dist/style/components/entity_finder/_tree-view.scss +0 -3
  191. package/dist/style/main.css +119 -71
  192. package/dist/umd/synapse-react-client.development.css +120 -71
  193. package/dist/umd/synapse-react-client.development.css.map +2 -2
  194. package/dist/umd/synapse-react-client.development.js +79555 -64473
  195. package/dist/umd/synapse-react-client.development.js.map +3 -3
  196. package/dist/umd/synapse-react-client.production.min.css +1 -1
  197. package/dist/umd/synapse-react-client.production.min.js +96 -93
  198. package/dist/umd.index.d.ts +6 -3
  199. package/dist/umd.index.js +7 -3
  200. package/dist/umd.index.js.map +1 -1
  201. package/dist/utils/APIConstants.d.ts +8 -0
  202. package/dist/utils/APIConstants.js +19 -1
  203. package/dist/utils/APIConstants.js.map +1 -1
  204. package/dist/utils/SynapseClient.d.ts +48 -13
  205. package/dist/utils/SynapseClient.js +250 -208
  206. package/dist/utils/SynapseClient.js.map +1 -1
  207. package/dist/utils/functions/EntityTypeUtils.d.ts +3 -1
  208. package/dist/utils/functions/EntityTypeUtils.js +37 -7
  209. package/dist/utils/functions/EntityTypeUtils.js.map +1 -1
  210. package/dist/utils/hooks/SynapseAPI/index.d.ts +1 -0
  211. package/dist/utils/hooks/SynapseAPI/index.js +1 -0
  212. package/dist/utils/hooks/SynapseAPI/index.js.map +1 -1
  213. package/dist/utils/hooks/SynapseAPI/oauth/index.d.ts +1 -0
  214. package/dist/utils/hooks/SynapseAPI/oauth/index.js +5 -0
  215. package/dist/utils/hooks/SynapseAPI/oauth/index.js.map +1 -0
  216. package/dist/utils/hooks/SynapseAPI/oauth/useOAuthClient.d.ts +9 -0
  217. package/dist/utils/hooks/SynapseAPI/oauth/useOAuthClient.js +79 -0
  218. package/dist/utils/hooks/SynapseAPI/oauth/useOAuthClient.js.map +1 -0
  219. package/dist/utils/hooks/SynapseAPI/trash/useTrashCan.d.ts +6 -0
  220. package/dist/utils/hooks/SynapseAPI/trash/useTrashCan.js +81 -0
  221. package/dist/utils/hooks/SynapseAPI/trash/useTrashCan.js.map +1 -0
  222. package/dist/utils/hooks/SynapseAPI/user/usePersonalAccessToken.d.ts +4 -0
  223. package/dist/utils/hooks/SynapseAPI/user/usePersonalAccessToken.js +21 -0
  224. package/dist/utils/hooks/SynapseAPI/user/usePersonalAccessToken.js.map +1 -0
  225. package/dist/utils/hooks/useGetInfoFromIds.js +2 -1
  226. package/dist/utils/hooks/useGetInfoFromIds.js.map +1 -1
  227. package/dist/utils/hooks/useGetIsAllSelectedInfiniteList.d.ts +20 -22
  228. package/dist/utils/hooks/useGetIsAllSelectedInfiniteList.js +28 -32
  229. package/dist/utils/hooks/useGetIsAllSelectedInfiniteList.js.map +1 -1
  230. package/dist/utils/synapseTypes/Entity/Entity.d.ts +8 -5
  231. package/dist/utils/synapseTypes/Entity/Entity.js +5 -1
  232. package/dist/utils/synapseTypes/Entity/Entity.js.map +1 -1
  233. package/dist/utils/synapseTypes/EntityHeader.d.ts +2 -0
  234. package/dist/utils/synapseTypes/OAuthClient.d.ts +39 -0
  235. package/dist/utils/synapseTypes/OAuthClient.js +12 -0
  236. package/dist/utils/synapseTypes/OAuthClient.js.map +1 -0
  237. package/dist/utils/synapseTypes/Provenance/Provenance.d.ts +41 -0
  238. package/dist/utils/synapseTypes/Provenance/Provenance.js +6 -0
  239. package/dist/utils/synapseTypes/Provenance/Provenance.js.map +1 -0
  240. package/dist/utils/synapseTypes/Table/Dataset.d.ts +13 -9
  241. package/dist/utils/synapseTypes/Table/Dataset.js.map +1 -1
  242. package/dist/utils/synapseTypes/Table/QueryResult.d.ts +1 -1
  243. package/dist/utils/synapseTypes/TrashedEntity.d.ts +17 -0
  244. package/dist/utils/synapseTypes/TrashedEntity.js +3 -0
  245. package/dist/utils/synapseTypes/TrashedEntity.js.map +1 -0
  246. package/dist/utils/synapseTypes/VersionInfo.d.ts +2 -2
  247. package/dist/utils/synapseTypes/index.d.ts +1 -0
  248. package/dist/utils/synapseTypes/index.js +1 -0
  249. package/dist/utils/synapseTypes/index.js.map +1 -1
  250. package/package.json +10 -4
  251. package/dist/containers/HasAccess.d.ts +0 -85
  252. package/dist/containers/HasAccess.js +0 -353
  253. package/dist/containers/HasAccess.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTeamList = exports.getUserTeamList = exports.getUserChallenges = exports.removeUserFavorite = exports.getUserFavorites = exports.getEntityWiki = exports.getEntityBundleV2 = exports.deleteEntity = exports.updateEntity = exports.getEntityHeader = exports.getEntityHeaders = exports.getEntityHeadersByIds = exports.getEntity = exports.getBulkFiles = exports.getFiles = exports.lookupChildEntity = exports.getEntityChildren = exports.getUserProfiles = exports.getGroupHeadersBatch = exports.getUserGroupHeaders = exports.updateMyUserProfile = exports.getMyUserBundle = exports.getUserBundle = exports.getUserProfileById = exports.getUserProfile = exports.createProject = exports.createEntity = exports.oAuthSessionRequest = exports.oAuthUrlRequest = exports.login = exports.getFullQueryTableResults = exports.getQueryTableResults = exports.getQueryTableAsyncJobResults = exports.getAsyncResultBodyFromJobId = exports.getAsyncResultFromJobId = exports.getFileHandleByIdURL = exports.getActualFileHandleByIdURL = exports.getFileHandleById = exports.getDownloadFromTableRequest = exports.getVersion = exports.doPut = exports.doDelete = exports.doGet = exports.doPost = exports.allowNotFoundError = exports.delay = exports.getRootURL = exports.SYNAPSE_STORAGE_LOCATION_ID = exports.ACCESS_TOKEN_COOKIE_KEY = exports.IS_OUTSIDE_SYNAPSE_ORG = void 0;
4
- exports.listFormDataAsFormAdmin = exports.listFormData = exports.submitFormData = exports.deleteFormData = exports.updateFormData = exports.createFormData = exports.updateFormACL = exports.getFormACL = exports.createFormGroup = exports.consentToOAuth2Request = exports.getAuthenticatedOn = exports.getOAuth2Client = exports.hasUserAuthorizedOAuthClient = exports.getOAuth2RequestDescription = exports.getEvaluationSubmissions = exports.deleteEvaluationRound = exports.updateEvaluationRound = exports.createEvaluationRound = exports.getEvaluationRoundsList = exports.getEvaluationRound = exports.deleteEvaluation = exports.createEvaluation = exports.updateEvaluation = exports.getEvaluation = exports.getEvaluationPermissions = exports.submitToEvaluation = exports.createACL = exports.addFilesToDownloadListV2 = exports.createManifestFromDownloadListV2 = exports.createPackageFromDownloadListV2 = exports.addFileToDownloadListV2 = exports.getFileResult = exports.getFileHandleContent = exports.getFileHandleContentFromID = exports.startMultipartUpload = exports.checkUploadComplete = exports.uploadFile = exports.signOut = exports.detectSSOCode = exports.getPrincipalAliasRequest = exports.getUseUtcTimeFromCookie = exports.getAccessTokenFromCookie = exports.setAccessTokenCookie = exports.getStyleguideStack = exports.isInSynapseExperimentalMode = exports.getPresignedUrlForWikiAttachment = exports.getWikiAttachmentsFromEvaluation = exports.getWikiAttachmentsFromEntity = exports.getWikiPageKeyForAccessRequirement = exports.getWikiPageKeyForEntity = void 0;
5
- exports.registerAccountStep1 = exports.isAliasAvailable = exports.getNotificationEmail = exports.updateEntityJson = exports.getEntityJson = exports.hasAccessToEntity = exports.getValidationSchema = exports.getSchema = exports.getSchemaValidationResults = exports.getSchemaBinding = exports.updateSubmissionStatus = exports.getSubmissionById = exports.cancelDataAccessRequest = exports.submitDataAccessRequest = exports.updateDataAccessRequest = exports.getDataAccessRequestForUpdate = exports.getResearchProject = exports.updateResearchProject = exports.removeItemFromDownloadListV2 = exports.getDownloadListActionsRequired = exports.getDownloadListStatistics = exports.getAvailableFilesToDownload = exports.clearDownloadListV2 = exports.searchEntities = exports.getEntityVersions = exports.getEntityPath = exports.getUserProjects = exports.getMyProjects = exports.deletePersonalAccessToken = exports.getPersonalAccessTokenRecords = exports.createPersonalAccessToken = exports.getTransformSqlWithFacetsRequest = exports.updateTable = exports.deleteDownloadList = exports.deleteDownloadListFiles = exports.getAllOfPaginatedService = exports.getDownloadOrder = exports.getDownloadList = exports.postAccessApproval = exports.getAccessApproval = exports.getAllAccessRequirements = exports.getAccessRequirementStatus = exports.searchAccessRequirements = exports.getAccessRequirementAcl = exports.getAccessRequirementById = exports.getAccessRequirement = exports.getRestrictionInformation = exports.getProjectStatistics = exports.rejectFormData = exports.acceptFormData = void 0;
6
- exports.getProfilePicPreviewPresignedUrl = exports.getApprovedSubmissionInfo = exports.searchAccessSubmission = exports.searchAccessApprovals = exports.forumSearch = exports.getThreadMessageUrl = exports.getThread = exports.getReplyMessageUrl = exports.getReply = exports.updateNotificationEmail = exports.deleteEmail = exports.addEmailAddressStep2 = exports.addEmailAddressStep1 = exports.resetPassword = exports.changePasswordWithToken = exports.changePasswordWithCurrentPassword = exports.createProfileVerificationSubmission = exports.signSynapseTermsOfUse = exports.unbindOAuthProviderToAccount = exports.bindOAuthProviderToAccount = exports.oAuthRegisterAccountStep2 = exports.registerAccountStep2 = void 0;
4
+ exports.createFormData = exports.updateFormACL = exports.getFormACL = exports.createFormGroup = exports.consentToOAuth2Request = exports.getAuthenticatedOn = exports.createOAuthClientSecret = exports.updateOAuthClient = exports.deleteOAuthClient = exports.createOAuthClient = exports.getOAuth2 = exports.getOAuth2Client = exports.hasUserAuthorizedOAuthClient = exports.getOAuth2RequestDescription = exports.getEvaluationSubmissions = exports.deleteEvaluationRound = exports.updateEvaluationRound = exports.createEvaluationRound = exports.getEvaluationRoundsList = exports.getEvaluationRound = exports.deleteEvaluation = exports.createEvaluation = exports.updateEvaluation = exports.getEvaluation = exports.getEvaluationPermissions = exports.submitToEvaluation = exports.createACL = exports.addFilesToDownloadListV2 = exports.createManifestFromDownloadListV2 = exports.createPackageFromDownloadListV2 = exports.addFileToDownloadListV2 = exports.getFileResult = exports.getFileHandleContent = exports.getFileHandleContentFromID = exports.startMultipartUpload = exports.checkUploadComplete = exports.uploadFile = exports.signOut = exports.detectSSOCode = exports.getPrincipalAliasRequest = exports.getUseUtcTimeFromCookie = exports.getAccessTokenFromCookie = exports.setAccessTokenCookie = exports.getStyleguideStack = exports.isInSynapseExperimentalMode = exports.getPresignedUrlForWikiAttachment = exports.getWikiAttachmentsFromEvaluation = exports.getWikiAttachmentsFromEntity = exports.getWikiPageKeyForAccessRequirement = exports.getWikiPageKeyForEntity = void 0;
5
+ exports.hasAccessToEntity = exports.getValidationSchema = exports.getSchema = exports.getSchemaValidationResults = exports.getSchemaBinding = exports.updateSubmissionStatus = exports.getSubmissionById = exports.cancelDataAccessRequest = exports.submitDataAccessRequest = exports.updateDataAccessRequest = exports.getDataAccessRequestForUpdate = exports.getResearchProject = exports.updateResearchProject = exports.removeItemFromDownloadListV2 = exports.getDownloadListActionsRequired = exports.getDownloadListStatistics = exports.getAvailableFilesToDownload = exports.clearDownloadListV2 = exports.searchEntities = exports.getEntityVersions = exports.getEntityPath = exports.getUserProjects = exports.getMyProjects = exports.deletePersonalAccessToken = exports.getPersonalAccessTokenRecords = exports.createPersonalAccessToken = exports.getTransformSqlWithFacetsRequest = exports.updateTable = exports.deleteDownloadList = exports.deleteDownloadListFiles = exports.getAllOfPaginatedService = exports.getDownloadOrder = exports.getDownloadList = exports.postAccessApproval = exports.getAccessApproval = exports.getAllAccessRequirements = exports.getAccessRequirementStatus = exports.searchAccessRequirements = exports.getAccessRequirementAcl = exports.getAccessRequirementById = exports.getAccessRequirement = exports.getRestrictionInformation = exports.getProjectStatistics = exports.rejectFormData = exports.acceptFormData = exports.listFormDataAsFormAdmin = exports.listFormData = exports.submitFormData = exports.deleteFormData = exports.updateFormData = void 0;
6
+ exports.purgeFromTrashCan = exports.restoreFromTrashCan = exports.getItemsInTrashCan = exports.getProfilePicPreviewPresignedUrl = exports.getActivityForEntity = exports.getApprovedSubmissionInfo = exports.searchAccessSubmission = exports.searchAccessApprovals = exports.forumSearch = exports.getThreadMessageUrl = exports.getThread = exports.getReplyMessageUrl = exports.getReply = exports.updateNotificationEmail = exports.deleteEmail = exports.addEmailAddressStep2 = exports.addEmailAddressStep1 = exports.resetPassword = exports.changePasswordWithToken = exports.changePasswordWithCurrentPassword = exports.createProfileVerificationSubmission = exports.signSynapseTermsOfUse = exports.unbindOAuthProviderToAccount = exports.bindOAuthProviderToAccount = exports.oAuthRegisterAccountStep2 = exports.registerAccountStep2 = exports.registerAccountStep1 = exports.isAliasAvailable = exports.getNotificationEmail = exports.updateEntityJson = exports.getEntityJson = void 0;
7
7
  var tslib_1 = require("tslib");
8
8
  var spark_md5_1 = tslib_1.__importDefault(require("spark-md5"));
9
9
  var universal_cookie_1 = tslib_1.__importDefault(require("universal-cookie"));
@@ -146,85 +146,62 @@ var fetchWithExponentialTimeout = function (url, options, delayMs) {
146
146
  });
147
147
  });
148
148
  };
149
- var doPost = function (url, requestJsonObject, accessToken, initCredentials, endpoint, signal) {
150
- var options = {
151
- body: JSON.stringify(requestJsonObject),
152
- headers: {
149
+ var doPost = function (url, requestJsonObject, accessToken, endpoint, additionalOptions) {
150
+ if (additionalOptions === void 0) { additionalOptions = {}; }
151
+ var options = tslib_1.__assign({ body: JSON.stringify(requestJsonObject), headers: {
153
152
  Accept: '*/*',
154
153
  'Access-Control-Request-Headers': 'authorization',
155
154
  'Content-Type': 'application/json',
156
- },
157
- method: 'POST',
158
- mode: 'cors',
159
- credentials: initCredentials,
160
- signal: signal,
161
- };
155
+ }, method: 'POST', mode: 'cors' }, additionalOptions);
162
156
  if (accessToken) {
163
- // @ts-ignore
164
- options.headers.authorization = "Bearer ".concat(accessToken);
157
+ options.headers['authorization'] = "Bearer ".concat(accessToken);
165
158
  }
166
159
  var usedEndpoint = (0, getEndpoint_1.getEndpoint)(endpoint);
167
160
  return fetchWithExponentialTimeout(usedEndpoint + url, options);
168
161
  };
169
162
  exports.doPost = doPost;
170
- var doGet = function (url, accessToken, initCredentials, endpoint) {
171
- var options = {
172
- headers: {
163
+ var doGet = function (url, accessToken, endpoint, additionalOptions) {
164
+ if (additionalOptions === void 0) { additionalOptions = {}; }
165
+ var options = tslib_1.__assign({ headers: {
173
166
  Accept: '*/*',
174
167
  'Access-Control-Request-Headers': 'authorization',
175
- },
176
- method: 'GET',
177
- mode: 'cors',
178
- credentials: initCredentials,
179
- };
168
+ }, method: 'GET', mode: 'cors' }, additionalOptions);
180
169
  if (accessToken) {
181
- // @ts-ignore
182
- options.headers.authorization = "Bearer ".concat(accessToken);
170
+ options.headers['authorization'] = "Bearer ".concat(accessToken);
183
171
  }
184
172
  var usedEndpoint = (0, getEndpoint_1.getEndpoint)(endpoint);
185
173
  return fetchWithExponentialTimeout(usedEndpoint + url, options);
186
174
  };
187
175
  exports.doGet = doGet;
188
- var doDelete = function (url, accessToken, initCredentials, endpoint) {
189
- var options = {
190
- headers: {
176
+ var doDelete = function (url, accessToken, endpoint, additionalOptions) {
177
+ if (additionalOptions === void 0) { additionalOptions = {}; }
178
+ var options = tslib_1.__assign({ headers: {
191
179
  Accept: '*/*',
192
180
  'Access-Control-Request-Headers': 'authorization',
193
- },
194
- method: 'DELETE',
195
- mode: 'cors',
196
- credentials: initCredentials,
197
- };
181
+ }, method: 'DELETE', mode: 'cors' }, additionalOptions);
198
182
  if (accessToken) {
199
- // @ts-ignore
200
- options.headers.authorization = "Bearer ".concat(accessToken);
183
+ options.headers['authorization'] = "Bearer ".concat(accessToken);
201
184
  }
202
185
  var usedEndpoint = (0, getEndpoint_1.getEndpoint)(endpoint);
203
186
  return fetchWithExponentialTimeout(usedEndpoint + url, options);
204
187
  };
205
188
  exports.doDelete = doDelete;
206
- var doPut = function (url, requestJsonObject, accessToken, initCredentials, endpoint) {
207
- var options = {
208
- body: JSON.stringify(requestJsonObject),
209
- headers: {
189
+ var doPut = function (url, requestJsonObject, accessToken, endpoint, additionalOptions) {
190
+ if (additionalOptions === void 0) { additionalOptions = {}; }
191
+ var options = tslib_1.__assign({ body: JSON.stringify(requestJsonObject), headers: {
210
192
  Accept: '*/*',
211
193
  'Access-Control-Request-Headers': 'authorization',
212
194
  'Content-Type': 'application/json',
213
- },
214
- method: 'PUT',
215
- mode: 'cors',
216
- credentials: initCredentials,
217
- };
195
+ }, method: 'PUT', mode: 'cors' }, additionalOptions);
218
196
  if (accessToken) {
219
- // @ts-ignore
220
- options.headers.authorization = "Bearer ".concat(accessToken);
197
+ options.headers['authorization'] = "Bearer ".concat(accessToken);
221
198
  }
222
199
  var usedEndpoint = (0, getEndpoint_1.getEndpoint)(endpoint);
223
200
  return fetchWithExponentialTimeout(usedEndpoint + url, options);
224
201
  };
225
202
  exports.doPut = doPut;
226
203
  var getVersion = function () {
227
- return (0, exports.doGet)('/repo/v1/version', undefined, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
204
+ return (0, exports.doGet)('/repo/v1/version', undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
228
205
  };
229
206
  exports.getVersion = getVersion;
230
207
  /**
@@ -236,7 +213,7 @@ var getDownloadFromTableRequest = function (request, accessToken) {
236
213
  var asyncJobId;
237
214
  return tslib_1.__generator(this, function (_a) {
238
215
  switch (_a.label) {
239
- case 0: return [4 /*yield*/, (0, exports.doPost)("/repo/v1/entity/".concat(request.entityId, "/table/download/csv/async/start"), request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
216
+ case 0: return [4 /*yield*/, (0, exports.doPost)("/repo/v1/entity/".concat(request.entityId, "/table/download/csv/async/start"), request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
240
217
  case 1:
241
218
  asyncJobId = _a.sent();
242
219
  return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/entity/".concat(request.entityId, "/table/download/csv/async/get/").concat(asyncJobId.token), accessToken)];
@@ -253,7 +230,7 @@ exports.getDownloadFromTableRequest = getDownloadFromTableRequest;
253
230
  **/
254
231
  var getFileHandleById = function (handleId, accessToken) {
255
232
  if (accessToken === void 0) { accessToken = undefined; }
256
- return (0, exports.doGet)("/file/v1/fileHandle/".concat(handleId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
233
+ return (0, exports.doGet)("/file/v1/fileHandle/".concat(handleId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
257
234
  };
258
235
  exports.getFileHandleById = getFileHandleById;
259
236
  /**
@@ -265,7 +242,7 @@ var getActualFileHandleByIdURL = function (handleId, accessToken, fileAssociateT
265
242
  if (accessToken === void 0) { accessToken = undefined; }
266
243
  if (redirect === void 0) { redirect = true; }
267
244
  // get the presigned URL for this file handle association.
268
- return (0, exports.doGet)("/file/v1/file/".concat(handleId, "?fileAssociateType=").concat(fileAssociateType, "&fileAssociateId=").concat(fileAssociateId, "&redirect=").concat(redirect), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
245
+ return (0, exports.doGet)("/file/v1/file/".concat(handleId, "?fileAssociateType=").concat(fileAssociateType, "&fileAssociateId=").concat(fileAssociateId, "&redirect=").concat(redirect), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
269
246
  };
270
247
  exports.getActualFileHandleByIdURL = getActualFileHandleByIdURL;
271
248
  /**
@@ -276,7 +253,7 @@ exports.getActualFileHandleByIdURL = getActualFileHandleByIdURL;
276
253
  var getFileHandleByIdURL = function (handleId, accessToken) {
277
254
  if (accessToken === void 0) { accessToken = undefined; }
278
255
  // get the presigned URL for this file handle
279
- return (0, exports.doGet)("/file/v1/fileHandle/".concat(handleId, "/url?redirect=false"), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
256
+ return (0, exports.doGet)("/file/v1/fileHandle/".concat(handleId, "/url?redirect=false"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
280
257
  };
281
258
  exports.getFileHandleByIdURL = getFileHandleByIdURL;
282
259
  /**
@@ -291,7 +268,7 @@ var getAsyncResultFromJobId = function (asyncJobId, responseBodyEndpoint, access
291
268
  var response, failureResponse;
292
269
  return tslib_1.__generator(this, function (_a) {
293
270
  switch (_a.label) {
294
- case 0: return [4 /*yield*/, (0, exports.doGet)((0, APIConstants_1.ASYNCHRONOUS_JOB_TOKEN)(asyncJobId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
271
+ case 0: return [4 /*yield*/, (0, exports.doGet)((0, APIConstants_1.ASYNCHRONOUS_JOB_TOKEN)(asyncJobId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
295
272
  case 1:
296
273
  response = _a.sent();
297
274
  setCurrentAsyncStatus === null || setCurrentAsyncStatus === void 0 ? void 0 : setCurrentAsyncStatus(response);
@@ -301,14 +278,14 @@ var getAsyncResultFromJobId = function (asyncJobId, responseBodyEndpoint, access
301
278
  return [4 /*yield*/, delay(500)];
302
279
  case 3:
303
280
  _a.sent();
304
- return [4 /*yield*/, (0, exports.doGet)((0, APIConstants_1.ASYNCHRONOUS_JOB_TOKEN)(asyncJobId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
281
+ return [4 /*yield*/, (0, exports.doGet)((0, APIConstants_1.ASYNCHRONOUS_JOB_TOKEN)(asyncJobId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
305
282
  case 4:
306
283
  response = _a.sent();
307
284
  setCurrentAsyncStatus === null || setCurrentAsyncStatus === void 0 ? void 0 : setCurrentAsyncStatus(response);
308
285
  return [3 /*break*/, 2];
309
286
  case 5:
310
287
  if (!(response.jobState === 'FAILED')) return [3 /*break*/, 7];
311
- return [4 /*yield*/, (0, exports.doGet)(responseBodyEndpoint, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
288
+ return [4 /*yield*/, (0, exports.doGet)(responseBodyEndpoint, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
312
289
  case 6:
313
290
  failureResponse = _a.sent();
314
291
  console.warn('SynapseClient.getAsyncResultFromJobId should have thrown an error, but instead retrieved the following response:', failureResponse);
@@ -346,7 +323,7 @@ var getQueryTableAsyncJobResults = function (queryBundleRequest, accessToken, se
346
323
  var asyncJobId;
347
324
  return tslib_1.__generator(this, function (_a) {
348
325
  switch (_a.label) {
349
- case 0: return [4 /*yield*/, (0, exports.doPost)((0, APIConstants_1.TABLE_QUERY_ASYNC_START)(queryBundleRequest.entityId), queryBundleRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
326
+ case 0: return [4 /*yield*/, (0, exports.doPost)((0, APIConstants_1.TABLE_QUERY_ASYNC_START)(queryBundleRequest.entityId), queryBundleRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
350
327
  case 1:
351
328
  asyncJobId = _a.sent();
352
329
  return [2 /*return*/, (0, exports.getAsyncResultFromJobId)(asyncJobId.token, (0, APIConstants_1.TABLE_QUERY_ASYNC_GET)(queryBundleRequest.entityId, asyncJobId.token), accessToken, setCurrentAsyncStatus)];
@@ -364,7 +341,7 @@ var getQueryTableResults = function (queryBundleRequest, accessToken) { return t
364
341
  var asyncJobId;
365
342
  return tslib_1.__generator(this, function (_a) {
366
343
  switch (_a.label) {
367
- case 0: return [4 /*yield*/, (0, exports.doPost)("/repo/v1/entity/".concat(queryBundleRequest.entityId, "/table/query/async/start"), queryBundleRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
344
+ case 0: return [4 /*yield*/, (0, exports.doPost)("/repo/v1/entity/".concat(queryBundleRequest.entityId, "/table/query/async/start"), queryBundleRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
368
345
  case 1:
369
346
  asyncJobId = _a.sent();
370
347
  return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/entity/".concat(queryBundleRequest.entityId, "/table/query/async/get/").concat(asyncJobId.token), accessToken)];
@@ -432,7 +409,7 @@ exports.getFullQueryTableResults = getFullQueryTableResults;
432
409
  */
433
410
  var login = function (username, password, authenticationReceipt, endpoint) {
434
411
  if (endpoint === void 0) { endpoint = getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT; }
435
- return (0, exports.doPost)('/auth/v1/login2', { username: username, password: password, authenticationReceipt: authenticationReceipt }, undefined, undefined, endpoint);
412
+ return (0, exports.doPost)('/auth/v1/login2', { username: username, password: password, authenticationReceipt: authenticationReceipt }, undefined, endpoint);
436
413
  };
437
414
  exports.login = login;
438
415
  /**
@@ -444,7 +421,7 @@ exports.login = login;
444
421
  */
445
422
  var oAuthUrlRequest = function (provider, redirectUrl, state, endpoint) {
446
423
  if (endpoint === void 0) { endpoint = getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT; }
447
- return (0, exports.doPost)('/auth/v1/oauth2/authurl', { provider: provider, redirectUrl: redirectUrl, state: state }, undefined, undefined, endpoint);
424
+ return (0, exports.doPost)('/auth/v1/oauth2/authurl', { provider: provider, redirectUrl: redirectUrl, state: state }, undefined, endpoint);
448
425
  };
449
426
  exports.oAuthUrlRequest = oAuthUrlRequest;
450
427
  /**
@@ -457,7 +434,7 @@ exports.oAuthUrlRequest = oAuthUrlRequest;
457
434
  */
458
435
  var oAuthSessionRequest = function (provider, authenticationCode, redirectUrl, endpoint) {
459
436
  if (endpoint === void 0) { endpoint = getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT; }
460
- return (0, exports.doPost)('/auth/v1/oauth2/session2', { provider: provider, authenticationCode: authenticationCode, redirectUrl: redirectUrl }, undefined, undefined, endpoint);
437
+ return (0, exports.doPost)('/auth/v1/oauth2/session2', { provider: provider, authenticationCode: authenticationCode, redirectUrl: redirectUrl }, undefined, endpoint);
461
438
  };
462
439
  exports.oAuthSessionRequest = oAuthSessionRequest;
463
440
  /**
@@ -465,7 +442,7 @@ exports.oAuthSessionRequest = oAuthSessionRequest;
465
442
  * https://rest-docs.synapse.org/rest/POST/entity.html
466
443
  */
467
444
  var createEntity = function (entity, accessToken) {
468
- return (0, exports.doPost)(APIConstants_1.ENTITY, entity, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
445
+ return (0, exports.doPost)(APIConstants_1.ENTITY, entity, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
469
446
  };
470
447
  exports.createEntity = createEntity;
471
448
  /**
@@ -484,7 +461,7 @@ exports.createProject = createProject;
484
461
  * https://rest-docs.synapse.org/rest/GET/userProfile.html
485
462
  */
486
463
  var getUserProfile = function (accessToken) {
487
- return (0, exports.doGet)(APIConstants_1.USER_PROFILE, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
464
+ return (0, exports.doGet)(APIConstants_1.USER_PROFILE, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
488
465
  };
489
466
  exports.getUserProfile = getUserProfile;
490
467
  /**
@@ -492,7 +469,7 @@ exports.getUserProfile = getUserProfile;
492
469
  * https://rest-docs.synapse.org/rest/GET/userProfile.html
493
470
  */
494
471
  var getUserProfileById = function (accessToken, ownerId) {
495
- return (0, exports.doGet)((0, APIConstants_1.USER_PROFILE_ID)(ownerId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
472
+ return (0, exports.doGet)((0, APIConstants_1.USER_PROFILE_ID)(ownerId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
496
473
  };
497
474
  exports.getUserProfileById = getUserProfileById;
498
475
  /**
@@ -500,7 +477,7 @@ exports.getUserProfileById = getUserProfileById;
500
477
  * https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/UserBundle.html
501
478
  */
502
479
  var getUserBundle = function (id, mask, accessToken) {
503
- return (0, exports.doGet)("".concat((0, APIConstants_1.USER_ID_BUNDLE)(id), "?mask=").concat(mask), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
480
+ return (0, exports.doGet)("".concat((0, APIConstants_1.USER_ID_BUNDLE)(id), "?mask=").concat(mask), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
504
481
  };
505
482
  exports.getUserBundle = getUserBundle;
506
483
  /**
@@ -508,7 +485,7 @@ exports.getUserBundle = getUserBundle;
508
485
  * http://rest-docs.synapse.org/rest/GET/user/bundle.html
509
486
  */
510
487
  var getMyUserBundle = function (mask, accessToken) {
511
- return (0, exports.doGet)("".concat(APIConstants_1.USER_BUNDLE, "?mask=").concat(mask), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
488
+ return (0, exports.doGet)("".concat(APIConstants_1.USER_BUNDLE, "?mask=").concat(mask), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
512
489
  };
513
490
  exports.getMyUserBundle = getMyUserBundle;
514
491
  /**
@@ -520,7 +497,7 @@ exports.getMyUserBundle = getMyUserBundle;
520
497
  var updateMyUserProfile = function (profile, accessToken) {
521
498
  if (accessToken === void 0) { accessToken = undefined; }
522
499
  var url = '/repo/v1/userProfile';
523
- return (0, exports.doPut)(url, profile, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
500
+ return (0, exports.doPut)(url, profile, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
524
501
  };
525
502
  exports.updateMyUserProfile = updateMyUserProfile;
526
503
  /**
@@ -533,7 +510,7 @@ var getUserGroupHeaders = function (prefix, typeFilter, offset, limit) {
533
510
  if (offset === void 0) { offset = 0; }
534
511
  if (limit === void 0) { limit = 20; }
535
512
  return (0, exports.doGet)(APIConstants_1.USER_GROUP_HEADERS +
536
- "?prefix=".concat(prefix, "&typeFilter=").concat(typeFilter, "&offset=").concat(offset, "&limit=").concat(limit), undefined, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
513
+ "?prefix=".concat(prefix, "&typeFilter=").concat(typeFilter, "&offset=").concat(offset, "&limit=").concat(limit), undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
537
514
  };
538
515
  exports.getUserGroupHeaders = getUserGroupHeaders;
539
516
  /**
@@ -541,7 +518,7 @@ exports.getUserGroupHeaders = getUserGroupHeaders;
541
518
  * https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/UserGroupHeaderResponsePage.html
542
519
  */
543
520
  var getGroupHeadersBatch = function (ids, accessToken) {
544
- return (0, exports.doGet)(APIConstants_1.USER_GROUP_HEADERS_BATCH + "?ids=".concat(ids.join(',')), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
521
+ return (0, exports.doGet)(APIConstants_1.USER_GROUP_HEADERS_BATCH + "?ids=".concat(ids.join(',')), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
545
522
  };
546
523
  exports.getGroupHeadersBatch = getGroupHeadersBatch;
547
524
  /**
@@ -550,7 +527,7 @@ exports.getGroupHeadersBatch = getGroupHeadersBatch;
550
527
  */
551
528
  var getUserProfiles = function (list, accessToken) {
552
529
  if (accessToken === void 0) { accessToken = undefined; }
553
- return (0, exports.doPost)(APIConstants_1.USER_PROFILE, { list: list }, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
530
+ return (0, exports.doPost)(APIConstants_1.USER_PROFILE, { list: list }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
554
531
  };
555
532
  exports.getUserProfiles = getUserProfiles;
556
533
  /**
@@ -559,7 +536,7 @@ exports.getUserProfiles = getUserProfiles;
559
536
  */
560
537
  var getEntityChildren = function (request, accessToken, signal) {
561
538
  if (accessToken === void 0) { accessToken = undefined; }
562
- return (0, exports.doPost)('/repo/v1/entity/children', request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT, signal);
539
+ return (0, exports.doPost)('/repo/v1/entity/children', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT, { signal: signal });
563
540
  };
564
541
  exports.getEntityChildren = getEntityChildren;
565
542
  /**
@@ -568,7 +545,7 @@ exports.getEntityChildren = getEntityChildren;
568
545
  */
569
546
  var lookupChildEntity = function (request, accessToken) {
570
547
  if (accessToken === void 0) { accessToken = undefined; }
571
- return (0, exports.doPost)('/repo/v1/entity/child', request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
548
+ return (0, exports.doPost)('/repo/v1/entity/child', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
572
549
  };
573
550
  exports.lookupChildEntity = lookupChildEntity;
574
551
  /**
@@ -577,7 +554,7 @@ exports.lookupChildEntity = lookupChildEntity;
577
554
  */
578
555
  var getFiles = function (request, accessToken) {
579
556
  if (accessToken === void 0) { accessToken = undefined; }
580
- return (0, exports.doPost)('/file/v1/fileHandle/batch', request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
557
+ return (0, exports.doPost)('/file/v1/fileHandle/batch', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
581
558
  };
582
559
  exports.getFiles = getFiles;
583
560
  /**
@@ -590,7 +567,7 @@ var getBulkFiles = function (bulkFileDownloadRequest, accessToken) {
590
567
  var asyncJobId;
591
568
  return tslib_1.__generator(this, function (_a) {
592
569
  switch (_a.label) {
593
- case 0: return [4 /*yield*/, (0, exports.doPost)('/file/v1/file/bulk/async/start', bulkFileDownloadRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
570
+ case 0: return [4 /*yield*/, (0, exports.doPost)('/file/v1/file/bulk/async/start', bulkFileDownloadRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
594
571
  case 1:
595
572
  asyncJobId = _a.sent();
596
573
  return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/file/v1/file/bulk/async/get/".concat(asyncJobId.token), accessToken)];
@@ -617,15 +594,11 @@ var getEntity = function (accessToken, entityId, versionNumber) {
617
594
  var url = versionNumber
618
595
  ? "/repo/v1/entity/".concat(entityId, "/version/").concat(versionNumber)
619
596
  : "/repo/v1/entity/".concat(entityId);
620
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
597
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
621
598
  };
622
599
  exports.getEntity = getEntity;
623
- /**
624
- * Get a list of entity headers given by entity ids
625
- * http://rest-docs.synapse.org/rest/GET/entity/type.html
626
- */
627
600
  var getEntityHeadersByIds = function (entityIds, accessToken) {
628
- return (0, exports.doGet)("/repo/v1/entity/type?batch=".concat(entityIds.join(',')), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
601
+ return (0, exports.getEntityHeaders)(entityIds.map(function (id) { return ({ targetId: id }); }), accessToken);
629
602
  };
630
603
  exports.getEntityHeadersByIds = getEntityHeadersByIds;
631
604
  /**
@@ -646,7 +619,7 @@ var getEntityHeaders = function (references, accessToken) {
646
619
  else
647
620
  return reference;
648
621
  });
649
- return (0, exports.doPost)(APIConstants_1.ENTITY_HEADERS, { references: fixedReferences }, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
622
+ return (0, exports.doPost)(APIConstants_1.ENTITY_HEADERS, { references: fixedReferences }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
650
623
  };
651
624
  exports.getEntityHeaders = getEntityHeaders;
652
625
  /**
@@ -654,22 +627,22 @@ exports.getEntityHeaders = getEntityHeaders;
654
627
  * https://rest-docs.synapse.org/rest/GET/entity/id/type.html
655
628
  */
656
629
  var getEntityHeader = function (entityId, accessToken) {
657
- return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/type"), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
630
+ return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/type"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
658
631
  };
659
632
  exports.getEntityHeader = getEntityHeader;
660
633
  var updateEntity = function (entity, accessToken) {
661
634
  if (accessToken === void 0) { accessToken = undefined; }
662
635
  var url = "/repo/v1/entity/".concat(entity.id);
663
- return (0, exports.doPut)(url, entity, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
636
+ return (0, exports.doPut)(url, entity, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
664
637
  };
665
638
  exports.updateEntity = updateEntity;
666
639
  var deleteEntity = function (accessToken, entityId) {
667
640
  if (accessToken === void 0) { accessToken = undefined; }
668
- return (0, exports.doDelete)((0, APIConstants_1.ENTITY_ID)(entityId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
641
+ return (0, exports.doDelete)((0, APIConstants_1.ENTITY_ID)(entityId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
669
642
  };
670
643
  exports.deleteEntity = deleteEntity;
671
644
  var getEntityBundleV2 = function (entityId, requestObject, version, accessToken) {
672
- return (0, exports.doPost)((0, APIConstants_1.ENTITY_BUNDLE_V2)(entityId, version), requestObject, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
645
+ return (0, exports.doPost)((0, APIConstants_1.ENTITY_BUNDLE_V2)(entityId, version), requestObject, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
673
646
  };
674
647
  exports.getEntityBundleV2 = getEntityBundleV2;
675
648
  /**
@@ -687,7 +660,7 @@ var getEntityWiki = function (accessToken, ownerId, wikiId, objectType) {
687
660
  if (objectType === void 0) { objectType = synapseTypes_1.ObjectType.ENTITY; }
688
661
  var objectTypeString = getObjectTypeToString(objectType);
689
662
  var url = "/repo/v1/".concat(objectTypeString === null || objectTypeString === void 0 ? void 0 : objectTypeString.toLocaleLowerCase(), "/").concat(ownerId, "/wiki/").concat(wikiId);
690
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
663
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
691
664
  };
692
665
  exports.getEntityWiki = getEntityWiki;
693
666
  /**
@@ -699,7 +672,7 @@ var getUserFavorites = function (accessToken, offset, limit) {
699
672
  if (limit === void 0) { limit = 200; }
700
673
  // https://sagebionetworks.jira.com/browse/PLFM-6616
701
674
  var url = "".concat(APIConstants_1.FAVORITES, "?offset=").concat(offset, "&limit=").concat(limit);
702
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
675
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
703
676
  };
704
677
  exports.getUserFavorites = getUserFavorites;
705
678
  /**
@@ -707,7 +680,7 @@ exports.getUserFavorites = getUserFavorites;
707
680
  * http://rest-docs.synapse.org/rest/DELETE/favorite/id.html
708
681
  */
709
682
  var removeUserFavorite = function (entityId, accessToken) {
710
- return (0, exports.doDelete)("/repo/v1/favorite/".concat(entityId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
683
+ return (0, exports.doDelete)("/repo/v1/favorite/".concat(entityId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
711
684
  };
712
685
  exports.removeUserFavorite = removeUserFavorite;
713
686
  /**
@@ -718,7 +691,7 @@ var getUserChallenges = function (accessToken, userId, offset, limit) {
718
691
  if (offset === void 0) { offset = 0; }
719
692
  if (limit === void 0) { limit = 200; }
720
693
  var url = "/repo/v1/challenge?participantId=".concat(userId, "&offset=").concat(offset, "&limit=").concat(limit);
721
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
694
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
722
695
  };
723
696
  exports.getUserChallenges = getUserChallenges;
724
697
  /**
@@ -730,7 +703,7 @@ var getUserTeamList = function (accessToken, userId, offset, limit) {
730
703
  if (offset === void 0) { offset = 0; }
731
704
  if (limit === void 0) { limit = 200; }
732
705
  var url = "/repo/v1/user/".concat(userId, "/team?offset=").concat(offset, "&limit=").concat(limit);
733
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
706
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
734
707
  };
735
708
  exports.getUserTeamList = getUserTeamList;
736
709
  /**
@@ -747,7 +720,7 @@ var getTeamList = function (accessToken, id, fragment, limit, offset) {
747
720
  if (limit === void 0) { limit = 10; }
748
721
  if (offset === void 0) { offset = 0; }
749
722
  var url = "/repo/v1/teamMembers/".concat(id, "?limit=").concat(limit, "&offset=").concat(offset).concat(fragment ? "&fragment=".concat(fragment) : '');
750
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
723
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
751
724
  };
752
725
  exports.getTeamList = getTeamList;
753
726
  /**
@@ -758,7 +731,7 @@ exports.getTeamList = getTeamList;
758
731
  **/
759
732
  var getWikiPageKeyForEntity = function (accessToken, ownerId) {
760
733
  var url = "/repo/v1/entity/".concat(ownerId, "/wikikey");
761
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
734
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
762
735
  };
763
736
  exports.getWikiPageKeyForEntity = getWikiPageKeyForEntity;
764
737
  /**
@@ -769,26 +742,26 @@ exports.getWikiPageKeyForEntity = getWikiPageKeyForEntity;
769
742
  **/
770
743
  var getWikiPageKeyForAccessRequirement = function (accessToken, ownerId) {
771
744
  var url = (0, APIConstants_1.ACCESS_REQUIREMENT_WIKI_PAGE_KEY)(ownerId);
772
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
745
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
773
746
  };
774
747
  exports.getWikiPageKeyForAccessRequirement = getWikiPageKeyForAccessRequirement;
775
748
  var getWikiAttachmentsFromEntity = function (accessToken, id, wikiId, objectType) {
776
749
  if (objectType === void 0) { objectType = synapseTypes_1.ObjectType.ENTITY; }
777
750
  var objectTypeString = getObjectTypeToString(objectType);
778
751
  var url = "/repo/v1/".concat(objectTypeString.toLocaleLowerCase(), "/").concat(id, "/wiki2/").concat(wikiId, "/attachmenthandles");
779
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
752
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
780
753
  };
781
754
  exports.getWikiAttachmentsFromEntity = getWikiAttachmentsFromEntity;
782
755
  var getWikiAttachmentsFromEvaluation = function (accessToken, id, wikiId) {
783
756
  var url = "/repo/v1/evaluation/".concat(id, "/wiki/").concat(wikiId, "/attachmenthandles");
784
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
757
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
785
758
  };
786
759
  exports.getWikiAttachmentsFromEvaluation = getWikiAttachmentsFromEvaluation;
787
760
  var getPresignedUrlForWikiAttachment = function (accessToken, id, wikiId, fileName, objectType) {
788
761
  if (objectType === void 0) { objectType = synapseTypes_1.ObjectType.ENTITY; }
789
762
  var objectTypeString = getObjectTypeToString(objectType);
790
763
  var url = "/repo/v1/".concat(objectTypeString.toLocaleLowerCase(), "/").concat(id, "/wiki2/").concat(wikiId, "/attachment?fileName=").concat(fileName, "&redirect=false");
791
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
764
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
792
765
  };
793
766
  exports.getPresignedUrlForWikiAttachment = getPresignedUrlForWikiAttachment;
794
767
  var isInSynapseExperimentalMode = function () {
@@ -831,16 +804,15 @@ var setAccessTokenCookie = function (token, sessionCallback) { return tslib_1.__
831
804
  case 3:
832
805
  sessionCallback();
833
806
  return [3 /*break*/, 5];
834
- case 4:
835
- // will set cookie in the http header
836
- (0, exports.doPost)('Portal/sessioncookie', { sessionToken: token }, undefined, 'include', getEndpoint_1.BackendDestinationEnum.PORTAL_ENDPOINT)
807
+ case 4:
808
+ // will set cookie in the http header
809
+ return [2 /*return*/, (0, exports.doPost)('Portal/sessioncookie', { sessionToken: token }, undefined, getEndpoint_1.BackendDestinationEnum.PORTAL_ENDPOINT, { credentials: 'include' })
837
810
  .then(function (_) {
838
811
  sessionCallback();
839
812
  })
840
813
  .catch(function (err) {
841
814
  console.error('Error on setting access token ', err);
842
- });
843
- _a.label = 5;
815
+ })];
844
816
  case 5: return [2 /*return*/];
845
817
  }
846
818
  });
@@ -853,9 +825,9 @@ exports.setAccessTokenCookie = setAccessTokenCookie;
853
825
  var getAccessTokenFromCookie = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
854
826
  return tslib_1.__generator(this, function (_a) {
855
827
  if (exports.IS_OUTSIDE_SYNAPSE_ORG) {
856
- return [2 /*return*/, cookies.get(exports.ACCESS_TOKEN_COOKIE_KEY)];
828
+ return [2 /*return*/, Promise.resolve(cookies.get(exports.ACCESS_TOKEN_COOKIE_KEY))];
857
829
  }
858
- return [2 /*return*/, (0, exports.doGet)('Portal/sessioncookie?validate=true', undefined, 'include', getEndpoint_1.BackendDestinationEnum.PORTAL_ENDPOINT)];
830
+ return [2 /*return*/, (0, exports.doGet)('Portal/sessioncookie?validate=true', undefined, getEndpoint_1.BackendDestinationEnum.PORTAL_ENDPOINT, { credentials: 'include' })];
859
831
  });
860
832
  }); };
861
833
  exports.getAccessTokenFromCookie = getAccessTokenFromCookie;
@@ -865,7 +837,7 @@ var getUseUtcTimeFromCookie = function () {
865
837
  exports.getUseUtcTimeFromCookie = getUseUtcTimeFromCookie;
866
838
  var getPrincipalAliasRequest = function (accessToken, alias, type) {
867
839
  var url = '/repo/v1/principal/alias';
868
- return (0, exports.doPost)(url, { alias: alias, type: type }, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
840
+ return (0, exports.doPost)(url, { alias: alias, type: type }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
869
841
  };
870
842
  exports.getPrincipalAliasRequest = getPrincipalAliasRequest;
871
843
  /*
@@ -1017,7 +989,7 @@ var processFilePart = function (partNumber, multipartUploadStatus, accessToken,
1017
989
  partNumbers: [partNumber],
1018
990
  };
1019
991
  var presignedUrlUrl = "/file/v1/file/multipart/".concat(uploadId, "/presigned/url/batch");
1020
- (0, exports.doPost)(presignedUrlUrl, presignedUploadUrlRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (presignedUrlResponse) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
992
+ (0, exports.doPost)(presignedUrlUrl, presignedUploadUrlRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (presignedUrlResponse) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
1021
993
  var presignedUrl, startByte, endByte, fileSlice;
1022
994
  return tslib_1.__generator(this, function (_a) {
1023
995
  switch (_a.label) {
@@ -1037,7 +1009,7 @@ var processFilePart = function (partNumber, multipartUploadStatus, accessToken,
1037
1009
  // uploaded the part. calculate md5 of the part and add the part to the upload
1038
1010
  calculateMd5(fileSlice).then(function (md5) {
1039
1011
  var addPartUrl = "/file/v1/file/multipart/".concat(uploadId, "/add/").concat(partNumber, "?partMD5Hex=").concat(md5);
1040
- (0, exports.doPut)(addPartUrl, undefined, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (addPartResponse) {
1012
+ (0, exports.doPut)(addPartUrl, undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (addPartResponse) {
1041
1013
  if (addPartResponse.addPartState === 'ADD_SUCCESS') {
1042
1014
  // done with this part!
1043
1015
  multipartUploadStatus.clientSidePartsState[partNumber - 1] = true;
@@ -1062,7 +1034,7 @@ var checkUploadComplete = function (status, fileHandleName, accessToken, fileUpl
1062
1034
  return v;
1063
1035
  })) {
1064
1036
  var url = "/file/v1/file/multipart/".concat(status.uploadId, "/complete");
1065
- (0, exports.doPut)(url, undefined, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)
1037
+ (0, exports.doPut)(url, undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)
1066
1038
  .then(function (newStatus) {
1067
1039
  // success!
1068
1040
  fileUploadResolve({
@@ -1101,7 +1073,7 @@ var uploadFilePart = function (presignedUrl, file, contentType) { return tslib_1
1101
1073
  }); };
1102
1074
  var startMultipartUpload = function (accessToken, fileName, file, request, fileUploadResolve, fileUploadReject) {
1103
1075
  var url = '/file/v1/file/multipart';
1104
- (0, exports.doPost)(url, request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)
1076
+ (0, exports.doPost)(url, request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)
1105
1077
  .then(function (status) {
1106
1078
  // started the upload
1107
1079
  // keep track of the part state client-side
@@ -1215,7 +1187,7 @@ var addFileToDownloadListV2 = function (fileEntityId, versionNumber, accessToken
1215
1187
  var request = {
1216
1188
  batchToAdd: [{ fileEntityId: fileEntityId, versionNumber: versionNumber }],
1217
1189
  };
1218
- return (0, exports.doPost)('/repo/v1/download/list/add', request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1190
+ return (0, exports.doPost)('/repo/v1/download/list/add', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1219
1191
  };
1220
1192
  exports.addFileToDownloadListV2 = addFileToDownloadListV2;
1221
1193
  /**
@@ -1231,7 +1203,7 @@ var createPackageFromDownloadListV2 = function (zipFileName, accessToken) { retu
1231
1203
  includeManifest: true,
1232
1204
  concreteType: 'org.sagebionetworks.repo.model.download.DownloadListPackageRequest',
1233
1205
  };
1234
- return [4 /*yield*/, (0, exports.doPost)("/repo/v1/download/list/package/async/start", request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1206
+ return [4 /*yield*/, (0, exports.doPost)("/repo/v1/download/list/package/async/start", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1235
1207
  case 1:
1236
1208
  asyncJobId = _a.sent();
1237
1209
  return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/download/list/package/async/get/".concat(asyncJobId.token), accessToken)];
@@ -1253,7 +1225,7 @@ var createManifestFromDownloadListV2 = function (accessToken) {
1253
1225
  csvTableDescriptor: {},
1254
1226
  concreteType: 'org.sagebionetworks.repo.model.download.DownloadListManifestRequest',
1255
1227
  };
1256
- return [4 /*yield*/, (0, exports.doPost)("/repo/v1/download/list/manifest/async/start", request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1228
+ return [4 /*yield*/, (0, exports.doPost)("/repo/v1/download/list/manifest/async/start", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1257
1229
  case 1:
1258
1230
  asyncJobId = _a.sent();
1259
1231
  return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/download/list/manifest/async/get/".concat(asyncJobId.token), accessToken)];
@@ -1272,7 +1244,7 @@ var addFilesToDownloadListV2 = function (request, accessToken) {
1272
1244
  var asyncJobId;
1273
1245
  return tslib_1.__generator(this, function (_a) {
1274
1246
  switch (_a.label) {
1275
- case 0: return [4 /*yield*/, (0, exports.doPost)('/repo/v1/download/list/add/async/start', request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1247
+ case 0: return [4 /*yield*/, (0, exports.doPost)('/repo/v1/download/list/add/async/start', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1276
1248
  case 1:
1277
1249
  asyncJobId = _a.sent();
1278
1250
  return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/download/list/add/async/get/".concat(asyncJobId.token), accessToken)];
@@ -1286,7 +1258,7 @@ exports.addFilesToDownloadListV2 = addFilesToDownloadListV2;
1286
1258
  * https://rest-docs.synapse.org/rest/POST/entity/id/acl.html
1287
1259
  */
1288
1260
  var createACL = function (entityId, acl, accessToken) {
1289
- return (0, exports.doPost)("/repo/v1/entity/".concat(entityId, "/acl"), acl, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1261
+ return (0, exports.doPost)("/repo/v1/entity/".concat(entityId, "/acl"), acl, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1290
1262
  };
1291
1263
  exports.createACL = createACL;
1292
1264
  /**
@@ -1294,11 +1266,11 @@ exports.createACL = createACL;
1294
1266
  * https://rest-docs.synapse.org/rest/POST/evaluation/submission.html
1295
1267
  */
1296
1268
  var submitToEvaluation = function (submission, etag, accessToken) {
1297
- return (0, exports.doPost)("/repo/v1/evaluation/submission?etag=".concat(etag), submission, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1269
+ return (0, exports.doPost)("/repo/v1/evaluation/submission?etag=".concat(etag), submission, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1298
1270
  };
1299
1271
  exports.submitToEvaluation = submitToEvaluation;
1300
1272
  var getEvaluationPermissions = function (evalId, accessToken) {
1301
- return (0, exports.doGet)("/repo/v1/evaluation/".concat(evalId, "/permissions"), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1273
+ return (0, exports.doGet)("/repo/v1/evaluation/".concat(evalId, "/permissions"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1302
1274
  };
1303
1275
  exports.getEvaluationPermissions = getEvaluationPermissions;
1304
1276
  /**
@@ -1311,7 +1283,7 @@ var getEvaluation = function (evalId, accessToken) {
1311
1283
  // without an evalId is a valid API that returns a different API response
1312
1284
  return Promise.reject(new Error('evalId is empty'));
1313
1285
  }
1314
- return (0, exports.doGet)("/repo/v1/evaluation/".concat(evalId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1286
+ return (0, exports.doGet)((0, APIConstants_1.EVALUATION_BY_ID)(evalId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1315
1287
  };
1316
1288
  exports.getEvaluation = getEvaluation;
1317
1289
  /**
@@ -1324,7 +1296,7 @@ var updateEvaluation = function (evaluation, accessToken) {
1324
1296
  // without an evalId is a valid API that returns a different API response
1325
1297
  return Promise.reject(new Error('evaluation does not have an ID'));
1326
1298
  }
1327
- return (0, exports.doPut)("/repo/v1/evaluation/".concat(evaluation.id), evaluation, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1299
+ return (0, exports.doPut)((0, APIConstants_1.EVALUATION_BY_ID)(evaluation.id), evaluation, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1328
1300
  };
1329
1301
  exports.updateEvaluation = updateEvaluation;
1330
1302
  /**
@@ -1332,7 +1304,7 @@ exports.updateEvaluation = updateEvaluation;
1332
1304
  * https://rest-docs.synapse.org/rest/POST/evaluation.html
1333
1305
  */
1334
1306
  var createEvaluation = function (evaluation, accessToken) {
1335
- return (0, exports.doPost)('/repo/v1/evaluation/', evaluation, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1307
+ return (0, exports.doPost)(APIConstants_1.EVALUATION, evaluation, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1336
1308
  };
1337
1309
  exports.createEvaluation = createEvaluation;
1338
1310
  /**
@@ -1340,7 +1312,7 @@ exports.createEvaluation = createEvaluation;
1340
1312
  * https://rest-docs.synapse.org/rest/PUT/evaluation/evalId.html
1341
1313
  */
1342
1314
  var deleteEvaluation = function (evalId, accessToken) {
1343
- return (0, exports.doDelete)("/repo/v1/evaluation/".concat(evalId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1315
+ return (0, exports.doDelete)("/repo/v1/evaluation/".concat(evalId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1344
1316
  };
1345
1317
  exports.deleteEvaluation = deleteEvaluation;
1346
1318
  /**
@@ -1348,7 +1320,7 @@ exports.deleteEvaluation = deleteEvaluation;
1348
1320
  * https://rest-docs.synapse.org/rest/GET/evaluation/evalId/round/evalRoundId.html
1349
1321
  */
1350
1322
  var getEvaluationRound = function (evalId, evalRoundId, accessToken) {
1351
- return (0, exports.doGet)("/repo/v1/evaluation/".concat(evalId, "/round/").concat(evalRoundId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1323
+ return (0, exports.doGet)("/repo/v1/evaluation/".concat(evalId, "/round/").concat(evalRoundId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1352
1324
  };
1353
1325
  exports.getEvaluationRound = getEvaluationRound;
1354
1326
  /**
@@ -1356,7 +1328,7 @@ exports.getEvaluationRound = getEvaluationRound;
1356
1328
  * https://rest-docs.synapse.org/rest/GET/evaluation/evalId/round/list.html
1357
1329
  */
1358
1330
  var getEvaluationRoundsList = function (evalId, evaluationRoundListRequest, accessToken) {
1359
- return (0, exports.doPost)("/repo/v1/evaluation/".concat(evalId, "/round/list"), evaluationRoundListRequest !== null && evaluationRoundListRequest !== void 0 ? evaluationRoundListRequest : {}, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1331
+ return (0, exports.doPost)("/repo/v1/evaluation/".concat(evalId, "/round/list"), evaluationRoundListRequest !== null && evaluationRoundListRequest !== void 0 ? evaluationRoundListRequest : {}, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1360
1332
  };
1361
1333
  exports.getEvaluationRoundsList = getEvaluationRoundsList;
1362
1334
  /**
@@ -1364,7 +1336,7 @@ exports.getEvaluationRoundsList = getEvaluationRoundsList;
1364
1336
  * https://rest-docs.synapse.org/rest/POST/evaluation/evalId/round/evalRoundId.html
1365
1337
  */
1366
1338
  var createEvaluationRound = function (evaluationRound, accessToken) {
1367
- return (0, exports.doPost)("/repo/v1/evaluation/".concat(evaluationRound.evaluationId, "/round"), evaluationRound, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1339
+ return (0, exports.doPost)("/repo/v1/evaluation/".concat(evaluationRound.evaluationId, "/round"), evaluationRound, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1368
1340
  };
1369
1341
  exports.createEvaluationRound = createEvaluationRound;
1370
1342
  /**
@@ -1372,7 +1344,7 @@ exports.createEvaluationRound = createEvaluationRound;
1372
1344
  * https://rest-docs.synapse.org/rest/PUT/evaluation/evalId/round/evalRoundId.html
1373
1345
  */
1374
1346
  var updateEvaluationRound = function (evaluationRound, accessToken) {
1375
- return (0, exports.doPut)("/repo/v1/evaluation/".concat(evaluationRound.evaluationId, "/round/").concat(evaluationRound.id), evaluationRound, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1347
+ return (0, exports.doPut)("/repo/v1/evaluation/".concat(evaluationRound.evaluationId, "/round/").concat(evaluationRound.id), evaluationRound, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1376
1348
  };
1377
1349
  exports.updateEvaluationRound = updateEvaluationRound;
1378
1350
  /**
@@ -1380,7 +1352,7 @@ exports.updateEvaluationRound = updateEvaluationRound;
1380
1352
  * https://rest-docs.synapse.org/rest/DELETE/evaluation/evalId/round/evalRoundId.html
1381
1353
  */
1382
1354
  var deleteEvaluationRound = function (evalId, evalRoundId, accessToken) {
1383
- return (0, exports.doDelete)("/repo/v1/evaluation/".concat(evalId, "/round/").concat(evalRoundId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1355
+ return (0, exports.doDelete)("/repo/v1/evaluation/".concat(evalId, "/round/").concat(evalRoundId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1384
1356
  };
1385
1357
  exports.deleteEvaluationRound = deleteEvaluationRound;
1386
1358
  /**
@@ -1388,7 +1360,7 @@ exports.deleteEvaluationRound = deleteEvaluationRound;
1388
1360
  * https://rest-docs.synapse.org/rest/GET/evaluation/submission/query.html
1389
1361
  */
1390
1362
  var getEvaluationSubmissions = function (query, accessToken) {
1391
- return (0, exports.doGet)("/repo/v1/evaluation/submission/query?query=".concat(encodeURI(query)), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1363
+ return (0, exports.doGet)("/repo/v1/evaluation/submission/query?query=".concat(encodeURI(query)), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1392
1364
  };
1393
1365
  exports.getEvaluationSubmissions = getEvaluationSubmissions;
1394
1366
  /**
@@ -1396,8 +1368,7 @@ exports.getEvaluationSubmissions = getEvaluationSubmissions;
1396
1368
  * http://rest-docs.synapse.org/rest/POST/oauth2/description.html
1397
1369
  */
1398
1370
  var getOAuth2RequestDescription = function (oidcAuthRequest) {
1399
- return (0, exports.doPost)('/auth/v1/oauth2/description', oidcAuthRequest, undefined, // accessToken: this is not an authenticated call
1400
- undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1371
+ return (0, exports.doPost)('/auth/v1/oauth2/description', oidcAuthRequest, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1401
1372
  };
1402
1373
  exports.getOAuth2RequestDescription = getOAuth2RequestDescription;
1403
1374
  /**
@@ -1405,22 +1376,67 @@ exports.getOAuth2RequestDescription = getOAuth2RequestDescription;
1405
1376
  * Consent persists for one year.
1406
1377
  */
1407
1378
  var hasUserAuthorizedOAuthClient = function (oidcAuthRequest, accessToken) {
1408
- return (0, exports.doPost)('/auth/v1/oauth2/consentcheck', oidcAuthRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1379
+ return (0, exports.doPost)('/auth/v1/oauth2/consentcheck', oidcAuthRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1409
1380
  };
1410
1381
  exports.hasUserAuthorizedOAuthClient = hasUserAuthorizedOAuthClient;
1411
1382
  /**
1412
1383
  * Get OAuth2 Client information (available to the public)
1413
1384
  */
1414
1385
  var getOAuth2Client = function (clientId) {
1415
- return (0, exports.doGet)("/auth/v1/oauth2/client/".concat(clientId), undefined, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1386
+ return (0, exports.doGet)("/auth/v1/oauth2/client/".concat(clientId), undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1416
1387
  };
1417
1388
  exports.getOAuth2Client = getOAuth2Client;
1389
+ /**
1390
+ List the OAuth 2.0 clients created by the current user.
1391
+ */
1392
+ var getOAuth2 = function (accessToken, nextPageToken) {
1393
+ return (0, exports.doGet)("/auth/v1/oauth2/client".concat(nextPageToken ? '?nextPageToken=' + nextPageToken : ''), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1394
+ };
1395
+ exports.getOAuth2 = getOAuth2;
1396
+ /**
1397
+ Create an OAuth 2.0 client.
1398
+ Note: The client name must be unique.
1399
+ Note: After creating the client one must also set the client secret and have their client verified
1400
+ https://rest-docs.synapse.org/rest/POST/oauth2/client.html
1401
+ */
1402
+ var createOAuthClient = function (request, accessToken) {
1403
+ return (0, exports.doPost)('/auth/v1/oauth2/client', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1404
+ };
1405
+ exports.createOAuthClient = createOAuthClient;
1406
+ /**
1407
+ Delete OAuth 2.0 client
1408
+ https://rest-docs.synapse.org/rest/DELETE/oauth2/client/id.html
1409
+ */
1410
+ var deleteOAuthClient = function (id, accessToken) {
1411
+ return (0, exports.doDelete)("/auth/v1/oauth2/client/".concat(id), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1412
+ };
1413
+ exports.deleteOAuthClient = deleteOAuthClient;
1414
+ /**
1415
+ Update the metadata for an existing OAuth 2.0 client.
1416
+ Note: Only the creator of a client can update it.
1417
+ Note: Changing the redirect URIs will revert the 'verified' status of the client, necessitating re-verification.
1418
+ https://repo-prod.prod.sagebase.org/auth/v1/oauth2/client/{id}
1419
+ */
1420
+ var updateOAuthClient = function (request, accessToken) {
1421
+ return (0, exports.doPut)("/auth/v1/oauth2/client/".concat(request.client_id), request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1422
+ };
1423
+ exports.updateOAuthClient = updateOAuthClient;
1424
+ /**
1425
+ Get a secret credential to use when requesting an access token.
1426
+ Synapse supports 'client_secret_basic' and 'client_secret_post'.
1427
+ NOTE: This request will invalidate any previously issued secrets.
1428
+ https://docs.synapse.org/rest/POST/oauth2/client/secret/id.html
1429
+ */
1430
+ var createOAuthClientSecret = function (accessToken, id) {
1431
+ return (0, exports.doPost)("/auth/v1/oauth2/client/secret/".concat(id), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1432
+ };
1433
+ exports.createOAuthClientSecret = createOAuthClientSecret;
1418
1434
  /**
1419
1435
  * Get OAuth2 Client information (available to the public)
1420
1436
  */
1421
1437
  var getAuthenticatedOn = function (accessToken) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
1422
1438
  return tslib_1.__generator(this, function (_a) {
1423
- return [2 /*return*/, (0, exports.doGet)("/auth/v1/authenticatedOn", accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1439
+ return [2 /*return*/, (0, exports.doGet)("/auth/v1/authenticatedOn", accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1424
1440
  });
1425
1441
  }); };
1426
1442
  exports.getAuthenticatedOn = getAuthenticatedOn;
@@ -1431,7 +1447,7 @@ exports.getAuthenticatedOn = getAuthenticatedOn;
1431
1447
  * @param endpoint
1432
1448
  */
1433
1449
  var consentToOAuth2Request = function (oidcAuthRequest, accessToken) {
1434
- return (0, exports.doPost)('/auth/v1/oauth2/consent', oidcAuthRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1450
+ return (0, exports.doPost)('/auth/v1/oauth2/consent', oidcAuthRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1435
1451
  };
1436
1452
  exports.consentToOAuth2Request = consentToOAuth2Request;
1437
1453
  /***********************
@@ -1446,7 +1462,7 @@ exports.consentToOAuth2Request = consentToOAuth2Request;
1446
1462
  * @param endpoint
1447
1463
  */
1448
1464
  var createFormGroup = function (name, accessToken) {
1449
- return (0, exports.doPost)("/repo/v1/form/group?name=".concat(encodeURI(name)), undefined, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1465
+ return (0, exports.doPost)("/repo/v1/form/group?name=".concat(encodeURI(name)), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1450
1466
  };
1451
1467
  exports.createFormGroup = createFormGroup;
1452
1468
  /**
@@ -1454,7 +1470,7 @@ exports.createFormGroup = createFormGroup;
1454
1470
  * https://rest-docs.synapse.org/rest/GET/form/group/id/acl.html
1455
1471
  */
1456
1472
  var getFormACL = function (formGroupId, accessToken) {
1457
- return (0, exports.doGet)("/repo/v1/form/group/".concat(formGroupId, "/acl"), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1473
+ return (0, exports.doGet)("/repo/v1/form/group/".concat(formGroupId, "/acl"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1458
1474
  };
1459
1475
  exports.getFormACL = getFormACL;
1460
1476
  /**
@@ -1462,7 +1478,7 @@ exports.getFormACL = getFormACL;
1462
1478
  * https://rest-docs.synapse.org/rest/PUT/form/group/id/acl.html
1463
1479
  */
1464
1480
  var updateFormACL = function (formGroupId, newAcl, accessToken) {
1465
- return (0, exports.doPut)("/repo/v1/form/group/".concat(formGroupId, "/acl"), newAcl, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1481
+ return (0, exports.doPut)("/repo/v1/form/group/".concat(formGroupId, "/acl"), newAcl, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1466
1482
  };
1467
1483
  exports.updateFormACL = updateFormACL;
1468
1484
  /**
@@ -1478,7 +1494,7 @@ var createFormData = function (formGroupId, name, dataFileHandleId, accessToken)
1478
1494
  name: name,
1479
1495
  fileHandleId: dataFileHandleId,
1480
1496
  };
1481
- return (0, exports.doPost)("/repo/v1/form/data?groupId=".concat(formGroupId), newFormData, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1497
+ return (0, exports.doPost)("/repo/v1/form/data?groupId=".concat(formGroupId), newFormData, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1482
1498
  };
1483
1499
  exports.createFormData = createFormData;
1484
1500
  /**
@@ -1490,7 +1506,7 @@ var updateFormData = function (formDataId, name, dataFileHandleId, accessToken)
1490
1506
  name: name,
1491
1507
  fileHandleId: dataFileHandleId,
1492
1508
  };
1493
- return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId), updatedFormData, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1509
+ return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId), updatedFormData, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1494
1510
  };
1495
1511
  exports.updateFormData = updateFormData;
1496
1512
  /**
@@ -1498,7 +1514,7 @@ exports.updateFormData = updateFormData;
1498
1514
  * https://rest-docs.synapse.org/rest/DELETE/form/data.html
1499
1515
  */
1500
1516
  var deleteFormData = function (formDataId, accessToken) {
1501
- return (0, exports.doDelete)("/repo/v1/form/data/".concat(formDataId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1517
+ return (0, exports.doDelete)("/repo/v1/form/data/".concat(formDataId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1502
1518
  };
1503
1519
  exports.deleteFormData = deleteFormData;
1504
1520
  /**
@@ -1506,7 +1522,7 @@ exports.deleteFormData = deleteFormData;
1506
1522
  * https://rest-docs.synapse.org/rest/POST/form/data/id/submit.html
1507
1523
  */
1508
1524
  var submitFormData = function (formDataId, accessToken) {
1509
- return (0, exports.doPost)("/repo/v1/form/data/".concat(formDataId, "/submit"), undefined, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1525
+ return (0, exports.doPost)("/repo/v1/form/data/".concat(formDataId, "/submit"), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1510
1526
  };
1511
1527
  exports.submitFormData = submitFormData;
1512
1528
  /**
@@ -1515,7 +1531,7 @@ exports.submitFormData = submitFormData;
1515
1531
  * https://rest-docs.synapse.org/rest/POST/form/data/list.html
1516
1532
  */
1517
1533
  var listFormData = function (request, accessToken) {
1518
- return (0, exports.doPost)("/repo/v1/form/data/list", request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1534
+ return (0, exports.doPost)("/repo/v1/form/data/list", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1519
1535
  };
1520
1536
  exports.listFormData = listFormData;
1521
1537
  /**
@@ -1524,7 +1540,7 @@ exports.listFormData = listFormData;
1524
1540
  * https://rest-docs.synapse.org/rest/POST/form/data/list/reviewer.html
1525
1541
  */
1526
1542
  var listFormDataAsFormAdmin = function (request, accessToken) {
1527
- return (0, exports.doPost)("/repo/v1/form/data/list/reviewer", request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1543
+ return (0, exports.doPost)("/repo/v1/form/data/list/reviewer", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1528
1544
  };
1529
1545
  exports.listFormDataAsFormAdmin = listFormDataAsFormAdmin;
1530
1546
  /**
@@ -1532,7 +1548,7 @@ exports.listFormDataAsFormAdmin = listFormDataAsFormAdmin;
1532
1548
  * https://rest-docs.synapse.org/rest/PUT/form/data/id/accept.html
1533
1549
  */
1534
1550
  var acceptFormData = function (formDataId, accessToken) {
1535
- return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId, "/accept"), undefined, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1551
+ return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId, "/accept"), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1536
1552
  };
1537
1553
  exports.acceptFormData = acceptFormData;
1538
1554
  /**
@@ -1543,7 +1559,7 @@ var rejectFormData = function (formDataId, reason, accessToken) {
1543
1559
  var formRejection = {
1544
1560
  reason: reason,
1545
1561
  };
1546
- return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId, "/reject"), formRejection, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1562
+ return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId, "/reject"), formRejection, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1547
1563
  };
1548
1564
  exports.rejectFormData = rejectFormData;
1549
1565
  /**
@@ -1552,12 +1568,12 @@ exports.rejectFormData = rejectFormData;
1552
1568
  * Generic endpoint to retrieve statistics about objects. The user should have VIEW_STATISTICS access on the object referenced by the objectId in the request.
1553
1569
  */
1554
1570
  var getProjectStatistics = function (request, accessToken) {
1555
- return (0, exports.doPost)("/repo/v1/statistics", request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1571
+ return (0, exports.doPost)("/repo/v1/statistics", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1556
1572
  };
1557
1573
  exports.getProjectStatistics = getProjectStatistics;
1558
1574
  // see https://rest-docs.synapse.org/rest/POST/restrictionInformation.html
1559
1575
  var getRestrictionInformation = function (request, accessToken) {
1560
- return (0, exports.doPost)("/repo/v1/restrictionInformation", request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1576
+ return (0, exports.doPost)("/repo/v1/restrictionInformation", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1561
1577
  };
1562
1578
  exports.getRestrictionInformation = getRestrictionInformation;
1563
1579
  /**
@@ -1575,7 +1591,7 @@ var getAccessRequirement = function (accessToken, id, limit, offset) {
1575
1591
  if (limit === void 0) { limit = 50; }
1576
1592
  if (offset === void 0) { offset = 0; }
1577
1593
  var url = "/repo/v1/entity/".concat(id, "/accessRequirement?limit=").concat(limit, "&offset=").concat(offset);
1578
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1594
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1579
1595
  };
1580
1596
  exports.getAccessRequirement = getAccessRequirement;
1581
1597
  /**
@@ -1588,7 +1604,7 @@ exports.getAccessRequirement = getAccessRequirement;
1588
1604
  * @returns {Promise<AccessRequirement>}
1589
1605
  */
1590
1606
  var getAccessRequirementById = function (accessToken, id) {
1591
- return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_BY_ID)(id), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1607
+ return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_BY_ID)(id), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1592
1608
  };
1593
1609
  exports.getAccessRequirementById = getAccessRequirementById;
1594
1610
  /**
@@ -1600,7 +1616,7 @@ exports.getAccessRequirementById = getAccessRequirementById;
1600
1616
  var getAccessRequirementAcl = function (accessToken, id) {
1601
1617
  // It's possible for an AR to not have an ACL, so pre-emptively handle 404
1602
1618
  return allowNotFoundError(function () {
1603
- return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_ACL)(id), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1619
+ return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_ACL)(id), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1604
1620
  });
1605
1621
  };
1606
1622
  exports.getAccessRequirementAcl = getAccessRequirementAcl;
@@ -1610,7 +1626,7 @@ exports.getAccessRequirementAcl = getAccessRequirementAcl;
1610
1626
  * See http://rest-docs.synapse.org/rest/POST/accessRequirement/search.html
1611
1627
  */
1612
1628
  var searchAccessRequirements = function (accessToken, request) {
1613
- return (0, exports.doPost)(APIConstants_1.ACCESS_REQUIREMENT_SEARCH, request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1629
+ return (0, exports.doPost)(APIConstants_1.ACCESS_REQUIREMENT_SEARCH, request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1614
1630
  };
1615
1631
  exports.searchAccessRequirements = searchAccessRequirements;
1616
1632
  /**
@@ -1620,7 +1636,7 @@ exports.searchAccessRequirements = searchAccessRequirements;
1620
1636
  * @returns {AccessRequirementStatus}
1621
1637
  */
1622
1638
  var getAccessRequirementStatus = function (accessToken, requirementId) {
1623
- return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_STATUS)(requirementId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1639
+ return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_STATUS)(requirementId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1624
1640
  };
1625
1641
  exports.getAccessRequirementStatus = getAccessRequirementStatus;
1626
1642
  /**
@@ -1635,7 +1651,7 @@ var getAllAccessRequirements = function (accessToken, id) {
1635
1651
  // format function to be callable by getAllOfPaginatedService
1636
1652
  var fn = function (limit, offset) {
1637
1653
  var url = "/repo/v1/entity/".concat(id, "/accessRequirement?limit=").concat(limit, "&offset=").concat(offset);
1638
- return (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1654
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1639
1655
  };
1640
1656
  return (0, exports.getAllOfPaginatedService)(fn);
1641
1657
  };
@@ -1651,7 +1667,7 @@ var getAccessApproval = function (accessToken, approvalId) { return tslib_1.__aw
1651
1667
  var url;
1652
1668
  return tslib_1.__generator(this, function (_a) {
1653
1669
  url = "/repo/v1/accessApproval/".concat(approvalId);
1654
- return [2 /*return*/, (0, exports.doGet)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1670
+ return [2 /*return*/, (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1655
1671
  });
1656
1672
  }); };
1657
1673
  exports.getAccessApproval = getAccessApproval;
@@ -1664,19 +1680,19 @@ exports.getAccessApproval = getAccessApproval;
1664
1680
  */
1665
1681
  var postAccessApproval = function (accessToken, accessApproval) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
1666
1682
  return tslib_1.__generator(this, function (_a) {
1667
- return [2 /*return*/, (0, exports.doPost)('/repo/v1/accessApproval', accessApproval, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1683
+ return [2 /*return*/, (0, exports.doPost)('/repo/v1/accessApproval', accessApproval, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1668
1684
  });
1669
1685
  }); };
1670
1686
  exports.postAccessApproval = postAccessApproval;
1671
1687
  // https://rest-docs.synapse.org/rest/GET/download/list.html
1672
1688
  var getDownloadList = function (accessToken) {
1673
- return (0, exports.doGet)('/file/v1/download/list', accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1689
+ return (0, exports.doGet)('/file/v1/download/list', accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1674
1690
  };
1675
1691
  exports.getDownloadList = getDownloadList;
1676
1692
  var getDownloadOrder = function (zipFileName, accessToken) {
1677
1693
  var baseURL = '/file/v1/download/order';
1678
1694
  var url = zipFileName ? "".concat(baseURL, "?zipFileName=").concat(zipFileName) : baseURL;
1679
- return (0, exports.doPost)(url, undefined, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1695
+ return (0, exports.doPost)(url, undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1680
1696
  };
1681
1697
  exports.getDownloadOrder = getDownloadOrder;
1682
1698
  /**
@@ -1721,7 +1737,7 @@ var getAllOfPaginatedService = function (fn) { return tslib_1.__awaiter(void 0,
1721
1737
  exports.getAllOfPaginatedService = getAllOfPaginatedService;
1722
1738
  // https://rest-docs.synapse.org/rest/POST/download/list/remove.html
1723
1739
  var deleteDownloadListFiles = function (list, accessToken) {
1724
- return (0, exports.doPost)('/file/v1/download/list/remove', { list: list }, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (data) {
1740
+ return (0, exports.doPost)('/file/v1/download/list/remove', { list: list }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (data) {
1725
1741
  (0, dispatchDownloadListChangeEvent_1.dispatchDownloadListChangeEvent)(data);
1726
1742
  return data;
1727
1743
  });
@@ -1729,7 +1745,7 @@ var deleteDownloadListFiles = function (list, accessToken) {
1729
1745
  exports.deleteDownloadListFiles = deleteDownloadListFiles;
1730
1746
  // https://rest-docs.synapse.org/rest/DELETE/download/list.html ?
1731
1747
  var deleteDownloadList = function (accessToken) {
1732
- return (0, exports.doDelete)('/file/v1/download/list', accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (_) {
1748
+ return (0, exports.doDelete)('/file/v1/download/list', accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (_) {
1733
1749
  (0, dispatchDownloadListChangeEvent_1.dispatchDownloadListChangeEvent)(undefined);
1734
1750
  });
1735
1751
  };
@@ -1747,7 +1763,7 @@ var updateTable = function (tableUpdateRequest, accessToken) {
1747
1763
  var asyncJobId;
1748
1764
  return tslib_1.__generator(this, function (_a) {
1749
1765
  switch (_a.label) {
1750
- case 0: return [4 /*yield*/, (0, exports.doPost)("/repo/v1/entity/".concat(tableUpdateRequest.entityId, "/table/transaction/async/start"), tableUpdateRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1766
+ case 0: return [4 /*yield*/, (0, exports.doPost)("/repo/v1/entity/".concat(tableUpdateRequest.entityId, "/table/transaction/async/start"), tableUpdateRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1751
1767
  case 1:
1752
1768
  asyncJobId = _a.sent();
1753
1769
  return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/entity/".concat(tableUpdateRequest.entityId, "/table/transaction/async/get/").concat(asyncJobId.token), accessToken)];
@@ -1757,51 +1773,50 @@ var updateTable = function (tableUpdateRequest, accessToken) {
1757
1773
  };
1758
1774
  exports.updateTable = updateTable;
1759
1775
  var getTransformSqlWithFacetsRequest = function (transformSqlWithFacetsRequest) {
1760
- return (0, exports.doPost)('/repo/v1/table/sql/transform', transformSqlWithFacetsRequest, undefined, // no auth needed
1761
- undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1776
+ return (0, exports.doPost)('/repo/v1/table/sql/transform', transformSqlWithFacetsRequest, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1762
1777
  };
1763
1778
  exports.getTransformSqlWithFacetsRequest = getTransformSqlWithFacetsRequest;
1764
1779
  var createPersonalAccessToken = function (accessTokenGenerationRequest, accessToken) {
1765
- return (0, exports.doPost)('/auth/v1/personalAccessToken', accessTokenGenerationRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1780
+ return (0, exports.doPost)('/auth/v1/personalAccessToken', accessTokenGenerationRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1766
1781
  };
1767
1782
  exports.createPersonalAccessToken = createPersonalAccessToken;
1768
1783
  var getPersonalAccessTokenRecords = function (accessToken, nextPageToken) {
1769
- return (0, exports.doGet)("/auth/v1/personalAccessToken".concat(nextPageToken ? '?nextPageToken=' + nextPageToken : ''), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1784
+ return (0, exports.doGet)("/auth/v1/personalAccessToken".concat(nextPageToken ? '?nextPageToken=' + nextPageToken : ''), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1770
1785
  };
1771
1786
  exports.getPersonalAccessTokenRecords = getPersonalAccessTokenRecords;
1772
1787
  var deletePersonalAccessToken = function (accessTokenId, accessToken) {
1773
- return (0, exports.doDelete)("/auth/v1/personalAccessToken/".concat(accessTokenId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1788
+ return (0, exports.doDelete)("/auth/v1/personalAccessToken/".concat(accessTokenId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1774
1789
  };
1775
1790
  exports.deletePersonalAccessToken = deletePersonalAccessToken;
1776
1791
  // https://rest-docs.synapse.org/rest/GET/projects.html
1777
1792
  var getMyProjects = function (accessToken, params) {
1778
1793
  if (params === void 0) { params = {}; }
1779
1794
  var urlParams = new URLSearchParams((0, ObjectUtils_1.removeUndefined)(params));
1780
- return (0, exports.doGet)("/repo/v1/projects?".concat(urlParams.toString()), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1795
+ return (0, exports.doGet)("/repo/v1/projects?".concat(urlParams.toString()), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1781
1796
  };
1782
1797
  exports.getMyProjects = getMyProjects;
1783
1798
  // http://rest-docs.synapse.org/rest/GET/projects/user/principalId.html
1784
1799
  var getUserProjects = function (userId, params, accessToken) {
1785
1800
  if (params === void 0) { params = {}; }
1786
1801
  var urlParams = new URLSearchParams((0, ObjectUtils_1.removeUndefined)(params));
1787
- return (0, exports.doGet)("/repo/v1/projects/user/".concat(userId, "?").concat(urlParams.toString()), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1802
+ return (0, exports.doGet)("/repo/v1/projects/user/".concat(userId, "?").concat(urlParams.toString()), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1788
1803
  };
1789
1804
  exports.getUserProjects = getUserProjects;
1790
1805
  // https://rest-docs.synapse.org/rest/GET/entity/id/path.html
1791
1806
  var getEntityPath = function (entityId, accessToken) {
1792
- return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/path"), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1807
+ return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/path"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1793
1808
  };
1794
1809
  exports.getEntityPath = getEntityPath;
1795
1810
  // https://rest-docs.synapse.org/rest/GET/entity/id/version.html
1796
1811
  var getEntityVersions = function (entityId, accessToken, offset, limit) {
1797
1812
  if (offset === void 0) { offset = 0; }
1798
1813
  if (limit === void 0) { limit = 200; }
1799
- return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/version?offset=").concat(offset, "&limit=").concat(limit), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1814
+ return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/version?offset=").concat(offset, "&limit=").concat(limit), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1800
1815
  };
1801
1816
  exports.getEntityVersions = getEntityVersions;
1802
1817
  // https://rest-docs.synapse.org/rest/POST/search.html
1803
1818
  var searchEntities = function (query, accessToken) {
1804
- return (0, exports.doPost)('/repo/v1/search', query, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1819
+ return (0, exports.doPost)('/repo/v1/search', query, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1805
1820
  };
1806
1821
  exports.searchEntities = searchEntities;
1807
1822
  var getDownloadListJobResponse = function (accessToken, queryRequestDetails) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
@@ -1813,7 +1828,7 @@ var getDownloadListJobResponse = function (accessToken, queryRequestDetails) { r
1813
1828
  concreteType: 'org.sagebionetworks.repo.model.download.DownloadListQueryRequest',
1814
1829
  requestDetails: queryRequestDetails,
1815
1830
  };
1816
- return [4 /*yield*/, (0, exports.doPost)('/repo/v1/download/list/query/async/start', downloadListQueryRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1831
+ return [4 /*yield*/, (0, exports.doPost)('/repo/v1/download/list/query/async/start', downloadListQueryRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1817
1832
  case 1:
1818
1833
  asyncJobId = _a.sent();
1819
1834
  return [4 /*yield*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/download/list/query/async/get/".concat(asyncJobId.token), accessToken)];
@@ -1828,7 +1843,7 @@ var getDownloadListJobResponse = function (accessToken, queryRequestDetails) { r
1828
1843
  * http://rest-docs.synapse.org/rest/DELETE/download/list.html
1829
1844
  */
1830
1845
  var clearDownloadListV2 = function (accessToken) {
1831
- return (0, exports.doDelete)('/repo/v1/download/list', accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1846
+ return (0, exports.doDelete)('/repo/v1/download/list', accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1832
1847
  };
1833
1848
  exports.clearDownloadListV2 = clearDownloadListV2;
1834
1849
  /**
@@ -1870,44 +1885,44 @@ var removeItemFromDownloadListV2 = function (item, accessToken) {
1870
1885
  var request = {
1871
1886
  batchToRemove: [item],
1872
1887
  };
1873
- return (0, exports.doPost)('/repo/v1/download/list/remove', request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1888
+ return (0, exports.doPost)('/repo/v1/download/list/remove', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1874
1889
  };
1875
1890
  exports.removeItemFromDownloadListV2 = removeItemFromDownloadListV2;
1876
1891
  // http://rest-docs.synapse.org/rest/POST/researchProject.html
1877
1892
  var updateResearchProject = function (requestObj, accessToken) {
1878
- return (0, exports.doPost)('/repo/v1/researchProject', requestObj, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1893
+ return (0, exports.doPost)('/repo/v1/researchProject', requestObj, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1879
1894
  };
1880
1895
  exports.updateResearchProject = updateResearchProject;
1881
1896
  // http://rest-docs.synapse.org/rest/GET/accessRequirement/requirementId/researchProjectForUpdate.html
1882
1897
  var getResearchProject = function (requirementId, accessToken) {
1883
- return (0, exports.doGet)("/repo/v1/accessRequirement/".concat(requirementId, "/researchProjectForUpdate"), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1898
+ return (0, exports.doGet)("/repo/v1/accessRequirement/".concat(requirementId, "/researchProjectForUpdate"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1884
1899
  };
1885
1900
  exports.getResearchProject = getResearchProject;
1886
1901
  // http://rest-docs.synapse.org/rest/GET/accessRequirement/requirementId/dataAccessRequestForUpdate.html
1887
1902
  var getDataAccessRequestForUpdate = function (requirementId, accessToken) {
1888
- return (0, exports.doGet)("/repo/v1/accessRequirement/".concat(requirementId, "/dataAccessRequestForUpdate"), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1903
+ return (0, exports.doGet)("/repo/v1/accessRequirement/".concat(requirementId, "/dataAccessRequestForUpdate"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1889
1904
  };
1890
1905
  exports.getDataAccessRequestForUpdate = getDataAccessRequestForUpdate;
1891
1906
  // http://rest-docs.synapse.org/rest/GET/accessRequirement/requirementId/dataAccessRequestForUpdate.html
1892
1907
  var updateDataAccessRequest = function (requestObj, accessToken) {
1893
- return (0, exports.doPost)("/repo/v1/dataAccessRequest", requestObj, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1908
+ return (0, exports.doPost)("/repo/v1/dataAccessRequest", requestObj, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1894
1909
  };
1895
1910
  exports.updateDataAccessRequest = updateDataAccessRequest;
1896
1911
  // http://rest-docs.synapse.org/rest/POST/dataAccessRequest/requestId/submission.html
1897
1912
  var submitDataAccessRequest = function (requestObj, accessToken) {
1898
- return (0, exports.doPost)("/repo/v1/dataAccessRequest/".concat(requestObj.requestId, "/submission"), requestObj, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1913
+ return (0, exports.doPost)("/repo/v1/dataAccessRequest/".concat(requestObj.requestId, "/submission"), requestObj, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1899
1914
  };
1900
1915
  exports.submitDataAccessRequest = submitDataAccessRequest;
1901
1916
  // http://rest-docs.synapse.org/rest/PUT/dataAccessSubmission/submissionId/cancellation.html
1902
1917
  // Cancel a submission. Only the user who created this submission can cancel it.
1903
1918
  var cancelDataAccessRequest = function (submissionId, accessToken) {
1904
- return (0, exports.doPut)("/repo/v1/dataAccessSubmission/".concat(submissionId, "/cancellation"), undefined, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1919
+ return (0, exports.doPut)("/repo/v1/dataAccessSubmission/".concat(submissionId, "/cancellation"), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1905
1920
  };
1906
1921
  exports.cancelDataAccessRequest = cancelDataAccessRequest;
1907
1922
  // http://rest-docs.synapse.org/rest/GET/dataAccessSubmission/submissionId.html
1908
1923
  // Fetch a submission by its id. If the user is a not part of the ACT they must be validated and assigned as reviewers of the AR submissions in order to fetch the submission.
1909
1924
  var getSubmissionById = function (submissionId, accessToken) {
1910
- return (0, exports.doGet)((0, APIConstants_1.DATA_ACCESS_SUBMISSION_BY_ID)(submissionId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1925
+ return (0, exports.doGet)((0, APIConstants_1.DATA_ACCESS_SUBMISSION_BY_ID)(submissionId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1911
1926
  };
1912
1927
  exports.getSubmissionById = getSubmissionById;
1913
1928
  /**
@@ -1920,7 +1935,7 @@ exports.getSubmissionById = getSubmissionById;
1920
1935
  * @returns
1921
1936
  */
1922
1937
  var updateSubmissionStatus = function (request, accessToken) {
1923
- return (0, exports.doPut)((0, APIConstants_1.DATA_ACCESS_SUBMISSION_BY_ID)(request.submissionId), request, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1938
+ return (0, exports.doPut)((0, APIConstants_1.DATA_ACCESS_SUBMISSION_BY_ID)(request.submissionId), request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1924
1939
  };
1925
1940
  exports.updateSubmissionStatus = updateSubmissionStatus;
1926
1941
  /**
@@ -1933,7 +1948,7 @@ exports.updateSubmissionStatus = updateSubmissionStatus;
1933
1948
  //
1934
1949
  var getSchemaBinding = function (entityId, accessToken) {
1935
1950
  return allowNotFoundError(function () {
1936
- return (0, exports.doGet)((0, APIConstants_1.ENTITY_SCHEMA_BINDING)(entityId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1951
+ return (0, exports.doGet)((0, APIConstants_1.ENTITY_SCHEMA_BINDING)(entityId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1937
1952
  });
1938
1953
  };
1939
1954
  exports.getSchemaBinding = getSchemaBinding;
@@ -1945,7 +1960,7 @@ exports.getSchemaBinding = getSchemaBinding;
1945
1960
  * @returns
1946
1961
  */
1947
1962
  var getSchemaValidationResults = function (entityId, accessToken) {
1948
- return (0, exports.doGet)((0, APIConstants_1.ENTITY_SCHEMA_VALIDATION)(entityId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1963
+ return (0, exports.doGet)((0, APIConstants_1.ENTITY_SCHEMA_VALIDATION)(entityId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1949
1964
  };
1950
1965
  exports.getSchemaValidationResults = getSchemaValidationResults;
1951
1966
  /**
@@ -1954,7 +1969,7 @@ exports.getSchemaValidationResults = getSchemaValidationResults;
1954
1969
  * @returns
1955
1970
  */
1956
1971
  var getSchema = function (schema$id) {
1957
- return (0, exports.doGet)("".concat((0, APIConstants_1.REGISTERED_SCHEMA_ID)(schema$id)), undefined, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1972
+ return (0, exports.doGet)("".concat((0, APIConstants_1.REGISTERED_SCHEMA_ID)(schema$id)), undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1958
1973
  };
1959
1974
  exports.getSchema = getSchema;
1960
1975
  /**
@@ -1969,7 +1984,7 @@ var getValidationSchema = function (schema$id, accessToken) { return tslib_1.__a
1969
1984
  case 0: return [4 /*yield*/, (0, exports.doPost)(APIConstants_1.SCHEMA_VALIDATION_START, {
1970
1985
  concreteType: 'org.sagebionetworks.repo.model.schema.GetValidationSchemaRequest',
1971
1986
  $id: schema$id,
1972
- }, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1987
+ }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
1973
1988
  case 1:
1974
1989
  asyncJobId = _a.sent();
1975
1990
  return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, (0, APIConstants_1.SCHEMA_VALIDATION_GET)(asyncJobId.token), accessToken)];
@@ -1985,7 +2000,7 @@ exports.getValidationSchema = getValidationSchema;
1985
2000
  * @returns
1986
2001
  */
1987
2002
  var hasAccessToEntity = function (entityId, accessType, accessToken) {
1988
- return (0, exports.doGet)("".concat((0, APIConstants_1.ENTITY_ACCESS)(entityId), "?accessType=").concat(accessType), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2003
+ return (0, exports.doGet)("".concat((0, APIConstants_1.ENTITY_ACCESS)(entityId), "?accessType=").concat(accessType), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
1989
2004
  };
1990
2005
  exports.hasAccessToEntity = hasAccessToEntity;
1991
2006
  /**
@@ -1996,7 +2011,7 @@ exports.hasAccessToEntity = hasAccessToEntity;
1996
2011
  * @returns
1997
2012
  */
1998
2013
  var getEntityJson = function (entityId, accessToken) {
1999
- return (0, exports.doGet)((0, APIConstants_1.ENTITY_JSON)(entityId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2014
+ return (0, exports.doGet)((0, APIConstants_1.ENTITY_JSON)(entityId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2000
2015
  };
2001
2016
  exports.getEntityJson = getEntityJson;
2002
2017
  /**
@@ -2007,7 +2022,7 @@ exports.getEntityJson = getEntityJson;
2007
2022
  * @returns
2008
2023
  */
2009
2024
  var updateEntityJson = function (entityId, json, accessToken) {
2010
- return (0, exports.doPut)((0, APIConstants_1.ENTITY_JSON)(entityId), json, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2025
+ return (0, exports.doPut)((0, APIConstants_1.ENTITY_JSON)(entityId), json, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2011
2026
  };
2012
2027
  exports.updateEntityJson = updateEntityJson;
2013
2028
  /**
@@ -2017,22 +2032,22 @@ exports.updateEntityJson = updateEntityJson;
2017
2032
  * https://docs.synapse.org/rest/GET/notificationEmail.html
2018
2033
  */
2019
2034
  var getNotificationEmail = function (accessToken) {
2020
- return (0, exports.doGet)(APIConstants_1.NOTIFICATION_EMAIL, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2035
+ return (0, exports.doGet)(APIConstants_1.NOTIFICATION_EMAIL, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2021
2036
  };
2022
2037
  exports.getNotificationEmail = getNotificationEmail;
2023
2038
  // http://rest-docs.synapse.org/rest/POST/principal/available.html
2024
2039
  var isAliasAvailable = function (aliasCheckRequest, accessToken) {
2025
- return (0, exports.doPost)(APIConstants_1.ALIAS_AVAILABLE, aliasCheckRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2040
+ return (0, exports.doPost)(APIConstants_1.ALIAS_AVAILABLE, aliasCheckRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2026
2041
  };
2027
2042
  exports.isAliasAvailable = isAliasAvailable;
2028
2043
  // http://rest-docs.synapse.org/rest/POST/account/emailValidation.html
2029
2044
  var registerAccountStep1 = function (newUser, portalEndpoint) {
2030
- return (0, exports.doPost)((0, APIConstants_1.REGISTER_ACCOUNT_STEP_1)(portalEndpoint), newUser, undefined, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2045
+ return (0, exports.doPost)((0, APIConstants_1.REGISTER_ACCOUNT_STEP_1)(portalEndpoint), newUser, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2031
2046
  };
2032
2047
  exports.registerAccountStep1 = registerAccountStep1;
2033
2048
  // http://rest-docs.synapse.org/rest/POST/account2.html
2034
2049
  var registerAccountStep2 = function (accountSetupInfo) {
2035
- return (0, exports.doPost)(APIConstants_1.REGISTER_ACCOUNT_STEP_2, accountSetupInfo, undefined, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2050
+ return (0, exports.doPost)(APIConstants_1.REGISTER_ACCOUNT_STEP_2, accountSetupInfo, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2036
2051
  };
2037
2052
  exports.registerAccountStep2 = registerAccountStep2;
2038
2053
  /**
@@ -2045,7 +2060,12 @@ exports.registerAccountStep2 = registerAccountStep2;
2045
2060
  */
2046
2061
  var oAuthRegisterAccountStep2 = function (userName, provider, authenticationCode, redirectUrl, endpoint) {
2047
2062
  if (endpoint === void 0) { endpoint = getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT; }
2048
- return (0, exports.doPost)('/auth/v1/oauth2/account2', { provider: provider, authenticationCode: authenticationCode, redirectUrl: redirectUrl, userName: userName }, undefined, undefined, endpoint);
2063
+ return (0, exports.doPost)('/auth/v1/oauth2/account2', {
2064
+ provider: provider,
2065
+ authenticationCode: authenticationCode,
2066
+ redirectUrl: redirectUrl,
2067
+ userName: userName,
2068
+ }, undefined, endpoint);
2049
2069
  };
2050
2070
  exports.oAuthRegisterAccountStep2 = oAuthRegisterAccountStep2;
2051
2071
  /**
@@ -2065,7 +2085,7 @@ var bindOAuthProviderToAccount = function (provider, authenticationCode, redirec
2065
2085
  case 0: return [4 /*yield*/, (0, exports.getAccessTokenFromCookie)()];
2066
2086
  case 1:
2067
2087
  accessToken = _a.sent();
2068
- return [2 /*return*/, (0, exports.doPost)('/auth/v1/oauth2/alias', { provider: provider, authenticationCode: authenticationCode, redirectUrl: redirectUrl }, accessToken, undefined, endpoint)];
2088
+ return [2 /*return*/, (0, exports.doPost)('/auth/v1/oauth2/alias', { provider: provider, authenticationCode: authenticationCode, redirectUrl: redirectUrl }, accessToken, endpoint)];
2069
2089
  }
2070
2090
  });
2071
2091
  });
@@ -2082,35 +2102,35 @@ var unbindOAuthProviderToAccount = function (provider, accessToken, alias) { ret
2082
2102
  var url;
2083
2103
  return tslib_1.__generator(this, function (_a) {
2084
2104
  url = "/auth/v1/oauth2/alias?provider=".concat(provider, "&alias=").concat(encodeURIComponent(alias));
2085
- return [2 /*return*/, (0, exports.doDelete)(url, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
2105
+ return [2 /*return*/, (0, exports.doDelete)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
2086
2106
  });
2087
2107
  }); };
2088
2108
  exports.unbindOAuthProviderToAccount = unbindOAuthProviderToAccount;
2089
2109
  //http://rest-docs.synapse.org/rest/POST/termsOfUse2.html
2090
2110
  var signSynapseTermsOfUse = function (accessToken) {
2091
- return (0, exports.doPost)(APIConstants_1.SIGN_TERMS_OF_USE, { accessToken: accessToken }, undefined, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2111
+ return (0, exports.doPost)(APIConstants_1.SIGN_TERMS_OF_USE, { accessToken: accessToken }, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2092
2112
  };
2093
2113
  exports.signSynapseTermsOfUse = signSynapseTermsOfUse;
2094
2114
  //https://rest-docs.synapse.org/rest/POST/verificationSubmission.html
2095
2115
  var createProfileVerificationSubmission = function (verificationSubmission, accessToken) {
2096
- return (0, exports.doPost)(APIConstants_1.VERIFICATION_SUBMISSION, verificationSubmission, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2116
+ return (0, exports.doPost)(APIConstants_1.VERIFICATION_SUBMISSION, verificationSubmission, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2097
2117
  };
2098
2118
  exports.createProfileVerificationSubmission = createProfileVerificationSubmission;
2099
2119
  // https://rest-docs.synapse.org/rest/POST/user/changePassword.html
2100
2120
  var changePasswordWithCurrentPassword = function (newPassword, accessToken) {
2101
- return (0, exports.doPost)('/auth/v1/user/changePassword', newPassword, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2121
+ return (0, exports.doPost)('/auth/v1/user/changePassword', newPassword, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2102
2122
  };
2103
2123
  exports.changePasswordWithCurrentPassword = changePasswordWithCurrentPassword;
2104
2124
  // https://rest-docs.synapse.org/rest/POST/user/changePassword.html
2105
2125
  var changePasswordWithToken = function (newPassword) {
2106
- return (0, exports.doPost)('/auth/v1/user/changePassword', newPassword, undefined, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2126
+ return (0, exports.doPost)('/auth/v1/user/changePassword', newPassword, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2107
2127
  };
2108
2128
  exports.changePasswordWithToken = changePasswordWithToken;
2109
2129
  // http://rest-docs.synapse.org/rest/POST/user/password/reset.html
2110
2130
  var resetPassword = function (email) {
2111
2131
  var endpoint = window.location.href + '?passwordResetToken=';
2112
2132
  var url = "/auth/v1/user/password/reset?passwordResetEndpoint=".concat(encodeURIComponent(endpoint));
2113
- return (0, exports.doPost)(url, { email: email }, undefined, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2133
+ return (0, exports.doPost)(url, { email: email }, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2114
2134
  };
2115
2135
  exports.resetPassword = resetPassword;
2116
2136
  /**
@@ -2121,7 +2141,7 @@ exports.resetPassword = resetPassword;
2121
2141
  * @param accessToken
2122
2142
  */
2123
2143
  var addEmailAddressStep1 = function (email, userId, portalEndpoint, accessToken) {
2124
- return (0, exports.doPost)("/repo/v1/account/".concat(userId, "/emailValidation?portalEndpoint=").concat(portalEndpoint), { email: email }, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2144
+ return (0, exports.doPost)("/repo/v1/account/".concat(userId, "/emailValidation?portalEndpoint=").concat(portalEndpoint), { email: email }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2125
2145
  };
2126
2146
  exports.addEmailAddressStep1 = addEmailAddressStep1;
2127
2147
  /**
@@ -2130,7 +2150,7 @@ exports.addEmailAddressStep1 = addEmailAddressStep1;
2130
2150
  * @param accessToken
2131
2151
  */
2132
2152
  var addEmailAddressStep2 = function (emailValidationSignedToken, accessToken) {
2133
- return (0, exports.doPost)("/repo/v1/email", emailValidationSignedToken, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2153
+ return (0, exports.doPost)("/repo/v1/email", emailValidationSignedToken, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2134
2154
  };
2135
2155
  exports.addEmailAddressStep2 = addEmailAddressStep2;
2136
2156
  /**
@@ -2139,7 +2159,7 @@ exports.addEmailAddressStep2 = addEmailAddressStep2;
2139
2159
  * @param accessToken
2140
2160
  */
2141
2161
  var deleteEmail = function (accessToken, email) {
2142
- return (0, exports.doDelete)("/repo/v1/email?email=".concat(email), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2162
+ return (0, exports.doDelete)("/repo/v1/email?email=".concat(email), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2143
2163
  };
2144
2164
  exports.deleteEmail = deleteEmail;
2145
2165
  /**
@@ -2148,7 +2168,7 @@ exports.deleteEmail = deleteEmail;
2148
2168
  * @param accessToken
2149
2169
  */
2150
2170
  var updateNotificationEmail = function (email, accessToken) {
2151
- return (0, exports.doPut)('/repo/v1/notificationEmail', { email: email }, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2171
+ return (0, exports.doPut)('/repo/v1/notificationEmail', { email: email }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2152
2172
  };
2153
2173
  exports.updateNotificationEmail = updateNotificationEmail;
2154
2174
  /**
@@ -2159,7 +2179,7 @@ Target users: anyone who has READ permission to the project.
2159
2179
  * @param accessToken
2160
2180
  */
2161
2181
  var getReply = function (replyId, accessToken) {
2162
- return (0, exports.doGet)("/repo/v1/reply/".concat(replyId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2182
+ return (0, exports.doGet)("/repo/v1/reply/".concat(replyId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2163
2183
  };
2164
2184
  exports.getReply = getReply;
2165
2185
  /**
@@ -2171,7 +2191,7 @@ exports.getReply = getReply;
2171
2191
  * @param accessToken
2172
2192
  */
2173
2193
  var getReplyMessageUrl = function (messageKey, accessToken) {
2174
- return (0, exports.doGet)("/repo/v1/reply/messageUrl?messageKey=".concat(messageKey), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2194
+ return (0, exports.doGet)("/repo/v1/reply/messageUrl?messageKey=".concat(messageKey), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2175
2195
  };
2176
2196
  exports.getReplyMessageUrl = getReplyMessageUrl;
2177
2197
  /**
@@ -2182,7 +2202,7 @@ exports.getReplyMessageUrl = getReplyMessageUrl;
2182
2202
  * @param accessToken
2183
2203
  */
2184
2204
  var getThread = function (threadId, accessToken) {
2185
- return (0, exports.doGet)("/repo/v1/thread/".concat(threadId), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2205
+ return (0, exports.doGet)("/repo/v1/thread/".concat(threadId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2186
2206
  };
2187
2207
  exports.getThread = getThread;
2188
2208
  /**
@@ -2194,7 +2214,7 @@ exports.getThread = getThread;
2194
2214
  * @param accessToken
2195
2215
  */
2196
2216
  var getThreadMessageUrl = function (messageKey, accessToken) {
2197
- return (0, exports.doGet)("/repo/v1/thread/messageUrl?messageKey=".concat(messageKey), accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2217
+ return (0, exports.doGet)("/repo/v1/thread/messageUrl?messageKey=".concat(messageKey), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2198
2218
  };
2199
2219
  exports.getThreadMessageUrl = getThreadMessageUrl;
2200
2220
  /**
@@ -2206,7 +2226,7 @@ exports.getThreadMessageUrl = getThreadMessageUrl;
2206
2226
  * @param accessToken
2207
2227
  */
2208
2228
  var forumSearch = function (discussionSearchRequest, forumId, accessToken) {
2209
- return (0, exports.doPost)("/repo/v1/forum/".concat(forumId, "/search"), discussionSearchRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2229
+ return (0, exports.doPost)("/repo/v1/forum/".concat(forumId, "/search"), discussionSearchRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2210
2230
  };
2211
2231
  exports.forumSearch = forumSearch;
2212
2232
  /**
@@ -2217,7 +2237,7 @@ exports.forumSearch = forumSearch;
2217
2237
  * @param accessToken
2218
2238
  */
2219
2239
  var searchAccessApprovals = function (accessApprovalSearchRequest, accessToken) {
2220
- return (0, exports.doPost)('/repo/v1/accessApproval/search', accessApprovalSearchRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2240
+ return (0, exports.doPost)('/repo/v1/accessApproval/search', accessApprovalSearchRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2221
2241
  };
2222
2242
  exports.searchAccessApprovals = searchAccessApprovals;
2223
2243
  /**
@@ -2228,16 +2248,24 @@ exports.searchAccessApprovals = searchAccessApprovals;
2228
2248
  * https://rest-docs.synapse.org/rest/POST/dataAccessSubmission/search.html
2229
2249
  */
2230
2250
  var searchAccessSubmission = function (submissionSearchRequest, accessToken) {
2231
- return (0, exports.doPost)(APIConstants_1.ACCESS_REQUEST_SUBMISSION_SEARCH, submissionSearchRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2251
+ return (0, exports.doPost)(APIConstants_1.ACCESS_REQUEST_SUBMISSION_SEARCH, submissionSearchRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2232
2252
  };
2233
2253
  exports.searchAccessSubmission = searchAccessSubmission;
2234
2254
  /**
2235
2255
  * http://rest-docs.synapse.org/rest/POST/accessRequirement/requirementId/approvedSubmissionInfo.html
2236
2256
  */
2237
2257
  var getApprovedSubmissionInfo = function (submissionInfoPageRequest, accessToken) {
2238
- return (0, exports.doPost)("/repo/v1/accessRequirement/".concat(submissionInfoPageRequest.accessRequirementId, "/approvedSubmissionInfo"), submissionInfoPageRequest, accessToken, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2258
+ return (0, exports.doPost)((0, APIConstants_1.APPROVED_SUBMISSION_INFO)(submissionInfoPageRequest.accessRequirementId), submissionInfoPageRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2239
2259
  };
2240
2260
  exports.getApprovedSubmissionInfo = getApprovedSubmissionInfo;
2261
+ /**
2262
+ * http://rest-docs.synapse.org/rest/GET/activity/id/generated.html
2263
+ */
2264
+ var getActivityForEntity = function (entityId, versionNumber, accessToken) {
2265
+ var url = (0, APIConstants_1.ACTIVITY_FOR_ENTITY)(entityId, versionNumber ? "".concat(versionNumber) : undefined);
2266
+ return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2267
+ };
2268
+ exports.getActivityForEntity = getActivityForEntity;
2241
2269
  /**
2242
2270
  * Returns the presigned URL for a user's profile pic. Note that the presigned URL
2243
2271
  * expires after a short time, so it should be used immediately.
@@ -2247,8 +2275,22 @@ exports.getApprovedSubmissionInfo = getApprovedSubmissionInfo;
2247
2275
  */
2248
2276
  function getProfilePicPreviewPresignedUrl(userId) {
2249
2277
  return allowNotFoundError(function () {
2250
- return (0, exports.doGet)((0, APIConstants_1.PROFILE_IMAGE_PREVIEW)(userId) + "?redirect=false", undefined, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2278
+ return (0, exports.doGet)((0, APIConstants_1.PROFILE_IMAGE_PREVIEW)(userId) + "?redirect=false", undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2251
2279
  });
2252
2280
  }
2253
2281
  exports.getProfilePicPreviewPresignedUrl = getProfilePicPreviewPresignedUrl;
2282
+ function getItemsInTrashCan(accessToken, offset, limit) {
2283
+ if (offset === void 0) { offset = 0; }
2284
+ if (limit === void 0) { limit = 25; }
2285
+ return (0, exports.doGet)(APIConstants_1.TRASHCAN_VIEW + "?offset=".concat(offset, "&limit=").concat(limit), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2286
+ }
2287
+ exports.getItemsInTrashCan = getItemsInTrashCan;
2288
+ function restoreFromTrashCan(entityId, accessToken) {
2289
+ return (0, exports.doPut)((0, APIConstants_1.TRASHCAN_RESTORE)(entityId), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2290
+ }
2291
+ exports.restoreFromTrashCan = restoreFromTrashCan;
2292
+ function purgeFromTrashCan(entityId, accessToken) {
2293
+ return (0, exports.doPut)((0, APIConstants_1.TRASHCAN_PURGE)(entityId), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
2294
+ }
2295
+ exports.purgeFromTrashCan = purgeFromTrashCan;
2254
2296
  //# sourceMappingURL=SynapseClient.js.map