@silexpert/core 1.3.184-0 → 1.3.184

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 (158) hide show
  1. package/dist/cjs/api/resources/Card.d.ts +23 -1
  2. package/dist/cjs/api/resources/Card.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Card.js +36 -0
  4. package/dist/cjs/api/resources/Card.js.map +1 -1
  5. package/dist/cjs/api/resources/InternalInvoicing.d.ts.map +1 -1
  6. package/dist/cjs/api/resources/InternalInvoicing.js +0 -8
  7. package/dist/cjs/api/resources/InternalInvoicing.js.map +1 -1
  8. package/dist/cjs/types/Enum/AdjustmentType.js +4 -4
  9. package/dist/cjs/types/Enum/AdjustmentType.js.map +1 -1
  10. package/dist/cjs/types/Enum/Card.d.ts +7 -1
  11. package/dist/cjs/types/Enum/Card.d.ts.map +1 -1
  12. package/dist/cjs/types/Enum/Card.js +9 -1
  13. package/dist/cjs/types/Enum/Card.js.map +1 -1
  14. package/dist/cjs/types/Enum/Unit.d.ts +2 -1
  15. package/dist/cjs/types/Enum/Unit.d.ts.map +1 -1
  16. package/dist/cjs/types/Enum/Unit.js +11 -0
  17. package/dist/cjs/types/Enum/Unit.js.map +1 -1
  18. package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts +1 -0
  19. package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts.map +1 -1
  20. package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js +6 -0
  21. package/dist/cjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js.map +1 -1
  22. package/dist/cjs/types/Interface/api/card/Cron.d.ts +0 -3
  23. package/dist/cjs/types/Interface/api/card/Cron.d.ts.map +1 -1
  24. package/dist/cjs/types/Interface/api/card/Cron.js +1 -10
  25. package/dist/cjs/types/Interface/api/card/Cron.js.map +1 -1
  26. package/dist/cjs/types/Interface/api/card/ModifyAcceptation.d.ts +9 -0
  27. package/dist/cjs/types/Interface/api/card/ModifyAcceptation.d.ts.map +1 -0
  28. package/dist/cjs/types/Interface/api/card/ModifyAcceptation.js +43 -0
  29. package/dist/cjs/types/Interface/api/card/ModifyAcceptation.js.map +1 -0
  30. package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.d.ts +25 -0
  31. package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.d.ts.map +1 -0
  32. package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.js +106 -0
  33. package/dist/cjs/types/Interface/api/card/ModifyBalanceSheet.js.map +1 -0
  34. package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.d.ts +5 -0
  35. package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.d.ts.map +1 -0
  36. package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.js +29 -0
  37. package/dist/cjs/types/Interface/api/card/ModifyCustomerVat.js.map +1 -0
  38. package/dist/cjs/types/Interface/api/card/ModifyPlanning.d.ts +18 -0
  39. package/dist/cjs/types/Interface/api/card/ModifyPlanning.d.ts.map +1 -0
  40. package/dist/cjs/types/Interface/api/card/ModifyPlanning.js +79 -0
  41. package/dist/cjs/types/Interface/api/card/ModifyPlanning.js.map +1 -0
  42. package/dist/cjs/types/Interface/api/card/Query.d.ts +8 -0
  43. package/dist/cjs/types/Interface/api/card/Query.d.ts.map +1 -0
  44. package/dist/cjs/types/Interface/api/card/Query.js +37 -0
  45. package/dist/cjs/types/Interface/api/card/Query.js.map +1 -0
  46. package/dist/cjs/types/Interface/api/card/QueryUserCards.d.ts +11 -0
  47. package/dist/cjs/types/Interface/api/card/QueryUserCards.d.ts.map +1 -1
  48. package/dist/cjs/types/Interface/api/card/QueryUserCards.js +44 -1
  49. package/dist/cjs/types/Interface/api/card/QueryUserCards.js.map +1 -1
  50. package/dist/cjs/types/Interface/api/card/UpdateCard.d.ts +13 -0
  51. package/dist/cjs/types/Interface/api/card/UpdateCard.d.ts.map +1 -1
  52. package/dist/cjs/types/Interface/api/card/UpdateCard.js +58 -1
  53. package/dist/cjs/types/Interface/api/card/UpdateCard.js.map +1 -1
  54. package/dist/cjs/types/Interface/models/IBalanceSheet.d.ts +3 -0
  55. package/dist/cjs/types/Interface/models/IBalanceSheet.d.ts.map +1 -1
  56. package/dist/cjs/types/Interface/models/IBalanceSheet.js.map +1 -1
  57. package/dist/cjs/types/Interface/models/ICard.d.ts +19 -0
  58. package/dist/cjs/types/Interface/models/ICard.d.ts.map +1 -1
  59. package/dist/cjs/types/Interface/models/ICard.js.map +1 -1
  60. package/dist/cjs/types/Interface/models/ICardHistory.d.ts +4 -0
  61. package/dist/cjs/types/Interface/models/ICardHistory.d.ts.map +1 -1
  62. package/dist/cjs/types/Interface/models/ICardHistory.js.map +1 -1
  63. package/dist/cjs/types/Interface/models/ICustomerVat.d.ts +1 -0
  64. package/dist/cjs/types/Interface/models/ICustomerVat.d.ts.map +1 -1
  65. package/dist/cjs/types/Interface/models/ICustomerVat.js.map +1 -1
  66. package/dist/cjs/types/index.d.ts +5 -0
  67. package/dist/cjs/types/index.d.ts.map +1 -1
  68. package/dist/cjs/types/index.js +5 -0
  69. package/dist/cjs/types/index.js.map +1 -1
  70. package/dist/mjs/api/resources/Card.d.ts +23 -1
  71. package/dist/mjs/api/resources/Card.d.ts.map +1 -1
  72. package/dist/mjs/api/resources/Card.js +45 -0
  73. package/dist/mjs/api/resources/Card.js.map +1 -1
  74. package/dist/mjs/api/resources/InternalInvoicing.d.ts.map +1 -1
  75. package/dist/mjs/api/resources/InternalInvoicing.js +0 -8
  76. package/dist/mjs/api/resources/InternalInvoicing.js.map +1 -1
  77. package/dist/mjs/types/Enum/AdjustmentType.js +4 -4
  78. package/dist/mjs/types/Enum/AdjustmentType.js.map +1 -1
  79. package/dist/mjs/types/Enum/Card.d.ts +7 -1
  80. package/dist/mjs/types/Enum/Card.d.ts.map +1 -1
  81. package/dist/mjs/types/Enum/Card.js +9 -1
  82. package/dist/mjs/types/Enum/Card.js.map +1 -1
  83. package/dist/mjs/types/Enum/Unit.d.ts +2 -1
  84. package/dist/mjs/types/Enum/Unit.d.ts.map +1 -1
  85. package/dist/mjs/types/Enum/Unit.js +11 -0
  86. package/dist/mjs/types/Enum/Unit.js.map +1 -1
  87. package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts +1 -0
  88. package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts.map +1 -1
  89. package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js +7 -0
  90. package/dist/mjs/types/Interface/api/balanceSheet/UpdateBalanceSheet.js.map +1 -1
  91. package/dist/mjs/types/Interface/api/card/Cron.d.ts +0 -3
  92. package/dist/mjs/types/Interface/api/card/Cron.d.ts.map +1 -1
  93. package/dist/mjs/types/Interface/api/card/Cron.js +0 -8
  94. package/dist/mjs/types/Interface/api/card/Cron.js.map +1 -1
  95. package/dist/mjs/types/Interface/api/card/ModifyAcceptation.d.ts +9 -0
  96. package/dist/mjs/types/Interface/api/card/ModifyAcceptation.d.ts.map +1 -0
  97. package/dist/mjs/types/Interface/api/card/ModifyAcceptation.js +42 -0
  98. package/dist/mjs/types/Interface/api/card/ModifyAcceptation.js.map +1 -0
  99. package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.d.ts +25 -0
  100. package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.d.ts.map +1 -0
  101. package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.js +115 -0
  102. package/dist/mjs/types/Interface/api/card/ModifyBalanceSheet.js.map +1 -0
  103. package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.d.ts +5 -0
  104. package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.d.ts.map +1 -0
  105. package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.js +27 -0
  106. package/dist/mjs/types/Interface/api/card/ModifyCustomerVat.js.map +1 -0
  107. package/dist/mjs/types/Interface/api/card/ModifyPlanning.d.ts +18 -0
  108. package/dist/mjs/types/Interface/api/card/ModifyPlanning.d.ts.map +1 -0
  109. package/dist/mjs/types/Interface/api/card/ModifyPlanning.js +84 -0
  110. package/dist/mjs/types/Interface/api/card/ModifyPlanning.js.map +1 -0
  111. package/dist/mjs/types/Interface/api/card/Query.d.ts +8 -0
  112. package/dist/mjs/types/Interface/api/card/Query.d.ts.map +1 -0
  113. package/dist/mjs/types/Interface/api/card/Query.js +34 -0
  114. package/dist/mjs/types/Interface/api/card/Query.js.map +1 -0
  115. package/dist/mjs/types/Interface/api/card/QueryUserCards.d.ts +11 -0
  116. package/dist/mjs/types/Interface/api/card/QueryUserCards.d.ts.map +1 -1
  117. package/dist/mjs/types/Interface/api/card/QueryUserCards.js +43 -1
  118. package/dist/mjs/types/Interface/api/card/QueryUserCards.js.map +1 -1
  119. package/dist/mjs/types/Interface/api/card/UpdateCard.d.ts +13 -0
  120. package/dist/mjs/types/Interface/api/card/UpdateCard.d.ts.map +1 -1
  121. package/dist/mjs/types/Interface/api/card/UpdateCard.js +65 -1
  122. package/dist/mjs/types/Interface/api/card/UpdateCard.js.map +1 -1
  123. package/dist/mjs/types/Interface/models/IBalanceSheet.d.ts +3 -0
  124. package/dist/mjs/types/Interface/models/IBalanceSheet.d.ts.map +1 -1
  125. package/dist/mjs/types/Interface/models/IBalanceSheet.js.map +1 -1
  126. package/dist/mjs/types/Interface/models/ICard.d.ts +19 -0
  127. package/dist/mjs/types/Interface/models/ICard.d.ts.map +1 -1
  128. package/dist/mjs/types/Interface/models/ICard.js.map +1 -1
  129. package/dist/mjs/types/Interface/models/ICardHistory.d.ts +4 -0
  130. package/dist/mjs/types/Interface/models/ICardHistory.d.ts.map +1 -1
  131. package/dist/mjs/types/Interface/models/ICardHistory.js.map +1 -1
  132. package/dist/mjs/types/Interface/models/ICustomerVat.d.ts +1 -0
  133. package/dist/mjs/types/Interface/models/ICustomerVat.d.ts.map +1 -1
  134. package/dist/mjs/types/Interface/models/ICustomerVat.js.map +1 -1
  135. package/dist/mjs/types/index.d.ts +5 -0
  136. package/dist/mjs/types/index.d.ts.map +1 -1
  137. package/dist/mjs/types/index.js +5 -0
  138. package/dist/mjs/types/index.js.map +1 -1
  139. package/package.json +1 -1
  140. package/ts/api/resources/Card.ts +61 -0
  141. package/ts/api/resources/InternalInvoicing.ts +0 -8
  142. package/ts/types/Enum/AdjustmentType.ts +4 -4
  143. package/ts/types/Enum/Card.ts +9 -1
  144. package/ts/types/Enum/Unit.ts +11 -0
  145. package/ts/types/Interface/api/balanceSheet/UpdateBalanceSheet.ts +5 -0
  146. package/ts/types/Interface/api/card/Cron.ts +1 -8
  147. package/ts/types/Interface/api/card/ModifyAcceptation.ts +24 -0
  148. package/ts/types/Interface/api/card/ModifyBalanceSheet.ts +81 -0
  149. package/ts/types/Interface/api/card/ModifyCustomerVat.ts +13 -0
  150. package/ts/types/Interface/api/card/ModifyPlanning.ts +52 -0
  151. package/ts/types/Interface/api/card/Query.ts +19 -0
  152. package/ts/types/Interface/api/card/QueryUserCards.ts +36 -1
  153. package/ts/types/Interface/api/card/UpdateCard.ts +50 -2
  154. package/ts/types/Interface/models/IBalanceSheet.ts +3 -0
  155. package/ts/types/Interface/models/ICard.ts +20 -0
  156. package/ts/types/Interface/models/ICardHistory.ts +4 -0
  157. package/ts/types/Interface/models/ICustomerVat.ts +1 -0
  158. package/ts/types/index.ts +5 -0
@@ -3,6 +3,15 @@ import {
3
3
  ICard,
4
4
  QueryUserCards,
5
5
  QueryUserCardsPaginated,
6
+ QueryUserCardsStats,
7
+ CardsStatsGroup,
8
+ UpdateCard,
9
+ ModifyTeamPlanning,
10
+ ModifyExercisePlanning,
11
+ OrganizeBalanceSheets,
12
+ OrganizeBalanceSheetsResponse,
13
+ QueryInternalCardsStats,
14
+ InternalCardStats,
6
15
  BasePaginate,
7
16
  UpdateCardV2,
8
17
  AssignCard,
@@ -29,10 +38,62 @@ export class Card extends Resource {
29
38
  });
30
39
  }
31
40
 
41
+ /**
42
+ * @deprecated Use getAll instead
43
+ */
44
+ getAllAdmin(params: QueryUserCards, signal?: AbortSignal): Promise<ICard[]> {
45
+ return this.axios.$get('/cards', {
46
+ ...(signal ? { signal } : {}),
47
+ params,
48
+ });
49
+ }
50
+
51
+ getStats(params: QueryUserCardsStats, signal?: AbortSignal): Promise<CardsStatsGroup[]> {
52
+ return this.axios.$get('/cards/stats', {
53
+ ...(signal ? { signal } : {}),
54
+ params,
55
+ });
56
+ }
57
+
58
+ getInternalStats(params: QueryInternalCardsStats, signal?: AbortSignal): Promise<InternalCardStats[]> {
59
+ return this.axios.$get('/cards/internal/stats', {
60
+ ...(signal ? { signal } : {}),
61
+ params,
62
+ });
63
+ }
64
+
65
+ /**
66
+ * @deprecated Use updateV2 instead
67
+ */
68
+ update(id: number, data: UpdateCard): Promise<ICard> {
69
+ return this.axios.$put(`/cards/${id}`, data);
70
+ }
71
+
32
72
  delete(id: number): Promise<void> {
33
73
  return this.axios.$delete(`/cards/${id}`);
34
74
  }
35
75
 
76
+ /**
77
+ * @deprecated comptallo v1 endpoint
78
+ */
79
+ modifyTeamPlanning(data: ModifyTeamPlanning): Promise<true> {
80
+ return this.axios.$put('/cards/assign/modify-team-planning', data);
81
+ }
82
+
83
+ /**
84
+ * @deprecated comptallo v1 endpoint
85
+ */
86
+ modifyExercisePlanning(data: ModifyExercisePlanning): Promise<true> {
87
+ return this.axios.$put('/cards/assign/modify-exercise-planning', data);
88
+ }
89
+
90
+ /**
91
+ * @deprecated comptallo v1 endpoint
92
+ */
93
+ organizeFutureBalanceSheets(data: OrganizeBalanceSheets): Promise<OrganizeBalanceSheetsResponse> {
94
+ return this.axios.$post('/cards/accountant/organize/future-balance-sheets', data);
95
+ }
96
+
36
97
  updateV2(idCard: number, data: UpdateCardV2): Promise<ICard> {
37
98
  return this.axios.$put(`/cards/${idCard}/v2`, data);
38
99
  }
@@ -30,16 +30,8 @@ export class InternalInvoicing extends Resource {
30
30
  return this.axios.$post('/internalInvoicing/cutOff/FAE', {});
31
31
  case 3:
32
32
  return this.axios.$post('/internalInvoicing/cutOff/AAE', {});
33
- case 4:
34
- return this.axios.$post('/internalInvoicing/cutOff/PCA2', {});
35
33
  case 5:
36
34
  return this.axios.$post('/internalInvoicing/cutOff/PCA-accounting-package', {});
37
- case 6:
38
- return this.axios.$post('/internalInvoicing/cutOff/PCA-accounting-package-2', {});
39
- case 7:
40
- return this.axios.$post('/internalInvoicing/cutOff/PCA-accounting-out-package', {});
41
- case 8:
42
- return this.axios.$post('/internalInvoicing/cutOff/PCA-accounting-out-package-2', {});
43
35
  case 9:
44
36
  return this.axios.$post('/internalInvoicing/cutOff/AAE-detail', {});
45
37
  default:
@@ -16,7 +16,7 @@ export const AdjustmentTypeList: Array<{
16
16
  {
17
17
  id: AdjustmentTypeId.TOO_MUCH_COLLECTED,
18
18
  label: 'TVA trop collectée',
19
- centuries: [2022, 2023, 2024, 2025],
19
+ centuries: [2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030],
20
20
  key: 'vat.deductible.toImpute',
21
21
  inputKey: 'adjustment.tooMuchCollected',
22
22
  tooltip: '2C - Sommes à imputer, y compris acompte congés',
@@ -24,7 +24,7 @@ export const AdjustmentTypeList: Array<{
24
24
  {
25
25
  id: AdjustmentTypeId.NOT_ENOUGH_COLLECTED,
26
26
  label: 'TVA pas assez collectée',
27
- centuries: [2022, 2023, 2024, 2025],
27
+ centuries: [2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030],
28
28
  key: 'vat.sumToAdd',
29
29
  inputKey: 'adjustment.notEnoughCollected',
30
30
  tooltip: '5B - Sommes à ajouter, y compris acompte congés',
@@ -32,7 +32,7 @@ export const AdjustmentTypeList: Array<{
32
32
  {
33
33
  id: AdjustmentTypeId.TOO_MUCH_DEDUCTED,
34
34
  label: 'TVA trop déduite',
35
- centuries: [2022, 2023, 2024, 2025],
35
+ centuries: [2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030],
36
36
  key: 'vat.sumToAdd',
37
37
  inputKey: 'adjustment.tooMuchDeducted',
38
38
  tooltip: '5B - Sommes à ajouter, y compris acompte congés',
@@ -40,7 +40,7 @@ export const AdjustmentTypeList: Array<{
40
40
  {
41
41
  id: AdjustmentTypeId.NOT_ENOUGH_DEDUCTED,
42
42
  label: 'TVA pas assez déduite',
43
- centuries: [2022, 2023, 2024, 2025],
43
+ centuries: [2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030],
44
44
  key: 'vat.deductible.toImpute',
45
45
  tooltip: '2C - Sommes à imputer, y compris acompte congés',
46
46
  inputKey: 'adjustment.notEnoughDeducted',
@@ -34,6 +34,7 @@ export enum CardType {
34
34
  VAT_SEND_SIE = 30, // TVA envoi SIE
35
35
  ADVANCE_IS_SEND_SIE = 31, // Acompte IS envoi SIE
36
36
  CUT_OFF_ORI_M_1 = 32, // Cut-off ORI M-1
37
+ IS_REFUSED_SIE = 33, // IS Refus SIE
37
38
  }
38
39
 
39
40
  export enum CardState {
@@ -88,7 +89,8 @@ export const CardGroup: readonly CardGroupType[] = [
88
89
  CardType.BALANCE_SHEET_PREPARATION,
89
90
  CardType.BALANCE_SHEET_SEND_SIE,
90
91
  CardType.BALANCE_SHEET_REFUSED_SIE,
91
- CardType.BALANCE_SHEET_REFUSED_BY_CLIENT
92
+ CardType.BALANCE_SHEET_REFUSED_BY_CLIENT,
93
+ CardType.IS_REFUSED_SIE,
92
94
  ],
93
95
  roles: [Role.ACCOUNTANT],
94
96
  teamType: TeamType.BALANCESHEET,
@@ -344,6 +346,12 @@ export const CardTypeLabel = [
344
346
  refLabel: 'COOM1',
345
347
  groupId: CardGroupEnum.CUT_OFF,
346
348
  },
349
+ {
350
+ id: CardType.IS_REFUSED_SIE,
351
+ label: 'IS Refus SIE',
352
+ refLabel: 'ISRS',
353
+ groupId: CardGroupEnum.BALANCE_SHEET_GROUP,
354
+ }
347
355
  ] as const;
348
356
 
349
357
  export interface UserCardsStats {
@@ -28,6 +28,7 @@ export enum UnitId {
28
28
  TON = 19,
29
29
  HECTARE = 20,
30
30
  MINUTE = 21,
31
+ GRAM = 22,
31
32
  }
32
33
 
33
34
  export type IUnitList = Array<{ name: string; id: number; shortName: string }>;
@@ -138,6 +139,11 @@ export const Unit: IUnit = {
138
139
  name: 'Minute',
139
140
  shortName: 'min',
140
141
  },
142
+ GRAM: {
143
+ id: UnitId.GRAM,
144
+ name: 'Gramme',
145
+ shortName: 'g',
146
+ },
141
147
  };
142
148
 
143
149
  export const UnitList = [
@@ -246,4 +252,9 @@ export const UnitList = [
246
252
  name: 'Minutre',
247
253
  shortname: 'min',
248
254
  },
255
+ {
256
+ id: UnitId.GRAM,
257
+ name: 'Gramme',
258
+ shortName: 'g',
259
+ },
249
260
  ];
@@ -48,6 +48,11 @@ export class UpdateBalanceSheet {
48
48
  @IsOptional()
49
49
  bankCollectingState?: number;
50
50
 
51
+ @ApiPropertyOptional()
52
+ @IsNumber()
53
+ @IsOptional()
54
+ idCard?: number;
55
+
51
56
  @ApiPropertyOptional()
52
57
  @IsString()
53
58
  @IsOptional()
@@ -18,11 +18,4 @@ export class GenerateAdvanceISCard {
18
18
  @IsOptional()
19
19
  @IsInt()
20
20
  month?: number;
21
- }
22
-
23
- export class QueryCronCards {
24
- @ApiPropertyOptional()
25
- @IsOptional()
26
- @IsInt()
27
- declare idSociety?: number;
28
- }
21
+ }
@@ -0,0 +1,24 @@
1
+ import { IsNumber, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+
4
+ export class AssignAcceptationAutomaticly {
5
+ @ApiProperty()
6
+ @IsNumber()
7
+ idTeam: number;
8
+
9
+ @ApiPropertyOptional()
10
+ @IsOptional()
11
+ @IsNumber()
12
+ idSociety?: number;
13
+ }
14
+
15
+ export class AssignAcceptationNewClientAutomatically {
16
+ @ApiProperty()
17
+ @IsNumber()
18
+ idUser: number;
19
+
20
+ @ApiPropertyOptional()
21
+ @IsOptional()
22
+ @IsNumber()
23
+ idSociety?: number;
24
+ }
@@ -0,0 +1,81 @@
1
+ import { IsArray, IsBoolean, IsDate, IsEnum, IsInt, IsNumber, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { ComptaType } from '../../../Enum/ComptaType';
4
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
5
+ import { CardType } from '../../../Enum/Card';
6
+ import { LegalFormTypeEnum } from '../../../Enum/LegalForm';
7
+
8
+ export interface OrganizeBalanceSheetsResponse {
9
+ plannedCardsCount: number;
10
+ }
11
+
12
+ export class OrganizeBalanceSheets {
13
+ @ApiPropertyOptional()
14
+ @IsOptional()
15
+ @IsNumber()
16
+ idTeam?: number;
17
+
18
+ @ApiPropertyOptional()
19
+ @IsOptional()
20
+ @IsArray()
21
+ @IsInt({ each: true })
22
+ idAccountants?: number[];
23
+
24
+ @ApiProperty()
25
+ @IsArray()
26
+ @IsEnum(CardType, { each: true })
27
+ cardType: CardType[];
28
+
29
+ @ApiProperty()
30
+ @IsDate()
31
+ exerciceMonthDate: Date;
32
+
33
+ @ApiProperty()
34
+ @IsEnum(ComptaType)
35
+ idComptaType: ComptaType;
36
+
37
+ @ApiProperty()
38
+ @IsArray()
39
+ @IsEnum(LegalFormTypeEnum, { each: true })
40
+ legalForms: LegalFormTypeEnum[];
41
+
42
+ @ApiProperty()
43
+ @IsBoolean()
44
+ @ToBoolean()
45
+ soldeIsOk: boolean;
46
+
47
+ @ApiProperty()
48
+ @IsBoolean()
49
+ @ToBoolean()
50
+ withSocial: boolean;
51
+
52
+ @ApiProperty()
53
+ @IsDate()
54
+ assignDateStart: Date;
55
+
56
+ @ApiPropertyOptional()
57
+ @IsOptional()
58
+ @IsDate()
59
+ assignDateEnd?: Date;
60
+
61
+ @ApiPropertyOptional()
62
+ @IsOptional()
63
+ @IsNumber()
64
+ nbCardByDay?: number;
65
+
66
+ @ApiPropertyOptional()
67
+ @IsOptional()
68
+ @IsNumber()
69
+ idSociety?: number;
70
+ }
71
+
72
+ export class AssignBalanceSheet {
73
+ @ApiProperty()
74
+ @IsNumber()
75
+ idTeam: number;
76
+
77
+ @ApiPropertyOptional()
78
+ @IsOptional()
79
+ @IsNumber()
80
+ idSociety?: number;
81
+ }
@@ -0,0 +1,13 @@
1
+ import { IsNumber, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+
4
+ export class assignCustomerVatAutomatically {
5
+ @ApiProperty()
6
+ @IsNumber()
7
+ idUser: number;
8
+
9
+ @ApiPropertyOptional()
10
+ @IsOptional()
11
+ @IsNumber()
12
+ idSociety?: number;
13
+ }
@@ -0,0 +1,52 @@
1
+ import { IsDate, IsInt } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils';
3
+
4
+ export class ModifyTeamPlanning {
5
+ @ApiProperty()
6
+ @IsInt()
7
+ idUserMissing: number;
8
+
9
+ @ApiProperty()
10
+ @IsInt({ each: true })
11
+ idUsers: number[];
12
+
13
+ @ApiProperty()
14
+ @IsDate()
15
+ startDate: Date;
16
+
17
+ @ApiProperty()
18
+ @IsDate()
19
+ endDate: Date;
20
+ }
21
+
22
+ export class ModifyExercisePlanning {
23
+ @ApiProperty()
24
+ @IsDate()
25
+ exerciseClosingDate: Date;
26
+
27
+ @ApiProperty()
28
+ @IsDate()
29
+ startDate: Date;
30
+
31
+ @ApiProperty()
32
+ @IsDate()
33
+ endDate: Date;
34
+
35
+ @ApiProperty()
36
+ @IsInt({ each: true })
37
+ idUsers: number[];
38
+ }
39
+
40
+ export class AutomaticallyAssignTeamPlanning {
41
+ @ApiProperty()
42
+ @IsInt()
43
+ idTeam: number;
44
+
45
+ @ApiProperty()
46
+ @IsDate()
47
+ startDate: Date;
48
+
49
+ @ApiProperty()
50
+ @IsDate()
51
+ endDate: Date;
52
+ }
@@ -0,0 +1,19 @@
1
+ import { IsDate, IsInt, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+
4
+ export class QueryInternalCardsStats {
5
+ @ApiProperty()
6
+ @IsInt()
7
+ idTeam: number;
8
+
9
+ @ApiProperty()
10
+ @IsDate()
11
+ date: Date;
12
+ }
13
+
14
+ export class QueryCronCards {
15
+ @ApiPropertyOptional()
16
+ @IsOptional()
17
+ @IsInt()
18
+ declare idSociety?: number;
19
+ }
@@ -1,4 +1,4 @@
1
- import { IsArray, IsBoolean, IsDateString, IsInt, IsOptional, IsString, Min } from 'class-validator';
1
+ import { IsArray, IsBoolean, IsDate, IsDateString, IsEnum, IsInt, IsOptional, IsString, Min } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { CardType, CardState } from '../../../Enum/Card';
4
4
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
@@ -57,3 +57,38 @@ export class QueryUserCardsPaginated extends QueryUserCards {
57
57
  @Min(1)
58
58
  limit: number;
59
59
  }
60
+
61
+ /**
62
+ * @deprecated Use QueryUserCards instead
63
+ */
64
+ export class QueryUserCardsAdmin {
65
+ @ApiPropertyOptional()
66
+ @IsOptional()
67
+ @IsInt()
68
+ declare idUser?: number;
69
+
70
+ @ApiPropertyOptional()
71
+ @IsOptional()
72
+ @IsDate()
73
+ declare startDate?: Date;
74
+
75
+ @ApiPropertyOptional()
76
+ @IsOptional()
77
+ @IsDate()
78
+ declare endDate?: Date;
79
+
80
+ @ApiPropertyOptional()
81
+ @IsOptional()
82
+ @IsString()
83
+ declare search?: string;
84
+
85
+ @ApiPropertyOptional()
86
+ @IsOptional()
87
+ @IsArray()
88
+ declare types?: CardType[];
89
+
90
+ @ApiPropertyOptional()
91
+ @IsOptional()
92
+ @IsEnum(CardState)
93
+ declare state?: CardState;
94
+ }
@@ -1,6 +1,7 @@
1
- import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
1
+ import { IsBoolean, IsDate, IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { CardState, CardType, TransactionRangeFilter } from '../../../Enum/Card';
4
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
5
 
5
6
  export class AssignCard {
6
7
  @ApiProperty()
@@ -19,6 +20,10 @@ export class UpdateCardV2 {
19
20
  @IsEnum(CardState)
20
21
  state?: CardState;
21
22
 
23
+ @ApiPropertyOptional()
24
+ @IsOptional()
25
+ plannedAt?: Date | null;
26
+
22
27
  @ApiPropertyOptional()
23
28
  @IsOptional()
24
29
  @IsInt()
@@ -33,4 +38,47 @@ export class UpdateCardV2 {
33
38
  @IsOptional()
34
39
  @IsInt()
35
40
  priority?: number;
36
- }
41
+ }
42
+
43
+ /**
44
+ * @deprecated Use UpdateCardV2 instead
45
+ */
46
+ export class UpdateCard {
47
+ @ApiPropertyOptional()
48
+ @IsOptional()
49
+ @IsInt()
50
+ @IsEnum(CardType)
51
+ type?: CardType;
52
+
53
+ @ApiPropertyOptional()
54
+ @IsOptional()
55
+ @IsBoolean()
56
+ isManual?: boolean;
57
+
58
+ @ApiPropertyOptional()
59
+ @IsOptional()
60
+ @IsBoolean()
61
+ @ToBoolean()
62
+ isBlocked?: boolean;
63
+
64
+ @ApiPropertyOptional()
65
+ @IsOptional()
66
+ @IsInt()
67
+ @IsEnum(CardState)
68
+ state?: CardState;
69
+
70
+ @ApiPropertyOptional()
71
+ @IsOptional()
72
+ @IsDate()
73
+ plannedAt?: Date | null;
74
+
75
+ @ApiPropertyOptional()
76
+ @IsOptional()
77
+ @IsInt()
78
+ idUser?: number;
79
+
80
+ @ApiPropertyOptional()
81
+ @IsOptional()
82
+ @IsString()
83
+ comment?: string;
84
+ }
@@ -4,6 +4,7 @@ import { ISupervision } from './ISupervision';
4
4
  import { IPrestation } from './IPrestation';
5
5
  import { IGedFile } from './IGedFile';
6
6
  import { IFile } from './IFile';
7
+ import { ICard } from './ICard';
7
8
  import { IBalanceSheetHistory } from './IBalanceSheetHistory';
8
9
  import { IAdditionalBalance } from './IAdditionalBalance';
9
10
 
@@ -23,6 +24,7 @@ export interface IBalanceSheet {
23
24
  bankCollectingState?: number;
24
25
  idExercice?: number;
25
26
  idCalendarEvent?: number;
27
+ idCard?: number;
26
28
  createdAt?: Date;
27
29
  updatedAt?: Date;
28
30
 
@@ -33,6 +35,7 @@ export interface IBalanceSheet {
33
35
  prestations?: IPrestation[];
34
36
  gedFiles?: IGedFile[];
35
37
  file?: IFile;
38
+ card?: ICard;
36
39
  balanceSheetHistories?: IBalanceSheetHistory[];
37
40
  additionalBalance?: IAdditionalBalance;
38
41
  }
@@ -6,6 +6,7 @@ import { ICalendarEvent } from './ICalendarEvent';
6
6
  import { ICustomerVat } from './ICustomerVat';
7
7
  import { ICardHistory } from './ICardHistory';
8
8
  import { IComment } from './IComment';
9
+ import { ITeam } from './ITeam';
9
10
  import { IChecklist } from './IChecklist';
10
11
  import { ICustomerIsRegime } from './ICustomerIsRegime';
11
12
  import { IExercice } from './IExercice';
@@ -14,8 +15,12 @@ export interface ICard {
14
15
  id?: number;
15
16
  type: CardType;
16
17
  state: CardState;
18
+ isManual: boolean;
19
+ isBlocked: boolean;
17
20
  priority?: number | null;
21
+ plannedAt?: Date | null;
18
22
  idUser?: number | null;
23
+ idTeam?: number | null;
19
24
  idSociety: number;
20
25
  idBalanceSheet?: number | null;
21
26
  idCustomerVat?: number | null;
@@ -28,13 +33,28 @@ export interface ICard {
28
33
 
29
34
  // Associations
30
35
  user?: IUser;
36
+ team?: ITeam;
31
37
  society?: ISociety;
32
38
  balancesheet?: IBalanceSheet;
33
39
  vat?: ICustomerVat;
34
40
  customerIsRegime?: ICustomerIsRegime;
35
41
  checklist?: IChecklist;
36
42
  exercice?: IExercice;
43
+ /**
44
+ * @deprecated old relationship with balance sheet
45
+ */
46
+ balanceSheet?: IBalanceSheet;
47
+ /**
48
+ * @deprecated old relationship with customer vat
49
+ */
50
+ customerVat?: ICustomerVat;
37
51
  events?: ICalendarEvent[];
38
52
  history?: ICardHistory[];
39
53
  comment?: IComment;
40
54
  }
55
+
56
+ export interface CardAnnotedTransaction {
57
+ total: number;
58
+ nbAnnoted: number;
59
+ rate: number;
60
+ }
@@ -1,12 +1,15 @@
1
1
  import { CardState } from '../../Enum/Card';
2
2
  import { IUser } from './IUser';
3
3
  import { ICard } from './ICard';
4
+ import { ITeam } from './ITeam';
4
5
 
5
6
  export interface ICardHistory {
6
7
  id?: number;
7
8
  state: CardState;
9
+ plannedAt: Date;
8
10
  idUserWhoChanged: number;
9
11
  idUserOrigin?: number;
12
+ idTeamOrigin?: number;
10
13
  idCard: number;
11
14
  createdAt?: Date;
12
15
  updatedAt?: Date;
@@ -14,5 +17,6 @@ export interface ICardHistory {
14
17
  // Associations
15
18
  userWhoChanged?: Partial<IUser>;
16
19
  userOrigin?: Partial<IUser>;
20
+ teamOrigin?: Partial<ITeam>;
17
21
  card?: ICard;
18
22
  }
@@ -21,6 +21,7 @@ export interface ICustomerVat {
21
21
  acceptation: boolean | null;
22
22
  acceptationDate: Date | null;
23
23
  idMail: number | null;
24
+ idCard: number | null;
24
25
  idVatDeclaration?: number | null; // Obsolète
25
26
  createdAt?: Date | null;
26
27
  updatedAt?: Date | null;
package/ts/types/index.ts CHANGED
@@ -1074,7 +1074,9 @@ export * from './Interface/api/vatControl/QueryVatControl';
1074
1074
  export * from './Interface/api/terminationList/QueryPaginateTerminationList';
1075
1075
  export * from './Interface/api/card/QueryUserCards';
1076
1076
  export * from './Interface/api/card/QueryUserCardsStats';
1077
+ export * from './Interface/api/card/Query';
1077
1078
  export * from './Interface/api/card/UpdateCard';
1079
+ export * from './Interface/api/card/ModifyPlanning';
1078
1080
  export * from './Interface/api/notion/NotionResponse';
1079
1081
  export * from './Interface/api/IntermediateManagementRebate';
1080
1082
  export * from './Interface/api/equipment/Query';
@@ -1128,6 +1130,9 @@ export * from './Interface/api/previsionalForm/CreatePrevisionalForm';
1128
1130
  export * from './Interface/api/toDoExpress/Query';
1129
1131
  export * from './Interface/api/toDoExpress/Read';
1130
1132
  export * from './Interface/api/config/ConfigType';
1133
+ export * from './Interface/api/card/ModifyBalanceSheet';
1134
+ export * from './Interface/api/card/ModifyAcceptation';
1135
+ export * from './Interface/api/card/ModifyCustomerVat';
1131
1136
  export * from './Interface/api/card/Cron';
1132
1137
  export * from './Interface/api/user/RegisterProspect';
1133
1138
  export * from './Interface/api/user/RegisterWebhook';