@silexpert/core 1.3.30 → 1.3.32

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 (78) hide show
  1. package/dist/cjs/api/resources/Ai.d.ts +2 -2
  2. package/dist/cjs/api/resources/Ai.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Ai.js +2 -2
  4. package/dist/cjs/api/resources/Ai.js.map +1 -1
  5. package/dist/cjs/api/resources/AnalyticsUtm.d.ts +10 -0
  6. package/dist/cjs/api/resources/AnalyticsUtm.d.ts.map +1 -0
  7. package/dist/cjs/api/resources/AnalyticsUtm.js +16 -0
  8. package/dist/cjs/api/resources/AnalyticsUtm.js.map +1 -0
  9. package/dist/cjs/api/resources.d.ts +2 -0
  10. package/dist/cjs/api/resources.d.ts.map +1 -1
  11. package/dist/cjs/api/resources.js +2 -0
  12. package/dist/cjs/api/resources.js.map +1 -1
  13. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts +6 -0
  14. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts.map +1 -1
  15. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.js +29 -1
  16. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts +1 -1
  18. package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/commercialManagement/Create.js +1 -1
  20. package/dist/cjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
  21. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +1 -1
  22. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +3 -0
  23. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +1 -1
  24. package/dist/cjs/types/Interface/models/IAIConversation.d.ts +11 -0
  25. package/dist/cjs/types/Interface/models/IAIConversation.d.ts.map +1 -0
  26. package/dist/cjs/types/Interface/models/IAIConversation.js +3 -0
  27. package/dist/cjs/types/Interface/models/IAIConversation.js.map +1 -0
  28. package/dist/cjs/types/Interface/models/IAIQuestion.d.ts +5 -5
  29. package/dist/cjs/types/Interface/models/IAIQuestion.d.ts.map +1 -1
  30. package/dist/cjs/types/Interface/models/IAIQuestion.js.map +1 -1
  31. package/dist/cjs/types/index.d.ts +1 -0
  32. package/dist/cjs/types/index.d.ts.map +1 -1
  33. package/dist/cjs/types/index.js +1 -0
  34. package/dist/cjs/types/index.js.map +1 -1
  35. package/dist/mjs/api/resources/Ai.d.ts +2 -2
  36. package/dist/mjs/api/resources/Ai.d.ts.map +1 -1
  37. package/dist/mjs/api/resources/Ai.js +2 -2
  38. package/dist/mjs/api/resources/Ai.js.map +1 -1
  39. package/dist/mjs/api/resources/AnalyticsUtm.d.ts +10 -0
  40. package/dist/mjs/api/resources/AnalyticsUtm.d.ts.map +1 -0
  41. package/dist/mjs/api/resources/AnalyticsUtm.js +12 -0
  42. package/dist/mjs/api/resources/AnalyticsUtm.js.map +1 -0
  43. package/dist/mjs/api/resources.d.ts +2 -0
  44. package/dist/mjs/api/resources.d.ts.map +1 -1
  45. package/dist/mjs/api/resources.js +2 -0
  46. package/dist/mjs/api/resources.js.map +1 -1
  47. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts +6 -0
  48. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts.map +1 -1
  49. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.js +33 -2
  50. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.js.map +1 -1
  51. package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts +1 -1
  52. package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  53. package/dist/mjs/types/Interface/api/commercialManagement/Create.js +1 -1
  54. package/dist/mjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
  55. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +1 -1
  56. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +4 -1
  57. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +1 -1
  58. package/dist/mjs/types/Interface/models/IAIConversation.d.ts +11 -0
  59. package/dist/mjs/types/Interface/models/IAIConversation.d.ts.map +1 -0
  60. package/dist/mjs/types/Interface/models/IAIConversation.js +2 -0
  61. package/dist/mjs/types/Interface/models/IAIConversation.js.map +1 -0
  62. package/dist/mjs/types/Interface/models/IAIQuestion.d.ts +5 -5
  63. package/dist/mjs/types/Interface/models/IAIQuestion.d.ts.map +1 -1
  64. package/dist/mjs/types/Interface/models/IAIQuestion.js.map +1 -1
  65. package/dist/mjs/types/index.d.ts +1 -0
  66. package/dist/mjs/types/index.d.ts.map +1 -1
  67. package/dist/mjs/types/index.js +1 -0
  68. package/dist/mjs/types/index.js.map +1 -1
  69. package/package.json +1 -1
  70. package/ts/api/resources/Ai.ts +3 -3
  71. package/ts/api/resources/AnalyticsUtm.ts +12 -0
  72. package/ts/api/resources.ts +2 -0
  73. package/ts/types/Interface/api/ai/AskQuestionCollaborator.ts +25 -2
  74. package/ts/types/Interface/api/commercialManagement/Create.ts +2 -2
  75. package/ts/types/Interface/api/promoCode/CreateDefaultPromoCode.ts +4 -1
  76. package/ts/types/Interface/models/IAIConversation.ts +13 -0
  77. package/ts/types/Interface/models/IAIQuestion.ts +5 -5
  78. package/ts/types/index.ts +1 -0
