@silexpert/core 1.1.152 → 1.1.153

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 (116) hide show
  1. package/dist/cjs/api/resources/KilometricAllowance.d.ts +2 -1
  2. package/dist/cjs/api/resources/KilometricAllowance.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/KilometricAllowance.js +3 -0
  4. package/dist/cjs/api/resources/KilometricAllowance.js.map +1 -1
  5. package/dist/cjs/api/resources/SalesContract.d.ts +6 -5
  6. package/dist/cjs/api/resources/SalesContract.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/SalesContract.js +32 -16
  8. package/dist/cjs/api/resources/SalesContract.js.map +1 -1
  9. package/dist/cjs/api/resources/ThirdParty.d.ts +1 -0
  10. package/dist/cjs/api/resources/ThirdParty.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/ThirdParty.js +4 -0
  12. package/dist/cjs/api/resources/ThirdParty.js.map +1 -1
  13. package/dist/cjs/types/Enum/BrandClementine.d.ts +2 -18
  14. package/dist/cjs/types/Enum/BrandClementine.d.ts.map +1 -1
  15. package/dist/cjs/types/Enum/BrandClementine.js +78 -91
  16. package/dist/cjs/types/Enum/BrandClementine.js.map +1 -1
  17. package/dist/cjs/types/Enum/BrandPourcentage.d.ts +122 -0
  18. package/dist/cjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
  19. package/dist/cjs/types/Enum/BrandPourcentage.js +161 -0
  20. package/dist/cjs/types/Enum/BrandPourcentage.js.map +1 -1
  21. package/dist/cjs/types/Enum/Ged.d.ts +3 -1
  22. package/dist/cjs/types/Enum/Ged.d.ts.map +1 -1
  23. package/dist/cjs/types/Enum/Ged.js +4 -0
  24. package/dist/cjs/types/Enum/Ged.js.map +1 -1
  25. package/dist/cjs/types/Enum/PrestationType.d.ts +4 -1
  26. package/dist/cjs/types/Enum/PrestationType.d.ts.map +1 -1
  27. package/dist/cjs/types/Enum/PrestationType.js +54 -0
  28. package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
  29. package/dist/cjs/types/Enum/SalesContractConfig.d.ts +13 -4
  30. package/dist/cjs/types/Enum/SalesContractConfig.d.ts.map +1 -1
  31. package/dist/cjs/types/Enum/SalesContractConfig.js +64 -0
  32. package/dist/cjs/types/Enum/SalesContractConfig.js.map +1 -1
  33. package/dist/cjs/types/Interface/api/cashAndExpense/Query.d.ts +7 -0
  34. package/dist/cjs/types/Interface/api/cashAndExpense/Query.d.ts.map +1 -0
  35. package/dist/cjs/types/Interface/api/cashAndExpense/Query.js +42 -0
  36. package/dist/cjs/types/Interface/api/cashAndExpense/Query.js.map +1 -0
  37. package/dist/cjs/types/Interface/api/salesContract/SendSalesContractParams.d.ts +6 -0
  38. package/dist/cjs/types/Interface/api/salesContract/SendSalesContractParams.d.ts.map +1 -1
  39. package/dist/cjs/types/Interface/api/salesContract/SendSalesContractParams.js +23 -1
  40. package/dist/cjs/types/Interface/api/salesContract/SendSalesContractParams.js.map +1 -1
  41. package/dist/cjs/types/Interface/models/IAccountingTransaction.d.ts +2 -0
  42. package/dist/cjs/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  43. package/dist/cjs/types/Interface/models/IAccountingTransaction.js.map +1 -1
  44. package/dist/cjs/types/index.d.ts +1 -0
  45. package/dist/cjs/types/index.d.ts.map +1 -1
  46. package/dist/cjs/types/index.js +1 -0
  47. package/dist/cjs/types/index.js.map +1 -1
  48. package/dist/cjs/utils/brands.d.ts +3 -2
  49. package/dist/cjs/utils/brands.d.ts.map +1 -1
  50. package/dist/cjs/utils/brands.js +15 -4
  51. package/dist/cjs/utils/brands.js.map +1 -1
  52. package/dist/mjs/api/resources/KilometricAllowance.d.ts +2 -1
  53. package/dist/mjs/api/resources/KilometricAllowance.d.ts.map +1 -1
  54. package/dist/mjs/api/resources/KilometricAllowance.js +6 -0
  55. package/dist/mjs/api/resources/KilometricAllowance.js.map +1 -1
  56. package/dist/mjs/api/resources/SalesContract.d.ts +6 -5
  57. package/dist/mjs/api/resources/SalesContract.d.ts.map +1 -1
  58. package/dist/mjs/api/resources/SalesContract.js +32 -15
  59. package/dist/mjs/api/resources/SalesContract.js.map +1 -1
  60. package/dist/mjs/api/resources/ThirdParty.d.ts +1 -0
  61. package/dist/mjs/api/resources/ThirdParty.d.ts.map +1 -1
  62. package/dist/mjs/api/resources/ThirdParty.js +4 -0
  63. package/dist/mjs/api/resources/ThirdParty.js.map +1 -1
  64. package/dist/mjs/types/Enum/BrandClementine.d.ts +2 -18
  65. package/dist/mjs/types/Enum/BrandClementine.d.ts.map +1 -1
  66. package/dist/mjs/types/Enum/BrandClementine.js +78 -91
  67. package/dist/mjs/types/Enum/BrandClementine.js.map +1 -1
  68. package/dist/mjs/types/Enum/BrandPourcentage.d.ts +122 -0
  69. package/dist/mjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
  70. package/dist/mjs/types/Enum/BrandPourcentage.js +161 -0
  71. package/dist/mjs/types/Enum/BrandPourcentage.js.map +1 -1
  72. package/dist/mjs/types/Enum/Ged.d.ts +3 -1
  73. package/dist/mjs/types/Enum/Ged.d.ts.map +1 -1
  74. package/dist/mjs/types/Enum/Ged.js +4 -0
  75. package/dist/mjs/types/Enum/Ged.js.map +1 -1
  76. package/dist/mjs/types/Enum/PrestationType.d.ts +4 -1
  77. package/dist/mjs/types/Enum/PrestationType.d.ts.map +1 -1
  78. package/dist/mjs/types/Enum/PrestationType.js +54 -0
  79. package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
  80. package/dist/mjs/types/Enum/SalesContractConfig.d.ts +13 -4
  81. package/dist/mjs/types/Enum/SalesContractConfig.d.ts.map +1 -1
  82. package/dist/mjs/types/Enum/SalesContractConfig.js +68 -1
  83. package/dist/mjs/types/Enum/SalesContractConfig.js.map +1 -1
  84. package/dist/mjs/types/Interface/api/cashAndExpense/Query.d.ts +7 -0
  85. package/dist/mjs/types/Interface/api/cashAndExpense/Query.d.ts.map +1 -0
  86. package/dist/mjs/types/Interface/api/cashAndExpense/Query.js +42 -0
  87. package/dist/mjs/types/Interface/api/cashAndExpense/Query.js.map +1 -0
  88. package/dist/mjs/types/Interface/api/salesContract/SendSalesContractParams.d.ts +6 -0
  89. package/dist/mjs/types/Interface/api/salesContract/SendSalesContractParams.d.ts.map +1 -1
  90. package/dist/mjs/types/Interface/api/salesContract/SendSalesContractParams.js +25 -0
  91. package/dist/mjs/types/Interface/api/salesContract/SendSalesContractParams.js.map +1 -1
  92. package/dist/mjs/types/Interface/models/IAccountingTransaction.d.ts +2 -0
  93. package/dist/mjs/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  94. package/dist/mjs/types/Interface/models/IAccountingTransaction.js.map +1 -1
  95. package/dist/mjs/types/index.d.ts +1 -0
  96. package/dist/mjs/types/index.d.ts.map +1 -1
  97. package/dist/mjs/types/index.js +1 -0
  98. package/dist/mjs/types/index.js.map +1 -1
  99. package/dist/mjs/utils/brands.d.ts +3 -2
  100. package/dist/mjs/utils/brands.d.ts.map +1 -1
  101. package/dist/mjs/utils/brands.js +14 -4
  102. package/dist/mjs/utils/brands.js.map +1 -1
  103. package/package.json +1 -1
  104. package/ts/api/resources/KilometricAllowance.ts +8 -1
  105. package/ts/api/resources/SalesContract.ts +33 -17
  106. package/ts/api/resources/ThirdParty.ts +5 -0
  107. package/ts/types/Enum/BrandClementine.ts +78 -91
  108. package/ts/types/Enum/BrandPourcentage.ts +161 -0
  109. package/ts/types/Enum/Ged.ts +4 -0
  110. package/ts/types/Enum/PrestationType.ts +54 -0
  111. package/ts/types/Enum/SalesContractConfig.ts +41 -6
  112. package/ts/types/Interface/api/cashAndExpense/Query.ts +24 -0
  113. package/ts/types/Interface/api/salesContract/SendSalesContractParams.ts +17 -0
  114. package/ts/types/Interface/models/IAccountingTransaction.ts +2 -0
  115. package/ts/types/index.ts +1 -0
  116. package/ts/utils/brands.ts +16 -4
