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.5.0 to 1.6.0

dist/coscine-api-connection-1.6.0.tgz

61

dist/api-connection.es5.js

@@ -21,3 +21,3 @@ var axios = require('axios');

function getProjectApiUrl() {
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/';
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/');
}

@@ -145,2 +145,9 @@ var ProjectApi = /** @class */ (function () {

};
ResourceApi.isUserResourceCreator = function (resourceId, thenHandler, catchHandler) {
apiConnectionBasic.setHeader();
axios$3
.get(getResourceApiUrl() + 'resource/' + resourceId + '/isCreator')
.then(thenHandler)
.catch(catchHandler);
};
return ResourceApi;

@@ -373,3 +380,3 @@ }());

function getLicenseApiUrl() {
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/License/';
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/License/');
}

@@ -411,2 +418,12 @@ var LicenseApi = /** @class */ (function () {

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];
}
}
axios$d

@@ -462,2 +479,40 @@ .put(getMetadataApiUrl() +

var axios$e = require('axios');
function getSearchApiUrl() {
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/';
}
var SearchApi = /** @class */ (function () {
function SearchApi() {
}
SearchApi.getSearchResults = function (query, thenHandler, catchHandler) {
apiConnectionBasic.setHeader();
axios$e
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query))
.then(thenHandler)
.catch(catchHandler);
};
SearchApi.getSearchResultsNoFilter = function (thenHandler, catchHandler) {
apiConnectionBasic.setHeader();
axios$e
.get(getSearchApiUrl() + 'allNoFilter/')
.then(thenHandler)
.catch(catchHandler);
};
SearchApi.getSearchResultsForProject = function (projectId, query, thenHandler, catchHandler) {
apiConnectionBasic.setHeader();
axios$e
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query))
.then(thenHandler)
.catch(catchHandler);
};
SearchApi.getSearchResultsForProjectNoFilter = function (projectId, thenHandler, catchHandler) {
apiConnectionBasic.setHeader();
axios$e
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId)
.then(thenHandler)
.catch(catchHandler);
};
return SearchApi;
}());
function defaultOnCatch(error) {

@@ -480,3 +535,3 @@ // TODO: Do something with the error

export { DataSourceApi, DisciplineApi, InstituteApi, LicenseApi, MetadataApi, ProjectApi, ProjectRoleApi, ResourceApi, ResourceTypeApi, RoleApi, SubProjectApi, UserApi, VisibilityApi, defaultOnCatch, redirectToProject };
export { DataSourceApi, DisciplineApi, InstituteApi, LicenseApi, MetadataApi, ProjectApi, ProjectRoleApi, ResourceApi, ResourceTypeApi, RoleApi, SearchApi, SubProjectApi, UserApi, VisibilityApi, defaultOnCatch, redirectToProject };
//# sourceMappingURL=api-connection.es5.js.map

@@ -27,3 +27,3 @@ (function (global, factory) {

function getProjectApiUrl() {
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/';
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Project/');
}

@@ -151,2 +151,9 @@ var ProjectApi = /** @class */ (function () {

};
ResourceApi.isUserResourceCreator = function (resourceId, thenHandler, catchHandler) {
apiConnectionBasic.setHeader();
axios$3
.get(getResourceApiUrl() + 'resource/' + resourceId + '/isCreator')
.then(thenHandler)
.catch(catchHandler);
};
return ResourceApi;

@@ -379,3 +386,3 @@ }());

function getLicenseApiUrl() {
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/License/';
return ('https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/License/');
}

@@ -417,2 +424,12 @@ var LicenseApi = /** @class */ (function () {

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];
}
}
axios$d

@@ -468,2 +485,40 @@ .put(getMetadataApiUrl() +

var axios$e = require('axios');
function getSearchApiUrl() {
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/';
}
var SearchApi = /** @class */ (function () {
function SearchApi() {
}
SearchApi.getSearchResults = function (query, thenHandler, catchHandler) {
apiConnectionBasic.setHeader();
axios$e
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query))
.then(thenHandler)
.catch(catchHandler);
};
SearchApi.getSearchResultsNoFilter = function (thenHandler, catchHandler) {
apiConnectionBasic.setHeader();
axios$e
.get(getSearchApiUrl() + 'allNoFilter/')
.then(thenHandler)
.catch(catchHandler);
};
SearchApi.getSearchResultsForProject = function (projectId, query, thenHandler, catchHandler) {
apiConnectionBasic.setHeader();
axios$e
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query))
.then(thenHandler)
.catch(catchHandler);
};
SearchApi.getSearchResultsForProjectNoFilter = function (projectId, thenHandler, catchHandler) {
apiConnectionBasic.setHeader();
axios$e
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId)
.then(thenHandler)
.catch(catchHandler);
};
return SearchApi;
}());
function defaultOnCatch(error) {

@@ -496,2 +551,3 @@ // TODO: Do something with the error

exports.RoleApi = RoleApi;
exports.SearchApi = SearchApi;
exports.SubProjectApi = SubProjectApi;

@@ -498,0 +554,0 @@ exports.UserApi = UserApi;

@@ -29,2 +29,4 @@ "use strict";

exports.MetadataApi = metadata_api_1.MetadataApi;
var search_api_1 = require("./requests/search-api");
exports.SearchApi = search_api_1.SearchApi;
var api_connection_basic_1 = require("./basic/api-connection-basic");

@@ -31,0 +33,0 @@ function defaultOnCatch(error) {

2

dist/lib/requests/license-api.js

@@ -6,3 +6,3 @@ "use strict";

function getLicenseApiUrl() {
return 'https://' + api_connection_basic_1.default.getHostName() + '/coscine/api/Coscine.Api.Project/License/';
return ('https://' + api_connection_basic_1.default.getHostName() + '/coscine/api/Coscine.Api.Project/License/');
}

@@ -9,0 +9,0 @@ var LicenseApi = /** @class */ (function () {

@@ -26,2 +26,12 @@ "use strict";

api_connection_basic_1.default.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];
}
}
axios

@@ -28,0 +38,0 @@ .put(getMetadataApiUrl() +

@@ -6,3 +6,3 @@ "use strict";

function getProjectApiUrl() {
return 'https://' + api_connection_basic_1.default.getHostName() + '/coscine/api/Coscine.Api.Project/Project/';
return ('https://' + api_connection_basic_1.default.getHostName() + '/coscine/api/Coscine.Api.Project/Project/');
}

@@ -9,0 +9,0 @@ var ProjectApi = /** @class */ (function () {

@@ -39,2 +39,9 @@ "use strict";

};
ResourceApi.isUserResourceCreator = function (resourceId, thenHandler, catchHandler) {
api_connection_basic_1.default.setHeader();
axios
.get(getResourceApiUrl() + 'resource/' + resourceId + '/isCreator')
.then(thenHandler)
.catch(catchHandler);
};
return ResourceApi;

@@ -41,0 +48,0 @@ }());

@@ -14,3 +14,4 @@ export { ProjectApi } from './requests/project-api';

export { MetadataApi } from './requests/metadata-api';
export { SearchApi } from './requests/search-api';
export declare function defaultOnCatch(error: any): void;
export declare function redirectToProject(project: any): void;
export declare class MetadataApi {
static getMetadataForFile(resourceId: string, filename: string, version: string, thenHandler: any, catchHandler: any): void;
static storeMetadataForFile(resourceId: string, filename: string, version: string, body: any, thenHandler: any, catchHandler: any): void;
static storeMetadataForFile(resourceId: string, filename: string, version: string, body: {
[index: string]: Array<{
value: any;
}>;
}, thenHandler: any, catchHandler: any): void;
static getApplicationProfile(projectId: string, applicationProfileId: string, thenHandler: any, catchHandler: any): void;

@@ -5,0 +9,0 @@ static getApplicationProfileComplete(resourceId: string, applicationProfileId: string, thenHandler: any, catchHandler: any): void;

@@ -6,2 +6,3 @@ export declare class ResourceApi {

static updateResource(resourceId: string, body: any, thenHandler: any, catchHandler: any): void;
static isUserResourceCreator(resourceId: string, thenHandler: any, catchHandler: any): void;
}
{
"name": "@coscine/api-connection",
"version": "1.5.0",
"version": "1.6.0",
"description": "This library provides methods to connect to CoScInE Apis with JavaScript.",

@@ -78,3 +78,3 @@ "keywords": [

"prettier": {
"semi": false,
"semi": true,
"singleQuote": true

@@ -92,7 +92,7 @@ },

"@semantic-release/git": "^7.0.18",
"@semantic-release/gitlab": "^4.0.4",
"@semantic-release/gitlab": "^4.1.0",
"@semantic-release/npm": "^5.3.4",
"@semantic-release/release-notes-generator": "^7.3.5",
"@types/jest": "^24.0.23",
"@types/node": "^12.12.14",
"@types/jest": "^24.0.24",
"@types/node": "^12.12.21",
"colors": "^1.4.0",

@@ -104,3 +104,3 @@ "commitizen": "^4.0.3",

"cz-conventional-changelog": "^3.0.2",
"eslint": "^6.7.1",
"eslint": "^6.8.0",
"eslint-config-google": "^0.14.0",

@@ -115,5 +115,5 @@ "eslint-plugin-vue": "^6.0.1",

"prompt": "^1.0.0",
"replace-in-file": "^4.2.0",
"replace-in-file": "^5.0.2",
"rimraf": "^3.0.0",
"rollup": "^1.27.5",
"rollup": "^1.27.14",
"rollup-plugin-commonjs": "^10.1.0",

@@ -123,13 +123,13 @@ "rollup-plugin-json": "^4.0.0",

"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-typescript2": "^0.25.2",
"semantic-release": "^15.13.31",
"semantic-release-gitlab": "^8.0.1",
"rollup-plugin-typescript2": "^0.25.3",
"semantic-release": "^15.14.0",
"@hutson/semantic-delivery-gitlab": "^9.0.8",
"shelljs": "^0.8.3",
"ts-jest": "^24.2.0",
"ts-node": "^8.5.3",
"ts-node": "^8.5.4",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"typedoc": "^0.15.3",
"typescript": "^3.7.2"
"typedoc": "^0.15.5",
"typescript": "^3.7.4"
},

@@ -136,0 +136,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

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