@factpulse/sdk 3.0.34 → 3.0.35
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 -4
- package/CHANGELOG.md +12 -5
- package/api/invoice-processing-api.ts +2 -2
- package/dist/esm/models/{facture-electronique-rest-api-schemas-cdar-validation-error-response.d.ts → facture-electronique-models-invoice-type-code.d.ts} +65 -13
- package/dist/{models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js → esm/models/facture-electronique-models-invoice-type-code.js} +66 -10
- package/dist/esm/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js → facture-electronique-rest-api-schemas-validation-validation-error-response.d.ts} +7 -10
- package/dist/esm/models/index.d.ts +2 -2
- package/dist/esm/models/index.js +2 -2
- package/dist/esm/models/invoice-input.d.ts +2 -2
- package/dist/esm/models/invoice-type-code.d.ts +6 -65
- package/dist/esm/models/invoice-type-code.js +6 -65
- package/dist/esm/models/simplified-invoice-data.d.ts +2 -2
- package/dist/esm/models/validate-cdarresponse.d.ts +3 -3
- package/dist/esm/models/validation-error-response.d.ts +12 -3
- package/dist/esm/src/helpers/client.js +1 -1
- package/dist/{esm/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts → models/facture-electronique-models-invoice-type-code.d.ts} +67 -8
- package/dist/models/facture-electronique-models-invoice-type-code.js +85 -0
- package/dist/models/{facture-electronique-rest-api-schemas-cdar-validation-error-response.d.ts → facture-electronique-rest-api-schemas-validation-validation-error-response.d.ts} +4 -13
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +2 -2
- package/dist/models/invoice-input.d.ts +2 -2
- package/dist/models/invoice-type-code.d.ts +6 -65
- package/dist/models/invoice-type-code.js +6 -65
- package/dist/models/simplified-invoice-data.d.ts +2 -2
- package/dist/models/validate-cdarresponse.d.ts +3 -3
- package/dist/models/validation-error-response.d.ts +12 -3
- package/dist/src/helpers/client.js +1 -1
- package/docs/FactureElectroniqueModelsInvoiceTypeCode.md +39 -0
- package/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +21 -0
- package/docs/InvoiceInput.md +1 -1
- package/docs/InvoiceTypeCode.md +6 -28
- package/docs/SimplifiedInvoiceData.md +1 -1
- package/docs/ValidateCDARResponse.md +2 -2
- package/docs/ValidationErrorResponse.md +9 -3
- package/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.ts → facture-electronique-models-invoice-type-code.ts} +67 -8
- package/models/{facture-electronique-rest-api-schemas-cdar-validation-error-response.ts → facture-electronique-rest-api-schemas-validation-validation-error-response.ts} +4 -13
- package/models/index.ts +2 -2
- package/models/invoice-input.ts +2 -2
- package/models/invoice-type-code.ts +6 -65
- package/models/simplified-invoice-data.ts +2 -2
- package/models/validate-cdarresponse.ts +3 -3
- package/models/validation-error-response.ts +12 -3
- package/package.json +1 -1
- package/src/helpers/client.ts +1 -1
- package/dist/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts +0 -22
- package/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +0 -27
- package/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +0 -17
- /package/dist/esm/models/{facture-electronique-rest-api-schemas-cdar-validation-error-response.js → facture-electronique-rest-api-schemas-validation-validation-error-response.js} +0 -0
- /package/dist/models/{facture-electronique-rest-api-schemas-cdar-validation-error-response.js → facture-electronique-rest-api-schemas-validation-validation-error-response.js} +0 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -173,9 +173,9 @@ docs/ErrorSource.md
|
|
|
173
173
|
docs/ExtractionInfo.md
|
|
174
174
|
docs/FacturXInvoice.md
|
|
175
175
|
docs/FacturXPDFInfo.md
|
|
176
|
-
docs/
|
|
176
|
+
docs/FactureElectroniqueModelsInvoiceTypeCode.md
|
|
177
177
|
docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md
|
|
178
|
-
docs/
|
|
178
|
+
docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md
|
|
179
179
|
docs/FieldStatus.md
|
|
180
180
|
docs/FileInfo.md
|
|
181
181
|
docs/FilesInfo.md
|
|
@@ -472,9 +472,9 @@ models/error-source.ts
|
|
|
472
472
|
models/extraction-info.ts
|
|
473
473
|
models/factur-xinvoice.ts
|
|
474
474
|
models/factur-xpdfinfo.ts
|
|
475
|
-
models/facture-electronique-
|
|
475
|
+
models/facture-electronique-models-invoice-type-code.ts
|
|
476
476
|
models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts
|
|
477
|
-
models/facture-electronique-rest-api-schemas-
|
|
477
|
+
models/facture-electronique-rest-api-schemas-validation-validation-error-response.ts
|
|
478
478
|
models/field-status.ts
|
|
479
479
|
models/file-info.ts
|
|
480
480
|
models/files-info.ts
|
package/CHANGELOG.md
CHANGED
|
@@ -7,11 +7,18 @@ 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.35] - 2026-01-17
|
|
11
11
|
|
|
12
|
-
###
|
|
13
|
-
-
|
|
12
|
+
### Added
|
|
13
|
+
- Version initiale du SDK typescript
|
|
14
|
+
- Support complet de l'API FactPulse
|
|
15
|
+
- Endpoints Factur-X (génération, validation)
|
|
16
|
+
- Endpoints AFNOR PDP/PA (Flow Service, Directory Service)
|
|
17
|
+
- Endpoints Chorus Pro (recherche entreprise, soumission factures)
|
|
18
|
+
- Endpoints Signature électronique (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
|
|
19
|
+
- Support des deux modes d'authentification (stored credentials et zero-trust)
|
|
20
|
+
- Documentation complète et exemples
|
|
14
21
|
|
|
15
22
|
|
|
16
|
-
[Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v3.0.
|
|
17
|
-
[3.0.
|
|
23
|
+
[Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v3.0.35...HEAD
|
|
24
|
+
[3.0.35]: https://github.com/factpulse/sdk-typescript/releases/tag/v3.0.35
|
|
@@ -28,6 +28,8 @@ import type { APIProfile } from '../models';
|
|
|
28
28
|
// @ts-ignore
|
|
29
29
|
import type { AsyncTaskStatus } from '../models';
|
|
30
30
|
// @ts-ignore
|
|
31
|
+
import type { FactureElectroniqueRestApiSchemasValidationValidationErrorResponse } from '../models';
|
|
32
|
+
// @ts-ignore
|
|
31
33
|
import type { GenerateCertificateRequest } from '../models';
|
|
32
34
|
// @ts-ignore
|
|
33
35
|
import type { GenerateCertificateResponse } from '../models';
|
|
@@ -44,8 +46,6 @@ import type { SubmitCompleteInvoiceResponse } from '../models';
|
|
|
44
46
|
// @ts-ignore
|
|
45
47
|
import type { TaskResponse } from '../models';
|
|
46
48
|
// @ts-ignore
|
|
47
|
-
import type { ValidationErrorResponse } from '../models';
|
|
48
|
-
// @ts-ignore
|
|
49
49
|
import type { ValidationSuccessResponse } from '../models';
|
|
50
50
|
/**
|
|
51
51
|
* InvoiceProcessingApi - axios parameter creator
|
|
@@ -10,20 +10,72 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* 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 |
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export declare const FactureElectroniqueModelsInvoiceTypeCode: {
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
* Commercial Invoice
|
|
18
|
+
*/
|
|
19
|
+
readonly INVOICE: "380";
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'rule'?: string | null;
|
|
21
|
+
* Self-billed Invoice
|
|
22
|
+
*/
|
|
23
|
+
readonly SELF_BILLED_INVOICE: "389";
|
|
25
24
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
* Factored Invoice
|
|
26
|
+
*/
|
|
27
|
+
readonly FACTORED_INVOICE: "393";
|
|
28
|
+
/**
|
|
29
|
+
* Self-billed Factored Invoice
|
|
30
|
+
*/
|
|
31
|
+
readonly SELF_BILLED_FACTORED_INVOICE: "501";
|
|
32
|
+
/**
|
|
33
|
+
* Prepayment Invoice
|
|
34
|
+
*/
|
|
35
|
+
readonly PREPAYMENT_INVOICE: "386";
|
|
36
|
+
/**
|
|
37
|
+
* Self-billed Prepayment Invoice
|
|
38
|
+
*/
|
|
39
|
+
readonly SELF_BILLED_PREPAYMENT_INVOICE: "500";
|
|
40
|
+
/**
|
|
41
|
+
* Corrective Invoice
|
|
42
|
+
*/
|
|
43
|
+
readonly CORRECTIVE_INVOICE: "384";
|
|
44
|
+
/**
|
|
45
|
+
* Self-billed Corrective Invoice
|
|
46
|
+
*/
|
|
47
|
+
readonly SELF_BILLED_CORRECTIVE_INVOICE: "471";
|
|
48
|
+
/**
|
|
49
|
+
* Factored Corrective Invoice
|
|
50
|
+
*/
|
|
51
|
+
readonly FACTORED_CORRECTIVE_INVOICE: "472";
|
|
52
|
+
/**
|
|
53
|
+
* Self-billed Factored Corrective Invoice
|
|
54
|
+
*/
|
|
55
|
+
readonly SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: "473";
|
|
56
|
+
/**
|
|
57
|
+
* Credit Note
|
|
58
|
+
*/
|
|
59
|
+
readonly CREDIT_NOTE: "381";
|
|
60
|
+
/**
|
|
61
|
+
* Self-billed Credit Note
|
|
62
|
+
*/
|
|
63
|
+
readonly SELF_BILLED_CREDIT_NOTE: "261";
|
|
64
|
+
/**
|
|
65
|
+
* Global Allowance Credit Note
|
|
66
|
+
*/
|
|
67
|
+
readonly GLOBAL_ALLOWANCE_CREDIT_NOTE: "262";
|
|
68
|
+
/**
|
|
69
|
+
* Factored Credit Note
|
|
70
|
+
*/
|
|
71
|
+
readonly FACTORED_CREDIT_NOTE: "396";
|
|
72
|
+
/**
|
|
73
|
+
* Self-billed Factored Credit Note
|
|
74
|
+
*/
|
|
75
|
+
readonly SELF_BILLED_FACTORED_CREDIT_NOTE: "502";
|
|
76
|
+
/**
|
|
77
|
+
* Prepayment Credit Note
|
|
78
|
+
*/
|
|
79
|
+
readonly PREPAYMENT_CREDIT_NOTE: "503";
|
|
80
|
+
};
|
|
81
|
+
export type FactureElectroniqueModelsInvoiceTypeCode = typeof FactureElectroniqueModelsInvoiceTypeCode[keyof typeof FactureElectroniqueModelsInvoiceTypeCode];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/* tslint:disable */
|
|
3
2
|
/* eslint-disable */
|
|
4
3
|
/**
|
|
@@ -12,15 +11,72 @@
|
|
|
12
11
|
* https://openapi-generator.tech
|
|
13
12
|
* Do not edit the class manually.
|
|
14
13
|
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = void 0;
|
|
17
14
|
/**
|
|
18
|
-
*
|
|
15
|
+
* 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
16
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
export const FactureElectroniqueModelsInvoiceTypeCode = {
|
|
18
|
+
/**
|
|
19
|
+
* Commercial Invoice
|
|
20
|
+
*/
|
|
21
|
+
INVOICE: '380',
|
|
22
|
+
/**
|
|
23
|
+
* Self-billed Invoice
|
|
24
|
+
*/
|
|
25
|
+
SELF_BILLED_INVOICE: '389',
|
|
26
|
+
/**
|
|
27
|
+
* Factored Invoice
|
|
28
|
+
*/
|
|
29
|
+
FACTORED_INVOICE: '393',
|
|
30
|
+
/**
|
|
31
|
+
* Self-billed Factored Invoice
|
|
32
|
+
*/
|
|
33
|
+
SELF_BILLED_FACTORED_INVOICE: '501',
|
|
34
|
+
/**
|
|
35
|
+
* Prepayment Invoice
|
|
36
|
+
*/
|
|
37
|
+
PREPAYMENT_INVOICE: '386',
|
|
38
|
+
/**
|
|
39
|
+
* Self-billed Prepayment Invoice
|
|
40
|
+
*/
|
|
41
|
+
SELF_BILLED_PREPAYMENT_INVOICE: '500',
|
|
42
|
+
/**
|
|
43
|
+
* Corrective Invoice
|
|
44
|
+
*/
|
|
45
|
+
CORRECTIVE_INVOICE: '384',
|
|
46
|
+
/**
|
|
47
|
+
* Self-billed Corrective Invoice
|
|
48
|
+
*/
|
|
49
|
+
SELF_BILLED_CORRECTIVE_INVOICE: '471',
|
|
50
|
+
/**
|
|
51
|
+
* Factored Corrective Invoice
|
|
52
|
+
*/
|
|
53
|
+
FACTORED_CORRECTIVE_INVOICE: '472',
|
|
54
|
+
/**
|
|
55
|
+
* Self-billed Factored Corrective Invoice
|
|
56
|
+
*/
|
|
57
|
+
SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: '473',
|
|
58
|
+
/**
|
|
59
|
+
* Credit Note
|
|
60
|
+
*/
|
|
61
|
+
CREDIT_NOTE: '381',
|
|
62
|
+
/**
|
|
63
|
+
* Self-billed Credit Note
|
|
64
|
+
*/
|
|
65
|
+
SELF_BILLED_CREDIT_NOTE: '261',
|
|
66
|
+
/**
|
|
67
|
+
* Global Allowance Credit Note
|
|
68
|
+
*/
|
|
69
|
+
GLOBAL_ALLOWANCE_CREDIT_NOTE: '262',
|
|
70
|
+
/**
|
|
71
|
+
* Factored Credit Note
|
|
72
|
+
*/
|
|
73
|
+
FACTORED_CREDIT_NOTE: '396',
|
|
74
|
+
/**
|
|
75
|
+
* Self-billed Factored Credit Note
|
|
76
|
+
*/
|
|
77
|
+
SELF_BILLED_FACTORED_CREDIT_NOTE: '502',
|
|
78
|
+
/**
|
|
79
|
+
* Prepayment Credit Note
|
|
80
|
+
*/
|
|
81
|
+
PREPAYMENT_CREDIT_NOTE: '503'
|
|
26
82
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
1
|
/**
|
|
4
2
|
* FactPulse REST API
|
|
5
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/
|
|
@@ -12,12 +10,11 @@
|
|
|
12
10
|
* Do not edit the class manually.
|
|
13
11
|
*/
|
|
14
12
|
/**
|
|
15
|
-
*
|
|
13
|
+
* Response for validation errors.
|
|
16
14
|
*/
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
15
|
+
export interface FactureElectroniqueRestApiSchemasValidationValidationErrorResponse {
|
|
16
|
+
/**
|
|
17
|
+
* List of detected validation errors.
|
|
18
|
+
*/
|
|
19
|
+
'detail': Array<string>;
|
|
20
|
+
}
|
|
@@ -145,9 +145,9 @@ export * from './error-source';
|
|
|
145
145
|
export * from './extraction-info';
|
|
146
146
|
export * from './factur-xinvoice';
|
|
147
147
|
export * from './factur-xpdfinfo';
|
|
148
|
-
export * from './facture-electronique-
|
|
148
|
+
export * from './facture-electronique-models-invoice-type-code';
|
|
149
149
|
export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
|
|
150
|
-
export * from './facture-electronique-rest-api-schemas-
|
|
150
|
+
export * from './facture-electronique-rest-api-schemas-validation-validation-error-response';
|
|
151
151
|
export * from './field-status';
|
|
152
152
|
export * from './file-info';
|
|
153
153
|
export * from './files-info';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -145,9 +145,9 @@ export * from './error-source';
|
|
|
145
145
|
export * from './extraction-info';
|
|
146
146
|
export * from './factur-xinvoice';
|
|
147
147
|
export * from './factur-xpdfinfo';
|
|
148
|
-
export * from './facture-electronique-
|
|
148
|
+
export * from './facture-electronique-models-invoice-type-code';
|
|
149
149
|
export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
|
|
150
|
-
export * from './facture-electronique-rest-api-schemas-
|
|
150
|
+
export * from './facture-electronique-rest-api-schemas-validation-validation-error-response';
|
|
151
151
|
export * from './field-status';
|
|
152
152
|
export * from './file-info';
|
|
153
153
|
export * from './files-info';
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { Buyercountry } from './buyercountry';
|
|
13
13
|
import type { Currency } from './currency';
|
|
14
|
-
import type {
|
|
14
|
+
import type { InvoiceTypeCode } from './invoice-type-code';
|
|
15
15
|
import type { Sellercountry } from './sellercountry';
|
|
16
16
|
import type { TaxBreakdownInput } from './tax-breakdown-input';
|
|
17
17
|
import type { Taxamount1 } from './taxamount1';
|
|
@@ -31,7 +31,7 @@ export interface InvoiceInput {
|
|
|
31
31
|
/**
|
|
32
32
|
* Invoice type code
|
|
33
33
|
*/
|
|
34
|
-
'typeCode'?:
|
|
34
|
+
'typeCode'?: InvoiceTypeCode;
|
|
35
35
|
'currency'?: Currency;
|
|
36
36
|
'dueDate'?: string | null;
|
|
37
37
|
/**
|
|
@@ -10,72 +10,13 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Invoice type codes (UNTDID 1001).
|
|
14
14
|
*/
|
|
15
15
|
export declare const InvoiceTypeCode: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
* Self-billed Invoice
|
|
22
|
-
*/
|
|
23
|
-
readonly SELF_BILLED_INVOICE: "389";
|
|
24
|
-
/**
|
|
25
|
-
* Factored Invoice
|
|
26
|
-
*/
|
|
27
|
-
readonly FACTORED_INVOICE: "393";
|
|
28
|
-
/**
|
|
29
|
-
* Self-billed Factored Invoice
|
|
30
|
-
*/
|
|
31
|
-
readonly SELF_BILLED_FACTORED_INVOICE: "501";
|
|
32
|
-
/**
|
|
33
|
-
* Prepayment Invoice
|
|
34
|
-
*/
|
|
35
|
-
readonly PREPAYMENT_INVOICE: "386";
|
|
36
|
-
/**
|
|
37
|
-
* Self-billed Prepayment Invoice
|
|
38
|
-
*/
|
|
39
|
-
readonly SELF_BILLED_PREPAYMENT_INVOICE: "500";
|
|
40
|
-
/**
|
|
41
|
-
* Corrective Invoice
|
|
42
|
-
*/
|
|
43
|
-
readonly CORRECTIVE_INVOICE: "384";
|
|
44
|
-
/**
|
|
45
|
-
* Self-billed Corrective Invoice
|
|
46
|
-
*/
|
|
47
|
-
readonly SELF_BILLED_CORRECTIVE_INVOICE: "471";
|
|
48
|
-
/**
|
|
49
|
-
* Factored Corrective Invoice
|
|
50
|
-
*/
|
|
51
|
-
readonly FACTORED_CORRECTIVE_INVOICE: "472";
|
|
52
|
-
/**
|
|
53
|
-
* Self-billed Factored Corrective Invoice
|
|
54
|
-
*/
|
|
55
|
-
readonly SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: "473";
|
|
56
|
-
/**
|
|
57
|
-
* Credit Note
|
|
58
|
-
*/
|
|
59
|
-
readonly CREDIT_NOTE: "381";
|
|
60
|
-
/**
|
|
61
|
-
* Self-billed Credit Note
|
|
62
|
-
*/
|
|
63
|
-
readonly SELF_BILLED_CREDIT_NOTE: "261";
|
|
64
|
-
/**
|
|
65
|
-
* Global Allowance Credit Note
|
|
66
|
-
*/
|
|
67
|
-
readonly GLOBAL_ALLOWANCE_CREDIT_NOTE: "262";
|
|
68
|
-
/**
|
|
69
|
-
* Factored Credit Note
|
|
70
|
-
*/
|
|
71
|
-
readonly FACTORED_CREDIT_NOTE: "396";
|
|
72
|
-
/**
|
|
73
|
-
* Self-billed Factored Credit Note
|
|
74
|
-
*/
|
|
75
|
-
readonly SELF_BILLED_FACTORED_CREDIT_NOTE: "502";
|
|
76
|
-
/**
|
|
77
|
-
* Prepayment Credit Note
|
|
78
|
-
*/
|
|
79
|
-
readonly PREPAYMENT_CREDIT_NOTE: "503";
|
|
16
|
+
readonly _380: "380";
|
|
17
|
+
readonly _381: "381";
|
|
18
|
+
readonly _384: "384";
|
|
19
|
+
readonly _389: "389";
|
|
20
|
+
readonly _386: "386";
|
|
80
21
|
};
|
|
81
22
|
export type InvoiceTypeCode = typeof InvoiceTypeCode[keyof typeof InvoiceTypeCode];
|
|
@@ -12,71 +12,12 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Invoice type codes (UNTDID 1001).
|
|
16
16
|
*/
|
|
17
17
|
export const InvoiceTypeCode = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* Self-billed Invoice
|
|
24
|
-
*/
|
|
25
|
-
SELF_BILLED_INVOICE: '389',
|
|
26
|
-
/**
|
|
27
|
-
* Factored Invoice
|
|
28
|
-
*/
|
|
29
|
-
FACTORED_INVOICE: '393',
|
|
30
|
-
/**
|
|
31
|
-
* Self-billed Factored Invoice
|
|
32
|
-
*/
|
|
33
|
-
SELF_BILLED_FACTORED_INVOICE: '501',
|
|
34
|
-
/**
|
|
35
|
-
* Prepayment Invoice
|
|
36
|
-
*/
|
|
37
|
-
PREPAYMENT_INVOICE: '386',
|
|
38
|
-
/**
|
|
39
|
-
* Self-billed Prepayment Invoice
|
|
40
|
-
*/
|
|
41
|
-
SELF_BILLED_PREPAYMENT_INVOICE: '500',
|
|
42
|
-
/**
|
|
43
|
-
* Corrective Invoice
|
|
44
|
-
*/
|
|
45
|
-
CORRECTIVE_INVOICE: '384',
|
|
46
|
-
/**
|
|
47
|
-
* Self-billed Corrective Invoice
|
|
48
|
-
*/
|
|
49
|
-
SELF_BILLED_CORRECTIVE_INVOICE: '471',
|
|
50
|
-
/**
|
|
51
|
-
* Factored Corrective Invoice
|
|
52
|
-
*/
|
|
53
|
-
FACTORED_CORRECTIVE_INVOICE: '472',
|
|
54
|
-
/**
|
|
55
|
-
* Self-billed Factored Corrective Invoice
|
|
56
|
-
*/
|
|
57
|
-
SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: '473',
|
|
58
|
-
/**
|
|
59
|
-
* Credit Note
|
|
60
|
-
*/
|
|
61
|
-
CREDIT_NOTE: '381',
|
|
62
|
-
/**
|
|
63
|
-
* Self-billed Credit Note
|
|
64
|
-
*/
|
|
65
|
-
SELF_BILLED_CREDIT_NOTE: '261',
|
|
66
|
-
/**
|
|
67
|
-
* Global Allowance Credit Note
|
|
68
|
-
*/
|
|
69
|
-
GLOBAL_ALLOWANCE_CREDIT_NOTE: '262',
|
|
70
|
-
/**
|
|
71
|
-
* Factored Credit Note
|
|
72
|
-
*/
|
|
73
|
-
FACTORED_CREDIT_NOTE: '396',
|
|
74
|
-
/**
|
|
75
|
-
* Self-billed Factored Credit Note
|
|
76
|
-
*/
|
|
77
|
-
SELF_BILLED_FACTORED_CREDIT_NOTE: '502',
|
|
78
|
-
/**
|
|
79
|
-
* Prepayment Credit Note
|
|
80
|
-
*/
|
|
81
|
-
PREPAYMENT_CREDIT_NOTE: '503'
|
|
18
|
+
_380: '380',
|
|
19
|
+
_381: '381',
|
|
20
|
+
_384: '384',
|
|
21
|
+
_389: '389',
|
|
22
|
+
_386: '386'
|
|
82
23
|
};
|
|
@@ -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 { FactureElectroniqueModelsInvoiceTypeCode } from './facture-electronique-models-invoice-type-code';
|
|
13
13
|
import type { InvoicingFrameworkCode } from './invoicing-framework-code';
|
|
14
14
|
import type { OperationNature } from './operation-nature';
|
|
15
15
|
/**
|
|
@@ -49,7 +49,7 @@ export interface SimplifiedInvoiceData {
|
|
|
49
49
|
/**
|
|
50
50
|
* Document type (UNTDID 1001). Default: 380 (Invoice).
|
|
51
51
|
*/
|
|
52
|
-
'invoiceType'?:
|
|
52
|
+
'invoiceType'?: FactureElectroniqueModelsInvoiceTypeCode;
|
|
53
53
|
'precedingInvoiceReference'?: string | null;
|
|
54
54
|
'operationNature'?: OperationNature | null;
|
|
55
55
|
'invoicingFramework'?: InvoicingFrameworkCode | null;
|
|
@@ -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 { ValidationErrorResponse } from './validation-error-response';
|
|
13
13
|
/**
|
|
14
14
|
* Réponse de validation CDAR.
|
|
15
15
|
*/
|
|
@@ -21,9 +21,9 @@ export interface ValidateCDARResponse {
|
|
|
21
21
|
/**
|
|
22
22
|
* Liste des erreurs
|
|
23
23
|
*/
|
|
24
|
-
'errors'?: Array<
|
|
24
|
+
'errors'?: Array<ValidationErrorResponse>;
|
|
25
25
|
/**
|
|
26
26
|
* Liste des avertissements
|
|
27
27
|
*/
|
|
28
|
-
'warnings'?: Array<
|
|
28
|
+
'warnings'?: Array<ValidationErrorResponse>;
|
|
29
29
|
}
|
|
@@ -10,11 +10,20 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Erreur de validation.
|
|
14
14
|
*/
|
|
15
15
|
export interface ValidationErrorResponse {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Champ concerné
|
|
18
18
|
*/
|
|
19
|
-
'
|
|
19
|
+
'field': string;
|
|
20
|
+
/**
|
|
21
|
+
* Message d\'erreur
|
|
22
|
+
*/
|
|
23
|
+
'message': string;
|
|
24
|
+
'rule'?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Sévérité (error/warning)
|
|
27
|
+
*/
|
|
28
|
+
'severity'?: string;
|
|
20
29
|
}
|
|
@@ -303,7 +303,7 @@ export class FactPulseClient {
|
|
|
303
303
|
for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {
|
|
304
304
|
yield this.ensureAuthenticated();
|
|
305
305
|
const form = new FormData();
|
|
306
|
-
form.append('invoice_data', jsonData);
|
|
306
|
+
form.append('invoice_data', jsonData, { contentType: 'application/json', filename: 'invoice.json' });
|
|
307
307
|
form.append('profile', profile);
|
|
308
308
|
form.append('output_format', outputFormat);
|
|
309
309
|
form.append('source_pdf', fs.createReadStream(pdfPath), { filename: path.basename(pdfPath), contentType: 'application/pdf' });
|
|
@@ -10,13 +10,72 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* 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 |
|
|
14
14
|
*/
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly
|
|
20
|
-
|
|
15
|
+
export declare const FactureElectroniqueModelsInvoiceTypeCode: {
|
|
16
|
+
/**
|
|
17
|
+
* Commercial Invoice
|
|
18
|
+
*/
|
|
19
|
+
readonly INVOICE: "380";
|
|
20
|
+
/**
|
|
21
|
+
* Self-billed Invoice
|
|
22
|
+
*/
|
|
23
|
+
readonly SELF_BILLED_INVOICE: "389";
|
|
24
|
+
/**
|
|
25
|
+
* Factored Invoice
|
|
26
|
+
*/
|
|
27
|
+
readonly FACTORED_INVOICE: "393";
|
|
28
|
+
/**
|
|
29
|
+
* Self-billed Factored Invoice
|
|
30
|
+
*/
|
|
31
|
+
readonly SELF_BILLED_FACTORED_INVOICE: "501";
|
|
32
|
+
/**
|
|
33
|
+
* Prepayment Invoice
|
|
34
|
+
*/
|
|
35
|
+
readonly PREPAYMENT_INVOICE: "386";
|
|
36
|
+
/**
|
|
37
|
+
* Self-billed Prepayment Invoice
|
|
38
|
+
*/
|
|
39
|
+
readonly SELF_BILLED_PREPAYMENT_INVOICE: "500";
|
|
40
|
+
/**
|
|
41
|
+
* Corrective Invoice
|
|
42
|
+
*/
|
|
43
|
+
readonly CORRECTIVE_INVOICE: "384";
|
|
44
|
+
/**
|
|
45
|
+
* Self-billed Corrective Invoice
|
|
46
|
+
*/
|
|
47
|
+
readonly SELF_BILLED_CORRECTIVE_INVOICE: "471";
|
|
48
|
+
/**
|
|
49
|
+
* Factored Corrective Invoice
|
|
50
|
+
*/
|
|
51
|
+
readonly FACTORED_CORRECTIVE_INVOICE: "472";
|
|
52
|
+
/**
|
|
53
|
+
* Self-billed Factored Corrective Invoice
|
|
54
|
+
*/
|
|
55
|
+
readonly SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: "473";
|
|
56
|
+
/**
|
|
57
|
+
* Credit Note
|
|
58
|
+
*/
|
|
59
|
+
readonly CREDIT_NOTE: "381";
|
|
60
|
+
/**
|
|
61
|
+
* Self-billed Credit Note
|
|
62
|
+
*/
|
|
63
|
+
readonly SELF_BILLED_CREDIT_NOTE: "261";
|
|
64
|
+
/**
|
|
65
|
+
* Global Allowance Credit Note
|
|
66
|
+
*/
|
|
67
|
+
readonly GLOBAL_ALLOWANCE_CREDIT_NOTE: "262";
|
|
68
|
+
/**
|
|
69
|
+
* Factored Credit Note
|
|
70
|
+
*/
|
|
71
|
+
readonly FACTORED_CREDIT_NOTE: "396";
|
|
72
|
+
/**
|
|
73
|
+
* Self-billed Factored Credit Note
|
|
74
|
+
*/
|
|
75
|
+
readonly SELF_BILLED_FACTORED_CREDIT_NOTE: "502";
|
|
76
|
+
/**
|
|
77
|
+
* Prepayment Credit Note
|
|
78
|
+
*/
|
|
79
|
+
readonly PREPAYMENT_CREDIT_NOTE: "503";
|
|
21
80
|
};
|
|
22
|
-
export type
|
|
81
|
+
export type FactureElectroniqueModelsInvoiceTypeCode = typeof FactureElectroniqueModelsInvoiceTypeCode[keyof typeof FactureElectroniqueModelsInvoiceTypeCode];
|