@silexpert/core 1.1.251 → 1.1.253

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.
Files changed (102) hide show
  1. package/dist/cjs/api/resources/BudgetInsight.d.ts +2 -1
  2. package/dist/cjs/api/resources/BudgetInsight.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/BudgetInsight.js +3 -0
  4. package/dist/cjs/api/resources/BudgetInsight.js.map +1 -1
  5. package/dist/cjs/api/resources/CalendarEvent.d.ts +1 -0
  6. package/dist/cjs/api/resources/CalendarEvent.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/CalendarEvent.js +9 -0
  8. package/dist/cjs/api/resources/CalendarEvent.js.map +1 -1
  9. package/dist/cjs/types/Enum/Aspone.d.ts +4 -1
  10. package/dist/cjs/types/Enum/Aspone.d.ts.map +1 -1
  11. package/dist/cjs/types/Enum/Aspone.js +3 -0
  12. package/dist/cjs/types/Enum/Aspone.js.map +1 -1
  13. package/dist/cjs/types/Enum/BrandClementine.js +3 -3
  14. package/dist/cjs/types/Enum/BrandClementine.js.map +1 -1
  15. package/dist/cjs/types/Interface/api/bankAccount/Read.d.ts +1 -0
  16. package/dist/cjs/types/Interface/api/bankAccount/Read.d.ts.map +1 -1
  17. package/dist/cjs/types/Interface/api/bankAccount/Read.js.map +1 -1
  18. package/dist/cjs/types/Interface/api/budgetInsight/Delete.d.ts +6 -0
  19. package/dist/cjs/types/Interface/api/budgetInsight/Delete.d.ts.map +1 -0
  20. package/dist/cjs/types/Interface/api/budgetInsight/Delete.js +36 -0
  21. package/dist/cjs/types/Interface/api/budgetInsight/Delete.js.map +1 -0
  22. package/dist/cjs/types/Interface/api/notion/Read.d.ts +8 -0
  23. package/dist/cjs/types/Interface/api/notion/Read.d.ts.map +1 -0
  24. package/dist/cjs/types/Interface/api/notion/Read.js +3 -0
  25. package/dist/cjs/types/Interface/api/notion/Read.js.map +1 -0
  26. package/dist/cjs/types/Interface/models/ICollaboraterDetail.d.ts +1 -0
  27. package/dist/cjs/types/Interface/models/ICollaboraterDetail.d.ts.map +1 -1
  28. package/dist/cjs/types/Interface/models/ICollaboraterDetail.js.map +1 -1
  29. package/dist/cjs/types/Interface/models/IVatDeclarationSocietyDetail.d.ts +1 -0
  30. package/dist/cjs/types/Interface/models/IVatDeclarationSocietyDetail.d.ts.map +1 -1
  31. package/dist/cjs/types/Interface/models/IVatDeclarationSocietyDetail.js.map +1 -1
  32. package/dist/cjs/types/index.d.ts +1 -0
  33. package/dist/cjs/types/index.d.ts.map +1 -1
  34. package/dist/cjs/types/index.js +1 -0
  35. package/dist/cjs/types/index.js.map +1 -1
  36. package/dist/cjs/utils/bankAccount.d.ts.map +1 -1
  37. package/dist/cjs/utils/bankAccount.js +8 -3
  38. package/dist/cjs/utils/bankAccount.js.map +1 -1
  39. package/dist/cjs/utils/cerfa.d.ts +12 -1
  40. package/dist/cjs/utils/cerfa.d.ts.map +1 -1
  41. package/dist/cjs/utils/cerfa.js +29 -4
  42. package/dist/cjs/utils/cerfa.js.map +1 -1
  43. package/dist/cjs/utils/email/templates/signature.js +2 -2
  44. package/dist/cjs/utils/email/templates/signature.js.map +1 -1
  45. package/dist/mjs/api/resources/BudgetInsight.d.ts +2 -1
  46. package/dist/mjs/api/resources/BudgetInsight.d.ts.map +1 -1
  47. package/dist/mjs/api/resources/BudgetInsight.js +3 -0
  48. package/dist/mjs/api/resources/BudgetInsight.js.map +1 -1
  49. package/dist/mjs/api/resources/CalendarEvent.d.ts +1 -0
  50. package/dist/mjs/api/resources/CalendarEvent.d.ts.map +1 -1
  51. package/dist/mjs/api/resources/CalendarEvent.js +9 -0
  52. package/dist/mjs/api/resources/CalendarEvent.js.map +1 -1
  53. package/dist/mjs/types/Enum/Aspone.d.ts +4 -1
  54. package/dist/mjs/types/Enum/Aspone.d.ts.map +1 -1
  55. package/dist/mjs/types/Enum/Aspone.js +3 -0
  56. package/dist/mjs/types/Enum/Aspone.js.map +1 -1
  57. package/dist/mjs/types/Enum/BrandClementine.js +3 -3
  58. package/dist/mjs/types/Enum/BrandClementine.js.map +1 -1
  59. package/dist/mjs/types/Interface/api/bankAccount/Read.d.ts +1 -0
  60. package/dist/mjs/types/Interface/api/bankAccount/Read.d.ts.map +1 -1
  61. package/dist/mjs/types/Interface/api/bankAccount/Read.js.map +1 -1
  62. package/dist/mjs/types/Interface/api/budgetInsight/Delete.d.ts +6 -0
  63. package/dist/mjs/types/Interface/api/budgetInsight/Delete.d.ts.map +1 -0
  64. package/dist/mjs/types/Interface/api/budgetInsight/Delete.js +35 -0
  65. package/dist/mjs/types/Interface/api/budgetInsight/Delete.js.map +1 -0
  66. package/dist/mjs/types/Interface/api/notion/Read.d.ts +8 -0
  67. package/dist/mjs/types/Interface/api/notion/Read.d.ts.map +1 -0
  68. package/dist/mjs/types/Interface/api/notion/Read.js +2 -0
  69. package/dist/mjs/types/Interface/api/notion/Read.js.map +1 -0
  70. package/dist/mjs/types/Interface/models/ICollaboraterDetail.d.ts +1 -0
  71. package/dist/mjs/types/Interface/models/ICollaboraterDetail.d.ts.map +1 -1
  72. package/dist/mjs/types/Interface/models/ICollaboraterDetail.js.map +1 -1
  73. package/dist/mjs/types/Interface/models/IVatDeclarationSocietyDetail.d.ts +1 -0
  74. package/dist/mjs/types/Interface/models/IVatDeclarationSocietyDetail.d.ts.map +1 -1
  75. package/dist/mjs/types/Interface/models/IVatDeclarationSocietyDetail.js.map +1 -1
  76. package/dist/mjs/types/index.d.ts +1 -0
  77. package/dist/mjs/types/index.d.ts.map +1 -1
  78. package/dist/mjs/types/index.js +1 -0
  79. package/dist/mjs/types/index.js.map +1 -1
  80. package/dist/mjs/utils/bankAccount.d.ts.map +1 -1
  81. package/dist/mjs/utils/bankAccount.js +8 -3
  82. package/dist/mjs/utils/bankAccount.js.map +1 -1
  83. package/dist/mjs/utils/cerfa.d.ts +12 -1
  84. package/dist/mjs/utils/cerfa.d.ts.map +1 -1
  85. package/dist/mjs/utils/cerfa.js +29 -3
  86. package/dist/mjs/utils/cerfa.js.map +1 -1
  87. package/dist/mjs/utils/email/templates/signature.js +2 -2
  88. package/dist/mjs/utils/email/templates/signature.js.map +1 -1
  89. package/package.json +1 -1
  90. package/ts/api/resources/BudgetInsight.ts +5 -1
  91. package/ts/api/resources/CalendarEvent.ts +11 -0
  92. package/ts/types/Enum/Aspone.ts +3 -0
  93. package/ts/types/Enum/BrandClementine.ts +3 -3
  94. package/ts/types/Interface/api/bankAccount/Read.ts +1 -0
  95. package/ts/types/Interface/api/budgetInsight/Delete.ts +19 -0
  96. package/ts/types/Interface/api/notion/Read.ts +7 -0
  97. package/ts/types/Interface/models/ICollaboraterDetail.ts +1 -0
  98. package/ts/types/Interface/models/IVatDeclarationSocietyDetail.ts +1 -0
  99. package/ts/types/index.ts +1 -0
  100. package/ts/utils/bankAccount.ts +13 -4
  101. package/ts/utils/cerfa.ts +32 -5
  102. package/ts/utils/email/templates/signature.ts +2 -2
