@silexpert/core 1.1.95 → 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 (81) 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/types/Enum/Country.d.ts +1 -1
  6. package/es/types/Enum/Country.d.ts.map +1 -1
  7. package/es/types/Enum/Country.js +3 -3
  8. package/es/types/Enum/Country.js.map +1 -1
  9. package/es/types/Enum/GeneralThirdParty.d.ts +1 -0
  10. package/es/types/Enum/GeneralThirdParty.d.ts.map +1 -1
  11. package/es/types/Enum/GeneralThirdParty.js +4804 -624
  12. package/es/types/Enum/GeneralThirdParty.js.map +1 -1
  13. package/es/types/Interface/api/inpi/inpi.d.ts +496 -0
  14. package/es/types/Interface/api/inpi/inpi.d.ts.map +1 -0
  15. package/es/types/Interface/api/inpi/inpi.js +2 -0
  16. package/es/types/Interface/api/inpi/inpi.js.map +1 -0
  17. package/es/types/Interface/api/internalInvoicing/CreateInternalInvoicing.d.ts +1 -1
  18. package/es/types/Interface/api/internalInvoicing/CreateInternalInvoicing.d.ts.map +1 -1
  19. package/es/types/Interface/api/internalInvoicing/CreateInternalInvoicing.js.map +1 -1
  20. package/es/types/Interface/api/payment/CreateNotifyCustomer.d.ts +5 -0
  21. package/es/types/Interface/api/payment/CreateNotifyCustomer.d.ts.map +1 -0
  22. package/es/types/Interface/api/payment/CreateNotifyCustomer.js +26 -0
  23. package/es/types/Interface/api/payment/CreateNotifyCustomer.js.map +1 -0
  24. package/es/types/Interface/api/payment/ReadPayment.d.ts +6 -0
  25. package/es/types/Interface/api/payment/ReadPayment.d.ts.map +1 -0
  26. package/es/types/Interface/api/payment/ReadPayment.js +2 -0
  27. package/es/types/Interface/api/payment/ReadPayment.js.map +1 -0
  28. package/es/types/Interface/api/user/CreateUser.d.ts +0 -1
  29. package/es/types/Interface/api/user/CreateUser.d.ts.map +1 -1
  30. package/es/types/Interface/api/user/CreateUser.js +0 -9
  31. package/es/types/Interface/api/user/CreateUser.js.map +1 -1
  32. package/es/types/Interface/models/INafCode.d.ts +3 -0
  33. package/es/types/Interface/models/INafCode.d.ts.map +1 -1
  34. package/es/types/Interface/models/INafCode.js.map +1 -1
  35. package/es/types/index.d.ts +4 -1
  36. package/es/types/index.d.ts.map +1 -1
  37. package/es/types/index.js +4 -1
  38. package/es/types/index.js.map +1 -1
  39. package/es/utils/payment.d.ts +18 -0
  40. package/es/utils/payment.d.ts.map +1 -0
  41. package/es/utils/payment.js +32 -0
  42. package/es/utils/payment.js.map +1 -0
  43. package/js/api/resources/Payment.js +3 -0
  44. package/js/api/resources/Payment.js.map +1 -1
  45. package/js/types/Enum/Country.js +3 -3
  46. package/js/types/Enum/Country.js.map +1 -1
  47. package/js/types/Enum/GeneralThirdParty.js +18245 -901
  48. package/js/types/Enum/GeneralThirdParty.js.map +1 -1
  49. package/js/types/Interface/api/inpi/inpi.js +6 -0
  50. package/js/types/Interface/api/inpi/inpi.js.map +1 -0
  51. package/js/types/Interface/api/internalInvoicing/CreateInternalInvoicing.js.map +1 -1
  52. package/js/types/Interface/api/payment/CreateNotifyCustomer.js +23 -0
  53. package/js/types/Interface/api/payment/CreateNotifyCustomer.js.map +1 -0
  54. package/js/types/Interface/api/payment/ReadPayment.js +6 -0
  55. package/js/types/Interface/api/payment/ReadPayment.js.map +1 -0
  56. package/js/types/Interface/api/user/CreateUser.js +0 -3
  57. package/js/types/Interface/api/user/CreateUser.js.map +1 -1
  58. package/js/types/Interface/models/INafCode.js.map +1 -1
  59. package/js/types/index.js +40 -10
  60. package/js/types/index.js.map +1 -1
  61. package/js/utils/payment.js +61 -0
  62. package/js/utils/payment.js.map +1 -0
  63. package/package.json +1 -1
  64. package/ts/api/resources/Payment.ts +5 -1
  65. package/ts/types/Enum/Country.ts +3 -3
  66. package/ts/types/Enum/GeneralThirdParty.ts +4805 -624
  67. package/ts/types/Interface/api/inpi/inpi.ts +562 -0
  68. package/ts/types/Interface/api/internalInvoicing/CreateInternalInvoicing.ts +1 -1
  69. package/ts/types/Interface/api/payment/CreateNotifyCustomer.ts +14 -0
  70. package/ts/types/Interface/api/payment/ReadPayment.ts +5 -0
  71. package/ts/types/Interface/api/user/CreateUser.ts +0 -8
  72. package/ts/types/Interface/models/INafCode.ts +3 -0
  73. package/ts/types/index.ts +4 -1
  74. package/ts/utils/payment.ts +58 -0
  75. package/es/types/Enum/SendInBlueList.d.ts +0 -11
  76. package/es/types/Enum/SendInBlueList.d.ts.map +0 -1
  77. package/es/types/Enum/SendInBlueList.js +0 -12
  78. package/es/types/Enum/SendInBlueList.js.map +0 -1
  79. package/js/types/Enum/SendInBlueList.js +0 -17
  80. package/js/types/Enum/SendInBlueList.js.map +0 -1
  81. package/ts/types/Enum/SendInBlueList.ts +0 -10
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ /**
7
+ * A partir d'une liste de payment (avec include jusqu'à prestationList,
8
+ * avec en attributs 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther')
9
+ * permet de récupérer uniquement le premier paiement de chaque type
10
+ * et les autres payments dans listPayments
11
+ * avec possibilité de filtrer avec le tableau de filtres
12
+ * @param payments
13
+ * @param types
14
+ * @returns
15
+ */
16
+ const groupPaymentsByServiceType = (payments, types = ['isComptable', 'isJuridique', 'isSocial', 'isOther']) => {
17
+ const prestaComptable = payments.filter(el => {
18
+ var _a, _b, _c;
19
+ return (_c = (_b = (_a = el === null || el === void 0 ? void 0 : el.paymentsPrestations) === null || _a === void 0 ? void 0 : _a.prestationsList) === null || _b === void 0 ? void 0 : _b.isComptable) !== null && _c !== void 0 ? _c : false;
20
+ });
21
+ const prestaSocial = payments.filter(el => {
22
+ var _a, _b, _c, _d;
23
+ return !((_b = (_a = el === null || el === void 0 ? void 0 : el.paymentsPrestations) === null || _a === void 0 ? void 0 : _a.prestationsList) === null || _b === void 0 ? void 0 : _b.isComptable) && ((_d = (_c = el === null || el === void 0 ? void 0 : el.paymentsPrestations) === null || _c === void 0 ? void 0 : _c.prestationsList) === null || _d === void 0 ? void 0 : _d.isSocial);
24
+ });
25
+ const prestaJuridique = payments.filter(el => {
26
+ var _a, _b, _c, _d;
27
+ return !((_b = (_a = el === null || el === void 0 ? void 0 : el.paymentsPrestations) === null || _a === void 0 ? void 0 : _a.prestationsList) === null || _b === void 0 ? void 0 : _b.isComptable) && ((_d = (_c = el === null || el === void 0 ? void 0 : el.paymentsPrestations) === null || _c === void 0 ? void 0 : _c.prestationsList) === null || _d === void 0 ? void 0 : _d.isJuridique);
28
+ });
29
+ const prestaOther = payments.filter(el => {
30
+ var _a, _b, _c, _d, _e, _f;
31
+ return !((_b = (_a = el === null || el === void 0 ? void 0 : el.paymentsPrestations) === null || _a === void 0 ? void 0 : _a.prestationsList) === null || _b === void 0 ? void 0 : _b.isComptable) && !((_d = (_c = el === null || el === void 0 ? void 0 : el.paymentsPrestations) === null || _c === void 0 ? void 0 : _c.prestationsList) === null || _d === void 0 ? void 0 : _d.isJuridique) && !((_f = (_e = el === null || el === void 0 ? void 0 : el.paymentsPrestations) === null || _e === void 0 ? void 0 : _e.prestationsList) === null || _f === void 0 ? void 0 : _f.isSocial);
32
+ });
33
+ const societyPayment = [];
34
+ if (prestaComptable.length && types.includes('isComptable')) {
35
+ societyPayment.push(Object.assign(Object.assign({}, prestaComptable[0]), {
36
+ type: 'isComptable',
37
+ listPayments: prestaComptable
38
+ }));
39
+ }
40
+ if (prestaSocial.length && types.includes('isSocial')) {
41
+ societyPayment.push(Object.assign(Object.assign({}, prestaSocial[0]), {
42
+ type: 'isSocial',
43
+ listPayments: prestaSocial
44
+ }));
45
+ }
46
+ if (prestaJuridique.length && types.includes('isJuridique')) {
47
+ societyPayment.push(Object.assign(Object.assign({}, prestaJuridique[0]), {
48
+ type: 'isJuridique',
49
+ listPayments: prestaJuridique
50
+ }));
51
+ }
52
+ if (prestaOther.length && types.includes('isOther')) {
53
+ societyPayment.push(Object.assign(Object.assign({}, prestaOther[0]), {
54
+ type: 'isOther',
55
+ listPayments: prestaOther
56
+ }));
57
+ }
58
+ return societyPayment;
59
+ };
60
+ exports.groupPaymentsByServiceType = groupPaymentsByServiceType;
61
+ //# sourceMappingURL=payment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment.js","names":["groupPaymentsByServiceType","payments","types","prestaComptable","filter","el","_a","_b","_c","paymentsPrestations","prestationsList","isComptable","prestaSocial","_d","isSocial","prestaJuridique","isJuridique","prestaOther","_e","_f","societyPayment","length","includes","push","Object","assign","type","listPayments","exports"],"sources":["../../ts/utils/payment.ts"],"sourcesContent":["import { IPayment } from '../types';\n\ninterface PaymentsWithList extends IPayment {\n type: 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther',\n listPayments: IPayment[]\n}\n\n/**\n * A partir d'une liste de payment (avec include jusqu'à prestationList, \n * avec en attributs 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther')\n * permet de récupérer uniquement le premier paiement de chaque type \n * et les autres payments dans listPayments\n * avec possibilité de filtrer avec le tableau de filtres\n * @param payments \n * @param types \n * @returns \n */\nconst groupPaymentsByServiceType = (payments: IPayment[], types: ('isComptable' | 'isJuridique' | 'isSocial' | 'isOther')[] = ['isComptable', 'isJuridique', 'isSocial', 'isOther']): PaymentsWithList[] => {\n const prestaComptable = payments.filter((el) => el?.paymentsPrestations?.prestationsList?.isComptable ?? false);\n const prestaSocial = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isSocial);\n const prestaJuridique = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isJuridique);\n const prestaOther = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && !el?.paymentsPrestations?.prestationsList?.isJuridique && !el?.paymentsPrestations?.prestationsList?.isSocial);\n \n const societyPayment: PaymentsWithList[] = [];\n if (prestaComptable.length && types.includes('isComptable')) {\n societyPayment.push({\n ...prestaComptable[0], // Données de base\n type: 'isComptable',\n listPayments: prestaComptable,\n });\n }\n if (prestaSocial.length && types.includes('isSocial')) {\n societyPayment.push({\n ...prestaSocial[0], // Données de base\n type: 'isSocial',\n listPayments: prestaSocial,\n });\n }\n if (prestaJuridique.length && types.includes('isJuridique')) {\n societyPayment.push({\n ...prestaJuridique[0], // Données de base\n type: 'isJuridique',\n listPayments: prestaJuridique,\n });\n }\n if (prestaOther.length && types.includes('isOther')) {\n societyPayment.push({\n ...prestaOther[0], // Données de base\n type: 'isOther',\n listPayments: prestaOther,\n });\n }\n return societyPayment;\n};\n\nexport {\n groupPaymentsByServiceType,\n};"],"mappings":";;;;;AAOA;;;;;;;;;;AAUA,MAAMA,0BAA0B,GAAGA,CAACC,QAAoB,EAAEC,KAAA,GAAoE,CAAC,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,CAAC,KAAwB;EACzM,MAAMC,eAAe,GAAGF,QAAQ,CAACG,MAAM,CAAEC,EAAE,IAAI;IAAA,IAAAC,EAAA,EAAAC,EAAA,EAAAC,EAAA;IAAC,QAAAA,EAAA,IAAAD,EAAA,IAAAD,EAAA,GAAAD,EAAE,aAAFA,EAAE,uBAAFA,EAAE,CAAEI,mBAAmB,cAAAH,EAAA,uBAAAA,EAAA,CAAEI,eAAe,cAAAH,EAAA,uBAAAA,EAAA,CAAEI,WAAW,cAAAH,EAAA,cAAAA,EAAA,GAAI,KAAK;EAAA,EAAC;EAC/G,MAAMI,YAAY,GAAGX,QAAQ,CAACG,MAAM,CAAEC,EAAE,IAAI;IAAA,IAAAC,EAAA,EAAAC,EAAA,EAAAC,EAAA,EAAAK,EAAA;IAAC,SAAC,CAAAN,EAAA,IAAAD,EAAA,GAAAD,EAAE,aAAFA,EAAE,uBAAFA,EAAE,CAAEI,mBAAmB,cAAAH,E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AY,EAAEV;IAAW,GACzB;;EAEJ,OAAOG,cAAc;AACvB,CAAC;AAACQ,OAAA,CAGA5B,0BAA0B,GAA1BA,0BAA0B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.1.95",
3
+ "version": "1.1.96",
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": "js/index.js",
@@ -1,5 +1,5 @@
1
1
  import { Resource } from '../Resource';
