@factpulse/sdk 4.0.0 → 4.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 (172) hide show
  1. package/.openapi-generator/FILES +30 -6
  2. package/.openapi-generator/VERSION +1 -1
  3. package/CHANGELOG.md +5 -9
  4. package/api/cdarcycle-de-vie-api.ts +186 -86
  5. package/api/client-management-api.ts +672 -0
  6. package/api/downloads-api.ts +0 -152
  7. package/api.ts +1 -0
  8. package/dist/api/cdarcycle-de-vie-api.d.ts +93 -50
  9. package/dist/api/cdarcycle-de-vie-api.js +174 -80
  10. package/dist/api/client-management-api.d.ts +309 -0
  11. package/dist/api/client-management-api.js +642 -0
  12. package/dist/api/downloads-api.d.ts +0 -68
  13. package/dist/api/downloads-api.js +0 -145
  14. package/dist/api.d.ts +1 -0
  15. package/dist/api.js +1 -0
  16. package/dist/esm/api/cdarcycle-de-vie-api.d.ts +93 -50
  17. package/dist/esm/api/cdarcycle-de-vie-api.js +174 -80
  18. package/dist/esm/api/client-management-api.d.ts +309 -0
  19. package/dist/esm/api/client-management-api.js +632 -0
  20. package/dist/esm/api/downloads-api.d.ts +0 -68
  21. package/dist/esm/api/downloads-api.js +0 -145
  22. package/dist/esm/api.d.ts +1 -0
  23. package/dist/esm/api.js +1 -0
  24. package/dist/esm/models/allowance-charge.d.ts +2 -2
  25. package/dist/esm/models/amount.d.ts +1 -1
  26. package/dist/esm/models/amount1.d.ts +1 -1
  27. package/dist/esm/models/amount2.d.ts +16 -0
  28. package/dist/esm/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.d.ts → client-activate-response.d.ts} +16 -5
  29. package/dist/esm/models/client-create-request.d.ts +22 -0
  30. package/dist/esm/models/client-create-request.js +14 -0
  31. package/dist/esm/models/client-detail.d.ts +48 -0
  32. package/dist/esm/models/client-detail.js +14 -0
  33. package/dist/esm/models/client-list-response.d.ts +33 -0
  34. package/dist/esm/models/client-list-response.js +14 -0
  35. package/dist/esm/models/client-summary.d.ts +48 -0
  36. package/dist/esm/models/client-summary.js +14 -0
  37. package/dist/esm/models/client-update-request.d.ts +19 -0
  38. package/dist/esm/models/client-update-request.js +14 -0
  39. package/dist/esm/models/encaissee-request.d.ts +39 -0
  40. package/dist/esm/models/encaissee-request.js +14 -0
  41. package/dist/esm/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts +22 -0
  42. package/dist/esm/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js +23 -0
  43. package/dist/esm/models/index.d.ts +14 -3
  44. package/dist/esm/models/index.js +14 -3
  45. package/dist/esm/models/invoice-input.d.ts +2 -2
  46. package/dist/esm/models/invoice-type-code.d.ts +65 -6
  47. package/dist/esm/models/invoice-type-code.js +65 -6
  48. package/dist/esm/models/payment-amount-by-rate.d.ts +2 -2
  49. package/dist/esm/models/pdpconfig-response.d.ts +34 -0
  50. package/dist/esm/models/pdpconfig-response.js +14 -0
  51. package/dist/esm/models/pdpconfig-update-request.d.ts +40 -0
  52. package/dist/esm/models/pdpconfig-update-request.js +14 -0
  53. package/dist/esm/models/refusee-request.d.ts +38 -0
  54. package/dist/esm/models/refusee-request.js +14 -0
  55. package/dist/esm/models/{body-submit-cdar-api-v1-cdar-submit-post.d.ts → secret-status.d.ts} +12 -5
  56. package/dist/esm/models/secret-status.js +14 -0
  57. package/dist/esm/models/simplified-cdarresponse.d.ts +36 -0
  58. package/dist/esm/models/simplified-cdarresponse.js +14 -0
  59. package/dist/esm/models/simplified-invoice-data.d.ts +2 -2
  60. package/dist/esm/models/submit-cdarrequest.d.ts +4 -0
  61. package/dist/esm/models/submit-cdarxmlrequest.d.ts +4 -0
  62. package/dist/esm/src/helpers/client.d.ts +3 -1
  63. package/dist/esm/src/helpers/client.js +28 -7
  64. package/dist/esm/src/helpers/exceptions.d.ts +3 -1
  65. package/dist/esm/src/helpers/exceptions.js +7 -1
  66. package/dist/models/allowance-charge.d.ts +2 -2
  67. package/dist/models/amount.d.ts +1 -1
  68. package/dist/models/amount1.d.ts +1 -1
  69. package/dist/models/amount2.d.ts +16 -0
  70. package/dist/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.d.ts → client-activate-response.d.ts} +16 -5
  71. package/dist/models/client-create-request.d.ts +22 -0
  72. package/dist/models/client-create-request.js +15 -0
  73. package/dist/models/client-detail.d.ts +48 -0
  74. package/dist/models/client-detail.js +15 -0
  75. package/dist/models/client-list-response.d.ts +33 -0
  76. package/dist/models/client-list-response.js +15 -0
  77. package/dist/models/client-summary.d.ts +48 -0
  78. package/dist/models/client-summary.js +15 -0
  79. package/dist/models/client-update-request.d.ts +19 -0
  80. package/dist/models/client-update-request.js +15 -0
  81. package/dist/models/encaissee-request.d.ts +39 -0
  82. package/dist/models/encaissee-request.js +15 -0
  83. package/dist/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts +22 -0
  84. package/dist/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js +26 -0
  85. package/dist/models/index.d.ts +14 -3
  86. package/dist/models/index.js +14 -3
  87. package/dist/models/invoice-input.d.ts +2 -2
  88. package/dist/models/invoice-type-code.d.ts +65 -6
  89. package/dist/models/invoice-type-code.js +65 -6
  90. package/dist/models/payment-amount-by-rate.d.ts +2 -2
  91. package/dist/models/pdpconfig-response.d.ts +34 -0
  92. package/dist/models/pdpconfig-response.js +15 -0
  93. package/dist/models/pdpconfig-update-request.d.ts +40 -0
  94. package/dist/models/pdpconfig-update-request.js +15 -0
  95. package/dist/models/refusee-request.d.ts +38 -0
  96. package/dist/models/refusee-request.js +15 -0
  97. package/dist/models/{body-submit-cdar-api-v1-cdar-submit-post.d.ts → secret-status.d.ts} +12 -5
  98. package/dist/models/secret-status.js +15 -0
  99. package/dist/models/simplified-cdarresponse.d.ts +36 -0
  100. package/dist/models/simplified-cdarresponse.js +15 -0
  101. package/dist/models/simplified-invoice-data.d.ts +2 -2
  102. package/dist/models/submit-cdarrequest.d.ts +4 -0
  103. package/dist/models/submit-cdarxmlrequest.d.ts +4 -0
  104. package/dist/src/helpers/client.d.ts +3 -1
  105. package/dist/src/helpers/client.js +61 -7
  106. package/dist/src/helpers/exceptions.d.ts +3 -1
  107. package/dist/src/helpers/exceptions.js +7 -1
  108. package/docs/AllowanceCharge.md +1 -1
  109. package/docs/Amount.md +1 -1
  110. package/docs/Amount1.md +1 -1
  111. package/docs/Amount2.md +19 -0
  112. package/docs/CDARCycleDeVieApi.md +126 -30
  113. package/docs/ClientActivateResponse.md +25 -0
  114. package/docs/ClientCreateRequest.md +25 -0
  115. package/docs/ClientDetail.md +41 -0
  116. package/docs/ClientListResponse.md +27 -0
  117. package/docs/ClientManagementApi.md +483 -0
  118. package/docs/ClientSummary.md +41 -0
  119. package/docs/ClientUpdateRequest.md +25 -0
  120. package/docs/DownloadsApi.md +0 -115
  121. package/docs/EncaisseeRequest.md +39 -0
  122. package/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +17 -0
  123. package/docs/InvoiceInput.md +1 -1
  124. package/docs/InvoiceTypeCode.md +28 -6
  125. package/docs/PDPConfigResponse.md +47 -0
  126. package/docs/PDPConfigUpdateRequest.md +31 -0
  127. package/docs/PaymentAmountByRate.md +1 -1
  128. package/docs/RefuseeRequest.md +39 -0
  129. package/docs/SecretStatus.md +23 -0
  130. package/docs/SimplifiedCDARResponse.md +29 -0
  131. package/docs/SimplifiedInvoiceData.md +1 -1
  132. package/docs/SubmitCDARRequest.md +8 -0
  133. package/docs/SubmitCDARXMLRequest.md +8 -0
  134. package/models/allowance-charge.ts +2 -2
  135. package/models/amount.ts +1 -1
  136. package/models/amount1.ts +1 -1
  137. package/models/amount2.ts +22 -0
  138. package/models/client-activate-response.ts +34 -0
  139. package/models/client-create-request.ts +28 -0
  140. package/models/client-detail.ts +54 -0
  141. package/models/{body-submit-cdar-api-v1-cdar-submit-post.ts → client-list-response.ts} +21 -7
  142. package/models/client-summary.ts +54 -0
  143. package/models/client-update-request.ts +25 -0
  144. package/models/encaissee-request.ts +47 -0
  145. package/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.ts → facture-electronique-rest-api-schemas-ereporting-invoice-type-code.ts} +16 -11
  146. package/models/index.ts +14 -3
  147. package/models/invoice-input.ts +2 -2
  148. package/models/invoice-type-code.ts +65 -6
  149. package/models/payment-amount-by-rate.ts +2 -2
  150. package/models/pdpconfig-response.ts +42 -0
  151. package/models/pdpconfig-update-request.ts +46 -0
  152. package/models/refusee-request.ts +44 -0
  153. package/models/secret-status.ts +30 -0
  154. package/models/simplified-cdarresponse.ts +42 -0
  155. package/models/simplified-invoice-data.ts +2 -2
  156. package/models/submit-cdarrequest.ts +4 -0
  157. package/models/submit-cdarxmlrequest.ts +4 -0
  158. package/package.json +1 -1
  159. package/src/helpers/client.ts +24 -6
  160. package/src/helpers/exceptions.ts +9 -1
  161. package/dist/esm/models/facture-electronique-models-invoice-type-code.d.ts +0 -81
  162. package/dist/esm/models/facture-electronique-models-invoice-type-code.js +0 -82
  163. package/dist/models/facture-electronique-models-invoice-type-code.d.ts +0 -81
  164. package/dist/models/facture-electronique-models-invoice-type-code.js +0 -85
  165. package/docs/BodySubmitCdarApiV1CdarSubmitPost.md +0 -22
  166. package/docs/BodySubmitCdarXmlApiV1CdarSubmitXmlPost.md +0 -22
  167. package/docs/FactureElectroniqueModelsInvoiceTypeCode.md +0 -39
  168. package/models/facture-electronique-models-invoice-type-code.ts +0 -91
  169. /package/dist/esm/models/{body-submit-cdar-api-v1-cdar-submit-post.js → amount2.js} +0 -0
  170. /package/dist/esm/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.js → client-activate-response.js} +0 -0
  171. /package/dist/models/{body-submit-cdar-api-v1-cdar-submit-post.js → amount2.js} +0 -0
  172. /package/dist/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.js → client-activate-response.js} +0 -0
