@silexpert/core 1.3.39 → 1.3.42

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 (122) hide show
  1. package/dist/cjs/api/resources/Card.d.ts +18 -2
  2. package/dist/cjs/api/resources/Card.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Card.js +19 -0
  4. package/dist/cjs/api/resources/Card.js.map +1 -1
  5. package/dist/cjs/api/resources/SocietyDetail.js +1 -1
  6. package/dist/cjs/api/resources/SocietyDetail.js.map +1 -1
  7. package/dist/cjs/types/Enum/Card.d.ts +110 -22
  8. package/dist/cjs/types/Enum/Card.d.ts.map +1 -1
  9. package/dist/cjs/types/Enum/Card.js +162 -26
  10. package/dist/cjs/types/Enum/Card.js.map +1 -1
  11. package/dist/cjs/types/Enum/PrestationType.d.ts +4 -1
  12. package/dist/cjs/types/Enum/PrestationType.d.ts.map +1 -1
  13. package/dist/cjs/types/Enum/PrestationType.js +66 -0
  14. package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
  15. package/dist/cjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  16. package/dist/cjs/types/Enum/PriceGridClementine.js +20 -0
  17. package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
  18. package/dist/cjs/types/Enum/SalesContractBrandClementine.d.ts.map +1 -1
  19. package/dist/cjs/types/Enum/SalesContractBrandClementine.js +63 -0
  20. package/dist/cjs/types/Enum/SalesContractBrandClementine.js.map +1 -1
  21. package/dist/cjs/types/Enum/TeamType.d.ts +16 -0
  22. package/dist/cjs/types/Enum/TeamType.d.ts.map +1 -0
  23. package/dist/cjs/types/Enum/TeamType.js +57 -0
  24. package/dist/cjs/types/Enum/TeamType.js.map +1 -0
  25. package/dist/cjs/types/Enum/TimeCounterType.d.ts +9 -362
  26. package/dist/cjs/types/Enum/TimeCounterType.d.ts.map +1 -1
  27. package/dist/cjs/types/Enum/TimeCounterType.js +8 -0
  28. package/dist/cjs/types/Enum/TimeCounterType.js.map +1 -1
  29. package/dist/cjs/types/Interface/api/card/UpdateCard.d.ts +11 -1
  30. package/dist/cjs/types/Interface/api/card/UpdateCard.d.ts.map +1 -1
  31. package/dist/cjs/types/Interface/api/card/UpdateCard.js +38 -2
  32. package/dist/cjs/types/Interface/api/card/UpdateCard.js.map +1 -1
  33. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.d.ts +1 -1
  34. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.d.ts.map +1 -1
  35. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.js +2 -1
  36. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.js.map +1 -1
  37. package/dist/cjs/types/Interface/api/team/QueryUpdate.d.ts +2 -0
  38. package/dist/cjs/types/Interface/api/team/QueryUpdate.d.ts.map +1 -1
  39. package/dist/cjs/types/Interface/api/team/QueryUpdate.js +7 -0
  40. package/dist/cjs/types/Interface/api/team/QueryUpdate.js.map +1 -1
  41. package/dist/cjs/types/Interface/models/ICard.d.ts +20 -0
  42. package/dist/cjs/types/Interface/models/ICard.d.ts.map +1 -1
  43. package/dist/cjs/types/Interface/models/ICard.js.map +1 -1
  44. package/dist/cjs/types/Interface/models/ITeam.d.ts +2 -0
  45. package/dist/cjs/types/Interface/models/ITeam.d.ts.map +1 -1
  46. package/dist/cjs/types/Interface/models/ITeam.js.map +1 -1
  47. package/dist/cjs/types/index.d.ts +1 -0
  48. package/dist/cjs/types/index.d.ts.map +1 -1
  49. package/dist/cjs/types/index.js +1 -0
  50. package/dist/cjs/types/index.js.map +1 -1
  51. package/dist/cjs/utils/prestation.d.ts.map +1 -1
  52. package/dist/cjs/utils/prestation.js +3 -0
  53. package/dist/cjs/utils/prestation.js.map +1 -1
  54. package/dist/mjs/api/resources/Card.d.ts +18 -2
  55. package/dist/mjs/api/resources/Card.d.ts.map +1 -1
  56. package/dist/mjs/api/resources/Card.js +19 -0
  57. package/dist/mjs/api/resources/Card.js.map +1 -1
  58. package/dist/mjs/api/resources/SocietyDetail.js +1 -1
  59. package/dist/mjs/api/resources/SocietyDetail.js.map +1 -1
  60. package/dist/mjs/types/Enum/Card.d.ts +110 -22
  61. package/dist/mjs/types/Enum/Card.d.ts.map +1 -1
  62. package/dist/mjs/types/Enum/Card.js +162 -26
  63. package/dist/mjs/types/Enum/Card.js.map +1 -1
  64. package/dist/mjs/types/Enum/PrestationType.d.ts +4 -1
  65. package/dist/mjs/types/Enum/PrestationType.d.ts.map +1 -1
  66. package/dist/mjs/types/Enum/PrestationType.js +66 -0
  67. package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
  68. package/dist/mjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  69. package/dist/mjs/types/Enum/PriceGridClementine.js +20 -0
  70. package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
  71. package/dist/mjs/types/Enum/SalesContractBrandClementine.d.ts.map +1 -1
  72. package/dist/mjs/types/Enum/SalesContractBrandClementine.js +63 -0
  73. package/dist/mjs/types/Enum/SalesContractBrandClementine.js.map +1 -1
  74. package/dist/mjs/types/Enum/TeamType.d.ts +16 -0
  75. package/dist/mjs/types/Enum/TeamType.d.ts.map +1 -0
  76. package/dist/mjs/types/Enum/TeamType.js +54 -0
  77. package/dist/mjs/types/Enum/TeamType.js.map +1 -0
  78. package/dist/mjs/types/Enum/TimeCounterType.d.ts +9 -362
  79. package/dist/mjs/types/Enum/TimeCounterType.d.ts.map +1 -1
  80. package/dist/mjs/types/Enum/TimeCounterType.js +8 -0
  81. package/dist/mjs/types/Enum/TimeCounterType.js.map +1 -1
  82. package/dist/mjs/types/Interface/api/card/UpdateCard.d.ts +11 -1
  83. package/dist/mjs/types/Interface/api/card/UpdateCard.d.ts.map +1 -1
  84. package/dist/mjs/types/Interface/api/card/UpdateCard.js +42 -2
  85. package/dist/mjs/types/Interface/api/card/UpdateCard.js.map +1 -1
  86. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.d.ts +1 -1
  87. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.d.ts.map +1 -1
  88. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.js +4 -3
  89. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.js.map +1 -1
  90. package/dist/mjs/types/Interface/api/team/QueryUpdate.d.ts +2 -0
  91. package/dist/mjs/types/Interface/api/team/QueryUpdate.d.ts.map +1 -1
  92. package/dist/mjs/types/Interface/api/team/QueryUpdate.js +9 -1
  93. package/dist/mjs/types/Interface/api/team/QueryUpdate.js.map +1 -1
  94. package/dist/mjs/types/Interface/models/ICard.d.ts +20 -0
  95. package/dist/mjs/types/Interface/models/ICard.d.ts.map +1 -1
  96. package/dist/mjs/types/Interface/models/ICard.js.map +1 -1
  97. package/dist/mjs/types/Interface/models/ITeam.d.ts +2 -0
  98. package/dist/mjs/types/Interface/models/ITeam.d.ts.map +1 -1
  99. package/dist/mjs/types/Interface/models/ITeam.js.map +1 -1
  100. package/dist/mjs/types/index.d.ts +1 -0
  101. package/dist/mjs/types/index.d.ts.map +1 -1
  102. package/dist/mjs/types/index.js +1 -0
  103. package/dist/mjs/types/index.js.map +1 -1
  104. package/dist/mjs/utils/prestation.d.ts.map +1 -1
  105. package/dist/mjs/utils/prestation.js +3 -0
  106. package/dist/mjs/utils/prestation.js.map +1 -1
  107. package/package.json +1 -1
  108. package/ts/api/resources/Card.ts +25 -1
  109. package/ts/api/resources/SocietyDetail.ts +1 -1
  110. package/ts/types/Enum/Card.ts +174 -29
  111. package/ts/types/Enum/PrestationType.ts +66 -0
  112. package/ts/types/Enum/PriceGridClementine.ts +20 -0
  113. package/ts/types/Enum/SalesContractBrandClementine.ts +63 -0
  114. package/ts/types/Enum/TeamType.ts +53 -0
  115. package/ts/types/Enum/TimeCounterType.ts +18 -1
  116. package/ts/types/Interface/api/card/UpdateCard.ts +32 -2
  117. package/ts/types/Interface/api/society/DataCustomersCsv.ts +5 -4
  118. package/ts/types/Interface/api/team/QueryUpdate.ts +7 -1
  119. package/ts/types/Interface/models/ICard.ts +20 -0
  120. package/ts/types/Interface/models/ITeam.ts +2 -0
  121. package/ts/types/index.ts +1 -0
  122. package/ts/utils/prestation.ts +3 -0
