@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.
Files changed (123) hide show
  1. package/es/api/resources/Payment.d.ts +2 -1
  2. package/es/api/resources/Payment.d.ts.map +1 -1
  3. package/es/api/resources/Payment.js +3 -0
  4. package/es/api/resources/Payment.js.map +1 -1
  5. package/es/api/resources/Stripe.d.ts +3 -1
  6. package/es/api/resources/Stripe.d.ts.map +1 -1
  7. package/es/api/resources/Stripe.js +8 -2
  8. package/es/api/resources/Stripe.js.map +1 -1
  9. package/es/types/Enum/Account.d.ts +12 -0
  10. package/es/types/Enum/Account.d.ts.map +1 -1
  11. package/es/types/Enum/Account.js +12 -0
  12. package/es/types/Enum/Account.js.map +1 -1
  13. package/es/types/Enum/ConnectorType.d.ts +2 -1
  14. package/es/types/Enum/ConnectorType.d.ts.map +1 -1
  15. package/es/types/Enum/ConnectorType.js +1 -0
  16. package/es/types/Enum/ConnectorType.js.map +1 -1
  17. package/es/types/Enum/Country.d.ts +1 -1
  18. package/es/types/Enum/Country.d.ts.map +1 -1
  19. package/es/types/Enum/Country.js +3 -3
  20. package/es/types/Enum/Country.js.map +1 -1
  21. package/es/types/Enum/Currency.d.ts +11 -1
  22. package/es/types/Enum/Currency.d.ts.map +1 -1
  23. package/es/types/Enum/Currency.js +10 -0
  24. package/es/types/Enum/Currency.js.map +1 -1
  25. package/es/types/Enum/GeneralThirdParty.d.ts +1 -0
  26. package/es/types/Enum/GeneralThirdParty.d.ts.map +1 -1
  27. package/es/types/Enum/GeneralThirdParty.js +4804 -624
  28. package/es/types/Enum/GeneralThirdParty.js.map +1 -1
  29. package/es/types/Enum/TypeBankConnection.d.ts +1 -0
  30. package/es/types/Enum/TypeBankConnection.d.ts.map +1 -1
  31. package/es/types/Enum/TypeBankConnection.js +1 -0
  32. package/es/types/Enum/TypeBankConnection.js.map +1 -1
  33. package/es/types/Interface/api/inpi/inpi.d.ts +496 -0
  34. package/es/types/Interface/api/inpi/inpi.d.ts.map +1 -0
  35. package/es/types/Interface/api/inpi/inpi.js +2 -0
  36. package/es/types/Interface/api/inpi/inpi.js.map +1 -0
  37. package/es/types/Interface/api/internalInvoicing/CreateInternalInvoicing.d.ts +1 -1
  38. package/es/types/Interface/api/internalInvoicing/CreateInternalInvoicing.d.ts.map +1 -1
  39. package/es/types/Interface/api/internalInvoicing/CreateInternalInvoicing.js.map +1 -1
  40. package/es/types/Interface/api/payment/CreateNotifyCustomer.d.ts +5 -0
  41. package/es/types/Interface/api/payment/CreateNotifyCustomer.d.ts.map +1 -0
  42. package/es/types/Interface/api/payment/CreateNotifyCustomer.js +26 -0
  43. package/es/types/Interface/api/payment/CreateNotifyCustomer.js.map +1 -0
  44. package/es/types/Interface/api/payment/ReadPayment.d.ts +6 -0
  45. package/es/types/Interface/api/payment/ReadPayment.d.ts.map +1 -0
  46. package/es/types/Interface/api/payment/ReadPayment.js +2 -0
  47. package/es/types/Interface/api/payment/ReadPayment.js.map +1 -0
  48. package/es/types/Interface/api/user/CreateUser.d.ts +0 -1
  49. package/es/types/Interface/api/user/CreateUser.d.ts.map +1 -1
  50. package/es/types/Interface/api/user/CreateUser.js +0 -9
  51. package/es/types/Interface/api/user/CreateUser.js.map +1 -1
  52. package/es/types/Interface/models/IApiError.d.ts +1 -0
  53. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  54. package/es/types/Interface/models/IApiError.js +2 -0
  55. package/es/types/Interface/models/IApiError.js.map +1 -1
  56. package/es/types/Interface/models/INafCode.d.ts +3 -0
  57. package/es/types/Interface/models/INafCode.d.ts.map +1 -1
  58. package/es/types/Interface/models/INafCode.js.map +1 -1
  59. package/es/types/index.d.ts +4 -1
  60. package/es/types/index.d.ts.map +1 -1
  61. package/es/types/index.js +4 -1
  62. package/es/types/index.js.map +1 -1
  63. package/es/utils/payment.d.ts +18 -0
  64. package/es/utils/payment.d.ts.map +1 -0
  65. package/es/utils/payment.js +32 -0
  66. package/es/utils/payment.js.map +1 -0
  67. package/js/api/resources/Payment.js +3 -0
  68. package/js/api/resources/Payment.js.map +1 -1
  69. package/js/api/resources/Stripe.js +10 -2
  70. package/js/api/resources/Stripe.js.map +1 -1
  71. package/js/types/Enum/Account.js +12 -0
  72. package/js/types/Enum/Account.js.map +1 -1
  73. package/js/types/Enum/ConnectorType.js +1 -0
  74. package/js/types/Enum/ConnectorType.js.map +1 -1
  75. package/js/types/Enum/Country.js +3 -3
  76. package/js/types/Enum/Country.js.map +1 -1
  77. package/js/types/Enum/Currency.js +10 -0
  78. package/js/types/Enum/Currency.js.map +1 -1
  79. package/js/types/Enum/GeneralThirdParty.js +18245 -901
  80. package/js/types/Enum/GeneralThirdParty.js.map +1 -1
  81. package/js/types/Enum/TypeBankConnection.js +1 -0
  82. package/js/types/Enum/TypeBankConnection.js.map +1 -1
  83. package/js/types/Interface/api/inpi/inpi.js +6 -0
  84. package/js/types/Interface/api/inpi/inpi.js.map +1 -0
  85. package/js/types/Interface/api/internalInvoicing/CreateInternalInvoicing.js.map +1 -1
  86. package/js/types/Interface/api/payment/CreateNotifyCustomer.js +23 -0
  87. package/js/types/Interface/api/payment/CreateNotifyCustomer.js.map +1 -0
  88. package/js/types/Interface/api/payment/ReadPayment.js +6 -0
  89. package/js/types/Interface/api/payment/ReadPayment.js.map +1 -0
  90. package/js/types/Interface/api/user/CreateUser.js +0 -3
  91. package/js/types/Interface/api/user/CreateUser.js.map +1 -1
  92. package/js/types/Interface/models/IApiError.js +2 -0
  93. package/js/types/Interface/models/IApiError.js.map +1 -1
  94. package/js/types/Interface/models/INafCode.js.map +1 -1
  95. package/js/types/index.js +40 -10
  96. package/js/types/index.js.map +1 -1
  97. package/js/utils/payment.js +61 -0
  98. package/js/utils/payment.js.map +1 -0
  99. package/package.json +1 -1
  100. package/ts/api/resources/Payment.ts +5 -1
  101. package/ts/api/resources/Stripe.ts +10 -2
  102. package/ts/types/Enum/Account.ts +13 -0
  103. package/ts/types/Enum/ConnectorType.ts +1 -0
  104. package/ts/types/Enum/Country.ts +3 -3
  105. package/ts/types/Enum/Currency.ts +10 -0
  106. package/ts/types/Enum/GeneralThirdParty.ts +4805 -624
  107. package/ts/types/Enum/TypeBankConnection.ts +1 -0
  108. package/ts/types/Interface/api/inpi/inpi.ts +562 -0
  109. package/ts/types/Interface/api/internalInvoicing/CreateInternalInvoicing.ts +1 -1
  110. package/ts/types/Interface/api/payment/CreateNotifyCustomer.ts +14 -0
  111. package/ts/types/Interface/api/payment/ReadPayment.ts +5 -0
  112. package/ts/types/Interface/api/user/CreateUser.ts +0 -8
  113. package/ts/types/Interface/models/IApiError.ts +3 -0
  114. package/ts/types/Interface/models/INafCode.ts +3 -0
  115. package/ts/types/index.ts +4 -1
  116. package/ts/utils/payment.ts +58 -0
  117. package/es/types/Enum/SendInBlueList.d.ts +0 -11
  118. package/es/types/Enum/SendInBlueList.d.ts.map +0 -1
  119. package/es/types/Enum/SendInBlueList.js +0 -12
  120. package/es/types/Enum/SendInBlueList.js.map +0 -1
  121. package/js/types/Enum/SendInBlueList.js +0 -17
  122. package/js/types/Enum/SendInBlueList.js.map +0 -1
  123. 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
- }