@factpulse/sdk 2.0.12 → 3.0.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.
Files changed (1280) hide show
  1. package/.github/SETUP_GITHUB_ACTIONS.md +70 -8
  2. package/.github/workflows/publish-npm.yml +5 -7
  3. package/.openapi-generator/FILES +206 -174
  4. package/CHANGELOG.md +3 -3
  5. package/README.md +181 -132
  6. package/api/afnorpdppaapi.ts +159 -10
  7. package/api/afnorpdppadirectory-service-api.ts +78 -78
  8. package/api/afnorpdppaflow-service-api.ts +30 -30
  9. package/api/chorus-pro-api.ts +358 -388
  10. package/api/health-api.ts +176 -0
  11. package/api/invoice-processing-api.ts +1083 -0
  12. package/api/pdfxmlverification-api.ts +536 -0
  13. package/api/user-api.ts +119 -0
  14. package/api.ts +6 -5
  15. package/base.ts +2 -2
  16. package/common.ts +2 -2
  17. package/configuration.ts +2 -2
  18. package/dist/api/afnorpdppaapi.d.ts +75 -10
  19. package/dist/api/afnorpdppaapi.js +152 -11
  20. package/dist/api/afnorpdppadirectory-service-api.d.ts +78 -78
  21. package/dist/api/afnorpdppadirectory-service-api.js +82 -79
  22. package/dist/api/afnorpdppaflow-service-api.d.ts +30 -30
  23. package/dist/api/afnorpdppaflow-service-api.js +34 -31
  24. package/dist/api/chorus-pro-api.d.ts +345 -280
  25. package/dist/api/chorus-pro-api.js +351 -356
  26. package/dist/api/health-api.d.ts +90 -0
  27. package/dist/api/health-api.js +184 -0
  28. package/dist/api/invoice-processing-api.d.ts +480 -0
  29. package/dist/api/invoice-processing-api.js +1010 -0
  30. package/dist/api/pdfxmlverification-api.d.ts +237 -0
  31. package/dist/api/pdfxmlverification-api.js +514 -0
  32. package/dist/api/user-api.d.ts +62 -0
  33. package/dist/api/user-api.js +128 -0
  34. package/dist/api.d.ts +6 -5
  35. package/dist/api.js +6 -5
  36. package/dist/base.d.ts +2 -2
  37. package/dist/base.js +6 -3
  38. package/dist/common.d.ts +2 -2
  39. package/dist/common.js +2 -2
  40. package/dist/configuration.d.ts +2 -2
  41. package/dist/configuration.js +2 -2
  42. package/dist/esm/api/afnorpdppaapi.d.ts +75 -10
  43. package/dist/esm/api/afnorpdppaapi.js +149 -11
  44. package/dist/esm/api/afnorpdppadirectory-service-api.d.ts +78 -78
  45. package/dist/esm/api/afnorpdppadirectory-service-api.js +78 -78
  46. package/dist/esm/api/afnorpdppaflow-service-api.d.ts +30 -30
  47. package/dist/esm/api/afnorpdppaflow-service-api.js +30 -30
  48. package/dist/esm/api/chorus-pro-api.d.ts +345 -280
  49. package/dist/esm/api/chorus-pro-api.js +347 -355
  50. package/dist/esm/api/health-api.d.ts +90 -0
  51. package/dist/esm/api/health-api.js +174 -0
  52. package/dist/esm/api/invoice-processing-api.d.ts +480 -0
  53. package/dist/esm/api/invoice-processing-api.js +1000 -0
  54. package/dist/esm/api/pdfxmlverification-api.d.ts +237 -0
  55. package/dist/esm/api/pdfxmlverification-api.js +504 -0
  56. package/dist/esm/api/user-api.d.ts +62 -0
  57. package/dist/esm/api/user-api.js +118 -0
  58. package/dist/esm/api.d.ts +6 -5
  59. package/dist/esm/api.js +6 -5
  60. package/dist/esm/base.d.ts +2 -2
  61. package/dist/esm/base.js +2 -2
  62. package/dist/esm/common.d.ts +2 -2
  63. package/dist/esm/common.js +2 -2
  64. package/dist/esm/configuration.d.ts +2 -2
  65. package/dist/esm/configuration.js +2 -2
  66. package/dist/esm/index.d.ts +2 -2
  67. package/dist/esm/index.js +2 -2
  68. package/dist/esm/models/acknowledgment-status.d.ts +20 -0
  69. package/dist/esm/models/acknowledgment-status.js +21 -0
  70. package/dist/esm/models/afnorcredentials.d.ts +19 -0
  71. package/dist/esm/models/afnorcredentials.js +14 -0
  72. package/dist/esm/models/afnordestination.d.ts +34 -0
  73. package/dist/esm/models/afnordestination.js +21 -0
  74. package/dist/esm/models/afnorhealth-check-response.d.ts +28 -0
  75. package/dist/esm/models/afnorhealth-check-response.js +14 -0
  76. package/dist/esm/models/afnorresult.d.ts +30 -0
  77. package/dist/esm/models/afnorresult.js +14 -0
  78. package/dist/esm/models/allowance-reason-code.d.ts +24 -0
  79. package/dist/esm/models/allowance-reason-code.js +25 -0
  80. package/dist/esm/models/amount-due.d.ts +16 -0
  81. package/dist/esm/models/amount-due.js +14 -0
  82. package/dist/esm/models/apierror.d.ts +26 -0
  83. package/dist/esm/models/apierror.js +14 -0
  84. package/dist/esm/models/apiprofile.d.ts +21 -0
  85. package/dist/esm/models/apiprofile.js +22 -0
  86. package/dist/esm/models/bounding-box-schema.d.ts +44 -0
  87. package/dist/esm/models/bounding-box-schema.js +14 -0
  88. package/dist/esm/models/celery-status.d.ts +22 -0
  89. package/dist/esm/models/celery-status.js +23 -0
  90. package/dist/esm/models/certificate-info-response.d.ts +23 -23
  91. package/dist/esm/models/certificate-info-response.js +2 -2
  92. package/dist/esm/models/chorus-pro-destination.d.ts +23 -0
  93. package/dist/esm/models/chorus-pro-destination.js +16 -0
  94. package/dist/esm/models/chorus-pro-result.d.ts +22 -0
  95. package/dist/esm/models/chorus-pro-result.js +14 -0
  96. package/dist/esm/models/destination.d.ts +7 -7
  97. package/dist/esm/models/destination.js +2 -2
  98. package/dist/esm/models/document-type.d.ts +37 -0
  99. package/dist/esm/models/document-type.js +38 -0
  100. package/dist/esm/models/electronic-address.d.ts +19 -0
  101. package/dist/esm/models/electronic-address.js +14 -0
  102. package/dist/esm/models/enriched-invoice-info.d.ts +24 -0
  103. package/dist/esm/models/enriched-invoice-info.js +14 -0
  104. package/dist/esm/models/error-level.d.ts +16 -0
  105. package/dist/esm/models/error-level.js +17 -0
  106. package/dist/esm/models/error-source.d.ts +22 -0
  107. package/dist/esm/models/error-source.js +23 -0
  108. package/dist/esm/models/factur-xpdfinfo.d.ts +28 -0
  109. package/dist/esm/models/factur-xpdfinfo.js +14 -0
  110. package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts +36 -0
  111. package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js +14 -0
  112. package/dist/esm/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts +24 -0
  113. package/dist/esm/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js +14 -0
  114. package/dist/esm/models/facture-factur-x.d.ts +30 -28
  115. package/dist/esm/models/facture-factur-x.js +2 -2
  116. package/dist/esm/models/field-status.d.ts +22 -0
  117. package/dist/esm/models/field-status.js +23 -0
  118. package/dist/esm/models/flow-direction.d.ts +19 -0
  119. package/dist/esm/models/flow-direction.js +20 -0
  120. package/dist/esm/models/flow-profile.d.ts +20 -0
  121. package/dist/esm/models/flow-profile.js +21 -0
  122. package/dist/esm/models/flow-summary.d.ts +24 -0
  123. package/dist/esm/models/flow-summary.js +14 -0
  124. package/dist/esm/models/flow-syntax.d.ts +22 -0
  125. package/dist/esm/models/flow-syntax.js +23 -0
  126. package/dist/esm/models/flow-type.d.ts +22 -0
  127. package/dist/esm/models/flow-type.js +23 -0
  128. package/dist/esm/models/generate-certificate-request.d.ts +21 -21
  129. package/dist/esm/models/generate-certificate-request.js +2 -2
  130. package/dist/esm/models/generate-certificate-response.d.ts +12 -12
  131. package/dist/esm/models/generate-certificate-response.js +2 -2
  132. package/dist/esm/models/get-chorus-pro-id-request.d.ts +26 -0
  133. package/dist/esm/models/get-chorus-pro-id-request.js +14 -0
  134. package/dist/esm/models/get-chorus-pro-id-response.d.ts +29 -0
  135. package/dist/esm/models/get-chorus-pro-id-response.js +14 -0
  136. package/dist/esm/models/get-invoice-request.d.ts +22 -0
  137. package/dist/esm/models/get-invoice-request.js +14 -0
  138. package/dist/esm/models/get-invoice-response.d.ts +26 -0
  139. package/dist/esm/models/get-invoice-response.js +14 -0
  140. package/dist/esm/models/get-structure-request.d.ts +26 -0
  141. package/dist/esm/models/get-structure-request.js +14 -0
  142. package/dist/esm/models/get-structure-response.d.ts +26 -0
  143. package/dist/esm/models/get-structure-response.js +14 -0
  144. package/dist/esm/models/global-allowance-amount.d.ts +16 -0
  145. package/dist/esm/models/global-allowance-amount.js +14 -0
  146. package/dist/esm/models/httpvalidation-error.d.ts +2 -2
  147. package/dist/esm/models/httpvalidation-error.js +2 -2
  148. package/dist/esm/models/incoming-invoice.d.ts +68 -0
  149. package/dist/esm/models/incoming-invoice.js +14 -0
  150. package/dist/esm/models/incoming-supplier.d.ts +29 -0
  151. package/dist/esm/models/incoming-supplier.js +14 -0
  152. package/dist/esm/models/index.d.ts +99 -84
  153. package/dist/esm/models/index.js +99 -84
  154. package/dist/esm/models/invoice-format.d.ts +20 -0
  155. package/dist/esm/models/invoice-format.js +21 -0
  156. package/dist/esm/models/invoice-line-allowance-amount.d.ts +16 -0
  157. package/dist/esm/models/invoice-line-allowance-amount.js +14 -0
  158. package/dist/esm/models/invoice-line.d.ts +39 -0
  159. package/dist/esm/models/invoice-line.js +14 -0
  160. package/dist/esm/models/invoice-note.d.ts +18 -0
  161. package/dist/esm/models/invoice-note.js +14 -0
  162. package/dist/esm/models/invoice-references.d.ts +27 -0
  163. package/dist/esm/models/invoice-references.js +14 -0
  164. package/dist/esm/models/invoice-status.d.ts +25 -0
  165. package/dist/esm/models/invoice-status.js +14 -0
  166. package/dist/esm/models/invoice-totals-prepayment.d.ts +16 -0
  167. package/dist/esm/models/invoice-totals-prepayment.js +14 -0
  168. package/dist/esm/models/invoice-totals.d.ts +29 -0
  169. package/dist/esm/models/invoice-totals.js +14 -0
  170. package/dist/esm/models/invoice-type-code.d.ts +97 -0
  171. package/dist/esm/models/invoice-type-code.js +98 -0
  172. package/dist/esm/models/invoicing-framework-code.d.ts +25 -0
  173. package/dist/esm/models/invoicing-framework-code.js +26 -0
  174. package/dist/esm/models/invoicing-framework.d.ts +22 -0
  175. package/dist/esm/models/invoicing-framework.js +14 -0
  176. package/dist/esm/models/line-net-amount.d.ts +16 -0
  177. package/dist/esm/models/line-net-amount.js +14 -0
  178. package/dist/esm/models/mandatory-note-schema.d.ts +34 -0
  179. package/dist/esm/models/mandatory-note-schema.js +14 -0
  180. package/dist/esm/models/manual-rate.d.ts +16 -0
  181. package/dist/esm/models/manual-rate.js +14 -0
  182. package/dist/esm/models/manual-vat-rate.d.ts +16 -0
  183. package/dist/esm/models/manual-vat-rate.js +14 -0
  184. package/dist/esm/models/operation-nature.d.ts +31 -0
  185. package/dist/esm/models/operation-nature.js +32 -0
  186. package/dist/esm/models/output-format.d.ts +19 -0
  187. package/dist/esm/models/output-format.js +20 -0
  188. package/dist/esm/models/page-dimensions-schema.d.ts +24 -0
  189. package/dist/esm/models/page-dimensions-schema.js +14 -0
  190. package/dist/esm/models/payee.d.ts +26 -0
  191. package/dist/esm/models/payee.js +14 -0
  192. package/dist/esm/models/payment-means.d.ts +29 -0
  193. package/dist/esm/models/payment-means.js +30 -0
  194. package/dist/esm/models/pdfvalidation-result-api.d.ts +93 -0
  195. package/dist/esm/models/pdfvalidation-result-api.js +14 -0
  196. package/dist/esm/models/pdpcredentials.d.ts +33 -0
  197. package/dist/esm/models/pdpcredentials.js +14 -0
  198. package/dist/esm/models/postal-address.d.ts +21 -0
  199. package/dist/esm/models/postal-address.js +14 -0
  200. package/dist/esm/models/processing-options.d.ts +33 -0
  201. package/dist/esm/models/processing-options.js +14 -0
  202. package/dist/esm/models/quantity.d.ts +16 -0
  203. package/dist/esm/models/quantity.js +14 -0
  204. package/dist/esm/models/recipient.d.ts +24 -0
  205. package/dist/esm/models/recipient.js +14 -0
  206. package/dist/esm/models/scheme-id.d.ts +5 -5
  207. package/dist/esm/models/scheme-id.js +5 -5
  208. package/dist/esm/models/search-flow-request.d.ts +34 -0
  209. package/dist/esm/models/search-flow-request.js +14 -0
  210. package/dist/esm/models/search-flow-response.d.ts +33 -0
  211. package/dist/esm/models/search-flow-response.js +14 -0
  212. package/dist/esm/models/search-services-response.d.ts +24 -0
  213. package/dist/esm/models/search-services-response.js +14 -0
  214. package/dist/esm/models/search-structure-request.d.ts +25 -0
  215. package/dist/esm/models/search-structure-request.js +14 -0
  216. package/dist/esm/models/search-structure-response.d.ts +30 -0
  217. package/dist/esm/models/search-structure-response.js +14 -0
  218. package/dist/esm/models/signature-info-api.d.ts +25 -0
  219. package/dist/esm/models/signature-info-api.js +14 -0
  220. package/dist/esm/models/signature-info.d.ts +5 -5
  221. package/dist/esm/models/signature-info.js +2 -2
  222. package/dist/esm/models/signature-parameters.d.ts +34 -0
  223. package/dist/esm/models/signature-parameters.js +14 -0
  224. package/dist/esm/models/simplified-invoice-data.d.ts +46 -0
  225. package/dist/esm/models/simplified-invoice-data.js +14 -0
  226. package/dist/esm/models/structure-info.d.ts +13 -13
  227. package/dist/esm/models/structure-info.js +2 -2
  228. package/dist/esm/models/structure-parameters.d.ts +28 -0
  229. package/dist/esm/models/structure-parameters.js +14 -0
  230. package/dist/esm/models/structure-service.d.ts +32 -0
  231. package/dist/esm/models/structure-service.js +14 -0
  232. package/dist/esm/models/submission-mode.d.ts +23 -0
  233. package/dist/esm/models/submission-mode.js +24 -0
  234. package/dist/esm/models/submit-complete-invoice-request.d.ts +34 -0
  235. package/dist/esm/models/submit-complete-invoice-request.js +14 -0
  236. package/dist/esm/models/submit-complete-invoice-response.d.ts +53 -0
  237. package/dist/esm/models/submit-complete-invoice-response.js +17 -0
  238. package/dist/esm/models/submit-flow-request.d.ts +31 -0
  239. package/dist/esm/models/submit-flow-request.js +14 -0
  240. package/dist/esm/models/submit-flow-response.d.ts +38 -0
  241. package/dist/esm/models/submit-flow-response.js +14 -0
  242. package/dist/esm/models/submit-invoice-request.d.ts +44 -0
  243. package/dist/esm/models/submit-invoice-request.js +14 -0
  244. package/dist/esm/models/submit-invoice-response.d.ts +26 -0
  245. package/dist/esm/models/submit-invoice-response.js +14 -0
  246. package/dist/esm/models/supplementary-attachment.d.ts +21 -0
  247. package/dist/esm/models/supplementary-attachment.js +14 -0
  248. package/dist/esm/models/supplier.d.ts +28 -0
  249. package/dist/esm/models/supplier.js +14 -0
  250. package/dist/esm/models/task-response.d.ts +20 -0
  251. package/dist/esm/models/task-response.js +14 -0
  252. package/dist/esm/models/task-status.d.ts +28 -0
  253. package/dist/esm/models/task-status.js +14 -0
  254. package/dist/esm/models/taxable-amount.d.ts +16 -0
  255. package/dist/esm/models/taxable-amount.js +14 -0
  256. package/dist/esm/models/total-gross-amount.d.ts +16 -0
  257. package/dist/esm/models/total-gross-amount.js +14 -0
  258. package/dist/esm/models/total-net-amount.d.ts +16 -0
  259. package/dist/esm/models/total-net-amount.js +14 -0
  260. package/dist/esm/models/total-vatamount.d.ts +16 -0
  261. package/dist/esm/models/total-vatamount.js +14 -0
  262. package/dist/esm/models/unit-net-price.d.ts +16 -0
  263. package/dist/esm/models/unit-net-price.js +14 -0
  264. package/dist/esm/models/unit-of-measure.d.ts +29 -0
  265. package/dist/esm/models/unit-of-measure.js +30 -0
  266. package/dist/esm/models/validation-error-detail.d.ts +32 -0
  267. package/dist/esm/models/validation-error-detail.js +14 -0
  268. package/dist/esm/models/validation-error-loc-inner.d.ts +2 -2
  269. package/dist/esm/models/validation-error-loc-inner.js +2 -2
  270. package/dist/esm/models/validation-error-response.d.ts +20 -0
  271. package/dist/esm/models/validation-error-response.js +14 -0
  272. package/dist/esm/models/validation-error.d.ts +2 -2
  273. package/dist/esm/models/validation-error.js +2 -2
  274. package/dist/esm/models/validation-success-response.d.ts +20 -0
  275. package/dist/esm/models/validation-success-response.js +14 -0
  276. package/dist/esm/models/vat-amount.d.ts +16 -0
  277. package/dist/esm/models/vat-amount.js +14 -0
  278. package/dist/esm/models/vataccounting-code.d.ts +25 -0
  279. package/dist/esm/models/vataccounting-code.js +26 -0
  280. package/dist/esm/models/vatamount.d.ts +16 -0
  281. package/dist/esm/models/vatamount.js +14 -0
  282. package/dist/esm/models/vatcategory.d.ts +26 -0
  283. package/dist/esm/models/vatcategory.js +27 -0
  284. package/dist/esm/models/vatline.d.ts +27 -0
  285. package/dist/esm/models/vatline.js +14 -0
  286. package/dist/esm/models/verification-success-response.d.ts +56 -0
  287. package/dist/esm/models/verification-success-response.js +14 -0
  288. package/dist/esm/models/verified-field-schema.d.ts +42 -0
  289. package/dist/esm/models/verified-field-schema.js +14 -0
  290. package/dist/esm/src/helpers/client.d.ts +265 -0
  291. package/dist/esm/src/helpers/client.js +817 -0
  292. package/dist/esm/src/helpers/exceptions.d.ts +23 -0
  293. package/dist/esm/src/helpers/exceptions.js +27 -0
  294. package/dist/esm/src/helpers/index.d.ts +3 -0
  295. package/dist/esm/src/helpers/index.js +6 -0
  296. package/dist/index.d.ts +2 -2
  297. package/dist/index.js +2 -2
  298. package/dist/models/acknowledgment-status.d.ts +20 -0
  299. package/dist/models/acknowledgment-status.js +24 -0
  300. package/dist/models/afnorcredentials.d.ts +19 -0
  301. package/dist/models/afnorcredentials.js +15 -0
  302. package/dist/models/afnordestination.d.ts +34 -0
  303. package/dist/models/afnordestination.js +24 -0
  304. package/dist/models/afnorhealth-check-response.d.ts +28 -0
  305. package/dist/models/afnorhealth-check-response.js +15 -0
  306. package/dist/models/afnorresult.d.ts +30 -0
  307. package/dist/models/afnorresult.js +15 -0
  308. package/dist/models/allowance-reason-code.d.ts +24 -0
  309. package/dist/models/allowance-reason-code.js +28 -0
  310. package/dist/models/amount-due.d.ts +16 -0
  311. package/dist/models/amount-due.js +15 -0
  312. package/dist/models/apierror.d.ts +26 -0
  313. package/dist/models/apierror.js +15 -0
  314. package/dist/models/apiprofile.d.ts +21 -0
  315. package/dist/models/apiprofile.js +25 -0
  316. package/dist/models/bounding-box-schema.d.ts +44 -0
  317. package/dist/models/bounding-box-schema.js +15 -0
  318. package/dist/models/celery-status.d.ts +22 -0
  319. package/dist/models/celery-status.js +26 -0
  320. package/dist/models/certificate-info-response.d.ts +23 -23
  321. package/dist/models/certificate-info-response.js +2 -2
  322. package/dist/models/chorus-pro-destination.d.ts +23 -0
  323. package/dist/models/chorus-pro-destination.js +19 -0
  324. package/dist/models/chorus-pro-result.d.ts +22 -0
  325. package/dist/models/chorus-pro-result.js +15 -0
  326. package/dist/models/destination.d.ts +7 -7
  327. package/dist/models/destination.js +2 -2
  328. package/dist/models/document-type.d.ts +37 -0
  329. package/dist/models/document-type.js +41 -0
  330. package/dist/models/electronic-address.d.ts +19 -0
  331. package/dist/models/electronic-address.js +15 -0
  332. package/dist/models/enriched-invoice-info.d.ts +24 -0
  333. package/dist/models/enriched-invoice-info.js +15 -0
  334. package/dist/models/error-level.d.ts +16 -0
  335. package/dist/models/error-level.js +20 -0
  336. package/dist/models/error-source.d.ts +22 -0
  337. package/dist/models/error-source.js +26 -0
  338. package/dist/models/factur-xpdfinfo.d.ts +28 -0
  339. package/dist/models/factur-xpdfinfo.js +15 -0
  340. package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts +36 -0
  341. package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js +15 -0
  342. package/dist/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts +24 -0
  343. package/dist/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js +15 -0
  344. package/dist/models/facture-factur-x.d.ts +30 -28
  345. package/dist/models/facture-factur-x.js +2 -2
  346. package/dist/models/field-status.d.ts +22 -0
  347. package/dist/models/field-status.js +26 -0
  348. package/dist/models/flow-direction.d.ts +19 -0
  349. package/dist/models/flow-direction.js +23 -0
  350. package/dist/models/flow-profile.d.ts +20 -0
  351. package/dist/models/flow-profile.js +24 -0
  352. package/dist/models/flow-summary.d.ts +24 -0
  353. package/dist/models/flow-summary.js +15 -0
  354. package/dist/models/flow-syntax.d.ts +22 -0
  355. package/dist/models/flow-syntax.js +26 -0
  356. package/dist/models/flow-type.d.ts +22 -0
  357. package/dist/models/flow-type.js +26 -0
  358. package/dist/models/generate-certificate-request.d.ts +21 -21
  359. package/dist/models/generate-certificate-request.js +2 -2
  360. package/dist/models/generate-certificate-response.d.ts +12 -12
  361. package/dist/models/generate-certificate-response.js +2 -2
  362. package/dist/models/get-chorus-pro-id-request.d.ts +26 -0
  363. package/dist/models/get-chorus-pro-id-request.js +15 -0
  364. package/dist/models/get-chorus-pro-id-response.d.ts +29 -0
  365. package/dist/models/get-chorus-pro-id-response.js +15 -0
  366. package/dist/models/get-invoice-request.d.ts +22 -0
  367. package/dist/models/get-invoice-request.js +15 -0
  368. package/dist/models/get-invoice-response.d.ts +26 -0
  369. package/dist/models/get-invoice-response.js +15 -0
  370. package/dist/models/get-structure-request.d.ts +26 -0
  371. package/dist/models/get-structure-request.js +15 -0
  372. package/dist/models/get-structure-response.d.ts +26 -0
  373. package/dist/models/get-structure-response.js +15 -0
  374. package/dist/models/global-allowance-amount.d.ts +16 -0
  375. package/dist/models/global-allowance-amount.js +15 -0
  376. package/dist/models/httpvalidation-error.d.ts +2 -2
  377. package/dist/models/httpvalidation-error.js +2 -2
  378. package/dist/models/incoming-invoice.d.ts +68 -0
  379. package/dist/models/incoming-invoice.js +15 -0
  380. package/dist/models/incoming-supplier.d.ts +29 -0
  381. package/dist/models/incoming-supplier.js +15 -0
  382. package/dist/models/index.d.ts +99 -84
  383. package/dist/models/index.js +99 -84
  384. package/dist/models/invoice-format.d.ts +20 -0
  385. package/dist/models/invoice-format.js +24 -0
  386. package/dist/models/invoice-line-allowance-amount.d.ts +16 -0
  387. package/dist/models/invoice-line-allowance-amount.js +15 -0
  388. package/dist/models/invoice-line.d.ts +39 -0
  389. package/dist/models/invoice-line.js +15 -0
  390. package/dist/models/invoice-note.d.ts +18 -0
  391. package/dist/models/invoice-note.js +15 -0
  392. package/dist/models/invoice-references.d.ts +27 -0
  393. package/dist/models/invoice-references.js +15 -0
  394. package/dist/models/invoice-status.d.ts +25 -0
  395. package/dist/models/invoice-status.js +15 -0
  396. package/dist/models/invoice-totals-prepayment.d.ts +16 -0
  397. package/dist/models/invoice-totals-prepayment.js +15 -0
  398. package/dist/models/invoice-totals.d.ts +29 -0
  399. package/dist/models/invoice-totals.js +15 -0
  400. package/dist/models/invoice-type-code.d.ts +97 -0
  401. package/dist/models/invoice-type-code.js +101 -0
  402. package/dist/models/invoicing-framework-code.d.ts +25 -0
  403. package/dist/models/invoicing-framework-code.js +29 -0
  404. package/dist/models/invoicing-framework.d.ts +22 -0
  405. package/dist/models/invoicing-framework.js +15 -0
  406. package/dist/models/line-net-amount.d.ts +16 -0
  407. package/dist/models/line-net-amount.js +15 -0
  408. package/dist/models/mandatory-note-schema.d.ts +34 -0
  409. package/dist/models/mandatory-note-schema.js +15 -0
  410. package/dist/models/manual-rate.d.ts +16 -0
  411. package/dist/models/manual-rate.js +15 -0
  412. package/dist/models/manual-vat-rate.d.ts +16 -0
  413. package/dist/models/manual-vat-rate.js +15 -0
  414. package/dist/models/operation-nature.d.ts +31 -0
  415. package/dist/models/operation-nature.js +35 -0
  416. package/dist/models/output-format.d.ts +19 -0
  417. package/dist/models/output-format.js +23 -0
  418. package/dist/models/page-dimensions-schema.d.ts +24 -0
  419. package/dist/models/page-dimensions-schema.js +15 -0
  420. package/dist/models/payee.d.ts +26 -0
  421. package/dist/models/payee.js +15 -0
  422. package/dist/models/payment-means.d.ts +29 -0
  423. package/dist/models/payment-means.js +33 -0
  424. package/dist/models/pdfvalidation-result-api.d.ts +93 -0
  425. package/dist/models/pdfvalidation-result-api.js +15 -0
  426. package/dist/models/pdpcredentials.d.ts +33 -0
  427. package/dist/models/pdpcredentials.js +15 -0
  428. package/dist/models/postal-address.d.ts +21 -0
  429. package/dist/models/postal-address.js +15 -0
  430. package/dist/models/processing-options.d.ts +33 -0
  431. package/dist/models/processing-options.js +15 -0
  432. package/dist/models/quantity.d.ts +16 -0
  433. package/dist/models/quantity.js +15 -0
  434. package/dist/models/recipient.d.ts +24 -0
  435. package/dist/models/recipient.js +15 -0
  436. package/dist/models/scheme-id.d.ts +5 -5
  437. package/dist/models/scheme-id.js +5 -5
  438. package/dist/models/search-flow-request.d.ts +34 -0
  439. package/dist/models/search-flow-request.js +15 -0
  440. package/dist/models/search-flow-response.d.ts +33 -0
  441. package/dist/models/search-flow-response.js +15 -0
  442. package/dist/models/search-services-response.d.ts +24 -0
  443. package/dist/models/search-services-response.js +15 -0
  444. package/dist/models/search-structure-request.d.ts +25 -0
  445. package/dist/models/search-structure-request.js +15 -0
  446. package/dist/models/search-structure-response.d.ts +30 -0
  447. package/dist/models/search-structure-response.js +15 -0
  448. package/dist/models/signature-info-api.d.ts +25 -0
  449. package/dist/models/signature-info-api.js +15 -0
  450. package/dist/models/signature-info.d.ts +5 -5
  451. package/dist/models/signature-info.js +2 -2
  452. package/dist/models/signature-parameters.d.ts +34 -0
  453. package/dist/models/signature-parameters.js +15 -0
  454. package/dist/models/simplified-invoice-data.d.ts +46 -0
  455. package/dist/models/simplified-invoice-data.js +15 -0
  456. package/dist/models/structure-info.d.ts +13 -13
  457. package/dist/models/structure-info.js +2 -2
  458. package/dist/models/structure-parameters.d.ts +28 -0
  459. package/dist/models/structure-parameters.js +15 -0
  460. package/dist/models/structure-service.d.ts +32 -0
  461. package/dist/models/structure-service.js +15 -0
  462. package/dist/models/submission-mode.d.ts +23 -0
  463. package/dist/models/submission-mode.js +27 -0
  464. package/dist/models/submit-complete-invoice-request.d.ts +34 -0
  465. package/dist/models/submit-complete-invoice-request.js +15 -0
  466. package/dist/models/submit-complete-invoice-response.d.ts +53 -0
  467. package/dist/models/submit-complete-invoice-response.js +20 -0
  468. package/dist/models/submit-flow-request.d.ts +31 -0
  469. package/dist/models/submit-flow-request.js +15 -0
  470. package/dist/models/submit-flow-response.d.ts +38 -0
  471. package/dist/models/submit-flow-response.js +15 -0
  472. package/dist/models/submit-invoice-request.d.ts +44 -0
  473. package/dist/models/submit-invoice-request.js +15 -0
  474. package/dist/models/submit-invoice-response.d.ts +26 -0
  475. package/dist/models/submit-invoice-response.js +15 -0
  476. package/dist/models/supplementary-attachment.d.ts +21 -0
  477. package/dist/models/supplementary-attachment.js +15 -0
  478. package/dist/models/supplier.d.ts +28 -0
  479. package/dist/models/supplier.js +15 -0
  480. package/dist/models/task-response.d.ts +20 -0
  481. package/dist/models/task-response.js +15 -0
  482. package/dist/models/task-status.d.ts +28 -0
  483. package/dist/models/task-status.js +15 -0
  484. package/dist/models/taxable-amount.d.ts +16 -0
  485. package/dist/models/taxable-amount.js +15 -0
  486. package/dist/models/total-gross-amount.d.ts +16 -0
  487. package/dist/models/total-gross-amount.js +15 -0
  488. package/dist/models/total-net-amount.d.ts +16 -0
  489. package/dist/models/total-net-amount.js +15 -0
  490. package/dist/models/total-vatamount.d.ts +16 -0
  491. package/dist/models/total-vatamount.js +15 -0
  492. package/dist/models/unit-net-price.d.ts +16 -0
  493. package/dist/models/unit-net-price.js +15 -0
  494. package/dist/models/unit-of-measure.d.ts +29 -0
  495. package/dist/models/unit-of-measure.js +33 -0
  496. package/dist/models/validation-error-detail.d.ts +32 -0
  497. package/dist/models/validation-error-detail.js +15 -0
  498. package/dist/models/validation-error-loc-inner.d.ts +2 -2
  499. package/dist/models/validation-error-loc-inner.js +2 -2
  500. package/dist/models/validation-error-response.d.ts +20 -0
  501. package/dist/models/validation-error-response.js +15 -0
  502. package/dist/models/validation-error.d.ts +2 -2
  503. package/dist/models/validation-error.js +2 -2
  504. package/dist/models/validation-success-response.d.ts +20 -0
  505. package/dist/models/validation-success-response.js +15 -0
  506. package/dist/models/vat-amount.d.ts +16 -0
  507. package/dist/models/vat-amount.js +15 -0
  508. package/dist/models/vataccounting-code.d.ts +25 -0
  509. package/dist/models/vataccounting-code.js +29 -0
  510. package/dist/models/vatamount.d.ts +16 -0
  511. package/dist/models/vatamount.js +15 -0
  512. package/dist/models/vatcategory.d.ts +26 -0
  513. package/dist/models/vatcategory.js +30 -0
  514. package/dist/models/vatline.d.ts +27 -0
  515. package/dist/models/vatline.js +15 -0
  516. package/dist/models/verification-success-response.d.ts +56 -0
  517. package/dist/models/verification-success-response.js +15 -0
  518. package/dist/models/verified-field-schema.d.ts +42 -0
  519. package/dist/models/verified-field-schema.js +15 -0
  520. package/dist/src/helpers/client.d.ts +265 -0
  521. package/dist/src/helpers/client.js +866 -0
  522. package/dist/src/helpers/exceptions.d.ts +23 -0
  523. package/dist/src/helpers/exceptions.js +35 -0
  524. package/dist/src/helpers/index.d.ts +3 -0
  525. package/dist/src/helpers/index.js +24 -0
  526. package/docs/AFNORCredentials.md +25 -0
  527. package/docs/AFNORDestination.md +27 -0
  528. package/docs/AFNORHealthCheckResponse.md +25 -0
  529. package/docs/AFNORPDPPAApi.md +112 -4
  530. package/docs/AFNORPDPPADirectoryServiceApi.md +70 -70
  531. package/docs/AFNORPDPPAFlowServiceApi.md +23 -23
  532. package/docs/AFNORResult.md +29 -0
  533. package/docs/APIError.md +25 -0
  534. package/docs/APIProfile.md +15 -0
  535. package/docs/AcknowledgmentStatus.md +13 -0
  536. package/docs/AllowanceReasonCode.md +21 -0
  537. package/docs/AmountDue.md +19 -0
  538. package/docs/BoundingBoxSchema.md +33 -0
  539. package/docs/CeleryStatus.md +17 -0
  540. package/docs/CertificateInfoResponse.md +21 -21
  541. package/docs/ChorusProApi.md +116 -131
  542. package/docs/ChorusProDestination.md +23 -0
  543. package/docs/ChorusProResult.md +25 -0
  544. package/docs/Destination.md +6 -6
  545. package/docs/DocumentType.md +17 -0
  546. package/docs/ElectronicAddress.md +23 -0
  547. package/docs/EnrichedInvoiceInfo.md +35 -0
  548. package/docs/ErrorLevel.md +10 -0
  549. package/docs/ErrorSource.md +22 -0
  550. package/docs/FacturXPDFInfo.md +25 -0
  551. package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +29 -0
  552. package/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +29 -0
  553. package/docs/FactureFacturX.md +31 -29
  554. package/docs/FieldStatus.md +17 -0
  555. package/docs/FlowDirection.md +11 -0
  556. package/docs/FlowProfile.md +13 -0
  557. package/docs/FlowSummary.md +35 -0
  558. package/docs/FlowSyntax.md +17 -0
  559. package/docs/FlowType.md +17 -0
  560. package/docs/GenerateCertificateRequest.md +20 -20
  561. package/docs/GenerateCertificateResponse.md +11 -11
  562. package/docs/GetChorusProIdRequest.md +25 -0
  563. package/docs/GetChorusProIdResponse.md +27 -0
  564. package/docs/GetInvoiceRequest.md +23 -0
  565. package/docs/GetInvoiceResponse.md +37 -0
  566. package/docs/GetStructureRequest.md +25 -0
  567. package/docs/GetStructureResponse.md +37 -0
  568. package/docs/GlobalAllowanceAmount.md +19 -0
  569. package/docs/HealthApi.md +97 -0
  570. package/docs/IncomingInvoice.md +57 -0
  571. package/docs/IncomingSupplier.md +35 -0
  572. package/docs/InvoiceFormat.md +13 -0
  573. package/docs/InvoiceLine.md +49 -0
  574. package/docs/InvoiceLineAllowanceAmount.md +19 -0
  575. package/docs/InvoiceNote.md +23 -0
  576. package/docs/InvoiceProcessingApi.md +670 -0
  577. package/docs/InvoiceReferences.md +35 -0
  578. package/docs/InvoiceStatus.md +25 -0
  579. package/docs/InvoiceTotals.md +33 -0
  580. package/docs/InvoiceTotalsPrepayment.md +19 -0
  581. package/docs/InvoiceTypeCode.md +71 -0
  582. package/docs/InvoicingFramework.md +27 -0
  583. package/docs/InvoicingFrameworkCode.md +23 -0
  584. package/docs/LineNetAmount.md +19 -0
  585. package/docs/MandatoryNoteSchema.md +33 -0
  586. package/docs/ManualRate.md +19 -0
  587. package/docs/ManualVatRate.md +19 -0
  588. package/docs/OperationNature.md +35 -0
  589. package/docs/OutputFormat.md +11 -0
  590. package/docs/PDFValidationResultAPI.md +65 -0
  591. package/docs/PDFXMLVerificationApi.md +335 -0
  592. package/docs/PDPCredentials.md +29 -0
  593. package/docs/PageDimensionsSchema.md +23 -0
  594. package/docs/Payee.md +31 -0
  595. package/docs/PaymentMeans.md +31 -0
  596. package/docs/PostalAddress.md +29 -0
  597. package/docs/ProcessingOptions.md +27 -0
  598. package/docs/Quantity.md +19 -0
  599. package/docs/Recipient.md +31 -0
  600. package/docs/SchemeID.md +1 -1
  601. package/docs/SearchFlowRequest.md +37 -0
  602. package/docs/SearchFlowResponse.md +27 -0
  603. package/docs/SearchServicesResponse.md +27 -0
  604. package/docs/SearchStructureRequest.md +29 -0
  605. package/docs/SearchStructureResponse.md +27 -0
  606. package/docs/SignatureInfo.md +3 -3
  607. package/docs/SignatureInfoAPI.md +31 -0
  608. package/docs/SignatureParameters.md +37 -0
  609. package/docs/SimplifiedInvoiceData.md +37 -0
  610. package/docs/StructureInfo.md +11 -11
  611. package/docs/StructureParameters.md +25 -0
  612. package/docs/StructureService.md +27 -0
  613. package/docs/SubmissionMode.md +19 -0
  614. package/docs/SubmitCompleteInvoiceRequest.md +29 -0
  615. package/docs/SubmitCompleteInvoiceResponse.md +37 -0
  616. package/docs/SubmitFlowRequest.md +31 -0
  617. package/docs/SubmitFlowResponse.md +33 -0
  618. package/docs/SubmitInvoiceRequest.md +49 -0
  619. package/docs/SubmitInvoiceResponse.md +27 -0
  620. package/docs/SupplementaryAttachment.md +29 -0
  621. package/docs/Supplier.md +39 -0
  622. package/docs/TaskResponse.md +21 -0
  623. package/docs/TaskStatus.md +25 -0
  624. package/docs/TaxableAmount.md +19 -0
  625. package/docs/TotalGrossAmount.md +19 -0
  626. package/docs/TotalNetAmount.md +19 -0
  627. package/docs/TotalVATAmount.md +19 -0
  628. package/docs/UnitNetPrice.md +19 -0
  629. package/docs/UnitOfMeasure.md +31 -0
  630. package/docs/UserApi.md +52 -0
  631. package/docs/VATAccountingCode.md +23 -0
  632. package/docs/VATAmount.md +19 -0
  633. package/docs/VATCategory.md +25 -0
  634. package/docs/VATLine.md +33 -0
  635. package/docs/ValidationErrorDetail.md +29 -0
  636. package/docs/ValidationErrorResponse.md +21 -0
  637. package/docs/ValidationSuccessResponse.md +21 -0
  638. package/docs/VatAmount.md +19 -0
  639. package/docs/VerificationSuccessResponse.md +39 -0
  640. package/docs/VerifiedFieldSchema.md +37 -0
  641. package/index.ts +2 -2
  642. package/models/acknowledgment-status.ts +30 -0
  643. package/models/afnorcredentials.ts +25 -0
  644. package/models/afnordestination.ts +46 -0
  645. package/models/afnorhealth-check-response.ts +34 -0
  646. package/models/afnorresult.ts +36 -0
  647. package/models/allowance-reason-code.ts +34 -0
  648. package/models/amount-due.ts +22 -0
  649. package/models/apierror.ts +34 -0
  650. package/models/apiprofile.ts +31 -0
  651. package/models/bounding-box-schema.ts +50 -0
  652. package/models/celery-status.ts +32 -0
  653. package/models/certificate-info-response.ts +23 -23
  654. package/models/chorus-pro-destination.ts +34 -0
  655. package/models/chorus-pro-result.ts +28 -0
  656. package/models/destination.ts +7 -7
  657. package/models/document-type.ts +47 -0
  658. package/models/electronic-address.ts +29 -0
  659. package/models/enriched-invoice-info.ts +30 -0
  660. package/models/error-level.ts +26 -0
  661. package/models/error-source.ts +32 -0
  662. package/models/factur-xpdfinfo.ts +34 -0
  663. package/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts +42 -0
  664. package/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts +30 -0
  665. package/models/facture-factur-x.ts +32 -28
  666. package/models/field-status.ts +32 -0
  667. package/models/flow-direction.ts +29 -0
  668. package/models/flow-profile.ts +30 -0
  669. package/models/flow-summary.ts +30 -0
  670. package/models/flow-syntax.ts +32 -0
  671. package/models/flow-type.ts +32 -0
  672. package/models/generate-certificate-request.ts +21 -21
  673. package/models/generate-certificate-response.ts +12 -12
  674. package/models/get-chorus-pro-id-request.ts +34 -0
  675. package/models/get-chorus-pro-id-response.ts +35 -0
  676. package/models/get-invoice-request.ts +30 -0
  677. package/models/get-invoice-response.ts +34 -0
  678. package/models/get-structure-request.ts +34 -0
  679. package/models/get-structure-response.ts +34 -0
  680. package/models/global-allowance-amount.ts +22 -0
  681. package/models/httpvalidation-error.ts +2 -2
  682. package/models/incoming-invoice.ts +82 -0
  683. package/models/incoming-supplier.ts +39 -0
  684. package/models/index.ts +99 -84
  685. package/models/invoice-format.ts +30 -0
  686. package/models/invoice-line-allowance-amount.ts +22 -0
  687. package/models/invoice-line.ts +63 -0
  688. package/models/invoice-note.ts +24 -0
  689. package/models/invoice-references.ts +41 -0
  690. package/models/invoice-status.ts +31 -0
  691. package/models/invoice-totals-prepayment.ts +22 -0
  692. package/models/invoice-totals.ts +47 -0
  693. package/models/invoice-type-code.ts +107 -0
  694. package/models/invoicing-framework-code.ts +35 -0
  695. package/models/invoicing-framework.ts +34 -0
  696. package/models/line-net-amount.ts +22 -0
  697. package/models/mandatory-note-schema.ts +46 -0
  698. package/models/manual-rate.ts +22 -0
  699. package/models/manual-vat-rate.ts +22 -0
  700. package/models/operation-nature.ts +41 -0
  701. package/models/output-format.ts +29 -0
  702. package/models/page-dimensions-schema.ts +30 -0
  703. package/models/payee.ts +34 -0
  704. package/models/payment-means.ts +39 -0
  705. package/models/pdfvalidation-result-api.ts +99 -0
  706. package/models/pdpcredentials.ts +39 -0
  707. package/models/postal-address.ts +27 -0
  708. package/models/processing-options.ts +43 -0
  709. package/models/quantity.ts +22 -0
  710. package/models/recipient.ts +34 -0
  711. package/models/scheme-id.ts +5 -5
  712. package/models/search-flow-request.ts +48 -0
  713. package/models/search-flow-response.ts +41 -0
  714. package/models/search-services-response.ts +32 -0
  715. package/models/search-structure-request.ts +33 -0
  716. package/models/search-structure-response.ts +38 -0
  717. package/models/signature-info-api.ts +31 -0
  718. package/models/signature-info.ts +5 -5
  719. package/models/signature-parameters.ts +40 -0
  720. package/models/simplified-invoice-data.ts +46 -0
  721. package/models/structure-info.ts +13 -13
  722. package/models/structure-parameters.ts +34 -0
  723. package/models/structure-service.ts +38 -0
  724. package/models/submission-mode.ts +33 -0
  725. package/models/submit-complete-invoice-request.ts +48 -0
  726. package/models/submit-complete-invoice-response.ts +72 -0
  727. package/models/submit-flow-request.ts +45 -0
  728. package/models/submit-flow-response.ts +44 -0
  729. package/models/submit-invoice-request.ts +58 -0
  730. package/models/submit-invoice-response.ts +32 -0
  731. package/models/supplementary-attachment.ts +27 -0
  732. package/models/supplier.ts +38 -0
  733. package/models/task-response.ts +26 -0
  734. package/models/task-status.ts +36 -0
  735. package/models/taxable-amount.ts +22 -0
  736. package/models/total-gross-amount.ts +22 -0
  737. package/models/total-net-amount.ts +22 -0
  738. package/models/total-vatamount.ts +22 -0
  739. package/models/unit-net-price.ts +22 -0
  740. package/models/unit-of-measure.ts +39 -0
  741. package/models/validation-error-detail.ts +44 -0
  742. package/models/validation-error-loc-inner.ts +2 -2
  743. package/models/validation-error-response.ts +26 -0
  744. package/models/validation-error.ts +2 -2
  745. package/models/validation-success-response.ts +26 -0
  746. package/models/vat-amount.ts +22 -0
  747. package/models/vataccounting-code.ts +35 -0
  748. package/models/vatamount.ts +22 -0
  749. package/models/vatcategory.ts +36 -0
  750. package/models/vatline.ts +43 -0
  751. package/models/verification-success-response.ts +68 -0
  752. package/models/verified-field-schema.ts +54 -0
  753. package/package.json +2 -2
  754. package/src/helpers/client.ts +882 -0
  755. package/src/helpers/exceptions.ts +32 -0
  756. package/src/helpers/index.ts +6 -0
  757. package/tsconfig.esm.json +1 -0
  758. package/tsconfig.json +1 -0
  759. package/api/sant-api.ts +0 -176
  760. package/api/traitement-facture-api.ts +0 -1083
  761. package/api/utilisateur-api.ts +0 -119
  762. package/dist/api/sant-api.d.ts +0 -90
  763. package/dist/api/sant-api.js +0 -181
  764. package/dist/api/traitement-facture-api.d.ts +0 -480
  765. package/dist/api/traitement-facture-api.js +0 -1007
  766. package/dist/api/utilisateur-api.d.ts +0 -62
  767. package/dist/api/utilisateur-api.js +0 -125
  768. package/dist/esm/api/sant-api.d.ts +0 -90
  769. package/dist/esm/api/sant-api.js +0 -174
  770. package/dist/esm/api/traitement-facture-api.d.ts +0 -480
  771. package/dist/esm/api/traitement-facture-api.js +0 -1000
  772. package/dist/esm/api/utilisateur-api.d.ts +0 -62
  773. package/dist/esm/api/utilisateur-api.js +0 -118
  774. package/dist/esm/models/adresse-electronique.d.ts +0 -19
  775. package/dist/esm/models/adresse-electronique.js +0 -14
  776. package/dist/esm/models/adresse-postale.d.ts +0 -21
  777. package/dist/esm/models/adresse-postale.js +0 -14
  778. package/dist/esm/models/body-ajouter-fichier-api-v1-chorus-pro-transverses-ajouter-fichier-post.d.ts +0 -20
  779. package/dist/esm/models/body-ajouter-fichier-api-v1-chorus-pro-transverses-ajouter-fichier-post.js +0 -14
  780. package/dist/esm/models/body-completer-facture-api-v1-chorus-pro-factures-completer-post.d.ts +0 -20
  781. package/dist/esm/models/body-completer-facture-api-v1-chorus-pro-factures-completer-post.js +0 -14
  782. package/dist/esm/models/body-lister-services-structure-api-v1-chorus-pro-structures-id-structure-cpp-services-get.d.ts +0 -17
  783. package/dist/esm/models/body-lister-services-structure-api-v1-chorus-pro-structures-id-structure-cpp-services-get.js +0 -14
  784. package/dist/esm/models/body-rechercher-factures-destinataire-api-v1-chorus-pro-factures-rechercher-destinataire-post.d.ts +0 -20
  785. package/dist/esm/models/body-rechercher-factures-destinataire-api-v1-chorus-pro-factures-rechercher-destinataire-post.js +0 -14
  786. package/dist/esm/models/body-rechercher-factures-fournisseur-api-v1-chorus-pro-factures-rechercher-fournisseur-post.d.ts +0 -20
  787. package/dist/esm/models/body-rechercher-factures-fournisseur-api-v1-chorus-pro-factures-rechercher-fournisseur-post.js +0 -14
  788. package/dist/esm/models/body-recycler-facture-api-v1-chorus-pro-factures-recycler-post.d.ts +0 -20
  789. package/dist/esm/models/body-recycler-facture-api-v1-chorus-pro-factures-recycler-post.js +0 -14
  790. package/dist/esm/models/body-telecharger-groupe-factures-api-v1-chorus-pro-factures-telecharger-groupe-post.d.ts +0 -20
  791. package/dist/esm/models/body-telecharger-groupe-factures-api-v1-chorus-pro-factures-telecharger-groupe-post.js +0 -14
  792. package/dist/esm/models/body-traiter-facture-recue-api-v1-chorus-pro-factures-traiter-facture-recue-post.d.ts +0 -20
  793. package/dist/esm/models/body-traiter-facture-recue-api-v1-chorus-pro-factures-traiter-facture-recue-post.js +0 -14
  794. package/dist/esm/models/body-valideur-consulter-facture-api-v1-chorus-pro-factures-valideur-consulter-post.d.ts +0 -20
  795. package/dist/esm/models/body-valideur-consulter-facture-api-v1-chorus-pro-factures-valideur-consulter-post.js +0 -14
  796. package/dist/esm/models/body-valideur-rechercher-factures-api-v1-chorus-pro-factures-valideur-rechercher-post.d.ts +0 -20
  797. package/dist/esm/models/body-valideur-rechercher-factures-api-v1-chorus-pro-factures-valideur-rechercher-post.js +0 -14
  798. package/dist/esm/models/body-valideur-traiter-facture-api-v1-chorus-pro-factures-valideur-traiter-post.d.ts +0 -20
  799. package/dist/esm/models/body-valideur-traiter-facture-api-v1-chorus-pro-factures-valideur-traiter-post.js +0 -14
  800. package/dist/esm/models/cadre-de-facturation.d.ts +0 -20
  801. package/dist/esm/models/cadre-de-facturation.js +0 -14
  802. package/dist/esm/models/categorie-tva.d.ts +0 -53
  803. package/dist/esm/models/categorie-tva.js +0 -54
  804. package/dist/esm/models/chorus-pro-credentials.d.ts +0 -36
  805. package/dist/esm/models/chorus-pro-credentials.js +0 -14
  806. package/dist/esm/models/code-cadre-facturation.d.ts +0 -18
  807. package/dist/esm/models/code-cadre-facturation.js +0 -19
  808. package/dist/esm/models/code-raison-reduction.d.ts +0 -45
  809. package/dist/esm/models/code-raison-reduction.js +0 -46
  810. package/dist/esm/models/consulter-facture-request.d.ts +0 -22
  811. package/dist/esm/models/consulter-facture-request.js +0 -14
  812. package/dist/esm/models/consulter-facture-response.d.ts +0 -26
  813. package/dist/esm/models/consulter-facture-response.js +0 -14
  814. package/dist/esm/models/consulter-structure-request.d.ts +0 -26
  815. package/dist/esm/models/consulter-structure-request.js +0 -14
  816. package/dist/esm/models/consulter-structure-response.d.ts +0 -26
  817. package/dist/esm/models/consulter-structure-response.js +0 -14
  818. package/dist/esm/models/credentials-afnor.d.ts +0 -19
  819. package/dist/esm/models/credentials-afnor.js +0 -14
  820. package/dist/esm/models/credentials-chorus-pro.d.ts +0 -24
  821. package/dist/esm/models/credentials-chorus-pro.js +0 -14
  822. package/dist/esm/models/destinataire.d.ts +0 -24
  823. package/dist/esm/models/destinataire.js +0 -14
  824. package/dist/esm/models/destination-afnor.d.ts +0 -34
  825. package/dist/esm/models/destination-afnor.js +0 -21
  826. package/dist/esm/models/destination-chorus-pro.d.ts +0 -23
  827. package/dist/esm/models/destination-chorus-pro.js +0 -16
  828. package/dist/esm/models/donnees-facture-simplifiees.d.ts +0 -46
  829. package/dist/esm/models/donnees-facture-simplifiees.js +0 -14
  830. package/dist/esm/models/facture-enrichie-info.d.ts +0 -24
  831. package/dist/esm/models/facture-enrichie-info.js +0 -14
  832. package/dist/esm/models/format-sortie.d.ts +0 -16
  833. package/dist/esm/models/format-sortie.js +0 -17
  834. package/dist/esm/models/fournisseur.d.ts +0 -28
  835. package/dist/esm/models/fournisseur.js +0 -14
  836. package/dist/esm/models/information-signature-api.d.ts +0 -25
  837. package/dist/esm/models/information-signature-api.js +0 -14
  838. package/dist/esm/models/ligne-de-poste-montant-remise-ht.d.ts +0 -16
  839. package/dist/esm/models/ligne-de-poste-montant-remise-ht.js +0 -14
  840. package/dist/esm/models/ligne-de-poste-taux-tva-manuel.d.ts +0 -16
  841. package/dist/esm/models/ligne-de-poste-taux-tva-manuel.js +0 -14
  842. package/dist/esm/models/ligne-de-poste.d.ts +0 -39
  843. package/dist/esm/models/ligne-de-poste.js +0 -14
  844. package/dist/esm/models/ligne-de-tva.d.ts +0 -25
  845. package/dist/esm/models/ligne-de-tva.js +0 -14
  846. package/dist/esm/models/mode-depot.d.ts +0 -20
  847. package/dist/esm/models/mode-depot.js +0 -21
  848. package/dist/esm/models/mode-paiement.d.ts +0 -23
  849. package/dist/esm/models/mode-paiement.js +0 -24
  850. package/dist/esm/models/montant-apayer.d.ts +0 -16
  851. package/dist/esm/models/montant-apayer.js +0 -14
  852. package/dist/esm/models/montant-base-ht.d.ts +0 -16
  853. package/dist/esm/models/montant-base-ht.js +0 -14
  854. package/dist/esm/models/montant-ht-total.d.ts +0 -16
  855. package/dist/esm/models/montant-ht-total.js +0 -14
  856. package/dist/esm/models/montant-remise-globale-ttc.d.ts +0 -16
  857. package/dist/esm/models/montant-remise-globale-ttc.js +0 -14
  858. package/dist/esm/models/montant-total-acompte.d.ts +0 -16
  859. package/dist/esm/models/montant-total-acompte.js +0 -14
  860. package/dist/esm/models/montant-total-ligne-ht.d.ts +0 -16
  861. package/dist/esm/models/montant-total-ligne-ht.js +0 -14
  862. package/dist/esm/models/montant-total.d.ts +0 -29
  863. package/dist/esm/models/montant-total.js +0 -14
  864. package/dist/esm/models/montant-ttc-total.d.ts +0 -16
  865. package/dist/esm/models/montant-ttc-total.js +0 -14
  866. package/dist/esm/models/montant-tva-ligne.d.ts +0 -16
  867. package/dist/esm/models/montant-tva-ligne.js +0 -14
  868. package/dist/esm/models/montant-tva-total.d.ts +0 -16
  869. package/dist/esm/models/montant-tva-total.js +0 -14
  870. package/dist/esm/models/montant-tva.d.ts +0 -16
  871. package/dist/esm/models/montant-tva.js +0 -14
  872. package/dist/esm/models/montant-unitaire-ht.d.ts +0 -16
  873. package/dist/esm/models/montant-unitaire-ht.js +0 -14
  874. package/dist/esm/models/note.d.ts +0 -18
  875. package/dist/esm/models/note.js +0 -14
  876. package/dist/esm/models/obtenir-id-chorus-pro-request.d.ts +0 -26
  877. package/dist/esm/models/obtenir-id-chorus-pro-request.js +0 -14
  878. package/dist/esm/models/obtenir-id-chorus-pro-response.d.ts +0 -29
  879. package/dist/esm/models/obtenir-id-chorus-pro-response.js +0 -14
  880. package/dist/esm/models/options-processing.d.ts +0 -33
  881. package/dist/esm/models/options-processing.js +0 -14
  882. package/dist/esm/models/parametres-signature.d.ts +0 -34
  883. package/dist/esm/models/parametres-signature.js +0 -14
  884. package/dist/esm/models/parametres-structure.d.ts +0 -28
  885. package/dist/esm/models/parametres-structure.js +0 -14
  886. package/dist/esm/models/pdffactur-xinfo.d.ts +0 -28
  887. package/dist/esm/models/pdffactur-xinfo.js +0 -14
  888. package/dist/esm/models/piece-jointe-complementaire.d.ts +0 -21
  889. package/dist/esm/models/piece-jointe-complementaire.js +0 -14
  890. package/dist/esm/models/profil-api.d.ts +0 -18
  891. package/dist/esm/models/profil-api.js +0 -19
  892. package/dist/esm/models/quantite.d.ts +0 -16
  893. package/dist/esm/models/quantite.js +0 -14
  894. package/dist/esm/models/quota-info.d.ts +0 -21
  895. package/dist/esm/models/quota-info.js +0 -14
  896. package/dist/esm/models/rechercher-services-response.d.ts +0 -24
  897. package/dist/esm/models/rechercher-services-response.js +0 -14
  898. package/dist/esm/models/rechercher-structure-request.d.ts +0 -25
  899. package/dist/esm/models/rechercher-structure-request.js +0 -14
  900. package/dist/esm/models/rechercher-structure-response.d.ts +0 -30
  901. package/dist/esm/models/rechercher-structure-response.js +0 -14
  902. package/dist/esm/models/references.d.ts +0 -27
  903. package/dist/esm/models/references.js +0 -14
  904. package/dist/esm/models/reponse-tache.d.ts +0 -17
  905. package/dist/esm/models/reponse-tache.js +0 -14
  906. package/dist/esm/models/reponse-validation-erreur.d.ts +0 -17
  907. package/dist/esm/models/reponse-validation-erreur.js +0 -14
  908. package/dist/esm/models/reponse-validation-succes.d.ts +0 -17
  909. package/dist/esm/models/reponse-validation-succes.js +0 -14
  910. package/dist/esm/models/resultat-afnor.d.ts +0 -30
  911. package/dist/esm/models/resultat-afnor.js +0 -14
  912. package/dist/esm/models/resultat-chorus-pro.d.ts +0 -22
  913. package/dist/esm/models/resultat-chorus-pro.js +0 -14
  914. package/dist/esm/models/resultat-validation-pdfapi.d.ts +0 -93
  915. package/dist/esm/models/resultat-validation-pdfapi.js +0 -14
  916. package/dist/esm/models/service-structure.d.ts +0 -32
  917. package/dist/esm/models/service-structure.js +0 -14
  918. package/dist/esm/models/soumettre-facture-complete-request.d.ts +0 -34
  919. package/dist/esm/models/soumettre-facture-complete-request.js +0 -14
  920. package/dist/esm/models/soumettre-facture-complete-response.d.ts +0 -53
  921. package/dist/esm/models/soumettre-facture-complete-response.js +0 -17
  922. package/dist/esm/models/soumettre-facture-request.d.ts +0 -44
  923. package/dist/esm/models/soumettre-facture-request.js +0 -14
  924. package/dist/esm/models/soumettre-facture-response.d.ts +0 -26
  925. package/dist/esm/models/soumettre-facture-response.js +0 -14
  926. package/dist/esm/models/statut-celery.d.ts +0 -22
  927. package/dist/esm/models/statut-celery.js +0 -23
  928. package/dist/esm/models/statut-facture.d.ts +0 -25
  929. package/dist/esm/models/statut-facture.js +0 -14
  930. package/dist/esm/models/statut-tache.d.ts +0 -25
  931. package/dist/esm/models/statut-tache.js +0 -14
  932. package/dist/esm/models/tauxmanuel.d.ts +0 -16
  933. package/dist/esm/models/tauxmanuel.js +0 -14
  934. package/dist/esm/models/type-facture.d.ts +0 -19
  935. package/dist/esm/models/type-facture.js +0 -20
  936. package/dist/esm/models/type-tva.d.ts +0 -21
  937. package/dist/esm/models/type-tva.js +0 -22
  938. package/dist/esm/models/unite.d.ts +0 -23
  939. package/dist/esm/models/unite.js +0 -24
  940. package/dist/esm/models/utilisateur.d.ts +0 -29
  941. package/dist/esm/models/utilisateur.js +0 -14
  942. package/dist/models/adresse-electronique.d.ts +0 -19
  943. package/dist/models/adresse-electronique.js +0 -15
  944. package/dist/models/adresse-postale.d.ts +0 -21
  945. package/dist/models/adresse-postale.js +0 -15
  946. package/dist/models/body-ajouter-fichier-api-v1-chorus-pro-transverses-ajouter-fichier-post.d.ts +0 -20
  947. package/dist/models/body-ajouter-fichier-api-v1-chorus-pro-transverses-ajouter-fichier-post.js +0 -15
  948. package/dist/models/body-completer-facture-api-v1-chorus-pro-factures-completer-post.d.ts +0 -20
  949. package/dist/models/body-completer-facture-api-v1-chorus-pro-factures-completer-post.js +0 -15
  950. package/dist/models/body-lister-services-structure-api-v1-chorus-pro-structures-id-structure-cpp-services-get.d.ts +0 -17
  951. package/dist/models/body-lister-services-structure-api-v1-chorus-pro-structures-id-structure-cpp-services-get.js +0 -15
  952. package/dist/models/body-rechercher-factures-destinataire-api-v1-chorus-pro-factures-rechercher-destinataire-post.d.ts +0 -20
  953. package/dist/models/body-rechercher-factures-destinataire-api-v1-chorus-pro-factures-rechercher-destinataire-post.js +0 -15
  954. package/dist/models/body-rechercher-factures-fournisseur-api-v1-chorus-pro-factures-rechercher-fournisseur-post.d.ts +0 -20
  955. package/dist/models/body-rechercher-factures-fournisseur-api-v1-chorus-pro-factures-rechercher-fournisseur-post.js +0 -15
  956. package/dist/models/body-recycler-facture-api-v1-chorus-pro-factures-recycler-post.d.ts +0 -20
  957. package/dist/models/body-recycler-facture-api-v1-chorus-pro-factures-recycler-post.js +0 -15
  958. package/dist/models/body-telecharger-groupe-factures-api-v1-chorus-pro-factures-telecharger-groupe-post.d.ts +0 -20
  959. package/dist/models/body-telecharger-groupe-factures-api-v1-chorus-pro-factures-telecharger-groupe-post.js +0 -15
  960. package/dist/models/body-traiter-facture-recue-api-v1-chorus-pro-factures-traiter-facture-recue-post.d.ts +0 -20
  961. package/dist/models/body-traiter-facture-recue-api-v1-chorus-pro-factures-traiter-facture-recue-post.js +0 -15
  962. package/dist/models/body-valideur-consulter-facture-api-v1-chorus-pro-factures-valideur-consulter-post.d.ts +0 -20
  963. package/dist/models/body-valideur-consulter-facture-api-v1-chorus-pro-factures-valideur-consulter-post.js +0 -15
  964. package/dist/models/body-valideur-rechercher-factures-api-v1-chorus-pro-factures-valideur-rechercher-post.d.ts +0 -20
  965. package/dist/models/body-valideur-rechercher-factures-api-v1-chorus-pro-factures-valideur-rechercher-post.js +0 -15
  966. package/dist/models/body-valideur-traiter-facture-api-v1-chorus-pro-factures-valideur-traiter-post.d.ts +0 -20
  967. package/dist/models/body-valideur-traiter-facture-api-v1-chorus-pro-factures-valideur-traiter-post.js +0 -15
  968. package/dist/models/cadre-de-facturation.d.ts +0 -20
  969. package/dist/models/cadre-de-facturation.js +0 -15
  970. package/dist/models/categorie-tva.d.ts +0 -53
  971. package/dist/models/categorie-tva.js +0 -57
  972. package/dist/models/chorus-pro-credentials.d.ts +0 -36
  973. package/dist/models/chorus-pro-credentials.js +0 -15
  974. package/dist/models/code-cadre-facturation.d.ts +0 -18
  975. package/dist/models/code-cadre-facturation.js +0 -22
  976. package/dist/models/code-raison-reduction.d.ts +0 -45
  977. package/dist/models/code-raison-reduction.js +0 -49
  978. package/dist/models/consulter-facture-request.d.ts +0 -22
  979. package/dist/models/consulter-facture-request.js +0 -15
  980. package/dist/models/consulter-facture-response.d.ts +0 -26
  981. package/dist/models/consulter-facture-response.js +0 -15
  982. package/dist/models/consulter-structure-request.d.ts +0 -26
  983. package/dist/models/consulter-structure-request.js +0 -15
  984. package/dist/models/consulter-structure-response.d.ts +0 -26
  985. package/dist/models/consulter-structure-response.js +0 -15
  986. package/dist/models/credentials-afnor.d.ts +0 -19
  987. package/dist/models/credentials-afnor.js +0 -15
  988. package/dist/models/credentials-chorus-pro.d.ts +0 -24
  989. package/dist/models/credentials-chorus-pro.js +0 -15
  990. package/dist/models/destinataire.d.ts +0 -24
  991. package/dist/models/destinataire.js +0 -15
  992. package/dist/models/destination-afnor.d.ts +0 -34
  993. package/dist/models/destination-afnor.js +0 -24
  994. package/dist/models/destination-chorus-pro.d.ts +0 -23
  995. package/dist/models/destination-chorus-pro.js +0 -19
  996. package/dist/models/donnees-facture-simplifiees.d.ts +0 -46
  997. package/dist/models/donnees-facture-simplifiees.js +0 -15
  998. package/dist/models/facture-enrichie-info.d.ts +0 -24
  999. package/dist/models/facture-enrichie-info.js +0 -15
  1000. package/dist/models/format-sortie.d.ts +0 -16
  1001. package/dist/models/format-sortie.js +0 -20
  1002. package/dist/models/fournisseur.d.ts +0 -28
  1003. package/dist/models/fournisseur.js +0 -15
  1004. package/dist/models/information-signature-api.d.ts +0 -25
  1005. package/dist/models/information-signature-api.js +0 -15
  1006. package/dist/models/ligne-de-poste-montant-remise-ht.d.ts +0 -16
  1007. package/dist/models/ligne-de-poste-montant-remise-ht.js +0 -15
  1008. package/dist/models/ligne-de-poste-taux-tva-manuel.d.ts +0 -16
  1009. package/dist/models/ligne-de-poste-taux-tva-manuel.js +0 -15
  1010. package/dist/models/ligne-de-poste.d.ts +0 -39
  1011. package/dist/models/ligne-de-poste.js +0 -15
  1012. package/dist/models/ligne-de-tva.d.ts +0 -25
  1013. package/dist/models/ligne-de-tva.js +0 -15
  1014. package/dist/models/mode-depot.d.ts +0 -20
  1015. package/dist/models/mode-depot.js +0 -24
  1016. package/dist/models/mode-paiement.d.ts +0 -23
  1017. package/dist/models/mode-paiement.js +0 -27
  1018. package/dist/models/montant-apayer.d.ts +0 -16
  1019. package/dist/models/montant-apayer.js +0 -15
  1020. package/dist/models/montant-base-ht.d.ts +0 -16
  1021. package/dist/models/montant-base-ht.js +0 -15
  1022. package/dist/models/montant-ht-total.d.ts +0 -16
  1023. package/dist/models/montant-ht-total.js +0 -15
  1024. package/dist/models/montant-remise-globale-ttc.d.ts +0 -16
  1025. package/dist/models/montant-remise-globale-ttc.js +0 -15
  1026. package/dist/models/montant-total-acompte.d.ts +0 -16
  1027. package/dist/models/montant-total-acompte.js +0 -15
  1028. package/dist/models/montant-total-ligne-ht.d.ts +0 -16
  1029. package/dist/models/montant-total-ligne-ht.js +0 -15
  1030. package/dist/models/montant-total.d.ts +0 -29
  1031. package/dist/models/montant-total.js +0 -15
  1032. package/dist/models/montant-ttc-total.d.ts +0 -16
  1033. package/dist/models/montant-ttc-total.js +0 -15
  1034. package/dist/models/montant-tva-ligne.d.ts +0 -16
  1035. package/dist/models/montant-tva-ligne.js +0 -15
  1036. package/dist/models/montant-tva-total.d.ts +0 -16
  1037. package/dist/models/montant-tva-total.js +0 -15
  1038. package/dist/models/montant-tva.d.ts +0 -16
  1039. package/dist/models/montant-tva.js +0 -15
  1040. package/dist/models/montant-unitaire-ht.d.ts +0 -16
  1041. package/dist/models/montant-unitaire-ht.js +0 -15
  1042. package/dist/models/note.d.ts +0 -18
  1043. package/dist/models/note.js +0 -15
  1044. package/dist/models/obtenir-id-chorus-pro-request.d.ts +0 -26
  1045. package/dist/models/obtenir-id-chorus-pro-request.js +0 -15
  1046. package/dist/models/obtenir-id-chorus-pro-response.d.ts +0 -29
  1047. package/dist/models/obtenir-id-chorus-pro-response.js +0 -15
  1048. package/dist/models/options-processing.d.ts +0 -33
  1049. package/dist/models/options-processing.js +0 -15
  1050. package/dist/models/parametres-signature.d.ts +0 -34
  1051. package/dist/models/parametres-signature.js +0 -15
  1052. package/dist/models/parametres-structure.d.ts +0 -28
  1053. package/dist/models/parametres-structure.js +0 -15
  1054. package/dist/models/pdffactur-xinfo.d.ts +0 -28
  1055. package/dist/models/pdffactur-xinfo.js +0 -15
  1056. package/dist/models/piece-jointe-complementaire.d.ts +0 -21
  1057. package/dist/models/piece-jointe-complementaire.js +0 -15
  1058. package/dist/models/profil-api.d.ts +0 -18
  1059. package/dist/models/profil-api.js +0 -22
  1060. package/dist/models/quantite.d.ts +0 -16
  1061. package/dist/models/quantite.js +0 -15
  1062. package/dist/models/quota-info.d.ts +0 -21
  1063. package/dist/models/quota-info.js +0 -15
  1064. package/dist/models/rechercher-services-response.d.ts +0 -24
  1065. package/dist/models/rechercher-services-response.js +0 -15
  1066. package/dist/models/rechercher-structure-request.d.ts +0 -25
  1067. package/dist/models/rechercher-structure-request.js +0 -15
  1068. package/dist/models/rechercher-structure-response.d.ts +0 -30
  1069. package/dist/models/rechercher-structure-response.js +0 -15
  1070. package/dist/models/references.d.ts +0 -27
  1071. package/dist/models/references.js +0 -15
  1072. package/dist/models/reponse-tache.d.ts +0 -17
  1073. package/dist/models/reponse-tache.js +0 -15
  1074. package/dist/models/reponse-validation-erreur.d.ts +0 -17
  1075. package/dist/models/reponse-validation-erreur.js +0 -15
  1076. package/dist/models/reponse-validation-succes.d.ts +0 -17
  1077. package/dist/models/reponse-validation-succes.js +0 -15
  1078. package/dist/models/resultat-afnor.d.ts +0 -30
  1079. package/dist/models/resultat-afnor.js +0 -15
  1080. package/dist/models/resultat-chorus-pro.d.ts +0 -22
  1081. package/dist/models/resultat-chorus-pro.js +0 -15
  1082. package/dist/models/resultat-validation-pdfapi.d.ts +0 -93
  1083. package/dist/models/resultat-validation-pdfapi.js +0 -15
  1084. package/dist/models/service-structure.d.ts +0 -32
  1085. package/dist/models/service-structure.js +0 -15
  1086. package/dist/models/soumettre-facture-complete-request.d.ts +0 -34
  1087. package/dist/models/soumettre-facture-complete-request.js +0 -15
  1088. package/dist/models/soumettre-facture-complete-response.d.ts +0 -53
  1089. package/dist/models/soumettre-facture-complete-response.js +0 -20
  1090. package/dist/models/soumettre-facture-request.d.ts +0 -44
  1091. package/dist/models/soumettre-facture-request.js +0 -15
  1092. package/dist/models/soumettre-facture-response.d.ts +0 -26
  1093. package/dist/models/soumettre-facture-response.js +0 -15
  1094. package/dist/models/statut-celery.d.ts +0 -22
  1095. package/dist/models/statut-celery.js +0 -26
  1096. package/dist/models/statut-facture.d.ts +0 -25
  1097. package/dist/models/statut-facture.js +0 -15
  1098. package/dist/models/statut-tache.d.ts +0 -25
  1099. package/dist/models/statut-tache.js +0 -15
  1100. package/dist/models/tauxmanuel.d.ts +0 -16
  1101. package/dist/models/tauxmanuel.js +0 -15
  1102. package/dist/models/type-facture.d.ts +0 -19
  1103. package/dist/models/type-facture.js +0 -23
  1104. package/dist/models/type-tva.d.ts +0 -21
  1105. package/dist/models/type-tva.js +0 -25
  1106. package/dist/models/unite.d.ts +0 -23
  1107. package/dist/models/unite.js +0 -27
  1108. package/dist/models/utilisateur.d.ts +0 -29
  1109. package/dist/models/utilisateur.js +0 -15
  1110. package/docs/AdresseElectronique.md +0 -23
  1111. package/docs/AdressePostale.md +0 -29
  1112. package/docs/BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost.md +0 -24
  1113. package/docs/BodyCompleterFactureApiV1ChorusProFacturesCompleterPost.md +0 -24
  1114. package/docs/BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet.md +0 -22
  1115. package/docs/BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost.md +0 -24
  1116. package/docs/BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost.md +0 -24
  1117. package/docs/BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost.md +0 -24
  1118. package/docs/BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost.md +0 -24
  1119. package/docs/BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost.md +0 -24
  1120. package/docs/BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost.md +0 -24
  1121. package/docs/BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost.md +0 -24
  1122. package/docs/BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost.md +0 -24
  1123. package/docs/CadreDeFacturation.md +0 -25
  1124. package/docs/CategorieTVA.md +0 -25
  1125. package/docs/ChorusProCredentials.md +0 -29
  1126. package/docs/CodeCadreFacturation.md +0 -14
  1127. package/docs/CodeRaisonReduction.md +0 -21
  1128. package/docs/ConsulterFactureRequest.md +0 -23
  1129. package/docs/ConsulterFactureResponse.md +0 -37
  1130. package/docs/ConsulterStructureRequest.md +0 -25
  1131. package/docs/ConsulterStructureResponse.md +0 -37
  1132. package/docs/CredentialsAFNOR.md +0 -25
  1133. package/docs/CredentialsChorusPro.md +0 -29
  1134. package/docs/Destinataire.md +0 -31
  1135. package/docs/DestinationAFNOR.md +0 -27
  1136. package/docs/DestinationChorusPro.md +0 -23
  1137. package/docs/DonneesFactureSimplifiees.md +0 -37
  1138. package/docs/FactureEnrichieInfo.md +0 -35
  1139. package/docs/FormatSortie.md +0 -10
  1140. package/docs/Fournisseur.md +0 -39
  1141. package/docs/InformationSignatureAPI.md +0 -31
  1142. package/docs/LigneDePoste.md +0 -49
  1143. package/docs/LigneDePosteMontantRemiseHt.md +0 -19
  1144. package/docs/LigneDePosteTauxTvaManuel.md +0 -19
  1145. package/docs/LigneDeTVA.md +0 -29
  1146. package/docs/ModeDepot.md +0 -13
  1147. package/docs/ModePaiement.md +0 -19
  1148. package/docs/MontantAPayer.md +0 -19
  1149. package/docs/MontantBaseHt.md +0 -19
  1150. package/docs/MontantHtTotal.md +0 -19
  1151. package/docs/MontantRemiseGlobaleTtc.md +0 -19
  1152. package/docs/MontantTotal.md +0 -33
  1153. package/docs/MontantTotalAcompte.md +0 -19
  1154. package/docs/MontantTotalLigneHt.md +0 -19
  1155. package/docs/MontantTtcTotal.md +0 -19
  1156. package/docs/MontantTva.md +0 -19
  1157. package/docs/MontantTvaLigne.md +0 -19
  1158. package/docs/MontantTvaTotal.md +0 -19
  1159. package/docs/MontantUnitaireHt.md +0 -19
  1160. package/docs/Note.md +0 -23
  1161. package/docs/ObtenirIdChorusProRequest.md +0 -25
  1162. package/docs/ObtenirIdChorusProResponse.md +0 -27
  1163. package/docs/OptionsProcessing.md +0 -27
  1164. package/docs/PDFFacturXInfo.md +0 -25
  1165. package/docs/ParametresSignature.md +0 -37
  1166. package/docs/ParametresStructure.md +0 -25
  1167. package/docs/PieceJointeComplementaire.md +0 -29
  1168. package/docs/ProfilAPI.md +0 -14
  1169. package/docs/Quantite.md +0 -19
  1170. package/docs/QuotaInfo.md +0 -29
  1171. package/docs/RechercherServicesResponse.md +0 -27
  1172. package/docs/RechercherStructureRequest.md +0 -29
  1173. package/docs/RechercherStructureResponse.md +0 -27
  1174. package/docs/References.md +0 -35
  1175. package/docs/ReponseTache.md +0 -21
  1176. package/docs/ReponseValidationErreur.md +0 -20
  1177. package/docs/ReponseValidationSucces.md +0 -20
  1178. package/docs/ResultatAFNOR.md +0 -29
  1179. package/docs/ResultatChorusPro.md +0 -25
  1180. package/docs/ResultatValidationPDFAPI.md +0 -65
  1181. package/docs/SantApi.md +0 -97
  1182. package/docs/ServiceStructure.md +0 -27
  1183. package/docs/SoumettreFactureCompleteRequest.md +0 -29
  1184. package/docs/SoumettreFactureCompleteResponse.md +0 -37
  1185. package/docs/SoumettreFactureRequest.md +0 -49
  1186. package/docs/SoumettreFactureResponse.md +0 -27
  1187. package/docs/StatutCelery.md +0 -17
  1188. package/docs/StatutFacture.md +0 -25
  1189. package/docs/StatutTache.md +0 -25
  1190. package/docs/Tauxmanuel.md +0 -19
  1191. package/docs/TraitementFactureApi.md +0 -670
  1192. package/docs/TypeFacture.md +0 -11
  1193. package/docs/TypeTVA.md +0 -15
  1194. package/docs/Unite.md +0 -19
  1195. package/docs/Utilisateur.md +0 -43
  1196. package/docs/UtilisateurApi.md +0 -52
  1197. package/models/adresse-electronique.ts +0 -29
  1198. package/models/adresse-postale.ts +0 -27
  1199. package/models/body-ajouter-fichier-api-v1-chorus-pro-transverses-ajouter-fichier-post.ts +0 -28
  1200. package/models/body-completer-facture-api-v1-chorus-pro-factures-completer-post.ts +0 -28
  1201. package/models/body-lister-services-structure-api-v1-chorus-pro-structures-id-structure-cpp-services-get.ts +0 -27
  1202. package/models/body-rechercher-factures-destinataire-api-v1-chorus-pro-factures-rechercher-destinataire-post.ts +0 -28
  1203. package/models/body-rechercher-factures-fournisseur-api-v1-chorus-pro-factures-rechercher-fournisseur-post.ts +0 -28
  1204. package/models/body-recycler-facture-api-v1-chorus-pro-factures-recycler-post.ts +0 -28
  1205. package/models/body-telecharger-groupe-factures-api-v1-chorus-pro-factures-telecharger-groupe-post.ts +0 -28
  1206. package/models/body-traiter-facture-recue-api-v1-chorus-pro-factures-traiter-facture-recue-post.ts +0 -28
  1207. package/models/body-valideur-consulter-facture-api-v1-chorus-pro-factures-valideur-consulter-post.ts +0 -28
  1208. package/models/body-valideur-rechercher-factures-api-v1-chorus-pro-factures-valideur-rechercher-post.ts +0 -28
  1209. package/models/body-valideur-traiter-facture-api-v1-chorus-pro-factures-valideur-traiter-post.ts +0 -28
  1210. package/models/cadre-de-facturation.ts +0 -30
  1211. package/models/categorie-tva.ts +0 -63
  1212. package/models/chorus-pro-credentials.ts +0 -42
  1213. package/models/code-cadre-facturation.ts +0 -28
  1214. package/models/code-raison-reduction.ts +0 -55
  1215. package/models/consulter-facture-request.ts +0 -30
  1216. package/models/consulter-facture-response.ts +0 -34
  1217. package/models/consulter-structure-request.ts +0 -34
  1218. package/models/consulter-structure-response.ts +0 -34
  1219. package/models/credentials-afnor.ts +0 -25
  1220. package/models/credentials-chorus-pro.ts +0 -30
  1221. package/models/destinataire.ts +0 -34
  1222. package/models/destination-afnor.ts +0 -46
  1223. package/models/destination-chorus-pro.ts +0 -34
  1224. package/models/donnees-facture-simplifiees.ts +0 -46
  1225. package/models/facture-enrichie-info.ts +0 -30
  1226. package/models/format-sortie.ts +0 -26
  1227. package/models/fournisseur.ts +0 -38
  1228. package/models/information-signature-api.ts +0 -31
  1229. package/models/ligne-de-poste-montant-remise-ht.ts +0 -22
  1230. package/models/ligne-de-poste-taux-tva-manuel.ts +0 -22
  1231. package/models/ligne-de-poste.ts +0 -63
  1232. package/models/ligne-de-tva.ts +0 -41
  1233. package/models/mode-depot.ts +0 -30
  1234. package/models/mode-paiement.ts +0 -33
  1235. package/models/montant-apayer.ts +0 -22
  1236. package/models/montant-base-ht.ts +0 -22
  1237. package/models/montant-ht-total.ts +0 -22
  1238. package/models/montant-remise-globale-ttc.ts +0 -22
  1239. package/models/montant-total-acompte.ts +0 -22
  1240. package/models/montant-total-ligne-ht.ts +0 -22
  1241. package/models/montant-total.ts +0 -47
  1242. package/models/montant-ttc-total.ts +0 -22
  1243. package/models/montant-tva-ligne.ts +0 -22
  1244. package/models/montant-tva-total.ts +0 -22
  1245. package/models/montant-tva.ts +0 -22
  1246. package/models/montant-unitaire-ht.ts +0 -22
  1247. package/models/note.ts +0 -24
  1248. package/models/obtenir-id-chorus-pro-request.ts +0 -34
  1249. package/models/obtenir-id-chorus-pro-response.ts +0 -35
  1250. package/models/options-processing.ts +0 -43
  1251. package/models/parametres-signature.ts +0 -40
  1252. package/models/parametres-structure.ts +0 -34
  1253. package/models/pdffactur-xinfo.ts +0 -34
  1254. package/models/piece-jointe-complementaire.ts +0 -27
  1255. package/models/profil-api.ts +0 -28
  1256. package/models/quantite.ts +0 -22
  1257. package/models/quota-info.ts +0 -27
  1258. package/models/rechercher-services-response.ts +0 -32
  1259. package/models/rechercher-structure-request.ts +0 -33
  1260. package/models/rechercher-structure-response.ts +0 -38
  1261. package/models/references.ts +0 -41
  1262. package/models/reponse-tache.ts +0 -23
  1263. package/models/reponse-validation-erreur.ts +0 -23
  1264. package/models/reponse-validation-succes.ts +0 -23
  1265. package/models/resultat-afnor.ts +0 -36
  1266. package/models/resultat-chorus-pro.ts +0 -28
  1267. package/models/resultat-validation-pdfapi.ts +0 -99
  1268. package/models/service-structure.ts +0 -38
  1269. package/models/soumettre-facture-complete-request.ts +0 -48
  1270. package/models/soumettre-facture-complete-response.ts +0 -72
  1271. package/models/soumettre-facture-request.ts +0 -58
  1272. package/models/soumettre-facture-response.ts +0 -32
  1273. package/models/statut-celery.ts +0 -32
  1274. package/models/statut-facture.ts +0 -31
  1275. package/models/statut-tache.ts +0 -33
  1276. package/models/tauxmanuel.ts +0 -22
  1277. package/models/type-facture.ts +0 -29
  1278. package/models/type-tva.ts +0 -31
  1279. package/models/unite.ts +0 -33
  1280. package/models/utilisateur.ts +0 -37
