@silexpert/core 1.3.30-0 → 1.3.30-1
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/Ai.d.ts +2 -2
- package/dist/cjs/api/resources/Ai.d.ts.map +1 -1
- package/dist/cjs/api/resources/Ai.js +2 -2
- package/dist/cjs/api/resources/Ai.js.map +1 -1
- package/dist/cjs/api/resources/AnalyticsUtm.d.ts +10 -0
- package/dist/cjs/api/resources/AnalyticsUtm.d.ts.map +1 -0
- package/dist/cjs/api/resources/AnalyticsUtm.js +16 -0
- package/dist/cjs/api/resources/AnalyticsUtm.js.map +1 -0
- package/dist/cjs/api/resources/PaymentExpectation.d.ts +16 -1
- package/dist/cjs/api/resources/PaymentExpectation.d.ts.map +1 -1
- package/dist/cjs/api/resources/PaymentExpectation.js +20 -0
- package/dist/cjs/api/resources/PaymentExpectation.js.map +1 -1
- package/dist/cjs/api/resources/statistic/Legal.d.ts +11 -0
- package/dist/cjs/api/resources/statistic/Legal.d.ts.map +1 -0
- package/dist/cjs/api/resources/statistic/Legal.js +16 -0
- package/dist/cjs/api/resources/statistic/Legal.js.map +1 -0
- package/dist/cjs/api/resources.d.ts +4 -0
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +4 -0
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/Enum/StatisticType.d.ts +2 -1
- package/dist/cjs/types/Enum/StatisticType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/StatisticType.js +1 -0
- package/dist/cjs/types/Enum/StatisticType.js.map +1 -1
- package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -1
- package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.js +1 -1
- package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
- package/dist/cjs/types/Interface/api/accountingTransaction/QueryTransaction.d.ts +1 -1
- package/dist/cjs/types/Interface/api/accountingTransaction/QueryTransaction.js +1 -1
- package/dist/cjs/types/Interface/api/accountingTransaction/QueryTransaction.js.map +1 -1
- package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts +6 -0
- package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.js +29 -1
- package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.js.map +1 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts +6 -2
- package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Create.js +5 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +3 -0
- package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +1 -1
- package/dist/cjs/types/Interface/api/statistic/QueryInternal.d.ts +3 -0
- package/dist/cjs/types/Interface/api/statistic/QueryInternal.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/statistic/QueryInternal.js +10 -1
- package/dist/cjs/types/Interface/api/statistic/QueryInternal.js.map +1 -1
- package/dist/cjs/types/Interface/api/statistic/QueryLegal.d.ts +6 -0
- package/dist/cjs/types/Interface/api/statistic/QueryLegal.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/statistic/QueryLegal.js +33 -0
- package/dist/cjs/types/Interface/api/statistic/QueryLegal.js.map +1 -0
- package/dist/cjs/types/Interface/api/stripe/Create.d.ts +8 -0
- package/dist/cjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/stripe/Create.js +27 -1
- package/dist/cjs/types/Interface/api/stripe/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/stripe/QueryStripe.d.ts +3 -0
- package/dist/cjs/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/stripe/QueryStripe.js +9 -1
- package/dist/cjs/types/Interface/api/stripe/QueryStripe.js.map +1 -1
- package/dist/cjs/types/Interface/models/IAIConversation.d.ts +11 -0
- package/dist/cjs/types/Interface/models/IAIConversation.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/IAIConversation.js +3 -0
- package/dist/cjs/types/Interface/models/IAIConversation.js.map +1 -0
- package/dist/cjs/types/Interface/models/IAIQuestion.d.ts +5 -5
- package/dist/cjs/types/Interface/models/IAIQuestion.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IAIQuestion.js.map +1 -1
- package/dist/cjs/types/Interface/models/IPrestationComplementary.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IPrestationComplementary.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IPrestationComplementary.js.map +1 -1
- package/dist/cjs/types/Interface/models/ISociety.d.ts +2 -1
- package/dist/cjs/types/Interface/models/ISociety.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/ISociety.js.map +1 -1
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +2 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/document.d.ts.map +1 -1
- package/dist/cjs/utils/commercialManagement/document.js +19 -18
- package/dist/cjs/utils/commercialManagement/document.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/templates/common.js +1 -1
- package/dist/cjs/utils/commercialManagement/templates/common.js.map +1 -1
- package/dist/mjs/api/resources/Ai.d.ts +2 -2
- package/dist/mjs/api/resources/Ai.d.ts.map +1 -1
- package/dist/mjs/api/resources/Ai.js +2 -2
- package/dist/mjs/api/resources/Ai.js.map +1 -1
- package/dist/mjs/api/resources/AnalyticsUtm.d.ts +10 -0
- package/dist/mjs/api/resources/AnalyticsUtm.d.ts.map +1 -0
- package/dist/mjs/api/resources/AnalyticsUtm.js +12 -0
- package/dist/mjs/api/resources/AnalyticsUtm.js.map +1 -0
- package/dist/mjs/api/resources/PaymentExpectation.d.ts +16 -1
- package/dist/mjs/api/resources/PaymentExpectation.d.ts.map +1 -1
- package/dist/mjs/api/resources/PaymentExpectation.js +20 -0
- package/dist/mjs/api/resources/PaymentExpectation.js.map +1 -1
- package/dist/mjs/api/resources/statistic/Legal.d.ts +11 -0
- package/dist/mjs/api/resources/statistic/Legal.d.ts.map +1 -0
- package/dist/mjs/api/resources/statistic/Legal.js +15 -0
- package/dist/mjs/api/resources/statistic/Legal.js.map +1 -0
- package/dist/mjs/api/resources.d.ts +4 -0
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +4 -0
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/Enum/StatisticType.d.ts +2 -1
- package/dist/mjs/types/Enum/StatisticType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/StatisticType.js +1 -0
- package/dist/mjs/types/Enum/StatisticType.js.map +1 -1
- package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -1
- package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.js +2 -2
- package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
- package/dist/mjs/types/Interface/api/accountingTransaction/QueryTransaction.d.ts +1 -1
- package/dist/mjs/types/Interface/api/accountingTransaction/QueryTransaction.js +2 -2
- package/dist/mjs/types/Interface/api/accountingTransaction/QueryTransaction.js.map +1 -1
- package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts +6 -0
- package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.js +33 -2
- package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.js.map +1 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts +6 -2
- package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Create.js +9 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +4 -1
- package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +1 -1
- package/dist/mjs/types/Interface/api/statistic/QueryInternal.d.ts +3 -0
- package/dist/mjs/types/Interface/api/statistic/QueryInternal.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/statistic/QueryInternal.js +9 -0
- package/dist/mjs/types/Interface/api/statistic/QueryInternal.js.map +1 -1
- package/dist/mjs/types/Interface/api/statistic/QueryLegal.d.ts +6 -0
- package/dist/mjs/types/Interface/api/statistic/QueryLegal.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/statistic/QueryLegal.js +32 -0
- package/dist/mjs/types/Interface/api/statistic/QueryLegal.js.map +1 -0
- package/dist/mjs/types/Interface/api/stripe/Create.d.ts +8 -0
- package/dist/mjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/stripe/Create.js +29 -1
- package/dist/mjs/types/Interface/api/stripe/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/stripe/QueryStripe.d.ts +3 -0
- package/dist/mjs/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/stripe/QueryStripe.js +8 -0
- package/dist/mjs/types/Interface/api/stripe/QueryStripe.js.map +1 -1
- package/dist/mjs/types/Interface/models/IAIConversation.d.ts +11 -0
- package/dist/mjs/types/Interface/models/IAIConversation.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IAIConversation.js +2 -0
- package/dist/mjs/types/Interface/models/IAIConversation.js.map +1 -0
- package/dist/mjs/types/Interface/models/IAIQuestion.d.ts +5 -5
- package/dist/mjs/types/Interface/models/IAIQuestion.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IAIQuestion.js.map +1 -1
- package/dist/mjs/types/Interface/models/IPrestationComplementary.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IPrestationComplementary.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IPrestationComplementary.js.map +1 -1
- package/dist/mjs/types/Interface/models/ISociety.d.ts +2 -1
- package/dist/mjs/types/Interface/models/ISociety.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/ISociety.js.map +1 -1
- package/dist/mjs/types/index.d.ts +2 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +2 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/document.d.ts.map +1 -1
- package/dist/mjs/utils/commercialManagement/document.js +3 -2
- package/dist/mjs/utils/commercialManagement/document.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/templates/common.js +1 -1
- package/dist/mjs/utils/commercialManagement/templates/common.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Ai.ts +3 -3
- package/ts/api/resources/AnalyticsUtm.ts +12 -0
- package/ts/api/resources/PaymentExpectation.ts +27 -0
- package/ts/api/resources/statistic/Legal.ts +16 -0
- package/ts/api/resources.ts +4 -0
- package/ts/types/Enum/StatisticType.ts +1 -0
- package/ts/types/Interface/api/accountingFiles/queryAccountingFiles.ts +1 -1
- package/ts/types/Interface/api/accountingTransaction/QueryTransaction.ts +1 -1
- package/ts/types/Interface/api/ai/AskQuestionCollaborator.ts +25 -2
- package/ts/types/Interface/api/commercialManagement/Create.ts +8 -2
- package/ts/types/Interface/api/promoCode/CreateDefaultPromoCode.ts +4 -1
- package/ts/types/Interface/api/statistic/QueryInternal.ts +7 -0
- package/ts/types/Interface/api/statistic/QueryLegal.ts +16 -0
- package/ts/types/Interface/api/stripe/Create.ts +21 -1
- package/ts/types/Interface/api/stripe/QueryStripe.ts +5 -0
- package/ts/types/Interface/models/IAIConversation.ts +13 -0
- package/ts/types/Interface/models/IAIQuestion.ts +5 -5
- package/ts/types/Interface/models/IPrestationComplementary.ts +2 -0
- package/ts/types/Interface/models/ISociety.ts +2 -0
- package/ts/types/index.ts +2 -0
- package/ts/utils/commercialManagement/document.ts +3 -2
- package/ts/utils/commercialManagement/templates/common.ts +1 -1
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BasePaginate,
|
|
3
3
|
CreatePaymentExpecation,
|
|
4
|
+
CreatePaymentIntent,
|
|
5
|
+
CreateSubscriptionSessionOff,
|
|
4
6
|
IPaymentExpectation,
|
|
5
7
|
QueryGetPaymentExpectation,
|
|
6
8
|
QueryGetPaymentExpectationPaginated,
|
|
9
|
+
RetrievePaymentMethodsParams,
|
|
7
10
|
} from '../../types';
|
|
8
11
|
import { Resource } from '../Resource';
|
|
12
|
+
import Stripe from 'stripe';
|
|
9
13
|
|
|
10
14
|
export class PaymentExpectation extends Resource {
|
|
11
15
|
get(params: QueryGetPaymentExpectation): Promise<PaymentExpectation> {
|
|
@@ -40,4 +44,27 @@ export class PaymentExpectation extends Resource {
|
|
|
40
44
|
updateByPrestation(idPrestation: number, payload: Partial<IPaymentExpectation>): Promise<IPaymentExpectation> {
|
|
41
45
|
return this.axios.$patch(`/prestations/${idPrestation}/payment-expectations`, payload);
|
|
42
46
|
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Retourne les type de paiements Stripe
|
|
50
|
+
*/
|
|
51
|
+
getAllPaymentMethods(params: RetrievePaymentMethodsParams): Promise<Stripe.PaymentMethod[]> {
|
|
52
|
+
return this.axios.$get('/stripe/payments/methods', { params });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Créé une session Stripe avec les informations client
|
|
57
|
+
* Attention : les montants sont retournés x100
|
|
58
|
+
*/
|
|
59
|
+
createSessionOff(payload: CreateSubscriptionSessionOff): Promise<Stripe.Response<Stripe.Checkout.Session>> {
|
|
60
|
+
return this.axios.$post('/stripe/payments/sessions-off', payload);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Crée une intention de paiement Stripe avec les informations de notre client
|
|
65
|
+
* Attention : les montants sont retournés x100
|
|
66
|
+
*/
|
|
67
|
+
createStripePaymentIntent(body: CreatePaymentIntent): Promise<Stripe.Response<Stripe.PaymentIntent>> {
|
|
68
|
+
return this.axios.$post('/stripe/payments/intents', body);
|
|
69
|
+
}
|
|
43
70
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Resource } from '../../Resource';
|
|
2
|
+
import { QueryLegal } from '../../../types';
|
|
3
|
+
|
|
4
|
+
export class StatisticLegal extends Resource {
|
|
5
|
+
/**
|
|
6
|
+
* Retourne les statistiques de juriste pour un utilisateur
|
|
7
|
+
* @param { QueryLegal } params
|
|
8
|
+
* @returns { JSON }
|
|
9
|
+
*/
|
|
10
|
+
public get(params: QueryLegal, signal?: AbortSignal): Promise<JSON> {
|
|
11
|
+
return this.axios.$get('/statistic-legal', {
|
|
12
|
+
...(signal ? { signal } : {}),
|
|
13
|
+
params,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
package/ts/api/resources.ts
CHANGED
|
@@ -177,6 +177,8 @@ import { Follow } from './resources/Follow';
|
|
|
177
177
|
import { AbsenceRequest } from './resources/AbsenceRequest';
|
|
178
178
|
import { CompanyMarketingInformation } from './resources/CompanyMarketingInformation';
|
|
179
179
|
import { Ai } from './resources/Ai';
|
|
180
|
+
import { StatisticLegal } from './resources/statistic/Legal';
|
|
181
|
+
import { AnalyticsUtm } from './resources/AnalyticsUtm';
|
|
180
182
|
|
|
181
183
|
export const resources = {
|
|
182
184
|
budgetInsight: BudgetInsight,
|
|
@@ -358,4 +360,6 @@ export const resources = {
|
|
|
358
360
|
absenceRequest: AbsenceRequest,
|
|
359
361
|
companyMarketingInformation: CompanyMarketingInformation,
|
|
360
362
|
ai: Ai,
|
|
363
|
+
statisticLegal: StatisticLegal,
|
|
364
|
+
analyticsUtm: AnalyticsUtm,
|
|
361
365
|
};
|
|
@@ -1,9 +1,32 @@
|
|
|
1
|
-
import { IsNotEmpty, IsString } from 'class-validator';
|
|
2
|
-
import { ApiProperty } from '../../../../utils';
|
|
1
|
+
import { IsArray, IsIn, IsInt, IsNotEmpty, IsOptional, IsString, ValidateNested } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
|
|
4
|
+
export class AskHistoryCollaborator {
|
|
5
|
+
@ApiProperty()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsIn(['assistant', 'user'])
|
|
8
|
+
role: 'assistant' | 'user';
|
|
9
|
+
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
content: string;
|
|
14
|
+
}
|
|
3
15
|
|
|
4
16
|
export class AskQuestionCollaborator {
|
|
5
17
|
@ApiProperty()
|
|
6
18
|
@IsString()
|
|
7
19
|
@IsNotEmpty()
|
|
8
20
|
question: string;
|
|
21
|
+
|
|
22
|
+
@ApiPropertyOptional()
|
|
23
|
+
@IsOptional()
|
|
24
|
+
@IsArray()
|
|
25
|
+
@ValidateNested({ each: true })
|
|
26
|
+
history?: AskHistoryCollaborator[];
|
|
27
|
+
|
|
28
|
+
@ApiPropertyOptional()
|
|
29
|
+
@IsOptional()
|
|
30
|
+
@IsInt()
|
|
31
|
+
idConversation?: number;
|
|
9
32
|
}
|
|
@@ -331,7 +331,7 @@ export class CreateCommercialSetting {
|
|
|
331
331
|
@ApiPropertyOptional()
|
|
332
332
|
@IsOptional()
|
|
333
333
|
@IsString()
|
|
334
|
-
logoUrl?: string;
|
|
334
|
+
logoUrl?: string | null;
|
|
335
335
|
|
|
336
336
|
@ApiPropertyOptional()
|
|
337
337
|
@IsOptional()
|
|
@@ -457,7 +457,13 @@ export class CommercialDocumentInputs {
|
|
|
457
457
|
generalDiscount2: number | null;
|
|
458
458
|
|
|
459
459
|
@ApiProperty({ description: 'Indemnité forfaitaire' })
|
|
460
|
-
|
|
460
|
+
recoveryCost: string | null;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* @deprecated use recoveryCost instead (exists just for old mobile version)
|
|
464
|
+
*/
|
|
465
|
+
@ApiPropertyOptional({ description: 'Indemnité forfaitaire ' })
|
|
466
|
+
compensation?: string | null;
|
|
461
467
|
|
|
462
468
|
@ApiProperty()
|
|
463
469
|
vatMention: string | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsBoolean, IsDate, IsJSON, IsString } from 'class-validator';
|
|
1
|
+
import { IsBoolean, IsDate, IsJSON, IsOptional, IsString } from 'class-validator';
|
|
2
2
|
import { ApiPropertyOptional, ApiProperty } from '../../../../utils';
|
|
3
3
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
4
|
|
|
@@ -8,10 +8,12 @@ export class CreateDefaultPromoCode {
|
|
|
8
8
|
label: string;
|
|
9
9
|
|
|
10
10
|
@ApiPropertyOptional()
|
|
11
|
+
@IsOptional()
|
|
11
12
|
@IsDate()
|
|
12
13
|
startDate?: Date | null;
|
|
13
14
|
|
|
14
15
|
@ApiPropertyOptional()
|
|
16
|
+
@IsOptional()
|
|
15
17
|
@IsDate()
|
|
16
18
|
endDate?: Date | null;
|
|
17
19
|
|
|
@@ -46,6 +48,7 @@ export class CreateDefaultPromoCode {
|
|
|
46
48
|
isTest: boolean;
|
|
47
49
|
|
|
48
50
|
@ApiPropertyOptional()
|
|
51
|
+
@IsOptional()
|
|
49
52
|
@IsJSON()
|
|
50
53
|
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
51
54
|
metadata?: any | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IsNumber, IsDate } from 'class-validator';
|
|
2
|
+
import { ApiProperty } from '../../../../utils';
|
|
3
|
+
|
|
4
|
+
export class QueryLegal {
|
|
5
|
+
@ApiProperty()
|
|
6
|
+
@IsNumber()
|
|
7
|
+
idUser: number;
|
|
8
|
+
|
|
9
|
+
@ApiProperty()
|
|
10
|
+
@IsDate()
|
|
11
|
+
startDate: Date;
|
|
12
|
+
|
|
13
|
+
@ApiProperty()
|
|
14
|
+
@IsDate()
|
|
15
|
+
endDate: Date;
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsDate, IsOptional, IsString } from 'class-validator';
|
|
1
|
+
import { IsDate, IsInt, IsOptional, IsString } from 'class-validator';
|
|
2
2
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
3
|
|
|
4
4
|
export class CreateStripeConnection {
|
|
@@ -30,3 +30,23 @@ export class CreateSubscriptionSession {
|
|
|
30
30
|
@IsString()
|
|
31
31
|
priceId: string;
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
export class CreateSubscriptionSessionOff {
|
|
35
|
+
@ApiProperty()
|
|
36
|
+
@IsString()
|
|
37
|
+
stripeCustomerId: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class CreatePaymentIntent {
|
|
41
|
+
@ApiProperty()
|
|
42
|
+
@IsString()
|
|
43
|
+
stripeCustomerId: string;
|
|
44
|
+
|
|
45
|
+
@ApiProperty()
|
|
46
|
+
@IsString()
|
|
47
|
+
paymentMethodId: string;
|
|
48
|
+
|
|
49
|
+
@ApiProperty()
|
|
50
|
+
@IsInt()
|
|
51
|
+
amountInCents: number;
|
|
52
|
+
}
|
|
@@ -11,6 +11,11 @@ export class RetrieveUpcomingInvoiceParams {
|
|
|
11
11
|
@IsString()
|
|
12
12
|
subscriptionId: string;
|
|
13
13
|
}
|
|
14
|
+
export class RetrievePaymentMethodsParams {
|
|
15
|
+
@ApiProperty()
|
|
16
|
+
@IsString()
|
|
17
|
+
customerId: string;
|
|
18
|
+
}
|
|
14
19
|
|
|
15
20
|
export class QueryStripeSession {
|
|
16
21
|
@ApiPropertyOptional()
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAIQuestion } from './IAIQuestion';
|
|
2
|
+
import { IUser } from './IUser';
|
|
3
|
+
|
|
4
|
+
export interface IAIConversation {
|
|
5
|
+
id: number;
|
|
6
|
+
idUser: number;
|
|
7
|
+
createdAt?: Date;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
|
|
10
|
+
// Associations
|
|
11
|
+
user?: IUser;
|
|
12
|
+
questions?: IAIQuestion[];
|
|
13
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAIConversation } from './IAIConversation';
|
|
2
2
|
|
|
3
3
|
export interface IAIQuestion {
|
|
4
4
|
id: number;
|
|
@@ -8,10 +8,10 @@ export interface IAIQuestion {
|
|
|
8
8
|
category: string;
|
|
9
9
|
subCategory: string;
|
|
10
10
|
totalTokens: number;
|
|
11
|
-
|
|
12
|
-
createdAt?: Date
|
|
13
|
-
updatedAt?: Date
|
|
11
|
+
idConversation: number | null; // Nullable for the first questions generated by the AI without conversation
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
updatedAt?: Date;
|
|
14
14
|
|
|
15
15
|
// Associations
|
|
16
|
-
|
|
16
|
+
conversation?: IAIConversation;
|
|
17
17
|
}
|
|
@@ -3,6 +3,7 @@ import { IPaymentExpectation } from './IPaymentExpectation';
|
|
|
3
3
|
import { IGedFile } from './IGedFile';
|
|
4
4
|
import { IPrestation } from './IPrestation';
|
|
5
5
|
import { AcceptationAdmin } from '../../Enum/AdditionnalSells';
|
|
6
|
+
import { IPrestationComplementaryHistory } from './IPrestationComplementaryHistory';
|
|
6
7
|
|
|
7
8
|
// prestationsCompl
|
|
8
9
|
export interface IPrestationComplementary {
|
|
@@ -33,4 +34,5 @@ export interface IPrestationComplementary {
|
|
|
33
34
|
prestationPaymentExpectation?: IPaymentExpectation;
|
|
34
35
|
prestationGedFile?: IGedFile;
|
|
35
36
|
prestation?: IPrestation;
|
|
37
|
+
prestationComplementaryHistory?: IPrestationComplementaryHistory[];
|
|
36
38
|
}
|
|
@@ -66,6 +66,7 @@ import {
|
|
|
66
66
|
ICalendarEvent,
|
|
67
67
|
IRegulation,
|
|
68
68
|
IGeneralConditionOfSale,
|
|
69
|
+
IConstitutionHistory,
|
|
69
70
|
} from '../..';
|
|
70
71
|
import { IBrandType } from './IBrandType';
|
|
71
72
|
import { IFile } from './IFile';
|
|
@@ -250,4 +251,5 @@ export interface ISociety {
|
|
|
250
251
|
accountingFiles?: IAccountingFile[];
|
|
251
252
|
businessSectors?: IBusinessSector[];
|
|
252
253
|
calendarEvents?: ICalendarEvent[];
|
|
254
|
+
constitutionHistories?: IConstitutionHistory[];
|
|
253
255
|
}
|
package/ts/types/index.ts
CHANGED
|
@@ -325,6 +325,7 @@ export * from './Interface/models/IScheduledReminder';
|
|
|
325
325
|
export * from './Interface/models/IReminderAttachment';
|
|
326
326
|
export * from './Interface/models/IStateBankAccount';
|
|
327
327
|
export * from './Interface/models/IAIQuestion';
|
|
328
|
+
export * from './Interface/models/IAIConversation';
|
|
328
329
|
|
|
329
330
|
// Schemas
|
|
330
331
|
export * from './Interface/schemas/IRegistrationDetail';
|
|
@@ -813,6 +814,7 @@ export * from './Interface/api/statistic/QueryGetExpertAccountant';
|
|
|
813
814
|
export * from './Interface/api/statistic/QueryAccountant';
|
|
814
815
|
export * from './Interface/api/statistic/QueryGetAccountant';
|
|
815
816
|
export * from './Interface/api/statistic/QueryDirection';
|
|
817
|
+
export * from './Interface/api/statistic/QueryLegal';
|
|
816
818
|
export * from './Interface/api/statistic/QueryInternal';
|
|
817
819
|
export * from './Interface/api/statistic/QueryGetDirection';
|
|
818
820
|
export * from './Interface/api/statistic/QueryCustomerSuccess';
|
|
@@ -73,6 +73,7 @@ export function generateCommercialDocument(
|
|
|
73
73
|
|
|
74
74
|
const accountingCategory = AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null;
|
|
75
75
|
|
|
76
|
+
const recoveryCost = payload.recoveryCost ?? payload.compensation;
|
|
76
77
|
const data: ReadDocumentEditing & { brandColors: brandColorType; brandName: string; shouldHideBrandName: boolean } = {
|
|
77
78
|
...payload,
|
|
78
79
|
thirdParty,
|
|
@@ -85,8 +86,8 @@ export function generateCommercialDocument(
|
|
|
85
86
|
termsOfPayment: payload.termsOfPayment
|
|
86
87
|
? (internationalizationConsistency(locale, payload.termsOfPayment, 'termsOfPayment') ?? payload.termsOfPayment)
|
|
87
88
|
: null,
|
|
88
|
-
|
|
89
|
-
? (internationalizationConsistency(locale,
|
|
89
|
+
recoveryCost: recoveryCost
|
|
90
|
+
? (internationalizationConsistency(locale, recoveryCost, 'recoveryCost') ?? recoveryCost)
|
|
90
91
|
: null,
|
|
91
92
|
discount: payload.discount
|
|
92
93
|
? (internationalizationConsistency(locale, payload.discount, 'discount') ?? payload.discount)
|
|
@@ -9,7 +9,7 @@ export class CommercialDocumentCommonHTML {
|
|
|
9
9
|
<% } %>`;
|
|
10
10
|
|
|
11
11
|
footer = `<div class="footer" style="font-size: 8px !important; color: #838384; text-align: center; padding: 0 40px; display: block; width: 100%;">
|
|
12
|
-
<% if (freeText) { %><%- freeText %><br/><br/><% } %><% if (accountingCategoryFormatted) {%><%= accountingCategoryFormatted %> | <%}%><% if(marginVats.length > 0) { %><%= languageTemplate.template.common.footer.marginVat %> - <% marginVats.forEach(function(v, index) { %><%= v %> - <% }) %><%= languageTemplate.template.common.footer.legalVatMention %> | <% } %><% if(penalties ||
|
|
12
|
+
<% if (freeText) { %><%- freeText %><br/><br/><% } %><% if (accountingCategoryFormatted) {%><%= accountingCategoryFormatted %> | <%}%><% if(marginVats.length > 0) { %><%= languageTemplate.template.common.footer.marginVat %> - <% marginVats.forEach(function(v, index) { %><%= v %> - <% }) %><%= languageTemplate.template.common.footer.legalVatMention %> | <% } %><% if(penalties || recoveryCost || discount) { %><%= penalties ? languageTemplate.template.common.footer.penalties + ' : ' + penalties : ''%><%= penalties && recoveryCost ? ' | ' : ''%><%= recoveryCost ? languageTemplate.template.common.footer.recoveryCosts + ' : ' + recoveryCost + ' ' : '' %><%= (recoveryCost || penalties) && discount ? ' | ' : '' %><%= discount ? languageTemplate.template.common.footer.discount + ' : ' + discount : '' %><%= shouldPayTaxAfterDebit ? "| " + languageTemplate.template.common.footer.shouldPayTaxAfterDebit : '' %><% if(name || legalForm || capital || siren || rcs) {%><br/><br/><% } %><% } %><%= name %><%= name && (legalForm || capital || siren || rcs) ? ', ' : ''%><%= legalForm %><%= capital ? ' ' + languageTemplate.template.common.footer.capital + ' ' + capitalFormatted + ' €' : '' %><%= siren ? ' ' + languageTemplate.template.common.footer.siren + ' ' + siren : ''%><%= rcs ? '| RCS ' + rcs : ''%><% if (vatCode || nafCode) {%><br/><% } %><%= vatCode ? languageTemplate.template.common.footer.vatCode + ' ' +vatCode : ''%><% if(vatCode && nafCode){%>|<%}%><%= nafCode ? 'APE '+nafCode : '' %>
|
|
13
13
|
<% if (["Clementine", "Pourcentage", "Comptalib"].includes(brandName) && !shouldHideBrandName) { %>
|
|
14
14
|
<div style="display: grid; place-items: center;"><div style="background-color: <%= brandColors.primary50 %>; color: <%= brandColors.primary500 %>; display: flex; gap: 3px; max-width: fit-content; border-radius: 4px; padding: 4px 8px; margin-top: 8px; align-items: center; font-size: 9px; line-height: 140%; font-family: 'circular std', sans serif; font-weight: 450;">
|
|
15
15
|
<%= languageTemplate.template.common.footer.generate %>
|