@@ -1,3 +1,5 @@
1
+ import { IsNumber, IsOptional, IsString } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../utils';
1
3
  import { PrestationType } from './PrestationType';
2
4
 
3
5
  // Config in the Brand enum
@@ -26,12 +28,45 @@ export type SalesContractConfig = {
26
28
  };
27
29
 
28
30
  // List of version for a config
29
- export type SalesContractConfigVersion = {
31
+ export class SalesContractConfigVersion {
30
32
  versionId: string;
31
33
  name: string;
32
- };
34
+ }
33
35
 
34
- export type ParamsPreviewContract = {
35
- idPrestationList: number;
36
- versionId?: string;
37
- };
36
+ export class ParamsPreviewContract {
37
+ @ApiProperty()
38
+ idPrestationList: number;
39
+
40
+ @ApiPropertyOptional()
41
+ @IsOptional()
42
+ @IsString()
43
+ versionId?: string;
44
+
45
+ @ApiPropertyOptional()
46
+ @IsOptional()
47
+ @IsNumber()
48
+ idTypeBrand?: number;
49
+ }
50
+
51
+ export class ParamsGetConfig {
52
+ @ApiPropertyOptional()
53
+ @IsOptional()
54
+ @IsString()
55
+ versionId?: string;
56
+
57
+ @ApiPropertyOptional()
58
+ @IsOptional()
59
+ @IsNumber()
60
+ idTypeBrand?: number;
61
+ }
62
+
63
+ export class ParamsBackgroundUpload {
64
+ @ApiProperty()
65
+ @IsString()
66
+ blocName: string;
67
+
68
+ @ApiPropertyOptional()
69
+ @IsOptional()
70
+ @IsNumber()
71
+ idTypeBrand?: number;
72
+ }
@@ -0,0 +1,24 @@
1
+ import { IsBoolean, IsDateString, IsOptional, IsString } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+
5
+ export class QueryKilometricAllowance {
6
+ @ApiProperty()
7
+ @IsDateString()
8
+ startDate: string;
9
+
10
+ @ApiProperty()
11
+ @IsDateString()
12
+ endDate: string;
13
+
14
+ @ApiPropertyOptional()
15
+ @IsOptional()
16
+ @IsString()
17
+ orderBy?: string;
18
+
19
+ @ApiPropertyOptional()
20
+ @IsBoolean()
21
+ @ToBoolean()
22
+ @IsOptional()
23
+ isDescending?: boolean;
24
+ }
@@ -17,3 +17,20 @@ export class SendSalesContractParams {
17
17
  @ApiPropertyOptional()
18
18
  files?: File[];
19
19
  }