@@ -60,6 +60,33 @@ export const SalesContractClementine: SaleContract[] = [
60
60
  ],
61
61
  condition: (turnover: number): boolean => turnover < 1200000,
62
62
  },
63
+ {
64
+ label: 'Page EI 2025',
65
+ name: 'page_ei_2025',
66
+ needBgImage: false,
67
+ versionable: false,
68
+ idPrestationType: [
69
+ PrestationType.EI,
70
+ ],
71
+ },
72
+ {
73
+ label: 'Page EI 2025',
74
+ name: 'page_sci_2025',
75
+ needBgImage: false,
76
+ versionable: false,
77
+ idPrestationType: [
78
+ PrestationType.SCI,
79
+ ],
80
+ },
81
+ {
82
+ label: 'Page LMNP 2025',
83
+ name: 'page_lmnp_2025',
84
+ needBgImage: false,
85
+ versionable: false,
86
+ idPrestationType: [
87
+ PrestationType.LMNP,
88
+ ],
89
+ },
63
90
  // {
64
91
  // label: 'Forfait social 2025',
65
92
  // name: 'bloc_social_2025',
@@ -99,6 +126,33 @@ export const SalesContractClementine: SaleContract[] = [
99
126
  idPrestationType: allPrestations2025WithBrochure,
100
127
  versionable: false,
101
128
  },
