factpulse 2.0.35 → 2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -3
- data/Gemfile.lock +3 -3
- data/docs/BoundingBoxSchema.md +30 -0
- data/docs/CadreDeFacturation.md +2 -0
- data/docs/ChampVerifieSchema.md +34 -0
- data/docs/DimensionPageSchema.md +20 -0
- data/docs/DirectionFlux.md +15 -0
- data/docs/FluxResume.md +32 -0
- data/docs/LigneDeTVA.md +5 -1
- data/docs/NatureOperation.md +15 -0
- data/docs/NoteObligatoireSchema.md +30 -0
- data/docs/PDPCredentials.md +26 -0
- data/docs/ProfilFlux.md +15 -0
- data/docs/ReponseHealthcheckAFNOR.md +22 -0
- data/docs/ReponseRechercheFlux.md +24 -0
- data/docs/ReponseSoumissionFlux.md +30 -0
- data/docs/ReponseVerificationSucces.md +36 -0
- data/docs/RequeteRechercheFlux.md +34 -0
- data/docs/RequeteSoumissionFlux.md +28 -0
- data/docs/StatutAcquittement.md +15 -0
- data/docs/StatutChampAPI.md +15 -0
- data/docs/SyntaxeFlux.md +15 -0
- data/docs/TraitementFactureApi.md +2 -2
- data/docs/TypeFlux.md +15 -0
- data/docs/VrificationPDFXMLApi.md +435 -0
- data/lib/factpulse/api/traitement_facture_api.rb +4 -4
- data/lib/factpulse/api/vrification_pdfxml_api.rb +430 -0
- data/lib/factpulse/helpers/client.rb +2 -1
- data/lib/factpulse/models/bounding_box_schema.rb +332 -0
- data/lib/factpulse/models/cadre_de_facturation.rb +12 -2
- data/lib/factpulse/models/champ_verifie_schema.rb +334 -0
- data/lib/factpulse/models/dimension_page_schema.rb +193 -0
- data/lib/factpulse/models/direction_flux.rb +40 -0
- data/lib/factpulse/models/flux_resume.rb +251 -0
- data/lib/factpulse/models/ligne_de_tva.rb +26 -6
- data/lib/factpulse/models/nature_operation.rb +52 -0
- data/lib/factpulse/models/note_obligatoire_schema.rb +265 -0
- data/lib/factpulse/models/pdp_credentials.rb +257 -0
- data/lib/factpulse/models/profil_flux.rb +41 -0
- data/lib/factpulse/models/reponse_healthcheck_afnor.rb +220 -0
- data/lib/factpulse/models/reponse_recherche_flux.rb +249 -0
- data/lib/factpulse/models/reponse_soumission_flux.rb +294 -0
- data/lib/factpulse/models/reponse_verification_succes.rb +343 -0
- data/lib/factpulse/models/requete_recherche_flux.rb +306 -0
- data/lib/factpulse/models/requete_soumission_flux.rb +238 -0
- data/lib/factpulse/models/statut_acquittement.rb +41 -0
- data/lib/factpulse/models/statut_champ_api.rb +43 -0
- data/lib/factpulse/models/syntaxe_flux.rb +43 -0
- data/lib/factpulse/models/type_flux.rb +43 -0
- data/lib/factpulse/version.rb +1 -1
- data/lib/factpulse.rb +20 -0
- metadata +42 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 166d4cbd11f2aa858bf11390ff4f5a0d7086ca7a5863299d1852f1494e138db2
|
|
4
|
+
data.tar.gz: 3e934fb8fe8d24554e071855d3931229fd92bba5b9130da3d2b3885ebe138f36
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab4bd63eb1f5b083f70201c9c497124bcfef7020ef3faa8a721e29d681e21942fc7d67ec5492a8c1b8feed89c553584113d7072d04889cec782a0a4fe6c3c74d
|
|
7
|
+
data.tar.gz: eaff3fcd4f35c6ad742176d3baaf4c0011d3cf09a70ed9b909ac81cda0b752cf714106817ed77a0bf1eb2b4c59b962851ec3fd3cd44eba7875a3e4380dcdc7e7
|
data/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
|
-
## [2.0.
|
|
10
|
+
## [2.0.37] - 2025-12-10
|
|
11
11
|
|
|
12
12
|
### Added
|
|
13
13
|
- Version initiale du SDK ruby
|
|
@@ -24,5 +24,5 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
24
24
|
- Guide d'authentification JWT
|
|
25
25
|
- Configuration avancée (timeout, proxy, debug)
|
|
26
26
|
|
|
27
|
-
[Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v2.0.
|
|
28
|
-
[2.0.
|
|
27
|
+
[Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v2.0.37...HEAD
|
|
28
|
+
[2.0.37]: https://github.com/factpulse/sdk-ruby/releases/tag/v2.0.37
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
factpulse (2.0.
|
|
4
|
+
factpulse (2.0.37)
|
|
5
5
|
typhoeus (~> 1.0, >= 1.0.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -10,7 +10,7 @@ GEM
|
|
|
10
10
|
ast (2.4.3)
|
|
11
11
|
byebug (11.1.3)
|
|
12
12
|
coderay (1.1.3)
|
|
13
|
-
date (3.5.
|
|
13
|
+
date (3.5.1)
|
|
14
14
|
diff-lcs (1.6.2)
|
|
15
15
|
ethon (0.15.0)
|
|
16
16
|
ffi (>= 1.15.0)
|
|
@@ -27,7 +27,7 @@ GEM
|
|
|
27
27
|
pry-byebug (3.10.1)
|
|
28
28
|
byebug (~> 11.0)
|
|
29
29
|
pry (>= 0.13, < 0.15)
|
|
30
|
-
psych (5.
|
|
30
|
+
psych (5.3.0)
|
|
31
31
|
date
|
|
32
32
|
stringio
|
|
33
33
|
racc (1.8.1)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# FactPulse::BoundingBoxSchema
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **x0** | **Float** | Coordonnée X gauche | |
|
|
8
|
+
| **y0** | **Float** | Coordonnée Y bas | |
|
|
9
|
+
| **x1** | **Float** | Coordonnée X droite | |
|
|
10
|
+
| **y1** | **Float** | Coordonnée Y haut | |
|
|
11
|
+
| **page** | **Integer** | Numéro de page (0-indexed) | [optional][default to 0] |
|
|
12
|
+
| **width** | **Float** | Largeur de la zone | |
|
|
13
|
+
| **height** | **Float** | Hauteur de la zone | |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'factpulse'
|
|
19
|
+
|
|
20
|
+
instance = FactPulse::BoundingBoxSchema.new(
|
|
21
|
+
x0: null,
|
|
22
|
+
y0: null,
|
|
23
|
+
x1: null,
|
|
24
|
+
y1: null,
|
|
25
|
+
page: null,
|
|
26
|
+
width: null,
|
|
27
|
+
height: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
data/docs/CadreDeFacturation.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **code_cadre_facturation** | [**CodeCadreFacturation**](CodeCadreFacturation.md) | | |
|
|
8
|
+
| **nature_operation** | [**NatureOperation**](NatureOperation.md) | | [optional] |
|
|
8
9
|
| **code_service_valideur** | **String** | | [optional] |
|
|
9
10
|
| **code_structure_valideur** | **String** | | [optional] |
|
|
10
11
|
|
|
@@ -15,6 +16,7 @@ require 'factpulse'
|
|
|
15
16
|
|
|
16
17
|
instance = FactPulse::CadreDeFacturation.new(
|
|
17
18
|
code_cadre_facturation: null,
|
|
19
|
+
nature_operation: null,
|
|
18
20
|
code_service_valideur: null,
|
|
19
21
|
code_structure_valideur: null
|
|
20
22
|
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# FactPulse::ChampVerifieSchema
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **business_term** | **String** | Business Term EN16931 (ex: BT-1) | |
|
|
8
|
+
| **label** | **String** | Libellé du champ (ex: N° Facture) | |
|
|
9
|
+
| **valeur_pdf** | **String** | | [optional] |
|
|
10
|
+
| **valeur_xml** | **String** | | [optional] |
|
|
11
|
+
| **statut** | [**StatutChampAPI**](StatutChampAPI.md) | Statut de conformité | |
|
|
12
|
+
| **message** | **String** | | [optional] |
|
|
13
|
+
| **confiance** | **Float** | Score de confiance (0-1) | [optional][default to 1.0] |
|
|
14
|
+
| **source** | **String** | Source d'extraction | [optional][default to 'pdf_natif'] |
|
|
15
|
+
| **bbox** | [**BoundingBoxSchema**](BoundingBoxSchema.md) | | [optional] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'factpulse'
|
|
21
|
+
|
|
22
|
+
instance = FactPulse::ChampVerifieSchema.new(
|
|
23
|
+
business_term: null,
|
|
24
|
+
label: null,
|
|
25
|
+
valeur_pdf: null,
|
|
26
|
+
valeur_xml: null,
|
|
27
|
+
statut: null,
|
|
28
|
+
message: null,
|
|
29
|
+
confiance: null,
|
|
30
|
+
source: null,
|
|
31
|
+
bbox: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# FactPulse::DimensionPageSchema
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **width** | **Float** | Largeur en points PDF | |
|
|
8
|
+
| **height** | **Float** | Hauteur en points PDF | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'factpulse'
|
|
14
|
+
|
|
15
|
+
instance = FactPulse::DimensionPageSchema.new(
|
|
16
|
+
width: null,
|
|
17
|
+
height: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/FluxResume.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# FactPulse::FluxResume
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **flow_id** | **String** | | |
|
|
8
|
+
| **tracking_id** | **String** | | [optional] |
|
|
9
|
+
| **nom** | **String** | | |
|
|
10
|
+
| **type_flux** | **String** | | [optional] |
|
|
11
|
+
| **direction_flux** | **String** | | [optional] |
|
|
12
|
+
| **statut_acquittement** | **String** | | [optional] |
|
|
13
|
+
| **date_creation** | **String** | | [optional] |
|
|
14
|
+
| **date_maj** | **String** | | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'factpulse'
|
|
20
|
+
|
|
21
|
+
instance = FactPulse::FluxResume.new(
|
|
22
|
+
flow_id: null,
|
|
23
|
+
tracking_id: null,
|
|
24
|
+
nom: null,
|
|
25
|
+
type_flux: null,
|
|
26
|
+
direction_flux: null,
|
|
27
|
+
statut_acquittement: null,
|
|
28
|
+
date_creation: null,
|
|
29
|
+
date_maj: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
data/docs/LigneDeTVA.md
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
| **taux** | **String** | | [optional] |
|
|
10
10
|
| **taux_manuel** | [**Tauxmanuel**](Tauxmanuel.md) | | [optional] |
|
|
11
11
|
| **categorie** | [**CategorieTVA**](CategorieTVA.md) | | [optional] |
|
|
12
|
+
| **motif_exoneration** | **String** | | [optional] |
|
|
13
|
+
| **code_vatex** | **String** | | [optional] |
|
|
12
14
|
|
|
13
15
|
## Example
|
|
14
16
|
|
|
@@ -20,7 +22,9 @@ instance = FactPulse::LigneDeTVA.new(
|
|
|
20
22
|
montant_tva: null,
|
|
21
23
|
taux: null,
|
|
22
24
|
taux_manuel: null,
|
|
23
|
-
categorie: null
|
|
25
|
+
categorie: null,
|
|
26
|
+
motif_exoneration: null,
|
|
27
|
+
code_vatex: null
|
|
24
28
|
)
|
|
25
29
|
```
|
|
26
30
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# FactPulse::NoteObligatoireSchema
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **code_sujet** | **String** | Code sujet (PMT, PMD, AAB) | |
|
|
8
|
+
| **label** | **String** | Libellé (ex: Indemnité recouvrement) | |
|
|
9
|
+
| **valeur_pdf** | **String** | | [optional] |
|
|
10
|
+
| **valeur_xml** | **String** | | [optional] |
|
|
11
|
+
| **statut** | [**StatutChampAPI**](StatutChampAPI.md) | Statut de conformité (CONFORME si XML trouvé dans PDF) | [optional] |
|
|
12
|
+
| **message** | **String** | | [optional] |
|
|
13
|
+
| **bbox** | [**BoundingBoxSchema**](BoundingBoxSchema.md) | | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'factpulse'
|
|
19
|
+
|
|
20
|
+
instance = FactPulse::NoteObligatoireSchema.new(
|
|
21
|
+
code_sujet: null,
|
|
22
|
+
label: null,
|
|
23
|
+
valeur_pdf: null,
|
|
24
|
+
valeur_xml: null,
|
|
25
|
+
statut: null,
|
|
26
|
+
message: null,
|
|
27
|
+
bbox: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# FactPulse::PDPCredentials
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **flow_service_url** | **String** | URL de base du Flow Service AFNOR | |
|
|
8
|
+
| **directory_service_url** | **String** | | [optional] |
|
|
9
|
+
| **token_url** | **String** | URL du serveur OAuth2 | |
|
|
10
|
+
| **client_id** | **String** | Client ID OAuth2 | |
|
|
11
|
+
| **client_secret** | **String** | Client Secret OAuth2 (sensible) | |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'factpulse'
|
|
17
|
+
|
|
18
|
+
instance = FactPulse::PDPCredentials.new(
|
|
19
|
+
flow_service_url: https://api.pdp-example.fr/flow/v1,
|
|
20
|
+
directory_service_url: null,
|
|
21
|
+
token_url: https://auth.pdp-example.fr/oauth/token,
|
|
22
|
+
client_id: factpulse_prod_abc123,
|
|
23
|
+
client_secret: secret_xyz789
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
data/docs/ProfilFlux.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# FactPulse::ReponseHealthcheckAFNOR
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **flow_service_ok** | **Boolean** | État du Flow Service API | |
|
|
8
|
+
| **directory_service_ok** | **Boolean** | État du Directory Service API | |
|
|
9
|
+
| **message** | **String** | Message descriptif de l'état | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'factpulse'
|
|
15
|
+
|
|
16
|
+
instance = FactPulse::ReponseHealthcheckAFNOR.new(
|
|
17
|
+
flow_service_ok: null,
|
|
18
|
+
directory_service_ok: null,
|
|
19
|
+
message: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# FactPulse::ReponseRechercheFlux
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **total** | **Integer** | Nombre total de résultats | |
|
|
8
|
+
| **offset** | **Integer** | Décalage appliqué | |
|
|
9
|
+
| **limit** | **Integer** | Limite de résultats | |
|
|
10
|
+
| **resultats** | [**Array<FluxResume>**](FluxResume.md) | Liste des flux trouvés | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'factpulse'
|
|
16
|
+
|
|
17
|
+
instance = FactPulse::ReponseRechercheFlux.new(
|
|
18
|
+
total: null,
|
|
19
|
+
offset: null,
|
|
20
|
+
limit: null,
|
|
21
|
+
resultats: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# FactPulse::ReponseSoumissionFlux
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **flow_id** | **String** | Identifiant unique du flux généré par la PDP | |
|
|
8
|
+
| **tracking_id** | **String** | | [optional] |
|
|
9
|
+
| **nom** | **String** | Nom du flux | |
|
|
10
|
+
| **syntaxe_flux** | **String** | Syntaxe du flux (CII, UBL, etc.) | |
|
|
11
|
+
| **profil_flux** | **String** | | [optional] |
|
|
12
|
+
| **sha256** | **String** | Hash SHA256 du fichier soumis | |
|
|
13
|
+
| **message** | **String** | Message de confirmation | |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'factpulse'
|
|
19
|
+
|
|
20
|
+
instance = FactPulse::ReponseSoumissionFlux.new(
|
|
21
|
+
flow_id: null,
|
|
22
|
+
tracking_id: null,
|
|
23
|
+
nom: null,
|
|
24
|
+
syntaxe_flux: null,
|
|
25
|
+
profil_flux: null,
|
|
26
|
+
sha256: null,
|
|
27
|
+
message: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# FactPulse::ReponseVerificationSucces
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **est_conforme** | **Boolean** | True si aucun écart critique | |
|
|
8
|
+
| **score_conformite** | **Float** | Score de conformité (0-100%) | |
|
|
9
|
+
| **champs_verifies** | **Integer** | Nombre de champs vérifiés | [optional][default to 0] |
|
|
10
|
+
| **champs_conformes** | **Integer** | Nombre de champs conformes | [optional][default to 0] |
|
|
11
|
+
| **est_facturx** | **Boolean** | True si le PDF contient du XML Factur-X | [optional][default to false] |
|
|
12
|
+
| **profil_facturx** | **String** | | [optional] |
|
|
13
|
+
| **champs** | [**Array<ChampVerifieSchema>**](ChampVerifieSchema.md) | Liste des champs vérifiés avec valeurs, statuts et coordonnées PDF | [optional] |
|
|
14
|
+
| **notes_obligatoires** | [**Array<NoteObligatoireSchema>**](NoteObligatoireSchema.md) | Notes obligatoires (PMT, PMD, AAB) avec localisation PDF | [optional] |
|
|
15
|
+
| **dimensions_pages** | [**Array<DimensionPageSchema>**](DimensionPageSchema.md) | Dimensions de chaque page du PDF (largeur, hauteur) | [optional] |
|
|
16
|
+
| **avertissements** | **Array<String>** | Avertissements non bloquants | [optional] |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'factpulse'
|
|
22
|
+
|
|
23
|
+
instance = FactPulse::ReponseVerificationSucces.new(
|
|
24
|
+
est_conforme: null,
|
|
25
|
+
score_conformite: null,
|
|
26
|
+
champs_verifies: null,
|
|
27
|
+
champs_conformes: null,
|
|
28
|
+
est_facturx: null,
|
|
29
|
+
profil_facturx: null,
|
|
30
|
+
champs: null,
|
|
31
|
+
notes_obligatoires: null,
|
|
32
|
+
dimensions_pages: null,
|
|
33
|
+
avertissements: null
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# FactPulse::RequeteRechercheFlux
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **date_maj_apres** | **Time** | | [optional] |
|
|
8
|
+
| **date_maj_avant** | **Time** | | [optional] |
|
|
9
|
+
| **type_flux** | [**Array<TypeFlux>**](TypeFlux.md) | | [optional] |
|
|
10
|
+
| **direction_flux** | [**Array<DirectionFlux>**](DirectionFlux.md) | | [optional] |
|
|
11
|
+
| **tracking_id** | **String** | | [optional] |
|
|
12
|
+
| **flow_id** | **String** | | [optional] |
|
|
13
|
+
| **statut_acquittement** | [**StatutAcquittement**](StatutAcquittement.md) | | [optional] |
|
|
14
|
+
| **offset** | **Integer** | Décalage pour la pagination | [optional][default to 0] |
|
|
15
|
+
| **limit** | **Integer** | Nombre maximum de résultats (max 100) | [optional][default to 25] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'factpulse'
|
|
21
|
+
|
|
22
|
+
instance = FactPulse::RequeteRechercheFlux.new(
|
|
23
|
+
date_maj_apres: null,
|
|
24
|
+
date_maj_avant: null,
|
|
25
|
+
type_flux: null,
|
|
26
|
+
direction_flux: null,
|
|
27
|
+
tracking_id: null,
|
|
28
|
+
flow_id: null,
|
|
29
|
+
statut_acquittement: null,
|
|
30
|
+
offset: null,
|
|
31
|
+
limit: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# FactPulse::RequeteSoumissionFlux
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **nom_flux** | **String** | Nom du flux (ex: 'Facture 2025-001') | |
|
|
8
|
+
| **syntaxe_flux** | [**SyntaxeFlux**](SyntaxeFlux.md) | Syntaxe du flux (CII pour Factur-X) | [optional] |
|
|
9
|
+
| **profil_flux** | [**ProfilFlux**](ProfilFlux.md) | | [optional] |
|
|
10
|
+
| **tracking_id** | **String** | | [optional] |
|
|
11
|
+
| **request_id** | **String** | | [optional] |
|
|
12
|
+
| **pdp_credentials** | [**PDPCredentials**](PDPCredentials.md) | | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'factpulse'
|
|
18
|
+
|
|
19
|
+
instance = FactPulse::RequeteSoumissionFlux.new(
|
|
20
|
+
nom_flux: Facture 2025-001,
|
|
21
|
+
syntaxe_flux: null,
|
|
22
|
+
profil_flux: null,
|
|
23
|
+
tracking_id: null,
|
|
24
|
+
request_id: null,
|
|
25
|
+
pdp_credentials: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/SyntaxeFlux.md
ADDED
|
@@ -171,7 +171,7 @@ end
|
|
|
171
171
|
|
|
172
172
|
Obtenir le statut d'une tâche de génération
|
|
173
173
|
|
|
174
|
-
Récupère l'état d'avancement d'une tâche de génération de facture. ## États possibles Le champ `statut` utilise l'enum `StatutCelery` avec les valeurs : - **PENDING, STARTED, SUCCESS, FAILURE, RETRY** Voir la documentation du schéma `StatutCelery` pour les détails. ## Résultat métier Quand `statut=\"SUCCESS\"`, le champ `resultat` contient : - `statut` : \"SUCCES\" ou \"ERREUR\" (résultat métier) - `chemin_fichier` : Chemin du fichier généré (si succès) - `
|
|
174
|
+
Récupère l'état d'avancement d'une tâche de génération de facture. ## États possibles Le champ `statut` utilise l'enum `StatutCelery` avec les valeurs : - **PENDING, STARTED, SUCCESS, FAILURE, RETRY** Voir la documentation du schéma `StatutCelery` pour les détails. ## Résultat métier Quand `statut=\"SUCCESS\"`, le champ `resultat` contient : - `statut` : \"SUCCES\" ou \"ERREUR\" (résultat métier) - `chemin_fichier` : Chemin du fichier généré (si succès) - `errorCode`, `errorMessage`, `details` : Format AFNOR (si échec métier) ## Usage Appelez cet endpoint en boucle (polling) toutes les 2-3 secondes jusqu'à ce que `statut` soit `SUCCESS` ou `FAILURE`.
|
|
175
175
|
|
|
176
176
|
### Examples
|
|
177
177
|
|
|
@@ -619,7 +619,7 @@ end
|
|
|
619
619
|
|
|
620
620
|
Valider un PDF Factur-X (asynchrone avec polling)
|
|
621
621
|
|
|
622
|
-
Valide un PDF Factur-X de manière asynchrone avec système de polling. ## Fonctionnement 1. **Soumission** : Le PDF est mis en file d'attente pour validation asynchrone 2. **Retour immédiat** : Vous recevez un `id_tache` (HTTP 202) 3. **Suivi** : Utilisez l'endpoint `/taches/{id_tache}/statut` pour suivre l'avancement ## Avantages du mode asynchrone - **Pas de timeout** : Idéal pour les gros PDFs ou la validation VeraPDF (qui peut prendre plusieurs secondes) - **Scalabilité** : Les validations sont traitées par des workers Celery dédiés - **Suivi d'état** : Permet de suivre la progression de la validation - **Non-bloquant** : Votre client ne reste pas en attente pendant la validation ## Quand utiliser ce mode ? - **Validation VeraPDF activée** (`use_verapdf=True`) : La validation stricte peut prendre 2-10 secondes - **Gros fichiers PDF** : PDFs > 1 MB - **Traitement par lots** : Validation de multiples factures en parallèle - **Intégration asynchrone** : Votre système supporte le polling ## Contrôles effectués ### 1. Extraction et validation du XML Factur-X - Vérifie la présence d'un fichier XML embarqué conforme Factur-X - Détecte automatiquement le profil utilisé (MINIMUM, BASIC, EN16931, EXTENDED) - Valide le XML contre les règles Schematron du profil détecté ### 2. Conformité PDF/A - **Sans VeraPDF** : Validation basique par métadonnées (rapide, ~100ms) - **Avec VeraPDF** : Validation stricte selon ISO 19005 (146+ règles, 2-10s) - Détecte la version PDF/A (PDF/A-1, PDF/A-3, etc.) - Rapports détaillés des non-conformités ### 3. Métadonnées XMP - Vérifie la présence de métadonnées XMP dans le PDF - Valide la conformité des métadonnées Factur-X (profil, version) - Extrait toutes les métadonnées XMP disponibles ### 4. Signatures électroniques - Détecte la présence de signatures ou cachets électroniques - Extrait les informations sur chaque signature (signataire, date, raison) - Compte le nombre de signatures présentes ## Paramètres - **fichier_pdf** : Le fichier PDF Factur-X à valider - **profil** : Le profil Factur-X attendu (optionnel). Si non spécifié, le profil sera automatiquement détecté depuis le fichier XML embarqué. - **use_verapdf** : Active la validation stricte PDF/A avec VeraPDF. ⚠️ **Attention** : VeraPDF peut prendre 2-10 secondes selon la taille du PDF. Recommandé uniquement en mode asynchrone pour éviter les timeouts. ## Récupération du résultat Après soumission, utilisez l'endpoint `GET /taches/{id_tache}/statut` pour récupérer le résultat. **Exemple de polling** : ```python import requests import time # 1. Soumettre la tâche response = requests.post(\"/valider-facturx-async\", files={\"fichier_pdf\": pdf_file}) task_id = response.json()[\"id_tache\"] # 2. Polling toutes les 2 secondes while True: status_response = requests.get(f\"/taches/{task_id}/statut\") status = status_response.json() if status[\"statut\"] == \"SUCCESS\": resultat = status[\"resultat\"][\"resultat_validation\"] print(f\"Conforme: {resultat['est_conforme']}\") break elif status[\"statut\"] == \"FAILURE\": print(f\"Erreur: {status['resultat']['
|
|
622
|
+
Valide un PDF Factur-X de manière asynchrone avec système de polling. ## Fonctionnement 1. **Soumission** : Le PDF est mis en file d'attente pour validation asynchrone 2. **Retour immédiat** : Vous recevez un `id_tache` (HTTP 202) 3. **Suivi** : Utilisez l'endpoint `/taches/{id_tache}/statut` pour suivre l'avancement ## Avantages du mode asynchrone - **Pas de timeout** : Idéal pour les gros PDFs ou la validation VeraPDF (qui peut prendre plusieurs secondes) - **Scalabilité** : Les validations sont traitées par des workers Celery dédiés - **Suivi d'état** : Permet de suivre la progression de la validation - **Non-bloquant** : Votre client ne reste pas en attente pendant la validation ## Quand utiliser ce mode ? - **Validation VeraPDF activée** (`use_verapdf=True`) : La validation stricte peut prendre 2-10 secondes - **Gros fichiers PDF** : PDFs > 1 MB - **Traitement par lots** : Validation de multiples factures en parallèle - **Intégration asynchrone** : Votre système supporte le polling ## Contrôles effectués ### 1. Extraction et validation du XML Factur-X - Vérifie la présence d'un fichier XML embarqué conforme Factur-X - Détecte automatiquement le profil utilisé (MINIMUM, BASIC, EN16931, EXTENDED) - Valide le XML contre les règles Schematron du profil détecté ### 2. Conformité PDF/A - **Sans VeraPDF** : Validation basique par métadonnées (rapide, ~100ms) - **Avec VeraPDF** : Validation stricte selon ISO 19005 (146+ règles, 2-10s) - Détecte la version PDF/A (PDF/A-1, PDF/A-3, etc.) - Rapports détaillés des non-conformités ### 3. Métadonnées XMP - Vérifie la présence de métadonnées XMP dans le PDF - Valide la conformité des métadonnées Factur-X (profil, version) - Extrait toutes les métadonnées XMP disponibles ### 4. Signatures électroniques - Détecte la présence de signatures ou cachets électroniques - Extrait les informations sur chaque signature (signataire, date, raison) - Compte le nombre de signatures présentes ## Paramètres - **fichier_pdf** : Le fichier PDF Factur-X à valider - **profil** : Le profil Factur-X attendu (optionnel). Si non spécifié, le profil sera automatiquement détecté depuis le fichier XML embarqué. - **use_verapdf** : Active la validation stricte PDF/A avec VeraPDF. ⚠️ **Attention** : VeraPDF peut prendre 2-10 secondes selon la taille du PDF. Recommandé uniquement en mode asynchrone pour éviter les timeouts. ## Récupération du résultat Après soumission, utilisez l'endpoint `GET /taches/{id_tache}/statut` pour récupérer le résultat. **Exemple de polling** : ```python import requests import time # 1. Soumettre la tâche response = requests.post(\"/valider-facturx-async\", files={\"fichier_pdf\": pdf_file}) task_id = response.json()[\"id_tache\"] # 2. Polling toutes les 2 secondes while True: status_response = requests.get(f\"/taches/{task_id}/statut\") status = status_response.json() if status[\"statut\"] == \"SUCCESS\": resultat = status[\"resultat\"][\"resultat_validation\"] print(f\"Conforme: {resultat['est_conforme']}\") break elif status[\"statut\"] == \"FAILURE\": print(f\"Erreur: {status['resultat']['errorMessage']}\") break time.sleep(2) # Attendre 2 secondes avant le prochain check ``` ## Cas d'usage - Valider des factures avant envoi avec VeraPDF (validation stricte) - Traiter des lots de factures en parallèle - Intégrer la validation dans un pipeline asynchrone - Valider des PDFs volumineux sans risque de timeout
|
|
623
623
|
|
|
624
624
|
### Examples
|
|
625
625
|
|
data/docs/TypeFlux.md
ADDED