@@ -1,12 +1,38 @@
1
1
  import { GlobalRegime } from '../types/Enum/GlobalRegime';
2
+ import { Code, ErrorType } from '../types';
3
+ import { isDefined } from 'class-validator';
4
+ export class ServiceException extends Error {
5
+ code;
6
+ type;
7
+ constructor(params) {
8
+ if (typeof params === 'string') {
9
+ super(params);
10
+ return;
11
+ }
12
+ super(params.message);
13
+ this.code = params.code;
14
+ this.type = params.type;
15
+ }
16
+ }
2
17
  export function retrieveCerfaFromSocietyInformations(idLegalForm, idTaxSystem, idFiscalRegime, profitsType) {
3
18
  const globalRegimes = Object.values(GlobalRegime);
4
19
  const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
5
20
  if (!selectedGlobalRegime)
6
- throw new Error('Missing informations to retrieve CERFA informations');
21
+ throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Votre raison sociale ne vous permet pas de générer votre bilan chez nous' });
22
+ if (!isDefined(idFiscalRegime) || !isDefined(profitsType) || !isDefined(idTaxSystem)) {
23
+ const missingData = [];
24
+ if (!isDefined(idFiscalRegime))
25
+ missingData.push('Régime de droit commun');
26
+ if (!isDefined(profitsType))
27
+ missingData.push('Régime d\'imposition');
28
+ if (!isDefined(idTaxSystem))
29
+ missingData.push('Activité (BNC, BIC)');
30
+ const errorMEssage = `Les informations suivantes sont manquantes pour déterminer votre régime ficscal: ${missingData.join(', ')}`;
31
+ throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: errorMEssage });
32
+ }
7
33
  const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);
