@silexpert/core 1.1.322 → 1.1.323

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 (55) hide show
  1. package/dist/cjs/api/resources/User.d.ts +2 -1
  2. package/dist/cjs/api/resources/User.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/User.js +17 -0
  4. package/dist/cjs/api/resources/User.js.map +1 -1
  5. package/dist/cjs/types/Enum/TimeSlot.d.ts +18 -1
  6. package/dist/cjs/types/Enum/TimeSlot.d.ts.map +1 -1
  7. package/dist/cjs/types/Enum/TimeSlot.js +118 -25
  8. package/dist/cjs/types/Enum/TimeSlot.js.map +1 -1
  9. package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts +1 -0
  10. package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts.map +1 -1
  11. package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.js +7 -0
  12. package/dist/cjs/types/Interface/api/calendarEvent/queryCalendarEventCall.js.map +1 -1
  13. package/dist/cjs/types/Interface/api/user/CreateCoworker.d.ts +3 -0
  14. package/dist/cjs/types/Interface/api/user/CreateCoworker.d.ts.map +1 -1
  15. package/dist/cjs/types/Interface/api/user/CreateCoworker.js +13 -0
  16. package/dist/cjs/types/Interface/api/user/CreateCoworker.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/user/UpdateCoworker.d.ts +25 -0
  18. package/dist/cjs/types/Interface/api/user/UpdateCoworker.d.ts.map +1 -0
  19. package/dist/cjs/types/Interface/api/user/UpdateCoworker.js +147 -0
  20. package/dist/cjs/types/Interface/api/user/UpdateCoworker.js.map +1 -0
  21. package/dist/cjs/types/index.d.ts +1 -0
  22. package/dist/cjs/types/index.d.ts.map +1 -1
  23. package/dist/cjs/types/index.js +1 -0
  24. package/dist/cjs/types/index.js.map +1 -1
  25. package/dist/mjs/api/resources/User.d.ts +2 -1
  26. package/dist/mjs/api/resources/User.d.ts.map +1 -1
  27. package/dist/mjs/api/resources/User.js +17 -0
  28. package/dist/mjs/api/resources/User.js.map +1 -1
  29. package/dist/mjs/types/Enum/TimeSlot.d.ts +18 -1
  30. package/dist/mjs/types/Enum/TimeSlot.d.ts.map +1 -1
  31. package/dist/mjs/types/Enum/TimeSlot.js +116 -24
  32. package/dist/mjs/types/Enum/TimeSlot.js.map +1 -1
  33. package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts +1 -0
  34. package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.d.ts.map +1 -1
  35. package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.js +8 -0
  36. package/dist/mjs/types/Interface/api/calendarEvent/queryCalendarEventCall.js.map +1 -1
  37. package/dist/mjs/types/Interface/api/user/CreateCoworker.d.ts +3 -0
  38. package/dist/mjs/types/Interface/api/user/CreateCoworker.d.ts.map +1 -1
  39. package/dist/mjs/types/Interface/api/user/CreateCoworker.js +16 -1
  40. package/dist/mjs/types/Interface/api/user/CreateCoworker.js.map +1 -1
  41. package/dist/mjs/types/Interface/api/user/UpdateCoworker.d.ts +25 -0
  42. package/dist/mjs/types/Interface/api/user/UpdateCoworker.d.ts.map +1 -0
  43. package/dist/mjs/types/Interface/api/user/UpdateCoworker.js +164 -0
  44. package/dist/mjs/types/Interface/api/user/UpdateCoworker.js.map +1 -0
  45. package/dist/mjs/types/index.d.ts +1 -0
  46. package/dist/mjs/types/index.d.ts.map +1 -1
  47. package/dist/mjs/types/index.js +1 -0
  48. package/dist/mjs/types/index.js.map +1 -1
  49. package/package.json +1 -1
  50. package/ts/api/resources/User.ts +19 -0
  51. package/ts/types/Enum/TimeSlot.ts +121 -24
  52. package/ts/types/Interface/api/calendarEvent/queryCalendarEventCall.ts +6 -0
  53. package/ts/types/Interface/api/user/CreateCoworker.ts +12 -1
  54. package/ts/types/Interface/api/user/UpdateCoworker.ts +112 -0
  55. package/ts/types/index.ts +1 -0
