sunuid-sdk 1.0.36 → 1.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.
@@ -2275,12 +2275,19 @@ function _unsupportedIterableToArray(r, a) {
2275
2275
  api: false,
2276
2276
  websocket: false,
2277
2277
  ready: false
2278
- }; // Vérifier l'API en utilisant l'endpoint debug
2278
+ }; // Vérifier l'API en utilisant l'endpoint debug avec les credentials
2279
2279
  _context19.p = 1;
2280
2280
  _context19.n = 2;
2281
2281
  return fetch(this.config.apiUrl + '/debug', {
2282
- method: 'GET',
2283
- timeout: 3000
2282
+ method: 'POST',
2283
+ headers: {
2284
+ 'Content-Type': 'application/json'
2285
+ },
2286
+ body: JSON.stringify({
2287
+ type: this.config.type,
2288
+ client_id: this.config.clientId,
2289
+ secret_id: this.config.secretId
2290
+ })
2284
2291
  });
2285
2292
  case 2:
2286
2293
  testResponse = _context19.v;
@@ -2292,12 +2299,14 @@ function _unsupportedIterableToArray(r, a) {
2292
2299
  return testResponse.json();
2293
2300
  case 3:
2294
2301
  debugData = _context19.v;
2295
- status.api = debugData.status === 'operational';
2296
- console.log('🔍 API Status:', debugData.status);
2302
+ // L'API est accessible si on reçoit une réponse avec success: true
2303
+ status.api = debugData.success === true;
2304
+ console.log('🔍 API Status:', status.api ? 'accessible' : 'inaccessible');
2297
2305
  _context19.n = 5;
2298
2306
  break;
2299
2307
  case 4:
2300
2308
  status.api = false;
2309
+ console.log('🔍 API Status: HTTP', testResponse.status);
2301
2310
  case 5:
2302
2311
  _context19.n = 7;
2303
2312
  break;