@@ -0,0 +1,817 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import axios from 'axios';
11
+ import FormData from 'form-data';
12
+ import * as fs from 'fs';
13
+ import * as path from 'path';
14
+ import { FactPulseAuthError, FactPulsePollingTimeout, FactPulseValidationError } from './exceptions';
15
+ /** Converts a value to an amount string for the API. */
16
+ export function amount(value) {
17
+ if (value === null || value === undefined)
18
+ return '0.00';
19
+ if (typeof value === 'number')
20
+ return value.toFixed(2);
21
+ if (typeof value === 'string')
22
+ return value;
23
+ return '0.00';
24
+ }
25
+ /** Creates a simplified InvoiceTotals object. */
26
+ export function invoiceTotals(exclTax, vat, inclTax, amountDue, options) {
27
+ const result = {
28
+ totalNetAmount: amount(exclTax), vatAmount: amount(vat),
29
+ totalGrossAmount: amount(inclTax), amountDue: amount(amountDue),
30
+ };
31
+ if ((options === null || options === void 0 ? void 0 : options.globalAllowanceAmount) !== undefined)
32
+ result.globalAllowanceAmount = amount(options.globalAllowanceAmount);
33
+ if ((options === null || options === void 0 ? void 0 : options.globalAllowanceReason) !== undefined)
34
+ result.globalAllowanceReason = options.globalAllowanceReason;
35
+ if ((options === null || options === void 0 ? void 0 : options.prepayment) !== undefined)
36
+ result.prepayment = amount(options.prepayment);
37
+ return result;
38
+ }
39
+ /** Creates an invoice line (aligned with InvoiceLine in models.py).
40
+ * For VAT rate: either vatRate (code e.g.: "VAT20") or manualVatRate (value e.g.: 20.00) */
41
+ export function invoiceLine(lineNumber, itemName, quantity, unitNetPrice, lineNetAmount, options) {
42
+ var _a, _b, _c;
43
+ const result = {
44
+ lineNumber, itemName, quantity: amount(quantity), unitNetPrice: amount(unitNetPrice),
45
+ lineNetAmount: amount(lineNetAmount),
46
+ vatCategory: (_a = options === null || options === void 0 ? void 0 : options.vatCategory) !== null && _a !== void 0 ? _a : 'S', unit: (_b = options === null || options === void 0 ? void 0 : options.unit) !== null && _b !== void 0 ? _b : 'LUMP_SUM',
47
+ };
48
+ // Either vatRate (code) or manualVatRate (value)
49
+ if (options === null || options === void 0 ? void 0 : options.vatRate)
50
+ result.vatRate = options.vatRate;
51
+ else
52
+ result.manualVatRate = amount((_c = options === null || options === void 0 ? void 0 : options.manualVatRate) !== null && _c !== void 0 ? _c : '20.00');
53
+ if (options === null || options === void 0 ? void 0 : options.reference)
54
+ result.reference = options.reference;
55
+ if ((options === null || options === void 0 ? void 0 : options.lineAllowanceAmount) !== undefined)
56
+ result.lineAllowanceAmount = amount(options.lineAllowanceAmount);
57
+ if (options === null || options === void 0 ? void 0 : options.allowanceReasonCode)
58
+ result.allowanceReasonCode = options.allowanceReasonCode;
59
+ if (options === null || options === void 0 ? void 0 : options.allowanceReason)
60
+ result.allowanceReason = options.allowanceReason;
61
+ if (options === null || options === void 0 ? void 0 : options.periodStartDate)
62
+ result.periodStartDate = options.periodStartDate;
63
+ if (options === null || options === void 0 ? void 0 : options.periodEndDate)
64
+ result.periodEndDate = options.periodEndDate;
65
+ return result;
66
+ }
67
+ /** Creates a VAT line (aligned with VATLine in models.py).
68
+ * For rate: either rate (code e.g.: "VAT20") or manualRate (value e.g.: 20.00) */
69
+ export function vatLine(taxableAmount, vatAmount, options) {
70
+ var _a, _b;
71
+ const result = {
72
+ taxableAmount: amount(taxableAmount), vatAmount: amount(vatAmount), category: (_a = options === null || options === void 0 ? void 0 : options.category) !== null && _a !== void 0 ? _a : 'S',
73
+ };
74
+ // Either rate (code) or manualRate (value)
75
+ if (options === null || options === void 0 ? void 0 : options.rate)
76
+ result.rate = options.rate;
77
+ else
78
+ result.manualRate = amount((_b = options === null || options === void 0 ? void 0 : options.manualRate) !== null && _b !== void 0 ? _b : '20.00');
79
+ return result;
80
+ }
81
+ /** Creates a postal address for the FactPulse API. */
82
+ export function postalAddress(lineOne, postalCode, city, options) {
83
+ var _a;
84
+ const result = { lineOne, postalCode, city, countryCode: (_a = options === null || options === void 0 ? void 0 : options.countryCode) !== null && _a !== void 0 ? _a : 'FR' };
85
+ if (options === null || options === void 0 ? void 0 : options.lineTwo)
86
+ result.lineTwo = options.lineTwo;
87
+ if (options === null || options === void 0 ? void 0 : options.lineThree)
88
+ result.lineThree = options.lineThree;
89
+ return result;
90
+ }
91
+ /** Creates an electronic address for the FactPulse API. schemeId: "0009"=SIREN, "0225"=SIRET */
92
+ export function electronicAddress(identifier, schemeId = '0009') {
93
+ return { identifier, schemeId };
94
+ }
95
+ /** Computes the French intra-community VAT number from a SIREN. */
96
+ function computeVatIntra(siren) {
97
+ if (siren.length !== 9 || !/^\d+$/.test(siren))
98
+ return null;
99
+ const cle = (12 + 3 * (parseInt(siren, 10) % 97)) % 97;
100
+ return `FR${cle.toString().padStart(2, '0')}${siren}`;
101
+ }
102
+ /** Creates a supplier (issuer) with auto-computed SIREN, intra-EU VAT number and addresses. */
103
+ export function supplier(name, siret, addressLine1, postalCode, city, options) {
104
+ var _a, _b, _c;
105
+ const opts = options !== null && options !== void 0 ? options : {};
106
+ const siren = (_a = opts.siren) !== null && _a !== void 0 ? _a : (siret.length === 14 ? siret.slice(0, 9) : undefined);
107
+ const vatNumber = (_b = opts.vatNumber) !== null && _b !== void 0 ? _b : (siren ? computeVatIntra(siren) : null);
108
+ const result = {
109
+ name, supplierId: (_c = opts.supplierId) !== null && _c !== void 0 ? _c : 0, siret,
110
+ electronicAddress: electronicAddress(siret, '0225'),
111
+ postalAddress: postalAddress(addressLine1, postalCode, city, { countryCode: opts.countryCode, lineTwo: opts.addressLine2 }),
112
+ };
113
+ if (siren)
114
+ result.siren = siren;
115
+ if (vatNumber)
116
+ result.vatNumber = vatNumber;
117
+ if (opts.iban)
118
+ result.iban = opts.iban;
119
+ if (opts.supplierServiceId)
120
+ result.supplierServiceId = opts.supplierServiceId;
121
+ if (opts.supplierBankDetailsCode)
122
+ result.supplierBankDetailsCode = opts.supplierBankDetailsCode;
123
+ return result;
124
+ }
125
+ /** Creates a recipient (customer) with auto-computed SIREN and addresses. */
126
+ export function recipient(name, siret, addressLine1, postalCode, city, options) {
127
+ var _a;
128
+ const opts = options !== null && options !== void 0 ? options : {};
129
+ const siren = (_a = opts.siren) !== null && _a !== void 0 ? _a : (siret.length === 14 ? siret.slice(0, 9) : undefined);
130
+ const result = {
131
+ name, siret,
132
+ electronicAddress: electronicAddress(siret, '0225'),
133
+ postalAddress: postalAddress(addressLine1, postalCode, city, { countryCode: opts.countryCode, lineTwo: opts.addressLine2 }),
134
+ };
135
+ if (siren)
136
+ result.siren = siren;
137
+ if (opts.executingServiceCode)
138
+ result.executingServiceCode = opts.executingServiceCode;
139
+ return result;
140
+ }
141
+ /**
142
+ * Creates a beneficiary (factor) for factoring.
143
+ *
144
+ * The beneficiary (BG-10 / PayeeTradeParty) is used when payment
145
+ * must be made to a third party different from the supplier, typically
146
+ * a factor (factoring company).
147
+ *
148
+ * For factored invoices, you also need to:
149
+ * - Use a factored document type (393, 396, 501, 502, 472, 473)
150
+ * - Add an ACC note with the subrogation mention
151
+ * - The beneficiary's IBAN will be used for payment
152
+ *
153
+ * @param name Factor's business name (BT-59)
154
+ * @param options Options: siret (BT-60), siren (BT-61), iban, bic
155
+ * @returns Dict ready to be used in a factored invoice
156
+ *
157
+ * @example
158
+ * const factor = beneficiary('FACTOR SAS', {
159
+ * siret: '30000000700033',
160
+ * iban: 'FR76 3000 4000 0500 0012 3456 789',
161
+ * });
162
+ */
163
+ export function beneficiary(name, options) {
164
+ var _a;
165
+ const opts = options !== null && options !== void 0 ? options : {};
166
+ // Auto-compute SIREN from SIRET
167
+ const siren = (_a = opts.siren) !== null && _a !== void 0 ? _a : (opts.siret && opts.siret.length === 14 ? opts.siret.slice(0, 9) : undefined);
168
+ const result = { name };
169
+ if (opts.siret)
170
+ result.siret = opts.siret;
171
+ if (siren)
172
+ result.siren = siren;
173
+ if (opts.iban)
174
+ result.iban = opts.iban;
175
+ if (opts.bic)
176
+ result.bic = opts.bic;
177
+ return result;
178
+ }
179
+ // =============================================================================
180
+ // Main client
181
+ // =============================================================================
182
+ const DEFAULT_API_URL = 'https://factpulse.fr';
183
+ const DEFAULT_POLLING_INTERVAL = 2000;
184
+ const DEFAULT_POLLING_TIMEOUT = 120000;
185
+ const DEFAULT_MAX_RETRIES = 1;
186
+ export class FactPulseClient {
187
+ constructor(config) {
188
+ var _a;
189
+ this.accessToken = null;
190
+ this.refreshToken = null;
191
+ this.tokenExpiresAt = null;
192
+ this.config = {
193
+ email: config.email, password: config.password,
194
+ apiUrl: (config.apiUrl || DEFAULT_API_URL).replace(/\/$/, ''),
195
+ clientUid: config.clientUid || '',
196
+ chorusCredentials: config.chorusCredentials,
197
+ afnorCredentials: config.afnorCredentials,
198
+ pollingInterval: config.pollingInterval || DEFAULT_POLLING_INTERVAL,
199
+ pollingTimeout: config.pollingTimeout || DEFAULT_POLLING_TIMEOUT,
200
+ maxRetries: (_a = config.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_MAX_RETRIES,
201
+ };
202
+ this.chorusCredentials = config.chorusCredentials;
203
+ this.afnorCredentials = config.afnorCredentials;
204
+ this.httpClient = axios.create({ timeout: 30000, headers: { 'Content-Type': 'application/json' } });
205
+ }
206
+ getChorusCredentialsForApi() {
207
+ var _a;
208
+ if (!this.chorusCredentials)
209
+ return undefined;
210
+ return {
211
+ piste_client_id: this.chorusCredentials.pisteClientId,
212
+ piste_client_secret: this.chorusCredentials.pisteClientSecret,
213
+ chorus_pro_login: this.chorusCredentials.chorusProLogin,
214
+ chorus_pro_password: this.chorusCredentials.chorusProPassword,
215
+ sandbox: (_a = this.chorusCredentials.sandbox) !== null && _a !== void 0 ? _a : true,
216
+ };
217
+ }
218
+ getAfnorCredentialsForApi() {
219
+ if (!this.afnorCredentials)
220
+ return undefined;
221
+ return {
222
+ client_id: this.afnorCredentials.clientId,
223
+ client_secret: this.afnorCredentials.clientSecret,
224
+ flow_service_url: this.afnorCredentials.flowServiceUrl,
225
+ };
226
+ }
227
+ // Shorter aliases
228
+ getChorusProCredentials() { return this.getChorusCredentialsForApi(); }
229
+ getAfnorCredentials() { return this.getAfnorCredentialsForApi(); }
230
+ obtainToken() {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ var _a, _b;
233
+ const payload = { username: this.config.email, password: this.config.password };
234
+ if (this.config.clientUid)
235
+ payload.client_uid = this.config.clientUid;
236
+ try {
237
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/token/`, payload);
238
+ return response.data;
239
+ }
240
+ catch (error) {
241
+ const axiosError = error;
242
+ throw new FactPulseAuthError(`Unable to obtain JWT token: ${((_b = (_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.detail) || axiosError.message}`);
243
+ }
244
+ });
245
+ }
246
+ ensureAuthenticated() {
247
+ return __awaiter(this, arguments, void 0, function* (forceRefresh = false) {
248
+ const now = Date.now();
249
+ if (forceRefresh || !this.accessToken || (this.tokenExpiresAt && now >= this.tokenExpiresAt)) {
250
+ const tokens = yield this.obtainToken();
251
+ this.accessToken = tokens.access;
252
+ this.refreshToken = tokens.refresh;
253
+ this.tokenExpiresAt = now + 28 * 60 * 1000;
254
+ }
255
+ });
256
+ }
257
+ resetAuth() { this.accessToken = this.refreshToken = null; this.tokenExpiresAt = null; }
258
+ pollTask(taskId, timeout, interval) {
259
+ return __awaiter(this, void 0, void 0, function* () {
260
+ var _a;
261
+ const timeoutMs = timeout !== null && timeout !== void 0 ? timeout : this.config.pollingTimeout;
262
+ const intervalMs = interval !== null && interval !== void 0 ? interval : this.config.pollingInterval;
263
+ const startTime = Date.now();
264
+ let currentInterval = intervalMs;
265
+ while (true) {
266
+ if (Date.now() - startTime > timeoutMs)
267
+ throw new FactPulsePollingTimeout(taskId, timeoutMs);
268
+ yield this.ensureAuthenticated();
269
+ try {
270
+ const response = yield this.httpClient.get(`${this.config.apiUrl}/api/v1/processing/tasks/${taskId}/status`, {
271
+ headers: { Authorization: `Bearer ${this.accessToken}` },
272
+ });
273
+ const { statut, resultat } = response.data;
274
+ if (statut === 'SUCCESS')
275
+ return resultat || {};
276
+ if (statut === 'FAILURE') {
277
+ // Format AFNOR: errorMessage, details
278
+ const result = resultat;
279
+ const errors = Array.isArray(result === null || result === void 0 ? void 0 : result.details) ? result.details.filter((e) => typeof e === 'object' && e !== null) : [];
280
+ throw new FactPulseValidationError(`Task ${taskId} failed: ${(result === null || result === void 0 ? void 0 : result.errorMessage) || 'Unknown error'}`, errors);
281
+ }
282
+ yield new Promise(resolve => setTimeout(resolve, currentInterval));
283
+ currentInterval = Math.min(currentInterval * 1.5, 10000);
284
+ }
285
+ catch (error) {
286
+ if (error instanceof FactPulseValidationError || error instanceof FactPulsePollingTimeout)
287
+ throw error;
288
+ const axiosError = error;
289
+ if (((_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
290
+ this.resetAuth();
291
+ continue;
292
+ }
293
+ throw new FactPulseValidationError(`API Error: ${axiosError.message}`);
294
+ }
295
+ }
296
+ });
297
+ }
298
+ generateFacturx(invoiceData_1, pdfPath_1) {
299
+ return __awaiter(this, arguments, void 0, function* (invoiceData, pdfPath, profile = 'EN16931', outputFormat = 'pdf', sync = true, timeout) {
300
+ var _a, _b, _c, _d;
301
+ const jsonData = typeof invoiceData === 'string' ? invoiceData : JSON.stringify(invoiceData);
302
+ let taskId = null;
303
+ for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {
304
+ yield this.ensureAuthenticated();
305
+ const form = new FormData();
306
+ form.append('invoice_data', jsonData);
307
+ form.append('profile', profile);
308
+ form.append('output_format', outputFormat);
309
+ form.append('source_pdf', fs.createReadStream(pdfPath), { filename: path.basename(pdfPath), contentType: 'application/pdf' });
310
+ try {
311
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/generate-invoice`, form, {
312
+ headers: Object.assign(Object.assign({}, form.getHeaders()), { Authorization: `Bearer ${this.accessToken}` }), timeout: 60000,
313
+ });
314
+ taskId = response.data.task_id;
315
+ break;
316
+ }
317
+ catch (error) {
318
+ const axiosError = error;
319
+ if (((_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.status) === 401 && attempt < this.config.maxRetries) {
320
+ this.resetAuth();
321
+ continue;
322
+ }
323
+ // Extract error details from response body
324
+ const responseData = (_b = axiosError.response) === null || _b === void 0 ? void 0 : _b.data;
325
+ let errorMsg = `API Error (${((_c = axiosError.response) === null || _c === void 0 ? void 0 : _c.status) || 'unknown'}): ${axiosError.message}`;
326
+ const errors = [];
327
+ if (responseData) {
328
+ // Format FastAPI/Pydantic: {"detail": [{"loc": [...], "msg": "...", "type": "..."}]}
329
+ if (Array.isArray(responseData.detail)) {
330
+ errorMsg = 'Validation error';
331
+ for (const err of responseData.detail) {
332
+ if (typeof err === 'object' && err !== null) {
333
+ const loc = err.loc || [];
334
+ errors.push({
335
+ level: 'ERROR',
336
+ item: loc.map(String).join(' -> '),
337
+ reason: err.msg || String(err),
338
+ source: 'validation',
339
+ code: err.type,
340
+ });
341
+ }
342
+ }
343
+ }
344
+ else if (typeof responseData.detail === 'string') {
345
+ errorMsg = responseData.detail;
346
+ }
347
+ else if (responseData.errorMessage) {
348
+ errorMsg = responseData.errorMessage;
349
+ }
350
+ }
351
+ console.error(`API Error ${(_d = axiosError.response) === null || _d === void 0 ? void 0 : _d.status}:`, responseData);
352
+ throw new FactPulseValidationError(errorMsg, errors);
353
+ }
354
+ }
355
+ if (!taskId)
356
+ throw new FactPulseValidationError("No task ID");
357
+ if (!sync)
358
+ return taskId;
359
+ const result = yield this.pollTask(taskId, timeout);
360
+ if (result.content_b64)
361
+ return Buffer.from(result.content_b64, 'base64');
362
+ throw new FactPulseValidationError('No content');
363
+ });
364
+ }
365
+ static formatAmount(m) {
366
+ if (m === null || m === undefined)
367
+ return '0.00';
368
+ if (typeof m === 'number')
369
+ return m.toFixed(2);
370
+ if (typeof m === 'string')
371
+ return m;
372
+ return '0.00';
373
+ }
374
+ // =========================================================================
375
+ // AFNOR - Authentication and internal helpers
376
+ // =========================================================================
377
+ /**
378
+ * Retrieves AFNOR credentials (stored or zero-trust mode).
379
+ * Zero-trust mode: Returns the afnorCredentials provided to the constructor.
380
+ * Stored mode: Retrieves credentials via GET /api/v1/afnor/credentials.
381
+ */
382
+ getAfnorCredentialsInternal() {
383
+ return __awaiter(this, void 0, void 0, function* () {
384
+ var _a, _b;
385
+ // Zero-trust mode: credentials provided to the constructor
386
+ if (this.afnorCredentials) {
387
+ return this.afnorCredentials;
388
+ }
389
+ // Stored mode: retrieve credentials via the API
390
+ yield this.ensureAuthenticated();
391
+ try {
392
+ const response = yield this.httpClient.get(`${this.config.apiUrl}/api/v1/afnor/credentials`, {
393
+ headers: { Authorization: `Bearer ${this.accessToken}` },
394
+ });
395
+ const creds = response.data;
396
+ return {
397
+ flowServiceUrl: creds.flow_service_url,
398
+ tokenUrl: creds.token_url,
399
+ clientId: creds.client_id,
400
+ clientSecret: creds.client_secret,
401
+ directoryServiceUrl: creds.directory_service_url,
402
+ };
403
+ }
404
+ catch (error) {
405
+ const axiosError = error;
406
+ if (((_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.status) === 400) {
407
+ const detail = (_b = axiosError.response.data) === null || _b === void 0 ? void 0 : _b.detail;
408
+ if (typeof detail === 'object' && (detail === null || detail === void 0 ? void 0 : detail.error) === 'NO_CLIENT_UID') {
409
+ throw new FactPulseAuthError("No client_uid in JWT. To use AFNOR endpoints, either:\n" +
410
+ "1. Generate a token with a client_uid (stored mode)\n" +
411
+ "2. Provide AFNORCredentials to the client constructor (zero-trust mode)");
412
+ }
413
+ }
414
+ throw new FactPulseAuthError(`Failed to retrieve AFNOR credentials: ${axiosError.message}`);
415
+ }
416
+ });
417
+ }
418
+ /**
419
+ * Obtains the AFNOR OAuth2 token and the PDP URL.
420
+ * This method:
421
+ * 1. Retrieves AFNOR credentials (stored or zero-trust mode)
422
+ * 2. Performs AFNOR OAuth to obtain a token
423
+ * 3. Returns the token and the PDP URL
424
+ */
425
+ getAfnorTokenAndUrl() {
426
+ return __awaiter(this, void 0, void 0, function* () {
427
+ // Step 1: Get AFNOR credentials
428
+ const credentials = yield this.getAfnorCredentialsInternal();
429
+ // Step 2: Perform AFNOR OAuth via the FactPulse proxy
430
+ const oauthData = new URLSearchParams({
431
+ grant_type: 'client_credentials',
432
+ client_id: credentials.clientId,
433
+ client_secret: credentials.clientSecret,
434
+ });
435
+ try {
436
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/afnor/oauth/token`, oauthData.toString(), {
437
+ headers: {
438
+ 'Content-Type': 'application/x-www-form-urlencoded',
439
+ 'X-PDP-Token-URL': credentials.tokenUrl,
440
+ },
441
+ });
442
+ const tokenData = response.data;
443
+ if (!tokenData.access_token) {
444
+ throw new FactPulseAuthError('Invalid AFNOR OAuth2 response: access_token missing');
445
+ }
446
+ return {
447
+ token: tokenData.access_token,
448
+ pdpBaseUrl: credentials.flowServiceUrl,
449
+ };
450
+ }
451
+ catch (error) {
452
+ const axiosError = error;
453
+ throw new FactPulseAuthError(`AFNOR OAuth2 failed: ${axiosError.message}`);
454
+ }
455
+ });
456
+ }
457
+ /**
458
+ * Performs a request to the AFNOR API with auth and error handling.
459
+ * IMPORTANT: This method uses the AFNOR OAuth token, NOT the FactPulse JWT!
460
+ */
461
+ makeAfnorRequest(method, endpoint, options) {
462
+ return __awaiter(this, void 0, void 0, function* () {
463
+ var _a, _b, _c, _d;
464
+ // Obtenir le token AFNOR et l'URL de la PDP
465
+ const { token: afnorToken, pdpBaseUrl } = yield this.getAfnorTokenAndUrl();
466
+ const url = `${this.config.apiUrl}/api/v1/afnor${endpoint}`;
467
+ // ALWAYS use the AFNOR token + X-PDP-Base-URL header
468
+ const headers = {
469
+ 'Authorization': `Bearer ${afnorToken}`,
470
+ 'X-PDP-Base-URL': pdpBaseUrl,
471
+ };
472
+ try {
473
+ let response;
474
+ if (options === null || options === void 0 ? void 0 : options.files) {
475
+ response = yield this.httpClient.request({
476
+ method,
477
+ url,
478
+ data: options.files,
479
+ headers: Object.assign(Object.assign({}, options.files.getHeaders()), headers),
480
+ params: options === null || options === void 0 ? void 0 : options.params,
481
+ timeout: 60000,
482
+ });
483
+ }
484
+ else {
485
+ response = yield this.httpClient.request({
486
+ method,
487
+ url,
488
+ data: options === null || options === void 0 ? void 0 : options.data,
489
+ headers: Object.assign(Object.assign({}, headers), { 'Content-Type': 'application/json' }),
490
+ params: options === null || options === void 0 ? void 0 : options.params,
491
+ timeout: 30000,
492
+ });
493
+ }
494
+ return response.data;
495
+ }
496
+ catch (error) {
497
+ const axiosError = error;
498
+ const errorMsg = ((_b = (_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.errorMessage) ||
499
+ ((_d = (_c = axiosError.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.detail) ||
500
+ axiosError.message;
501
+ throw new FactPulseValidationError(`AFNOR Error: ${errorMsg}`);
502
+ }
503
+ });
504
+ }
505
+ // ==================== AFNOR Directory ====================
506
+ rechercherSiretAfnor(siret) {
507
+ return __awaiter(this, void 0, void 0, function* () {
508
+ return this.makeAfnorRequest('GET', `/directory/siret/${siret}`);
509
+ });
510
+ }
511
+ rechercherSirenAfnor(siren) {
512
+ return __awaiter(this, void 0, void 0, function* () {
513
+ return this.makeAfnorRequest('GET', `/directory/siren/${siren}`);
514
+ });
515
+ }
516
+ listerCodesRoutageAfnor(siren) {
517
+ return __awaiter(this, void 0, void 0, function* () {
518
+ return this.makeAfnorRequest('GET', `/directory/siren/${siren}/routing-codes`);
519
+ });
520
+ }
521
+ // ==================== AFNOR Flow ====================
522
+ /**
523
+ * Submits an invoice to a PDP via the AFNOR API.
524
+ * Authentication uses the AFNOR OAuth token (obtained automatically),
525
+ * either via stored credentials (stored mode), or via the afnorCredentials
526
+ * provided to the constructor (zero-trust mode).
527
+ *
528
+ * @param pdfBuffer Buffer of the Factur-X PDF to submit
529
+ * @param flowName Flow name (e.g.: "Invoice INV-2025-001")
530
+ * @param options Options: trackingId, flowSyntax (CII/UBL), flowProfile
531
+ */
532
+ submitInvoiceAfnor(pdfBuffer_1, flowName_1) {
533
+ return __awaiter(this, arguments, void 0, function* (pdfBuffer, flowName, options = {}) {
534
+ const { trackingId, flowSyntax = 'CII', flowProfile = 'EN16931' } = options;
535
+ // Compute SHA-256
536
+ const crypto = require('crypto');
537
+ const sha256 = crypto.createHash('sha256').update(pdfBuffer).digest('hex');
538
+ // Prepare flowInfo
539
+ const flowInfo = { name: flowName, flowSyntax, flowProfile, sha256 };
540
+ if (trackingId)
541
+ flowInfo.trackingId = trackingId;
542
+ const form = new FormData();
543
+ form.append('file', pdfBuffer, { filename: 'facture.pdf', contentType: 'application/pdf' });
544
+ form.append('flowInfo', JSON.stringify(flowInfo), { contentType: 'application/json' });
545
+ return this.makeAfnorRequest('POST', '/flow/v1/flows', { files: form });
546
+ });
547
+ }
548
+ searchFlowsAfnor() {
549
+ return __awaiter(this, arguments, void 0, function* (criteria = {}) {
550
+ var _a, _b;
551
+ const searchBody = {
552
+ offset: (_a = criteria.offset) !== null && _a !== void 0 ? _a : 0,
553
+ limit: (_b = criteria.limit) !== null && _b !== void 0 ? _b : 25,
554
+ where: {},
555
+ };
556
+ if (criteria.trackingId)
557
+ searchBody.where.trackingId = criteria.trackingId;
558
+ if (criteria.status)
559
+ searchBody.where.status = criteria.status;
560
+ return this.makeAfnorRequest('POST', '/flow/v1/flows/search', { data: searchBody });
561
+ });
562
+ }
563
+ downloadFlowAfnor(flowId) {
564
+ return __awaiter(this, void 0, void 0, function* () {
565
+ // For downloading, we need to handle the response type differently
566
+ const { token: afnorToken, pdpBaseUrl } = yield this.getAfnorTokenAndUrl();
567
+ const url = `${this.config.apiUrl}/api/v1/afnor/flow/v1/flows/${flowId}`;
568
+ const response = yield this.httpClient.get(url, {
569
+ headers: {
570
+ 'Authorization': `Bearer ${afnorToken}`,
571
+ 'X-PDP-Base-URL': pdpBaseUrl,
572
+ },
573
+ responseType: 'arraybuffer',
574
+ });
575
+ return Buffer.from(response.data);
576
+ });
577
+ }
578
+ /**
579
+ * Retrieves JSON metadata of an incoming flow (supplier invoice).
580
+ * Downloads an incoming flow from the AFNOR PDP and extracts invoice
581
+ * metadata into a unified JSON format. Supports Factur-X, CII and UBL.
582
+ *
583
+ * Note: This endpoint uses FactPulse JWT authentication (not AFNOR OAuth).
584
+ * The FactPulse server handles calling the PDP with stored credentials.
585
+ *
586
+ * @param flowId Flow identifier (UUID)
587
+ * @param includeDocument If true, includes the original document encoded in base64
588
+ * @returns Invoice metadata (supplier, amounts, dates, etc.)
589
+ *
590
+ * @example
591
+ * const invoice = await client.getIncomingInvoiceAfnor("550e8400-...");
592
+ * console.log(`Supplier: ${invoice.supplier.name}`);
593
+ * console.log(`Total incl. tax: ${invoice.total_incl_tax} ${invoice.currency}`);
594
+ */
595
+ getIncomingInvoiceAfnor(flowId_1) {
596
+ return __awaiter(this, arguments, void 0, function* (flowId, includeDocument = false) {
597
+ var _a, _b;
598
+ yield this.ensureAuthenticated();
599
+ const url = `${this.config.apiUrl}/api/v1/afnor/incoming-flows/${flowId}`;
600
+ const params = {};
601
+ if (includeDocument) {
602
+ params.include_document = 'true';
603
+ }
604
+ try {
605
+ const response = yield this.httpClient.get(url, {
606
+ headers: { 'Authorization': `Bearer ${this.accessToken}` },
607
+ params: Object.keys(params).length > 0 ? params : undefined,
608
+ timeout: 60000,
609
+ });
610
+ return response.data;
611
+ }
612
+ catch (error) {
613
+ const axiosError = error;
614
+ throw new FactPulseValidationError(`Incoming flow error: ${((_b = (_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.detail) || axiosError.message}`);
615
+ }
616
+ });
617
+ }
618
+ healthcheckAfnor() {
619
+ return __awaiter(this, void 0, void 0, function* () {
620
+ return this.makeAfnorRequest('GET', '/flow/v1/healthcheck');
621
+ });
622
+ }
623
+ // ==================== Chorus Pro ====================
624
+ rechercherStructureChorus(criteria) {
625
+ return __awaiter(this, void 0, void 0, function* () {
626
+ yield this.ensureAuthenticated();
627
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/chorus-pro/structures/rechercher`, criteria, {
628
+ headers: { Authorization: `Bearer ${this.accessToken}`, 'Content-Type': 'application/json' },
629
+ });
630
+ return response.data;
631
+ });
632
+ }
633
+ consulterStructureChorus(idStructureCpp) {
634
+ return __awaiter(this, void 0, void 0, function* () {
635
+ yield this.ensureAuthenticated();
636
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/chorus-pro/structures/consulter`, { id_structure_cpp: idStructureCpp }, {
637
+ headers: { Authorization: `Bearer ${this.accessToken}`, 'Content-Type': 'application/json' },
638
+ });
639
+ return response.data;
640
+ });
641
+ }
642
+ /**
643
+ * Lists the services of a Chorus Pro structure.
644
+ * @param idStructureCpp Chorus Pro ID of the structure
645
+ * @returns Object with listeServices, total, codeRetour, libelle
646
+ */
647
+ listerServicesStructureChorus(idStructureCpp) {
648
+ return __awaiter(this, void 0, void 0, function* () {
649
+ yield this.ensureAuthenticated();
650
+ const response = yield this.httpClient.get(`${this.config.apiUrl}/api/v1/chorus-pro/structures/${idStructureCpp}/services`, {
651
+ headers: { Authorization: `Bearer ${this.accessToken}` },
652
+ });
653
+ return response.data;
654
+ });
655
+ }
656
+ obtenirIdChorusDepuisSiret(siret) {
657
+ return __awaiter(this, void 0, void 0, function* () {
658
+ const results = yield this.rechercherStructureChorus({ identifiant_structure: siret, type_identifiant: 'SIRET' });
659
+ if (results.length > 0 && results[0].id_structure_cpp)
660
+ return results[0].id_structure_cpp;
661
+ return null;
662
+ });
663
+ }
664
+ submitInvoiceChorus(invoiceData) {
665
+ return __awaiter(this, void 0, void 0, function* () {
666
+ yield this.ensureAuthenticated();
667
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/chorus/factures/soumettre`, invoiceData, {
668
+ headers: { Authorization: `Bearer ${this.accessToken}`, 'Content-Type': 'application/json' },
669
+ });
670
+ return response.data;
671
+ });
672
+ }
673
+ lookupInvoiceChorus(invoiceIdCpp) {
674
+ return __awaiter(this, void 0, void 0, function* () {
675
+ yield this.ensureAuthenticated();
676
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/chorus/factures/consulter`, { identifiant_facture_cpp: invoiceIdCpp }, {
677
+ headers: { Authorization: `Bearer ${this.accessToken}`, 'Content-Type': 'application/json' },
678
+ });
679
+ return response.data;
680
+ });
681
+ }
682
+ // ==================== Validation ====================
683
+ /**
684
+ * Validates a Factur-X PDF.
685
+ * @param pdfBuffer - PDF content as Buffer
686
+ * @param options - Validation options
687
+ * @param options.profile - Factur-X profile (MINIMUM, BASIC, EN16931, EXTENDED). If not specified, auto-detected.
688
+ * @param options.useVerapdf - Enable strict PDF/A validation with VeraPDF (default: false)
689
+ */
690
+ validateFacturxPdf(pdfBuffer_1) {
691
+ return __awaiter(this, arguments, void 0, function* (pdfBuffer, options = {}) {
692
+ var _a;
693
+ yield this.ensureAuthenticated();
694
+ const form = new FormData();
695
+ form.append('pdf_file', pdfBuffer, { filename: 'facture.pdf', contentType: 'application/pdf' });
696
+ if (options.profile) {
697
+ form.append('profile', options.profile);
698
+ }
699
+ form.append('use_verapdf', String((_a = options.useVerapdf) !== null && _a !== void 0 ? _a : false));
700
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/validate-facturx-pdf`, form, {
701
+ headers: Object.assign(Object.assign({}, form.getHeaders()), { Authorization: `Bearer ${this.accessToken}` }),
702
+ });
703
+ return response.data;
704
+ });
705
+ }
706
+ validateFacturxXml(xmlContent_1) {
707
+ return __awaiter(this, arguments, void 0, function* (xmlContent, profile = 'EN16931') {
708
+ yield this.ensureAuthenticated();
709
+ const form = new FormData();
710
+ form.append('xml_file', Buffer.from(xmlContent, 'utf-8'), { filename: 'facture.xml', contentType: 'application/xml' });
711
+ form.append('profile', profile);
712
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/validate-xml`, form, {
713
+ headers: Object.assign(Object.assign({}, form.getHeaders()), { Authorization: `Bearer ${this.accessToken}` }),
714
+ });
715
+ return response.data;
716
+ });
717
+ }
718
+ validatePdfSignature(pdfBuffer) {
719
+ return __awaiter(this, void 0, void 0, function* () {
720
+ yield this.ensureAuthenticated();
721
+ const form = new FormData();
722
+ form.append('pdf_file', pdfBuffer, { filename: 'document.pdf', contentType: 'application/pdf' });
723
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/validate-pdf-signature`, form, {
724
+ headers: Object.assign(Object.assign({}, form.getHeaders()), { Authorization: `Bearer ${this.accessToken}` }),
725
+ });
726
+ return response.data;
727
+ });
728
+ }
729
+ // ==================== Signature ====================
730
+ /**
731
+ * Signs a PDF with the server-configured certificate (via JWT client_uid).
732
+ * The certificate must be previously configured in Django Admin.
733
+ */
734
+ signPdf(pdfBuffer_1) {
735
+ return __awaiter(this, arguments, void 0, function* (pdfBuffer, options = {}) {
736
+ yield this.ensureAuthenticated();
737
+ const form = new FormData();
738
+ form.append('pdf_file', pdfBuffer, { filename: 'document.pdf', contentType: 'application/pdf' });
739
+ if (options.reason)
740
+ form.append('reason', options.reason);
741
+ if (options.location)
742
+ form.append('location', options.location);
743
+ if (options.contact)
744
+ form.append('contact', options.contact);
745
+ if (options.usePadesLt !== undefined)
746
+ form.append('use_pades_lt', String(options.usePadesLt));
747
+ if (options.useTimestamp !== undefined)
748
+ form.append('use_timestamp', String(options.useTimestamp));
749
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/sign-pdf`, form, {
750
+ headers: Object.assign(Object.assign({}, form.getHeaders()), { Authorization: `Bearer ${this.accessToken}` }),
751
+ });
752
+ // The API returns JSON with pdf_signe_base64
753
+ const data = response.data;
754
+ if (data.pdf_signe_base64) {
755
+ return Buffer.from(data.pdf_signe_base64, 'base64');
756
+ }
757
+ throw new Error('Invalid signature response');
758
+ });
759
+ }
760
+ /**
761
+ * Generates a test certificate (NOT FOR PRODUCTION).
762
+ * The certificate must then be configured in Django Admin.
763
+ */
764
+ generateTestCertificate() {
765
+ return __awaiter(this, arguments, void 0, function* (options = {}) {
766
+ yield this.ensureAuthenticated();
767
+ const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/generate-test-certificate`, {
768
+ cn: options.cn || 'Test Organisation',
769
+ organisation: options.organisation || 'Test Organisation',
770
+ email: options.email || 'test@example.com',
771
+ validity_days: options.validityDays || 365,
772
+ key_size: options.keySize || 2048,
773
+ }, {
774
+ headers: { Authorization: `Bearer ${this.accessToken}`, 'Content-Type': 'application/json' },
775
+ });
776
+ return response.data;
777
+ });
778
+ }
779
+ // ==================== Workflow complet ====================
780
+ /**
781
+ * Complete workflow: generation + validation + signature + AFNOR submission.
782
+ * Note: Signature uses the server-configured certificate (via JWT client_uid).
783
+ * @param invoiceData Invoice data
784
+ * @param pdfPath Path to the source PDF
785
+ * @param options Workflow options
786
+ * @returns Result with pdfBuffer, validation, signature and afnor
787
+ */
788
+ generateCompleteFacturx(invoiceData_1, pdfPath_1) {
789
+ return __awaiter(this, arguments, void 0, function* (invoiceData, pdfPath, options = {}) {
790
+ const { profile = 'EN16931', validate = true, sign = false, submitAfnor = false, afnorFlowName, afnorTrackingId, timeout, } = options;
791
+ const result = { pdfBuffer: Buffer.alloc(0) };
792
+ // 1. Generation
793
+ const pdfBuffer = yield this.generateFacturx(invoiceData, pdfPath, profile, 'pdf', true, timeout);
794
+ result.pdfBuffer = pdfBuffer;
795
+ // 2. Validation
796
+ if (validate) {
797
+ const validation = yield this.validateFacturxPdf(pdfBuffer, { profile });
798
+ result.validation = validation;
799
+ }
800
+ // 3. Signature (uses the server-configured certificate)
801
+ if (sign) {
802
+ const signedPdf = yield this.signPdf(result.pdfBuffer);
803
+ result.pdfBuffer = signedPdf;
804
+ result.signature = { signed: true };
805
+ }
806
+ // 4. AFNOR submission
807
+ if (submitAfnor) {
808
+ const invoiceNumber = (invoiceData.invoiceNumber || invoiceData.invoice_number || 'INVOICE');
809
+ const flowName = afnorFlowName || `Invoice ${invoiceNumber}`;
810
+ const trackingId = afnorTrackingId || invoiceNumber;
811
+ const afnorResult = yield this.submitInvoiceAfnor(result.pdfBuffer, flowName, { trackingId });
812
+ result.afnor = afnorResult;
813
+ }
814
+ return result;
815
+ });
816
+ }
817
+ }