20
+
21
+ export class SendMandateParams {
22
+ @ApiProperty()
23
+ @IsInt()
24
+ idSociety: number;
25
+
26
+ @ApiProperty()
27
+ @IsString()
28
+ startText: string;
29
+
30
+ @ApiProperty()
31
+ @IsString()
32
+ endText: string;
33
+
34
+ @ApiPropertyOptional()
35
+ files?: File[];
36
+ }
@@ -12,6 +12,7 @@ import { IPartnerTransaction } from './IPartnerTransaction';
12
12
  import { ICurrency } from './ICurrency';
13
13
  import { IMachineLearningResult } from './IMachineLearningResult';
14
14
  import { ISocietyPartner } from './ISocietyPartner';
15
+ import { ISocietyVehicle } from './ISocietyVehicle';
15
16
 
16
17
  // accountingTransactions
17
18
  export interface IAccountingTransaction {
@@ -76,4 +77,5 @@ export interface IAccountingTransaction {
76
77
  childs?: IAccountingTransaction[];
77
78
  machineLearningResults?: IMachineLearningResult[];
78
79
  societyPartner?: ISocietyPartner;
80
+ vehicle?: ISocietyVehicle | null;
79
81
  }
package/ts/types/index.ts CHANGED
@@ -495,6 +495,7 @@ export * from './Enum/VatControl';
495
495
  export * from './Enum/Cycle';
496
496
 
497
497
  // Interfaces API
498
+ export * from './Interface/api/cashAndExpense/Query';
498
499
  export * from './Interface/api/cerfa/das2';
499
500
  export * from './Interface/api/adjustment/Query';
500
501
  export * from './Interface/api/adjustment/Read';
@@ -31,7 +31,7 @@ type brand = {
31
31
  },
32
32
  };
33
33
 
34
- const allBrands = ['Legalstart', 'Comptalib', 'Clementine', 'Pourcentage', 'Clems', 'StatutsExpress'] as const;
34
+ const allBrands = ['Legalstart', 'Comptalib', 'Clementine', 'Pourcentage', 'Klems', 'StatutsExpress'] as const;
35
35
  type BrandList = typeof allBrands[number];
36
36
 
37
37
  type getBrandConfigParams = {
@@ -52,8 +52,8 @@ const getBrandNameByNodeEnv = (nodeEnv?: string): BrandList => {
52
52
  if (env.indexOf('pourcentage') > -1 || env.indexOf('Pourcentage') > -1) {
53
53
  return 'Pourcentage';
54
54
  }
55
- if (env.indexOf('clems') > -1 || env.indexOf('Clems') > -1) {
56
- return 'Clems';
55
+ if (env.indexOf('klems') > -1 || env.indexOf('Klems') > -1) {
56
+ return 'Klems';
57
57
  }
58
58
  if (env.indexOf('statuts') > -1 || env.indexOf('Statuts') > -1) {
59
59
  return 'StatutsExpress';
@@ -130,6 +130,18 @@ const getBrandByEmail = (email: string): 'Legalstart' | 'Comptalib' | 'Clementin
130
130
  return null;
131
131
  };
132
132
 
133
+ const getSubBrandList = (nodeEnv?: string): Array<object> => {
134
+ const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;
135
+ const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);
136
+ const listEnvEnum = {
137
+ BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems, BrandStatutsExpress,
138
+ };
139
+ // @ts-ignore
140
+ const currentConfigFile: brand[] = listEnvEnum[`Brand${currentEnvName}`];
141
+
142
+ return currentConfigFile;
143
+ };
144
+
133
145
  export {
134
- getBrandConfig, isItThisEnv, getAllBrandByNodeEnv, getBrandNameByNodeEnv, getBrandByEmail,
146
+ getBrandConfig, isItThisEnv, getAllBrandByNodeEnv, getBrandNameByNodeEnv, getBrandByEmail, getSubBrandList,
135
147
  };