@factpulse/sdk 3.0.32 → 3.0.34

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 (182) hide show
  1. package/.openapi-generator/FILES +42 -2
  2. package/CHANGELOG.md +5 -16
  3. package/api/afnorpdppaapi.ts +1 -1
  4. package/api/afnorpdppadirectory-service-api.ts +1 -1
  5. package/api/afnorpdppaflow-service-api.ts +1 -1
  6. package/api/cdarcycle-de-vie-api.ts +603 -0
  7. package/api/chorus-pro-api.ts +1 -1
  8. package/api/document-conversion-api.ts +1 -1
  9. package/api/downloads-api.ts +1 -1
  10. package/api/ereporting-api.ts +1 -1
  11. package/api/health-api.ts +1 -1
  12. package/api/invoice-processing-api.ts +1 -1
  13. package/api/pdfxmlverification-api.ts +1 -1
  14. package/api/user-api.ts +1 -1
  15. package/api.ts +1 -0
  16. package/dist/api/cdarcycle-de-vie-api.d.ts +280 -0
  17. package/dist/api/cdarcycle-de-vie-api.js +569 -0
  18. package/dist/api.d.ts +1 -0
  19. package/dist/api.js +1 -0
  20. package/dist/esm/api/cdarcycle-de-vie-api.d.ts +280 -0
  21. package/dist/esm/api/cdarcycle-de-vie-api.js +559 -0
  22. package/dist/esm/api.d.ts +1 -0
  23. package/dist/esm/api.js +1 -0
  24. package/dist/esm/models/{facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts → action-code-info.d.ts} +12 -8
  25. package/dist/{models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts → esm/models/action-codes-response.d.ts} +13 -8
  26. package/dist/esm/models/action-codes-response.js +14 -0
  27. package/dist/esm/models/body-submit-cdar-api-v1-cdar-submit-post.d.ts +17 -0
  28. package/dist/esm/models/body-submit-cdar-api-v1-cdar-submit-post.js +14 -0
  29. package/dist/esm/models/body-submit-cdar-xml-api-v1-cdar-submit-xml-post.d.ts +17 -0
  30. package/dist/esm/models/body-submit-cdar-xml-api-v1-cdar-submit-xml-post.js +14 -0
  31. package/dist/esm/models/chorus-pro-credentials.d.ts +7 -19
  32. package/dist/esm/models/chorus-pro-destination.d.ts +2 -2
  33. package/dist/esm/models/create-cdarrequest.d.ts +66 -0
  34. package/dist/esm/models/create-cdarrequest.js +14 -0
  35. package/dist/esm/models/encaisseamount.d.ts +16 -0
  36. package/dist/esm/models/encaisseamount.js +14 -0
  37. package/dist/esm/models/encaisseamount1.d.ts +13 -0
  38. package/dist/esm/models/encaisseamount1.js +14 -0
  39. package/dist/esm/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.d.ts +29 -0
  40. package/dist/esm/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.js +14 -0
  41. package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts +36 -0
  42. package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js +14 -0
  43. package/dist/esm/models/generate-cdarresponse.d.ts +33 -0
  44. package/dist/esm/models/generate-cdarresponse.js +14 -0
  45. package/dist/esm/models/get-chorus-pro-id-request.d.ts +2 -2
  46. package/dist/esm/models/get-invoice-request.d.ts +2 -2
  47. package/dist/esm/models/get-structure-request.d.ts +2 -2
  48. package/dist/esm/models/index.d.ts +20 -1
  49. package/dist/esm/models/index.js +20 -1
  50. package/dist/esm/models/reason-code-info.d.ts +28 -0
  51. package/dist/esm/models/reason-code-info.js +14 -0
  52. package/dist/esm/models/reason-codes-response.d.ts +29 -0
  53. package/dist/esm/models/reason-codes-response.js +14 -0
  54. package/dist/esm/models/recipient-input.d.ts +24 -0
  55. package/dist/esm/models/recipient-input.js +14 -0
  56. package/dist/esm/models/search-structure-request.d.ts +2 -2
  57. package/dist/esm/models/status-code-info.d.ts +28 -0
  58. package/dist/esm/models/status-code-info.js +14 -0
  59. package/dist/esm/models/status-codes-response.d.ts +29 -0
  60. package/dist/esm/models/status-codes-response.js +14 -0
  61. package/dist/esm/models/submit-cdarrequest.d.ts +70 -0
  62. package/dist/esm/models/submit-cdarrequest.js +14 -0
  63. package/dist/esm/models/submit-cdarresponse.d.ts +26 -0
  64. package/dist/esm/models/submit-cdarresponse.js +14 -0
  65. package/dist/esm/models/submit-cdarxmlrequest.d.ts +25 -0
  66. package/dist/esm/models/submit-cdarxmlrequest.js +14 -0
  67. package/dist/esm/models/submit-invoice-request.d.ts +2 -2
  68. package/dist/esm/models/validate-cdarrequest.d.ts +25 -0
  69. package/dist/esm/models/validate-cdarrequest.js +14 -0
  70. package/dist/esm/models/validate-cdarresponse.d.ts +29 -0
  71. package/dist/esm/models/validate-cdarresponse.js +14 -0
  72. package/dist/esm/src/helpers/client.js +11 -0
  73. package/dist/models/action-code-info.d.ts +28 -0
  74. package/dist/models/action-codes-response.d.ts +29 -0
  75. package/dist/models/action-codes-response.js +15 -0
  76. package/dist/models/body-submit-cdar-api-v1-cdar-submit-post.d.ts +17 -0
  77. package/dist/models/body-submit-cdar-api-v1-cdar-submit-post.js +15 -0
  78. package/dist/models/body-submit-cdar-xml-api-v1-cdar-submit-xml-post.d.ts +17 -0
  79. package/dist/models/body-submit-cdar-xml-api-v1-cdar-submit-xml-post.js +15 -0
  80. package/dist/models/chorus-pro-credentials.d.ts +7 -19
  81. package/dist/models/chorus-pro-destination.d.ts +2 -2
  82. package/dist/models/create-cdarrequest.d.ts +66 -0
  83. package/dist/models/create-cdarrequest.js +15 -0
  84. package/dist/models/encaisseamount.d.ts +16 -0
  85. package/dist/models/encaisseamount.js +15 -0
  86. package/dist/models/encaisseamount1.d.ts +13 -0
  87. package/dist/models/encaisseamount1.js +15 -0
  88. package/dist/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.d.ts +29 -0
  89. package/dist/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.js +15 -0
  90. package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts +36 -0
  91. package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js +15 -0
  92. package/dist/models/generate-cdarresponse.d.ts +33 -0
  93. package/dist/models/generate-cdarresponse.js +15 -0
  94. package/dist/models/get-chorus-pro-id-request.d.ts +2 -2
  95. package/dist/models/get-invoice-request.d.ts +2 -2
  96. package/dist/models/get-structure-request.d.ts +2 -2
  97. package/dist/models/index.d.ts +20 -1
  98. package/dist/models/index.js +20 -1
  99. package/dist/models/reason-code-info.d.ts +28 -0
  100. package/dist/models/reason-code-info.js +15 -0
  101. package/dist/models/reason-codes-response.d.ts +29 -0
  102. package/dist/models/reason-codes-response.js +15 -0
  103. package/dist/models/recipient-input.d.ts +24 -0
  104. package/dist/models/recipient-input.js +15 -0
  105. package/dist/models/search-structure-request.d.ts +2 -2
  106. package/dist/models/status-code-info.d.ts +28 -0
  107. package/dist/models/status-code-info.js +15 -0
  108. package/dist/models/status-codes-response.d.ts +29 -0
  109. package/dist/models/status-codes-response.js +15 -0
  110. package/dist/models/submit-cdarrequest.d.ts +70 -0
  111. package/dist/models/submit-cdarrequest.js +15 -0
  112. package/dist/models/submit-cdarresponse.d.ts +26 -0
  113. package/dist/models/submit-cdarresponse.js +15 -0
  114. package/dist/models/submit-cdarxmlrequest.d.ts +25 -0
  115. package/dist/models/submit-cdarxmlrequest.js +15 -0
  116. package/dist/models/submit-invoice-request.d.ts +2 -2
  117. package/dist/models/validate-cdarrequest.d.ts +25 -0
  118. package/dist/models/validate-cdarrequest.js +15 -0
  119. package/dist/models/validate-cdarresponse.d.ts +29 -0
  120. package/dist/models/validate-cdarresponse.js +15 -0
  121. package/dist/src/helpers/client.js +11 -0
  122. package/docs/ActionCodeInfo.md +25 -0
  123. package/docs/ActionCodesResponse.md +25 -0
  124. package/docs/BodySubmitCdarApiV1CdarSubmitPost.md +22 -0
  125. package/docs/BodySubmitCdarXmlApiV1CdarSubmitXmlPost.md +22 -0
  126. package/docs/CDARCycleDeVieApi.md +397 -0
  127. package/docs/ChorusProCredentials.md +9 -9
  128. package/docs/ChorusProDestination.md +1 -1
  129. package/docs/CreateCDARRequest.md +55 -0
  130. package/docs/Encaisseamount.md +19 -0
  131. package/docs/Encaisseamount1.md +18 -0
  132. package/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +27 -0
  133. package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +29 -0
  134. package/docs/GenerateCDARResponse.md +29 -0
  135. package/docs/GetChorusProIdRequest.md +1 -1
  136. package/docs/GetInvoiceRequest.md +1 -1
  137. package/docs/GetStructureRequest.md +1 -1
  138. package/docs/ReasonCodeInfo.md +25 -0
  139. package/docs/ReasonCodesResponse.md +25 -0
  140. package/docs/RecipientInput.md +29 -0
  141. package/docs/SearchStructureRequest.md +1 -1
  142. package/docs/StatusCodeInfo.md +25 -0
  143. package/docs/StatusCodesResponse.md +25 -0
  144. package/docs/SubmitCDARRequest.md +57 -0
  145. package/docs/SubmitCDARResponse.md +27 -0
  146. package/docs/SubmitCDARXMLRequest.md +25 -0
  147. package/docs/SubmitInvoiceRequest.md +1 -1
  148. package/docs/ValidateCDARRequest.md +35 -0
  149. package/docs/ValidateCDARResponse.md +25 -0
  150. package/models/{facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts → action-code-info.ts} +12 -8
  151. package/models/action-codes-response.ts +37 -0
  152. package/models/body-submit-cdar-api-v1-cdar-submit-post.ts +27 -0
  153. package/models/body-submit-cdar-xml-api-v1-cdar-submit-xml-post.ts +27 -0
  154. package/models/chorus-pro-credentials.ts +7 -19
  155. package/models/chorus-pro-destination.ts +2 -2
  156. package/models/create-cdarrequest.ts +76 -0
  157. package/models/encaisseamount.ts +22 -0
  158. package/models/encaisseamount1.ts +19 -0
  159. package/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.ts +35 -0
  160. package/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts +42 -0
  161. package/models/generate-cdarresponse.ts +39 -0
  162. package/models/get-chorus-pro-id-request.ts +2 -2
  163. package/models/get-invoice-request.ts +2 -2
  164. package/models/get-structure-request.ts +2 -2
  165. package/models/index.ts +20 -1
  166. package/models/reason-code-info.ts +34 -0
  167. package/models/reason-codes-response.ts +37 -0
  168. package/models/recipient-input.ts +30 -0
  169. package/models/search-structure-request.ts +2 -2
  170. package/models/status-code-info.ts +34 -0
  171. package/models/status-codes-response.ts +37 -0
  172. package/models/submit-cdarrequest.ts +80 -0
  173. package/models/submit-cdarresponse.ts +32 -0
  174. package/models/submit-cdarxmlrequest.ts +31 -0
  175. package/models/submit-invoice-request.ts +2 -2
  176. package/models/validate-cdarrequest.ts +33 -0
  177. package/models/validate-cdarresponse.ts +37 -0
  178. package/package.json +1 -1
  179. package/src/helpers/client.ts +13 -0
  180. package/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +0 -29
  181. /package/dist/esm/models/{facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js → action-code-info.js} +0 -0
  182. /package/dist/models/{facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js → action-code-info.js} +0 -0
