Skip to content

Commit

Permalink
feat: add datalayer simulatorv2
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Jan 21, 2022
1 parent 3835ff8 commit 4529c22
Show file tree
Hide file tree
Showing 24 changed files with 935 additions and 456 deletions.
635 changes: 278 additions & 357 deletions docs/postman/Projects API.postman_collection.json

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/postman/createProjects.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
originProjectId,projectId,program,projectName,projectLink,projectDeveloper,sector,projectType,coveredByNDC,NDCLinkage,projectStatus,projectStatusDate,unitMetric,methodology,methodologyVersion,validationApproach,validationDate,projectTag,estimatedAnnualAverageEmissionReduction,projectLocations,qualifications,vintages,coBenefits,relatedProjects
c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,0,Shuffletag,"Lorem�ipsum�dolor�sit�amet,�consectetur�adipiscing�elit,�sed�do�eiusmod�tempor�incididunt�ut�labore�et�dolore�magna�aliqua.",1/19/2022,Fuscia,Quatz,43,Praesent�in�consequat�urna,1/19/2022,Neque,120,United�States,https://qualification.link/1,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_4,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,1,Shuffletag,"Lorem�ipsum�dolor�sit�amet,�consectetur�adipiscing�elit,�sed�do�eiusmod�tempor�incididunt�ut�labore�et�dolore�magna�aliqua.",1/20/2022,Fuscia,Quatz,44,Praesent�in�consequat�urna,1/20/2022,Neque,121,United�States,https://qualification.link/2,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_5,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,2,Shuffletag,"Lorem�ipsum�dolor�sit�amet,�consectetur�adipiscing�elit,�sed�do�eiusmod�tempor�incididunt�ut�labore�et�dolore�magna�aliqua.",1/21/2022,Fuscia,Quatz,45,Praesent�in�consequat�urna,1/21/2022,Neque,122,United�States,https://qualification.link/3,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_6,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,3,Shuffletag,"Lorem�ipsum�dolor�sit�amet,�consectetur�adipiscing�elit,�sed�do�eiusmod�tempor�incididunt�ut�labore�et�dolore�magna�aliqua.",1/22/2022,Fuscia,Quatz,46,Praesent�in�consequat�urna,1/22/2022,Neque,123,United�States,https://qualification.link/4,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_7,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,4,Shuffletag,"Lorem�ipsum�dolor�sit�amet,�consectetur�adipiscing�elit,�sed�do�eiusmod�tempor�incididunt�ut�labore�et�dolore�magna�aliqua.",1/23/2022,Fuscia,Quatz,47,Praesent�in�consequat�urna,1/23/2022,Neque,124,United�States,https://qualification.link/5,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_8,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,5,Shuffletag,"Lorem�ipsum�dolor�sit�amet,�consectetur�adipiscing�elit,�sed�do�eiusmod�tempor�incididunt�ut�labore�et�dolore�magna�aliqua.",1/24/2022,Fuscia,Quatz,48,Praesent�in�consequat�urna,1/24/2022,Neque,125,United�States,https://qualification.link/6,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_9,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,6,Shuffletag,"Lorem�ipsum�dolor�sit�amet,�consectetur�adipiscing�elit,�sed�do�eiusmod�tempor�incididunt�ut�labore�et�dolore�magna�aliqua.",1/25/2022,Fuscia,Quatz,49,Praesent�in�consequat�urna,1/25/2022,Neque,126,United�States,https://qualification.link/7,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_10,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,7,Shuffletag,"Lorem�ipsum�dolor�sit�amet,�consectetur�adipiscing�elit,�sed�do�eiusmod�tempor�incididunt�ut�labore�et�dolore�magna�aliqua.",1/26/2022,Fuscia,Quatz,50,Praesent�in�consequat�urna,1/26/2022,Neque,127,United�States,https://qualification.link/8,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_11,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,8,Shuffletag,"Lorem�ipsum�dolor�sit�amet,�consectetur�adipiscing�elit,�sed�do�eiusmod�tempor�incididunt�ut�labore�et�dolore�magna�aliqua.",1/27/2022,Fuscia,Quatz,51,Praesent�in�consequat�urna,1/27/2022,Neque,128,United�States,https://qualification.link/9,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_12,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
4 changes: 4 additions & 0 deletions docs/postman/updateProjects.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
warehouseUnitId,originProjectId,projectId,program,projectName,projectLink,projectDeveloper,sector,projectType,coveredByNDC,NDCLinkage,projectStatus,projectStatusDate,unitMetric,methodology,methodologyVersion,validationApproach,validationDate,projectTag,estimatedAnnualAverageEmissionReduction,projectLocations,qualifications,vintages,coBenefits,relatedProjects
5c960ac1-a180-45a4-9850-be177e26d2fb,c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,0,Shuffletag,"Lorem�ipsum�dolor�sit�amet,�consectetur�adipiscing�elit,�sed�do�eiusmod�tempor�incididunt�ut�labore�et�dolore�magna�aliqua.",1/19/2022,Fuscia,Quatz,43,He waited for the stop sign to turn to a go sign.,1/19/2022,Neque,120,United�States,https://qualification.link/1,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_4,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
7703e6be-1781-4322-9a9c-502ca0dca29b,c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Seven,Topicshots,0,Shuffletag,"I know many children ask for a pony, but I wanted a bicycle with rockets strapped to it.",1/19/2022,Fuscia,Quatz,43,He waited for the stop sign to turn to a go sign.,1/19/2022,Neque,120,United�States,https://qualification.link/1,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_4,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
04582672-47a9-411b-896f-3d45974e360e,c5067a60-e329-4510-991c-b302fd00ec8d,c9d147e2-bc07-4e68-a76d-43424fa8cd4e,Eimbee,Zoomcast,http://dailymotion.com/ligula/suspendisse/ornare/consequat/lectus/in.jpg?aliquam=consequat&lacus=nulla&morbi=nisl&quis=nunc&tortor=nisl&id=duis&nulla=bibendum&ultrices=felis&aliquet=sed&maecenas=interdum&leo=venenatis&odio=turpis&condimentum=enim&id=blandit&luctus=mi&nec=in&molestie=porttitor&sed=pede&justo=justo&pellentesque=eu&viverra=massa&pede=donec&ac=dapibus&diam=duis&cras=at&pellentesque=velit&volutpat=eu&dui=est&maecenas=congue&tristique=elementum&est=in&et=hac&tempus=habitasse&semper=platea&est=dictumst&quam=morbi&pharetra=vestibulum&magna=velit&ac=id&consequat=pretium&metus=iaculis&sapien=diam&ut=erat&nunc=fermentum&vestibulum=justo&ante=nec&ipsum=condimentum,Cogibox,Viva,Topicshots,0,Shuffletag,"I know many children ask for a pony, but I wanted a bicycle with rockets strapped to it.",1/22/2022,Fuscia,Quatz,43,He waited for the stop sign to turn to a go sign.,1/19/2022,Neque,120,United�States,https://qualification.link/1,"3d5a8ed2-e5a7-4275-a36e-3456812e39b7,57c1859d-6aa4-4c57-9dfb-6438e0d4653e",TEST_COBENEFIT_4,394e319e-a4d2-4ad8-a4b3-0d5b660dd8ec
88 changes: 88 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"joi": "^17.5.0",
"lodash": "^4.17.21",
"mysql2": "^2.3.3",
"request-promise": "^4.2.6",
"rxjs": "^7.5.1",
"sequelize": "^6.12.0-alpha.1",
"sequelize-mock": "^0.10.2",
Expand Down
10 changes: 9 additions & 1 deletion src/controllers/organization.controller.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import { Organization } from '../models/organizations';

import { updateOrganization } from '../fullnode/dataLayerService';
export const findAll = async (req, res) => {
return res.json(await Organization.getOrgsMap());
};

export const create = async (req, res) => {
const { name, icon, website } = req.body;
return res.json({
message: 'New organization created successfully.',
orgId: await updateOrganization(name, icon, website),
});
};
Loading

0 comments on commit 4529c22

Please sign in to comment.