├── .babelrc ├── .coffeelintignore ├── .editorconfig ├── .eslintrc.json ├── .gitignore ├── .npmignore ├── .transifexrc.tpl ├── .travis.yml ├── .tx └── config ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── build ├── assets.json ├── client │ ├── app │ │ └── locales │ │ │ ├── de.json │ │ │ ├── en.json │ │ │ ├── es.json │ │ │ ├── fr.json │ │ │ ├── ja.json │ │ │ ├── nl.json │ │ │ ├── sq.json │ │ │ └── zh_CN.json │ └── public │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── app.6c96ae51fb5ff4d8ad8c.css │ │ ├── app.6c96ae51fb5ff4d8ad8c.css.map │ │ ├── app.6c96ae51fb5ff4d8ad8c.js │ │ ├── app.6c96ae51fb5ff4d8ad8c.js.map │ │ ├── apple-touch-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── fonts │ │ ├── adobeblank.woff │ │ ├── fontawesome-webfont.woff │ │ ├── fontawesome-webfont.woff2 │ │ ├── fonts.css │ │ ├── mavenpro-bold.woff │ │ ├── mavenpro-bold.woff2 │ │ ├── mavenpro-regular.woff │ │ ├── mavenpro-regular.woff2 │ │ ├── sourcecodepro-bold.woff │ │ ├── sourcecodepro-regular.woff │ │ ├── sourcesanspro-bold-italic.woff │ │ ├── sourcesanspro-bold-italic.woff2 │ │ ├── sourcesanspro-bold.woff │ │ ├── sourcesanspro-bold.woff2 │ │ ├── sourcesanspro-italic.woff │ │ ├── sourcesanspro-italic.woff2 │ │ ├── sourcesanspro-regular.woff │ │ └── sourcesanspro-regular.woff2 │ │ ├── img │ │ ├── facture-fournisseur-internet-lg.a30faca700e43fa3e98fb0e4eea2eb04.jpg │ │ ├── facture-telephonique-lg.42744ed19414337cb102e1b58985a5ea.jpg │ │ ├── regroupement-agendas-lg.58fe819022f9969913db28e6f5e90283.jpg │ │ └── regroupement-contacts-lg.120d796aac47a39b3c8a80d5fbe61be5.jpg │ │ ├── manifest.json │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ ├── mstile-70x70.png │ │ └── safari-pinned-tab.svg ├── server.js └── server │ ├── config.js │ ├── config │ └── appConfig.js │ ├── controllers │ ├── folders.js │ ├── index.js │ ├── konnectors.js │ └── routes.js │ ├── init │ ├── konnectors.js │ └── patch_commits.js │ ├── konnectors │ ├── ameli.js │ ├── aprr.js │ ├── birthdays.js │ ├── bouyguesbox.js │ ├── bouyguestelecom.js │ ├── darty.js │ ├── digiposte.js │ ├── digitalocean.js │ ├── directenergie.js │ ├── doctolib.js │ ├── edf.js │ ├── electrabel.js │ ├── facebook_events.js │ ├── free.js │ ├── freemobile.js │ ├── github.js │ ├── githubcommits.js │ ├── googlecontacts.js │ ├── ical_feed.js │ ├── isen.js │ ├── jawbone.js │ ├── kimsufi_ca.js │ ├── kimsufi_eu.js │ ├── linkedin.js │ ├── maif.js │ ├── malakoff_mederic.js │ ├── materiel_net.js │ ├── meetup.js │ ├── nest.js │ ├── numericable.js │ ├── online_net.js │ ├── orange.js │ ├── orange_mobile.js │ ├── orange_vod.js │ ├── ovh_ca.js │ ├── ovh_eu.js │ ├── podcast.js │ ├── rescuetime.js │ ├── runabove.js │ ├── sfr_box.js │ ├── sfr_mobile.js │ ├── sosh.js │ ├── soyoustart_ca.js │ ├── soyoustart_eu.js │ ├── trainline.js │ ├── twitter.js │ ├── uber.js │ ├── vente_privee.js │ ├── virgin_mobile.js │ ├── voyages_sncf.js │ └── withings.js │ ├── lib │ ├── base_konnector.js │ ├── base_ovh_konnector.js │ ├── compare_contacts.js │ ├── contact_helper.js │ ├── diacritics.js │ ├── fetcher.js │ ├── filter_existing.js │ ├── get_template_ext.js │ ├── google_access_token.js │ ├── google_contact_helper.js │ ├── importer.js │ ├── konnector_hash.js │ ├── link_bank_operation.js │ ├── linkedin_helper.js │ ├── localization_manager.js │ ├── naming.js │ ├── notification_handler.js │ ├── ovh_fetcher.js │ ├── poller.js │ ├── save_data_and_file.js │ └── update_or_create.js │ ├── models │ ├── bankoperation.js │ ├── bill.js │ ├── binary.js │ ├── client.js │ ├── commit.js │ ├── consumptionstatement.js │ ├── contact.js │ ├── contract.js │ ├── cozy_instance.js │ ├── edf │ │ ├── bill.js │ │ ├── client.js │ │ ├── consumption_statement.js │ │ ├── contract.js │ │ ├── home.js │ │ └── payment_terms.js │ ├── event.js │ ├── file.js │ ├── folder.js │ ├── geopoint.js │ ├── home.js │ ├── konnector.js │ ├── maif │ │ └── user.js │ ├── maifuser.js │ ├── paymentterms.js │ ├── phonecommunicationlog.js │ ├── requests.js │ ├── sleep.js │ ├── steps.js │ ├── tag.js │ ├── track.js │ ├── user.js │ └── videostream.js │ └── views │ └── index.js ├── client ├── .gitignore ├── app │ ├── assets │ │ ├── icons │ │ │ ├── ameli.svg │ │ │ ├── aprr.svg │ │ │ ├── birthdays.svg │ │ │ ├── bouyguesbox.svg │ │ │ ├── bouyguestelecom.svg │ │ │ ├── darty.svg │ │ │ ├── default_myaccount.svg │ │ │ ├── digitalocean.svg │ │ │ ├── directenergie.svg │ │ │ ├── doctolib.svg │ │ │ ├── edf.svg │ │ │ ├── electrabel.svg │ │ │ ├── facebook_events.svg │ │ │ ├── free.svg │ │ │ ├── freemobile.svg │ │ │ ├── github.svg │ │ │ ├── githubcommits.svg │ │ │ ├── googlecontacts.svg │ │ │ ├── ical_feed.svg │ │ │ ├── icon-check.svg │ │ │ ├── icon-warning.svg │ │ │ ├── isen.svg │ │ │ ├── jawbone.svg │ │ │ ├── kimsufi_ca.svg │ │ │ ├── kimsufi_eu.svg │ │ │ ├── linkedin.svg │ │ │ ├── maif.svg │ │ │ ├── malakoff_mederic.svg │ │ │ ├── materiel_net.svg │ │ │ ├── meetup.svg │ │ │ ├── nest.svg │ │ │ ├── numericable.svg │ │ │ ├── online_net.svg │ │ │ ├── orange.svg │ │ │ ├── orange_mobile.svg │ │ │ ├── orange_vod.svg │ │ │ ├── ovh_ca.svg │ │ │ ├── ovh_eu.svg │ │ │ ├── podcast.svg │ │ │ ├── rescuetime.svg │ │ │ ├── runabove.svg │ │ │ ├── sfr_box.svg │ │ │ ├── sfr_mobile.svg │ │ │ ├── sncf.svg │ │ │ ├── sosh.svg │ │ │ ├── soyoustart_ca.svg │ │ │ ├── soyoustart_eu.svg │ │ │ ├── trainline.svg │ │ │ ├── twitter.svg │ │ │ ├── uber.svg │ │ │ ├── vente_privee.svg │ │ │ ├── virgin_mobile.svg │ │ │ ├── voyages_sncf.svg │ │ │ └── withings.svg │ │ └── sprites │ │ │ ├── icon-activity.svg │ │ │ ├── icon-appointment.svg │ │ │ ├── icon-bill.svg │ │ │ ├── icon-bloodPressure.svg │ │ │ ├── icon-calendar.svg │ │ │ ├── icon-category.svg │ │ │ ├── icon-check.svg │ │ │ ├── icon-commit.svg │ │ │ ├── icon-connected.svg │ │ │ ├── icon-consumption.svg │ │ │ ├── icon-contact.svg │ │ │ ├── icon-contract.svg │ │ │ ├── icon-courseMaterial.svg │ │ │ ├── icon-discovery.svg │ │ │ ├── icon-event.svg │ │ │ ├── icon-eye-closed.svg │ │ │ ├── icon-eye-open.svg │ │ │ ├── icon-heartbeat.svg │ │ │ ├── icon-podcast.svg │ │ │ ├── icon-refund.svg │ │ │ ├── icon-sleepTime.svg │ │ │ ├── icon-stepsNumber.svg │ │ │ ├── icon-temperature.svg │ │ │ ├── icon-travelDate.svg │ │ │ ├── icon-tweet.svg │ │ │ └── icon-weight.svg │ ├── components │ │ ├── AccountConfigForm.jsx │ │ ├── AccountConnection.jsx │ │ ├── AccountLoginForm.jsx │ │ ├── AccountManagement.jsx │ │ ├── App.jsx │ │ ├── CategoryList.jsx │ │ ├── ConnectedList.jsx │ │ ├── ConnectorDialog.jsx │ │ ├── ConnectorItem.jsx │ │ ├── ConnectorList.jsx │ │ ├── DataItem.jsx │ │ ├── Dialog.jsx │ │ ├── DiscoveryList.jsx │ │ ├── Field.jsx │ │ ├── Notifier.jsx │ │ ├── Sidebar.jsx │ │ ├── UseCaseDialog.jsx │ │ └── UseCaseList.jsx │ ├── containers │ │ └── ConnectorManagement.jsx │ ├── contexts │ │ └── cozy │ │ │ ├── assets │ │ │ └── img │ │ │ │ ├── facture-fournisseur-internet-lg.jpg │ │ │ │ ├── facture-telephonique-lg.jpg │ │ │ │ ├── regroupement-agendas-lg.jpg │ │ │ │ └── regroupement-contacts-lg.jpg │ │ │ ├── index.json │ │ │ └── locales │ │ │ └── en.json │ ├── index.jsx │ ├── lib │ │ ├── MyAccountsStore.js │ │ ├── statefulComponent.jsx │ │ └── statefulForm.jsx │ ├── locales │ │ └── en.json │ ├── plugins │ │ └── preact-polyglot.js │ └── styles │ │ ├── base │ │ ├── _colors.styl │ │ └── _normalize.styl │ │ └── index.styl ├── karma.conf.js ├── package.json ├── test │ └── components │ │ ├── Sample.test.js │ │ └── __snapshots__ │ │ └── Sample.test.js.snap ├── vendor │ └── assets │ │ ├── .gitkeep │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── apple-touch-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── fonts │ │ ├── adobeblank.woff │ │ ├── fontawesome-webfont.woff │ │ ├── fontawesome-webfont.woff2 │ │ ├── fonts.css │ │ ├── mavenpro-bold.woff │ │ ├── mavenpro-bold.woff2 │ │ ├── mavenpro-regular.woff │ │ ├── mavenpro-regular.woff2 │ │ ├── sourcecodepro-bold.woff │ │ ├── sourcecodepro-regular.woff │ │ ├── sourcesanspro-bold-italic.woff │ │ ├── sourcesanspro-bold-italic.woff2 │ │ ├── sourcesanspro-bold.woff │ │ ├── sourcesanspro-bold.woff2 │ │ ├── sourcesanspro-italic.woff │ │ ├── sourcesanspro-italic.woff2 │ │ ├── sourcesanspro-regular.woff │ │ └── sourcesanspro-regular.woff2 │ │ ├── manifest.json │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ ├── mstile-70x70.png │ │ └── safari-pinned-tab.svg ├── webpack.config.js └── webpack.test.config.js ├── coffeelint.json ├── dev ├── connector.js ├── data.js └── index.js ├── dev_tools.js ├── docs ├── client-side-architecture.md ├── client-side-connector-configuration.md ├── client-side-dialog.md ├── client-side-use-cases-configuration.md ├── components │ └── client-side-list-item.md ├── jawbone.md ├── konnector_declaration_v3.md └── server-side-configuration.md ├── package.json ├── scripts ├── build.sh ├── build_server.sh ├── lint.sh └── tests.sh ├── server.coffee ├── server ├── config.coffee ├── config │ └── appConfig.coffee ├── controllers │ ├── folders.coffee │ ├── index.coffee │ ├── konnectors.coffee │ └── routes.coffee ├── init │ ├── konnectors.coffee │ └── patch_commits.coffee ├── konnectors │ ├── ameli.coffee │ ├── aprr.js │ ├── birthdays.js │ ├── bouyguesbox.coffee │ ├── bouyguestelecom.coffee │ ├── darty.js │ ├── digiposte.js │ ├── digitalocean.coffee │ ├── directenergie.js │ ├── doctolib.js │ ├── edf.coffee │ ├── electrabel.coffee │ ├── facebook_events.js │ ├── free.coffee │ ├── freemobile.coffee │ ├── github.coffee │ ├── githubcommits.coffee │ ├── googlecontacts.coffee │ ├── ical_feed.js │ ├── isen.coffee │ ├── jawbone.coffee │ ├── kimsufi_ca.coffee │ ├── kimsufi_eu.coffee │ ├── linkedin.js │ ├── maif.js │ ├── malakoff_mederic.coffee │ ├── materiel_net.js │ ├── meetup.js │ ├── nest.coffee │ ├── numericable.js │ ├── online_net.coffee │ ├── orange.coffee │ ├── orange_mobile.js │ ├── orange_vod.js │ ├── ovh_ca.coffee │ ├── ovh_eu.coffee │ ├── podcast.js │ ├── rescuetime.coffee │ ├── runabove.coffee │ ├── sfr_box.js │ ├── sfr_mobile.js │ ├── sosh.coffee │ ├── soyoustart_ca.coffee │ ├── soyoustart_eu.coffee │ ├── trainline.js │ ├── twitter.coffee │ ├── uber.js │ ├── vente_privee.js │ ├── virgin_mobile.js │ ├── voyages_sncf.js │ └── withings.coffee ├── lib │ ├── base_konnector.js │ ├── base_ovh_konnector.coffee │ ├── compare_contacts.coffee │ ├── contact_helper.coffee │ ├── diacritics.coffee │ ├── fetcher.coffee │ ├── filter_existing.coffee │ ├── get_template_ext.coffee │ ├── google_access_token.coffee │ ├── google_contact_helper.coffee │ ├── importer.coffee │ ├── konnector_hash.coffee │ ├── link_bank_operation.coffee │ ├── linkedin_helper.coffee │ ├── localization_manager.coffee │ ├── naming.coffee │ ├── notification_handler.coffee │ ├── ovh_fetcher.coffee │ ├── poller.coffee │ ├── save_data_and_file.coffee │ └── update_or_create.js ├── models │ ├── bankoperation.coffee │ ├── bill.coffee │ ├── binary.coffee │ ├── client.coffee │ ├── commit.coffee │ ├── consumptionstatement.coffee │ ├── contact.coffee │ ├── contract.coffee │ ├── cozy_instance.coffee │ ├── edf │ │ ├── bill.coffee │ │ ├── client.coffee │ │ ├── consumption_statement.coffee │ │ ├── contract.coffee │ │ ├── home.coffee │ │ └── payment_terms.coffee │ ├── event.coffee │ ├── file.coffee │ ├── folder.coffee │ ├── geopoint.coffee │ ├── home.coffee │ ├── konnector.coffee │ ├── maif │ │ └── user.coffee │ ├── maifuser.coffee │ ├── paymentterms.coffee │ ├── phonecommunicationlog.coffee │ ├── requests.coffee │ ├── sleep.coffee │ ├── steps.coffee │ ├── tag.coffee │ ├── track.coffee │ ├── user.coffee │ └── videostream.coffee └── views │ └── index.pug └── tests ├── append_config_data.coffee ├── contact_helper.coffee ├── files └── bill.pdf ├── fixtures ├── bills.json ├── courseData.json ├── cozy_contact_full.json ├── files.json ├── fixtures.json ├── google_contact_full.json ├── operations.json └── student.ics ├── google_contact_helper.coffee ├── helpers.coffee ├── isen ├── check_and_create_folder.coffee ├── check_events_to_delete.coffee ├── check_events_update_to_notify.coffee ├── check_file.coffee ├── check_files_to_delete.coffee ├── check_keys.coffee ├── extract_urls.coffee ├── fetch_json.coffee ├── helpers.coffee ├── integration.coffee ├── is_in_near_future.coffee ├── parse_course.coffee ├── parse_ics.coffee ├── process_events.coffee └── process_folder.coffee ├── konnector_structure.coffee ├── lib_base_konnector.coffee ├── lib_fetcher.coffee ├── lib_filter_existing.coffee ├── lib_konnector_hash.coffee ├── lib_link_bank_operation.coffee ├── lib_save_data_and_file.coffee ├── locales.coffee ├── models_bank_operation.coffee ├── models_file.coffee ├── models_folder.coffee ├── models_konnector.coffee ├── models_update.coffee ├── naming.coffee ├── password.coffee ├── patch_commits.coffee ├── poller.coffee ├── rescuetime.coffee └── routes.coffee /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "react"] 3 | } 4 | -------------------------------------------------------------------------------- /.coffeelintignore: -------------------------------------------------------------------------------- 1 | client/app/locales 2 | node_modules 3 | tests 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | # editorconfig is a unified configuration file that all editors can take 3 | # into account 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | end_of_line = lf 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | indent_style = space 12 | indent_size = 2 13 | 14 | [*.coffee] 15 | indent_size = 4 16 | 17 | [*.jade] 18 | trim_trailing_whitespace = false 19 | 20 | [*.pug] 21 | trim_trailing_whitespace = false 22 | 23 | [*.styl] 24 | indent_size = 4 25 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "airbnb", 3 | "strict": "global", 4 | "plugins": [ 5 | "react" 6 | ], 7 | 8 | "rules": { 9 | "no-param-reassign": [0, {"props": false}], 10 | "strict": 0, 11 | "no-shadow": 0, 12 | "no-use-before-define": 0, 13 | "import/no-unresolved": 0, 14 | "no-underscore-dangle": 0, 15 | "consistent-return": 0, 16 | "max-len": [1, 120, 2, {"ignoreUrls": true}], 17 | "comma-dangle": 0, 18 | "no-mixed-operators": 1, 19 | "no-continue": 1, 20 | "no-plusplus": 0 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | lib-cov 3 | *.seed 4 | *.csv 5 | *.log 6 | *.dat 7 | *.out 8 | *.pid 9 | *.gz 10 | 11 | pids 12 | logs 13 | results 14 | 15 | node_modules 16 | npm-debug.log 17 | client/public 18 | 19 | build 20 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | lib-cov 3 | *.seed 4 | *.csv 5 | *.log 6 | *.dat 7 | *.out 8 | *.pid 9 | *.gz 10 | 11 | client 12 | !build/client 13 | server 14 | !build/server 15 | dev 16 | dev_tools.coffee 17 | scripts 18 | test 19 | server.coffee 20 | .editorconfig 21 | .tx 22 | .travis.yml 23 | Cakefile 24 | coffeelint.json 25 | -------------------------------------------------------------------------------- /.transifexrc.tpl: -------------------------------------------------------------------------------- 1 | [https://www.transifex.com] 2 | hostname = https://www.transifex.com 3 | username = Cozy 4 | token = 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 4 4 | services: 5 | - couchdb 6 | env: 7 | global: 8 | - NAME=konnectors 9 | - TOKEN=apptoken 10 | - NODE_ENV=test 11 | - secure: bEgRXNhjX/Rq3hM97lHL7AztEt7SHKW08XYwDnjwzTfcrolqD840yZPifo8X9VLX/FvlGNh7CvvAQYqlW0MhIKqWFomByRo7SvpYajxucg3gYMPheNGOqT50mqHhgn98hM4X/cE+yn+yMLotza+i307OMsc/lBD+BgspMiRsi64= 12 | addons: 13 | apt: 14 | sources: 15 | - deadsnakes 16 | packages: 17 | - python3.5 18 | before_script: 19 | - export DISPLAY=:99.0 20 | - sh -e /etc/init.d/xvfb start 21 | before_install: 22 | - if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi 23 | - curl -fsSL https://bootstrap.pypa.io/get-pip.py | python3.5 - --user 24 | - travis_retry pip3.5 install --user transifex-client 25 | - install -m0644 .transifexrc.tpl ~/.transifexrc 26 | - echo "password = $TX_PASSWD" >> ~/.transifexrc 27 | - git clone git://github.com/mycozycloud/cozy-data-system.git 28 | - cd cozy-data-system 29 | - npm install forever coffee-script -g 30 | - npm install 31 | - NAME=data-system TOKEN=token forever start -o forever-ds.log build/server.js 32 | - sleep 5 33 | - coffee commands.coffee test-install konnectors 34 | - cd ../ 35 | after_failure: 36 | - cat cozy-data-system/forever-ds.log 37 | - cat cozy-data-system/log/test.log 38 | -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | 4 | [cozy-collect.client] 5 | file_filter = client/app/locales/.json 6 | source_file = client/app/locales/en.json 7 | source_lang = en 8 | type = KEYVALUEJSON 9 | 10 | [cozy-collect.context-cozy] 11 | file_filter = client/app/contexts/cozy/locales/.json 12 | source_file = client/app/contexts/cozy/locales/en.json 13 | source_lang = en 14 | type = KEYVALUEJSON 15 | -------------------------------------------------------------------------------- /build/assets.json: -------------------------------------------------------------------------------- 1 | {"hash":"6c96ae51fb5ff4d8ad8c"} -------------------------------------------------------------------------------- /build/client/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /build/client/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /build/client/public/app.6c96ae51fb5ff4d8ad8c.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":[],"names":[],"mappings":"","file":"app.6c96ae51fb5ff4d8ad8c.css","sourceRoot":""} -------------------------------------------------------------------------------- /build/client/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/apple-touch-icon.png -------------------------------------------------------------------------------- /build/client/public/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ff9800 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /build/client/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/favicon-16x16.png -------------------------------------------------------------------------------- /build/client/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/favicon-32x32.png -------------------------------------------------------------------------------- /build/client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/favicon.ico -------------------------------------------------------------------------------- /build/client/public/fonts/adobeblank.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/adobeblank.woff -------------------------------------------------------------------------------- /build/client/public/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /build/client/public/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /build/client/public/fonts/mavenpro-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/mavenpro-bold.woff -------------------------------------------------------------------------------- /build/client/public/fonts/mavenpro-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/mavenpro-bold.woff2 -------------------------------------------------------------------------------- /build/client/public/fonts/mavenpro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/mavenpro-regular.woff -------------------------------------------------------------------------------- /build/client/public/fonts/mavenpro-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/mavenpro-regular.woff2 -------------------------------------------------------------------------------- /build/client/public/fonts/sourcecodepro-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/sourcecodepro-bold.woff -------------------------------------------------------------------------------- /build/client/public/fonts/sourcecodepro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/sourcecodepro-regular.woff -------------------------------------------------------------------------------- /build/client/public/fonts/sourcesanspro-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/sourcesanspro-bold-italic.woff -------------------------------------------------------------------------------- /build/client/public/fonts/sourcesanspro-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/sourcesanspro-bold-italic.woff2 -------------------------------------------------------------------------------- /build/client/public/fonts/sourcesanspro-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/sourcesanspro-bold.woff -------------------------------------------------------------------------------- /build/client/public/fonts/sourcesanspro-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/sourcesanspro-bold.woff2 -------------------------------------------------------------------------------- /build/client/public/fonts/sourcesanspro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/sourcesanspro-italic.woff -------------------------------------------------------------------------------- /build/client/public/fonts/sourcesanspro-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/sourcesanspro-italic.woff2 -------------------------------------------------------------------------------- /build/client/public/fonts/sourcesanspro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/sourcesanspro-regular.woff -------------------------------------------------------------------------------- /build/client/public/fonts/sourcesanspro-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/fonts/sourcesanspro-regular.woff2 -------------------------------------------------------------------------------- /build/client/public/img/facture-fournisseur-internet-lg.a30faca700e43fa3e98fb0e4eea2eb04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/img/facture-fournisseur-internet-lg.a30faca700e43fa3e98fb0e4eea2eb04.jpg -------------------------------------------------------------------------------- /build/client/public/img/facture-telephonique-lg.42744ed19414337cb102e1b58985a5ea.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/img/facture-telephonique-lg.42744ed19414337cb102e1b58985a5ea.jpg -------------------------------------------------------------------------------- /build/client/public/img/regroupement-agendas-lg.58fe819022f9969913db28e6f5e90283.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/img/regroupement-agendas-lg.58fe819022f9969913db28e6f5e90283.jpg -------------------------------------------------------------------------------- /build/client/public/img/regroupement-contacts-lg.120d796aac47a39b3c8a80d5fbe61be5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/img/regroupement-contacts-lg.120d796aac47a39b3c8a80d5fbe61be5.jpg -------------------------------------------------------------------------------- /build/client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Cozy MyAccounts", 3 | "icons": [ 4 | { 5 | "src": "\/apps\/konnectors\/android-chrome-192x192.png", 6 | "sizes": "192x192", 7 | "type": "image\/png" 8 | }, 9 | { 10 | "src": "\/apps\/konnectors\/android-chrome-512x512.png", 11 | "sizes": "512x512", 12 | "type": "image\/png" 13 | } 14 | ], 15 | "theme_color": "#ffffff", 16 | "display": "standalone" 17 | } 18 | -------------------------------------------------------------------------------- /build/client/public/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/mstile-144x144.png -------------------------------------------------------------------------------- /build/client/public/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/mstile-150x150.png -------------------------------------------------------------------------------- /build/client/public/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/mstile-310x150.png -------------------------------------------------------------------------------- /build/client/public/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/mstile-310x310.png -------------------------------------------------------------------------------- /build/client/public/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cozy-labs/konnectors/5470c0dce8295fa0ac9d50bff01cc9b207aa24fe/build/client/public/mstile-70x70.png -------------------------------------------------------------------------------- /build/server.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var RealtimeAdapter, americano, application, commitPatch, initKonnectors, localization, log, params, poller; 3 | 4 | americano = require('americano'); 5 | 6 | RealtimeAdapter = require('cozy-realtime-adapter'); 7 | 8 | localization = require('./server/lib/localization_manager'); 9 | 10 | initKonnectors = require('./server/init/konnectors'); 11 | 12 | poller = require('./server/lib/poller'); 13 | 14 | commitPatch = require('./server/init/patch_commits'); 15 | 16 | log = require('printit')({ 17 | prefix: 'konnectors' 18 | }); 19 | 20 | process.env.TZ = 'UTC'; 21 | 22 | params = { 23 | name: 'konnectors', 24 | port: process.env.PORT || 9358, 25 | host: process.env.HOST || '127.0.0.1', 26 | root: __dirname 27 | }; 28 | 29 | application = module.exports = function(callback) { 30 | return americano.start(params, function(err, app, server) { 31 | var hash, realtime; 32 | realtime = RealtimeAdapter(server, ['konnector.update', 'folder.*']); 33 | localization.initialize(function() { 34 | return initKonnectors(function() { 35 | poller.start(); 36 | log.info('Import poller started.'); 37 | if (callback != null) { 38 | return callback(app, server); 39 | } 40 | }); 41 | }); 42 | try { 43 | hash = "." + (require('./assets').hash); 44 | } catch (error) { 45 | hash = ''; 46 | } 47 | return app.locals.hash = hash; 48 | }); 49 | }; 50 | 51 | if (!module.parent) { 52 | application(); 53 | } 54 | -------------------------------------------------------------------------------- /build/server/config.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var americano, config, getTemplateExt, path; 3 | 4 | path = require('path'); 5 | 6 | americano = require('americano'); 7 | 8 | getTemplateExt = require('./lib/get_template_ext'); 9 | 10 | config = { 11 | common: { 12 | set: { 13 | 'view engine': getTemplateExt(), 14 | 'views': path.resolve(__dirname, 'views') 15 | }, 16 | engine: { 17 | js: function(path, locales, callback) { 18 | return callback(null, require(path)(locales)); 19 | } 20 | }, 21 | use: [ 22 | americano.bodyParser(), americano.methodOverride(), americano.errorHandler({ 23 | dumpExceptions: true, 24 | showStack: true 25 | }), americano["static"](path.join(__dirname, '..', 'client', 'public')) 26 | ] 27 | }, 28 | development: [americano.logger('dev')], 29 | production: [americano.logger('short')], 30 | plugins: ['cozydb'] 31 | }; 32 | 33 | module.exports = config; 34 | -------------------------------------------------------------------------------- /build/server/config/appConfig.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var config; 3 | 4 | config = { 5 | authorizedCategories: ['telecom', 'isp', 'energy', 'host_provider', 'productivity', 'health', 'social', 'transport'] 6 | }; 7 | 8 | module.exports = config; 9 | -------------------------------------------------------------------------------- /build/server/controllers/folders.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Folder; 3 | 4 | Folder = require('../models/folder'); 5 | 6 | module.exports = { 7 | all: function(req, res, next) { 8 | return Folder.all(function(err, folders) { 9 | if (err) { 10 | return next(err); 11 | } else { 12 | return res.send(folders); 13 | } 14 | }); 15 | }, 16 | show: function(req, res, next) { 17 | var id; 18 | id = req.params.folderId; 19 | return Folder.find(id, function(err, folder) { 20 | if (err) { 21 | return next(err); 22 | } else if (folder === null) { 23 | return res.sendStatus(404); 24 | } else { 25 | return res.send(folder); 26 | } 27 | }); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /build/server/controllers/index.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var CozyInstance, Folder, Konnector, User, async; 3 | 4 | async = require('async'); 5 | 6 | User = require('../models/user'); 7 | 8 | Konnector = require('../models/konnector'); 9 | 10 | Folder = require('../models/folder'); 11 | 12 | CozyInstance = require('../models/cozy_instance'); 13 | 14 | module.exports.main = function(req, res) { 15 | return async.series({ 16 | konnectors: Konnector.getKonnectorsToDisplay, 17 | instance: CozyInstance.first, 18 | folders: Folder.all, 19 | user: User.first 20 | }, function(err, results) { 21 | var folders, instance, konnectors; 22 | if (err != null) { 23 | console.log(err); 24 | } 25 | konnectors = results.konnectors, instance = results.instance, folders = results.folders; 26 | return res.render('index', { 27 | locale: (instance != null ? instance.locale : void 0) || 'en', 28 | imports: { 29 | konnectors: konnectors, 30 | folders: folders, 31 | context: 'cozy' 32 | } 33 | }); 34 | }); 35 | }; 36 | -------------------------------------------------------------------------------- /build/server/controllers/routes.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var folders, index, konnectors; 3 | 4 | konnectors = require('./konnectors'); 5 | 6 | folders = require('./folders'); 7 | 8 | index = require('./index'); 9 | 10 | module.exports = { 11 | '': { 12 | get: index.main 13 | }, 14 | 'konnectorId': { 15 | param: konnectors.getKonnector 16 | }, 17 | 'konnectors/:konnectorId': { 18 | get: konnectors.show, 19 | put: konnectors.update, 20 | "delete": konnectors.remove 21 | }, 22 | 'konnectors/:konnectorId/import': { 23 | post: konnectors["import"] 24 | }, 25 | 'konnectors/:konnectorId/:accountId/redirect': { 26 | get: konnectors.redirect 27 | }, 28 | 'folders': { 29 | get: folders.all 30 | }, 31 | 'folders/:folderId': { 32 | get: folders.show 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /build/server/konnectors/kimsufi_ca.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var api, baseOVHKonnector, category, color, connector, link, name, slug; 3 | 4 | baseOVHKonnector = require('../lib/base_ovh_konnector'); 5 | 6 | name = 'Kimsufi CA'; 7 | 8 | slug = 'kimsufi_ca'; 9 | 10 | link = 'kimsufi.com'; 11 | 12 | category = 'host_provider'; 13 | 14 | color = { 15 | hex: '#3E669C', 16 | css: '#3E669C' 17 | }; 18 | 19 | api = { 20 | endpoint: 'kimsufi-ca', 21 | appKey: '', 22 | appSecret: '' 23 | }; 24 | 25 | connector = module.exports = baseOVHKonnector.createNew(api, name, slug, link, category, color); 26 | -------------------------------------------------------------------------------- /build/server/konnectors/kimsufi_eu.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var api, baseOVHKonnector, category, color, connector, link, name, slug; 3 | 4 | baseOVHKonnector = require('../lib/base_ovh_konnector'); 5 | 6 | name = 'Kimsufi EU'; 7 | 8 | slug = 'kimsufi_eu'; 9 | 10 | link = 'kimsufi.com'; 11 | 12 | category = 'host_provider'; 13 | 14 | color = { 15 | hex: '#3E669C', 16 | css: '#3E669C' 17 | }; 18 | 19 | api = { 20 | endpoint: 'kimsufi-eu', 21 | appKey: '00Q53g7zU6ktWgNP', 22 | appSecret: '4KJTPUU43lhrxQ2XFGgG3FJSVDuVkC3P' 23 | }; 24 | 25 | connector = module.exports = baseOVHKonnector.createNew(api, name, slug, link, category, color); 26 | -------------------------------------------------------------------------------- /build/server/konnectors/ovh_ca.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var api, baseOVHKonnector, category, color, connector, link, name, slug; 3 | 4 | baseOVHKonnector = require('../lib/base_ovh_konnector'); 5 | 6 | name = 'OVH CA'; 7 | 8 | slug = 'ovh_ca'; 9 | 10 | link = 'ovh.com'; 11 | 12 | category = 'host_provider'; 13 | 14 | color = { 15 | hex: '#264670', 16 | css: '#264670' 17 | }; 18 | 19 | api = { 20 | endpoint: 'ovh-ca', 21 | appKey: '', 22 | appSecret: '' 23 | }; 24 | 25 | connector = module.exports = baseOVHKonnector.createNew(api, name, slug, link, category, color); 26 | -------------------------------------------------------------------------------- /build/server/konnectors/ovh_eu.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var api, baseOVHKonnector, category, color, connector, link, name, slug; 3 | 4 | baseOVHKonnector = require('../lib/base_ovh_konnector'); 5 | 6 | name = 'OVH EU'; 7 | 8 | slug = 'ovh_eu'; 9 | 10 | link = 'ovh.com'; 11 | 12 | category = 'host_provider'; 13 | 14 | color = { 15 | hex: '#264670', 16 | css: '#264670' 17 | }; 18 | 19 | api = { 20 | endpoint: 'ovh-eu', 21 | appKey: 'aAPF1nke1brRoK5H', 22 | appSecret: 'tVLYsO69677lcUksuXgV3dfegY68R6s9' 23 | }; 24 | 25 | connector = module.exports = baseOVHKonnector.createNew(api, name, slug, link, category, color); 26 | -------------------------------------------------------------------------------- /build/server/konnectors/runabove.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var api, baseOVHKonnector, category, color, connector, link, name, slug; 3 | 4 | baseOVHKonnector = require('../lib/base_ovh_konnector'); 5 | 6 | name = 'Runabove'; 7 | 8 | slug = 'runabove'; 9 | 10 | link = 'runabove.com'; 11 | 12 | category = 'host_provider'; 13 | 14 | color = { 15 | hex: '#E84425', 16 | css: '#E84425' 17 | }; 18 | 19 | api = { 20 | endpoint: 'runabove-ca', 21 | appKey: '6flmchEj8cORJnv9', 22 | appSecret: '6CzGLAmbfsFfrIIscN7QCgEQd3ka7t90' 23 | }; 24 | 25 | connector = module.exports = baseOVHKonnector.createNew(api, name, slug, link, category, color); 26 | -------------------------------------------------------------------------------- /build/server/konnectors/soyoustart_ca.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var api, baseOVHKonnector, category, color, connector, link, name, slug; 3 | 4 | baseOVHKonnector = require('../lib/base_ovh_konnector'); 5 | 6 | name = 'SoYouStart CA'; 7 | 8 | slug = 'soyoustart_ca'; 9 | 10 | link = 'www.soyoustart.com'; 11 | 12 | category = 'host_provider'; 13 | 14 | color = { 15 | hex: '#9DC51C', 16 | css: '#9DC51C' 17 | }; 18 | 19 | api = { 20 | endpoint: 'soyoustart-ca', 21 | appKey: '', 22 | appSecret: '' 23 | }; 24 | 25 | connector = module.exports = baseOVHKonnector.createNew(api, name, slug, link, category, color); 26 | -------------------------------------------------------------------------------- /build/server/konnectors/soyoustart_eu.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var api, baseOVHKonnector, category, color, connector, link, name, slug; 3 | 4 | baseOVHKonnector = require('../lib/base_ovh_konnector'); 5 | 6 | name = 'SoYouStart EU'; 7 | 8 | slug = 'soyoustart_eu'; 9 | 10 | link = 'www.soyoustart.com'; 11 | 12 | category = 'host_provider'; 13 | 14 | color = { 15 | hex: '#9DC51C', 16 | css: '#9DC51C' 17 | }; 18 | 19 | api = { 20 | endpoint: 'soyoustart-eu', 21 | appKey: 'kuioqDT4j2Ouse1e', 22 | appSecret: '3q7hbodiQCVA5qze3ZLtA1qFlOemNJjP' 23 | }; 24 | 25 | connector = module.exports = baseOVHKonnector.createNew(api, name, slug, link, category, color); 26 | -------------------------------------------------------------------------------- /build/server/lib/base_konnector.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var _ = require('lodash'); 4 | var printit = require('printit'); 5 | var slugify = require('cozy-slug'); 6 | var fetcher = require('./fetcher'); 7 | 8 | module.exports = { 9 | 10 | /* 11 | * Add common features to given konnector: 12 | * 13 | * * build its slug. 14 | * * build description translation key based on slug. 15 | * * add a dedicated logger. 16 | * * Change the array model to object (dirty hack to ensure backward 17 | * compatibility). 18 | * * Add a default fetch function that runs operations set at konnector 19 | * level. 20 | */ 21 | createNew: function createNew(konnector) { 22 | var slug = slugify(konnector.slug || konnector.name); 23 | slug = slug.replace(/(-|\.)/g, '_'); 24 | 25 | var logger = printit({ 26 | prefix: konnector.name, 27 | date: true 28 | }); 29 | 30 | var modelsObj = {}; 31 | konnector.models.forEach(function (model) { 32 | modelsObj[model.displayName.toLowerCase()] = model; 33 | }); 34 | 35 | return _.assignIn(konnector, { 36 | slug: slug, 37 | description: 'konnector description ' + slug, 38 | logger: logger, 39 | models: modelsObj, 40 | 41 | fetch: function fetch(requiredFields, callback) { 42 | var importer = fetcher.new(); 43 | konnector.fetchOperations.forEach(function (operation) { 44 | importer.use(operation); 45 | }); 46 | importer.args(requiredFields, {}, {}); 47 | importer.fetch(function (err, fields, entries) { 48 | if (err) { 49 | konnector.logger.error('Import failed.'); 50 | callback(err); 51 | } else { 52 | konnector.logger.info('Import succeeded.'); 53 | callback(null, entries.notifContent); 54 | } 55 | }); 56 | } 57 | 58 | }); 59 | } 60 | }; -------------------------------------------------------------------------------- /build/server/lib/base_ovh_konnector.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Bill, baseKonnector, filterExisting, linkBankOperation, ovhFetcher, saveDataAndFile; 3 | 4 | ovhFetcher = require('../lib/ovh_fetcher'); 5 | 6 | filterExisting = require('../lib/filter_existing'); 7 | 8 | saveDataAndFile = require('../lib/save_data_and_file'); 9 | 10 | linkBankOperation = require('../lib/link_bank_operation'); 11 | 12 | baseKonnector = require('../lib/base_konnector'); 13 | 14 | Bill = require('../models/bill'); 15 | 16 | module.exports = { 17 | createNew: function(ovhApi, name, slug, vendorLink, category, color) { 18 | var connector, fetchBills, fileOptions, logger, ovhFetcherInstance; 19 | fileOptions = { 20 | vendor: slug, 21 | dateFormat: 'YYYYMMDD' 22 | }; 23 | logger = require('printit')({ 24 | prefix: name, 25 | date: true 26 | }); 27 | ovhFetcherInstance = ovhFetcher["new"](ovhApi, slug, logger); 28 | fetchBills = function(requiredFields, entries, body, next) { 29 | return ovhFetcherInstance.fetchBills(requiredFields, entries, body, next); 30 | }; 31 | return connector = baseKonnector.createNew({ 32 | name: name, 33 | vendorLink: vendorLink, 34 | category: category, 35 | color: color, 36 | fields: { 37 | loginUrl: { 38 | type: "text" 39 | }, 40 | token: { 41 | type: "hidden" 42 | }, 43 | folderPath: { 44 | type: "folder", 45 | advanced: true 46 | } 47 | }, 48 | dataType: ['bill'], 49 | models: [Bill], 50 | fetchOperations: [ 51 | fetchBills, filterExisting(logger, Bill), saveDataAndFile(logger, Bill, fileOptions, ['bill']), linkBankOperation({ 52 | log: logger, 53 | model: Bill, 54 | identifier: slug, 55 | dateDelta: 4, 56 | amountDelta: 0.1 57 | }) 58 | ] 59 | }); 60 | } 61 | }; 62 | -------------------------------------------------------------------------------- /build/server/lib/fetcher.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Fetcher, ware; 3 | 4 | ware = require('ware'); 5 | 6 | Fetcher = (function() { 7 | function Fetcher() { 8 | this.ware = ware(); 9 | } 10 | 11 | Fetcher.prototype.args = function() { 12 | this.args = arguments; 13 | return this; 14 | }; 15 | 16 | Fetcher.prototype.use = function(operation) { 17 | this.ware.use(operation); 18 | return this; 19 | }; 20 | 21 | Fetcher.prototype.fetch = function(callback) { 22 | var args; 23 | args = [].slice.call(this.args); 24 | args.push(callback); 25 | return this.ware.run.apply(this.ware, args); 26 | }; 27 | 28 | Fetcher.prototype.getLayers = function() { 29 | return this.ware.fns; 30 | }; 31 | 32 | return Fetcher; 33 | 34 | })(); 35 | 36 | module.exports = { 37 | "new": function() { 38 | return new Fetcher; 39 | } 40 | }; 41 | -------------------------------------------------------------------------------- /build/server/lib/filter_existing.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | module.exports = function(log, model, suffix, vendor) { 3 | return function(requiredFields, entries, body, next) { 4 | entries.filtered = []; 5 | if ((vendor == null) && entries.fetched.length > 0) { 6 | vendor = entries.fetched[0].vendor; 7 | } 8 | return model.all(function(err, entryObjects) { 9 | var entry, entryHash, hash, i, len; 10 | if (err) { 11 | return next(err); 12 | } 13 | entryHash = {}; 14 | for (i = 0, len = entryObjects.length; i < len; i++) { 15 | entry = entryObjects[i]; 16 | if (vendor != null) { 17 | if (entry.vendor === vendor) { 18 | hash = (entry.date.format('YYYY-MM-DD')) + "T00:00:00.000Z"; 19 | entryHash[hash] = entry; 20 | } 21 | } else { 22 | hash = (entry.date.format('YYYY-MM-DD')) + "T00:00:00.000Z"; 23 | entryHash[hash] = entry; 24 | } 25 | } 26 | entries.filtered = entries.fetched.filter(function(entry) { 27 | hash = (entry.date.format('YYYY-MM-DD')) + "T00:00:00.000Z"; 28 | return entryHash[hash] == null; 29 | }); 30 | entries.filtered = entries.filtered.filter(function(entry) { 31 | return entry.vendor === vendor; 32 | }); 33 | return next(); 34 | }); 35 | }; 36 | }; 37 | -------------------------------------------------------------------------------- /build/server/lib/get_template_ext.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var fs, path; 3 | 4 | fs = require('fs'); 5 | 6 | path = require('path'); 7 | 8 | module.exports = function() { 9 | var ext, filePath; 10 | filePath = path.resolve(__dirname, '..', 'views', 'index.js'); 11 | if (fs.existsSync(filePath)) { 12 | ext = 'js'; 13 | } else { 14 | ext = 'pug'; 15 | } 16 | return ext; 17 | }; 18 | -------------------------------------------------------------------------------- /build/server/lib/importer.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Konnector, async, handleNotification, localization, log, path; 3 | 4 | async = require('async'); 5 | 6 | handleNotification = require('./notification_handler'); 7 | 8 | log = require('printit')({ 9 | prefix: null, 10 | date: true 11 | }); 12 | 13 | path = require('path'); 14 | 15 | Konnector = require('../models/konnector'); 16 | 17 | localization = require('./localization_manager'); 18 | 19 | module.exports = function(konnector, callback) { 20 | var model, ref; 21 | if (((ref = konnector.accounts) != null ? ref.length : void 0) > 0 && konnector.isImporting === false) { 22 | log.info("Run import for " + konnector.slug + "."); 23 | model = require(path.join('..', 'konnectors', konnector.slug)); 24 | if (model["default"] != null) { 25 | model = model["default"]; 26 | } 27 | return konnector["import"](function(err, notifContents) { 28 | var data, localizationKey; 29 | if ((err != null) && ((typeof err === 'object' && Object.keys(err).length > 0) || typeof err === String)) { 30 | log.error(err); 31 | localizationKey = 'notification import error'; 32 | notifContents = [ 33 | localization.t(localizationKey), { 34 | name: model.name 35 | } 36 | ]; 37 | } 38 | handleNotification(konnector, notifContents); 39 | data = { 40 | lastAutoImport: new Date() 41 | }; 42 | return konnector.updateAttributes(data, function(err) { 43 | if (err != null) { 44 | log.error(err); 45 | } 46 | return typeof callback === "function" ? callback() : void 0; 47 | }); 48 | }); 49 | } else { 50 | log.info("Connector " + konnector.slug + " is already importing."); 51 | return typeof callback === "function" ? callback() : void 0; 52 | } 53 | }; 54 | -------------------------------------------------------------------------------- /build/server/lib/konnector_hash.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var currentPath, fs, getKonnectorModules, isCoffeeOrJsFile, modulesPath, path; 3 | 4 | fs = require('fs'); 5 | 6 | path = require('path'); 7 | 8 | currentPath = path.dirname(fs.realpathSync(__filename)); 9 | 10 | modulesPath = path.join(currentPath, '..', 'konnectors'); 11 | 12 | isCoffeeOrJsFile = function(fileName) { 13 | var extension, firstChar; 14 | extension = fileName.split('.')[1]; 15 | firstChar = fileName[0]; 16 | return firstChar !== '.' && (extension === 'coffee' || extension === 'js'); 17 | }; 18 | 19 | getKonnectorModules = function() { 20 | var i, len, moduleFile, moduleFiles, modulePath, modules, name; 21 | modules = {}; 22 | moduleFiles = fs.readdirSync(modulesPath); 23 | for (i = 0, len = moduleFiles.length; i < len; i++) { 24 | moduleFile = moduleFiles[i]; 25 | if (fs.lstatSync(path.join(modulesPath, moduleFile)).isDirectory() || isCoffeeOrJsFile(moduleFile)) { 26 | name = moduleFile.split('.')[0]; 27 | modulePath = path.join(modulesPath, name); 28 | modules[name] = require(modulePath); 29 | if (modules[name]["default"] != null) { 30 | modules[name] = modules[name]["default"]; 31 | } 32 | } 33 | } 34 | return modules; 35 | }; 36 | 37 | module.exports = getKonnectorModules(); 38 | -------------------------------------------------------------------------------- /build/server/lib/naming.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | module.exports = { 3 | getEntryFileName: function(entry, options) { 4 | var date, extension, i, len, name, parameter, ref; 5 | name = ""; 6 | date = entry.date; 7 | if (date && (typeof options === "string")) { 8 | name = (date.format('YYYYMM')) + "_" + options + ".pdf"; 9 | } else { 10 | if (date) { 11 | if (options.dateFormat != null) { 12 | name = date.format(options.dateFormat); 13 | } else { 14 | name = date.format('YYYYMM'); 15 | } 16 | } 17 | name += "_" + options.vendor; 18 | if (options.others != null) { 19 | ref = options.others; 20 | for (i = 0, len = ref.length; i < len; i++) { 21 | parameter = ref[i]; 22 | if (entry[parameter] != null) { 23 | name += "_" + entry[parameter]; 24 | } 25 | } 26 | } 27 | extension = options.extension || 'pdf'; 28 | name = name + "." + extension; 29 | } 30 | return name; 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /build/server/lib/notification_handler.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var NotificationHelper, konnectorHash, localization, log, notification, slugify; 3 | 4 | konnectorHash = require('../lib/konnector_hash'); 5 | 6 | localization = require('../lib/localization_manager'); 7 | 8 | NotificationHelper = require('cozy-notifications-helper'); 9 | 10 | notification = new NotificationHelper('konnectors'); 11 | 12 | slugify = require('cozy-slug'); 13 | 14 | log = require('printit')({ 15 | prefix: null, 16 | date: true 17 | }); 18 | 19 | module.exports = function(konnector, notifContents) { 20 | var credential, i, index, len, model, notifContent, notificationSlug, prefix, ref, results; 21 | model = konnectorHash[konnector.slug]; 22 | prefix = localization.t('notification prefix', { 23 | name: model.name 24 | }); 25 | results = []; 26 | for (index in notifContents) { 27 | notificationSlug = konnector.slug; 28 | ref = konnector.accounts[index]; 29 | for (i = 0, len = ref.length; i < len; i++) { 30 | credential = ref[i]; 31 | notificationSlug += "_" + (slugify(credential)); 32 | } 33 | notifContent = notifContents[index]; 34 | if ((notifContent != null) && typeof notifContent === 'string') { 35 | results.push(notification.createOrUpdatePersistent(notificationSlug, { 36 | app: 'konnectors', 37 | text: prefix + " " + notifContent, 38 | resource: { 39 | app: 'konnectors', 40 | url: "konnector/" + konnector.slug 41 | } 42 | }, function(err) { 43 | if (err != null) { 44 | return log.error(err); 45 | } 46 | })); 47 | } else { 48 | results.push(notification.destroy(notificationSlug, function(err) { 49 | if (err != null) { 50 | return log.error(err); 51 | } 52 | })); 53 | } 54 | } 55 | return results; 56 | }; 57 | -------------------------------------------------------------------------------- /build/server/lib/update_or_create.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* Update or create each document in the entries[model.displayName] Array. 4 | Document are updated if one document in base, with the same value for the 5 | fields specified in filter param is in database. 6 | @param log a pirntit conpatible logger. 7 | @param model a cozydb DocType model 8 | @param filter a list of field to look at to find similar 9 | @param options to be used later. 10 | */ 11 | 12 | var async = require('async'); 13 | 14 | module.exports = function (log, model, filter, options) { 15 | return function (requiredFields, entries, data, next) { 16 | var modelName = model.displayName.toLowerCase() + 's'; 17 | 18 | var news = entries[modelName]; 19 | if (!news || news.length === 0) { 20 | log.debug('No ' + modelName + ' to save.'); 21 | next(); 22 | } 23 | 24 | data.updated = data.updated || {}; 25 | data.created = data.created || {}; 26 | 27 | data.updated[modelName] = 0; 28 | data.created[modelName] = 0; 29 | 30 | model.all(function (err, docs) { 31 | if (err) { 32 | return next(err); 33 | }; 34 | 35 | async.eachSeries(news, function (entry, cb) { 36 | var toUpdate = docs.find(function (doc) { 37 | return filter.reduce(function (good, k) { 38 | return good && doc[k] === entry[k]; 39 | }, true); 40 | }); 41 | 42 | if (toUpdate) { 43 | data.updated[modelName]++; 44 | toUpdate.updateAttributes(entry, cb); 45 | } else { 46 | data.created[modelName]++; 47 | model.create(entry, cb); 48 | } 49 | }, next); 50 | }); 51 | }; 52 | }; -------------------------------------------------------------------------------- /build/server/models/bankoperation.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var BankOperation, File, americano; 3 | 4 | americano = require('cozydb'); 5 | 6 | File = require('../models/file'); 7 | 8 | module.exports = BankOperation = americano.getModel('bankoperation', { 9 | bankAccount: String, 10 | title: String, 11 | date: Date, 12 | amount: Number, 13 | raw: String, 14 | dateImport: Date, 15 | categoryId: String, 16 | binary: Object 17 | }); 18 | 19 | BankOperation.all = function(params, callback) { 20 | return BankOperation.request("byDate", params, callback); 21 | }; 22 | 23 | BankOperation.prototype.setBinaryFromFile = function(fileId, callback) { 24 | return File.find(fileId, (function(_this) { 25 | return function(err, file) { 26 | var attributes, ref; 27 | if (err) { 28 | return callback(err); 29 | } 30 | if ((file != null ? (ref = file.binary) != null ? ref.file : void 0 : void 0) != null) { 31 | attributes = { 32 | binary: { 33 | file: file.binary.file, 34 | fileName: file.name, 35 | fileMime: file.mime 36 | } 37 | }; 38 | return _this.updateAttributes(attributes, function(err) { 39 | if (err) { 40 | return callback(err); 41 | } 42 | _this.binary = { 43 | file: file.binary.file, 44 | fileName: file.name, 45 | fileMime: file.mime 46 | }; 47 | return callback(); 48 | }); 49 | } else { 50 | return callback(new Error("No binary for this file " + fileId)); 51 | } 52 | }; 53 | })(this)); 54 | }; 55 | -------------------------------------------------------------------------------- /build/server/models/bill.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Bill, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = Bill = cozydb.getModel('Bill', { 7 | type: String, 8 | subtype: String, 9 | date: Date, 10 | vendor: String, 11 | amount: Number, 12 | plan: String, 13 | pdfurl: String, 14 | binaryId: String, 15 | fileId: String, 16 | content: String, 17 | isRefund: Boolean, 18 | clientId: String, 19 | number: String, 20 | docTypeVersion: String 21 | }); 22 | 23 | Bill.all = function(callback) { 24 | return Bill.request('byDate', callback); 25 | }; 26 | -------------------------------------------------------------------------------- /build/server/models/binary.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Binary, americano; 3 | 4 | americano = require('cozydb'); 5 | 6 | module.exports = Binary = americano.getModel('Binary', {}); 7 | -------------------------------------------------------------------------------- /build/server/models/client.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Client, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = Client = cozydb.getModel('Client', { 7 | clientId: String, 8 | vendor: String, 9 | numeroAcc: String, 10 | address: Object, 11 | name: Object, 12 | email: String, 13 | cellPhone: String, 14 | homePhone: String, 15 | loginEmail: String, 16 | coHolder: Object, 17 | commercialContact: Object, 18 | docTypeVersion: String 19 | }); 20 | -------------------------------------------------------------------------------- /build/server/models/commit.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Commit, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = Commit = cozydb.getModel('Commit', { 7 | date: Date, 8 | sha: String, 9 | parent: String, 10 | tree: String, 11 | url: String, 12 | author: String, 13 | email: String, 14 | message: String, 15 | additions: Number, 16 | deletions: Number, 17 | files: Object, 18 | vendor: { 19 | type: String, 20 | "default": 'Github' 21 | } 22 | }); 23 | 24 | Commit.all = function(params, callback) { 25 | return Commit.request('byDate', params, callback); 26 | }; 27 | -------------------------------------------------------------------------------- /build/server/models/consumptionstatement.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var ConsumptionStatement, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = ConsumptionStatement = cozydb.getModel('ConsumptionStatement', { 7 | contractNumber: String, 8 | billNumber: String, 9 | start: String, 10 | end: String, 11 | value: Number, 12 | statementType: String, 13 | statementCategory: String, 14 | statementReason: String, 15 | period: String, 16 | cost: Number, 17 | costsByCategory: Object, 18 | valuesByCatergory: Object, 19 | similarHomes: Object, 20 | statements: [Object], 21 | docTypeVersion: String 22 | }); 23 | -------------------------------------------------------------------------------- /build/server/models/contract.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Contract, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = Contract = cozydb.getModel('Contract', { 7 | clientId: String, 8 | vendor: String, 9 | number: String, 10 | name: String, 11 | start: String, 12 | end: String, 13 | status: String, 14 | terminationGrounds: String, 15 | services: [Object], 16 | pdl: String, 17 | energie: String, 18 | troubleshootingPhone: String, 19 | power: String, 20 | contractSubcategory1: String, 21 | contractSubcategory2: String, 22 | counter: Object, 23 | annualConsumption: Number, 24 | peakHours: String, 25 | statement: Object, 26 | docTypeVersion: String 27 | }); 28 | -------------------------------------------------------------------------------- /build/server/models/cozy_instance.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var CozyInstance, americano; 3 | 4 | americano = require('cozydb'); 5 | 6 | module.exports = CozyInstance = americano.getModel('CozyInstance', { 7 | id: String, 8 | domain: String, 9 | locale: String, 10 | connectedOnce: Boolean, 11 | background: String 12 | }); 13 | 14 | CozyInstance.first = function(callback) { 15 | return CozyInstance.request('all', function(err, instances) { 16 | if (err) { 17 | return callback(err); 18 | } else if (!instances || instances.length === 0) { 19 | return callback(null, null); 20 | } else { 21 | return callback(null, instances[0]); 22 | } 23 | }); 24 | }; 25 | 26 | CozyInstance.getLocale = function(callback) { 27 | return CozyInstance.request('all', function(err, instances) { 28 | var ref; 29 | if (err) { 30 | console.log(err); 31 | } 32 | return callback(null, (instances != null ? (ref = instances[0]) != null ? ref.locale : void 0 : void 0) || 'en'); 33 | }); 34 | }; 35 | 36 | CozyInstance.getURL = function(callback) { 37 | return CozyInstance.first(function(err, instance) { 38 | var url; 39 | if (err) { 40 | return callback(err); 41 | } else if (instance != null ? instance.domain : void 0) { 42 | url = instance.domain.replace('http://', '').replace('https://', ''); 43 | return callback(null, "https://" + url + "/"); 44 | } else { 45 | return callback(new Error('No instance domain set')); 46 | } 47 | }); 48 | }; 49 | -------------------------------------------------------------------------------- /build/server/models/edf/bill.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var EDFBill, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = EDFBill = cozydb.getModel('Bill', { 7 | type: String, 8 | subtype: String, 9 | date: Date, 10 | vendor: String, 11 | amount: Number, 12 | plan: String, 13 | pdfurl: String, 14 | binaryId: String, 15 | fileId: String, 16 | content: String, 17 | isRefund: Boolean, 18 | clientId: String, 19 | number: String, 20 | docTypeVersion: String 21 | }); 22 | 23 | EDFBill.all = function(callback) { 24 | return EDFBill.request('byDate', callback); 25 | }; 26 | -------------------------------------------------------------------------------- /build/server/models/edf/client.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var EDFClient, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = EDFClient = cozydb.getModel('Client', { 7 | clientId: String, 8 | vendor: String, 9 | numeroAcc: String, 10 | address: Object, 11 | name: Object, 12 | email: String, 13 | cellPhone: String, 14 | homePhone: String, 15 | loginEmail: String, 16 | coHolder: Object, 17 | commercialContact: Object, 18 | docTypeVersion: String 19 | }); 20 | -------------------------------------------------------------------------------- /build/server/models/edf/consumption_statement.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var EDFConsumptionStatement, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = EDFConsumptionStatement = cozydb.getModel('ConsumptionStatement', { 7 | contractNumber: String, 8 | billNumber: String, 9 | start: String, 10 | end: String, 11 | value: Number, 12 | statementType: String, 13 | statementCategory: String, 14 | statementReason: String, 15 | period: String, 16 | cost: Number, 17 | costsByCategory: Object, 18 | valuesByCatergory: Object, 19 | similarHomes: Object, 20 | statements: [Object], 21 | docTypeVersion: String 22 | }); 23 | -------------------------------------------------------------------------------- /build/server/models/edf/contract.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var EDFContract, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = EDFContract = cozydb.getModel('Contract', { 7 | clientId: String, 8 | vendor: String, 9 | number: String, 10 | name: String, 11 | start: String, 12 | end: String, 13 | status: String, 14 | terminationGrounds: String, 15 | services: [Object], 16 | pdl: String, 17 | energie: String, 18 | troubleshootingPhone: String, 19 | power: String, 20 | contractSubcategory1: String, 21 | contractSubcategory2: String, 22 | counter: Object, 23 | annualConsumption: Number, 24 | peakHours: String, 25 | statement: Object, 26 | docTypeVersion: String 27 | }); 28 | -------------------------------------------------------------------------------- /build/server/models/edf/home.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var EDFHome, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = EDFHome = cozydb.getModel('Home', { 7 | pdl: String, 8 | beginTs: String, 9 | isProfileValidated: Boolean, 10 | housingType: String, 11 | residenceType: String, 12 | occupationType: String, 13 | constructionDate: String, 14 | isBBC: Boolean, 15 | surface: Number, 16 | occupantsCount: Number, 17 | principalHeatingSystemType: String, 18 | sanitoryHotWaterType: String, 19 | docTypeVersion: String 20 | }); 21 | -------------------------------------------------------------------------------- /build/server/models/edf/payment_terms.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var EDFPaymentTerms, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = EDFPaymentTerms = cozydb.getModel('PaymentTerms', { 7 | vendor: String, 8 | clientId: String, 9 | encryptedBankDetails: String, 10 | balance: Number, 11 | paymentMeans: String, 12 | lastPayment: Object, 13 | billFrequency: String, 14 | nextBillDate: String, 15 | paymentSchedules: [Object], 16 | modifBankDetailsAllowed: Boolean, 17 | idPayer: String, 18 | payerDivergent: Boolean, 19 | docTypeVersion: String 20 | }); 21 | -------------------------------------------------------------------------------- /build/server/models/geopoint.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = cozydb.getModel('GeoPoint', { 7 | docTypeVersion: String, 8 | msisdn: String, 9 | timestamp: String, 10 | latitude: Number, 11 | longitude: Number, 12 | radius: Number 13 | }); 14 | -------------------------------------------------------------------------------- /build/server/models/home.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Home, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = Home = cozydb.getModel('Home', { 7 | pdl: String, 8 | beginTs: String, 9 | isProfileValidated: Boolean, 10 | housingType: String, 11 | residenceType: String, 12 | occupationType: String, 13 | constructionDate: String, 14 | isBBC: Boolean, 15 | surface: Number, 16 | occupantsCount: Number, 17 | principalHeatingSystemType: String, 18 | sanitoryHotWaterType: String, 19 | docTypeVersion: String 20 | }); 21 | -------------------------------------------------------------------------------- /build/server/models/maif/user.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var MaifUser, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = MaifUser = cozydb.getModel('MaifUser', { 7 | password: String, 8 | profile: Object, 9 | date: String 10 | }); 11 | 12 | MaifUser.updateOrCreate = function(data, callback) { 13 | return MaifUser.first(function(err, maifUser) { 14 | if (maifUser) { 15 | return maifUser.updateAttributes(data, callback); 16 | } else { 17 | return MaifUser.create(data, callback); 18 | } 19 | }); 20 | }; 21 | -------------------------------------------------------------------------------- /build/server/models/maifuser.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var MaifUser, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = MaifUser = cozydb.getModel('MaifUser', { 7 | password: String, 8 | profile: Object, 9 | date: String 10 | }); 11 | 12 | MaifUser.updateOrCreate = function(data, callback) { 13 | return MaifUser.first(function(err, maifUser) { 14 | if (maifUser) { 15 | return maifUser.updateAttributes(data, callback); 16 | } else { 17 | return MaifUser.create(data, callback); 18 | } 19 | }); 20 | }; 21 | -------------------------------------------------------------------------------- /build/server/models/paymentterms.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var PaymentTerms, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = PaymentTerms = cozydb.getModel('PaymentTerms', { 7 | vendor: String, 8 | clientId: String, 9 | encryptedBankDetails: String, 10 | balance: Number, 11 | paymentMeans: String, 12 | lastPayment: Object, 13 | billFrequency: String, 14 | nextBillDate: String, 15 | paymentSchedules: [Object], 16 | modifBankDetailsAllowed: Boolean, 17 | idPayer: String, 18 | payerDivergent: Boolean, 19 | docTypeVersion: String 20 | }); 21 | -------------------------------------------------------------------------------- /build/server/models/phonecommunicationlog.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = cozydb.getModel('PhoneCommunicationLog', { 7 | docTypeVersion: String, 8 | timestamp: String, 9 | msisdn: String, 10 | partner: String, 11 | length: Number, 12 | chipType: String, 13 | type: String, 14 | latitude: Number, 15 | longitude: Number, 16 | networkType: String, 17 | endCause: String 18 | }); 19 | -------------------------------------------------------------------------------- /build/server/models/sleep.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Sleep, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = Sleep = cozydb.getModel('Sleep', { 7 | date: Date, 8 | asleepTime: Number, 9 | awakeDuration: Number, 10 | awakeTime: Number, 11 | awakeningCount: Number, 12 | bedTime: Number, 13 | deepSleepDuration: Number, 14 | lightSleepDuration: Number, 15 | sleepDuration: Number, 16 | sleepQuality: Number, 17 | vendor: { 18 | type: String 19 | } 20 | }); 21 | 22 | Sleep.all = function(callback) { 23 | return Sleep.request('byDate', callback); 24 | }; 25 | -------------------------------------------------------------------------------- /build/server/models/steps.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Steps, cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = Steps = cozydb.getModel('Steps', { 7 | date: Date, 8 | activeTime: Number, 9 | activeTimeCalories: Number, 10 | distance: Number, 11 | inactiveTime: Number, 12 | longestActiveTime: Number, 13 | longestIdleTime: Number, 14 | steps: Number, 15 | totalCalories: Number, 16 | vendor: { 17 | type: String 18 | } 19 | }); 20 | 21 | Steps.all = function(callback) { 22 | return Steps.request('byDate', callback); 23 | }; 24 | -------------------------------------------------------------------------------- /build/server/models/tag.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Tag, cozydb, log, 3 | extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, 4 | hasProp = {}.hasOwnProperty; 5 | 6 | cozydb = require('cozydb'); 7 | 8 | log = require('printit')({ 9 | prefix: 'tag:model' 10 | }); 11 | 12 | module.exports = Tag = (function(superClass) { 13 | extend(Tag, superClass); 14 | 15 | function Tag() { 16 | return Tag.__super__.constructor.apply(this, arguments); 17 | } 18 | 19 | Tag.schema = { 20 | name: { 21 | type: String 22 | }, 23 | color: { 24 | type: String 25 | } 26 | }; 27 | 28 | return Tag; 29 | 30 | })(cozydb.CozyModel); 31 | 32 | Tag.all = function(callback) { 33 | return Tag.request('byName', callback); 34 | }; 35 | 36 | Tag.byName = function(name, callback) { 37 | return Tag.request('byName', { 38 | key: name 39 | }, callback); 40 | }; 41 | 42 | Tag.getOrCreate = function(data, callback) { 43 | return Tag.byName(data.name, function(err, tags) { 44 | if (err) { 45 | log.error(err); 46 | return Tag.create(data, callback); 47 | } else if (tags.length === 0) { 48 | return Tag.create(data, callback); 49 | } else { 50 | return callback(null, tags[0]); 51 | } 52 | }); 53 | }; 54 | -------------------------------------------------------------------------------- /build/server/models/track.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var Track, americano, log; 3 | 4 | americano = require('cozydb'); 5 | 6 | log = require('printit')({ 7 | prefix: 'konnectors' 8 | }); 9 | 10 | Track = americano.getModel('Track', { 11 | metas: Object, 12 | ressource: Object, 13 | playlists: [String], 14 | dateAdded: Date, 15 | plays: Number, 16 | hidden: Boolean 17 | }); 18 | 19 | Track.createFromFile = function(trackName, fileID, callback) { 20 | var data; 21 | data = { 22 | metas: { 23 | title: trackName 24 | }, 25 | ressource: { 26 | type: 'file', 27 | fileID: fileID 28 | }, 29 | playlists: [], 30 | dateAdded: new Date(), 31 | plays: 0, 32 | hidden: false 33 | }; 34 | return Track.create(data, function(err, newTrack) { 35 | if (err) { 36 | log.error(err); 37 | return callback(err); 38 | } else { 39 | return callback(null); 40 | } 41 | }); 42 | }; 43 | 44 | module.exports = Track; 45 | -------------------------------------------------------------------------------- /build/server/models/user.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var User, americano, fixOnboardedSteps; 3 | 4 | americano = require('cozydb'); 5 | 6 | fixOnboardedSteps = function(user) { 7 | user.onboardedSteps = user.onboardedSteps || []; 8 | if (Array.isArray(user.onboardedSteps[0])) { 9 | user.onboardedSteps = user.onboardedSteps[0]; 10 | } 11 | return user; 12 | }; 13 | 14 | module.exports = User = americano.getModel('User', { 15 | onboardedSteps: Array 16 | }); 17 | 18 | User.first = function(callback) { 19 | return User.request('all', function(err, users) { 20 | var user; 21 | if (err) { 22 | return callback(err); 23 | } else if (!users || users.length === 0) { 24 | return callback(null, void 0); 25 | } else { 26 | user = fixOnboardedSteps(users[0]); 27 | return callback(null, user); 28 | } 29 | }); 30 | }; 31 | -------------------------------------------------------------------------------- /build/server/models/videostream.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.11.1 2 | var cozydb; 3 | 4 | cozydb = require('cozydb'); 5 | 6 | module.exports = cozydb.getModel('VideoStream', { 7 | docTypeVersion: String, 8 | timestamp: String, 9 | content: Object, 10 | price: Number, 11 | viewingDuration: Number, 12 | details: Object, 13 | action: String, 14 | clientId: String 15 | }); 16 | -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | # NPM packages folder. 2 | node_modules/ 3 | 4 | 5 | # Locales 6 | **/locales/* 7 | !**/locales/en.json 8 | 9 | 10 | # Default 11 | !.gitkeep 12 | -------------------------------------------------------------------------------- /client/app/assets/icons/aprr.svg: -------------------------------------------------------------------------------- 1 | aprr -------------------------------------------------------------------------------- /client/app/assets/icons/icon-check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /client/app/assets/icons/icon-warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /client/app/assets/icons/jawbone.svg: -------------------------------------------------------------------------------- 1 | jawbone -------------------------------------------------------------------------------- /client/app/assets/icons/linkedin.svg: -------------------------------------------------------------------------------- 1 | linkedin -------------------------------------------------------------------------------- /client/app/assets/icons/maif.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /client/app/assets/icons/nest.svg: -------------------------------------------------------------------------------- 1 | nest -------------------------------------------------------------------------------- /client/app/assets/icons/ovh_ca.svg: -------------------------------------------------------------------------------- 1 | ovh -------------------------------------------------------------------------------- /client/app/assets/icons/ovh_eu.svg: -------------------------------------------------------------------------------- 1 | ovh -------------------------------------------------------------------------------- /client/app/assets/icons/sfr_box.svg: -------------------------------------------------------------------------------- 1 | sfr -------------------------------------------------------------------------------- /client/app/assets/icons/sfr_mobile.svg: -------------------------------------------------------------------------------- 1 | sfr -------------------------------------------------------------------------------- /client/app/assets/icons/sncf.svg: -------------------------------------------------------------------------------- 1 | sncf -------------------------------------------------------------------------------- /client/app/assets/icons/sosh.svg: -------------------------------------------------------------------------------- 1 | sosh -------------------------------------------------------------------------------- /client/app/assets/icons/twitter.svg: -------------------------------------------------------------------------------- 1 | twitter -------------------------------------------------------------------------------- /client/app/assets/icons/uber.svg: -------------------------------------------------------------------------------- 1 | uber -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-activity.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-appointment.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-bill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-bloodPressure.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-category.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-check.svg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-commit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-connected.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-consumption.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-contact.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-contract.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-courseMaterial.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-discovery.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-event.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-eye-closed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-eye-open.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-heartbeat.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-podcast.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-refund.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-sleepTime.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-stepsNumber.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-temperature.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-travelDate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /client/app/assets/sprites/icon-weight.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/app/components/AccountLoginForm.jsx: -------------------------------------------------------------------------------- 1 | /** @jsx h */ 2 | import { h } from 'preact' 3 | 4 | import Field, { PasswordField, DropdownField, CheckboxField } from './Field' 5 | 6 | const AccountLoginForm = ({ t, customView, fields }) => ( 7 |