@@ -178,6 +178,7 @@ import { AbsenceRequest } from './resources/AbsenceRequest';
178
178
  import { CompanyMarketingInformation } from './resources/CompanyMarketingInformation';
179
179
  import { Ai } from './resources/Ai';
180
180
  import { StatisticLegal } from './resources/statistic/Legal';
181
+ import { AnalyticsUtm } from './resources/AnalyticsUtm';
181
182
 
182
183
  export const resources = {
183
184
  budgetInsight: BudgetInsight,
@@ -360,4 +361,5 @@ export const resources = {
360
361
  companyMarketingInformation: CompanyMarketingInformation,
361
362
  ai: Ai,
362
363
  statisticLegal: StatisticLegal,
364
+ analyticsUtm: AnalyticsUtm,
363
365
  };
@@ -1,9 +1,32 @@
1
- import { IsNotEmpty, IsString } from 'class-validator';
2
- import { ApiProperty } from '../../../../utils';
1
+ import { IsArray, IsIn, IsInt, IsNotEmpty, IsOptional, IsString, ValidateNested } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+
4
+ export class AskHistoryCollaborator {
5
+ @ApiProperty()
6
+ @IsString()
7
+ @IsIn(['assistant', 'user'])
8
+ role: 'assistant' | 'user';
9
+
10
+ @ApiProperty()
11
+ @IsString()
12
+ @IsNotEmpty()
13
+ content: string;
14
+ }
3
15
 
4
16
  export class AskQuestionCollaborator {
5
17
  @ApiProperty()
6
18
  @IsString()
7
19
  @IsNotEmpty()
8
20
  question: string;
21
+
22
+ @ApiPropertyOptional()
23
+ @IsOptional()
24
+ @IsArray()
25
+ @ValidateNested({ each: true })
26
+ history?: AskHistoryCollaborator[];
27
+
28
+ @ApiPropertyOptional()
29
+ @IsOptional()
30
+ @IsInt()
31
+ idConversation?: number;
9
32
  }
@@ -462,8 +462,8 @@ export class CommercialDocumentInputs {
462
462
  /**
463
463
  * @deprecated use recoveryCost instead (exists just for old mobile version)
464
464
  */
465
- @ApiProperty({ description: 'Indemnité forfaitaire ' })
466
- compensation: string | null;
465
+ @ApiPropertyOptional({ description: 'Indemnité forfaitaire ' })
466
+ compensation?: string | null;
467
467
 
468
468
  @ApiProperty()
469
469
  vatMention: string | null;
@@ -1,4 +1,4 @@
1
- import { IsBoolean, IsDate, IsJSON, IsString } from 'class-validator';
1
+ import { IsBoolean, IsDate, IsJSON, IsOptional, IsString } from 'class-validator';
2
2
  import { ApiPropertyOptional, ApiProperty } from '../../../../utils';
3
3
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
4
 
@@ -8,10 +8,12 @@ export class CreateDefaultPromoCode {
8
8
  label: string;
9
9
 
10
10
  @ApiPropertyOptional()
11
+ @IsOptional()
11
12
  @IsDate()
12
13
  startDate?: Date | null;
13
14
 
14
15
  @ApiPropertyOptional()
16
+ @IsOptional()
15
17
  @IsDate()
16
18
  endDate?: Date | null;
17
19
 
@@ -46,6 +48,7 @@ export class CreateDefaultPromoCode {
46
48
  isTest: boolean;
47
49
 
48
50
  @ApiPropertyOptional()
51
+ @IsOptional()
49
52
  @IsJSON()
50
53
  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
51
54
  metadata?: any | null;
@@ -0,0 +1,13 @@
1
+ import { IAIQuestion } from './IAIQuestion';
2
+ import { IUser } from './IUser';
3
+
4
+ export interface IAIConversation {
5
+ id: number;
6
+ idUser: number;
7
+ createdAt?: Date;
8
+ updatedAt?: Date;
9
+
10
+ // Associations
11
+ user?: IUser;
12
+ questions?: IAIQuestion[];
13
+ }
@@ -1,4 +1,4 @@
1
- import { IUser } from './IUser';
1
+ import { IAIConversation } from './IAIConversation';
2
2
 
3
3
  export interface IAIQuestion {
4
4
  id: number;
@@ -8,10 +8,10 @@ export interface IAIQuestion {
8
8
  category: string;
9
9
  subCategory: string;
10
10
  totalTokens: number;
11
- idUser: number;
12
- createdAt?: Date | string;
13
- updatedAt?: Date | string;
11
+ idConversation: number | null; // Nullable for the first questions generated by the AI without conversation
12
+ createdAt?: Date;
13
+ updatedAt?: Date;
14
14
 
15
15
  // Associations
16
- user?: IUser;
16
+ conversation?: IAIConversation;
17
17
  }
package/ts/types/index.ts CHANGED
@@ -325,6 +325,7 @@ export * from './Interface/models/IScheduledReminder';
325
325
  export * from './Interface/models/IReminderAttachment';
326
326
  export * from './Interface/models/IStateBankAccount';
327
327
  export * from './Interface/models/IAIQuestion';
328
+ export * from './Interface/models/IAIConversation';
328
329
 
329
330
  // Schemas
330
331
  export * from './Interface/schemas/IRegistrationDetail';