@silexpert/core 1.0.172 → 1.0.175
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/CommercialImport.d.ts +8 -0
- package/es/api/resources/CommercialImport.d.ts.map +1 -0
- package/es/api/resources/CommercialImport.js +21 -0
- package/es/api/resources/CommercialImport.js.map +1 -0
- package/es/api/resources/WorkingSchedule.d.ts +2 -1
- package/es/api/resources/WorkingSchedule.d.ts.map +1 -1
- package/es/api/resources/WorkingSchedule.js +3 -0
- package/es/api/resources/WorkingSchedule.js.map +1 -1
- package/es/api/resources/statistic/CustomerSuccess.d.ts +7 -0
- package/es/api/resources/statistic/CustomerSuccess.d.ts.map +1 -0
- package/es/api/resources/statistic/CustomerSuccess.js +7 -0
- package/es/api/resources/statistic/CustomerSuccess.js.map +1 -0
- package/es/api/resources.d.ts +4 -0
- package/es/api/resources.d.ts.map +1 -1
- package/es/api/resources.js +4 -0
- package/es/api/resources.js.map +1 -1
- package/es/types/Enum/CommercialImportHeader.d.ts +12 -0
- package/es/types/Enum/CommercialImportHeader.d.ts.map +1 -0
- package/es/types/Enum/CommercialImportHeader.js +102 -0
- package/es/types/Enum/CommercialImportHeader.js.map +1 -0
- package/es/types/Enum/Ged.d.ts +1 -0
- package/es/types/Enum/Ged.d.ts.map +1 -1
- package/es/types/Enum/Ged.js +1 -1
- package/es/types/Enum/Ged.js.map +1 -1
- package/es/types/Enum/PartnerTransactionType.d.ts +4 -0
- package/es/types/Enum/PartnerTransactionType.d.ts.map +1 -1
- package/es/types/Enum/PartnerTransactionType.js +26 -0
- package/es/types/Enum/PartnerTransactionType.js.map +1 -1
- package/es/types/Enum/StatisticType.d.ts +2 -1
- package/es/types/Enum/StatisticType.d.ts.map +1 -1
- package/es/types/Enum/StatisticType.js +1 -0
- package/es/types/Enum/StatisticType.js.map +1 -1
- package/es/types/Interface/api/commercialImport/Create.d.ts +8 -0
- package/es/types/Interface/api/commercialImport/Create.d.ts.map +1 -0
- package/es/types/Interface/api/commercialImport/Create.js +27 -0
- package/es/types/Interface/api/commercialImport/Create.js.map +1 -0
- package/es/types/Interface/api/commercialImport/Query.d.ts +12 -0
- package/es/types/Interface/api/commercialImport/Query.d.ts.map +1 -0
- package/es/types/Interface/api/commercialImport/Query.js +23 -0
- package/es/types/Interface/api/commercialImport/Query.js.map +1 -0
- package/es/types/Interface/api/commercialImport/Read.d.ts +40 -0
- package/es/types/Interface/api/commercialImport/Read.d.ts.map +1 -0
- package/es/types/Interface/api/commercialImport/Read.js +2 -0
- package/es/types/Interface/api/commercialImport/Read.js.map +1 -0
- package/es/types/Interface/api/statistic/QueryCustomerSuccess.d.ts +5 -0
- package/es/types/Interface/api/statistic/QueryCustomerSuccess.d.ts.map +1 -0
- package/es/types/Interface/api/statistic/QueryCustomerSuccess.js +26 -0
- package/es/types/Interface/api/statistic/QueryCustomerSuccess.js.map +1 -0
- package/es/types/Interface/api/statistic/QueryInternal.d.ts +1 -0
- package/es/types/Interface/api/statistic/QueryInternal.d.ts.map +1 -1
- package/es/types/Interface/api/statistic/QueryInternal.js +7 -1
- package/es/types/Interface/api/statistic/QueryInternal.js.map +1 -1
- package/es/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +16 -0
- package/es/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
- package/es/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
- package/es/types/Interface/models/IApiError.d.ts +4 -0
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +5 -0
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/IUserFile.d.ts +12 -0
- package/es/types/Interface/models/IUserFile.d.ts.map +1 -0
- package/es/types/Interface/models/IUserFile.js +2 -0
- package/es/types/Interface/models/IUserFile.js.map +1 -0
- package/es/types/Interface/models/IUserSocietyPermission.d.ts +4 -2
- package/es/types/Interface/models/IUserSocietyPermission.d.ts.map +1 -1
- package/es/types/Interface/models/IUserSocietyPermission.js.map +1 -1
- package/es/types/index.d.ts +6 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +6 -0
- package/es/types/index.js.map +1 -1
- package/js/api/resources/CommercialImport.js +35 -0
- package/js/api/resources/CommercialImport.js.map +1 -0
- package/js/api/resources/WorkingSchedule.js +3 -0
- package/js/api/resources/WorkingSchedule.js.map +1 -1
- package/js/api/resources/statistic/CustomerSuccess.js +18 -0
- package/js/api/resources/statistic/CustomerSuccess.js.map +1 -0
- package/js/api/resources.js +5 -1
- package/js/api/resources.js.map +1 -1
- package/js/types/Enum/CommercialImportHeader.js +107 -0
- package/js/types/Enum/CommercialImportHeader.js.map +1 -0
- package/js/types/Enum/Ged.js +1 -1
- package/js/types/Enum/Ged.js.map +1 -1
- package/js/types/Enum/PartnerTransactionType.js +19 -0
- package/js/types/Enum/PartnerTransactionType.js.map +1 -1
- package/js/types/Enum/StatisticType.js +1 -0
- package/js/types/Enum/StatisticType.js.map +1 -1
- package/js/types/Interface/api/commercialImport/Create.js +24 -0
- package/js/types/Interface/api/commercialImport/Create.js.map +1 -0
- package/js/types/Interface/api/commercialImport/Query.js +24 -0
- package/js/types/Interface/api/commercialImport/Query.js.map +1 -0
- package/js/types/Interface/api/commercialImport/Read.js +6 -0
- package/js/types/Interface/api/commercialImport/Read.js.map +1 -0
- package/js/types/Interface/api/statistic/QueryCustomerSuccess.js +24 -0
- package/js/types/Interface/api/statistic/QueryCustomerSuccess.js.map +1 -0
- package/js/types/Interface/api/statistic/QueryInternal.js +1 -0
- package/js/types/Interface/api/statistic/QueryInternal.js.map +1 -1
- package/js/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
- package/js/types/Interface/models/IApiError.js +5 -0
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/models/IUserFile.js +6 -0
- package/js/types/Interface/models/IUserFile.js.map +1 -0
- package/js/types/Interface/models/IUserSocietyPermission.js.map +1 -1
- package/js/types/index.js +60 -0
- package/js/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/CommercialImport.ts +27 -0
- package/ts/api/resources/WorkingSchedule.ts +5 -1
- package/ts/api/resources/statistic/CustomerSuccess.ts +9 -0
- package/ts/api/resources.ts +5 -0
- package/ts/types/Enum/CommercialImportHeader.ts +112 -0
- package/ts/types/Enum/Ged.ts +1 -1
- package/ts/types/Enum/PartnerTransactionType.ts +28 -1
- package/ts/types/Enum/StatisticType.ts +1 -0
- package/ts/types/Interface/api/commercialImport/Create.ts +16 -0
- package/ts/types/Interface/api/commercialImport/Query.ts +34 -0
- package/ts/types/Interface/api/commercialImport/Read.ts +40 -0
- package/ts/types/Interface/api/statistic/QueryCustomerSuccess.ts +14 -0
- package/ts/types/Interface/api/statistic/QueryInternal.ts +6 -1
- package/ts/types/Interface/api/workingSchedule/QueryDailyHour.ts +21 -1
- package/ts/types/Interface/models/IApiError.ts +6 -0
- package/ts/types/Interface/models/IUserFile.ts +14 -0
- package/ts/types/Interface/models/IUserSocietyPermission.ts +4 -2
- package/ts/types/index.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.175",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "js/index.js",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as FormData from 'form-data';
|
|
2
|
+
import {
|
|
3
|
+
CreateCommercialTransactions, HeadersMappingImport, ImportRow, QueryHeader, QueryProcessCsv,
|
|
4
|
+
|
|
5
|
+
} from '../../types';
|
|
6
|
+
import { Resource } from '../Resource';
|
|
7
|
+
|
|
8
|
+
export class CommercialImport extends Resource {
|
|
9
|
+
getHeaders(payload: QueryHeader): Promise<HeadersMappingImport[]> {
|
|
10
|
+
return this.axios.$post('/commercial-management/imports/headers', payload);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
mapping(file: File, payload: QueryProcessCsv): Promise<ImportRow[]> {
|
|
14
|
+
const formData = new FormData();
|
|
15
|
+
const entries = Object.entries(payload.mappingHeaders);
|
|
16
|
+
entries.map(([name, value]: [string, string]) => {
|
|
17
|
+
formData.append(name, value);
|
|
18
|
+
return [name, value];
|
|
19
|
+
});
|
|
20
|
+
formData.append('file', file);
|
|
21
|
+
return this.axios.$post('/commercial-management/imports/process-csv', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
createTransactions(payload: CreateCommercialTransactions): Promise<boolean> {
|
|
25
|
+
return this.axios.$post('/commercial-management/imports/transactions', payload);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
|
-
import { SpecialHours } from '../..';
|
|
2
|
+
import { ReadWorkingSchedule, SpecialHours } from '../..';
|
|
3
3
|
|
|
4
4
|
export class WorkingSchedule extends Resource {
|
|
5
5
|
getSpecialHoursForCollaborator(idUser: number, startDate: Date, endDate: Date): Promise<SpecialHours> {
|
|
@@ -17,4 +17,8 @@ export class WorkingSchedule extends Resource {
|
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
get(id: number): Promise<ReadWorkingSchedule> {
|
|
22
|
+
return this.axios.$get(`workingSchedule/${id}`);
|
|
23
|
+
}
|
|
20
24
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CancelToken } from 'axios';
|
|
2
|
+
import { Resource } from '../../Resource';
|
|
3
|
+
import { QueryCustomerSuccess } from '../../../types';
|
|
4
|
+
|
|
5
|
+
export class StatisticCustomerSuccess extends Resource {
|
|
6
|
+
public get(params: QueryCustomerSuccess, cancelToken?: CancelToken): Promise<JSON> {
|
|
7
|
+
return this.axios.$get('/statistic-cs', { params, ...(cancelToken ? { cancelToken } : {}) });
|
|
8
|
+
}
|
|
9
|
+
}
|
package/ts/api/resources.ts
CHANGED
|
@@ -120,7 +120,9 @@ import { Acceptance } from './resources/Acceptance';
|
|
|
120
120
|
import { Rating } from './resources/Rating';
|
|
121
121
|
import { Quotation } from './resources/Quotation';
|
|
122
122
|
import { Prestations } from './resources/Prestations';
|
|
123
|
+
import { StatisticCustomerSuccess } from './resources/statistic/CustomerSuccess';
|
|
123
124
|
import { UnpaidCallHistory } from './resources/UnpaidCallHistory';
|
|
125
|
+
import { CommercialImport } from './resources/CommercialImport';
|
|
124
126
|
|
|
125
127
|
export const resources = {
|
|
126
128
|
simulation: Simulation,
|
|
@@ -230,6 +232,7 @@ export const resources = {
|
|
|
230
232
|
statisticAccountant: StatisticAccountant,
|
|
231
233
|
statisticDirection: StatisticDirection,
|
|
232
234
|
statisticExpertAccountant: StatisticExpertAccountant,
|
|
235
|
+
statisticCustomerSuccess: StatisticCustomerSuccess,
|
|
233
236
|
paymentExpectation: PaymentExpectation,
|
|
234
237
|
terminationList: TerminationList,
|
|
235
238
|
slowDetection: SlowDetection,
|
|
@@ -246,4 +249,6 @@ export const resources = {
|
|
|
246
249
|
quotation: Quotation,
|
|
247
250
|
prestations: Prestations,
|
|
248
251
|
unpaidCallHistory: UnpaidCallHistory,
|
|
252
|
+
commercialImport: CommercialImport,
|
|
253
|
+
|
|
249
254
|
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export type CommercialImportHeaderContent = {
|
|
2
|
+
originalName:string;
|
|
3
|
+
name: string;
|
|
4
|
+
required: boolean,
|
|
5
|
+
description?: string;
|
|
6
|
+
relatedField?: string;
|
|
7
|
+
};
|
|
8
|
+
export type CommercialImportHeader = {
|
|
9
|
+
[key: string]: CommercialImportHeaderContent
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const commercialImportHeader: CommercialImportHeader = {
|
|
13
|
+
TAX_INCLUDED_AMOUNT: {
|
|
14
|
+
originalName: 'taxIncludedAmount',
|
|
15
|
+
name: 'Montant TTC',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'Montant total toutes taxes comprises',
|
|
18
|
+
},
|
|
19
|
+
TAX_EXCLUDED_AMOUNT_20: {
|
|
20
|
+
originalName: 'taxExcludedAmount_20',
|
|
21
|
+
name: 'Montant HT TVA 20%',
|
|
22
|
+
required: true,
|
|
23
|
+
description: 'Total hors taxes des prestations ou marchandises facturées avec la TVA 20%',
|
|
24
|
+
},
|
|
25
|
+
AMOUNT_VAT_20: {
|
|
26
|
+
originalName: 'amountVat_20',
|
|
27
|
+
name: 'Montant TVA 20%',
|
|
28
|
+
required: true,
|
|
29
|
+
description: 'Montant en euros de la TVA 20%',
|
|
30
|
+
relatedField: 'taxExcludedAmount_20',
|
|
31
|
+
},
|
|
32
|
+
TAX_EXCLUDED_10: {
|
|
33
|
+
originalName: 'taxExcludedAmount_10',
|
|
34
|
+
name: 'Montant HT TVA 10%',
|
|
35
|
+
required: true,
|
|
36
|
+
description: 'Total hors taxes des prestations ou marchandises facturées avec la TVA 10%',
|
|
37
|
+
},
|
|
38
|
+
AMOUNT_VAT_10: {
|
|
39
|
+
originalName: 'amountVat_10',
|
|
40
|
+
name: 'Montant TVA 10%',
|
|
41
|
+
required: true,
|
|
42
|
+
description: 'Montant en euros de la TVA 10%',
|
|
43
|
+
relatedField: 'taxExcludedAmount_10',
|
|
44
|
+
},
|
|
45
|
+
TAX_EXCLUDED_8_5: {
|
|
46
|
+
originalName: 'taxExcludedAmount_8_5',
|
|
47
|
+
name: 'Montant HT TVA 8,5%',
|
|
48
|
+
required: true,
|
|
49
|
+
description: 'Total hors taxes des prestations ou marchandises facturées avec la TVA 8,5%',
|
|
50
|
+
},
|
|
51
|
+
AMOUNT_VAT_8_5: {
|
|
52
|
+
originalName: 'amountVat_8_5',
|
|
53
|
+
name: 'Montant TVA 8,5%',
|
|
54
|
+
required: true,
|
|
55
|
+
description: 'Montant en euros de la TVA 8,5%',
|
|
56
|
+
relatedField: 'taxExcludedAmount_8_5',
|
|
57
|
+
},
|
|
58
|
+
TAX_EXCLUDED_5_5: {
|
|
59
|
+
originalName: 'taxExcludedAmount_5_5',
|
|
60
|
+
name: 'Montant HT TVA 5,5%',
|
|
61
|
+
required: true,
|
|
62
|
+
description: 'Total hors taxes des prestations ou marchandises facturées avec la TVA 5,5%',
|
|
63
|
+
},
|
|
64
|
+
AMOUNT_VAT_5_5: {
|
|
65
|
+
originalName: 'amountVat_5_5',
|
|
66
|
+
name: 'Montant TVA 5,5%',
|
|
67
|
+
required: true,
|
|
68
|
+
description: 'Montant en euros de la TVA 5,5%',
|
|
69
|
+
relatedField: 'taxExcludedAmount_5_5',
|
|
70
|
+
},
|
|
71
|
+
TAX_EXCLUDED_2_1: {
|
|
72
|
+
originalName: 'taxExcludedAmount_2_1',
|
|
73
|
+
name: 'Montant HT TVA 2,1%',
|
|
74
|
+
required: true,
|
|
75
|
+
description: 'Total hors taxes des prestations ou marchandises facturées avec la TVA 2,1%',
|
|
76
|
+
},
|
|
77
|
+
AMOUNT_VAT_2_1: {
|
|
78
|
+
originalName: 'amountVat_2_1',
|
|
79
|
+
name: 'Montant TVA 2,1%',
|
|
80
|
+
required: true,
|
|
81
|
+
description: 'Montant en euros de la TVA 2,1%',
|
|
82
|
+
relatedField: 'taxExcludedAmount_2_1',
|
|
83
|
+
},
|
|
84
|
+
TAX_EXCLUDED: {
|
|
85
|
+
originalName: 'taxExcludedAmount',
|
|
86
|
+
name: 'Montant sans TVA',
|
|
87
|
+
required: true,
|
|
88
|
+
description: 'Total hors taxes des prestations ou marchandises facturées sans TVA',
|
|
89
|
+
},
|
|
90
|
+
CUSTOMER_NAME: {
|
|
91
|
+
originalName: 'customerName',
|
|
92
|
+
name: 'Nom de client',
|
|
93
|
+
required: true,
|
|
94
|
+
description: 'Nom ou raison sociale de vos clients',
|
|
95
|
+
},
|
|
96
|
+
DATE_VALUE: {
|
|
97
|
+
originalName: 'dateValue',
|
|
98
|
+
name: 'date',
|
|
99
|
+
required: false,
|
|
100
|
+
description: 'Date d’émission des factures',
|
|
101
|
+
},
|
|
102
|
+
LABEL: {
|
|
103
|
+
originalName: 'Label',
|
|
104
|
+
name: 'Libellé',
|
|
105
|
+
required: false,
|
|
106
|
+
},
|
|
107
|
+
INVOICE_NUMBER: {
|
|
108
|
+
originalName: 'invoiceNumber',
|
|
109
|
+
name: 'Numéro de facture',
|
|
110
|
+
required: false,
|
|
111
|
+
},
|
|
112
|
+
};
|
package/ts/types/Enum/Ged.ts
CHANGED
|
@@ -33,7 +33,7 @@ export enum GedFolder {
|
|
|
33
33
|
RSI_URSSAF = 27,
|
|
34
34
|
// Previous GA balance & PV = 28,
|
|
35
35
|
// Slips for the CFE = 29,
|
|
36
|
-
|
|
36
|
+
APPENDIX_PROVIDERS_CUSTOMERS = 30,
|
|
37
37
|
MISCELLANEOUS = 31,
|
|
38
38
|
// Legal Announcements = 32,
|
|
39
39
|
CERTIFICATES = 33,
|
|
@@ -5,4 +5,31 @@ export enum PartnerTransactionType {
|
|
|
5
5
|
SHINE = 4,
|
|
6
6
|
STRIPE = 5,
|
|
7
7
|
JE_DECLARE = 6,
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const PartnerTransactionTypeList: Array<{ value: PartnerTransactionType, text: string }> = [
|
|
11
|
+
{
|
|
12
|
+
value: PartnerTransactionType.OTHER,
|
|
13
|
+
text: 'Autres (CSV, Notes de frais, Espèces)',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
value: PartnerTransactionType.BUDGET_INSIGHT,
|
|
17
|
+
text: 'Budget Insight',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
value: PartnerTransactionType.QONTO,
|
|
21
|
+
text: 'Qonto',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
value: PartnerTransactionType.SHINE,
|
|
25
|
+
text: 'Shine',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: PartnerTransactionType.STRIPE,
|
|
29
|
+
text: 'Stripe',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: PartnerTransactionType.JE_DECLARE,
|
|
33
|
+
text: 'Je Declare',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IsNumber } from 'class-validator';
|
|
2
|
+
import { ApiProperty } from '../../../../utils';
|
|
3
|
+
import { TFile } from '../file/TFile';
|
|
4
|
+
import { ImportRow } from './Read';
|
|
5
|
+
|
|
6
|
+
export class CreateCommercialTransactions {
|
|
7
|
+
@ApiProperty()
|
|
8
|
+
transactions: ImportRow[];
|
|
9
|
+
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
@IsNumber()
|
|
12
|
+
type: number;
|
|
13
|
+
|
|
14
|
+
@ApiProperty()
|
|
15
|
+
file: TFile;
|
|
16
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ApiProperty } from '../../../../utils';
|
|
2
|
+
import { TFile } from '../file/TFile';
|
|
3
|
+
|
|
4
|
+
export type MappingImport = {
|
|
5
|
+
[K in HeadersMappingImport]?: string
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type HeadersMappingImport =
|
|
9
|
+
'dateValue' |
|
|
10
|
+
'label' |
|
|
11
|
+
'customerName' |
|
|
12
|
+
'invoiceNumber' |
|
|
13
|
+
'taxIncludedAmount' |
|
|
14
|
+
'taxExcludedAmount' |
|
|
15
|
+
'taxExcludedAmount_2_1' |
|
|
16
|
+
'amountVat_2_1' |
|
|
17
|
+
'taxExcludedAmount_5_5' |
|
|
18
|
+
'amountVat_5_5' |
|
|
19
|
+
'taxExcludedAmount_8_5' |
|
|
20
|
+
'amountVat_8_5' |
|
|
21
|
+
'taxExcludedAmount_10' |
|
|
22
|
+
'amountVat_10' |
|
|
23
|
+
'taxExcludedAmount_20' |
|
|
24
|
+
'amountVat_20';
|
|
25
|
+
|
|
26
|
+
export class QueryHeader {
|
|
27
|
+
@ApiProperty()
|
|
28
|
+
file: TFile;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class QueryProcessCsv {
|
|
32
|
+
@ApiProperty()
|
|
33
|
+
mappingHeaders: MappingImport;
|
|
34
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface ImportRow {
|
|
2
|
+
taxIncludedAmount: number;
|
|
3
|
+
taxExcludedAmount: number;
|
|
4
|
+
amountVat: number;
|
|
5
|
+
taxExcludedAmount_20: number;
|
|
6
|
+
amountVat_20: number;
|
|
7
|
+
taxExcludedAmount_10: number;
|
|
8
|
+
amountVat_10: number;
|
|
9
|
+
taxExcludedAmount_8_5: number;
|
|
10
|
+
amountVat_8_5: number;
|
|
11
|
+
taxExcludedAmount_5_5: number;
|
|
12
|
+
amountVat_5_5: number;
|
|
13
|
+
taxExcludedAmount_2_1: number;
|
|
14
|
+
amountVat_2_1: number;
|
|
15
|
+
customerName: string;
|
|
16
|
+
dateValue?: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
invoiceNumber?: string
|
|
19
|
+
line: number // the line in the csv
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ImportRawRow {
|
|
23
|
+
taxIncludedAmount: number;
|
|
24
|
+
taxExcludedAmount: number;
|
|
25
|
+
taxExcludedAmount_20: number;
|
|
26
|
+
amountVat_20: number;
|
|
27
|
+
taxExcludedAmount_10: number;
|
|
28
|
+
amountVat_10: number;
|
|
29
|
+
taxExcludedAmount_8_5: number;
|
|
30
|
+
amountVat_8_5: number;
|
|
31
|
+
taxExcludedAmount_5_5: number;
|
|
32
|
+
amountVat_5_5: number;
|
|
33
|
+
taxExcludedAmount_2_1: number;
|
|
34
|
+
amountVat_2_1: number;
|
|
35
|
+
customerName: string;
|
|
36
|
+
dateValue?: string;
|
|
37
|
+
label?: string;
|
|
38
|
+
invoiceNumber?: string,
|
|
39
|
+
line: number // the line in the csv
|
|
40
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IsNumber, IsDate, IsIn } from 'class-validator';
|
|
2
|
+
import { ApiProperty } from '../../../../utils';
|
|
3
|
+
import { StatisticType } from '../../../Enum/StatisticType';
|
|
4
|
+
|
|
5
|
+
export class QueryCustomerSuccess {
|
|
6
|
+
@ApiProperty()
|
|
7
|
+
@IsDate()
|
|
8
|
+
endDate: Date;
|
|
9
|
+
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
@IsNumber()
|
|
12
|
+
@IsIn(Object.values(StatisticType))
|
|
13
|
+
type: number;
|
|
14
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IsNumber, IsOptional, IsBoolean,
|
|
2
|
+
IsNumber, IsOptional, IsBoolean, IsArray,
|
|
3
3
|
} from 'class-validator';
|
|
4
4
|
import { ApiPropertyOptional } from '../../../../utils';
|
|
5
5
|
|
|
@@ -13,4 +13,9 @@ export class QueryInternal {
|
|
|
13
13
|
@IsOptional()
|
|
14
14
|
@IsNumber()
|
|
15
15
|
idUser?: number;
|
|
16
|
+
|
|
17
|
+
@ApiPropertyOptional()
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsArray()
|
|
20
|
+
idUsers?: number[];
|
|
16
21
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IFile } from '../../models/IFile';
|
|
2
|
+
|
|
1
3
|
export interface DailyHour {
|
|
2
4
|
from: number;
|
|
3
5
|
to: number;
|
|
@@ -11,4 +13,22 @@ export interface SpecialHours {
|
|
|
11
13
|
3?: DailyHour | DailyHour[];
|
|
12
14
|
4?: DailyHour | DailyHour[];
|
|
13
15
|
5?: DailyHour | DailyHour[];
|
|
14
|
-
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type ReadFilesUser = Array< {
|
|
19
|
+
name: string;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
}>;
|
|
22
|
+
|
|
23
|
+
export type ReadWorkingSchedule = Array< {
|
|
24
|
+
idDay: number;
|
|
25
|
+
idUser: number;
|
|
26
|
+
idWorkingSchedule: number;
|
|
27
|
+
isRemote: boolean;
|
|
28
|
+
morningStart: string;
|
|
29
|
+
morningEnd: string;
|
|
30
|
+
afternoonStart: string;
|
|
31
|
+
afternoonEnd: string;
|
|
32
|
+
files?: IFile[];
|
|
33
|
+
}
|
|
34
|
+
>;
|
|
@@ -106,6 +106,12 @@ export enum Code {
|
|
|
106
106
|
insertAccountingTransactionFailed = 'insert_accounting_transaction_failed',
|
|
107
107
|
fecFileAlreadyExists = 'fec_file_already_exists',
|
|
108
108
|
|
|
109
|
+
// Import Commercial error
|
|
110
|
+
missingHeaders = 'missing_headers',
|
|
111
|
+
missingRequiredHeaders = 'missing_required_headers',
|
|
112
|
+
wrongVatAmount = 'wrong_vat_amount',
|
|
113
|
+
wrongAmountSum = 'wrong_amount_sum',
|
|
114
|
+
|
|
109
115
|
// User creation
|
|
110
116
|
userAlreadyExistWithSociety = 'user-already-exists',
|
|
111
117
|
userDoesNotExists = 'user-does-not-exist',
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IUser } from './IUser';
|
|
2
|
+
import { IFile } from './IFile';
|
|
3
|
+
|
|
4
|
+
export interface IUserFile {
|
|
5
|
+
id?: number;
|
|
6
|
+
idUser: number | null;
|
|
7
|
+
idFile: number | null;
|
|
8
|
+
createdAt?: Date | null;
|
|
9
|
+
updatedAt?: Date | null;
|
|
10
|
+
|
|
11
|
+
// Associations
|
|
12
|
+
user: IUser;
|
|
13
|
+
file: IFile;
|
|
14
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IPermission } from './IPermission';
|
|
2
2
|
import { ISociety } from './ISociety';
|
|
3
|
+
import { IUser } from './IUser';
|
|
3
4
|
|
|
4
5
|
// usersSocietiesPermissions
|
|
5
6
|
export interface IUserSocietyPermission {
|
|
@@ -12,6 +13,7 @@ export interface IUserSocietyPermission {
|
|
|
12
13
|
updatedAt?: Date | null;
|
|
13
14
|
|
|
14
15
|
// Associations
|
|
15
|
-
permission
|
|
16
|
-
society
|
|
16
|
+
permission?: IPermission;
|
|
17
|
+
society?: ISociety;
|
|
18
|
+
user?: IUser;
|
|
17
19
|
}
|
package/ts/types/index.ts
CHANGED
|
@@ -268,6 +268,7 @@ export * from './Interface/models/IUserNotification';
|
|
|
268
268
|
export * from './Interface/models/IUserSocietyPermission';
|
|
269
269
|
export * from './Interface/models/IUserSocietyTicketSupport';
|
|
270
270
|
export * from './Interface/models/IUserTeam';
|
|
271
|
+
export * from './Interface/models/IUserFile';
|
|
271
272
|
export * from './Interface/models/IUserTest';
|
|
272
273
|
export * from './Interface/models/IVatDeclaration';
|
|
273
274
|
export * from './Interface/models/IVatDeclarationCertificate';
|
|
@@ -480,6 +481,7 @@ export * from './Enum/Holidays';
|
|
|
480
481
|
export * from './Enum/AdminAcceptance';
|
|
481
482
|
export * from './Enum/PrestationListType';
|
|
482
483
|
export * from './Enum/UnpaidCallHistoryType';
|
|
484
|
+
export * from './Enum/CommercialImportHeader';
|
|
483
485
|
|
|
484
486
|
// Interfaces API
|
|
485
487
|
export * from './Interface/api/partnerTransactionType/ReadPartnerTransactionType';
|
|
@@ -693,6 +695,7 @@ export * from './Interface/api/statistic/QueryGetAccountant';
|
|
|
693
695
|
export * from './Interface/api/statistic/QueryDirection';
|
|
694
696
|
export * from './Interface/api/statistic/QueryInternal';
|
|
695
697
|
export * from './Interface/api/statistic/QueryGetDirection';
|
|
698
|
+
export * from './Interface/api/statistic/QueryCustomerSuccess';
|
|
696
699
|
export * from './Interface/api/pappers/CreatePappers';
|
|
697
700
|
export * from './Interface/api/bankAccount/DeleteTransaction';
|
|
698
701
|
export * from './Interface/api/stripe/QueryStripe';
|
|
@@ -891,6 +894,9 @@ export * from './Interface/api/quotation/ReadClientQuotation';
|
|
|
891
894
|
export * from './Interface/api/prestations/QueryCreate';
|
|
892
895
|
export * from './Interface/api/prestations/QueryUpdate';
|
|
893
896
|
export * from './Interface/api/prestations/QueryGetAllPrestations';
|
|
897
|
+
export * from './Interface/api/commercialImport/Read';
|
|
898
|
+
export * from './Interface/api/commercialImport/Query';
|
|
899
|
+
export * from './Interface/api/commercialImport/Create';
|
|
894
900
|
|
|
895
901
|
// Enums types
|
|
896
902
|
export * from './Interface/enum/Util';
|