2
- import { QueryMonthlyPayment, QueryPaymentCsv } from '../../types';
2
+ import { CreateNotifyCustomer, QueryMonthlyPayment, QueryPaymentCsv } from '../../types';
3
3
 
4
4
  export class Payment extends Resource {
5
5
  getMonthlyCsv(query: QueryMonthlyPayment): Promise<void> {
@@ -21,4 +21,8 @@ export class Payment extends Resource {
21
21
  },
22
22
  });
23
23
  }
24
+
25
+ notifyCustomers(payload: CreateNotifyCustomer): Promise<void> {
26
+ return this.axios.$post('payment/notify-customers', payload);
27
+ }
24
28
  }
@@ -630,7 +630,7 @@ export enum NationalityId {
630
630
  PARAGUAYENNE = 139,
631
631
  PERUVIENNE = 140,
632
632
  PHILIPPINE = 141,
633
- POLONAISE = 42,
633
+ POLONAISE = 142,
634
634
  PORTORICAINE = 143,
635
635
  PORTUGAISE = 144,
636
636
  QATARIENNE = 145,
@@ -701,8 +701,8 @@ export const NationalityList: Array<{ name: string; id: NationalityId }> = [
701
701
  { name: 'Autrichienne', id: NationalityId.AUTRICHIENNE },
702
702
  { name: 'Azerbaïdjanaise', id: NationalityId.AZERBAIDJANAISE },
703
703
  { name: 'Bahamienne', id: NationalityId.BAHAMIENNE },
704
- { name: 'Bahreinienne', id: NationalityId.AUSTRALIENNE },
705
- { name: 'Bangladaise', id: NationalityId.BAHREINIENNE },
704
+ { name: 'Bahreinienne', id: NationalityId.BAHREINIENNE },
705
+ { name: 'Bangladaise', id: NationalityId.BANGLADAISE },
706
706
  { name: 'Barbadienne', id: NationalityId.BARBADIENNE },
707
707
  { name: 'Belge', id: NationalityId.BELGE },
708
708
  { name: 'Belizienne', id: NationalityId.BELIZIENNE },