@@ -12,18 +12,49 @@ export enum TimeSlot {
12
12
  BILLING = 8,
13
13
  SALES = 9,
14
14
  APPOINTMENT = 10,
15
+ SUPPORTING_CREATION_OF_SOCIETY = 11,
16
+ APPROVAL_FINANCIAL_STATEMENTS_AND_DISTRIBUTE_DIVIDENDS = 12,
17
+ EDIT_SOCIETY = 13,
18
+ CLOSE_SOCIETY = 14,
19
+ TAX_ADVICE_OR_COMPLEX_LEGAL_ARRANGEMENTS = 15,
20
+ FIX_UNPAID = 16,
21
+ }
22
+ export enum TimeSlotCategory {
23
+ ACCOUNTING = 1,
24
+ JURIDIC = 2,
25
+ BILLING = 3,
15
26
  }
16
27
 
17
28
  export type TimeSlotDetailType = {
18
29
  id: number;
19
30
  name: string;
20
31
  internalName: string;
32
+ category?: string,
21
33
  duration: number;
22
34
  idRole: number[];
23
35
  forWholeService?: boolean
24
36
  idRoleExcluded?: number[];
25
37
  idTimeCounterType: number;
26
38
  };
39
+ export type TimeSlotCategoryDetailType = {
40
+ id: number;
41
+ name: string;
42
+ };
43
+
44
+ export const TimeSlotCategoryDetail:TimeSlotCategoryDetailType[] = [
45
+ {
46
+ id: TimeSlotCategory.ACCOUNTING,
47
+ name: 'Comptable',
48
+ },
49
+ {
50
+ id: TimeSlotCategory.JURIDIC,
51
+ name: 'Juridique',
52
+ },
53
+ {
54
+ id: TimeSlotCategory.BILLING,
55
+ name: 'Facturation',
56
+ },
57
+ ];
27
58
 
28
59
  export const TimeSlotDetail:TimeSlotDetailType[] = [
29
60
  {
@@ -44,23 +75,27 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
44
75
  forWholeService: true,
45
76
  idTimeCounterType: TimeCounterType.ONBOARDING.id,
46
77
  },
47
- // {
48
- // id: TimeSlot.BILAN,
49
- // name: 'Bilan',
50
- // internalName: 'Bilan',
51
- // duration: 60,
52
- // idRole: [Role.ACCOUNTANT],
53
- // forWholeService: false,
54
- // },
55
- // {
56
- // id: TimeSlot.TVA,
57
- // name: 'Tva',
58
- // internalName: 'Tva',
59
- // duration: 15,
60
- // idRole:[Role.ACCOUNTANT],
61
- // idRoleExcluded:[Role.MANAGER],
62
- // forWholeService: false,
63
- // },
78
+ {
79
+ id: TimeSlot.BILAN,
80
+ name: 'Questions concernant mon bilan',
81
+ internalName: 'Questions concernant mon bilan',
82
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.ACCOUNTING)?.name,
83
+ duration: 30,
84
+ idRole: [Role.ACCOUNTANT],
85
+ forWholeService: false,
86
+ idTimeCounterType: TimeCounterType.BILAN.id,
87
+ },
88
+ {
89
+ id: TimeSlot.TVA,
90
+ name: 'Questions concernant ma TVA',
91
+ internalName: 'Questions concernant ma TVA',
92
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.ACCOUNTING)?.name,
93
+ duration: 30,
94
+ idRole:[Role.ACCOUNTANT],
95
+ idRoleExcluded:[Role.MANAGER],
96
+ forWholeService: false,
97
+ idTimeCounterType: TimeCounterType.VAT.id,
98
+ },
64
99
  // {
65
100
  // id: TimeSlot.TVA_MANAGER,
66
101
  // name: 'Tva',
@@ -80,8 +115,9 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
80
115
  // },
81
116
  {
82
117
  id: TimeSlot.ACCOUNTING_RDV,
83
- name: 'Rdv comptable',
84
- internalName: 'Rdv comptable',
118
+ name: 'Conseils',
119
+ internalName: 'Conseils',
120
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.ACCOUNTING)?.name,
85
121
  duration: 30,
86
122
  idRole:[Role.ACCOUNTANT],
87
123
  idRoleExcluded:[Role.MANAGER],
@@ -90,11 +126,12 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
90
126
  },
91
127
  {
92
128
  id: TimeSlot.BILLING,
93
- name: 'Facturation',
94
- internalName: 'Facturation',
95
- duration: 45,
129
+ name: 'Questions concernant ma facturation',
130
+ internalName: 'Questions concernant ma facturation',
131
+ duration: 30,
132
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.BILLING)?.name,
96
133
  idRole:[Role.FACTURATION],
