@factpulse/sdk 3.0.37 → 4.0.1
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 +32 -8
- package/.openapi-generator/VERSION +1 -1
- package/CHANGELOG.md +5 -12
- package/README.md +135 -148
- package/api/cdarcycle-de-vie-api.ts +186 -86
- package/api/client-management-api.ts +672 -0
- package/api/downloads-api.ts +0 -152
- package/api/invoice-processing-api.ts +2 -2
- package/api.ts +1 -0
- package/dist/api/cdarcycle-de-vie-api.d.ts +93 -50
- package/dist/api/cdarcycle-de-vie-api.js +174 -80
- package/dist/api/client-management-api.d.ts +309 -0
- package/dist/api/client-management-api.js +642 -0
- package/dist/api/downloads-api.d.ts +0 -68
- package/dist/api/downloads-api.js +0 -145
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/esm/api/cdarcycle-de-vie-api.d.ts +93 -50
- package/dist/esm/api/cdarcycle-de-vie-api.js +174 -80
- package/dist/esm/api/client-management-api.d.ts +309 -0
- package/dist/esm/api/client-management-api.js +632 -0
- package/dist/esm/api/downloads-api.d.ts +0 -68
- package/dist/esm/api/downloads-api.js +0 -145
- package/dist/esm/api.d.ts +1 -0
- package/dist/esm/api.js +1 -0
- package/dist/esm/models/allowance-charge.d.ts +2 -2
- package/dist/esm/models/amount.d.ts +1 -1
- package/dist/esm/models/amount1.d.ts +1 -1
- package/dist/esm/models/amount2.d.ts +16 -0
- 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/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.d.ts → client-activate-response.d.ts} +16 -5
- package/dist/esm/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.d.ts → client-create-request.d.ts} +6 -4
- package/dist/esm/models/client-detail.d.ts +48 -0
- package/dist/esm/models/client-list-response.d.ts +33 -0
- package/dist/esm/models/client-list-response.js +14 -0
- package/dist/esm/models/client-summary.d.ts +48 -0
- package/dist/esm/models/client-summary.js +14 -0
- package/dist/esm/models/client-update-request.d.ts +19 -0
- package/dist/esm/models/client-update-request.js +14 -0
- package/dist/esm/models/encaissee-request.d.ts +39 -0
- package/dist/esm/models/encaissee-request.js +14 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.d.ts +29 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.js +14 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts +24 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js +14 -0
- 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 +15 -4
- package/dist/esm/models/index.js +15 -4
- package/dist/esm/models/payment-amount-by-rate.d.ts +2 -2
- package/dist/esm/models/pdpconfig-response.d.ts +34 -0
- package/dist/esm/models/pdpconfig-response.js +14 -0
- package/dist/esm/models/pdpconfig-update-request.d.ts +40 -0
- package/dist/esm/models/pdpconfig-update-request.js +14 -0
- package/dist/esm/models/recipient.d.ts +1 -1
- package/dist/{models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts → esm/models/refusee-request.d.ts} +16 -14
- package/dist/esm/models/refusee-request.js +14 -0
- package/dist/esm/models/scheme-id.d.ts +7 -7
- package/dist/esm/models/scheme-id.js +7 -7
- package/dist/esm/models/search-structure-request.d.ts +2 -2
- package/dist/esm/models/{body-submit-cdar-api-v1-cdar-submit-post.d.ts → secret-status.d.ts} +12 -5
- package/dist/esm/models/secret-status.js +14 -0
- package/dist/esm/models/simplified-cdarresponse.d.ts +36 -0
- package/dist/esm/models/simplified-cdarresponse.js +14 -0
- package/dist/esm/models/submit-cdarrequest.d.ts +4 -0
- package/dist/esm/models/submit-cdarxmlrequest.d.ts +4 -0
- package/dist/esm/models/submit-complete-invoice-response.d.ts +1 -1
- package/dist/esm/models/submit-invoice-request.d.ts +2 -2
- package/dist/esm/models/supplier.d.ts +1 -1
- package/dist/esm/models/validate-cdarresponse.d.ts +3 -3
- package/dist/esm/models/validation-error-response.d.ts +3 -12
- package/dist/esm/src/helpers/client.d.ts +45 -265
- package/dist/esm/src/helpers/client.js +211 -773
- package/dist/esm/src/helpers/exceptions.d.ts +3 -1
- package/dist/esm/src/helpers/exceptions.js +7 -1
- package/dist/esm/src/helpers/index.d.ts +1 -2
- package/dist/esm/src/helpers/index.js +1 -3
- package/dist/models/allowance-charge.d.ts +2 -2
- package/dist/models/amount.d.ts +1 -1
- package/dist/models/amount1.d.ts +1 -1
- package/dist/models/amount2.d.ts +16 -0
- package/dist/models/chorus-pro-credentials.d.ts +19 -7
- package/dist/models/chorus-pro-destination.d.ts +2 -2
- package/dist/models/client-activate-response.d.ts +28 -0
- package/dist/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.d.ts → client-create-request.d.ts} +6 -4
- package/dist/models/client-detail.d.ts +48 -0
- package/dist/models/client-list-response.d.ts +33 -0
- package/dist/models/client-list-response.js +15 -0
- package/dist/models/client-summary.d.ts +48 -0
- package/dist/models/client-summary.js +15 -0
- package/dist/models/client-update-request.d.ts +19 -0
- package/dist/models/client-update-request.js +15 -0
- package/dist/models/encaissee-request.d.ts +39 -0
- package/dist/models/encaissee-request.js +15 -0
- package/dist/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.d.ts +29 -0
- package/dist/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.js +15 -0
- package/dist/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts +24 -0
- package/dist/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js +15 -0
- 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 +15 -4
- package/dist/models/index.js +15 -4
- package/dist/models/payment-amount-by-rate.d.ts +2 -2
- package/dist/models/pdpconfig-response.d.ts +34 -0
- package/dist/models/pdpconfig-response.js +15 -0
- package/dist/models/pdpconfig-update-request.d.ts +40 -0
- package/dist/models/pdpconfig-update-request.js +15 -0
- package/dist/models/recipient.d.ts +1 -1
- package/dist/{esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts → models/refusee-request.d.ts} +16 -14
- package/dist/models/refusee-request.js +15 -0
- package/dist/models/scheme-id.d.ts +7 -7
- package/dist/models/scheme-id.js +7 -7
- package/dist/models/search-structure-request.d.ts +2 -2
- package/dist/models/{body-submit-cdar-api-v1-cdar-submit-post.d.ts → secret-status.d.ts} +12 -5
- package/dist/models/secret-status.js +15 -0
- package/dist/models/simplified-cdarresponse.d.ts +36 -0
- package/dist/models/simplified-cdarresponse.js +15 -0
- package/dist/models/submit-cdarrequest.d.ts +4 -0
- package/dist/models/submit-cdarxmlrequest.d.ts +4 -0
- package/dist/models/submit-complete-invoice-response.d.ts +1 -1
- package/dist/models/submit-invoice-request.d.ts +2 -2
- package/dist/models/supplier.d.ts +1 -1
- package/dist/models/validate-cdarresponse.d.ts +3 -3
- package/dist/models/validation-error-response.d.ts +3 -12
- package/dist/src/helpers/client.d.ts +45 -265
- package/dist/src/helpers/client.js +214 -784
- package/dist/src/helpers/exceptions.d.ts +3 -1
- package/dist/src/helpers/exceptions.js +7 -1
- package/dist/src/helpers/index.d.ts +1 -2
- package/dist/src/helpers/index.js +2 -12
- package/docs/AllowanceCharge.md +1 -1
- package/docs/Amount.md +1 -1
- package/docs/Amount1.md +1 -1
- package/docs/Amount2.md +19 -0
- package/docs/CDARCycleDeVieApi.md +126 -30
- package/docs/ChorusProCredentials.md +9 -9
- package/docs/ChorusProDestination.md +1 -1
- package/docs/ClientActivateResponse.md +25 -0
- package/docs/ClientCreateRequest.md +25 -0
- package/docs/ClientDetail.md +41 -0
- package/docs/ClientListResponse.md +27 -0
- package/docs/ClientManagementApi.md +483 -0
- package/docs/ClientSummary.md +41 -0
- package/docs/ClientUpdateRequest.md +25 -0
- package/docs/DownloadsApi.md +0 -115
- package/docs/EncaisseeRequest.md +39 -0
- package/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +27 -0
- package/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +29 -0
- package/docs/GetChorusProIdRequest.md +1 -1
- package/docs/GetInvoiceRequest.md +1 -1
- package/docs/GetStructureRequest.md +1 -1
- package/docs/PDPConfigResponse.md +47 -0
- package/docs/PDPConfigUpdateRequest.md +31 -0
- package/docs/PaymentAmountByRate.md +1 -1
- package/docs/Recipient.md +1 -1
- package/docs/RefuseeRequest.md +39 -0
- package/docs/SchemeID.md +4 -4
- package/docs/SearchStructureRequest.md +1 -1
- package/docs/SecretStatus.md +23 -0
- package/docs/SimplifiedCDARResponse.md +29 -0
- package/docs/SubmitCDARRequest.md +8 -0
- package/docs/SubmitCDARXMLRequest.md +8 -0
- package/docs/SubmitCompleteInvoiceResponse.md +2 -2
- package/docs/SubmitInvoiceRequest.md +1 -1
- package/docs/Supplier.md +1 -1
- package/docs/ValidateCDARResponse.md +2 -2
- package/docs/ValidationErrorResponse.md +3 -9
- package/models/allowance-charge.ts +2 -2
- package/models/amount.ts +1 -1
- package/models/amount1.ts +1 -1
- package/models/amount2.ts +22 -0
- package/models/chorus-pro-credentials.ts +19 -7
- package/models/chorus-pro-destination.ts +2 -2
- package/models/client-activate-response.ts +34 -0
- package/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.ts → client-create-request.ts} +6 -4
- package/models/client-detail.ts +54 -0
- package/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.ts → client-list-response.ts} +21 -7
- package/models/client-summary.ts +54 -0
- package/models/client-update-request.ts +25 -0
- package/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts → encaissee-request.ts} +19 -14
- package/models/{body-submit-cdar-api-v1-cdar-submit-post.ts → facture-electronique-rest-api-schemas-cdar-validation-error-response.ts} +17 -9
- package/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts +30 -0
- 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 +15 -4
- package/models/payment-amount-by-rate.ts +2 -2
- package/models/pdpconfig-response.ts +42 -0
- package/models/pdpconfig-update-request.ts +46 -0
- package/models/recipient.ts +1 -1
- package/models/refusee-request.ts +44 -0
- package/models/scheme-id.ts +7 -7
- package/models/search-structure-request.ts +2 -2
- package/models/secret-status.ts +30 -0
- package/models/simplified-cdarresponse.ts +42 -0
- package/models/submit-cdarrequest.ts +4 -0
- package/models/submit-cdarxmlrequest.ts +4 -0
- package/models/submit-complete-invoice-response.ts +1 -1
- package/models/submit-invoice-request.ts +2 -2
- package/models/supplier.ts +1 -1
- package/models/validate-cdarresponse.ts +3 -3
- package/models/validation-error-response.ts +3 -12
- package/package.json +1 -1
- package/src/helpers/client.ts +227 -832
- package/src/helpers/exceptions.ts +9 -1
- package/src/helpers/index.ts +1 -3
- package/dist/models/body-submit-cdar-xml-api-v1-cdar-submit-xml-post.d.ts +0 -17
- package/docs/BodySubmitCdarApiV1CdarSubmitPost.md +0 -22
- package/docs/BodySubmitCdarXmlApiV1CdarSubmitXmlPost.md +0 -22
- package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -29
- package/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +0 -21
- /package/dist/esm/models/{body-submit-cdar-api-v1-cdar-submit-post.js → amount2.js} +0 -0
- /package/dist/esm/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.js → client-activate-response.js} +0 -0
- /package/dist/esm/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js → client-create-request.js} +0 -0
- /package/dist/esm/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.js → client-detail.js} +0 -0
- /package/dist/models/{body-submit-cdar-api-v1-cdar-submit-post.js → amount2.js} +0 -0
- /package/dist/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.js → client-activate-response.js} +0 -0
- /package/dist/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js → client-create-request.js} +0 -0
- /package/dist/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.js → client-detail.js} +0 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -8,6 +8,7 @@ api/afnorpdppadirectory-service-api.ts
|
|
|
8
8
|
api/afnorpdppaflow-service-api.ts
|
|
9
9
|
api/cdarcycle-de-vie-api.ts
|
|
10
10
|
api/chorus-pro-api.ts
|
|
11
|
+
api/client-management-api.ts
|
|
11
12
|
api/document-conversion-api.ts
|
|
12
13
|
api/downloads-api.ts
|
|
13
14
|
api/ereporting-api.ts
|
|
@@ -130,11 +131,10 @@ docs/AllowanceReasonCode.md
|
|
|
130
131
|
docs/AllowanceTotalAmount.md
|
|
131
132
|
docs/Amount.md
|
|
132
133
|
docs/Amount1.md
|
|
134
|
+
docs/Amount2.md
|
|
133
135
|
docs/AmountDue.md
|
|
134
136
|
docs/AsyncTaskStatus.md
|
|
135
137
|
docs/BaseAmount.md
|
|
136
|
-
docs/BodySubmitCdarApiV1CdarSubmitPost.md
|
|
137
|
-
docs/BodySubmitCdarXmlApiV1CdarSubmitXmlPost.md
|
|
138
138
|
docs/BoundingBoxSchema.md
|
|
139
139
|
docs/Buyercountry.md
|
|
140
140
|
docs/CDARCycleDeVieApi.md
|
|
@@ -145,6 +145,13 @@ docs/ChorusProApi.md
|
|
|
145
145
|
docs/ChorusProCredentials.md
|
|
146
146
|
docs/ChorusProDestination.md
|
|
147
147
|
docs/ChorusProResult.md
|
|
148
|
+
docs/ClientActivateResponse.md
|
|
149
|
+
docs/ClientCreateRequest.md
|
|
150
|
+
docs/ClientDetail.md
|
|
151
|
+
docs/ClientListResponse.md
|
|
152
|
+
docs/ClientManagementApi.md
|
|
153
|
+
docs/ClientSummary.md
|
|
154
|
+
docs/ClientUpdateRequest.md
|
|
148
155
|
docs/Contact.md
|
|
149
156
|
docs/ConvertResumeRequest.md
|
|
150
157
|
docs/ConvertSuccessResponse.md
|
|
@@ -167,15 +174,16 @@ docs/EReportingValidationError.md
|
|
|
167
174
|
docs/ElectronicAddress.md
|
|
168
175
|
docs/Encaisseamount.md
|
|
169
176
|
docs/Encaisseamount1.md
|
|
177
|
+
docs/EncaisseeRequest.md
|
|
170
178
|
docs/EnrichedInvoiceInfo.md
|
|
171
179
|
docs/ErrorLevel.md
|
|
172
180
|
docs/ErrorSource.md
|
|
173
181
|
docs/ExtractionInfo.md
|
|
174
182
|
docs/FacturXInvoice.md
|
|
175
183
|
docs/FacturXPDFInfo.md
|
|
176
|
-
docs/
|
|
184
|
+
docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md
|
|
177
185
|
docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md
|
|
178
|
-
docs/
|
|
186
|
+
docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md
|
|
179
187
|
docs/FieldStatus.md
|
|
180
188
|
docs/FileInfo.md
|
|
181
189
|
docs/FilesInfo.md
|
|
@@ -228,6 +236,8 @@ docs/OperationNature.md
|
|
|
228
236
|
docs/OutputFormat.md
|
|
229
237
|
docs/PDFValidationResultAPI.md
|
|
230
238
|
docs/PDFXMLVerificationApi.md
|
|
239
|
+
docs/PDPConfigResponse.md
|
|
240
|
+
docs/PDPConfigUpdateRequest.md
|
|
231
241
|
docs/PDPCredentials.md
|
|
232
242
|
docs/PageDimensionsSchema.md
|
|
233
243
|
docs/Payee.md
|
|
@@ -249,6 +259,7 @@ docs/ReasonCodeInfo.md
|
|
|
249
259
|
docs/ReasonCodesResponse.md
|
|
250
260
|
docs/Recipient.md
|
|
251
261
|
docs/RecipientInput.md
|
|
262
|
+
docs/RefuseeRequest.md
|
|
252
263
|
docs/ReportPeriod.md
|
|
253
264
|
docs/ReportSender.md
|
|
254
265
|
docs/RoundingAmount.md
|
|
@@ -259,10 +270,12 @@ docs/SearchFlowResponse.md
|
|
|
259
270
|
docs/SearchServicesResponse.md
|
|
260
271
|
docs/SearchStructureRequest.md
|
|
261
272
|
docs/SearchStructureResponse.md
|
|
273
|
+
docs/SecretStatus.md
|
|
262
274
|
docs/Sellercountry.md
|
|
263
275
|
docs/SignatureInfo.md
|
|
264
276
|
docs/SignatureInfoAPI.md
|
|
265
277
|
docs/SignatureParameters.md
|
|
278
|
+
docs/SimplifiedCDARResponse.md
|
|
266
279
|
docs/SimplifiedInvoiceData.md
|
|
267
280
|
docs/StatusCodeInfo.md
|
|
268
281
|
docs/StatusCodesResponse.md
|
|
@@ -433,12 +446,11 @@ models/allowance-total-amount.ts
|
|
|
433
446
|
models/amount-due.ts
|
|
434
447
|
models/amount.ts
|
|
435
448
|
models/amount1.ts
|
|
449
|
+
models/amount2.ts
|
|
436
450
|
models/apierror.ts
|
|
437
451
|
models/apiprofile.ts
|
|
438
452
|
models/async-task-status.ts
|
|
439
453
|
models/base-amount.ts
|
|
440
|
-
models/body-submit-cdar-api-v1-cdar-submit-post.ts
|
|
441
|
-
models/body-submit-cdar-xml-api-v1-cdar-submit-xml-post.ts
|
|
442
454
|
models/bounding-box-schema.ts
|
|
443
455
|
models/buyercountry.ts
|
|
444
456
|
models/celery-status.ts
|
|
@@ -447,6 +459,12 @@ models/charge-total-amount.ts
|
|
|
447
459
|
models/chorus-pro-credentials.ts
|
|
448
460
|
models/chorus-pro-destination.ts
|
|
449
461
|
models/chorus-pro-result.ts
|
|
462
|
+
models/client-activate-response.ts
|
|
463
|
+
models/client-create-request.ts
|
|
464
|
+
models/client-detail.ts
|
|
465
|
+
models/client-list-response.ts
|
|
466
|
+
models/client-summary.ts
|
|
467
|
+
models/client-update-request.ts
|
|
450
468
|
models/contact.ts
|
|
451
469
|
models/convert-resume-request.ts
|
|
452
470
|
models/convert-success-response.ts
|
|
@@ -464,6 +482,7 @@ models/document-type-info.ts
|
|
|
464
482
|
models/electronic-address.ts
|
|
465
483
|
models/encaisseamount.ts
|
|
466
484
|
models/encaisseamount1.ts
|
|
485
|
+
models/encaissee-request.ts
|
|
467
486
|
models/enriched-invoice-info.ts
|
|
468
487
|
models/ereporting-flow-type.ts
|
|
469
488
|
models/ereporting-validation-error.ts
|
|
@@ -472,9 +491,9 @@ models/error-source.ts
|
|
|
472
491
|
models/extraction-info.ts
|
|
473
492
|
models/factur-xinvoice.ts
|
|
474
493
|
models/factur-xpdfinfo.ts
|
|
475
|
-
models/facture-electronique-rest-api-schemas-
|
|
494
|
+
models/facture-electronique-rest-api-schemas-cdar-validation-error-response.ts
|
|
476
495
|
models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.ts
|
|
477
|
-
models/facture-electronique-rest-api-schemas-
|
|
496
|
+
models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts
|
|
478
497
|
models/field-status.ts
|
|
479
498
|
models/file-info.ts
|
|
480
499
|
models/files-info.ts
|
|
@@ -530,6 +549,8 @@ models/payment-amount-by-rate.ts
|
|
|
530
549
|
models/payment-card.ts
|
|
531
550
|
models/payment-means.ts
|
|
532
551
|
models/pdfvalidation-result-api.ts
|
|
552
|
+
models/pdpconfig-response.ts
|
|
553
|
+
models/pdpconfig-update-request.ts
|
|
533
554
|
models/pdpcredentials.ts
|
|
534
555
|
models/percentage.ts
|
|
535
556
|
models/postal-address.ts
|
|
@@ -546,6 +567,7 @@ models/reason-code-info.ts
|
|
|
546
567
|
models/reason-codes-response.ts
|
|
547
568
|
models/recipient-input.ts
|
|
548
569
|
models/recipient.ts
|
|
570
|
+
models/refusee-request.ts
|
|
549
571
|
models/report-period.ts
|
|
550
572
|
models/report-sender.ts
|
|
551
573
|
models/rounding-amount.ts
|
|
@@ -556,10 +578,12 @@ models/search-flow-response.ts
|
|
|
556
578
|
models/search-services-response.ts
|
|
557
579
|
models/search-structure-request.ts
|
|
558
580
|
models/search-structure-response.ts
|
|
581
|
+
models/secret-status.ts
|
|
559
582
|
models/sellercountry.ts
|
|
560
583
|
models/signature-info-api.ts
|
|
561
584
|
models/signature-info.ts
|
|
562
585
|
models/signature-parameters.ts
|
|
586
|
+
models/simplified-cdarresponse.ts
|
|
563
587
|
models/simplified-invoice-data.ts
|
|
564
588
|
models/status-code-info.ts
|
|
565
589
|
models/status-codes-response.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.20.0-SNAPSHOT
|
package/CHANGELOG.md
CHANGED
|
@@ -7,18 +7,11 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [
|
|
10
|
+
## [4.0.1] - 2026-01-20
|
|
11
11
|
|
|
12
|
-
###
|
|
13
|
-
-
|
|
14
|
-
- Support complet de l'API FactPulse
|
|
15
|
-
- Endpoints Factur-X (génération, validation)
|
|
16
|
-
- Endpoints AFNOR PDP/PA (Flow Service, Directory Service)
|
|
17
|
-
- Endpoints Chorus Pro (recherche entreprise, soumission factures)
|
|
18
|
-
- Endpoints Signature électronique (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
|
|
19
|
-
- Support des deux modes d'authentification (stored credentials et zero-trust)
|
|
20
|
-
- Documentation complète et exemples
|
|
12
|
+
### Fixed
|
|
13
|
+
- Gestion post multipart
|
|
21
14
|
|
|
22
15
|
|
|
23
|
-
[Unreleased]: https://github.com/factpulse/sdk-typescript/compare/
|
|
24
|
-
[
|
|
16
|
+
[Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v4.0.1...HEAD
|
|
17
|
+
[4.0.1]: https://github.com/factpulse/sdk-typescript/releases/tag/v4.0.1
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Official TypeScript/JavaScript client for the FactPulse API - French electronic
|
|
|
8
8
|
- **Chorus Pro**: Integration with the French public invoicing platform
|
|
9
9
|
- **AFNOR PDP/PA**: Submission of flows compliant with XP Z12-013 standard
|
|
10
10
|
- **Electronic signature**: PDF signing (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
|
|
11
|
-
- **
|
|
11
|
+
- **Thin HTTP wrapper**: Generic `post()` and `get()` methods with automatic JWT auth and polling
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
@@ -20,8 +20,6 @@ yarn add @factpulse/sdk
|
|
|
20
20
|
|
|
21
21
|
## Quick Start
|
|
22
22
|
|
|
23
|
-
The `helpers` module provides a simplified API with automatic authentication and polling:
|
|
24
|
-
|
|
25
23
|
```typescript
|
|
26
24
|
import { FactPulseClient } from '@factpulse/sdk/helpers';
|
|
27
25
|
import * as fs from 'fs';
|
|
@@ -29,189 +27,178 @@ import * as fs from 'fs';
|
|
|
29
27
|
// Create the client
|
|
30
28
|
const client = new FactPulseClient({
|
|
31
29
|
email: 'your_email@example.com',
|
|
32
|
-
password: 'your_password'
|
|
30
|
+
password: 'your_password',
|
|
31
|
+
clientUid: 'your-client-uuid', // From dashboard: Configuration > Clients
|
|
33
32
|
});
|
|
34
33
|
|
|
35
|
-
//
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
// Read your source PDF
|
|
35
|
+
const pdfB64 = fs.readFileSync('source_invoice.pdf').toString('base64');
|
|
36
|
+
|
|
37
|
+
// Generate Factur-X and submit to PDP in one call
|
|
38
|
+
const result = await client.post('processing/invoices/submit-complete-async', {
|
|
39
|
+
invoiceData: {
|
|
40
|
+
number: 'INV-2025-001',
|
|
41
|
+
supplier: {
|
|
42
|
+
siret: '12345678901234',
|
|
43
|
+
iban: 'FR7630001007941234567890185',
|
|
44
|
+
routing_address: '12345678901234',
|
|
45
|
+
},
|
|
46
|
+
recipient: {
|
|
47
|
+
siret: '98765432109876',
|
|
48
|
+
routing_address: '98765432109876',
|
|
49
|
+
},
|
|
50
|
+
lines: [
|
|
51
|
+
{
|
|
52
|
+
description: 'Consulting services',
|
|
53
|
+
quantity: 10,
|
|
54
|
+
unitPrice: 100.0,
|
|
55
|
+
vatRate: 20.0,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
46
58
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
unitPrice: 100.0,
|
|
52
|
-
vatRate: 20,
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
// Generate the Factur-X PDF
|
|
58
|
-
const pdfBytes = await client.generateFacturx(invoiceData, 'source_invoice.pdf');
|
|
59
|
-
|
|
60
|
-
fs.writeFileSync('facturx_invoice.pdf', pdfBytes);
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Available Helpers
|
|
64
|
-
|
|
65
|
-
### amount(value)
|
|
59
|
+
sourcePdf: pdfB64,
|
|
60
|
+
profile: 'EN16931',
|
|
61
|
+
destination: { type: 'afnor' },
|
|
62
|
+
});
|
|
66
63
|
|
|
67
|
-
|
|
64
|
+
// PDF is in result.content (auto-polled, auto-decoded from base64)
|
|
65
|
+
fs.writeFileSync('facturx_invoice.pdf', result.content);
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
import { amount } from '@factpulse/sdk/helpers';
|
|
71
|
-
|
|
72
|
-
amount(1234.5); // "1234.50"
|
|
73
|
-
amount("1234.56"); // "1234.56"
|
|
74
|
-
amount(null); // "0.00"
|
|
67
|
+
console.log(`Flow ID: ${result.afnorResult?.flowId}`);
|
|
75
68
|
```
|
|
76
69
|
|
|
77
|
-
|
|
70
|
+
## API Methods
|
|
78
71
|
|
|
79
|
-
|
|
72
|
+
The SDK provides two generic methods that map directly to API endpoints:
|
|
80
73
|
|
|
81
74
|
```typescript
|
|
82
|
-
|
|
75
|
+
// POST /api/v1/{path}
|
|
76
|
+
const result = await client.post('path/to/endpoint', { key1: value1, key2: value2 });
|
|
83
77
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
globalAllowanceReason: 'Loyalty', // Optional
|
|
87
|
-
prepayment: 100.00, // Optional
|
|
88
|
-
});
|
|
78
|
+
// GET /api/v1/{path}
|
|
79
|
+
const result = await client.get('path/to/endpoint', { param1: value1 });
|
|
89
80
|
```
|
|
90
81
|
|
|
91
|
-
###
|
|
82
|
+
### Common Endpoints
|
|
92
83
|
|
|
93
|
-
|
|
84
|
+
| Endpoint | Method | Description |
|
|
85
|
+
|----------|--------|-------------|
|
|
86
|
+
| `processing/invoices/submit-complete-async` | POST | Generate Factur-X + submit to PDP |
|
|
87
|
+
| `processing/generate-invoice` | POST | Generate Factur-X XML or PDF |
|
|
88
|
+
| `processing/validate-xml` | POST | Validate Factur-X XML |
|
|
89
|
+
| `processing/validate-facturx-pdf` | POST | Validate Factur-X PDF |
|
|
90
|
+
| `processing/sign-pdf` | POST | Sign PDF with certificate |
|
|
91
|
+
| `afnor/flow/v1/flows` | POST | Submit flow to AFNOR PDP |
|
|
92
|
+
| `afnor/incoming-flows/{flow_id}` | GET | Get incoming invoice |
|
|
93
|
+
| `chorus-pro/factures/soumettre` | POST | Submit to Chorus Pro |
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
import { invoiceLine } from '@factpulse/sdk/helpers';
|
|
97
|
-
|
|
98
|
-
const line = invoiceLine(
|
|
99
|
-
1,
|
|
100
|
-
'Consulting services',
|
|
101
|
-
5,
|
|
102
|
-
200.00,
|
|
103
|
-
1000.00,
|
|
104
|
-
{
|
|
105
|
-
vatRate: 'TVA20', // Or manualVatRate: '20.00'
|
|
106
|
-
vatCategory: 'S', // S, Z, E, AE, K
|
|
107
|
-
unit: 'HOUR', // LUMP_SUM, PIECE, HOUR, DAY...
|
|
108
|
-
reference: 'REF-001', // Optional
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
```
|
|
95
|
+
## Webhooks
|
|
112
96
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
Creates a VAT breakdown line.
|
|
97
|
+
Instead of polling, you can receive results via webhook by adding `callbackUrl`:
|
|
116
98
|
|
|
117
99
|
```typescript
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
100
|
+
// Submit with webhook - returns immediately
|
|
101
|
+
const result = await client.post('processing/invoices/submit-complete-async', {
|
|
102
|
+
invoiceData,
|
|
103
|
+
sourcePdf: pdfB64,
|
|
104
|
+
destination: { type: 'afnor' },
|
|
105
|
+
callbackUrl: 'https://your-server.com/webhook/factpulse',
|
|
106
|
+
webhookMode: 'INLINE', // or 'DOWNLOAD_URL'
|
|
123
107
|
});
|
|
124
|
-
```
|
|
125
108
|
|
|
126
|
-
|
|
109
|
+
const taskId = result.taskId;
|
|
110
|
+
// Result will be POSTed to your webhook URL
|
|
111
|
+
```
|
|
127
112
|
|
|
128
|
-
|
|
113
|
+
### Webhook Receiver Example (Express.js)
|
|
129
114
|
|
|
130
115
|
```typescript
|
|
131
|
-
import
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
116
|
+
import express from 'express';
|
|
117
|
+
import crypto from 'crypto';
|
|
118
|
+
|
|
119
|
+
const app = express();
|
|
120
|
+
app.use(express.json({ verify: (req, res, buf) => (req.rawBody = buf) }));
|
|
121
|
+
|
|
122
|
+
const WEBHOOK_SECRET = 'your-shared-secret';
|
|
123
|
+
|
|
124
|
+
function verifySignature(payload: Buffer, signature: string): boolean {
|
|
125
|
+
if (!signature.startsWith('sha256=')) return false;
|
|
126
|
+
const expected = crypto
|
|
127
|
+
.createHmac('sha256', WEBHOOK_SECRET)
|
|
128
|
+
.update(payload)
|
|
129
|
+
.digest('hex');
|
|
130
|
+
return crypto.timingSafeEqual(
|
|
131
|
+
Buffer.from(signature.slice(7)),
|
|
132
|
+
Buffer.from(expected)
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
app.post('/webhook/factpulse', (req, res) => {
|
|
137
|
+
const signature = req.headers['x-webhook-signature'] as string || '';
|
|
138
|
+
if (!verifySignature(req.rawBody, signature)) {
|
|
139
|
+
return res.status(401).json({ error: 'Invalid signature' });
|
|
140
|
+
}
|
|
140
141
|
|
|
141
|
-
|
|
142
|
+
const event = req.body;
|
|
143
|
+
const eventType = event.event_type;
|
|
144
|
+
const data = event.data;
|
|
142
145
|
|
|
143
|
-
|
|
144
|
-
|
|
146
|
+
if (eventType === 'submission.completed') {
|
|
147
|
+
console.log(`Invoice submitted: ${data.afnorResult?.flowId}`);
|
|
148
|
+
} else if (eventType === 'submission.failed') {
|
|
149
|
+
console.log(`Submission failed: ${data.error}`);
|
|
150
|
+
}
|
|
145
151
|
|
|
146
|
-
|
|
147
|
-
|
|
152
|
+
res.json({ status: 'received' });
|
|
153
|
+
});
|
|
148
154
|
|
|
149
|
-
|
|
150
|
-
const address = electronicAddress('123456789');
|
|
155
|
+
app.listen(3000);
|
|
151
156
|
```
|
|
152
157
|
|
|
153
|
-
###
|
|
158
|
+
### Webhook Event Types
|
|
154
159
|
|
|
155
|
-
|
|
160
|
+
| Event | Description |
|
|
161
|
+
|-------|-------------|
|
|
162
|
+
| `generation.completed` | Factur-X generated successfully |
|
|
163
|
+
| `generation.failed` | Generation failed |
|
|
164
|
+
| `validation.completed` | Validation passed |
|
|
165
|
+
| `validation.failed` | Validation failed |
|
|
166
|
+
| `signature.completed` | PDF signed |
|
|
167
|
+
| `submission.completed` | Submitted to PDP/Chorus |
|
|
168
|
+
| `submission.failed` | Submission failed |
|
|
156
169
|
|
|
157
|
-
|
|
158
|
-
import { supplier } from '@factpulse/sdk/helpers';
|
|
159
|
-
|
|
160
|
-
const s = supplier(
|
|
161
|
-
'My Company SAS',
|
|
162
|
-
'12345678901234',
|
|
163
|
-
'123 Example Street',
|
|
164
|
-
'75001',
|
|
165
|
-
'Paris',
|
|
166
|
-
{ iban: 'FR7630006000011234567890189' }
|
|
167
|
-
);
|
|
168
|
-
// SIREN and intra-EU VAT number calculated automatically
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### recipient(name, siret, addressLine1, postalCode, city, options?)
|
|
170
|
+
## Zero-Storage Mode
|
|
172
171
|
|
|
173
|
-
|
|
172
|
+
Pass PDP credentials directly in the request (no server-side storage):
|
|
174
173
|
|
|
175
174
|
```typescript
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
175
|
+
const result = await client.post('processing/invoices/submit-complete-async', {
|
|
176
|
+
invoiceData,
|
|
177
|
+
sourcePdf: pdfB64,
|
|
178
|
+
destination: {
|
|
179
|
+
type: 'afnor',
|
|
180
|
+
flowServiceUrl: 'https://api.pdp.example.com/flow/v1',
|
|
181
|
+
tokenUrl: 'https://auth.pdp.example.com/oauth/token',
|
|
182
|
+
clientId: 'your_pdp_client_id',
|
|
183
|
+
clientSecret: 'your_pdp_client_secret',
|
|
184
|
+
},
|
|
185
|
+
});
|
|
185
186
|
```
|
|
186
187
|
|
|
187
|
-
##
|
|
188
|
-
|
|
189
|
-
To pass your own credentials without server-side storage:
|
|
188
|
+
## Error Handling
|
|
190
189
|
|
|
191
190
|
```typescript
|
|
192
|
-
import {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
pisteClientSecret: 'your_client_secret',
|
|
204
|
-
chorusProLogin: 'your_login',
|
|
205
|
-
chorusProPassword: 'your_password',
|
|
206
|
-
sandbox: true,
|
|
207
|
-
},
|
|
208
|
-
afnorCredentials: {
|
|
209
|
-
flowServiceUrl: 'https://api.pdp.fr/flow/v1',
|
|
210
|
-
tokenUrl: 'https://auth.pdp.fr/oauth/token',
|
|
211
|
-
clientId: 'your_client_id',
|
|
212
|
-
clientSecret: 'your_client_secret',
|
|
213
|
-
},
|
|
214
|
-
});
|
|
191
|
+
import { FactPulseClient, FactPulseError } from '@factpulse/sdk/helpers';
|
|
192
|
+
|
|
193
|
+
try {
|
|
194
|
+
const result = await client.post('processing/validate-xml', { xmlContent });
|
|
195
|
+
} catch (e) {
|
|
196
|
+
if (e instanceof FactPulseError) {
|
|
197
|
+
console.log(`Error: ${e.message}`);
|
|
198
|
+
console.log(`Status code: ${e.statusCode}`);
|
|
199
|
+
console.log(`Details: ${e.details}`); // Validation errors list
|
|
200
|
+
}
|
|
201
|
+
}
|
|
215
202
|
```
|
|
216
203
|
|
|
217
204
|
## Resources
|