@silexpert/core 1.2.20 → 1.2.21

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 (91) hide show
  1. package/dist/cjs/api/resources/HumanResourceLibrary.d.ts +13 -0
  2. package/dist/cjs/api/resources/HumanResourceLibrary.d.ts.map +1 -0
  3. package/dist/cjs/api/resources/HumanResourceLibrary.js +38 -0
  4. package/dist/cjs/api/resources/HumanResourceLibrary.js.map +1 -0
  5. package/dist/cjs/api/resources.d.ts +2 -0
  6. package/dist/cjs/api/resources.d.ts.map +1 -1
  7. package/dist/cjs/api/resources.js +2 -0
  8. package/dist/cjs/api/resources.js.map +1 -1
  9. package/dist/cjs/types/Enum/DocumentForHumanResourceType.d.ts +15 -0
  10. package/dist/cjs/types/Enum/DocumentForHumanResourceType.d.ts.map +1 -0
  11. package/dist/cjs/types/Enum/DocumentForHumanResourceType.js +25 -0
  12. package/dist/cjs/types/Enum/DocumentForHumanResourceType.js.map +1 -0
  13. package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.d.ts +12 -0
  14. package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.d.ts.map +1 -0
  15. package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.js +66 -0
  16. package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.js.map +1 -0
  17. package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.d.ts +5 -0
  18. package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.d.ts.map +1 -0
  19. package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.js +28 -0
  20. package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.js.map +1 -0
  21. package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.d.ts +4 -0
  22. package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.d.ts.map +1 -0
  23. package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.js +23 -0
  24. package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.js.map +1 -0
  25. package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.d.ts +13 -0
  26. package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.d.ts.map +1 -0
  27. package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.js +71 -0
  28. package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.js.map +1 -0
  29. package/dist/cjs/types/Interface/models/IHumanResourceLibrary.d.ts +22 -0
  30. package/dist/cjs/types/Interface/models/IHumanResourceLibrary.d.ts.map +1 -0
  31. package/dist/cjs/types/Interface/models/IHumanResourceLibrary.js +3 -0
  32. package/dist/cjs/types/Interface/models/IHumanResourceLibrary.js.map +1 -0
  33. package/dist/cjs/types/Interface/models/IUserHumanResourceLibrary.d.ts +13 -0
  34. package/dist/cjs/types/Interface/models/IUserHumanResourceLibrary.d.ts.map +1 -0
  35. package/dist/cjs/types/Interface/models/IUserHumanResourceLibrary.js +3 -0
  36. package/dist/cjs/types/Interface/models/IUserHumanResourceLibrary.js.map +1 -0
  37. package/dist/cjs/types/index.d.ts +7 -0
  38. package/dist/cjs/types/index.d.ts.map +1 -1
  39. package/dist/cjs/types/index.js +7 -0
  40. package/dist/cjs/types/index.js.map +1 -1
  41. package/dist/mjs/api/resources/HumanResourceLibrary.d.ts +13 -0
  42. package/dist/mjs/api/resources/HumanResourceLibrary.d.ts.map +1 -0
  43. package/dist/mjs/api/resources/HumanResourceLibrary.js +34 -0
  44. package/dist/mjs/api/resources/HumanResourceLibrary.js.map +1 -0
  45. package/dist/mjs/api/resources.d.ts +2 -0
  46. package/dist/mjs/api/resources.d.ts.map +1 -1
  47. package/dist/mjs/api/resources.js +2 -0
  48. package/dist/mjs/api/resources.js.map +1 -1
  49. package/dist/mjs/types/Enum/DocumentForHumanResourceType.d.ts +15 -0
  50. package/dist/mjs/types/Enum/DocumentForHumanResourceType.d.ts.map +1 -0
  51. package/dist/mjs/types/Enum/DocumentForHumanResourceType.js +22 -0
  52. package/dist/mjs/types/Enum/DocumentForHumanResourceType.js.map +1 -0
  53. package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.d.ts +12 -0
  54. package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.d.ts.map +1 -0
  55. package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.js +70 -0
  56. package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.js.map +1 -0
  57. package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.d.ts +5 -0
  58. package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.d.ts.map +1 -0
  59. package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.js +26 -0
  60. package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.js.map +1 -0
  61. package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.d.ts +4 -0
  62. package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.d.ts.map +1 -0
  63. package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.js +20 -0
  64. package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.js.map +1 -0
  65. package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.d.ts +13 -0
  66. package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.d.ts.map +1 -0
  67. package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.js +75 -0
  68. package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.js.map +1 -0
  69. package/dist/mjs/types/Interface/models/IHumanResourceLibrary.d.ts +22 -0
  70. package/dist/mjs/types/Interface/models/IHumanResourceLibrary.d.ts.map +1 -0
  71. package/dist/mjs/types/Interface/models/IHumanResourceLibrary.js +2 -0
  72. package/dist/mjs/types/Interface/models/IHumanResourceLibrary.js.map +1 -0
  73. package/dist/mjs/types/Interface/models/IUserHumanResourceLibrary.d.ts +13 -0
  74. package/dist/mjs/types/Interface/models/IUserHumanResourceLibrary.d.ts.map +1 -0
  75. package/dist/mjs/types/Interface/models/IUserHumanResourceLibrary.js +2 -0
  76. package/dist/mjs/types/Interface/models/IUserHumanResourceLibrary.js.map +1 -0
  77. package/dist/mjs/types/index.d.ts +7 -0
  78. package/dist/mjs/types/index.d.ts.map +1 -1
  79. package/dist/mjs/types/index.js +7 -0
  80. package/dist/mjs/types/index.js.map +1 -1
  81. package/package.json +1 -1
  82. package/ts/api/resources/HumanResourceLibrary.ts +43 -0
  83. package/ts/api/resources.ts +2 -0
  84. package/ts/types/Enum/DocumentForHumanResourceType.ts +21 -0
  85. package/ts/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.ts +44 -0
  86. package/ts/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.ts +13 -0
  87. package/ts/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.ts +11 -0
  88. package/ts/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.ts +54 -0
  89. package/ts/types/Interface/models/IHumanResourceLibrary.ts +25 -0
  90. package/ts/types/Interface/models/IUserHumanResourceLibrary.ts +16 -0
  91. package/ts/types/index.ts +8 -0