97
- forWholeService: false,
134
+ forWholeService: true,
98
135
  idTimeCounterType: TimeCounterType.CALENDLY.id,
99
136
  },
100
137
  {
@@ -107,7 +144,7 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
107
144
  idTimeCounterType: TimeCounterType.CALENDLY.id,
108
145
  },
109
146
  {
110
- id: TimeSlot.APPOINTMENT,
147
+ id: TimeSlot.APPOINTMENT, //TODO: à commenter ? remplacé par idType 7 ?
111
148
  name: 'Rdv',
112
149
  internalName: 'Rdv',
113
150
  duration: 20,
@@ -115,4 +152,64 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
115
152
  forWholeService: false,
116
153
  idTimeCounterType: TimeCounterType.CALENDLY.id,
117
154
  },
155
+ {
156
+ id: TimeSlot.SUPPORTING_CREATION_OF_SOCIETY,
157
+ name: 'Accompagnement pour la création de mon entreprise',
158
+ internalName: 'Accompagnement pour la création de mon entreprise',
159
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
160
+ duration: 30,
161
+ idRole: [Role.JURIDIC],
162
+ forWholeService: false,
163
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
164
+ },
165
+ {
166
+ id: TimeSlot.APPROVAL_FINANCIAL_STATEMENTS_AND_DISTRIBUTE_DIVIDENDS,
167
+ name: 'Approuver les comptes et/ou distribuer des dividendes',
168
+ internalName: 'Approuver les comptes et/ou distribuer des dividendes',
169
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
170
+ duration: 30,
171
+ idRole: [Role.JURIDIC],
172
+ forWholeService: false,
173
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
174
+ },
175
+ {
176
+ id: TimeSlot.EDIT_SOCIETY,
177
+ name: 'Modifier mon entreprise',
178
+ internalName: 'Modifier mon entreprise',
179
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
180
+ duration: 30,
181
+ idRole: [Role.JURIDIC],
182
+ forWholeService: false,
183
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
184
+ },
185
+ {
186
+ id: TimeSlot.CLOSE_SOCIETY,
187
+ name: 'Fermer mon entreprise',
188
+ internalName: 'Fermer mon entreprise',
189
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
190
+ duration: 30,
191
+ idRole: [Role.JURIDIC],
192
+ forWholeService: false,
193
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
194
+ },
195
+ {
196
+ id: TimeSlot.TAX_ADVICE_OR_COMPLEX_LEGAL_ARRANGEMENTS,
197
+ name: 'Conseils fiscaux ou montages juridiques complexes',
198
+ internalName: 'Conseils fiscaux ou montages juridiques complexes',
199
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
200
+ duration: 60,
201
+ idRole: [Role.JURIDIC, Role.DIRECTOR],
202
+ forWholeService: true,
203
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
204
+ },
205
+ {
206
+ id: TimeSlot.FIX_UNPAID,
207
+ name: 'Régulariser un paiement',
208
+ internalName: 'Régulariser un paiement',
209
+ duration: 30,
210
+ category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.BILLING)?.name,
211
+ idRole:[Role.FACTURATION],
212
+ forWholeService: true,
213
+ idTimeCounterType: TimeCounterType.CALENDLY.id,
214
+ },
118
215
  ];
@@ -1,3 +1,4 @@
1
+ import { IsBoolean, IsOptional } from 'class-validator';
1
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
2
3
 
3
4
  export class QueryCalendarEventCall {
@@ -9,4 +10,9 @@ export class QueryCalendarEventCall {
9
10
 
10
11
  @ApiProperty()
11
12
  endDate: Date;
13
+
14
+ @IsBoolean()
15
+ @ApiPropertyOptional()
16
+ @IsOptional()
17
+ noHonoredCall?: boolean;
12
18
  }
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  IsArray,
3
- IsBoolean, IsDate, IsDefined, IsEmail, IsInt, IsNumber, IsOptional, IsPhoneNumber, IsString,
3
+ IsBoolean, IsDate, IsDefined, IsEmail, IsEnum, IsInt, IsNumber, IsOptional, IsPhoneNumber, IsString,
4
4
  } from 'class-validator';
5
5
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
6
6
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
7
+ import { EntityType } from '../../../Enum/EntityType';
7
8
 