@@ -0,0 +1,54 @@
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
+ * Client list view.
19
+ */
20
+ export interface ClientSummary {
21
+ /**
22
+ * Unique client identifier
23
+ */
24
+ 'uid': string;
25
+ /**
26
+ * Client name
27
+ */
28
+ 'name': string;
29
+ 'siret'?: string | null;
30
+ 'description'?: string | null;
31
+ /**
32
+ * Whether the client is active
33
+ */
34
+ 'isActive': boolean;
35
+ /**
36
+ * Whether PDP config exists
37
+ */
38
+ 'hasConfigPdp': boolean;
39
+ 'pdpIsActive'?: boolean | null;
40
+ 'pdpIsMock'?: boolean | null;
41
+ /**
42
+ * Whether Chorus Pro config exists
43
+ */
44
+ 'hasConfigChorus': boolean;
45
+ /**
46
+ * Creation date
47
+ */
48
+ 'createdAt': string;
49
+ /**
50
+ * Last update date
51
+ */
52
+ 'updatedAt': string;
53
+ }
54
+
@@ -0,0 +1,25 @@
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
+ * Partial client update request.
19
+ */
20
+ export interface ClientUpdateRequest {
21
+ 'name'?: string | null;
22
+ 'description'?: string | null;
23
+ 'siret'?: string | null;
24
+ }
25
+
@@ -0,0 +1,47 @@
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 { Amount } from './amount';
19
+
20
+ /**
21
+ * Requête simplifiée pour soumettre un statut ENCAISSÉE (212). Statut obligatoire PPF - Le paiement a été effectué. Le montant encaissé est OBLIGATOIRE (BR-FR-CDV-14).
22
+ */
23
+ export interface EncaisseeRequest {
24
+ /**
25
+ * Identifiant de la facture (BT-1)
26
+ */
27
+ 'invoiceId': string;
28
+ /**
29
+ * Date d\'émission de la facture (YYYY-MM-DD)
30
+ */
31
+ 'invoiceIssueDate': string;
32
+ 'senderSiren'?: string | null;
33
+ /**
34
+ * Type de flux: SupplierInvoiceLC (acheteur) ou CustomerInvoiceLC (vendeur)
35
+ */
36
+ 'flowType'?: string;
37
+ 'pdpFlowServiceUrl'?: string | null;
38
+ 'pdpTokenUrl'?: string | null;
39
+ 'pdpClientId'?: string | null;
40
+ 'pdpClientSecret'?: string | null;
41
+ 'amount': Amount;
42
+ /**
43
+ * Code devise ISO 4217
44
+ */
45
+ 'currency'?: string;
46
+ }
47
+
@@ -13,15 +13,20 @@
13
13
  */