@@ -0,0 +1,43 @@
1
+ import { Resource } from '../Resource';
2
+ import { BasePaginate, CreateHumanResourceLibrary, CreateUserHumanResourceLibrary, IHumanResourceLibrary, IUserHumanResourceLibrary, QueryHumanResourceLibrary, QueryPaginatedHumanResourceLibrary } from '../../types';
3
+
4
+ export class HumanResourceLibrary extends Resource {
5
+
6
+ create(payload: CreateHumanResourceLibrary): Promise<IHumanResourceLibrary> {
7
+ return this.axios.$post('/library-rh', payload, { headers: { 'Content-Type': 'multipart/form-data' } });
8
+ }
9
+
10
+ download(params: QueryHumanResourceLibrary): Promise<Blob> {
11
+ return this.axios.$get('library-rh/buffer', {
12
+ params,
13
+ responseType: 'arraybuffer',
14
+ headers: {
15
+ Accept: 'application/pdf',
16
+ },
17
+ });
18
+ }
19
+
20
+ public getAllHistory(id: number): Promise<IUserHumanResourceLibrary[]> {
21
+ return this.axios.$get(`/library-rh/history/${id}`);
22
+ }
23
+
24
+ public validate(payload: CreateUserHumanResourceLibrary): Promise<IUserHumanResourceLibrary> {
25
+ return this.axios.$post('/library-rh/user/validate', payload);
26
+ }
27
+
28
+ public update(id: number, params: Partial<IHumanResourceLibrary>): Promise<boolean> {
29
+ return this.axios.$put(`/library-rh/${id}`, { ...params });
30
+ }
31
+
32
+ public getPaginate(params: QueryPaginatedHumanResourceLibrary): Promise<BasePaginate<IHumanResourceLibrary>> {
33
+ return this.axios.$get('/library-rh/paginate', { params });
34
+ }
35
+
36
+ public get(id: number): Promise<IHumanResourceLibrary> {
37
+ return this.axios.$get(`/library-rh/${id}`);
38
+ }
39
+
40
+ public delete(id: number): Promise<boolean> {
41
+ return this.axios.$delete(`/library-rh/${id}`);
42
+ }
43
+ }
@@ -169,6 +169,7 @@ import { JuridicalMission } from './resources/JuridicalMission';
169
169
  import { PrestationComplementary } from './resources/PrestationComplementary';
170
170
  import { PrevisionalForm } from './resources/PrevisionalForm';
171
171
  import { Refund } from './resources/Refund';
172
+ import { HumanResourceLibrary } from './resources/HumanResourceLibrary';
172
173
 