8
9
  export class CreateCoworker {
9
10
  @ApiProperty()
@@ -81,6 +82,16 @@ export class CreateCoworker {
81
82
  @IsDate()
82
83
  confirmedAt?: Date;
83
84
 
85
+ @ApiProperty()
86
+ @IsDefined()
87
+ @IsInt()
88
+ idOffice: number;
89
+
90
+ @ApiProperty()
91
+ @IsDefined()
92
+ @IsEnum(EntityType)
93
+ entity: EntityType;
94
+
84
95
  @ApiProperty()
85
96
  @IsDefined()
86
97
  @IsArray()
@@ -0,0 +1,112 @@
1
+ import { IsOptional, IsString, IsPhoneNumber, IsNumber, IsBoolean, IsDate, IsArray, IsEnum } from 'class-validator';
2
+ import { CommercialGrade, EntityType, IUser, TFile } from '../../..';
3
+ import { ApiPropertyOptional } from '../../../../utils';
4
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
5
+
6
+ export class UpdateCorworker implements IUser {
7
+ @ApiPropertyOptional()
8
+ @IsOptional()
9
+ @IsNumber()
10
+ idCivility?: number;
11
+
12
+ @ApiPropertyOptional()
13
+ @IsOptional()
14
+ @IsString()
15
+ firstname?: string;
16
+
17
+ @ApiPropertyOptional()
18
+ @IsOptional()
19
+ @IsString()
20
+ lastname?: string;
21
+
22
+ @ApiPropertyOptional()
23
+ @IsOptional()
24
+ @IsPhoneNumber('FR')
25
+ phone?: string;
26
+
27
+ @ApiPropertyOptional()
28
+ @IsOptional()
29
+ @IsString()
30
+ email?: string;
31
+
32
+ @ApiPropertyOptional()
33
+ @IsOptional()
34
+ @IsString()
35
+ username?: string;
36
+
37
+ @ApiPropertyOptional()
38
+ @IsOptional()
39
+ @IsString()
40
+ password?: string;
41
+
42
+ @ApiPropertyOptional()
43
+ @IsOptional()
44
+ @IsBoolean()
45
+ @ToBoolean()
46
+ active?: boolean;
47
+
48
+ @ApiPropertyOptional()
49
+ @IsOptional()
50
+ @IsBoolean()
51
+ @ToBoolean()
52
+ longAbsence?: boolean;
53
+
54
+ @ApiPropertyOptional()
55
+ @IsOptional()
56
+ @IsString()
57
+ positionLabel?: string;
58
+
59
+ @ApiPropertyOptional()
60
+ @IsOptional()
61
+ @IsBoolean()
62
+ @ToBoolean()
63
+ apprentice?: boolean;
64
+
65
+ @ApiPropertyOptional()
66
+ @IsOptional()
67
+ @IsDate()
68
+ birthdate?: Date;
69
+
70
+ @ApiPropertyOptional()
71
+ @IsOptional()
72
+ @IsDate()
73
+ arrivalDate?: Date;
74
+
75
+ @ApiPropertyOptional()
76
+ @IsOptional()
77
+ @IsNumber()
78
+ idOffice?: number;
79
+
80
+ @ApiPropertyOptional()
81
+ @IsOptional()
82
+ @IsEnum(EntityType)
83
+ entity?: EntityType;
84
+
85
+ @ApiPropertyOptional()
86
+ @IsOptional()
87
+ @IsEnum(CommercialGrade)
88
+ idCommercialGrade?: CommercialGrade;
89
+
90
+ @ApiPropertyOptional()
91
+ file?: TFile;
92
+
93
+ @ApiPropertyOptional()
94
+ @IsOptional()
95
+ @IsArray()
96
+ idRoles?: number[];
97
+
98
+ @ApiPropertyOptional()
99
+ @IsOptional()
100
+ @IsArray()
101
+ idTeams?: number[];
102
+
103
+ @ApiPropertyOptional()
104
+ @IsOptional()
105
+ @IsArray()
106
+ idUsersBrands?: number[];
107
+
108
+ @ApiPropertyOptional()
109
+ @IsOptional()
110
+ @IsArray()
111
+ idBusinessLines?: number[];
112
+ }
package/ts/types/index.ts CHANGED
@@ -590,6 +590,7 @@ export * from './Interface/api/user/ParamsGetAll';
590
590
  export * from './Interface/api/user/ParamsGetAllUserWithRoles';
591
591
  export * from './Interface/api/user/ParamsGetAllCollaborators';
592
592
  export * from './Interface/api/user/CreateCoworker';
593
+ export * from './Interface/api/user/UpdateCoworker';
593
594
  export * from './Interface/api/user/Permissions';
594
595
  export * from './Interface/api/user/CollaboratorsByRoles';
595
596
  export * from './Interface/api/account/Read';