@factpulse/sdk 3.0.25 → 3.0.26
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 +3 -3
- package/README.md +19 -38
- 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/esm/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js → facture-electronique-models-invoice-type-code.js} +66 -7
- package/dist/{models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts → esm/models/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 +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/search-structure-request.d.ts +2 -2
- package/dist/esm/models/simplified-invoice-data.d.ts +2 -2
- package/dist/esm/models/submit-invoice-request.d.ts +2 -2
- package/dist/esm/src/helpers/client.js +1 -1
- package/dist/models/chorus-pro-credentials.d.ts +19 -7
- package/dist/models/chorus-pro-destination.d.ts +2 -2
- 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-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts → facture-electronique-models-invoice-type-code.js} +67 -18
- package/dist/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts} +11 -13
- 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 +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/search-structure-request.d.ts +2 -2
- package/dist/models/simplified-invoice-data.d.ts +2 -2
- package/dist/models/submit-invoice-request.d.ts +2 -2
- package/dist/src/helpers/client.js +1 -1
- package/docs/ChorusProCredentials.md +9 -9
- package/docs/ChorusProDestination.md +1 -1
- package/docs/FactureElectroniqueModelsInvoiceTypeCode.md +39 -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/SearchStructureRequest.md +1 -1
- package/docs/SimplifiedInvoiceData.md +1 -1
- package/docs/SubmitInvoiceRequest.md +1 -1
- 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-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 +2 -2
- package/models/invoice-input.ts +2 -2
- package/models/invoice-type-code.ts +6 -65
- package/models/search-structure-request.ts +2 -2
- package/models/simplified-invoice-data.ts +2 -2
- package/models/submit-invoice-request.ts +2 -2
- package/package.json +1 -1
- package/src/helpers/client.ts +1 -1
- package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -29
- package/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +0 -17
- /package/dist/esm/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.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-processing-chorus-pro-credentials.js} +0 -0
|
@@ -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,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)
|
|
@@ -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]
|
|
@@ -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]
|
|
@@ -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,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
|
*/
|
|
@@ -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 an invoice.
|
|
22
22
|
*/
|
|
23
23
|
export interface GetInvoiceRequest {
|
|
24
|
-
'credentials'?:
|
|
24
|
+
'credentials'?: ChorusProCredentials | null;
|
|
25
25
|
/**
|
|
26
26
|
* Chorus Pro invoice ID
|
|
27
27
|
*/
|
|
@@ -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 structure details.
|
|
22
22
|
*/
|
|
23
23
|
export interface GetStructureRequest {
|
|
24
|
-
'credentials'?:
|
|
24
|
+
'credentials'?: ChorusProCredentials | null;
|
|
25
25
|
/**
|
|
26
26
|
* Chorus Pro structure ID
|
|
27
27
|
*/
|
package/models/index.ts
CHANGED
|
@@ -138,8 +138,8 @@ export * from './error-source';
|
|
|
138
138
|
export * from './extraction-info';
|
|
139
139
|
export * from './factur-xinvoice';
|
|
140
140
|
export * from './factur-xpdfinfo';
|
|
141
|
-
export * from './facture-electronique-
|
|
142
|
-
export * from './facture-electronique-rest-api-schemas-
|
|
141
|
+
export * from './facture-electronique-models-invoice-type-code';
|
|
142
|
+
export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
|
|
143
143
|
export * from './field-status';
|
|
144
144
|
export * from './file-info';
|
|
145
145
|
export * from './files-info';
|
package/models/invoice-input.ts
CHANGED
|
@@ -21,7 +21,7 @@ import type { Buyercountry } from './buyercountry';
|
|
|
21
21
|
import type { Currency } from './currency';
|
|
22
22
|
// May contain unused imports in some cases
|
|
23
23
|
// @ts-ignore
|
|
24
|
-
import type {
|
|
24
|
+
import type { InvoiceTypeCode } from './invoice-type-code';
|
|
25
25
|
// May contain unused imports in some cases
|
|
26
26
|
// @ts-ignore
|
|
27
27
|
import type { Sellercountry } from './sellercountry';
|
|
@@ -50,7 +50,7 @@ export interface InvoiceInput {
|
|
|
50
50
|
/**
|
|
51
51
|
* Invoice type code
|
|
52
52
|
*/
|
|
53
|
-
'typeCode'?:
|
|
53
|
+
'typeCode'?: InvoiceTypeCode;
|
|
54
54
|
'currency'?: Currency;
|
|
55
55
|
'dueDate'?: string | null;
|
|
56
56
|
/**
|
|
@@ -15,74 +15,15 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Invoice type codes (UNTDID 1001).
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
export const InvoiceTypeCode = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
* Self-billed Invoice
|
|
28
|
-
*/
|
|
29
|
-
SELF_BILLED_INVOICE: '389',
|
|
30
|
-
/**
|
|
31
|
-
* Factored Invoice
|
|
32
|
-
*/
|
|
33
|
-
FACTORED_INVOICE: '393',
|
|
34
|
-
/**
|
|
35
|
-
* Self-billed Factored Invoice
|
|
36
|
-
*/
|
|
37
|
-
SELF_BILLED_FACTORED_INVOICE: '501',
|
|
38
|
-
/**
|
|
39
|
-
* Prepayment Invoice
|
|
40
|
-
*/
|
|
41
|
-
PREPAYMENT_INVOICE: '386',
|
|
42
|
-
/**
|
|
43
|
-
* Self-billed Prepayment Invoice
|
|
44
|
-
*/
|
|
45
|
-
SELF_BILLED_PREPAYMENT_INVOICE: '500',
|
|
46
|
-
/**
|
|
47
|
-
* Corrective Invoice
|
|
48
|
-
*/
|
|
49
|
-
CORRECTIVE_INVOICE: '384',
|
|
50
|
-
/**
|
|
51
|
-
* Self-billed Corrective Invoice
|
|
52
|
-
*/
|
|
53
|
-
SELF_BILLED_CORRECTIVE_INVOICE: '471',
|
|
54
|
-
/**
|
|
55
|
-
* Factored Corrective Invoice
|
|
56
|
-
*/
|
|
57
|
-
FACTORED_CORRECTIVE_INVOICE: '472',
|
|
58
|
-
/**
|
|
59
|
-
* Self-billed Factored Corrective Invoice
|
|
60
|
-
*/
|
|
61
|
-
SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: '473',
|
|
62
|
-
/**
|
|
63
|
-
* Credit Note
|
|
64
|
-
*/
|
|
65
|
-
CREDIT_NOTE: '381',
|
|
66
|
-
/**
|
|
67
|
-
* Self-billed Credit Note
|
|
68
|
-
*/
|
|
69
|
-
SELF_BILLED_CREDIT_NOTE: '261',
|
|
70
|
-
/**
|
|
71
|
-
* Global Allowance Credit Note
|
|
72
|
-
*/
|
|
73
|
-
GLOBAL_ALLOWANCE_CREDIT_NOTE: '262',
|
|
74
|
-
/**
|
|
75
|
-
* Factored Credit Note
|
|
76
|
-
*/
|
|
77
|
-
FACTORED_CREDIT_NOTE: '396',
|
|
78
|
-
/**
|
|
79
|
-
* Self-billed Factored Credit Note
|
|
80
|
-
*/
|
|
81
|
-
SELF_BILLED_FACTORED_CREDIT_NOTE: '502',
|
|
82
|
-
/**
|
|
83
|
-
* Prepayment Credit Note
|
|
84
|
-
*/
|
|
85
|
-
PREPAYMENT_CREDIT_NOTE: '503'
|
|
22
|
+
_380: '380',
|
|
23
|
+
_381: '381',
|
|
24
|
+
_384: '384',
|
|
25
|
+
_389: '389',
|
|
26
|
+
_386: '386'
|
|
86
27
|
} as const;
|
|
87
28
|
|
|
88
29
|
export type InvoiceTypeCode = typeof InvoiceTypeCode[keyof typeof InvoiceTypeCode];
|
|
@@ -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
|
* Search structures by criteria.
|
|
22
22
|
*/
|
|
23
23
|
export interface SearchStructureRequest {
|
|
24
|
-
'credentials'?:
|
|
24
|
+
'credentials'?: ChorusProCredentials | null;
|
|
25
25
|
'structureIdentifier'?: string | null;
|
|
26
26
|
'structureIdentifierType'?: string | null;
|
|
27
27
|
'companyName'?: string | null;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
// May contain unused imports in some cases
|
|
17
17
|
// @ts-ignore
|
|
18
|
-
import type {
|
|
18
|
+
import type { FactureElectroniqueModelsInvoiceTypeCode } from './facture-electronique-models-invoice-type-code';
|
|
19
19
|
// May contain unused imports in some cases
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
import type { InvoicingFrameworkCode } from './invoicing-framework-code';
|
|
@@ -54,7 +54,7 @@ export interface SimplifiedInvoiceData {
|
|
|
54
54
|
/**
|
|
55
55
|
* Document type (UNTDID 1001). Default: 380 (Invoice).
|
|
56
56
|
*/
|
|
57
|
-
'invoiceType'?:
|
|
57
|
+
'invoiceType'?: FactureElectroniqueModelsInvoiceTypeCode;
|
|
58
58
|
'precedingInvoiceReference'?: string | null;
|
|
59
59
|
'operationNature'?: OperationNature | null;
|
|
60
60
|
'invoicingFramework'?: InvoicingFrameworkCode | null;
|