Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@coscine/api-connection

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coscine/api-connection - npm Package Compare versions

Comparing version 1.24.2 to 1.25.0

dist/lib/requests/quota-api.js

178

dist/api-connection.es5.js

@@ -463,2 +463,39 @@ var axios = require('axios');

var axios$b = require('axios');
function getQuotaApiUrl() {
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Quota/Quota/');
}
var QuotaApi = /** @class */ (function () {
function QuotaApi() {
}
QuotaApi.getResourceQuotas = function (projectId, resourceTypeId, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$b
.get(getQuotaApiUrl() + projectId + '/' + resourceTypeId + '/all')
.then(thenHandler)
.catch(catchHandler);
};
QuotaApi.getResourceQuota = function (resourceId, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$b
.get(getQuotaApiUrl() + resourceId)
.then(thenHandler)
.catch(catchHandler);
};
QuotaApi.setResourceQuota = function (resourceId, body, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$b
.post(getQuotaApiUrl() + resourceId, body)
.then(thenHandler)
.catch(catchHandler);
};
return QuotaApi;
}());
var axios$c = require('axios');
function getProjectApiUrl() {

@@ -474,3 +511,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/');

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.get(getProjectApiUrl() + projectId)

@@ -484,3 +521,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.post(getProjectApiUrl(), body)

@@ -494,3 +531,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.post(getProjectApiUrl() + projectId, body)

@@ -504,7 +541,34 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
.get(getProjectApiUrl() + projectId + '/quotas')
return axios$c
.get(getProjectApiUrl() + projectId + '/quota/-/all')
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.getQuota = function (projectId, resourceTypeId, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$c
.get(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId)
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.getMaxiumQuota = function (projectId, resourceTypeId, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$c
.get(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId + '/max')
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.setQuota = function (projectId, resourceTypeId, body, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$c
.post(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId, body)
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.getResources = function (projectId, thenHandler, catchHandler, analyticsLogFlag) {

@@ -515,3 +579,3 @@ if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.get(getProjectApiUrl() + projectId + '/resources' + analyticsLogFlag)

@@ -530,3 +594,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.delete(getProjectApiUrl() + projectId)

@@ -541,3 +605,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.get(getProjectApiUrl() + analyticsLogFlag)

@@ -557,3 +621,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.get(getProjectApiUrl() + '-/topLevel' + analyticsLogFlag)

@@ -571,3 +635,3 @@ .then(thenHandler)

var axios$c = require('axios');
var axios$d = require('axios');
function getProjectRoleApiUrl() {

@@ -584,3 +648,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/ProjectRole/');

apiConnectionBasic.setHeader();
return axios$c
return axios$d
.get(getProjectRoleApiUrl() + parentId + '/' + analyticsLogFlag)

@@ -599,3 +663,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$c
return axios$d
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/')

@@ -609,3 +673,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$c
return axios$d
.post(getProjectRoleApiUrl(), body)

@@ -619,3 +683,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$c
return axios$d
.delete(getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId)

@@ -629,3 +693,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$c
return axios$d
.delete(getProjectRoleApiUrl() + 'project/' + projectId + '/user')

@@ -638,3 +702,3 @@ .then(thenHandler)

var axios$d = require('axios');
var axios$e = require('axios');
function getResourceApiUrl() {

@@ -650,3 +714,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Resources/Resource/');

apiConnectionBasic.setHeader();
return axios$d
return axios$e
.get(getResourceApiUrl() + resourceId)

@@ -660,3 +724,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$d
return axios$e
.post(getResourceApiUrl() + 'Project/' + parentId, body)

@@ -670,3 +734,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$d
return axios$e
.delete(getResourceApiUrl() + resourceId)

@@ -680,3 +744,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$d
return axios$e
.post(getResourceApiUrl() + resourceId, body)

@@ -690,3 +754,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$d
return axios$e
.get(getResourceApiUrl() + resourceId + '/isCreator')

@@ -699,3 +763,3 @@ .then(thenHandler)

var axios$e = require('axios');
var axios$f = require('axios');
function getResourceTypeApiUrl() {

@@ -713,3 +777,3 @@ return ('https://' +

apiConnectionBasic.setHeader();
return axios$e
return axios$f
.get(getResourceTypeApiUrl() + 'types')

@@ -723,3 +787,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$e
return axios$f
.get(getResourceTypeApiUrl() + 'types/-/enabled')

@@ -733,3 +797,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$e
return axios$f
.get(getResourceTypeApiUrl() + 'types/' + resourceTypeId)

@@ -742,3 +806,3 @@ .then(thenHandler)

var axios$f = require('axios');
var axios$g = require('axios');
function getRoleApiUrl() {

@@ -754,3 +818,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Role/';

apiConnectionBasic.setHeader();
return axios$f
return axios$g
.get(getRoleApiUrl())

@@ -763,3 +827,3 @@ .then(thenHandler)

var axios$g = require('axios');
var axios$h = require('axios');
function getSearchApiUrl() {

@@ -775,3 +839,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/';

apiConnectionBasic.setHeader();
return axios$g
return axios$h
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query))

@@ -785,3 +849,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$g
return axios$h
.get(getSearchApiUrl() + 'allNoFilter/')

@@ -795,3 +859,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$g
return axios$h
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query))

@@ -805,3 +869,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$g
return axios$h
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId)

@@ -814,3 +878,3 @@ .then(thenHandler)

var axios$h = require('axios');
var axios$i = require('axios');
function getSubProjectApiUrl() {

@@ -826,3 +890,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/SubProject/');

apiConnectionBasic.setHeader();
return axios$h
return axios$i
.get(getSubProjectApiUrl() + parentId + '/')

@@ -836,3 +900,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$h
return axios$i
.get(getSubProjectApiUrl() + childId + '/accessibleParent')

@@ -845,3 +909,3 @@ .then(thenHandler)

var axios$i = require('axios');
var axios$j = require('axios');
function getTitleApiUrl() {

@@ -857,3 +921,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Title/');

apiConnectionBasic.setHeader();
return axios$i
return axios$j
.get(getTitleApiUrl())

@@ -866,3 +930,3 @@ .then(thenHandler)

var axios$j = require('axios');
var axios$k = require('axios');
var authHeaderKey$1 = 'Authorization';

@@ -873,3 +937,3 @@ function getTOSApiUrl() {

function setHeader(jwtToken) {
axios$j.defaults.headers.common[authHeaderKey$1] =
axios$k.defaults.headers.common[authHeaderKey$1] =
'Bearer ' + jwtToken;

@@ -884,3 +948,3 @@ }

apiConnectionBasic.setHeader();
return axios$j
return axios$k
.get(getTOSApiUrl())

@@ -894,3 +958,3 @@ .then(thenHandler)

setHeader(jwtToken);
return axios$j
return axios$k
.post(getTOSApiUrl())

@@ -903,3 +967,3 @@ .then(thenHandler)

var axios$k = require('axios');
var axios$l = require('axios');
function getTreeApiUrl() {

@@ -915,3 +979,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Tree/Tree/');

apiConnectionBasic.setHeader();
return axios$k
return axios$l
.get(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path))

@@ -935,3 +999,3 @@ .then(thenHandler)

}
return axios$k
return axios$l
.put(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path), body)

@@ -944,3 +1008,3 @@ .then(thenHandler)

var axios$l = require('axios');
var axios$m = require('axios');
function getUserApiUrl() {

@@ -956,3 +1020,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/User/';

apiConnectionBasic.setHeader();
return axios$l
return axios$m
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/')

@@ -966,3 +1030,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$l
return axios$m
.get(getUserApiUrl() + 'user')

@@ -976,3 +1040,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$l
return axios$m
.post(getUserApiUrl() + 'user', body)

@@ -986,3 +1050,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$l
return axios$m
.get(getUserApiUrl() + 'mergeToken/' + provider)

@@ -995,3 +1059,3 @@ .then(thenHandler)

var axios$m = require('axios');
var axios$n = require('axios');
function getVisibilityApiUrl() {

@@ -1007,3 +1071,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Visibility/');

apiConnectionBasic.setHeader();
return axios$m
return axios$n
.get(getVisibilityApiUrl())

@@ -1016,3 +1080,3 @@ .then(thenHandler)

var axios$n = require('axios');
var axios$o = require('axios');
function getTokenApiUrl() {

@@ -1028,3 +1092,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Token/Token/';

apiConnectionBasic.setHeader();
return axios$n
return axios$o
.get(getTokenApiUrl())

@@ -1038,3 +1102,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$n
return axios$o
.put(getTokenApiUrl(), body)

@@ -1048,3 +1112,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$n
return axios$o
.delete(getTokenApiUrl() + tokenId)

@@ -1058,3 +1122,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$n
return axios$o
.get(getTokenApiUrl() + tokenId)

@@ -1067,3 +1131,3 @@ .then(thenHandler)

export { ActivatedFeaturesApi, AdminApi, BlobApi, DisciplineApi, LanguageApi, LicenseApi, MetadataApi, NoticeApi, OrganizationApi, PIDApi, ProjectApi, ProjectRoleApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, TOSApi, TitleApi, TokenApi, TreeApi, UserApi, VisibilityApi };
export { ActivatedFeaturesApi, AdminApi, BlobApi, DisciplineApi, LanguageApi, LicenseApi, MetadataApi, NoticeApi, OrganizationApi, PIDApi, ProjectApi, ProjectRoleApi, QuotaApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, TOSApi, TitleApi, TokenApi, TreeApi, UserApi, VisibilityApi };
//# sourceMappingURL=api-connection.es5.js.map

@@ -469,2 +469,39 @@ (function (global, factory) {

var axios$b = require('axios');
function getQuotaApiUrl() {
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Quota/Quota/');
}
var QuotaApi = /** @class */ (function () {
function QuotaApi() {
}
QuotaApi.getResourceQuotas = function (projectId, resourceTypeId, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$b
.get(getQuotaApiUrl() + projectId + '/' + resourceTypeId + '/all')
.then(thenHandler)
.catch(catchHandler);
};
QuotaApi.getResourceQuota = function (resourceId, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$b
.get(getQuotaApiUrl() + resourceId)
.then(thenHandler)
.catch(catchHandler);
};
QuotaApi.setResourceQuota = function (resourceId, body, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$b
.post(getQuotaApiUrl() + resourceId, body)
.then(thenHandler)
.catch(catchHandler);
};
return QuotaApi;
}());
var axios$c = require('axios');
function getProjectApiUrl() {

@@ -480,3 +517,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/');

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.get(getProjectApiUrl() + projectId)

@@ -490,3 +527,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.post(getProjectApiUrl(), body)

@@ -500,3 +537,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.post(getProjectApiUrl() + projectId, body)

@@ -510,7 +547,34 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
.get(getProjectApiUrl() + projectId + '/quotas')
return axios$c
.get(getProjectApiUrl() + projectId + '/quota/-/all')
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.getQuota = function (projectId, resourceTypeId, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$c
.get(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId)
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.getMaxiumQuota = function (projectId, resourceTypeId, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$c
.get(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId + '/max')
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.setQuota = function (projectId, resourceTypeId, body, thenHandler, catchHandler) {
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; }
apiConnectionBasic.setHeader();
return axios$c
.post(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId, body)
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.getResources = function (projectId, thenHandler, catchHandler, analyticsLogFlag) {

@@ -521,3 +585,3 @@ if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; }

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.get(getProjectApiUrl() + projectId + '/resources' + analyticsLogFlag)

@@ -536,3 +600,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.delete(getProjectApiUrl() + projectId)

@@ -547,3 +611,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.get(getProjectApiUrl() + analyticsLogFlag)

@@ -563,3 +627,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$b
return axios$c
.get(getProjectApiUrl() + '-/topLevel' + analyticsLogFlag)

@@ -577,3 +641,3 @@ .then(thenHandler)

var axios$c = require('axios');
var axios$d = require('axios');
function getProjectRoleApiUrl() {

@@ -590,3 +654,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/ProjectRole/');

apiConnectionBasic.setHeader();
return axios$c
return axios$d
.get(getProjectRoleApiUrl() + parentId + '/' + analyticsLogFlag)

@@ -605,3 +669,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$c
return axios$d
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/')

@@ -615,3 +679,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$c
return axios$d
.post(getProjectRoleApiUrl(), body)

@@ -625,3 +689,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$c
return axios$d
.delete(getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId)

@@ -635,3 +699,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$c
return axios$d
.delete(getProjectRoleApiUrl() + 'project/' + projectId + '/user')

@@ -644,3 +708,3 @@ .then(thenHandler)

var axios$d = require('axios');
var axios$e = require('axios');
function getResourceApiUrl() {

@@ -656,3 +720,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Resources/Resource/');

apiConnectionBasic.setHeader();
return axios$d
return axios$e
.get(getResourceApiUrl() + resourceId)

@@ -666,3 +730,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$d
return axios$e
.post(getResourceApiUrl() + 'Project/' + parentId, body)

@@ -676,3 +740,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$d
return axios$e
.delete(getResourceApiUrl() + resourceId)

@@ -686,3 +750,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$d
return axios$e
.post(getResourceApiUrl() + resourceId, body)

@@ -696,3 +760,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$d
return axios$e
.get(getResourceApiUrl() + resourceId + '/isCreator')

@@ -705,3 +769,3 @@ .then(thenHandler)

var axios$e = require('axios');
var axios$f = require('axios');
function getResourceTypeApiUrl() {

@@ -719,3 +783,3 @@ return ('https://' +

apiConnectionBasic.setHeader();
return axios$e
return axios$f
.get(getResourceTypeApiUrl() + 'types')

@@ -729,3 +793,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$e
return axios$f
.get(getResourceTypeApiUrl() + 'types/-/enabled')

@@ -739,3 +803,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$e
return axios$f
.get(getResourceTypeApiUrl() + 'types/' + resourceTypeId)

@@ -748,3 +812,3 @@ .then(thenHandler)

var axios$f = require('axios');
var axios$g = require('axios');
function getRoleApiUrl() {

@@ -760,3 +824,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Role/';

apiConnectionBasic.setHeader();
return axios$f
return axios$g
.get(getRoleApiUrl())

@@ -769,3 +833,3 @@ .then(thenHandler)

var axios$g = require('axios');
var axios$h = require('axios');
function getSearchApiUrl() {

@@ -781,3 +845,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/';

apiConnectionBasic.setHeader();
return axios$g
return axios$h
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query))

@@ -791,3 +855,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$g
return axios$h
.get(getSearchApiUrl() + 'allNoFilter/')

@@ -801,3 +865,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$g
return axios$h
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query))

@@ -811,3 +875,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$g
return axios$h
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId)

@@ -820,3 +884,3 @@ .then(thenHandler)

var axios$h = require('axios');
var axios$i = require('axios');
function getSubProjectApiUrl() {

@@ -832,3 +896,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/SubProject/');

apiConnectionBasic.setHeader();
return axios$h
return axios$i
.get(getSubProjectApiUrl() + parentId + '/')

@@ -842,3 +906,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$h
return axios$i
.get(getSubProjectApiUrl() + childId + '/accessibleParent')

@@ -851,3 +915,3 @@ .then(thenHandler)

var axios$i = require('axios');
var axios$j = require('axios');
function getTitleApiUrl() {

@@ -863,3 +927,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/Title/');

apiConnectionBasic.setHeader();
return axios$i
return axios$j
.get(getTitleApiUrl())

@@ -872,3 +936,3 @@ .then(thenHandler)

var axios$j = require('axios');
var axios$k = require('axios');
var authHeaderKey$1 = 'Authorization';

@@ -879,3 +943,3 @@ function getTOSApiUrl() {

function setHeader(jwtToken) {
axios$j.defaults.headers.common[authHeaderKey$1] =
axios$k.defaults.headers.common[authHeaderKey$1] =
'Bearer ' + jwtToken;

@@ -890,3 +954,3 @@ }

apiConnectionBasic.setHeader();
return axios$j
return axios$k
.get(getTOSApiUrl())

@@ -900,3 +964,3 @@ .then(thenHandler)

setHeader(jwtToken);
return axios$j
return axios$k
.post(getTOSApiUrl())

@@ -909,3 +973,3 @@ .then(thenHandler)

var axios$k = require('axios');
var axios$l = require('axios');
function getTreeApiUrl() {

@@ -921,3 +985,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Tree/Tree/');

apiConnectionBasic.setHeader();
return axios$k
return axios$l
.get(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path))

@@ -941,3 +1005,3 @@ .then(thenHandler)

}
return axios$k
return axios$l
.put(getTreeApiUrl() + resourceId + '/' + apiConnectionBasic.preparePath(path), body)

@@ -950,3 +1014,3 @@ .then(thenHandler)

var axios$l = require('axios');
var axios$m = require('axios');
function getUserApiUrl() {

@@ -962,3 +1026,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/User/';

apiConnectionBasic.setHeader();
return axios$l
return axios$m
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/')

@@ -972,3 +1036,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$l
return axios$m
.get(getUserApiUrl() + 'user')

@@ -982,3 +1046,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$l
return axios$m
.post(getUserApiUrl() + 'user', body)

@@ -992,3 +1056,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$l
return axios$m
.get(getUserApiUrl() + 'mergeToken/' + provider)

@@ -1001,3 +1065,3 @@ .then(thenHandler)

var axios$m = require('axios');
var axios$n = require('axios');
function getVisibilityApiUrl() {

@@ -1013,3 +1077,3 @@ return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Visibility/');

apiConnectionBasic.setHeader();
return axios$m
return axios$n
.get(getVisibilityApiUrl())

@@ -1022,3 +1086,3 @@ .then(thenHandler)

var axios$n = require('axios');
var axios$o = require('axios');
function getTokenApiUrl() {

@@ -1034,3 +1098,3 @@ return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Token/Token/';

apiConnectionBasic.setHeader();
return axios$n
return axios$o
.get(getTokenApiUrl())

@@ -1044,3 +1108,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$n
return axios$o
.put(getTokenApiUrl(), body)

@@ -1054,3 +1118,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$n
return axios$o
.delete(getTokenApiUrl() + tokenId)

@@ -1064,3 +1128,3 @@ .then(thenHandler)

apiConnectionBasic.setHeader();
return axios$n
return axios$o
.get(getTokenApiUrl() + tokenId)

@@ -1085,2 +1149,3 @@ .then(thenHandler)

exports.ProjectRoleApi = ProjectRoleApi;
exports.QuotaApi = QuotaApi;
exports.ResourceApi = ResourceApi;

@@ -1087,0 +1152,0 @@ exports.ResourceTypeApi = ResourceTypeApi;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TokenApi = exports.VisibilityApi = exports.UserApi = exports.TreeApi = exports.TOSApi = exports.TitleApi = exports.SubProjectApi = exports.SearchApi = exports.RoleApi = exports.ResourceTypeApi = exports.ResourceApi = exports.ProjectRoleApi = exports.ProjectApi = exports.PIDApi = exports.OrganizationApi = exports.NoticeApi = exports.MetadataApi = exports.LicenseApi = exports.LanguageApi = exports.DisciplineApi = exports.BlobApi = exports.AdminApi = exports.ActivatedFeaturesApi = void 0;
exports.TokenApi = exports.VisibilityApi = exports.UserApi = exports.TreeApi = exports.TOSApi = exports.TitleApi = exports.SubProjectApi = exports.SearchApi = exports.RoleApi = exports.ResourceTypeApi = exports.ResourceApi = exports.ProjectRoleApi = exports.ProjectApi = exports.QuotaApi = exports.PIDApi = exports.OrganizationApi = exports.NoticeApi = exports.MetadataApi = exports.LicenseApi = exports.LanguageApi = exports.DisciplineApi = exports.BlobApi = exports.AdminApi = exports.ActivatedFeaturesApi = void 0;
var activatedFeatures_api_1 = require("./requests/activatedFeatures-api");

@@ -24,2 +24,4 @@ Object.defineProperty(exports, "ActivatedFeaturesApi", { enumerable: true, get: function () { return activatedFeatures_api_1.ActivatedFeaturesApi; } });

Object.defineProperty(exports, "PIDApi", { enumerable: true, get: function () { return pid_api_1.PIDApi; } });
var quota_api_1 = require("./requests/quota-api");
Object.defineProperty(exports, "QuotaApi", { enumerable: true, get: function () { return quota_api_1.QuotaApi; } });
var project_api_1 = require("./requests/project-api");

@@ -26,0 +28,0 @@ Object.defineProperty(exports, "ProjectApi", { enumerable: true, get: function () { return project_api_1.ProjectApi; } });

@@ -44,6 +44,33 @@ "use strict";

return axios
.get(getProjectApiUrl() + projectId + '/quotas')
.get(getProjectApiUrl() + projectId + '/quota/-/all')
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.getQuota = function (projectId, resourceTypeId, 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(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId)
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.getMaxiumQuota = function (projectId, resourceTypeId, 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(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId + '/max')
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.setQuota = function (projectId, resourceTypeId, 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(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId, body)
.then(thenHandler)
.catch(catchHandler);
};
ProjectApi.getResources = function (projectId, thenHandler, catchHandler, analyticsLogFlag) {

@@ -50,0 +77,0 @@ if (thenHandler === void 0) { thenHandler = api_connection_basic_1.default.defaultThenHandler; }

@@ -11,2 +11,3 @@ export { ActivatedFeaturesApi } from './requests/activatedFeatures-api';

export { PIDApi } from './requests/pid-api';
export { QuotaApi } from './requests/quota-api';
export { ProjectApi } from './requests/project-api';

@@ -13,0 +14,0 @@ export { ProjectRoleApi } from './requests/project-role-api';

@@ -6,2 +6,5 @@ export declare class ProjectApi {

static getQuotas(projectId: string, thenHandler?: any, catchHandler?: any): any;
static getQuota(projectId: string, resourceTypeId: any, thenHandler?: any, catchHandler?: any): any;
static getMaxiumQuota(projectId: string, resourceTypeId: any, thenHandler?: any, catchHandler?: any): any;
static setQuota(projectId: string, resourceTypeId: string, body: any, thenHandler?: any, catchHandler?: any): any;
static getResources(projectId: string, thenHandler?: any, catchHandler?: any, analyticsLogFlag?: any): any;

@@ -8,0 +11,0 @@ static getResourcesWithoutAnalyticsLog(projectId: string, thenHandler?: any, catchHandler?: any): void;

{
"name": "@coscine/api-connection",
"version": "1.24.2",
"version": "1.25.0",
"description": "This library provides methods to connect to CoScInE Apis with JavaScript.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc