@silexpert/core 1.3.133 → 1.3.134
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.
- package/dist/cjs/api/resources/Team.d.ts +21 -1
- package/dist/cjs/api/resources/Team.d.ts.map +1 -1
- package/dist/cjs/api/resources/Team.js +26 -0
- package/dist/cjs/api/resources/Team.js.map +1 -1
- package/dist/cjs/types/Enum/Ged.js +1 -1
- package/dist/cjs/types/Enum/Ged.js.map +1 -1
- package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.d.ts +6 -0
- package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.js +38 -0
- package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.js.map +1 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/mjs/api/resources/Team.d.ts +21 -1
- package/dist/mjs/api/resources/Team.d.ts.map +1 -1
- package/dist/mjs/api/resources/Team.js +26 -0
- package/dist/mjs/api/resources/Team.js.map +1 -1
- package/dist/mjs/types/Enum/Ged.js +1 -1
- package/dist/mjs/types/Enum/Ged.js.map +1 -1
- package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.d.ts +6 -0
- package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.js +37 -0
- package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.js.map +1 -0
- package/dist/mjs/types/index.d.ts +1 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +1 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Team.ts +31 -1
- package/ts/types/Enum/Ged.ts +1 -1
- package/ts/types/Interface/api/team/UpdateTeamsForUser.ts +22 -0
- package/ts/types/index.ts +1 -0
package/ts/api/resources/Team.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
|
-
import { ITeam, QueryCreateTeam, QueryGetAllTeamsWithIncludes, QueryUpdateTeam } from '../../types';
|
|
2
|
+
import { ITeam, QueryCreateTeam, QueryGetAllTeamsWithIncludes, QueryUpdateTeam, UpdateTeamsForUser, IUserTeam } from '../../types';
|
|
3
3
|
|
|
4
4
|
export class Team extends Resource {
|
|
5
5
|
/**
|
|
@@ -27,6 +27,7 @@ export class Team extends Resource {
|
|
|
27
27
|
delete(id: number): Promise<number> {
|
|
28
28
|
return this.axios.$delete(`/teams/${id}`);
|
|
29
29
|
}
|
|
30
|
+
|
|
30
31
|
/**
|
|
31
32
|
* Should return all records in Team table with includes
|
|
32
33
|
* @param { QueryGetAllTeamsWithIncludes } params
|
|
@@ -35,4 +36,33 @@ export class Team extends Resource {
|
|
|
35
36
|
getAll(params: QueryGetAllTeamsWithIncludes): Promise<ITeam[]> {
|
|
36
37
|
return this.axios.$get('/teams/all', { params });
|
|
37
38
|
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Should return all records in Team table with includes
|
|
42
|
+
* @param { QueryGetAllTeamsWithIncludes } params
|
|
43
|
+
* @returns { ITeam[] }
|
|
44
|
+
*/
|
|
45
|
+
getAllV2(params: QueryGetAllTeamsWithIncludes): Promise<ITeam[]> {
|
|
46
|
+
return this.axios.$get('/teams/all/v2', { params });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Should update teams for a specific user
|
|
51
|
+
* @param { number } userId
|
|
52
|
+
* @param { UpdateTeamsForUser } payload
|
|
53
|
+
* @returns { IUserTeam[] }
|
|
54
|
+
*/
|
|
55
|
+
updateTeamsForUser(userId: number, payload: UpdateTeamsForUser): Promise<IUserTeam[]> {
|
|
56
|
+
return this.axios.$put(`/teams/user/${userId}/teams`, payload);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Should delete an user attach to a team
|
|
61
|
+
* @param { number } teamId
|
|
62
|
+
* @param { number } userId
|
|
63
|
+
* @returns { number }
|
|
64
|
+
*/
|
|
65
|
+
deleteUserFromTeam(teamId: number, userId: number): Promise<number> {
|
|
66
|
+
return this.axios.$delete(`/teams/${teamId}/user/${userId}`);
|
|
67
|
+
}
|
|
38
68
|
}
|
package/ts/types/Enum/Ged.ts
CHANGED
|
@@ -614,7 +614,7 @@ export const TypeFileDetail: Record<number, {
|
|
|
614
614
|
},
|
|
615
615
|
[TypeFile.COMPANY_CONTRIBUTION_PROOF]: {
|
|
616
616
|
typeFile: TypeFile.COMPANY_CONTRIBUTION_PROOF,
|
|
617
|
-
name: 'Justificatif des apports
|
|
617
|
+
name: 'Justificatif des apports faits à la société',
|
|
618
618
|
idGedFolder: GedFolder.JURIDICAL,
|
|
619
619
|
},
|
|
620
620
|
[TypeFile.NOTARY_STATEMENT_AND_PURCHASE_DEED]: {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IsArray, IsBoolean, IsInt, IsNumber, IsOptional } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
|
+
|
|
5
|
+
export class UpdateTeamsForUser {
|
|
6
|
+
@ApiProperty({ description: 'Array of team IDs to assign to the user', type: [Number] })
|
|
7
|
+
@IsArray()
|
|
8
|
+
@IsInt({ each: true })
|
|
9
|
+
teamIds: number[];
|
|
10
|
+
|
|
11
|
+
@ApiPropertyOptional()
|
|
12
|
+
@IsOptional()
|
|
13
|
+
@IsBoolean()
|
|
14
|
+
@ToBoolean()
|
|
15
|
+
replace?: boolean;
|
|
16
|
+
|
|
17
|
+
@ApiPropertyOptional()
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsNumber()
|
|
20
|
+
oldTeamId?: number;
|
|
21
|
+
|
|
22
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -772,6 +772,7 @@ export * from './Interface/api/inpi/inpi';
|
|
|
772
772
|
export * from './Interface/api/team/QueryCreate';
|
|
773
773
|
export * from './Interface/api/team/QueryGetAllWithIncludes';
|
|
774
774
|
export * from './Interface/api/team/QueryUpdate';
|
|
775
|
+
export * from './Interface/api/team/UpdateTeamsForUser';
|
|
775
776
|
export * from './Interface/api/constitutionHistory/QueryPaginatedConstitutionHistory';
|
|
776
777
|
export * from './Interface/api/userSpecialDay/BodyUserSpecialDay';
|
|
777
778
|
export * from './Interface/api/userSpecialDay/QueryUserSpecialDay';
|