@publidata/utils-data-manager
Version:
Collection of methods to extract data from publidata
161 lines (121 loc) • 3.38 kB
JavaScript
const DataSourcePipedrive = require("./Pipedrive");
const DataSourcePublidata = require("./Publidata");
class DataSource {
constructor(isDemo, uid, instance) {
this.source = isDemo
? new DataSourcePipedrive(uid, instance)
: new DataSourcePublidata(instance);
}
getData(params) {
return this.source.getData(params);
}
getInstance(params) {
return this.source.getInstance(params);
}
getWasteCollections(params) {
return this.source.getWasteCollections(params);
}
getWasteCollection(params) {
return this.source.getWasteCollection(params);
}
getWasteCollectionById(params) {
return this.source.getWasteCollectionById(params);
}
getWasteCollectionFacilities(params) {
return this.source.getWasteCollectionFacilities(params);
}
getWasteCollectionFacility(params) {
return this.source.getWasteCollectionFacility(params);
}
getRecyclingBins(params) {
return this.source.getWasteRecyclingBins(params);
}
getRecyclingBin(params) {
return this.source.getRecyclingBin(params);
}
getRecyclingCenters(params) {
return this.source.getRecyclingCenters(params);
}
getRecyclingCenter(params) {
return this.source.getRecyclingCenter(params);
}
getFacilities(params) {
return this.source.getFacilities(params);
}
getFacilityById(params) {
return this.source.getFacilityById(params);
}
getFacilitiesByType(params) {
return this.source.getFacilitiesByType(params);
}
getFacilityByType(params) {
return this.source.getFacilityByType(params);
}
getFacilityByTypeAndId(params) {
return this.source.getFacilityByTypeAndId(params);
}
getServiceFacilityAggregations(params) {
return this.source.getServiceFacilityAggregations(params);
}
getCanteenMenuServices(params) {
return this.source.getCanteenMenuServices(params);
}
getCanteenMenuById(params) {
return this.source.getCanteenMenuById(params);
}
getMealsByMenuId(params) {
return this.source.getMealsByMenuId(params);
}
getDocumentsByInstanceId(params) {
return this.source.getDocumentsByInstanceId(params);
}
getDocumentsByIds(params) {
return this.source.getDocumentsByIds(params);
}
getProceduresByIds(params) {
return this.source.getProceduresByIds(params);
}
getRisks(params) {
return this.source.getRisks(params);
}
getPosts(params) {
return this.source.getPosts(params);
}
getNews(params) {
return this.source.getNews(params);
}
getNewsTotalPages(params) {
return this.source.getNewsTotalPages(params);
}
getElected(params) {
return this.source.getElected(params);
}
getCities(params) {
return this.source.getCities(params);
}
getSectors(params) {
return this.source.getSectors(params);
}
getSlots(params) {
return this.source.getSlots(params);
}
getItems(params) {
return this.source.getItems(params);
}
getAccountById(params) {
return this.source.getAccountById(params);
}
getAlerts(params) {
return this.source.getAlerts(params);
}
getAlert(params) {
return this.source.getAlert(params);
}
getFacilitiesAlerts(params) {
return this.source.getFacilitiesAlerts(params);
}
getWasteCollectionAlerts(params) {
return this.source.getWasteCollectionAlerts(params);
}
}
module.exports = DataSource;