@silexpert/core 1.2.96 → 1.2.97

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 (96) hide show
  1. package/dist/cjs/api/resources/Commercial.d.ts +3 -1
  2. package/dist/cjs/api/resources/Commercial.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Commercial.js +6 -0
  4. package/dist/cjs/api/resources/Commercial.js.map +1 -1
  5. package/dist/cjs/api/resources/Society.d.ts +2 -1
  6. package/dist/cjs/api/resources/Society.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/Society.js +8 -0
  8. package/dist/cjs/api/resources/Society.js.map +1 -1
  9. package/dist/cjs/api/resources/WorkingSchedule.d.ts +2 -1
  10. package/dist/cjs/api/resources/WorkingSchedule.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/WorkingSchedule.js +3 -0
  12. package/dist/cjs/api/resources/WorkingSchedule.js.map +1 -1
  13. package/dist/cjs/types/Enum/SocietyTypeExportCsv.d.ts +5 -0
  14. package/dist/cjs/types/Enum/SocietyTypeExportCsv.d.ts.map +1 -0
  15. package/dist/cjs/types/Enum/SocietyTypeExportCsv.js +9 -0
  16. package/dist/cjs/types/Enum/SocietyTypeExportCsv.js.map +1 -0
  17. package/dist/cjs/types/Interface/api/commercial/QueryPaginatedFollowProspect.d.ts +19 -0
  18. package/dist/cjs/types/Interface/api/commercial/QueryPaginatedFollowProspect.d.ts.map +1 -0
  19. package/dist/cjs/types/Interface/api/commercial/QueryPaginatedFollowProspect.js +114 -0
  20. package/dist/cjs/types/Interface/api/commercial/QueryPaginatedFollowProspect.js.map +1 -0
  21. package/dist/cjs/types/Interface/api/commercial/ReadStatsProspect.d.ts +18 -0
  22. package/dist/cjs/types/Interface/api/commercial/ReadStatsProspect.d.ts.map +1 -0
  23. package/dist/cjs/types/Interface/api/commercial/ReadStatsProspect.js +10 -0
  24. package/dist/cjs/types/Interface/api/commercial/ReadStatsProspect.js.map +1 -0
  25. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.d.ts +6 -0
  26. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.d.ts.map +1 -0
  27. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.js +35 -0
  28. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.js.map +1 -0
  29. package/dist/cjs/types/Interface/api/workingSchedule/Query.d.ts +5 -0
  30. package/dist/cjs/types/Interface/api/workingSchedule/Query.d.ts.map +1 -0
  31. package/dist/cjs/types/Interface/api/workingSchedule/Query.js +29 -0
  32. package/dist/cjs/types/Interface/api/workingSchedule/Query.js.map +1 -0
  33. package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +18 -0
  34. package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
  35. package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
  36. package/dist/cjs/types/Interface/models/IAnalyticsUtm.d.ts +6 -6
  37. package/dist/cjs/types/Interface/models/IAnalyticsUtm.d.ts.map +1 -1
  38. package/dist/cjs/types/Interface/models/IAnalyticsUtm.js.map +1 -1
  39. package/dist/cjs/types/index.d.ts +5 -0
  40. package/dist/cjs/types/index.d.ts.map +1 -1
  41. package/dist/cjs/types/index.js +5 -0
  42. package/dist/cjs/types/index.js.map +1 -1
  43. package/dist/mjs/api/resources/Commercial.d.ts +3 -1
  44. package/dist/mjs/api/resources/Commercial.d.ts.map +1 -1
  45. package/dist/mjs/api/resources/Commercial.js +12 -0
  46. package/dist/mjs/api/resources/Commercial.js.map +1 -1
  47. package/dist/mjs/api/resources/Society.d.ts +2 -1
  48. package/dist/mjs/api/resources/Society.d.ts.map +1 -1
  49. package/dist/mjs/api/resources/Society.js +8 -0
  50. package/dist/mjs/api/resources/Society.js.map +1 -1
  51. package/dist/mjs/api/resources/WorkingSchedule.d.ts +2 -1
  52. package/dist/mjs/api/resources/WorkingSchedule.d.ts.map +1 -1
  53. package/dist/mjs/api/resources/WorkingSchedule.js +6 -0
  54. package/dist/mjs/api/resources/WorkingSchedule.js.map +1 -1
  55. package/dist/mjs/types/Enum/SocietyTypeExportCsv.d.ts +5 -0
  56. package/dist/mjs/types/Enum/SocietyTypeExportCsv.d.ts.map +1 -0
  57. package/dist/mjs/types/Enum/SocietyTypeExportCsv.js +6 -0
  58. package/dist/mjs/types/Enum/SocietyTypeExportCsv.js.map +1 -0
  59. package/dist/mjs/types/Interface/api/commercial/QueryPaginatedFollowProspect.d.ts +19 -0
  60. package/dist/mjs/types/Interface/api/commercial/QueryPaginatedFollowProspect.d.ts.map +1 -0
  61. package/dist/mjs/types/Interface/api/commercial/QueryPaginatedFollowProspect.js +125 -0
  62. package/dist/mjs/types/Interface/api/commercial/QueryPaginatedFollowProspect.js.map +1 -0
  63. package/dist/mjs/types/Interface/api/commercial/ReadStatsProspect.d.ts +18 -0
  64. package/dist/mjs/types/Interface/api/commercial/ReadStatsProspect.d.ts.map +1 -0
  65. package/dist/mjs/types/Interface/api/commercial/ReadStatsProspect.js +9 -0
  66. package/dist/mjs/types/Interface/api/commercial/ReadStatsProspect.js.map +1 -0
  67. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.d.ts +6 -0
  68. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.d.ts.map +1 -0
  69. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.js +34 -0
  70. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.js.map +1 -0
  71. package/dist/mjs/types/Interface/api/workingSchedule/Query.d.ts +5 -0
  72. package/dist/mjs/types/Interface/api/workingSchedule/Query.d.ts.map +1 -0
  73. package/dist/mjs/types/Interface/api/workingSchedule/Query.js +27 -0
  74. package/dist/mjs/types/Interface/api/workingSchedule/Query.js.map +1 -0
  75. package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +18 -0
  76. package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
  77. package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
  78. package/dist/mjs/types/Interface/models/IAnalyticsUtm.d.ts +6 -6
  79. package/dist/mjs/types/Interface/models/IAnalyticsUtm.d.ts.map +1 -1
  80. package/dist/mjs/types/Interface/models/IAnalyticsUtm.js.map +1 -1
  81. package/dist/mjs/types/index.d.ts +5 -0
  82. package/dist/mjs/types/index.d.ts.map +1 -1
  83. package/dist/mjs/types/index.js +5 -0
  84. package/dist/mjs/types/index.js.map +1 -1
  85. package/package.json +1 -1
  86. package/ts/api/resources/Commercial.ts +15 -0
  87. package/ts/api/resources/Society.ts +10 -0
  88. package/ts/api/resources/WorkingSchedule.ts +14 -1
  89. package/ts/types/Enum/SocietyTypeExportCsv.ts +4 -0
  90. package/ts/types/Interface/api/commercial/QueryPaginatedFollowProspect.ts +85 -0
  91. package/ts/types/Interface/api/commercial/ReadStatsProspect.ts +19 -0
  92. package/ts/types/Interface/api/society/DataCustomersCsv.ts +18 -0
  93. package/ts/types/Interface/api/workingSchedule/Query.ts +13 -0
  94. package/ts/types/Interface/api/workingSchedule/QueryDailyHour.ts +21 -0
  95. package/ts/types/Interface/models/IAnalyticsUtm.ts +6 -6
  96. package/ts/types/index.ts +5 -0
@@ -12,6 +12,8 @@ import {
12
12
  QueryPaginatedNewProspect,
13
13
  QueryGetStatsHistory,
14
14
  QueryGetLeadByUser,
15
+ ISociety,
16
+ StatsProspectResponse,
15
17
  } from '../../types';
16
18
  import { Society } from './Society';
17
19
 
@@ -45,6 +47,13 @@ export class Commercial extends Resource {
45
47
  params,
46
48
  });
47
49
  }
50
+ getStatsProspect(params: QueryGetStatsHistory, signal?: AbortSignal): Promise<StatsProspectResponse> {
51
+ return this.axios.$get('/commercial/prospects/statistics', {
52
+ ...(signal ? { signal } : {}),
53
+ params,
54
+ });
55
+ }
56
+
48
57
  getLeadByUser(idUser: number, params: QueryGetLeadByUser, signal?: AbortSignal): Promise<number> {
49
58
  return this.axios.$get(`/commercial/${idUser}/lead`, {
50
59
  ...(signal ? { signal } : {}),
@@ -87,4 +96,10 @@ export class Commercial extends Resource {
87
96
  params,
88
97
  });
89
98
  }
99
+ getPaginatedFollowProspect(params: QueryPaginatedNewProspect, signal?: AbortSignal): Promise<BasePaginate<ISociety>> {
100
+ return this.axios.$get('/commercial/prospects', {
101
+ ...(signal ? { signal } : {}),
102
+ params,
103
+ });
104
+ }
90
105
  }
