@silexpert/core 1.2.45 → 1.2.46
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/Payment.d.ts +13 -0
- package/dist/cjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/cjs/api/resources/Payment.js +26 -0
- package/dist/cjs/api/resources/Payment.js.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.d.ts +1 -0
- package/dist/cjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.js +1 -0
- package/dist/cjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/cjs/types/Enum/Sepa.d.ts +28 -0
- package/dist/cjs/types/Enum/Sepa.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Sepa.js +55 -26
- package/dist/cjs/types/Enum/Sepa.js.map +1 -1
- package/dist/cjs/types/Interface/api/payment/Params.d.ts +4 -0
- package/dist/cjs/types/Interface/api/payment/Params.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/payment/Params.js +17 -1
- package/dist/cjs/types/Interface/api/payment/Params.js.map +1 -1
- package/dist/cjs/types/Interface/models/IPayment.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IPayment.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IPayment.js.map +1 -1
- package/dist/cjs/types/Interface/models/IPaymentDirectDebitHistory.d.ts +10 -0
- package/dist/cjs/types/Interface/models/IPaymentDirectDebitHistory.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/IPaymentDirectDebitHistory.js +3 -0
- package/dist/cjs/types/Interface/models/IPaymentDirectDebitHistory.js.map +1 -0
- package/dist/cjs/types/Interface/models/ISociety.js.map +1 -1
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/mjs/api/resources/Payment.d.ts +13 -0
- package/dist/mjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/mjs/api/resources/Payment.js +26 -0
- package/dist/mjs/api/resources/Payment.js.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.d.ts +1 -0
- package/dist/mjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.js +1 -0
- package/dist/mjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/mjs/types/Enum/Sepa.d.ts +28 -0
- package/dist/mjs/types/Enum/Sepa.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Sepa.js +54 -25
- package/dist/mjs/types/Enum/Sepa.js.map +1 -1
- package/dist/mjs/types/Interface/api/payment/Params.d.ts +4 -0
- package/dist/mjs/types/Interface/api/payment/Params.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/payment/Params.js +19 -2
- package/dist/mjs/types/Interface/api/payment/Params.js.map +1 -1
- package/dist/mjs/types/Interface/models/IPayment.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IPayment.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IPayment.js.map +1 -1
- package/dist/mjs/types/Interface/models/IPaymentDirectDebitHistory.d.ts +10 -0
- package/dist/mjs/types/Interface/models/IPaymentDirectDebitHistory.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IPaymentDirectDebitHistory.js +2 -0
- package/dist/mjs/types/Interface/models/IPaymentDirectDebitHistory.js.map +1 -0
- package/dist/mjs/types/Interface/models/ISociety.js.map +1 -1
- package/dist/mjs/types/index.d.ts +1 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +1 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Payment.ts +28 -0
- package/ts/types/Enum/RoleDetail.ts +1 -0
- package/ts/types/Enum/Sepa.ts +58 -28
- package/ts/types/Interface/api/payment/Params.ts +15 -2
- package/ts/types/Interface/models/IPayment.ts +4 -1
- package/ts/types/Interface/models/IPaymentDirectDebitHistory.ts +12 -0
- package/ts/types/Interface/models/ISociety.ts +1 -1
- package/ts/types/index.ts +1 -0
|
@@ -64,6 +64,34 @@ export class Payment extends Resource {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Return list of payments which could be collectables
|
|
69
|
+
* @param signal
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
getAutoCollectables(signal: AbortSignal): Promise<IPayment[]> {
|
|
73
|
+
return this.axios.$get('payments/auto-collectables', {
|
|
74
|
+
signal,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Return list of payments which are collectables
|
|
80
|
+
* @param signal
|
|
81
|
+
* @returns
|
|
82
|
+
*/
|
|
83
|
+
getCollectables(signal: AbortSignal): Promise<IPayment[]> {
|
|
84
|
+
return this.axios.$get('payments/collectables', {
|
|
85
|
+
signal,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
setAsCollectable(listIdPayment: number[]): Promise<IPayment[]> {
|
|
89
|
+
return this.axios.$patch('payments', {
|
|
90
|
+
listIdPayment,
|
|
91
|
+
isCollectable: true,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
67
95
|
getStatsPaidByPrestation(
|
|
68
96
|
payload: QueryPayment,
|
|
69
97
|
): Promise<{ invoicePaymentStats: ReadStatPrestation; assetPaymentStats: ReadStatPrestation }> {
|
package/ts/types/Enum/Sepa.ts
CHANGED
|
@@ -1,48 +1,78 @@
|
|
|
1
|
+
export enum ErrorCodeSepaId {
|
|
2
|
+
UNUSABLE_BANK_DETAILS = 1,
|
|
3
|
+
INCORRECT_BIC = 2,
|
|
4
|
+
MISSING_ID = 3,
|
|
5
|
+
MISSING_NAME_OR_ADDRESS = 4,
|
|
6
|
+
MISSING_OTHER = 5,
|
|
7
|
+
NOT_CORRESPONDING_DEBTOR_NAME = 6,
|
|
8
|
+
DUBBLE = 7,
|
|
9
|
+
INCORRECT_CREDITOR_ID = 8,
|
|
10
|
+
INCORRECT_TRANSACTION_CODE_OR_BAD_FILE_FORMAT = 9,
|
|
11
|
+
INCORRECT_BANK_DEBIT_TYPE = 10,
|
|
12
|
+
MISSING_BANK_ORDER_DATA = 11,
|
|
13
|
+
INCORRECT_ORMISSING_CREDITOR_NAME_OR_ADDRESS = 12,
|
|
14
|
+
INCORRECT_TRANSACTION_CODE_OR_SEQUENCE_ERROR = 13,
|
|
15
|
+
NO_VALID_BANK_ORDER_OR_UNAUTHORISED_TRANSACTION = 14,
|
|
16
|
+
PROHIBITED_WITHDRAWALS_FOR_LEGISLATIVE_REASONS = 15,
|
|
17
|
+
CLOSED_ACCOUNT = 16,
|
|
18
|
+
DECEASED_DEBTOR = 17,
|
|
19
|
+
ACCOUNT_BLOCKED_FOR_SEPA_DIRECT_DEBITS_BY_THE_DEBTOR = 18,
|
|
20
|
+
SPECIFIC_SERVICE = 19,
|
|
21
|
+
DEBIT_ACCOUNT_OF_NATURAL_PERSON = 20,
|
|
22
|
+
INSUFFICIENT_FUNDS = 21,
|
|
23
|
+
DIRECT_DEBIT_REFUSED_BY_DEBTOR = 22,
|
|
24
|
+
REASON_NOT_SPECIFIED = 23,
|
|
25
|
+
AUTHORISED_OPERATION_CONTESTED = 24,
|
|
26
|
+
NO_VALID_MANDATE_OR_UNAUTHORISED_TRANSACTION = 25,
|
|
27
|
+
}
|
|
28
|
+
|
|
1
29
|
type ErrorCodeSepaType = {
|
|
2
|
-
|
|
3
|
-
|
|
30
|
+
id:ErrorCodeSepaId,
|
|
31
|
+
refXml:string,
|
|
32
|
+
motifXml:string,
|
|
4
33
|
};
|
|
5
34
|
|
|
6
|
-
export const ErrorCodeSepa:
|
|
7
|
-
{ refXml: 'AC01', motifXml: 'Coordonnées bancaires inexploitables' },
|
|
8
|
-
{ refXml: 'RC01', motifXml: 'Code BIC erroné' },
|
|
35
|
+
export const ErrorCodeSepa:ErrorCodeSepaType[] = [
|
|
36
|
+
{ id: ErrorCodeSepaId.UNUSABLE_BANK_DETAILS, refXml: 'AC01', motifXml: 'Coordonnées bancaires inexploitables' },
|
|
37
|
+
{ id: ErrorCodeSepaId.INCORRECT_BIC, refXml: 'RC01', motifXml: 'Code BIC erroné' },
|
|
9
38
|
{
|
|
10
|
-
refXml: 'RR01',
|
|
39
|
+
id: ErrorCodeSepaId.MISSING_ID, refXml: 'RR01',
|
|
11
40
|
motifXml: 'Motif réglementaire - Le compte ou identifiant débiteur est insuffisant ou manquant.',
|
|
12
41
|
},
|
|
13
42
|
{
|
|
14
|
-
refXml: 'RR02',
|
|
43
|
+
id: ErrorCodeSepaId.MISSING_NAME_OR_ADDRESS, refXml: 'RR02',
|
|
15
44
|
motifXml:
|
|
16
45
|
'Motif réglementaire - Les renseignements du nom ou de l’adresse du débiteur sont insuffisants ou manquants.',
|
|
17
46
|
},
|
|
18
|
-
{ refXml: 'RR04', motifXml: 'Motif réglementaire - Autre' },
|
|
47
|
+
{ id: ErrorCodeSepaId.MISSING_OTHER, refXml: 'RR04', motifXml: 'Motif réglementaire - Autre' },
|
|
19
48
|
{
|
|
20
|
-
refXml: 'BE01',
|
|
49
|
+
id: ErrorCodeSepaId.NOT_CORRESPONDING_DEBTOR_NAME, refXml: 'BE01',
|
|
21
50
|
motifXml: 'Le nom du débiteur ne correspond pas au nom du titulaire du compte',
|
|
22
51
|
},
|
|
23
|
-
{ refXml: 'AM05', motifXml: 'Prélèvement en double' },
|
|
24
|
-
{ refXml: 'BE05', motifXml: 'Identifiant créancier incorrect' },
|
|
25
|
-
{ refXml: 'FF01', motifXml: 'Code de transaction incorrect ou format fichier invalide' },
|
|
26
|
-
{ refXml: 'FF05', motifXml: 'Type de prélèvement incorrect' },
|
|
27
|
-
{ refXml: 'MD02', motifXml: 'Données du mandat manquantes ou inexactes' },
|
|
52
|
+
{ id: ErrorCodeSepaId.DUBBLE, refXml: 'AM05', motifXml: 'Prélèvement en double' },
|
|
53
|
+
{ id: ErrorCodeSepaId.INCORRECT_CREDITOR_ID, refXml: 'BE05', motifXml: 'Identifiant créancier incorrect' },
|
|
54
|
+
{ id: ErrorCodeSepaId.INCORRECT_TRANSACTION_CODE_OR_BAD_FILE_FORMAT, refXml: 'FF01', motifXml: 'Code de transaction incorrect ou format fichier invalide' },
|
|
55
|
+
{ id: ErrorCodeSepaId.INCORRECT_BANK_DEBIT_TYPE, refXml: 'FF05', motifXml: 'Type de prélèvement incorrect' },
|
|
56
|
+
{ id: ErrorCodeSepaId.MISSING_BANK_ORDER_DATA, refXml: 'MD02', motifXml: 'Données du mandat manquantes ou inexactes' },
|
|
28
57
|
{
|
|
58
|
+
id: ErrorCodeSepaId.INCORRECT_ORMISSING_CREDITOR_NAME_OR_ADDRESS,
|
|
29
59
|
refXml: 'RR03',
|
|
30
|
-
motifXml:
|
|
60
|
+
motifXml: 'Motif réglementaire - Le nom ou l\'adresse du créancier est incorrect ou manquant.',
|
|
31
61
|
},
|
|
32
|
-
{ refXml: 'AG02', motifXml: 'Code de transaction incorrect ou erreur de séquence' },
|
|
33
|
-
{ refXml: 'MD01', motifXml: 'Aucun mandat valide ou opération non autorisée' },
|
|
62
|
+
{ id: ErrorCodeSepaId.INCORRECT_TRANSACTION_CODE_OR_SEQUENCE_ERROR, refXml: 'AG02', motifXml: 'Code de transaction incorrect ou erreur de séquence' },
|
|
63
|
+
{ id: ErrorCodeSepaId.NO_VALID_BANK_ORDER_OR_UNAUTHORISED_TRANSACTION, refXml: 'MD01', motifXml: 'Aucun mandat valide ou opération non autorisée' },
|
|
34
64
|
{
|
|
35
|
-
refXml: 'AG01',
|
|
65
|
+
id: ErrorCodeSepaId.PROHIBITED_WITHDRAWALS_FOR_LEGISLATIVE_REASONS, refXml: 'AG01',
|
|
36
66
|
motifXml: 'Prélèvements interdits sur ce compte pour des raisons législatives',
|
|
37
67
|
},
|
|
38
|
-
{ refXml: 'AC04', motifXml: 'Compte fermé' },
|
|
39
|
-
{ refXml: 'MD07', motifXml: 'Débiteur décédé' },
|
|
40
|
-
{ refXml: 'AC06', motifXml: 'Compte bloqué pour les prélèvements SEPA par le débiteur' },
|
|
41
|
-
{ refXml: 'SL01', motifXml: 'Service spécifique' },
|
|
42
|
-
{ refXml: 'AC13', motifXml:
|
|
43
|
-
{ refXml: 'AM04', motifXml: 'Fonds insuffisants' },
|
|
44
|
-
{ refXml: 'MS02', motifXml: 'Prélèvement refusé par le débiteur' },
|
|
45
|
-
{ refXml: 'MS03', motifXml: 'Raison non précisée' },
|
|
46
|
-
{ refXml: 'MD06', motifXml: 'Opération autorisée contestée' },
|
|
47
|
-
{ refXml: 'MD01', motifXml: 'Aucun mandat valide ou opération non autorisée' },
|
|
68
|
+
{ id: ErrorCodeSepaId.CLOSED_ACCOUNT, refXml: 'AC04', motifXml: 'Compte fermé' },
|
|
69
|
+
{ id: ErrorCodeSepaId.DECEASED_DEBTOR, refXml: 'MD07', motifXml: 'Débiteur décédé' },
|
|
70
|
+
{ id: ErrorCodeSepaId.ACCOUNT_BLOCKED_FOR_SEPA_DIRECT_DEBITS_BY_THE_DEBTOR, refXml: 'AC06', motifXml: 'Compte bloqué pour les prélèvements SEPA par le débiteur' },
|
|
71
|
+
{ id: ErrorCodeSepaId.SPECIFIC_SERVICE, refXml: 'SL01', motifXml: 'Service spécifique' },
|
|
72
|
+
{ id: ErrorCodeSepaId.DEBIT_ACCOUNT_OF_NATURAL_PERSON, refXml: 'AC13', motifXml: 'Le compte débiteur est le compte d\'une personne physique' },
|
|
73
|
+
{ id: ErrorCodeSepaId.INSUFFICIENT_FUNDS, refXml: 'AM04', motifXml: 'Fonds insuffisants' },
|
|
74
|
+
{ id: ErrorCodeSepaId.DIRECT_DEBIT_REFUSED_BY_DEBTOR, refXml: 'MS02', motifXml: 'Prélèvement refusé par le débiteur' },
|
|
75
|
+
{ id: ErrorCodeSepaId.REASON_NOT_SPECIFIED, refXml: 'MS03', motifXml: 'Raison non précisée' },
|
|
76
|
+
{ id: ErrorCodeSepaId.AUTHORISED_OPERATION_CONTESTED, refXml: 'MD06', motifXml: 'Opération autorisée contestée' },
|
|
77
|
+
{ id: ErrorCodeSepaId.NO_VALID_MANDATE_OR_UNAUTHORISED_TRANSACTION, refXml: 'MD01', motifXml: 'Aucun mandat valide ou opération non autorisée' },
|
|
48
78
|
];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IsInt, IsOptional } from 'class-validator';
|
|
2
|
-
import { ApiPropertyOptional } from '../../../../utils';
|
|
1
|
+
import { IsBoolean, IsInt, IsOptional } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
3
4
|
|
|
4
5
|
export class CreatePaymentsAutoBilling {
|
|
5
6
|
@ApiPropertyOptional()
|
|
@@ -7,3 +8,15 @@ export class CreatePaymentsAutoBilling {
|
|
|
7
8
|
@IsInt()
|
|
8
9
|
idSociety?: number;
|
|
9
10
|
}
|
|
11
|
+
|
|
12
|
+
export class UpdateCollectable {
|
|
13
|
+
@ApiProperty()
|
|
14
|
+
@IsInt({ each: true })
|
|
15
|
+
listIdPayment: number[];
|
|
16
|
+
|
|
17
|
+
@ApiPropertyOptional()
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsBoolean()
|
|
20
|
+
@ToBoolean()
|
|
21
|
+
isCollectable: boolean;
|
|
22
|
+
}
|
|
@@ -13,7 +13,10 @@ export interface IPayment {
|
|
|
13
13
|
isOverdue?: boolean;
|
|
14
14
|
isOverpaid?: boolean;
|
|
15
15
|
isFirst?: boolean;
|
|
16
|
-
|
|
16
|
+
// @deprecated Use isCollectable instead
|
|
17
|
+
toCollect?: boolean;
|
|
18
|
+
countRejects?: number;
|
|
19
|
+
isCollectable?: boolean;
|
|
17
20
|
isAsset?: boolean;
|
|
18
21
|
isFree?: boolean;
|
|
19
22
|
isHiddenCustomer?: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IPayment } from './IPayment';
|
|
2
|
+
|
|
3
|
+
// paymentDirectDebitHistory
|
|
4
|
+
export interface IPaymentDirectDebitHistory {
|
|
5
|
+
id?: number;
|
|
6
|
+
reference: string;
|
|
7
|
+
idPayment: number;
|
|
8
|
+
createdAt?: Date | null;
|
|
9
|
+
updatedAt?: Date | null;
|
|
10
|
+
|
|
11
|
+
payment?: IPayment;
|
|
12
|
+
}
|
|
@@ -144,7 +144,7 @@ export interface ISociety {
|
|
|
144
144
|
idUserAdvise?: number | null;
|
|
145
145
|
idVatForInternalInvoicing?: number;
|
|
146
146
|
dateFirstSendUnpaid?: Date | null;
|
|
147
|
-
reasonUnpaid?: number | null;
|
|
147
|
+
reasonUnpaid?: number | null; //FIXME: une fois migrée, à remplacer par l'ENUM reasonUnpaid
|
|
148
148
|
stripeSubscriptionId?: string | null;
|
|
149
149
|
stateSynchroBankAccount?: number | null;
|
|
150
150
|
noShowPopUpSynchroDate?: Date | null;
|
package/ts/types/index.ts
CHANGED
|
@@ -61,6 +61,7 @@ export * from './Interface/models/ICycle';
|
|
|
61
61
|
export * from './Interface/models/IDay';
|
|
62
62
|
export * from './Interface/models/IDetailedLogBi';
|
|
63
63
|
export * from './Interface/models/IDirectDebitHistory';
|
|
64
|
+
export * from './Interface/models/IPaymentDirectDebitHistory';
|
|
64
65
|
export * from './Interface/models/IEmployee';
|
|
65
66
|
export * from './Interface/models/IEngagementOcrExtraction';
|
|
66
67
|
export * from './Interface/models/IEstimateInvoiceRepeat';
|