Commit e7ca70a9 authored by ZeHiro's avatar ZeHiro
Browse files

Add website selection for CMB and migration + add support of btpbanque. Fixes #561

Add support for CMMC.
Deleting and migrating s2e (except ERE HSBC)
Add support for e.lcl
Deleted "required" field (not used in client)
parent 7512b670
......@@ -289,6 +289,61 @@ let migrations = [
} catch (e) {
log.error(`Error while deleting banks: ${e.toString()}`);
}
},
async function m10() {
log.info('Looking for a CMB access...');
try {
let accesses = await Access.byBank({ uuid: 'cmb' });
for (let access of accesses) {
// There is currently no other customFields, no need to update if it is defined.
if (typeof access.customFields === 'undefined') {
log.info('Found CMB access, migrating to "par" website.');
const updateCMB = () => ([{ name: 'website', value: 'par' }]);
await updateCustomFields(access, updateCMB);
}
}
} catch (e) {
log.error(`Error while migrating CMB accesses: ${e.toString()}`);
}
},
async function m11() {
log.info('Looking for an s2e module...');
try {
let accesses = await Access.byBank({ uuid: 's2e' });
for (let access of accesses) {
let customFields = JSON.parse(access.customFields);
let { value: website } = customFields.find(f => f.name === 'website');
switch (website) {
case 'smartphone.s2e-net.com':
log.info('\tMigrating s2e module to bnpere...');
access.bank = 'bnppere';
break;
case 'mobile.capeasi.com':
log.info('\tMigrating s2e module to capeasi...');
access.bank = 'capeasi';
break;
case 'm.esalia.com':
log.info('\tMigrating s2e module to esalia...');
access.bank = 'esalia';
break;
case 'mobi.ere.hsbc.fr':
log.error('\tCannot migrate module s2e.');
log.error('\tPlease create a new access using erehsbc module (HSBC ERE).');
break;
default:
log.error(`Invalid value for s2e module: ${website}`);
}
if (access.bank !== 's2e') {
delete access.customFields;
await access.save();
}
}
} catch (e) {
log.error(`Error while migrating s2e accesses: ${e.toString()}`);
}
}
];
......
......@@ -14,7 +14,6 @@
"backend": "weboob",
"customFields": [
{
"required": true,
"labelKey": "client.settings.challengeanswer1",
"type": "text",
"name": "challengeanswer1"
......@@ -33,7 +32,6 @@
"customFields": [
{
"name": "website",
"required": false,
"default": "ee",
"values": [
{
......@@ -72,7 +70,6 @@
"customFields": [
{
"name": "website",
"required": true,
"values": [
{
"value": "www.ibps.alpes.banquepopulaire.fr",
......@@ -166,7 +163,6 @@
"backend": "weboob",
"customFields": [
{
"required": true,
"labelKey": "client.settings.secret",
"type": "password",
"name": "secret"
......@@ -179,7 +175,6 @@
"backend": "weboob",
"customFields": [
{
"required": true,
"labelKey": "client.settings.birthdate",
"type": "text",
"name": "birthdate"
......@@ -194,7 +189,6 @@
{
"name": "website",
"default": "pp",
"required": false,
"values": [
{
"value": "pp",
......@@ -240,7 +234,6 @@
{
"name": "website",
"default": "par",
"required": false,
"values": [
{
"value": "par",
......@@ -264,7 +257,6 @@
{
"name": "website",
"default": "bred",
"required": false,
"values": [
{
"value": "dispobank",
......@@ -281,6 +273,29 @@
],
"name": "Bred"
},
{
"backend": "weboob",
"customFields": [
{
"default": "weak",
"labelKey": "client.settings.auth_type",
"name": "auth_type",
"type": "select",
"values": [
{
"label": "Sesame (pro)",
"value": "strong"
},
{
"label": "Code confidentiel (pro)",
"value": "weak"
}
]
}
],
"name": "BTP Banque",
"uuid": "btpbanque"
},
{
"uuid": "caels",
"backend": "weboob",
......@@ -293,7 +308,6 @@
{
"name": "website",
"default": "www.caisse-epargne.fr",
"required": false,
"values": [
{
"value": "www.banquebcp.fr",
......@@ -325,12 +339,16 @@
"backend": "weboob",
"name": "CIC"
},
{
"uuid": "cices",
"backend": "weboob",
"name": "CIC Épargne Salariale"
},
{
"uuid": "citelis",
"backend": "weboob",
"customFields": [
{
"required": true,
"labelKey": "client.settings.merchant_id",
"type": "text",
"name": "merchant_id"
......@@ -346,8 +364,54 @@
{
"uuid": "cmb",
"backend": "weboob",
"customFields": [
{
"default": "pro",
"labelKey": "client.settings.website",
"name": "website",
"type": "select",
"values": [
{
"label": "Particuliers",
"value": "par"
},
{
"label": "Professionnels",
"value": "pro"
}
]
}
],
"name": "Crédit Mutuel de Bretagne"
},
{
"backend": "weboob",
"name": "Crédit Mutuel Épargne Salariale",
"uuid": "cmes"
},
{
"uuid": "cmmc",
"backend": "weboob",
"customFields": [
{
"name": "website",
"default": "par",
"values": [
{
"value": "par",
"label": "Particuliers"
},
{
"value": "pro",
"label": "Professionnels"
}
],
"type": "select",
"labelKey": "client.settings.website"
}
],
"name": "Crédit Mutuel du Massif Central"
},
{
"uuid": "cmso",
"backend": "weboob",
......@@ -378,7 +442,6 @@
"customFields": [
{
"name": "website",
"required": true,
"values": [
{
"value": "m.ca-alpesprovence.fr",
......@@ -550,7 +613,6 @@
{
"name": "auth_type",
"default": "particular",
"required": false,
"values": [
{
"value": "strong",
......@@ -578,7 +640,6 @@
{
"name": "website",
"default": "www.credit-du-nord.fr",
"required": false,
"values": [
{
"value": "www.banque-courtois.fr",
......@@ -607,13 +668,17 @@
{
"value": "www.tarneaud.fr",
"label": "Tarneaud (www.tarneaud.fr)"
},
{
"label": "Société Marseillaise de Crédit (www.smc.fr)",
"value": "www.smc.fr"
}
],
"type": "select",
"labelKey": "client.settings.website"
}
],
"name": "Crédit du Nord, Banque Courtois, Kolb, Laydernier, Nuger, Tarneaud"
"name": "Crédit du Nord, Banque Courtois, Kolb, Laydernier, Nuger, Société Marseillaise de Crédit, Tarneaud"
},
{
"uuid": "creditdunordpee",
......@@ -630,17 +695,11 @@
"backend": "weboob",
"name": "Banque Delubac & Cie"
},
{
"uuid": "esalia",
"backend": "weboob",
"name": "Société Générale Épargne Salariale"
},
{
"uuid": "erehsbc",
"backend": "weboob",
"customFields": [
{
"required": true,
"labelKey": "client.settings.secret",
"type": "text",
"name": "secret",
......@@ -649,6 +708,11 @@
],
"name": "HSBC Épargne Salariale"
},
{
"uuid": "esalia",
"backend": "weboob",
"name": "Société Générale Épargne Salariale"
},
{
"uuid": "fortuneo",
"backend": "weboob",
......@@ -661,7 +725,6 @@
{
"name": "website",
"default": "espaceclient.ganassurances.fr",
"required": false,
"values": [
{
"value": "espaceclient.ganassurances.fr",
......@@ -688,7 +751,6 @@
"backend": "weboob",
"customFields": [
{
"required": true,
"labelKey": "client.settings.secret",
"type": "text",
"name": "secret",
......@@ -702,7 +764,6 @@
"backend": "weboob",
"customFields": [
{
"required": true,
"labelKey": "client.settings.birthday",
"type": "text",
"name": "birthday",
......@@ -723,7 +784,6 @@
{
"name": "website",
"default": "par",
"required": false,
"values": [
{
"value": "par",
......@@ -737,6 +797,10 @@
"value": "pro",
"label": "Professionnels"
},
{
"value": "elcl",
"label": "e.LCL"
},
{
"value": "esp",
"label": "Espace Pro"
......@@ -748,6 +812,11 @@
],
"name": "LCL"
},
{
"uuid": "n26",
"backend": "weboob",
"name": "Number 26"
},
{
"uuid": "oney",
"backend": "weboob",
......@@ -759,36 +828,9 @@
"name": "PayPal"
},
{
"uuid": "s2e",
"uuid": "pradoepargne",
"backend": "weboob",
"customFields": [
{
"name": "website",
"default": "smartphone.s2e-net.com",
"required": false,
"values": [
{
"value": "smartphone.s2e-net.com",
"label": "BNPP ERE (smartphone.s2e-net.com)"
},
{
"value": "mobile.capeasi.com",
"label": "Capeasi (mobile.capeasi.com)"
},
{
"value": "mobi.ere.hsbc.fr",
"label": "ERE HSBC (mobi.ere.hsbc.fr)"
},
{
"value": "m.esalia.com",
"label": "Esalia (m.esalia.com)"
}
],
"type": "select",
"labelKey": "client.settings.website"
}
],
"name": "Esalia, Capeasi, BNP PERE, HSBC ERE"
"name": "Prado Épargne"
},
{
"uuid": "societegenerale",
......@@ -797,7 +839,6 @@
{
"name": "website",
"default": "par",
"required": false,
"values": [
{
"value": "par",
......@@ -833,37 +874,31 @@
"backend": "weboob",
"customFields": [
{
"required": true,
"labelKey": "client.settings.question1",
"type": "text",
"name": "question1"
},
{
"required": true,
"labelKey": "client.settings.answer1",
"type": "text",
"name": "answer1"
},
{
"required": true,
"labelKey": "client.settings.question2",
"type": "text",
"name": "question2"
},
{
"required": true,
"labelKey": "client.settings.answer2",
"type": "text",
"name": "answer2"
},
{
"required": true,
"labelKey": "client.settings.question3",
"type": "text",
"name": "question3"
},
{
"required": true,
"labelKey": "client.settings.answer3",
"type": "text",
"name": "answer3"
......@@ -871,6 +906,11 @@
],
"name": "Wells Fargo"
},
{
"uuid": "yomoni",
"backend": "weboob",
"name": "Yomoni"
},
{
"name": "Fake Bank 1",
"uuid": "fakebank1",
......@@ -906,30 +946,5 @@
]
}
]
},
{
"uuid": "yomoni",
"backend": "weboob",
"name": "Yomoni"
},
{
"uuid": "n26",
"backend": "weboob",
"name": "Number 26"
},
{
"uuid": "pradoepargne",
"backend": "weboob",
"name": "Prado Épargne"
},
{
"uuid": "cmes",
"backend": "weboob",
"name": "Crédit Mutuel Épargne Salariale"
},
{
"uuid": "cices",
"backend": "weboob",
"name": "CIC Épargne Salariale"
}
]
./creditmutuel.png
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment