@silexpert/core 1.3.30-0 → 1.3.30-1

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 (181) 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/PaymentExpectation.d.ts +16 -1
  10. package/dist/cjs/api/resources/PaymentExpectation.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/PaymentExpectation.js +20 -0
  12. package/dist/cjs/api/resources/PaymentExpectation.js.map +1 -1
  13. package/dist/cjs/api/resources/statistic/Legal.d.ts +11 -0
  14. package/dist/cjs/api/resources/statistic/Legal.d.ts.map +1 -0
  15. package/dist/cjs/api/resources/statistic/Legal.js +16 -0
  16. package/dist/cjs/api/resources/statistic/Legal.js.map +1 -0
  17. package/dist/cjs/api/resources.d.ts +4 -0
  18. package/dist/cjs/api/resources.d.ts.map +1 -1
  19. package/dist/cjs/api/resources.js +4 -0
  20. package/dist/cjs/api/resources.js.map +1 -1
  21. package/dist/cjs/types/Enum/StatisticType.d.ts +2 -1
  22. package/dist/cjs/types/Enum/StatisticType.d.ts.map +1 -1
  23. package/dist/cjs/types/Enum/StatisticType.js +1 -0
  24. package/dist/cjs/types/Enum/StatisticType.js.map +1 -1
  25. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -1
  26. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.js +1 -1
  27. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
  28. package/dist/cjs/types/Interface/api/accountingTransaction/QueryTransaction.d.ts +1 -1
  29. package/dist/cjs/types/Interface/api/accountingTransaction/QueryTransaction.js +1 -1
  30. package/dist/cjs/types/Interface/api/accountingTransaction/QueryTransaction.js.map +1 -1
  31. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts +6 -0
  32. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts.map +1 -1
  33. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.js +29 -1
  34. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.js.map +1 -1
  35. package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts +6 -2
  36. package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  37. package/dist/cjs/types/Interface/api/commercialManagement/Create.js +5 -1
  38. package/dist/cjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
  39. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +1 -1
  40. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +3 -0
  41. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +1 -1
  42. package/dist/cjs/types/Interface/api/statistic/QueryInternal.d.ts +3 -0
  43. package/dist/cjs/types/Interface/api/statistic/QueryInternal.d.ts.map +1 -1
  44. package/dist/cjs/types/Interface/api/statistic/QueryInternal.js +10 -1
  45. package/dist/cjs/types/Interface/api/statistic/QueryInternal.js.map +1 -1
  46. package/dist/cjs/types/Interface/api/statistic/QueryLegal.d.ts +6 -0
  47. package/dist/cjs/types/Interface/api/statistic/QueryLegal.d.ts.map +1 -0
  48. package/dist/cjs/types/Interface/api/statistic/QueryLegal.js +33 -0
  49. package/dist/cjs/types/Interface/api/statistic/QueryLegal.js.map +1 -0
  50. package/dist/cjs/types/Interface/api/stripe/Create.d.ts +8 -0
  51. package/dist/cjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  52. package/dist/cjs/types/Interface/api/stripe/Create.js +27 -1
  53. package/dist/cjs/types/Interface/api/stripe/Create.js.map +1 -1
  54. package/dist/cjs/types/Interface/api/stripe/QueryStripe.d.ts +3 -0
  55. package/dist/cjs/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
  56. package/dist/cjs/types/Interface/api/stripe/QueryStripe.js +9 -1
  57. package/dist/cjs/types/Interface/api/stripe/QueryStripe.js.map +1 -1
  58. package/dist/cjs/types/Interface/models/IAIConversation.d.ts +11 -0
  59. package/dist/cjs/types/Interface/models/IAIConversation.d.ts.map +1 -0
  60. package/dist/cjs/types/Interface/models/IAIConversation.js +3 -0
  61. package/dist/cjs/types/Interface/models/IAIConversation.js.map +1 -0
  62. package/dist/cjs/types/Interface/models/IAIQuestion.d.ts +5 -5
  63. package/dist/cjs/types/Interface/models/IAIQuestion.d.ts.map +1 -1
  64. package/dist/cjs/types/Interface/models/IAIQuestion.js.map +1 -1
  65. package/dist/cjs/types/Interface/models/IPrestationComplementary.d.ts +2 -0
  66. package/dist/cjs/types/Interface/models/IPrestationComplementary.d.ts.map +1 -1
  67. package/dist/cjs/types/Interface/models/IPrestationComplementary.js.map +1 -1
  68. package/dist/cjs/types/Interface/models/ISociety.d.ts +2 -1
  69. package/dist/cjs/types/Interface/models/ISociety.d.ts.map +1 -1
  70. package/dist/cjs/types/Interface/models/ISociety.js.map +1 -1
  71. package/dist/cjs/types/index.d.ts +2 -0
  72. package/dist/cjs/types/index.d.ts.map +1 -1
  73. package/dist/cjs/types/index.js +2 -0
  74. package/dist/cjs/types/index.js.map +1 -1
  75. package/dist/cjs/utils/commercialManagement/document.d.ts.map +1 -1
  76. package/dist/cjs/utils/commercialManagement/document.js +19 -18
  77. package/dist/cjs/utils/commercialManagement/document.js.map +1 -1
  78. package/dist/cjs/utils/commercialManagement/templates/common.js +1 -1
  79. package/dist/cjs/utils/commercialManagement/templates/common.js.map +1 -1
  80. package/dist/mjs/api/resources/Ai.d.ts +2 -2
  81. package/dist/mjs/api/resources/Ai.d.ts.map +1 -1
  82. package/dist/mjs/api/resources/Ai.js +2 -2
  83. package/dist/mjs/api/resources/Ai.js.map +1 -1
  84. package/dist/mjs/api/resources/AnalyticsUtm.d.ts +10 -0
  85. package/dist/mjs/api/resources/AnalyticsUtm.d.ts.map +1 -0
  86. package/dist/mjs/api/resources/AnalyticsUtm.js +12 -0
  87. package/dist/mjs/api/resources/AnalyticsUtm.js.map +1 -0
  88. package/dist/mjs/api/resources/PaymentExpectation.d.ts +16 -1
  89. package/dist/mjs/api/resources/PaymentExpectation.d.ts.map +1 -1
  90. package/dist/mjs/api/resources/PaymentExpectation.js +20 -0
  91. package/dist/mjs/api/resources/PaymentExpectation.js.map +1 -1
  92. package/dist/mjs/api/resources/statistic/Legal.d.ts +11 -0
  93. package/dist/mjs/api/resources/statistic/Legal.d.ts.map +1 -0
  94. package/dist/mjs/api/resources/statistic/Legal.js +15 -0
  95. package/dist/mjs/api/resources/statistic/Legal.js.map +1 -0
  96. package/dist/mjs/api/resources.d.ts +4 -0
  97. package/dist/mjs/api/resources.d.ts.map +1 -1
  98. package/dist/mjs/api/resources.js +4 -0
  99. package/dist/mjs/api/resources.js.map +1 -1
  100. package/dist/mjs/types/Enum/StatisticType.d.ts +2 -1
  101. package/dist/mjs/types/Enum/StatisticType.d.ts.map +1 -1
  102. package/dist/mjs/types/Enum/StatisticType.js +1 -0
  103. package/dist/mjs/types/Enum/StatisticType.js.map +1 -1
  104. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -1
  105. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.js +2 -2
  106. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
  107. package/dist/mjs/types/Interface/api/accountingTransaction/QueryTransaction.d.ts +1 -1
  108. package/dist/mjs/types/Interface/api/accountingTransaction/QueryTransaction.js +2 -2
  109. package/dist/mjs/types/Interface/api/accountingTransaction/QueryTransaction.js.map +1 -1
  110. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts +6 -0
  111. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts.map +1 -1
  112. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.js +33 -2
  113. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.js.map +1 -1
  114. package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts +6 -2
  115. package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  116. package/dist/mjs/types/Interface/api/commercialManagement/Create.js +9 -1
  117. package/dist/mjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
  118. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +1 -1
  119. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +4 -1
  120. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +1 -1
  121. package/dist/mjs/types/Interface/api/statistic/QueryInternal.d.ts +3 -0
  122. package/dist/mjs/types/Interface/api/statistic/QueryInternal.d.ts.map +1 -1
  123. package/dist/mjs/types/Interface/api/statistic/QueryInternal.js +9 -0
  124. package/dist/mjs/types/Interface/api/statistic/QueryInternal.js.map +1 -1
  125. package/dist/mjs/types/Interface/api/statistic/QueryLegal.d.ts +6 -0
  126. package/dist/mjs/types/Interface/api/statistic/QueryLegal.d.ts.map +1 -0
  127. package/dist/mjs/types/Interface/api/statistic/QueryLegal.js +32 -0
  128. package/dist/mjs/types/Interface/api/statistic/QueryLegal.js.map +1 -0
  129. package/dist/mjs/types/Interface/api/stripe/Create.d.ts +8 -0
  130. package/dist/mjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  131. package/dist/mjs/types/Interface/api/stripe/Create.js +29 -1
  132. package/dist/mjs/types/Interface/api/stripe/Create.js.map +1 -1
  133. package/dist/mjs/types/Interface/api/stripe/QueryStripe.d.ts +3 -0
  134. package/dist/mjs/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
  135. package/dist/mjs/types/Interface/api/stripe/QueryStripe.js +8 -0
  136. package/dist/mjs/types/Interface/api/stripe/QueryStripe.js.map +1 -1
  137. package/dist/mjs/types/Interface/models/IAIConversation.d.ts +11 -0
  138. package/dist/mjs/types/Interface/models/IAIConversation.d.ts.map +1 -0
  139. package/dist/mjs/types/Interface/models/IAIConversation.js +2 -0
  140. package/dist/mjs/types/Interface/models/IAIConversation.js.map +1 -0
  141. package/dist/mjs/types/Interface/models/IAIQuestion.d.ts +5 -5
  142. package/dist/mjs/types/Interface/models/IAIQuestion.d.ts.map +1 -1
  143. package/dist/mjs/types/Interface/models/IAIQuestion.js.map +1 -1
  144. package/dist/mjs/types/Interface/models/IPrestationComplementary.d.ts +2 -0
  145. package/dist/mjs/types/Interface/models/IPrestationComplementary.d.ts.map +1 -1
  146. package/dist/mjs/types/Interface/models/IPrestationComplementary.js.map +1 -1
  147. package/dist/mjs/types/Interface/models/ISociety.d.ts +2 -1
  148. package/dist/mjs/types/Interface/models/ISociety.d.ts.map +1 -1
  149. package/dist/mjs/types/Interface/models/ISociety.js.map +1 -1
  150. package/dist/mjs/types/index.d.ts +2 -0
  151. package/dist/mjs/types/index.d.ts.map +1 -1
  152. package/dist/mjs/types/index.js +2 -0
  153. package/dist/mjs/types/index.js.map +1 -1
  154. package/dist/mjs/utils/commercialManagement/document.d.ts.map +1 -1
  155. package/dist/mjs/utils/commercialManagement/document.js +3 -2
  156. package/dist/mjs/utils/commercialManagement/document.js.map +1 -1
  157. package/dist/mjs/utils/commercialManagement/templates/common.js +1 -1
  158. package/dist/mjs/utils/commercialManagement/templates/common.js.map +1 -1
  159. package/package.json +1 -1
  160. package/ts/api/resources/Ai.ts +3 -3
  161. package/ts/api/resources/AnalyticsUtm.ts +12 -0
  162. package/ts/api/resources/PaymentExpectation.ts +27 -0
  163. package/ts/api/resources/statistic/Legal.ts +16 -0
  164. package/ts/api/resources.ts +4 -0
  165. package/ts/types/Enum/StatisticType.ts +1 -0
  166. package/ts/types/Interface/api/accountingFiles/queryAccountingFiles.ts +1 -1
  167. package/ts/types/Interface/api/accountingTransaction/QueryTransaction.ts +1 -1
  168. package/ts/types/Interface/api/ai/AskQuestionCollaborator.ts +25 -2
  169. package/ts/types/Interface/api/commercialManagement/Create.ts +8 -2
  170. package/ts/types/Interface/api/promoCode/CreateDefaultPromoCode.ts +4 -1
  171. package/ts/types/Interface/api/statistic/QueryInternal.ts +7 -0
  172. package/ts/types/Interface/api/statistic/QueryLegal.ts +16 -0
  173. package/ts/types/Interface/api/stripe/Create.ts +21 -1
  174. package/ts/types/Interface/api/stripe/QueryStripe.ts +5 -0
  175. package/ts/types/Interface/models/IAIConversation.ts +13 -0
  176. package/ts/types/Interface/models/IAIQuestion.ts +5 -5
  177. package/ts/types/Interface/models/IPrestationComplementary.ts +2 -0
  178. package/ts/types/Interface/models/ISociety.ts +2 -0
  179. package/ts/types/index.ts +2 -0
  180. package/ts/utils/commercialManagement/document.ts +3 -2
  181. package/ts/utils/commercialManagement/templates/common.ts +1 -1
@@ -1,11 +1,15 @@
1
1
  import {
2
2
  BasePaginate,
3
3
  CreatePaymentExpecation,
4
+ CreatePaymentIntent,
5
+ CreateSubscriptionSessionOff,
4
6
  IPaymentExpectation,
5
7
  QueryGetPaymentExpectation,
6
8
  QueryGetPaymentExpectationPaginated,
9
+ RetrievePaymentMethodsParams,
7
10
  } from '../../types';
8
11
  import { Resource } from '../Resource';
12
+ import Stripe from 'stripe';
9
13
 
10
14
  export class PaymentExpectation extends Resource {
11
15
  get(params: QueryGetPaymentExpectation): Promise<PaymentExpectation> {
@@ -40,4 +44,27 @@ export class PaymentExpectation extends Resource {
40
44
  updateByPrestation(idPrestation: number, payload: Partial<IPaymentExpectation>): Promise<IPaymentExpectation> {
41
45
  return this.axios.$patch(`/prestations/${idPrestation}/payment-expectations`, payload);
42
46
  }
47
+
48
+ /**
49
+ * Retourne les type de paiements Stripe
50
+ */
51
+ getAllPaymentMethods(params: RetrievePaymentMethodsParams): Promise<Stripe.PaymentMethod[]> {
52
+ return this.axios.$get('/stripe/payments/methods', { params });
53
+ }
54
+
55
+ /**
56
+ * Créé une session Stripe avec les informations client
57
+ * Attention : les montants sont retournés x100
58
+ */
59
+ createSessionOff(payload: CreateSubscriptionSessionOff): Promise<Stripe.Response<Stripe.Checkout.Session>> {
60
+ return this.axios.$post('/stripe/payments/sessions-off', payload);
61
+ }
62
+
63
+ /**
64
+ * Crée une intention de paiement Stripe avec les informations de notre client
65
+ * Attention : les montants sont retournés x100
66
+ */
67
+ createStripePaymentIntent(body: CreatePaymentIntent): Promise<Stripe.Response<Stripe.PaymentIntent>> {
68
+ return this.axios.$post('/stripe/payments/intents', body);
69
+ }
43
70
  }
@@ -0,0 +1,16 @@
1
+ import { Resource } from '../../Resource';
2
+ import { QueryLegal } from '../../../types';
3
+
4
+ export class StatisticLegal extends Resource {
5
+ /**
6
+ * Retourne les statistiques de juriste pour un utilisateur
7
+ * @param { QueryLegal } params
8
+ * @returns { JSON }
9
+ */
10
+ public get(params: QueryLegal, signal?: AbortSignal): Promise<JSON> {
11
+ return this.axios.$get('/statistic-legal', {
12
+ ...(signal ? { signal } : {}),
13
+ params,
14
+ });
15
+ }
16
+ }
@@ -177,6 +177,8 @@ import { Follow } from './resources/Follow';
177
177
  import { AbsenceRequest } from './resources/AbsenceRequest';
178
178
  import { CompanyMarketingInformation } from './resources/CompanyMarketingInformation';
179
179
  import { Ai } from './resources/Ai';
180
+ import { StatisticLegal } from './resources/statistic/Legal';
181
+ import { AnalyticsUtm } from './resources/AnalyticsUtm';
180
182
 
181
183
  export const resources = {
182
184
  budgetInsight: BudgetInsight,
@@ -358,4 +360,6 @@ export const resources = {
358
360
  absenceRequest: AbsenceRequest,
359
361
  companyMarketingInformation: CompanyMarketingInformation,
360
362
  ai: Ai,
363
+ statisticLegal: StatisticLegal,
364
+ analyticsUtm: AnalyticsUtm,
361
365
  };
@@ -16,4 +16,5 @@ export enum StatisticType {
16
16
  DATA_OFFICER = 15,
17
17
  SALESMAN = 16,
18
18
  MARKETING = 17,
19
+ LEGAL = 18,
19
20
  }
@@ -59,7 +59,7 @@ export class QueryPaginatedAccountingFile {
59
59
  limit: number;
60
60
 
61
61
  @ApiPropertyOptional()
62
- idTypeAccountingFile?: number[];
62
+ idAccountingFileType?: number[];
63
63
 
64
64
  @ApiPropertyOptional()
65
65
  @IsInt()
@@ -16,7 +16,7 @@ export class QueryTransaction {
16
16
  idAccountingJournal: number[];
17
17
 
18
18
  @ApiPropertyOptional()
19
- idTypeAccountingFile?: number[];
19
+ idAccountingFileType?: number[];
20
20
 
21
21
  @ApiPropertyOptional()
22
22
  idBankAccount?: number[];
@@ -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
  }
@@ -331,7 +331,7 @@ export class CreateCommercialSetting {
331
331
  @ApiPropertyOptional()
332
332
  @IsOptional()
333
333
  @IsString()
334
- logoUrl?: string;
334
+ logoUrl?: string | null;
335
335
 
336
336
  @ApiPropertyOptional()
337
337
  @IsOptional()
@@ -457,7 +457,13 @@ export class CommercialDocumentInputs {
457
457
  generalDiscount2: number | null;
458
458
 
459
459
  @ApiProperty({ description: 'Indemnité forfaitaire' })
460
- compensation: string | null;
460
+ recoveryCost: string | null;
461
+
462
+ /**
463
+ * @deprecated use recoveryCost instead (exists just for old mobile version)
464
+ */
465
+ @ApiPropertyOptional({ description: 'Indemnité forfaitaire ' })
466
+ compensation?: string | null;
461
467
 
462
468
  @ApiProperty()
463
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;
@@ -33,3 +33,10 @@ export class QueryInternalMarketing {
33
33
  @IsArray()
34
34
  idUsers?: number[];
35
35
  }
36
+
37
+ export class QueryInternalLegal {
38
+ @ApiPropertyOptional()
39
+ @IsOptional()
40
+ @IsArray()
41
+ idUsers?: number[];
42
+ }
@@ -0,0 +1,16 @@
1
+ import { IsNumber, IsDate } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils';
3
+
4
+ export class QueryLegal {
5
+ @ApiProperty()
6
+ @IsNumber()
7
+ idUser: number;
8
+
9
+ @ApiProperty()
10
+ @IsDate()
11
+ startDate: Date;
12
+
13
+ @ApiProperty()
14
+ @IsDate()
15
+ endDate: Date;
16
+ }
@@ -1,4 +1,4 @@
1
- import { IsDate, IsOptional, IsString } from 'class-validator';
1
+ import { IsDate, IsInt, IsOptional, IsString } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
 
4
4
  export class CreateStripeConnection {
@@ -30,3 +30,23 @@ export class CreateSubscriptionSession {
30
30
  @IsString()
31
31
  priceId: string;
32
32
  }
33
+
34
+ export class CreateSubscriptionSessionOff {
35
+ @ApiProperty()
36
+ @IsString()
37
+ stripeCustomerId: string;
38
+ }
39
+
40
+ export class CreatePaymentIntent {
41
+ @ApiProperty()
42
+ @IsString()
43
+ stripeCustomerId: string;
44
+
45
+ @ApiProperty()
46
+ @IsString()
47
+ paymentMethodId: string;
48
+
49
+ @ApiProperty()
50
+ @IsInt()
51
+ amountInCents: number;
52
+ }
@@ -11,6 +11,11 @@ export class RetrieveUpcomingInvoiceParams {
11
11
  @IsString()
12
12
  subscriptionId: string;
13
13
  }
14
+ export class RetrievePaymentMethodsParams {
15
+ @ApiProperty()
16
+ @IsString()
17
+ customerId: string;
18
+ }
14
19
 
15
20
  export class QueryStripeSession {
16
21
  @ApiPropertyOptional()
@@ -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
  }
@@ -3,6 +3,7 @@ import { IPaymentExpectation } from './IPaymentExpectation';
3
3
  import { IGedFile } from './IGedFile';
4
4
  import { IPrestation } from './IPrestation';
5
5
  import { AcceptationAdmin } from '../../Enum/AdditionnalSells';
6
+ import { IPrestationComplementaryHistory } from './IPrestationComplementaryHistory';
6
7
 
7
8
  // prestationsCompl
8
9
  export interface IPrestationComplementary {
@@ -33,4 +34,5 @@ export interface IPrestationComplementary {
33
34
  prestationPaymentExpectation?: IPaymentExpectation;
34
35
  prestationGedFile?: IGedFile;
35
36
  prestation?: IPrestation;
37
+ prestationComplementaryHistory?: IPrestationComplementaryHistory[];
36
38
  }
@@ -66,6 +66,7 @@ import {
66
66
  ICalendarEvent,
67
67
  IRegulation,
68
68
  IGeneralConditionOfSale,
69
+ IConstitutionHistory,
69
70
  } from '../..';
70
71
  import { IBrandType } from './IBrandType';
71
72
  import { IFile } from './IFile';
@@ -250,4 +251,5 @@ export interface ISociety {
250
251
  accountingFiles?: IAccountingFile[];
251
252
  businessSectors?: IBusinessSector[];
252
253
  calendarEvents?: ICalendarEvent[];
254
+ constitutionHistories?: IConstitutionHistory[];
253
255
  }
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';
@@ -813,6 +814,7 @@ export * from './Interface/api/statistic/QueryGetExpertAccountant';
813
814
  export * from './Interface/api/statistic/QueryAccountant';
814
815
  export * from './Interface/api/statistic/QueryGetAccountant';
815
816
  export * from './Interface/api/statistic/QueryDirection';
817
+ export * from './Interface/api/statistic/QueryLegal';
816
818
  export * from './Interface/api/statistic/QueryInternal';
817
819
  export * from './Interface/api/statistic/QueryGetDirection';
818
820
  export * from './Interface/api/statistic/QueryCustomerSuccess';
@@ -73,6 +73,7 @@ export function generateCommercialDocument(
73
73
 
74
74
  const accountingCategory = AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null;
75
75
 
76
+ const recoveryCost = payload.recoveryCost ?? payload.compensation;
76
77
  const data: ReadDocumentEditing & { brandColors: brandColorType; brandName: string; shouldHideBrandName: boolean } = {
77
78
  ...payload,
78
79
  thirdParty,
@@ -85,8 +86,8 @@ export function generateCommercialDocument(
85
86
  termsOfPayment: payload.termsOfPayment
86
87
  ? (internationalizationConsistency(locale, payload.termsOfPayment, 'termsOfPayment') ?? payload.termsOfPayment)
87
88
  : null,
88
- compensation: payload.compensation
89
- ? (internationalizationConsistency(locale, payload.compensation, 'recoveryCost') ?? payload.compensation)
89
+ recoveryCost: recoveryCost
90
+ ? (internationalizationConsistency(locale, recoveryCost, 'recoveryCost') ?? recoveryCost)
90
91
  : null,
91
92
  discount: payload.discount
92
93
  ? (internationalizationConsistency(locale, payload.discount, 'discount') ?? payload.discount)
@@ -9,7 +9,7 @@ export class CommercialDocumentCommonHTML {
9
9
  <% } %>`;
10
10
 
11
11
  footer = `<div class="footer" style="font-size: 8px !important; color: #838384; text-align: center; padding: 0 40px; display: block; width: 100%;">
12
- <% if (freeText) { %><%- freeText %><br/><br/><% } %><% if (accountingCategoryFormatted) {%><%= accountingCategoryFormatted %> | <%}%><% if(marginVats.length > 0) { %><%= languageTemplate.template.common.footer.marginVat %> - <% marginVats.forEach(function(v, index) { %><%= v %> - <% }) %><%= languageTemplate.template.common.footer.legalVatMention %> | <% } %><% if(penalties || compensation || discount) { %><%= penalties ? languageTemplate.template.common.footer.penalties + ' : ' + penalties : ''%><%= penalties && compensation ? ' | ' : ''%><%= compensation ? languageTemplate.template.common.footer.recoveryCosts + ' : ' + compensation + ' ' : '' %><%= (compensation || penalties) && discount ? ' | ' : '' %><%= discount ? languageTemplate.template.common.footer.discount + ' : ' + discount : '' %><%= shouldPayTaxAfterDebit ? "| " + languageTemplate.template.common.footer.shouldPayTaxAfterDebit : '' %><% if(name || legalForm || capital || siren || rcs) {%><br/><br/><% } %><% } %><%= name %><%= name && (legalForm || capital || siren || rcs) ? ', ' : ''%><%= legalForm %><%= capital ? ' ' + languageTemplate.template.common.footer.capital + ' ' + capitalFormatted + ' €' : '' %><%= siren ? ' ' + languageTemplate.template.common.footer.siren + ' ' + siren : ''%><%= rcs ? '| RCS ' + rcs : ''%><% if (vatCode || nafCode) {%><br/><% } %><%= vatCode ? languageTemplate.template.common.footer.vatCode + ' ' +vatCode : ''%><% if(vatCode && nafCode){%>|<%}%><%= nafCode ? 'APE '+nafCode : '' %>
12
+ <% if (freeText) { %><%- freeText %><br/><br/><% } %><% if (accountingCategoryFormatted) {%><%= accountingCategoryFormatted %> | <%}%><% if(marginVats.length > 0) { %><%= languageTemplate.template.common.footer.marginVat %> - <% marginVats.forEach(function(v, index) { %><%= v %> - <% }) %><%= languageTemplate.template.common.footer.legalVatMention %> | <% } %><% if(penalties || recoveryCost || discount) { %><%= penalties ? languageTemplate.template.common.footer.penalties + ' : ' + penalties : ''%><%= penalties && recoveryCost ? ' | ' : ''%><%= recoveryCost ? languageTemplate.template.common.footer.recoveryCosts + ' : ' + recoveryCost + ' ' : '' %><%= (recoveryCost || penalties) && discount ? ' | ' : '' %><%= discount ? languageTemplate.template.common.footer.discount + ' : ' + discount : '' %><%= shouldPayTaxAfterDebit ? "| " + languageTemplate.template.common.footer.shouldPayTaxAfterDebit : '' %><% if(name || legalForm || capital || siren || rcs) {%><br/><br/><% } %><% } %><%= name %><%= name && (legalForm || capital || siren || rcs) ? ', ' : ''%><%= legalForm %><%= capital ? ' ' + languageTemplate.template.common.footer.capital + ' ' + capitalFormatted + ' €' : '' %><%= siren ? ' ' + languageTemplate.template.common.footer.siren + ' ' + siren : ''%><%= rcs ? '| RCS ' + rcs : ''%><% if (vatCode || nafCode) {%><br/><% } %><%= vatCode ? languageTemplate.template.common.footer.vatCode + ' ' +vatCode : ''%><% if(vatCode && nafCode){%>|<%}%><%= nafCode ? 'APE '+nafCode : '' %>
13
13
  <% if (["Clementine", "Pourcentage", "Comptalib"].includes(brandName) && !shouldHideBrandName) { %>
14
14
  <div style="display: grid; place-items: center;"><div style="background-color: <%= brandColors.primary50 %>; color: <%= brandColors.primary500 %>; display: flex; gap: 3px; max-width: fit-content; border-radius: 4px; padding: 4px 8px; margin-top: 8px; align-items: center; font-size: 9px; line-height: 140%; font-family: 'circular std', sans serif; font-weight: 450;">
15
15
  <%= languageTemplate.template.common.footer.generate %>