diff --git a/src/index.js b/src/index.js index 86e0d8a021e887998a4212d3c650367f8b04d50f..9a6fc252f5d07abf70d747b5d818ded9c325b965 100644 --- a/src/index.js +++ b/src/index.js @@ -25,12 +25,15 @@ const { rechercherPoint, commanderCollectePublicationMesures, commanderArretServiceSouscritMesures, - getInseeCode, +} = require('./requests/sge') +const { updateBoConsent, createBoConsent, getBoConsent, deleteBoConsent, -} = require('./request') +} = require('./requests/bo') +const { getInseeCode } = require('./requests/insee') + moment.locale('fr') // set the language moment.tz.setDefault('Europe/Paris') // set the timezone diff --git a/src/requests/bo.js b/src/requests/bo.js new file mode 100644 index 0000000000000000000000000000000000000000..53323c123d8891b0d6c9592486072ece1cec4cbf --- /dev/null +++ b/src/requests/bo.js @@ -0,0 +1,44 @@ +// @ts-check +const { log } = require('cozy-konnector-libs') + +/** + * + */ +function createBoConsent() { + //TODO: Implement + log('info', `Query createBoConsent`) + throw new Error('Function not implemented.') +} + +/** + * + */ +function updateBoConsent() { + //TODO: Implement + log('info', `Query updateBoConsent`) + throw new Error('Function not implemented.') +} + +/** + * + */ +function getBoConsent() { + //TODO: Implement + log('info', `Query getBoConsent`) + throw new Error('Function not implemented.') +} +/** + * + */ +function deleteBoConsent() { + //TODO: deleteBoConsent + log('info', `Query createBoConsent`) + throw new Error('Function not implemented.') +} + +module.exports = { + createBoConsent, + updateBoConsent, + getBoConsent, + deleteBoConsent, +} diff --git a/src/requests/insee.js b/src/requests/insee.js new file mode 100644 index 0000000000000000000000000000000000000000..fd34efe6d4f34fc63b7b74005fbe71ba1909e088 --- /dev/null +++ b/src/requests/insee.js @@ -0,0 +1,17 @@ +// @ts-check +const { log } = require('cozy-konnector-libs') + +/** + * Return inseeCode given a postalCode + * @param {string} postalCode + * @return {string} inseeCode + */ +function getInseeCode(postalCode) { + //TODO: Implement + log('info', `Query getInseeCode for postalCode ${postalCode}`) + throw new Error('Function not implemented.') +} + +module.exports = { + getInseeCode, +} diff --git a/src/request.js b/src/requests/sge.js similarity index 91% rename from src/request.js rename to src/requests/sge.js index b4e7f8f11e4b0a03d3562f90abec7a531f1d01a8..11032e09df0b2d9fa6cc541ec5f4aedb6c9afb0c 100644 --- a/src/request.js +++ b/src/requests/sge.js @@ -271,52 +271,6 @@ function commanderArretServiceSouscritMesures( </soapenv:Envelope>` } -/** - * Return inseeCode given a postalCode - * @param {string} postalCode - * @return {string} inseeCode - */ -function getInseeCode(postalCode) { - //TODO: Implement - log('info', `Query getInseeCode for postalCode ${postalCode}`) - throw new Error('Function not implemented.') -} - -/** - * - */ -function createBoConsent() { - //TODO: Implement - log('info', `Query createBoConsent`) - throw new Error('Function not implemented.') -} - -/** - * - */ -function updateBoConsent() { - //TODO: Implement - log('info', `Query updateBoConsent`) - throw new Error('Function not implemented.') -} - -/** - * - */ -function getBoConsent() { - //TODO: Implement - log('info', `Query getBoConsent`) - throw new Error('Function not implemented.') -} -/** - * - */ -function deleteBoConsent() { - //TODO: deleteBoConsent - log('info', `Query createBoConsent`) - throw new Error('Function not implemented.') -} - module.exports = { consulterDonneesTechniquesContractuelles, consultationMesuresDetailleesMaxPower, @@ -325,9 +279,4 @@ module.exports = { rechercherServicesSouscritsMesures, commanderCollectePublicationMesures, commanderArretServiceSouscritMesures, - getInseeCode, - createBoConsent, - updateBoConsent, - getBoConsent, - deleteBoConsent, }