Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
enedis_sge_konnector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
enedis_sge_konnector
Commits
afdc0ca0
Commit
afdc0ca0
authored
2 years ago
by
Hugo SUBTIL
Browse files
Options
Downloads
Patches
Plain Diff
publish: fix: types and manifest
generated from commit
f0b2c035
parent
20ec5bf4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
index.js
+12
-9
12 additions, 9 deletions
index.js
with
12 additions
and
9 deletions
index.js
+
12
−
9
View file @
afdc0ca0
...
...
@@ -149,6 +149,7 @@ async function start(fields, cozyParameters) {
const accountData = await getAccount(ACCOUNT_ID)
const userConsent = await getBoConsent(accountData.data.consentId)
const user = await verifyUserIdentity(fields, baseUrl, apiAuthKey, sgeLogin)
console.log(user)
if (user.lastname !== userConsent.lastname || !user) {
log('error', `Invalid or not found consent for user`)
await deleteBoConsent()
...
...
@@ -223739,7 +223740,7 @@ function rechercherPoint(appLogin, name, postalCode, inseeCode, address) {
* Search if user as a service
* @param {string} appLogin
* @param {string} contractId
* @param {
string
} pointId
* @param {
number
} pointId
* @returns {*}
*/
function rechercherServicesSouscritsMesures(appLogin, contractId, pointId) {
...
...
@@ -223765,7 +223766,7 @@ function rechercherServicesSouscritsMesures(appLogin, contractId, pointId) {
* Activate half hour data collect for user
* @param {string} appLogin
* @param {string} contractId
* @param {
string
} pointId
* @param {
number
} pointId
* @param {string} name
* @param {string} startDate
* @param {string} endDate
...
...
@@ -223824,7 +223825,7 @@ function commanderCollectePublicationMesures(
* Stop the user consent
* @param {string} appLogin
* @param {string} contractId
* @param {
string
} pointId
* @param {
number
} pointId
* @param {number} serviceSouscritId
* @returns {*}
*/
...
...
@@ -223923,7 +223924,8 @@ function getBoConsent(boId) {
log('info', `Query getBoConsent`)
return {
pointId: 1234,
name: 'SUBTIL',
lastname: 'SUBTIL',
firstname: 'hugo',
address: 'mad',
postalCode: '69007',
inseeCode: '69383',
...
...
@@ -223989,7 +223991,8 @@ async function verifyUserIdentity(
}
return {
name: fields.lastname,
lastname: fields.lastname,
firstname: fields.firstname,
pointId: fields.pointId,
inseeCode,
postalCode: fields.postalCode,
...
...
@@ -228036,7 +228039,7 @@ const xml2js = __webpack_require__(1513)
* @param {string} apiAuthKey
* @param {string} appLogin
* @param {string} name
* @param {
string
} pointId
* @param {
number
} pointId
* @param {string} startDate
* @param {string} endDate
* @return {Promise<number>} User contractId
...
...
@@ -228083,7 +228086,7 @@ async function activateContract(
try {
return parseServiceId(parsedReply)
} catch (error) {
log('error', 'Error while
parsing user PDL
: ' + error)
log('error', 'Error while
activating contract
: ' + error)
throw errors.LOGIN_FAILED
}
}
...
...
@@ -228107,7 +228110,7 @@ const { contractState } = __webpack_require__(1600)
* @param {string} url
* @param {string} apiAuthKey
* @param {string} appLogin
* @param {
string
} pointId
* @param {
number
} pointId
* @return {Promise<number | null>} User contractId
*/
async function verifyContract(url, apiAuthKey, appLogin, contractId, pointId) {
...
...
@@ -228179,7 +228182,7 @@ const xml2js = __webpack_require__(1513)
* @param {string} url
* @param {string} apiAuthKey
* @param {string} appLogin
* @param {
string
} pointId
* @param {
number
} pointId
* @param {number} serviceId
* @return {Promise<string>} User contractId
*/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment