@silexpert/core 1.2.98 → 1.2.100

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 (71) hide show
  1. package/dist/cjs/api/resources/FIle.d.ts +2 -1
  2. package/dist/cjs/api/resources/FIle.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/FIle.js +3 -0
  4. package/dist/cjs/api/resources/FIle.js.map +1 -1
  5. package/dist/cjs/api/resources/InternalInvoicing.d.ts +1 -0
  6. package/dist/cjs/api/resources/InternalInvoicing.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/InternalInvoicing.js +12 -0
  8. package/dist/cjs/api/resources/InternalInvoicing.js.map +1 -1
  9. package/dist/cjs/api/resources/User.d.ts +2 -2
  10. package/dist/cjs/api/resources/User.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/User.js.map +1 -1
  12. package/dist/cjs/types/Enum/RegistrationSource.d.ts +13 -0
  13. package/dist/cjs/types/Enum/RegistrationSource.d.ts.map +1 -1
  14. package/dist/cjs/types/Enum/RegistrationSource.js +15 -1
  15. package/dist/cjs/types/Enum/RegistrationSource.js.map +1 -1
  16. package/dist/cjs/types/Interface/api/file/Query.d.ts +10 -0
  17. package/dist/cjs/types/Interface/api/file/Query.d.ts.map +1 -0
  18. package/dist/cjs/types/Interface/api/file/Query.js +55 -0
  19. package/dist/cjs/types/Interface/api/file/Query.js.map +1 -0
  20. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.d.ts +0 -1
  21. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.d.ts.map +1 -1
  22. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.js +0 -5
  23. package/dist/cjs/types/Interface/api/society/DataCustomersCsv.js.map +1 -1
  24. package/dist/cjs/types/Interface/api/user/RegisterProspect.d.ts +13 -2
  25. package/dist/cjs/types/Interface/api/user/RegisterProspect.d.ts.map +1 -1
  26. package/dist/cjs/types/Interface/api/user/RegisterProspect.js +9 -1
  27. package/dist/cjs/types/Interface/api/user/RegisterProspect.js.map +1 -1
  28. package/dist/cjs/types/index.d.ts +1 -0
  29. package/dist/cjs/types/index.d.ts.map +1 -1
  30. package/dist/cjs/types/index.js +1 -0
  31. package/dist/cjs/types/index.js.map +1 -1
  32. package/dist/mjs/api/resources/FIle.d.ts +2 -1
  33. package/dist/mjs/api/resources/FIle.d.ts.map +1 -1
  34. package/dist/mjs/api/resources/FIle.js +6 -0
  35. package/dist/mjs/api/resources/FIle.js.map +1 -1
  36. package/dist/mjs/api/resources/InternalInvoicing.d.ts +1 -0
  37. package/dist/mjs/api/resources/InternalInvoicing.d.ts.map +1 -1
  38. package/dist/mjs/api/resources/InternalInvoicing.js +12 -0
  39. package/dist/mjs/api/resources/InternalInvoicing.js.map +1 -1
  40. package/dist/mjs/api/resources/User.d.ts +2 -2
  41. package/dist/mjs/api/resources/User.d.ts.map +1 -1
  42. package/dist/mjs/api/resources/User.js.map +1 -1
  43. package/dist/mjs/types/Enum/RegistrationSource.d.ts +13 -0
  44. package/dist/mjs/types/Enum/RegistrationSource.d.ts.map +1 -1
  45. package/dist/mjs/types/Enum/RegistrationSource.js +14 -0
  46. package/dist/mjs/types/Enum/RegistrationSource.js.map +1 -1
  47. package/dist/mjs/types/Interface/api/file/Query.d.ts +10 -0
  48. package/dist/mjs/types/Interface/api/file/Query.d.ts.map +1 -0
  49. package/dist/mjs/types/Interface/api/file/Query.js +57 -0
  50. package/dist/mjs/types/Interface/api/file/Query.js.map +1 -0
  51. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.d.ts +0 -1
  52. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.d.ts.map +1 -1
  53. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.js +0 -6
  54. package/dist/mjs/types/Interface/api/society/DataCustomersCsv.js.map +1 -1
  55. package/dist/mjs/types/Interface/api/user/RegisterProspect.d.ts +13 -2
  56. package/dist/mjs/types/Interface/api/user/RegisterProspect.d.ts.map +1 -1
  57. package/dist/mjs/types/Interface/api/user/RegisterProspect.js +10 -1
  58. package/dist/mjs/types/Interface/api/user/RegisterProspect.js.map +1 -1
  59. package/dist/mjs/types/index.d.ts +1 -0
  60. package/dist/mjs/types/index.d.ts.map +1 -1
  61. package/dist/mjs/types/index.js +1 -0
  62. package/dist/mjs/types/index.js.map +1 -1
  63. package/package.json +1 -1
  64. package/ts/api/resources/FIle.ts +8 -1
  65. package/ts/api/resources/InternalInvoicing.ts +12 -0
  66. package/ts/api/resources/User.ts +2 -1
  67. package/ts/types/Enum/RegistrationSource.ts +14 -0
  68. package/ts/types/Interface/api/file/Query.ts +35 -0
  69. package/ts/types/Interface/api/society/DataCustomersCsv.ts +0 -4
  70. package/ts/types/Interface/api/user/RegisterProspect.ts +22 -3
  71. package/ts/types/index.ts +1 -0
@@ -1,5 +1,5 @@
1
1
  import { Resource } from '../Resource';
2
- import { ReadFile, CreateFile, IFile } from '../../types';
2
+ import { ReadFile, CreateFile, IFile, BasePaginate, QueryFilePaginated } from '../../types';
3
3
 
4
4
  export class File extends Resource {
5
5
  upload(params: Omit<CreateFile, 'file'>, file: File): Promise<ReadFile> {
@@ -16,6 +16,13 @@ export class File extends Resource {
16
16
  return this.axios.$post('files', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
17
17
  }
18
18
 
19
+ public getPaginated(params: QueryFilePaginated, signal?: AbortSignal): Promise<BasePaginate<IFile>> {
20
+ return this.axios.$get('/files/paginated', {
21
+ ...(signal ? { signal } : {}),
22
+ params,
23
+ });
24
+ }
25
+
19
26
  get(id: number, idSociety: number): Promise<ReadFile> {
20
27
  return this.axios.$get(`societies/${idSociety}/files/${id}`);
21
28
  }
@@ -17,4 +17,16 @@ export class InternalInvoicing extends Resource {
17
17
  regenerate(params: RegenerateInternalInvoicing): Promise<number> {
18
18
  return this.axios.$post('/internalInvoicing/regenerate', params);
19
19
  }
20
+ generateCutOff(type: number): Promise<boolean> {
21
+ switch (type) {
22
+ case 1:
23
+ return this.axios.$post('/internalInvoicing/cutOff/PCA', {});
24
+ case 2:
25
+ return this.axios.$post('/internalInvoicing/cutOff/FAE', {});
26
+ case 3:
27
+ return this.axios.$post('/internalInvoicing/cutOff/AAE', {});
28
+ default:
29
+ return this.axios.$post('/internalInvoicing/cutOff/PCA', {});
30
+ }
31
+ }
20
32
  }
@@ -18,6 +18,7 @@ import {
18
18
  UpdateCorworker,
19
19
  GetSocietyFromUser,
20
20
  RegisterProspectBody,
21
+ RegisterProspectResponse,
21
22
  } from '../../types';
22
23
 
23
24
  export class User extends Resource {
@@ -123,7 +124,7 @@ export class User extends Resource {
123
124
  });
124
125
  }
125
126
 
126
- registerProspect(body: RegisterProspectBody): Promise<void> {
127
+ registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {
127
128
  return this.axios.$post('users/prospect', body);
128
129
  }
129
130
  }
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @deprecated need to use database source table the id is not the same in all environments
3
+ */
1
4
  export enum RegistrationSource {
2
5
  INCOMING_CALL = 2,
3
6
  APPEL_SORTANT = 3,
@@ -107,6 +110,17 @@ export enum RegistrationSource {
107
110
  LINKEDIN = 115,
108
111
  }
109
112
 
113
+ export enum RegistrationSourceAlias {
114
+ START_OF_SERVICES = 'Start of Services',
115
+ INCOMING_CALL = 'Incoming Call',
116
+ CALENDLY_PROSPECT = 'Calendly Prospect',
117
+ NEWSLETTER = 'newsletter',
118
+ LIVRE_BLANC = 'livre blanc'
119
+ }
120
+
121
+ /**
122
+ * @deprecated need to use database source table the id is not the same in all environments
123
+ */
110
124
  export const RegistrationSourceDetail = {
111
125
  INCOMING_CALL: {
112
126
  id: RegistrationSource.INCOMING_CALL,
@@ -0,0 +1,35 @@
1
+ import { IsDate, IsNumber, IsOptional, IsString } from 'class-validator';
2
+ import { ApiPropertyOptional } from '../../../../utils';
3
+ import { OptionalQueryPaginate } from '../BasePaginate';
4
+
5
+ export class QueryFilePaginated extends OptionalQueryPaginate {
6
+ @ApiPropertyOptional()
7
+ @IsOptional()
8
+ @IsString()
9
+ search?: string;
10
+
11
+ @ApiPropertyOptional()
12
+ @IsOptional()
13
+ @IsNumber()
14
+ idFolderFile?: number;
15
+
16
+ @ApiPropertyOptional()
17
+ @IsOptional()
18
+ @IsNumber()
19
+ idSociety?: number;
20
+
21
+ @ApiPropertyOptional()
22
+ @IsOptional()
23
+ @IsNumber()
24
+ idFileType?: number;
25
+
26
+ @ApiPropertyOptional()
27
+ @IsOptional()
28
+ @IsDate()
29
+ startDate?: Date;
30
+
31
+ @ApiPropertyOptional()
32
+ @IsOptional()
33
+ @IsDate()
34
+ endDate?: Date;
35
+ }
@@ -11,8 +11,4 @@ export class DataCustomersCsv {
11
11
  @ApiProperty()
12
12
  @IsDateString()
13
13
  startDate: string;
14
-
15
- @ApiProperty()
16
- @IsDateString()
17
- endDate: string;
18
14
  }
@@ -5,6 +5,16 @@ import { Civility } from '../../../Enum/Civility';
5
5
  import { IAnalyticsUtm } from '../../models/IAnalyticsUtm';
6
6
  import { LegalFormTypeEnum } from '../../../Enum/LegalForm';
7
7
 
8
+ /**
9
+ * Response of the register prospect endpoint
10
+ */
11
+ export interface RegisterProspectResponse {
12
+ externalId: string;
13
+ }
14
+
15
+ /**
16
+ * Body of the register prospect endpoint
17
+ */
8
18
  export interface ProspectInfo {
9
19
  idCivility?: Civility;
10
20
  firstname?: string;
@@ -33,7 +43,9 @@ export interface RegisterProspect {
33
43
  referralProgram?: ReferalProgram,
34
44
  recaptcha?: string;
35
45
  token?: string;
36
- idSource: number;
46
+ // @deprecated use sourceAlias instead
47
+ idSource?: number;
48
+ sourceAlias?: string;
37
49
  idTypeBrand: number;
38
50
  analyticsUtm?: Omit<Partial<IAnalyticsUtm>, 'idSociety'>;
39
51
  comment?: string;
@@ -147,9 +159,16 @@ class AnalyticsUtmBody implements Omit<Partial<IAnalyticsUtm>, 'idSociety'> {
147
159
  }
148
160
 
149
161
  export class RegisterProspectBody implements RegisterProspect {
150
- @ApiProperty()
162
+ @ApiPropertyOptional()
163
+ @IsOptional()
151
164
  @IsNumber()
152
- idSource: number;
165
+ idSource?: number;
166
+
167
+ @ApiPropertyOptional()
168
+ @IsOptional()
169
+ @IsString()
170
+ @IsNotEmpty()
171
+ sourceAlias?: string;
153
172
 
154
173
  @ApiProperty()
155
174
  @IsNumber()
package/ts/types/index.ts CHANGED
@@ -1048,6 +1048,7 @@ export * from './Interface/api/qonto/GetConnectionInformation';
1048
1048
  export * from './Interface/api/qonto/Read';
1049
1049
  export * from './Interface/api/file/Create';
1050
1050
  export * from './Interface/api/file/Read';
1051
+ export * from './Interface/api/file/Query';
1051
1052
  export * from './Interface/api/societyConfig/update';
1052
1053
  export * from './Interface/api/wallet/UpdateAttribution';
1053
1054
  export * from './Interface/api/exercicePrestation/Query';