@coscine/api-connection
Advanced tools
Comparing version 1.18.1 to 1.19.0
@@ -316,2 +316,20 @@ var axios = require('axios'); | ||
var axios$7 = require('axios'); | ||
function getNoticeApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Notices/Notice/'); | ||
} | ||
var NoticeApi = /** @class */ (function () { | ||
function NoticeApi() { | ||
} | ||
NoticeApi.getNotices = function (documentSlug, language, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$7 | ||
.get(getNoticeApiUrl() + encodeURIComponent(documentSlug) + '?language=' + language) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return NoticeApi; | ||
}()); | ||
var axios$8 = require('axios'); | ||
function getOrganizationApiUrl() { | ||
@@ -327,3 +345,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Organization/Organization/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$8 | ||
.get(getOrganizationApiUrl()) | ||
@@ -337,3 +355,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$8 | ||
.get(getOrganizationApiUrl() + '?member=1') | ||
@@ -343,15 +361,33 @@ .then(thenHandler) | ||
}; | ||
OrganizationApi.getROR = function (thenHandler, catchHandler) { | ||
OrganizationApi.getOrganizationsWithFilter = function (searchterm, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
.get(getOrganizationApiUrl() + "ror") | ||
return axios$8 | ||
.get(getOrganizationApiUrl() + '?filter=' + encodeURIComponent(searchterm)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
OrganizationApi.getOrganization = function (url, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.get(getOrganizationApiUrl() + encodeURIComponent(url)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
OrganizationApi.getROR = function (searchterm, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.get(getOrganizationApiUrl() + '-/ror?filter=' + encodeURIComponent(searchterm)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return OrganizationApi; | ||
}()); | ||
var axios$8 = require('axios'); | ||
var axios$9 = require('axios'); | ||
function getProjectApiUrl() { | ||
@@ -367,3 +403,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.get(getProjectApiUrl() + projectId) | ||
@@ -377,3 +413,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.post(getProjectApiUrl(), body) | ||
@@ -387,3 +423,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.post(getProjectApiUrl() + projectId, body) | ||
@@ -397,3 +433,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.get(getProjectApiUrl() + projectId + '/quotas') | ||
@@ -408,3 +444,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.get(getProjectApiUrl() + projectId + '/resources' + analyticsLogFlag) | ||
@@ -423,3 +459,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.delete(getProjectApiUrl() + projectId) | ||
@@ -434,3 +470,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.get(getProjectApiUrl() + analyticsLogFlag) | ||
@@ -448,3 +484,3 @@ .then(thenHandler) | ||
var axios$9 = require('axios'); | ||
var axios$a = require('axios'); | ||
function getProjectRoleApiUrl() { | ||
@@ -461,3 +497,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/ProjectRole/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$a | ||
.get(getProjectRoleApiUrl() + parentId + '/' + analyticsLogFlag) | ||
@@ -476,3 +512,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$a | ||
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/') | ||
@@ -486,3 +522,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$a | ||
.post(getProjectRoleApiUrl(), body) | ||
@@ -496,3 +532,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$a | ||
.delete(getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId) | ||
@@ -506,3 +542,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$a | ||
.delete(getProjectRoleApiUrl() + 'project/' + projectId + '/user') | ||
@@ -515,3 +551,3 @@ .then(thenHandler) | ||
var axios$a = require('axios'); | ||
var axios$b = require('axios'); | ||
function getResourceApiUrl() { | ||
@@ -527,3 +563,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Resources/Resource/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$a | ||
return axios$b | ||
.get(getResourceApiUrl() + resourceId) | ||
@@ -537,3 +573,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$a | ||
return axios$b | ||
.post(getResourceApiUrl() + 'Project/' + parentId, body) | ||
@@ -547,3 +583,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$a | ||
return axios$b | ||
.delete(getResourceApiUrl() + resourceId) | ||
@@ -557,3 +593,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$a | ||
return axios$b | ||
.post(getResourceApiUrl() + resourceId, body) | ||
@@ -567,3 +603,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$a | ||
return axios$b | ||
.get(getResourceApiUrl() + resourceId + '/isCreator') | ||
@@ -576,3 +612,3 @@ .then(thenHandler) | ||
var axios$b = require('axios'); | ||
var axios$c = require('axios'); | ||
function getResourceTypeApiUrl() { | ||
@@ -590,3 +626,3 @@ return ('https://' + | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$c | ||
.get(getResourceTypeApiUrl() + 'types') | ||
@@ -600,3 +636,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$c | ||
.get(getResourceTypeApiUrl() + 'types/-/enabled') | ||
@@ -610,3 +646,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$c | ||
.get(getResourceTypeApiUrl() + 'types/' + resourceTypeId) | ||
@@ -619,3 +655,3 @@ .then(thenHandler) | ||
var axios$c = require('axios'); | ||
var axios$d = require('axios'); | ||
function getRoleApiUrl() { | ||
@@ -631,3 +667,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Role/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$c | ||
return axios$d | ||
.get(getRoleApiUrl()) | ||
@@ -640,3 +676,3 @@ .then(thenHandler) | ||
var axios$d = require('axios'); | ||
var axios$e = require('axios'); | ||
function getSearchApiUrl() { | ||
@@ -652,3 +688,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$e | ||
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query)) | ||
@@ -662,3 +698,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$e | ||
.get(getSearchApiUrl() + 'allNoFilter/') | ||
@@ -672,3 +708,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$e | ||
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query)) | ||
@@ -682,3 +718,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$e | ||
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId) | ||
@@ -691,3 +727,3 @@ .then(thenHandler) | ||
var axios$e = require('axios'); | ||
var axios$f = require('axios'); | ||
function getSubProjectApiUrl() { | ||
@@ -703,3 +739,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/SubProject/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$f | ||
.get(getSubProjectApiUrl() + parentId + '/') | ||
@@ -713,3 +749,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$f | ||
.get(getSubProjectApiUrl() + childId + '/accessibleParent') | ||
@@ -722,3 +758,3 @@ .then(thenHandler) | ||
var axios$f = require('axios'); | ||
var axios$g = require('axios'); | ||
function getTitleApiUrl() { | ||
@@ -734,3 +770,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Title/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
return axios$g | ||
.get(getTitleApiUrl()) | ||
@@ -743,3 +779,3 @@ .then(thenHandler) | ||
var axios$g = require('axios'); | ||
var axios$h = require('axios'); | ||
var authHeaderKey$1 = 'Authorization'; | ||
@@ -750,3 +786,3 @@ function getTOSApiUrl() { | ||
function setHeader(jwtToken) { | ||
axios$g.defaults.headers.common[authHeaderKey$1] = | ||
axios$h.defaults.headers.common[authHeaderKey$1] = | ||
'Bearer ' + jwtToken; | ||
@@ -761,3 +797,3 @@ } | ||
apiConnectionBasic.setHeader(); | ||
return axios$g | ||
return axios$h | ||
.get(getTOSApiUrl()) | ||
@@ -771,3 +807,3 @@ .then(thenHandler) | ||
setHeader(jwtToken); | ||
return axios$g | ||
return axios$h | ||
.post(getTOSApiUrl()) | ||
@@ -780,3 +816,3 @@ .then(thenHandler) | ||
var axios$h = require('axios'); | ||
var axios$i = require('axios'); | ||
function getTreeApiUrl() { | ||
@@ -792,3 +828,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Tree/Tree/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
return axios$i | ||
.get(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path)) | ||
@@ -812,3 +848,3 @@ .then(thenHandler) | ||
} | ||
return axios$h | ||
return axios$i | ||
.put(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path), body) | ||
@@ -821,3 +857,3 @@ .then(thenHandler) | ||
var axios$i = require('axios'); | ||
var axios$j = require('axios'); | ||
function getUserApiUrl() { | ||
@@ -833,3 +869,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/User/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$j | ||
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/') | ||
@@ -843,3 +879,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$j | ||
.get(getUserApiUrl() + 'user') | ||
@@ -853,3 +889,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$j | ||
.post(getUserApiUrl() + 'user', body) | ||
@@ -863,3 +899,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$j | ||
.get(getUserApiUrl() + 'mergeToken/' + provider) | ||
@@ -872,3 +908,3 @@ .then(thenHandler) | ||
var axios$j = require('axios'); | ||
var axios$k = require('axios'); | ||
function getVisibilityApiUrl() { | ||
@@ -884,3 +920,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Visibility/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$j | ||
return axios$k | ||
.get(getVisibilityApiUrl()) | ||
@@ -893,3 +929,3 @@ .then(thenHandler) | ||
export { ActivatedFeaturesApi, BlobApi, DisciplineApi, LanguageApi, LicenseApi, MetadataApi, OrganizationApi, ProjectApi, ProjectRoleApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, TOSApi, TitleApi, TreeApi, UserApi, VisibilityApi }; | ||
export { ActivatedFeaturesApi, BlobApi, DisciplineApi, LanguageApi, LicenseApi, MetadataApi, NoticeApi, OrganizationApi, ProjectApi, ProjectRoleApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, TOSApi, TitleApi, TreeApi, UserApi, VisibilityApi }; | ||
//# sourceMappingURL=api-connection.es5.js.map |
@@ -322,2 +322,20 @@ (function (global, factory) { | ||
var axios$7 = require('axios'); | ||
function getNoticeApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Notices/Notice/'); | ||
} | ||
var NoticeApi = /** @class */ (function () { | ||
function NoticeApi() { | ||
} | ||
NoticeApi.getNotices = function (documentSlug, language, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$7 | ||
.get(getNoticeApiUrl() + encodeURIComponent(documentSlug) + '?language=' + language) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return NoticeApi; | ||
}()); | ||
var axios$8 = require('axios'); | ||
function getOrganizationApiUrl() { | ||
@@ -333,3 +351,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Organization/Organization/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$8 | ||
.get(getOrganizationApiUrl()) | ||
@@ -343,3 +361,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
return axios$8 | ||
.get(getOrganizationApiUrl() + '?member=1') | ||
@@ -349,15 +367,33 @@ .then(thenHandler) | ||
}; | ||
OrganizationApi.getROR = function (thenHandler, catchHandler) { | ||
OrganizationApi.getOrganizationsWithFilter = function (searchterm, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
.get(getOrganizationApiUrl() + "ror") | ||
return axios$8 | ||
.get(getOrganizationApiUrl() + '?filter=' + encodeURIComponent(searchterm)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
OrganizationApi.getOrganization = function (url, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.get(getOrganizationApiUrl() + encodeURIComponent(url)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
OrganizationApi.getROR = function (searchterm, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.get(getOrganizationApiUrl() + '-/ror?filter=' + encodeURIComponent(searchterm)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return OrganizationApi; | ||
}()); | ||
var axios$8 = require('axios'); | ||
var axios$9 = require('axios'); | ||
function getProjectApiUrl() { | ||
@@ -373,3 +409,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.get(getProjectApiUrl() + projectId) | ||
@@ -383,3 +419,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.post(getProjectApiUrl(), body) | ||
@@ -393,3 +429,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.post(getProjectApiUrl() + projectId, body) | ||
@@ -403,3 +439,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.get(getProjectApiUrl() + projectId + '/quotas') | ||
@@ -414,3 +450,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.get(getProjectApiUrl() + projectId + '/resources' + analyticsLogFlag) | ||
@@ -429,3 +465,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.delete(getProjectApiUrl() + projectId) | ||
@@ -440,3 +476,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
return axios$9 | ||
.get(getProjectApiUrl() + analyticsLogFlag) | ||
@@ -454,3 +490,3 @@ .then(thenHandler) | ||
var axios$9 = require('axios'); | ||
var axios$a = require('axios'); | ||
function getProjectRoleApiUrl() { | ||
@@ -467,3 +503,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/ProjectRole/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$a | ||
.get(getProjectRoleApiUrl() + parentId + '/' + analyticsLogFlag) | ||
@@ -482,3 +518,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$a | ||
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/') | ||
@@ -492,3 +528,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$a | ||
.post(getProjectRoleApiUrl(), body) | ||
@@ -502,3 +538,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$a | ||
.delete(getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId) | ||
@@ -512,3 +548,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
return axios$a | ||
.delete(getProjectRoleApiUrl() + 'project/' + projectId + '/user') | ||
@@ -521,3 +557,3 @@ .then(thenHandler) | ||
var axios$a = require('axios'); | ||
var axios$b = require('axios'); | ||
function getResourceApiUrl() { | ||
@@ -533,3 +569,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Resources/Resource/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$a | ||
return axios$b | ||
.get(getResourceApiUrl() + resourceId) | ||
@@ -543,3 +579,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$a | ||
return axios$b | ||
.post(getResourceApiUrl() + 'Project/' + parentId, body) | ||
@@ -553,3 +589,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$a | ||
return axios$b | ||
.delete(getResourceApiUrl() + resourceId) | ||
@@ -563,3 +599,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$a | ||
return axios$b | ||
.post(getResourceApiUrl() + resourceId, body) | ||
@@ -573,3 +609,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$a | ||
return axios$b | ||
.get(getResourceApiUrl() + resourceId + '/isCreator') | ||
@@ -582,3 +618,3 @@ .then(thenHandler) | ||
var axios$b = require('axios'); | ||
var axios$c = require('axios'); | ||
function getResourceTypeApiUrl() { | ||
@@ -596,3 +632,3 @@ return ('https://' + | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$c | ||
.get(getResourceTypeApiUrl() + 'types') | ||
@@ -606,3 +642,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$c | ||
.get(getResourceTypeApiUrl() + 'types/-/enabled') | ||
@@ -616,3 +652,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
return axios$c | ||
.get(getResourceTypeApiUrl() + 'types/' + resourceTypeId) | ||
@@ -625,3 +661,3 @@ .then(thenHandler) | ||
var axios$c = require('axios'); | ||
var axios$d = require('axios'); | ||
function getRoleApiUrl() { | ||
@@ -637,3 +673,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Role/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$c | ||
return axios$d | ||
.get(getRoleApiUrl()) | ||
@@ -646,3 +682,3 @@ .then(thenHandler) | ||
var axios$d = require('axios'); | ||
var axios$e = require('axios'); | ||
function getSearchApiUrl() { | ||
@@ -658,3 +694,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$e | ||
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query)) | ||
@@ -668,3 +704,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$e | ||
.get(getSearchApiUrl() + 'allNoFilter/') | ||
@@ -678,3 +714,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$e | ||
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query)) | ||
@@ -688,3 +724,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
return axios$e | ||
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId) | ||
@@ -697,3 +733,3 @@ .then(thenHandler) | ||
var axios$e = require('axios'); | ||
var axios$f = require('axios'); | ||
function getSubProjectApiUrl() { | ||
@@ -709,3 +745,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/SubProject/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$f | ||
.get(getSubProjectApiUrl() + parentId + '/') | ||
@@ -719,3 +755,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$f | ||
.get(getSubProjectApiUrl() + childId + '/accessibleParent') | ||
@@ -728,3 +764,3 @@ .then(thenHandler) | ||
var axios$f = require('axios'); | ||
var axios$g = require('axios'); | ||
function getTitleApiUrl() { | ||
@@ -740,3 +776,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Title/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
return axios$g | ||
.get(getTitleApiUrl()) | ||
@@ -749,3 +785,3 @@ .then(thenHandler) | ||
var axios$g = require('axios'); | ||
var axios$h = require('axios'); | ||
var authHeaderKey$1 = 'Authorization'; | ||
@@ -756,3 +792,3 @@ function getTOSApiUrl() { | ||
function setHeader(jwtToken) { | ||
axios$g.defaults.headers.common[authHeaderKey$1] = | ||
axios$h.defaults.headers.common[authHeaderKey$1] = | ||
'Bearer ' + jwtToken; | ||
@@ -767,3 +803,3 @@ } | ||
apiConnectionBasic.setHeader(); | ||
return axios$g | ||
return axios$h | ||
.get(getTOSApiUrl()) | ||
@@ -777,3 +813,3 @@ .then(thenHandler) | ||
setHeader(jwtToken); | ||
return axios$g | ||
return axios$h | ||
.post(getTOSApiUrl()) | ||
@@ -786,3 +822,3 @@ .then(thenHandler) | ||
var axios$h = require('axios'); | ||
var axios$i = require('axios'); | ||
function getTreeApiUrl() { | ||
@@ -798,3 +834,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Tree/Tree/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
return axios$i | ||
.get(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path)) | ||
@@ -818,3 +854,3 @@ .then(thenHandler) | ||
} | ||
return axios$h | ||
return axios$i | ||
.put(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path), body) | ||
@@ -827,3 +863,3 @@ .then(thenHandler) | ||
var axios$i = require('axios'); | ||
var axios$j = require('axios'); | ||
function getUserApiUrl() { | ||
@@ -839,3 +875,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/User/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$j | ||
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/') | ||
@@ -849,3 +885,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$j | ||
.get(getUserApiUrl() + 'user') | ||
@@ -859,3 +895,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$j | ||
.post(getUserApiUrl() + 'user', body) | ||
@@ -869,3 +905,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
return axios$j | ||
.get(getUserApiUrl() + 'mergeToken/' + provider) | ||
@@ -878,3 +914,3 @@ .then(thenHandler) | ||
var axios$j = require('axios'); | ||
var axios$k = require('axios'); | ||
function getVisibilityApiUrl() { | ||
@@ -890,3 +926,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Visibility/'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$j | ||
return axios$k | ||
.get(getVisibilityApiUrl()) | ||
@@ -905,2 +941,3 @@ .then(thenHandler) | ||
exports.MetadataApi = MetadataApi; | ||
exports.NoticeApi = NoticeApi; | ||
exports.OrganizationApi = OrganizationApi; | ||
@@ -907,0 +944,0 @@ exports.ProjectApi = ProjectApi; |
@@ -15,2 +15,4 @@ "use strict"; | ||
Object.defineProperty(exports, "MetadataApi", { enumerable: true, get: function () { return metadata_api_1.MetadataApi; } }); | ||
var notice_api_1 = require("./requests/notice-api"); | ||
Object.defineProperty(exports, "NoticeApi", { enumerable: true, get: function () { return notice_api_1.NoticeApi; } }); | ||
var organization_api_1 = require("./requests/organization-api"); | ||
@@ -17,0 +19,0 @@ Object.defineProperty(exports, "OrganizationApi", { enumerable: true, get: function () { return organization_api_1.OrganizationApi; } }); |
@@ -30,3 +30,3 @@ "use strict"; | ||
}; | ||
OrganizationApi.getROR = function (thenHandler, catchHandler) { | ||
OrganizationApi.getOrganizationsWithFilter = function (searchterm, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = api_connection_basic_1.default.defaultThenHandler; } | ||
@@ -36,6 +36,24 @@ if (catchHandler === void 0) { catchHandler = api_connection_basic_1.default.defaultOnCatch; } | ||
return axios | ||
.get(getOrganizationApiUrl() + "ror") | ||
.get(getOrganizationApiUrl() + '?filter=' + encodeURIComponent(searchterm)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
OrganizationApi.getOrganization = function (url, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = api_connection_basic_1.default.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = api_connection_basic_1.default.defaultOnCatch; } | ||
api_connection_basic_1.default.setHeader(); | ||
return axios | ||
.get(getOrganizationApiUrl() + encodeURIComponent(url)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
OrganizationApi.getROR = function (searchterm, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = api_connection_basic_1.default.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = api_connection_basic_1.default.defaultOnCatch; } | ||
api_connection_basic_1.default.setHeader(); | ||
return axios | ||
.get(getOrganizationApiUrl() + '-/ror?filter=' + encodeURIComponent(searchterm)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return OrganizationApi; | ||
@@ -42,0 +60,0 @@ }()); |
@@ -7,2 +7,3 @@ export { ActivatedFeaturesApi } from './requests/activatedFeatures-api'; | ||
export { MetadataApi } from './requests/metadata-api'; | ||
export { NoticeApi } from './requests/notice-api'; | ||
export { OrganizationApi } from './requests/organization-api'; | ||
@@ -9,0 +10,0 @@ export { ProjectApi } from './requests/project-api'; |
export declare class OrganizationApi { | ||
static getOrganizations(thenHandler?: any, catchHandler?: any): any; | ||
static getOrganizationsWhereUserIsMember(thenHandler?: any, catchHandler?: any): any; | ||
static getROR(thenHandler?: any, catchHandler?: any): any; | ||
static getOrganizationsWithFilter(searchterm: string, thenHandler?: any, catchHandler?: any): any; | ||
static getOrganization(url: string, thenHandler?: any, catchHandler?: any): any; | ||
static getROR(searchterm: string, thenHandler?: any, catchHandler?: any): any; | ||
} |
{ | ||
"name": "@coscine/api-connection", | ||
"version": "1.18.1", | ||
"version": "1.19.0", | ||
"description": "This library provides methods to connect to CoScInE Apis with JavaScript.", | ||
@@ -98,3 +98,3 @@ "keywords": [ | ||
"colors": "^1.4.0", | ||
"commitizen": "^4.1.2", | ||
"commitizen": "^4.2.1", | ||
"conventional-changelog-eslint": "^3.0.8", | ||
@@ -101,0 +101,0 @@ "coveralls": "^3.1.0", |
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
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
365874
74
2872