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