@silexpert/core 0.4.96 → 0.4.98
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.
- package/es/api/resources/PartneredAccountant.d.ts +2 -1
- package/es/api/resources/PartneredAccountant.d.ts.map +1 -1
- package/es/api/resources/PartneredAccountant.js +3 -0
- package/es/api/resources/PartneredAccountant.js.map +1 -1
- package/es/api/resources/Tax.d.ts +7 -0
- package/es/api/resources/Tax.d.ts.map +1 -0
- package/es/api/resources/Tax.js +10 -0
- package/es/api/resources/Tax.js.map +1 -0
- package/es/api/resources.d.ts +2 -0
- package/es/api/resources.d.ts.map +1 -1
- package/es/api/resources.js +2 -0
- package/es/api/resources.js.map +1 -1
- package/es/types/Enum/Log.d.ts +35 -0
- package/es/types/Enum/Log.d.ts.map +1 -0
- package/es/types/Enum/Log.js +38 -0
- package/es/types/Enum/Log.js.map +1 -0
- package/es/types/Enum/Tax.d.ts +31 -0
- package/es/types/Enum/Tax.d.ts.map +1 -0
- package/es/types/Enum/Tax.js +34 -0
- package/es/types/Enum/Tax.js.map +1 -0
- package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts +1 -1
- package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -1
- package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +1 -1
- package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
- package/es/types/Interface/api/fecFile/CreateFecFile.d.ts +1 -0
- package/es/types/Interface/api/fecFile/CreateFecFile.d.ts.map +1 -1
- package/es/types/Interface/api/fecFile/CreateFecFile.js +10 -1
- package/es/types/Interface/api/fecFile/CreateFecFile.js.map +1 -1
- package/es/types/Interface/api/log/CreateLog.d.ts +14 -0
- package/es/types/Interface/api/log/CreateLog.d.ts.map +1 -0
- package/es/types/Interface/api/log/CreateLog.js +2 -0
- package/es/types/Interface/api/log/CreateLog.js.map +1 -0
- package/es/types/Interface/api/partneredAccountant/InvitePartneredAccountant.d.ts +4 -0
- package/es/types/Interface/api/partneredAccountant/InvitePartneredAccountant.d.ts.map +1 -0
- package/es/types/Interface/api/partneredAccountant/InvitePartneredAccountant.js +19 -0
- package/es/types/Interface/api/partneredAccountant/InvitePartneredAccountant.js.map +1 -0
- package/es/types/Interface/api/partneredAccountant/ReadPartneredAccountant.d.ts +1 -0
- package/es/types/Interface/api/partneredAccountant/ReadPartneredAccountant.d.ts.map +1 -1
- package/es/types/Interface/api/partneredAccountant/ReadPartneredAccountant.js.map +1 -1
- package/es/types/Interface/api/partneredAccountant/ReadPartneredAccountantService.d.ts +2 -0
- package/es/types/Interface/api/partneredAccountant/ReadPartneredAccountantService.d.ts.map +1 -1
- package/es/types/Interface/api/partneredAccountant/ReadPartneredAccountantService.js.map +1 -1
- package/es/types/Interface/api/partneredAccountant/UpdatePartneredAccountantAccess.js +2 -2
- package/es/types/Interface/api/partneredAccountant/UpdatePartneredAccountantAccess.js.map +1 -1
- package/es/types/Interface/api/tax/CreateTax.d.ts +12 -0
- package/es/types/Interface/api/tax/CreateTax.d.ts.map +1 -0
- package/es/types/Interface/api/tax/CreateTax.js +52 -0
- package/es/types/Interface/api/tax/CreateTax.js.map +1 -0
- package/es/types/Interface/api/tax/ReadTax.d.ts +20 -0
- package/es/types/Interface/api/tax/ReadTax.d.ts.map +1 -0
- package/es/types/Interface/api/tax/ReadTax.js +2 -0
- package/es/types/Interface/api/tax/ReadTax.js.map +1 -0
- package/es/types/Interface/models/ICustomerIsRegime.d.ts +5 -4
- package/es/types/Interface/models/ICustomerIsRegime.d.ts.map +1 -1
- package/es/types/Interface/models/ICustomerIsRegime.js.map +1 -1
- package/es/types/Interface/models/IPartneredAccountantService.d.ts +3 -0
- package/es/types/Interface/models/IPartneredAccountantService.d.ts.map +1 -1
- package/es/types/Interface/models/IPartneredAccountantService.js.map +1 -1
- package/es/types/Interface/models/IPartneredAccountantServiceIcon.d.ts +10 -0
- package/es/types/Interface/models/IPartneredAccountantServiceIcon.d.ts.map +1 -0
- package/es/types/Interface/models/IPartneredAccountantServiceIcon.js +2 -0
- package/es/types/Interface/models/IPartneredAccountantServiceIcon.js.map +1 -0
- package/es/types/index.d.ts +7 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +7 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/transforms/boolean.transform.d.ts +3 -0
- package/es/utils/transforms/boolean.transform.d.ts.map +1 -0
- package/es/utils/transforms/boolean.transform.js +30 -0
- package/es/utils/transforms/boolean.transform.js.map +1 -0
- package/js/api/resources/PartneredAccountant.js +4 -0
- package/js/api/resources/PartneredAccountant.js.map +1 -1
- package/js/api/resources/Tax.js +22 -0
- package/js/api/resources/Tax.js.map +1 -0
- package/js/api/resources.js +3 -0
- package/js/api/resources.js.map +1 -1
- package/js/types/Enum/Log.js +48 -0
- package/js/types/Enum/Log.js.map +1 -0
- package/js/types/Enum/Tax.js +44 -0
- package/js/types/Enum/Tax.js.map +1 -0
- package/js/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +1 -1
- package/js/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
- package/js/types/Interface/api/fecFile/CreateFecFile.js +6 -0
- package/js/types/Interface/api/fecFile/CreateFecFile.js.map +1 -1
- package/js/types/Interface/api/log/CreateLog.js +6 -0
- package/js/types/Interface/api/log/CreateLog.js.map +1 -0
- package/js/types/Interface/api/partneredAccountant/InvitePartneredAccountant.js +29 -0
- package/js/types/Interface/api/partneredAccountant/InvitePartneredAccountant.js.map +1 -0
- package/js/types/Interface/api/partneredAccountant/ReadPartneredAccountant.js.map +1 -1
- package/js/types/Interface/api/partneredAccountant/ReadPartneredAccountantService.js.map +1 -1
- package/js/types/Interface/api/partneredAccountant/UpdatePartneredAccountantAccess.js +3 -3
- package/js/types/Interface/api/partneredAccountant/UpdatePartneredAccountantAccess.js.map +1 -1
- package/js/types/Interface/api/tax/CreateTax.js +66 -0
- package/js/types/Interface/api/tax/CreateTax.js.map +1 -0
- package/js/types/Interface/api/tax/ReadTax.js +6 -0
- package/js/types/Interface/api/tax/ReadTax.js.map +1 -0
- package/js/types/Interface/models/IPartneredAccountantServiceIcon.js +6 -0
- package/js/types/Interface/models/IPartneredAccountantServiceIcon.js.map +1 -0
- package/js/types/index.js +84 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/transforms/boolean.transform.js +50 -0
- package/js/utils/transforms/boolean.transform.js.map +1 -0
- package/package.json +1 -1
- package/ts/api/resources/PartneredAccountant.ts +5 -1
- package/ts/api/resources/Tax.ts +13 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/Log.ts +36 -0
- package/ts/types/Enum/Tax.ts +32 -0
- package/ts/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.ts +1 -1
- package/ts/types/Interface/api/fecFile/CreateFecFile.ts +9 -1
- package/ts/types/Interface/api/log/CreateLog.ts +11 -0
- package/ts/types/Interface/api/partneredAccountant/InvitePartneredAccountant.ts +8 -0
- package/ts/types/Interface/api/partneredAccountant/ReadPartneredAccountant.ts +1 -0
- package/ts/types/Interface/api/partneredAccountant/ReadPartneredAccountantService.ts +3 -0
- package/ts/types/Interface/api/partneredAccountant/UpdatePartneredAccountantAccess.ts +2 -2
- package/ts/types/Interface/api/tax/CreateTax.ts +34 -0
- package/ts/types/Interface/api/tax/ReadTax.ts +22 -0
- package/ts/types/Interface/models/ICustomerIsRegime.ts +5 -4
- package/ts/types/Interface/models/IPartneredAccountantService.ts +3 -0
- package/ts/types/Interface/models/IPartneredAccountantServiceIcon.ts +13 -0
- package/ts/types/index.ts +7 -0
- package/ts/utils/transforms/boolean.transform.ts +38 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ICustomerIsRegime } from '../../models/ICustomerIsRegime';
|
|
2
|
+
|
|
3
|
+
export interface ReadAmountBase {
|
|
4
|
+
amount: number;
|
|
5
|
+
isFirstExercice: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface Tax extends TaxDate {
|
|
9
|
+
tax: ICustomerIsRegime | null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ReadTax {
|
|
13
|
+
amountBase: ReadAmountBase | null;
|
|
14
|
+
taxes: Tax[],
|
|
15
|
+
others: ICustomerIsRegime[]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface TaxDate {
|
|
19
|
+
date: string;
|
|
20
|
+
required: boolean;
|
|
21
|
+
isBalance: boolean;
|
|
22
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { IExercice } from './IExercice';
|
|
2
|
+
import { TaxState, TaxType } from '../..';
|
|
2
3
|
|
|
3
4
|
// customersIsRegimes
|
|
4
5
|
export interface ICustomerIsRegime {
|
|
5
6
|
id?: number;
|
|
6
7
|
amount: number;
|
|
7
|
-
stateAmount
|
|
8
|
-
state:
|
|
9
|
-
type:
|
|
8
|
+
stateAmount?: number; // Encore utilisé ?
|
|
9
|
+
state: TaxState;
|
|
10
|
+
type: TaxType;
|
|
10
11
|
balance: number | null;
|
|
11
12
|
creditRefunded: number;
|
|
12
13
|
solde: number;
|
|
@@ -17,5 +18,5 @@ export interface ICustomerIsRegime {
|
|
|
17
18
|
updatedAt?: Date | null;
|
|
18
19
|
|
|
19
20
|
// Associations
|
|
20
|
-
exercice
|
|
21
|
+
exercice?: IExercice;
|
|
21
22
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IPartneredAccountant } from './IPartneredAccountant';
|
|
2
|
+
import { IPartneredAccountantServiceIcon } from './IPartneredAccountantServiceIcon';
|
|
2
3
|
|
|
3
4
|
export interface IPartneredAccountantService {
|
|
4
5
|
id?: number;
|
|
@@ -6,6 +7,7 @@ export interface IPartneredAccountantService {
|
|
|
6
7
|
description?: string;
|
|
7
8
|
preTaxPrice: number;
|
|
8
9
|
idPartneredAccountant: number;
|
|
10
|
+
idIcon?: number;
|
|
9
11
|
|
|
10
12
|
createdAt?: Date;
|
|
11
13
|
updatedAt?: Date;
|
|
@@ -13,4 +15,5 @@ export interface IPartneredAccountantService {
|
|
|
13
15
|
|
|
14
16
|
// Associations
|
|
15
17
|
partneredAccountant?: IPartneredAccountant;
|
|
18
|
+
icon?: IPartneredAccountantServiceIcon;
|
|
16
19
|
}
|
package/ts/types/index.ts
CHANGED
|
@@ -124,6 +124,7 @@ export * from './Interface/models/IPartneredAccountant';
|
|
|
124
124
|
export * from './Interface/models/IPartneredAccountantCompanyService';
|
|
125
125
|
export * from './Interface/models/IPartneredAccountantPicture';
|
|
126
126
|
export * from './Interface/models/IPartneredAccountantService';
|
|
127
|
+
export * from './Interface/models/IPartneredAccountantServiceIcon';
|
|
127
128
|
export * from './Interface/models/IPartneredAccountantTag';
|
|
128
129
|
export * from './Interface/models/IPartneredAccountantToTag';
|
|
129
130
|
export * from './Interface/models/IPayPlan';
|
|
@@ -298,6 +299,8 @@ export * from './Form/FormAuthenticate';
|
|
|
298
299
|
export * from './Form/FormConnector';
|
|
299
300
|
|
|
300
301
|
// Enums
|
|
302
|
+
export * from './Enum/Tax';
|
|
303
|
+
export * from './Enum/Log';
|
|
301
304
|
export * from './Enum/Quality';
|
|
302
305
|
export * from './Enum/Role';
|
|
303
306
|
export * from './Enum/Simulation';
|
|
@@ -500,6 +503,8 @@ export * from './Interface/api/revisionGuide/CreateRevisionGuide';
|
|
|
500
503
|
export * from './Interface/api/library/QueryLibrary';
|
|
501
504
|
export * from './Interface/api/taxDeadline/QueryTaxDeadline';
|
|
502
505
|
export * from './Interface/api/taxDeadline/ReadTaxDeadline';
|
|
506
|
+
export * from './Interface/api/tax/ReadTax';
|
|
507
|
+
export * from './Interface/api/tax/CreateTax';
|
|
503
508
|
export * from './Interface/api/society/ReadSociety';
|
|
504
509
|
export * from './Interface/api/exerciceNote/QueryExerciceNote';
|
|
505
510
|
export * from './Interface/api/exerciceNote/CreateExerciceNote';
|
|
@@ -514,3 +519,5 @@ export * from './Interface/api/partneredAccountant/CreatePartneredAccountantRequ
|
|
|
514
519
|
export * from './Interface/api/partneredAccountant/UpdatePartneredAccountantSoldService';
|
|
515
520
|
export * from './Interface/api/partneredAccountant/ReadPartneredAccountantSoldServiceStatistics';
|
|
516
521
|
export * from './Interface/api/partneredAccountant/UpdatePartneredAccountantAccess';
|
|
522
|
+
export * from './Interface/api/partneredAccountant/InvitePartneredAccountant';
|
|
523
|
+
export * from './Interface/api/log/CreateLog';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Transform } from 'class-transformer';
|
|
2
|
+
|
|
3
|
+
const valueToBoolean = (value: any) => {
|
|
4
|
+
if (value === null || value === undefined) {
|
|
5
|
+
return undefined;
|
|
6
|
+
}
|
|
7
|
+
if (typeof value === 'boolean') {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
if (['true', 'on', 'yes', '1'].includes(value.toLowerCase())) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
if (['false', 'off', 'no', '0'].includes(value.toLowerCase())) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const ToBoolean = () => {
|
|
20
|
+
const toPlain = Transform(
|
|
21
|
+
({ value }) => value,
|
|
22
|
+
{
|
|
23
|
+
toPlainOnly: true,
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
const toClass = (target: any, key: string) => Transform(
|
|
27
|
+
({ obj }) => valueToBoolean(obj[key]),
|
|
28
|
+
{
|
|
29
|
+
toClassOnly: true,
|
|
30
|
+
},
|
|
31
|
+
)(target, key);
|
|
32
|
+
return function (target: any, key: string) {
|
|
33
|
+
toPlain(target, key);
|
|
34
|
+
toClass(target, key);
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { ToBoolean };
|