@silexpert/core 1.1.93 → 1.1.96
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/Payment.d.ts +2 -1
- package/es/api/resources/Payment.d.ts.map +1 -1
- package/es/api/resources/Payment.js +3 -0
- package/es/api/resources/Payment.js.map +1 -1
- package/es/api/resources/Stripe.d.ts +3 -1
- package/es/api/resources/Stripe.d.ts.map +1 -1
- package/es/api/resources/Stripe.js +8 -2
- package/es/api/resources/Stripe.js.map +1 -1
- package/es/types/Enum/Account.d.ts +12 -0
- package/es/types/Enum/Account.d.ts.map +1 -1
- package/es/types/Enum/Account.js +12 -0
- package/es/types/Enum/Account.js.map +1 -1
- package/es/types/Enum/ConnectorType.d.ts +2 -1
- package/es/types/Enum/ConnectorType.d.ts.map +1 -1
- package/es/types/Enum/ConnectorType.js +1 -0
- package/es/types/Enum/ConnectorType.js.map +1 -1
- package/es/types/Enum/Country.d.ts +1 -1
- package/es/types/Enum/Country.d.ts.map +1 -1
- package/es/types/Enum/Country.js +3 -3
- package/es/types/Enum/Country.js.map +1 -1
- package/es/types/Enum/Currency.d.ts +11 -1
- package/es/types/Enum/Currency.d.ts.map +1 -1
- package/es/types/Enum/Currency.js +10 -0
- package/es/types/Enum/Currency.js.map +1 -1
- package/es/types/Enum/GeneralThirdParty.d.ts +1 -0
- package/es/types/Enum/GeneralThirdParty.d.ts.map +1 -1
- package/es/types/Enum/GeneralThirdParty.js +4804 -624
- package/es/types/Enum/GeneralThirdParty.js.map +1 -1
- package/es/types/Enum/TypeBankConnection.d.ts +1 -0
- package/es/types/Enum/TypeBankConnection.d.ts.map +1 -1
- package/es/types/Enum/TypeBankConnection.js +1 -0
- package/es/types/Enum/TypeBankConnection.js.map +1 -1
- package/es/types/Interface/api/inpi/inpi.d.ts +496 -0
- package/es/types/Interface/api/inpi/inpi.d.ts.map +1 -0
- package/es/types/Interface/api/inpi/inpi.js +2 -0
- package/es/types/Interface/api/inpi/inpi.js.map +1 -0
- package/es/types/Interface/api/internalInvoicing/CreateInternalInvoicing.d.ts +1 -1
- package/es/types/Interface/api/internalInvoicing/CreateInternalInvoicing.d.ts.map +1 -1
- package/es/types/Interface/api/internalInvoicing/CreateInternalInvoicing.js.map +1 -1
- package/es/types/Interface/api/payment/CreateNotifyCustomer.d.ts +5 -0
- package/es/types/Interface/api/payment/CreateNotifyCustomer.d.ts.map +1 -0
- package/es/types/Interface/api/payment/CreateNotifyCustomer.js +26 -0
- package/es/types/Interface/api/payment/CreateNotifyCustomer.js.map +1 -0
- package/es/types/Interface/api/payment/ReadPayment.d.ts +6 -0
- package/es/types/Interface/api/payment/ReadPayment.d.ts.map +1 -0
- package/es/types/Interface/api/payment/ReadPayment.js +2 -0
- package/es/types/Interface/api/payment/ReadPayment.js.map +1 -0
- package/es/types/Interface/api/user/CreateUser.d.ts +0 -1
- package/es/types/Interface/api/user/CreateUser.d.ts.map +1 -1
- package/es/types/Interface/api/user/CreateUser.js +0 -9
- package/es/types/Interface/api/user/CreateUser.js.map +1 -1
- package/es/types/Interface/models/IApiError.d.ts +1 -0
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +2 -0
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/INafCode.d.ts +3 -0
- package/es/types/Interface/models/INafCode.d.ts.map +1 -1
- package/es/types/Interface/models/INafCode.js.map +1 -1
- package/es/types/index.d.ts +4 -1
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +4 -1
- package/es/types/index.js.map +1 -1
- package/es/utils/payment.d.ts +18 -0
- package/es/utils/payment.d.ts.map +1 -0
- package/es/utils/payment.js +32 -0
- package/es/utils/payment.js.map +1 -0
- package/js/api/resources/Payment.js +3 -0
- package/js/api/resources/Payment.js.map +1 -1
- package/js/api/resources/Stripe.js +10 -2
- package/js/api/resources/Stripe.js.map +1 -1
- package/js/types/Enum/Account.js +12 -0
- package/js/types/Enum/Account.js.map +1 -1
- package/js/types/Enum/ConnectorType.js +1 -0
- package/js/types/Enum/ConnectorType.js.map +1 -1
- package/js/types/Enum/Country.js +3 -3
- package/js/types/Enum/Country.js.map +1 -1
- package/js/types/Enum/Currency.js +10 -0
- package/js/types/Enum/Currency.js.map +1 -1
- package/js/types/Enum/GeneralThirdParty.js +18245 -901
- package/js/types/Enum/GeneralThirdParty.js.map +1 -1
- package/js/types/Enum/TypeBankConnection.js +1 -0
- package/js/types/Enum/TypeBankConnection.js.map +1 -1
- package/js/types/Interface/api/inpi/inpi.js +6 -0
- package/js/types/Interface/api/inpi/inpi.js.map +1 -0
- package/js/types/Interface/api/internalInvoicing/CreateInternalInvoicing.js.map +1 -1
- package/js/types/Interface/api/payment/CreateNotifyCustomer.js +23 -0
- package/js/types/Interface/api/payment/CreateNotifyCustomer.js.map +1 -0
- package/js/types/Interface/api/payment/ReadPayment.js +6 -0
- package/js/types/Interface/api/payment/ReadPayment.js.map +1 -0
- package/js/types/Interface/api/user/CreateUser.js +0 -3
- package/js/types/Interface/api/user/CreateUser.js.map +1 -1
- package/js/types/Interface/models/IApiError.js +2 -0
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/models/INafCode.js.map +1 -1
- package/js/types/index.js +40 -10
- package/js/types/index.js.map +1 -1
- package/js/utils/payment.js +61 -0
- package/js/utils/payment.js.map +1 -0
- package/package.json +1 -1
- package/ts/api/resources/Payment.ts +5 -1
- package/ts/api/resources/Stripe.ts +10 -2
- package/ts/types/Enum/Account.ts +13 -0
- package/ts/types/Enum/ConnectorType.ts +1 -0
- package/ts/types/Enum/Country.ts +3 -3
- package/ts/types/Enum/Currency.ts +10 -0
- package/ts/types/Enum/GeneralThirdParty.ts +4805 -624
- package/ts/types/Enum/TypeBankConnection.ts +1 -0
- package/ts/types/Interface/api/inpi/inpi.ts +562 -0
- package/ts/types/Interface/api/internalInvoicing/CreateInternalInvoicing.ts +1 -1
- package/ts/types/Interface/api/payment/CreateNotifyCustomer.ts +14 -0
- package/ts/types/Interface/api/payment/ReadPayment.ts +5 -0
- package/ts/types/Interface/api/user/CreateUser.ts +0 -8
- package/ts/types/Interface/models/IApiError.ts +3 -0
- package/ts/types/Interface/models/INafCode.ts +3 -0
- package/ts/types/index.ts +4 -1
- package/ts/utils/payment.ts +58 -0
- package/es/types/Enum/SendInBlueList.d.ts +0 -11
- package/es/types/Enum/SendInBlueList.d.ts.map +0 -1
- package/es/types/Enum/SendInBlueList.js +0 -12
- package/es/types/Enum/SendInBlueList.js.map +0 -1
- package/js/types/Enum/SendInBlueList.js +0 -17
- package/js/types/Enum/SendInBlueList.js.map +0 -1
- package/ts/types/Enum/SendInBlueList.ts +0 -10
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { IPayment } from '../types';
|
|
2
|
+
|
|
3
|
+
interface PaymentsWithList extends IPayment {
|
|
4
|
+
type: 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther',
|
|
5
|
+
listPayments: IPayment[]
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A partir d'une liste de payment (avec include jusqu'à prestationList,
|
|
10
|
+
* avec en attributs 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther')
|
|
11
|
+
* permet de récupérer uniquement le premier paiement de chaque type
|
|
12
|
+
* et les autres payments dans listPayments
|
|
13
|
+
* avec possibilité de filtrer avec le tableau de filtres
|
|
14
|
+
* @param payments
|
|
15
|
+
* @param types
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
const groupPaymentsByServiceType = (payments: IPayment[], types: ('isComptable' | 'isJuridique' | 'isSocial' | 'isOther')[] = ['isComptable', 'isJuridique', 'isSocial', 'isOther']): PaymentsWithList[] => {
|
|
19
|
+
const prestaComptable = payments.filter((el) => el?.paymentsPrestations?.prestationsList?.isComptable ?? false);
|
|
20
|
+
const prestaSocial = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isSocial);
|
|
21
|
+
const prestaJuridique = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isJuridique);
|
|
22
|
+
const prestaOther = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && !el?.paymentsPrestations?.prestationsList?.isJuridique && !el?.paymentsPrestations?.prestationsList?.isSocial);
|
|
23
|
+
|
|
24
|
+
const societyPayment: PaymentsWithList[] = [];
|
|
25
|
+
if (prestaComptable.length && types.includes('isComptable')) {
|
|
26
|
+
societyPayment.push({
|
|
27
|
+
...prestaComptable[0], // Données de base
|
|
28
|
+
type: 'isComptable',
|
|
29
|
+
listPayments: prestaComptable,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (prestaSocial.length && types.includes('isSocial')) {
|
|
33
|
+
societyPayment.push({
|
|
34
|
+
...prestaSocial[0], // Données de base
|
|
35
|
+
type: 'isSocial',
|
|
36
|
+
listPayments: prestaSocial,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
if (prestaJuridique.length && types.includes('isJuridique')) {
|
|
40
|
+
societyPayment.push({
|
|
41
|
+
...prestaJuridique[0], // Données de base
|
|
42
|
+
type: 'isJuridique',
|
|
43
|
+
listPayments: prestaJuridique,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
if (prestaOther.length && types.includes('isOther')) {
|
|
47
|
+
societyPayment.push({
|
|
48
|
+
...prestaOther[0], // Données de base
|
|
49
|
+
type: 'isOther',
|
|
50
|
+
listPayments: prestaOther,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return societyPayment;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
groupPaymentsByServiceType,
|
|
58
|
+
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare enum SendInBlueList {
|
|
2
|
-
COLD_PROSPECT_LIST_ID = 18,
|
|
3
|
-
HOT_PROSPECT_LIST_ID = 19,
|
|
4
|
-
PAYING_CUSTOMER_TEST_LIST_ID = 20,
|
|
5
|
-
CHURNED_CUSTOMER_TEST_LIST_ID = 21,
|
|
6
|
-
NEWSLETTER_LIST_COMPTALIB_ID = 22,
|
|
7
|
-
NEWSLETTER_LIST_CLEMENTINE_ID = 33,
|
|
8
|
-
COLD_PROSPECT_LIST_CLEMENTINE_ID = 123,
|
|
9
|
-
PAYING_CUSTOMER_LIST_CLEMENTINE_ID = 124
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=SendInBlueList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SendInBlueList.d.ts","sourceRoot":"","sources":["../../../ts/types/Enum/SendInBlueList.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,qBAAqB,KAAK;IAC1B,oBAAoB,KAAK;IACzB,4BAA4B,KAAK;IACjC,6BAA6B,KAAK;IAClC,4BAA4B,KAAK;IACjC,6BAA6B,KAAK;IAClC,gCAAgC,MAAM;IACtC,kCAAkC,MAAM;CACzC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export var SendInBlueList;
|
|
2
|
-
(function (SendInBlueList) {
|
|
3
|
-
SendInBlueList[SendInBlueList["COLD_PROSPECT_LIST_ID"] = 18] = "COLD_PROSPECT_LIST_ID";
|
|
4
|
-
SendInBlueList[SendInBlueList["HOT_PROSPECT_LIST_ID"] = 19] = "HOT_PROSPECT_LIST_ID";
|
|
5
|
-
SendInBlueList[SendInBlueList["PAYING_CUSTOMER_TEST_LIST_ID"] = 20] = "PAYING_CUSTOMER_TEST_LIST_ID";
|
|
6
|
-
SendInBlueList[SendInBlueList["CHURNED_CUSTOMER_TEST_LIST_ID"] = 21] = "CHURNED_CUSTOMER_TEST_LIST_ID";
|
|
7
|
-
SendInBlueList[SendInBlueList["NEWSLETTER_LIST_COMPTALIB_ID"] = 22] = "NEWSLETTER_LIST_COMPTALIB_ID";
|
|
8
|
-
SendInBlueList[SendInBlueList["NEWSLETTER_LIST_CLEMENTINE_ID"] = 33] = "NEWSLETTER_LIST_CLEMENTINE_ID";
|
|
9
|
-
SendInBlueList[SendInBlueList["COLD_PROSPECT_LIST_CLEMENTINE_ID"] = 123] = "COLD_PROSPECT_LIST_CLEMENTINE_ID";
|
|
10
|
-
SendInBlueList[SendInBlueList["PAYING_CUSTOMER_LIST_CLEMENTINE_ID"] = 124] = "PAYING_CUSTOMER_LIST_CLEMENTINE_ID";
|
|
11
|
-
})(SendInBlueList || (SendInBlueList = {}));
|
|
12
|
-
//# sourceMappingURL=SendInBlueList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SendInBlueList.js","sourceRoot":"","sources":["../../../ts/types/Enum/SendInBlueList.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,sFAA0B,CAAA;IAC1B,oFAAyB,CAAA;IACzB,oGAAiC,CAAA;IACjC,sGAAkC,CAAA;IAClC,oGAAiC,CAAA;IACjC,sGAAkC,CAAA;IAClC,6GAAsC,CAAA;IACtC,iHAAwC,CAAA;AAC1C,CAAC,EATW,cAAc,KAAd,cAAc,QASzB","sourcesContent":["export enum SendInBlueList {\n COLD_PROSPECT_LIST_ID = 18,\n HOT_PROSPECT_LIST_ID = 19,\n PAYING_CUSTOMER_TEST_LIST_ID = 20,\n CHURNED_CUSTOMER_TEST_LIST_ID = 21,\n NEWSLETTER_LIST_COMPTALIB_ID = 22,\n NEWSLETTER_LIST_CLEMENTINE_ID = 33,\n COLD_PROSPECT_LIST_CLEMENTINE_ID = 123,\n PAYING_CUSTOMER_LIST_CLEMENTINE_ID = 124,\n}"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var SendInBlueList = exports.SendInBlueList = undefined;
|
|
7
|
-
(function (SendInBlueList) {
|
|
8
|
-
SendInBlueList[SendInBlueList["COLD_PROSPECT_LIST_ID"] = 18] = "COLD_PROSPECT_LIST_ID";
|
|
9
|
-
SendInBlueList[SendInBlueList["HOT_PROSPECT_LIST_ID"] = 19] = "HOT_PROSPECT_LIST_ID";
|
|
10
|
-
SendInBlueList[SendInBlueList["PAYING_CUSTOMER_TEST_LIST_ID"] = 20] = "PAYING_CUSTOMER_TEST_LIST_ID";
|
|
11
|
-
SendInBlueList[SendInBlueList["CHURNED_CUSTOMER_TEST_LIST_ID"] = 21] = "CHURNED_CUSTOMER_TEST_LIST_ID";
|
|
12
|
-
SendInBlueList[SendInBlueList["NEWSLETTER_LIST_COMPTALIB_ID"] = 22] = "NEWSLETTER_LIST_COMPTALIB_ID";
|
|
13
|
-
SendInBlueList[SendInBlueList["NEWSLETTER_LIST_CLEMENTINE_ID"] = 33] = "NEWSLETTER_LIST_CLEMENTINE_ID";
|
|
14
|
-
SendInBlueList[SendInBlueList["COLD_PROSPECT_LIST_CLEMENTINE_ID"] = 123] = "COLD_PROSPECT_LIST_CLEMENTINE_ID";
|
|
15
|
-
SendInBlueList[SendInBlueList["PAYING_CUSTOMER_LIST_CLEMENTINE_ID"] = 124] = "PAYING_CUSTOMER_LIST_CLEMENTINE_ID";
|
|
16
|
-
})(SendInBlueList || (exports.SendInBlueList = SendInBlueList = {}));
|
|
17
|
-
//# sourceMappingURL=SendInBlueList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SendInBlueList.js","names":["SendInBlueList","exports","undefined"],"sources":["../../../ts/types/Enum/SendInBlueList.ts"],"sourcesContent":["export enum SendInBlueList {\n COLD_PROSPECT_LIST_ID = 18,\n HOT_PROSPECT_LIST_ID = 19,\n PAYING_CUSTOMER_TEST_LIST_ID = 20,\n CHURNED_CUSTOMER_TEST_LIST_ID = 21,\n NEWSLETTER_LIST_COMPTALIB_ID = 22,\n NEWSLETTER_LIST_CLEMENTINE_ID = 33,\n COLD_PROSPECT_LIST_CLEMENTINE_ID = 123,\n PAYING_CUSTOMER_LIST_CLEMENTINE_ID = 124,\n}"],"mappings":";;;;;AAAA,IAAYA,cASX,GAAAC,OAAA,CATWD,cASX,GAAAE,SAAA;AATD,WAAYF,cAAc;EACxBA,cAAA,CAAAA,cAAA,yDAA0B;EAC1BA,cAAA,CAAAA,cAAA,uDAAyB;EACzBA,cAAA,CAAAA,cAAA,uEAAiC;EACjCA,cAAA,CAAAA,cAAA,yEAAkC;EAClCA,cAAA,CAAAA,cAAA,uEAAiC;EACjCA,cAAA,CAAAA,cAAA,yEAAkC;EAClCA,cAAA,CAAAA,cAAA,gFAAsC;EACtCA,cAAA,CAAAA,cAAA,oFAAwC;AAC1C,CAAC,EATWA,cAAc,KAAAC,OAAA,CAAdD,cASX,GATWA,cAAc"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export enum SendInBlueList {
|
|
2
|
-
COLD_PROSPECT_LIST_ID = 18,
|
|
3
|
-
HOT_PROSPECT_LIST_ID = 19,
|
|
4
|
-
PAYING_CUSTOMER_TEST_LIST_ID = 20,
|
|
5
|
-
CHURNED_CUSTOMER_TEST_LIST_ID = 21,
|
|
6
|
-
NEWSLETTER_LIST_COMPTALIB_ID = 22,
|
|
7
|
-
NEWSLETTER_LIST_CLEMENTINE_ID = 33,
|
|
8
|
-
COLD_PROSPECT_LIST_CLEMENTINE_ID = 123,
|
|
9
|
-
PAYING_CUSTOMER_LIST_CLEMENTINE_ID = 124,
|
|
10
|
-
}
|