@silexpert/core 1.0.100 → 1.0.101

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 (43) hide show
  1. package/es/api/resources/Rule.d.ts +9 -0
  2. package/es/api/resources/Rule.d.ts.map +1 -0
  3. package/es/api/resources/Rule.js +10 -0
  4. package/es/api/resources/Rule.js.map +1 -0
  5. package/es/api/resources.d.ts +2 -0
  6. package/es/api/resources.d.ts.map +1 -1
  7. package/es/api/resources.js +2 -0
  8. package/es/api/resources.js.map +1 -1
  9. package/es/types/Interface/api/rule/Query.d.ts +9 -0
  10. package/es/types/Interface/api/rule/Query.d.ts.map +1 -0
  11. package/es/types/Interface/api/rule/Query.js +31 -0
  12. package/es/types/Interface/api/rule/Query.js.map +1 -0
  13. package/es/types/Interface/api/rule/Read.d.ts +6 -0
  14. package/es/types/Interface/api/rule/Read.d.ts.map +1 -0
  15. package/es/types/Interface/api/rule/Read.js +2 -0
  16. package/es/types/Interface/api/rule/Read.js.map +1 -0
  17. package/es/types/index.d.ts +1 -0
  18. package/es/types/index.d.ts.map +1 -1
  19. package/es/types/index.js +1 -0
  20. package/es/types/index.js.map +1 -1
  21. package/es/utils/prestation.d.ts +2 -1
  22. package/es/utils/prestation.d.ts.map +1 -1
  23. package/es/utils/prestation.js +7 -2
  24. package/es/utils/prestation.js.map +1 -1
  25. package/js/api/resources/Rule.js +26 -0
  26. package/js/api/resources/Rule.js.map +1 -0
  27. package/js/api/resources.js +4 -1
  28. package/js/api/resources.js.map +1 -1
  29. package/js/types/Interface/api/rule/Query.js +37 -0
  30. package/js/types/Interface/api/rule/Query.js.map +1 -0
  31. package/js/types/Interface/api/rule/Read.js +6 -0
  32. package/js/types/Interface/api/rule/Read.js.map +1 -0
  33. package/js/types/index.js +12 -0
  34. package/js/types/index.js.map +1 -1
  35. package/js/utils/prestation.js +8 -1
  36. package/js/utils/prestation.js.map +1 -1
  37. package/package.json +1 -1
  38. package/ts/api/resources/Rule.ts +14 -0
  39. package/ts/api/resources.ts +2 -0
  40. package/ts/types/Interface/api/rule/Query.ts +17 -0
  41. package/ts/types/Interface/api/rule/Read.ts +5 -0
  42. package/ts/types/index.ts +1 -0
  43. package/ts/utils/prestation.ts +8 -2
@@ -111,6 +111,7 @@ import { Commercial } from './resources/Commercial';
111
111
  import { Facturation } from './resources/Facturation';
112
112
  import { Inpi } from './resources/Inpi';
113
113
  import { Prestation } from './resources/prestation';
114
+ import { Rule } from './resources/Rule';
114
115
 
115
116
  export const resources = {
116
117
  simulation: Simulation,
@@ -226,4 +227,5 @@ export const resources = {
226
227
  inpi: Inpi,
227
228
  prestation: Prestation,
228
229
  sources: Sources,
230
+ rule: Rule,
229
231
  };
@@ -0,0 +1,17 @@
1
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
2
+
3
+ export class QueryRule {
4
+ @ApiProperty()
5
+ limit: number;
6
+
7
+ @ApiProperty()
8
+ page: number;
9
+
10
+ @ApiPropertyOptional()
11
+ search?: string;
12
+ }
13
+
14
+ export class QueryMostFrequent {
15
+ @ApiPropertyOptional()
16
+ search?: string;
17
+ }
@@ -0,0 +1,5 @@
1
+ export type ReadMostFrequentOccurence = {
2
+ search: string;
3
+ nb: number;
4
+ designation: string
5
+ };
package/ts/types/index.ts CHANGED
@@ -850,6 +850,7 @@ export * from './Interface/api/gedFile/updateGedFile';
850
850
  export * from './Interface/api/iDocus/iDocus';
851
851
  export * from './Interface/api/iDocus/CreateExport';
852
852
  export * from './Interface/api/pdf/ReadPdftkizer';
853
+ export * from './Interface/api/rule/Query';
853
854
 
854
855
  // Enums types
855
856
  export * from './Interface/enum/Util';
@@ -1,4 +1,4 @@
1
- import { PrestationType } from '../types/Enum/PrestationType';
1
+ import { PrestationDetail, PrestationType } from '../types/Enum/PrestationType';
2
2
 
3
3
  const isOtherAccountingMissions = (idPrestationList: number): boolean => [
4
4
  PrestationType.PREVISIONNEL,
@@ -23,6 +23,12 @@ const isOnlyJuridic = (idPrestationList: number[]):boolean => !idPrestationList.
23
23
 
24
24
  const isCreation = (idPrestationList: number[]):boolean => idPrestationList.includes(PrestationType.CREATION_SOCIETE);
25
25
 
26
+ const isExpress = (idPrestationList: number):boolean => {
27
+ const prestationDetailValues = Object.values(PrestationDetail) as any;
28
+ const prestaList = prestationDetailValues.find((pr:any) => pr.id === idPrestationList);
29
+ return !!prestaList.isBack;
30
+ };
31
+
26
32
  export {
27
- isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation,
33
+ isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress,
28
34
  };