8
34
  if (choiceIndex < 0)
9
- throw new Error('Missing informations to retrieve CERFA informations');
35
+ throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Au vu des informations remplis, nous somme dans l\'incapacité de générer votre bilan chez nous' });
10
36
  const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];
11
37
  return { declaration, annex: annexe ?? null };
12
38
  }
@@ -14,7 +40,7 @@ export function retreiveChoicesDependingLegalForm(idLegalForm) {
14
40
  const globalRegimes = Object.values(GlobalRegime);
15
41
  const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
16
42
  if (!selectedGlobalRegime)
17
- throw new Error(`LegalForm #${idLegalForm} not implemented`);
43
+ throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: `LegalForm #${idLegalForm} not implemented` });
18
44
  return selectedGlobalRegime;
19
45
  }
20
46
  //# sourceMappingURL=cerfa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cerfa.js","sourceRoot":"","sources":["../../../ts/utils/cerfa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAA2B,MAAM,4BAA4B,CAAC;AAGnF,MAAM,UAAU,oCAAoC,CAAC,WAAmB,EAAE,WAAsB,EAAE,cAA4B,EAAE,WAAwB;IACtJ,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAClD,MAAM,oBAAoB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IAE/F,IAAI,CAAC,oBAAoB;QAAE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IAElG,MAAM,WAAW,GAAG,oBAAoB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,cAAc,KAAK,cAAc,IAAI,GAAG,CAAC,WAAW,KAAK,WAAW,IAAI,GAAG,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC;IAEjL,IAAI,WAAW,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IAE5F,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAE1E,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,IAAI,IAAI,EAAE,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,iCAAiC,CAAC,WAAmB;IACnE,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAClD,MAAM,oBAAoB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IAE/F,IAAI,CAAC,oBAAoB;QAAE,MAAM,IAAI,KAAK,CAAC,cAAc,WAAW,kBAAkB,CAAC,CAAC;IACxF,OAAO,oBAAoB,CAAC;AAC9B,CAAC","sourcesContent":["import { ReadCerfaToComplete } from '../types/Interface/api/cerfa/ReadCerfa';\nimport { GlobalRegime, GlobalRegimeTypeContent } from '../types/Enum/GlobalRegime';\nimport { ProfitsType, FiscalRegime, TaxSystem } from '../types';\n\nexport function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxSystem: TaxSystem, idFiscalRegime: FiscalRegime, profitsType: ProfitsType):ReadCerfaToComplete {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw new Error('Missing informations to retrieve CERFA informations');\n\n const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);\n\n if (choiceIndex < 0) throw new Error('Missing informations to retrieve CERFA informations');\n\n const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];\n\n return { declaration, annex: annexe ?? null };\n}\n\nexport function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRegimeTypeContent {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw new Error(`LegalForm #${idLegalForm} not implemented`);\n return selectedGlobalRegime;\n}"]}
1
+ {"version":3,"file":"cerfa.js","sourceRoot":"","sources":["../../../ts/utils/cerfa.ts"],"names":[],"mappings":"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","sourcesContent":["import { ReadCerfaToComplete } from '../types/Interface/api/cerfa/ReadCerfa';\nimport { GlobalRegime, GlobalRegimeTypeContent } from '../types/Enum/GlobalRegime';\nimport { ProfitsType, FiscalRegime, TaxSystem, Code, ErrorType } from '../types';\nimport { isDefined } from 'class-validator';\n\ntype ErrorParams = { code: Code, type: ErrorType, message?: string } | string;\n\nexport class ServiceException extends Error {\n private readonly code: Code;\n\n private readonly type: ErrorType;\n\n constructor(params: ErrorParams) {\n if (typeof params === 'string') {\n super(params);\n return;\n }\n super(params.message);\n this.code = params.code;\n this.type = params.type;\n }\n}\n\nexport function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxSystem: TaxSystem, idFiscalRegime: FiscalRegime, profitsType: ProfitsType):ReadCerfaToComplete {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Votre raison sociale ne vous permet pas de générer votre bilan chez nous' });\n\n if (!isDefined(idFiscalRegime) || !isDefined(profitsType) || !isDefined(idTaxSystem)) {\n const missingData: string[] = [];\n if (!isDefined(idFiscalRegime)) missingData.push('Régime de droit commun');\n if (!isDefined(profitsType)) missingData.push('Régime d\\'imposition');\n if (!isDefined(idTaxSystem)) missingData.push('Activité (BNC, BIC)');\n const errorMEssage = `Les informations suivantes sont manquantes pour déterminer votre régime ficscal: ${missingData.join(', ')}`;\n throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: errorMEssage });\n }\n\n const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);\n\n if (choiceIndex < 0) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Au vu des informations remplis, nous somme dans l\\'incapacité de générer votre bilan chez nous' });\n const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];\n\n return { declaration, annex: annexe ?? null };\n}\n\nexport function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRegimeTypeContent {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: `LegalForm #${idLegalForm} not implemented` });\n return selectedGlobalRegime;\n}"]}
@@ -189,8 +189,8 @@ ${logoClementine}
189
189
  <% } %>
190
190
  Nos horaires : <%= horaires %>
191
191
 