129
+ {
130
+ label: 'Prestations complémentaires EI 2025',
131
+ name: 'page_presta_complem_ei_2025',
132
+ needBgImage: false,
133
+ idPrestationType: [
134
+ PrestationType.EI,
135
+ ],
136
+ versionable: false,
137
+ },
138
+ {
139
+ label: 'Prestations complémentaires SCI 2025',
140
+ name: 'page_presta_complem_sci_2025',
141
+ needBgImage: false,
142
+ idPrestationType: [
143
+ PrestationType.SCI,
144
+ ],
145
+ versionable: false,
146
+ },
147
+ {
148
+ label: 'Prestations complémentaires LMNP 2025',
149
+ name: 'page_presta_complem_lmnp_2025',
150
+ needBgImage: false,
151
+ idPrestationType: [
152
+ PrestationType.LMNP,
153
+ ],
154
+ versionable: false,
155
+ },
102
156
  {
103
157
  label: 'Page simplifié',
104
158
  name: 'page_simplified',
@@ -596,4 +650,13 @@ export const SalesContractKlems: SaleContract[] = [
596
650
  ],
597
651
  versionable: false,
598
652
  },
653
+ {
654
+ label: 'Page EI 2025',
655
+ name: 'page_ei_2025',
656
+ needBgImage: false,
657
+ versionable: false,
658
+ idPrestationType: [
659
+ PrestationType.EI,
660
+ ],
661
+ },
599
662
  ];
@@ -0,0 +1,53 @@
1
+ export enum TeamType {
2
+ BALANCESHEET = 1,
3
+ VAT = 2,
4
+ ACCEPTATION = 3,
5
+ CARRY_FORWARD = 4,
6
+ BANK = 5,
7
+ ANNOTATION = 6,
8
+ CLR = 7,
9
+ CUT_OFF = 8,
10
+ }
11
+
12
+ export const TeamTypeLabel = [
13
+ {
14
+ id: TeamType.BALANCESHEET,
15
+ label: 'Bilan',
16
+ color: 'lime',
17
+ },
18
+ {
19
+ id: TeamType.VAT,
20
+ label: 'TVA',
21
+ color: 'teal',
22
+ },
23
+ {
24
+ id: TeamType.ACCEPTATION,
25
+ label: 'Acceptation',
26
+ color: 'emerald',
27
+ },
28
+ {
29
+ id: TeamType.CARRY_FORWARD,
30
+ label: 'A nouveaux',
31
+ color: 'sky',
32
+ },
33
+ {
34
+ id: TeamType.BANK,
35
+ label: 'Banque',
36
+ color: 'indigo',
37
+ },
38
+ {
39
+ id: TeamType.ANNOTATION,
40
+ label: 'Annotations',
41
+ color: 'violet',
42
+ },
43
+ {
44
+ id: TeamType.CLR,
45
+ label: 'CLR',
46
+ color: 'fuscia',
47
+ },
48
+ {
49
+ id: TeamType.CUT_OFF,
50
+ label: 'Cut Off',
51
+ color: 'slate',
52
+ },
53
+ ];
@@ -1,9 +1,18 @@
1
1
  import { Role } from './Role';
