synapse-react-client 3.0.33 → 3.0.36
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.
- package/README.md +2 -10
- package/dist/containers/CardContainer.js +3 -1
- package/dist/containers/CardContainer.js.map +1 -1
- package/dist/containers/GenericCard.d.ts +2 -2
- package/dist/containers/GenericCard.js +1 -1
- package/dist/containers/GenericCard.js.map +1 -1
- package/dist/containers/QueryContext.d.ts +1 -1
- package/dist/containers/QueryVisualizationWrapper.js +7 -5
- package/dist/containers/QueryVisualizationWrapper.js.map +1 -1
- package/dist/containers/QueryWrapper.js +5 -10
- package/dist/containers/QueryWrapper.js.map +1 -1
- package/dist/containers/SubsectionRowRenderer.js +5 -1
- package/dist/containers/SubsectionRowRenderer.js.map +1 -1
- package/dist/containers/SynapseNavDrawer.js +1 -1
- package/dist/containers/SynapseNavDrawer.js.map +1 -1
- package/dist/containers/TableFeedCards.js +8 -4
- package/dist/containers/TableFeedCards.js.map +1 -1
- package/dist/containers/TotalQueryResults.d.ts +1 -1
- package/dist/containers/TotalQueryResults.js +11 -8
- package/dist/containers/TotalQueryResults.js.map +1 -1
- package/dist/containers/UpsetPlot.js +3 -0
- package/dist/containers/UpsetPlot.js.map +1 -1
- package/dist/containers/UserCardList.js +7 -4
- package/dist/containers/UserCardList.js.map +1 -1
- package/dist/containers/UserCardListRotate.js +3 -1
- package/dist/containers/UserCardListRotate.js.map +1 -1
- package/dist/containers/UserCardSmall.js +18 -20
- package/dist/containers/UserCardSmall.js.map +1 -1
- package/dist/containers/download_list_v2/DownloadCartPage.js +10 -5
- package/dist/containers/download_list_v2/DownloadCartPage.js.map +1 -1
- package/dist/containers/entity_finder/EntityFinder.js.map +1 -1
- package/dist/containers/entity_finder/EntityFinderHeader.d.ts +21 -0
- package/dist/containers/entity_finder/EntityFinderHeader.js +3 -0
- package/dist/containers/entity_finder/EntityFinderHeader.js.map +1 -0
- package/dist/containers/entity_finder/EntityFinderModal.d.ts +1 -0
- package/dist/containers/entity_finder/EntityFinderModal.js +32 -15
- package/dist/containers/entity_finder/EntityFinderModal.js.map +1 -1
- package/dist/containers/entity_finder/details/EntityDetailsList.d.ts +5 -4
- package/dist/containers/entity_finder/details/EntityDetailsList.js.map +1 -1
- package/dist/containers/entity_finder/details/configurations/FavoritesDetails.js +1 -1
- package/dist/containers/entity_finder/details/configurations/FavoritesDetails.js.map +1 -1
- package/dist/containers/entity_finder/details/configurations/ProjectListDetails.d.ts +3 -0
- package/dist/containers/entity_finder/details/configurations/ProjectListDetails.js +6 -2
- package/dist/containers/entity_finder/details/configurations/ProjectListDetails.js.map +1 -1
- package/dist/containers/entity_finder/details/configurations/SearchDetails.js +13 -1
- package/dist/containers/entity_finder/details/configurations/SearchDetails.js.map +1 -1
- package/dist/containers/entity_finder/details/view/DetailsView.d.ts +4 -4
- package/dist/containers/entity_finder/details/view/DetailsView.js +1 -1
- package/dist/containers/entity_finder/details/view/DetailsView.js.map +1 -1
- package/dist/containers/entity_finder/tree/EntityTree.js +4 -4
- package/dist/containers/entity_finder/tree/EntityTree.js.map +1 -1
- package/dist/containers/entity_finder/tree/VirtualizedTree.d.ts +3 -3
- package/dist/containers/entity_finder/tree/VirtualizedTree.js +26 -3
- package/dist/containers/entity_finder/tree/VirtualizedTree.js.map +1 -1
- package/dist/containers/home_page/featured_tools/FeaturedToolsList.js +10 -5
- package/dist/containers/home_page/featured_tools/FeaturedToolsList.js.map +1 -1
- package/dist/containers/home_page/goals/Goals.js +9 -1
- package/dist/containers/home_page/goals/Goals.js.map +1 -1
- package/dist/containers/home_page/programs/Programs.js +13 -6
- package/dist/containers/home_page/programs/Programs.js.map +1 -1
- package/dist/containers/home_page/project_view_carousel/ProjectViewCarousel.js +9 -4
- package/dist/containers/home_page/project_view_carousel/ProjectViewCarousel.js.map +1 -1
- package/dist/containers/home_page/resources/Resources.js +3 -0
- package/dist/containers/home_page/resources/Resources.js.map +1 -1
- package/dist/containers/oauth/CreateOAuthClient.d.ts +12 -0
- package/dist/containers/oauth/CreateOAuthClient.js +204 -0
- package/dist/containers/oauth/CreateOAuthClient.js.map +1 -0
- package/dist/containers/oauth/OAuthManagement.d.ts +2 -0
- package/dist/containers/oauth/OAuthManagement.js +128 -0
- package/dist/containers/oauth/OAuthManagement.js.map +1 -0
- package/dist/containers/query_wrapper_plot_nav/QueryWrapperPlotNav.js +3 -5
- package/dist/containers/query_wrapper_plot_nav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/containers/synapse_table_functions/SynapseTableCell.d.ts +2 -2
- package/dist/containers/synapse_table_functions/SynapseTableCell.js.map +1 -1
- package/dist/containers/table/StandaloneQueryWrapper.js +1 -1
- package/dist/containers/table/StandaloneQueryWrapper.js.map +1 -1
- package/dist/containers/table/SynapseTable.d.ts +0 -7
- package/dist/containers/table/SynapseTable.js +5 -32
- package/dist/containers/table/SynapseTable.js.map +1 -1
- package/dist/containers/table/TopLevelControls.js +19 -18
- package/dist/containers/table/TopLevelControls.js.map +1 -1
- package/dist/containers/table/datasets/DatasetItemsEditor.js +1 -1
- package/dist/containers/table/datasets/DatasetItemsEditor.js.map +1 -1
- package/dist/containers/table/table-top/ColumnSelection.js +2 -6
- package/dist/containers/table/table-top/ColumnSelection.js.map +1 -1
- package/dist/containers/widgets/ElementWithTooltip.js +2 -8
- package/dist/containers/widgets/ElementWithTooltip.js.map +1 -1
- package/dist/containers/widgets/Range.d.ts +3 -3
- package/dist/containers/widgets/Range.js +1 -1
- package/dist/containers/widgets/Range.js.map +1 -1
- package/dist/containers/widgets/RangeSlider.d.ts +1 -1
- package/dist/containers/widgets/RangeSlider.js.map +1 -1
- package/dist/containers/widgets/facet-nav/FacetNav.d.ts +0 -1
- package/dist/containers/widgets/facet-nav/FacetNav.js +10 -10
- package/dist/containers/widgets/facet-nav/FacetNav.js.map +1 -1
- package/dist/containers/widgets/query-filter/QueryFilter.js +0 -1
- package/dist/containers/widgets/query-filter/QueryFilter.js.map +1 -1
- package/dist/style/base/_core.scss +8 -2
- package/dist/style/bootstrap4_backports/_base-import.scss +2 -0
- package/dist/style/bootstrap4_backports/_overrides.scss +7 -2
- package/dist/style/components/_column-selection.scss +0 -16
- package/dist/style/components/_element-with-tooltip.scss +0 -28
- package/dist/style/components/_query-filter.scss +1 -2
- package/dist/style/components/_query-wrapper-plot-nav.scss +59 -70
- package/dist/style/components/_total-query-results.scss +1 -31
- package/dist/style/components/entity_finder/_tree-node-browse.scss +2 -1
- package/dist/style/components/entity_finder/_tree-view.scss +0 -3
- package/dist/style/main.css +66 -191
- package/dist/umd/synapse-react-client.development.css +69 -195
- package/dist/umd/synapse-react-client.development.css.map +2 -2
- package/dist/umd/synapse-react-client.development.js +2852 -2342
- package/dist/umd/synapse-react-client.development.js.map +3 -3
- package/dist/umd/synapse-react-client.production.min.css +1 -1
- package/dist/umd/synapse-react-client.production.min.js +85 -85
- package/dist/umd.index.d.ts +1 -0
- package/dist/umd.index.js +2 -0
- package/dist/umd.index.js.map +1 -1
- package/dist/utils/SynapseClient.d.ts +14 -6
- package/dist/utils/SynapseClient.js +209 -214
- package/dist/utils/SynapseClient.js.map +1 -1
- package/dist/utils/functions/EntityTypeUtils.d.ts +1 -0
- package/dist/utils/functions/EntityTypeUtils.js +36 -7
- package/dist/utils/functions/EntityTypeUtils.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/user/useFavorites.d.ts +3 -2
- package/dist/utils/hooks/SynapseAPI/user/useFavorites.js +13 -6
- package/dist/utils/hooks/SynapseAPI/user/useFavorites.js.map +1 -1
- package/dist/utils/synapseTypes/Entity/Entity.d.ts +8 -5
- package/dist/utils/synapseTypes/Entity/Entity.js +5 -1
- package/dist/utils/synapseTypes/Entity/Entity.js.map +1 -1
- package/dist/utils/synapseTypes/FavoriteSortBy.d.ts +2 -0
- package/dist/utils/synapseTypes/FavoriteSortBy.js +3 -0
- package/dist/utils/synapseTypes/FavoriteSortBy.js.map +1 -0
- package/dist/utils/synapseTypes/OAuthClient.d.ts +8 -0
- package/dist/utils/synapseTypes/OAuthClient.js.map +1 -1
- package/dist/utils/synapseTypes/Table/QueryResult.d.ts +1 -1
- package/package.json +1 -5
- package/dist/containers/query_wrapper_plot_nav/QueryFilterToggleButton.d.ts +0 -3
- package/dist/containers/query_wrapper_plot_nav/QueryFilterToggleButton.js +0 -25
- package/dist/containers/query_wrapper_plot_nav/QueryFilterToggleButton.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.
|
|
5
|
-
exports.
|
|
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 = 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,
|
|
150
|
-
|
|
151
|
-
|
|
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
|
-
|
|
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,
|
|
171
|
-
|
|
172
|
-
|
|
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
|
-
|
|
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,
|
|
189
|
-
|
|
190
|
-
|
|
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
|
-
|
|
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,
|
|
207
|
-
|
|
208
|
-
|
|
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
|
-
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,7 +594,7 @@ 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,
|
|
597
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
621
598
|
};
|
|
622
599
|
exports.getEntity = getEntity;
|
|
623
600
|
var getEntityHeadersByIds = function (entityIds, accessToken) {
|
|
@@ -642,7 +619,7 @@ var getEntityHeaders = function (references, accessToken) {
|
|
|
642
619
|
else
|
|
643
620
|
return reference;
|
|
644
621
|
});
|
|
645
|
-
return (0, exports.doPost)(APIConstants_1.ENTITY_HEADERS, { references: fixedReferences }, accessToken,
|
|
622
|
+
return (0, exports.doPost)(APIConstants_1.ENTITY_HEADERS, { references: fixedReferences }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
646
623
|
};
|
|
647
624
|
exports.getEntityHeaders = getEntityHeaders;
|
|
648
625
|
/**
|
|
@@ -650,22 +627,22 @@ exports.getEntityHeaders = getEntityHeaders;
|
|
|
650
627
|
* https://rest-docs.synapse.org/rest/GET/entity/id/type.html
|
|
651
628
|
*/
|
|
652
629
|
var getEntityHeader = function (entityId, accessToken) {
|
|
653
|
-
return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/type"), accessToken,
|
|
630
|
+
return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/type"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
654
631
|
};
|
|
655
632
|
exports.getEntityHeader = getEntityHeader;
|
|
656
633
|
var updateEntity = function (entity, accessToken) {
|
|
657
634
|
if (accessToken === void 0) { accessToken = undefined; }
|
|
658
635
|
var url = "/repo/v1/entity/".concat(entity.id);
|
|
659
|
-
return (0, exports.doPut)(url, entity, accessToken,
|
|
636
|
+
return (0, exports.doPut)(url, entity, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
660
637
|
};
|
|
661
638
|
exports.updateEntity = updateEntity;
|
|
662
639
|
var deleteEntity = function (accessToken, entityId) {
|
|
663
640
|
if (accessToken === void 0) { accessToken = undefined; }
|
|
664
|
-
return (0, exports.doDelete)((0, APIConstants_1.ENTITY_ID)(entityId), accessToken,
|
|
641
|
+
return (0, exports.doDelete)((0, APIConstants_1.ENTITY_ID)(entityId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
665
642
|
};
|
|
666
643
|
exports.deleteEntity = deleteEntity;
|
|
667
644
|
var getEntityBundleV2 = function (entityId, requestObject, version, accessToken) {
|
|
668
|
-
return (0, exports.doPost)((0, APIConstants_1.ENTITY_BUNDLE_V2)(entityId, version), requestObject, accessToken,
|
|
645
|
+
return (0, exports.doPost)((0, APIConstants_1.ENTITY_BUNDLE_V2)(entityId, version), requestObject, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
669
646
|
};
|
|
670
647
|
exports.getEntityBundleV2 = getEntityBundleV2;
|
|
671
648
|
/**
|
|
@@ -683,27 +660,33 @@ var getEntityWiki = function (accessToken, ownerId, wikiId, objectType) {
|
|
|
683
660
|
if (objectType === void 0) { objectType = synapseTypes_1.ObjectType.ENTITY; }
|
|
684
661
|
var objectTypeString = getObjectTypeToString(objectType);
|
|
685
662
|
var url = "/repo/v1/".concat(objectTypeString === null || objectTypeString === void 0 ? void 0 : objectTypeString.toLocaleLowerCase(), "/").concat(ownerId, "/wiki/").concat(wikiId);
|
|
686
|
-
return (0, exports.doGet)(url, accessToken,
|
|
663
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
687
664
|
};
|
|
688
665
|
exports.getEntityWiki = getEntityWiki;
|
|
689
666
|
/**
|
|
690
667
|
* Returns synapse user favorites list given their access token
|
|
691
668
|
* https://rest-docs.synapse.org/rest/GET/favorite.html
|
|
692
669
|
*/
|
|
693
|
-
|
|
670
|
+
function getUserFavorites(accessToken, offset, limit, sort, sortDirection) {
|
|
694
671
|
if (offset === void 0) { offset = 0; }
|
|
695
672
|
if (limit === void 0) { limit = 200; }
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
673
|
+
if (sort === void 0) { sort = 'NAME'; }
|
|
674
|
+
if (sortDirection === void 0) { sortDirection = 'ASC'; }
|
|
675
|
+
var params = new URLSearchParams();
|
|
676
|
+
params.set('offset', offset.toString());
|
|
677
|
+
params.set('limit', limit.toString());
|
|
678
|
+
params.set('sort', sort);
|
|
679
|
+
params.set('sortDirection', sortDirection);
|
|
680
|
+
var url = "".concat(APIConstants_1.FAVORITES, "?").concat(params.toString());
|
|
681
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
682
|
+
}
|
|
700
683
|
exports.getUserFavorites = getUserFavorites;
|
|
701
684
|
/**
|
|
702
685
|
* Remove a favorite
|
|
703
686
|
* http://rest-docs.synapse.org/rest/DELETE/favorite/id.html
|
|
704
687
|
*/
|
|
705
688
|
var removeUserFavorite = function (entityId, accessToken) {
|
|
706
|
-
return (0, exports.doDelete)("/repo/v1/favorite/".concat(entityId), accessToken,
|
|
689
|
+
return (0, exports.doDelete)("/repo/v1/favorite/".concat(entityId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
707
690
|
};
|
|
708
691
|
exports.removeUserFavorite = removeUserFavorite;
|
|
709
692
|
/**
|
|
@@ -714,7 +697,7 @@ var getUserChallenges = function (accessToken, userId, offset, limit) {
|
|
|
714
697
|
if (offset === void 0) { offset = 0; }
|
|
715
698
|
if (limit === void 0) { limit = 200; }
|
|
716
699
|
var url = "/repo/v1/challenge?participantId=".concat(userId, "&offset=").concat(offset, "&limit=").concat(limit);
|
|
717
|
-
return (0, exports.doGet)(url, accessToken,
|
|
700
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
718
701
|
};
|
|
719
702
|
exports.getUserChallenges = getUserChallenges;
|
|
720
703
|
/**
|
|
@@ -726,7 +709,7 @@ var getUserTeamList = function (accessToken, userId, offset, limit) {
|
|
|
726
709
|
if (offset === void 0) { offset = 0; }
|
|
727
710
|
if (limit === void 0) { limit = 200; }
|
|
728
711
|
var url = "/repo/v1/user/".concat(userId, "/team?offset=").concat(offset, "&limit=").concat(limit);
|
|
729
|
-
return (0, exports.doGet)(url, accessToken,
|
|
712
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
730
713
|
};
|
|
731
714
|
exports.getUserTeamList = getUserTeamList;
|
|
732
715
|
/**
|
|
@@ -743,7 +726,7 @@ var getTeamList = function (accessToken, id, fragment, limit, offset) {
|
|
|
743
726
|
if (limit === void 0) { limit = 10; }
|
|
744
727
|
if (offset === void 0) { offset = 0; }
|
|
745
728
|
var url = "/repo/v1/teamMembers/".concat(id, "?limit=").concat(limit, "&offset=").concat(offset).concat(fragment ? "&fragment=".concat(fragment) : '');
|
|
746
|
-
return (0, exports.doGet)(url, accessToken,
|
|
729
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
747
730
|
};
|
|
748
731
|
exports.getTeamList = getTeamList;
|
|
749
732
|
/**
|
|
@@ -754,7 +737,7 @@ exports.getTeamList = getTeamList;
|
|
|
754
737
|
**/
|
|
755
738
|
var getWikiPageKeyForEntity = function (accessToken, ownerId) {
|
|
756
739
|
var url = "/repo/v1/entity/".concat(ownerId, "/wikikey");
|
|
757
|
-
return (0, exports.doGet)(url, accessToken,
|
|
740
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
758
741
|
};
|
|
759
742
|
exports.getWikiPageKeyForEntity = getWikiPageKeyForEntity;
|
|
760
743
|
/**
|
|
@@ -765,26 +748,26 @@ exports.getWikiPageKeyForEntity = getWikiPageKeyForEntity;
|
|
|
765
748
|
**/
|
|
766
749
|
var getWikiPageKeyForAccessRequirement = function (accessToken, ownerId) {
|
|
767
750
|
var url = (0, APIConstants_1.ACCESS_REQUIREMENT_WIKI_PAGE_KEY)(ownerId);
|
|
768
|
-
return (0, exports.doGet)(url, accessToken,
|
|
751
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
769
752
|
};
|
|
770
753
|
exports.getWikiPageKeyForAccessRequirement = getWikiPageKeyForAccessRequirement;
|
|
771
754
|
var getWikiAttachmentsFromEntity = function (accessToken, id, wikiId, objectType) {
|
|
772
755
|
if (objectType === void 0) { objectType = synapseTypes_1.ObjectType.ENTITY; }
|
|
773
756
|
var objectTypeString = getObjectTypeToString(objectType);
|
|
774
757
|
var url = "/repo/v1/".concat(objectTypeString.toLocaleLowerCase(), "/").concat(id, "/wiki2/").concat(wikiId, "/attachmenthandles");
|
|
775
|
-
return (0, exports.doGet)(url, accessToken,
|
|
758
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
776
759
|
};
|
|
777
760
|
exports.getWikiAttachmentsFromEntity = getWikiAttachmentsFromEntity;
|
|
778
761
|
var getWikiAttachmentsFromEvaluation = function (accessToken, id, wikiId) {
|
|
779
762
|
var url = "/repo/v1/evaluation/".concat(id, "/wiki/").concat(wikiId, "/attachmenthandles");
|
|
780
|
-
return (0, exports.doGet)(url, accessToken,
|
|
763
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
781
764
|
};
|
|
782
765
|
exports.getWikiAttachmentsFromEvaluation = getWikiAttachmentsFromEvaluation;
|
|
783
766
|
var getPresignedUrlForWikiAttachment = function (accessToken, id, wikiId, fileName, objectType) {
|
|
784
767
|
if (objectType === void 0) { objectType = synapseTypes_1.ObjectType.ENTITY; }
|
|
785
768
|
var objectTypeString = getObjectTypeToString(objectType);
|
|
786
769
|
var url = "/repo/v1/".concat(objectTypeString.toLocaleLowerCase(), "/").concat(id, "/wiki2/").concat(wikiId, "/attachment?fileName=").concat(fileName, "&redirect=false");
|
|
787
|
-
return (0, exports.doGet)(url, accessToken,
|
|
770
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
788
771
|
};
|
|
789
772
|
exports.getPresignedUrlForWikiAttachment = getPresignedUrlForWikiAttachment;
|
|
790
773
|
var isInSynapseExperimentalMode = function () {
|
|
@@ -827,16 +810,15 @@ var setAccessTokenCookie = function (token, sessionCallback) { return tslib_1.__
|
|
|
827
810
|
case 3:
|
|
828
811
|
sessionCallback();
|
|
829
812
|
return [3 /*break*/, 5];
|
|
830
|
-
case 4:
|
|
831
|
-
|
|
832
|
-
|
|
813
|
+
case 4:
|
|
814
|
+
// will set cookie in the http header
|
|
815
|
+
return [2 /*return*/, (0, exports.doPost)('Portal/sessioncookie', { sessionToken: token }, undefined, getEndpoint_1.BackendDestinationEnum.PORTAL_ENDPOINT, { credentials: 'include' })
|
|
833
816
|
.then(function (_) {
|
|
834
817
|
sessionCallback();
|
|
835
818
|
})
|
|
836
819
|
.catch(function (err) {
|
|
837
820
|
console.error('Error on setting access token ', err);
|
|
838
|
-
});
|
|
839
|
-
_a.label = 5;
|
|
821
|
+
})];
|
|
840
822
|
case 5: return [2 /*return*/];
|
|
841
823
|
}
|
|
842
824
|
});
|
|
@@ -851,7 +833,7 @@ var getAccessTokenFromCookie = function () { return tslib_1.__awaiter(void 0, vo
|
|
|
851
833
|
if (exports.IS_OUTSIDE_SYNAPSE_ORG) {
|
|
852
834
|
return [2 /*return*/, Promise.resolve(cookies.get(exports.ACCESS_TOKEN_COOKIE_KEY))];
|
|
853
835
|
}
|
|
854
|
-
return [2 /*return*/, (0, exports.doGet)('Portal/sessioncookie?validate=true', undefined,
|
|
836
|
+
return [2 /*return*/, (0, exports.doGet)('Portal/sessioncookie?validate=true', undefined, getEndpoint_1.BackendDestinationEnum.PORTAL_ENDPOINT, { credentials: 'include' })];
|
|
855
837
|
});
|
|
856
838
|
}); };
|
|
857
839
|
exports.getAccessTokenFromCookie = getAccessTokenFromCookie;
|
|
@@ -861,7 +843,7 @@ var getUseUtcTimeFromCookie = function () {
|
|
|
861
843
|
exports.getUseUtcTimeFromCookie = getUseUtcTimeFromCookie;
|
|
862
844
|
var getPrincipalAliasRequest = function (accessToken, alias, type) {
|
|
863
845
|
var url = '/repo/v1/principal/alias';
|
|
864
|
-
return (0, exports.doPost)(url, { alias: alias, type: type }, accessToken,
|
|
846
|
+
return (0, exports.doPost)(url, { alias: alias, type: type }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
865
847
|
};
|
|
866
848
|
exports.getPrincipalAliasRequest = getPrincipalAliasRequest;
|
|
867
849
|
/*
|
|
@@ -1013,7 +995,7 @@ var processFilePart = function (partNumber, multipartUploadStatus, accessToken,
|
|
|
1013
995
|
partNumbers: [partNumber],
|
|
1014
996
|
};
|
|
1015
997
|
var presignedUrlUrl = "/file/v1/file/multipart/".concat(uploadId, "/presigned/url/batch");
|
|
1016
|
-
(0, exports.doPost)(presignedUrlUrl, presignedUploadUrlRequest, accessToken,
|
|
998
|
+
(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 () {
|
|
1017
999
|
var presignedUrl, startByte, endByte, fileSlice;
|
|
1018
1000
|
return tslib_1.__generator(this, function (_a) {
|
|
1019
1001
|
switch (_a.label) {
|
|
@@ -1033,7 +1015,7 @@ var processFilePart = function (partNumber, multipartUploadStatus, accessToken,
|
|
|
1033
1015
|
// uploaded the part. calculate md5 of the part and add the part to the upload
|
|
1034
1016
|
calculateMd5(fileSlice).then(function (md5) {
|
|
1035
1017
|
var addPartUrl = "/file/v1/file/multipart/".concat(uploadId, "/add/").concat(partNumber, "?partMD5Hex=").concat(md5);
|
|
1036
|
-
(0, exports.doPut)(addPartUrl, undefined, accessToken,
|
|
1018
|
+
(0, exports.doPut)(addPartUrl, undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (addPartResponse) {
|
|
1037
1019
|
if (addPartResponse.addPartState === 'ADD_SUCCESS') {
|
|
1038
1020
|
// done with this part!
|
|
1039
1021
|
multipartUploadStatus.clientSidePartsState[partNumber - 1] = true;
|
|
@@ -1058,7 +1040,7 @@ var checkUploadComplete = function (status, fileHandleName, accessToken, fileUpl
|
|
|
1058
1040
|
return v;
|
|
1059
1041
|
})) {
|
|
1060
1042
|
var url = "/file/v1/file/multipart/".concat(status.uploadId, "/complete");
|
|
1061
|
-
(0, exports.doPut)(url, undefined, accessToken,
|
|
1043
|
+
(0, exports.doPut)(url, undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)
|
|
1062
1044
|
.then(function (newStatus) {
|
|
1063
1045
|
// success!
|
|
1064
1046
|
fileUploadResolve({
|
|
@@ -1097,7 +1079,7 @@ var uploadFilePart = function (presignedUrl, file, contentType) { return tslib_1
|
|
|
1097
1079
|
}); };
|
|
1098
1080
|
var startMultipartUpload = function (accessToken, fileName, file, request, fileUploadResolve, fileUploadReject) {
|
|
1099
1081
|
var url = '/file/v1/file/multipart';
|
|
1100
|
-
(0, exports.doPost)(url, request, accessToken,
|
|
1082
|
+
(0, exports.doPost)(url, request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)
|
|
1101
1083
|
.then(function (status) {
|
|
1102
1084
|
// started the upload
|
|
1103
1085
|
// keep track of the part state client-side
|
|
@@ -1211,7 +1193,7 @@ var addFileToDownloadListV2 = function (fileEntityId, versionNumber, accessToken
|
|
|
1211
1193
|
var request = {
|
|
1212
1194
|
batchToAdd: [{ fileEntityId: fileEntityId, versionNumber: versionNumber }],
|
|
1213
1195
|
};
|
|
1214
|
-
return (0, exports.doPost)('/repo/v1/download/list/add', request, accessToken,
|
|
1196
|
+
return (0, exports.doPost)('/repo/v1/download/list/add', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1215
1197
|
};
|
|
1216
1198
|
exports.addFileToDownloadListV2 = addFileToDownloadListV2;
|
|
1217
1199
|
/**
|
|
@@ -1227,7 +1209,7 @@ var createPackageFromDownloadListV2 = function (zipFileName, accessToken) { retu
|
|
|
1227
1209
|
includeManifest: true,
|
|
1228
1210
|
concreteType: 'org.sagebionetworks.repo.model.download.DownloadListPackageRequest',
|
|
1229
1211
|
};
|
|
1230
|
-
return [4 /*yield*/, (0, exports.doPost)("/repo/v1/download/list/package/async/start", request, accessToken,
|
|
1212
|
+
return [4 /*yield*/, (0, exports.doPost)("/repo/v1/download/list/package/async/start", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
|
|
1231
1213
|
case 1:
|
|
1232
1214
|
asyncJobId = _a.sent();
|
|
1233
1215
|
return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/download/list/package/async/get/".concat(asyncJobId.token), accessToken)];
|
|
@@ -1249,7 +1231,7 @@ var createManifestFromDownloadListV2 = function (accessToken) {
|
|
|
1249
1231
|
csvTableDescriptor: {},
|
|
1250
1232
|
concreteType: 'org.sagebionetworks.repo.model.download.DownloadListManifestRequest',
|
|
1251
1233
|
};
|
|
1252
|
-
return [4 /*yield*/, (0, exports.doPost)("/repo/v1/download/list/manifest/async/start", request, accessToken,
|
|
1234
|
+
return [4 /*yield*/, (0, exports.doPost)("/repo/v1/download/list/manifest/async/start", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
|
|
1253
1235
|
case 1:
|
|
1254
1236
|
asyncJobId = _a.sent();
|
|
1255
1237
|
return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/download/list/manifest/async/get/".concat(asyncJobId.token), accessToken)];
|
|
@@ -1268,7 +1250,7 @@ var addFilesToDownloadListV2 = function (request, accessToken) {
|
|
|
1268
1250
|
var asyncJobId;
|
|
1269
1251
|
return tslib_1.__generator(this, function (_a) {
|
|
1270
1252
|
switch (_a.label) {
|
|
1271
|
-
case 0: return [4 /*yield*/, (0, exports.doPost)('/repo/v1/download/list/add/async/start', request, accessToken,
|
|
1253
|
+
case 0: return [4 /*yield*/, (0, exports.doPost)('/repo/v1/download/list/add/async/start', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
|
|
1272
1254
|
case 1:
|
|
1273
1255
|
asyncJobId = _a.sent();
|
|
1274
1256
|
return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/download/list/add/async/get/".concat(asyncJobId.token), accessToken)];
|
|
@@ -1282,7 +1264,7 @@ exports.addFilesToDownloadListV2 = addFilesToDownloadListV2;
|
|
|
1282
1264
|
* https://rest-docs.synapse.org/rest/POST/entity/id/acl.html
|
|
1283
1265
|
*/
|
|
1284
1266
|
var createACL = function (entityId, acl, accessToken) {
|
|
1285
|
-
return (0, exports.doPost)("/repo/v1/entity/".concat(entityId, "/acl"), acl, accessToken,
|
|
1267
|
+
return (0, exports.doPost)("/repo/v1/entity/".concat(entityId, "/acl"), acl, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1286
1268
|
};
|
|
1287
1269
|
exports.createACL = createACL;
|
|
1288
1270
|
/**
|
|
@@ -1290,11 +1272,11 @@ exports.createACL = createACL;
|
|
|
1290
1272
|
* https://rest-docs.synapse.org/rest/POST/evaluation/submission.html
|
|
1291
1273
|
*/
|
|
1292
1274
|
var submitToEvaluation = function (submission, etag, accessToken) {
|
|
1293
|
-
return (0, exports.doPost)("/repo/v1/evaluation/submission?etag=".concat(etag), submission, accessToken,
|
|
1275
|
+
return (0, exports.doPost)("/repo/v1/evaluation/submission?etag=".concat(etag), submission, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1294
1276
|
};
|
|
1295
1277
|
exports.submitToEvaluation = submitToEvaluation;
|
|
1296
1278
|
var getEvaluationPermissions = function (evalId, accessToken) {
|
|
1297
|
-
return (0, exports.doGet)("/repo/v1/evaluation/".concat(evalId, "/permissions"), accessToken,
|
|
1279
|
+
return (0, exports.doGet)("/repo/v1/evaluation/".concat(evalId, "/permissions"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1298
1280
|
};
|
|
1299
1281
|
exports.getEvaluationPermissions = getEvaluationPermissions;
|
|
1300
1282
|
/**
|
|
@@ -1307,7 +1289,7 @@ var getEvaluation = function (evalId, accessToken) {
|
|
|
1307
1289
|
// without an evalId is a valid API that returns a different API response
|
|
1308
1290
|
return Promise.reject(new Error('evalId is empty'));
|
|
1309
1291
|
}
|
|
1310
|
-
return (0, exports.doGet)((0, APIConstants_1.EVALUATION_BY_ID)(evalId), accessToken,
|
|
1292
|
+
return (0, exports.doGet)((0, APIConstants_1.EVALUATION_BY_ID)(evalId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1311
1293
|
};
|
|
1312
1294
|
exports.getEvaluation = getEvaluation;
|
|
1313
1295
|
/**
|
|
@@ -1320,7 +1302,7 @@ var updateEvaluation = function (evaluation, accessToken) {
|
|
|
1320
1302
|
// without an evalId is a valid API that returns a different API response
|
|
1321
1303
|
return Promise.reject(new Error('evaluation does not have an ID'));
|
|
1322
1304
|
}
|
|
1323
|
-
return (0, exports.doPut)((0, APIConstants_1.EVALUATION_BY_ID)(evaluation.id), evaluation, accessToken,
|
|
1305
|
+
return (0, exports.doPut)((0, APIConstants_1.EVALUATION_BY_ID)(evaluation.id), evaluation, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1324
1306
|
};
|
|
1325
1307
|
exports.updateEvaluation = updateEvaluation;
|
|
1326
1308
|
/**
|
|
@@ -1328,7 +1310,7 @@ exports.updateEvaluation = updateEvaluation;
|
|
|
1328
1310
|
* https://rest-docs.synapse.org/rest/POST/evaluation.html
|
|
1329
1311
|
*/
|
|
1330
1312
|
var createEvaluation = function (evaluation, accessToken) {
|
|
1331
|
-
return (0, exports.doPost)(APIConstants_1.EVALUATION, evaluation, accessToken,
|
|
1313
|
+
return (0, exports.doPost)(APIConstants_1.EVALUATION, evaluation, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1332
1314
|
};
|
|
1333
1315
|
exports.createEvaluation = createEvaluation;
|
|
1334
1316
|
/**
|
|
@@ -1336,7 +1318,7 @@ exports.createEvaluation = createEvaluation;
|
|
|
1336
1318
|
* https://rest-docs.synapse.org/rest/PUT/evaluation/evalId.html
|
|
1337
1319
|
*/
|
|
1338
1320
|
var deleteEvaluation = function (evalId, accessToken) {
|
|
1339
|
-
return (0, exports.doDelete)("/repo/v1/evaluation/".concat(evalId), accessToken,
|
|
1321
|
+
return (0, exports.doDelete)("/repo/v1/evaluation/".concat(evalId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1340
1322
|
};
|
|
1341
1323
|
exports.deleteEvaluation = deleteEvaluation;
|
|
1342
1324
|
/**
|
|
@@ -1344,7 +1326,7 @@ exports.deleteEvaluation = deleteEvaluation;
|
|
|
1344
1326
|
* https://rest-docs.synapse.org/rest/GET/evaluation/evalId/round/evalRoundId.html
|
|
1345
1327
|
*/
|
|
1346
1328
|
var getEvaluationRound = function (evalId, evalRoundId, accessToken) {
|
|
1347
|
-
return (0, exports.doGet)("/repo/v1/evaluation/".concat(evalId, "/round/").concat(evalRoundId), accessToken,
|
|
1329
|
+
return (0, exports.doGet)("/repo/v1/evaluation/".concat(evalId, "/round/").concat(evalRoundId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1348
1330
|
};
|
|
1349
1331
|
exports.getEvaluationRound = getEvaluationRound;
|
|
1350
1332
|
/**
|
|
@@ -1352,7 +1334,7 @@ exports.getEvaluationRound = getEvaluationRound;
|
|
|
1352
1334
|
* https://rest-docs.synapse.org/rest/GET/evaluation/evalId/round/list.html
|
|
1353
1335
|
*/
|
|
1354
1336
|
var getEvaluationRoundsList = function (evalId, evaluationRoundListRequest, accessToken) {
|
|
1355
|
-
return (0, exports.doPost)("/repo/v1/evaluation/".concat(evalId, "/round/list"), evaluationRoundListRequest !== null && evaluationRoundListRequest !== void 0 ? evaluationRoundListRequest : {}, accessToken,
|
|
1337
|
+
return (0, exports.doPost)("/repo/v1/evaluation/".concat(evalId, "/round/list"), evaluationRoundListRequest !== null && evaluationRoundListRequest !== void 0 ? evaluationRoundListRequest : {}, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1356
1338
|
};
|
|
1357
1339
|
exports.getEvaluationRoundsList = getEvaluationRoundsList;
|
|
1358
1340
|
/**
|
|
@@ -1360,7 +1342,7 @@ exports.getEvaluationRoundsList = getEvaluationRoundsList;
|
|
|
1360
1342
|
* https://rest-docs.synapse.org/rest/POST/evaluation/evalId/round/evalRoundId.html
|
|
1361
1343
|
*/
|
|
1362
1344
|
var createEvaluationRound = function (evaluationRound, accessToken) {
|
|
1363
|
-
return (0, exports.doPost)("/repo/v1/evaluation/".concat(evaluationRound.evaluationId, "/round"), evaluationRound, accessToken,
|
|
1345
|
+
return (0, exports.doPost)("/repo/v1/evaluation/".concat(evaluationRound.evaluationId, "/round"), evaluationRound, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1364
1346
|
};
|
|
1365
1347
|
exports.createEvaluationRound = createEvaluationRound;
|
|
1366
1348
|
/**
|
|
@@ -1368,7 +1350,7 @@ exports.createEvaluationRound = createEvaluationRound;
|
|
|
1368
1350
|
* https://rest-docs.synapse.org/rest/PUT/evaluation/evalId/round/evalRoundId.html
|
|
1369
1351
|
*/
|
|
1370
1352
|
var updateEvaluationRound = function (evaluationRound, accessToken) {
|
|
1371
|
-
return (0, exports.doPut)("/repo/v1/evaluation/".concat(evaluationRound.evaluationId, "/round/").concat(evaluationRound.id), evaluationRound, accessToken,
|
|
1353
|
+
return (0, exports.doPut)("/repo/v1/evaluation/".concat(evaluationRound.evaluationId, "/round/").concat(evaluationRound.id), evaluationRound, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1372
1354
|
};
|
|
1373
1355
|
exports.updateEvaluationRound = updateEvaluationRound;
|
|
1374
1356
|
/**
|
|
@@ -1376,7 +1358,7 @@ exports.updateEvaluationRound = updateEvaluationRound;
|
|
|
1376
1358
|
* https://rest-docs.synapse.org/rest/DELETE/evaluation/evalId/round/evalRoundId.html
|
|
1377
1359
|
*/
|
|
1378
1360
|
var deleteEvaluationRound = function (evalId, evalRoundId, accessToken) {
|
|
1379
|
-
return (0, exports.doDelete)("/repo/v1/evaluation/".concat(evalId, "/round/").concat(evalRoundId), accessToken,
|
|
1361
|
+
return (0, exports.doDelete)("/repo/v1/evaluation/".concat(evalId, "/round/").concat(evalRoundId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1380
1362
|
};
|
|
1381
1363
|
exports.deleteEvaluationRound = deleteEvaluationRound;
|
|
1382
1364
|
/**
|
|
@@ -1384,7 +1366,7 @@ exports.deleteEvaluationRound = deleteEvaluationRound;
|
|
|
1384
1366
|
* https://rest-docs.synapse.org/rest/GET/evaluation/submission/query.html
|
|
1385
1367
|
*/
|
|
1386
1368
|
var getEvaluationSubmissions = function (query, accessToken) {
|
|
1387
|
-
return (0, exports.doGet)("/repo/v1/evaluation/submission/query?query=".concat(encodeURI(query)), accessToken,
|
|
1369
|
+
return (0, exports.doGet)("/repo/v1/evaluation/submission/query?query=".concat(encodeURI(query)), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1388
1370
|
};
|
|
1389
1371
|
exports.getEvaluationSubmissions = getEvaluationSubmissions;
|
|
1390
1372
|
/**
|
|
@@ -1392,8 +1374,7 @@ exports.getEvaluationSubmissions = getEvaluationSubmissions;
|
|
|
1392
1374
|
* http://rest-docs.synapse.org/rest/POST/oauth2/description.html
|
|
1393
1375
|
*/
|
|
1394
1376
|
var getOAuth2RequestDescription = function (oidcAuthRequest) {
|
|
1395
|
-
return (0, exports.doPost)('/auth/v1/oauth2/description', oidcAuthRequest, undefined,
|
|
1396
|
-
undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1377
|
+
return (0, exports.doPost)('/auth/v1/oauth2/description', oidcAuthRequest, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1397
1378
|
};
|
|
1398
1379
|
exports.getOAuth2RequestDescription = getOAuth2RequestDescription;
|
|
1399
1380
|
/**
|
|
@@ -1401,21 +1382,21 @@ exports.getOAuth2RequestDescription = getOAuth2RequestDescription;
|
|
|
1401
1382
|
* Consent persists for one year.
|
|
1402
1383
|
*/
|
|
1403
1384
|
var hasUserAuthorizedOAuthClient = function (oidcAuthRequest, accessToken) {
|
|
1404
|
-
return (0, exports.doPost)('/auth/v1/oauth2/consentcheck', oidcAuthRequest, accessToken,
|
|
1385
|
+
return (0, exports.doPost)('/auth/v1/oauth2/consentcheck', oidcAuthRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1405
1386
|
};
|
|
1406
1387
|
exports.hasUserAuthorizedOAuthClient = hasUserAuthorizedOAuthClient;
|
|
1407
1388
|
/**
|
|
1408
1389
|
* Get OAuth2 Client information (available to the public)
|
|
1409
1390
|
*/
|
|
1410
1391
|
var getOAuth2Client = function (clientId) {
|
|
1411
|
-
return (0, exports.doGet)("/auth/v1/oauth2/client/".concat(clientId), undefined,
|
|
1392
|
+
return (0, exports.doGet)("/auth/v1/oauth2/client/".concat(clientId), undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1412
1393
|
};
|
|
1413
1394
|
exports.getOAuth2Client = getOAuth2Client;
|
|
1414
1395
|
/**
|
|
1415
1396
|
List the OAuth 2.0 clients created by the current user.
|
|
1416
1397
|
*/
|
|
1417
1398
|
var getOAuth2 = function (accessToken, nextPageToken) {
|
|
1418
|
-
return (0, exports.doGet)("/auth/v1/oauth2/client".concat(nextPageToken ? '?nextPageToken=' + nextPageToken : ''), accessToken,
|
|
1399
|
+
return (0, exports.doGet)("/auth/v1/oauth2/client".concat(nextPageToken ? '?nextPageToken=' + nextPageToken : ''), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1419
1400
|
};
|
|
1420
1401
|
exports.getOAuth2 = getOAuth2;
|
|
1421
1402
|
/**
|
|
@@ -1425,7 +1406,7 @@ Note: After creating the client one must also set the client secret and have the
|
|
|
1425
1406
|
https://rest-docs.synapse.org/rest/POST/oauth2/client.html
|
|
1426
1407
|
*/
|
|
1427
1408
|
var createOAuthClient = function (request, accessToken) {
|
|
1428
|
-
return (0, exports.doPost)('/auth/v1/oauth2/client', request, accessToken,
|
|
1409
|
+
return (0, exports.doPost)('/auth/v1/oauth2/client', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1429
1410
|
};
|
|
1430
1411
|
exports.createOAuthClient = createOAuthClient;
|
|
1431
1412
|
/**
|
|
@@ -1433,7 +1414,7 @@ Delete OAuth 2.0 client
|
|
|
1433
1414
|
https://rest-docs.synapse.org/rest/DELETE/oauth2/client/id.html
|
|
1434
1415
|
*/
|
|
1435
1416
|
var deleteOAuthClient = function (id, accessToken) {
|
|
1436
|
-
return (0, exports.doDelete)("/auth/v1/oauth2/client/".concat(id), accessToken,
|
|
1417
|
+
return (0, exports.doDelete)("/auth/v1/oauth2/client/".concat(id), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1437
1418
|
};
|
|
1438
1419
|
exports.deleteOAuthClient = deleteOAuthClient;
|
|
1439
1420
|
/**
|
|
@@ -1443,15 +1424,25 @@ exports.deleteOAuthClient = deleteOAuthClient;
|
|
|
1443
1424
|
https://repo-prod.prod.sagebase.org/auth/v1/oauth2/client/{id}
|
|
1444
1425
|
*/
|
|
1445
1426
|
var updateOAuthClient = function (request, accessToken) {
|
|
1446
|
-
return (0, exports.doPut)("/auth/v1/oauth2/client/".concat(request.client_id), request, accessToken,
|
|
1427
|
+
return (0, exports.doPut)("/auth/v1/oauth2/client/".concat(request.client_id), request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1447
1428
|
};
|
|
1448
1429
|
exports.updateOAuthClient = updateOAuthClient;
|
|
1430
|
+
/**
|
|
1431
|
+
Get a secret credential to use when requesting an access token.
|
|
1432
|
+
Synapse supports 'client_secret_basic' and 'client_secret_post'.
|
|
1433
|
+
NOTE: This request will invalidate any previously issued secrets.
|
|
1434
|
+
https://docs.synapse.org/rest/POST/oauth2/client/secret/id.html
|
|
1435
|
+
*/
|
|
1436
|
+
var createOAuthClientSecret = function (accessToken, id) {
|
|
1437
|
+
return (0, exports.doPost)("/auth/v1/oauth2/client/secret/".concat(id), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1438
|
+
};
|
|
1439
|
+
exports.createOAuthClientSecret = createOAuthClientSecret;
|
|
1449
1440
|
/**
|
|
1450
1441
|
* Get OAuth2 Client information (available to the public)
|
|
1451
1442
|
*/
|
|
1452
1443
|
var getAuthenticatedOn = function (accessToken) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
1453
1444
|
return tslib_1.__generator(this, function (_a) {
|
|
1454
|
-
return [2 /*return*/, (0, exports.doGet)("/auth/v1/authenticatedOn", accessToken,
|
|
1445
|
+
return [2 /*return*/, (0, exports.doGet)("/auth/v1/authenticatedOn", accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
|
|
1455
1446
|
});
|
|
1456
1447
|
}); };
|
|
1457
1448
|
exports.getAuthenticatedOn = getAuthenticatedOn;
|
|
@@ -1462,7 +1453,7 @@ exports.getAuthenticatedOn = getAuthenticatedOn;
|
|
|
1462
1453
|
* @param endpoint
|
|
1463
1454
|
*/
|
|
1464
1455
|
var consentToOAuth2Request = function (oidcAuthRequest, accessToken) {
|
|
1465
|
-
return (0, exports.doPost)('/auth/v1/oauth2/consent', oidcAuthRequest, accessToken,
|
|
1456
|
+
return (0, exports.doPost)('/auth/v1/oauth2/consent', oidcAuthRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1466
1457
|
};
|
|
1467
1458
|
exports.consentToOAuth2Request = consentToOAuth2Request;
|
|
1468
1459
|
/***********************
|
|
@@ -1477,7 +1468,7 @@ exports.consentToOAuth2Request = consentToOAuth2Request;
|
|
|
1477
1468
|
* @param endpoint
|
|
1478
1469
|
*/
|
|
1479
1470
|
var createFormGroup = function (name, accessToken) {
|
|
1480
|
-
return (0, exports.doPost)("/repo/v1/form/group?name=".concat(encodeURI(name)), undefined, accessToken,
|
|
1471
|
+
return (0, exports.doPost)("/repo/v1/form/group?name=".concat(encodeURI(name)), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1481
1472
|
};
|
|
1482
1473
|
exports.createFormGroup = createFormGroup;
|
|
1483
1474
|
/**
|
|
@@ -1485,7 +1476,7 @@ exports.createFormGroup = createFormGroup;
|
|
|
1485
1476
|
* https://rest-docs.synapse.org/rest/GET/form/group/id/acl.html
|
|
1486
1477
|
*/
|
|
1487
1478
|
var getFormACL = function (formGroupId, accessToken) {
|
|
1488
|
-
return (0, exports.doGet)("/repo/v1/form/group/".concat(formGroupId, "/acl"), accessToken,
|
|
1479
|
+
return (0, exports.doGet)("/repo/v1/form/group/".concat(formGroupId, "/acl"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1489
1480
|
};
|
|
1490
1481
|
exports.getFormACL = getFormACL;
|
|
1491
1482
|
/**
|
|
@@ -1493,7 +1484,7 @@ exports.getFormACL = getFormACL;
|
|
|
1493
1484
|
* https://rest-docs.synapse.org/rest/PUT/form/group/id/acl.html
|
|
1494
1485
|
*/
|
|
1495
1486
|
var updateFormACL = function (formGroupId, newAcl, accessToken) {
|
|
1496
|
-
return (0, exports.doPut)("/repo/v1/form/group/".concat(formGroupId, "/acl"), newAcl, accessToken,
|
|
1487
|
+
return (0, exports.doPut)("/repo/v1/form/group/".concat(formGroupId, "/acl"), newAcl, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1497
1488
|
};
|
|
1498
1489
|
exports.updateFormACL = updateFormACL;
|
|
1499
1490
|
/**
|
|
@@ -1509,7 +1500,7 @@ var createFormData = function (formGroupId, name, dataFileHandleId, accessToken)
|
|
|
1509
1500
|
name: name,
|
|
1510
1501
|
fileHandleId: dataFileHandleId,
|
|
1511
1502
|
};
|
|
1512
|
-
return (0, exports.doPost)("/repo/v1/form/data?groupId=".concat(formGroupId), newFormData, accessToken,
|
|
1503
|
+
return (0, exports.doPost)("/repo/v1/form/data?groupId=".concat(formGroupId), newFormData, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1513
1504
|
};
|
|
1514
1505
|
exports.createFormData = createFormData;
|
|
1515
1506
|
/**
|
|
@@ -1521,7 +1512,7 @@ var updateFormData = function (formDataId, name, dataFileHandleId, accessToken)
|
|
|
1521
1512
|
name: name,
|
|
1522
1513
|
fileHandleId: dataFileHandleId,
|
|
1523
1514
|
};
|
|
1524
|
-
return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId), updatedFormData, accessToken,
|
|
1515
|
+
return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId), updatedFormData, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1525
1516
|
};
|
|
1526
1517
|
exports.updateFormData = updateFormData;
|
|
1527
1518
|
/**
|
|
@@ -1529,7 +1520,7 @@ exports.updateFormData = updateFormData;
|
|
|
1529
1520
|
* https://rest-docs.synapse.org/rest/DELETE/form/data.html
|
|
1530
1521
|
*/
|
|
1531
1522
|
var deleteFormData = function (formDataId, accessToken) {
|
|
1532
|
-
return (0, exports.doDelete)("/repo/v1/form/data/".concat(formDataId), accessToken,
|
|
1523
|
+
return (0, exports.doDelete)("/repo/v1/form/data/".concat(formDataId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1533
1524
|
};
|
|
1534
1525
|
exports.deleteFormData = deleteFormData;
|
|
1535
1526
|
/**
|
|
@@ -1537,7 +1528,7 @@ exports.deleteFormData = deleteFormData;
|
|
|
1537
1528
|
* https://rest-docs.synapse.org/rest/POST/form/data/id/submit.html
|
|
1538
1529
|
*/
|
|
1539
1530
|
var submitFormData = function (formDataId, accessToken) {
|
|
1540
|
-
return (0, exports.doPost)("/repo/v1/form/data/".concat(formDataId, "/submit"), undefined, accessToken,
|
|
1531
|
+
return (0, exports.doPost)("/repo/v1/form/data/".concat(formDataId, "/submit"), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1541
1532
|
};
|
|
1542
1533
|
exports.submitFormData = submitFormData;
|
|
1543
1534
|
/**
|
|
@@ -1546,7 +1537,7 @@ exports.submitFormData = submitFormData;
|
|
|
1546
1537
|
* https://rest-docs.synapse.org/rest/POST/form/data/list.html
|
|
1547
1538
|
*/
|
|
1548
1539
|
var listFormData = function (request, accessToken) {
|
|
1549
|
-
return (0, exports.doPost)("/repo/v1/form/data/list", request, accessToken,
|
|
1540
|
+
return (0, exports.doPost)("/repo/v1/form/data/list", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1550
1541
|
};
|
|
1551
1542
|
exports.listFormData = listFormData;
|
|
1552
1543
|
/**
|
|
@@ -1555,7 +1546,7 @@ exports.listFormData = listFormData;
|
|
|
1555
1546
|
* https://rest-docs.synapse.org/rest/POST/form/data/list/reviewer.html
|
|
1556
1547
|
*/
|
|
1557
1548
|
var listFormDataAsFormAdmin = function (request, accessToken) {
|
|
1558
|
-
return (0, exports.doPost)("/repo/v1/form/data/list/reviewer", request, accessToken,
|
|
1549
|
+
return (0, exports.doPost)("/repo/v1/form/data/list/reviewer", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1559
1550
|
};
|
|
1560
1551
|
exports.listFormDataAsFormAdmin = listFormDataAsFormAdmin;
|
|
1561
1552
|
/**
|
|
@@ -1563,7 +1554,7 @@ exports.listFormDataAsFormAdmin = listFormDataAsFormAdmin;
|
|
|
1563
1554
|
* https://rest-docs.synapse.org/rest/PUT/form/data/id/accept.html
|
|
1564
1555
|
*/
|
|
1565
1556
|
var acceptFormData = function (formDataId, accessToken) {
|
|
1566
|
-
return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId, "/accept"), undefined, accessToken,
|
|
1557
|
+
return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId, "/accept"), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1567
1558
|
};
|
|
1568
1559
|
exports.acceptFormData = acceptFormData;
|
|
1569
1560
|
/**
|
|
@@ -1574,7 +1565,7 @@ var rejectFormData = function (formDataId, reason, accessToken) {
|
|
|
1574
1565
|
var formRejection = {
|
|
1575
1566
|
reason: reason,
|
|
1576
1567
|
};
|
|
1577
|
-
return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId, "/reject"), formRejection, accessToken,
|
|
1568
|
+
return (0, exports.doPut)("/repo/v1/form/data/".concat(formDataId, "/reject"), formRejection, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1578
1569
|
};
|
|
1579
1570
|
exports.rejectFormData = rejectFormData;
|
|
1580
1571
|
/**
|
|
@@ -1583,12 +1574,12 @@ exports.rejectFormData = rejectFormData;
|
|
|
1583
1574
|
* Generic endpoint to retrieve statistics about objects. The user should have VIEW_STATISTICS access on the object referenced by the objectId in the request.
|
|
1584
1575
|
*/
|
|
1585
1576
|
var getProjectStatistics = function (request, accessToken) {
|
|
1586
|
-
return (0, exports.doPost)("/repo/v1/statistics", request, accessToken,
|
|
1577
|
+
return (0, exports.doPost)("/repo/v1/statistics", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1587
1578
|
};
|
|
1588
1579
|
exports.getProjectStatistics = getProjectStatistics;
|
|
1589
1580
|
// see https://rest-docs.synapse.org/rest/POST/restrictionInformation.html
|
|
1590
1581
|
var getRestrictionInformation = function (request, accessToken) {
|
|
1591
|
-
return (0, exports.doPost)("/repo/v1/restrictionInformation", request, accessToken,
|
|
1582
|
+
return (0, exports.doPost)("/repo/v1/restrictionInformation", request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1592
1583
|
};
|
|
1593
1584
|
exports.getRestrictionInformation = getRestrictionInformation;
|
|
1594
1585
|
/**
|
|
@@ -1606,7 +1597,7 @@ var getAccessRequirement = function (accessToken, id, limit, offset) {
|
|
|
1606
1597
|
if (limit === void 0) { limit = 50; }
|
|
1607
1598
|
if (offset === void 0) { offset = 0; }
|
|
1608
1599
|
var url = "/repo/v1/entity/".concat(id, "/accessRequirement?limit=").concat(limit, "&offset=").concat(offset);
|
|
1609
|
-
return (0, exports.doGet)(url, accessToken,
|
|
1600
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1610
1601
|
};
|
|
1611
1602
|
exports.getAccessRequirement = getAccessRequirement;
|
|
1612
1603
|
/**
|
|
@@ -1619,7 +1610,7 @@ exports.getAccessRequirement = getAccessRequirement;
|
|
|
1619
1610
|
* @returns {Promise<AccessRequirement>}
|
|
1620
1611
|
*/
|
|
1621
1612
|
var getAccessRequirementById = function (accessToken, id) {
|
|
1622
|
-
return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_BY_ID)(id), accessToken,
|
|
1613
|
+
return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_BY_ID)(id), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1623
1614
|
};
|
|
1624
1615
|
exports.getAccessRequirementById = getAccessRequirementById;
|
|
1625
1616
|
/**
|
|
@@ -1631,7 +1622,7 @@ exports.getAccessRequirementById = getAccessRequirementById;
|
|
|
1631
1622
|
var getAccessRequirementAcl = function (accessToken, id) {
|
|
1632
1623
|
// It's possible for an AR to not have an ACL, so pre-emptively handle 404
|
|
1633
1624
|
return allowNotFoundError(function () {
|
|
1634
|
-
return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_ACL)(id), accessToken,
|
|
1625
|
+
return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_ACL)(id), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1635
1626
|
});
|
|
1636
1627
|
};
|
|
1637
1628
|
exports.getAccessRequirementAcl = getAccessRequirementAcl;
|
|
@@ -1641,7 +1632,7 @@ exports.getAccessRequirementAcl = getAccessRequirementAcl;
|
|
|
1641
1632
|
* See http://rest-docs.synapse.org/rest/POST/accessRequirement/search.html
|
|
1642
1633
|
*/
|
|
1643
1634
|
var searchAccessRequirements = function (accessToken, request) {
|
|
1644
|
-
return (0, exports.doPost)(APIConstants_1.ACCESS_REQUIREMENT_SEARCH, request, accessToken,
|
|
1635
|
+
return (0, exports.doPost)(APIConstants_1.ACCESS_REQUIREMENT_SEARCH, request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1645
1636
|
};
|
|
1646
1637
|
exports.searchAccessRequirements = searchAccessRequirements;
|
|
1647
1638
|
/**
|
|
@@ -1651,7 +1642,7 @@ exports.searchAccessRequirements = searchAccessRequirements;
|
|
|
1651
1642
|
* @returns {AccessRequirementStatus}
|
|
1652
1643
|
*/
|
|
1653
1644
|
var getAccessRequirementStatus = function (accessToken, requirementId) {
|
|
1654
|
-
return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_STATUS)(requirementId), accessToken,
|
|
1645
|
+
return (0, exports.doGet)((0, APIConstants_1.ACCESS_REQUIREMENT_STATUS)(requirementId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1655
1646
|
};
|
|
1656
1647
|
exports.getAccessRequirementStatus = getAccessRequirementStatus;
|
|
1657
1648
|
/**
|
|
@@ -1666,7 +1657,7 @@ var getAllAccessRequirements = function (accessToken, id) {
|
|
|
1666
1657
|
// format function to be callable by getAllOfPaginatedService
|
|
1667
1658
|
var fn = function (limit, offset) {
|
|
1668
1659
|
var url = "/repo/v1/entity/".concat(id, "/accessRequirement?limit=").concat(limit, "&offset=").concat(offset);
|
|
1669
|
-
return (0, exports.doGet)(url, accessToken,
|
|
1660
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1670
1661
|
};
|
|
1671
1662
|
return (0, exports.getAllOfPaginatedService)(fn);
|
|
1672
1663
|
};
|
|
@@ -1682,7 +1673,7 @@ var getAccessApproval = function (accessToken, approvalId) { return tslib_1.__aw
|
|
|
1682
1673
|
var url;
|
|
1683
1674
|
return tslib_1.__generator(this, function (_a) {
|
|
1684
1675
|
url = "/repo/v1/accessApproval/".concat(approvalId);
|
|
1685
|
-
return [2 /*return*/, (0, exports.doGet)(url, accessToken,
|
|
1676
|
+
return [2 /*return*/, (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
|
|
1686
1677
|
});
|
|
1687
1678
|
}); };
|
|
1688
1679
|
exports.getAccessApproval = getAccessApproval;
|
|
@@ -1695,19 +1686,19 @@ exports.getAccessApproval = getAccessApproval;
|
|
|
1695
1686
|
*/
|
|
1696
1687
|
var postAccessApproval = function (accessToken, accessApproval) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
1697
1688
|
return tslib_1.__generator(this, function (_a) {
|
|
1698
|
-
return [2 /*return*/, (0, exports.doPost)('/repo/v1/accessApproval', accessApproval, accessToken,
|
|
1689
|
+
return [2 /*return*/, (0, exports.doPost)('/repo/v1/accessApproval', accessApproval, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
|
|
1699
1690
|
});
|
|
1700
1691
|
}); };
|
|
1701
1692
|
exports.postAccessApproval = postAccessApproval;
|
|
1702
1693
|
// https://rest-docs.synapse.org/rest/GET/download/list.html
|
|
1703
1694
|
var getDownloadList = function (accessToken) {
|
|
1704
|
-
return (0, exports.doGet)('/file/v1/download/list', accessToken,
|
|
1695
|
+
return (0, exports.doGet)('/file/v1/download/list', accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1705
1696
|
};
|
|
1706
1697
|
exports.getDownloadList = getDownloadList;
|
|
1707
1698
|
var getDownloadOrder = function (zipFileName, accessToken) {
|
|
1708
1699
|
var baseURL = '/file/v1/download/order';
|
|
1709
1700
|
var url = zipFileName ? "".concat(baseURL, "?zipFileName=").concat(zipFileName) : baseURL;
|
|
1710
|
-
return (0, exports.doPost)(url, undefined, accessToken,
|
|
1701
|
+
return (0, exports.doPost)(url, undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1711
1702
|
};
|
|
1712
1703
|
exports.getDownloadOrder = getDownloadOrder;
|
|
1713
1704
|
/**
|
|
@@ -1752,7 +1743,7 @@ var getAllOfPaginatedService = function (fn) { return tslib_1.__awaiter(void 0,
|
|
|
1752
1743
|
exports.getAllOfPaginatedService = getAllOfPaginatedService;
|
|
1753
1744
|
// https://rest-docs.synapse.org/rest/POST/download/list/remove.html
|
|
1754
1745
|
var deleteDownloadListFiles = function (list, accessToken) {
|
|
1755
|
-
return (0, exports.doPost)('/file/v1/download/list/remove', { list: list }, accessToken,
|
|
1746
|
+
return (0, exports.doPost)('/file/v1/download/list/remove', { list: list }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (data) {
|
|
1756
1747
|
(0, dispatchDownloadListChangeEvent_1.dispatchDownloadListChangeEvent)(data);
|
|
1757
1748
|
return data;
|
|
1758
1749
|
});
|
|
@@ -1760,7 +1751,7 @@ var deleteDownloadListFiles = function (list, accessToken) {
|
|
|
1760
1751
|
exports.deleteDownloadListFiles = deleteDownloadListFiles;
|
|
1761
1752
|
// https://rest-docs.synapse.org/rest/DELETE/download/list.html ?
|
|
1762
1753
|
var deleteDownloadList = function (accessToken) {
|
|
1763
|
-
return (0, exports.doDelete)('/file/v1/download/list', accessToken,
|
|
1754
|
+
return (0, exports.doDelete)('/file/v1/download/list', accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT).then(function (_) {
|
|
1764
1755
|
(0, dispatchDownloadListChangeEvent_1.dispatchDownloadListChangeEvent)(undefined);
|
|
1765
1756
|
});
|
|
1766
1757
|
};
|
|
@@ -1778,7 +1769,7 @@ var updateTable = function (tableUpdateRequest, accessToken) {
|
|
|
1778
1769
|
var asyncJobId;
|
|
1779
1770
|
return tslib_1.__generator(this, function (_a) {
|
|
1780
1771
|
switch (_a.label) {
|
|
1781
|
-
case 0: return [4 /*yield*/, (0, exports.doPost)("/repo/v1/entity/".concat(tableUpdateRequest.entityId, "/table/transaction/async/start"), tableUpdateRequest, accessToken,
|
|
1772
|
+
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)];
|
|
1782
1773
|
case 1:
|
|
1783
1774
|
asyncJobId = _a.sent();
|
|
1784
1775
|
return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/entity/".concat(tableUpdateRequest.entityId, "/table/transaction/async/get/").concat(asyncJobId.token), accessToken)];
|
|
@@ -1788,51 +1779,50 @@ var updateTable = function (tableUpdateRequest, accessToken) {
|
|
|
1788
1779
|
};
|
|
1789
1780
|
exports.updateTable = updateTable;
|
|
1790
1781
|
var getTransformSqlWithFacetsRequest = function (transformSqlWithFacetsRequest) {
|
|
1791
|
-
return (0, exports.doPost)('/repo/v1/table/sql/transform', transformSqlWithFacetsRequest, undefined,
|
|
1792
|
-
undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1782
|
+
return (0, exports.doPost)('/repo/v1/table/sql/transform', transformSqlWithFacetsRequest, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1793
1783
|
};
|
|
1794
1784
|
exports.getTransformSqlWithFacetsRequest = getTransformSqlWithFacetsRequest;
|
|
1795
1785
|
var createPersonalAccessToken = function (accessTokenGenerationRequest, accessToken) {
|
|
1796
|
-
return (0, exports.doPost)('/auth/v1/personalAccessToken', accessTokenGenerationRequest, accessToken,
|
|
1786
|
+
return (0, exports.doPost)('/auth/v1/personalAccessToken', accessTokenGenerationRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1797
1787
|
};
|
|
1798
1788
|
exports.createPersonalAccessToken = createPersonalAccessToken;
|
|
1799
1789
|
var getPersonalAccessTokenRecords = function (accessToken, nextPageToken) {
|
|
1800
|
-
return (0, exports.doGet)("/auth/v1/personalAccessToken".concat(nextPageToken ? '?nextPageToken=' + nextPageToken : ''), accessToken,
|
|
1790
|
+
return (0, exports.doGet)("/auth/v1/personalAccessToken".concat(nextPageToken ? '?nextPageToken=' + nextPageToken : ''), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1801
1791
|
};
|
|
1802
1792
|
exports.getPersonalAccessTokenRecords = getPersonalAccessTokenRecords;
|
|
1803
1793
|
var deletePersonalAccessToken = function (accessTokenId, accessToken) {
|
|
1804
|
-
return (0, exports.doDelete)("/auth/v1/personalAccessToken/".concat(accessTokenId), accessToken,
|
|
1794
|
+
return (0, exports.doDelete)("/auth/v1/personalAccessToken/".concat(accessTokenId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1805
1795
|
};
|
|
1806
1796
|
exports.deletePersonalAccessToken = deletePersonalAccessToken;
|
|
1807
1797
|
// https://rest-docs.synapse.org/rest/GET/projects.html
|
|
1808
1798
|
var getMyProjects = function (accessToken, params) {
|
|
1809
1799
|
if (params === void 0) { params = {}; }
|
|
1810
1800
|
var urlParams = new URLSearchParams((0, ObjectUtils_1.removeUndefined)(params));
|
|
1811
|
-
return (0, exports.doGet)("/repo/v1/projects?".concat(urlParams.toString()), accessToken,
|
|
1801
|
+
return (0, exports.doGet)("/repo/v1/projects?".concat(urlParams.toString()), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1812
1802
|
};
|
|
1813
1803
|
exports.getMyProjects = getMyProjects;
|
|
1814
1804
|
// http://rest-docs.synapse.org/rest/GET/projects/user/principalId.html
|
|
1815
1805
|
var getUserProjects = function (userId, params, accessToken) {
|
|
1816
1806
|
if (params === void 0) { params = {}; }
|
|
1817
1807
|
var urlParams = new URLSearchParams((0, ObjectUtils_1.removeUndefined)(params));
|
|
1818
|
-
return (0, exports.doGet)("/repo/v1/projects/user/".concat(userId, "?").concat(urlParams.toString()), accessToken,
|
|
1808
|
+
return (0, exports.doGet)("/repo/v1/projects/user/".concat(userId, "?").concat(urlParams.toString()), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1819
1809
|
};
|
|
1820
1810
|
exports.getUserProjects = getUserProjects;
|
|
1821
1811
|
// https://rest-docs.synapse.org/rest/GET/entity/id/path.html
|
|
1822
1812
|
var getEntityPath = function (entityId, accessToken) {
|
|
1823
|
-
return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/path"), accessToken,
|
|
1813
|
+
return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/path"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1824
1814
|
};
|
|
1825
1815
|
exports.getEntityPath = getEntityPath;
|
|
1826
1816
|
// https://rest-docs.synapse.org/rest/GET/entity/id/version.html
|
|
1827
1817
|
var getEntityVersions = function (entityId, accessToken, offset, limit) {
|
|
1828
1818
|
if (offset === void 0) { offset = 0; }
|
|
1829
1819
|
if (limit === void 0) { limit = 200; }
|
|
1830
|
-
return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/version?offset=").concat(offset, "&limit=").concat(limit), accessToken,
|
|
1820
|
+
return (0, exports.doGet)("/repo/v1/entity/".concat(entityId, "/version?offset=").concat(offset, "&limit=").concat(limit), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1831
1821
|
};
|
|
1832
1822
|
exports.getEntityVersions = getEntityVersions;
|
|
1833
1823
|
// https://rest-docs.synapse.org/rest/POST/search.html
|
|
1834
1824
|
var searchEntities = function (query, accessToken) {
|
|
1835
|
-
return (0, exports.doPost)('/repo/v1/search', query, accessToken,
|
|
1825
|
+
return (0, exports.doPost)('/repo/v1/search', query, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1836
1826
|
};
|
|
1837
1827
|
exports.searchEntities = searchEntities;
|
|
1838
1828
|
var getDownloadListJobResponse = function (accessToken, queryRequestDetails) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1844,7 +1834,7 @@ var getDownloadListJobResponse = function (accessToken, queryRequestDetails) { r
|
|
|
1844
1834
|
concreteType: 'org.sagebionetworks.repo.model.download.DownloadListQueryRequest',
|
|
1845
1835
|
requestDetails: queryRequestDetails,
|
|
1846
1836
|
};
|
|
1847
|
-
return [4 /*yield*/, (0, exports.doPost)('/repo/v1/download/list/query/async/start', downloadListQueryRequest, accessToken,
|
|
1837
|
+
return [4 /*yield*/, (0, exports.doPost)('/repo/v1/download/list/query/async/start', downloadListQueryRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
|
|
1848
1838
|
case 1:
|
|
1849
1839
|
asyncJobId = _a.sent();
|
|
1850
1840
|
return [4 /*yield*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, "/repo/v1/download/list/query/async/get/".concat(asyncJobId.token), accessToken)];
|
|
@@ -1859,7 +1849,7 @@ var getDownloadListJobResponse = function (accessToken, queryRequestDetails) { r
|
|
|
1859
1849
|
* http://rest-docs.synapse.org/rest/DELETE/download/list.html
|
|
1860
1850
|
*/
|
|
1861
1851
|
var clearDownloadListV2 = function (accessToken) {
|
|
1862
|
-
return (0, exports.doDelete)('/repo/v1/download/list', accessToken,
|
|
1852
|
+
return (0, exports.doDelete)('/repo/v1/download/list', accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1863
1853
|
};
|
|
1864
1854
|
exports.clearDownloadListV2 = clearDownloadListV2;
|
|
1865
1855
|
/**
|
|
@@ -1901,44 +1891,44 @@ var removeItemFromDownloadListV2 = function (item, accessToken) {
|
|
|
1901
1891
|
var request = {
|
|
1902
1892
|
batchToRemove: [item],
|
|
1903
1893
|
};
|
|
1904
|
-
return (0, exports.doPost)('/repo/v1/download/list/remove', request, accessToken,
|
|
1894
|
+
return (0, exports.doPost)('/repo/v1/download/list/remove', request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1905
1895
|
};
|
|
1906
1896
|
exports.removeItemFromDownloadListV2 = removeItemFromDownloadListV2;
|
|
1907
1897
|
// http://rest-docs.synapse.org/rest/POST/researchProject.html
|
|
1908
1898
|
var updateResearchProject = function (requestObj, accessToken) {
|
|
1909
|
-
return (0, exports.doPost)('/repo/v1/researchProject', requestObj, accessToken,
|
|
1899
|
+
return (0, exports.doPost)('/repo/v1/researchProject', requestObj, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1910
1900
|
};
|
|
1911
1901
|
exports.updateResearchProject = updateResearchProject;
|
|
1912
1902
|
// http://rest-docs.synapse.org/rest/GET/accessRequirement/requirementId/researchProjectForUpdate.html
|
|
1913
1903
|
var getResearchProject = function (requirementId, accessToken) {
|
|
1914
|
-
return (0, exports.doGet)("/repo/v1/accessRequirement/".concat(requirementId, "/researchProjectForUpdate"), accessToken,
|
|
1904
|
+
return (0, exports.doGet)("/repo/v1/accessRequirement/".concat(requirementId, "/researchProjectForUpdate"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1915
1905
|
};
|
|
1916
1906
|
exports.getResearchProject = getResearchProject;
|
|
1917
1907
|
// http://rest-docs.synapse.org/rest/GET/accessRequirement/requirementId/dataAccessRequestForUpdate.html
|
|
1918
1908
|
var getDataAccessRequestForUpdate = function (requirementId, accessToken) {
|
|
1919
|
-
return (0, exports.doGet)("/repo/v1/accessRequirement/".concat(requirementId, "/dataAccessRequestForUpdate"), accessToken,
|
|
1909
|
+
return (0, exports.doGet)("/repo/v1/accessRequirement/".concat(requirementId, "/dataAccessRequestForUpdate"), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1920
1910
|
};
|
|
1921
1911
|
exports.getDataAccessRequestForUpdate = getDataAccessRequestForUpdate;
|
|
1922
1912
|
// http://rest-docs.synapse.org/rest/GET/accessRequirement/requirementId/dataAccessRequestForUpdate.html
|
|
1923
1913
|
var updateDataAccessRequest = function (requestObj, accessToken) {
|
|
1924
|
-
return (0, exports.doPost)("/repo/v1/dataAccessRequest", requestObj, accessToken,
|
|
1914
|
+
return (0, exports.doPost)("/repo/v1/dataAccessRequest", requestObj, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1925
1915
|
};
|
|
1926
1916
|
exports.updateDataAccessRequest = updateDataAccessRequest;
|
|
1927
1917
|
// http://rest-docs.synapse.org/rest/POST/dataAccessRequest/requestId/submission.html
|
|
1928
1918
|
var submitDataAccessRequest = function (requestObj, accessToken) {
|
|
1929
|
-
return (0, exports.doPost)("/repo/v1/dataAccessRequest/".concat(requestObj.requestId, "/submission"), requestObj, accessToken,
|
|
1919
|
+
return (0, exports.doPost)("/repo/v1/dataAccessRequest/".concat(requestObj.requestId, "/submission"), requestObj, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1930
1920
|
};
|
|
1931
1921
|
exports.submitDataAccessRequest = submitDataAccessRequest;
|
|
1932
1922
|
// http://rest-docs.synapse.org/rest/PUT/dataAccessSubmission/submissionId/cancellation.html
|
|
1933
1923
|
// Cancel a submission. Only the user who created this submission can cancel it.
|
|
1934
1924
|
var cancelDataAccessRequest = function (submissionId, accessToken) {
|
|
1935
|
-
return (0, exports.doPut)("/repo/v1/dataAccessSubmission/".concat(submissionId, "/cancellation"), undefined, accessToken,
|
|
1925
|
+
return (0, exports.doPut)("/repo/v1/dataAccessSubmission/".concat(submissionId, "/cancellation"), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1936
1926
|
};
|
|
1937
1927
|
exports.cancelDataAccessRequest = cancelDataAccessRequest;
|
|
1938
1928
|
// http://rest-docs.synapse.org/rest/GET/dataAccessSubmission/submissionId.html
|
|
1939
1929
|
// 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.
|
|
1940
1930
|
var getSubmissionById = function (submissionId, accessToken) {
|
|
1941
|
-
return (0, exports.doGet)((0, APIConstants_1.DATA_ACCESS_SUBMISSION_BY_ID)(submissionId), accessToken,
|
|
1931
|
+
return (0, exports.doGet)((0, APIConstants_1.DATA_ACCESS_SUBMISSION_BY_ID)(submissionId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1942
1932
|
};
|
|
1943
1933
|
exports.getSubmissionById = getSubmissionById;
|
|
1944
1934
|
/**
|
|
@@ -1951,7 +1941,7 @@ exports.getSubmissionById = getSubmissionById;
|
|
|
1951
1941
|
* @returns
|
|
1952
1942
|
*/
|
|
1953
1943
|
var updateSubmissionStatus = function (request, accessToken) {
|
|
1954
|
-
return (0, exports.doPut)((0, APIConstants_1.DATA_ACCESS_SUBMISSION_BY_ID)(request.submissionId), request, accessToken,
|
|
1944
|
+
return (0, exports.doPut)((0, APIConstants_1.DATA_ACCESS_SUBMISSION_BY_ID)(request.submissionId), request, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1955
1945
|
};
|
|
1956
1946
|
exports.updateSubmissionStatus = updateSubmissionStatus;
|
|
1957
1947
|
/**
|
|
@@ -1964,7 +1954,7 @@ exports.updateSubmissionStatus = updateSubmissionStatus;
|
|
|
1964
1954
|
//
|
|
1965
1955
|
var getSchemaBinding = function (entityId, accessToken) {
|
|
1966
1956
|
return allowNotFoundError(function () {
|
|
1967
|
-
return (0, exports.doGet)((0, APIConstants_1.ENTITY_SCHEMA_BINDING)(entityId), accessToken,
|
|
1957
|
+
return (0, exports.doGet)((0, APIConstants_1.ENTITY_SCHEMA_BINDING)(entityId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1968
1958
|
});
|
|
1969
1959
|
};
|
|
1970
1960
|
exports.getSchemaBinding = getSchemaBinding;
|
|
@@ -1976,7 +1966,7 @@ exports.getSchemaBinding = getSchemaBinding;
|
|
|
1976
1966
|
* @returns
|
|
1977
1967
|
*/
|
|
1978
1968
|
var getSchemaValidationResults = function (entityId, accessToken) {
|
|
1979
|
-
return (0, exports.doGet)((0, APIConstants_1.ENTITY_SCHEMA_VALIDATION)(entityId), accessToken,
|
|
1969
|
+
return (0, exports.doGet)((0, APIConstants_1.ENTITY_SCHEMA_VALIDATION)(entityId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1980
1970
|
};
|
|
1981
1971
|
exports.getSchemaValidationResults = getSchemaValidationResults;
|
|
1982
1972
|
/**
|
|
@@ -1985,7 +1975,7 @@ exports.getSchemaValidationResults = getSchemaValidationResults;
|
|
|
1985
1975
|
* @returns
|
|
1986
1976
|
*/
|
|
1987
1977
|
var getSchema = function (schema$id) {
|
|
1988
|
-
return (0, exports.doGet)("".concat((0, APIConstants_1.REGISTERED_SCHEMA_ID)(schema$id)), undefined,
|
|
1978
|
+
return (0, exports.doGet)("".concat((0, APIConstants_1.REGISTERED_SCHEMA_ID)(schema$id)), undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
1989
1979
|
};
|
|
1990
1980
|
exports.getSchema = getSchema;
|
|
1991
1981
|
/**
|
|
@@ -2000,7 +1990,7 @@ var getValidationSchema = function (schema$id, accessToken) { return tslib_1.__a
|
|
|
2000
1990
|
case 0: return [4 /*yield*/, (0, exports.doPost)(APIConstants_1.SCHEMA_VALIDATION_START, {
|
|
2001
1991
|
concreteType: 'org.sagebionetworks.repo.model.schema.GetValidationSchemaRequest',
|
|
2002
1992
|
$id: schema$id,
|
|
2003
|
-
}, accessToken,
|
|
1993
|
+
}, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
|
|
2004
1994
|
case 1:
|
|
2005
1995
|
asyncJobId = _a.sent();
|
|
2006
1996
|
return [2 /*return*/, (0, exports.getAsyncResultBodyFromJobId)(asyncJobId.token, (0, APIConstants_1.SCHEMA_VALIDATION_GET)(asyncJobId.token), accessToken)];
|
|
@@ -2016,7 +2006,7 @@ exports.getValidationSchema = getValidationSchema;
|
|
|
2016
2006
|
* @returns
|
|
2017
2007
|
*/
|
|
2018
2008
|
var hasAccessToEntity = function (entityId, accessType, accessToken) {
|
|
2019
|
-
return (0, exports.doGet)("".concat((0, APIConstants_1.ENTITY_ACCESS)(entityId), "?accessType=").concat(accessType), accessToken,
|
|
2009
|
+
return (0, exports.doGet)("".concat((0, APIConstants_1.ENTITY_ACCESS)(entityId), "?accessType=").concat(accessType), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2020
2010
|
};
|
|
2021
2011
|
exports.hasAccessToEntity = hasAccessToEntity;
|
|
2022
2012
|
/**
|
|
@@ -2027,7 +2017,7 @@ exports.hasAccessToEntity = hasAccessToEntity;
|
|
|
2027
2017
|
* @returns
|
|
2028
2018
|
*/
|
|
2029
2019
|
var getEntityJson = function (entityId, accessToken) {
|
|
2030
|
-
return (0, exports.doGet)((0, APIConstants_1.ENTITY_JSON)(entityId), accessToken,
|
|
2020
|
+
return (0, exports.doGet)((0, APIConstants_1.ENTITY_JSON)(entityId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2031
2021
|
};
|
|
2032
2022
|
exports.getEntityJson = getEntityJson;
|
|
2033
2023
|
/**
|
|
@@ -2038,7 +2028,7 @@ exports.getEntityJson = getEntityJson;
|
|
|
2038
2028
|
* @returns
|
|
2039
2029
|
*/
|
|
2040
2030
|
var updateEntityJson = function (entityId, json, accessToken) {
|
|
2041
|
-
return (0, exports.doPut)((0, APIConstants_1.ENTITY_JSON)(entityId), json, accessToken,
|
|
2031
|
+
return (0, exports.doPut)((0, APIConstants_1.ENTITY_JSON)(entityId), json, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2042
2032
|
};
|
|
2043
2033
|
exports.updateEntityJson = updateEntityJson;
|
|
2044
2034
|
/**
|
|
@@ -2048,22 +2038,22 @@ exports.updateEntityJson = updateEntityJson;
|
|
|
2048
2038
|
* https://docs.synapse.org/rest/GET/notificationEmail.html
|
|
2049
2039
|
*/
|
|
2050
2040
|
var getNotificationEmail = function (accessToken) {
|
|
2051
|
-
return (0, exports.doGet)(APIConstants_1.NOTIFICATION_EMAIL, accessToken,
|
|
2041
|
+
return (0, exports.doGet)(APIConstants_1.NOTIFICATION_EMAIL, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2052
2042
|
};
|
|
2053
2043
|
exports.getNotificationEmail = getNotificationEmail;
|
|
2054
2044
|
// http://rest-docs.synapse.org/rest/POST/principal/available.html
|
|
2055
2045
|
var isAliasAvailable = function (aliasCheckRequest, accessToken) {
|
|
2056
|
-
return (0, exports.doPost)(APIConstants_1.ALIAS_AVAILABLE, aliasCheckRequest, accessToken,
|
|
2046
|
+
return (0, exports.doPost)(APIConstants_1.ALIAS_AVAILABLE, aliasCheckRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2057
2047
|
};
|
|
2058
2048
|
exports.isAliasAvailable = isAliasAvailable;
|
|
2059
2049
|
// http://rest-docs.synapse.org/rest/POST/account/emailValidation.html
|
|
2060
2050
|
var registerAccountStep1 = function (newUser, portalEndpoint) {
|
|
2061
|
-
return (0, exports.doPost)((0, APIConstants_1.REGISTER_ACCOUNT_STEP_1)(portalEndpoint), newUser, undefined,
|
|
2051
|
+
return (0, exports.doPost)((0, APIConstants_1.REGISTER_ACCOUNT_STEP_1)(portalEndpoint), newUser, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2062
2052
|
};
|
|
2063
2053
|
exports.registerAccountStep1 = registerAccountStep1;
|
|
2064
2054
|
// http://rest-docs.synapse.org/rest/POST/account2.html
|
|
2065
2055
|
var registerAccountStep2 = function (accountSetupInfo) {
|
|
2066
|
-
return (0, exports.doPost)(APIConstants_1.REGISTER_ACCOUNT_STEP_2, accountSetupInfo, undefined,
|
|
2056
|
+
return (0, exports.doPost)(APIConstants_1.REGISTER_ACCOUNT_STEP_2, accountSetupInfo, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2067
2057
|
};
|
|
2068
2058
|
exports.registerAccountStep2 = registerAccountStep2;
|
|
2069
2059
|
/**
|
|
@@ -2076,7 +2066,12 @@ exports.registerAccountStep2 = registerAccountStep2;
|
|
|
2076
2066
|
*/
|
|
2077
2067
|
var oAuthRegisterAccountStep2 = function (userName, provider, authenticationCode, redirectUrl, endpoint) {
|
|
2078
2068
|
if (endpoint === void 0) { endpoint = getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT; }
|
|
2079
|
-
return (0, exports.doPost)('/auth/v1/oauth2/account2', {
|
|
2069
|
+
return (0, exports.doPost)('/auth/v1/oauth2/account2', {
|
|
2070
|
+
provider: provider,
|
|
2071
|
+
authenticationCode: authenticationCode,
|
|
2072
|
+
redirectUrl: redirectUrl,
|
|
2073
|
+
userName: userName,
|
|
2074
|
+
}, undefined, endpoint);
|
|
2080
2075
|
};
|
|
2081
2076
|
exports.oAuthRegisterAccountStep2 = oAuthRegisterAccountStep2;
|
|
2082
2077
|
/**
|
|
@@ -2096,7 +2091,7 @@ var bindOAuthProviderToAccount = function (provider, authenticationCode, redirec
|
|
|
2096
2091
|
case 0: return [4 /*yield*/, (0, exports.getAccessTokenFromCookie)()];
|
|
2097
2092
|
case 1:
|
|
2098
2093
|
accessToken = _a.sent();
|
|
2099
|
-
return [2 /*return*/, (0, exports.doPost)('/auth/v1/oauth2/alias', { provider: provider, authenticationCode: authenticationCode, redirectUrl: redirectUrl }, accessToken,
|
|
2094
|
+
return [2 /*return*/, (0, exports.doPost)('/auth/v1/oauth2/alias', { provider: provider, authenticationCode: authenticationCode, redirectUrl: redirectUrl }, accessToken, endpoint)];
|
|
2100
2095
|
}
|
|
2101
2096
|
});
|
|
2102
2097
|
});
|
|
@@ -2113,35 +2108,35 @@ var unbindOAuthProviderToAccount = function (provider, accessToken, alias) { ret
|
|
|
2113
2108
|
var url;
|
|
2114
2109
|
return tslib_1.__generator(this, function (_a) {
|
|
2115
2110
|
url = "/auth/v1/oauth2/alias?provider=".concat(provider, "&alias=").concat(encodeURIComponent(alias));
|
|
2116
|
-
return [2 /*return*/, (0, exports.doDelete)(url, accessToken,
|
|
2111
|
+
return [2 /*return*/, (0, exports.doDelete)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT)];
|
|
2117
2112
|
});
|
|
2118
2113
|
}); };
|
|
2119
2114
|
exports.unbindOAuthProviderToAccount = unbindOAuthProviderToAccount;
|
|
2120
2115
|
//http://rest-docs.synapse.org/rest/POST/termsOfUse2.html
|
|
2121
2116
|
var signSynapseTermsOfUse = function (accessToken) {
|
|
2122
|
-
return (0, exports.doPost)(APIConstants_1.SIGN_TERMS_OF_USE, { accessToken: accessToken }, undefined,
|
|
2117
|
+
return (0, exports.doPost)(APIConstants_1.SIGN_TERMS_OF_USE, { accessToken: accessToken }, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2123
2118
|
};
|
|
2124
2119
|
exports.signSynapseTermsOfUse = signSynapseTermsOfUse;
|
|
2125
2120
|
//https://rest-docs.synapse.org/rest/POST/verificationSubmission.html
|
|
2126
2121
|
var createProfileVerificationSubmission = function (verificationSubmission, accessToken) {
|
|
2127
|
-
return (0, exports.doPost)(APIConstants_1.VERIFICATION_SUBMISSION, verificationSubmission, accessToken,
|
|
2122
|
+
return (0, exports.doPost)(APIConstants_1.VERIFICATION_SUBMISSION, verificationSubmission, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2128
2123
|
};
|
|
2129
2124
|
exports.createProfileVerificationSubmission = createProfileVerificationSubmission;
|
|
2130
2125
|
// https://rest-docs.synapse.org/rest/POST/user/changePassword.html
|
|
2131
2126
|
var changePasswordWithCurrentPassword = function (newPassword, accessToken) {
|
|
2132
|
-
return (0, exports.doPost)('/auth/v1/user/changePassword', newPassword, accessToken,
|
|
2127
|
+
return (0, exports.doPost)('/auth/v1/user/changePassword', newPassword, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2133
2128
|
};
|
|
2134
2129
|
exports.changePasswordWithCurrentPassword = changePasswordWithCurrentPassword;
|
|
2135
2130
|
// https://rest-docs.synapse.org/rest/POST/user/changePassword.html
|
|
2136
2131
|
var changePasswordWithToken = function (newPassword) {
|
|
2137
|
-
return (0, exports.doPost)('/auth/v1/user/changePassword', newPassword, undefined,
|
|
2132
|
+
return (0, exports.doPost)('/auth/v1/user/changePassword', newPassword, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2138
2133
|
};
|
|
2139
2134
|
exports.changePasswordWithToken = changePasswordWithToken;
|
|
2140
2135
|
// http://rest-docs.synapse.org/rest/POST/user/password/reset.html
|
|
2141
2136
|
var resetPassword = function (email) {
|
|
2142
2137
|
var endpoint = window.location.href + '?passwordResetToken=';
|
|
2143
2138
|
var url = "/auth/v1/user/password/reset?passwordResetEndpoint=".concat(encodeURIComponent(endpoint));
|
|
2144
|
-
return (0, exports.doPost)(url, { email: email }, undefined,
|
|
2139
|
+
return (0, exports.doPost)(url, { email: email }, undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2145
2140
|
};
|
|
2146
2141
|
exports.resetPassword = resetPassword;
|
|
2147
2142
|
/**
|
|
@@ -2152,7 +2147,7 @@ exports.resetPassword = resetPassword;
|
|
|
2152
2147
|
* @param accessToken
|
|
2153
2148
|
*/
|
|
2154
2149
|
var addEmailAddressStep1 = function (email, userId, portalEndpoint, accessToken) {
|
|
2155
|
-
return (0, exports.doPost)("/repo/v1/account/".concat(userId, "/emailValidation?portalEndpoint=").concat(portalEndpoint), { email: email }, accessToken,
|
|
2150
|
+
return (0, exports.doPost)("/repo/v1/account/".concat(userId, "/emailValidation?portalEndpoint=").concat(portalEndpoint), { email: email }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2156
2151
|
};
|
|
2157
2152
|
exports.addEmailAddressStep1 = addEmailAddressStep1;
|
|
2158
2153
|
/**
|
|
@@ -2161,7 +2156,7 @@ exports.addEmailAddressStep1 = addEmailAddressStep1;
|
|
|
2161
2156
|
* @param accessToken
|
|
2162
2157
|
*/
|
|
2163
2158
|
var addEmailAddressStep2 = function (emailValidationSignedToken, accessToken) {
|
|
2164
|
-
return (0, exports.doPost)("/repo/v1/email", emailValidationSignedToken, accessToken,
|
|
2159
|
+
return (0, exports.doPost)("/repo/v1/email", emailValidationSignedToken, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2165
2160
|
};
|
|
2166
2161
|
exports.addEmailAddressStep2 = addEmailAddressStep2;
|
|
2167
2162
|
/**
|
|
@@ -2170,7 +2165,7 @@ exports.addEmailAddressStep2 = addEmailAddressStep2;
|
|
|
2170
2165
|
* @param accessToken
|
|
2171
2166
|
*/
|
|
2172
2167
|
var deleteEmail = function (accessToken, email) {
|
|
2173
|
-
return (0, exports.doDelete)("/repo/v1/email?email=".concat(email), accessToken,
|
|
2168
|
+
return (0, exports.doDelete)("/repo/v1/email?email=".concat(email), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2174
2169
|
};
|
|
2175
2170
|
exports.deleteEmail = deleteEmail;
|
|
2176
2171
|
/**
|
|
@@ -2179,7 +2174,7 @@ exports.deleteEmail = deleteEmail;
|
|
|
2179
2174
|
* @param accessToken
|
|
2180
2175
|
*/
|
|
2181
2176
|
var updateNotificationEmail = function (email, accessToken) {
|
|
2182
|
-
return (0, exports.doPut)('/repo/v1/notificationEmail', { email: email }, accessToken,
|
|
2177
|
+
return (0, exports.doPut)('/repo/v1/notificationEmail', { email: email }, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2183
2178
|
};
|
|
2184
2179
|
exports.updateNotificationEmail = updateNotificationEmail;
|
|
2185
2180
|
/**
|
|
@@ -2190,7 +2185,7 @@ Target users: anyone who has READ permission to the project.
|
|
|
2190
2185
|
* @param accessToken
|
|
2191
2186
|
*/
|
|
2192
2187
|
var getReply = function (replyId, accessToken) {
|
|
2193
|
-
return (0, exports.doGet)("/repo/v1/reply/".concat(replyId), accessToken,
|
|
2188
|
+
return (0, exports.doGet)("/repo/v1/reply/".concat(replyId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2194
2189
|
};
|
|
2195
2190
|
exports.getReply = getReply;
|
|
2196
2191
|
/**
|
|
@@ -2202,7 +2197,7 @@ exports.getReply = getReply;
|
|
|
2202
2197
|
* @param accessToken
|
|
2203
2198
|
*/
|
|
2204
2199
|
var getReplyMessageUrl = function (messageKey, accessToken) {
|
|
2205
|
-
return (0, exports.doGet)("/repo/v1/reply/messageUrl?messageKey=".concat(messageKey), accessToken,
|
|
2200
|
+
return (0, exports.doGet)("/repo/v1/reply/messageUrl?messageKey=".concat(messageKey), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2206
2201
|
};
|
|
2207
2202
|
exports.getReplyMessageUrl = getReplyMessageUrl;
|
|
2208
2203
|
/**
|
|
@@ -2213,7 +2208,7 @@ exports.getReplyMessageUrl = getReplyMessageUrl;
|
|
|
2213
2208
|
* @param accessToken
|
|
2214
2209
|
*/
|
|
2215
2210
|
var getThread = function (threadId, accessToken) {
|
|
2216
|
-
return (0, exports.doGet)("/repo/v1/thread/".concat(threadId), accessToken,
|
|
2211
|
+
return (0, exports.doGet)("/repo/v1/thread/".concat(threadId), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2217
2212
|
};
|
|
2218
2213
|
exports.getThread = getThread;
|
|
2219
2214
|
/**
|
|
@@ -2225,7 +2220,7 @@ exports.getThread = getThread;
|
|
|
2225
2220
|
* @param accessToken
|
|
2226
2221
|
*/
|
|
2227
2222
|
var getThreadMessageUrl = function (messageKey, accessToken) {
|
|
2228
|
-
return (0, exports.doGet)("/repo/v1/thread/messageUrl?messageKey=".concat(messageKey), accessToken,
|
|
2223
|
+
return (0, exports.doGet)("/repo/v1/thread/messageUrl?messageKey=".concat(messageKey), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2229
2224
|
};
|
|
2230
2225
|
exports.getThreadMessageUrl = getThreadMessageUrl;
|
|
2231
2226
|
/**
|
|
@@ -2237,7 +2232,7 @@ exports.getThreadMessageUrl = getThreadMessageUrl;
|
|
|
2237
2232
|
* @param accessToken
|
|
2238
2233
|
*/
|
|
2239
2234
|
var forumSearch = function (discussionSearchRequest, forumId, accessToken) {
|
|
2240
|
-
return (0, exports.doPost)("/repo/v1/forum/".concat(forumId, "/search"), discussionSearchRequest, accessToken,
|
|
2235
|
+
return (0, exports.doPost)("/repo/v1/forum/".concat(forumId, "/search"), discussionSearchRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2241
2236
|
};
|
|
2242
2237
|
exports.forumSearch = forumSearch;
|
|
2243
2238
|
/**
|
|
@@ -2248,7 +2243,7 @@ exports.forumSearch = forumSearch;
|
|
|
2248
2243
|
* @param accessToken
|
|
2249
2244
|
*/
|
|
2250
2245
|
var searchAccessApprovals = function (accessApprovalSearchRequest, accessToken) {
|
|
2251
|
-
return (0, exports.doPost)('/repo/v1/accessApproval/search', accessApprovalSearchRequest, accessToken,
|
|
2246
|
+
return (0, exports.doPost)('/repo/v1/accessApproval/search', accessApprovalSearchRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2252
2247
|
};
|
|
2253
2248
|
exports.searchAccessApprovals = searchAccessApprovals;
|
|
2254
2249
|
/**
|
|
@@ -2259,14 +2254,14 @@ exports.searchAccessApprovals = searchAccessApprovals;
|
|
|
2259
2254
|
* https://rest-docs.synapse.org/rest/POST/dataAccessSubmission/search.html
|
|
2260
2255
|
*/
|
|
2261
2256
|
var searchAccessSubmission = function (submissionSearchRequest, accessToken) {
|
|
2262
|
-
return (0, exports.doPost)(APIConstants_1.ACCESS_REQUEST_SUBMISSION_SEARCH, submissionSearchRequest, accessToken,
|
|
2257
|
+
return (0, exports.doPost)(APIConstants_1.ACCESS_REQUEST_SUBMISSION_SEARCH, submissionSearchRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2263
2258
|
};
|
|
2264
2259
|
exports.searchAccessSubmission = searchAccessSubmission;
|
|
2265
2260
|
/**
|
|
2266
2261
|
* http://rest-docs.synapse.org/rest/POST/accessRequirement/requirementId/approvedSubmissionInfo.html
|
|
2267
2262
|
*/
|
|
2268
2263
|
var getApprovedSubmissionInfo = function (submissionInfoPageRequest, accessToken) {
|
|
2269
|
-
return (0, exports.doPost)((0, APIConstants_1.APPROVED_SUBMISSION_INFO)(submissionInfoPageRequest.accessRequirementId), submissionInfoPageRequest, accessToken,
|
|
2264
|
+
return (0, exports.doPost)((0, APIConstants_1.APPROVED_SUBMISSION_INFO)(submissionInfoPageRequest.accessRequirementId), submissionInfoPageRequest, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2270
2265
|
};
|
|
2271
2266
|
exports.getApprovedSubmissionInfo = getApprovedSubmissionInfo;
|
|
2272
2267
|
/**
|
|
@@ -2274,7 +2269,7 @@ exports.getApprovedSubmissionInfo = getApprovedSubmissionInfo;
|
|
|
2274
2269
|
*/
|
|
2275
2270
|
var getActivityForEntity = function (entityId, versionNumber, accessToken) {
|
|
2276
2271
|
var url = (0, APIConstants_1.ACTIVITY_FOR_ENTITY)(entityId, versionNumber ? "".concat(versionNumber) : undefined);
|
|
2277
|
-
return (0, exports.doGet)(url, accessToken,
|
|
2272
|
+
return (0, exports.doGet)(url, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2278
2273
|
};
|
|
2279
2274
|
exports.getActivityForEntity = getActivityForEntity;
|
|
2280
2275
|
/**
|
|
@@ -2286,22 +2281,22 @@ exports.getActivityForEntity = getActivityForEntity;
|
|
|
2286
2281
|
*/
|
|
2287
2282
|
function getProfilePicPreviewPresignedUrl(userId) {
|
|
2288
2283
|
return allowNotFoundError(function () {
|
|
2289
|
-
return (0, exports.doGet)((0, APIConstants_1.PROFILE_IMAGE_PREVIEW)(userId) + "?redirect=false", undefined,
|
|
2284
|
+
return (0, exports.doGet)((0, APIConstants_1.PROFILE_IMAGE_PREVIEW)(userId) + "?redirect=false", undefined, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2290
2285
|
});
|
|
2291
2286
|
}
|
|
2292
2287
|
exports.getProfilePicPreviewPresignedUrl = getProfilePicPreviewPresignedUrl;
|
|
2293
2288
|
function getItemsInTrashCan(accessToken, offset, limit) {
|
|
2294
2289
|
if (offset === void 0) { offset = 0; }
|
|
2295
2290
|
if (limit === void 0) { limit = 25; }
|
|
2296
|
-
return (0, exports.doGet)(APIConstants_1.TRASHCAN_VIEW + "?offset=".concat(offset, "&limit=").concat(limit), accessToken,
|
|
2291
|
+
return (0, exports.doGet)(APIConstants_1.TRASHCAN_VIEW + "?offset=".concat(offset, "&limit=").concat(limit), accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2297
2292
|
}
|
|
2298
2293
|
exports.getItemsInTrashCan = getItemsInTrashCan;
|
|
2299
2294
|
function restoreFromTrashCan(entityId, accessToken) {
|
|
2300
|
-
return (0, exports.doPut)((0, APIConstants_1.TRASHCAN_RESTORE)(entityId), undefined, accessToken,
|
|
2295
|
+
return (0, exports.doPut)((0, APIConstants_1.TRASHCAN_RESTORE)(entityId), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2301
2296
|
}
|
|
2302
2297
|
exports.restoreFromTrashCan = restoreFromTrashCan;
|
|
2303
2298
|
function purgeFromTrashCan(entityId, accessToken) {
|
|
2304
|
-
return (0, exports.doPut)((0, APIConstants_1.TRASHCAN_PURGE)(entityId), undefined, accessToken,
|
|
2299
|
+
return (0, exports.doPut)((0, APIConstants_1.TRASHCAN_PURGE)(entityId), undefined, accessToken, getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT);
|
|
2305
2300
|
}
|
|
2306
2301
|
exports.purgeFromTrashCan = purgeFromTrashCan;
|
|
2307
2302
|
//# sourceMappingURL=SynapseClient.js.map
|