@factpulse/sdk 3.0.26 → 3.0.28

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.26] - 2026-01-15
10
+ ## [3.0.28] - 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.26...HEAD
28
- [3.0.26]: https://github.com/factpulse/sdk-typescript/releases/tag/v3.0.26
27
+ [Unreleased]: https://github.com/factpulse/sdk-typescript/compare/v3.0.28...HEAD
28
+ [3.0.28]: https://github.com/factpulse/sdk-typescript/releases/tag/v3.0.28
@@ -270,12 +270,12 @@ export class FactPulseClient {
270
270
  const response = yield this.httpClient.get(`${this.config.apiUrl}/api/v1/processing/tasks/${taskId}/status`, {
271
271
  headers: { Authorization: `Bearer ${this.accessToken}` },
272
272
  });
273
- const { statut, resultat } = response.data;
274
- if (statut === 'SUCCESS')
275
- return resultat || {};
276
- if (statut === 'FAILURE') {
273
+ const { status, result } = response.data;
274
+ if (status === 'SUCCESS')
275
+ return result || {};
276
+ if (status === 'FAILURE') {
277
277
  // Format AFNOR: errorMessage, details
278
- const result = resultat;
278
+ const failureResult = result;
279
279
  const errors = Array.isArray(result === null || result === void 0 ? void 0 : result.details) ? result.details.filter((e) => typeof e === 'object' && e !== null) : [];
280
280
  throw new FactPulseValidationError(`Task ${taskId} failed: ${(result === null || result === void 0 ? void 0 : result.errorMessage) || 'Unknown error'}`, errors);
281
281
  }
@@ -318,12 +318,12 @@ class FactPulseClient {
318
318
  const response = yield this.httpClient.get(`${this.config.apiUrl}/api/v1/processing/tasks/${taskId}/status`, {
319
319
  headers: { Authorization: `Bearer ${this.accessToken}` },
320
320
  });
321
- const { statut, resultat } = response.data;
322
- if (statut === 'SUCCESS')
323
- return resultat || {};
324
- if (statut === 'FAILURE') {
321
+ const { status, result } = response.data;
322
+ if (status === 'SUCCESS')
323
+ return result || {};
324
+ if (status === 'FAILURE') {
325
325
  // Format AFNOR: errorMessage, details
326
- const result = resultat;
326
+ const failureResult = result;
327
327
  const errors = Array.isArray(result === null || result === void 0 ? void 0 : result.details) ? result.details.filter((e) => typeof e === 'object' && e !== null) : [];
328
328
  throw new exceptions_1.FactPulseValidationError(`Task ${taskId} failed: ${(result === null || result === void 0 ? void 0 : result.errorMessage) || 'Unknown error'}`, errors);
329
329
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factpulse/sdk",
3
- "version": "3.0.26",
3
+ "version": "3.0.28",
4
4
  "description": "OpenAPI client for @factpulse/sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
@@ -307,12 +307,12 @@ export class FactPulseClient {
307
307
  const response = await this.httpClient.get(`${this.config.apiUrl}/api/v1/processing/tasks/${taskId}/status`, {
308
308
  headers: { Authorization: `Bearer ${this.accessToken}` },
309
309
  });
310
- const { statut, resultat } = response.data;
311
- if (statut === 'SUCCESS') return (resultat as Record<string, unknown>) || {};
312
- if (statut === 'FAILURE') {
310
+ const { status, result } = response.data;
311
+ if (status === 'SUCCESS') return (result as Record<string, unknown>) || {};
312
+ if (status === 'FAILURE') {
313
313
  // Format AFNOR: errorMessage, details
314
- const result = resultat as Record<string, unknown> | undefined;
315
- const errors: ValidationErrorDetail[] = Array.isArray(result?.details) ? result.details.filter((e): e is ValidationErrorDetail => typeof e === 'object' && e !== null) : [];
314
+ const failureResult = result as Record<string, unknown> | undefined;
315
+ const errors: ValidationErrorDetail[] = Array.isArray(result?.details) ? result.details.filter((e: unknown): e is ValidationErrorDetail => typeof e === 'object' && e !== null) : [];
316
316
  throw new FactPulseValidationError(`Task ${taskId} failed: ${result?.errorMessage || 'Unknown error'}`, errors);
317
317
  }
318
318
  await new Promise(resolve => setTimeout(resolve, currentInterval));