@silexpert/core 1.0.76 → 1.0.78

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 (47) hide show
  1. package/es/api/resources/Library.d.ts +2 -1
  2. package/es/api/resources/Library.d.ts.map +1 -1
  3. package/es/api/resources/Library.js +3 -0
  4. package/es/api/resources/Library.js.map +1 -1
  5. package/es/types/Enum/PrestationOption.d.ts +1 -1
  6. package/es/types/Enum/PrestationOption.js +5 -5
  7. package/es/types/Enum/PrestationOption.js.map +1 -1
  8. package/es/types/Enum/PrestationType.js +1 -1
  9. package/es/types/Enum/PrestationType.js.map +1 -1
  10. package/es/types/Interface/api/gedFile/updateGedFile.d.ts +11 -0
  11. package/es/types/Interface/api/gedFile/updateGedFile.d.ts.map +1 -0
  12. package/es/types/Interface/api/gedFile/updateGedFile.js +45 -0
  13. package/es/types/Interface/api/gedFile/updateGedFile.js.map +1 -0
  14. package/es/types/Interface/api/library/QueryLibrary.d.ts +12 -2
  15. package/es/types/Interface/api/library/QueryLibrary.d.ts.map +1 -1
  16. package/es/types/Interface/api/library/QueryLibrary.js +36 -2
  17. package/es/types/Interface/api/library/QueryLibrary.js.map +1 -1
  18. package/es/types/index.d.ts +1 -0
  19. package/es/types/index.d.ts.map +1 -1
  20. package/es/types/index.js +1 -0
  21. package/es/types/index.js.map +1 -1
  22. package/es/utils/siretValidation.d.ts +1 -0
  23. package/es/utils/siretValidation.d.ts.map +1 -1
  24. package/es/utils/siretValidation.js +13 -0
  25. package/es/utils/siretValidation.js.map +1 -1
  26. package/js/api/resources/Library.js +4 -0
  27. package/js/api/resources/Library.js.map +1 -1
  28. package/js/types/Enum/PrestationOption.js +5 -5
  29. package/js/types/Enum/PrestationOption.js.map +1 -1
  30. package/js/types/Enum/PrestationType.js +1 -1
  31. package/js/types/Enum/PrestationType.js.map +1 -1
  32. package/js/types/Interface/api/gedFile/updateGedFile.js +41 -0
  33. package/js/types/Interface/api/gedFile/updateGedFile.js.map +1 -0
  34. package/js/types/Interface/api/library/QueryLibrary.js +23 -3
  35. package/js/types/Interface/api/library/QueryLibrary.js.map +1 -1
  36. package/js/types/index.js +12 -0
  37. package/js/types/index.js.map +1 -1
  38. package/js/utils/siretValidation.js +17 -0
  39. package/js/utils/siretValidation.js.map +1 -1
  40. package/package.json +1 -1
  41. package/ts/api/resources/Library.ts +7 -1
  42. package/ts/types/Enum/PrestationOption.ts +5 -5
  43. package/ts/types/Enum/PrestationType.ts +1 -1
  44. package/ts/types/Interface/api/gedFile/updateGedFile.ts +27 -0
  45. package/ts/types/Interface/api/library/QueryLibrary.ts +30 -4
  46. package/ts/types/index.ts +1 -0
  47. package/ts/utils/siretValidation.ts +13 -0
@@ -7,7 +7,7 @@ export const PrestationOption = {
7
7
  description: 'Version supplémentaire établie demandée suite à des modifications du questionnaire',
8
8
  price: 99,
9
9
  brand: ['Clementine'],
10
- prestationList: [PrestationType.BILAN_PREVISIONNEL],
10
+ prestationList: [PrestationType.BILAN_PREVISIONNEL, PrestationType.CREATION_SOCIETE],
11
11
  },
