@coscine/api-connection
Advanced tools
Comparing version 1.11.0 to 1.12.0
@@ -636,2 +636,68 @@ var axios = require('axios'); | ||
var axios$f = require('axios'); | ||
function getActivatedFeaturesApiUrl() { | ||
return ('https://' + | ||
apiConnectionBasic.getHostName() + | ||
'/coscine/api/Coscine.Api.ActivatedFeatures/ActivatedFeatures/'); | ||
} | ||
var ActivatedFeaturesApi = /** @class */ (function () { | ||
function ActivatedFeaturesApi() { | ||
} | ||
ActivatedFeaturesApi.listAllFeatures = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.listAllFeaturesOfProject = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.getActiveFeatures = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activeFeatures') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.getInactiveFeatures = function (projectId, 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') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.activateFeature = function (projectId, featureId, 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) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.deactivateFeature = function (projectId, featureId, 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) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ActivatedFeaturesApi; | ||
}()); | ||
function defaultOnCatch(error) { | ||
@@ -654,3 +720,3 @@ // TODO: Do something with the error | ||
export { DataSourceApi, DisciplineApi, InstituteApi, LicenseApi, MetadataApi, ProjectApi, ProjectRoleApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, UserApi, VisibilityApi, defaultOnCatch, redirectToProject }; | ||
export { ActivatedFeaturesApi, DataSourceApi, DisciplineApi, InstituteApi, LicenseApi, MetadataApi, ProjectApi, ProjectRoleApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, UserApi, VisibilityApi, defaultOnCatch, redirectToProject }; | ||
//# sourceMappingURL=api-connection.es5.js.map |
@@ -642,2 +642,68 @@ (function (global, factory) { | ||
var axios$f = require('axios'); | ||
function getActivatedFeaturesApiUrl() { | ||
return ('https://' + | ||
apiConnectionBasic.getHostName() + | ||
'/coscine/api/Coscine.Api.ActivatedFeatures/ActivatedFeatures/'); | ||
} | ||
var ActivatedFeaturesApi = /** @class */ (function () { | ||
function ActivatedFeaturesApi() { | ||
} | ||
ActivatedFeaturesApi.listAllFeatures = function (thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl()) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.listAllFeaturesOfProject = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.getActiveFeatures = function (projectId, thenHandler, catchHandler) { | ||
if (thenHandler === void 0) { thenHandler = apiConnectionBasic.defaultThenHandler; } | ||
if (catchHandler === void 0) { catchHandler = apiConnectionBasic.defaultOnCatch; } | ||
apiConnectionBasic.setHeader(); | ||
return axios$f | ||
.get(getActivatedFeaturesApiUrl() + projectId + '/activeFeatures') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.getInactiveFeatures = function (projectId, 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') | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.activateFeature = function (projectId, featureId, 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) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
ActivatedFeaturesApi.deactivateFeature = function (projectId, featureId, 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) | ||
.then(thenHandler) | ||
.catch(catchHandler); | ||
}; | ||
return ActivatedFeaturesApi; | ||
}()); | ||
function defaultOnCatch(error) { | ||
@@ -660,2 +726,3 @@ // TODO: Do something with the error | ||
exports.ActivatedFeaturesApi = ActivatedFeaturesApi; | ||
exports.DataSourceApi = DataSourceApi; | ||
@@ -662,0 +729,0 @@ exports.DisciplineApi = DisciplineApi; |
@@ -31,2 +31,4 @@ "use strict"; | ||
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"); | ||
@@ -33,0 +35,0 @@ function defaultOnCatch(error) { |
@@ -15,3 +15,4 @@ export { ProjectApi } from './requests/project-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; |
{ | ||
"name": "@coscine/api-connection", | ||
"version": "1.11.0", | ||
"version": "1.12.0", | ||
"description": "This library provides methods to connect to CoScInE Apis with JavaScript.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
300219
59
2333