@factpulse/sdk 3.0.37 → 4.0.0
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 +6 -6
- package/CHANGELOG.md +10 -13
- package/README.md +135 -148
- package/api/invoice-processing-api.ts +2 -2
- package/dist/esm/models/chorus-pro-credentials.d.ts +19 -7
- package/dist/esm/models/chorus-pro-destination.d.ts +2 -2
- package/dist/esm/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts → facture-electronique-models-invoice-type-code.d.ts} +63 -18
- 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-validation-validation-error-response.d.ts → facture-electronique-rest-api-schemas-cdar-validation-error-response.d.ts} +13 -4
- package/dist/esm/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts} +11 -9
- package/dist/esm/models/get-chorus-pro-id-request.d.ts +2 -2
- package/dist/esm/models/get-invoice-request.d.ts +2 -2
- package/dist/esm/models/get-structure-request.d.ts +2 -2
- package/dist/esm/models/index.d.ts +3 -3
- package/dist/esm/models/index.js +3 -3
- 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/recipient.d.ts +1 -1
- package/dist/esm/models/scheme-id.d.ts +7 -7
- package/dist/esm/models/scheme-id.js +7 -7
- package/dist/esm/models/search-structure-request.d.ts +2 -2
- package/dist/esm/models/simplified-invoice-data.d.ts +2 -2
- package/dist/esm/models/submit-complete-invoice-response.d.ts +1 -1
- package/dist/esm/models/submit-invoice-request.d.ts +2 -2
- package/dist/esm/models/supplier.d.ts +1 -1
- package/dist/esm/models/validate-cdarresponse.d.ts +3 -3
- package/dist/esm/models/validation-error-response.d.ts +3 -12
- package/dist/esm/src/helpers/client.d.ts +43 -265
- package/dist/esm/src/helpers/client.js +196 -779
- package/dist/esm/src/helpers/index.d.ts +1 -2
- package/dist/esm/src/helpers/index.js +1 -3
- package/dist/models/chorus-pro-credentials.d.ts +19 -7
- package/dist/models/chorus-pro-destination.d.ts +2 -2
- package/dist/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts → facture-electronique-models-invoice-type-code.d.ts} +63 -18
- package/dist/models/facture-electronique-models-invoice-type-code.js +85 -0
- package/dist/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.d.ts → facture-electronique-rest-api-schemas-cdar-validation-error-response.d.ts} +13 -4
- package/dist/{esm/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js → models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts} +11 -10
- package/dist/models/get-chorus-pro-id-request.d.ts +2 -2
- package/dist/models/get-invoice-request.d.ts +2 -2
- package/dist/models/get-structure-request.d.ts +2 -2
- package/dist/models/index.d.ts +3 -3
- package/dist/models/index.js +3 -3
- 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/recipient.d.ts +1 -1
- package/dist/models/scheme-id.d.ts +7 -7
- package/dist/models/scheme-id.js +7 -7
- package/dist/models/search-structure-request.d.ts +2 -2
- package/dist/models/simplified-invoice-data.d.ts +2 -2
- package/dist/models/submit-complete-invoice-response.d.ts +1 -1
- package/dist/models/submit-invoice-request.d.ts +2 -2
- package/dist/models/supplier.d.ts +1 -1
- package/dist/models/validate-cdarresponse.d.ts +3 -3
- package/dist/models/validation-error-response.d.ts +3 -12
- package/dist/src/helpers/client.d.ts +43 -265
- package/dist/src/helpers/client.js +199 -823
- package/dist/src/helpers/index.d.ts +1 -2
- package/dist/src/helpers/index.js +2 -12
- package/docs/ChorusProCredentials.md +9 -9
- package/docs/ChorusProDestination.md +1 -1
- package/docs/FactureElectroniqueModelsInvoiceTypeCode.md +39 -0
- package/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +27 -0
- package/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +29 -0
- package/docs/GetChorusProIdRequest.md +1 -1
- package/docs/GetInvoiceRequest.md +1 -1
- package/docs/GetStructureRequest.md +1 -1
- package/docs/InvoiceInput.md +1 -1
- package/docs/InvoiceTypeCode.md +6 -28
- package/docs/Recipient.md +1 -1
- package/docs/SchemeID.md +4 -4
- package/docs/SearchStructureRequest.md +1 -1
- package/docs/SimplifiedInvoiceData.md +1 -1
- package/docs/SubmitCompleteInvoiceResponse.md +2 -2
- package/docs/SubmitInvoiceRequest.md +1 -1
- package/docs/Supplier.md +1 -1
- package/docs/ValidateCDARResponse.md +2 -2
- package/docs/ValidationErrorResponse.md +3 -9
- package/models/chorus-pro-credentials.ts +19 -7
- package/models/chorus-pro-destination.ts +2 -2
- package/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts → facture-electronique-models-invoice-type-code.ts} +67 -18
- package/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.ts → facture-electronique-rest-api-schemas-cdar-validation-error-response.ts} +13 -4
- package/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.ts → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts} +11 -13
- package/models/get-chorus-pro-id-request.ts +2 -2
- package/models/get-invoice-request.ts +2 -2
- package/models/get-structure-request.ts +2 -2
- package/models/index.ts +3 -3
- package/models/invoice-input.ts +2 -2
- package/models/invoice-type-code.ts +6 -65
- package/models/recipient.ts +1 -1
- package/models/scheme-id.ts +7 -7
- package/models/search-structure-request.ts +2 -2
- package/models/simplified-invoice-data.ts +2 -2
- package/models/submit-complete-invoice-response.ts +1 -1
- package/models/submit-invoice-request.ts +2 -2
- package/models/supplier.ts +1 -1
- package/models/validate-cdarresponse.ts +3 -3
- package/models/validation-error-response.ts +3 -12
- package/package.json +1 -1
- package/src/helpers/client.ts +211 -834
- package/src/helpers/index.ts +1 -3
- package/dist/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts +0 -22
- package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -29
- package/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +0 -17
- package/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +0 -21
- /package/dist/esm/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js → facture-electronique-rest-api-schemas-cdar-validation-error-response.js} +0 -0
- /package/dist/esm/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.js → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js} +0 -0
- /package/dist/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js → facture-electronique-rest-api-schemas-cdar-validation-error-response.js} +0 -0
- /package/dist/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.js → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js} +0 -0
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export { FactPulseError, FactPulseAuthError, FactPulsePollingTimeout, FactPulseValidationError, ValidationErrorDetail, formatValidationError } from './exceptions';
|
|
2
|
-
export { FactPulseClient, FactPulseClientConfig,
|
|
3
|
-
export { amount, invoiceTotals, invoiceLine, vatLine, postalAddress, electronicAddress, supplier, recipient, beneficiary } from './client';
|
|
2
|
+
export { FactPulseClient, FactPulseClientConfig, FactPulseError as ClientError } from './client';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ClientError = exports.FactPulseClient = exports.formatValidationError = exports.FactPulseValidationError = exports.FactPulsePollingTimeout = exports.FactPulseAuthError = exports.FactPulseError = void 0;
|
|
4
4
|
// Exceptions
|
|
5
5
|
var exceptions_1 = require("./exceptions");
|
|
6
6
|
Object.defineProperty(exports, "FactPulseError", { enumerable: true, get: function () { return exceptions_1.FactPulseError; } });
|
|
@@ -11,14 +11,4 @@ Object.defineProperty(exports, "formatValidationError", { enumerable: true, get:
|
|
|
11
11
|
// Client and configuration
|
|
12
12
|
var client_1 = require("./client");
|
|
13
13
|
Object.defineProperty(exports, "FactPulseClient", { enumerable: true, get: function () { return client_1.FactPulseClient; } });
|
|
14
|
-
|
|
15
|
-
var client_2 = require("./client");
|
|
16
|
-
Object.defineProperty(exports, "amount", { enumerable: true, get: function () { return client_2.amount; } });
|
|
17
|
-
Object.defineProperty(exports, "invoiceTotals", { enumerable: true, get: function () { return client_2.invoiceTotals; } });
|
|
18
|
-
Object.defineProperty(exports, "invoiceLine", { enumerable: true, get: function () { return client_2.invoiceLine; } });
|
|
19
|
-
Object.defineProperty(exports, "vatLine", { enumerable: true, get: function () { return client_2.vatLine; } });
|
|
20
|
-
Object.defineProperty(exports, "postalAddress", { enumerable: true, get: function () { return client_2.postalAddress; } });
|
|
21
|
-
Object.defineProperty(exports, "electronicAddress", { enumerable: true, get: function () { return client_2.electronicAddress; } });
|
|
22
|
-
Object.defineProperty(exports, "supplier", { enumerable: true, get: function () { return client_2.supplier; } });
|
|
23
|
-
Object.defineProperty(exports, "recipient", { enumerable: true, get: function () { return client_2.recipient; } });
|
|
24
|
-
Object.defineProperty(exports, "beneficiary", { enumerable: true, get: function () { return client_2.beneficiary; } });
|
|
14
|
+
Object.defineProperty(exports, "ClientError", { enumerable: true, get: function () { return client_1.FactPulseError; } });
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# ChorusProCredentials
|
|
2
2
|
|
|
3
|
-
|
|
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
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**pisteClientId** | **string** |
|
|
10
|
-
**pisteClientSecret** | **string** |
|
|
11
|
-
**
|
|
12
|
-
**
|
|
13
|
-
**
|
|
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
14
|
|
|
15
15
|
## Example
|
|
16
16
|
|
|
@@ -20,9 +20,9 @@ import { ChorusProCredentials } from '@factpulse/sdk';
|
|
|
20
20
|
const instance: ChorusProCredentials = {
|
|
21
21
|
pisteClientId,
|
|
22
22
|
pisteClientSecret,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
chorusProLogin,
|
|
24
|
+
chorusProPassword,
|
|
25
|
+
sandbox,
|
|
26
26
|
};
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -7,7 +7,7 @@ Specific configuration for Chorus Pro destination.
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
9
|
**type** | **string** | | [optional] [default to TypeEnum_ChorusPro]
|
|
10
|
-
**credentials** | [**
|
|
10
|
+
**credentials** | [**FactureElectroniqueRestApiSchemasProcessingChorusProCredentials**](FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md) | | [optional] [default to undefined]
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# FactureElectroniqueModelsInvoiceTypeCode
|
|
2
|
+
|
|
3
|
+
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 |
|
|
4
|
+
|
|
5
|
+
## Enum
|
|
6
|
+
|
|
7
|
+
* `INVOICE` (value: `'380'`)
|
|
8
|
+
|
|
9
|
+
* `SELF_BILLED_INVOICE` (value: `'389'`)
|
|
10
|
+
|
|
11
|
+
* `FACTORED_INVOICE` (value: `'393'`)
|
|
12
|
+
|
|
13
|
+
* `SELF_BILLED_FACTORED_INVOICE` (value: `'501'`)
|
|
14
|
+
|
|
15
|
+
* `PREPAYMENT_INVOICE` (value: `'386'`)
|
|
16
|
+
|
|
17
|
+
* `SELF_BILLED_PREPAYMENT_INVOICE` (value: `'500'`)
|
|
18
|
+
|
|
19
|
+
* `CORRECTIVE_INVOICE` (value: `'384'`)
|
|
20
|
+
|
|
21
|
+
* `SELF_BILLED_CORRECTIVE_INVOICE` (value: `'471'`)
|
|
22
|
+
|
|
23
|
+
* `FACTORED_CORRECTIVE_INVOICE` (value: `'472'`)
|
|
24
|
+
|
|
25
|
+
* `SELF_BILLED_FACTORED_CORRECTIVE_INVOICE` (value: `'473'`)
|
|
26
|
+
|
|
27
|
+
* `CREDIT_NOTE` (value: `'381'`)
|
|
28
|
+
|
|
29
|
+
* `SELF_BILLED_CREDIT_NOTE` (value: `'261'`)
|
|
30
|
+
|
|
31
|
+
* `GLOBAL_ALLOWANCE_CREDIT_NOTE` (value: `'262'`)
|
|
32
|
+
|
|
33
|
+
* `FACTORED_CREDIT_NOTE` (value: `'396'`)
|
|
34
|
+
|
|
35
|
+
* `SELF_BILLED_FACTORED_CREDIT_NOTE` (value: `'502'`)
|
|
36
|
+
|
|
37
|
+
* `PREPAYMENT_CREDIT_NOTE` (value: `'503'`)
|
|
38
|
+
|
|
39
|
+
[[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,27 @@
|
|
|
1
|
+
# FactureElectroniqueRestApiSchemasCdarValidationErrorResponse
|
|
2
|
+
|
|
3
|
+
Erreur de validation.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**field** | **string** | Champ concerné | [default to undefined]
|
|
10
|
+
**message** | **string** | Message d\'erreur | [default to undefined]
|
|
11
|
+
**rule** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**severity** | **string** | Sévérité (error/warning) | [optional] [default to 'error']
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { FactureElectroniqueRestApiSchemasCdarValidationErrorResponse } from '@factpulse/sdk';
|
|
18
|
+
|
|
19
|
+
const instance: FactureElectroniqueRestApiSchemasCdarValidationErrorResponse = {
|
|
20
|
+
field,
|
|
21
|
+
message,
|
|
22
|
+
rule,
|
|
23
|
+
severity,
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
[[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,29 @@
|
|
|
1
|
+
# FactureElectroniqueRestApiSchemasProcessingChorusProCredentials
|
|
2
|
+
|
|
3
|
+
Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**pisteClientId** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**pisteClientSecret** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**chorusLogin** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**chorusPassword** | **string** | | [optional] [default to undefined]
|
|
13
|
+
**sandboxMode** | **boolean** | [MODE 2] Use sandbox mode (default: True) | [optional] [default to true]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { FactureElectroniqueRestApiSchemasProcessingChorusProCredentials } from '@factpulse/sdk';
|
|
19
|
+
|
|
20
|
+
const instance: FactureElectroniqueRestApiSchemasProcessingChorusProCredentials = {
|
|
21
|
+
pisteClientId,
|
|
22
|
+
pisteClientSecret,
|
|
23
|
+
chorusLogin,
|
|
24
|
+
chorusPassword,
|
|
25
|
+
sandboxMode,
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -6,7 +6,7 @@ Get Chorus Pro ID from SIRET.
|
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**credentials** | [**
|
|
9
|
+
**credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
|
|
10
10
|
**siret** | **string** | Structure SIRET (14 digits) | [default to undefined]
|
|
11
11
|
**identifierType** | **string** | Identifier type (SIRET, SIREN, UE_HORS_FRANCE, etc.) | [optional] [default to 'SIRET']
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ Get an invoice.
|
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**credentials** | [**
|
|
9
|
+
**credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
|
|
10
10
|
**chorusInvoiceId** | **number** | Chorus Pro invoice ID | [default to undefined]
|
|
11
11
|
|
|
12
12
|
## Example
|
|
@@ -6,7 +6,7 @@ Get structure details.
|
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**credentials** | [**
|
|
9
|
+
**credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
|
|
10
10
|
**structureId** | **number** | Chorus Pro structure ID | [default to undefined]
|
|
11
11
|
**languageCode** | **string** | Language code (fr, en) | [optional] [default to 'fr']
|
|
12
12
|
|
package/docs/InvoiceInput.md
CHANGED
|
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
|
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
9
|
**invoiceId** | **string** | Invoice identifier | [default to undefined]
|
|
10
10
|
**issueDate** | **string** | Invoice issue date | [default to undefined]
|
|
11
|
-
**typeCode** | [**
|
|
11
|
+
**typeCode** | [**InvoiceTypeCode**](InvoiceTypeCode.md) | Invoice type code | [optional] [default to undefined]
|
|
12
12
|
**currency** | [**Currency**](Currency.md) | | [optional] [default to undefined]
|
|
13
13
|
**dueDate** | **string** | | [optional] [default to undefined]
|
|
14
14
|
**sellerSiren** | **string** | Seller SIREN/SIRET | [default to undefined]
|
package/docs/InvoiceTypeCode.md
CHANGED
|
@@ -1,39 +1,17 @@
|
|
|
1
1
|
# InvoiceTypeCode
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Invoice type codes (UNTDID 1001).
|
|
4
4
|
|
|
5
5
|
## Enum
|
|
6
6
|
|
|
7
|
-
* `
|
|
7
|
+
* `_380` (value: `'380'`)
|
|
8
8
|
|
|
9
|
-
* `
|
|
9
|
+
* `_381` (value: `'381'`)
|
|
10
10
|
|
|
11
|
-
* `
|
|
11
|
+
* `_384` (value: `'384'`)
|
|
12
12
|
|
|
13
|
-
* `
|
|
13
|
+
* `_389` (value: `'389'`)
|
|
14
14
|
|
|
15
|
-
* `
|
|
16
|
-
|
|
17
|
-
* `SELF_BILLED_PREPAYMENT_INVOICE` (value: `'500'`)
|
|
18
|
-
|
|
19
|
-
* `CORRECTIVE_INVOICE` (value: `'384'`)
|
|
20
|
-
|
|
21
|
-
* `SELF_BILLED_CORRECTIVE_INVOICE` (value: `'471'`)
|
|
22
|
-
|
|
23
|
-
* `FACTORED_CORRECTIVE_INVOICE` (value: `'472'`)
|
|
24
|
-
|
|
25
|
-
* `SELF_BILLED_FACTORED_CORRECTIVE_INVOICE` (value: `'473'`)
|
|
26
|
-
|
|
27
|
-
* `CREDIT_NOTE` (value: `'381'`)
|
|
28
|
-
|
|
29
|
-
* `SELF_BILLED_CREDIT_NOTE` (value: `'261'`)
|
|
30
|
-
|
|
31
|
-
* `GLOBAL_ALLOWANCE_CREDIT_NOTE` (value: `'262'`)
|
|
32
|
-
|
|
33
|
-
* `FACTORED_CREDIT_NOTE` (value: `'396'`)
|
|
34
|
-
|
|
35
|
-
* `SELF_BILLED_FACTORED_CREDIT_NOTE` (value: `'502'`)
|
|
36
|
-
|
|
37
|
-
* `PREPAYMENT_CREDIT_NOTE` (value: `'503'`)
|
|
15
|
+
* `_386` (value: `'386'`)
|
|
38
16
|
|
|
39
17
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/Recipient.md
CHANGED
|
@@ -6,7 +6,7 @@ Information about the invoice recipient / buyer (BG-7).
|
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**electronic_address** | [**ElectronicAddress**](ElectronicAddress.md) | | [default to undefined]
|
|
9
|
+
**electronic_address** | [**ElectronicAddress**](ElectronicAddress.md) | | [optional] [default to undefined]
|
|
10
10
|
**executing_service_code** | **string** | | [optional] [default to undefined]
|
|
11
11
|
**name** | **string** | | [optional] [default to undefined]
|
|
12
12
|
**siren** | **string** | | [optional] [default to undefined]
|
package/docs/SchemeID.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# SchemeID
|
|
2
2
|
|
|
3
|
-
Identification scheme codes (Electronic Address Scheme - EAS)
|
|
3
|
+
Identification scheme codes (Electronic Address Scheme - EAS). **Electronic Address (routing for PDP/Chorus Pro):** - `0225`: FR_ELECTRONIC_ADDRESS - French electronic billing address (BT-34/BT-49) Format: SIREN or SIREN_SUFFIX (e.g., \"920195229_92019522900017\") **Legal Identifiers (entity identification):** - `0002`: FR_SIREN - French SIREN (9 digits) for BT-30/BT-47 - `0009`: FR_SIRET - French SIRET (14 digits) for BT-29/BT-46 **Other schemes:** - `0088`: GLN - Global Location Number - `0060`: DUNS - Data Universal Numbering System - `9957`: FR_VAT_INTRA - French intra-community VAT number - `0199`: GLEIF - Global Legal Entity Identifier Foundation - `0231`: DT_DIRECTORY_ID - Directory ID for tax administration - `EM`: EMAIL - Email-based electronic address
|
|
4
4
|
|
|
5
5
|
## Enum
|
|
6
6
|
|
|
7
|
-
* `
|
|
7
|
+
* `FR_ELECTRONIC_ADDRESS` (value: `'0225'`)
|
|
8
8
|
|
|
9
|
-
* `
|
|
9
|
+
* `FR_SIREN` (value: `'0002'`)
|
|
10
10
|
|
|
11
|
-
* `
|
|
11
|
+
* `FR_SIRET` (value: `'0009'`)
|
|
12
12
|
|
|
13
13
|
* `GLN` (value: `'0088'`)
|
|
14
14
|
|
|
@@ -6,7 +6,7 @@ Search structures by criteria.
|
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**credentials** | [**
|
|
9
|
+
**credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
|
|
10
10
|
**structureIdentifier** | **string** | | [optional] [default to undefined]
|
|
11
11
|
**structureIdentifierType** | **string** | | [optional] [default to undefined]
|
|
12
12
|
**companyName** | **string** | | [optional] [default to undefined]
|
|
@@ -15,7 +15,7 @@ Name | Type | Description | Notes
|
|
|
15
15
|
**comment** | **string** | | [optional] [default to undefined]
|
|
16
16
|
**purchaseOrderReference** | **string** | | [optional] [default to undefined]
|
|
17
17
|
**contractReference** | **string** | | [optional] [default to undefined]
|
|
18
|
-
**invoiceType** | [**
|
|
18
|
+
**invoiceType** | [**FactureElectroniqueModelsInvoiceTypeCode**](FactureElectroniqueModelsInvoiceTypeCode.md) | Document type (UNTDID 1001). Default: 380 (Invoice). | [optional] [default to undefined]
|
|
19
19
|
**precedingInvoiceReference** | **string** | | [optional] [default to undefined]
|
|
20
20
|
**operationNature** | [**OperationNature**](OperationNature.md) | | [optional] [default to undefined]
|
|
21
21
|
**invoicingFramework** | [**InvoicingFrameworkCode**](InvoicingFrameworkCode.md) | | [optional] [default to undefined]
|
|
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**enrichedInvoice** | [**EnrichedInvoiceInfo**](EnrichedInvoiceInfo.md) | Enriched invoice data | [default to undefined]
|
|
14
14
|
**facturxPdf** | [**FacturXPDFInfo**](FacturXPDFInfo.md) | Generated PDF information | [default to undefined]
|
|
15
15
|
**signature** | [**SignatureInfo**](SignatureInfo.md) | | [optional] [default to undefined]
|
|
16
|
-
**
|
|
16
|
+
**contentB64** | **string** | Generated Factur-X PDF (and signed if requested) base64-encoded | [default to undefined]
|
|
17
17
|
**message** | **string** | Return message | [default to undefined]
|
|
18
18
|
|
|
19
19
|
## Example
|
|
@@ -29,7 +29,7 @@ const instance: SubmitCompleteInvoiceResponse = {
|
|
|
29
29
|
enrichedInvoice,
|
|
30
30
|
facturxPdf,
|
|
31
31
|
signature,
|
|
32
|
-
|
|
32
|
+
contentB64,
|
|
33
33
|
message,
|
|
34
34
|
};
|
|
35
35
|
```
|
|
@@ -6,7 +6,7 @@ Submit an invoice to Chorus Pro.
|
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**credentials** | [**
|
|
9
|
+
**credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
|
|
10
10
|
**invoiceNumber** | **string** | Invoice number | [default to undefined]
|
|
11
11
|
**invoiceDate** | **string** | Invoice date (ISO format: YYYY-MM-DD) | [default to undefined]
|
|
12
12
|
**paymentDueDate** | **string** | | [optional] [default to undefined]
|
package/docs/Supplier.md
CHANGED
|
@@ -6,7 +6,7 @@ Information about the supplier / seller (BG-4).
|
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**electronic_address** | [**ElectronicAddress**](ElectronicAddress.md) | | [default to undefined]
|
|
9
|
+
**electronic_address** | [**ElectronicAddress**](ElectronicAddress.md) | | [optional] [default to undefined]
|
|
10
10
|
**supplier_id** | **number** | | [default to undefined]
|
|
11
11
|
**private_id** | **string** | | [optional] [default to undefined]
|
|
12
12
|
**supplier_bank_account_code** | **number** | | [optional] [default to undefined]
|
|
@@ -7,8 +7,8 @@ Réponse de validation CDAR.
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
9
|
**valid** | **boolean** | Résultat de validation | [default to undefined]
|
|
10
|
-
**errors** | [**Array<
|
|
11
|
-
**warnings** | [**Array<
|
|
10
|
+
**errors** | [**Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>**](FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md) | Liste des erreurs | [optional] [default to undefined]
|
|
11
|
+
**warnings** | [**Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>**](FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md) | Liste des avertissements | [optional] [default to undefined]
|
|
12
12
|
|
|
13
13
|
## Example
|
|
14
14
|
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
# ValidationErrorResponse
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Response for validation errors.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**
|
|
10
|
-
**message** | **string** | Message d\'erreur | [default to undefined]
|
|
11
|
-
**rule** | **string** | | [optional] [default to undefined]
|
|
12
|
-
**severity** | **string** | Sévérité (error/warning) | [optional] [default to 'error']
|
|
9
|
+
**detail** | **Array<string>** | List of detected validation errors. | [default to undefined]
|
|
13
10
|
|
|
14
11
|
## Example
|
|
15
12
|
|
|
@@ -17,10 +14,7 @@ Name | Type | Description | Notes
|
|
|
17
14
|
import { ValidationErrorResponse } from '@factpulse/sdk';
|
|
18
15
|
|
|
19
16
|
const instance: ValidationErrorResponse = {
|
|
20
|
-
|
|
21
|
-
message,
|
|
22
|
-
rule,
|
|
23
|
-
severity,
|
|
17
|
+
detail,
|
|
24
18
|
};
|
|
25
19
|
```
|
|
26
20
|
|
|
@@ -15,16 +15,28 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
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
19
|
*/
|
|
20
20
|
export interface ChorusProCredentials {
|
|
21
|
-
'pisteClientId'?: string | null;
|
|
22
|
-
'pisteClientSecret'?: string | null;
|
|
23
|
-
'chorusLogin'?: string | null;
|
|
24
|
-
'chorusPassword'?: string | null;
|
|
25
21
|
/**
|
|
26
|
-
*
|
|
22
|
+
* PISTE Client ID (government API portal)
|
|
27
23
|
*/
|
|
28
|
-
'
|
|
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;
|
|
29
41
|
}
|
|
30
42
|
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
// May contain unused imports in some cases
|
|
17
17
|
// @ts-ignore
|
|
18
|
-
import type {
|
|
18
|
+
import type { FactureElectroniqueRestApiSchemasProcessingChorusProCredentials } from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Specific configuration for Chorus Pro destination.
|
|
22
22
|
*/
|
|
23
23
|
export interface ChorusProDestination {
|
|
24
24
|
'type'?: ChorusProDestinationTypeEnum;
|
|
25
|
-
'credentials'?:
|
|
25
|
+
'credentials'?: FactureElectroniqueRestApiSchemasProcessingChorusProCredentials | null;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export const ChorusProDestinationTypeEnum = {
|
|
@@ -15,28 +15,77 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Document type according to BR-FR-04 (UNTDID 1001 codes). | Code | Name | Description | |------|------|-------------| | 380 | INVOICE | Commercial invoice | | 389 | SELF_BILLED_INVOICE | Self-billed invoice | | 393 | FACTORED_INVOICE | Factored invoice | | 501 | SELF_BILLED_FACTORED_INVOICE | Self-billed factored invoice | | 386 | PREPAYMENT_INVOICE | Prepayment invoice | | 500 | SELF_BILLED_PREPAYMENT_INVOICE | Self-billed prepayment invoice | | 384 | CORRECTIVE_INVOICE | Corrective invoice | | 471 | SELF_BILLED_CORRECTIVE_INVOICE | Self-billed corrective invoice | | 472 | FACTORED_CORRECTIVE_INVOICE | Factored corrective invoice | | 473 | SELF_BILLED_FACTORED_CORRECTIVE_INVOICE | Self-billed factored corrective invoice | | 381 | CREDIT_NOTE | Credit note | | 261 | SELF_BILLED_CREDIT_NOTE | Self-billed credit note | | 262 | GLOBAL_ALLOWANCE_CREDIT_NOTE | Credit note for global allowance | | 396 | FACTORED_CREDIT_NOTE | Factored credit note | | 502 | SELF_BILLED_FACTORED_CREDIT_NOTE | Self-billed factored credit note | | 503 | PREPAYMENT_CREDIT_NOTE | Credit note for prepayment invoice |
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
export const FactureElectroniqueModelsInvoiceTypeCode = {
|
|
22
|
+
/**
|
|
23
|
+
* Commercial Invoice
|
|
24
|
+
*/
|
|
25
|
+
INVOICE: '380',
|
|
26
|
+
/**
|
|
27
|
+
* Self-billed Invoice
|
|
28
|
+
*/
|
|
29
|
+
SELF_BILLED_INVOICE: '389',
|
|
30
|
+
/**
|
|
31
|
+
* Factored Invoice
|
|
32
|
+
*/
|
|
33
|
+
FACTORED_INVOICE: '393',
|
|
34
|
+
/**
|
|
35
|
+
* Self-billed Factored Invoice
|
|
36
|
+
*/
|
|
37
|
+
SELF_BILLED_FACTORED_INVOICE: '501',
|
|
38
|
+
/**
|
|
39
|
+
* Prepayment Invoice
|
|
40
|
+
*/
|
|
41
|
+
PREPAYMENT_INVOICE: '386',
|
|
42
|
+
/**
|
|
43
|
+
* Self-billed Prepayment Invoice
|
|
44
|
+
*/
|
|
45
|
+
SELF_BILLED_PREPAYMENT_INVOICE: '500',
|
|
46
|
+
/**
|
|
47
|
+
* Corrective Invoice
|
|
48
|
+
*/
|
|
49
|
+
CORRECTIVE_INVOICE: '384',
|
|
21
50
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'
|
|
51
|
+
* Self-billed Corrective Invoice
|
|
52
|
+
*/
|
|
53
|
+
SELF_BILLED_CORRECTIVE_INVOICE: '471',
|
|
25
54
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'
|
|
55
|
+
* Factored Corrective Invoice
|
|
56
|
+
*/
|
|
57
|
+
FACTORED_CORRECTIVE_INVOICE: '472',
|
|
29
58
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'
|
|
59
|
+
* Self-billed Factored Corrective Invoice
|
|
60
|
+
*/
|
|
61
|
+
SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: '473',
|
|
33
62
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
'
|
|
63
|
+
* Credit Note
|
|
64
|
+
*/
|
|
65
|
+
CREDIT_NOTE: '381',
|
|
37
66
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
'
|
|
41
|
-
|
|
67
|
+
* Self-billed Credit Note
|
|
68
|
+
*/
|
|
69
|
+
SELF_BILLED_CREDIT_NOTE: '261',
|
|
70
|
+
/**
|
|
71
|
+
* Global Allowance Credit Note
|
|
72
|
+
*/
|
|
73
|
+
GLOBAL_ALLOWANCE_CREDIT_NOTE: '262',
|
|
74
|
+
/**
|
|
75
|
+
* Factored Credit Note
|
|
76
|
+
*/
|
|
77
|
+
FACTORED_CREDIT_NOTE: '396',
|
|
78
|
+
/**
|
|
79
|
+
* Self-billed Factored Credit Note
|
|
80
|
+
*/
|
|
81
|
+
SELF_BILLED_FACTORED_CREDIT_NOTE: '502',
|
|
82
|
+
/**
|
|
83
|
+
* Prepayment Credit Note
|
|
84
|
+
*/
|
|
85
|
+
PREPAYMENT_CREDIT_NOTE: '503'
|
|
86
|
+
} as const;
|
|
87
|
+
|
|
88
|
+
export type FactureElectroniqueModelsInvoiceTypeCode = typeof FactureElectroniqueModelsInvoiceTypeCode[keyof typeof FactureElectroniqueModelsInvoiceTypeCode];
|
|
89
|
+
|
|
90
|
+
|
|
42
91
|
|
|
@@ -15,12 +15,21 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Erreur de validation.
|
|
19
19
|
*/
|
|
20
|
-
export interface
|
|
20
|
+
export interface FactureElectroniqueRestApiSchemasCdarValidationErrorResponse {
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Champ concerné
|
|
23
23
|
*/
|
|
24
|
-
'
|
|
24
|
+
'field': string;
|
|
25
|
+
/**
|
|
26
|
+
* Message d\'erreur
|
|
27
|
+
*/
|
|
28
|
+
'message': string;
|
|
29
|
+
'rule'?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Sévérité (error/warning)
|
|
32
|
+
*/
|
|
33
|
+
'severity'?: string;
|
|
25
34
|
}
|
|
26
35
|
|
|
@@ -15,18 +15,16 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
export interface FactureElectroniqueRestApiSchemasProcessingChorusProCredentials {
|
|
21
|
+
'pisteClientId'?: string | null;
|
|
22
|
+
'pisteClientSecret'?: string | null;
|
|
23
|
+
'chorusLogin'?: string | null;
|
|
24
|
+
'chorusPassword'?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* [MODE 2] Use sandbox mode (default: True)
|
|
27
|
+
*/
|
|
28
|
+
'sandboxMode'?: boolean;
|
|
29
|
+
}
|
|
32
30
|
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
|
|
16
16
|
// May contain unused imports in some cases
|
|
17
17
|
// @ts-ignore
|
|
18
|
-
import type {
|
|
18
|
+
import type { ChorusProCredentials } from './chorus-pro-credentials';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Get Chorus Pro ID from SIRET.
|
|
22
22
|
*/
|
|
23
23
|
export interface GetChorusProIdRequest {
|
|
24
|
-
'credentials'?:
|
|
24
|
+
'credentials'?: ChorusProCredentials | null;
|
|
25
25
|
/**
|
|
26
26
|
* Structure SIRET (14 digits)
|
|
27
27
|
*/
|