@coscine/api-connection
Advanced tools
Comparing version 1.14.0 to 1.15.0
var axios = require('axios'); | ||
var authHeaderKey = 'Authorization'; | ||
var clientCorrolationIdKey = 'X-Coscine-Logging-CorrelationId'; | ||
var hostName = window.location.hostname; | ||
if (hostName.indexOf(':') !== -1) { | ||
if (hostName.indexOf('https://') !== -1) { | ||
hostName = hostName.replace('https://', ''); | ||
} | ||
hostName = hostName.substr(0, hostName.indexOf(':')); | ||
} | ||
var apiConnectionBasic = { | ||
getHostName: function () { | ||
var hostName = window.location.hostname; | ||
if (hostName.indexOf(':') !== -1) { | ||
if (hostName.indexOf('https://') !== -1) { | ||
hostName = hostName.replace('https://', ''); | ||
} | ||
hostName = hostName.substr(0, hostName.indexOf(':')); | ||
} | ||
return hostName; | ||
@@ -27,13 +27,15 @@ }, | ||
return; | ||
} | ||
}, | ||
}; | ||
var axios$1 = require('axios'); | ||
function getProjectApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/'); | ||
function getActivatedFeaturesApiUrl() { | ||
return ('https://' + | ||
apiConnectionBasic.getHostName() + | ||
'/coscine/api/Coscine.Api.ActivatedFeatures/ActivatedFeatures/'); | ||
} | ||
var ProjectApi = /** @class */ (function () { | ||
function ProjectApi() { | ||
var ActivatedFeaturesApi = /** @class */ (function () { | ||
function ActivatedFeaturesApi() { | ||
} | ||
ProjectApi.getProjectInformation = function (projectId, thenHandler, catchHandler) { | ||
ActivatedFeaturesApi.listAllFeatures = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -43,7 +45,7 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$1 | ||
.get(getProjectApiUrl() + projectId) | ||
.get(getActivatedFeaturesApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.storeProject = function (body, thenHandler, catchHandler) { | ||
ActivatedFeaturesApi.listAllFeaturesOfProject = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -53,7 +55,7 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$1 | ||
.post(getProjectApiUrl(), body) | ||
.get(getActivatedFeaturesApiUrl() + projectId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.updateProject = function (projectId, body, thenHandler, catchHandler) { | ||
ActivatedFeaturesApi.getActiveFeatures = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -63,71 +65,79 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$1 | ||
.post(getProjectApiUrl() + projectId, body) | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activeFeatures') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.getResources = function (parentId, thenHandler, catchHandler, analyticsLogFlag) { | ||
ActivatedFeaturesApi.getInactiveFeatures = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
.get(getProjectApiUrl() + parentId + '/resources' + analyticsLogFlag) | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/inactiveFeatures') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.getResourcesWithoutAnalyticsLog = function (parentId, thenHandler, catchHandler) { | ||
ActivatedFeaturesApi.activateFeature = function (projectId, featureId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
ProjectApi.getResources(parentId, thenHandler, catchHandler, '?noanalyticslog=true'); | ||
}; | ||
ProjectApi.deleteProject = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
.delete(getProjectApiUrl() + projectId) | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activateFeature/' + featureId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.getProjects = function (thenHandler, catchHandler, analyticsLogFlag) { | ||
ActivatedFeaturesApi.deactivateFeature = function (projectId, featureId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
.get(getProjectApiUrl() + analyticsLogFlag) | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/deactivateFeature/' + featureId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.getProjectsWithoutAnalyticsLog = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
ProjectApi.getProjects(thenHandler, catchHandler, '?noanalyticslog=true'); | ||
}; | ||
return ProjectApi; | ||
return ActivatedFeaturesApi; | ||
}()); | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var FileSaver_min = createCommonjsModule(function (module, exports) { | ||
(function(a,b){b();})(commonjsGlobal,function(){function b(a,b){return "undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(b,c,d){var e=new XMLHttpRequest;e.open("GET",b),e.responseType="blob",e.onload=function(){a(e.response,c,d);},e.onerror=function(){console.error("could not download file");},e.send();}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send();}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"));}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b);}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href);},4E4),setTimeout(function(){e(j);},0));}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else {var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i);});}}:function(a,b,d,e){if(e=e||open("","_blank"),e&&(e.document.title=e.document.body.innerText="downloading..."),"string"==typeof a)return c(a,b,d);var g="application/octet-stream"===a.type,h=/constructor/i.test(f.HTMLElement)||f.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||g&&h)&&"object"==typeof FileReader){var j=new FileReader;j.onloadend=function(){var a=j.result;a=i?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),e?e.location.href=a:location=a,e=null;},j.readAsDataURL(a);}else {var k=f.URL||f.webkitURL,l=k.createObjectURL(a);e?e.location=l:location.href=l,e=null,setTimeout(function(){k.revokeObjectURL(l);},4E4);}});f.saveAs=a.saveAs=a,(module.exports=a);}); | ||
}); | ||
var axios$2 = require('axios'); | ||
function getProjectRoleApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/ProjectRole/'); | ||
function getDataSourceApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.File/DataSource/'); | ||
} | ||
var ProjectRoleApi = /** @class */ (function () { | ||
function ProjectRoleApi() { | ||
var DataSourceApi = /** @class */ (function () { | ||
function DataSourceApi() { | ||
} | ||
ProjectRoleApi.getProjectRoles = function (parentId, thenHandler, catchHandler, analyticsLogFlag) { | ||
DataSourceApi.getDataSourceFolder = function (resourceId, path, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$2 | ||
.get(getProjectRoleApiUrl() + parentId + '/' + analyticsLogFlag) | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.getProjectRolesWithoutAnalyticsLog = function (parentId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
DataSourceApi.downloadDataSourceFile = function (resourceId, path, name, catchHandler) { | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
ProjectRoleApi.getProjectRoles(parentId, thenHandler, catchHandler, '?noanalyticslog=true'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$2 | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path), { | ||
responseType: 'blob' | ||
}) | ||
.then(function (response) { | ||
// Let the user save the file. | ||
// The data is cached until the response is completed! | ||
FileSaver_min.saveAs(response.data, name); | ||
}) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.getUserRoles = function (projectId, thenHandler, catchHandler) { | ||
DataSourceApi.getDataSource = function (resourceId, path, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -137,7 +147,7 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$2 | ||
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/') | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.setProjectRole = function (body, thenHandler, catchHandler) { | ||
DataSourceApi.delete = function (resourceId, path, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -147,53 +157,65 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$2 | ||
.post(getProjectRoleApiUrl(), body) | ||
.delete(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.deleteUser = function (parentId, userId, roleId, thenHandler, catchHandler) { | ||
DataSourceApi.Upload = function (resourceId, path, mimetype, data, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$2 | ||
.delete(getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId) | ||
return axios$2({ | ||
method: 'PUT', | ||
url: getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path), | ||
headers: { | ||
'Content-Type': mimetype | ||
}, | ||
data: data | ||
}) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ProjectRoleApi; | ||
}()); | ||
var axios$3 = require('axios'); | ||
function getResourceApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Resources/Resource/'); | ||
} | ||
var ResourceApi = /** @class */ (function () { | ||
function ResourceApi() { | ||
} | ||
ResourceApi.getResourceInformation = function (resourceId, thenHandler, catchHandler) { | ||
DataSourceApi.Update = function (resourceId, path, mimetype, data, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
.get(getResourceApiUrl() + resourceId) | ||
return axios$2({ | ||
method: 'PUT', | ||
url: getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path) + '/update', | ||
headers: { | ||
'Content-Type': mimetype | ||
}, | ||
data: data | ||
}) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceApi.storeResource = function (parentId, body, thenHandler, catchHandler) { | ||
DataSourceApi.isValidDataSource = function (body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
.post(getResourceApiUrl() + 'Project/' + parentId, body) | ||
return axios$2 | ||
.post(getDataSourceApiUrl() + 'validate', body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceApi.deleteResource = function (resourceId, thenHandler, catchHandler) { | ||
DataSourceApi.getQuota = function (resourceId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
.delete(getResourceApiUrl() + resourceId) | ||
return axios$2 | ||
.get(getDataSourceApiUrl() + resourceId + '/quota') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceApi.updateResource = function (resourceId, body, thenHandler, catchHandler) { | ||
return DataSourceApi; | ||
}()); | ||
var axios$3 = require('axios'); | ||
function getDisciplineApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Discipline/'); | ||
} | ||
var DisciplineApi = /** @class */ (function () { | ||
function DisciplineApi() { | ||
} | ||
DisciplineApi.getDisciplines = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -203,84 +225,108 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$3 | ||
.post(getResourceApiUrl() + resourceId, body) | ||
.get(getDisciplineApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceApi.isUserResourceCreator = function (resourceId, thenHandler, catchHandler) { | ||
return DisciplineApi; | ||
}()); | ||
var axios$4 = require('axios'); | ||
function getLanguageApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Language/'); | ||
} | ||
var LanguageApi = /** @class */ (function () { | ||
function LanguageApi() { | ||
} | ||
LanguageApi.getLanguages = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
.get(getResourceApiUrl() + 'resource/' + resourceId + '/isCreator') | ||
return axios$4 | ||
.get(getLanguageApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ResourceApi; | ||
return LanguageApi; | ||
}()); | ||
var axios$4 = require('axios'); | ||
function getResourceTypeApiUrl() { | ||
return ('https://' + | ||
apiConnectionBasic.getHostName() + | ||
'/coscine/api/Coscine.Api.Resources/ResourceType/'); | ||
var axios$5 = require('axios'); | ||
function getLicenseApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/License/'); | ||
} | ||
var ResourceTypeApi = /** @class */ (function () { | ||
function ResourceTypeApi() { | ||
var LicenseApi = /** @class */ (function () { | ||
function LicenseApi() { | ||
} | ||
ResourceTypeApi.getResourceTypes = function (thenHandler, catchHandler) { | ||
LicenseApi.getLicenses = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$4 | ||
.get(getResourceTypeApiUrl()) | ||
return axios$5 | ||
.get(getLicenseApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceTypeApi.getEnabledResourceTypes = function (thenHandler, catchHandler) { | ||
return LicenseApi; | ||
}()); | ||
var axios$6 = require('axios'); | ||
function getMetadataApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Metadata/Metadata/'); | ||
} | ||
var MetadataApi = /** @class */ (function () { | ||
function MetadataApi() { | ||
} | ||
MetadataApi.getMetadataForFile = function (resourceId, filename, version, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$4 | ||
.get(getResourceTypeApiUrl() + 'enabled') | ||
return axios$6 | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/filename/' + | ||
encodeURIComponent(filename) + | ||
'/ver/' + | ||
version) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceTypeApi.getFields = function (resourceTypeId, thenHandler, catchHandler) { | ||
MetadataApi.storeMetadataForFile = function (resourceId, filename, version, body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$4 | ||
.get(getResourceTypeApiUrl() + resourceTypeId + '/fields') | ||
// remove empty nodes | ||
for (var node in body) { | ||
var property = body[node]; | ||
if (property.length === 0 || | ||
property[0].value === undefined || | ||
property[0].value === null || | ||
property[0].value.trim() === '') { | ||
delete body[node]; | ||
} | ||
} | ||
return axios$6 | ||
.put(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/filename/' + | ||
encodeURIComponent(filename) + | ||
'/ver/' + | ||
version, body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ResourceTypeApi; | ||
}()); | ||
var axios$5 = require('axios'); | ||
function getRoleApiUrl() { | ||
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Role/'; | ||
} | ||
var RoleApi = /** @class */ (function () { | ||
function RoleApi() { | ||
} | ||
RoleApi.getRoles = function (thenHandler, catchHandler) { | ||
MetadataApi.getApplicationProfile = function (projectId, applicationProfileId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$5 | ||
.get(getRoleApiUrl()) | ||
return axios$6 | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
projectId + | ||
'/ap/' + | ||
encodeURIComponent(encodeURIComponent(applicationProfileId))) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return RoleApi; | ||
}()); | ||
var axios$6 = require('axios'); | ||
function getSubProjectApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/SubProject/'); | ||
} | ||
var SubProjectApi = /** @class */ (function () { | ||
function SubProjectApi() { | ||
} | ||
SubProjectApi.getSubProjects = function (parentId, thenHandler, catchHandler) { | ||
MetadataApi.getApplicationProfileComplete = function (resourceId, applicationProfileId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -290,7 +336,11 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$6 | ||
.get(getSubProjectApiUrl() + parentId + '/') | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/apc/' + | ||
encodeURIComponent(encodeURIComponent(applicationProfileId))) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
SubProjectApi.getAccessibleParent = function (childId, thenHandler, catchHandler) { | ||
MetadataApi.listAllApplicationProfiles = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -300,17 +350,26 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$6 | ||
.get(getSubProjectApiUrl() + childId + '/accessibleParent') | ||
.get(getMetadataApiUrl() + 'project/' + projectId + '/aplist/') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return SubProjectApi; | ||
MetadataApi.getVocabulary = function (projectId, path, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$6 | ||
.get(getMetadataApiUrl() + 'vocabulary/' + projectId + '/' + encodeURIComponent(path)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return MetadataApi; | ||
}()); | ||
var axios$7 = require('axios'); | ||
function getUserApiUrl() { | ||
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/User/'; | ||
function getOrganizationApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Organization/Organization/'); | ||
} | ||
var UserApi = /** @class */ (function () { | ||
function UserApi() { | ||
var OrganizationApi = /** @class */ (function () { | ||
function OrganizationApi() { | ||
} | ||
UserApi.queryUsers = function (query, parentId, thenHandler, catchHandler) { | ||
OrganizationApi.getOrganizations = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -320,7 +379,7 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$7 | ||
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/') | ||
.get(getOrganizationApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
UserApi.getUser = function (thenHandler, catchHandler) { | ||
OrganizationApi.getOrganizationsWhereUserIsMember = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -330,29 +389,26 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$7 | ||
.get(getUserApiUrl() + 'user') | ||
.get(getOrganizationApiUrl() + '?member=1') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return UserApi; | ||
OrganizationApi.getROR = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
.get(getOrganizationApiUrl() + "ror") | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return OrganizationApi; | ||
}()); | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var FileSaver_min = createCommonjsModule(function (module, exports) { | ||
(function(a,b){b();})(commonjsGlobal,function(){function b(a,b){return "undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(b,c,d){var e=new XMLHttpRequest;e.open("GET",b),e.responseType="blob",e.onload=function(){a(e.response,c,d);},e.onerror=function(){console.error("could not download file");},e.send();}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send();}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"));}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b);}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href);},4E4),setTimeout(function(){e(j);},0));}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else {var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i);});}}:function(a,b,d,e){if(e=e||open("","_blank"),e&&(e.document.title=e.document.body.innerText="downloading..."),"string"==typeof a)return c(a,b,d);var g="application/octet-stream"===a.type,h=/constructor/i.test(f.HTMLElement)||f.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||g&&h)&&"object"==typeof FileReader){var j=new FileReader;j.onloadend=function(){var a=j.result;a=i?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),e?e.location.href=a:location=a,e=null;},j.readAsDataURL(a);}else {var k=f.URL||f.webkitURL,l=k.createObjectURL(a);e?e.location=l:location.href=l,e=null,setTimeout(function(){k.revokeObjectURL(l);},4E4);}});f.saveAs=a.saveAs=a,(module.exports=a);}); | ||
}); | ||
var axios$8 = require('axios'); | ||
function getDataSourceApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.File/DataSource/'); | ||
function getProjectApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/'); | ||
} | ||
var DataSourceApi = /** @class */ (function () { | ||
function DataSourceApi() { | ||
var ProjectApi = /** @class */ (function () { | ||
function ProjectApi() { | ||
} | ||
DataSourceApi.getDataSourceFolder = function (resourceId, path, thenHandler, catchHandler) { | ||
ProjectApi.getProjectInformation = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -362,21 +418,16 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$8 | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.get(getProjectApiUrl() + projectId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.downloadDataSourceFile = function (resourceId, path, name, catchHandler) { | ||
ProjectApi.storeProject = function (body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path), { | ||
responseType: 'blob' | ||
}) | ||
.then(function (response) { | ||
// Let the user save the file. | ||
// The data is cached until the response is completed! | ||
FileSaver_min.saveAs(response.data, name); | ||
}) | ||
.post(getProjectApiUrl(), body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.getDataSource = function (resourceId, path, thenHandler, catchHandler) { | ||
ProjectApi.updateProject = function (projectId, body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -386,93 +437,108 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$8 | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.post(getProjectApiUrl() + projectId, body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.delete = function (resourceId, path, thenHandler, catchHandler) { | ||
ProjectApi.getResources = function (parentId, thenHandler, catchHandler, analyticsLogFlag) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.delete(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.get(getProjectApiUrl() + parentId + '/resources' + analyticsLogFlag) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.Upload = function (resourceId, path, mimetype, data, thenHandler, catchHandler) { | ||
ProjectApi.getResourcesWithoutAnalyticsLog = function (parentId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8({ | ||
method: 'PUT', | ||
url: getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path), | ||
headers: { | ||
'Content-Type': mimetype | ||
}, | ||
data: data | ||
}) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
ProjectApi.getResources(parentId, thenHandler, catchHandler, '?noanalyticslog=true'); | ||
}; | ||
DataSourceApi.Update = function (resourceId, path, mimetype, data, thenHandler, catchHandler) { | ||
ProjectApi.deleteProject = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8({ | ||
method: 'PUT', | ||
url: getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path) + '/update', | ||
headers: { | ||
'Content-Type': mimetype | ||
}, | ||
data: data | ||
}) | ||
return axios$8 | ||
.delete(getProjectApiUrl() + projectId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.isValidDataSource = function (body, thenHandler, catchHandler) { | ||
ProjectApi.getProjects = function (thenHandler, catchHandler, analyticsLogFlag) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.post(getDataSourceApiUrl() + 'validate', body) | ||
.get(getProjectApiUrl() + analyticsLogFlag) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.getQuota = function (resourceId, thenHandler, catchHandler) { | ||
ProjectApi.getProjectsWithoutAnalyticsLog = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.get(getDataSourceApiUrl() + resourceId + '/quota') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
ProjectApi.getProjects(thenHandler, catchHandler, '?noanalyticslog=true'); | ||
}; | ||
return DataSourceApi; | ||
return ProjectApi; | ||
}()); | ||
var axios$9 = require('axios'); | ||
function getVisibilityApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Visibility/'); | ||
function getProjectRoleApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/ProjectRole/'); | ||
} | ||
var VisibilityApi = /** @class */ (function () { | ||
function VisibilityApi() { | ||
var ProjectRoleApi = /** @class */ (function () { | ||
function ProjectRoleApi() { | ||
} | ||
VisibilityApi.getVisibilities = function (thenHandler, catchHandler) { | ||
ProjectRoleApi.getProjectRoles = function (parentId, thenHandler, catchHandler, analyticsLogFlag) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
.get(getVisibilityApiUrl()) | ||
.get(getProjectRoleApiUrl() + parentId + '/' + analyticsLogFlag) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return VisibilityApi; | ||
ProjectRoleApi.getProjectRolesWithoutAnalyticsLog = function (parentId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
ProjectRoleApi.getProjectRoles(parentId, thenHandler, catchHandler, '?noanalyticslog=true'); | ||
}; | ||
ProjectRoleApi.getUserRoles = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.setProjectRole = function (body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
.post(getProjectRoleApiUrl(), body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.deleteUser = function (parentId, userId, roleId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
.delete(getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ProjectRoleApi; | ||
}()); | ||
var axios$a = require('axios'); | ||
function getOrganizationApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Organization/Organization/'); | ||
function getResourceApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Resources/Resource/'); | ||
} | ||
var OrganizationApi = /** @class */ (function () { | ||
function OrganizationApi() { | ||
var ResourceApi = /** @class */ (function () { | ||
function ResourceApi() { | ||
} | ||
OrganizationApi.getOrganizations = function (thenHandler, catchHandler) { | ||
ResourceApi.getResourceInformation = function (resourceId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -482,142 +548,104 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$a | ||
.get(getOrganizationApiUrl()) | ||
.get(getResourceApiUrl() + resourceId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return OrganizationApi; | ||
}()); | ||
var axios$b = require('axios'); | ||
function getDisciplineApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Discipline/'); | ||
} | ||
var DisciplineApi = /** @class */ (function () { | ||
function DisciplineApi() { | ||
} | ||
DisciplineApi.getDisciplines = function (thenHandler, catchHandler) { | ||
ResourceApi.storeResource = function (parentId, body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
.get(getDisciplineApiUrl()) | ||
return axios$a | ||
.post(getResourceApiUrl() + 'Project/' + parentId, body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return DisciplineApi; | ||
}()); | ||
var axios$c = require('axios'); | ||
function getLicenseApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/License/'); | ||
} | ||
var LicenseApi = /** @class */ (function () { | ||
function LicenseApi() { | ||
} | ||
LicenseApi.getLicenses = function (thenHandler, catchHandler) { | ||
ResourceApi.deleteResource = function (resourceId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$c | ||
.get(getLicenseApiUrl()) | ||
return axios$a | ||
.delete(getResourceApiUrl() + resourceId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return LicenseApi; | ||
}()); | ||
var axios$d = require('axios'); | ||
function getMetadataApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Metadata/Metadata/'); | ||
} | ||
var MetadataApi = /** @class */ (function () { | ||
function MetadataApi() { | ||
} | ||
MetadataApi.getMetadataForFile = function (resourceId, filename, version, thenHandler, catchHandler) { | ||
ResourceApi.updateResource = function (resourceId, body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/filename/' + | ||
encodeURIComponent(filename) + | ||
'/ver/' + | ||
version) | ||
return axios$a | ||
.post(getResourceApiUrl() + resourceId, body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
MetadataApi.storeMetadataForFile = function (resourceId, filename, version, body, thenHandler, catchHandler) { | ||
ResourceApi.isUserResourceCreator = function (resourceId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
// remove empty nodes | ||
for (var node in body) { | ||
var property = body[node]; | ||
if (property.length === 0 || | ||
property[0].value === undefined || | ||
property[0].value === null || | ||
property[0].value.trim() === '') { | ||
delete body[node]; | ||
} | ||
} | ||
return axios$d | ||
.put(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/filename/' + | ||
encodeURIComponent(filename) + | ||
'/ver/' + | ||
version, body) | ||
return axios$a | ||
.get(getResourceApiUrl() + 'resource/' + resourceId + '/isCreator') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
MetadataApi.getApplicationProfile = function (projectId, applicationProfileId, thenHandler, catchHandler) { | ||
return ResourceApi; | ||
}()); | ||
var axios$b = require('axios'); | ||
function getResourceTypeApiUrl() { | ||
return ('https://' + | ||
apiConnectionBasic.getHostName() + | ||
'/coscine/api/Coscine.Api.Resources/ResourceType/'); | ||
} | ||
var ResourceTypeApi = /** @class */ (function () { | ||
function ResourceTypeApi() { | ||
} | ||
ResourceTypeApi.getResourceTypes = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
projectId + | ||
'/ap/' + | ||
encodeURIComponent(encodeURIComponent(applicationProfileId))) | ||
return axios$b | ||
.get(getResourceTypeApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
MetadataApi.getApplicationProfileComplete = function (resourceId, applicationProfileId, thenHandler, catchHandler) { | ||
ResourceTypeApi.getEnabledResourceTypes = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/apc/' + | ||
encodeURIComponent(encodeURIComponent(applicationProfileId))) | ||
return axios$b | ||
.get(getResourceTypeApiUrl() + 'enabled') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
MetadataApi.listAllApplicationProfiles = function (projectId, thenHandler, catchHandler) { | ||
ResourceTypeApi.getFields = function (resourceTypeId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
.get(getMetadataApiUrl() + 'project/' + projectId + '/aplist/') | ||
return axios$b | ||
.get(getResourceTypeApiUrl() + resourceTypeId + '/fields') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
MetadataApi.getVocabulary = function (projectId, path, thenHandler, catchHandler) { | ||
return ResourceTypeApi; | ||
}()); | ||
var axios$c = require('axios'); | ||
function getRoleApiUrl() { | ||
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Role/'; | ||
} | ||
var RoleApi = /** @class */ (function () { | ||
function RoleApi() { | ||
} | ||
RoleApi.getRoles = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
.get(getMetadataApiUrl() + 'vocabulary/' + projectId + '/' + encodeURIComponent(path)) | ||
return axios$c | ||
.get(getRoleApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return MetadataApi; | ||
return RoleApi; | ||
}()); | ||
var axios$e = require('axios'); | ||
var axios$d = require('axios'); | ||
function getSearchApiUrl() { | ||
@@ -633,3 +661,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$d | ||
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query)) | ||
@@ -643,3 +671,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$d | ||
.get(getSearchApiUrl() + 'allNoFilter/') | ||
@@ -653,3 +681,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$d | ||
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query)) | ||
@@ -663,3 +691,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$d | ||
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId) | ||
@@ -672,30 +700,38 @@ .then(thenHandler) | ||
var axios$f = require('axios'); | ||
function getActivatedFeaturesApiUrl() { | ||
return ('https://' + | ||
apiConnectionBasic.getHostName() + | ||
'/coscine/api/Coscine.Api.ActivatedFeatures/ActivatedFeatures/'); | ||
var axios$e = require('axios'); | ||
function getSubProjectApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/SubProject/'); | ||
} | ||
var ActivatedFeaturesApi = /** @class */ (function () { | ||
function ActivatedFeaturesApi() { | ||
var SubProjectApi = /** @class */ (function () { | ||
function SubProjectApi() { | ||
} | ||
ActivatedFeaturesApi.listAllFeatures = function (thenHandler, catchHandler) { | ||
SubProjectApi.getSubProjects = function (parentId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl()) | ||
return axios$e | ||
.get(getSubProjectApiUrl() + parentId + '/') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.listAllFeaturesOfProject = function (projectId, thenHandler, catchHandler) { | ||
SubProjectApi.getAccessibleParent = function (childId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId) | ||
return axios$e | ||
.get(getSubProjectApiUrl() + childId + '/accessibleParent') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.getActiveFeatures = function (projectId, thenHandler, catchHandler) { | ||
return SubProjectApi; | ||
}()); | ||
var axios$f = require('axios'); | ||
function getTitleApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Title/'); | ||
} | ||
var TitleApi = /** @class */ (function () { | ||
function TitleApi() { | ||
} | ||
TitleApi.getTitles = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -705,54 +741,99 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activeFeatures') | ||
.get(getTitleApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.getInactiveFeatures = function (projectId, thenHandler, catchHandler) { | ||
return TitleApi; | ||
}()); | ||
var axios$g = require('axios'); | ||
var authHeaderKey$1 = 'Authorization'; | ||
function getTOSApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/TOS/'); | ||
} | ||
function setHeader(jwtToken) { | ||
axios$g.defaults.headers.common[authHeaderKey$1] = | ||
'Bearer ' + jwtToken; | ||
} | ||
var TOSApi = /** @class */ (function () { | ||
function TOSApi() { | ||
} | ||
TOSApi.getCurrentTOSVersion = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/inactiveFeatures') | ||
return axios$g | ||
.get(getTOSApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.activateFeature = function (projectId, featureId, thenHandler, catchHandler) { | ||
TOSApi.acceptCurrentTOSVersion = function (jwtToken, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
setHeader(jwtToken); | ||
return axios$g | ||
.post(getTOSApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return TOSApi; | ||
}()); | ||
var axios$h = require('axios'); | ||
function getUserApiUrl() { | ||
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/User/'; | ||
} | ||
var UserApi = /** @class */ (function () { | ||
function UserApi() { | ||
} | ||
UserApi.queryUsers = function (query, parentId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activateFeature/' + featureId) | ||
return axios$h | ||
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.deactivateFeature = function (projectId, featureId, thenHandler, catchHandler) { | ||
UserApi.getUser = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/deactivateFeature/' + featureId) | ||
return axios$h | ||
.get(getUserApiUrl() + 'user') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ActivatedFeaturesApi; | ||
UserApi.updateUser = function (body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
.post(getUserApiUrl() + 'user', body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return UserApi; | ||
}()); | ||
function defaultOnCatch(error) { | ||
// TODO: Do something with the error | ||
// tslint:disable-next-line: no-console | ||
console.log(error); | ||
var axios$i = require('axios'); | ||
function getVisibilityApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Visibility/'); | ||
} | ||
function redirectToProject(project) { | ||
if (!project || | ||
!project.id || | ||
project.id === '' || | ||
project.id === '00000000-0000-0000-0000-000000000000') { | ||
window.location.href = 'https://' + apiConnectionBasic.getHostName() + '/'; | ||
var VisibilityApi = /** @class */ (function () { | ||
function VisibilityApi() { | ||
} | ||
else { | ||
window.location.href = 'https://' + apiConnectionBasic.getHostName() + '/p/' + project.id + '/'; | ||
} | ||
} | ||
VisibilityApi.getVisibilities = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
.get(getVisibilityApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return VisibilityApi; | ||
}()); | ||
export { ActivatedFeaturesApi, DataSourceApi, DisciplineApi, LicenseApi, MetadataApi, OrganizationApi, ProjectApi, ProjectRoleApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, UserApi, VisibilityApi, defaultOnCatch, redirectToProject }; | ||
export { ActivatedFeaturesApi, DataSourceApi, DisciplineApi, LanguageApi, LicenseApi, MetadataApi, OrganizationApi, ProjectApi, ProjectRoleApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, TOSApi, TitleApi, UserApi, VisibilityApi }; | ||
//# sourceMappingURL=api-connection.es5.js.map |
@@ -10,11 +10,11 @@ (function (global, factory) { | ||
var clientCorrolationIdKey = 'X-Coscine-Logging-CorrelationId'; | ||
var hostName = window.location.hostname; | ||
if (hostName.indexOf(':') !== -1) { | ||
if (hostName.indexOf('https://') !== -1) { | ||
hostName = hostName.replace('https://', ''); | ||
} | ||
hostName = hostName.substr(0, hostName.indexOf(':')); | ||
} | ||
var apiConnectionBasic = { | ||
getHostName: function () { | ||
var hostName = window.location.hostname; | ||
if (hostName.indexOf(':') !== -1) { | ||
if (hostName.indexOf('https://') !== -1) { | ||
hostName = hostName.replace('https://', ''); | ||
} | ||
hostName = hostName.substr(0, hostName.indexOf(':')); | ||
} | ||
return hostName; | ||
@@ -34,13 +34,15 @@ }, | ||
return; | ||
} | ||
}, | ||
}; | ||
var axios$1 = require('axios'); | ||
function getProjectApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/'); | ||
function getActivatedFeaturesApiUrl() { | ||
return ('https://' + | ||
apiConnectionBasic.getHostName() + | ||
'/coscine/api/Coscine.Api.ActivatedFeatures/ActivatedFeatures/'); | ||
} | ||
var ProjectApi = /** @class */ (function () { | ||
function ProjectApi() { | ||
var ActivatedFeaturesApi = /** @class */ (function () { | ||
function ActivatedFeaturesApi() { | ||
} | ||
ProjectApi.getProjectInformation = function (projectId, thenHandler, catchHandler) { | ||
ActivatedFeaturesApi.listAllFeatures = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -50,7 +52,7 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$1 | ||
.get(getProjectApiUrl() + projectId) | ||
.get(getActivatedFeaturesApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.storeProject = function (body, thenHandler, catchHandler) { | ||
ActivatedFeaturesApi.listAllFeaturesOfProject = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -60,7 +62,7 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$1 | ||
.post(getProjectApiUrl(), body) | ||
.get(getActivatedFeaturesApiUrl() + projectId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.updateProject = function (projectId, body, thenHandler, catchHandler) { | ||
ActivatedFeaturesApi.getActiveFeatures = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -70,71 +72,79 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$1 | ||
.post(getProjectApiUrl() + projectId, body) | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activeFeatures') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.getResources = function (parentId, thenHandler, catchHandler, analyticsLogFlag) { | ||
ActivatedFeaturesApi.getInactiveFeatures = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
.get(getProjectApiUrl() + parentId + '/resources' + analyticsLogFlag) | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/inactiveFeatures') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.getResourcesWithoutAnalyticsLog = function (parentId, thenHandler, catchHandler) { | ||
ActivatedFeaturesApi.activateFeature = function (projectId, featureId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
ProjectApi.getResources(parentId, thenHandler, catchHandler, '?noanalyticslog=true'); | ||
}; | ||
ProjectApi.deleteProject = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
.delete(getProjectApiUrl() + projectId) | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activateFeature/' + featureId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.getProjects = function (thenHandler, catchHandler, analyticsLogFlag) { | ||
ActivatedFeaturesApi.deactivateFeature = function (projectId, featureId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$1 | ||
.get(getProjectApiUrl() + analyticsLogFlag) | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/deactivateFeature/' + featureId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectApi.getProjectsWithoutAnalyticsLog = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
ProjectApi.getProjects(thenHandler, catchHandler, '?noanalyticslog=true'); | ||
}; | ||
return ProjectApi; | ||
return ActivatedFeaturesApi; | ||
}()); | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var FileSaver_min = createCommonjsModule(function (module, exports) { | ||
(function(a,b){b();})(commonjsGlobal,function(){function b(a,b){return "undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(b,c,d){var e=new XMLHttpRequest;e.open("GET",b),e.responseType="blob",e.onload=function(){a(e.response,c,d);},e.onerror=function(){console.error("could not download file");},e.send();}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send();}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"));}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b);}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href);},4E4),setTimeout(function(){e(j);},0));}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else {var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i);});}}:function(a,b,d,e){if(e=e||open("","_blank"),e&&(e.document.title=e.document.body.innerText="downloading..."),"string"==typeof a)return c(a,b,d);var g="application/octet-stream"===a.type,h=/constructor/i.test(f.HTMLElement)||f.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||g&&h)&&"object"==typeof FileReader){var j=new FileReader;j.onloadend=function(){var a=j.result;a=i?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),e?e.location.href=a:location=a,e=null;},j.readAsDataURL(a);}else {var k=f.URL||f.webkitURL,l=k.createObjectURL(a);e?e.location=l:location.href=l,e=null,setTimeout(function(){k.revokeObjectURL(l);},4E4);}});f.saveAs=a.saveAs=a,(module.exports=a);}); | ||
}); | ||
var axios$2 = require('axios'); | ||
function getProjectRoleApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/ProjectRole/'); | ||
function getDataSourceApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.File/DataSource/'); | ||
} | ||
var ProjectRoleApi = /** @class */ (function () { | ||
function ProjectRoleApi() { | ||
var DataSourceApi = /** @class */ (function () { | ||
function DataSourceApi() { | ||
} | ||
ProjectRoleApi.getProjectRoles = function (parentId, thenHandler, catchHandler, analyticsLogFlag) { | ||
DataSourceApi.getDataSourceFolder = function (resourceId, path, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$2 | ||
.get(getProjectRoleApiUrl() + parentId + '/' + analyticsLogFlag) | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.getProjectRolesWithoutAnalyticsLog = function (parentId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
DataSourceApi.downloadDataSourceFile = function (resourceId, path, name, catchHandler) { | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
ProjectRoleApi.getProjectRoles(parentId, thenHandler, catchHandler, '?noanalyticslog=true'); | ||
apiConnectionBasic.setHeader(); | ||
return axios$2 | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path), { | ||
responseType: 'blob' | ||
}) | ||
.then(function (response) { | ||
// Let the user save the file. | ||
// The data is cached until the response is completed! | ||
FileSaver_min.saveAs(response.data, name); | ||
}) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.getUserRoles = function (projectId, thenHandler, catchHandler) { | ||
DataSourceApi.getDataSource = function (resourceId, path, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -144,7 +154,7 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$2 | ||
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/') | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.setProjectRole = function (body, thenHandler, catchHandler) { | ||
DataSourceApi.delete = function (resourceId, path, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -154,53 +164,65 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$2 | ||
.post(getProjectRoleApiUrl(), body) | ||
.delete(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.deleteUser = function (parentId, userId, roleId, thenHandler, catchHandler) { | ||
DataSourceApi.Upload = function (resourceId, path, mimetype, data, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$2 | ||
.delete(getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId) | ||
return axios$2({ | ||
method: 'PUT', | ||
url: getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path), | ||
headers: { | ||
'Content-Type': mimetype | ||
}, | ||
data: data | ||
}) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ProjectRoleApi; | ||
}()); | ||
var axios$3 = require('axios'); | ||
function getResourceApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Resources/Resource/'); | ||
} | ||
var ResourceApi = /** @class */ (function () { | ||
function ResourceApi() { | ||
} | ||
ResourceApi.getResourceInformation = function (resourceId, thenHandler, catchHandler) { | ||
DataSourceApi.Update = function (resourceId, path, mimetype, data, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
.get(getResourceApiUrl() + resourceId) | ||
return axios$2({ | ||
method: 'PUT', | ||
url: getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path) + '/update', | ||
headers: { | ||
'Content-Type': mimetype | ||
}, | ||
data: data | ||
}) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceApi.storeResource = function (parentId, body, thenHandler, catchHandler) { | ||
DataSourceApi.isValidDataSource = function (body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
.post(getResourceApiUrl() + 'Project/' + parentId, body) | ||
return axios$2 | ||
.post(getDataSourceApiUrl() + 'validate', body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceApi.deleteResource = function (resourceId, thenHandler, catchHandler) { | ||
DataSourceApi.getQuota = function (resourceId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
.delete(getResourceApiUrl() + resourceId) | ||
return axios$2 | ||
.get(getDataSourceApiUrl() + resourceId + '/quota') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceApi.updateResource = function (resourceId, body, thenHandler, catchHandler) { | ||
return DataSourceApi; | ||
}()); | ||
var axios$3 = require('axios'); | ||
function getDisciplineApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Discipline/'); | ||
} | ||
var DisciplineApi = /** @class */ (function () { | ||
function DisciplineApi() { | ||
} | ||
DisciplineApi.getDisciplines = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -210,84 +232,108 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$3 | ||
.post(getResourceApiUrl() + resourceId, body) | ||
.get(getDisciplineApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceApi.isUserResourceCreator = function (resourceId, thenHandler, catchHandler) { | ||
return DisciplineApi; | ||
}()); | ||
var axios$4 = require('axios'); | ||
function getLanguageApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Language/'); | ||
} | ||
var LanguageApi = /** @class */ (function () { | ||
function LanguageApi() { | ||
} | ||
LanguageApi.getLanguages = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$3 | ||
.get(getResourceApiUrl() + 'resource/' + resourceId + '/isCreator') | ||
return axios$4 | ||
.get(getLanguageApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ResourceApi; | ||
return LanguageApi; | ||
}()); | ||
var axios$4 = require('axios'); | ||
function getResourceTypeApiUrl() { | ||
return ('https://' + | ||
apiConnectionBasic.getHostName() + | ||
'/coscine/api/Coscine.Api.Resources/ResourceType/'); | ||
var axios$5 = require('axios'); | ||
function getLicenseApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/License/'); | ||
} | ||
var ResourceTypeApi = /** @class */ (function () { | ||
function ResourceTypeApi() { | ||
var LicenseApi = /** @class */ (function () { | ||
function LicenseApi() { | ||
} | ||
ResourceTypeApi.getResourceTypes = function (thenHandler, catchHandler) { | ||
LicenseApi.getLicenses = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$4 | ||
.get(getResourceTypeApiUrl()) | ||
return axios$5 | ||
.get(getLicenseApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceTypeApi.getEnabledResourceTypes = function (thenHandler, catchHandler) { | ||
return LicenseApi; | ||
}()); | ||
var axios$6 = require('axios'); | ||
function getMetadataApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Metadata/Metadata/'); | ||
} | ||
var MetadataApi = /** @class */ (function () { | ||
function MetadataApi() { | ||
} | ||
MetadataApi.getMetadataForFile = function (resourceId, filename, version, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$4 | ||
.get(getResourceTypeApiUrl() + 'enabled') | ||
return axios$6 | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/filename/' + | ||
encodeURIComponent(filename) + | ||
'/ver/' + | ||
version) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ResourceTypeApi.getFields = function (resourceTypeId, thenHandler, catchHandler) { | ||
MetadataApi.storeMetadataForFile = function (resourceId, filename, version, body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$4 | ||
.get(getResourceTypeApiUrl() + resourceTypeId + '/fields') | ||
// remove empty nodes | ||
for (var node in body) { | ||
var property = body[node]; | ||
if (property.length === 0 || | ||
property[0].value === undefined || | ||
property[0].value === null || | ||
property[0].value.trim() === '') { | ||
delete body[node]; | ||
} | ||
} | ||
return axios$6 | ||
.put(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/filename/' + | ||
encodeURIComponent(filename) + | ||
'/ver/' + | ||
version, body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ResourceTypeApi; | ||
}()); | ||
var axios$5 = require('axios'); | ||
function getRoleApiUrl() { | ||
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Role/'; | ||
} | ||
var RoleApi = /** @class */ (function () { | ||
function RoleApi() { | ||
} | ||
RoleApi.getRoles = function (thenHandler, catchHandler) { | ||
MetadataApi.getApplicationProfile = function (projectId, applicationProfileId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$5 | ||
.get(getRoleApiUrl()) | ||
return axios$6 | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
projectId + | ||
'/ap/' + | ||
encodeURIComponent(encodeURIComponent(applicationProfileId))) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return RoleApi; | ||
}()); | ||
var axios$6 = require('axios'); | ||
function getSubProjectApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/SubProject/'); | ||
} | ||
var SubProjectApi = /** @class */ (function () { | ||
function SubProjectApi() { | ||
} | ||
SubProjectApi.getSubProjects = function (parentId, thenHandler, catchHandler) { | ||
MetadataApi.getApplicationProfileComplete = function (resourceId, applicationProfileId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -297,7 +343,11 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$6 | ||
.get(getSubProjectApiUrl() + parentId + '/') | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/apc/' + | ||
encodeURIComponent(encodeURIComponent(applicationProfileId))) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
SubProjectApi.getAccessibleParent = function (childId, thenHandler, catchHandler) { | ||
MetadataApi.listAllApplicationProfiles = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -307,17 +357,26 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$6 | ||
.get(getSubProjectApiUrl() + childId + '/accessibleParent') | ||
.get(getMetadataApiUrl() + 'project/' + projectId + '/aplist/') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return SubProjectApi; | ||
MetadataApi.getVocabulary = function (projectId, path, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$6 | ||
.get(getMetadataApiUrl() + 'vocabulary/' + projectId + '/' + encodeURIComponent(path)) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return MetadataApi; | ||
}()); | ||
var axios$7 = require('axios'); | ||
function getUserApiUrl() { | ||
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/User/'; | ||
function getOrganizationApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Organization/Organization/'); | ||
} | ||
var UserApi = /** @class */ (function () { | ||
function UserApi() { | ||
var OrganizationApi = /** @class */ (function () { | ||
function OrganizationApi() { | ||
} | ||
UserApi.queryUsers = function (query, parentId, thenHandler, catchHandler) { | ||
OrganizationApi.getOrganizations = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -327,7 +386,7 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$7 | ||
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/') | ||
.get(getOrganizationApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
UserApi.getUser = function (thenHandler, catchHandler) { | ||
OrganizationApi.getOrganizationsWhereUserIsMember = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -337,29 +396,26 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$7 | ||
.get(getUserApiUrl() + 'user') | ||
.get(getOrganizationApiUrl() + '?member=1') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return UserApi; | ||
OrganizationApi.getROR = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$7 | ||
.get(getOrganizationApiUrl() + "ror") | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return OrganizationApi; | ||
}()); | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var FileSaver_min = createCommonjsModule(function (module, exports) { | ||
(function(a,b){b();})(commonjsGlobal,function(){function b(a,b){return "undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(b,c,d){var e=new XMLHttpRequest;e.open("GET",b),e.responseType="blob",e.onload=function(){a(e.response,c,d);},e.onerror=function(){console.error("could not download file");},e.send();}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send();}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"));}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b);}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href);},4E4),setTimeout(function(){e(j);},0));}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else {var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i);});}}:function(a,b,d,e){if(e=e||open("","_blank"),e&&(e.document.title=e.document.body.innerText="downloading..."),"string"==typeof a)return c(a,b,d);var g="application/octet-stream"===a.type,h=/constructor/i.test(f.HTMLElement)||f.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||g&&h)&&"object"==typeof FileReader){var j=new FileReader;j.onloadend=function(){var a=j.result;a=i?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),e?e.location.href=a:location=a,e=null;},j.readAsDataURL(a);}else {var k=f.URL||f.webkitURL,l=k.createObjectURL(a);e?e.location=l:location.href=l,e=null,setTimeout(function(){k.revokeObjectURL(l);},4E4);}});f.saveAs=a.saveAs=a,(module.exports=a);}); | ||
}); | ||
var axios$8 = require('axios'); | ||
function getDataSourceApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.File/DataSource/'); | ||
function getProjectApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/'); | ||
} | ||
var DataSourceApi = /** @class */ (function () { | ||
function DataSourceApi() { | ||
var ProjectApi = /** @class */ (function () { | ||
function ProjectApi() { | ||
} | ||
DataSourceApi.getDataSourceFolder = function (resourceId, path, thenHandler, catchHandler) { | ||
ProjectApi.getProjectInformation = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -369,21 +425,16 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$8 | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.get(getProjectApiUrl() + projectId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.downloadDataSourceFile = function (resourceId, path, name, catchHandler) { | ||
ProjectApi.storeProject = function (body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path), { | ||
responseType: 'blob' | ||
}) | ||
.then(function (response) { | ||
// Let the user save the file. | ||
// The data is cached until the response is completed! | ||
FileSaver_min.saveAs(response.data, name); | ||
}) | ||
.post(getProjectApiUrl(), body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.getDataSource = function (resourceId, path, thenHandler, catchHandler) { | ||
ProjectApi.updateProject = function (projectId, body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -393,93 +444,108 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$8 | ||
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.post(getProjectApiUrl() + projectId, body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.delete = function (resourceId, path, thenHandler, catchHandler) { | ||
ProjectApi.getResources = function (parentId, thenHandler, catchHandler, analyticsLogFlag) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.delete(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path)) | ||
.get(getProjectApiUrl() + parentId + '/resources' + analyticsLogFlag) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.Upload = function (resourceId, path, mimetype, data, thenHandler, catchHandler) { | ||
ProjectApi.getResourcesWithoutAnalyticsLog = function (parentId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8({ | ||
method: 'PUT', | ||
url: getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path), | ||
headers: { | ||
'Content-Type': mimetype | ||
}, | ||
data: data | ||
}) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
ProjectApi.getResources(parentId, thenHandler, catchHandler, '?noanalyticslog=true'); | ||
}; | ||
DataSourceApi.Update = function (resourceId, path, mimetype, data, thenHandler, catchHandler) { | ||
ProjectApi.deleteProject = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8({ | ||
method: 'PUT', | ||
url: getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path) + '/update', | ||
headers: { | ||
'Content-Type': mimetype | ||
}, | ||
data: data | ||
}) | ||
return axios$8 | ||
.delete(getProjectApiUrl() + projectId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.isValidDataSource = function (body, thenHandler, catchHandler) { | ||
ProjectApi.getProjects = function (thenHandler, catchHandler, analyticsLogFlag) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.post(getDataSourceApiUrl() + 'validate', body) | ||
.get(getProjectApiUrl() + analyticsLogFlag) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
DataSourceApi.getQuota = function (resourceId, thenHandler, catchHandler) { | ||
ProjectApi.getProjectsWithoutAnalyticsLog = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$8 | ||
.get(getDataSourceApiUrl() + resourceId + '/quota') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
ProjectApi.getProjects(thenHandler, catchHandler, '?noanalyticslog=true'); | ||
}; | ||
return DataSourceApi; | ||
return ProjectApi; | ||
}()); | ||
var axios$9 = require('axios'); | ||
function getVisibilityApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Visibility/'); | ||
function getProjectRoleApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/ProjectRole/'); | ||
} | ||
var VisibilityApi = /** @class */ (function () { | ||
function VisibilityApi() { | ||
var ProjectRoleApi = /** @class */ (function () { | ||
function ProjectRoleApi() { | ||
} | ||
VisibilityApi.getVisibilities = function (thenHandler, catchHandler) { | ||
ProjectRoleApi.getProjectRoles = function (parentId, thenHandler, catchHandler, analyticsLogFlag) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
if (analyticsLogFlag === void 0) { analyticsLogFlag = ""; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
.get(getVisibilityApiUrl()) | ||
.get(getProjectRoleApiUrl() + parentId + '/' + analyticsLogFlag) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return VisibilityApi; | ||
ProjectRoleApi.getProjectRolesWithoutAnalyticsLog = function (parentId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
ProjectRoleApi.getProjectRoles(parentId, thenHandler, catchHandler, '?noanalyticslog=true'); | ||
}; | ||
ProjectRoleApi.getUserRoles = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.setProjectRole = function (body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
.post(getProjectRoleApiUrl(), body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ProjectRoleApi.deleteUser = function (parentId, userId, roleId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$9 | ||
.delete(getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ProjectRoleApi; | ||
}()); | ||
var axios$a = require('axios'); | ||
function getOrganizationApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Organization/Organization/'); | ||
function getResourceApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Resources/Resource/'); | ||
} | ||
var OrganizationApi = /** @class */ (function () { | ||
function OrganizationApi() { | ||
var ResourceApi = /** @class */ (function () { | ||
function ResourceApi() { | ||
} | ||
OrganizationApi.getOrganizations = function (thenHandler, catchHandler) { | ||
ResourceApi.getResourceInformation = function (resourceId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -489,142 +555,104 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$a | ||
.get(getOrganizationApiUrl()) | ||
.get(getResourceApiUrl() + resourceId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return OrganizationApi; | ||
}()); | ||
var axios$b = require('axios'); | ||
function getDisciplineApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Discipline/'); | ||
} | ||
var DisciplineApi = /** @class */ (function () { | ||
function DisciplineApi() { | ||
} | ||
DisciplineApi.getDisciplines = function (thenHandler, catchHandler) { | ||
ResourceApi.storeResource = function (parentId, body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$b | ||
.get(getDisciplineApiUrl()) | ||
return axios$a | ||
.post(getResourceApiUrl() + 'Project/' + parentId, body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return DisciplineApi; | ||
}()); | ||
var axios$c = require('axios'); | ||
function getLicenseApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/License/'); | ||
} | ||
var LicenseApi = /** @class */ (function () { | ||
function LicenseApi() { | ||
} | ||
LicenseApi.getLicenses = function (thenHandler, catchHandler) { | ||
ResourceApi.deleteResource = function (resourceId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$c | ||
.get(getLicenseApiUrl()) | ||
return axios$a | ||
.delete(getResourceApiUrl() + resourceId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return LicenseApi; | ||
}()); | ||
var axios$d = require('axios'); | ||
function getMetadataApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Metadata/Metadata/'); | ||
} | ||
var MetadataApi = /** @class */ (function () { | ||
function MetadataApi() { | ||
} | ||
MetadataApi.getMetadataForFile = function (resourceId, filename, version, thenHandler, catchHandler) { | ||
ResourceApi.updateResource = function (resourceId, body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/filename/' + | ||
encodeURIComponent(filename) + | ||
'/ver/' + | ||
version) | ||
return axios$a | ||
.post(getResourceApiUrl() + resourceId, body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
MetadataApi.storeMetadataForFile = function (resourceId, filename, version, body, thenHandler, catchHandler) { | ||
ResourceApi.isUserResourceCreator = function (resourceId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
// remove empty nodes | ||
for (var node in body) { | ||
var property = body[node]; | ||
if (property.length === 0 || | ||
property[0].value === undefined || | ||
property[0].value === null || | ||
property[0].value.trim() === '') { | ||
delete body[node]; | ||
} | ||
} | ||
return axios$d | ||
.put(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/filename/' + | ||
encodeURIComponent(filename) + | ||
'/ver/' + | ||
version, body) | ||
return axios$a | ||
.get(getResourceApiUrl() + 'resource/' + resourceId + '/isCreator') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
MetadataApi.getApplicationProfile = function (projectId, applicationProfileId, thenHandler, catchHandler) { | ||
return ResourceApi; | ||
}()); | ||
var axios$b = require('axios'); | ||
function getResourceTypeApiUrl() { | ||
return ('https://' + | ||
apiConnectionBasic.getHostName() + | ||
'/coscine/api/Coscine.Api.Resources/ResourceType/'); | ||
} | ||
var ResourceTypeApi = /** @class */ (function () { | ||
function ResourceTypeApi() { | ||
} | ||
ResourceTypeApi.getResourceTypes = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
projectId + | ||
'/ap/' + | ||
encodeURIComponent(encodeURIComponent(applicationProfileId))) | ||
return axios$b | ||
.get(getResourceTypeApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
MetadataApi.getApplicationProfileComplete = function (resourceId, applicationProfileId, thenHandler, catchHandler) { | ||
ResourceTypeApi.getEnabledResourceTypes = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
.get(getMetadataApiUrl() + | ||
'resource/' + | ||
resourceId + | ||
'/apc/' + | ||
encodeURIComponent(encodeURIComponent(applicationProfileId))) | ||
return axios$b | ||
.get(getResourceTypeApiUrl() + 'enabled') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
MetadataApi.listAllApplicationProfiles = function (projectId, thenHandler, catchHandler) { | ||
ResourceTypeApi.getFields = function (resourceTypeId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
.get(getMetadataApiUrl() + 'project/' + projectId + '/aplist/') | ||
return axios$b | ||
.get(getResourceTypeApiUrl() + resourceTypeId + '/fields') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
MetadataApi.getVocabulary = function (projectId, path, thenHandler, catchHandler) { | ||
return ResourceTypeApi; | ||
}()); | ||
var axios$c = require('axios'); | ||
function getRoleApiUrl() { | ||
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Role/'; | ||
} | ||
var RoleApi = /** @class */ (function () { | ||
function RoleApi() { | ||
} | ||
RoleApi.getRoles = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$d | ||
.get(getMetadataApiUrl() + 'vocabulary/' + projectId + '/' + encodeURIComponent(path)) | ||
return axios$c | ||
.get(getRoleApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return MetadataApi; | ||
return RoleApi; | ||
}()); | ||
var axios$e = require('axios'); | ||
var axios$d = require('axios'); | ||
function getSearchApiUrl() { | ||
@@ -640,3 +668,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/'; | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$d | ||
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query)) | ||
@@ -650,3 +678,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$d | ||
.get(getSearchApiUrl() + 'allNoFilter/') | ||
@@ -660,3 +688,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$d | ||
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query)) | ||
@@ -670,3 +698,3 @@ .then(thenHandler) | ||
apiConnectionBasic.setHeader(); | ||
return axios$e | ||
return axios$d | ||
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId) | ||
@@ -679,30 +707,38 @@ .then(thenHandler) | ||
var axios$f = require('axios'); | ||
function getActivatedFeaturesApiUrl() { | ||
return ('https://' + | ||
apiConnectionBasic.getHostName() + | ||
'/coscine/api/Coscine.Api.ActivatedFeatures/ActivatedFeatures/'); | ||
var axios$e = require('axios'); | ||
function getSubProjectApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/SubProject/'); | ||
} | ||
var ActivatedFeaturesApi = /** @class */ (function () { | ||
function ActivatedFeaturesApi() { | ||
var SubProjectApi = /** @class */ (function () { | ||
function SubProjectApi() { | ||
} | ||
ActivatedFeaturesApi.listAllFeatures = function (thenHandler, catchHandler) { | ||
SubProjectApi.getSubProjects = function (parentId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl()) | ||
return axios$e | ||
.get(getSubProjectApiUrl() + parentId + '/') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.listAllFeaturesOfProject = function (projectId, thenHandler, catchHandler) { | ||
SubProjectApi.getAccessibleParent = function (childId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId) | ||
return axios$e | ||
.get(getSubProjectApiUrl() + childId + '/accessibleParent') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.getActiveFeatures = function (projectId, thenHandler, catchHandler) { | ||
return SubProjectApi; | ||
}()); | ||
var axios$f = require('axios'); | ||
function getTitleApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Title/'); | ||
} | ||
var TitleApi = /** @class */ (function () { | ||
function TitleApi() { | ||
} | ||
TitleApi.getTitles = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
@@ -712,52 +748,97 @@ if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activeFeatures') | ||
.get(getTitleApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.getInactiveFeatures = function (projectId, thenHandler, catchHandler) { | ||
return TitleApi; | ||
}()); | ||
var axios$g = require('axios'); | ||
var authHeaderKey$1 = 'Authorization'; | ||
function getTOSApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/TOS/'); | ||
} | ||
function setHeader(jwtToken) { | ||
axios$g.defaults.headers.common[authHeaderKey$1] = | ||
'Bearer ' + jwtToken; | ||
} | ||
var TOSApi = /** @class */ (function () { | ||
function TOSApi() { | ||
} | ||
TOSApi.getCurrentTOSVersion = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/inactiveFeatures') | ||
return axios$g | ||
.get(getTOSApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.activateFeature = function (projectId, featureId, thenHandler, catchHandler) { | ||
TOSApi.acceptCurrentTOSVersion = function (jwtToken, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
setHeader(jwtToken); | ||
return axios$g | ||
.post(getTOSApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return TOSApi; | ||
}()); | ||
var axios$h = require('axios'); | ||
function getUserApiUrl() { | ||
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/User/'; | ||
} | ||
var UserApi = /** @class */ (function () { | ||
function UserApi() { | ||
} | ||
UserApi.queryUsers = function (query, parentId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activateFeature/' + featureId) | ||
return axios$h | ||
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.deactivateFeature = function (projectId, featureId, thenHandler, catchHandler) { | ||
UserApi.getUser = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/deactivateFeature/' + featureId) | ||
return axios$h | ||
.get(getUserApiUrl() + 'user') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ActivatedFeaturesApi; | ||
UserApi.updateUser = function (body, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$h | ||
.post(getUserApiUrl() + 'user', body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return UserApi; | ||
}()); | ||
function defaultOnCatch(error) { | ||
// TODO: Do something with the error | ||
// tslint:disable-next-line: no-console | ||
console.log(error); | ||
var axios$i = require('axios'); | ||
function getVisibilityApiUrl() { | ||
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Visibility/'); | ||
} | ||
function redirectToProject(project) { | ||
if (!project || | ||
!project.id || | ||
project.id === '' || | ||
project.id === '00000000-0000-0000-0000-000000000000') { | ||
window.location.href = 'https://' + apiConnectionBasic.getHostName() + '/'; | ||
var VisibilityApi = /** @class */ (function () { | ||
function VisibilityApi() { | ||
} | ||
else { | ||
window.location.href = 'https://' + apiConnectionBasic.getHostName() + '/p/' + project.id + '/'; | ||
} | ||
} | ||
VisibilityApi.getVisibilities = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$i | ||
.get(getVisibilityApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return VisibilityApi; | ||
}()); | ||
@@ -767,2 +848,3 @@ exports.ActivatedFeaturesApi = ActivatedFeaturesApi; | ||
exports.DisciplineApi = DisciplineApi; | ||
exports.LanguageApi = LanguageApi; | ||
exports.LicenseApi = LicenseApi; | ||
@@ -778,6 +860,6 @@ exports.MetadataApi = MetadataApi; | ||
exports.SubProjectApi = SubProjectApi; | ||
exports.TOSApi = TOSApi; | ||
exports.TitleApi = TitleApi; | ||
exports.UserApi = UserApi; | ||
exports.VisibilityApi = VisibilityApi; | ||
exports.defaultOnCatch = defaultOnCatch; | ||
exports.redirectToProject = redirectToProject; | ||
@@ -784,0 +866,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var activatedFeatures_api_1 = require("./requests/activatedFeatures-api"); | ||
Object.defineProperty(exports, "ActivatedFeaturesApi", { enumerable: true, get: function () { return activatedFeatures_api_1.ActivatedFeaturesApi; } }); | ||
var datasource_api_1 = require("./requests/datasource-api"); | ||
Object.defineProperty(exports, "DataSourceApi", { enumerable: true, get: function () { return datasource_api_1.DataSourceApi; } }); | ||
var discipline_api_1 = require("./requests/discipline-api"); | ||
Object.defineProperty(exports, "DisciplineApi", { enumerable: true, get: function () { return discipline_api_1.DisciplineApi; } }); | ||
var language_api_1 = require("./requests/language-api"); | ||
Object.defineProperty(exports, "LanguageApi", { enumerable: true, get: function () { return language_api_1.LanguageApi; } }); | ||
var license_api_1 = require("./requests/license-api"); | ||
Object.defineProperty(exports, "LicenseApi", { enumerable: true, get: function () { return license_api_1.LicenseApi; } }); | ||
var metadata_api_1 = require("./requests/metadata-api"); | ||
Object.defineProperty(exports, "MetadataApi", { enumerable: true, get: function () { return metadata_api_1.MetadataApi; } }); | ||
var organization_api_1 = require("./requests/organization-api"); | ||
Object.defineProperty(exports, "OrganizationApi", { enumerable: true, get: function () { return organization_api_1.OrganizationApi; } }); | ||
var project_api_1 = require("./requests/project-api"); | ||
exports.ProjectApi = project_api_1.ProjectApi; | ||
Object.defineProperty(exports, "ProjectApi", { enumerable: true, get: function () { return project_api_1.ProjectApi; } }); | ||
var project_role_api_1 = require("./requests/project-role-api"); | ||
exports.ProjectRoleApi = project_role_api_1.ProjectRoleApi; | ||
Object.defineProperty(exports, "ProjectRoleApi", { enumerable: true, get: function () { return project_role_api_1.ProjectRoleApi; } }); | ||
var resource_api_1 = require("./requests/resource-api"); | ||
exports.ResourceApi = resource_api_1.ResourceApi; | ||
Object.defineProperty(exports, "ResourceApi", { enumerable: true, get: function () { return resource_api_1.ResourceApi; } }); | ||
var resource_type_api_1 = require("./requests/resource-type-api"); | ||
exports.ResourceTypeApi = resource_type_api_1.ResourceTypeApi; | ||
Object.defineProperty(exports, "ResourceTypeApi", { enumerable: true, get: function () { return resource_type_api_1.ResourceTypeApi; } }); | ||
var role_api_1 = require("./requests/role-api"); | ||
exports.RoleApi = role_api_1.RoleApi; | ||
Object.defineProperty(exports, "RoleApi", { enumerable: true, get: function () { return role_api_1.RoleApi; } }); | ||
var search_api_1 = require("./requests/search-api"); | ||
Object.defineProperty(exports, "SearchApi", { enumerable: true, get: function () { return search_api_1.SearchApi; } }); | ||
var subproject_api_1 = require("./requests/subproject-api"); | ||
exports.SubProjectApi = subproject_api_1.SubProjectApi; | ||
Object.defineProperty(exports, "SubProjectApi", { enumerable: true, get: function () { return subproject_api_1.SubProjectApi; } }); | ||
var title_api_1 = require("./requests/title-api"); | ||
Object.defineProperty(exports, "TitleApi", { enumerable: true, get: function () { return title_api_1.TitleApi; } }); | ||
var tos_api_1 = require("./requests/tos-api"); | ||
Object.defineProperty(exports, "TOSApi", { enumerable: true, get: function () { return tos_api_1.TOSApi; } }); | ||
var user_api_1 = require("./requests/user-api"); | ||
exports.UserApi = user_api_1.UserApi; | ||
var datasource_api_1 = require("./requests/datasource-api"); | ||
exports.DataSourceApi = datasource_api_1.DataSourceApi; | ||
Object.defineProperty(exports, "UserApi", { enumerable: true, get: function () { return user_api_1.UserApi; } }); | ||
var visibility_api_1 = require("./requests/visibility-api"); | ||
exports.VisibilityApi = visibility_api_1.VisibilityApi; | ||
var organization_api_1 = require("./requests/organization-api"); | ||
exports.OrganizationApi = organization_api_1.OrganizationApi; | ||
var discipline_api_1 = require("./requests/discipline-api"); | ||
exports.DisciplineApi = discipline_api_1.DisciplineApi; | ||
var license_api_1 = require("./requests/license-api"); | ||
exports.LicenseApi = license_api_1.LicenseApi; | ||
var metadata_api_1 = require("./requests/metadata-api"); | ||
exports.MetadataApi = metadata_api_1.MetadataApi; | ||
var search_api_1 = require("./requests/search-api"); | ||
exports.SearchApi = search_api_1.SearchApi; | ||
var activatedFeatures_api_1 = require("./requests/activatedFeatures-api"); | ||
exports.ActivatedFeaturesApi = activatedFeatures_api_1.ActivatedFeaturesApi; | ||
var api_connection_basic_1 = require("./basic/api-connection-basic"); | ||
function defaultOnCatch(error) { | ||
// TODO: Do something with the error | ||
// tslint:disable-next-line: no-console | ||
console.log(error); | ||
} | ||
exports.defaultOnCatch = defaultOnCatch; | ||
function redirectToProject(project) { | ||
if (!project || | ||
!project.id || | ||
project.id === '' || | ||
project.id === '00000000-0000-0000-0000-000000000000') { | ||
window.location.href = 'https://' + api_connection_basic_1.default.getHostName() + '/'; | ||
} | ||
else { | ||
window.location.href = 'https://' + api_connection_basic_1.default.getHostName() + '/p/' + project.id + '/'; | ||
} | ||
} | ||
exports.redirectToProject = redirectToProject; | ||
Object.defineProperty(exports, "VisibilityApi", { enumerable: true, get: function () { return visibility_api_1.VisibilityApi; } }); | ||
//# sourceMappingURL=api-connection.js.map |
@@ -6,11 +6,11 @@ "use strict"; | ||
var clientCorrolationIdKey = 'X-Coscine-Logging-CorrelationId'; | ||
var hostName = window.location.hostname; | ||
if (hostName.indexOf(':') !== -1) { | ||
if (hostName.indexOf('https://') !== -1) { | ||
hostName = hostName.replace('https://', ''); | ||
} | ||
hostName = hostName.substr(0, hostName.indexOf(':')); | ||
} | ||
exports.default = { | ||
getHostName: function () { | ||
var hostName = window.location.hostname; | ||
if (hostName.indexOf(':') !== -1) { | ||
if (hostName.indexOf('https://') !== -1) { | ||
hostName = hostName.replace('https://', ''); | ||
} | ||
hostName = hostName.substr(0, hostName.indexOf(':')); | ||
} | ||
return hostName; | ||
@@ -30,4 +30,4 @@ }, | ||
return; | ||
} | ||
}, | ||
}; | ||
//# sourceMappingURL=api-connection-basic.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ActivatedFeaturesApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DataSourceApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var file_saver_1 = require("file-saver"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DisciplineApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LicenseApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MetadataApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.OrganizationApi = void 0; | ||
var axios = require('axios'); | ||
@@ -20,2 +21,20 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); | ||
}; | ||
OrganizationApi.getOrganizationsWhereUserIsMember = function (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() + '?member=1') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
OrganizationApi.getROR = function (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") | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return OrganizationApi; | ||
@@ -22,0 +41,0 @@ }()); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ProjectApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ProjectRoleApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ResourceApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ResourceTypeApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RoleApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SearchApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SubProjectApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.UserApi = void 0; | ||
var axios = require('axios'); | ||
@@ -29,2 +30,11 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); | ||
}; | ||
UserApi.updateUser = function (body, 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 | ||
.post(getUserApiUrl() + 'user', body) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return UserApi; | ||
@@ -31,0 +41,0 @@ }()); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VisibilityApi = void 0; | ||
var axios = require('axios'); | ||
@@ -4,0 +5,0 @@ var api_connection_basic_1 = require("../basic/api-connection-basic"); |
@@ -0,1 +1,8 @@ | ||
export { ActivatedFeaturesApi } from './requests/activatedFeatures-api'; | ||
export { DataSourceApi } from './requests/datasource-api'; | ||
export { DisciplineApi } from './requests/discipline-api'; | ||
export { LanguageApi } from './requests/language-api'; | ||
export { LicenseApi } from './requests/license-api'; | ||
export { MetadataApi } from './requests/metadata-api'; | ||
export { OrganizationApi } from './requests/organization-api'; | ||
export { ProjectApi } from './requests/project-api'; | ||
@@ -6,13 +13,7 @@ export { ProjectRoleApi } from './requests/project-role-api'; | ||
export { RoleApi } from './requests/role-api'; | ||
export { SearchApi } from './requests/search-api'; | ||
export { SubProjectApi } from './requests/subproject-api'; | ||
export { TitleApi } from './requests/title-api'; | ||
export { TOSApi } from './requests/tos-api'; | ||
export { UserApi } from './requests/user-api'; | ||
export { DataSourceApi } from './requests/datasource-api'; | ||
export { VisibilityApi } from './requests/visibility-api'; | ||
export { OrganizationApi } from './requests/organization-api'; | ||
export { DisciplineApi } from './requests/discipline-api'; | ||
export { LicenseApi } from './requests/license-api'; | ||
export { MetadataApi } from './requests/metadata-api'; | ||
export { SearchApi } from './requests/search-api'; | ||
export { ActivatedFeaturesApi } from './requests/activatedFeatures-api'; | ||
export declare function defaultOnCatch(error: any): void; | ||
export declare function redirectToProject(project: any): void; |
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; | ||
} |
export declare class UserApi { | ||
static queryUsers(query: string, parentId: string, thenHandler?: any, catchHandler?: any): any; | ||
static getUser(thenHandler?: any, catchHandler?: any): any; | ||
static updateUser(body: any, thenHandler?: any, catchHandler?: any): any; | ||
} |
{ | ||
"name": "@coscine/api-connection", | ||
"version": "1.14.0", | ||
"version": "1.15.0", | ||
"description": "This library provides methods to connect to CoScInE Apis with JavaScript.", | ||
@@ -95,37 +95,37 @@ "keywords": [ | ||
"@semantic-release/release-notes-generator": "^9.0.1", | ||
"@types/jest": "^25.2.1", | ||
"@types/node": "^13.13.2", | ||
"@types/jest": "^26.0.0", | ||
"@types/node": "^14.0.13", | ||
"colors": "^1.4.0", | ||
"commitizen": "^4.0.4", | ||
"conventional-changelog-eslint": "^3.0.4", | ||
"coveralls": "^3.0.14", | ||
"commitizen": "^4.1.2", | ||
"conventional-changelog-eslint": "^3.0.8", | ||
"coveralls": "^3.1.0", | ||
"cross-env": "^7.0.2", | ||
"cz-conventional-changelog": "^3.1.0", | ||
"eslint": "^6.8.0", | ||
"cz-conventional-changelog": "^3.2.0", | ||
"eslint": "^7.2.0", | ||
"eslint-config-google": "^0.14.0", | ||
"eslint-plugin-vue": "^6.2.2", | ||
"husky": "^4.2.5", | ||
"jest": "^25.4.0", | ||
"jest-config": "^25.4.0", | ||
"lint-staged": "^10.1.7", | ||
"jest": "^26.0.1", | ||
"jest-config": "^26.0.1", | ||
"lint-staged": "^10.2.11", | ||
"lodash.camelcase": "^4.3.0", | ||
"prettier": "^2.0.5", | ||
"prompt": "^1.0.0", | ||
"replace-in-file": "^5.0.2", | ||
"replace-in-file": "^6.1.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.7.2", | ||
"rollup": "^2.17.1", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-json": "^4.0.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-sourcemaps": "^0.5.0", | ||
"rollup-plugin-typescript2": "^0.27.0", | ||
"semantic-release": "^17.0.7", | ||
"shelljs": "^0.8.3", | ||
"ts-jest": "^25.4.0", | ||
"ts-node": "^8.9.0", | ||
"tslint": "^6.1.1", | ||
"rollup-plugin-sourcemaps": "^0.6.2", | ||
"rollup-plugin-typescript2": "^0.27.1", | ||
"semantic-release": "^17.0.8", | ||
"shelljs": "^0.8.4", | ||
"ts-jest": "^26.1.0", | ||
"ts-node": "^8.10.2", | ||
"tslint": "^6.1.2", | ||
"tslint-config-prettier": "^1.18.0", | ||
"tslint-config-standard": "^9.0.0", | ||
"typedoc": "^0.17.4", | ||
"typescript": "^3.8.3" | ||
"typedoc": "^0.17.7", | ||
"typescript": "^3.9.5" | ||
}, | ||
@@ -132,0 +132,0 @@ "publishConfig": { |
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
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
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
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
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
338711
68
2675