@factpulse/sdk 3.0.23 → 3.0.24

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/CHANGELOG.md CHANGED
@@ -7,7 +7,7 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [3.0.23] - 2026-01-15
10
+ ## [3.0.24] - 2026-01-15
11
11
 
12
12
  ### Added
13
13
  - Version initiale du SDK typescript
@@ -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-typescript/compare/v3.0.23...HEAD
28
- [3.0.23]: https://github.com/factpulse/sdk-typescript/releases/tag/v3.0.23
27
+ [Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v3.0.24...HEAD
28
+ [3.0.24]: https://github.com/factpulse/sdk-typescript/releases/tag/v3.0.24
@@ -147,9 +147,22 @@ export declare class FactPulseClient {
147
147
  * IMPORTANT: This method uses the AFNOR OAuth token, NOT the FactPulse JWT!
148
148
  */
149
149
  private makeAfnorRequest;
150
- rechercherSiretAfnor(siret: string): Promise<Record<string, unknown>>;
151
- rechercherSirenAfnor(siren: string): Promise<Record<string, unknown>>;
152
- listerCodesRoutageAfnor(siren: string): Promise<unknown[]>;
150
+ /** Gets a facility by SIRET in the AFNOR directory. */
151
+ getSiretAfnor(siret: string): Promise<Record<string, unknown>>;
152
+ /** Gets a legal unit by SIREN in the AFNOR directory. */
153
+ getSirenAfnor(siren: string): Promise<Record<string, unknown>>;
154
+ /** Searches for legal units (SIREN) in the AFNOR directory. */
155
+ searchSirenAfnor(options?: {
156
+ filters?: Record<string, unknown>;
157
+ limit?: number;
158
+ }): Promise<Record<string, unknown>>;
159
+ /** Searches for routing codes in the AFNOR directory. */
160
+ searchRoutingCodesAfnor(options?: {
161
+ filters?: Record<string, unknown>;
162
+ limit?: number;
163
+ }): Promise<Record<string, unknown>>;
164
+ /** Gets a routing code by SIRET and routing identifier. */
165
+ getRoutingCodeAfnor(siret: string, routingIdentifier: string): Promise<Record<string, unknown>>;
153
166
  /**
154
167
  * Submits an invoice to a PDP via the AFNOR API.
155
168
  * Authentication uses the AFNOR OAuth token (obtained automatically),
@@ -503,19 +503,36 @@ export class FactPulseClient {
503
503
  });
504
504
  }
505
505
  // ==================== AFNOR Directory ====================
506
- rechercherSiretAfnor(siret) {
506
+ /** Gets a facility by SIRET in the AFNOR directory. */
507
+ getSiretAfnor(siret) {
507
508
  return __awaiter(this, void 0, void 0, function* () {
508
- return this.makeAfnorRequest('GET', `/directory/siret/${siret}`);
509
+ return this.makeAfnorRequest('GET', `/directory/v1/siret/code-insee:${siret}`);
509
510
  });
510
511
  }
511
- rechercherSirenAfnor(siren) {
512
+ /** Gets a legal unit by SIREN in the AFNOR directory. */
513
+ getSirenAfnor(siren) {
512
514
  return __awaiter(this, void 0, void 0, function* () {
513
- return this.makeAfnorRequest('GET', `/directory/siren/${siren}`);
515
+ return this.makeAfnorRequest('GET', `/directory/v1/siren/code-insee:${siren}`);
514
516
  });
515
517
  }
516
- listerCodesRoutageAfnor(siren) {
518
+ /** Searches for legal units (SIREN) in the AFNOR directory. */
519
+ searchSirenAfnor() {
520
+ return __awaiter(this, arguments, void 0, function* (options = {}) {
521
+ const { filters = {}, limit = 25 } = options;
522
+ return this.makeAfnorRequest('POST', '/directory/v1/siren/search', { data: { filters, limit } });
523
+ });
524
+ }
525
+ /** Searches for routing codes in the AFNOR directory. */
526
+ searchRoutingCodesAfnor() {
527
+ return __awaiter(this, arguments, void 0, function* (options = {}) {
528
+ const { filters = {}, limit = 25 } = options;
529
+ return this.makeAfnorRequest('POST', '/directory/v1/routing-code/search', { data: { filters, limit } });
530
+ });
531
+ }
532
+ /** Gets a routing code by SIRET and routing identifier. */
533
+ getRoutingCodeAfnor(siret, routingIdentifier) {
517
534
  return __awaiter(this, void 0, void 0, function* () {
518
- return this.makeAfnorRequest('GET', `/directory/siren/${siren}/routing-codes`);
535
+ return this.makeAfnorRequest('GET', `/directory/v1/routing-code/siret:${siret}/code:${routingIdentifier}`);
519
536
  });
520
537
  }
521
538
  // ==================== AFNOR Flow ====================
@@ -147,9 +147,22 @@ export declare class FactPulseClient {
147
147
  * IMPORTANT: This method uses the AFNOR OAuth token, NOT the FactPulse JWT!
148
148
  */
149
149
  private makeAfnorRequest;
150
- rechercherSiretAfnor(siret: string): Promise<Record<string, unknown>>;
151
- rechercherSirenAfnor(siren: string): Promise<Record<string, unknown>>;
152
- listerCodesRoutageAfnor(siren: string): Promise<unknown[]>;
150
+ /** Gets a facility by SIRET in the AFNOR directory. */
151
+ getSiretAfnor(siret: string): Promise<Record<string, unknown>>;
152
+ /** Gets a legal unit by SIREN in the AFNOR directory. */
153
+ getSirenAfnor(siren: string): Promise<Record<string, unknown>>;
154
+ /** Searches for legal units (SIREN) in the AFNOR directory. */
155
+ searchSirenAfnor(options?: {
156
+ filters?: Record<string, unknown>;
157
+ limit?: number;
158
+ }): Promise<Record<string, unknown>>;
159
+ /** Searches for routing codes in the AFNOR directory. */
160
+ searchRoutingCodesAfnor(options?: {
161
+ filters?: Record<string, unknown>;
162
+ limit?: number;
163
+ }): Promise<Record<string, unknown>>;
164
+ /** Gets a routing code by SIRET and routing identifier. */
165
+ getRoutingCodeAfnor(siret: string, routingIdentifier: string): Promise<Record<string, unknown>>;
153
166
  /**
154
167
  * Submits an invoice to a PDP via the AFNOR API.
155
168
  * Authentication uses the AFNOR OAuth token (obtained automatically),
@@ -551,19 +551,36 @@ class FactPulseClient {
551
551
  });
552
552
  }
553
553
  // ==================== AFNOR Directory ====================
554
- rechercherSiretAfnor(siret) {
554
+ /** Gets a facility by SIRET in the AFNOR directory. */
555
+ getSiretAfnor(siret) {
555
556
  return __awaiter(this, void 0, void 0, function* () {
556
- return this.makeAfnorRequest('GET', `/directory/siret/${siret}`);
557
+ return this.makeAfnorRequest('GET', `/directory/v1/siret/code-insee:${siret}`);
557
558
  });
558
559
  }
559
- rechercherSirenAfnor(siren) {
560
+ /** Gets a legal unit by SIREN in the AFNOR directory. */
561
+ getSirenAfnor(siren) {
560
562
  return __awaiter(this, void 0, void 0, function* () {
561
- return this.makeAfnorRequest('GET', `/directory/siren/${siren}`);
563
+ return this.makeAfnorRequest('GET', `/directory/v1/siren/code-insee:${siren}`);
562
564
  });
563
565
  }
564
- listerCodesRoutageAfnor(siren) {
566
+ /** Searches for legal units (SIREN) in the AFNOR directory. */
567
+ searchSirenAfnor() {
568
+ return __awaiter(this, arguments, void 0, function* (options = {}) {
569
+ const { filters = {}, limit = 25 } = options;
570
+ return this.makeAfnorRequest('POST', '/directory/v1/siren/search', { data: { filters, limit } });
571
+ });
572
+ }
573
+ /** Searches for routing codes in the AFNOR directory. */
574
+ searchRoutingCodesAfnor() {
575
+ return __awaiter(this, arguments, void 0, function* (options = {}) {
576
+ const { filters = {}, limit = 25 } = options;
577
+ return this.makeAfnorRequest('POST', '/directory/v1/routing-code/search', { data: { filters, limit } });
578
+ });
579
+ }
580
+ /** Gets a routing code by SIRET and routing identifier. */
581
+ getRoutingCodeAfnor(siret, routingIdentifier) {
565
582
  return __awaiter(this, void 0, void 0, function* () {
566
- return this.makeAfnorRequest('GET', `/directory/siren/${siren}/routing-codes`);
583
+ return this.makeAfnorRequest('GET', `/directory/v1/routing-code/siret:${siret}/code:${routingIdentifier}`);
567
584
  });
568
585
  }
569
586
  // ==================== AFNOR Flow ====================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factpulse/sdk",
3
- "version": "3.0.23",
3
+ "version": "3.0.24",
4
4
  "description": "OpenAPI client for @factpulse/sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
@@ -537,16 +537,35 @@ export class FactPulseClient {
537
537
 
538
538
  // ==================== AFNOR Directory ====================
539
539
 
540
- async rechercherSiretAfnor(siret: string): Promise<Record<string, unknown>> {
541
- return this.makeAfnorRequest('GET', `/directory/siret/${siret}`);
540
+ /** Gets a facility by SIRET in the AFNOR directory. */
541
+ async getSiretAfnor(siret: string): Promise<Record<string, unknown>> {
542
+ return this.makeAfnorRequest('GET', `/directory/v1/siret/code-insee:${siret}`);
542
543
  }
543
544
 
544
- async rechercherSirenAfnor(siren: string): Promise<Record<string, unknown>> {
545
- return this.makeAfnorRequest('GET', `/directory/siren/${siren}`);
545
+ /** Gets a legal unit by SIREN in the AFNOR directory. */
546
+ async getSirenAfnor(siren: string): Promise<Record<string, unknown>> {
547
+ return this.makeAfnorRequest('GET', `/directory/v1/siren/code-insee:${siren}`);
546
548
  }
547
549
 
548
- async listerCodesRoutageAfnor(siren: string): Promise<unknown[]> {
549
- return this.makeAfnorRequest('GET', `/directory/siren/${siren}/routing-codes`);
550
+ /** Searches for legal units (SIREN) in the AFNOR directory. */
551
+ async searchSirenAfnor(
552
+ options: { filters?: Record<string, unknown>; limit?: number } = {}
553
+ ): Promise<Record<string, unknown>> {
554
+ const { filters = {}, limit = 25 } = options;
555
+ return this.makeAfnorRequest('POST', '/directory/v1/siren/search', { data: { filters, limit } });
556
+ }
557
+
558
+ /** Searches for routing codes in the AFNOR directory. */
559
+ async searchRoutingCodesAfnor(
560
+ options: { filters?: Record<string, unknown>; limit?: number } = {}
561
+ ): Promise<Record<string, unknown>> {
562
+ const { filters = {}, limit = 25 } = options;
563
+ return this.makeAfnorRequest('POST', '/directory/v1/routing-code/search', { data: { filters, limit } });
564
+ }
565
+
566
+ /** Gets a routing code by SIRET and routing identifier. */
567
+ async getRoutingCodeAfnor(siret: string, routingIdentifier: string): Promise<Record<string, unknown>> {
568
+ return this.makeAfnorRequest('GET', `/directory/v1/routing-code/siret:${siret}/code:${routingIdentifier}`);
550
569
  }
551
570
 
552
571
  // ==================== AFNOR Flow ====================