@silexpert/core 0.4.249 → 0.4.250
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/types/Enum/BrandPourcentage.d.ts +78 -0
- package/es/types/Enum/BrandPourcentage.d.ts.map +1 -0
- package/es/types/Enum/BrandPourcentage.js +80 -0
- package/es/types/Enum/BrandPourcentage.js.map +1 -0
- package/es/types/Enum/VatDeclarationType.js +1 -1
- package/es/types/Enum/VatDeclarationType.js.map +1 -1
- package/es/types/index.d.ts +1 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +1 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/brands.d.ts +1 -1
- package/es/utils/brands.d.ts.map +1 -1
- package/es/utils/brands.js +16 -2
- package/es/utils/brands.js.map +1 -1
- package/js/types/Enum/BrandPourcentage.js +83 -0
- package/js/types/Enum/BrandPourcentage.js.map +1 -0
- package/js/types/Enum/VatDeclarationType.js +1 -1
- package/js/types/Enum/VatDeclarationType.js.map +1 -1
- package/js/types/index.js +12 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/brands.js +18 -2
- package/js/utils/brands.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Enum/BrandPourcentage.ts +79 -0
- package/ts/types/Enum/VatDeclarationType.ts +1 -1
- package/ts/types/index.ts +1 -0
- package/ts/utils/brands.ts +17 -3
package/js/utils/brands.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.js","mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAaA,MAAMA,qBAAqB,GAAIC,OAAD,IAA+
|
|
1
|
+
{"version":3,"file":"brands.js","mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAaA,MAAMA,qBAAqB,GAAIC,OAAD,IAA+E;EAC3G,IAAIA,OAAJ,EAAa;IACX,IAAIA,OAAO,CAACC,OAAR,CAAgB,YAAhB,IAAgC,CAAC,CAAjC,IAAsCD,OAA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IAAI2B,KAAK,CAAC3B,OAAN,CAAc,eAAd,IAAiC,CAAC,CAAtC,EAAyC,OAAO,WAAP;EACzC,IAAI2B,KAAK,CAAC3B,OAAN,CAAc,gBAAd,IAAkC,CAAC,CAAvC,EAA0C,OAAO,aAAP;EAC1C,IAAI2B,KAAK,CAAC3B,OAAN,CAAc,sBAAd,IAAwC,CAAC,CAA7C,EAAgD,OAAO,YAAP;EAChD,OAAO,IAAP;AACD,CAND;;QASEe,c,GAAAA,c;QAAgBV,oB,GAAAA,oB;QAAsBP,qB,GAAAA,qB;QAAuB4B,e,GAAAA,e","names":["getBrandNameByNodeEnv","nodeEnv","indexOf","process","env","NODE_ENV","API_HOST","getAllBrandByNodeEnv","nodeEnvUsed","currentEnvName","listEnvEnum","BrandClementine","BrandLegalstart","BrandComptalib","BrandPourcentage","currentConfigFile","brand","getBrandConfig","params","idTypeBrand","objectWaited","find","b","sort","a","objectToReturn","brandDefault","name","getBrandByEmail","email"],"sourceRoot":"","sources":["../../ts/utils/brands.ts"],"sourcesContent":["import { get as getLodash } from 'lodash';\nimport { BrandClementine } from '../types/Enum/BrandClementine';\nimport { BrandLegalstart } from '../types/Enum/BrandLegalstart';\nimport { BrandComptalib } from '../types/Enum/BrandComptalib';\nimport { BrandPourcentage } from '../types/Enum/BrandPourcentage';\n\ntype brand = {\n idTypeBrand: number,\n name: string\n};\n\ntype getBrandConfigParams = {\n idTypeBrand?: number,\n objectWaited?: string,\n nodeEnv?: string\n};\n\nconst getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart'| 'Comptalib' | 'Clementine' | 'Pourcentage' => {\n if (nodeEnv) {\n if (nodeEnv.indexOf('legalstart') > -1 || nodeEnv.indexOf('Legalstart') > -1) {\n return 'Legalstart';\n }\n if (nodeEnv.indexOf('comptalib') > -1 || nodeEnv.indexOf('Comptalib') > -1) {\n return 'Comptalib';\n }\n if (nodeEnv.indexOf('pourcentage') > -1 || nodeEnv.indexOf('Pourcentage') > -1) {\n return 'Pourcentage';\n }\n } else if (process.env.NODE_ENV) {\n if (process.env.NODE_ENV.indexOf('legalstart') > -1 || process.env.NODE_ENV.indexOf('Legalstart') > -1) {\n return 'Legalstart';\n }\n if (process.env.NODE_ENV.indexOf('comptalib') > -1 || process.env.NODE_ENV.indexOf('Comptalib') > -1) {\n return 'Comptalib';\n }\n if (process.env.NODE_ENV.indexOf('pourcentage') > -1 || process.env.NODE_ENV.indexOf('Pourcentage') > -1) {\n return 'Pourcentage';\n }\n } else if (process.env.API_HOST) {\n if (process.env.API_HOST.indexOf('legalstart') > -1 || process.env.API_HOST.indexOf('Legalstart') > -1) {\n return 'Legalstart';\n }\n if (process.env.API_HOST.indexOf('comptalib') > -1 || process.env.API_HOST.indexOf('Comptalib') > -1) {\n return 'Comptalib';\n }\n if (process.env.API_HOST.indexOf('pourcentage') > -1 || process.env.API_HOST.indexOf('Pourcentage') > -1) {\n return 'Pourcentage';\n }\n }\n return 'Clementine';\n};\n\nconst getAllBrandByNodeEnv = (nodeEnv?: string): Array<brand> => {\n const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;\n const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);\n const listEnvEnum = {\n BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage,\n };\n // @ts-ignore\n const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];\n\n const brand = currentConfigFile;\n\n return brand;\n};\n\nconst getBrandConfig = (params: getBrandConfigParams): brand => {\n const {\n idTypeBrand = null, objectWaited = null, nodeEnv,\n } = params;\n let brand;\n const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;\n const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);\n const listEnvEnum = {\n BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage,\n };\n // @ts-ignore\n const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];\n\n if (idTypeBrand) {\n // Récupération de la brand via idTypeBrand\n brand = currentConfigFile.find((b: brand) => b.idTypeBrand === idTypeBrand);\n }\n // else if (idSociety) {\n // Récupération de la brand via l'idSociety -> impossible directement depuis le core (pas d'accès au resources, ni au token pour l'appel via fetch)\n\n if (!brand) {\n // Si aucune brand trouvée, on passe par défaut la première brand de la liste\n [brand] = currentConfigFile.sort((a: brand, b: brand) => a.idTypeBrand - b.idTypeBrand);\n }\n\n if (objectWaited) {\n // Si on attend un attribut particulier de la brand, on le parcourt\n let objectToReturn = getLodash(brand, objectWaited);\n // Si aucun attribut trouvé, on renvoit celui de Clementine par défaut\n if (!objectToReturn) {\n const brandDefault = currentConfigFile.find((b: brand) => b.name === currentEnvName);\n objectToReturn = getLodash(brandDefault, objectWaited);\n }\n return objectToReturn;\n }\n\n return brand;\n};\n\nconst getBrandByEmail = (email: string): 'Legalstart'| 'Comptalib' | 'Clementine' | 'Pourcentage' | null => {\n if (email.indexOf('legalstart.fr') > -1) return 'Legalstart';\n if (email.indexOf('comptalib.com') > -1) return 'Comptalib';\n if (email.indexOf('pourcentage.fr') > -1) return 'Pourcentage';\n if (email.indexOf('compta-clementine.fr') > -1) return 'Clementine';\n return null;\n};\n\nexport {\n getBrandConfig, getAllBrandByNodeEnv, getBrandNameByNodeEnv, getBrandByEmail,\n};"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.250",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "js/index.js",
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export const BrandPourcentage = [
|
|
2
|
+
{
|
|
3
|
+
idTypeBrand: 1,
|
|
4
|
+
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-pourcentage/',
|
|
5
|
+
logoS3: 'config/pourcentage-logo.png',
|
|
6
|
+
name: 'Pourcentage',
|
|
7
|
+
colors: {
|
|
8
|
+
primary: '#1e6f5c',
|
|
9
|
+
},
|
|
10
|
+
listPhones: {
|
|
11
|
+
contact: '01 86 90 82 15',
|
|
12
|
+
qualite: '01 86 90 82 15',
|
|
13
|
+
juridique: '01 86 90 82 15',
|
|
14
|
+
},
|
|
15
|
+
listMails: {
|
|
16
|
+
administratif: 'contact@pourcentage.fr',
|
|
17
|
+
app: 'contact@pourcentage.fr',
|
|
18
|
+
bonjour: 'contact@pourcentage.fr',
|
|
19
|
+
contact: 'contact@pourcentage.fr',
|
|
20
|
+
facturation: 'facturation@pourcentage.fr',
|
|
21
|
+
feedback: 'contact@pourcentage.fr',
|
|
22
|
+
juridique: 'contact@pourcentage.fr',
|
|
23
|
+
informatique: 'contact@pourcentage.fr',
|
|
24
|
+
msd: 'contact@pourcentage.fr',
|
|
25
|
+
noreply: 'contact@pourcentage.fr',
|
|
26
|
+
qualite: 'contact@pourcentage.fr',
|
|
27
|
+
paiement: 'contact@pourcentage.fr',
|
|
28
|
+
social: 'contact@pourcentage.fr',
|
|
29
|
+
support: 'contact@pourcentage.fr',
|
|
30
|
+
tva: 'contact@pourcentage.fr',
|
|
31
|
+
wb: 'contact@pourcentage.fr',
|
|
32
|
+
},
|
|
33
|
+
companyInformation: {
|
|
34
|
+
ape: '6920Z',
|
|
35
|
+
bp: '',
|
|
36
|
+
city: 'Paris',
|
|
37
|
+
montantCapital: '10 000',
|
|
38
|
+
nomRaisonSociale: 'POURCENTAGE',
|
|
39
|
+
ECName: 'M. Jean-Louis BOICHÉ',
|
|
40
|
+
ECOrderCity: 'Nancy',
|
|
41
|
+
phone: '01 86 90 82 15',
|
|
42
|
+
postalAddress: '30, rue des Mathurins',
|
|
43
|
+
rcs: '891 501 181',
|
|
44
|
+
statut: 'SAS',
|
|
45
|
+
zipCode: '75 008',
|
|
46
|
+
},
|
|
47
|
+
idPrestationsListAuthorized: [197, 205],
|
|
48
|
+
logoUrl: 'logo-pourcentage.svg',
|
|
49
|
+
miniLogoUrl: 'logo-pourcentage-mini.svg',
|
|
50
|
+
hiddenPages: [],
|
|
51
|
+
recaptchaSecretKey: '6Le0o3kaAAAAAIEcSOib77JdK_W3cyIilK-p2yOG',
|
|
52
|
+
urlApp: 'https://app.pourcentage.fr/',
|
|
53
|
+
urlApi1: 'https://api.comptalib.com',
|
|
54
|
+
urlApi2: 'https://api-next.comptalib.com',
|
|
55
|
+
urlExpert: 'https://pro.comptalib.com',
|
|
56
|
+
urlClient: 'https://www.pourcentage.fr',
|
|
57
|
+
bank: {
|
|
58
|
+
IBAN: 'FR7616106010019601826952765',
|
|
59
|
+
BIC: 'AGRIFRPP861',
|
|
60
|
+
Name: 'POURCENTAGE',
|
|
61
|
+
Id: 'FR57ZZZ878E61',
|
|
62
|
+
},
|
|
63
|
+
internalInvoicing: {
|
|
64
|
+
statut: 'SASU',
|
|
65
|
+
name: 'POURCENTAGE',
|
|
66
|
+
address: '9, avenue du Rhin',
|
|
67
|
+
zipCode: '54520',
|
|
68
|
+
city: 'LAXOU',
|
|
69
|
+
country: 'FRANCE',
|
|
70
|
+
montantCapital: '10 000',
|
|
71
|
+
siret: '89150118100020',
|
|
72
|
+
ape: '6920Z',
|
|
73
|
+
rcs: '891 501 181',
|
|
74
|
+
phone: '03 83 93 14 14',
|
|
75
|
+
vatIntracom: 'FR58891501181',
|
|
76
|
+
email: 'facturation@pourcentage.fr',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
];
|
package/ts/types/index.ts
CHANGED
|
@@ -392,6 +392,7 @@ export * from './Enum/ExerciceNoteType';
|
|
|
392
392
|
export * from './Enum/BrandClementine';
|
|
393
393
|
export * from './Enum/BrandLegalstart';
|
|
394
394
|
export * from './Enum/BrandComptalib';
|
|
395
|
+
export * from './Enum/BrandPourcentage';
|
|
395
396
|
export * from './Enum/PartneredAccountantServiceState';
|
|
396
397
|
export * from './Enum/AccountsSectors';
|
|
397
398
|
export * from './Enum/ProductType';
|
package/ts/utils/brands.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { get as getLodash } from 'lodash';
|
|
|
2
2
|
import { BrandClementine } from '../types/Enum/BrandClementine';
|
|
3
3
|
import { BrandLegalstart } from '../types/Enum/BrandLegalstart';
|
|
4
4
|
import { BrandComptalib } from '../types/Enum/BrandComptalib';
|
|
5
|
+
import { BrandPourcentage } from '../types/Enum/BrandPourcentage';
|
|
5
6
|
|
|
6
7
|
type brand = {
|
|
7
8
|
idTypeBrand: number,
|
|
@@ -14,7 +15,7 @@ type getBrandConfigParams = {
|
|
|
14
15
|
nodeEnv?: string
|
|
15
16
|
};
|
|
16
17
|
|
|
17
|
-
const getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart'| 'Comptalib' | 'Clementine' => {
|
|
18
|
+
const getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart'| 'Comptalib' | 'Clementine' | 'Pourcentage' => {
|
|
18
19
|
if (nodeEnv) {
|
|
19
20
|
if (nodeEnv.indexOf('legalstart') > -1 || nodeEnv.indexOf('Legalstart') > -1) {
|
|
20
21
|
return 'Legalstart';
|
|
@@ -22,6 +23,9 @@ const getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart'| 'Comptalib' | 'C
|
|
|
22
23
|
if (nodeEnv.indexOf('comptalib') > -1 || nodeEnv.indexOf('Comptalib') > -1) {
|
|
23
24
|
return 'Comptalib';
|
|
24
25
|
}
|
|
26
|
+
if (nodeEnv.indexOf('pourcentage') > -1 || nodeEnv.indexOf('Pourcentage') > -1) {
|
|
27
|
+
return 'Pourcentage';
|
|
28
|
+
}
|
|
25
29
|
} else if (process.env.NODE_ENV) {
|
|
26
30
|
if (process.env.NODE_ENV.indexOf('legalstart') > -1 || process.env.NODE_ENV.indexOf('Legalstart') > -1) {
|
|
27
31
|
return 'Legalstart';
|
|
@@ -29,6 +33,9 @@ const getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart'| 'Comptalib' | 'C
|
|
|
29
33
|
if (process.env.NODE_ENV.indexOf('comptalib') > -1 || process.env.NODE_ENV.indexOf('Comptalib') > -1) {
|
|
30
34
|
return 'Comptalib';
|
|
31
35
|
}
|
|
36
|
+
if (process.env.NODE_ENV.indexOf('pourcentage') > -1 || process.env.NODE_ENV.indexOf('Pourcentage') > -1) {
|
|
37
|
+
return 'Pourcentage';
|
|
38
|
+
}
|
|
32
39
|
} else if (process.env.API_HOST) {
|
|
33
40
|
if (process.env.API_HOST.indexOf('legalstart') > -1 || process.env.API_HOST.indexOf('Legalstart') > -1) {
|
|
34
41
|
return 'Legalstart';
|
|
@@ -36,6 +43,9 @@ const getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart'| 'Comptalib' | 'C
|
|
|
36
43
|
if (process.env.API_HOST.indexOf('comptalib') > -1 || process.env.API_HOST.indexOf('Comptalib') > -1) {
|
|
37
44
|
return 'Comptalib';
|
|
38
45
|
}
|
|
46
|
+
if (process.env.API_HOST.indexOf('pourcentage') > -1 || process.env.API_HOST.indexOf('Pourcentage') > -1) {
|
|
47
|
+
return 'Pourcentage';
|
|
48
|
+
}
|
|
39
49
|
}
|
|
40
50
|
return 'Clementine';
|
|
41
51
|
};
|
|
@@ -43,7 +53,9 @@ const getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart'| 'Comptalib' | 'C
|
|
|
43
53
|
const getAllBrandByNodeEnv = (nodeEnv?: string): Array<brand> => {
|
|
44
54
|
const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;
|
|
45
55
|
const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);
|
|
46
|
-
const listEnvEnum = {
|
|
56
|
+
const listEnvEnum = {
|
|
57
|
+
BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage,
|
|
58
|
+
};
|
|
47
59
|
// @ts-ignore
|
|
48
60
|
const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];
|
|
49
61
|
|
|
@@ -59,7 +71,9 @@ const getBrandConfig = (params: getBrandConfigParams): brand => {
|
|
|
59
71
|
let brand;
|
|
60
72
|
const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;
|
|
61
73
|
const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);
|
|
62
|
-
const listEnvEnum = {
|
|
74
|
+
const listEnvEnum = {
|
|
75
|
+
BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage,
|
|
76
|
+
};
|
|
63
77
|
// @ts-ignore
|
|
64
78
|
const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];
|
|
65
79
|
|