14
14
 
15
15
 
16
- // May contain unused imports in some cases
17
- // @ts-ignore
18
- import type { PDPCredentials } from './pdpcredentials';
19
- // May contain unused imports in some cases
20
- // @ts-ignore
21
- import type { SubmitCDARXMLRequest } from './submit-cdarxmlrequest';
22
-
23
- export interface BodySubmitCdarXmlApiV1CdarSubmitXmlPost {
24
- 'request': SubmitCDARXMLRequest;
25
- 'pdp_credentials'?: PDPCredentials | null;
26
- }
16
+
17
+ /**
18
+ * Invoice type codes (UNTDID 1001).
19
+ */
20
+
21
+ export const FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = {
22
+ _380: '380',
23
+ _381: '381',
24
+ _384: '384',
25
+ _389: '389',
26
+ _386: '386'
27
+ } as const;
28
+
29
+ export type FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = typeof FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode[keyof typeof FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode];
30
+
31
+
27
32
 
package/models/index.ts CHANGED
@@ -107,11 +107,10 @@ export * from './allowance-reason-code';
107
107
  export * from './allowance-total-amount';
108
108
  export * from './amount';
109
109
  export * from './amount1';
110
+ export * from './amount2';
110
111
  export * from './amount-due';
111
112
  export * from './async-task-status';