2
2
 
3
+ export interface TimeCounterTypeInterface {
4
+ id: number;
5
+ label: string;
6
+ aberrantTime: number;
7
+ limitedRoles: Role[] | null;
8
+ color: string;
9
+ isOverlappable: boolean;
10
+ }
11
+
3
12
  /**
4
13
  * Pour les calendarEvent, utilisé comme type principal
5
14
  */
6
- export const TimeCounterType = {
15
+ export const TimeCounterType: Record<string, TimeCounterTypeInterface> = {
7
16
  ONBOARDING: {
8
17
  id: 1,
9
18
  label: 'OnBoarding',
@@ -382,4 +391,12 @@ export const TimeCounterType = {
382
391
  color: 'fern-dark',
383
392
  isOverlappable: false,
384
393
  },
394
+ CARD: {
395
+ id: 46,
396
+ label: 'Comptallo',
397
+ aberrantTime: 15,
398
+ limitedRoles: null,
399
+ color: 'fire',
400
+ isOverlappable: true,
401
+ }
385
402
  };
@@ -1,8 +1,37 @@
1
- import { IsBoolean, IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
1
+ import { IsBoolean, IsDate, IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
2
2
  import { ApiPropertyOptional } from '../../../../utils';
3
3
  import { CardState, CardType } from '../../../Enum/Card';
4
4
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
5
5
 
6
+ export class UpdateCardV2 {
7
+ @ApiPropertyOptional()
8
+ @IsOptional()
9
+ @IsEnum(CardState)
10
+ state?: CardState;
11
+
12
+ @ApiPropertyOptional()
13
+ @IsOptional()
14
+ plannedAt?: Date | null;
15
+
16
+ @ApiPropertyOptional()
17
+ @IsOptional()
18
+ @IsInt()
19
+ idUser?: number;
20
+
21
+ @ApiPropertyOptional()
22
+ @IsOptional()
23
+ @IsString()
24
+ comment?: string;
25
+
26
+ @ApiPropertyOptional()
27
+ @IsOptional()
28
+ @IsInt()
29
+ priority?: number;
30
+ }
31
+
32
+ /**
33
+ * @deprecated Use UpdateCardV2 instead
34
+ */
6
35
  export class UpdateCard {
7
36
  @ApiPropertyOptional()
8
37
  @IsOptional()
@@ -19,7 +48,7 @@ export class UpdateCard {
19
48
  @IsOptional()
20
49
  @IsBoolean()
21
50
  @ToBoolean()
22
- isBlocked?: string;
51
+ isBlocked?: boolean;
23
52
 
24
53
  @ApiPropertyOptional()
25
54
  @IsOptional()
@@ -29,6 +58,7 @@ export class UpdateCard {
29
58
 
30
59
  @ApiPropertyOptional()
31
60
  @IsOptional()
61
+ @IsDate()
32
62
  plannedAt?: Date | null;
33
63
 
34
64
  @ApiPropertyOptional()
@@ -1,5 +1,5 @@
1
- import { IsDateString, IsEnum, IsInt } from 'class-validator';
2
- import { ApiProperty } from '../../../../utils/decorators';
1
+ import { IsDateString, IsEnum, IsInt, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
3
3
  import { SocietyTypeExportCsv } from '../../../Enum/SocietyTypeExportCsv';
4
4
 
5
5
  export class DataCustomersCsv {
@@ -8,7 +8,8 @@ export class DataCustomersCsv {
8
8
  @IsEnum(SocietyTypeExportCsv)
9
9
  type: number;
10
10
 
11
- @ApiProperty()
11
+ @ApiPropertyOptional()
12
+ @IsOptional()
12
13
  @IsDateString()
13
- startDate: string;
14
+ startDate?: string;
14
15
  }
@@ -1,5 +1,6 @@
1
- import { IsArray, IsNumber, IsOptional, IsString } from 'class-validator';
1
+ import { IsArray, IsEnum, IsNumber, IsOptional, IsString } from 'class-validator';
2
2
  import { ApiPropertyOptional } from '../../../../utils';
3
+ import { TeamType } from '../../../Enum/TeamType';
3
4
 
4
5
  export class QueryUpdateTeam {
5
6
  @ApiPropertyOptional()
@@ -21,4 +22,9 @@ export class QueryUpdateTeam {
21
22
  @IsOptional()
22
23
  @IsArray()
23
24
  usersToDelete?: number[];
25
+
26
+ @ApiPropertyOptional()
27
+ @IsOptional()
28
+ @IsEnum(TeamType)
29
+ idType?: TeamType | null;
24
30
  }
@@ -7,6 +7,9 @@ import { ICustomerVat } from './ICustomerVat';
7
7
  import { ICardHistory } from './ICardHistory';
8
8
  import { IComment } from './IComment';
9
9
  import { ITeam } from './ITeam';
10
+ import { IChecklist } from './IChecklist';
11
+ import { ICustomerIsRegime } from './ICustomerIsRegime';
12
+ import { IExercice } from './IExercice';
10
13
 
11
14
  export interface ICard {
12
15
  id?: number;
@@ -14,10 +17,16 @@ export interface ICard {
14
17
  state: CardState;
15
18
  isManual: boolean;
16
19
  isBlocked: boolean;
20
+ priority?: number | null;
17
21
  plannedAt?: Date | null;
18
22
  idUser?: number | null;
19
23
  idTeam?: number | null;
20
24
  idSociety: number;
25
+ idBalanceSheet?: number | null;
26
+ idCustomerVat?: number | null;
27
+ idCustomerIsRegime?: number | null;
28
+ idChecklist?: number | null;
29
+ idExercice?: number | null;
21
30
  createdAt?: Date;
22
31
  updatedAt?: Date;
23
32
  deletedAt?: Date;
@@ -26,7 +35,18 @@ export interface ICard {
26
35
  user?: IUser;
27
36
  team?: ITeam;
28
37
  society?: ISociety;
38
+ balancesheet?: IBalanceSheet;
39
+ vat?: ICustomerVat;
40
+ customerIsRegime?: ICustomerIsRegime;
41
+ checklist?: IChecklist;
42
+ exercice?: IExercice;
43
+ /**
44
+ * @deprecated old relationship with balance sheet
45
+ */
29
46
  balanceSheet?: IBalanceSheet;
47
+ /**
48
+ * @deprecated old relationship with customer vat
49
+ */
30
50
  customerVat?: ICustomerVat;
31
51
  events?: ICalendarEvent[];
32
52
  history?: ICardHistory[];
@@ -1,3 +1,4 @@
1
+ import { TeamType } from '../../Enum/TeamType';
1
2
  import { IBusinessLine } from './IBusinessLine';
2
3
  import { IUser } from './IUser';
3
4
  import { IUserTeam } from './IUserTeam';
@@ -7,6 +8,7 @@ export interface ITeam {
7
8
  id?: number;
8
9
  name: string;
9
10
  nbTotalActive?: number;
11
+ idType?: TeamType | null;
10
12
  createdAt?: Date | null;
11
13
  updatedAt?: Date | null;
12
14
 
package/ts/types/index.ts CHANGED
@@ -552,6 +552,7 @@ export * from './Enum/Marketing';
552
552
  export * from './Enum/EnglishLevel';
553
553
  export * from './Enum/AIPrompt';
554
554
  export * from './Enum/SocietyTypeExportCsv';
555
+ export * from './Enum/TeamType';
555
556
  export * from './Enum/PartneredAccountantServiceType';
556
557
  export * from './Enum/PartneredAccountantServiceTypeId';
557
558
 
@@ -456,6 +456,9 @@ const calculatePrestationPrice = (
456
456
  PrestationType.SUPPORT,
457
457
  PrestationType.PREMIUM,
458
458
  PrestationType.CUSTOM_MADE,
459
+ PrestationType.EI,
460
+ PrestationType.SCI,
461
+ PrestationType.LMNP,
459
462
  ].includes(idPrestationList)
460
463
  ) {
461
464
  let exerciceNbr: number = 0;