@@ -0,0 +1,32 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * FactPulse REST API
5
+ * REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }\' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://factpulse.fr/api/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://factpulse.fr/documentation-api/
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: contact@factpulse.fr
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ * Réponse de soumission CDAR.
19
+ */
20
+ export interface SubmitCDARResponse {
21
+ /**
22
+ * Identifiant du flux AFNOR
23
+ */
24
+ 'flowId': string;
25
+ /**
26
+ * Statut de la soumission
27
+ */
28
+ 'status': string;
29
+ 'message'?: string | null;
30
+ 'documentId'?: string | null;
31
+ }
32
+
@@ -0,0 +1,31 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * FactPulse REST API
5
+ * REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }\' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://factpulse.fr/api/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://factpulse.fr/documentation-api/
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: contact@factpulse.fr
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ * Requête de soumission d\'un XML CDAR pré-généré.
19
+ */
20
+ export interface SubmitCDARXMLRequest {
21
+ /**
22
+ * XML CDAR à soumettre
23
+ */
24
+ 'xml': string;
25
+ /**
26
+ * Type de flux AFNOR
27
+ */
28
+ 'flowType'?: string;
29
+ 'filename'?: string | null;
30
+ }
31
+
@@ -15,7 +15,7 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { ChorusProCredentials } from './chorus-pro-credentials';
18
+ import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
19
19
  // May contain unused imports in some cases
