@silexpert/core 1.1.127 → 1.1.129
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/Das.d.ts +9 -0
- package/es/api/resources/Das.d.ts.map +1 -0
- package/es/api/resources/Das.js +17 -0
- package/es/api/resources/Das.js.map +1 -0
- package/es/types/Enum/Aspone.d.ts +2 -1
- package/es/types/Enum/Aspone.d.ts.map +1 -1
- package/es/types/Enum/Aspone.js +1 -0
- package/es/types/Enum/Aspone.js.map +1 -1
- package/es/types/Enum/BrandLegalstart.d.ts +16 -0
- package/es/types/Enum/BrandLegalstart.d.ts.map +1 -1
- package/es/types/Enum/BrandLegalstart.js +90 -0
- package/es/types/Enum/BrandLegalstart.js.map +1 -1
- package/es/types/Enum/CerfaType.d.ts +2 -1
- package/es/types/Enum/CerfaType.d.ts.map +1 -1
- package/es/types/Enum/CerfaType.js +1 -0
- package/es/types/Enum/CerfaType.js.map +1 -1
- package/es/types/Enum/Country.d.ts +4 -0
- package/es/types/Enum/Country.d.ts.map +1 -1
- package/es/types/Enum/Country.js +6440 -0
- package/es/types/Enum/Country.js.map +1 -1
- package/es/types/Enum/Das.d.ts +15 -0
- package/es/types/Enum/Das.d.ts.map +1 -0
- package/es/types/Enum/Das.js +22 -0
- package/es/types/Enum/Das.js.map +1 -0
- package/es/types/Enum/TimeCounterType.d.ts +7 -0
- package/es/types/Enum/TimeCounterType.d.ts.map +1 -1
- package/es/types/Enum/TimeCounterType.js +7 -0
- package/es/types/Enum/TimeCounterType.js.map +1 -1
- package/es/types/Interface/api/aspone/ReadInterchange.d.ts +1 -1
- package/es/types/Interface/api/aspone/ReadInterchange.d.ts.map +1 -1
- package/es/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
- package/es/types/Interface/api/calendarEvent/createCalendarEvent.d.ts +1 -1
- package/es/types/Interface/api/calendarEvent/createCalendarEvent.d.ts.map +1 -1
- package/es/types/Interface/api/calendarEvent/createCalendarEvent.js +1 -1
- package/es/types/Interface/api/calendarEvent/createCalendarEvent.js.map +1 -1
- package/es/types/Interface/api/cerfa/ReadCerfa.d.ts +1 -0
- package/es/types/Interface/api/cerfa/ReadCerfa.d.ts.map +1 -1
- package/es/types/Interface/api/cerfa/ReadCerfa.js.map +1 -1
- package/es/types/Interface/api/cerfa/das2.d.ts +112 -0
- package/es/types/Interface/api/cerfa/das2.d.ts.map +1 -0
- package/es/types/Interface/api/cerfa/das2.js +65 -0
- package/es/types/Interface/api/cerfa/das2.js.map +1 -0
- package/es/types/Interface/models/IApiError.d.ts +2 -1
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +1 -0
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/IThirdParty.d.ts +1 -0
- package/es/types/Interface/models/IThirdParty.d.ts.map +1 -1
- package/es/types/Interface/models/IThirdParty.js.map +1 -1
- package/es/types/index.d.ts +2 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +2 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/documents.js +1 -1
- package/es/utils/documents.js.map +1 -1
- package/es/utils/phone.d.ts +1 -0
- package/es/utils/phone.d.ts.map +1 -1
- package/es/utils/phone.js +8 -0
- package/es/utils/phone.js.map +1 -1
- package/js/api/resources/Das.js +26 -0
- package/js/api/resources/Das.js.map +1 -0
- package/js/types/Enum/Aspone.js +1 -0
- package/js/types/Enum/Aspone.js.map +1 -1
- package/js/types/Enum/BrandLegalstart.js +81 -1
- package/js/types/Enum/BrandLegalstart.js.map +1 -1
- package/js/types/Enum/CerfaType.js +1 -0
- package/js/types/Enum/CerfaType.js.map +1 -1
- package/js/types/Enum/Country.js +19315 -0
- package/js/types/Enum/Country.js.map +1 -1
- package/js/types/Enum/Das.js +42 -0
- package/js/types/Enum/Das.js.map +1 -0
- package/js/types/Enum/TimeCounterType.js +7 -0
- package/js/types/Enum/TimeCounterType.js.map +1 -1
- package/js/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
- package/js/types/Interface/api/calendarEvent/createCalendarEvent.js +1 -1
- package/js/types/Interface/api/calendarEvent/createCalendarEvent.js.map +1 -1
- package/js/types/Interface/api/cerfa/ReadCerfa.js.map +1 -1
- package/js/types/Interface/api/cerfa/das2.js +36 -0
- package/js/types/Interface/api/cerfa/das2.js.map +1 -0
- package/js/types/Interface/models/IApiError.js +1 -0
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/models/IThirdParty.js.map +1 -1
- package/js/types/index.js +20 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/documents.js +1 -1
- package/js/utils/documents.js.map +1 -1
- package/js/utils/phone.js +9 -0
- package/js/utils/phone.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Das.ts +21 -0
- package/ts/types/Enum/Aspone.ts +1 -0
- package/ts/types/Enum/BrandLegalstart.ts +91 -0
- package/ts/types/Enum/CerfaType.ts +1 -0
- package/ts/types/Enum/Country.ts +6441 -0
- package/ts/types/Enum/Das.ts +21 -0
- package/ts/types/Enum/TimeCounterType.ts +7 -0
- package/ts/types/Interface/api/aspone/ReadInterchange.ts +1 -1
- package/ts/types/Interface/api/calendarEvent/createCalendarEvent.ts +2 -2
- package/ts/types/Interface/api/cerfa/ReadCerfa.ts +1 -1
- package/ts/types/Interface/api/cerfa/das2.ts +142 -0
- package/ts/types/Interface/models/IApiError.ts +1 -0
- package/ts/types/Interface/models/IThirdParty.ts +1 -0
- package/ts/types/index.ts +2 -0
- package/ts/utils/documents.ts +1 -1
- package/ts/utils/phone.ts +12 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export enum DasNature {
|
|
2
|
+
FEE = 'H',
|
|
3
|
+
COMMISSION = 'C',
|
|
4
|
+
BROKERAGE = 'CO',
|
|
5
|
+
REBATE = 'R',
|
|
6
|
+
ATTENDANCE_FEE = 'JP',
|
|
7
|
+
COPYRIGHT = 'DA',
|
|
8
|
+
INVENTOR_RIGHT = 'DI',
|
|
9
|
+
OTHER = 'AR',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const DasNatureList: Array<{ label: string; id: DasNature }> = [
|
|
13
|
+
{ label: 'Honoraires et vacations', id: DasNature.FEE },
|
|
14
|
+
{ label: 'Commissions', id: DasNature.COMMISSION },
|
|
15
|
+
{ label: 'Courtages', id: DasNature.BROKERAGE },
|
|
16
|
+
{ label: 'Ristournes', id: DasNature.REBATE },
|
|
17
|
+
{ label: 'Jetons de présence', id: DasNature.ATTENDANCE_FEE },
|
|
18
|
+
{ label: 'Droits d\'auteur', id: DasNature.COPYRIGHT },
|
|
19
|
+
{ label: 'Droits d\'inventeur', id: DasNature.INVENTOR_RIGHT },
|
|
20
|
+
{ label: 'Autres rémunérations', id: DasNature.OTHER },
|
|
21
|
+
];
|
|
@@ -58,7 +58,7 @@ export class Redactor {
|
|
|
58
58
|
referenceDossier: string;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
type Tag = 'Valeur' | 'AdresseVille' | 'AdresseVoie' | 'AdresseCodePays' | 'AdresseComplement' | 'AdresseCodePostal' | 'AdresseHameau' | 'Telephone' | 'Designation' | 'DesignationSuite1' | 'DesignationSuite2' | 'Identifiant' | 'TexteLibre1' | 'TexteLibre2' | 'TexteLibre3' | 'TexteLibre4' | 'TexteLibre5' | 'DesignationSuite3' | 'AdresseNumero' | 'Iban' | 'Bic' | 'TitulaireDesignation' | 'TitulaireDesignationSuite';
|
|
61
|
+
type Tag = 'ContactDesignation' | 'AdresseDivisionTerritoriale' | 'AdresseCodeDivisionTerritoriale' | 'Email' | 'Valeur' | 'AdresseVille' | 'AdresseVoie' | 'AdresseCodePays' | 'AdresseComplement' | 'AdresseCodePostal' | 'AdresseHameau' | 'Telephone' | 'Designation' | 'DesignationSuite1' | 'DesignationSuite2' | 'Identifiant' | 'TexteLibre1' | 'TexteLibre2' | 'TexteLibre3' | 'TexteLibre4' | 'TexteLibre5' | 'DesignationSuite3' | 'AdresseNumero' | 'Iban' | 'Bic' | 'TitulaireDesignation' | 'TitulaireDesignationSuite';
|
|
62
62
|
type Tags = Array<{ description: string; tag: Tag; value: any }>;
|
|
63
63
|
|
|
64
64
|
export interface FieldForGeneration {
|
|
@@ -99,5 +99,5 @@ export type Termination = {
|
|
|
99
99
|
date: string | null
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
-
export type AsponeFormFields = Array<{ name: string; fields: FieldForGeneration[] }>;
|
|
102
|
+
export type AsponeFormFields = Array<{ name: string; fields: FieldForGeneration[], index?: number }>;
|
|
103
103
|
export type AsponeFormField = { name: string; fields: FieldForGeneration[] };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { IsArray, IsBoolean, IsDateString, IsObject, IsOptional } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { DasNature } from '../../../Enum/Das';
|
|
4
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
5
|
+
|
|
6
|
+
export interface Das2ThirdPartyPersonnalizedData {
|
|
7
|
+
amount: number;
|
|
8
|
+
nature: DasNature;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface Das2ThirdParty {
|
|
12
|
+
totalTaxIncluded: number;
|
|
13
|
+
fullnameOrCompany: string;
|
|
14
|
+
address: {
|
|
15
|
+
number: string | null;
|
|
16
|
+
street: string | null;
|
|
17
|
+
zipCode: string | null;
|
|
18
|
+
city: string | null;
|
|
19
|
+
};
|
|
20
|
+
legalForm: number;
|
|
21
|
+
siret: string | null;
|
|
22
|
+
other: Das2ThirdPartyPersonnalizedData[];
|
|
23
|
+
nature: {
|
|
24
|
+
value: number;
|
|
25
|
+
food: number;
|
|
26
|
+
};
|
|
27
|
+
indemnities: {
|
|
28
|
+
amount: number;
|
|
29
|
+
letter: string | null;
|
|
30
|
+
};
|
|
31
|
+
vat: number[];
|
|
32
|
+
source: {
|
|
33
|
+
amount: number;
|
|
34
|
+
letter: string | null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Déterminé automatiquement
|
|
38
|
+
isPhysical?: boolean;
|
|
39
|
+
firstname?: string | null;
|
|
40
|
+
lastname?: string | null;
|
|
41
|
+
occupation?: string | null;
|
|
42
|
+
inseeNumber?: string | null;
|
|
43
|
+
distributor?: string | null;
|
|
44
|
+
name?: string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface Das2PdfForm {
|
|
47
|
+
header: {
|
|
48
|
+
firstname: string | null;
|
|
49
|
+
siret: string | null;
|
|
50
|
+
apeCode: string | null;
|
|
51
|
+
name: string | null;
|
|
52
|
+
endDate: {
|
|
53
|
+
day: string | null;
|
|
54
|
+
month: string | null;
|
|
55
|
+
};
|
|
56
|
+
activity: string | null;
|
|
57
|
+
address: {
|
|
58
|
+
complement: string | null;
|
|
59
|
+
number: string | null;
|
|
60
|
+
street: string | null;
|
|
61
|
+
zipCode: string | null;
|
|
62
|
+
city: string | null;
|
|
63
|
+
insee: string | null;
|
|
64
|
+
distributor: string | null;
|
|
65
|
+
};
|
|
66
|
+
establishment: {
|
|
67
|
+
name: string | null;
|
|
68
|
+
address: {
|
|
69
|
+
number: string | null;
|
|
70
|
+
street: string | null;
|
|
71
|
+
zipCode: string | null;
|
|
72
|
+
city: string | null;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
sign: {
|
|
76
|
+
date: string | null;
|
|
77
|
+
place: string | null;
|
|
78
|
+
}
|
|
79
|
+
contact: {
|
|
80
|
+
firstname: string | null;
|
|
81
|
+
email: {
|
|
82
|
+
part2: string | null;
|
|
83
|
+
part1: string | null;
|
|
84
|
+
}
|
|
85
|
+
lastname: string | null;
|
|
86
|
+
phone: string | null;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
thirdParties: Das2ThirdParty[];
|
|
90
|
+
exercice: { startDate: string; endDate: string; year: string; }
|
|
91
|
+
total: {
|
|
92
|
+
case4: number;
|
|
93
|
+
case5: number;
|
|
94
|
+
case6: number;
|
|
95
|
+
case7: number;
|
|
96
|
+
case9: number;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export class QueryDasTransaction {
|
|
101
|
+
@ApiProperty()
|
|
102
|
+
@IsDateString()
|
|
103
|
+
startDate: string;
|
|
104
|
+
|
|
105
|
+
@ApiProperty()
|
|
106
|
+
@IsDateString()
|
|
107
|
+
endDate: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export class DeclareDasRegistration {
|
|
111
|
+
@ApiPropertyOptional()
|
|
112
|
+
@IsOptional()
|
|
113
|
+
@IsBoolean()
|
|
114
|
+
@ToBoolean()
|
|
115
|
+
isTestMode?: boolean;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export class CreateDasRegistration {
|
|
119
|
+
@ApiProperty()
|
|
120
|
+
@IsArray()
|
|
121
|
+
thirdParties: Das2ThirdParty[];
|
|
122
|
+
|
|
123
|
+
@ApiPropertyOptional()
|
|
124
|
+
@IsBoolean()
|
|
125
|
+
@ToBoolean()
|
|
126
|
+
@IsOptional()
|
|
127
|
+
isTestingMode?: boolean;
|
|
128
|
+
|
|
129
|
+
@ApiProperty()
|
|
130
|
+
@IsDateString()
|
|
131
|
+
startDate: string;
|
|
132
|
+
|
|
133
|
+
@ApiProperty()
|
|
134
|
+
@IsDateString()
|
|
135
|
+
endDate: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export class QueryDasPreview {
|
|
139
|
+
@ApiProperty()
|
|
140
|
+
@IsObject()
|
|
141
|
+
payload: Das2PdfForm;
|
|
142
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -320,6 +320,7 @@ export * from './Form/FormAuthenticate';
|
|
|
320
320
|
export * from './Form/FormConnector';
|
|
321
321
|
|
|
322
322
|
// Enums
|
|
323
|
+
export * from './Enum/Das';
|
|
323
324
|
export * from './Enum/ChangeLog';
|
|
324
325
|
export * from './Enum/VisualizedInformation';
|
|
325
326
|
export * from './Enum/NafCode';
|
|
@@ -490,6 +491,7 @@ export * from './Enum/MissionAcceptation';
|
|
|
490
491
|
export * from './Enum/Bank';
|
|
491
492
|
|
|
492
493
|
// Interfaces API
|
|
494
|
+
export * from './Interface/api/cerfa/das2';
|
|
493
495
|
export * from './Interface/api/adjustment/Query';
|
|
494
496
|
export * from './Interface/api/adjustment/Read';
|
|
495
497
|
export * from './Interface/api/vatDeclaration/ReadVatDeclaration';
|
package/ts/utils/documents.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { LegalForm } from '../types/Enum/LegalForm';
|
|
|
3
3
|
|
|
4
4
|
const requiredListDocs = (idLegalForm: number, isOnlyPrevi?: boolean, isOnlyJuridic?: boolean, isOnlySocial?: boolean, isCreation?: boolean): GedFileType[] => {
|
|
5
5
|
if (isOnlyPrevi) {
|
|
6
|
-
return [GedFileType.IDENTITY_CARD, GedFileType.PLAQUETTE
|
|
6
|
+
return [GedFileType.IDENTITY_CARD, GedFileType.PLAQUETTE];
|
|
7
7
|
}
|
|
8
8
|
if (isCreation || isOnlyJuridic || isOnlySocial) {
|
|
9
9
|
return [GedFileType.RIB, GedFileType.PLAQUETTE];
|
package/ts/utils/phone.ts
CHANGED
|
@@ -62,4 +62,16 @@ export function getPhoneNumberFromRoles(roles: number[], attribute: 'phoneNumber
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
return null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function formatPhoneNumberToNational(phoneNumber: string): string {
|
|
68
|
+
|
|
69
|
+
const phoneWithoutSpace = phoneNumber.replace(/ /g, '');
|
|
70
|
+
|
|
71
|
+
if (phoneWithoutSpace?.startsWith('+33')) {
|
|
72
|
+
return phoneWithoutSpace.replace('+33', '0');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Fonction à mettre à jour en fonction des cas de notre bdd
|
|
76
|
+
return phoneWithoutSpace;
|
|
65
77
|
}
|