192
- <% if(!['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>
193
- Adresse : <%- brandPostalAddress %> - <%- brandCity %>
192
+ <% if(['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>
193
+ <br/>Adresse : 11, Boulevard Victor Hugo - Nice
194
194
  <% } %>
195
195
  </p>
196
196
 
@@ -1 +1 @@
1
- {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../../ts/utils/email/templates/signature.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;;;;;;;;;GASb,CAAC;AAEJ,MAAM,cAAc,GAAG;;;;;;;;;;;;aAYV,CAAC;AAEd,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;UAuBL,CAAC;AAEX,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGd,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,OAAO;;;;;;;EAOzC,cAAc;;;IAGZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiGN,MAAM;;;;;;;;;SASD,CAAC","sourcesContent":["const newIban = `<% if (commercialName === 'Clementine' && isFacturation) { %>\n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Nos coordonnées bancaires </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n <% }else if (commercialName === 'Pourcentage' && [5, 7].includes(idTypeBrand)) { %> \n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Attention changement de RIB </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n<% } %>\n `;\n\nconst logoClementine = `<% if (commercialName === 'Clementine') { %><tr>\n<td\ncolspan=\"3\"\nclass=\"logo\"\nstyle=\"\"\nwidth=\"950\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/logo_2022.png\"\n alt=\"Logo\"\n height=\"32\"\n style=\"padding-bottom: 10px;\">\n</td>\n</tr><% } %>`;\n\nconst avatar = `<% if (!forceRole && user?.avatar?.token) { %>\n <td\n class=\"avatar\"\n style=\"text-align:center; padding: 20px 0 20px 20px; position: relative;\"\n width=\"100\">\n <% if(commercialName === 'Clementine') { %>\n <p style=\"padding: 20px;background-image: url('https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_quotes.png');background-size: 26%;background-position: 81% -3%;background-repeat: no-repeat;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } else { %>\n <p style=\"padding: 20px;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } %>\n </td>\n <% } %>`;\n\nconst footer = `<% if(commercialName === 'Clementine') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td colspan=\"7\" style=\"padding-bottom: 12px\">\n <span style=\"text-align: left; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: left;\">\n Une question ? Découvrez votre <a href=\"https://www.clementine.fr/aide/\" style=\"color: #FF7E3C\">centre d'aide</a>\n </span>\n <span style=\"text-align: right; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: right;\">\n Jusqu’à 500€ avec notre <a href=\"https://www.clementine.fr/parrainage/?utm_source=signature&utm_medium=email&utm_campaign=signature&utm_content=cta\" style=\"color: #FF7E3C\">programme de parrainage</a>\n </span>\n </td>\n </tr>\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.clementine.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"padding:0 10px 0 0\" width=\"170\">\n <!-- <a href=\"mailto:<%= supportMail %>\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_support2.png\"\n style=\"vertical-align: text-top;\"\n width=\"17\"\n alt=\"Support technique\"> Support technique\n </a>-->\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!--<span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.myclementine&hl=fr\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>-->\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.youtube.com/channel/UCVnCpcLdRwuYBLvAphHsvig/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_youtube.png\"\n alt=\"YouTube\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.linkedin.com/company/compta-cl%C3%A9mentine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_linkedin.png\"\n alt=\"LinkedIn\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.instagram.com/comptaclementine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_instagram.png\"\n alt=\"Instagram\"\n style=\"width: 20px\"></a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } else if(commercialName === 'Pourcentage') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.pourcentage.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!-- <span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/pourcentage-fr/id1631156043\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.pourcentage\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a> -->\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } %>\n`;\n\nexport const signatureTemplate = `${newIban}<table\nborder=\"0\"\ncellpadding=\"0\"\ncellspacing=\"0\"\nwidth=\"950\"\nclass=\"signatureClementine\">\n\n${logoClementine}\n\n<tr style=\"background: #F4F8FB\">\n ${avatar}\n <td\n class=\"infos\"\n style=\" padding: 20px 0 20px 30px;font-size: 17px; font-family: Arial; color:#000\"\n width=\"390\"\n colspan=\"2\">\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"390\">\n <tr>\n <td width=\"390\">\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <strong><span style=\"color:<%= primaryColor %>; font-weight: bold;\"><%= user?.firstname ?? '' %> <%= user?.lastname ?? '' %></span></strong>\n </p>\n\n <% if(roleSignature) { %>\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <span style=\"color: #6E6E71; font-weight: bold;\"><%= roleSignature %></span>\n </p>\n <% } %>\n </td>\n </tr>\n </table>\n <p style=\"margin:16px 0; color:#6E6E71; border-top: 2px solid #6E6E71; width: 100px; opacity: 0.2\"><!-- --></p>\n <p style=\"margin:0px 0; padding:0 0 4px; color:#6E6E71;\">\n Standard : <%- standardPhoneSignature %><br/>\n <% if(phoneSignature && phoneSignature !== standardPhoneSignature) { %>\n Ligne directe : <%- phoneSignature %><br/>\n <% } %>\n Nos horaires : <%= horaires %>\n\n <% if(!['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>\n Adresse : <%- brandPostalAddress %> - <%- brandCity %>\n <% } %>\n </p>\n\n </td>\n \n <td class=\"infos\" style=\"padding: 20px 20px 20px 0px; font-size: 17px; font-family: Arial; color:#000; <%= !user.calendlyUrl ? 'vertical-align: top;' : '' %>\"\n width=\"370\">\n <% if(['Clementine', 'Pourcentage', 'Comptalib'].includes(commercialName)) { %>\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"350\">\n <tr>\n <td width=\"230\">\n <!-- image Télécharger l'app mobile -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_download_app<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n alt=\"Télécharger l'application mobile\"\n style=\"width: 152px; float:right\">\n \n <p style=\"float:right; margin-right: 45px\">\n <span style=\"margin:0; padding:0 0 4px; color:#6E6E71;\">Disponible sur<br/></span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.myclementine&hl=fr\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>\n </p>\n </td>\n <td width=\"120\">\n <!-- QR Code -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_qrcode<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n style=\"width:128px\"\n alt=\"Prenez rendez-vous ici !\">\n </td>\n </tr>\n <tr>\n <td colspan=\"2\">\n <p style=\"margin:0; padding:0px 0 4px; color:#6E6E71; text-align: right\">\n <a href=\"https://www.smileyourpla.net/\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_smileYourPlanet.png\"\n alt=\"Initiative Smile your planet\" height=\"36\"></a>\n <% if(user.calendlyUrl && !isDataOfficer) { %>\n <a href=\"<%= user.calendlyUrl %>\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %>.png\"\n alt=\"Demande de rdv téléphonique\">\n </a>\n <% } %>\n </p>\n </td>\n </tr>\n </table>\n <% } %>\n </td>\n </tr>\n \n ${footer}\n\n <tr>\n <td\n style=\"clear:both; padding-top: 20px; font-size:14px; line-height:18px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n Les informations contenues dans ce courrier électronique et ses pièces jointes sont confidentielles et couvertes par le secret professionnel. Si vous n'êtes pas le(s) destinataire(s) ou avez reçu ce courrier électronique par erreur, merci de bien vouloir supprimer l'email et d'en informer l'expéditeur dès que possible. Ce courrier électronique ne peut pas être divulgué, utilisé ou copié par quelqu'un d'autre que le(s) destinataire(s).\n </td>\n</tr>\n</table>`;"]}
1
+ {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../../ts/utils/email/templates/signature.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;;;;;;;;;GASb,CAAC;AAEJ,MAAM,cAAc,GAAG;;;;;;;;;;;;aAYV,CAAC;AAEd,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;UAuBL,CAAC;AAEX,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGd,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,OAAO;;;;;;;EAOzC,cAAc;;;IAGZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiGN,MAAM;;;;;;;;;SASD,CAAC","sourcesContent":["const newIban = `<% if (commercialName === 'Clementine' && isFacturation) { %>\n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Nos coordonnées bancaires </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n <% }else if (commercialName === 'Pourcentage' && [5, 7].includes(idTypeBrand)) { %> \n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Attention changement de RIB </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n<% } %>\n `;\n\nconst logoClementine = `<% if (commercialName === 'Clementine') { %><tr>\n<td\ncolspan=\"3\"\nclass=\"logo\"\nstyle=\"\"\nwidth=\"950\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/logo_2022.png\"\n alt=\"Logo\"\n height=\"32\"\n style=\"padding-bottom: 10px;\">\n</td>\n</tr><% } %>`;\n\nconst avatar = `<% if (!forceRole && user?.avatar?.token) { %>\n <td\n class=\"avatar\"\n style=\"text-align:center; padding: 20px 0 20px 20px; position: relative;\"\n width=\"100\">\n <% if(commercialName === 'Clementine') { %>\n <p style=\"padding: 20px;background-image: url('https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_quotes.png');background-size: 26%;background-position: 81% -3%;background-repeat: no-repeat;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } else { %>\n <p style=\"padding: 20px;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } %>\n </td>\n <% } %>`;\n\nconst footer = `<% if(commercialName === 'Clementine') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td colspan=\"7\" style=\"padding-bottom: 12px\">\n <span style=\"text-align: left; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: left;\">\n Une question ? Découvrez votre <a href=\"https://www.clementine.fr/aide/\" style=\"color: #FF7E3C\">centre d'aide</a>\n </span>\n <span style=\"text-align: right; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: right;\">\n Jusqu’à 500€ avec notre <a href=\"https://www.clementine.fr/parrainage/?utm_source=signature&utm_medium=email&utm_campaign=signature&utm_content=cta\" style=\"color: #FF7E3C\">programme de parrainage</a>\n </span>\n </td>\n </tr>\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.clementine.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"padding:0 10px 0 0\" width=\"170\">\n <!-- <a href=\"mailto:<%= supportMail %>\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_support2.png\"\n style=\"vertical-align: text-top;\"\n width=\"17\"\n alt=\"Support technique\"> Support technique\n </a>-->\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!--<span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.myclementine&hl=fr\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>-->\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.youtube.com/channel/UCVnCpcLdRwuYBLvAphHsvig/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_youtube.png\"\n alt=\"YouTube\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.linkedin.com/company/compta-cl%C3%A9mentine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_linkedin.png\"\n alt=\"LinkedIn\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.instagram.com/comptaclementine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_instagram.png\"\n alt=\"Instagram\"\n style=\"width: 20px\"></a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } else if(commercialName === 'Pourcentage') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.pourcentage.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!-- <span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/pourcentage-fr/id1631156043\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.pourcentage\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a> -->\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } %>\n`;\n\nexport const signatureTemplate = `${newIban}<table\nborder=\"0\"\ncellpadding=\"0\"\ncellspacing=\"0\"\nwidth=\"950\"\nclass=\"signatureClementine\">\n\n${logoClementine}\n\n<tr style=\"background: #F4F8FB\">\n ${avatar}\n <td\n class=\"infos\"\n style=\" padding: 20px 0 20px 30px;font-size: 17px; font-family: Arial; color:#000\"\n width=\"390\"\n colspan=\"2\">\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"390\">\n <tr>\n <td width=\"390\">\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <strong><span style=\"color:<%= primaryColor %>; font-weight: bold;\"><%= user?.firstname ?? '' %> <%= user?.lastname ?? '' %></span></strong>\n </p>\n\n <% if(roleSignature) { %>\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <span style=\"color: #6E6E71; font-weight: bold;\"><%= roleSignature %></span>\n </p>\n <% } %>\n </td>\n </tr>\n </table>\n <p style=\"margin:16px 0; color:#6E6E71; border-top: 2px solid #6E6E71; width: 100px; opacity: 0.2\"><!-- --></p>\n <p style=\"margin:0px 0; padding:0 0 4px; color:#6E6E71;\">\n Standard : <%- standardPhoneSignature %><br/>\n <% if(phoneSignature && phoneSignature !== standardPhoneSignature) { %>\n Ligne directe : <%- phoneSignature %><br/>\n <% } %>\n Nos horaires : <%= horaires %>\n\n <% if(['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>\n <br/>Adresse : 11, Boulevard Victor Hugo - Nice\n <% } %>\n </p>\n\n </td>\n \n <td class=\"infos\" style=\"padding: 20px 20px 20px 0px; font-size: 17px; font-family: Arial; color:#000; <%= !user.calendlyUrl ? 'vertical-align: top;' : '' %>\"\n width=\"370\">\n <% if(['Clementine', 'Pourcentage', 'Comptalib'].includes(commercialName)) { %>\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"350\">\n <tr>\n <td width=\"230\">\n <!-- image Télécharger l'app mobile -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_download_app<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n alt=\"Télécharger l'application mobile\"\n style=\"width: 152px; float:right\">\n \n <p style=\"float:right; margin-right: 45px\">\n <span style=\"margin:0; padding:0 0 4px; color:#6E6E71;\">Disponible sur<br/></span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.myclementine&hl=fr\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>\n </p>\n </td>\n <td width=\"120\">\n <!-- QR Code -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_qrcode<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n style=\"width:128px\"\n alt=\"Prenez rendez-vous ici !\">\n </td>\n </tr>\n <tr>\n <td colspan=\"2\">\n <p style=\"margin:0; padding:0px 0 4px; color:#6E6E71; text-align: right\">\n <a href=\"https://www.smileyourpla.net/\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_smileYourPlanet.png\"\n alt=\"Initiative Smile your planet\" height=\"36\"></a>\n <% if(user.calendlyUrl && !isDataOfficer) { %>\n <a href=\"<%= user.calendlyUrl %>\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %>.png\"\n alt=\"Demande de rdv téléphonique\">\n </a>\n <% } %>\n </p>\n </td>\n </tr>\n </table>\n <% } %>\n </td>\n </tr>\n \n ${footer}\n\n <tr>\n <td\n style=\"clear:both; padding-top: 20px; font-size:14px; line-height:18px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n Les informations contenues dans ce courrier électronique et ses pièces jointes sont confidentielles et couvertes par le secret professionnel. Si vous n'êtes pas le(s) destinataire(s) ou avez reçu ce courrier électronique par erreur, merci de bien vouloir supprimer l'email et d'en informer l'expéditeur dès que possible. Ce courrier électronique ne peut pas être divulgué, utilisé ou copié par quelqu'un d'autre que le(s) destinataire(s).\n </td>\n</tr>\n</table>`;"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.1.251",
3
+ "version": "1.1.253",
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": "dist/cjs/index.js",
@@ -1,5 +1,5 @@
1
1
  import { Resource } from '../Resource';
2
- import { CreateOrUpdateAccessToken, IAccessToken, ReadTemporaryCode, ReadUserConnection } from '../../types';
2
+ import { CreateOrUpdateAccessToken, DeleteBudgetInsightConnection, IAccessToken, ReadTemporaryCode, ReadUserConnection } from '../../types';
3
3
 
4
4
  export class BudgetInsight extends Resource {
5
5
  getTokens(): Promise<IAccessToken | null> {
@@ -21,4 +21,8 @@ export class BudgetInsight extends Resource {
21
21
  getAllConnections(): Promise<ReadUserConnection[]> {
22
22
  return this.axios.$get('/connectors/budget-insight/connections');
23
23
  }
24
+
25
+ deleteConnection(payload: DeleteBudgetInsightConnection): Promise<true> {
26
+ return this.axios.$delete('/connectors/budget-insight/connections', { params: payload });
27
+ }
24
28
  }
@@ -29,6 +29,17 @@ export class CalendarEvent extends Resource {
29
29
  return this.axios.$get('/calendar-events/calculate-realtime-event', { params });
30
30
  }
31
31
 
32
+ public exportCalendarEventCalendly(params: GetAllCalendarEvent): Promise<void> {
33
+ return this.axios.$get('/calendar-events/calendly', {
34
+ responseType: 'arraybuffer',
35
+ headers: {
36
+ Accept: 'application/csv',
37
+ },
38
+ params,
39
+ });
40
+
41
+ }
42
+
32
43
  update(id: number, payload: UpdateCalendarEvent): Promise<ICalendarEvent> {
33
44
  return this.axios.$put(`/calendar-events/${id}`, payload);
34
45
  }
@@ -8,9 +8,12 @@ export enum RedactorDesignation {
8
8
  export enum Rof {
9
9
  TVA = 'TVA1',
10
10
  BNC = 'BNC1',
11
+ BNC2 = 'BNC2',
12
+ BNC3 = 'BNC3',
11
13
  IS = 'IS1',
12
14
  BIC = 'BIC1',
13
15
  BIC2 = 'BIC2',
16
+ BIC3 = 'BIC3',
14
17
  }
15
18
 
16
19
  export enum AsponeTaxSystem {
@@ -314,9 +314,9 @@ export const BrandClementine = [
314
314
  footerColor: '#f3692f',
315
315
  },
316
316
  listPhones: {
317
- contact: '01 76 39 00 60',
318
- qualite: '01 76 39 00 60',
319
- juridique: '01 76 39 00 60',
317
+ contact: '03 83 93 14 14',
318
+ qualite: '03 83 93 14 14',
319
+ juridique: '03 83 93 14 14',
320
320
  },
321
321
  listMails: {
322
322
  contact: 'comptastart@legalstart.fr',
@@ -14,4 +14,5 @@ export type ReadBankAccountTransactionsIntermediateSolde = {
14
14
  balanceBankAccount: number;
15
15
  difference: number | null;
16
16
  noBalanceInfoForDay?: boolean;
17
+ isRelatedToAccountingFile: boolean;
17
18
  };
@@ -0,0 +1,19 @@
1
+ import { IsBoolean, IsInt, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+
5
+ export class DeleteBudgetInsightConnection {
6
+ @ApiProperty()
7
+ @IsInt()
8
+ idSociety: number;
9
+
10
+ @ApiProperty()
11
+ @IsInt()
12
+ idBudgetConnection: number;
13
+
14
+ @ApiPropertyOptional()
15
+ @IsBoolean()
16
+ @ToBoolean()
17
+ @IsOptional()
18
+ shouldDeleteBankAccounts?: boolean;
19
+ }
@@ -0,0 +1,7 @@
1
+ export type ReadNotionNews = {
2
+ id: string,
3
+ html: string,
4
+ environment: string[],
5
+ site: string,
6
+ type: string,
7
+ };
@@ -7,6 +7,7 @@ export interface ICollaboraterDetail {
7
7
  idNationality: number;
8
8
  idCountryOfBirth: number;
9
9
  maidenName?: string | null;
10
+ birthdate: Date;
10
11
  socialSecurityNumber: string;
11
12
  cityOfBirth: string;
12
13
  address: string;
@@ -5,6 +5,7 @@ import { ISociety } from './ISociety';
5
5
  export interface IVatDeclarationSocietyDetail {
6
6
  id?: number;
7
7
  companyTaxRof: Rof | null;
8
+ balanceSheetRof: Rof | null;
8
9
  rof: Rof | null;
9
10
  ogaName: string | null;
10
11
  ogaId: string | null;
package/ts/types/index.ts CHANGED
@@ -850,6 +850,7 @@ export * from './Interface/api/sponsorship/ReadSponsorship';
850
850
  export * from './Interface/api/budgetInsight/UpdateBudgetPermanentToken';
851
851
  export * from './Interface/api/budgetInsight/Read';
852
852
  export * from './Interface/api/budgetInsight/Create';
853
+ export * from './Interface/api/budgetInsight/Delete';
853
854
  export * from './Interface/api/budgetInsight/Query';
854
855
  export * from './Interface/api/partneredAccountant/ReadPartneredAccountant';
855
856
  export * from './Interface/api/partneredAccountant/QueryPartneredAccountantSocieties';
@@ -18,11 +18,20 @@ export function isSynchro(params: IBankAccount, dateOfTermination?: Date, bankCo
18
18
  // // Si JE DECLARE ou AUTRE alors tjs synchro
19
19
  if (params.idPartnerType && [PartnerTransactionType.JE_DECLARE, PartnerTransactionType.OTHER].includes(params.idPartnerType)) return StateSynchro.SYNCHRONIZED;
20
20
 
21
- // // Si budget et lastUpdate = la date du jour alors synchro
21
+ /** Si budget lastUpdate = la date du jour alors synchro
22
+ * Ou si lastupdate = inProgressImport et lastupdate est après lastTryImport
23
+ */
22
24
  if (params.idPartnerType && params.lastUpdate &&
23
- [PartnerTransactionType.QONTO, PartnerTransactionType.SHINE, PartnerTransactionType.BUDGET_INSIGHT].includes(params.idPartnerType) &&
24
- dayjs(params.lastUpdate).format('YYYY-MM-DD') === dayjs().format('YYYY-MM-DD')
25
- && (!bankConnection || bankConnection?.errorCode === null)
25
+ [PartnerTransactionType.QONTO, PartnerTransactionType.SHINE, PartnerTransactionType.BUDGET_INSIGHT].includes(params.idPartnerType)
26
+ &&
27
+ (
28
+ (dayjs(params.lastUpdate).format('YYYY-MM-DD') === dayjs().format('YYYY-MM-DD') ) || // si lastUpdate = date du jour OU
29
+ (
30
+ dayjs(params.lastUpdate).format('YYYY-MM-DD') === dayjs(params.inProgressImport).format('YYYY-MM-DD') &&
31
+ (!params.lastTryImport || dayjs(params.lastUpdate).format('YYYYMMDD') >= dayjs(params.lastTryImport).format('YYYYMMDD'))
32
+ )
33
+ )
34
+ && (!bankConnection || bankConnection?.errorCode === null)
26
35
  ) return StateSynchro.SYNCHRONIZED;
27
36
 
28
37
  if (dateOfTermination && (dayjs(params.lastUpdate).isAfter(dateOfTermination) || dayjs(params.lastUpdate).isSame(dateOfTermination))) return StateSynchro.SYNCHRONIZED;
package/ts/utils/cerfa.ts CHANGED
@@ -1,17 +1,44 @@
1
1
  import { ReadCerfaToComplete } from '../types/Interface/api/cerfa/ReadCerfa';
2
2
  import { GlobalRegime, GlobalRegimeTypeContent } from '../types/Enum/GlobalRegime';
3
- import { ProfitsType, FiscalRegime, TaxSystem } from '../types';
3
+ import { ProfitsType, FiscalRegime, TaxSystem, Code, ErrorType } from '../types';
4
+ import { isDefined } from 'class-validator';
5
+
6
+ type ErrorParams = { code: Code, type: ErrorType, message?: string } | string;
7
+
8
+ export class ServiceException extends Error {
9
+ private readonly code: Code;
10
+
11
+ private readonly type: ErrorType;
12
+
13
+ constructor(params: ErrorParams) {
14
+ if (typeof params === 'string') {
15
+ super(params);
16
+ return;
17
+ }
18
+ super(params.message);
19
+ this.code = params.code;
20
+ this.type = params.type;
21
+ }
22
+ }
4
23
 
5
24
  export function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxSystem: TaxSystem, idFiscalRegime: FiscalRegime, profitsType: ProfitsType):ReadCerfaToComplete {
6
25
  const globalRegimes = Object.values(GlobalRegime);
7
26
  const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
8
27
 
9
- if (!selectedGlobalRegime) throw new Error('Missing informations to retrieve CERFA informations');
28
+ if (!selectedGlobalRegime) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Votre raison sociale ne vous permet pas de générer votre bilan chez nous' });
10
29
 
11
- const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);
30
+ if (!isDefined(idFiscalRegime) || !isDefined(profitsType) || !isDefined(idTaxSystem)) {
31
+ const missingData: string[] = [];
32
+ if (!isDefined(idFiscalRegime)) missingData.push('Régime de droit commun');
33
+ if (!isDefined(profitsType)) missingData.push('Régime d\'imposition');
34
+ if (!isDefined(idTaxSystem)) missingData.push('Activité (BNC, BIC)');
35
+ const errorMEssage = `Les informations suivantes sont manquantes pour déterminer votre régime ficscal: ${missingData.join(', ')}`;
36
+ throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: errorMEssage });
37
+ }
12
38
 
13
- if (choiceIndex < 0) throw new Error('Missing informations to retrieve CERFA informations');
39
+ const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);
14
40
 
41
+ if (choiceIndex < 0) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Au vu des informations remplis, nous somme dans l\'incapacité de générer votre bilan chez nous' });
15
42
  const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];
16
43
 
17
44
  return { declaration, annex: annexe ?? null };
@@ -21,6 +48,6 @@ export function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRe
21
48
  const globalRegimes = Object.values(GlobalRegime);
22
49
  const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
23
50
 
24
- if (!selectedGlobalRegime) throw new Error(`LegalForm #${idLegalForm} not implemented`);
51
+ if (!selectedGlobalRegime) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: `LegalForm #${idLegalForm} not implemented` });
25
52
  return selectedGlobalRegime;
26
53
  }
@@ -193,8 +193,8 @@ ${logoClementine}
193
193
  <% } %>
194
194
  Nos horaires : <%= horaires %>
195
195
 
196
- <% if(!['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>
197
- Adresse : <%- brandPostalAddress %> - <%- brandCity %>
196
+ <% if(['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>
197
+ <br/>Adresse : 11, Boulevard Victor Hugo - Nice
198
198
  <% } %>
199
199
  </p>
200
200