@factpulse/sdk 3.0.35 → 3.0.37
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 +2 -2
- package/CHANGELOG.md +3 -3
- package/dist/esm/models/{facture-electronique-models-invoice-type-code.d.ts → facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts} +8 -67
- package/dist/esm/models/{facture-electronique-models-invoice-type-code.js → facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js} +7 -66
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/esm/models/invoice-input.d.ts +2 -2
- package/dist/esm/models/invoice-type-code.d.ts +65 -6
- package/dist/esm/models/invoice-type-code.js +65 -6
- package/dist/esm/models/simplified-invoice-data.d.ts +2 -2
- package/dist/esm/src/helpers/client.d.ts +2 -2
- package/dist/esm/src/helpers/client.js +9 -9
- package/dist/models/{facture-electronique-models-invoice-type-code.d.ts → facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts} +8 -67
- package/dist/models/{facture-electronique-models-invoice-type-code.js → facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js} +8 -67
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/invoice-input.d.ts +2 -2
- package/dist/models/invoice-type-code.d.ts +65 -6
- package/dist/models/invoice-type-code.js +65 -6
- package/dist/models/simplified-invoice-data.d.ts +2 -2
- package/dist/src/helpers/client.d.ts +2 -2
- package/dist/src/helpers/client.js +9 -9
- package/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +17 -0
- package/docs/InvoiceInput.md +1 -1
- package/docs/InvoiceTypeCode.md +28 -6
- package/docs/SimplifiedInvoiceData.md +1 -1
- package/models/{facture-electronique-models-invoice-type-code.ts → facture-electronique-rest-api-schemas-ereporting-invoice-type-code.ts} +8 -67
- package/models/index.ts +1 -1
- package/models/invoice-input.ts +2 -2
- package/models/invoice-type-code.ts +65 -6
- package/models/simplified-invoice-data.ts +2 -2
- package/package.json +1 -1
- package/src/helpers/client.ts +11 -11
- package/docs/FactureElectroniqueModelsInvoiceTypeCode.md +0 -39
package/.openapi-generator/FILES
CHANGED
|
@@ -173,8 +173,8 @@ docs/ErrorSource.md
|
|
|
173
173
|
docs/ExtractionInfo.md
|
|
174
174
|
docs/FacturXInvoice.md
|
|
175
175
|
docs/FacturXPDFInfo.md
|
|
176
|
-
docs/FactureElectroniqueModelsInvoiceTypeCode.md
|
|
177
176
|
docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md
|
|
177
|
+
docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md
|
|
178
178
|
docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md
|
|
179
179
|
docs/FieldStatus.md
|
|
180
180
|
docs/FileInfo.md
|
|
@@ -472,8 +472,8 @@ models/error-source.ts
|
|
|
472
472
|
models/extraction-info.ts
|
|
473
473
|
models/factur-xinvoice.ts
|
|
474
474
|
models/factur-xpdfinfo.ts
|
|
475
|
-
models/facture-electronique-models-invoice-type-code.ts
|
|
476
475
|
models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts
|
|
476
|
+
models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.ts
|
|
477
477
|
models/facture-electronique-rest-api-schemas-validation-validation-error-response.ts
|
|
478
478
|
models/field-status.ts
|
|
479
479
|
models/file-info.ts
|
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,7 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [3.0.
|
|
10
|
+
## [3.0.37] - 2026-01-17
|
|
11
11
|
|
|
12
12
|
### Added
|
|
13
13
|
- Version initiale du SDK typescript
|
|
@@ -20,5 +20,5 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
20
20
|
- Documentation complète et exemples
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
[Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v3.0.
|
|
24
|
-
[3.0.
|
|
23
|
+
[Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v3.0.37...HEAD
|
|
24
|
+
[3.0.37]: https://github.com/factpulse/sdk-typescript/releases/tag/v3.0.37
|
|
@@ -10,72 +10,13 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Invoice type codes (UNTDID 1001).
|
|
14
14
|
*/
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
* Self-billed Invoice
|
|
22
|
-
*/
|
|
23
|
-
readonly SELF_BILLED_INVOICE: "389";
|
|
24
|
-
/**
|
|
25
|
-
* Factored Invoice
|
|
26
|
-
*/
|
|
27
|
-
readonly FACTORED_INVOICE: "393";
|
|
28
|
-
/**
|
|
29
|
-
* Self-billed Factored Invoice
|
|
30
|
-
*/
|
|
31
|
-
readonly SELF_BILLED_FACTORED_INVOICE: "501";
|
|
32
|
-
/**
|
|
33
|
-
* Prepayment Invoice
|
|
34
|
-
*/
|
|
35
|
-
readonly PREPAYMENT_INVOICE: "386";
|
|
36
|
-
/**
|
|
37
|
-
* Self-billed Prepayment Invoice
|
|
38
|
-
*/
|
|
39
|
-
readonly SELF_BILLED_PREPAYMENT_INVOICE: "500";
|
|
40
|
-
/**
|
|
41
|
-
* Corrective Invoice
|
|
42
|
-
*/
|
|
43
|
-
readonly CORRECTIVE_INVOICE: "384";
|
|
44
|
-
/**
|
|
45
|
-
* Self-billed Corrective Invoice
|
|
46
|
-
*/
|
|
47
|
-
readonly SELF_BILLED_CORRECTIVE_INVOICE: "471";
|
|
48
|
-
/**
|
|
49
|
-
* Factored Corrective Invoice
|
|
50
|
-
*/
|
|
51
|
-
readonly FACTORED_CORRECTIVE_INVOICE: "472";
|
|
52
|
-
/**
|
|
53
|
-
* Self-billed Factored Corrective Invoice
|
|
54
|
-
*/
|
|
55
|
-
readonly SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: "473";
|
|
56
|
-
/**
|
|
57
|
-
* Credit Note
|
|
58
|
-
*/
|
|
59
|
-
readonly CREDIT_NOTE: "381";
|
|
60
|
-
/**
|
|
61
|
-
* Self-billed Credit Note
|
|
62
|
-
*/
|
|
63
|
-
readonly SELF_BILLED_CREDIT_NOTE: "261";
|
|
64
|
-
/**
|
|
65
|
-
* Global Allowance Credit Note
|
|
66
|
-
*/
|
|
67
|
-
readonly GLOBAL_ALLOWANCE_CREDIT_NOTE: "262";
|
|
68
|
-
/**
|
|
69
|
-
* Factored Credit Note
|
|
70
|
-
*/
|
|
71
|
-
readonly FACTORED_CREDIT_NOTE: "396";
|
|
72
|
-
/**
|
|
73
|
-
* Self-billed Factored Credit Note
|
|
74
|
-
*/
|
|
75
|
-
readonly SELF_BILLED_FACTORED_CREDIT_NOTE: "502";
|
|
76
|
-
/**
|
|
77
|
-
* Prepayment Credit Note
|
|
78
|
-
*/
|
|
79
|
-
readonly PREPAYMENT_CREDIT_NOTE: "503";
|
|
15
|
+
export declare const FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode: {
|
|
16
|
+
readonly _380: "380";
|
|
17
|
+
readonly _381: "381";
|
|
18
|
+
readonly _384: "384";
|
|
19
|
+
readonly _389: "389";
|
|
20
|
+
readonly _386: "386";
|
|
80
21
|
};
|
|
81
|
-
export type
|
|
22
|
+
export type FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = typeof FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode[keyof typeof FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode];
|
|
@@ -12,71 +12,12 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Invoice type codes (UNTDID 1001).
|
|
16
16
|
*/
|
|
17
|
-
export const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* Self-billed Invoice
|
|
24
|
-
*/
|
|
25
|
-
SELF_BILLED_INVOICE: '389',
|
|
26
|
-
/**
|
|
27
|
-
* Factored Invoice
|
|
28
|
-
*/
|
|
29
|
-
FACTORED_INVOICE: '393',
|
|
30
|
-
/**
|
|
31
|
-
* Self-billed Factored Invoice
|
|
32
|
-
*/
|
|
33
|
-
SELF_BILLED_FACTORED_INVOICE: '501',
|
|
34
|
-
/**
|
|
35
|
-
* Prepayment Invoice
|
|
36
|
-
*/
|
|
37
|
-
PREPAYMENT_INVOICE: '386',
|
|
38
|
-
/**
|
|
39
|
-
* Self-billed Prepayment Invoice
|
|
40
|
-
*/
|
|
41
|
-
SELF_BILLED_PREPAYMENT_INVOICE: '500',
|
|
42
|
-
/**
|
|
43
|
-
* Corrective Invoice
|
|
44
|
-
*/
|
|
45
|
-
CORRECTIVE_INVOICE: '384',
|
|
46
|
-
/**
|
|
47
|
-
* Self-billed Corrective Invoice
|
|
48
|
-
*/
|
|
49
|
-
SELF_BILLED_CORRECTIVE_INVOICE: '471',
|
|
50
|
-
/**
|
|
51
|
-
* Factored Corrective Invoice
|
|
52
|
-
*/
|
|
53
|
-
FACTORED_CORRECTIVE_INVOICE: '472',
|
|
54
|
-
/**
|
|
55
|
-
* Self-billed Factored Corrective Invoice
|
|
56
|
-
*/
|
|
57
|
-
SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: '473',
|
|
58
|
-
/**
|
|
59
|
-
* Credit Note
|
|
60
|
-
*/
|
|
61
|
-
CREDIT_NOTE: '381',
|
|
62
|
-
/**
|
|
63
|
-
* Self-billed Credit Note
|
|
64
|
-
*/
|
|
65
|
-
SELF_BILLED_CREDIT_NOTE: '261',
|
|
66
|
-
/**
|
|
67
|
-
* Global Allowance Credit Note
|
|
68
|
-
*/
|
|
69
|
-
GLOBAL_ALLOWANCE_CREDIT_NOTE: '262',
|
|
70
|
-
/**
|
|
71
|
-
* Factored Credit Note
|
|
72
|
-
*/
|
|
73
|
-
FACTORED_CREDIT_NOTE: '396',
|
|
74
|
-
/**
|
|
75
|
-
* Self-billed Factored Credit Note
|
|
76
|
-
*/
|
|
77
|
-
SELF_BILLED_FACTORED_CREDIT_NOTE: '502',
|
|
78
|
-
/**
|
|
79
|
-
* Prepayment Credit Note
|
|
80
|
-
*/
|
|
81
|
-
PREPAYMENT_CREDIT_NOTE: '503'
|
|
17
|
+
export const FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = {
|
|
18
|
+
_380: '380',
|
|
19
|
+
_381: '381',
|
|
20
|
+
_384: '384',
|
|
21
|
+
_389: '389',
|
|
22
|
+
_386: '386'
|
|
82
23
|
};
|
|
@@ -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';
|
|
149
148
|
export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
|
|
149
|
+
export * from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
|
|
150
150
|
export * from './facture-electronique-rest-api-schemas-validation-validation-error-response';
|
|
151
151
|
export * from './field-status';
|
|
152
152
|
export * from './file-info';
|
package/dist/esm/models/index.js
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';
|
|
149
148
|
export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
|
|
149
|
+
export * from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
|
|
150
150
|
export * from './facture-electronique-rest-api-schemas-validation-validation-error-response';
|
|
151
151
|
export * from './field-status';
|
|
152
152
|
export * from './file-info';
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { Buyercountry } from './buyercountry';
|
|
13
13
|
import type { Currency } from './currency';
|
|
14
|
-
import type {
|
|
14
|
+
import type { FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode } from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
|
|
15
15
|
import type { Sellercountry } from './sellercountry';
|
|
16
16
|
import type { TaxBreakdownInput } from './tax-breakdown-input';
|
|
17
17
|
import type { Taxamount1 } from './taxamount1';
|
|
@@ -31,7 +31,7 @@ export interface InvoiceInput {
|
|
|
31
31
|
/**
|
|
32
32
|
* Invoice type code
|
|
33
33
|
*/
|
|
34
|
-
'typeCode'?:
|
|
34
|
+
'typeCode'?: FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode;
|
|
35
35
|
'currency'?: Currency;
|
|
36
36
|
'dueDate'?: string | null;
|
|
37
37
|
/**
|
|
@@ -10,13 +10,72 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Document type according to BR-FR-04 (UNTDID 1001 codes). | Code | Name | Description | |------|------|-------------| | 380 | INVOICE | Commercial invoice | | 389 | SELF_BILLED_INVOICE | Self-billed invoice | | 393 | FACTORED_INVOICE | Factored invoice | | 501 | SELF_BILLED_FACTORED_INVOICE | Self-billed factored invoice | | 386 | PREPAYMENT_INVOICE | Prepayment invoice | | 500 | SELF_BILLED_PREPAYMENT_INVOICE | Self-billed prepayment invoice | | 384 | CORRECTIVE_INVOICE | Corrective invoice | | 471 | SELF_BILLED_CORRECTIVE_INVOICE | Self-billed corrective invoice | | 472 | FACTORED_CORRECTIVE_INVOICE | Factored corrective invoice | | 473 | SELF_BILLED_FACTORED_CORRECTIVE_INVOICE | Self-billed factored corrective invoice | | 381 | CREDIT_NOTE | Credit note | | 261 | SELF_BILLED_CREDIT_NOTE | Self-billed credit note | | 262 | GLOBAL_ALLOWANCE_CREDIT_NOTE | Credit note for global allowance | | 396 | FACTORED_CREDIT_NOTE | Factored credit note | | 502 | SELF_BILLED_FACTORED_CREDIT_NOTE | Self-billed factored credit note | | 503 | PREPAYMENT_CREDIT_NOTE | Credit note for prepayment invoice |
|
|
14
14
|
*/
|
|
15
15
|
export declare const InvoiceTypeCode: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly
|
|
20
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Commercial Invoice
|
|
18
|
+
*/
|
|
19
|
+
readonly INVOICE: "380";
|
|
20
|
+
/**
|
|
21
|
+
* Self-billed Invoice
|
|
22
|
+
*/
|
|
23
|
+
readonly SELF_BILLED_INVOICE: "389";
|
|
24
|
+
/**
|
|
25
|
+
* Factored Invoice
|
|
26
|
+
*/
|
|
27
|
+
readonly FACTORED_INVOICE: "393";
|
|
28
|
+
/**
|
|
29
|
+
* Self-billed Factored Invoice
|
|
30
|
+
*/
|
|
31
|
+
readonly SELF_BILLED_FACTORED_INVOICE: "501";
|
|
32
|
+
/**
|
|
33
|
+
* Prepayment Invoice
|
|
34
|
+
*/
|
|
35
|
+
readonly PREPAYMENT_INVOICE: "386";
|
|
36
|
+
/**
|
|
37
|
+
* Self-billed Prepayment Invoice
|
|
38
|
+
*/
|
|
39
|
+
readonly SELF_BILLED_PREPAYMENT_INVOICE: "500";
|
|
40
|
+
/**
|
|
41
|
+
* Corrective Invoice
|
|
42
|
+
*/
|
|
43
|
+
readonly CORRECTIVE_INVOICE: "384";
|
|
44
|
+
/**
|
|
45
|
+
* Self-billed Corrective Invoice
|
|
46
|
+
*/
|
|
47
|
+
readonly SELF_BILLED_CORRECTIVE_INVOICE: "471";
|
|
48
|
+
/**
|
|
49
|
+
* Factored Corrective Invoice
|
|
50
|
+
*/
|
|
51
|
+
readonly FACTORED_CORRECTIVE_INVOICE: "472";
|
|
52
|
+
/**
|
|
53
|
+
* Self-billed Factored Corrective Invoice
|
|
54
|
+
*/
|
|
55
|
+
readonly SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: "473";
|
|
56
|
+
/**
|
|
57
|
+
* Credit Note
|
|
58
|
+
*/
|
|
59
|
+
readonly CREDIT_NOTE: "381";
|
|
60
|
+
/**
|
|
61
|
+
* Self-billed Credit Note
|
|
62
|
+
*/
|
|
63
|
+
readonly SELF_BILLED_CREDIT_NOTE: "261";
|
|
64
|
+
/**
|
|
65
|
+
* Global Allowance Credit Note
|
|
66
|
+
*/
|
|
67
|
+
readonly GLOBAL_ALLOWANCE_CREDIT_NOTE: "262";
|
|
68
|
+
/**
|
|
69
|
+
* Factored Credit Note
|
|
70
|
+
*/
|
|
71
|
+
readonly FACTORED_CREDIT_NOTE: "396";
|
|
72
|
+
/**
|
|
73
|
+
* Self-billed Factored Credit Note
|
|
74
|
+
*/
|
|
75
|
+
readonly SELF_BILLED_FACTORED_CREDIT_NOTE: "502";
|
|
76
|
+
/**
|
|
77
|
+
* Prepayment Credit Note
|
|
78
|
+
*/
|
|
79
|
+
readonly PREPAYMENT_CREDIT_NOTE: "503";
|
|
21
80
|
};
|
|
22
81
|
export type InvoiceTypeCode = typeof InvoiceTypeCode[keyof typeof InvoiceTypeCode];
|
|
@@ -12,12 +12,71 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Document type according to BR-FR-04 (UNTDID 1001 codes). | Code | Name | Description | |------|------|-------------| | 380 | INVOICE | Commercial invoice | | 389 | SELF_BILLED_INVOICE | Self-billed invoice | | 393 | FACTORED_INVOICE | Factored invoice | | 501 | SELF_BILLED_FACTORED_INVOICE | Self-billed factored invoice | | 386 | PREPAYMENT_INVOICE | Prepayment invoice | | 500 | SELF_BILLED_PREPAYMENT_INVOICE | Self-billed prepayment invoice | | 384 | CORRECTIVE_INVOICE | Corrective invoice | | 471 | SELF_BILLED_CORRECTIVE_INVOICE | Self-billed corrective invoice | | 472 | FACTORED_CORRECTIVE_INVOICE | Factored corrective invoice | | 473 | SELF_BILLED_FACTORED_CORRECTIVE_INVOICE | Self-billed factored corrective invoice | | 381 | CREDIT_NOTE | Credit note | | 261 | SELF_BILLED_CREDIT_NOTE | Self-billed credit note | | 262 | GLOBAL_ALLOWANCE_CREDIT_NOTE | Credit note for global allowance | | 396 | FACTORED_CREDIT_NOTE | Factored credit note | | 502 | SELF_BILLED_FACTORED_CREDIT_NOTE | Self-billed factored credit note | | 503 | PREPAYMENT_CREDIT_NOTE | Credit note for prepayment invoice |
|
|
16
16
|
*/
|
|
17
17
|
export const InvoiceTypeCode = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Commercial Invoice
|
|
20
|
+
*/
|
|
21
|
+
INVOICE: '380',
|
|
22
|
+
/**
|
|
23
|
+
* Self-billed Invoice
|
|
24
|
+
*/
|
|
25
|
+
SELF_BILLED_INVOICE: '389',
|
|
26
|
+
/**
|
|
27
|
+
* Factored Invoice
|
|
28
|
+
*/
|
|
29
|
+
FACTORED_INVOICE: '393',
|
|
30
|
+
/**
|
|
31
|
+
* Self-billed Factored Invoice
|
|
32
|
+
*/
|
|
33
|
+
SELF_BILLED_FACTORED_INVOICE: '501',
|
|
34
|
+
/**
|
|
35
|
+
* Prepayment Invoice
|
|
36
|
+
*/
|
|
37
|
+
PREPAYMENT_INVOICE: '386',
|
|
38
|
+
/**
|
|
39
|
+
* Self-billed Prepayment Invoice
|
|
40
|
+
*/
|
|
41
|
+
SELF_BILLED_PREPAYMENT_INVOICE: '500',
|
|
42
|
+
/**
|
|
43
|
+
* Corrective Invoice
|
|
44
|
+
*/
|
|
45
|
+
CORRECTIVE_INVOICE: '384',
|
|
46
|
+
/**
|
|
47
|
+
* Self-billed Corrective Invoice
|
|
48
|
+
*/
|
|
49
|
+
SELF_BILLED_CORRECTIVE_INVOICE: '471',
|
|
50
|
+
/**
|
|
51
|
+
* Factored Corrective Invoice
|
|
52
|
+
*/
|
|
53
|
+
FACTORED_CORRECTIVE_INVOICE: '472',
|
|
54
|
+
/**
|
|
55
|
+
* Self-billed Factored Corrective Invoice
|
|
56
|
+
*/
|
|
57
|
+
SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: '473',
|
|
58
|
+
/**
|
|
59
|
+
* Credit Note
|
|
60
|
+
*/
|
|
61
|
+
CREDIT_NOTE: '381',
|
|
62
|
+
/**
|
|
63
|
+
* Self-billed Credit Note
|
|
64
|
+
*/
|
|
65
|
+
SELF_BILLED_CREDIT_NOTE: '261',
|
|
66
|
+
/**
|
|
67
|
+
* Global Allowance Credit Note
|
|
68
|
+
*/
|
|
69
|
+
GLOBAL_ALLOWANCE_CREDIT_NOTE: '262',
|
|
70
|
+
/**
|
|
71
|
+
* Factored Credit Note
|
|
72
|
+
*/
|
|
73
|
+
FACTORED_CREDIT_NOTE: '396',
|
|
74
|
+
/**
|
|
75
|
+
* Self-billed Factored Credit Note
|
|
76
|
+
*/
|
|
77
|
+
SELF_BILLED_FACTORED_CREDIT_NOTE: '502',
|
|
78
|
+
/**
|
|
79
|
+
* Prepayment Credit Note
|
|
80
|
+
*/
|
|
81
|
+
PREPAYMENT_CREDIT_NOTE: '503'
|
|
23
82
|
};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { InvoiceTypeCode } from './invoice-type-code';
|
|
13
13
|
import type { InvoicingFrameworkCode } from './invoicing-framework-code';
|
|
14
14
|
import type { OperationNature } from './operation-nature';
|
|
15
15
|
/**
|
|
@@ -49,7 +49,7 @@ export interface SimplifiedInvoiceData {
|
|
|
49
49
|
/**
|
|
50
50
|
* Document type (UNTDID 1001). Default: 380 (Invoice).
|
|
51
51
|
*/
|
|
52
|
-
'invoiceType'?:
|
|
52
|
+
'invoiceType'?: InvoiceTypeCode;
|
|
53
53
|
'precedingInvoiceReference'?: string | null;
|
|
54
54
|
'operationNature'?: OperationNature | null;
|
|
55
55
|
'invoicingFramework'?: InvoicingFrameworkCode | null;
|
|
@@ -256,7 +256,7 @@ export declare class FactPulseClient {
|
|
|
256
256
|
* @param invoiceData Invoice data
|
|
257
257
|
* @param pdfPath Path to the source PDF
|
|
258
258
|
* @param options Workflow options
|
|
259
|
-
* @returns Result with
|
|
259
|
+
* @returns Result with pdfBytes, validation, signature and afnor
|
|
260
260
|
*/
|
|
261
261
|
generateCompleteFacturx(invoiceData: Record<string, unknown>, pdfPath: string, options?: {
|
|
262
262
|
profile?: string;
|
|
@@ -267,7 +267,7 @@ export declare class FactPulseClient {
|
|
|
267
267
|
afnorTrackingId?: string;
|
|
268
268
|
timeout?: number;
|
|
269
269
|
}): Promise<{
|
|
270
|
-
|
|
270
|
+
pdfBytes: Buffer;
|
|
271
271
|
validation?: Record<string, unknown>;
|
|
272
272
|
signature?: {
|
|
273
273
|
signed: boolean;
|
|
@@ -303,7 +303,7 @@ export class FactPulseClient {
|
|
|
303
303
|
for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {
|
|
304
304
|
yield this.ensureAuthenticated();
|
|
305
305
|
const form = new FormData();
|
|
306
|
-
form.append('invoice_data', jsonData, { contentType: 'application/json'
|
|
306
|
+
form.append('invoice_data', Buffer.from(jsonData, 'utf-8'), { contentType: 'application/json' });
|
|
307
307
|
form.append('profile', profile);
|
|
308
308
|
form.append('output_format', outputFormat);
|
|
309
309
|
form.append('source_pdf', fs.createReadStream(pdfPath), { filename: path.basename(pdfPath), contentType: 'application/pdf' });
|
|
@@ -808,18 +808,18 @@ export class FactPulseClient {
|
|
|
808
808
|
* @param invoiceData Invoice data
|
|
809
809
|
* @param pdfPath Path to the source PDF
|
|
810
810
|
* @param options Workflow options
|
|
811
|
-
* @returns Result with
|
|
811
|
+
* @returns Result with pdfBytes, validation, signature and afnor
|
|
812
812
|
*/
|
|
813
813
|
generateCompleteFacturx(invoiceData_1, pdfPath_1) {
|
|
814
814
|
return __awaiter(this, arguments, void 0, function* (invoiceData, pdfPath, options = {}) {
|
|
815
815
|
const { profile = 'EN16931', validate = true, sign = false, submitAfnor = false, afnorFlowName, afnorTrackingId, timeout, } = options;
|
|
816
|
-
const result = {
|
|
816
|
+
const result = { pdfBytes: Buffer.alloc(0) };
|
|
817
817
|
// 1. Generation
|
|
818
|
-
const
|
|
819
|
-
result.
|
|
818
|
+
const pdfBytes = yield this.generateFacturx(invoiceData, pdfPath, profile, 'pdf', true, timeout);
|
|
819
|
+
result.pdfBytes = pdfBytes;
|
|
820
820
|
// 2. Validation
|
|
821
821
|
if (validate) {
|
|
822
|
-
const validation = yield this.validateFacturxPdf(
|
|
822
|
+
const validation = yield this.validateFacturxPdf(pdfBytes, { profile });
|
|
823
823
|
result.validation = validation;
|
|
824
824
|
if (!validation.isCompliant) {
|
|
825
825
|
return result;
|
|
@@ -827,8 +827,8 @@ export class FactPulseClient {
|
|
|
827
827
|
}
|
|
828
828
|
// 3. Signature (uses the server-configured certificate)
|
|
829
829
|
if (sign) {
|
|
830
|
-
const signedPdf = yield this.signPdf(result.
|
|
831
|
-
result.
|
|
830
|
+
const signedPdf = yield this.signPdf(result.pdfBytes);
|
|
831
|
+
result.pdfBytes = signedPdf;
|
|
832
832
|
result.signature = { signed: true };
|
|
833
833
|
}
|
|
834
834
|
// 4. AFNOR submission
|
|
@@ -836,7 +836,7 @@ export class FactPulseClient {
|
|
|
836
836
|
const invoiceNumber = (invoiceData.invoiceNumber || invoiceData.invoice_number || 'INVOICE');
|
|
837
837
|
const flowName = afnorFlowName || `Invoice ${invoiceNumber}`;
|
|
838
838
|
const trackingId = afnorTrackingId || invoiceNumber;
|
|
839
|
-
const afnorResult = yield this.submitInvoiceAfnor(result.
|
|
839
|
+
const afnorResult = yield this.submitInvoiceAfnor(result.pdfBytes, flowName, { trackingId });
|
|
840
840
|
result.afnor = afnorResult;
|
|
841
841
|
}
|
|
842
842
|
return result;
|
|
@@ -10,72 +10,13 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Invoice type codes (UNTDID 1001).
|
|
14
14
|
*/
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
* Self-billed Invoice
|
|
22
|
-
*/
|
|
23
|
-
readonly SELF_BILLED_INVOICE: "389";
|
|
24
|
-
/**
|
|
25
|
-
* Factored Invoice
|
|
26
|
-
*/
|
|
27
|
-
readonly FACTORED_INVOICE: "393";
|
|
28
|
-
/**
|
|
29
|
-
* Self-billed Factored Invoice
|
|
30
|
-
*/
|
|
31
|
-
readonly SELF_BILLED_FACTORED_INVOICE: "501";
|
|
32
|
-
/**
|
|
33
|
-
* Prepayment Invoice
|
|
34
|
-
*/
|
|
35
|
-
readonly PREPAYMENT_INVOICE: "386";
|
|
36
|
-
/**
|
|
37
|
-
* Self-billed Prepayment Invoice
|
|
38
|
-
*/
|
|
39
|
-
readonly SELF_BILLED_PREPAYMENT_INVOICE: "500";
|
|
40
|
-
/**
|
|
41
|
-
* Corrective Invoice
|
|
42
|
-
*/
|
|
43
|
-
readonly CORRECTIVE_INVOICE: "384";
|
|
44
|
-
/**
|
|
45
|
-
* Self-billed Corrective Invoice
|
|
46
|
-
*/
|
|
47
|
-
readonly SELF_BILLED_CORRECTIVE_INVOICE: "471";
|
|
48
|
-
/**
|
|
49
|
-
* Factored Corrective Invoice
|
|
50
|
-
*/
|
|
51
|
-
readonly FACTORED_CORRECTIVE_INVOICE: "472";
|
|
52
|
-
/**
|
|
53
|
-
* Self-billed Factored Corrective Invoice
|
|
54
|
-
*/
|
|
55
|
-
readonly SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: "473";
|
|
56
|
-
/**
|
|
57
|
-
* Credit Note
|
|
58
|
-
*/
|
|
59
|
-
readonly CREDIT_NOTE: "381";
|
|
60
|
-
/**
|
|
61
|
-
* Self-billed Credit Note
|
|
62
|
-
*/
|
|
63
|
-
readonly SELF_BILLED_CREDIT_NOTE: "261";
|
|
64
|
-
/**
|
|
65
|
-
* Global Allowance Credit Note
|
|
66
|
-
*/
|
|
67
|
-
readonly GLOBAL_ALLOWANCE_CREDIT_NOTE: "262";
|
|
68
|
-
/**
|
|
69
|
-
* Factored Credit Note
|
|
70
|
-
*/
|
|
71
|
-
readonly FACTORED_CREDIT_NOTE: "396";
|
|
72
|
-
/**
|
|
73
|
-
* Self-billed Factored Credit Note
|
|
74
|
-
*/
|
|
75
|
-
readonly SELF_BILLED_FACTORED_CREDIT_NOTE: "502";
|
|
76
|
-
/**
|
|
77
|
-
* Prepayment Credit Note
|
|
78
|
-
*/
|
|
79
|
-
readonly PREPAYMENT_CREDIT_NOTE: "503";
|
|
15
|
+
export declare const FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode: {
|
|
16
|
+
readonly _380: "380";
|
|
17
|
+
readonly _381: "381";
|
|
18
|
+
readonly _384: "384";
|
|
19
|
+
readonly _389: "389";
|
|
20
|
+
readonly _386: "386";
|
|
80
21
|
};
|
|
81
|
-
export type
|
|
22
|
+
export type FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = typeof FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode[keyof typeof FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode];
|
|
@@ -13,73 +13,14 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
16
|
+
exports.FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = void 0;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Invoice type codes (UNTDID 1001).
|
|
19
19
|
*/
|
|
20
|
-
exports.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* Self-billed Invoice
|
|
27
|
-
*/
|
|
28
|
-
SELF_BILLED_INVOICE: '389',
|
|
29
|
-
/**
|
|
30
|
-
* Factored Invoice
|
|
31
|
-
*/
|
|
32
|
-
FACTORED_INVOICE: '393',
|
|
33
|
-
/**
|
|
34
|
-
* Self-billed Factored Invoice
|
|
35
|
-
*/
|
|
36
|
-
SELF_BILLED_FACTORED_INVOICE: '501',
|
|
37
|
-
/**
|
|
38
|
-
* Prepayment Invoice
|
|
39
|
-
*/
|
|
40
|
-
PREPAYMENT_INVOICE: '386',
|
|
41
|
-
/**
|
|
42
|
-
* Self-billed Prepayment Invoice
|
|
43
|
-
*/
|
|
44
|
-
SELF_BILLED_PREPAYMENT_INVOICE: '500',
|
|
45
|
-
/**
|
|
46
|
-
* Corrective Invoice
|
|
47
|
-
*/
|
|
48
|
-
CORRECTIVE_INVOICE: '384',
|
|
49
|
-
/**
|
|
50
|
-
* Self-billed Corrective Invoice
|
|
51
|
-
*/
|
|
52
|
-
SELF_BILLED_CORRECTIVE_INVOICE: '471',
|
|
53
|
-
/**
|
|
54
|
-
* Factored Corrective Invoice
|
|
55
|
-
*/
|
|
56
|
-
FACTORED_CORRECTIVE_INVOICE: '472',
|
|
57
|
-
/**
|
|
58
|
-
* Self-billed Factored Corrective Invoice
|
|
59
|
-
*/
|
|
60
|
-
SELF_BILLED_FACTORED_CORRECTIVE_INVOICE: '473',
|
|
61
|
-
/**
|
|
62
|
-
* Credit Note
|
|
63
|
-
*/
|
|
64
|
-
CREDIT_NOTE: '381',
|
|
65
|
-
/**
|
|
66
|
-
* Self-billed Credit Note
|
|
67
|
-
*/
|
|
68
|
-
SELF_BILLED_CREDIT_NOTE: '261',
|
|
69
|
-
/**
|
|
70
|
-
* Global Allowance Credit Note
|
|
71
|
-
*/
|
|
72
|
-
GLOBAL_ALLOWANCE_CREDIT_NOTE: '262',
|
|
73
|
-
/**
|
|
74
|
-
* Factored Credit Note
|
|
75
|
-
*/
|
|
76
|
-
FACTORED_CREDIT_NOTE: '396',
|
|
77
|
-
/**
|
|
78
|
-
* Self-billed Factored Credit Note
|
|
79
|
-
*/
|
|
80
|
-
SELF_BILLED_FACTORED_CREDIT_NOTE: '502',
|
|
81
|
-
/**
|
|
82
|
-
* Prepayment Credit Note
|
|
83
|
-
*/
|
|
84
|
-
PREPAYMENT_CREDIT_NOTE: '503'
|
|
20
|
+
exports.FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode = {
|
|
21
|
+
_380: '380',
|
|
22
|
+
_381: '381',
|
|
23
|
+
_384: '384',
|
|
24
|
+
_389: '389',
|
|
25
|
+
_386: '386'
|
|
85
26
|
};
|
package/dist/models/index.d.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';
|
|
149
148
|
export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
|
|
149
|
+
export * from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
|
|
150
150
|
export * from './facture-electronique-rest-api-schemas-validation-validation-error-response';
|
|
151
151
|
export * from './field-status';
|
|
152
152
|
export * from './file-info';
|