@silexpert/core 1.0.146 → 1.0.147
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/Acceptance.d.ts +6 -0
- package/es/api/resources/Acceptance.d.ts.map +1 -0
- package/es/api/resources/Acceptance.js +7 -0
- package/es/api/resources/Acceptance.js.map +1 -0
- package/es/api/resources/CustomerActivity.d.ts +2 -1
- package/es/api/resources/CustomerActivity.d.ts.map +1 -1
- package/es/api/resources/CustomerActivity.js +3 -0
- package/es/api/resources/CustomerActivity.js.map +1 -1
- package/es/api/resources/Partner.d.ts +3 -1
- package/es/api/resources/Partner.d.ts.map +1 -1
- package/es/api/resources/Partner.js +6 -0
- package/es/api/resources/Partner.js.map +1 -1
- package/es/api/resources/Registration.d.ts +3 -1
- package/es/api/resources/Registration.d.ts.map +1 -1
- package/es/api/resources/Registration.js +6 -0
- package/es/api/resources/Registration.js.map +1 -1
- package/es/api/resources/Wallet.d.ts +2 -1
- package/es/api/resources/Wallet.d.ts.map +1 -1
- package/es/api/resources/Wallet.js +3 -0
- package/es/api/resources/Wallet.js.map +1 -1
- 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/Acceptance.d.ts +5 -0
- package/es/types/Enum/Acceptance.d.ts.map +1 -0
- package/es/types/Enum/Acceptance.js +6 -0
- package/es/types/Enum/Acceptance.js.map +1 -0
- package/es/types/Enum/CerfaType.d.ts +5 -1
- package/es/types/Enum/CerfaType.d.ts.map +1 -1
- package/es/types/Enum/CerfaType.js +4 -0
- package/es/types/Enum/CerfaType.js.map +1 -1
- package/es/types/Enum/MailAuto.d.ts +2 -1
- package/es/types/Enum/MailAuto.d.ts.map +1 -1
- package/es/types/Enum/MailAuto.js +1 -0
- package/es/types/Enum/MailAuto.js.map +1 -1
- package/es/types/Enum/Notification.d.ts +5 -1
- package/es/types/Enum/Notification.d.ts.map +1 -1
- package/es/types/Enum/Notification.js +5 -0
- package/es/types/Enum/Notification.js.map +1 -1
- package/es/types/Enum/TaskResponseType.js +1 -1
- package/es/types/Enum/TaskResponseType.js.map +1 -1
- package/es/types/Interface/api/BasePaginate.d.ts +4 -0
- package/es/types/Interface/api/BasePaginate.d.ts.map +1 -1
- package/es/types/Interface/api/BasePaginate.js +15 -1
- package/es/types/Interface/api/BasePaginate.js.map +1 -1
- package/es/types/Interface/api/acceptance/CreateAcceptance.d.ts +7 -0
- package/es/types/Interface/api/acceptance/CreateAcceptance.d.ts.map +1 -0
- package/es/types/Interface/api/acceptance/CreateAcceptance.js +29 -0
- package/es/types/Interface/api/acceptance/CreateAcceptance.js.map +1 -0
- package/es/types/Interface/api/cerfa/2571.d.ts +92 -0
- package/es/types/Interface/api/cerfa/2571.d.ts.map +1 -0
- package/es/types/Interface/api/cerfa/2571.js +3 -0
- package/es/types/Interface/api/cerfa/2571.js.map +1 -0
- package/es/types/Interface/api/cerfa/CreateCerfa.d.ts +1 -0
- package/es/types/Interface/api/cerfa/CreateCerfa.d.ts.map +1 -1
- package/es/types/Interface/api/cerfa/CreateCerfa.js +1 -0
- package/es/types/Interface/api/cerfa/CreateCerfa.js.map +1 -1
- package/es/types/Interface/api/mail/CreateMailParams.d.ts +1 -0
- package/es/types/Interface/api/mail/CreateMailParams.d.ts.map +1 -1
- package/es/types/Interface/api/mail/CreateMailParams.js.map +1 -1
- package/es/types/Interface/api/partner/CreatePartner.d.ts +1 -0
- package/es/types/Interface/api/partner/CreatePartner.d.ts.map +1 -1
- package/es/types/Interface/api/partner/CreatePartner.js +4 -0
- package/es/types/Interface/api/partner/CreatePartner.js.map +1 -1
- package/es/types/Interface/api/partner/Query.d.ts +13 -0
- package/es/types/Interface/api/partner/Query.d.ts.map +1 -0
- package/es/types/Interface/api/partner/{GetPartners.js → Query.js} +26 -2
- package/es/types/Interface/api/partner/Query.js.map +1 -0
- package/es/types/Interface/api/partner/Read.d.ts +29 -0
- package/es/types/Interface/api/partner/Read.d.ts.map +1 -0
- package/es/types/Interface/api/partner/Read.js +7 -0
- package/es/types/Interface/api/partner/Read.js.map +1 -0
- package/es/types/Interface/api/partner/UpdatePartner.d.ts +1 -0
- package/es/types/Interface/api/partner/UpdatePartner.d.ts.map +1 -1
- package/es/types/Interface/api/partner/UpdatePartner.js +4 -0
- package/es/types/Interface/api/partner/UpdatePartner.js.map +1 -1
- package/es/types/Interface/api/registration/CreateRegistration.d.ts +24 -0
- package/es/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
- package/es/types/Interface/api/registration/CreateRegistration.js +62 -1
- package/es/types/Interface/api/registration/CreateRegistration.js.map +1 -1
- package/es/types/Interface/api/tax/CreateTax.d.ts +1 -0
- package/es/types/Interface/api/tax/CreateTax.d.ts.map +1 -1
- package/es/types/Interface/api/tax/CreateTax.js +7 -1
- package/es/types/Interface/api/tax/CreateTax.js.map +1 -1
- package/es/types/Interface/api/tax/ReadTax.d.ts +6 -0
- package/es/types/Interface/api/tax/ReadTax.d.ts.map +1 -1
- package/es/types/Interface/api/tax/ReadTax.js.map +1 -1
- package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.d.ts +6 -0
- package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.d.ts.map +1 -1
- package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.js +24 -1
- package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.js.map +1 -1
- package/es/types/Interface/models/IAccountingStatementHistory.d.ts +18 -0
- package/es/types/Interface/models/IAccountingStatementHistory.d.ts.map +1 -0
- package/es/types/Interface/models/IAccountingStatementHistory.js +2 -0
- package/es/types/Interface/models/IAccountingStatementHistory.js.map +1 -0
- package/es/types/Interface/models/ICustomerAcceptance.d.ts +13 -0
- package/es/types/Interface/models/ICustomerAcceptance.d.ts.map +1 -0
- package/es/types/Interface/models/ICustomerAcceptance.js +2 -0
- package/es/types/Interface/models/ICustomerAcceptance.js.map +1 -0
- package/es/types/Interface/models/ICustomerIsRegime.d.ts +6 -1
- 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/IExercice.d.ts +1 -0
- package/es/types/Interface/models/IExercice.d.ts.map +1 -1
- package/es/types/Interface/models/IExercice.js.map +1 -1
- package/es/types/Interface/models/IRegistration.d.ts +3 -0
- package/es/types/Interface/models/IRegistration.d.ts.map +1 -1
- package/es/types/Interface/models/IRegistration.js.map +1 -1
- package/es/types/Interface/models/ISocietyPartner.d.ts +1 -0
- package/es/types/Interface/models/ISocietyPartner.d.ts.map +1 -1
- package/es/types/Interface/models/ISocietyPartner.js.map +1 -1
- package/es/types/Interface/models/IVatDeclarationSocietyDetail.d.ts +3 -1
- package/es/types/Interface/models/IVatDeclarationSocietyDetail.d.ts.map +1 -1
- package/es/types/Interface/models/IVatDeclarationSocietyDetail.js.map +1 -1
- package/es/types/index.d.ts +6 -2
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +6 -2
- package/es/types/index.js.map +1 -1
- package/js/api/resources/Acceptance.js +14 -0
- package/js/api/resources/Acceptance.js.map +1 -0
- package/js/api/resources/CustomerActivity.js +3 -0
- package/js/api/resources/CustomerActivity.js.map +1 -1
- package/js/api/resources/Partner.js +10 -0
- package/js/api/resources/Partner.js.map +1 -1
- package/js/api/resources/Registration.js +6 -0
- package/js/api/resources/Registration.js.map +1 -1
- package/js/api/resources/Wallet.js +7 -0
- package/js/api/resources/Wallet.js.map +1 -1
- package/js/api/resources.js +3 -1
- package/js/api/resources.js.map +1 -1
- package/js/types/Enum/Acceptance.js +11 -0
- package/js/types/Enum/Acceptance.js.map +1 -0
- package/js/types/Enum/CerfaType.js +4 -0
- package/js/types/Enum/CerfaType.js.map +1 -1
- package/js/types/Enum/MailAuto.js +1 -0
- package/js/types/Enum/MailAuto.js.map +1 -1
- package/js/types/Enum/Notification.js +5 -0
- package/js/types/Enum/Notification.js.map +1 -1
- package/js/types/Enum/TaskResponseType.js +1 -1
- package/js/types/Enum/TaskResponseType.js.map +1 -1
- package/js/types/Interface/api/BasePaginate.js +5 -1
- package/js/types/Interface/api/BasePaginate.js.map +1 -1
- package/js/types/Interface/api/acceptance/CreateAcceptance.js +25 -0
- package/js/types/Interface/api/acceptance/CreateAcceptance.js.map +1 -0
- package/js/types/Interface/api/cerfa/2571.js +8 -0
- package/js/types/Interface/api/cerfa/2571.js.map +1 -0
- package/js/types/Interface/api/cerfa/CreateCerfa.js +11 -1
- package/js/types/Interface/api/cerfa/CreateCerfa.js.map +1 -1
- package/js/types/Interface/api/mail/CreateMailParams.js.map +1 -1
- package/js/types/Interface/api/partner/CreatePartner.js +1 -0
- package/js/types/Interface/api/partner/CreatePartner.js.map +1 -1
- package/js/types/Interface/api/partner/{GetPartners.js → Query.js} +11 -2
- package/js/types/Interface/api/partner/Query.js.map +1 -0
- package/js/types/Interface/api/partner/Read.js +12 -0
- package/js/types/Interface/api/partner/Read.js.map +1 -0
- package/js/types/Interface/api/partner/UpdatePartner.js +1 -0
- package/js/types/Interface/api/partner/UpdatePartner.js.map +1 -1
- package/js/types/Interface/api/registration/CreateRegistration.js +19 -1
- package/js/types/Interface/api/registration/CreateRegistration.js.map +1 -1
- package/js/types/Interface/api/tax/CreateTax.js +3 -0
- package/js/types/Interface/api/tax/CreateTax.js.map +1 -1
- package/js/types/Interface/api/tax/ReadTax.js.map +1 -1
- package/js/types/Interface/api/taxDeadline/QueryTaxDeadline.js +11 -1
- package/js/types/Interface/api/taxDeadline/QueryTaxDeadline.js.map +1 -1
- package/js/types/Interface/models/IAccountingStatementHistory.js +6 -0
- package/js/types/Interface/models/IAccountingStatementHistory.js.map +1 -0
- package/js/types/Interface/models/{IBalanceSheetHistory.js → ICustomerAcceptance.js} +1 -1
- package/js/types/Interface/models/ICustomerAcceptance.js.map +1 -0
- package/js/types/Interface/models/ICustomerIsRegime.js.map +1 -1
- package/js/types/Interface/models/IExercice.js.map +1 -1
- package/js/types/Interface/models/IRegistration.js.map +1 -1
- package/js/types/Interface/models/ISocietyPartner.js.map +1 -1
- package/js/types/Interface/models/IVatDeclarationSocietyDetail.js.map +1 -1
- package/js/types/index.js +76 -36
- package/js/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Acceptance.ts +8 -0
- package/ts/api/resources/CustomerActivity.ts +7 -1
- package/ts/api/resources/Partner.ts +13 -0
- package/ts/api/resources/Registration.ts +9 -0
- package/ts/api/resources/Wallet.ts +10 -1
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/Acceptance.ts +4 -0
- package/ts/types/Enum/CerfaType.ts +4 -0
- package/ts/types/Enum/MailAuto.ts +1 -0
- package/ts/types/Enum/Notification.ts +5 -0
- package/ts/types/Enum/TaskResponseType.ts +1 -1
- package/ts/types/Interface/api/BasePaginate.ts +13 -1
- package/ts/types/Interface/api/acceptance/CreateAcceptance.ts +16 -0
- package/ts/types/Interface/api/cerfa/2571.ts +97 -0
- package/ts/types/Interface/api/cerfa/CreateCerfa.ts +1 -0
- package/ts/types/Interface/api/mail/CreateMailParams.ts +1 -0
- package/ts/types/Interface/api/partner/CreatePartner.ts +2 -0
- package/ts/types/Interface/api/partner/Query.ts +30 -0
- package/ts/types/Interface/api/partner/Read.ts +31 -0
- package/ts/types/Interface/api/partner/UpdatePartner.ts +2 -0
- package/ts/types/Interface/api/registration/CreateRegistration.ts +58 -1
- package/ts/types/Interface/api/tax/CreateTax.ts +6 -1
- package/ts/types/Interface/api/tax/ReadTax.ts +8 -1
- package/ts/types/Interface/api/taxDeadline/QueryTaxDeadline.ts +22 -1
- package/ts/types/Interface/models/IAccountingStatementHistory.ts +20 -0
- package/ts/types/Interface/models/ICustomerAcceptance.ts +14 -0
- package/ts/types/Interface/models/ICustomerIsRegime.ts +8 -1
- package/ts/types/Interface/models/IExercice.ts +1 -0
- package/ts/types/Interface/models/IRegistration.ts +3 -0
- package/ts/types/Interface/models/ISocietyPartner.ts +1 -0
- package/ts/types/Interface/models/IVatDeclarationSocietyDetail.ts +3 -1
- package/ts/types/index.ts +6 -2
- package/es/types/Interface/api/partner/GetPartners.d.ts +0 -4
- package/es/types/Interface/api/partner/GetPartners.d.ts.map +0 -1
- package/es/types/Interface/api/partner/GetPartners.js.map +0 -1
- package/es/types/Interface/models/IBalanceSheetHistory.d.ts +0 -10
- package/es/types/Interface/models/IBalanceSheetHistory.d.ts.map +0 -1
- package/es/types/Interface/models/IBalanceSheetHistory.js +0 -2
- package/es/types/Interface/models/IBalanceSheetHistory.js.map +0 -1
- package/js/types/Interface/api/partner/GetPartners.js.map +0 -1
- package/js/types/Interface/models/IBalanceSheetHistory.js.map +0 -1
- package/ts/types/Interface/api/partner/GetPartners.ts +0 -11
- package/ts/types/Interface/models/IBalanceSheetHistory.ts +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.147",
|
|
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,8 @@
|
|
|
1
|
+
import { Resource } from '../Resource';
|
|
2
|
+
import { CreateCustomerAcceptance, ICustomerAcceptance } from '../../types';
|
|
3
|
+
|
|
4
|
+
export class Acceptance extends Resource {
|
|
5
|
+
create(payload: CreateCustomerAcceptance): Promise<ICustomerAcceptance> {
|
|
6
|
+
return this.axios.$post('/customers-acceptances', payload);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
CreateContactRequest, CreateCustomerAcceptance, ICustomerAcceptance, IRecontactHistory, QueryContactRequest,
|
|
3
|
+
} from '../../types';
|
|
2
4
|
import { Resource } from '../Resource';
|
|
3
5
|
|
|
4
6
|
export class CustomerActivity extends Resource {
|
|
@@ -13,4 +15,8 @@ export class CustomerActivity extends Resource {
|
|
|
13
15
|
createContactRequests(idUser: number, params: CreateContactRequest): Promise<IRecontactHistory> {
|
|
14
16
|
return this.axios.$post(`/users/${idUser}/contact-requests`, params);
|
|
15
17
|
}
|
|
18
|
+
|
|
19
|
+
createAcceptance(params: CreateCustomerAcceptance): Promise<ICustomerAcceptance> {
|
|
20
|
+
return this.axios.$post('/customers-acceptances', params);
|
|
21
|
+
}
|
|
16
22
|
}
|
|
@@ -4,6 +4,11 @@ import {
|
|
|
4
4
|
CreatePartner,
|
|
5
5
|
UpdatePartner,
|
|
6
6
|
GetPartners,
|
|
7
|
+
GetPartnersCurrentAccounts,
|
|
8
|
+
ReadPartnersCurrentAccounts,
|
|
9
|
+
GetPartnerSolde,
|
|
10
|
+
ReadPartnerSolde,
|
|
11
|
+
BasePaginate,
|
|
7
12
|
} from '../../types';
|
|
8
13
|
|
|
9
14
|
export class Partner extends Resource {
|
|
@@ -20,4 +25,12 @@ export class Partner extends Resource {
|
|
|
20
25
|
delete(idPartner: number): Promise<number> {
|
|
21
26
|
return this.axios.$delete(`partners/${idPartner}`);
|
|
22
27
|
}
|
|
28
|
+
|
|
29
|
+
getCurrentAccounts(idPartner: number, params: GetPartnersCurrentAccounts): Promise<ReadPartnersCurrentAccounts> {
|
|
30
|
+
return this.axios.$get(`partners/${idPartner}/current-accounts`, { params });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
getSolde(params: GetPartnerSolde): Promise<BasePaginate<ReadPartnerSolde>> {
|
|
34
|
+
return this.axios.$get('partners/solde', { params });
|
|
35
|
+
}
|
|
23
36
|
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
IVatDeclarationSocietyDetail,
|
|
7
7
|
QueryRegistration,
|
|
8
8
|
DeclareRegistration,
|
|
9
|
+
CreateRegistrationSettingFromSociety,
|
|
9
10
|
} from '../../types';
|
|
10
11
|
|
|
11
12
|
export class Registration extends Resource {
|
|
@@ -31,4 +32,12 @@ export class Registration extends Resource {
|
|
|
31
32
|
declare(id: number, params: DeclareRegistration): Promise<ReadRegistration> {
|
|
32
33
|
return this.axios.$post(`/registrations/${id}/declare`, params);
|
|
33
34
|
}
|
|
35
|
+
|
|
36
|
+
getSettingsFromSociety(idSociety: number): Promise<IVatDeclarationSocietyDetail | null> {
|
|
37
|
+
return this.axios.$get(`/societies/${idSociety}/registrations/settings`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
updateOrCreateSettingsFromSociety(idSociety: number, params: CreateRegistrationSettingFromSociety): Promise<IVatDeclarationSocietyDetail> {
|
|
41
|
+
return this.axios.$post(`/societies/${idSociety}/registrations/settings`, params);
|
|
42
|
+
}
|
|
34
43
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { CancelToken } from 'axios';
|
|
2
2
|
import { Resource } from '../Resource';
|
|
3
3
|
import { UpdateAttribution } from '../../types/Interface/api/wallet/UpdateAttribution';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
BasePaginate, ISociety, QueryCompanyTaxesByCollaborater, QueryPaginate, ReadCompanyTaxWallet,
|
|
6
|
+
} from '../../types';
|
|
5
7
|
|
|
6
8
|
export class Wallet extends Resource {
|
|
7
9
|
get(pagination?: QueryPaginate, cancelToken?: CancelToken): Promise<(BasePaginate<ISociety>)> {
|
|
@@ -16,4 +18,11 @@ export class Wallet extends Resource {
|
|
|
16
18
|
update(idUser: number, payload: UpdateAttribution): Promise<{ message: string }> {
|
|
17
19
|
return this.axios.$put(`/users/${idUser}/wallets`, payload);
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
getPaginatedCompanyTaxes(query: QueryCompanyTaxesByCollaborater, cancelToken?: CancelToken): Promise<BasePaginate<ReadCompanyTaxWallet>> {
|
|
23
|
+
return this.axios.$get('/wallets/company-taxes', {
|
|
24
|
+
...(cancelToken ? { cancelToken } : {}),
|
|
25
|
+
params: query,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
19
28
|
}
|
package/ts/api/resources.ts
CHANGED
|
@@ -116,6 +116,7 @@ import { SocietyConfigBalanceSheet } from './resources/SocietyConfigBalanceSheet
|
|
|
116
116
|
import { SignFile } from './resources/SignFile';
|
|
117
117
|
import { Rule } from './resources/Rule';
|
|
118
118
|
import { VatRegimeHistory } from './resources/VatRegimeHistory';
|
|
119
|
+
import { Acceptance } from './resources/Acceptance';
|
|
119
120
|
|
|
120
121
|
export const resources = {
|
|
121
122
|
simulation: Simulation,
|
|
@@ -236,4 +237,5 @@ export const resources = {
|
|
|
236
237
|
societyConfigBalanceSheet: SocietyConfigBalanceSheet,
|
|
237
238
|
signFile: SignFile,
|
|
238
239
|
rule: Rule,
|
|
240
|
+
acceptance: Acceptance,
|
|
239
241
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IsInt, IsOptional, Min } from 'class-validator';
|
|
2
|
-
import { ApiPropertyOptional } from '../../..';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../..';
|
|
3
3
|
|
|
4
4
|
export interface BasePaginate<T> {
|
|
5
5
|
maxPages: number;
|
|
@@ -33,3 +33,15 @@ export class OptionalQueryPaginate implements QueryPaginate {
|
|
|
33
33
|
@IsOptional()
|
|
34
34
|
limit: number;
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
export class RequiredQueryPaginate implements QueryPaginate {
|
|
38
|
+
@ApiProperty()
|
|
39
|
+
@IsInt()
|
|
40
|
+
@Min(1)
|
|
41
|
+
page: number;
|
|
42
|
+
|
|
43
|
+
@ApiProperty()
|
|
44
|
+
@IsInt()
|
|
45
|
+
@Min(1)
|
|
46
|
+
limit: number;
|
|
47
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IsEnum, IsString } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { AcceptanceType } from '../../../Enum/Acceptance';
|
|
4
|
+
|
|
5
|
+
export class CreateCustomerAcceptance {
|
|
6
|
+
@ApiProperty()
|
|
7
|
+
@IsString()
|
|
8
|
+
token: string;
|
|
9
|
+
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
@IsEnum(AcceptanceType)
|
|
12
|
+
state: AcceptanceType;
|
|
13
|
+
|
|
14
|
+
@ApiPropertyOptional()
|
|
15
|
+
comment?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { CerfaType } from '../../../Enum/CerfaType';
|
|
2
|
+
import { CerfaAddress } from './ReadCerfa';
|
|
3
|
+
|
|
4
|
+
type Exercice = {
|
|
5
|
+
startDate: string;
|
|
6
|
+
endDate: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Society = {
|
|
10
|
+
name: string;
|
|
11
|
+
address: string;
|
|
12
|
+
addressObject: CerfaAddress;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
type Payment = {
|
|
16
|
+
date: number;
|
|
17
|
+
phone: string;
|
|
18
|
+
isTransfer: boolean;
|
|
19
|
+
isCheck: boolean;
|
|
20
|
+
isElectronicPayment: boolean;
|
|
21
|
+
contribution: number;
|
|
22
|
+
limitDate: number;
|
|
23
|
+
amountToInpute: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
type Administration = {
|
|
27
|
+
amount: number;
|
|
28
|
+
date: string;
|
|
29
|
+
operationNumber: number;
|
|
30
|
+
receptionDate: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type BaseRateAndAmount = {
|
|
34
|
+
base: number;
|
|
35
|
+
rate: number;
|
|
36
|
+
amount: number;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export class Cerfa2571_2023 {
|
|
40
|
+
siren: string;
|
|
41
|
+
exercice: Exercice;
|
|
42
|
+
society: Society;
|
|
43
|
+
companyTax: {
|
|
44
|
+
imputations: {
|
|
45
|
+
default: number;
|
|
46
|
+
job: number;
|
|
47
|
+
deficit: number;
|
|
48
|
+
corse: number;
|
|
49
|
+
search: number;
|
|
50
|
+
patronage: number;
|
|
51
|
+
outerSea: number;
|
|
52
|
+
collaborativeSearch: number;
|
|
53
|
+
overage: number;
|
|
54
|
+
};
|
|
55
|
+
toPay: {
|
|
56
|
+
default: number;
|
|
57
|
+
rent: number;
|
|
58
|
+
social: number;
|
|
59
|
+
tax: number;
|
|
60
|
+
capitalGain: number;
|
|
61
|
+
total: number;
|
|
62
|
+
};
|
|
63
|
+
reductions: {
|
|
64
|
+
hasDefault: boolean;
|
|
65
|
+
hasSocial: boolean;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
payment: Payment;
|
|
69
|
+
administration?: Administration;
|
|
70
|
+
advances: {
|
|
71
|
+
normalRate: BaseRateAndAmount;
|
|
72
|
+
reducedRate: BaseRateAndAmount;
|
|
73
|
+
onResult: BaseRateAndAmount;
|
|
74
|
+
subTotal: number;
|
|
75
|
+
regulation: number;
|
|
76
|
+
total: number;
|
|
77
|
+
};
|
|
78
|
+
credit: {
|
|
79
|
+
job: number;
|
|
80
|
+
deficit: number;
|
|
81
|
+
corse: number;
|
|
82
|
+
search: number;
|
|
83
|
+
patronage: number;
|
|
84
|
+
outerSea: number;
|
|
85
|
+
collaborativeSearch: number;
|
|
86
|
+
overage: number;
|
|
87
|
+
default: number;
|
|
88
|
+
toPay: number;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type Prepare2571Params = {
|
|
93
|
+
idSociety: number;
|
|
94
|
+
idExercice: number;
|
|
95
|
+
values: Cerfa2571_2023,
|
|
96
|
+
idCerfaType: CerfaType.CERFA_2571_2023_A | CerfaType.CERFA_2571_2023_B | CerfaType.CERFA_2571_2023_C | CerfaType.CERFA_2571_2023_D
|
|
97
|
+
};
|
|
@@ -12,6 +12,8 @@ export class CreatePartner implements Omit<BaseEntity<ISocietyPartner>, 'idAccou
|
|
|
12
12
|
siret?: string;
|
|
13
13
|
@ApiProperty()
|
|
14
14
|
fonction: string;
|
|
15
|
+
@ApiProperty()
|
|
16
|
+
soldeInit: number;
|
|
15
17
|
@ApiProperty({
|
|
16
18
|
default: PartnerType.PHYSICAL_PARTNER,
|
|
17
19
|
description: 'You can retrieve the enum Partner Type in @core',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IsBoolean, IsOptional } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
|
+
|
|
5
|
+
export class GetPartners {
|
|
6
|
+
@ApiPropertyOptional()
|
|
7
|
+
@IsBoolean()
|
|
8
|
+
@ToBoolean()
|
|
9
|
+
@IsOptional()
|
|
10
|
+
includeDeletedPartner?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class GetPartnersCurrentAccounts {
|
|
14
|
+
@ApiProperty()
|
|
15
|
+
startDate!: Date;
|
|
16
|
+
|
|
17
|
+
@ApiProperty()
|
|
18
|
+
endDate!: Date;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class GetPartnerSolde {
|
|
22
|
+
@ApiProperty()
|
|
23
|
+
endDate!: Date;
|
|
24
|
+
|
|
25
|
+
@ApiProperty()
|
|
26
|
+
page: number;
|
|
27
|
+
|
|
28
|
+
@ApiProperty()
|
|
29
|
+
limit: number;
|
|
30
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PartnerType } from '../../../Enum/PartnerType';
|
|
2
|
+
import { IAccountingEntry } from '../../models/IAccountingEntry';
|
|
3
|
+
import { ISocietyPartner } from '../../models/ISocietyPartner';
|
|
4
|
+
|
|
5
|
+
export class ReadPartnersCurrentAccounts {
|
|
6
|
+
id: number;
|
|
7
|
+
firstname: string;
|
|
8
|
+
lastname: string;
|
|
9
|
+
company: string;
|
|
10
|
+
idPartnerType: PartnerType;
|
|
11
|
+
solde: number;
|
|
12
|
+
creditSolde: number;
|
|
13
|
+
debitSolde: number;
|
|
14
|
+
transactions: ReadPartnersCurrentAccountsTransaction[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class ReadPartnersCurrentAccountsTransaction {
|
|
18
|
+
id: number;
|
|
19
|
+
amount: number;
|
|
20
|
+
solde: number;
|
|
21
|
+
dateValue: string;
|
|
22
|
+
designation: string;
|
|
23
|
+
entries: IAccountingEntry[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class ReadPartnerSolde {
|
|
27
|
+
partner: ISocietyPartner;
|
|
28
|
+
solde: number;
|
|
29
|
+
creditSolde: number;
|
|
30
|
+
debitSolde: number;
|
|
31
|
+
}
|
|
@@ -12,6 +12,8 @@ export class UpdatePartner implements Omit<BaseEntity<ISocietyPartner>, 'idAccou
|
|
|
12
12
|
siret?: string;
|
|
13
13
|
@ApiProperty()
|
|
14
14
|
fonction: string;
|
|
15
|
+
@ApiProperty()
|
|
16
|
+
soldeInit: number;
|
|
15
17
|
@ApiProperty({
|
|
16
18
|
default: PartnerType.PHYSICAL_PARTNER,
|
|
17
19
|
description: 'You can retrieve the enum Partner Type in @core',
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IsEnum, IsOptional, IsBoolean, IsNumber, Min,
|
|
2
|
+
IsEnum, IsOptional, IsBoolean, IsNumber, Min, IsDateString,
|
|
3
3
|
} from 'class-validator';
|
|
4
4
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
5
5
|
import { CerfaType } from '../../../Enum/CerfaType';
|
|
6
6
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
7
|
+
import { Rof } from '../../../Enum/Aspone';
|
|
7
8
|
|
|
8
9
|
export class CreateRegistrationSetting {
|
|
9
10
|
@ApiPropertyOptional()
|
|
@@ -13,6 +14,53 @@ export class CreateRegistrationSetting {
|
|
|
13
14
|
bic?: string | null;
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
export class CreateRegistrationSettingFromSociety {
|
|
18
|
+
@ApiPropertyOptional()
|
|
19
|
+
rof: Rof | null;
|
|
20
|
+
|
|
21
|
+
@ApiPropertyOptional()
|
|
22
|
+
companyTaxRof: Rof | null;
|
|
23
|
+
|
|
24
|
+
@ApiPropertyOptional()
|
|
25
|
+
ogaName: string | null;
|
|
26
|
+
|
|
27
|
+
@ApiPropertyOptional()
|
|
28
|
+
ogaId: string | null;
|
|
29
|
+
|
|
30
|
+
@ApiPropertyOptional()
|
|
31
|
+
ogaAddressNumero: string | null;
|
|
32
|
+
|
|
33
|
+
@ApiPropertyOptional()
|
|
34
|
+
ogaAddressType: string | null;
|
|
35
|
+
|
|
36
|
+
@ApiPropertyOptional()
|
|
37
|
+
ogaAddressVoie: string | null;
|
|
38
|
+
|
|
39
|
+
@ApiPropertyOptional()
|
|
40
|
+
ogaAddressZipCode: string | null;
|
|
41
|
+
|
|
42
|
+
@ApiPropertyOptional()
|
|
43
|
+
ogaAddressCity: string | null;
|
|
44
|
+
|
|
45
|
+
@ApiPropertyOptional()
|
|
46
|
+
ogaReference: string | null;
|
|
47
|
+
|
|
48
|
+
@ApiPropertyOptional()
|
|
49
|
+
iban: string | null;
|
|
50
|
+
|
|
51
|
+
@ApiPropertyOptional()
|
|
52
|
+
bic: string | null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type ForcedValues_2571 = {
|
|
56
|
+
base?: number;
|
|
57
|
+
regularisation?: number;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export type ForcedValues = {
|
|
61
|
+
cerfa2571?: ForcedValues_2571;
|
|
62
|
+
};
|
|
63
|
+
|
|
16
64
|
export class CreateRegistration {
|
|
17
65
|
@ApiProperty()
|
|
18
66
|
@IsEnum(CerfaType)
|
|
@@ -24,11 +72,20 @@ export class CreateRegistration {
|
|
|
24
72
|
@IsOptional()
|
|
25
73
|
amountToPay?: number;
|
|
26
74
|
|
|
75
|
+
@ApiPropertyOptional()
|
|
76
|
+
@IsDateString()
|
|
77
|
+
@IsOptional()
|
|
78
|
+
date?: string;
|
|
79
|
+
|
|
27
80
|
@ApiPropertyOptional()
|
|
28
81
|
@IsBoolean()
|
|
29
82
|
@ToBoolean()
|
|
30
83
|
@IsOptional()
|
|
31
84
|
isTest?: boolean;
|
|
85
|
+
|
|
86
|
+
@ApiPropertyOptional({ description: 'Set values manually (not available for all cerfa)' })
|
|
87
|
+
@IsOptional()
|
|
88
|
+
forcedValues?: ForcedValues;
|
|
32
89
|
}
|
|
33
90
|
|
|
34
91
|
export class CreateRegistrationSynchronization {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsBoolean } from 'class-validator';
|
|
1
|
+
import { IsBoolean, IsNumber, IsOptional } from 'class-validator';
|
|
2
2
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
3
|
import { TaxType, TaxState, TaxCredit } from '../../../Enum/Tax';
|
|
4
4
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
@@ -31,4 +31,9 @@ export class CreateTax {
|
|
|
31
31
|
@IsBoolean()
|
|
32
32
|
@ToBoolean()
|
|
33
33
|
isOrphan?: boolean;
|
|
34
|
+
|
|
35
|
+
@ApiPropertyOptional({ description: 'Acceptance id mail' })
|
|
36
|
+
@IsNumber()
|
|
37
|
+
@IsOptional()
|
|
38
|
+
idMail?: number | null;
|
|
34
39
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BasePaginate, IExercice, ISociety } from '../../..';
|
|
1
2
|
import { ICustomerIsRegime } from '../../models/ICustomerIsRegime';
|
|
2
3
|
|
|
3
4
|
export interface ReadAmountBase {
|
|
@@ -31,4 +32,10 @@ export type ReadVatAmountDetail = { idVat: number; real: number; collected: numb
|
|
|
31
32
|
export type ReadVatAmount = {
|
|
32
33
|
isBalanced: boolean;
|
|
33
34
|
details: ReadVatAmountDetail[];
|
|
34
|
-
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type ReadCompanyTaxWallet = BasePaginate<IExercice & {
|
|
38
|
+
society: ISociety;
|
|
39
|
+
taxes: ReadTaxAndData[];
|
|
40
|
+
amountBase: ReadAmountBase;
|
|
41
|
+
}>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IsOptional, IsEnum, IsNumber, IsDateString, IsString, IsArray,
|
|
3
|
+
} from 'class-validator';
|
|
2
4
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
5
|
import {
|
|
4
6
|
VatRegime, ToDoOrDone, BankCollectingState,
|
|
@@ -101,4 +103,23 @@ export class QueryTaxDeadlineStatistics {
|
|
|
101
103
|
|
|
102
104
|
@ApiPropertyOptional({ description: 'Récupérer les exercices qui ont une date de fin inférieure à X mois à partir d\'aujourd\'hui' })
|
|
103
105
|
additionalMonths?: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export class QueryCompanyTaxesByCollaborater {
|
|
109
|
+
@ApiProperty({ description: 'Id collaborater' })
|
|
110
|
+
@IsNumber()
|
|
111
|
+
idUser: number;
|
|
112
|
+
|
|
113
|
+
@ApiProperty()
|
|
114
|
+
@IsDateString()
|
|
115
|
+
startDate: string;
|
|
116
|
+
|
|
117
|
+
@ApiProperty()
|
|
118
|
+
@IsDateString()
|
|
119
|
+
endDate: string;
|
|
120
|
+
|
|
121
|
+
@ApiPropertyOptional({ description: 'Company key word' })
|
|
122
|
+
@IsString()
|
|
123
|
+
@IsOptional()
|
|
124
|
+
search?: string;
|
|
104
125
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IUser } from '../..';
|
|
2
|
+
import { IBalanceSheet } from './IBalanceSheet';
|
|
3
|
+
import { ICustomerIsRegime } from './ICustomerIsRegime';
|
|
4
|
+
|
|
5
|
+
export interface IAccountingStatementHistory {
|
|
6
|
+
id?: number;
|
|
7
|
+
idState: number;
|
|
8
|
+
idUser: number | null;
|
|
9
|
+
idBalanceSheet: number | null;
|
|
10
|
+
idCustomerIsRegime: number | null;
|
|
11
|
+
createdAt?: Date | null;
|
|
12
|
+
updatedAt?: Date | null;
|
|
13
|
+
|
|
14
|
+
// Associations
|
|
15
|
+
balanceSheet?: IBalanceSheet | null;
|
|
16
|
+
balanceSheetLiquidation?: IBalanceSheet | null;
|
|
17
|
+
balanceSheetPartial?: IBalanceSheet | null;
|
|
18
|
+
customerIsRegime?: ICustomerIsRegime | null;
|
|
19
|
+
user?: IUser | null;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ICustomerIsRegime } from './ICustomerIsRegime';
|
|
2
|
+
|
|
3
|
+
export interface ICustomerAcceptance {
|
|
4
|
+
id?: number;
|
|
5
|
+
state: number;
|
|
6
|
+
comment: string | null;
|
|
7
|
+
idCustomerIsRegime?: number | null;
|
|
8
|
+
idCustomerVat?: number | null;
|
|
9
|
+
idBalanceSheet?: number | null;
|
|
10
|
+
createdAt?: Date | null;
|
|
11
|
+
updatedAt?: Date | null;
|
|
12
|
+
|
|
13
|
+
customerIsRegime?: ICustomerIsRegime | null;
|
|
14
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IExercice } from './IExercice';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IAccountingStatementHistory, IMail, IRegistration, TaxState, TaxType,
|
|
4
|
+
} from '../..';
|
|
3
5
|
|
|
4
6
|
// customersIsRegimes
|
|
5
7
|
export interface ICustomerIsRegime {
|
|
@@ -13,10 +15,15 @@ export interface ICustomerIsRegime {
|
|
|
13
15
|
solde: number;
|
|
14
16
|
idExercice: number;
|
|
15
17
|
dateIs: Date | null;
|
|
18
|
+
token?: string | null;
|
|
16
19
|
isOrphan: boolean;
|
|
20
|
+
idMail?: number | null;
|
|
17
21
|
createdAt?: Date | null;
|
|
18
22
|
updatedAt?: Date | null;
|
|
19
23
|
|
|
20
24
|
// Associations
|
|
21
25
|
exercice?: IExercice;
|
|
26
|
+
mail?: IMail | null;
|
|
27
|
+
registrations?: IRegistration[];
|
|
28
|
+
accountingStatementHistory?: IAccountingStatementHistory[];
|
|
22
29
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IExercice } from './IExercice';
|
|
2
2
|
import { ISociety } from './ISociety';
|
|
3
3
|
import { IFile } from './IFile';
|
|
4
|
+
import { ICustomerIsRegime } from './ICustomerIsRegime';
|
|
4
5
|
|
|
5
6
|
export interface IRegistration {
|
|
6
7
|
id?: number;
|
|
@@ -13,12 +14,14 @@ export interface IRegistration {
|
|
|
13
14
|
idDeposit: string | null;
|
|
14
15
|
idExercice: number;
|
|
15
16
|
idFile?: number | null;
|
|
17
|
+
idCustomerIsRegime?: number | null;
|
|
16
18
|
idSociety: number;
|
|
17
19
|
updatedAt?: Date | null;
|
|
18
20
|
createdAt?: Date | null;
|
|
19
21
|
|
|
20
22
|
// Associations
|
|
21
23
|
exercice?: IExercice;
|
|
24
|
+
customerIsRegime?: ICustomerIsRegime;
|
|
22
25
|
society?: ISociety;
|
|
23
26
|
file?: IFile;
|
|
24
27
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { Rof } from '../../Enum/Aspone';
|
|
1
2
|
import { ISociety } from './ISociety';
|
|
2
3
|
|
|
3
4
|
// vatDeclarationSocietyDetail
|
|
4
5
|
export interface IVatDeclarationSocietyDetail {
|
|
5
6
|
id?: number;
|
|
6
|
-
|
|
7
|
+
companyTaxRof: Rof | null;
|
|
8
|
+
rof: Rof | null;
|
|
7
9
|
ogaName: string | null;
|
|
8
10
|
ogaId: string | null;
|
|
9
11
|
ogaAddressNumero: string | null;
|