@factpulse/sdk 3.0.36 → 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 (58) hide show
  1. package/.openapi-generator/FILES +2 -2
  2. package/CHANGELOG.md +10 -13
  3. package/README.md +135 -148
  4. package/dist/esm/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts → facture-electronique-models-invoice-type-code.d.ts} +67 -8
  5. package/dist/esm/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js → facture-electronique-models-invoice-type-code.js} +66 -7
  6. package/dist/esm/models/index.d.ts +1 -1
  7. package/dist/esm/models/index.js +1 -1
  8. package/dist/esm/models/invoice-input.d.ts +2 -2
  9. package/dist/esm/models/invoice-type-code.d.ts +6 -65
  10. package/dist/esm/models/invoice-type-code.js +6 -65
  11. package/dist/esm/models/recipient.d.ts +1 -1
  12. package/dist/esm/models/scheme-id.d.ts +7 -7
  13. package/dist/esm/models/scheme-id.js +7 -7
  14. package/dist/esm/models/simplified-invoice-data.d.ts +2 -2
  15. package/dist/esm/models/submit-complete-invoice-response.d.ts +1 -1
  16. package/dist/esm/models/supplier.d.ts +1 -1
  17. package/dist/esm/src/helpers/client.d.ts +43 -265
  18. package/dist/esm/src/helpers/client.js +196 -779
  19. package/dist/esm/src/helpers/index.d.ts +1 -2
  20. package/dist/esm/src/helpers/index.js +1 -3
  21. package/dist/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts → facture-electronique-models-invoice-type-code.d.ts} +67 -8
  22. package/dist/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js → facture-electronique-models-invoice-type-code.js} +67 -8
  23. package/dist/models/index.d.ts +1 -1
  24. package/dist/models/index.js +1 -1
  25. package/dist/models/invoice-input.d.ts +2 -2
  26. package/dist/models/invoice-type-code.d.ts +6 -65
  27. package/dist/models/invoice-type-code.js +6 -65
  28. package/dist/models/recipient.d.ts +1 -1
  29. package/dist/models/scheme-id.d.ts +7 -7
  30. package/dist/models/scheme-id.js +7 -7
  31. package/dist/models/simplified-invoice-data.d.ts +2 -2
  32. package/dist/models/submit-complete-invoice-response.d.ts +1 -1
  33. package/dist/models/supplier.d.ts +1 -1
  34. package/dist/src/helpers/client.d.ts +43 -265
  35. package/dist/src/helpers/client.js +199 -823
  36. package/dist/src/helpers/index.d.ts +1 -2
  37. package/dist/src/helpers/index.js +2 -12
  38. package/docs/FactureElectroniqueModelsInvoiceTypeCode.md +39 -0
  39. package/docs/InvoiceInput.md +1 -1
  40. package/docs/InvoiceTypeCode.md +6 -28
  41. package/docs/Recipient.md +1 -1
  42. package/docs/SchemeID.md +4 -4
  43. package/docs/SimplifiedInvoiceData.md +1 -1
  44. package/docs/SubmitCompleteInvoiceResponse.md +2 -2
  45. package/docs/Supplier.md +1 -1
  46. package/models/{facture-electronique-rest-api-schemas-ereporting-invoice-type-code.ts → facture-electronique-models-invoice-type-code.ts} +67 -8
  47. package/models/index.ts +1 -1
  48. package/models/invoice-input.ts +2 -2
  49. package/models/invoice-type-code.ts +6 -65
  50. package/models/recipient.ts +1 -1
  51. package/models/scheme-id.ts +7 -7
  52. package/models/simplified-invoice-data.ts +2 -2
  53. package/models/submit-complete-invoice-response.ts +1 -1
  54. package/models/supplier.ts +1 -1
  55. package/package.json +1 -1
  56. package/src/helpers/client.ts +211 -834
  57. package/src/helpers/index.ts +1 -3
  58. package/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +0 -17
@@ -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; } });
@@ -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)
@@ -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
 