112
113
  export * from './base-amount';
113
- export * from './body-submit-cdar-api-v1-cdar-submit-post';
114
- export * from './body-submit-cdar-xml-api-v1-cdar-submit-xml-post';
115
114
  export * from './bounding-box-schema';
116
115
  export * from './buyercountry';
117
116
  export * from './celery-status';
@@ -120,6 +119,12 @@ export * from './charge-total-amount';
120
119
  export * from './chorus-pro-credentials';
121
120
  export * from './chorus-pro-destination';
122
121
  export * from './chorus-pro-result';
122
+ export * from './client-activate-response';
123
+ export * from './client-create-request';
124
+ export * from './client-detail';
125
+ export * from './client-list-response';
126
+ export * from './client-summary';
127
+ export * from './client-update-request';
123
128
  export * from './contact';
124
129
  export * from './convert-resume-request';
125
130
  export * from './convert-success-response';
@@ -139,14 +144,15 @@ export * from './ereporting-validation-error';
139
144
  export * from './electronic-address';
140
145
  export * from './encaisseamount';
141
146
  export * from './encaisseamount1';
147
+ export * from './encaissee-request';
142
148
  export * from './enriched-invoice-info';
143
149
  export * from './error-level';
144
150
  export * from './error-source';
145
151
  export * from './extraction-info';
146
152
  export * from './factur-xinvoice';
147
153
  export * from './factur-xpdfinfo';
148
- export * from './facture-electronique-models-invoice-type-code';
149
154
  export * from './facture-electronique-rest-api-schemas-cdar-validation-error-response';
155
+ export * from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
150
156
  export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
151
157
  export * from './field-status';
152
158
  export * from './file-info';
