@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.
Files changed (110) hide show
  1. package/.openapi-generator/FILES +6 -6
  2. package/CHANGELOG.md +10 -13
  3. package/README.md +135 -148
  4. package/api/invoice-processing-api.ts +2 -2
  5. package/dist/esm/models/chorus-pro-credentials.d.ts +19 -7
  6. package/dist/esm/models/chorus-pro-destination.d.ts +2 -2
  7. 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
  8. package/dist/{models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js → esm/models/facture-electronique-models-invoice-type-code.js} +66 -10
  9. 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
  10. 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
  11. package/dist/esm/models/get-chorus-pro-id-request.d.ts +2 -2
  12. package/dist/esm/models/get-invoice-request.d.ts +2 -2
  13. package/dist/esm/models/get-structure-request.d.ts +2 -2
  14. package/dist/esm/models/index.d.ts +3 -3
  15. package/dist/esm/models/index.js +3 -3
  16. package/dist/esm/models/invoice-input.d.ts +2 -2
  17. package/dist/esm/models/invoice-type-code.d.ts +6 -65
  18. package/dist/esm/models/invoice-type-code.js +6 -65
  19. package/dist/esm/models/recipient.d.ts +1 -1
  20. package/dist/esm/models/scheme-id.d.ts +7 -7
  21. package/dist/esm/models/scheme-id.js +7 -7
  22. package/dist/esm/models/search-structure-request.d.ts +2 -2
  23. package/dist/esm/models/simplified-invoice-data.d.ts +2 -2
  24. package/dist/esm/models/submit-complete-invoice-response.d.ts +1 -1
  25. package/dist/esm/models/submit-invoice-request.d.ts +2 -2
  26. package/dist/esm/models/supplier.d.ts +1 -1
  27. package/dist/esm/models/validate-cdarresponse.d.ts +3 -3
  28. package/dist/esm/models/validation-error-response.d.ts +3 -12
  29. package/dist/esm/src/helpers/client.d.ts +43 -265
  30. package/dist/esm/src/helpers/client.js +196 -779
  31. package/dist/esm/src/helpers/index.d.ts +1 -2
  32. package/dist/esm/src/helpers/index.js +1 -3
  33. package/dist/models/chorus-pro-credentials.d.ts +19 -7
  34. package/dist/models/chorus-pro-destination.d.ts +2 -2
  35. 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
  36. package/dist/models/facture-electronique-models-invoice-type-code.js +85 -0
  37. 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
  38. 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
  39. package/dist/models/get-chorus-pro-id-request.d.ts +2 -2
  40. package/dist/models/get-invoice-request.d.ts +2 -2
  41. package/dist/models/get-structure-request.d.ts +2 -2
  42. package/dist/models/index.d.ts +3 -3
  43. package/dist/models/index.js +3 -3
  44. package/dist/models/invoice-input.d.ts +2 -2
  45. package/dist/models/invoice-type-code.d.ts +6 -65
  46. package/dist/models/invoice-type-code.js +6 -65
  47. package/dist/models/recipient.d.ts +1 -1
  48. package/dist/models/scheme-id.d.ts +7 -7
  49. package/dist/models/scheme-id.js +7 -7
  50. package/dist/models/search-structure-request.d.ts +2 -2
  51. package/dist/models/simplified-invoice-data.d.ts +2 -2
  52. package/dist/models/submit-complete-invoice-response.d.ts +1 -1
  53. package/dist/models/submit-invoice-request.d.ts +2 -2
  54. package/dist/models/supplier.d.ts +1 -1
  55. package/dist/models/validate-cdarresponse.d.ts +3 -3
  56. package/dist/models/validation-error-response.d.ts +3 -12
  57. package/dist/src/helpers/client.d.ts +43 -265
  58. package/dist/src/helpers/client.js +199 -823
  59. package/dist/src/helpers/index.d.ts +1 -2
  60. package/dist/src/helpers/index.js +2 -12
  61. package/docs/ChorusProCredentials.md +9 -9
  62. package/docs/ChorusProDestination.md +1 -1
  63. package/docs/FactureElectroniqueModelsInvoiceTypeCode.md +39 -0
  64. package/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +27 -0
  65. package/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +29 -0
  66. package/docs/GetChorusProIdRequest.md +1 -1
  67. package/docs/GetInvoiceRequest.md +1 -1
  68. package/docs/GetStructureRequest.md +1 -1
  69. package/docs/InvoiceInput.md +1 -1
  70. package/docs/InvoiceTypeCode.md +6 -28
  71. package/docs/Recipient.md +1 -1
  72. package/docs/SchemeID.md +4 -4
  73. package/docs/SearchStructureRequest.md +1 -1
  74. package/docs/SimplifiedInvoiceData.md +1 -1
  75. package/docs/SubmitCompleteInvoiceResponse.md +2 -2
  76. package/docs/SubmitInvoiceRequest.md +1 -1
  77. package/docs/Supplier.md +1 -1
  78. package/docs/ValidateCDARResponse.md +2 -2
  79. package/docs/ValidationErrorResponse.md +3 -9
  80. package/models/chorus-pro-credentials.ts +19 -7
  81. package/models/chorus-pro-destination.ts +2 -2
  82. package/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts → facture-electronique-models-invoice-type-code.ts} +67 -18
  83. package/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.ts → facture-electronique-rest-api-schemas-cdar-validation-error-response.ts} +13 -4
  84. package/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.ts → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts} +11 -13
  85. package/models/get-chorus-pro-id-request.ts +2 -2
  86. package/models/get-invoice-request.ts +2 -2
  87. package/models/get-structure-request.ts +2 -2
  88. package/models/index.ts +3 -3
  89. package/models/invoice-input.ts +2 -2
  90. package/models/invoice-type-code.ts +6 -65
  91. package/models/recipient.ts +1 -1
  92. package/models/scheme-id.ts +7 -7
  93. package/models/search-structure-request.ts +2 -2
  94. package/models/simplified-invoice-data.ts +2 -2
  95. package/models/submit-complete-invoice-response.ts +1 -1
  96. package/models/submit-invoice-request.ts +2 -2
  97. package/models/supplier.ts +1 -1
  98. package/models/validate-cdarresponse.ts +3 -3
  99. package/models/validation-error-response.ts +3 -12
  100. package/package.json +1 -1
  101. package/src/helpers/client.ts +211 -834
  102. package/src/helpers/index.ts +1 -3
  103. package/dist/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts +0 -22
  104. package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -29
  105. package/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +0 -17
  106. package/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +0 -21
  107. /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
  108. /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
  109. /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
  110. /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, ChorusProCredentials, AFNORCredentials } from './client';
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.beneficiary = exports.recipient = exports.supplier = exports.electronicAddress = exports.postalAddress = exports.vatLine = exports.invoiceLine = exports.invoiceTotals = exports.amount = exports.FactPulseClient = exports.formatValidationError = exports.FactPulseValidationError = exports.FactPulsePollingTimeout = exports.FactPulseAuthError = exports.FactPulseError = void 0;
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
- // Helpers for amounts
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
- 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.
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** | | [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]
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
- chorusLogin,
24
- chorusPassword,
25
- sandboxMode,
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** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
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** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] [default to undefined]
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** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] [default to undefined]
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** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] [default to undefined]
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
 