12
12
  BUSINESS_PLAN_OPTION_2: {
13
13
  id: 2,
@@ -15,7 +15,7 @@ export const PrestationOption = {
15
15
  description: 'Prévisionnel sur 60 mois',
16
16
  price: 139,
17
17
  brand: ['Clementine'],
18
- prestationList: [PrestationType.BILAN_PREVISIONNEL],
18
+ prestationList: [PrestationType.BILAN_PREVISIONNEL, PrestationType.CREATION_SOCIETE],
19
19
  },
20
20
  BUSINESS_PLAN_OPTION_3: {
21
21
  id: 3,
@@ -23,7 +23,7 @@ export const PrestationOption = {
23
23
  description: 'Aide au choix du statut juridique, fiscal et social',
24
24
  price: 99,
25
25
  brand: ['Clementine'],
26
- prestationList: [PrestationType.BILAN_PREVISIONNEL],
26
+ prestationList: [PrestationType.BILAN_PREVISIONNEL, PrestationType.CREATION_SOCIETE],
27
27
  },
28
28
  BUSINESS_PLAN_OPTION_4: {
29
29
  id: 4,
@@ -31,7 +31,7 @@ export const PrestationOption = {
31
31
  description: 'Prévisionnel express en 8 jours ouvrables après retour questionnaire rempli de 35 questions simples',
32
32
  price: 99,
33
33
  brand: ['Clementine'],
34
- prestationList: [PrestationType.BILAN_PREVISIONNEL],
34
+ prestationList: [PrestationType.BILAN_PREVISIONNEL, PrestationType.CREATION_SOCIETE],
35
35
  },
36
36
  BUSINESS_PLAN_OPTION_1_POURCENTAGE: {
37
37
  id: 5,
@@ -60,7 +60,7 @@ export const PrestationOption = {
60
60
  CREATION_WITH_OPTION_SUPPORT: {
61
61
  id: 8,
62
62
  name: 'Avec accompagnement comptable',
63
- description: 'Prévisionnel sur 60 mois (5 ans)',
63
+ description: null,
64
64
  price: 100,
65
65
  brand: ['Clementine'],
66
66
  prestationList: [PrestationType.CREATION_SOCIETE],
@@ -387,7 +387,7 @@ export const PrestationDetail = {
387
387
  hidden: 0,
388
388
  isComplementary: 0,
389
389
  signaturePosition: '308,68,563,131',
390
- signaturePage: 5,
390
+ signaturePage: 6,
391
391
  },
392
392
  JURIDIQUE: {
393
393
  id: 16,
@@ -0,0 +1,27 @@
1
+ import { ApiPropertyOptional } from '../../../../utils';
2
+
3
+ export class UpdateGedFile {
4
+ @ApiPropertyOptional()
5
+ emissionDate: Date;
6
+
7
+ @ApiPropertyOptional()
8
+ statutFile: number;
9
+
10
+ @ApiPropertyOptional()
11
+ idTypeGedFile: number;
12
+
13
+ @ApiPropertyOptional()
14
+ idUser: number;
15
+
16
+ @ApiPropertyOptional()
17
+ idGedFolder: number;
18
+
19
+ @ApiPropertyOptional()
20
+ idSociety: number;
21
+
22
+ @ApiPropertyOptional()
23
+ idFile: number;
24
+
25
+ @ApiPropertyOptional()
26
+ idExercice: number;
27
+ }
@@ -5,14 +5,17 @@ export class QueryLibraryFile {
5
5
  @ApiProperty()
6
6
  idSociety: number;
7
7
 
8
- @ApiProperty()
9
- idGedFolder: GedFolder;
8
+ @ApiPropertyOptional()
9
+ idGedFolder?: GedFolder;
10
10
 
11
- @ApiProperty()
12
- idTypeGedFile: GedFileType;
11
+ @ApiPropertyOptional()
12
+ idTypeGedFile?: GedFileType;
13
13
 
14
14
  @ApiPropertyOptional()
15
15
  idExercice?: number;
16
+
17
+ @ApiPropertyOptional()
18
+ idFile?: number;
16
19
  }
17
20
 
18
21
  export class QueryDownloadFile {
@@ -27,4 +30,27 @@ export class QueryDownloadFile {
27
30
 
28
31
  @ApiPropertyOptional()
29
32
  idMail?: number;
33
+ }
34
+
35
+ export class UpdateOrCreateGedFile {
36
+ @ApiProperty()
37
+ idFile: number;
38
+
39
+ @ApiPropertyOptional()
40
+ emissionDate?: Date;
41
+
42
+ @ApiPropertyOptional()
43
+ idUser?: number;
44
+
45
+ @ApiProperty()
46
+ idGedFolder: number;
47
+
48
+ @ApiPropertyOptional()
49
+ idSociety?: number;
50
+
51
+ @ApiPropertyOptional()
52
+ idExercice?: number;
53
+
54
+ @ApiPropertyOptional()
55
+ idTypeGedFile?: number;
30
56
  }
package/ts/types/index.ts CHANGED
@@ -830,6 +830,7 @@ export * from './Interface/api/wallet/QueryWallet';
830
830
  export * from './Interface/api/terminationList/QueryTerminationList';
831
831
  export * from './Interface/api/terminationList/DestroyTerminationList';
832
832
  export * from './Interface/api/pdf/ReadPdfizer';
833
+ export * from './Interface/api/gedFile/updateGedFile';
833
834
 
834
835
  // Enums types
835
836
  export * from './Interface/enum/Util';
@@ -1,3 +1,6 @@
1
+ import { isDefined } from 'class-validator';
2
+ import { CountryId } from '../types/Enum/Country';
3
+
1
4
  export function validateSiret(siret: string) {
2
5
  if (!/^\d{14}$/.test(siret)) throw new Error('Invalid SIRET format');
3
6
 
@@ -31,4 +34,14 @@ export function getVatCodeBySiren(siren: string, countryCode = 'FR'): string {
31
34
  const validSiren = siren.replace(/\s/g, '');
32
35
  // @ts-ignore
33
36
  return `${countryCode}${[12 + 3 * (validSiren % 97)] % 97}${validSiren}`;
37
+ }
38
+
39
+ export function siretToSiren(siret: string, idCountry?: number): string | null {
40
+ if (typeof siret !== 'string') return null;
41
+ if (isDefined(idCountry) && idCountry !== CountryId.FRANCE) return siret;
42
+ let siren = siret.replace(/ */g, '');
43
+ if (siren && siren.length > 9) {
44
+ siren = siren.substring(0, 9);
45
+ }
46
+ return siren;
34
47
  }