Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • web-et-numerique/factory/llle_project/enedis-sge-konnector
1 result
Select Git revision
Show changes
Commits on Source (12)
...@@ -20,6 +20,24 @@ sast: ...@@ -20,6 +20,24 @@ sast:
include: include:
- template: Security/SAST.gitlab-ci.yml - template: Security/SAST.gitlab-ci.yml
unit-test:
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:16.14.2-alpine3.14
stage: test
before_script:
- apk add git
- apk add bash
script:
- yarn
- yarn test --ci --reporters=default --reporters=jest-junit --coverage
coverage: "/All files[^|]*\\|[^|]*\\s+([\\d\\.]+)/"
artifacts:
reports:
junit:
- junit.xml
only:
- merge_requests
- main
build-dev: build-dev:
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:16.14.2-alpine3.14 image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:16.14.2-alpine3.14
stage: build stage: build
...@@ -36,22 +54,8 @@ build-dev: ...@@ -36,22 +54,8 @@ build-dev:
- git remote set-url origin https://"$GIT_USER":"$GIT_PWD"@forge.grandlyon.com/web-et-numerique/factory/llle_project/enedis-sge-konnector.git - git remote set-url origin https://"$GIT_USER":"$GIT_PWD"@forge.grandlyon.com/web-et-numerique/factory/llle_project/enedis-sge-konnector.git
- git config --global credential.helper store - git config --global credential.helper store
- yarn deploy-dev - yarn deploy-dev
only:
unit-test: - merge_requests
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:16.14.2-alpine3.14
stage: test
before_script:
- apk add git
- apk add bash
script:
- yarn
- yarn test --ci --reporters=default --reporters=jest-junit --coverage
coverage: "/All files[^|]*\\|[^|]*\\s+([\\d\\.]+)/"
artifacts:
when: always
reports:
junit:
- junit.xml
build: build:
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:16.14.2-alpine3.14 image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:16.14.2-alpine3.14
......
...@@ -29,11 +29,13 @@ ...@@ -29,11 +29,13 @@
"Arret", "Arret",
"backoffice", "backoffice",
"catched", "catched",
"cicid",
"Corrigees", "Corrigees",
"cozyclient", "cozyclient",
"criteres", "criteres",
"Derniere", "Derniere",
"Detaillees", "Detaillees",
"ecolyo",
"enedis", "enedis",
"Enedis", "Enedis",
"enedissgegrandlyon", "enedissgegrandlyon",
......
...@@ -2,6 +2,15 @@ ...@@ -2,6 +2,15 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.3.0](https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector/compare/v1.2.5...v1.3.0) (2023-04-06)
### Bug Fixes
* **insee:** add missing à and ö ([7e9bbc1](https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector/commit/7e9bbc16c757fb25f3fdfca42c302f8f9458face))
* **insee:** handle parsing partial cities ([79ace65](https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector/commit/79ace65c8799775f5624442fccad1176afe076ac))
* remove accents in last names ([90c047d](https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector/commit/90c047d14c880c7d0da110507747a48ae35e22d7))
### [1.2.5](https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector/compare/v1.2.4...v1.2.5) (2023-02-03) ### [1.2.5](https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector/compare/v1.2.4...v1.2.5) (2023-02-03)
......
...@@ -10,12 +10,16 @@ jest.mock('../../src/requests/insee', () => ({ ...@@ -10,12 +10,16 @@ jest.mock('../../src/requests/insee', () => ({
getInseeCode: jest.fn().mockResolvedValue(69), getInseeCode: jest.fn().mockResolvedValue(69),
})) }))
jest.mock('../../src/helpers/sanitizeName.js', () => ({
sanitizeLastname: jest.fn().mockReturnValue('John'),
}))
jest.mock('../../src/index', () => ({ jest.mock('../../src/index', () => ({
start: jest.fn(), start: jest.fn(),
})) }))
describe('verifyUserIdentity', () => { describe('verifyUserIdentity', () => {
it('should throw LOGIN_FAILED when pdl given and recieved are NOT matching 🚫', async () => { it('should throw LOGIN_FAILED when pdl given and received are NOT matching 🚫', async () => {
findUserPdl.mockResolvedValueOnce('12345') findUserPdl.mockResolvedValueOnce('12345')
try { try {
await verifyUserIdentity( await verifyUserIdentity(
...@@ -35,7 +39,7 @@ describe('verifyUserIdentity', () => { ...@@ -35,7 +39,7 @@ describe('verifyUserIdentity', () => {
} }
}) })
it('should throw TERMS_VERSION_MISMATCH when pdl give and recieved are NOT matching on alternate start 🚫', async () => { it('should throw TERMS_VERSION_MISMATCH when pdl give and received are NOT matching on alternate start 🚫', async () => {
findUserPdl.mockResolvedValueOnce('12345') findUserPdl.mockResolvedValueOnce('12345')
try { try {
await verifyUserIdentity( await verifyUserIdentity(
...@@ -56,7 +60,7 @@ describe('verifyUserIdentity', () => { ...@@ -56,7 +60,7 @@ describe('verifyUserIdentity', () => {
} }
}) })
it('should return void when pdl give and recieved are matching ✅', async () => { it('should return void when pdl give and received are matching ✅', async () => {
findUserPdl.mockResolvedValueOnce('12345') findUserPdl.mockResolvedValueOnce('12345')
expect.assertions(1) expect.assertions(1)
try { try {
...@@ -76,7 +80,7 @@ describe('verifyUserIdentity', () => { ...@@ -76,7 +80,7 @@ describe('verifyUserIdentity', () => {
expect(true).toBe(false) expect(true).toBe(false)
} }
}) })
it('should return void when pdl give and recieved are matching with stored inseecode ✅', async () => { it('should return void when pdl give and received are matching with stored inseecode ✅', async () => {
findUserPdl.mockResolvedValue('12345') findUserPdl.mockResolvedValue('12345')
expect.assertions(1) expect.assertions(1)
try { try {
...@@ -99,7 +103,7 @@ describe('verifyUserIdentity', () => { ...@@ -99,7 +103,7 @@ describe('verifyUserIdentity', () => {
} }
}) })
it('should return void when pdl give and recieved are matching with SGE second chance onboarding ✅ ', async () => { it('should return void when pdl give and received are matching with SGE second chance onboarding ✅ ', async () => {
findUserPdl.mockResolvedValueOnce(null).mockResolvedValueOnce('12345') findUserPdl.mockResolvedValueOnce(null).mockResolvedValueOnce('12345')
findUserAddress.mockResolvedValueOnce({ findUserAddress.mockResolvedValueOnce({
escalierEtEtageEtAppartement: '12', escalierEtEtageEtAppartement: '12',
...@@ -127,7 +131,7 @@ describe('verifyUserIdentity', () => { ...@@ -127,7 +131,7 @@ describe('verifyUserIdentity', () => {
} }
}) })
it('should return void when pdl give and recieved are matching with SGE last chance onboarding✅ ', async () => { it('should return void when pdl give and received are matching with SGE last chance onboarding✅ ', async () => {
findUserPdl findUserPdl
.mockResolvedValueOnce(null) .mockResolvedValueOnce(null)
.mockResolvedValueOnce(null) .mockResolvedValueOnce(null)
......
const { sanitizeLastname } = require('../../src/helpers/sanitizeName')
describe('sanitizeLastname', () => {
it('should return sanitized name', async () => {
expect(sanitizeLastname('âêîôûäàëïöüéèç')).toEqual('aeiouaaeioueec')
})
})
...@@ -2,11 +2,11 @@ const { errors } = require('cozy-konnector-libs') ...@@ -2,11 +2,11 @@ const { errors } = require('cozy-konnector-libs')
const { getInseeCode } = require('../../src/requests/insee') const { getInseeCode } = require('../../src/requests/insee')
describe('getInseeCode', () => { describe('getInseeCode', () => {
it('should return a valid insee code for Lyon 7', async () => { it('should return insee code for: Lyon 7', async () => {
expect(await getInseeCode(69007)).toEqual('69387') expect(await getInseeCode(69007)).toEqual('69387')
}) })
it('should throw USER_ACTION_NEEDED for a unexisting post code', async () => { it('should throw USER_ACTION_NEEDED for a inexistant post code', async () => {
try { try {
await getInseeCode(69069) await getInseeCode(69069)
} catch (error) { } catch (error) {
...@@ -23,11 +23,11 @@ describe('getInseeCode', () => { ...@@ -23,11 +23,11 @@ describe('getInseeCode', () => {
}) })
describe('should handle communes with multiple insee code', () => { describe('should handle communes with multiple insee code', () => {
it('should return Craponne insee code for post code 69290', async () => { it('should return insee code for: Craponne', async () => {
expect(await getInseeCode(69290, 'CRAPONNE')).toEqual('69069') expect(await getInseeCode(69290, 'CRAPONNE')).toEqual('69069')
}) })
it('should return Pollionnay insee code for post code 69290', async () => { it('should return insee code for: Pollionnay', async () => {
expect(await getInseeCode(69290, 'POLLIONNAY')).toEqual('69154') expect(await getInseeCode(69290, 'POLLIONNAY')).toEqual('69154')
}) })
...@@ -35,9 +35,30 @@ describe('getInseeCode', () => { ...@@ -35,9 +35,30 @@ describe('getInseeCode', () => {
expect(await getInseeCode('01600', 'SAINT-BERNARD')).toEqual('01339') expect(await getInseeCode('01600', 'SAINT-BERNARD')).toEqual('01339')
}) })
it('should return insee code for: Neuville sur Saône', async () => { describe('should handle partial input omitting "sur Saône" or "au mont d\'or"', () => {
expect(await getInseeCode(69250, 'Neuville sur Saône')).toEqual('69143') it('should return insee code for: Neuville sur Saône', async () => {
expect(await getInseeCode(69250, 'Neuville sur Saône')).toEqual('69143')
})
it('should return insee code for: Neuville', async () => {
expect(await getInseeCode(69250, 'Neuville')).toEqual('69143')
})
it('should return insee code for: Poleymieux', async () => {
expect(await getInseeCode(69250, 'Poleymieux')).toEqual('69153')
})
it('should return insee code for: Poleymieux au Mont d Or', async () => {
expect(await getInseeCode(69250, 'Poleymieux au Mont d Or')).toEqual(
'69153'
)
})
it('should throw USER_ACTION_NEEDED when city is not precise enough', async () => {
try {
await getInseeCode(26600, 'e')
} catch (error) {
expect(error).toEqual(errors.USER_ACTION_NEEDED)
}
})
}) })
it("should return insee code for: L'isle d'abeau", async () => { it("should return insee code for: L'isle d'abeau", async () => {
expect(await getInseeCode(38080, "L'isle d'abeau")).toEqual('38193') expect(await getInseeCode(38080, "L'isle d'abeau")).toEqual('38193')
}) })
...@@ -54,6 +75,18 @@ describe('getInseeCode', () => { ...@@ -54,6 +75,18 @@ describe('getInseeCode', () => {
expect(await getInseeCode('69530', 'Brignais')).toEqual('69027') expect(await getInseeCode('69530', 'Brignais')).toEqual('69027')
}) })
it('should return insee code for: Saint-Christophe-à-Berry', async () => {
expect(await getInseeCode('02290', 'Saint-Christophe-à-Berry')).toEqual(
'02673'
)
})
it('should return insee code for: Saint-Christophe-a-Berry', async () => {
expect(await getInseeCode('02290', 'Saint-Christophe-a-Berry')).toEqual(
'02673'
)
})
describe('should handle communes with "Saint" or "St"', () => { describe('should handle communes with "Saint" or "St"', () => {
it("should return insee code for: Saint Romain au Mont d'Or", async () => { it("should return insee code for: Saint Romain au Mont d'Or", async () => {
expect(await getInseeCode(69270, "Saint Romain au Mont d'Or")).toEqual( expect(await getInseeCode(69270, "Saint Romain au Mont d'Or")).toEqual(
...@@ -142,5 +175,14 @@ describe('getInseeCode', () => { ...@@ -142,5 +175,14 @@ describe('getInseeCode', () => {
) )
}) })
}) })
describe('should return correct insee code for Bréançon', () => {
it('should return insee code for: Bréançon', async () => {
expect(await getInseeCode(95640, 'Bréançon')).toEqual('95102')
})
it('should return insee code for: Breancon', async () => {
expect(await getInseeCode(95640, 'Breancon')).toEqual('95102')
})
})
}) })
}) })
{ {
"version": "1.2.5", "version": "1.3.0",
"name": "Enedis SGE", "name": "Enedis SGE",
"type": "konnector", "type": "konnector",
"language": "node", "language": "node",
......
{ {
"name": "enedissgegrandlyon", "name": "enedissgegrandlyon",
"version": "1.2.5", "version": "1.3.0",
"description": "", "description": "",
"repository": { "repository": {
"type": "https", "type": "https",
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
"@sentry/node": "^7.23.0", "@sentry/node": "^7.23.0",
"@sentry/tracing": "^7.23.0", "@sentry/tracing": "^7.23.0",
"axios": "^0.27.2", "axios": "^0.27.2",
"cozy-konnector-libs": "4.56.4", "cozy-konnector-libs": "5.0.0",
"easy-soap-request": "^4.7.0", "easy-soap-request": "^4.7.0",
"jest": "^28.1.3", "jest": "^28.1.3",
"moment": "^2.29.3", "moment": "^2.29.3",
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
"xml2js": "^0.4.23" "xml2js": "^0.4.23"
}, },
"devDependencies": { "devDependencies": {
"cozy-jobs-cli": "1.20.2", "cozy-jobs-cli": "2.0.0",
"cozy-konnector-build": "1.4.4", "cozy-konnector-build": "1.4.5",
"eslint-config-cozy-app": "1.3.3", "eslint-config-cozy-app": "1.3.3",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"git-directory-deploy": "1.5.1", "git-directory-deploy": "1.5.1",
......
...@@ -10,7 +10,7 @@ const Sentry = require('@sentry/node') ...@@ -10,7 +10,7 @@ const Sentry = require('@sentry/node')
* @param {string} url * @param {string} url
* @param {string} apiAuthKey * @param {string} apiAuthKey
* @param {string} appLogin * @param {string} appLogin
* @param {string} name * @param {string} lastname
* @param {number} pointId * @param {number} pointId
* @param {string} startDate * @param {string} startDate
* @param {string} endDate * @param {string} endDate
...@@ -21,7 +21,7 @@ async function activateContract( ...@@ -21,7 +21,7 @@ async function activateContract(
apiAuthKey, apiAuthKey,
appLogin, appLogin,
contractId, contractId,
name, lastname,
pointId, pointId,
startDate, startDate,
endDate endDate
...@@ -39,7 +39,7 @@ async function activateContract( ...@@ -39,7 +39,7 @@ async function activateContract(
appLogin, appLogin,
contractId, contractId,
pointId, pointId,
name, lastname,
startDate, startDate,
endDate endDate
), ),
......
...@@ -10,7 +10,7 @@ const Sentry = require('@sentry/node') ...@@ -10,7 +10,7 @@ const Sentry = require('@sentry/node')
* @param {string} url * @param {string} url
* @param {string} apiAuthKey * @param {string} apiAuthKey
* @param {string} appLogin * @param {string} appLogin
* @param {string} name * @param {string} lastname
* @param {string} address * @param {string} address
* @param {string} postalCode * @param {string} postalCode
* @param {string} inseeCode * @param {string} inseeCode
...@@ -20,7 +20,7 @@ async function findUserPdl( ...@@ -20,7 +20,7 @@ async function findUserPdl(
url, url,
apiAuthKey, apiAuthKey,
appLogin, appLogin,
name, lastname,
address, address,
postalCode, postalCode,
inseeCode, inseeCode,
...@@ -37,7 +37,7 @@ async function findUserPdl( ...@@ -37,7 +37,7 @@ async function findUserPdl(
headers: sgeHeaders, headers: sgeHeaders,
xml: rechercherPoint( xml: rechercherPoint(
appLogin, appLogin,
name, lastname,
postalCode, postalCode,
inseeCode, inseeCode,
address, address,
......
...@@ -8,6 +8,7 @@ const { ...@@ -8,6 +8,7 @@ const {
removeAddressNumber, removeAddressNumber,
} = require('../helpers/parsing') } = require('../helpers/parsing')
const Sentry = require('@sentry/node') const Sentry = require('@sentry/node')
const { sanitizeLastname } = require('../helpers/sanitizeName')
/** /**
* Verify user identity * Verify user identity
...@@ -31,6 +32,7 @@ async function verifyUserIdentity( ...@@ -31,6 +32,7 @@ async function verifyUserIdentity(
if (!isAlternateStart) { if (!isAlternateStart) {
inseeCode = await getInseeCode(fields.postalCode, fields.city) inseeCode = await getInseeCode(fields.postalCode, fields.city)
} }
const lastname = sanitizeLastname(fields.lastname)
// Store if user is going through safety sge onboarding // Store if user is going through safety sge onboarding
let userSafetyOnBoarding = false let userSafetyOnBoarding = false
...@@ -40,7 +42,7 @@ async function verifyUserIdentity( ...@@ -40,7 +42,7 @@ async function verifyUserIdentity(
`${baseUrl}/enedis_SDE_recherche-point/1.0`, `${baseUrl}/enedis_SDE_recherche-point/1.0`,
apiAuthKey, apiAuthKey,
loginUtilisateur, loginUtilisateur,
fields.lastname, lastname,
fields.address, fields.address,
fields.postalCode, fields.postalCode,
inseeCode inseeCode
...@@ -68,7 +70,7 @@ async function verifyUserIdentity( ...@@ -68,7 +70,7 @@ async function verifyUserIdentity(
`${baseUrl}/enedis_SDE_recherche-point/1.0`, `${baseUrl}/enedis_SDE_recherche-point/1.0`,
apiAuthKey, apiAuthKey,
loginUtilisateur, loginUtilisateur,
fields.lastname, lastname,
removeMultipleSpaces(userAddress.numeroEtNomVoie), removeMultipleSpaces(userAddress.numeroEtNomVoie),
userAddress.codePostal, userAddress.codePostal,
userAddress.commune.$.code, userAddress.commune.$.code,
...@@ -82,7 +84,7 @@ async function verifyUserIdentity( ...@@ -82,7 +84,7 @@ async function verifyUserIdentity(
`${baseUrl}/enedis_SDE_recherche-point/1.0`, `${baseUrl}/enedis_SDE_recherche-point/1.0`,
apiAuthKey, apiAuthKey,
loginUtilisateur, loginUtilisateur,
fields.lastname, lastname,
removeMultipleSpaces(removeAddressNumber(userAddress.numeroEtNomVoie)), removeMultipleSpaces(removeAddressNumber(userAddress.numeroEtNomVoie)),
userAddress.codePostal, userAddress.codePostal,
userAddress.commune.$.code userAddress.commune.$.code
...@@ -96,7 +98,7 @@ async function verifyUserIdentity( ...@@ -96,7 +98,7 @@ async function verifyUserIdentity(
`${baseUrl}/enedis_SDE_recherche-point/1.0`, `${baseUrl}/enedis_SDE_recherche-point/1.0`,
apiAuthKey, apiAuthKey,
loginUtilisateur, loginUtilisateur,
fields.lastname, lastname,
removeMultipleSpaces(removeAddressNumber(userAddress.numeroEtNomVoie)), removeMultipleSpaces(removeAddressNumber(userAddress.numeroEtNomVoie)),
userAddress.codePostal, userAddress.codePostal,
userAddress.commune.$.code, userAddress.commune.$.code,
...@@ -122,7 +124,7 @@ async function verifyUserIdentity( ...@@ -122,7 +124,7 @@ async function verifyUserIdentity(
} }
return { return {
lastname: fields.lastname, lastname: lastname,
firstname: fields.firstname, firstname: fields.firstname,
pointId: fields.pointId, pointId: fields.pointId,
inseeCode, inseeCode,
......
...@@ -114,7 +114,7 @@ function checkContractExists(parsedReply) { ...@@ -114,7 +114,7 @@ function checkContractExists(parsedReply) {
} }
/** /**
* Format tag in order to be manipulated easly * Format tag in order to be manipulated easily
* @param {string} name * @param {string} name
* @returns {string} name * @returns {string} name
*/ */
......
const REPLACE_CHARS = {
â: 'a',
ê: 'e',
î: 'i',
ô: 'o',
û: 'u',
ä: 'a',
ë: 'e',
ï: 'i',
ö: 'o',
ü: 'u',
é: 'e',
à: 'a',
è: 'e',
ç: 'c',
}
/**
* Clean lastname input and remove all accents but not ʼ, ', -
* @param {string} lastname
* @return {string} lastnameSanitized
*/
function sanitizeLastname(lastname) {
return lastname
.toLowerCase()
.replace(/[âêîôûäëïöüéàèç]/g, match => REPLACE_CHARS[match])
.trim()
}
module.exports = { sanitizeLastname }
...@@ -22,12 +22,17 @@ async function getInseeCode(postalCode, city) { ...@@ -22,12 +22,17 @@ async function getInseeCode(postalCode, city) {
if (!city) throw new Error('No city') if (!city) throw new Error('No city')
const parsedCity = sanitizeCity(city) const parsedCity = sanitizeCity(city)
console.log(parsedCity)
const filteredResponse = response.data.filter( const filteredResponse = response.data.filter(commune =>
town => sanitizeCity(town.nomCommune) === parsedCity sanitizeCity(commune.nomCommune).includes(parsedCity)
) )
if (filteredResponse.length > 1) {
throw new Error(
'Input city is not precise enough, more than one city was found'
)
}
return filteredResponse[0].codeCommune return filteredResponse[0].codeCommune
} }
} catch (error) { } catch (error) {
...@@ -47,7 +52,7 @@ function sanitizeCity(city) { ...@@ -47,7 +52,7 @@ function sanitizeCity(city) {
return city return city
.toLowerCase() .toLowerCase()
.replace(/\bst\b/i, 'saint') .replace(/\bst\b/i, 'saint')
.replace(/[âêîôûäëïü-\sʼ'’éèç]/g, match => REPLACE_CHARS[match]) .replace(/[âêîôûäëïöü-\sʼ'’éàèç]/g, match => REPLACE_CHARS[match])
.trim() .trim()
} }
...@@ -68,6 +73,7 @@ const REPLACE_CHARS = { ...@@ -68,6 +73,7 @@ const REPLACE_CHARS = {
"'": '', "'": '',
'': '', '': '',
é: 'e', é: 'e',
à: 'a',
è: 'e', è: 'e',
ç: 'c', ç: 'c',
} }
......
...@@ -126,7 +126,7 @@ function consulterDonneesTechniquesContractuelles( ...@@ -126,7 +126,7 @@ function consulterDonneesTechniquesContractuelles(
/** /**
* Use rechercherPoint to find user PDL if exist * Use rechercherPoint to find user PDL if exist
* @param {string} name * @param {string} lastname
* @param {string} postalCode * @param {string} postalCode
* @param {string} inseeCode * @param {string} inseeCode
* @param {string} address * @param {string} address
...@@ -135,7 +135,7 @@ function consulterDonneesTechniquesContractuelles( ...@@ -135,7 +135,7 @@ function consulterDonneesTechniquesContractuelles(
*/ */
function rechercherPoint( function rechercherPoint(
appLogin, appLogin,
name, lastname,
postalCode, postalCode,
inseeCode, inseeCode,
address, address,
...@@ -160,7 +160,7 @@ function rechercherPoint( ...@@ -160,7 +160,7 @@ function rechercherPoint(
<codePostal>${postalCode}</codePostal> <codePostal>${postalCode}</codePostal>
<codeInseeCommune>${inseeCode}</codeInseeCommune> <codeInseeCommune>${inseeCode}</codeInseeCommune>
</adresseInstallation> </adresseInstallation>
<nomClientFinalOuDenominationSociale>${name}</nomClientFinalOuDenominationSociale> <nomClientFinalOuDenominationSociale>${lastname}</nomClientFinalOuDenominationSociale>
<rechercheHorsPerimetre>true</rechercheHorsPerimetre> <rechercheHorsPerimetre>true</rechercheHorsPerimetre>
</criteres> </criteres>
<loginUtilisateur>${appLogin}</loginUtilisateur> <loginUtilisateur>${appLogin}</loginUtilisateur>
...@@ -181,7 +181,7 @@ function rechercherPoint( ...@@ -181,7 +181,7 @@ function rechercherPoint(
<codePostal>${postalCode}</codePostal> <codePostal>${postalCode}</codePostal>
<codeInseeCommune>${inseeCode}</codeInseeCommune> <codeInseeCommune>${inseeCode}</codeInseeCommune>
</adresseInstallation> </adresseInstallation>
<nomClientFinalOuDenominationSociale>${name}</nomClientFinalOuDenominationSociale> <nomClientFinalOuDenominationSociale>${lastname}</nomClientFinalOuDenominationSociale>
<rechercheHorsPerimetre>true</rechercheHorsPerimetre> <rechercheHorsPerimetre>true</rechercheHorsPerimetre>
</criteres> </criteres>
<loginUtilisateur>${appLogin}</loginUtilisateur> <loginUtilisateur>${appLogin}</loginUtilisateur>
...@@ -221,7 +221,7 @@ function rechercherServicesSouscritsMesures(appLogin, contractId, pointId) { ...@@ -221,7 +221,7 @@ function rechercherServicesSouscritsMesures(appLogin, contractId, pointId) {
* @param {string} appLogin * @param {string} appLogin
* @param {string} contractId * @param {string} contractId
* @param {number} pointId * @param {number} pointId
* @param {string} name * @param {string} lastname
* @param {string} startDate * @param {string} startDate
* @param {string} endDate * @param {string} endDate
* @returns {*} * @returns {*}
...@@ -230,7 +230,7 @@ function commanderCollectePublicationMesures( ...@@ -230,7 +230,7 @@ function commanderCollectePublicationMesures(
appLogin, appLogin,
contractId, contractId,
pointId, pointId,
name, lastname,
startDate, startDate,
endDate endDate
) { ) {
...@@ -258,7 +258,7 @@ function commanderCollectePublicationMesures( ...@@ -258,7 +258,7 @@ function commanderCollectePublicationMesures(
<declarationAccordClient> <declarationAccordClient>
<accord>true</accord> <accord>true</accord>
<personnePhysique> <personnePhysique>
<nom>${name}</nom> <nom>${lastname}</nom>
</personnePhysique> </personnePhysique>
</declarationAccordClient> </declarationAccordClient>
<mesuresTypeCode>CDC</mesuresTypeCode> <mesuresTypeCode>CDC</mesuresTypeCode>
......
...@@ -3454,10 +3454,10 @@ cozy-flags@^2.8.7: ...@@ -3454,10 +3454,10 @@ cozy-flags@^2.8.7:
dependencies: dependencies:
microee "^0.0.6" microee "^0.0.6"
cozy-jobs-cli@1.20.2: cozy-jobs-cli@2.0.0:
version "1.20.2" version "2.0.0"
resolved "https://registry.yarnpkg.com/cozy-jobs-cli/-/cozy-jobs-cli-1.20.2.tgz#1090bc5d1ad1f15695d17734618c8326d41a437e" resolved "https://registry.yarnpkg.com/cozy-jobs-cli/-/cozy-jobs-cli-2.0.0.tgz#04f3a9e79ed66363223a32d514f567fbf360ba5a"
integrity sha512-IujczIbEdI3BaWB8vakV+EjGMzLGqrPVtMfB2Ie6ldJ/04rs9sVz975hlSPKkxnl+ziDkC4245pDxnsgpzYSIA== integrity sha512-oVBp7yAZPSaXSk7wFdLYQ3IM9dV9N7A1knpicf/1861C76XD30AG9KBGo0kUVEbTO5TjRIdMD0u6B7ZLE8APSQ==
dependencies: dependencies:
"@pollyjs/adapter-node-http" "5.1.1" "@pollyjs/adapter-node-http" "5.1.1"
"@pollyjs/core" "5.1.1" "@pollyjs/core" "5.1.1"
...@@ -3471,16 +3471,16 @@ cozy-jobs-cli@1.20.2: ...@@ -3471,16 +3471,16 @@ cozy-jobs-cli@1.20.2:
cozy-client "29.2.0" cozy-client "29.2.0"
cozy-device-helper "^2.1.0" cozy-device-helper "^2.1.0"
cozy-flags "^2.8.7" cozy-flags "^2.8.7"
cozy-konnector-libs "^4.56.4" cozy-konnector-libs "^5.0.0"
cozy-logger "1.9.0" cozy-logger "1.9.0"
open "8.4.0" open "8.4.0"
pretty "2.0.0" pretty "2.0.0"
strip-json-comments "3.1.1" strip-json-comments "3.1.1"
cozy-konnector-build@1.4.4: cozy-konnector-build@1.4.5:
version "1.4.4" version "1.4.5"
resolved "https://registry.yarnpkg.com/cozy-konnector-build/-/cozy-konnector-build-1.4.4.tgz#66ffcb56cf31986f155995d7f7a78c8f563ebc91" resolved "https://registry.yarnpkg.com/cozy-konnector-build/-/cozy-konnector-build-1.4.5.tgz#3b46fdadaef5c9447bf2f6e38dd2aba75714b95e"
integrity sha512-4eKheFL6wcFbS4RB4e7O0y+x36I5PEOKFk1yt1uErNl5Y77HZXy5JwP/VZboTnyUDu1YL/7Q1dkrxjE4DpySjg== integrity sha512-tME67EBs9kmXZrRXQfjiHfelX87ULuMX19iNvBOzc7cfXCzvXHrezJsxGDJadEWuSPacsvvgU1A1UBlTMRsheg==
dependencies: dependencies:
"@babel/core" "7.17.10" "@babel/core" "7.17.10"
babel-preset-cozy-app "^2.0.2" babel-preset-cozy-app "^2.0.2"
...@@ -3493,10 +3493,10 @@ cozy-konnector-build@1.4.4: ...@@ -3493,10 +3493,10 @@ cozy-konnector-build@1.4.4:
webpack "5.68.0" webpack "5.68.0"
webpack-cli "4.9.2" webpack-cli "4.9.2"
cozy-konnector-libs@4.56.4, cozy-konnector-libs@^4.56.4: cozy-konnector-libs@5.0.0, cozy-konnector-libs@^5.0.0:
version "4.56.4" version "5.0.0"
resolved "https://registry.yarnpkg.com/cozy-konnector-libs/-/cozy-konnector-libs-4.56.4.tgz#139fcda7569173be8c585b141132ea85e260fc28" resolved "https://registry.yarnpkg.com/cozy-konnector-libs/-/cozy-konnector-libs-5.0.0.tgz#7cab68bda9431e5f5abb5186a7384e9cb6740905"
integrity sha512-GSrOxKkpGSkBCAqVcdAht3+7Tv0l6cw+GtwYOCPl3YiCvcN5PzxfiaXndBXu9VDNHTgNFmAKMNdJVNDedlRKuQ== integrity sha512-wxVR9MH+UUx81osQGet1m/o6rOP98S4u0xMomWDASw8xlvvj8D1zp18M7F+zxKhZAb9L8Y+4D54vD5HQhgyoOw==
dependencies: dependencies:
babel-runtime "^6.26.0" babel-runtime "^6.26.0"
bluebird "^3.7.2" bluebird "^3.7.2"
......