20
20
  // @ts-ignore
21
21
  import type { SubmitGrossAmount } from './submit-gross-amount';
@@ -30,7 +30,7 @@ import type { SubmitVatAmount } from './submit-vat-amount';
30
30
  * Submit an invoice to Chorus Pro.
31
31
  */
32
32
  export interface SubmitInvoiceRequest {
33
- 'credentials'?: ChorusProCredentials | null;
33
+ 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
34
34
  /**
35
35
  * Invoice number
36
36
  */
@@ -0,0 +1,33 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * FactPulse REST API
5
+ * REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }\' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://factpulse.fr/api/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://factpulse.fr/documentation-api/
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: contact@factpulse.fr
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { Encaisseamount1 } from './encaisseamount1';
19
+
20
+ /**
21
+ * Requête de validation CDAR.
22
+ */
23
+ export interface ValidateCDARRequest {
24
+ 'documentId'?: string | null;
25
+ 'senderSiren'?: string | null;
26
+ 'senderRole'?: string | null;
27
+ 'invoiceId'?: string | null;
28
+ 'invoiceIssueDate'?: string | null;
29
+ 'status'?: string | null;
30
+ 'reasonCode'?: string | null;
31
+ 'encaisseAmount'?: Encaisseamount1 | null;
32
+ }
33
+
@@ -0,0 +1,37 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * FactPulse REST API
5
+ * REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }\' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://factpulse.fr/api/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://factpulse.fr/documentation-api/
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: contact@factpulse.fr
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { FactureElectroniqueRestApiSchemasCdarValidationErrorResponse } from './facture-electronique-rest-api-schemas-cdar-validation-error-response';
19
+
20
+ /**
21
+ * Réponse de validation CDAR.
22
+ */
23
+ export interface ValidateCDARResponse {
24
+ /**
25
+ * Résultat de validation
26
+ */
27
+ 'valid': boolean;
28
+ /**
29
+ * Liste des erreurs
30
+ */
31
+ 'errors'?: Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>;
32
+ /**
33
+ * Liste des avertissements
34
+ */
35
+ 'warnings'?: Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>;
36
+ }
37
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factpulse/sdk",
3
- "version": "3.0.32",
3
+ "version": "3.0.34",
4
4
  "description": "OpenAPI client for @factpulse/sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