@@ -197,6 +203,8 @@ export * from './missing-field';
197
203
  export * from './operation-nature';
198
204
  export * from './output-format';
199
205
  export * from './pdfvalidation-result-api';
206
+ export * from './pdpconfig-response';
207
+ export * from './pdpconfig-update-request';
200
208
  export * from './pdpcredentials';
201
209
  export * from './page-dimensions-schema';
202
210
  export * from './payee';
@@ -218,6 +226,7 @@ export * from './reason-code-info';
218
226
  export * from './reason-codes-response';
219
227
  export * from './recipient';
220
228
  export * from './recipient-input';
229
+ export * from './refusee-request';
221
230
  export * from './report-period';
222
231
  export * from './report-sender';
223
232
  export * from './rounding-amount';
@@ -228,10 +237,12 @@ export * from './search-flow-response';
228
237
  export * from './search-services-response';
229
238
  export * from './search-structure-request';
230
239
  export * from './search-structure-response';
240
+ export * from './secret-status';
231
241
  export * from './sellercountry';
232
242
  export * from './signature-info';
233
243
  export * from './signature-info-api';
234
244
  export * from './signature-parameters';
245
+ export * from './simplified-cdarresponse';
235
246
  export * from './simplified-invoice-data';
236
247
  export * from './status-code-info';
237
248
  export * from './status-codes-response';
@@ -21,7 +21,7 @@ import type { Buyercountry } from './buyercountry';
21
21
  import type { Currency } from './currency';
22
22
  // May contain unused imports in some cases
23
23
  // @ts-ignore
24
- import type { InvoiceTypeCode } from './invoice-type-code';
24
+ import type { FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode } from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
25
25
  // May contain unused imports in some cases
26
26
  // @ts-ignore
27
27
  import type { Sellercountry } from './sellercountry';