@@ -27,6 +27,7 @@ import {
27
27
  GetSocietyState,
28
28
  QueryUnpaidSociety,
29
29
  ReadSocietyUnpaidStats,
30
+ DataCustomersCsv,
30
31
  } from '../../types';
31
32
  import { CancelToken } from 'axios';
32
33
 
@@ -184,4 +185,13 @@ export class Society extends Resource {
184
185
  getState(idSociety: number): Promise<GetSocietyState> {
185
186
  return this.axios.$get(`/societies/${idSociety}/states`);
186
187
  }
188
+
189
+ exportCustomersCSV(params: DataCustomersCsv): Promise<Buffer> {
190
+ return this.axios.$post('/societies/exports', params, {
191
+ responseType: 'arraybuffer',
192
+ headers: {
193
+ Accept: 'application/csv',
194
+ },
195
+ });
196
+ }
187
197
  }
@@ -1,5 +1,11 @@
1
1
  import { Resource } from '../Resource';
2
- import { QueryAvailableTimeSlot, ReadWorkingSchedule, SpecialHours, TimeSlots } from '../..';
2
+ import {
3
+ QueryAvailableTimeSlot,
4
+ QueryGetSpecialHoursForTeam,
5
+ ReadWorkingSchedule,
6
+ SpecialHours,
7
+ TimeSlots,
8
+ } from '../..';
3
9
 
4
10
  export class WorkingSchedule extends Resource {
5
11
  getSpecialHoursForCollaborator(idUser: number, startDate: Date, endDate: Date): Promise<SpecialHours> {
@@ -8,6 +14,13 @@ export class WorkingSchedule extends Resource {
8
14
  });
9
15
  }
10
16
 