@@ -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
  ```
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]
@@ -15,18 +15,77 @@
15
15
 
16
16
 
17
17
  /**
18
- * Invoice type codes (UNTDID 1001).
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 FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = {
22
- _380: '380',
23
- _381: '381',
24
- _384: '384',
25
- _389: '389',
26
- _386: '386'
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',
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'
27
86
  } as const;
28
87
 
29
- export type FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = typeof FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode[keyof typeof FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode];
88
+ export type FactureElectroniqueModelsInvoiceTypeCode = typeof FactureElectroniqueModelsInvoiceTypeCode[keyof typeof FactureElectroniqueModelsInvoiceTypeCode];
30
89
 
31
90
 
32
91
 
package/models/index.ts CHANGED
@@ -145,8 +145,8 @@ export * from './error-source';
145
145
  export * from './extraction-info';
146
146
  export * from './factur-xinvoice';
147
147
  export * from './factur-xpdfinfo';
148
+ export * from './facture-electronique-models-invoice-type-code';
148
149
  export * from './facture-electronique-rest-api-schemas-cdar-validation-error-response';
149
- export * from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
150
150
  export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
151
151
  export * from './field-status';
152
152
  export * from './file-info';
@@ -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 { FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode } from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
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'?: FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode;
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
- * 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 |
18
+ * Invoice type codes (UNTDID 1001).
19
19
  */
20
20
 
21
21
  export const InvoiceTypeCode = {
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',
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];
@@ -27,7 +27,7 @@ import type { PostalAddress } from './postal-address';
27
27
  * Information about the invoice recipient / buyer (BG-7).
28
28
  */
29
29
  export interface Recipient {
30
- 'electronic_address': ElectronicAddress | null;
30
+ 'electronic_address'?: ElectronicAddress | null;
31
31
  'executing_service_code'?: string | null;
32
32
  'name'?: string | null;
33
33
  'siren'?: string | null;
@@ -15,22 +15,22 @@
15
15
 
16
16
 
17
17
  /**
18
- * 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)
18
+ * 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
19
19
  */
20
20
 
21
21
  export const SchemeID = {
22
22
  /**
23
- * FR_SIREN - French SIREN (most common for France)
23
+ * FR_ELECTRONIC_ADDRESS - French electronic billing address (BT-34/BT-49)
24
24
  */
25
- FR_SIREN: '0225',
25
+ FR_ELECTRONIC_ADDRESS: '0225',
26
26
  /**
27
- * FR_SIRET - French SIRET
27
+ * FR_SIREN - French SIREN (9 digits) - Legal organization ID
28
28
  */
29
- FR_SIRET: '0009',
29
+ FR_SIREN: '0002',
30
30
  /**
31
- * FR_SIREN_OLD - French SIREN (old code, for legal organization ID)
31
+ * FR_SIRET - French SIRET (14 digits) - Establishment ID
32
32
  */
33
- FR_SIREN_OLD: '0002',
33
+ FR_SIRET: '0009',
34
34
  /**
35
35
  * GLN - Global Location Number (GLN)
36
36
  */
@@ -15,7 +15,7 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { InvoiceTypeCode } from './invoice-type-code';
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'?: InvoiceTypeCode;
57
+ 'invoiceType'?: FactureElectroniqueModelsInvoiceTypeCode;
58
58
  'precedingInvoiceReference'?: string | null;
59
59
  'operationNature'?: OperationNature | null;
60
60
  'invoicingFramework'?: InvoicingFrameworkCode | null;
@@ -55,7 +55,7 @@ export interface SubmitCompleteInvoiceResponse {
55
55
  /**
56
56
  * Generated Factur-X PDF (and signed if requested) base64-encoded
57
57
  */
58
- 'pdfBase64': string;
58
+ 'contentB64': string;
59
59
  /**
60
60
  * Return message
61
61
  */
@@ -27,7 +27,7 @@ import type { PostalAddress } from './postal-address';
27
27
  * Information about the supplier / seller (BG-4).
28
28
  */
29
29
  export interface Supplier {
30
- 'electronic_address': ElectronicAddress | null;
30
+ 'electronic_address'?: ElectronicAddress | null;
31
31
  'supplier_id': number;
32
32
  'private_id'?: string | null;
33
33
  'supplier_bank_account_code'?: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factpulse/sdk",
3
- "version": "3.0.36",
3
+ "version": "4.0.0",
4
4
  "description": "OpenAPI client for @factpulse/sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {