@silexpert/core 0.4.132 → 0.4.134
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/Revision.d.ts +3 -1
- package/es/api/resources/Revision.d.ts.map +1 -1
- package/es/api/resources/Revision.js +7 -1
- package/es/api/resources/Revision.js.map +1 -1
- package/es/api/resources/Vehicle.d.ts +1 -0
- package/es/api/resources/Vehicle.d.ts.map +1 -1
- package/es/api/resources/Vehicle.js +3 -0
- package/es/api/resources/Vehicle.js.map +1 -1
- package/es/types/Enum/BalanceSheet.d.ts +3 -0
- package/es/types/Enum/BalanceSheet.d.ts.map +1 -1
- package/es/types/Enum/BalanceSheet.js +6 -0
- package/es/types/Enum/BalanceSheet.js.map +1 -1
- package/es/types/Enum/Util.d.ts +5 -0
- package/es/types/Enum/Util.d.ts.map +1 -1
- package/es/types/Enum/Util.js +6 -0
- package/es/types/Enum/Util.js.map +1 -1
- package/es/types/Interface/api/revision/QueryRevisionAccount.d.ts +12 -0
- package/es/types/Interface/api/revision/QueryRevisionAccount.d.ts.map +1 -0
- package/es/types/Interface/api/revision/QueryRevisionAccount.js +58 -0
- package/es/types/Interface/api/revision/QueryRevisionAccount.js.map +1 -0
- package/es/types/Interface/api/revision/ReadRevisionAccount.d.ts +41 -0
- package/es/types/Interface/api/revision/ReadRevisionAccount.d.ts.map +1 -0
- package/es/types/Interface/api/revision/ReadRevisionAccount.js +2 -0
- package/es/types/Interface/api/revision/ReadRevisionAccount.js.map +1 -0
- package/es/types/Interface/api/revision/ReadRevisionTransactionDetail.d.ts +53 -0
- package/es/types/Interface/api/revision/ReadRevisionTransactionDetail.d.ts.map +1 -0
- package/es/types/Interface/api/revision/ReadRevisionTransactionDetail.js +2 -0
- package/es/types/Interface/api/revision/ReadRevisionTransactionDetail.js.map +1 -0
- package/es/types/Interface/api/society/UpdateSociety.d.ts +0 -1
- package/es/types/Interface/api/society/UpdateSociety.d.ts.map +1 -1
- package/es/types/Interface/api/society/UpdateSociety.js +0 -9
- package/es/types/Interface/api/society/UpdateSociety.js.map +1 -1
- package/es/types/index.d.ts +3 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +3 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/brands.d.ts +2 -1
- package/es/utils/brands.d.ts.map +1 -1
- package/es/utils/brands.js +9 -8
- package/es/utils/brands.js.map +1 -1
- package/js/api/resources/Revision.js +11 -1
- package/js/api/resources/Revision.js.map +1 -1
- package/js/api/resources/Vehicle.js +4 -0
- package/js/api/resources/Vehicle.js.map +1 -1
- package/js/types/Enum/BalanceSheet.js +10 -0
- package/js/types/Enum/BalanceSheet.js.map +1 -1
- package/js/types/Enum/Util.js +8 -0
- package/js/types/Enum/Util.js.map +1 -1
- package/js/types/Interface/api/revision/QueryRevisionAccount.js +53 -0
- package/js/types/Interface/api/revision/QueryRevisionAccount.js.map +1 -0
- package/js/types/Interface/api/revision/ReadRevisionAccount.js +6 -0
- package/js/types/Interface/api/revision/ReadRevisionAccount.js.map +1 -0
- package/js/types/Interface/api/revision/ReadRevisionTransactionDetail.js +6 -0
- package/js/types/Interface/api/revision/ReadRevisionTransactionDetail.js.map +1 -0
- package/js/types/Interface/api/society/UpdateSociety.js +0 -6
- package/js/types/Interface/api/society/UpdateSociety.js.map +1 -1
- package/js/types/index.js +36 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/brands.js +10 -8
- package/js/utils/brands.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Revision.ts +13 -2
- package/ts/api/resources/Vehicle.ts +4 -0
- package/ts/types/Enum/BalanceSheet.ts +8 -0
- package/ts/types/Enum/Util.ts +5 -0
- package/ts/types/Interface/api/revision/QueryRevisionAccount.ts +42 -0
- package/ts/types/Interface/api/revision/ReadRevisionAccount.ts +40 -0
- package/ts/types/Interface/api/revision/ReadRevisionTransactionDetail.ts +55 -0
- package/ts/types/Interface/api/society/UpdateSociety.ts +0 -9
- package/ts/types/index.ts +3 -0
- package/ts/utils/brands.ts +10 -8
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { IFile } from '../../..';
|
|
2
|
+
|
|
3
|
+
export interface ReadRevisionTransactionDetail {
|
|
4
|
+
id: number;
|
|
5
|
+
label: string | null;
|
|
6
|
+
reference: string | null;
|
|
7
|
+
dateValue: Date;
|
|
8
|
+
dateLocked: Date | null;
|
|
9
|
+
dateVerified: Date | null;
|
|
10
|
+
originalValue: number | null;
|
|
11
|
+
idUser: number | null;
|
|
12
|
+
isBlocked: boolean;
|
|
13
|
+
isMerged: boolean;
|
|
14
|
+
isAsset: boolean;
|
|
15
|
+
exported: Date | null;
|
|
16
|
+
kilometers: number | null;
|
|
17
|
+
internComment: string | null;
|
|
18
|
+
invoiceRequested: boolean;
|
|
19
|
+
idBankAccount: number | null;
|
|
20
|
+
idSociety: number;
|
|
21
|
+
idCurrency?: number | null;
|
|
22
|
+
idSocietyVehicle: number | null;
|
|
23
|
+
idSocietyPartner: number | null;
|
|
24
|
+
idRule: number | null;
|
|
25
|
+
idAccountingJournal: number;
|
|
26
|
+
idEstimateInvoice: number | null;
|
|
27
|
+
idEAF: number | null;
|
|
28
|
+
file: IFile[] | null;
|
|
29
|
+
accountingEntries: RevisionAccountingEntries[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface RevisionAccountingEntries {
|
|
33
|
+
id: number;
|
|
34
|
+
master: boolean;
|
|
35
|
+
dateValue: Date;
|
|
36
|
+
designation: string;
|
|
37
|
+
comment: string | null;
|
|
38
|
+
debit: number;
|
|
39
|
+
credit: number;
|
|
40
|
+
isPerso: boolean;
|
|
41
|
+
idInherit: number | null;
|
|
42
|
+
idAccount: number | null;
|
|
43
|
+
idThirdParty: number | null;
|
|
44
|
+
idVat: number | null;
|
|
45
|
+
idImmobilization?: number | null;
|
|
46
|
+
account: RevisionAccount;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface RevisionAccount {
|
|
50
|
+
id: number;
|
|
51
|
+
number: number;
|
|
52
|
+
name: string;
|
|
53
|
+
idParentAccount: number | null;
|
|
54
|
+
idVat: number | null;
|
|
55
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { IsBoolean, IsOptional } from 'class-validator';
|
|
2
1
|
import { ApiPropertyOptional } from '../../../../utils';
|
|
3
2
|
import { ISociety } from '../../models/ISociety';
|
|
4
|
-
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
5
3
|
|
|
6
4
|
export class UpdateSociety {
|
|
7
5
|
@ApiPropertyOptional()
|
|
@@ -48,14 +46,7 @@ export class UpdateSociety {
|
|
|
48
46
|
|
|
49
47
|
@ApiPropertyOptional()
|
|
50
48
|
socialCapital?: string;
|
|
51
|
-
|
|
52
|
-
@ApiPropertyOptional()
|
|
53
|
-
@IsBoolean()
|
|
54
|
-
@ToBoolean()
|
|
55
|
-
@IsOptional()
|
|
56
|
-
showPopUpVehicleInformation?: boolean;
|
|
57
49
|
}
|
|
58
|
-
|
|
59
50
|
export class UpdateSocietyPayload {
|
|
60
51
|
@ApiPropertyOptional()
|
|
61
52
|
society: Partial<ISociety>;
|
package/ts/types/index.ts
CHANGED
|
@@ -481,6 +481,9 @@ export * from './Interface/api/revision/QueryRevision';
|
|
|
481
481
|
export * from './Interface/api/revision/ReadRevision';
|
|
482
482
|
export * from './Interface/api/revision/RevisionObject';
|
|
483
483
|
export * from './Interface/api/revision/Revision';
|
|
484
|
+
export * from './Interface/api/revision/QueryRevisionAccount';
|
|
485
|
+
export * from './Interface/api/revision/ReadRevisionAccount';
|
|
486
|
+
export * from './Interface/api/revision/ReadRevisionTransactionDetail';
|
|
484
487
|
|
|
485
488
|
// export * from './Interface/api/survey/QuerySurvey';
|
|
486
489
|
export * from './Interface/api/survey/ReadSurvey';
|
package/ts/utils/brands.ts
CHANGED
|
@@ -11,21 +11,22 @@ type brand = {
|
|
|
11
11
|
type getBrandConfigParams = {
|
|
12
12
|
idTypeBrand?: number,
|
|
13
13
|
objectWaited?: string,
|
|
14
|
+
nodeEnv?: string
|
|
14
15
|
};
|
|
15
16
|
|
|
16
|
-
const getBrandNameByNodeEnv = (): 'Legalstart'| 'Comptalib' | 'Clementine' => {
|
|
17
|
-
if (
|
|
18
|
-
if (
|
|
17
|
+
const getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart'| 'Comptalib' | 'Clementine' => {
|
|
18
|
+
if (nodeEnv) {
|
|
19
|
+
if (nodeEnv.indexOf('legalstart') > -1 || nodeEnv.indexOf('Legalstart') > -1) {
|
|
19
20
|
return 'Legalstart';
|
|
20
21
|
}
|
|
21
|
-
if (
|
|
22
|
+
if (nodeEnv.indexOf('comptalib') > -1 || nodeEnv.indexOf('Comptalib') > -1) {
|
|
22
23
|
return 'Comptalib';
|
|
23
24
|
}
|
|
24
25
|
} else if (process.env.API_HOST) {
|
|
25
|
-
if (process.env.API_HOST.indexOf('legalstart') > -1) {
|
|
26
|
+
if (process.env.API_HOST.indexOf('legalstart') > -1 || process.env.API_HOST.indexOf('Legalstart') > -1) {
|
|
26
27
|
return 'Legalstart';
|
|
27
28
|
}
|
|
28
|
-
if (process.env.API_HOST.indexOf('comptalib') > -1) {
|
|
29
|
+
if (process.env.API_HOST.indexOf('comptalib') > -1 || process.env.API_HOST.indexOf('Comptalib') > -1) {
|
|
29
30
|
return 'Comptalib';
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -34,10 +35,11 @@ const getBrandNameByNodeEnv = (): 'Legalstart'| 'Comptalib' | 'Clementine' => {
|
|
|
34
35
|
|
|
35
36
|
const getBrandConfig = (params: getBrandConfigParams): brand => {
|
|
36
37
|
const {
|
|
37
|
-
idTypeBrand = null, objectWaited = null,
|
|
38
|
+
idTypeBrand = null, objectWaited = null, nodeEnv,
|
|
38
39
|
} = params;
|
|
39
40
|
let brand;
|
|
40
|
-
const
|
|
41
|
+
const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;
|
|
42
|
+
const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);
|
|
41
43
|
const listEnvEnum = { BrandClementine, BrandLegalstart, BrandComptalib };
|
|
42
44
|
// @ts-ignore
|
|
43
45
|
const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];
|