File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
packages/eudiplo-sdk-core/src Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,16 @@ import { client } from './api/client.gen';
22import {
33 authControllerGetOAuth2Token ,
44 credentialOfferControllerGetOffer ,
5- verifierOfferControllerGetOffer ,
5+ healthControllerCheck ,
66 sessionControllerGetSession ,
7+ verifierOfferControllerGetOffer ,
78} from './api/sdk.gen' ;
89import type {
9- Session ,
10+ HealthControllerCheckError ,
11+ HealthControllerCheckResponse ,
1012 OfferRequestDto ,
1113 PresentationRequest ,
14+ Session ,
1215} from './api/types.gen' ;
1316
1417// ============================================================================
@@ -394,6 +397,22 @@ export class EudiploClient {
394397 } ;
395398 }
396399
400+ /**
401+ * Get the current health of the EUDIPLO connector.
402+ * The status in the response is `ok`/`error`.
403+ * The health of the components is listed in the response under `info`/`error`/`details`.
404+ * If the EUDIPLO connector itself is unreachable, no components are listed.
405+ */
406+ async getHealth ( ) : Promise < HealthControllerCheckResponse | HealthControllerCheckError > {
407+ const response = await healthControllerCheck ( { throwOnError : false } ) ;
408+
409+ if ( ! response . data ) {
410+ return { status : "error" } ;
411+ }
412+
413+ return response . data ;
414+ }
415+
397416 /**
398417 * Get the current status of a session.
399418 */
You can’t perform that action at this time.
0 commit comments