@@ -381,6 +381,16 @@ export class FactPulseClient {
381
381
  if (!taskId) throw new FactPulseValidationError("No task ID");
382
382
  if (!sync) return taskId;
383
383
  const result = await this.pollTask(taskId, timeout);
384
+
385
+ // Check for business error (task succeeded but business result is ERROR)
386
+ if (result.status === 'ERROR') {
387
+ const errorMsg = (result.errorMessage as string) || 'Business error';
388
+ const errors: ValidationErrorDetail[] = Array.isArray(result.details)
389
+ ? result.details.filter((e: unknown): e is ValidationErrorDetail => typeof e === 'object' && e !== null)
390
+ : [];
391
+ throw new FactPulseValidationError(errorMsg, errors);
392
+ }
393
+
384
394
  if (result.content_b64) return Buffer.from(result.content_b64 as string, 'base64');
385
395
  throw new FactPulseValidationError('No content');
386
396
  }
@@ -878,6 +888,9 @@ export class FactPulseClient {
878
888
  if (validate) {
879
889
  const validation = await this.validateFacturxPdf(pdfBuffer, { profile });
880
890
  result.validation = validation;
891
+ if (!(validation as { isCompliant?: boolean }).isCompliant) {
892
+ return result;
893
+ }
881
894
  }
882
895
 
883
896
  // 3. Signature (uses the server-configured certificate)
@@ -1,29 +0,0 @@
1
- # FactureElectroniqueRestApiSchemasProcessingChorusProCredentials
2
-
3
- Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **pisteClientId** | **string** | | [optional] [default to undefined]
10
- **pisteClientSecret** | **string** | | [optional] [default to undefined]
11
- **chorusLogin** | **string** | | [optional] [default to undefined]
12
- **chorusPassword** | **string** | | [optional] [default to undefined]
13
- **sandboxMode** | **boolean** | [MODE 2] Use sandbox mode (default: True) | [optional] [default to true]
14
-
15
- ## Example
16
-
17
- ```typescript
18
- import { FactureElectroniqueRestApiSchemasProcessingChorusProCredentials } from '@factpulse/sdk';
19
-
20
- const instance: FactureElectroniqueRestApiSchemasProcessingChorusProCredentials = {
21
- pisteClientId,
22
- pisteClientSecret,
23
- chorusLogin,
24
- chorusPassword,
25
- sandboxMode,
26
- };
27
- ```
28
-
29
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)