@@ -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** | [**FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode**](FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md) | Invoice type code | [optional] [default to undefined]
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]
@@ -1,39 +1,17 @@
1
1
  # InvoiceTypeCode
2
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 |
3
+ Invoice type codes (UNTDID 1001).
4
4
 
5
5
  ## Enum
6
6
 
7
- * `INVOICE` (value: `'380'`)
7
+ * `_380` (value: `'380'`)
8
8
 
9
- * `SELF_BILLED_INVOICE` (value: `'389'`)
9
+ * `_381` (value: `'381'`)
10
10
 
11
- * `FACTORED_INVOICE` (value: `'393'`)
11
+ * `_384` (value: `'384'`)
12
12
 
13
- * `SELF_BILLED_FACTORED_INVOICE` (value: `'501'`)
13
+ * `_389` (value: `'389'`)
14
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'`)
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), mainly for electronic invoice addressing. **Possible values:** - `0225`: FR_SIREN - French SIREN (most common for France) - `0009`: FR_SIRET - French SIRET - `0002`: FR_SIREN_OLD - French SIREN (old code, for legal organization ID) - `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 (BT-34/BT-49)
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
- * `FR_SIREN` (value: `'0225'`)
7
+ * `FR_ELECTRONIC_ADDRESS` (value: `'0225'`)
8
8
 
9
- * `FR_SIRET` (value: `'0009'`)
9
+ * `FR_SIREN` (value: `'0002'`)
10
10
 
11
- * `FR_SIREN_OLD` (value: `'0002'`)
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** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] [default to undefined]
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** | [**InvoiceTypeCode**](InvoiceTypeCode.md) | Document type (UNTDID 1001). Default: 380 (Invoice). | [optional] [default to undefined]
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
- **pdfBase64** | **string** | Generated Factur-X PDF (and signed if requested) base64-encoded | [default to undefined]
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
- pdfBase64,
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** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] [default to undefined]
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<ValidationErrorResponse>**](ValidationErrorResponse.md) | Liste des erreurs | [optional] [default to undefined]
11
- **warnings** | [**Array<ValidationErrorResponse>**](ValidationErrorResponse.md) | Liste des avertissements | [optional] [default to undefined]
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
- Erreur de validation.
3
+ Response for validation errors.
4
4
 
5
5
  ## Properties
6
6
 
7
7
  Name | Type | Description | Notes
8
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']
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
- field,
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
- * 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.
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
- * [MODE 2] Use sandbox mode (default: True)
22
+ * PISTE Client ID (government API portal)
27
23
  */
28
- 'sandboxMode'?: boolean;
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 { ChorusProCredentials } from './chorus-pro-credentials';
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'?: ChorusProCredentials | null;
25
+ 'credentials'?: FactureElectroniqueRestApiSchemasProcessingChorusProCredentials | null;
26
26
  }
27
27
 
28
28
  export const ChorusProDestinationTypeEnum = {
@@ -15,28 +15,77 @@
15
15
 
16
16
 
17
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
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
- export interface FactureElectroniqueRestApiSchemasChorusProChorusProCredentials {
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
- * PISTE Client ID (government API portal)
23
- */
24
- 'pisteClientId': string;
51
+ * Self-billed Corrective Invoice
52
+ */
53
+ SELF_BILLED_CORRECTIVE_INVOICE: '471',
25
54
  /**
26
- * PISTE Client Secret
27
- */
28
- 'pisteClientSecret': string;
55
+ * Factored Corrective Invoice
56
+ */
57
+ FACTORED_CORRECTIVE_INVOICE: '472',
29
58
  /**
30
- * Chorus Pro login
31
- */
32
- 'chorusProLogin': string;
59
+ * Self-billed Factored Corrective Invoice
60
+ */
61
+ SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: '473',
33
62
  /**
34
- * Chorus Pro password
35
- */
36
- 'chorusProPassword': string;
63
+ * Credit Note
64
+ */
65
+ CREDIT_NOTE: '381',
37
66
  /**
38
- * Use sandbox environment (true) or production (false)
39
- */
40
- 'sandbox'?: boolean;
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
- * Response for validation errors.
18
+ * Erreur de validation.
19
19
  */
20
- export interface FactureElectroniqueRestApiSchemasValidationValidationErrorResponse {
20
+ export interface FactureElectroniqueRestApiSchemasCdarValidationErrorResponse {
21
21
  /**
22
- * List of detected validation errors.
22
+ * Champ concerné
23
23
  */
24
- 'detail': Array<string>;
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
- * Invoice type codes (UNTDID 1001).
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
- export const FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = {
22
- _380: '380',
23
- _381: '381',
24
- _384: '384',
25
- _389: '389',
26
- _386: '386'
27
- } as const;
28
-
29
- export type FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = typeof FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode[keyof typeof FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode];
30
-
31
-
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 { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
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'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
24
+ 'credentials'?: ChorusProCredentials | null;
25
25
  /**
26
26
  * Structure SIRET (14 digits)
27
27
  */