@coscine/api-connection
Advanced tools
Comparing version 1.26.0 to 1.27.0
@@ -1,5 +0,5 @@ | ||
var axios = require('axios'); | ||
var authHeaderKey = 'Authorization'; | ||
var axios$p = require('axios'); | ||
var authHeaderKey$1 = 'Authorization'; | ||
var clientCorrolationIdKey = 'X-Coscine-Logging-CorrelationId'; | ||
axios.interceptors.request.use(function (request) { | ||
axios$p.interceptors.request.use(function (request) { | ||
if ((typeof coscine !== "undefined") && (typeof coscine.loading !== "undefined") && (typeof coscine.loading.counter !== "undefined")) { | ||
@@ -12,3 +12,3 @@ coscine.loading.counter++; | ||
}); | ||
axios.interceptors.response.use(function (response) { | ||
axios$p.interceptors.response.use(function (response) { | ||
if ((typeof coscine !== "undefined") && (typeof coscine.loading !== "undefined") && (typeof coscine.loading.counter !== "undefined")) { | ||
@@ -50,5 +50,5 @@ coscine.loading.counter--; | ||
setHeader: function () { | ||
axios.defaults.headers.common[authHeaderKey] = | ||
axios$p.defaults.headers.common[authHeaderKey$1] = | ||
'Bearer ' + coscine.authorization.bearer; | ||
axios.defaults.headers.common[clientCorrolationIdKey] = coscine.clientcorrolation.id; | ||
axios$p.defaults.headers.common[clientCorrolationIdKey] = coscine.clientcorrolation.id; | ||
}, | ||
@@ -65,3 +65,3 @@ defaultOnCatch: function (error) { | ||
var axios$1 = require('axios'); | ||
var axios$o = require('axios'); | ||
function getActivatedFeaturesApiUrl() { | ||
@@ -79,3 +79,3 @@ return ('https://' + | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl()) | ||
@@ -89,3 +89,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl() + projectId) | ||
@@ -99,3 +99,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activeFeatures') | ||
@@ -109,3 +109,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/inactiveFeatures') | ||
@@ -119,3 +119,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activateFeature/' + featureId) | ||
@@ -129,3 +129,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/deactivateFeature/' + featureId) | ||
@@ -138,3 +138,3 @@ .then(thenHandler) | ||
var axios$2 = require('axios'); | ||
var axios$n = require('axios'); | ||
function getAdminApiUrl() { | ||
@@ -150,3 +150,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Admin/Admin/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$2 | ||
return axios$n | ||
.get(getAdminApiUrl() + projectString) | ||
@@ -160,3 +160,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$2 | ||
return axios$n | ||
.post(getAdminApiUrl(), body) | ||
@@ -181,3 +181,3 @@ .then(thenHandler) | ||
var axios$3 = require('axios'); | ||
var axios$m = require('axios'); | ||
function getBlobApiUrl() { | ||
@@ -202,3 +202,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Blob/Blob/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
return axios$m | ||
.get(getBlobApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path), { | ||
@@ -214,3 +214,3 @@ responseType: 'blob' | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
return axios$m | ||
.delete(getBlobApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path)) | ||
@@ -224,3 +224,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$3({ | ||
return axios$m({ | ||
method: 'PUT', | ||
@@ -240,3 +240,3 @@ url: getBlobApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path), | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
return axios$m | ||
.post(getBlobApiUrl() + 'validate', body) | ||
@@ -250,3 +250,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
return axios$m | ||
.get(getBlobApiUrl() + resourceId + '/quota') | ||
@@ -259,3 +259,40 @@ .then(thenHandler) | ||
var axios$4 = require('axios'); | ||
var axios$l = require('axios'); | ||
function getContactChangeApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/ContactChange/'); | ||
} | ||
var ContactChangeApi = /** @class */ (function () { | ||
function ContactChangeApi() { | ||
} | ||
ContactChangeApi.getStatus = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$l | ||
.get(getContactChangeApiUrl() + 'status') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ContactChangeApi.confirm = function (token, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$l | ||
.get(getContactChangeApiUrl() + 'confirm/' + token) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ContactChangeApi.emailChange = function (body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
var config = { headers: { 'Content-Type': 'application/json' } }; | ||
return axios$l | ||
.post(getContactChangeApiUrl() + 'emailchange', body, config) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ContactChangeApi; | ||
}()); | ||
var axios$k = require('axios'); | ||
function getDisciplineApiUrl() { | ||
@@ -271,3 +308,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Discipline/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$4 | ||
return axios$k | ||
.get(getDisciplineApiUrl()) | ||
@@ -280,3 +317,3 @@ .then(thenHandler) | ||
var axios$5 = require('axios'); | ||
var axios$j = require('axios'); | ||
function getLanguageApiUrl() { | ||
@@ -292,3 +329,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Language/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$5 | ||
return axios$j | ||
.get(getLanguageApiUrl()) | ||
@@ -301,3 +338,3 @@ .then(thenHandler) | ||
var axios$6 = require('axios'); | ||
var axios$i = require('axios'); | ||
function getLicenseApiUrl() { | ||
@@ -313,3 +350,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/License/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$6 | ||
return axios$i | ||
.get(getLicenseApiUrl()) | ||
@@ -322,3 +359,3 @@ .then(thenHandler) | ||
var axios$7 = require('axios'); | ||
var axios$h = require('axios'); | ||
function getMetadataApiUrl() { | ||
@@ -334,3 +371,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Metadata/Metadata/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'profiles/') | ||
@@ -344,3 +381,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'profiles/' + encodeURIComponent(profile)) | ||
@@ -354,3 +391,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'profiles/' + encodeURIComponent(profile) + '/' + resourceId) | ||
@@ -364,3 +401,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'vocabularies/') | ||
@@ -374,3 +411,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'vocabularies/' + encodeURIComponent(path)) | ||
@@ -384,3 +421,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'instances/' + projectId + '/' + encodeURIComponent(className)) | ||
@@ -393,3 +430,3 @@ .then(thenHandler) | ||
var axios$8 = require('axios'); | ||
var axios$g = require('axios'); | ||
function getNoticeApiUrl() { | ||
@@ -404,3 +441,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Notices/Notice/'); | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$8 | ||
return axios$g | ||
.get(getNoticeApiUrl() + encodeURIComponent(documentSlug) + '?language=' + language) | ||
@@ -413,3 +450,3 @@ .then(thenHandler) | ||
var axios$9 = require('axios'); | ||
var axios$f = require('axios'); | ||
function getOrganizationApiUrl() { | ||
@@ -425,3 +462,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Organization/Organization/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl()) | ||
@@ -435,3 +472,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '?member=1') | ||
@@ -445,3 +482,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '?filter=' + encodeURIComponent(searchterm)) | ||
@@ -455,3 +492,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + encodeURIComponent(url)) | ||
@@ -465,3 +502,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '-/ror?filter=' + encodeURIComponent(searchterm)) | ||
@@ -475,3 +512,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '-/isMember/' + encodeURIComponent('https://ror.org/04xfq0f34')) | ||
@@ -485,3 +522,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '-/isMember/' + encodeURIComponent(organizationUrl)) | ||
@@ -495,3 +532,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '-/isMember') | ||
@@ -504,3 +541,3 @@ .then(thenHandler) | ||
var axios$a = require('axios'); | ||
var axios$e = require('axios'); | ||
function getPIDApiUrl() { | ||
@@ -515,3 +552,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Pid/Pid/'); | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$a | ||
return axios$e | ||
.post(getPIDApiUrl() + 'sendMailToOwner', body) | ||
@@ -524,3 +561,3 @@ .then(thenHandler) | ||
var axios$b = require('axios'); | ||
var axios$d = require('axios'); | ||
function getQuotaApiUrl() { | ||
@@ -536,3 +573,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Quota/Quota/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$d | ||
.get(getQuotaApiUrl() + projectId + '/' + resourceTypeId + '/all') | ||
@@ -546,3 +583,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$d | ||
.get(getQuotaApiUrl() + resourceId) | ||
@@ -556,3 +593,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$d | ||
.post(getQuotaApiUrl() + resourceId, body) | ||
@@ -692,3 +729,3 @@ .then(thenHandler) | ||
var axios$d = require('axios'); | ||
var axios$b = require('axios'); | ||
function getProjectRoleApiUrl() { | ||
@@ -705,3 +742,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/ProjectRole/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$b | ||
.get(getProjectRoleApiUrl() + parentId + '/' + analyticsLogFlag) | ||
@@ -720,3 +757,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$b | ||
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/') | ||
@@ -730,3 +767,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$b | ||
.post(getProjectRoleApiUrl(), body) | ||
@@ -740,3 +777,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$b | ||
.delete(getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId) | ||
@@ -750,3 +787,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$b | ||
.delete(getProjectRoleApiUrl() + 'project/' + projectId + '/user') | ||
@@ -759,3 +796,3 @@ .then(thenHandler) | ||
var axios$e = require('axios'); | ||
var axios$a = require('axios'); | ||
function getResourceApiUrl() { | ||
@@ -771,3 +808,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Resources/Resource/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$a | ||
.get(getResourceApiUrl() + resourceId) | ||
@@ -781,3 +818,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$a | ||
.post(getResourceApiUrl() + 'Project/' + parentId, body) | ||
@@ -791,3 +828,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$a | ||
.delete(getResourceApiUrl() + resourceId) | ||
@@ -801,3 +838,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$a | ||
.post(getResourceApiUrl() + resourceId, body) | ||
@@ -811,3 +848,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$a | ||
.get(getResourceApiUrl() + resourceId + '/isCreator') | ||
@@ -820,3 +857,3 @@ .then(thenHandler) | ||
var axios$f = require('axios'); | ||
var axios$9 = require('axios'); | ||
function getResourceTypeApiUrl() { | ||
@@ -834,3 +871,3 @@ return ('https://' + | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
return axios$9 | ||
.get(getResourceTypeApiUrl() + 'types') | ||
@@ -844,3 +881,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
return axios$9 | ||
.get(getResourceTypeApiUrl() + 'types/-/enabled') | ||
@@ -854,3 +891,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
return axios$9 | ||
.get(getResourceTypeApiUrl() + 'types/' + resourceTypeId) | ||
@@ -863,3 +900,3 @@ .then(thenHandler) | ||
var axios$g = require('axios'); | ||
var axios$8 = require('axios'); | ||
function getRoleApiUrl() { | ||
@@ -875,3 +912,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Role/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$g | ||
return axios$8 | ||
.get(getRoleApiUrl()) | ||
@@ -884,3 +921,3 @@ .then(thenHandler) | ||
var axios$h = require('axios'); | ||
var axios$7 = require('axios'); | ||
function getSearchApiUrl() { | ||
@@ -896,3 +933,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
return axios$7 | ||
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query)) | ||
@@ -906,3 +943,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
return axios$7 | ||
.get(getSearchApiUrl() + 'allNoFilter/') | ||
@@ -916,3 +953,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
return axios$7 | ||
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query)) | ||
@@ -926,3 +963,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
return axios$7 | ||
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId) | ||
@@ -935,3 +972,3 @@ .then(thenHandler) | ||
var axios$i = require('axios'); | ||
var axios$6 = require('axios'); | ||
function getSubProjectApiUrl() { | ||
@@ -947,3 +984,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/SubProject/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$6 | ||
.get(getSubProjectApiUrl() + parentId + '/') | ||
@@ -957,3 +994,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$6 | ||
.get(getSubProjectApiUrl() + childId + '/accessibleParent') | ||
@@ -966,3 +1003,3 @@ .then(thenHandler) | ||
var axios$j = require('axios'); | ||
var axios$5 = require('axios'); | ||
function getTitleApiUrl() { | ||
@@ -978,3 +1015,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Title/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$j | ||
return axios$5 | ||
.get(getTitleApiUrl()) | ||
@@ -987,4 +1024,4 @@ .then(thenHandler) | ||
var axios$k = require('axios'); | ||
var authHeaderKey$1 = 'Authorization'; | ||
var axios$4 = require('axios'); | ||
var authHeaderKey = 'Authorization'; | ||
function getTOSApiUrl() { | ||
@@ -994,3 +1031,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/TOS/'); | ||
function setHeader(jwtToken) { | ||
axios$k.defaults.headers.common[authHeaderKey$1] = | ||
axios$4.defaults.headers.common[authHeaderKey] = | ||
'Bearer ' + jwtToken; | ||
@@ -1005,3 +1042,3 @@ } | ||
apiConnectionBasic.setHeader(); | ||
return axios$k | ||
return axios$4 | ||
.get(getTOSApiUrl()) | ||
@@ -1015,3 +1052,3 @@ .then(thenHandler) | ||
setHeader(jwtToken); | ||
return axios$k | ||
return axios$4 | ||
.post(getTOSApiUrl()) | ||
@@ -1024,3 +1061,3 @@ .then(thenHandler) | ||
var axios$l = require('axios'); | ||
var axios$3 = require('axios'); | ||
function getTreeApiUrl() { | ||
@@ -1036,3 +1073,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Tree/Tree/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$l | ||
return axios$3 | ||
.get(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path)) | ||
@@ -1056,3 +1093,3 @@ .then(thenHandler) | ||
} | ||
return axios$l | ||
return axios$3 | ||
.put(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path), body) | ||
@@ -1065,3 +1102,3 @@ .then(thenHandler) | ||
var axios$m = require('axios'); | ||
var axios$2 = require('axios'); | ||
function getUserApiUrl() { | ||
@@ -1077,3 +1114,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/User/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$m | ||
return axios$2 | ||
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/') | ||
@@ -1087,3 +1124,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$m | ||
return axios$2 | ||
.get(getUserApiUrl() + 'user') | ||
@@ -1097,3 +1134,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$m | ||
return axios$2 | ||
.post(getUserApiUrl() + 'user', body) | ||
@@ -1107,3 +1144,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$m | ||
return axios$2 | ||
.get(getUserApiUrl() + 'mergeToken/' + provider) | ||
@@ -1116,3 +1153,3 @@ .then(thenHandler) | ||
var axios$n = require('axios'); | ||
var axios$1 = require('axios'); | ||
function getVisibilityApiUrl() { | ||
@@ -1128,3 +1165,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Visibility/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$n | ||
return axios$1 | ||
.get(getVisibilityApiUrl()) | ||
@@ -1137,3 +1174,3 @@ .then(thenHandler) | ||
var axios$o = require('axios'); | ||
var axios = require('axios'); | ||
function getTokenApiUrl() { | ||
@@ -1149,3 +1186,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Token/Token/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$o | ||
return axios | ||
.get(getTokenApiUrl()) | ||
@@ -1159,3 +1196,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$o | ||
return axios | ||
.put(getTokenApiUrl(), body) | ||
@@ -1169,3 +1206,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$o | ||
return axios | ||
.delete(getTokenApiUrl() + tokenId) | ||
@@ -1179,3 +1216,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$o | ||
return axios | ||
.get(getTokenApiUrl() + tokenId) | ||
@@ -1188,3 +1225,3 @@ .then(thenHandler) | ||
export { ActivatedFeaturesApi, AdminApi, BlobApi, DisciplineApi, LanguageApi, LicenseApi, MetadataApi, NoticeApi, OrganizationApi, PIDApi, ProjectApi, ProjectRoleApi, QuotaApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, TOSApi, TitleApi, TokenApi, TreeApi, UserApi, VisibilityApi }; | ||
export { ActivatedFeaturesApi, AdminApi, BlobApi, ContactChangeApi, DisciplineApi, LanguageApi, LicenseApi, MetadataApi, NoticeApi, OrganizationApi, PIDApi, ProjectApi, ProjectRoleApi, QuotaApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, TOSApi, TitleApi, TokenApi, TreeApi, UserApi, VisibilityApi }; | ||
//# sourceMappingURL=api-connection.es5.js.map |
@@ -7,6 +7,6 @@ (function (global, factory) { | ||
var axios = require('axios'); | ||
var authHeaderKey = 'Authorization'; | ||
var axios$p = require('axios'); | ||
var authHeaderKey$1 = 'Authorization'; | ||
var clientCorrolationIdKey = 'X-Coscine-Logging-CorrelationId'; | ||
axios.interceptors.request.use(function (request) { | ||
axios$p.interceptors.request.use(function (request) { | ||
if ((typeof coscine !== "undefined") && (typeof coscine.loading !== "undefined") && (typeof coscine.loading.counter !== "undefined")) { | ||
@@ -19,3 +19,3 @@ coscine.loading.counter++; | ||
}); | ||
axios.interceptors.response.use(function (response) { | ||
axios$p.interceptors.response.use(function (response) { | ||
if ((typeof coscine !== "undefined") && (typeof coscine.loading !== "undefined") && (typeof coscine.loading.counter !== "undefined")) { | ||
@@ -57,5 +57,5 @@ coscine.loading.counter--; | ||
setHeader: function () { | ||
axios.defaults.headers.common[authHeaderKey] = | ||
axios$p.defaults.headers.common[authHeaderKey$1] = | ||
'Bearer ' + coscine.authorization.bearer; | ||
axios.defaults.headers.common[clientCorrolationIdKey] = coscine.clientcorrolation.id; | ||
axios$p.defaults.headers.common[clientCorrolationIdKey] = coscine.clientcorrolation.id; | ||
}, | ||
@@ -72,3 +72,3 @@ defaultOnCatch: function (error) { | ||
var axios$1 = require('axios'); | ||
var axios$o = require('axios'); | ||
function getActivatedFeaturesApiUrl() { | ||
@@ -86,3 +86,3 @@ return ('https://' + | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl()) | ||
@@ -96,3 +96,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl() + projectId) | ||
@@ -106,3 +106,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activeFeatures') | ||
@@ -116,3 +116,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/inactiveFeatures') | ||
@@ -126,3 +126,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activateFeature/' + featureId) | ||
@@ -136,3 +136,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
return axios$o | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/deactivateFeature/' + featureId) | ||
@@ -145,3 +145,3 @@ .then(thenHandler) | ||
var axios$2 = require('axios'); | ||
var axios$n = require('axios'); | ||
function getAdminApiUrl() { | ||
@@ -157,3 +157,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Admin/Admin/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$2 | ||
return axios$n | ||
.get(getAdminApiUrl() + projectString) | ||
@@ -167,3 +167,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$2 | ||
return axios$n | ||
.post(getAdminApiUrl(), body) | ||
@@ -188,3 +188,3 @@ .then(thenHandler) | ||
var axios$3 = require('axios'); | ||
var axios$m = require('axios'); | ||
function getBlobApiUrl() { | ||
@@ -209,3 +209,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Blob/Blob/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
return axios$m | ||
.get(getBlobApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path), { | ||
@@ -221,3 +221,3 @@ responseType: 'blob' | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
return axios$m | ||
.delete(getBlobApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path)) | ||
@@ -231,3 +231,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$3({ | ||
return axios$m({ | ||
method: 'PUT', | ||
@@ -247,3 +247,3 @@ url: getBlobApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path), | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
return axios$m | ||
.post(getBlobApiUrl() + 'validate', body) | ||
@@ -257,3 +257,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
return axios$m | ||
.get(getBlobApiUrl() + resourceId + '/quota') | ||
@@ -266,3 +266,40 @@ .then(thenHandler) | ||
var axios$4 = require('axios'); | ||
var axios$l = require('axios'); | ||
function getContactChangeApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/ContactChange/'); | ||
} | ||
var ContactChangeApi = /** @class */ (function () { | ||
function ContactChangeApi() { | ||
} | ||
ContactChangeApi.getStatus = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$l | ||
.get(getContactChangeApiUrl() + 'status') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ContactChangeApi.confirm = function (token, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$l | ||
.get(getContactChangeApiUrl() + 'confirm/' + token) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ContactChangeApi.emailChange = function (body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
var config = { headers: { 'Content-Type': 'application/json' } }; | ||
return axios$l | ||
.post(getContactChangeApiUrl() + 'emailchange', body, config) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ContactChangeApi; | ||
}()); | ||
var axios$k = require('axios'); | ||
function getDisciplineApiUrl() { | ||
@@ -278,3 +315,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Discipline/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$4 | ||
return axios$k | ||
.get(getDisciplineApiUrl()) | ||
@@ -287,3 +324,3 @@ .then(thenHandler) | ||
var axios$5 = require('axios'); | ||
var axios$j = require('axios'); | ||
function getLanguageApiUrl() { | ||
@@ -299,3 +336,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Language/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$5 | ||
return axios$j | ||
.get(getLanguageApiUrl()) | ||
@@ -308,3 +345,3 @@ .then(thenHandler) | ||
var axios$6 = require('axios'); | ||
var axios$i = require('axios'); | ||
function getLicenseApiUrl() { | ||
@@ -320,3 +357,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/License/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$6 | ||
return axios$i | ||
.get(getLicenseApiUrl()) | ||
@@ -329,3 +366,3 @@ .then(thenHandler) | ||
var axios$7 = require('axios'); | ||
var axios$h = require('axios'); | ||
function getMetadataApiUrl() { | ||
@@ -341,3 +378,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Metadata/Metadata/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'profiles/') | ||
@@ -351,3 +388,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'profiles/' + encodeURIComponent(profile)) | ||
@@ -361,3 +398,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'profiles/' + encodeURIComponent(profile) + '/' + resourceId) | ||
@@ -371,3 +408,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'vocabularies/') | ||
@@ -381,3 +418,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'vocabularies/' + encodeURIComponent(path)) | ||
@@ -391,3 +428,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$h | ||
.get(getMetadataApiUrl() + 'instances/' + projectId + '/' + encodeURIComponent(className)) | ||
@@ -400,3 +437,3 @@ .then(thenHandler) | ||
var axios$8 = require('axios'); | ||
var axios$g = require('axios'); | ||
function getNoticeApiUrl() { | ||
@@ -411,3 +448,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Notices/Notice/'); | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$8 | ||
return axios$g | ||
.get(getNoticeApiUrl() + encodeURIComponent(documentSlug) + '?language=' + language) | ||
@@ -420,3 +457,3 @@ .then(thenHandler) | ||
var axios$9 = require('axios'); | ||
var axios$f = require('axios'); | ||
function getOrganizationApiUrl() { | ||
@@ -432,3 +469,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Organization/Organization/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl()) | ||
@@ -442,3 +479,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '?member=1') | ||
@@ -452,3 +489,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '?filter=' + encodeURIComponent(searchterm)) | ||
@@ -462,3 +499,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + encodeURIComponent(url)) | ||
@@ -472,3 +509,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '-/ror?filter=' + encodeURIComponent(searchterm)) | ||
@@ -482,3 +519,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '-/isMember/' + encodeURIComponent('https://ror.org/04xfq0f34')) | ||
@@ -492,3 +529,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '-/isMember/' + encodeURIComponent(organizationUrl)) | ||
@@ -502,3 +539,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$f | ||
.get(getOrganizationApiUrl() + '-/isMember') | ||
@@ -511,3 +548,3 @@ .then(thenHandler) | ||
var axios$a = require('axios'); | ||
var axios$e = require('axios'); | ||
function getPIDApiUrl() { | ||
@@ -522,3 +559,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Pid/Pid/'); | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$a | ||
return axios$e | ||
.post(getPIDApiUrl() + 'sendMailToOwner', body) | ||
@@ -531,3 +568,3 @@ .then(thenHandler) | ||
var axios$b = require('axios'); | ||
var axios$d = require('axios'); | ||
function getQuotaApiUrl() { | ||
@@ -543,3 +580,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Quota/Quota/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$d | ||
.get(getQuotaApiUrl() + projectId + '/' + resourceTypeId + '/all') | ||
@@ -553,3 +590,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$d | ||
.get(getQuotaApiUrl() + resourceId) | ||
@@ -563,3 +600,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$d | ||
.post(getQuotaApiUrl() + resourceId, body) | ||
@@ -699,3 +736,3 @@ .then(thenHandler) | ||
var axios$d = require('axios'); | ||
var axios$b = require('axios'); | ||
function getProjectRoleApiUrl() { | ||
@@ -712,3 +749,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/ProjectRole/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$b | ||
.get(getProjectRoleApiUrl() + parentId + '/' + analyticsLogFlag) | ||
@@ -727,3 +764,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$b | ||
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/') | ||
@@ -737,3 +774,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$b | ||
.post(getProjectRoleApiUrl(), body) | ||
@@ -747,3 +784,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$b | ||
.delete(getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId) | ||
@@ -757,3 +794,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$b | ||
.delete(getProjectRoleApiUrl() + 'project/' + projectId + '/user') | ||
@@ -766,3 +803,3 @@ .then(thenHandler) | ||
var axios$e = require('axios'); | ||
var axios$a = require('axios'); | ||
function getResourceApiUrl() { | ||
@@ -778,3 +815,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Resources/Resource/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$a | ||
.get(getResourceApiUrl() + resourceId) | ||
@@ -788,3 +825,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$a | ||
.post(getResourceApiUrl() + 'Project/' + parentId, body) | ||
@@ -798,3 +835,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$a | ||
.delete(getResourceApiUrl() + resourceId) | ||
@@ -808,3 +845,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$a | ||
.post(getResourceApiUrl() + resourceId, body) | ||
@@ -818,3 +855,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$a | ||
.get(getResourceApiUrl() + resourceId + '/isCreator') | ||
@@ -827,3 +864,3 @@ .then(thenHandler) | ||
var axios$f = require('axios'); | ||
var axios$9 = require('axios'); | ||
function getResourceTypeApiUrl() { | ||
@@ -841,3 +878,3 @@ return ('https://' + | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
return axios$9 | ||
.get(getResourceTypeApiUrl() + 'types') | ||
@@ -851,3 +888,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
return axios$9 | ||
.get(getResourceTypeApiUrl() + 'types/-/enabled') | ||
@@ -861,3 +898,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
return axios$9 | ||
.get(getResourceTypeApiUrl() + 'types/' + resourceTypeId) | ||
@@ -870,3 +907,3 @@ .then(thenHandler) | ||
var axios$g = require('axios'); | ||
var axios$8 = require('axios'); | ||
function getRoleApiUrl() { | ||
@@ -882,3 +919,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Role/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$g | ||
return axios$8 | ||
.get(getRoleApiUrl()) | ||
@@ -891,3 +928,3 @@ .then(thenHandler) | ||
var axios$h = require('axios'); | ||
var axios$7 = require('axios'); | ||
function getSearchApiUrl() { | ||
@@ -903,3 +940,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
return axios$7 | ||
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query)) | ||
@@ -913,3 +950,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
return axios$7 | ||
.get(getSearchApiUrl() + 'allNoFilter/') | ||
@@ -923,3 +960,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
return axios$7 | ||
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query)) | ||
@@ -933,3 +970,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
return axios$7 | ||
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId) | ||
@@ -942,3 +979,3 @@ .then(thenHandler) | ||
var axios$i = require('axios'); | ||
var axios$6 = require('axios'); | ||
function getSubProjectApiUrl() { | ||
@@ -954,3 +991,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/SubProject/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$6 | ||
.get(getSubProjectApiUrl() + parentId + '/') | ||
@@ -964,3 +1001,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$6 | ||
.get(getSubProjectApiUrl() + childId + '/accessibleParent') | ||
@@ -973,3 +1010,3 @@ .then(thenHandler) | ||
var axios$j = require('axios'); | ||
var axios$5 = require('axios'); | ||
function getTitleApiUrl() { | ||
@@ -985,3 +1022,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Title/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$j | ||
return axios$5 | ||
.get(getTitleApiUrl()) | ||
@@ -994,4 +1031,4 @@ .then(thenHandler) | ||
var axios$k = require('axios'); | ||
var authHeaderKey$1 = 'Authorization'; | ||
var axios$4 = require('axios'); | ||
var authHeaderKey = 'Authorization'; | ||
function getTOSApiUrl() { | ||
@@ -1001,3 +1038,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/TOS/'); | ||
function setHeader(jwtToken) { | ||
axios$k.defaults.headers.common[authHeaderKey$1] = | ||
axios$4.defaults.headers.common[authHeaderKey] = | ||
'Bearer ' + jwtToken; | ||
@@ -1012,3 +1049,3 @@ } | ||
apiConnectionBasic.setHeader(); | ||
return axios$k | ||
return axios$4 | ||
.get(getTOSApiUrl()) | ||
@@ -1022,3 +1059,3 @@ .then(thenHandler) | ||
setHeader(jwtToken); | ||
return axios$k | ||
return axios$4 | ||
.post(getTOSApiUrl()) | ||
@@ -1031,3 +1068,3 @@ .then(thenHandler) | ||
var axios$l = require('axios'); | ||
var axios$3 = require('axios'); | ||
function getTreeApiUrl() { | ||
@@ -1043,3 +1080,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Tree/Tree/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$l | ||
return axios$3 | ||
.get(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path)) | ||
@@ -1063,3 +1100,3 @@ .then(thenHandler) | ||
} | ||
return axios$l | ||
return axios$3 | ||
.put(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path), body) | ||
@@ -1072,3 +1109,3 @@ .then(thenHandler) | ||
var axios$m = require('axios'); | ||
var axios$2 = require('axios'); | ||
function getUserApiUrl() { | ||
@@ -1084,3 +1121,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/User/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$m | ||
return axios$2 | ||
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/') | ||
@@ -1094,3 +1131,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$m | ||
return axios$2 | ||
.get(getUserApiUrl() + 'user') | ||
@@ -1104,3 +1141,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$m | ||
return axios$2 | ||
.post(getUserApiUrl() + 'user', body) | ||
@@ -1114,3 +1151,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$m | ||
return axios$2 | ||
.get(getUserApiUrl() + 'mergeToken/' + provider) | ||
@@ -1123,3 +1160,3 @@ .then(thenHandler) | ||
var axios$n = require('axios'); | ||
var axios$1 = require('axios'); | ||
function getVisibilityApiUrl() { | ||
@@ -1135,3 +1172,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Visibility/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$n | ||
return axios$1 | ||
.get(getVisibilityApiUrl()) | ||
@@ -1144,3 +1181,3 @@ .then(thenHandler) | ||
var axios$o = require('axios'); | ||
var axios = require('axios'); | ||
function getTokenApiUrl() { | ||
@@ -1156,3 +1193,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Token/Token/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$o | ||
return axios | ||
.get(getTokenApiUrl()) | ||
@@ -1166,3 +1203,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$o | ||
return axios | ||
.put(getTokenApiUrl(), body) | ||
@@ -1176,3 +1213,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$o | ||
return axios | ||
.delete(getTokenApiUrl() + tokenId) | ||
@@ -1186,3 +1223,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$o | ||
return axios | ||
.get(getTokenApiUrl() + tokenId) | ||
@@ -1198,2 +1235,3 @@ .then(thenHandler) | ||
exports.BlobApi = BlobApi; | ||
exports.ContactChangeApi = ContactChangeApi; | ||
exports.DisciplineApi = DisciplineApi; | ||
@@ -1200,0 +1238,0 @@ exports.LanguageApi = LanguageApi; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TokenApi = exports.VisibilityApi = exports.UserApi = exports.TreeApi = exports.TOSApi = exports.TitleApi = exports.SubProjectApi = exports.SearchApi = exports.RoleApi = exports.ResourceTypeApi = exports.ResourceApi = exports.ProjectRoleApi = exports.ProjectApi = exports.QuotaApi = exports.PIDApi = exports.OrganizationApi = exports.NoticeApi = exports.MetadataApi = exports.LicenseApi = exports.LanguageApi = exports.DisciplineApi = exports.BlobApi = exports.AdminApi = exports.ActivatedFeaturesApi = void 0; | ||
exports.TokenApi = exports.VisibilityApi = exports.UserApi = exports.TreeApi = exports.TOSApi = exports.TitleApi = exports.SubProjectApi = exports.SearchApi = exports.RoleApi = exports.ResourceTypeApi = exports.ResourceApi = exports.ProjectRoleApi = exports.ProjectApi = exports.QuotaApi = exports.PIDApi = exports.OrganizationApi = exports.NoticeApi = exports.MetadataApi = exports.LicenseApi = exports.LanguageApi = exports.DisciplineApi = exports.ContactChangeApi = exports.BlobApi = exports.AdminApi = exports.ActivatedFeaturesApi = void 0; | ||
var activatedFeatures_api_1 = require("./requests/activatedFeatures-api"); | ||
@@ -10,2 +10,4 @@ Object.defineProperty(exports, "ActivatedFeaturesApi", { enumerable: true, get: function () { return activatedFeatures_api_1.ActivatedFeaturesApi; } }); | ||
Object.defineProperty(exports, "BlobApi", { enumerable: true, get: function () { return blob_api_1.BlobApi; } }); | ||
var contactchange_api_1 = require("./requests/contactchange-api"); | ||
Object.defineProperty(exports, "ContactChangeApi", { enumerable: true, get: function () { return contactchange_api_1.ContactChangeApi; } }); | ||
var discipline_api_1 = require("./requests/discipline-api"); | ||
@@ -12,0 +14,0 @@ Object.defineProperty(exports, "DisciplineApi", { enumerable: true, get: function () { return discipline_api_1.DisciplineApi; } }); |
export { ActivatedFeaturesApi } from './requests/activatedFeatures-api'; | ||
export { AdminApi } from './requests/admin-api'; | ||
export { BlobApi } from './requests/blob-api'; | ||
export { ContactChangeApi } from './requests/contactchange-api'; | ||
export { DisciplineApi } from './requests/discipline-api'; | ||
@@ -5,0 +6,0 @@ export { LanguageApi } from './requests/language-api'; |
{ | ||
"name": "@coscine/api-connection", | ||
"version": "1.26.0", | ||
"version": "1.27.0", | ||
"description": "This library provides methods to connect to CoScInE Apis with JavaScript.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
408120
88
3698