@@ -50,7 +50,7 @@ export interface InvoiceInput {
50
50
  /**
51
51
  * Invoice type code
52
52
  */
53
- 'typeCode'?: InvoiceTypeCode;
53
+ 'typeCode'?: FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode;
54
54
  'currency'?: Currency;
55
55
  'dueDate'?: string | null;
56
56
  /**
@@ -15,15 +15,74 @@
15
15
 
16
16
 
17
17
  /**
18
- * Invoice type codes (UNTDID 1001).
18
+ * Document type according to BR-FR-04 (UNTDID 1001 codes). | Code | Name | Description | |------|------|-------------| | 380 | INVOICE | Commercial invoice | | 389 | SELF_BILLED_INVOICE | Self-billed invoice | | 393 | FACTORED_INVOICE | Factored invoice | | 501 | SELF_BILLED_FACTORED_INVOICE | Self-billed factored invoice | | 386 | PREPAYMENT_INVOICE | Prepayment invoice | | 500 | SELF_BILLED_PREPAYMENT_INVOICE | Self-billed prepayment invoice | | 384 | CORRECTIVE_INVOICE | Corrective invoice | | 471 | SELF_BILLED_CORRECTIVE_INVOICE | Self-billed corrective invoice | | 472 | FACTORED_CORRECTIVE_INVOICE | Factored corrective invoice | | 473 | SELF_BILLED_FACTORED_CORRECTIVE_INVOICE | Self-billed factored corrective invoice | | 381 | CREDIT_NOTE | Credit note | | 261 | SELF_BILLED_CREDIT_NOTE | Self-billed credit note | | 262 | GLOBAL_ALLOWANCE_CREDIT_NOTE | Credit note for global allowance | | 396 | FACTORED_CREDIT_NOTE | Factored credit note | | 502 | SELF_BILLED_FACTORED_CREDIT_NOTE | Self-billed factored credit note | | 503 | PREPAYMENT_CREDIT_NOTE | Credit note for prepayment invoice |
19
19
  */
20
20
 
21
21
  export const InvoiceTypeCode = {
22
- _380: '380',
23
- _381: '381',
24
- _384: '384',
25
- _389: '389',
26
- _386: '386'
22
+ /**
23
+ * Commercial Invoice
24
+ */
25
+ INVOICE: '380',
26
+ /**
27
+ * Self-billed Invoice
28
+ */
29
+ SELF_BILLED_INVOICE: '389',
30
+ /**
31
+ * Factored Invoice
32
+ */
33
+ FACTORED_INVOICE: '393',
34
+ /**
35
+ * Self-billed Factored Invoice
36
+ */
37
+ SELF_BILLED_FACTORED_INVOICE: '501',
38
+ /**
39
+ * Prepayment Invoice
40
+ */
41
+ PREPAYMENT_INVOICE: '386',
42
+ /**
43
+ * Self-billed Prepayment Invoice
44
+ */
45
+ SELF_BILLED_PREPAYMENT_INVOICE: '500',
46
+ /**
47
+ * Corrective Invoice
48
+ */
49
+ CORRECTIVE_INVOICE: '384',
50
+ /**
51
+ * Self-billed Corrective Invoice
52
+ */
53
+ SELF_BILLED_CORRECTIVE_INVOICE: '471',
54
+ /**
55
+ * Factored Corrective Invoice
56
+ */
57
+ FACTORED_CORRECTIVE_INVOICE: '472',
58
+ /**
59
+ * Self-billed Factored Corrective Invoice
60
+ */
61
+ SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: '473',
62
+ /**
63
+ * Credit Note
64
+ */
65
+ CREDIT_NOTE: '381',
66
+ /**
67
+ * Self-billed Credit Note
68
+ */
69
+ SELF_BILLED_CREDIT_NOTE: '261',
70
+ /**
71
+ * Global Allowance Credit Note
72
+ */
73
+ GLOBAL_ALLOWANCE_CREDIT_NOTE: '262',
74
+ /**
75
+ * Factored Credit Note
76
+ */
77
+ FACTORED_CREDIT_NOTE: '396',
78
+ /**
79
+ * Self-billed Factored Credit Note
80
+ */
81
+ SELF_BILLED_FACTORED_CREDIT_NOTE: '502',
82
+ /**
83
+ * Prepayment Credit Note
84
+ */
85
+ PREPAYMENT_CREDIT_NOTE: '503'
27
86
  } as const;
28
87
 
29
88
  export type InvoiceTypeCode = typeof InvoiceTypeCode[keyof typeof InvoiceTypeCode];
@@ -15,7 +15,7 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { Amount } from './amount';
18
+ import type { Amount1 } from './amount1';
19
19
  // May contain unused imports in some cases
20
20
  // @ts-ignore
21
21
  import type { Rate } from './rate';
@@ -25,6 +25,6 @@ import type { Rate } from './rate';
25
25
  */
26
26
  export interface PaymentAmountByRate {
27
27
  'rate': Rate;
28
- 'amount': Amount;
28
+ 'amount': Amount1;
29
29
  }
30
30
 
@@ -0,0 +1,42 @@
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 { SecretStatus } from './secret-status';
19
+
20
+ /**
21
+ * PDP configuration (secrets masked).
22
+ */
23
+ export interface PDPConfigResponse {
24
+ /**
25
+ * Whether PDP config exists
26
+ */
27
+ 'isConfigured': boolean;
28
+ 'id'?: number | null;
29
+ 'isActive'?: boolean | null;
30
+ 'modeSandbox'?: boolean | null;
31
+ 'flowServiceUrl'?: string | null;
32
+ 'tokenUrl'?: string | null;
33
+ 'oauthClientId'?: string | null;
34
+ 'secretStatus'?: SecretStatus | null;
35
+ 'lastTestAt'?: string | null;
36
+ 'lastTestSuccess'?: boolean | null;
37
+ 'lastTestError'?: string | null;
38
+ 'createdAt'?: string | null;
39
+ 'updatedAt'?: string | null;
40
+ 'message'?: string | null;
41
+ }
42
+
@@ -0,0 +1,46 @@
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
+ * PDP configuration update request.
19
+ */
20
+ export interface PDPConfigUpdateRequest {
21
+ /**
22
+ * Whether config is active
23
+ */
24
+ 'isActive'?: boolean;
25
+ /**
26
+ * Sandbox mode
27
+ */
28
+ 'modeSandbox'?: boolean;
29
+ /**
30
+ * PDP Flow Service URL
31
+ */
32
+ 'flowServiceUrl': string;
33
+ /**
34
+ * PDP OAuth token URL
35
+ */
36
+ 'tokenUrl': string;
37
+ /**
38
+ * OAuth Client ID
39
+ */
40
+ 'oauthClientId': string;
41
+ /**
42
+ * OAuth Client Secret (sent but never returned)
43
+ */
44
+ 'clientSecret': string;
45
+ }
46
+
@@ -0,0 +1,44 @@
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 simplifiée pour soumettre un statut REFUSÉE (210). Statut obligatoire PPF - Le destinataire refuse la facture. Un code motif est OBLIGATOIRE (BR-FR-CDV-15). Codes motif autorisés (BR-FR-CDV-CL-09_MDT-113_210): - TX_TVA_ERR: Taux de TVA erroné - MONTANTTOTAL_ERR: Montant total erroné - CALCUL_ERR: Erreur de calcul - NON_CONFORME: Non conforme - DOUBLON: Doublon - DEST_ERR: Destinataire erroné - TRANSAC_INC: Transaction incomplète - EMMET_INC: Émetteur inconnu - CONTRAT_TERM: Contrat terminé - DOUBLE_FACT: Double facturation - CMD_ERR: Commande erronée - ADR_ERR: Adresse erronée - REF_CT_ABSENT: Référence contrat absente
19
+ */
20
+ export interface RefuseeRequest {
21
+ /**
22
+ * Identifiant de la facture (BT-1)
23
+ */
24
+ 'invoiceId': string;
25
+ /**
26
+ * Date d\'émission de la facture (YYYY-MM-DD)
27
+ */
28
+ 'invoiceIssueDate': string;
29
+ 'senderSiren'?: string | null;
30
+ /**
31
+ * Type de flux: SupplierInvoiceLC (acheteur) ou CustomerInvoiceLC (vendeur)
32
+ */
33
+ 'flowType'?: string;
34
+ 'pdpFlowServiceUrl'?: string | null;
35
+ 'pdpTokenUrl'?: string | null;
36
+ 'pdpClientId'?: string | null;
37
+ 'pdpClientSecret'?: string | null;
38
+ /**
39
+ * Code motif du refus (obligatoire). Valeurs autorisées: TX_TVA_ERR, MONTANTTOTAL_ERR, CALCUL_ERR, NON_CONFORME, DOUBLON, DEST_ERR, TRANSAC_INC, EMMET_INC, CONTRAT_TERM, DOUBLE_FACT, CMD_ERR, ADR_ERR, REF_CT_ABSENT
40
+ */
41
+ 'reasonCode': string;
42
+ 'reasonText'?: string | null;
43
+ }
44
+
@@ -0,0 +1,30 @@
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
+ * Secret status (never exposes the secret itself).
19
+ */
20
+ export interface SecretStatus {
21
+ /**
22
+ * Secret status: \'active\', \'missing\', etc.
23
+ */
24
+ 'status': string;
25
+ /**
26
+ * Descriptive status message
27
+ */
28
+ 'message': string;
29
+ }
30
+
@@ -0,0 +1,42 @@
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 pour les endpoints CDAR simplifiés.
19
+ */
20
+ export interface SimplifiedCDARResponse {
21
+ /**
22
+ * Identifiant du flux AFNOR
23
+ */
24
+ 'flowId': string;
25
+ /**
26
+ * Identifiant du message CDAR généré
27
+ */
28
+ 'documentId': string;
29
+ /**
30
+ * Code statut soumis (210 ou 212)
31
+ */
32
+ 'status': string;
33
+ /**
34
+ * Identifiant de la facture
35
+ */
36
+ 'invoiceId': string;
37
+ /**
38
+ * Message de confirmation
39
+ */
40
+ 'message': string;
41
+ }
42
+
@@ -15,7 +15,7 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { FactureElectroniqueModelsInvoiceTypeCode } from './facture-electronique-models-invoice-type-code';
18
+ import type { InvoiceTypeCode } from './invoice-type-code';
19
19
  // May contain unused imports in some cases
20
20
  // @ts-ignore
21
21
  import type { InvoicingFrameworkCode } from './invoicing-framework-code';
@@ -54,7 +54,7 @@ export interface SimplifiedInvoiceData {
54
54
  /**
55
55
  * Document type (UNTDID 1001). Default: 380 (Invoice).
56
56
  */
57
- 'invoiceType'?: FactureElectroniqueModelsInvoiceTypeCode;
57
+ 'invoiceType'?: InvoiceTypeCode;
58
58
  'precedingInvoiceReference'?: string | null;
59
59
  'operationNature'?: OperationNature | null;
60
60
  'invoicingFramework'?: InvoicingFrameworkCode | null;