@silexpert/core 1.2.30 → 1.2.32
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/dist/cjs/api/resources/CalendarEvent.d.ts +1 -1
- package/dist/cjs/api/resources/CalendarEvent.d.ts.map +1 -1
- package/dist/cjs/api/resources/CalendarEvent.js +2 -2
- package/dist/cjs/api/resources/CalendarEvent.js.map +1 -1
- package/dist/cjs/api/resources/PaymentExpectation.d.ts +4 -1
- package/dist/cjs/api/resources/PaymentExpectation.d.ts.map +1 -1
- package/dist/cjs/api/resources/PaymentExpectation.js +9 -0
- package/dist/cjs/api/resources/PaymentExpectation.js.map +1 -1
- package/dist/cjs/types/Enum/ReasonCancelSignatureRequest.d.ts +6 -0
- package/dist/cjs/types/Enum/ReasonCancelSignatureRequest.d.ts.map +1 -0
- package/dist/cjs/types/Enum/ReasonCancelSignatureRequest.js +11 -0
- package/dist/cjs/types/Enum/ReasonCancelSignatureRequest.js.map +1 -0
- package/dist/cjs/types/Interface/api/brevo/BrevoElement.d.ts +0 -3
- package/dist/cjs/types/Interface/api/brevo/BrevoElement.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/brevo/BrevoElement.js +1 -9
- package/dist/cjs/types/Interface/api/brevo/BrevoElement.js.map +1 -1
- package/dist/cjs/types/Interface/api/brevo/Read.d.ts +10 -0
- package/dist/cjs/types/Interface/api/brevo/Read.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/brevo/Read.js +3 -0
- package/dist/cjs/types/Interface/api/brevo/Read.js.map +1 -0
- package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts +24 -0
- package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Create.js +105 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/customerSignature/Query.d.ts +3 -0
- package/dist/cjs/types/Interface/api/customerSignature/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/customerSignature/Query.js +4 -0
- package/dist/cjs/types/Interface/api/customerSignature/Query.js.map +1 -1
- package/dist/cjs/types/Interface/api/paymentExpectation/QueryPaymentExpectation.d.ts +7 -0
- package/dist/cjs/types/Interface/api/paymentExpectation/QueryPaymentExpectation.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/paymentExpectation/QueryPaymentExpectation.js +27 -1
- package/dist/cjs/types/Interface/api/paymentExpectation/QueryPaymentExpectation.js.map +1 -1
- package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.d.ts +5 -1
- package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js +6 -1
- package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js.map +1 -1
- package/dist/cjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.d.ts +5 -2
- package/dist/cjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.js.map +1 -1
- package/dist/cjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts +1 -0
- package/dist/cjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.js +6 -0
- package/dist/cjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.js.map +1 -1
- package/dist/cjs/types/Interface/models/IGeneralConditionOfSale.d.ts +13 -0
- package/dist/cjs/types/Interface/models/IGeneralConditionOfSale.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/IGeneralConditionOfSale.js +3 -0
- package/dist/cjs/types/Interface/models/IGeneralConditionOfSale.js.map +1 -0
- package/dist/cjs/types/Interface/models/IPaymentExpectation.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IPaymentExpectation.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IPaymentExpectation.js.map +1 -1
- package/dist/cjs/types/Interface/models/ISaleDocumentTemplate.d.ts +16 -0
- package/dist/cjs/types/Interface/models/ISaleDocumentTemplate.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/ISaleDocumentTemplate.js +3 -0
- package/dist/cjs/types/Interface/models/ISaleDocumentTemplate.js.map +1 -0
- package/dist/cjs/types/index.d.ts +4 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +4 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/saleEmail.js +1 -1
- package/dist/cjs/utils/commercialManagement/saleEmail.js.map +1 -1
- package/dist/mjs/api/resources/CalendarEvent.d.ts +1 -1
- package/dist/mjs/api/resources/CalendarEvent.d.ts.map +1 -1
- package/dist/mjs/api/resources/CalendarEvent.js +2 -2
- package/dist/mjs/api/resources/CalendarEvent.js.map +1 -1
- package/dist/mjs/api/resources/PaymentExpectation.d.ts +4 -1
- package/dist/mjs/api/resources/PaymentExpectation.d.ts.map +1 -1
- package/dist/mjs/api/resources/PaymentExpectation.js +9 -0
- package/dist/mjs/api/resources/PaymentExpectation.js.map +1 -1
- package/dist/mjs/types/Enum/ReasonCancelSignatureRequest.d.ts +6 -0
- package/dist/mjs/types/Enum/ReasonCancelSignatureRequest.d.ts.map +1 -0
- package/dist/mjs/types/Enum/ReasonCancelSignatureRequest.js +8 -0
- package/dist/mjs/types/Enum/ReasonCancelSignatureRequest.js.map +1 -0
- package/dist/mjs/types/Interface/api/brevo/BrevoElement.d.ts +0 -3
- package/dist/mjs/types/Interface/api/brevo/BrevoElement.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/brevo/BrevoElement.js +0 -8
- package/dist/mjs/types/Interface/api/brevo/BrevoElement.js.map +1 -1
- package/dist/mjs/types/Interface/api/brevo/Read.d.ts +10 -0
- package/dist/mjs/types/Interface/api/brevo/Read.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/brevo/Read.js +2 -0
- package/dist/mjs/types/Interface/api/brevo/Read.js.map +1 -0
- package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts +24 -0
- package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Create.js +118 -2
- package/dist/mjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/customerSignature/Query.d.ts +3 -0
- package/dist/mjs/types/Interface/api/customerSignature/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/customerSignature/Query.js +5 -0
- package/dist/mjs/types/Interface/api/customerSignature/Query.js.map +1 -1
- package/dist/mjs/types/Interface/api/paymentExpectation/QueryPaymentExpectation.d.ts +7 -0
- package/dist/mjs/types/Interface/api/paymentExpectation/QueryPaymentExpectation.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/paymentExpectation/QueryPaymentExpectation.js +31 -2
- package/dist/mjs/types/Interface/api/paymentExpectation/QueryPaymentExpectation.js.map +1 -1
- package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.d.ts +5 -1
- package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js +11 -2
- package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js.map +1 -1
- package/dist/mjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.d.ts +5 -2
- package/dist/mjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.js.map +1 -1
- package/dist/mjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts +1 -0
- package/dist/mjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.js +9 -1
- package/dist/mjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.js.map +1 -1
- package/dist/mjs/types/Interface/models/IGeneralConditionOfSale.d.ts +13 -0
- package/dist/mjs/types/Interface/models/IGeneralConditionOfSale.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IGeneralConditionOfSale.js +2 -0
- package/dist/mjs/types/Interface/models/IGeneralConditionOfSale.js.map +1 -0
- package/dist/mjs/types/Interface/models/IPaymentExpectation.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IPaymentExpectation.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IPaymentExpectation.js.map +1 -1
- package/dist/mjs/types/Interface/models/ISaleDocumentTemplate.d.ts +16 -0
- package/dist/mjs/types/Interface/models/ISaleDocumentTemplate.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/ISaleDocumentTemplate.js +2 -0
- package/dist/mjs/types/Interface/models/ISaleDocumentTemplate.js.map +1 -0
- package/dist/mjs/types/index.d.ts +4 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +4 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/saleEmail.js +1 -1
- package/dist/mjs/utils/commercialManagement/saleEmail.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/CalendarEvent.ts +2 -2
- package/ts/api/resources/PaymentExpectation.ts +13 -1
- package/ts/types/Enum/ReasonCancelSignatureRequest.ts +5 -0
- package/ts/types/Interface/api/brevo/BrevoElement.ts +0 -6
- package/ts/types/Interface/api/brevo/Read.ts +10 -0
- package/ts/types/Interface/api/commercialManagement/Create.ts +85 -1
- package/ts/types/Interface/api/customerSignature/Query.ts +5 -0
- package/ts/types/Interface/api/paymentExpectation/QueryPaymentExpectation.ts +23 -2
- package/ts/types/Interface/api/previsionalForm/CreatePrevisionalForm.ts +10 -3
- package/ts/types/Interface/api/previsionalForm/PrevisionalFormPayload.ts +6 -2
- package/ts/types/Interface/api/vatDeclaration/QueryVatDeclaration.ts +7 -1
- package/ts/types/Interface/models/IGeneralConditionOfSale.ts +15 -0
- package/ts/types/Interface/models/IPaymentExpectation.ts +2 -0
- package/ts/types/Interface/models/ISaleDocumentTemplate.ts +18 -0
- package/ts/types/index.ts +4 -0
- package/ts/utils/commercialManagement/saleEmail.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.32",
|
|
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": "dist/cjs/index.js",
|
|
@@ -45,8 +45,8 @@ export class CalendarEvent extends Resource {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
compareCalendarCall(params: QueryCalendarEventCall): Promise<ReadCalendarEventCall> {
|
|
49
|
-
return this.axios.$get('/calendar-events/compare-calendar-call', { params });
|
|
48
|
+
compareCalendarCall(params: QueryCalendarEventCall, signal?: AbortSignal): Promise<ReadCalendarEventCall> {
|
|
49
|
+
return this.axios.$get('/calendar-events/compare-calendar-call', { params, ...(signal ? { signal } : {}) });
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
update(id: number, payload: UpdateCalendarEvent): Promise<ICalendarEvent> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreatePaymentExpecation, IPaymentExpectation, QueryGetPaymentExpectation } from '../../types';
|
|
1
|
+
import { BasePaginate, CreatePaymentExpecation, IPaymentExpectation, QueryGetPaymentExpectation, QueryGetPaymentExpectationPaginated } from '../../types';
|
|
2
2
|
import { Resource } from '../Resource';
|
|
3
3
|
|
|
4
4
|
export class PaymentExpectation extends Resource {
|
|
@@ -6,10 +6,22 @@ export class PaymentExpectation extends Resource {
|
|
|
6
6
|
return this.axios.$get('/payment-expectations', { params });
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
getPaginate(params: QueryGetPaymentExpectationPaginated, signal?: AbortSignal): Promise<BasePaginate<IPaymentExpectation>> {
|
|
10
|
+
return this.axios.$get('/payment-expectations/paginate', { params, ...(signal ? { signal } : {}) });
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
create(idSociety: number, payload: CreatePaymentExpecation): Promise<IPaymentExpectation> {
|
|
10
14
|
return this.axios.$post(`/societies/${idSociety}/payment-expectations`, payload);
|
|
11
15
|
}
|
|
12
16
|
|
|
17
|
+
update(id: number, payload: Partial<IPaymentExpectation>): Promise<IPaymentExpectation> {
|
|
18
|
+
return this.axios.$patch(`/payment-expectations/${id}`, payload);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
delete(id: number): Promise<boolean> {
|
|
22
|
+
return this.axios.$delete(`/payment-expectations/${id}`);
|
|
23
|
+
}
|
|
24
|
+
|
|
13
25
|
/**
|
|
14
26
|
* Update only one paymentExpectation, linked to prestation
|
|
15
27
|
* @param idPrestation
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IsArray, IsBoolean, IsDateString, IsEnum, IsInt, IsNumber, IsOptional, IsString, Min,
|
|
2
|
+
IsArray, IsBoolean, IsDateString, IsEnum, IsIn, IsInt, IsNumber, IsObject, IsOptional, IsString, Min,
|
|
3
3
|
} from 'class-validator';
|
|
4
4
|
import { IFile, ReadProductEditing } from '../../..';
|
|
5
5
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
@@ -608,4 +608,88 @@ export class UpdateSaleEmail {
|
|
|
608
608
|
@IsBoolean()
|
|
609
609
|
@ToBoolean()
|
|
610
610
|
isDefault?: boolean;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export class CreateGeneralConditionOfSale {
|
|
614
|
+
@ApiProperty()
|
|
615
|
+
@IsString()
|
|
616
|
+
name: string;
|
|
617
|
+
|
|
618
|
+
@ApiProperty()
|
|
619
|
+
@IsString()
|
|
620
|
+
content: string;
|
|
621
|
+
|
|
622
|
+
@ApiProperty()
|
|
623
|
+
@IsBoolean()
|
|
624
|
+
@ToBoolean()
|
|
625
|
+
isDefault: boolean;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export class UpdateGeneralConditionOfSale {
|
|
629
|
+
@ApiPropertyOptional()
|
|
630
|
+
@IsOptional()
|
|
631
|
+
@IsString()
|
|
632
|
+
name?: string;
|
|
633
|
+
|
|
634
|
+
@ApiPropertyOptional()
|
|
635
|
+
@IsOptional()
|
|
636
|
+
@IsString()
|
|
637
|
+
content?: string;
|
|
638
|
+
|
|
639
|
+
@ApiPropertyOptional()
|
|
640
|
+
@IsOptional()
|
|
641
|
+
@IsBoolean()
|
|
642
|
+
@ToBoolean()
|
|
643
|
+
isDefault?: boolean;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
export class CreateSaleDocumentTemplate {
|
|
647
|
+
@ApiProperty()
|
|
648
|
+
@IsIn(Object.values(InvoiceLanguage))
|
|
649
|
+
language: InvoiceLanguage;
|
|
650
|
+
|
|
651
|
+
@ApiProperty()
|
|
652
|
+
@IsString()
|
|
653
|
+
name: string;
|
|
654
|
+
|
|
655
|
+
@ApiProperty()
|
|
656
|
+
@IsObject()
|
|
657
|
+
template: CreateInvoiceDocument | CreatePreSaleDocument;
|
|
658
|
+
|
|
659
|
+
@ApiProperty()
|
|
660
|
+
@IsEnum(EstimateInvoiceType)
|
|
661
|
+
idEstimateInvoiceType: EstimateInvoiceType;
|
|
662
|
+
|
|
663
|
+
@ApiProperty()
|
|
664
|
+
@IsBoolean()
|
|
665
|
+
@ToBoolean()
|
|
666
|
+
isDefault: boolean;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
export class UpdateSaleDocumentTemplate {
|
|
670
|
+
@ApiPropertyOptional()
|
|
671
|
+
@IsOptional()
|
|
672
|
+
@IsIn(Object.values(InvoiceLanguage))
|
|
673
|
+
language?: InvoiceLanguage;
|
|
674
|
+
|
|
675
|
+
@ApiPropertyOptional()
|
|
676
|
+
@IsOptional()
|
|
677
|
+
@IsString()
|
|
678
|
+
name?: string;
|
|
679
|
+
|
|
680
|
+
@ApiPropertyOptional()
|
|
681
|
+
@IsOptional()
|
|
682
|
+
@IsObject()
|
|
683
|
+
template?: CreateInvoiceDocument | CreatePreSaleDocument;
|
|
684
|
+
|
|
685
|
+
@ApiPropertyOptional()
|
|
686
|
+
@IsOptional()
|
|
687
|
+
@IsEnum(EstimateInvoiceType)
|
|
688
|
+
idEstimateInvoiceType?: number;
|
|
689
|
+
|
|
690
|
+
@ApiPropertyOptional()
|
|
691
|
+
@IsOptional()
|
|
692
|
+
@IsBoolean()
|
|
693
|
+
@ToBoolean()
|
|
694
|
+
isDefault?: boolean;
|
|
611
695
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IsDate, IsInt, IsOptional, IsString } from 'class-validator';
|
|
2
2
|
import { ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { WhereOptions } from 'sequelize';
|
|
4
|
+
import { ICustomerSignature } from '../../models/ICustomerSignature';
|
|
3
5
|
|
|
4
6
|
export class QueryCustomerSignature {
|
|
5
7
|
@ApiPropertyOptional()
|
|
@@ -86,4 +88,7 @@ export class QueryCustomerSignature {
|
|
|
86
88
|
@IsOptional()
|
|
87
89
|
@IsString({ each: true })
|
|
88
90
|
includes?: string[];
|
|
91
|
+
|
|
92
|
+
@ApiPropertyOptional()
|
|
93
|
+
where?: WhereOptions<ICustomerSignature>;
|
|
89
94
|
}
|
|
@@ -1,8 +1,29 @@
|
|
|
1
|
-
import { IsInt } from 'class-validator';
|
|
2
|
-
import { ApiProperty } from '../../../../utils';
|
|
1
|
+
import { IsDate, IsInt, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { RequiredQueryPaginate } from '../BasePaginate';
|
|
3
4
|
|
|
4
5
|
export class QueryGetPaymentExpectation {
|
|
5
6
|
@ApiProperty()
|
|
6
7
|
@IsInt()
|
|
7
8
|
idPrestation: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class QueryGetPaymentExpectationPaginated extends RequiredQueryPaginate {
|
|
12
|
+
@ApiPropertyOptional()
|
|
13
|
+
@IsString()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
search?: string;
|
|
16
|
+
|
|
17
|
+
@ApiPropertyOptional()
|
|
18
|
+
@IsString()
|
|
19
|
+
@IsOptional()
|
|
20
|
+
searchAmount?: string;
|
|
21
|
+
|
|
22
|
+
@ApiProperty()
|
|
23
|
+
@IsDate()
|
|
24
|
+
startDate: Date;
|
|
25
|
+
|
|
26
|
+
@ApiProperty()
|
|
27
|
+
@IsDate()
|
|
28
|
+
endDate: Date;
|
|
8
29
|
}
|
|
@@ -2,7 +2,7 @@ import { LegalFormTypeEnum } from '../../../Enum/LegalForm';
|
|
|
2
2
|
import { TaxSystem } from '../../../Enum/TaxSystem';
|
|
3
3
|
import { LoanInformation, NumberFiscalYears, OptionNumberFiscalYears, PrevisionalFormActivity, PrevisionalFormPayload } from '../../..';
|
|
4
4
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
5
|
-
import { IsNumber, IsBoolean, IsEnum, IsOptional, ValidateNested, IsIn } from 'class-validator';
|
|
5
|
+
import { IsNumber, IsBoolean, IsEnum, IsOptional, ValidateNested, IsIn, IsString } from 'class-validator';
|
|
6
6
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
7
7
|
|
|
8
8
|
export class NumberFiscalYearsValidation implements NumberFiscalYears {
|
|
@@ -132,8 +132,8 @@ export class CreatePrevisionalFormData implements PrevisionalFormPayload {
|
|
|
132
132
|
@ValidateNested()
|
|
133
133
|
outsourcing: Required<NumberFiscalYearsValidation>[];
|
|
134
134
|
|
|
135
|
-
@
|
|
136
|
-
merchandisePurchase
|
|
135
|
+
@ApiPropertyOptional()
|
|
136
|
+
merchandisePurchase?: OptionNumberFiscalYears[];
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* Consommables
|
|
@@ -239,6 +239,13 @@ export class CreatePrevisionalFormData implements PrevisionalFormPayload {
|
|
|
239
239
|
|
|
240
240
|
@ApiProperty()
|
|
241
241
|
otherTaxes: NumberFiscalYears | undefined;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Récapitulatif
|
|
245
|
+
*/
|
|
246
|
+
@ApiProperty()
|
|
247
|
+
@IsString()
|
|
248
|
+
summary: string;
|
|
242
249
|
}
|
|
243
250
|
|
|
244
251
|
export class CreatePrevisionalForm {
|
|
@@ -49,7 +49,7 @@ export interface Financing {
|
|
|
49
49
|
|
|
50
50
|
export interface Turnover {
|
|
51
51
|
turnover: Required<NumberFiscalYears>[]; // Ventes de marchandises / Ventes de matières premières / Ventes de prestations de services
|
|
52
|
-
merchandisePurchase
|
|
52
|
+
merchandisePurchase?: OptionNumberFiscalYears[]; // Achats de marchandises / matières premières
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export interface Charges {
|
|
@@ -92,4 +92,8 @@ export interface SocialAndRemuneration {
|
|
|
92
92
|
remunerationManager: NumberFiscalYears; // Rémunération gérant
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
export interface
|
|
95
|
+
export interface ProjectSummary {
|
|
96
|
+
summary: string // Récapitulatif du projet
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface PrevisionalFormPayload extends CompanyDescription, Investment, Financing, Turnover, Charges, Taxes, Consumables, OtherCharges, SocialAndRemuneration, ProjectSummary {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IsDate, IsDateString, IsEnum, IsNumber, IsOptional, IsString,
|
|
2
|
+
IsDate, IsDateString, IsEnum, IsIn, IsNumber, IsOptional, IsString,
|
|
3
3
|
} from 'class-validator';
|
|
4
4
|
import { CerfaType } from '../../../Enum/CerfaType';
|
|
5
5
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
|
|
@@ -54,4 +54,10 @@ export class QueryVatEntry {
|
|
|
54
54
|
@IsString()
|
|
55
55
|
@IsOptional()
|
|
56
56
|
type?: 'collected' | 'deductible';
|
|
57
|
+
|
|
58
|
+
// TODO: Passer le paramètre en requis une fois le front mis à jour
|
|
59
|
+
@ApiPropertyOptional()
|
|
60
|
+
@IsIn(Object.values(CerfaType))
|
|
61
|
+
@IsOptional()
|
|
62
|
+
idCerfaType?: CerfaType;
|
|
57
63
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ISociety } from './ISociety';
|
|
2
|
+
|
|
3
|
+
export interface IGeneralConditionOfSale {
|
|
4
|
+
id?: number;
|
|
5
|
+
name: string;
|
|
6
|
+
content: string;
|
|
7
|
+
isDefault: boolean;
|
|
8
|
+
idSociety?: number | null;
|
|
9
|
+
createdAt?: Date | null;
|
|
10
|
+
updatedAt?: Date | null;
|
|
11
|
+
deletedAt?: Date | null;
|
|
12
|
+
|
|
13
|
+
// Associations
|
|
14
|
+
society?: ISociety
|
|
15
|
+
}
|
|
@@ -15,6 +15,8 @@ export interface IPaymentExpectation {
|
|
|
15
15
|
idSociety: number;
|
|
16
16
|
idRegulation: number | null;
|
|
17
17
|
idPrestation: number | null;
|
|
18
|
+
idUserNotifyPaiementProceed?: number | null;
|
|
19
|
+
idUserTaskPaiementProceed?: number | null;
|
|
18
20
|
createdAt?: Date | null;
|
|
19
21
|
updatedAt?: Date | null;
|
|
20
22
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CreateInvoiceDocument, CreatePreSaleDocument, InvoiceLanguage } from '../..';
|
|
2
|
+
import { EstimateInvoiceType } from '../../Enum/EstimateInvoice';
|
|
3
|
+
import { ISociety } from './ISociety';
|
|
4
|
+
|
|
5
|
+
export interface ISaleDocumentTemplate {
|
|
6
|
+
id?: number;
|
|
7
|
+
name: string;
|
|
8
|
+
language: InvoiceLanguage;
|
|
9
|
+
template: CreateInvoiceDocument | CreatePreSaleDocument;
|
|
10
|
+
idEstimateInvoiceType: EstimateInvoiceType;
|
|
11
|
+
isDefault: boolean;
|
|
12
|
+
idSociety: number;
|
|
13
|
+
createdAt?: Date | null;
|
|
14
|
+
updatedAt?: Date | null;
|
|
15
|
+
|
|
16
|
+
// association
|
|
17
|
+
society?: ISociety
|
|
18
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -339,6 +339,8 @@ export * from './Interface/models/IPrevisionalForm';
|
|
|
339
339
|
export * from './Interface/models/IHumanResourceLibrary';
|
|
340
340
|
export * from './Interface/models/IUserHumanResourceLibrary';
|
|
341
341
|
export * from './Interface/models/ISaleEmail';
|
|
342
|
+
export * from './Interface/models/IGeneralConditionOfSale';
|
|
343
|
+
export * from './Interface/models/ISaleDocumentTemplate';
|
|
342
344
|
|
|
343
345
|
|
|
344
346
|
// Schemas
|
|
@@ -561,6 +563,7 @@ export * from './Enum/PaymentRecovery';
|
|
|
561
563
|
export * from './Enum/JuridicalSociety';
|
|
562
564
|
export * from './Enum/Pdf2PicLocalType';
|
|
563
565
|
export * from './Enum/DocumentForHumanResourceType';
|
|
566
|
+
export * from './Enum/ReasonCancelSignatureRequest';
|
|
564
567
|
|
|
565
568
|
// Interfaces API
|
|
566
569
|
export * from './Interface/api/exercice/ReadExercice';
|
|
@@ -1097,6 +1100,7 @@ export * from './Interface/api/userRoomEquipment/CreateSignature';
|
|
|
1097
1100
|
export * from './Interface/api/paymentExpectation/CreatePaymentExpecation';
|
|
1098
1101
|
export * from './Interface/api/expertAnnuary/Query';
|
|
1099
1102
|
export * from './Interface/api/brevo/BrevoElement';
|
|
1103
|
+
export * from './Interface/api/brevo/Read';
|
|
1100
1104
|
export * from './Interface/api/bankAccount/Create';
|
|
1101
1105
|
export * from './Interface/api/echo/Mission';
|
|
1102
1106
|
export * from './Interface/api/echo/CreateOrder';
|
|
@@ -13,9 +13,9 @@ export function transformModelWithCharcodeToString(datas: InfoToUseType, templat
|
|
|
13
13
|
// this regex match the carac with []
|
|
14
14
|
const reg = /\[(.*?)\]/g;
|
|
15
15
|
|
|
16
|
-
const charcodesFound = template.match(reg) ?? [];
|
|
16
|
+
const charcodesFound: RegExpMatchArray | [] = template.match(reg) ?? [];
|
|
17
17
|
const charcodesFoundWithoutBrackets: string[] = [];
|
|
18
|
-
charcodesFound
|
|
18
|
+
charcodesFound.forEach((f) => charcodesFoundWithoutBrackets.push(f.replace(/[\[\]']+/g, '')));
|
|
19
19
|
|
|
20
20
|
// we get the list of matching key template with key data
|
|
21
21
|
const charcodesDetected = emailTemplateVariableAffiliatedData.filter((data) => intersection(emailTemplateVariableAffiliatedData.map((d) => d.name), charcodesFoundWithoutBrackets).includes(data.name));
|