@factpulse/sdk 3.0.14 → 3.0.16
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.
- package/.openapi-generator/FILES +4 -0
- package/CHANGELOG.md +3 -3
- package/README.md +19 -17
- package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts +36 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js +14 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-ereporting-validation-error.d.ts +25 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-ereporting-validation-error.js +14 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/validate-ereporting-response.d.ts +3 -3
- package/dist/esm/models/validation-info.d.ts +2 -2
- package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts +36 -0
- package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js +15 -0
- package/dist/models/facture-electronique-rest-api-schemas-ereporting-validation-error.d.ts +25 -0
- package/dist/models/facture-electronique-rest-api-schemas-ereporting-validation-error.js +15 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/validate-ereporting-response.d.ts +3 -3
- package/dist/models/validation-info.d.ts +2 -2
- package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +29 -0
- package/docs/FactureElectroniqueRestApiSchemasEreportingValidationError.md +25 -0
- package/docs/ValidateEReportingResponse.md +2 -2
- package/docs/ValidationInfo.md +1 -1
- package/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts +42 -0
- package/models/facture-electronique-rest-api-schemas-ereporting-validation-error.ts +31 -0
- package/models/index.ts +2 -0
- package/models/validate-ereporting-response.ts +3 -3
- package/models/validation-info.ts +2 -2
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -166,7 +166,9 @@ docs/ExtractionInfo.md
|
|
|
166
166
|
docs/FacturXInvoice.md
|
|
167
167
|
docs/FacturXPDFInfo.md
|
|
168
168
|
docs/FactureElectroniqueModelsInvoiceTypeCode.md
|
|
169
|
+
docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md
|
|
169
170
|
docs/FactureElectroniqueRestApiSchemasConvertValidationError.md
|
|
171
|
+
docs/FactureElectroniqueRestApiSchemasEreportingValidationError.md
|
|
170
172
|
docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md
|
|
171
173
|
docs/FieldStatus.md
|
|
172
174
|
docs/FileInfo.md
|
|
@@ -449,7 +451,9 @@ models/extraction-info.ts
|
|
|
449
451
|
models/factur-xinvoice.ts
|
|
450
452
|
models/factur-xpdfinfo.ts
|
|
451
453
|
models/facture-electronique-models-invoice-type-code.ts
|
|
454
|
+
models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts
|
|
452
455
|
models/facture-electronique-rest-api-schemas-convert-validation-error.ts
|
|
456
|
+
models/facture-electronique-rest-api-schemas-ereporting-validation-error.ts
|
|
453
457
|
models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts
|
|
454
458
|
models/field-status.ts
|
|
455
459
|
models/file-info.ts
|
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,7 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [3.0.
|
|
10
|
+
## [3.0.16] - 2026-01-14
|
|
11
11
|
|
|
12
12
|
### Added
|
|
13
13
|
- Version initiale du SDK typescript
|
|
@@ -24,5 +24,5 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
24
24
|
- Guide d'authentification JWT
|
|
25
25
|
- Configuration avancée (timeout, proxy, debug)
|
|
26
26
|
|
|
27
|
-
[Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v3.0.
|
|
28
|
-
[3.0.
|
|
27
|
+
[Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v3.0.16...HEAD
|
|
28
|
+
[3.0.16]: https://github.com/factpulse/sdk-typescript/releases/tag/v3.0.16
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ The `helpers` module provides a simplified API with automatic authentication and
|
|
|
26
26
|
import {
|
|
27
27
|
FactPulseClient,
|
|
28
28
|
amount,
|
|
29
|
-
|
|
29
|
+
invoiceTotals,
|
|
30
30
|
invoiceLine,
|
|
31
31
|
vatLine,
|
|
32
32
|
supplier,
|
|
@@ -42,8 +42,10 @@ const client = new FactPulseClient({
|
|
|
42
42
|
|
|
43
43
|
// Build the invoice with helpers
|
|
44
44
|
const invoiceData = {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
invoiceNumber: 'INV-2025-001',
|
|
46
|
+
issueDate: '2025-01-15',
|
|
47
|
+
dueDate: '2025-02-15',
|
|
48
|
+
currencyCode: 'EUR',
|
|
47
49
|
supplier: supplier(
|
|
48
50
|
'My Company SAS',
|
|
49
51
|
'12345678901234',
|
|
@@ -58,7 +60,7 @@ const invoiceData = {
|
|
|
58
60
|
'69001',
|
|
59
61
|
'Lyon'
|
|
60
62
|
),
|
|
61
|
-
|
|
63
|
+
totals: invoiceTotals(1000.00, 200.00, 1200.00, 1200.00),
|
|
62
64
|
lines: [
|
|
63
65
|
invoiceLine(1, 'Consulting services', 10, 100.00, 1000.00)
|
|
64
66
|
],
|
|
@@ -91,21 +93,21 @@ amount("1234.56"); // "1234.56"
|
|
|
91
93
|
amount(null); // "0.00"
|
|
92
94
|
```
|
|
93
95
|
|
|
94
|
-
###
|
|
96
|
+
### invoiceTotals(exclTax, vat, inclTax, amountDue, options?)
|
|
95
97
|
|
|
96
|
-
Creates a complete
|
|
98
|
+
Creates a complete invoice totals object.
|
|
97
99
|
|
|
98
100
|
```typescript
|
|
99
|
-
import {
|
|
101
|
+
import { invoiceTotals } from '@factpulse/sdk/helpers';
|
|
100
102
|
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
prepayment: 100.00,
|
|
103
|
+
const totals = invoiceTotals(1000.00, 200.00, 1200.00, 1200.00, {
|
|
104
|
+
globalAllowanceAmount: 50.00, // Optional
|
|
105
|
+
globalAllowanceReason: 'Loyalty', // Optional
|
|
106
|
+
prepayment: 100.00, // Optional
|
|
105
107
|
});
|
|
106
108
|
```
|
|
107
109
|
|
|
108
|
-
### invoiceLine(
|
|
110
|
+
### invoiceLine(lineNumber, itemName, quantity, unitNetPrice, lineNetAmount, options?)
|
|
109
111
|
|
|
110
112
|
Creates an invoice line.
|
|
111
113
|
|
|
@@ -117,17 +119,17 @@ const line = invoiceLine(
|
|
|
117
119
|
'Consulting services',
|
|
118
120
|
5,
|
|
119
121
|
200.00,
|
|
120
|
-
1000.00,
|
|
122
|
+
1000.00,
|
|
121
123
|
{
|
|
122
|
-
vatRate: '
|
|
124
|
+
vatRate: 'TVA20', // Or manualVatRate: '20.00'
|
|
123
125
|
vatCategory: 'S', // S, Z, E, AE, K
|
|
124
|
-
unit: 'HOUR', //
|
|
126
|
+
unit: 'HOUR', // LUMP_SUM, PIECE, HOUR, DAY...
|
|
125
127
|
reference: 'REF-001', // Optional
|
|
126
128
|
}
|
|
127
129
|
);
|
|
128
130
|
```
|
|
129
131
|
|
|
130
|
-
### vatLine(
|
|
132
|
+
### vatLine(taxableAmount, vatAmount, options?)
|
|
131
133
|
|
|
132
134
|
Creates a VAT breakdown line.
|
|
133
135
|
|
|
@@ -135,7 +137,7 @@ Creates a VAT breakdown line.
|
|
|
135
137
|
import { vatLine } from '@factpulse/sdk/helpers';
|
|
136
138
|
|
|
137
139
|
const vat = vatLine(1000.00, 200.00, {
|
|
138
|
-
rate: '
|
|
140
|
+
rate: 'TVA20', // Or manualRate: '20.00'
|
|
139
141
|
category: 'S', // S, Z, E, AE, K
|
|
140
142
|
});
|
|
141
143
|
```
|
package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FactPulse REST API
|
|
3
|
+
* 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/
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@factpulse.fr
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
|
|
14
|
+
*/
|
|
15
|
+
export interface FactureElectroniqueRestApiSchemasChorusProChorusProCredentials {
|
|
16
|
+
/**
|
|
17
|
+
* PISTE Client ID (government API portal)
|
|
18
|
+
*/
|
|
19
|
+
'pisteClientId': string;
|
|
20
|
+
/**
|
|
21
|
+
* PISTE Client Secret
|
|
22
|
+
*/
|
|
23
|
+
'pisteClientSecret': string;
|
|
24
|
+
/**
|
|
25
|
+
* Chorus Pro login
|
|
26
|
+
*/
|
|
27
|
+
'chorusProLogin': string;
|
|
28
|
+
/**
|
|
29
|
+
* Chorus Pro password
|
|
30
|
+
*/
|
|
31
|
+
'chorusProPassword': string;
|
|
32
|
+
/**
|
|
33
|
+
* Use sandbox environment (true) or production (false)
|
|
34
|
+
*/
|
|
35
|
+
'sandbox'?: boolean;
|
|
36
|
+
}
|
package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
export {};
|
package/dist/esm/models/facture-electronique-rest-api-schemas-ereporting-validation-error.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FactPulse REST API
|
|
3
|
+
* 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/
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@factpulse.fr
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Validation error detail.
|
|
14
|
+
*/
|
|
15
|
+
export interface FactureElectroniqueRestApiSchemasEreportingValidationError {
|
|
16
|
+
/**
|
|
17
|
+
* Field path with error
|
|
18
|
+
*/
|
|
19
|
+
'field': string;
|
|
20
|
+
/**
|
|
21
|
+
* Error message
|
|
22
|
+
*/
|
|
23
|
+
'message': string;
|
|
24
|
+
'code'?: string | null;
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
export {};
|
|
@@ -140,7 +140,9 @@ export * from './extraction-info';
|
|
|
140
140
|
export * from './factur-xinvoice';
|
|
141
141
|
export * from './factur-xpdfinfo';
|
|
142
142
|
export * from './facture-electronique-models-invoice-type-code';
|
|
143
|
+
export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
|
|
143
144
|
export * from './facture-electronique-rest-api-schemas-convert-validation-error';
|
|
145
|
+
export * from './facture-electronique-rest-api-schemas-ereporting-validation-error';
|
|
144
146
|
export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
|
|
145
147
|
export * from './field-status';
|
|
146
148
|
export * from './file-info';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -140,7 +140,9 @@ export * from './extraction-info';
|
|
|
140
140
|
export * from './factur-xinvoice';
|
|
141
141
|
export * from './factur-xpdfinfo';
|
|
142
142
|
export * from './facture-electronique-models-invoice-type-code';
|
|
143
|
+
export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
|
|
143
144
|
export * from './facture-electronique-rest-api-schemas-convert-validation-error';
|
|
145
|
+
export * from './facture-electronique-rest-api-schemas-ereporting-validation-error';
|
|
144
146
|
export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
|
|
145
147
|
export * from './field-status';
|
|
146
148
|
export * from './file-info';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { FactureElectroniqueRestApiSchemasEreportingValidationError } from './facture-electronique-rest-api-schemas-ereporting-validation-error';
|
|
13
13
|
/**
|
|
14
14
|
* Response after validating e-reporting data.
|
|
15
15
|
*/
|
|
@@ -29,11 +29,11 @@ export interface ValidateEReportingResponse {
|
|
|
29
29
|
/**
|
|
30
30
|
* List of validation errors (if any)
|
|
31
31
|
*/
|
|
32
|
-
'errors'?: Array<
|
|
32
|
+
'errors'?: Array<FactureElectroniqueRestApiSchemasEreportingValidationError>;
|
|
33
33
|
/**
|
|
34
34
|
* List of validation warnings (if any)
|
|
35
35
|
*/
|
|
36
|
-
'warnings'?: Array<
|
|
36
|
+
'warnings'?: Array<FactureElectroniqueRestApiSchemasEreportingValidationError>;
|
|
37
37
|
/**
|
|
38
38
|
* Status message
|
|
39
39
|
*/
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { ValidationError } from './validation-error';
|
|
13
13
|
/**
|
|
14
14
|
* Informations sur la validation.
|
|
15
15
|
*/
|
|
@@ -34,5 +34,5 @@ export interface ValidationInfo {
|
|
|
34
34
|
* XML embarque dans PDF
|
|
35
35
|
*/
|
|
36
36
|
'xml_embedded'?: boolean;
|
|
37
|
-
'errors'?: Array<
|
|
37
|
+
'errors'?: Array<ValidationError>;
|
|
38
38
|
}
|
package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FactPulse REST API
|
|
3
|
+
* 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/
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@factpulse.fr
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
|
|
14
|
+
*/
|
|
15
|
+
export interface FactureElectroniqueRestApiSchemasChorusProChorusProCredentials {
|
|
16
|
+
/**
|
|
17
|
+
* PISTE Client ID (government API portal)
|
|
18
|
+
*/
|
|
19
|
+
'pisteClientId': string;
|
|
20
|
+
/**
|
|
21
|
+
* PISTE Client Secret
|
|
22
|
+
*/
|
|
23
|
+
'pisteClientSecret': string;
|
|
24
|
+
/**
|
|
25
|
+
* Chorus Pro login
|
|
26
|
+
*/
|
|
27
|
+
'chorusProLogin': string;
|
|
28
|
+
/**
|
|
29
|
+
* Chorus Pro password
|
|
30
|
+
*/
|
|
31
|
+
'chorusProPassword': string;
|
|
32
|
+
/**
|
|
33
|
+
* Use sandbox environment (true) or production (false)
|
|
34
|
+
*/
|
|
35
|
+
'sandbox'?: boolean;
|
|
36
|
+
}
|
package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* FactPulse REST API
|
|
6
|
+
* 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/
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: contact@factpulse.fr
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FactPulse REST API
|
|
3
|
+
* 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/
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@factpulse.fr
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Validation error detail.
|
|
14
|
+
*/
|
|
15
|
+
export interface FactureElectroniqueRestApiSchemasEreportingValidationError {
|
|
16
|
+
/**
|
|
17
|
+
* Field path with error
|
|
18
|
+
*/
|
|
19
|
+
'field': string;
|
|
20
|
+
/**
|
|
21
|
+
* Error message
|
|
22
|
+
*/
|
|
23
|
+
'message': string;
|
|
24
|
+
'code'?: string | null;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* FactPulse REST API
|
|
6
|
+
* 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/
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: contact@factpulse.fr
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/models/index.d.ts
CHANGED
|
@@ -140,7 +140,9 @@ export * from './extraction-info';
|
|
|
140
140
|
export * from './factur-xinvoice';
|
|
141
141
|
export * from './factur-xpdfinfo';
|
|
142
142
|
export * from './facture-electronique-models-invoice-type-code';
|
|
143
|
+
export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
|
|
143
144
|
export * from './facture-electronique-rest-api-schemas-convert-validation-error';
|
|
145
|
+
export * from './facture-electronique-rest-api-schemas-ereporting-validation-error';
|
|
144
146
|
export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
|
|
145
147
|
export * from './field-status';
|
|
146
148
|
export * from './file-info';
|
package/dist/models/index.js
CHANGED
|
@@ -156,7 +156,9 @@ __exportStar(require("./extraction-info"), exports);
|
|
|
156
156
|
__exportStar(require("./factur-xinvoice"), exports);
|
|
157
157
|
__exportStar(require("./factur-xpdfinfo"), exports);
|
|
158
158
|
__exportStar(require("./facture-electronique-models-invoice-type-code"), exports);
|
|
159
|
+
__exportStar(require("./facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials"), exports);
|
|
159
160
|
__exportStar(require("./facture-electronique-rest-api-schemas-convert-validation-error"), exports);
|
|
161
|
+
__exportStar(require("./facture-electronique-rest-api-schemas-ereporting-validation-error"), exports);
|
|
160
162
|
__exportStar(require("./facture-electronique-rest-api-schemas-processing-chorus-pro-credentials"), exports);
|
|
161
163
|
__exportStar(require("./field-status"), exports);
|
|
162
164
|
__exportStar(require("./file-info"), exports);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { FactureElectroniqueRestApiSchemasEreportingValidationError } from './facture-electronique-rest-api-schemas-ereporting-validation-error';
|
|
13
13
|
/**
|
|
14
14
|
* Response after validating e-reporting data.
|
|
15
15
|
*/
|
|
@@ -29,11 +29,11 @@ export interface ValidateEReportingResponse {
|
|
|
29
29
|
/**
|
|
30
30
|
* List of validation errors (if any)
|
|
31
31
|
*/
|
|
32
|
-
'errors'?: Array<
|
|
32
|
+
'errors'?: Array<FactureElectroniqueRestApiSchemasEreportingValidationError>;
|
|
33
33
|
/**
|
|
34
34
|
* List of validation warnings (if any)
|
|
35
35
|
*/
|
|
36
|
-
'warnings'?: Array<
|
|
36
|
+
'warnings'?: Array<FactureElectroniqueRestApiSchemasEreportingValidationError>;
|
|
37
37
|
/**
|
|
38
38
|
* Status message
|
|
39
39
|
*/
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { ValidationError } from './validation-error';
|
|
13
13
|
/**
|
|
14
14
|
* Informations sur la validation.
|
|
15
15
|
*/
|
|
@@ -34,5 +34,5 @@ export interface ValidationInfo {
|
|
|
34
34
|
* XML embarque dans PDF
|
|
35
35
|
*/
|
|
36
36
|
'xml_embedded'?: boolean;
|
|
37
|
-
'errors'?: Array<
|
|
37
|
+
'errors'?: Array<ValidationError>;
|
|
38
38
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# FactureElectroniqueRestApiSchemasChorusProChorusProCredentials
|
|
2
|
+
|
|
3
|
+
Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**pisteClientId** | **string** | PISTE Client ID (government API portal) | [default to undefined]
|
|
10
|
+
**pisteClientSecret** | **string** | PISTE Client Secret | [default to undefined]
|
|
11
|
+
**chorusProLogin** | **string** | Chorus Pro login | [default to undefined]
|
|
12
|
+
**chorusProPassword** | **string** | Chorus Pro password | [default to undefined]
|
|
13
|
+
**sandbox** | **boolean** | Use sandbox environment (true) or production (false) | [optional] [default to true]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from '@factpulse/sdk';
|
|
19
|
+
|
|
20
|
+
const instance: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials = {
|
|
21
|
+
pisteClientId,
|
|
22
|
+
pisteClientSecret,
|
|
23
|
+
chorusProLogin,
|
|
24
|
+
chorusProPassword,
|
|
25
|
+
sandbox,
|
|
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)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# FactureElectroniqueRestApiSchemasEreportingValidationError
|
|
2
|
+
|
|
3
|
+
Validation error detail.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**field** | **string** | Field path with error | [default to undefined]
|
|
10
|
+
**message** | **string** | Error message | [default to undefined]
|
|
11
|
+
**code** | **string** | | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { FactureElectroniqueRestApiSchemasEreportingValidationError } from '@factpulse/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: FactureElectroniqueRestApiSchemasEreportingValidationError = {
|
|
19
|
+
field,
|
|
20
|
+
message,
|
|
21
|
+
code,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -9,8 +9,8 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**valid** | **boolean** | Whether the data is valid | [default to undefined]
|
|
10
10
|
**reportId** | **string** | Report identifier | [default to undefined]
|
|
11
11
|
**flowType** | **string** | Flux type | [default to undefined]
|
|
12
|
-
**errors** | [**Array<
|
|
13
|
-
**warnings** | [**Array<
|
|
12
|
+
**errors** | [**Array<FactureElectroniqueRestApiSchemasEreportingValidationError>**](FactureElectroniqueRestApiSchemasEreportingValidationError.md) | List of validation errors (if any) | [optional] [default to undefined]
|
|
13
|
+
**warnings** | [**Array<FactureElectroniqueRestApiSchemasEreportingValidationError>**](FactureElectroniqueRestApiSchemasEreportingValidationError.md) | List of validation warnings (if any) | [optional] [default to undefined]
|
|
14
14
|
**message** | **string** | Status message | [default to undefined]
|
|
15
15
|
|
|
16
16
|
## Example
|
package/docs/ValidationInfo.md
CHANGED
|
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
|
|
11
11
|
**schematron_rules_total** | **number** | Total regles | [default to undefined]
|
|
12
12
|
**pdfa_compliant** | **boolean** | PDF/A-3 conforme | [optional] [default to true]
|
|
13
13
|
**xml_embedded** | **boolean** | XML embarque dans PDF | [optional] [default to true]
|
|
14
|
-
**errors** | [**Array<
|
|
14
|
+
**errors** | [**Array<ValidationError>**](ValidationError.md) | | [optional] [default to undefined]
|
|
15
15
|
|
|
16
16
|
## Example
|
|
17
17
|
|
|
@@ -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
|
+
* Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
|
|
19
|
+
*/
|
|
20
|
+
export interface FactureElectroniqueRestApiSchemasChorusProChorusProCredentials {
|
|
21
|
+
/**
|
|
22
|
+
* PISTE Client ID (government API portal)
|
|
23
|
+
*/
|
|
24
|
+
'pisteClientId': string;
|
|
25
|
+
/**
|
|
26
|
+
* PISTE Client Secret
|
|
27
|
+
*/
|
|
28
|
+
'pisteClientSecret': string;
|
|
29
|
+
/**
|
|
30
|
+
* Chorus Pro login
|
|
31
|
+
*/
|
|
32
|
+
'chorusProLogin': string;
|
|
33
|
+
/**
|
|
34
|
+
* Chorus Pro password
|
|
35
|
+
*/
|
|
36
|
+
'chorusProPassword': string;
|
|
37
|
+
/**
|
|
38
|
+
* Use sandbox environment (true) or production (false)
|
|
39
|
+
*/
|
|
40
|
+
'sandbox'?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
@@ -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
|
+
* Validation error detail.
|
|
19
|
+
*/
|
|
20
|
+
export interface FactureElectroniqueRestApiSchemasEreportingValidationError {
|
|
21
|
+
/**
|
|
22
|
+
* Field path with error
|
|
23
|
+
*/
|
|
24
|
+
'field': string;
|
|
25
|
+
/**
|
|
26
|
+
* Error message
|
|
27
|
+
*/
|
|
28
|
+
'message': string;
|
|
29
|
+
'code'?: string | null;
|
|
30
|
+
}
|
|
31
|
+
|
package/models/index.ts
CHANGED
|
@@ -140,7 +140,9 @@ export * from './extraction-info';
|
|
|
140
140
|
export * from './factur-xinvoice';
|
|
141
141
|
export * from './factur-xpdfinfo';
|
|
142
142
|
export * from './facture-electronique-models-invoice-type-code';
|
|
143
|
+
export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
|
|
143
144
|
export * from './facture-electronique-rest-api-schemas-convert-validation-error';
|
|
145
|
+
export * from './facture-electronique-rest-api-schemas-ereporting-validation-error';
|
|
144
146
|
export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
|
|
145
147
|
export * from './field-status';
|
|
146
148
|
export * from './file-info';
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
// May contain unused imports in some cases
|
|
17
17
|
// @ts-ignore
|
|
18
|
-
import type {
|
|
18
|
+
import type { FactureElectroniqueRestApiSchemasEreportingValidationError } from './facture-electronique-rest-api-schemas-ereporting-validation-error';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Response after validating e-reporting data.
|
|
@@ -36,11 +36,11 @@ export interface ValidateEReportingResponse {
|
|
|
36
36
|
/**
|
|
37
37
|
* List of validation errors (if any)
|
|
38
38
|
*/
|
|
39
|
-
'errors'?: Array<
|
|
39
|
+
'errors'?: Array<FactureElectroniqueRestApiSchemasEreportingValidationError>;
|
|
40
40
|
/**
|
|
41
41
|
* List of validation warnings (if any)
|
|
42
42
|
*/
|
|
43
|
-
'warnings'?: Array<
|
|
43
|
+
'warnings'?: Array<FactureElectroniqueRestApiSchemasEreportingValidationError>;
|
|
44
44
|
/**
|
|
45
45
|
* Status message
|
|
46
46
|
*/
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
// May contain unused imports in some cases
|
|
17
17
|
// @ts-ignore
|
|
18
|
-
import type {
|
|
18
|
+
import type { ValidationError } from './validation-error';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Informations sur la validation.
|
|
@@ -41,6 +41,6 @@ export interface ValidationInfo {
|
|
|
41
41
|
* XML embarque dans PDF
|
|
42
42
|
*/
|
|
43
43
|
'xml_embedded'?: boolean;
|
|
44
|
-
'errors'?: Array<
|
|
44
|
+
'errors'?: Array<ValidationError>;
|
|
45
45
|
}
|
|
46
46
|
|