17
+ getSpecialHoursForTeam(params: QueryGetSpecialHoursForTeam, signal?: AbortSignal): Promise<SpecialHours> {
18
+ return this.axios.$get('/workingSchedule/special-hours-for-team', {
19
+ ...(signal ? { signal } : {}),
20
+ params,
21
+ });
22
+ }
23
+
11
24
  getPdf(id: number, modifDate?: string): Promise<Buffer> {
12
25
  return this.axios.$get(`workingSchedule/${id}/pdf`, {
13
26
  params: { modifDate },
@@ -0,0 +1,4 @@
1
+ export enum SocietyTypeExportCsv {
2
+ CUSTOMERS = 1,
3
+ PROSPECTS = 2,
4
+ }
@@ -0,0 +1,85 @@
1
+ import { IsBoolean, IsInt, IsOptional, IsString } from 'class-validator';
2
+ import { ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+ import { OptionalQueryPaginate } from '../BasePaginate';
5
+
6
+ export class QueryPaginatedFollowProspect extends OptionalQueryPaginate {
7
+ @ApiPropertyOptional()
8
+ @IsOptional()
9
+ @IsString()
10
+ search?: string;
11
+
12
+ @ApiPropertyOptional()
13
+ @IsOptional()
14
+ @IsInt()
15
+ idSource?: number;
16
+
17
+ @ApiPropertyOptional()
18
+ @IsOptional()
19
+ @IsInt()
20
+ idTypeBrand?: number;
21
+
22
+ @ApiPropertyOptional()
23
+ @IsOptional()
24
+ @IsInt()
25
+ idSdr?: number;
26
+
27
+ @ApiPropertyOptional()
28
+ @IsOptional()
29
+ @IsInt()
30
+ idCommercial?: number;
31
+
32
+ @ApiPropertyOptional()
33
+ @IsOptional()
34
+ @IsInt()
35
+ idFollowList?: number;
36
+
37
+ @ApiPropertyOptional()
38
+ @IsOptional()
39
+ @IsInt()
40
+ year?: number;
41
+
42
+ @ApiPropertyOptional()
43
+ @IsOptional()
44
+ @IsInt()
45
+ month?: number;
46
+
47
+ @ApiPropertyOptional()
48
+ @IsOptional()
49
+ @IsInt()
50
+ day?: number;
51
+
52
+ @ApiPropertyOptional()
53
+ @IsOptional()
54
+ @IsString()
55
+ orderBy?: string;
56
+
57
+ @ApiPropertyOptional()
58
+ @IsOptional()
59
+ @IsBoolean()
60
+ @ToBoolean()
61
+ descending?: boolean;
62
+
63
+ @ApiPropertyOptional()
64
+ @IsOptional()
65
+ @IsBoolean()
66
+ @ToBoolean()
67
+ utm?: boolean;
68
+
69
+ @ApiPropertyOptional()
70
+ @IsOptional()
71
+ @IsBoolean()
72
+ @ToBoolean()
73
+ sendPlaquette?: boolean;
74
+
75
+ @ApiPropertyOptional()
76
+ @IsOptional()
77
+ @IsBoolean()
78
+ @ToBoolean()
79
+ isSignatureDate?: boolean;
80
+
81
+ @ApiPropertyOptional()
82
+ @IsOptional()
83
+ @IsString()
84
+ relanceDate?: string;
85
+ }
@@ -0,0 +1,19 @@
1
+ export class ReadDataStatsProspect {
2
+ id: number;
3
+ name: string;
4
+ color: string;
5
+ }
6
+
7
+ export class ReadStatsProspect {
8
+ statsProspect: ReadDataStatsProspect[];
9
+ }
10
+
11
+ export interface StatsProspectResponse {
12
+ totalItems: number;
13
+ nbFait: number;
14
+ nbDevis: number;
15
+ souscrisMoisEnCours: number;
16
+ souscrisTotal: number;
17
+ delayForSignatureTotal: number;
18
+ statsProspect: ReadDataStatsProspect[];
19
+ }
@@ -0,0 +1,18 @@
1
+ import { IsDateString, IsEnum, IsInt } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils/decorators';
3
+ import { SocietyTypeExportCsv } from '../../../Enum/SocietyTypeExportCsv';
4
+
5
+ export class DataCustomersCsv {
6
+ @ApiProperty()
7
+ @IsInt()
8
+ @IsEnum(SocietyTypeExportCsv)
9
+ type: number;
10
+
11
+ @ApiProperty()
12
+ @IsDateString()
13
+ startDate: string;
14
+
15
+ @ApiProperty()
16
+ @IsDateString()
17
+ endDate: string;
18
+ }
@@ -0,0 +1,13 @@
1
+ import { IsDate, IsInt, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+
4
+ export class QueryGetSpecialHoursForTeam {
5
+ @ApiPropertyOptional()
6
+ @IsOptional()
7
+ @IsInt()
8
+ idTeam?: number;
9
+
10
+ @ApiProperty()
11
+ @IsDate()
12
+ date: Date;
13
+ }
@@ -1,4 +1,5 @@
1
1
  import { IFile } from '../../models/IFile';
2
+ import { IUser } from '../../models/IUser';
2
3
 
3
4
  export interface DailyHour {
4
5
  from: number;
@@ -6,6 +7,13 @@ export interface DailyHour {
6
7
  start?: string;
7
8
  end?: string;
8
9
  class?: string;
10
+ label?: string;
11
+ }
12
+
13
+ export interface DailyAbsence {
14
+ idTypeAbsence?: number;
15
+ startDate?: string;
16
+ endDate?: string;
9
17
  }
10
18
  export interface SpecialHours {
11
19
  1?: DailyHour | DailyHour[];
@@ -15,6 +23,13 @@ export interface SpecialHours {
15
23
  5?: DailyHour | DailyHour[];
16
24
  }
17
25
 
26
+ export interface ReadSpecialHoursByUser {
27
+ user: IUser;
28
+ type: string;
29
+ hourList?: DailyHour[];
30
+ absenceList?: DailyAbsence[];
31
+ }
32
+
18
33
  export interface TimeSlots {
19
34
  startDate: Date;
20
35
  endDate: Date;
@@ -44,3 +59,9 @@ export type ReadAvailableTimeSlots = {
44
59
  date: string;
45
60
  list: DailyHour[];
46
61
  }[];
62
+
63
+ export type ReadAvailableTimeSlotsWithDetails = {
64
+ date: string;
65
+ list: DailyHour[];
66
+ absenceList: DailyAbsence[];
67
+ }[];
@@ -3,12 +3,12 @@ import { ISociety } from './ISociety';
3
3
  // analyticsUtm
4
4
  export interface IAnalyticsUtm {
5
5
  id?: number;
6
- source: string | null;
7
- medium: string | null;
8
- campaign: string | null;
9
- term: string | null;
10
- content: string | null;
11
- idSociety: number;
6
+ source?: string | null;
7
+ medium?: string | null;
8
+ campaign?: string | null;
9
+ term?: string | null;
10
+ content?: string | null;
11
+ idSociety?: number;
12
12
  createdAt?: Date | null;
13
13
  updatedAt?: Date | null;
14
14
 
package/ts/types/index.ts CHANGED
@@ -575,6 +575,7 @@ export * from './Enum/Template';
575
575
  export * from './Enum/Marketing';
576
576
  export * from './Enum/EnglishLevel';
577
577
  export * from './Enum/OCRPrompt';
578
+ export * from './Enum/SocietyTypeExportCsv';
578
579
 
579
580
  // Interfaces API
580
581
  export * from './Interface/api/exercice/ReadExercice';
@@ -661,6 +662,7 @@ export * from './Interface/api/society/SocietyWithStatsCaParams';
661
662
  export * from './Interface/api/society/QuerySociety';
662
663
  export * from './Interface/api/society/QueryPaginatedSociety';
663
664
  export * from './Interface/api/commercial/QueryPaginatedNewProspect';
665
+ export * from './Interface/api/commercial/QueryPaginatedFollowProspect';
664
666
  export * from './Interface/api/commercial/QueryPaginatedSocietyWithStatsCa';
665
667
  export * from './Interface/api/facturation/Query';
666
668
  export * from './Interface/api/facturation/QueryPaginatedSocietyWithFacturation';
@@ -675,6 +677,7 @@ export * from './Interface/api/commercial/QueryGetStatsHistory';
675
677
  export * from './Interface/api/commercial/RequiredDocsTypeParams';
676
678
  export * from './Interface/api/commercial/QueryFetchDialogDatasInfosOk';
677
679
  export * from './Interface/api/commercial/QueryMovePrestationsToNextMonth';
680
+ export * from './Interface/api/commercial/ReadStatsProspect';
678
681
  export * from './Interface/api/society/GetDataSociety';
679
682
  export * from './Interface/api/society/CreateSociety';
680
683
  export * from './Interface/api/society/GetSocietyDetail';
@@ -684,6 +687,7 @@ export * from './Interface/api/society/CreateUserToSocietyWithPermission';
684
687
  export * from './Interface/api/society/UpdateUserToSocietyWithPermission';
685
688
  export * from './Interface/api/society/ReadSocietyUsers';
686
689
  export * from './Interface/api/society/ReadSocietyUnpaidStats';
690
+ export * from './Interface/api/society/DataCustomersCsv';
687
691
  export * from './Interface/api/BasePaginate';
688
692
  export * from './Interface/api/BaseRequest';
689
693
  export * from './Interface/api/generalLedger/IGeneralLedgerAccount';
@@ -1127,6 +1131,7 @@ export * from './Interface/api/echo/NewsPaper';
1127
1131
  export * from './Interface/api/echo/Order';
1128
1132
  export * from './Interface/api/userTimeSlot/QueryUserTimeSlot';
1129
1133
  export * from './Interface/api/workingSchedule/QueryAvailableTimeSlot';
1134
+ export * from './Interface/api/workingSchedule/Query';
1130
1135
  export * from './Interface/api/payment/Query';
1131
1136
  export * from './Interface/api/regulation/Query';
1132
1137
  export * from './Interface/api/terminationList/Read';