@factpulse/sdk 3.0.34 → 3.0.36

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 (46) hide show
  1. package/.openapi-generator/FILES +2 -2
  2. package/CHANGELOG.md +12 -5
  3. package/dist/esm/models/chorus-pro-credentials.d.ts +19 -7
  4. package/dist/esm/models/chorus-pro-destination.d.ts +2 -2
  5. package/dist/esm/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts} +8 -20
  6. package/dist/esm/models/get-chorus-pro-id-request.d.ts +2 -2
  7. package/dist/esm/models/get-invoice-request.d.ts +2 -2
  8. package/dist/esm/models/get-structure-request.d.ts +2 -2
  9. package/dist/esm/models/index.d.ts +1 -1
  10. package/dist/esm/models/index.js +1 -1
  11. package/dist/esm/models/search-structure-request.d.ts +2 -2
  12. package/dist/esm/models/submit-invoice-request.d.ts +2 -2
  13. package/dist/esm/src/helpers/client.js +1 -1
  14. package/dist/models/chorus-pro-credentials.d.ts +19 -7
  15. package/dist/models/chorus-pro-destination.d.ts +2 -2
  16. package/dist/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts} +8 -20
  17. package/dist/models/get-chorus-pro-id-request.d.ts +2 -2
  18. package/dist/models/get-invoice-request.d.ts +2 -2
  19. package/dist/models/get-structure-request.d.ts +2 -2
  20. package/dist/models/index.d.ts +1 -1
  21. package/dist/models/index.js +1 -1
  22. package/dist/models/search-structure-request.d.ts +2 -2
  23. package/dist/models/submit-invoice-request.d.ts +2 -2
  24. package/dist/src/helpers/client.js +1 -1
  25. package/docs/ChorusProCredentials.md +9 -9
  26. package/docs/ChorusProDestination.md +1 -1
  27. package/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +29 -0
  28. package/docs/GetChorusProIdRequest.md +1 -1
  29. package/docs/GetInvoiceRequest.md +1 -1
  30. package/docs/GetStructureRequest.md +1 -1
  31. package/docs/SearchStructureRequest.md +1 -1
  32. package/docs/SubmitInvoiceRequest.md +1 -1
  33. package/models/chorus-pro-credentials.ts +19 -7
  34. package/models/chorus-pro-destination.ts +2 -2
  35. package/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts} +8 -20
  36. package/models/get-chorus-pro-id-request.ts +2 -2
  37. package/models/get-invoice-request.ts +2 -2
  38. package/models/get-structure-request.ts +2 -2
  39. package/models/index.ts +1 -1
  40. package/models/search-structure-request.ts +2 -2
  41. package/models/submit-invoice-request.ts +2 -2
  42. package/package.json +1 -1
  43. package/src/helpers/client.ts +1 -1
  44. package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -29
  45. /package/dist/esm/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js} +0 -0
  46. /package/dist/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js → facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js} +0 -0
@@ -174,8 +174,8 @@ docs/ExtractionInfo.md
174
174
  docs/FacturXInvoice.md
175
175
  docs/FacturXPDFInfo.md
176
176
  docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md
177
- docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md
178
177
  docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md
178
+ docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md
179
179
  docs/FieldStatus.md
180
180
  docs/FileInfo.md
181
181
  docs/FilesInfo.md
@@ -473,8 +473,8 @@ models/extraction-info.ts
473
473
  models/factur-xinvoice.ts
474
474
  models/factur-xpdfinfo.ts
475
475
  models/facture-electronique-rest-api-schemas-cdar-validation-error-response.ts
476
- models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts
477
476
  models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.ts
477
+ models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts
478
478
  models/field-status.ts
479
479
  models/file-info.ts
480
480
  models/files-info.ts
package/CHANGELOG.md CHANGED
@@ -7,11 +7,18 @@ 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.34] - 2026-01-17
10
+ ## [3.0.36] - 2026-01-17
11
11
 
12
- ### Fixed
13
- - Gestion des erreurs métier (`result.status === "ERROR"`) dans tous les SDK - corrige l'erreur "No content" lors d'échecs de validation
12
+ ### Added
13
+ - Version initiale du SDK typescript
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
14
21
 
15
22
 
16
- [Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v3.0.34...HEAD
17
- [3.0.34]: https://github.com/factpulse/sdk-typescript/releases/tag/v3.0.34
23
+ [Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v3.0.36...HEAD
24
+ [3.0.36]: https://github.com/factpulse/sdk-typescript/releases/tag/v3.0.36
@@ -10,15 +10,27 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
13
+ * Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
14
14
  */
15
15
  export interface ChorusProCredentials {
16
- 'pisteClientId'?: string | null;
17
- 'pisteClientSecret'?: string | null;
18
- 'chorusLogin'?: string | null;
19
- 'chorusPassword'?: string | null;
20
16
  /**
21
- * [MODE 2] Use sandbox mode (default: True)
17
+ * PISTE Client ID (government API portal)
22
18
  */
23
- 'sandboxMode'?: boolean;
19
+ 'pisteClientId': string;
20
+ /**
21
+ * PISTE Client Secret
22
+ */
23
+ 'pisteClientSecret': string;
24
+ /**
25
+ * Chorus Pro login
26
+ */
27
+ 'chorusProLogin': string;
28
+ /**
29
+ * Chorus Pro password
30
+ */
31
+ 'chorusProPassword': string;
32
+ /**
33
+ * Use sandbox environment (true) or production (false)
34
+ */
35
+ 'sandbox'?: boolean;
24
36
  }
@@ -9,13 +9,13 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { ChorusProCredentials } from './chorus-pro-credentials';
12
+ import type { FactureElectroniqueRestApiSchemasProcessingChorusProCredentials } from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
13
13
  /**
14
14
  * Specific configuration for Chorus Pro destination.
15
15
  */
16
16
  export interface ChorusProDestination {
17
17
  'type'?: ChorusProDestinationTypeEnum;
18
- 'credentials'?: ChorusProCredentials | null;
18
+ 'credentials'?: FactureElectroniqueRestApiSchemasProcessingChorusProCredentials | null;
19
19
  }
20
20
  export declare const ChorusProDestinationTypeEnum: {
21
21
  readonly ChorusPro: "chorus_pro";
@@ -10,27 +10,15 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
13
+ * Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
14
14
  */
15
- export interface FactureElectroniqueRestApiSchemasChorusProChorusProCredentials {
15
+ export interface FactureElectroniqueRestApiSchemasProcessingChorusProCredentials {
16
+ 'pisteClientId'?: string | null;
17
+ 'pisteClientSecret'?: string | null;
18
+ 'chorusLogin'?: string | null;
19
+ 'chorusPassword'?: string | null;
16
20
  /**
17
- * PISTE Client ID (government API portal)
21
+ * [MODE 2] Use sandbox mode (default: True)
18
22
  */
19
- 'pisteClientId': string;
20
- /**
21
- * PISTE Client Secret
22
- */
23
- 'pisteClientSecret': string;
24
- /**
25
- * Chorus Pro login
26
- */
27
- 'chorusProLogin': string;
28
- /**
29
- * Chorus Pro password
30
- */
31
- 'chorusProPassword': string;
32
- /**
33
- * Use sandbox environment (true) or production (false)
34
- */
35
- 'sandbox'?: boolean;
23
+ 'sandboxMode'?: boolean;
36
24
  }
@@ -9,12 +9,12 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
12
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
13
13
  /**
14
14
  * Get Chorus Pro ID from SIRET.
15
15
  */
16
16
  export interface GetChorusProIdRequest {
17
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
17
+ 'credentials'?: ChorusProCredentials | null;
18
18
  /**
19
19
  * Structure SIRET (14 digits)
20
20
  */
@@ -9,12 +9,12 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
12
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
13
13
  /**
14
14
  * Get an invoice.
15
15
  */
16
16
  export interface GetInvoiceRequest {
17
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
17
+ 'credentials'?: ChorusProCredentials | null;
18
18
  /**
19
19
  * Chorus Pro invoice ID
20
20
  */
@@ -9,12 +9,12 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
12
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
13
13
  /**
14
14
  * Get structure details.
15
15
  */
16
16
  export interface GetStructureRequest {
17
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
17
+ 'credentials'?: ChorusProCredentials | null;
18
18
  /**
19
19
  * Chorus Pro structure ID
20
20
  */
@@ -146,8 +146,8 @@ export * from './extraction-info';
146
146
  export * from './factur-xinvoice';
147
147
  export * from './factur-xpdfinfo';
148
148
  export * from './facture-electronique-rest-api-schemas-cdar-validation-error-response';
149
- export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
150
149
  export * from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
150
+ export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
151
151
  export * from './field-status';
152
152
  export * from './file-info';
153
153
  export * from './files-info';
@@ -146,8 +146,8 @@ export * from './extraction-info';
146
146
  export * from './factur-xinvoice';
147
147
  export * from './factur-xpdfinfo';
148
148
  export * from './facture-electronique-rest-api-schemas-cdar-validation-error-response';
149
- export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
150
149
  export * from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
150
+ export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
151
151
  export * from './field-status';
152
152
  export * from './file-info';
153
153
  export * from './files-info';
@@ -9,12 +9,12 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
12
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
13
13
  /**
14
14
  * Search structures by criteria.
15
15
  */
16
16
  export interface SearchStructureRequest {
17
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
17
+ 'credentials'?: ChorusProCredentials | null;
18
18
  'structureIdentifier'?: string | null;
19
19
  'structureIdentifierType'?: string | null;
20
20
  'companyName'?: string | null;
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
12
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
13
13
  import type { SubmitGrossAmount } from './submit-gross-amount';
14
14
  import type { SubmitNetAmount } from './submit-net-amount';
15
15
  import type { SubmitVatAmount } from './submit-vat-amount';
@@ -17,7 +17,7 @@ import type { SubmitVatAmount } from './submit-vat-amount';
17
17
  * Submit an invoice to Chorus Pro.
18
18
  */
19
19
  export interface SubmitInvoiceRequest {
20
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
20
+ 'credentials'?: ChorusProCredentials | null;
21
21
  /**
22
22
  * Invoice number
23
23
  */
@@ -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);
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' });
@@ -10,15 +10,27 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
13
+ * Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
14
14
  */
15
15
  export interface ChorusProCredentials {
16
- 'pisteClientId'?: string | null;
17
- 'pisteClientSecret'?: string | null;
18
- 'chorusLogin'?: string | null;
19
- 'chorusPassword'?: string | null;
20
16
  /**
21
- * [MODE 2] Use sandbox mode (default: True)
17
+ * PISTE Client ID (government API portal)
22
18
  */
23
- 'sandboxMode'?: boolean;
19
+ 'pisteClientId': string;
20
+ /**
21
+ * PISTE Client Secret
22
+ */
23
+ 'pisteClientSecret': string;
24
+ /**
25
+ * Chorus Pro login
26
+ */
27
+ 'chorusProLogin': string;
28
+ /**
29
+ * Chorus Pro password
30
+ */
31
+ 'chorusProPassword': string;
32
+ /**
33
+ * Use sandbox environment (true) or production (false)
34
+ */
35
+ 'sandbox'?: boolean;
24
36
  }
@@ -9,13 +9,13 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { ChorusProCredentials } from './chorus-pro-credentials';
12
+ import type { FactureElectroniqueRestApiSchemasProcessingChorusProCredentials } from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
13
13
  /**
14
14
  * Specific configuration for Chorus Pro destination.
15
15
  */
16
16
  export interface ChorusProDestination {
17
17
  'type'?: ChorusProDestinationTypeEnum;
18
- 'credentials'?: ChorusProCredentials | null;
18
+ 'credentials'?: FactureElectroniqueRestApiSchemasProcessingChorusProCredentials | null;
19
19
  }
20
20
  export declare const ChorusProDestinationTypeEnum: {
21
21
  readonly ChorusPro: "chorus_pro";
@@ -10,27 +10,15 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
13
+ * Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
14
14
  */
15
- export interface FactureElectroniqueRestApiSchemasChorusProChorusProCredentials {
15
+ export interface FactureElectroniqueRestApiSchemasProcessingChorusProCredentials {
16
+ 'pisteClientId'?: string | null;
17
+ 'pisteClientSecret'?: string | null;
18
+ 'chorusLogin'?: string | null;
19
+ 'chorusPassword'?: string | null;
16
20
  /**
17
- * PISTE Client ID (government API portal)
21
+ * [MODE 2] Use sandbox mode (default: True)
18
22
  */
19
- 'pisteClientId': string;
20
- /**
21
- * PISTE Client Secret
22
- */
23
- 'pisteClientSecret': string;
24
- /**
25
- * Chorus Pro login
26
- */
27
- 'chorusProLogin': string;
28
- /**
29
- * Chorus Pro password
30
- */
31
- 'chorusProPassword': string;
32
- /**
33
- * Use sandbox environment (true) or production (false)
34
- */
35
- 'sandbox'?: boolean;
23
+ 'sandboxMode'?: boolean;
36
24
  }
@@ -9,12 +9,12 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
12
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
13
13
  /**
14
14
  * Get Chorus Pro ID from SIRET.
15
15
  */
16
16
  export interface GetChorusProIdRequest {
17
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
17
+ 'credentials'?: ChorusProCredentials | null;
18
18
  /**
19
19
  * Structure SIRET (14 digits)
20
20
  */
@@ -9,12 +9,12 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
12
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
13
13
  /**
14
14
  * Get an invoice.
15
15
  */
16
16
  export interface GetInvoiceRequest {
17
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
17
+ 'credentials'?: ChorusProCredentials | null;
18
18
  /**
19
19
  * Chorus Pro invoice ID
20
20
  */
@@ -9,12 +9,12 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
12
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
13
13
  /**
14
14
  * Get structure details.
15
15
  */
16
16
  export interface GetStructureRequest {
17
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
17
+ 'credentials'?: ChorusProCredentials | null;
18
18
  /**
19
19
  * Chorus Pro structure ID
20
20
  */
@@ -146,8 +146,8 @@ export * from './extraction-info';
146
146
  export * from './factur-xinvoice';
147
147
  export * from './factur-xpdfinfo';
148
148
  export * from './facture-electronique-rest-api-schemas-cdar-validation-error-response';
149
- export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
150
149
  export * from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
150
+ export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
151
151
  export * from './field-status';
152
152
  export * from './file-info';
153
153
  export * from './files-info';
@@ -162,8 +162,8 @@ __exportStar(require("./extraction-info"), exports);
162
162
  __exportStar(require("./factur-xinvoice"), exports);
163
163
  __exportStar(require("./factur-xpdfinfo"), exports);
164
164
  __exportStar(require("./facture-electronique-rest-api-schemas-cdar-validation-error-response"), exports);
165
- __exportStar(require("./facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials"), exports);
166
165
  __exportStar(require("./facture-electronique-rest-api-schemas-ereporting-invoice-type-code"), exports);
166
+ __exportStar(require("./facture-electronique-rest-api-schemas-processing-chorus-pro-credentials"), exports);
167
167
  __exportStar(require("./field-status"), exports);
168
168
  __exportStar(require("./file-info"), exports);
169
169
  __exportStar(require("./files-info"), exports);
@@ -9,12 +9,12 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
12
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
13
13
  /**
14
14
  * Search structures by criteria.
15
15
  */
16
16
  export interface SearchStructureRequest {
17
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
17
+ 'credentials'?: ChorusProCredentials | null;
18
18
  'structureIdentifier'?: string | null;
19
19
  'structureIdentifierType'?: string | null;
20
20
  'companyName'?: string | null;
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
12
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
13
13
  import type { SubmitGrossAmount } from './submit-gross-amount';
14
14
  import type { SubmitNetAmount } from './submit-net-amount';
15
15
  import type { SubmitVatAmount } from './submit-vat-amount';
@@ -17,7 +17,7 @@ import type { SubmitVatAmount } from './submit-vat-amount';
17
17
  * Submit an invoice to Chorus Pro.
18
18
  */
19
19
  export interface SubmitInvoiceRequest {
20
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
20
+ 'credentials'?: ChorusProCredentials | null;
21
21
  /**
22
22
  * Invoice number
23
23
  */
@@ -351,7 +351,7 @@ class FactPulseClient {
351
351
  for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {
352
352
  yield this.ensureAuthenticated();
353
353
  const form = new form_data_1.default();
354
- form.append('invoice_data', jsonData);
354
+ form.append('invoice_data', Buffer.from(jsonData, 'utf-8'), { contentType: 'application/json' });
355
355
  form.append('profile', profile);
356
356
  form.append('output_format', outputFormat);
357
357
  form.append('source_pdf', fs.createReadStream(pdfPath), { filename: path.basename(pdfPath), contentType: 'application/pdf' });
@@ -1,16 +1,16 @@
1
1
  # ChorusProCredentials
2
2
 
3
- Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
3
+ Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
4
4
 
5
5
  ## Properties
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **pisteClientId** | **string** | | [optional] [default to undefined]
10
- **pisteClientSecret** | **string** | | [optional] [default to undefined]
11
- **chorusLogin** | **string** | | [optional] [default to undefined]
12
- **chorusPassword** | **string** | | [optional] [default to undefined]
13
- **sandboxMode** | **boolean** | [MODE 2] Use sandbox mode (default: True) | [optional] [default to true]
9
+ **pisteClientId** | **string** | PISTE Client ID (government API portal) | [default to undefined]
10
+ **pisteClientSecret** | **string** | PISTE Client Secret | [default to undefined]
11
+ **chorusProLogin** | **string** | Chorus Pro login | [default to undefined]
12
+ **chorusProPassword** | **string** | Chorus Pro password | [default to undefined]
13
+ **sandbox** | **boolean** | Use sandbox environment (true) or production (false) | [optional] [default to true]
14
14
 
15
15
  ## Example
16
16
 
@@ -20,9 +20,9 @@ import { ChorusProCredentials } from '@factpulse/sdk';
20
20
  const instance: ChorusProCredentials = {
21
21
  pisteClientId,
22
22
  pisteClientSecret,
23
- chorusLogin,
24
- chorusPassword,
25
- sandboxMode,
23
+ chorusProLogin,
24
+ chorusProPassword,
25
+ sandbox,
26
26
  };
27
27
  ```
28
28
 
@@ -7,7 +7,7 @@ Specific configuration for Chorus Pro destination.
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
9
  **type** | **string** | | [optional] [default to TypeEnum_ChorusPro]
10
- **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
10
+ **credentials** | [**FactureElectroniqueRestApiSchemasProcessingChorusProCredentials**](FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md) | | [optional] [default to undefined]
11
11
 
12
12
  ## Example
13
13
 
@@ -0,0 +1,29 @@
1
+ # FactureElectroniqueRestApiSchemasProcessingChorusProCredentials
2
+
3
+ Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **pisteClientId** | **string** | | [optional] [default to undefined]
10
+ **pisteClientSecret** | **string** | | [optional] [default to undefined]
11
+ **chorusLogin** | **string** | | [optional] [default to undefined]
12
+ **chorusPassword** | **string** | | [optional] [default to undefined]
13
+ **sandboxMode** | **boolean** | [MODE 2] Use sandbox mode (default: True) | [optional] [default to true]
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import { FactureElectroniqueRestApiSchemasProcessingChorusProCredentials } from '@factpulse/sdk';
19
+
20
+ const instance: FactureElectroniqueRestApiSchemasProcessingChorusProCredentials = {
21
+ pisteClientId,
22
+ pisteClientSecret,
23
+ chorusLogin,
24
+ chorusPassword,
25
+ sandboxMode,
26
+ };
27
+ ```
28
+
29
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -6,7 +6,7 @@ Get Chorus Pro ID from SIRET.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **credentials** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] [default to undefined]
9
+ **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
10
10
  **siret** | **string** | Structure SIRET (14 digits) | [default to undefined]
11
11
  **identifierType** | **string** | Identifier type (SIRET, SIREN, UE_HORS_FRANCE, etc.) | [optional] [default to 'SIRET']
12
12
 
@@ -6,7 +6,7 @@ Get an invoice.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **credentials** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] [default to undefined]
9
+ **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
10
10
  **chorusInvoiceId** | **number** | Chorus Pro invoice ID | [default to undefined]
11
11
 
12
12
  ## Example
@@ -6,7 +6,7 @@ Get structure details.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **credentials** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] [default to undefined]
9
+ **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
10
10
  **structureId** | **number** | Chorus Pro structure ID | [default to undefined]
11
11
  **languageCode** | **string** | Language code (fr, en) | [optional] [default to 'fr']
12
12
 
@@ -6,7 +6,7 @@ Search structures by criteria.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **credentials** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] [default to undefined]
9
+ **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
10
10
  **structureIdentifier** | **string** | | [optional] [default to undefined]
11
11
  **structureIdentifierType** | **string** | | [optional] [default to undefined]
12
12
  **companyName** | **string** | | [optional] [default to undefined]
@@ -6,7 +6,7 @@ Submit an invoice to Chorus Pro.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **credentials** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] [default to undefined]
9
+ **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] [default to undefined]
10
10
  **invoiceNumber** | **string** | Invoice number | [default to undefined]
11
11
  **invoiceDate** | **string** | Invoice date (ISO format: YYYY-MM-DD) | [default to undefined]
12
12
  **paymentDueDate** | **string** | | [optional] [default to undefined]
@@ -15,16 +15,28 @@
15
15
 
16
16
 
17
17
  /**
18
- * Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
18
+ * Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
19
19
  */
20
20
  export interface ChorusProCredentials {
21
- 'pisteClientId'?: string | null;
22
- 'pisteClientSecret'?: string | null;
23
- 'chorusLogin'?: string | null;
24
- 'chorusPassword'?: string | null;
25
21
  /**
26
- * [MODE 2] Use sandbox mode (default: True)
22
+ * PISTE Client ID (government API portal)
27
23
  */
28
- 'sandboxMode'?: boolean;
24
+ 'pisteClientId': string;
25
+ /**
26
+ * PISTE Client Secret
27
+ */
28
+ 'pisteClientSecret': string;
29
+ /**
30
+ * Chorus Pro login
31
+ */
32
+ 'chorusProLogin': string;
33
+ /**
34
+ * Chorus Pro password
35
+ */
36
+ 'chorusProPassword': string;
37
+ /**
38
+ * Use sandbox environment (true) or production (false)
39
+ */
40
+ 'sandbox'?: boolean;
29
41
  }
30
42
 
@@ -15,14 +15,14 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { ChorusProCredentials } from './chorus-pro-credentials';
18
+ import type { FactureElectroniqueRestApiSchemasProcessingChorusProCredentials } from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
19
19
 
20
20
  /**
21
21
  * Specific configuration for Chorus Pro destination.
22
22
  */
23
23
  export interface ChorusProDestination {
24
24
  'type'?: ChorusProDestinationTypeEnum;
25
- 'credentials'?: ChorusProCredentials | null;
25
+ 'credentials'?: FactureElectroniqueRestApiSchemasProcessingChorusProCredentials | null;
26
26
  }
27
27
 
28
28
  export const ChorusProDestinationTypeEnum = {
@@ -15,28 +15,16 @@
15
15
 
16
16
 
17
17
  /**
18
- * Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
18
+ * Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
19
19
  */
20
- export interface FactureElectroniqueRestApiSchemasChorusProChorusProCredentials {
20
+ export interface FactureElectroniqueRestApiSchemasProcessingChorusProCredentials {
21
+ 'pisteClientId'?: string | null;
22
+ 'pisteClientSecret'?: string | null;
23
+ 'chorusLogin'?: string | null;
24
+ 'chorusPassword'?: string | null;
21
25
  /**
22
- * PISTE Client ID (government API portal)
26
+ * [MODE 2] Use sandbox mode (default: True)
23
27
  */
24
- 'pisteClientId': string;
25
- /**
26
- * PISTE Client Secret
27
- */
28
- 'pisteClientSecret': string;
29
- /**
30
- * Chorus Pro login
31
- */
32
- 'chorusProLogin': string;
33
- /**
34
- * Chorus Pro password
35
- */
36
- 'chorusProPassword': string;
37
- /**
38
- * Use sandbox environment (true) or production (false)
39
- */
40
- 'sandbox'?: boolean;
28
+ 'sandboxMode'?: boolean;
41
29
  }
42
30
 
@@ -15,13 +15,13 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
18
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
19
19
 
20
20
  /**
21
21
  * Get Chorus Pro ID from SIRET.
22
22
  */
23
23
  export interface GetChorusProIdRequest {
24
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
24
+ 'credentials'?: ChorusProCredentials | null;
25
25
  /**
26
26
  * Structure SIRET (14 digits)
27
27
  */
@@ -15,13 +15,13 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
18
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
19
19
 
20
20
  /**
21
21
  * Get an invoice.
22
22
  */
23
23
  export interface GetInvoiceRequest {
24
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
24
+ 'credentials'?: ChorusProCredentials | null;
25
25
  /**
26
26
  * Chorus Pro invoice ID
27
27
  */
@@ -15,13 +15,13 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
18
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
19
19
 
20
20
  /**
21
21
  * Get structure details.
22
22
  */
23
23
  export interface GetStructureRequest {
24
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
24
+ 'credentials'?: ChorusProCredentials | null;
25
25
  /**
26
26
  * Chorus Pro structure ID
27
27
  */
package/models/index.ts CHANGED
@@ -146,8 +146,8 @@ export * from './extraction-info';
146
146
  export * from './factur-xinvoice';
147
147
  export * from './factur-xpdfinfo';
148
148
  export * from './facture-electronique-rest-api-schemas-cdar-validation-error-response';
149
- export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
150
149
  export * from './facture-electronique-rest-api-schemas-ereporting-invoice-type-code';
150
+ export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
151
151
  export * from './field-status';
152
152
  export * from './file-info';
153
153
  export * from './files-info';
@@ -15,13 +15,13 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
18
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
19
19
 
20
20
  /**
21
21
  * Search structures by criteria.
22
22
  */
23
23
  export interface SearchStructureRequest {
24
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
24
+ 'credentials'?: ChorusProCredentials | null;
25
25
  'structureIdentifier'?: string | null;
26
26
  'structureIdentifierType'?: string | null;
27
27
  'companyName'?: string | null;
@@ -15,7 +15,7 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
18
+ import type { ChorusProCredentials } from './chorus-pro-credentials';
19
19
  // May contain unused imports in some cases
20
20
  // @ts-ignore
21
21
  import type { SubmitGrossAmount } from './submit-gross-amount';
@@ -30,7 +30,7 @@ import type { SubmitVatAmount } from './submit-vat-amount';
30
30
  * Submit an invoice to Chorus Pro.
31
31
  */
32
32
  export interface SubmitInvoiceRequest {
33
- 'credentials'?: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials | null;
33
+ 'credentials'?: ChorusProCredentials | null;
34
34
  /**
35
35
  * Invoice number
36
36
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factpulse/sdk",
3
- "version": "3.0.34",
3
+ "version": "3.0.36",
4
4
  "description": "OpenAPI client for @factpulse/sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
@@ -333,7 +333,7 @@ export class FactPulseClient {
333
333
  for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {
334
334
  await this.ensureAuthenticated();
335
335
  const form = new FormData();
336
- form.append('invoice_data', jsonData);
336
+ form.append('invoice_data', Buffer.from(jsonData, 'utf-8'), { contentType: 'application/json' });
337
337
  form.append('profile', profile);
338
338
  form.append('output_format', outputFormat);
339
339
  form.append('source_pdf', fs.createReadStream(pdfPath), { filename: path.basename(pdfPath), contentType: 'application/pdf' });
@@ -1,29 +0,0 @@
1
- # FactureElectroniqueRestApiSchemasChorusProChorusProCredentials
2
-
3
- Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don\'t want to store their credentials
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **pisteClientId** | **string** | PISTE Client ID (government API portal) | [default to undefined]
10
- **pisteClientSecret** | **string** | PISTE Client Secret | [default to undefined]
11
- **chorusProLogin** | **string** | Chorus Pro login | [default to undefined]
12
- **chorusProPassword** | **string** | Chorus Pro password | [default to undefined]
13
- **sandbox** | **boolean** | Use sandbox environment (true) or production (false) | [optional] [default to true]
14
-
15
- ## Example
16
-
17
- ```typescript
18
- import { FactureElectroniqueRestApiSchemasChorusProChorusProCredentials } from '@factpulse/sdk';
19
-
20
- const instance: FactureElectroniqueRestApiSchemasChorusProChorusProCredentials = {
21
- pisteClientId,
22
- pisteClientSecret,
23
- chorusProLogin,
24
- chorusProPassword,
25
- sandbox,
26
- };
27
- ```
28
-
29
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)