173
174
  export const resources = {
174
175
  simulation: Simulation,
@@ -342,4 +343,5 @@ export const resources = {
342
343
  prestationComplementary: PrestationComplementary,
343
344
  previsionalForm: PrevisionalForm,
344
345
  refund: Refund,
346
+ humanResourceLibrary: HumanResourceLibrary,
345
347
  };
@@ -0,0 +1,21 @@
1
+ export enum DocumentForHumanResourceType {
2
+ NOTE_SERVICE = 1,
3
+ SUPPORT_FORMATION = 2,
4
+ PLAN_PARKING = 3,
5
+ LIVRET_ACCUEIL = 4,
6
+ FICHE_COOPTATION = 5,
7
+ FICHE_POSTE = 6,
8
+ REGLEMENT_INTERIEUR = 7,
9
+ AUTRES = 8,
10
+ }
11
+
12
+ export const DocumentForHumanResourcesList = [
13
+ { value: DocumentForHumanResourceType.NOTE_SERVICE, text: 'Note de service' },
14
+ { value: DocumentForHumanResourceType.SUPPORT_FORMATION, text: 'Suport de formation' },
15
+ { value: DocumentForHumanResourceType.PLAN_PARKING, text: 'Plan du parking' },
16
+ { value: DocumentForHumanResourceType.LIVRET_ACCUEIL, text: 'Livret d\'accueil' },
17
+ { value: DocumentForHumanResourceType.FICHE_COOPTATION, text: 'Fiche cooptation' },
18
+ { value: DocumentForHumanResourceType.FICHE_POSTE, text: 'Fiche de poste' },
19
+ { value: DocumentForHumanResourceType.REGLEMENT_INTERIEUR, text: 'Réglement intérieur' },
20
+ { value: DocumentForHumanResourceType.AUTRES, text: 'Autres' },
21
+ ];
@@ -0,0 +1,44 @@
1
+ import { IsBoolean, IsInt, IsOptional, IsString } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+ import { DocumentForHumanResourceType } from '../../../Enum/DocumentForHumanResourceType';
5
+
6
+ export class CreateHumanResourceLibrary {
7
+ @ApiPropertyOptional()
8
+ @IsOptional()
9
+ @IsInt()
10
+ idFile?: number;
11
+
12
+ @ApiProperty()
13
+ @IsInt()
14
+ idUserRh: number;
15
+
16
+ @ApiProperty()
17
+ @IsInt()
18
+ idDocumentType: DocumentForHumanResourceType;
19
+
20
+ @ApiProperty()
21
+ @IsString()
22
+ name: string;
23
+
24
+ @ApiPropertyOptional()
25
+ @IsOptional()
26
+ idRole?: number;
27
+
28
+ @ApiPropertyOptional()
29
+ @IsOptional()
30
+ @IsInt()
31
+ idUser?: number;
32
+
33
+ @ApiPropertyOptional()
34
+ @IsOptional()
35
+ @IsBoolean()
36
+ @ToBoolean()
37
+ visible?: boolean;
38
+
39
+ @ApiPropertyOptional()
40
+ @IsOptional()
41
+ @IsBoolean()
42
+ @ToBoolean()
43
+ shouldStoreForAllRoles?: boolean;
44
+ }
@@ -0,0 +1,13 @@
1
+ import { IsInt } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils';
3
+
4
+ export class CreateUserHumanResourceLibrary {
5
+ @ApiProperty()
6
+ @IsInt()
7
+ idHumanResourceLibrary?: number;
8
+
9
+ @ApiProperty()
10
+ @IsInt()
11
+ idUser: number;
12
+
13
+ }
@@ -0,0 +1,11 @@
1
+ import {
2
+ IsString,
3
+ } from 'class-validator';
4
+ import { ApiProperty } from '../../../../utils';
5
+
6
+ export class QueryHumanResourceLibrary {
7
+ @ApiProperty()
8
+ @IsString()
9
+ fileURL: string;
10
+ }
11
+
@@ -0,0 +1,54 @@
1
+ import {
2
+ IsBoolean,
3
+ IsDate,
4
+ IsIn, IsInt, IsOptional, IsString,
5
+ } from 'class-validator';
6
+ import { ApiPropertyOptional } from '../../../../utils';
7
+ import { DocumentForHumanResourceType } from '../../../Enum/DocumentForHumanResourceType';
8
+ import { OptionalQueryPaginate } from '../BasePaginate';
9
+
10
+ export class QueryPaginatedHumanResourceLibrary extends OptionalQueryPaginate {
11
+ @ApiPropertyOptional()
12
+ @IsInt()
13
+ @IsOptional()
14
+ idUser?: number;
15
+
16
+ @ApiPropertyOptional()
17
+ @IsString()
18
+ @IsOptional()
19
+ search?: string;
20
+
21
+ @ApiPropertyOptional()
22
+ @IsInt()
23
+ @IsOptional()
24
+ idRole?: number;
25
+
26
+ @ApiPropertyOptional()
27
+ @IsInt()
28
+ @IsOptional()
29
+ idDocumentType?: DocumentForHumanResourceType;
30
+
31
+ @ApiPropertyOptional()
32
+ @IsBoolean()
33
+ @IsOptional()
34
+ visible?: boolean;
35
+
36
+ @ApiPropertyOptional()
37
+ @IsBoolean()
38
+ @IsOptional()
39
+ withAction?: boolean;
40
+
41
+ @ApiPropertyOptional()
42
+ @IsDate()
43
+ @IsOptional()
44
+ createdDate?: Date;
45
+
46
+ @ApiPropertyOptional()
47
+ @IsOptional()
48
+ @IsString({
49
+ each: true,
50
+ })
51
+ @IsIn(['user'], { each: true })
52
+ include?: string[];
53
+ }
54
+
@@ -0,0 +1,25 @@
1
+ import { IUser } from './IUser';
2
+ import { IFile } from './IFile';
3
+ import { IRole } from './IRole';
4
+ import { DocumentForHumanResourceType } from '../../Enum/DocumentForHumanResourceType';
5
+
6
+ // HumanResourceLibrary
7
+ export interface IHumanResourceLibrary {
8
+ id?: number;
9
+ idFile?: number;
10
+ idUserRh: number;
11
+ idDocumentType: DocumentForHumanResourceType;
12
+ name: string;
13
+ idRole?: number | null;
14
+ idUser?: number | null;
15
+ visible?: boolean | null;
16
+ createdAt?: Date | null;
17
+ updatedAt?: Date | null;
18
+ deletedAt?: Date | null;
19
+
20
+ // Associations
21
+ user?: IUser;
22
+ userRh?: IUser;
23
+ role?: IRole;
24
+ file?: IFile;
25
+ }
@@ -0,0 +1,16 @@
1
+ import { IUser } from './IUser';
2
+ import { IHumanResourceLibrary } from './IHumanResourceLibrary';
3
+
4
+ // userHumanResourceLibrary
5
+ export interface IUserHumanResourceLibrary {
6
+ id?: number;
7
+ idHumanResourceLibrary: number;
8
+ idUser: number;
9
+ createdAt?: Date | null;
10
+ updatedAt?: Date | null;
11
+ deletedAt?: Date | null;
12
+
13
+ // Associations
14
+ user?: IUser;
15
+ humanResourceLibrary?: IHumanResourceLibrary;
16
+ }
package/ts/types/index.ts CHANGED
@@ -336,6 +336,8 @@ export * from './Interface/models/ICompanyCreationForm';
336
336
  export * from './Interface/models/IAnnotation';
337
337
  export * from './Interface/models/ILoanEarlyRepayment';
338
338
  export * from './Interface/models/IPrevisionalForm';
339
+ export * from './Interface/models/IHumanResourceLibrary';
340
+ export * from './Interface/models/IUserHumanResourceLibrary';
339
341
 
340
342
 
341
343
  // Schemas
@@ -557,6 +559,7 @@ export * from './Enum/PrevisionalForm';
557
559
  export * from './Enum/PaymentRecovery';
558
560
  export * from './Enum/JuridicalSociety';
559
561
  export * from './Enum/Pdf2PicLocalType';
562
+ export * from './Enum/DocumentForHumanResourceType';
560
563
 
561
564
  // Interfaces API
562
565
  export * from './Interface/api/exercice/ReadExercice';
@@ -869,6 +872,11 @@ export * from './Interface/api/incomeAllocation/CreateIncomeAllocation';
869
872
  export * from './Interface/api/incomeAllocation/ReadIncomeAllocation';
870
873
  export * from './Interface/api/incomeAllocation/TypeAndAmount';
871
874
  export * from './Interface/api/revisionGuide/CreateRevisionGuide';
875
+ export * from './Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary';
876
+ export * from './Interface/api/humanResourceLibrary/QueryHumanResourceLibrary';
877
+ export * from './Interface/api/humanResourceLibrary/CreateHumanResourceLibrary';
878
+ export * from './Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary';
879
+
872
880
  export * from './Interface/api/library/QueryLibrary';
873
881
  export * from './Interface/api/library/ReadLibraryFile';
874
882
  export * from './Interface/api/taxDeadline/QueryTaxDeadline';