Skip to content
Snippets Groups Projects
Commit 9aec6e2a authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

fix: logs

parent 1545e095
No related branches found
No related tags found
1 merge request!7Feat/rename endpoints
Pipeline #39567 passed
This commit is part of merge request !7. Comments created here will be created in the context of that merge request.
...@@ -5,8 +5,8 @@ const { log } = require('cozy-konnector-libs') ...@@ -5,8 +5,8 @@ const { log } = require('cozy-konnector-libs')
* Get daily data up to 36 months & P max * Get daily data up to 36 months & P max
* @param {number} pointId * @param {number} pointId
* @param {string} appLogin * @param {string} appLogin
* @param {string} startDt * @param {string} startDate
* @param {string} endDt * @param {string} endDate
* @param {'COURBE' | 'ENERGIE' | 'PMAX'} mesureType * @param {'COURBE' | 'ENERGIE' | 'PMAX'} mesureType
* @param {'EA' | 'PA' | 'PMA'} unit * @param {'EA' | 'PA' | 'PMA'} unit
* @returns {string} * @returns {string}
...@@ -14,14 +14,14 @@ const { log } = require('cozy-konnector-libs') ...@@ -14,14 +14,14 @@ const { log } = require('cozy-konnector-libs')
function consultationMesuresDetaillees( function consultationMesuresDetaillees(
pointId, pointId,
appLogin, appLogin,
startDt, startDate,
endDt, endDate,
mesureType = 'ENERGIE', mesureType = 'ENERGIE',
unit = 'EA' unit = 'EA'
) { ) {
log( log(
'info', 'info',
`Query consultationMesuresDetaillees - ${mesureType}/${unit} between ${startDt} and ${endDt}` `Query consultationMesuresDetaillees - ${mesureType}/${unit} between ${startDate} and ${endDate}`
) )
return `<?xml version='1.0' encoding='utf-8'?> return `<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
...@@ -37,8 +37,8 @@ function consultationMesuresDetaillees( ...@@ -37,8 +37,8 @@ function consultationMesuresDetaillees(
<grandeurPhysique>${unit}</grandeurPhysique> <grandeurPhysique>${unit}</grandeurPhysique>
<soutirage>true</soutirage> <soutirage>true</soutirage>
<injection>false</injection> <injection>false</injection>
<dateDebut>${startDt}</dateDebut> <dateDebut>${startDate}</dateDebut>
<dateFin>${endDt}</dateFin> <dateFin>${endDate}</dateFin>
<mesuresCorrigees>false</mesuresCorrigees> <mesuresCorrigees>false</mesuresCorrigees>
<accordClient>true</accordClient> <accordClient>true</accordClient>
</demande> </demande>
...@@ -52,8 +52,8 @@ function consultationMesuresDetaillees( ...@@ -52,8 +52,8 @@ function consultationMesuresDetaillees(
* Get user max power * Get user max power
* @param {number} pointId * @param {number} pointId
* @param {string} appLogin * @param {string} appLogin
* @param {string} startDt * @param {string} startDate
* @param {string} endDt * @param {string} endDate
* @param {'COURBE' | 'ENERGIE' | 'PMAX'} mesureType * @param {'COURBE' | 'ENERGIE' | 'PMAX'} mesureType
* @param {'EA' | 'PA' | 'PMA'} unit * @param {'EA' | 'PA' | 'PMA'} unit
* @returns {string} * @returns {string}
...@@ -61,14 +61,14 @@ function consultationMesuresDetaillees( ...@@ -61,14 +61,14 @@ function consultationMesuresDetaillees(
function consultationMesuresDetailleesMaxPower( function consultationMesuresDetailleesMaxPower(
pointId, pointId,
appLogin, appLogin,
startDt, startDate,
endDt, endDate,
mesureType = 'PMAX', mesureType = 'PMAX',
unit = 'PMA' unit = 'PMA'
) { ) {
log( log(
'info', 'info',
`Query consultationMesuresDetaillees - ${mesureType}/${unit} between ${startDt} and ${endDt}` `Query consultationMesuresDetaillees - ${mesureType}/${unit} between ${startDate} and ${endDate}`
) )
return `<?xml version='1.0' encoding='utf-8'?> return `<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
...@@ -84,8 +84,8 @@ function consultationMesuresDetailleesMaxPower( ...@@ -84,8 +84,8 @@ function consultationMesuresDetailleesMaxPower(
<grandeurPhysique>${unit}</grandeurPhysique> <grandeurPhysique>${unit}</grandeurPhysique>
<soutirage>true</soutirage> <soutirage>true</soutirage>
<injection>false</injection> <injection>false</injection>
<dateDebut>${startDt}</dateDebut> <dateDebut>${startDate}</dateDebut>
<dateFin>${endDt}</dateFin> <dateFin>${endDate}</dateFin>
<mesuresPas>P1D</mesuresPas> <mesuresPas>P1D</mesuresPas>
<mesuresCorrigees>false</mesuresCorrigees> <mesuresCorrigees>false</mesuresCorrigees>
<accordClient>true</accordClient> <accordClient>true</accordClient>
...@@ -128,7 +128,7 @@ function consulterDonneesTechniquesContractuelles(pointId, appLogin) { ...@@ -128,7 +128,7 @@ function consulterDonneesTechniquesContractuelles(pointId, appLogin) {
* @returns {string} PDL * @returns {string} PDL
*/ */
function rechercherPoint(appLogin, name, postalCode, inseeCode, address) { function rechercherPoint(appLogin, name, postalCode, inseeCode, address) {
log('info', `Query rechercherPoint`) log('info', `Query rechercherPoint - postal code: ${postalCode}`)
return `<?xml version='1.0' encoding='utf-8'?> return `<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:v2="http://www.enedis.fr/sge/b2b/services/rechercherpoint/v2.0" xmlns:v2="http://www.enedis.fr/sge/b2b/services/rechercherpoint/v2.0"
...@@ -195,7 +195,10 @@ function commanderCollectePublicationMesures( ...@@ -195,7 +195,10 @@ function commanderCollectePublicationMesures(
startDate, startDate,
endDate endDate
) { ) {
log('info', `Query commanderCollectePublicationMesures`) log(
'info',
`Query commanderCollectePublicationMesures - between ${startDate} and ${endDate}`
)
return `<?xml version='1.0' encoding='utf-8'?> return `<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:v2="http://www.enedis.fr/sge/b2b/commandercollectepublicationmesures/v3.0" xmlns:v2="http://www.enedis.fr/sge/b2b/commandercollectepublicationmesures/v3.0"
...@@ -247,7 +250,10 @@ function commanderArretServiceSouscritMesures( ...@@ -247,7 +250,10 @@ function commanderArretServiceSouscritMesures(
pointId, pointId,
serviceSouscritId serviceSouscritId
) { ) {
log('info', `Query commanderArretServiceSouscritMesures`) log(
'info',
`Query commanderArretServiceSouscritMesures - serviceSouscritId: ${serviceSouscritId}`
)
return `<?xml version='1.0' encoding='utf-8'?> return `<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:v2="http://www.enedis.fr/sge/b2b/commanderarretservicesouscritmesures/v1.0" xmlns:v2="http://www.enedis.fr/sge/b2b/commanderarretservicesouscritmesures/v1.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment