@eudiplo/sdk-core 1.14.0-main.070d9f8
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/README.md +460 -0
- package/dist/api/client/client.gen.d.mts +5 -0
- package/dist/api/client/client.gen.d.ts +5 -0
- package/dist/api/client/client.gen.js +823 -0
- package/dist/api/client/client.gen.mjs +821 -0
- package/dist/api/client/index.d.mts +58 -0
- package/dist/api/client/index.d.ts +58 -0
- package/dist/api/client/index.js +1052 -0
- package/dist/api/client/index.mjs +1043 -0
- package/dist/api/client/types.gen.d.mts +1 -0
- package/dist/api/client/types.gen.d.ts +1 -0
- package/dist/api/client/types.gen.js +4 -0
- package/dist/api/client/types.gen.mjs +3 -0
- package/dist/api/client.gen.d.mts +15 -0
- package/dist/api/client.gen.d.ts +15 -0
- package/dist/api/client.gen.js +828 -0
- package/dist/api/client.gen.mjs +826 -0
- package/dist/api/index.d.mts +528 -0
- package/dist/api/index.d.ts +528 -0
- package/dist/api/index.js +1536 -0
- package/dist/api/index.mjs +1427 -0
- package/dist/index.d.mts +651 -0
- package/dist/index.d.ts +651 -0
- package/dist/index.js +2185 -0
- package/dist/index.mjs +2064 -0
- package/dist/types.gen-CxMpZyVO.d.mts +3388 -0
- package/dist/types.gen-CxMpZyVO.d.ts +3388 -0
- package/dist/types.gen-DDunhhsd.d.mts +328 -0
- package/dist/types.gen-DDunhhsd.d.ts +328 -0
- package/package.json +73 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,651 @@
|
|
|
1
|
+
import { H as HealthControllerCheckResponse, a as HealthControllerCheckError, S as Session } from './types.gen-CxMpZyVO.mjs';
|
|
2
|
+
export { A as AllowListPolicy, b as ApiKeyConfig, c as AppControllerMainData, d as AppControllerMainResponses, e as AttestationBasedPolicy, f as AuthControllerGetGlobalJwksData, g as AuthControllerGetGlobalJwksResponses, h as AuthControllerGetOAuth2TokenData, i as AuthControllerGetOAuth2TokenErrors, j as AuthControllerGetOAuth2TokenResponse, k as AuthControllerGetOAuth2TokenResponses, l as AuthControllerGetOidcDiscoveryData, m as AuthControllerGetOidcDiscoveryResponses, n as AuthenticationMethodAuth, o as AuthenticationMethodNone, p as AuthenticationMethodPresentation, q as AuthenticationUrlConfig, r as AuthorizationResponse, s as AuthorizeControllerAuthorizeData, t as AuthorizeControllerAuthorizeResponses, u as AuthorizeControllerParData, v as AuthorizeControllerParResponse, w as AuthorizeControllerParResponses, x as AuthorizeControllerTokenData, y as AuthorizeControllerTokenResponse, z as AuthorizeControllerTokenResponses, B as AuthorizeQueries, C as CacheControllerClearAllCachesData, D as CacheControllerClearAllCachesResponse, E as CacheControllerClearAllCachesResponses, F as CacheControllerClearStatusListCacheData, G as CacheControllerClearStatusListCacheResponse, I as CacheControllerClearStatusListCacheResponses, J as CacheControllerClearTrustListCacheData, K as CacheControllerClearTrustListCacheResponse, L as CacheControllerClearTrustListCacheResponses, M as CacheControllerGetStatsData, N as CacheControllerGetStatsResponses, O as CertControllerAddCertificateData, P as CertControllerAddCertificateResponse, Q as CertControllerAddCertificateResponses, R as CertControllerDeleteCertificateData, T as CertControllerDeleteCertificateResponses, U as CertControllerExportConfigData, V as CertControllerExportConfigResponse, W as CertControllerExportConfigResponses, X as CertControllerGetCertificateData, Y as CertControllerGetCertificateResponse, Z as CertControllerGetCertificateResponses, _ as CertControllerGetCertificatesData, $ as CertControllerGetCertificatesResponse, a0 as CertControllerGetCertificatesResponses, a1 as CertControllerUpdateCertificateData, a2 as CertControllerUpdateCertificateResponses, a3 as CertEntity, a4 as CertImportDto, a5 as CertResponseDto, a6 as CertUpdateDto, a7 as CertUsageEntity, a8 as ChainedAsConfig, a9 as ChainedAsControllerAuthorizeData, aa as ChainedAsControllerAuthorizeError, ab as ChainedAsControllerAuthorizeErrors, ac as ChainedAsControllerAuthorizeResponses, ad as ChainedAsControllerCallbackData, ae as ChainedAsControllerCallbackError, af as ChainedAsControllerCallbackErrors, ag as ChainedAsControllerCallbackResponses, ah as ChainedAsControllerGetMetadataData, ai as ChainedAsControllerGetMetadataResponses, aj as ChainedAsControllerJwksData, ak as ChainedAsControllerJwksResponses, al as ChainedAsControllerParData, am as ChainedAsControllerParError, an as ChainedAsControllerParErrors, ao as ChainedAsControllerParResponse, ap as ChainedAsControllerParResponses, aq as ChainedAsControllerTokenData, ar as ChainedAsControllerTokenError, as as ChainedAsControllerTokenErrors, at as ChainedAsControllerTokenResponse, au as ChainedAsControllerTokenResponses, av as ChainedAsErrorResponseDto, aw as ChainedAsParRequestDto, ax as ChainedAsParResponseDto, ay as ChainedAsTokenConfig, az as ChainedAsTokenRequestDto, aA as ChainedAsTokenResponseDto, aB as Claim, aC as ClaimsQuery, aD as ClientControllerCreateClientData, aE as ClientControllerCreateClientResponse, aF as ClientControllerCreateClientResponses, aG as ClientControllerDeleteClientData, aH as ClientControllerDeleteClientResponses, aI as ClientControllerGetClientData, aJ as ClientControllerGetClientResponse, aK as ClientControllerGetClientResponses, aL as ClientControllerGetClientSecretData, aM as ClientControllerGetClientSecretResponse, aN as ClientControllerGetClientSecretResponses, aO as ClientControllerGetClientsData, aP as ClientControllerGetClientsResponse, aQ as ClientControllerGetClientsResponses, aR as ClientControllerRotateClientSecretData, aS as ClientControllerRotateClientSecretResponse, aT as ClientControllerRotateClientSecretResponses, aU as ClientControllerUpdateClientData, aV as ClientControllerUpdateClientResponse, aW as ClientControllerUpdateClientResponses, aX as ClientCredentialsDto, aY as ClientEntity, aZ as ClientOptions, a_ as ClientSecretResponseDto, a$ as CompleteDeferredDto, b0 as CreateAccessCertificateDto, b1 as CreateClientDto, b2 as CreateRegistrarConfigDto, b3 as CreateStatusListDto, b4 as CreateTenantDto, b5 as CredentialConfig, b6 as CredentialConfigControllerDeleteIssuanceConfigurationData, b7 as CredentialConfigControllerDeleteIssuanceConfigurationResponses, b8 as CredentialConfigControllerGetConfigByIdData, b9 as CredentialConfigControllerGetConfigByIdResponse, ba as CredentialConfigControllerGetConfigByIdResponses, bb as CredentialConfigControllerGetConfigsData, bc as CredentialConfigControllerGetConfigsResponse, bd as CredentialConfigControllerGetConfigsResponses, be as CredentialConfigControllerStoreCredentialConfigurationData, bf as CredentialConfigControllerStoreCredentialConfigurationResponse, bg as CredentialConfigControllerStoreCredentialConfigurationResponses, bh as CredentialConfigControllerUpdateCredentialConfigurationData, bi as CredentialConfigControllerUpdateCredentialConfigurationResponse, bj as CredentialConfigControllerUpdateCredentialConfigurationResponses, bk as CredentialConfigCreate, bl as CredentialConfigUpdate, bm as CredentialOfferControllerGetOfferData, bn as CredentialOfferControllerGetOfferResponse, bo as CredentialOfferControllerGetOfferResponses, bp as CredentialQuery, bq as CredentialSetQuery, br as Dcql, bs as DeferredControllerCompleteDeferredData, bt as DeferredControllerCompleteDeferredErrors, bu as DeferredControllerCompleteDeferredResponse, bv as DeferredControllerCompleteDeferredResponses, bw as DeferredControllerFailDeferredData, bx as DeferredControllerFailDeferredErrors, by as DeferredControllerFailDeferredResponse, bz as DeferredControllerFailDeferredResponses, bA as DeferredCredentialRequestDto, bB as DeferredOperationResponse, bC as Display, bD as DisplayImage, bE as DisplayInfo, bF as DisplayLogo, bG as EcPublic, bH as EmbeddedDisclosurePolicy, bI as FailDeferredDto, bJ as FileUploadDto, bK as HealthControllerCheckData, bL as HealthControllerCheckErrors, bM as HealthControllerCheckResponses, bN as IaeActionOpenid4VpPresentation, bO as IaeActionRedirectToWeb, bP as ImportTenantDto, bQ as InteractiveAuthorizationCodeResponseDto, bR as InteractiveAuthorizationControllerCompleteWebAuthData, bS as InteractiveAuthorizationControllerCompleteWebAuthErrors, bT as InteractiveAuthorizationControllerCompleteWebAuthResponses, bU as InteractiveAuthorizationControllerInteractiveAuthorizationData, bV as InteractiveAuthorizationControllerInteractiveAuthorizationError, bW as InteractiveAuthorizationControllerInteractiveAuthorizationErrors, bX as InteractiveAuthorizationControllerInteractiveAuthorizationResponse, bY as InteractiveAuthorizationControllerInteractiveAuthorizationResponses, bZ as InteractiveAuthorizationErrorResponseDto, b_ as InteractiveAuthorizationRequestDto, b$ as IssuanceConfig, c0 as IssuanceConfigControllerGetIssuanceConfigurationsData, c1 as IssuanceConfigControllerGetIssuanceConfigurationsResponse, c2 as IssuanceConfigControllerGetIssuanceConfigurationsResponses, c3 as IssuanceConfigControllerStoreIssuanceConfigurationData, c4 as IssuanceConfigControllerStoreIssuanceConfigurationResponse, c5 as IssuanceConfigControllerStoreIssuanceConfigurationResponses, c6 as IssuanceDto, c7 as IssuerMetadataCredentialConfig, c8 as JwksResponseDto, c9 as Key, ca as KeyControllerAddKeyData, cb as KeyControllerAddKeyResponses, cc as KeyControllerDeleteKeyData, cd as KeyControllerDeleteKeyResponses, ce as KeyControllerGetKeyData, cf as KeyControllerGetKeyResponse, cg as KeyControllerGetKeyResponses, ch as KeyControllerGetKeysData, ci as KeyControllerGetKeysResponse, cj as KeyControllerGetKeysResponses, ck as KeyControllerUpdateKeyData, cl as KeyControllerUpdateKeyResponses, cm as KeyEntity, cn as KeyImportDto, co as NoneTrustPolicy, cp as NotificationRequestDto, cq as OfferRequestDto, cr as OfferResponse, cs as Oid4VciControllerCredentialData, ct as Oid4VciControllerCredentialResponse, cu as Oid4VciControllerCredentialResponses, cv as Oid4VciControllerDeferredCredentialData, cw as Oid4VciControllerDeferredCredentialResponses, cx as Oid4VciControllerNonceData, cy as Oid4VciControllerNonceResponses, cz as Oid4VciControllerNotificationsData, cA as Oid4VciControllerNotificationsResponses, cB as Oid4VciMetadataControllerVctData, cC as Oid4VciMetadataControllerVctResponse, cD as Oid4VciMetadataControllerVctResponses, cE as Oid4VpControllerGetPostRequestWithSessionData, cF as Oid4VpControllerGetPostRequestWithSessionResponse, cG as Oid4VpControllerGetPostRequestWithSessionResponses, cH as Oid4VpControllerGetRequestNoRedirectWithSessionData, cI as Oid4VpControllerGetRequestNoRedirectWithSessionResponse, cJ as Oid4VpControllerGetRequestNoRedirectWithSessionResponses, cK as Oid4VpControllerGetRequestWithSessionData, cL as Oid4VpControllerGetRequestWithSessionResponse, cM as Oid4VpControllerGetRequestWithSessionResponses, cN as Oid4VpControllerGetResponseData, cO as Oid4VpControllerGetResponseResponse, cP as Oid4VpControllerGetResponseResponses, cQ as ParResponseDto, cR as PolicyCredential, cS as PresentationAttachment, cT as PresentationConfig, cU as PresentationConfigCreateDto, cV as PresentationConfigUpdateDto, cW as PresentationDuringIssuanceConfig, cX as PresentationManagementControllerConfigurationData, cY as PresentationManagementControllerConfigurationResponse, cZ as PresentationManagementControllerConfigurationResponses, c_ as PresentationManagementControllerDeleteConfigurationData, c$ as PresentationManagementControllerDeleteConfigurationResponses, d0 as PresentationManagementControllerGetConfigurationData, d1 as PresentationManagementControllerGetConfigurationResponse, d2 as PresentationManagementControllerGetConfigurationResponses, d3 as PresentationManagementControllerStorePresentationConfigData, d4 as PresentationManagementControllerStorePresentationConfigResponse, d5 as PresentationManagementControllerStorePresentationConfigResponses, d6 as PresentationManagementControllerUpdateConfigurationData, d7 as PresentationManagementControllerUpdateConfigurationResponse, d8 as PresentationManagementControllerUpdateConfigurationResponses, d9 as PresentationRequest, da as RegistrarConfigEntity, db as RegistrarControllerCreateAccessCertificateData, dc as RegistrarControllerCreateAccessCertificateErrors, dd as RegistrarControllerCreateAccessCertificateResponse, de as RegistrarControllerCreateAccessCertificateResponses, df as RegistrarControllerCreateConfigData, dg as RegistrarControllerCreateConfigErrors, dh as RegistrarControllerCreateConfigResponse, di as RegistrarControllerCreateConfigResponses, dj as RegistrarControllerDeleteConfigData, dk as RegistrarControllerDeleteConfigResponse, dl as RegistrarControllerDeleteConfigResponses, dm as RegistrarControllerGetConfigData, dn as RegistrarControllerGetConfigErrors, dp as RegistrarControllerGetConfigResponse, dq as RegistrarControllerGetConfigResponses, dr as RegistrarControllerUpdateConfigData, ds as RegistrarControllerUpdateConfigErrors, dt as RegistrarControllerUpdateConfigResponse, du as RegistrarControllerUpdateConfigResponses, dv as RegistrationCertificateRequest, dw as RoleDto, dx as RootOfTrustPolicy, dy as SchemaResponse, dz as SessionConfigControllerGetConfigData, dA as SessionConfigControllerGetConfigResponse, dB as SessionConfigControllerGetConfigResponses, dC as SessionConfigControllerResetConfigData, dD as SessionConfigControllerResetConfigResponses, dE as SessionConfigControllerUpdateConfigData, dF as SessionConfigControllerUpdateConfigResponse, dG as SessionConfigControllerUpdateConfigResponses, dH as SessionControllerDeleteSessionData, dI as SessionControllerDeleteSessionResponses, dJ as SessionControllerGetAllSessionsData, dK as SessionControllerGetAllSessionsResponse, dL as SessionControllerGetAllSessionsResponses, dM as SessionControllerGetSessionData, dN as SessionControllerGetSessionResponse, dO as SessionControllerGetSessionResponses, dP as SessionControllerRevokeAllData, dQ as SessionControllerRevokeAllResponses, dR as SessionEventsControllerSubscribeToSessionEventsData, dS as SessionEventsControllerSubscribeToSessionEventsResponses, dT as SessionStorageConfig, dU as StatusListAggregationDto, dV as StatusListConfig, dW as StatusListConfigControllerGetConfigData, dX as StatusListConfigControllerGetConfigResponse, dY as StatusListConfigControllerGetConfigResponses, dZ as StatusListConfigControllerResetConfigData, d_ as StatusListConfigControllerResetConfigResponse, d$ as StatusListConfigControllerResetConfigResponses, e0 as StatusListConfigControllerUpdateConfigData, e1 as StatusListConfigControllerUpdateConfigResponse, e2 as StatusListConfigControllerUpdateConfigResponses, e3 as StatusListControllerGetListData, e4 as StatusListControllerGetListResponse, e5 as StatusListControllerGetListResponses, e6 as StatusListControllerGetStatusListAggregationData, e7 as StatusListControllerGetStatusListAggregationResponse, e8 as StatusListControllerGetStatusListAggregationResponses, e9 as StatusListImportDto, ea as StatusListManagementControllerCreateListData, eb as StatusListManagementControllerCreateListResponse, ec as StatusListManagementControllerCreateListResponses, ed as StatusListManagementControllerDeleteListData, ee as StatusListManagementControllerDeleteListResponse, ef as StatusListManagementControllerDeleteListResponses, eg as StatusListManagementControllerGetListData, eh as StatusListManagementControllerGetListResponse, ei as StatusListManagementControllerGetListResponses, ej as StatusListManagementControllerGetListsData, ek as StatusListManagementControllerGetListsResponse, el as StatusListManagementControllerGetListsResponses, em as StatusListManagementControllerUpdateListData, en as StatusListManagementControllerUpdateListResponse, eo as StatusListManagementControllerUpdateListResponses, ep as StatusListResponseDto, eq as StatusUpdateDto, er as StorageControllerDownloadData, es as StorageControllerDownloadResponses, et as StorageControllerUploadData, eu as StorageControllerUploadResponse, ev as StorageControllerUploadResponses, ew as TenantControllerDeleteTenantData, ex as TenantControllerDeleteTenantResponses, ey as TenantControllerGetTenantData, ez as TenantControllerGetTenantResponse, eA as TenantControllerGetTenantResponses, eB as TenantControllerGetTenantsData, eC as TenantControllerGetTenantsResponse, eD as TenantControllerGetTenantsResponses, eE as TenantControllerInitTenantData, eF as TenantControllerInitTenantResponse, eG as TenantControllerInitTenantResponses, eH as TenantControllerUpdateTenantData, eI as TenantControllerUpdateTenantResponse, eJ as TenantControllerUpdateTenantResponses, eK as TenantEntity, eL as TokenResponse, eM as TransactionData, eN as TrustList, eO as TrustListControllerCreateTrustListData, eP as TrustListControllerCreateTrustListResponse, eQ as TrustListControllerCreateTrustListResponses, eR as TrustListControllerDeleteTrustListData, eS as TrustListControllerDeleteTrustListResponses, eT as TrustListControllerExportTrustListData, eU as TrustListControllerExportTrustListResponse, eV as TrustListControllerExportTrustListResponses, eW as TrustListControllerGetAllTrustListsData, eX as TrustListControllerGetAllTrustListsResponse, eY as TrustListControllerGetAllTrustListsResponses, eZ as TrustListControllerGetTrustListData, e_ as TrustListControllerGetTrustListResponse, e$ as TrustListControllerGetTrustListResponses, f0 as TrustListControllerGetTrustListVersionData, f1 as TrustListControllerGetTrustListVersionResponse, f2 as TrustListControllerGetTrustListVersionResponses, f3 as TrustListControllerGetTrustListVersionsData, f4 as TrustListControllerGetTrustListVersionsResponse, f5 as TrustListControllerGetTrustListVersionsResponses, f6 as TrustListControllerUpdateTrustListData, f7 as TrustListControllerUpdateTrustListResponse, f8 as TrustListControllerUpdateTrustListResponses, f9 as TrustListCreateDto, fa as TrustListPublicControllerGetTrustListJwtData, fb as TrustListPublicControllerGetTrustListJwtResponse, fc as TrustListPublicControllerGetTrustListJwtResponses, fd as TrustListVersion, fe as TrustedAuthorityQuery, ff as UpdateClientDto, fg as UpdateKeyDto, fh as UpdateRegistrarConfigDto, fi as UpdateSessionConfigDto, fj as UpdateStatusListConfigDto, fk as UpdateStatusListDto, fl as UpdateTenantDto, fm as UpstreamOidcConfig, fn as Vct, fo as VerifierOfferControllerGetOfferData, fp as VerifierOfferControllerGetOfferResponse, fq as VerifierOfferControllerGetOfferResponses, fr as WebHookAuthConfigHeader, fs as WebHookAuthConfigNone, ft as WebhookConfig, fu as WellKnownControllerAuthzMetadata0Data, fv as WellKnownControllerAuthzMetadata0Responses, fw as WellKnownControllerAuthzMetadata1Data, fx as WellKnownControllerAuthzMetadata1Responses, fy as WellKnownControllerGetJwks0Data, fz as WellKnownControllerGetJwks0Response, fA as WellKnownControllerGetJwks0Responses, fB as WellKnownControllerGetJwks1Data, fC as WellKnownControllerGetJwks1Response, fD as WellKnownControllerGetJwks1Responses, fE as WellKnownControllerIssuerMetadata0Data, fF as WellKnownControllerIssuerMetadata0Response, fG as WellKnownControllerIssuerMetadata0Responses, fH as WellKnownControllerIssuerMetadata1Data, fI as WellKnownControllerIssuerMetadata1Response, fJ as WellKnownControllerIssuerMetadata1Responses } from './types.gen-CxMpZyVO.mjs';
|
|
3
|
+
export { client } from './api/client.gen.mjs';
|
|
4
|
+
export { Options, appControllerMain, authControllerGetGlobalJwks, authControllerGetOAuth2Token, authControllerGetOidcDiscovery, authorizeControllerAuthorize, authorizeControllerPar, authorizeControllerToken, cacheControllerClearAllCaches, cacheControllerClearStatusListCache, cacheControllerClearTrustListCache, cacheControllerGetStats, certControllerAddCertificate, certControllerDeleteCertificate, certControllerExportConfig, certControllerGetCertificate, certControllerGetCertificates, certControllerUpdateCertificate, chainedAsControllerAuthorize, chainedAsControllerCallback, chainedAsControllerGetMetadata, chainedAsControllerJwks, chainedAsControllerPar, chainedAsControllerToken, clientControllerCreateClient, clientControllerDeleteClient, clientControllerGetClient, clientControllerGetClientSecret, clientControllerGetClients, clientControllerRotateClientSecret, clientControllerUpdateClient, credentialConfigControllerDeleteIssuanceConfiguration, credentialConfigControllerGetConfigById, credentialConfigControllerGetConfigs, credentialConfigControllerStoreCredentialConfiguration, credentialConfigControllerUpdateCredentialConfiguration, credentialOfferControllerGetOffer, deferredControllerCompleteDeferred, deferredControllerFailDeferred, healthControllerCheck, interactiveAuthorizationControllerCompleteWebAuth, interactiveAuthorizationControllerInteractiveAuthorization, issuanceConfigControllerGetIssuanceConfigurations, issuanceConfigControllerStoreIssuanceConfiguration, keyControllerAddKey, keyControllerDeleteKey, keyControllerGetKey, keyControllerGetKeys, keyControllerUpdateKey, oid4VciControllerCredential, oid4VciControllerDeferredCredential, oid4VciControllerNonce, oid4VciControllerNotifications, oid4VciMetadataControllerVct, oid4VpControllerGetPostRequestWithSession, oid4VpControllerGetRequestNoRedirectWithSession, oid4VpControllerGetRequestWithSession, oid4VpControllerGetResponse, presentationManagementControllerConfiguration, presentationManagementControllerDeleteConfiguration, presentationManagementControllerGetConfiguration, presentationManagementControllerStorePresentationConfig, presentationManagementControllerUpdateConfiguration, registrarControllerCreateAccessCertificate, registrarControllerCreateConfig, registrarControllerDeleteConfig, registrarControllerGetConfig, registrarControllerUpdateConfig, sessionConfigControllerGetConfig, sessionConfigControllerResetConfig, sessionConfigControllerUpdateConfig, sessionControllerDeleteSession, sessionControllerGetAllSessions, sessionControllerGetSession, sessionControllerRevokeAll, sessionEventsControllerSubscribeToSessionEvents, statusListConfigControllerGetConfig, statusListConfigControllerResetConfig, statusListConfigControllerUpdateConfig, statusListControllerGetList, statusListControllerGetStatusListAggregation, statusListManagementControllerCreateList, statusListManagementControllerDeleteList, statusListManagementControllerGetList, statusListManagementControllerGetLists, statusListManagementControllerUpdateList, storageControllerDownload, storageControllerUpload, tenantControllerDeleteTenant, tenantControllerGetTenant, tenantControllerGetTenants, tenantControllerInitTenant, tenantControllerUpdateTenant, trustListControllerCreateTrustList, trustListControllerDeleteTrustList, trustListControllerExportTrustList, trustListControllerGetAllTrustLists, trustListControllerGetTrustList, trustListControllerGetTrustListVersion, trustListControllerGetTrustListVersions, trustListControllerUpdateTrustList, trustListPublicControllerGetTrustListJwt, verifierOfferControllerGetOffer, wellKnownControllerAuthzMetadata0, wellKnownControllerAuthzMetadata1, wellKnownControllerGetJwks0, wellKnownControllerGetJwks1, wellKnownControllerIssuerMetadata0, wellKnownControllerIssuerMetadata1 } from './api/index.mjs';
|
|
5
|
+
import './types.gen-DDunhhsd.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Digital Credential response from the browser API
|
|
9
|
+
*/
|
|
10
|
+
interface DigitalCredentialResponse {
|
|
11
|
+
data: {
|
|
12
|
+
response?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
error_description?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Result of a DC API presentation
|
|
19
|
+
*/
|
|
20
|
+
interface DcApiPresentationResult {
|
|
21
|
+
/** The verified credentials from the presentation */
|
|
22
|
+
credentials?: Array<Record<string, unknown>>;
|
|
23
|
+
/** The raw response from the verifier */
|
|
24
|
+
response: unknown;
|
|
25
|
+
/** Redirect URI if provided by the verifier */
|
|
26
|
+
redirectUri?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Options for DC API presentation
|
|
30
|
+
*/
|
|
31
|
+
interface DcApiPresentationOptions {
|
|
32
|
+
/** Whether to return the full credential data in the response (default: true) */
|
|
33
|
+
sendResponse?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check if the Digital Credentials API is available in the current browser
|
|
37
|
+
*/
|
|
38
|
+
declare function isDcApiAvailable(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Configuration options for the EudiploClient
|
|
41
|
+
*/
|
|
42
|
+
interface EudiploClientConfig {
|
|
43
|
+
/** Base URL of the EUDIPLO server (e.g., 'https://eudiplo.example.com') */
|
|
44
|
+
baseUrl: string;
|
|
45
|
+
/** OAuth2 client ID */
|
|
46
|
+
clientId: string;
|
|
47
|
+
/** OAuth2 client secret */
|
|
48
|
+
clientSecret: string;
|
|
49
|
+
/** Optional: Auto-refresh token before expiry (default: true) */
|
|
50
|
+
autoRefresh?: boolean;
|
|
51
|
+
/** Optional: Custom fetch implementation (useful for Cloudflare Workers) */
|
|
52
|
+
fetch?: typeof fetch;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Options for session polling
|
|
56
|
+
*/
|
|
57
|
+
interface SessionPollingOptions {
|
|
58
|
+
/** Polling interval in milliseconds (default: 1000) */
|
|
59
|
+
interval?: number;
|
|
60
|
+
/** Maximum time to wait in milliseconds (default: 300000 = 5 minutes) */
|
|
61
|
+
timeout?: number;
|
|
62
|
+
/** Callback on each poll */
|
|
63
|
+
onUpdate?: (session: Session) => void;
|
|
64
|
+
/** AbortSignal to cancel polling */
|
|
65
|
+
signal?: AbortSignal;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Event payload received from SSE subscription
|
|
69
|
+
*/
|
|
70
|
+
interface SessionStatusEvent {
|
|
71
|
+
/** Session ID */
|
|
72
|
+
id: string;
|
|
73
|
+
/** Current session status */
|
|
74
|
+
status: 'active' | 'fetched' | 'completed' | 'expired' | 'failed';
|
|
75
|
+
/** Timestamp of the status update */
|
|
76
|
+
updatedAt: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Options for SSE session subscription
|
|
80
|
+
*/
|
|
81
|
+
interface SessionSubscriptionOptions {
|
|
82
|
+
/** Callback invoked when session status changes */
|
|
83
|
+
onStatusChange?: (event: SessionStatusEvent) => void;
|
|
84
|
+
/** Callback invoked when an error occurs */
|
|
85
|
+
onError?: (error: Error) => void;
|
|
86
|
+
/** Callback invoked when connection is established */
|
|
87
|
+
onOpen?: () => void;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Subscription handle returned by subscribeToSession.
|
|
91
|
+
* Use to close the SSE connection.
|
|
92
|
+
*/
|
|
93
|
+
interface SessionSubscription {
|
|
94
|
+
/** Close the SSE connection */
|
|
95
|
+
close: () => void;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Simplified options for creating an issuance offer
|
|
99
|
+
*/
|
|
100
|
+
interface IssuanceOfferOptions {
|
|
101
|
+
/** Credential configuration IDs to issue */
|
|
102
|
+
credentialConfigurationIds: string[];
|
|
103
|
+
/** Claims to include in the credentials (keyed by config ID) */
|
|
104
|
+
claims?: Record<string, Record<string, unknown>>;
|
|
105
|
+
/** Response type: 'uri' returns the offer URI, 'dc-api' for Digital Credentials API */
|
|
106
|
+
responseType?: 'uri' | 'dc-api';
|
|
107
|
+
/** Transaction code for pre-authorized flow */
|
|
108
|
+
txCode?: string;
|
|
109
|
+
/** Flow type (default: 'pre_authorized_code') */
|
|
110
|
+
flow?: 'authorization_code' | 'pre_authorized_code';
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Simplified options for creating a presentation request
|
|
114
|
+
*/
|
|
115
|
+
interface PresentationRequestOptions {
|
|
116
|
+
/** ID of the presentation configuration */
|
|
117
|
+
configId: string;
|
|
118
|
+
/** Response type: 'uri' returns the request URI, 'dc-api' for Digital Credentials API */
|
|
119
|
+
responseType?: 'uri' | 'dc-api';
|
|
120
|
+
/** Optional redirect URI after presentation completes */
|
|
121
|
+
redirectUri?: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Result of creating an offer or request
|
|
125
|
+
*/
|
|
126
|
+
interface OfferResult {
|
|
127
|
+
/**
|
|
128
|
+
* URI for same-device flow.
|
|
129
|
+
* Use when the wallet is on the same device as the browser.
|
|
130
|
+
* For presentation requests: After presentation, the wallet will redirect the user back to the verifier.
|
|
131
|
+
* For issuance offers: The wallet opens and receives the credential.
|
|
132
|
+
*/
|
|
133
|
+
uri: string;
|
|
134
|
+
/**
|
|
135
|
+
* URI for cross-device flow (e.g., QR code scanned by another device).
|
|
136
|
+
* Use when the wallet is on a different device than the browser.
|
|
137
|
+
* No redirect happens after presentation - poll the session for status updates.
|
|
138
|
+
*
|
|
139
|
+
* Only available for presentation requests. For issuance, use `uri` for both flows.
|
|
140
|
+
*/
|
|
141
|
+
crossDeviceUri?: string;
|
|
142
|
+
/** Session ID for polling status updates */
|
|
143
|
+
sessionId: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Framework-agnostic EUDIPLO client for demos and integrations.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```typescript
|
|
150
|
+
* import { EudiploClient } from '@eudiplo/sdk-core';
|
|
151
|
+
*
|
|
152
|
+
* const client = new EudiploClient({
|
|
153
|
+
* baseUrl: 'https://eudiplo.example.com',
|
|
154
|
+
* clientId: 'my-demo',
|
|
155
|
+
* clientSecret: 'secret123'
|
|
156
|
+
* });
|
|
157
|
+
*
|
|
158
|
+
* // Create a presentation request for age verification
|
|
159
|
+
* const { uri, sessionId } = await client.createPresentationRequest({
|
|
160
|
+
* configId: 'age-over-18'
|
|
161
|
+
* });
|
|
162
|
+
*
|
|
163
|
+
* // Display QR code with `uri`, then wait for completion
|
|
164
|
+
* const session = await client.waitForSession(sessionId);
|
|
165
|
+
* console.log('Verified:', session.credentials);
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
declare class EudiploClient {
|
|
169
|
+
private readonly config;
|
|
170
|
+
private accessToken?;
|
|
171
|
+
private tokenExpiresAt?;
|
|
172
|
+
private refreshPromise?;
|
|
173
|
+
constructor(config: EudiploClientConfig);
|
|
174
|
+
/**
|
|
175
|
+
* Authenticate and obtain an access token.
|
|
176
|
+
* Called automatically by other methods, but can be called explicitly.
|
|
177
|
+
*/
|
|
178
|
+
authenticate(): Promise<void>;
|
|
179
|
+
private _doAuthenticate;
|
|
180
|
+
/**
|
|
181
|
+
* Ensure we have a valid access token, refreshing if necessary.
|
|
182
|
+
*/
|
|
183
|
+
private ensureAuthenticated;
|
|
184
|
+
/**
|
|
185
|
+
* Create a credential issuance offer.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* ```typescript
|
|
189
|
+
* const { uri, sessionId } = await client.createIssuanceOffer({
|
|
190
|
+
* credentialConfigurationIds: ['PID'],
|
|
191
|
+
* claims: {
|
|
192
|
+
* PID: { given_name: 'John', family_name: 'Doe' }
|
|
193
|
+
* }
|
|
194
|
+
* });
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
createIssuanceOffer(options: IssuanceOfferOptions): Promise<OfferResult>;
|
|
198
|
+
/**
|
|
199
|
+
* Create a presentation request (for verification).
|
|
200
|
+
*
|
|
201
|
+
* Returns two URIs:
|
|
202
|
+
* - `uri`: For same-device flow (wallet on same device, redirect after completion)
|
|
203
|
+
* - `crossDeviceUri`: For cross-device flow (QR code, no redirect, poll for status)
|
|
204
|
+
*
|
|
205
|
+
* @example Same-device flow (wallet app on user's device)
|
|
206
|
+
* ```typescript
|
|
207
|
+
* const { uri, sessionId } = await client.createPresentationRequest({
|
|
208
|
+
* configId: 'age-over-18',
|
|
209
|
+
* redirectUri: 'https://example.com/callback'
|
|
210
|
+
* });
|
|
211
|
+
* // Redirect user to uri - wallet will redirect back after completion
|
|
212
|
+
* window.location.href = uri;
|
|
213
|
+
* ```
|
|
214
|
+
*
|
|
215
|
+
* @example Cross-device flow (QR code scanned by separate device)
|
|
216
|
+
* ```typescript
|
|
217
|
+
* const { crossDeviceUri, sessionId } = await client.createPresentationRequest({
|
|
218
|
+
* configId: 'age-over-18'
|
|
219
|
+
* });
|
|
220
|
+
* // Display crossDeviceUri as QR code, then poll for completion
|
|
221
|
+
* const session = await client.waitForSession(sessionId);
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
createPresentationRequest(options: PresentationRequestOptions): Promise<OfferResult>;
|
|
225
|
+
/**
|
|
226
|
+
* Get the current health of the EUDIPLO connector.
|
|
227
|
+
* The status in the response is `ok`/`error`.
|
|
228
|
+
* The health of the components is listed in the response under `info`/`error`/`details`.
|
|
229
|
+
* If the EUDIPLO connector itself is unreachable, no components are listed.
|
|
230
|
+
*/
|
|
231
|
+
getHealth(): Promise<HealthControllerCheckResponse | HealthControllerCheckError>;
|
|
232
|
+
/**
|
|
233
|
+
* Get the current status of a session.
|
|
234
|
+
*/
|
|
235
|
+
getSession(sessionId: string): Promise<Session>;
|
|
236
|
+
/**
|
|
237
|
+
* Wait for a session to complete (polling).
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```typescript
|
|
241
|
+
* const session = await client.waitForSession(sessionId, {
|
|
242
|
+
* interval: 1000,
|
|
243
|
+
* timeout: 60000,
|
|
244
|
+
* onUpdate: (s) => console.log('Status:', s.status)
|
|
245
|
+
* });
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
waitForSession(sessionId: string, options?: SessionPollingOptions): Promise<Session>;
|
|
249
|
+
/**
|
|
250
|
+
* Helper to sleep with abort support
|
|
251
|
+
*/
|
|
252
|
+
private sleep;
|
|
253
|
+
/**
|
|
254
|
+
* Subscribe to real-time session status updates via Server-Sent Events.
|
|
255
|
+
*
|
|
256
|
+
* This is more efficient than polling and provides instant updates.
|
|
257
|
+
* The connection remains open until closed or the session reaches a terminal state.
|
|
258
|
+
*
|
|
259
|
+
* @example
|
|
260
|
+
* ```typescript
|
|
261
|
+
* const subscription = await client.subscribeToSession(sessionId, {
|
|
262
|
+
* onStatusChange: (event) => {
|
|
263
|
+
* console.log(`Status: ${event.status}`);
|
|
264
|
+
* if (['completed', 'expired', 'failed'].includes(event.status)) {
|
|
265
|
+
* subscription.close();
|
|
266
|
+
* }
|
|
267
|
+
* },
|
|
268
|
+
* onError: (error) => console.error('SSE error:', error)
|
|
269
|
+
* });
|
|
270
|
+
*
|
|
271
|
+
* // Later, to close the connection:
|
|
272
|
+
* subscription.close();
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
subscribeToSession(sessionId: string, options?: SessionSubscriptionOptions): Promise<SessionSubscription>;
|
|
276
|
+
/**
|
|
277
|
+
* Subscribe to session and wait for completion via SSE.
|
|
278
|
+
*
|
|
279
|
+
* Returns a Promise that resolves when the session completes,
|
|
280
|
+
* or rejects if it fails/expires.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* ```typescript
|
|
284
|
+
* try {
|
|
285
|
+
* const finalStatus = await client.waitForSessionWithSse(sessionId);
|
|
286
|
+
* console.log('Session completed:', finalStatus);
|
|
287
|
+
* } catch (error) {
|
|
288
|
+
* console.error('Session failed:', error);
|
|
289
|
+
* }
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
waitForSessionWithSse(sessionId: string, options?: Pick<SessionSubscriptionOptions, 'onStatusChange'>): Promise<SessionStatusEvent>;
|
|
293
|
+
/**
|
|
294
|
+
* Get the current access token (for advanced usage)
|
|
295
|
+
*/
|
|
296
|
+
getAccessToken(): string | undefined;
|
|
297
|
+
/**
|
|
298
|
+
* Get the configured base URL
|
|
299
|
+
*/
|
|
300
|
+
getBaseUrl(): string;
|
|
301
|
+
/**
|
|
302
|
+
* Create a presentation request configured for DC API usage.
|
|
303
|
+
* Returns a session with the signed request object needed for DC API.
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
* const session = await client.createDcApiPresentationRequest({
|
|
308
|
+
* configId: 'age-over-18'
|
|
309
|
+
* });
|
|
310
|
+
*
|
|
311
|
+
* // Use the requestObject with the DC API
|
|
312
|
+
* const result = await client.submitDcApiPresentation(session);
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
createDcApiPresentationRequest(options: Omit<PresentationRequestOptions, 'responseType'>): Promise<Session>;
|
|
316
|
+
/**
|
|
317
|
+
* Submit a presentation using the Digital Credentials API.
|
|
318
|
+
* This method handles the browser DC API call and submits the response to the verifier.
|
|
319
|
+
*
|
|
320
|
+
* @example
|
|
321
|
+
* ```typescript
|
|
322
|
+
* // Check if DC API is available
|
|
323
|
+
* if (!isDcApiAvailable()) {
|
|
324
|
+
* throw new Error('DC API not supported in this browser');
|
|
325
|
+
* }
|
|
326
|
+
*
|
|
327
|
+
* const session = await client.createDcApiPresentationRequest({
|
|
328
|
+
* configId: 'age-over-18'
|
|
329
|
+
* });
|
|
330
|
+
*
|
|
331
|
+
* const result = await client.submitDcApiPresentation(session);
|
|
332
|
+
* console.log('Verified credentials:', result.credentials);
|
|
333
|
+
* ```
|
|
334
|
+
*/
|
|
335
|
+
submitDcApiPresentation(session: Session, options?: DcApiPresentationOptions): Promise<DcApiPresentationResult>;
|
|
336
|
+
/**
|
|
337
|
+
* Convenience method to create a presentation request and immediately
|
|
338
|
+
* submit it using the Digital Credentials API.
|
|
339
|
+
*
|
|
340
|
+
* @example
|
|
341
|
+
* ```typescript
|
|
342
|
+
* const result = await client.verifyWithDcApi({
|
|
343
|
+
* configId: 'age-over-18'
|
|
344
|
+
* });
|
|
345
|
+
* console.log('Verified:', result.credentials);
|
|
346
|
+
* ```
|
|
347
|
+
*/
|
|
348
|
+
verifyWithDcApi(options: Omit<PresentationRequestOptions, 'responseType'>, dcOptions?: DcApiPresentationOptions): Promise<DcApiPresentationResult>;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Credentials for EUDIPLO authentication
|
|
352
|
+
*/
|
|
353
|
+
interface EudiploCredentials {
|
|
354
|
+
baseUrl: string;
|
|
355
|
+
clientId: string;
|
|
356
|
+
clientSecret: string;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Options for the verify function
|
|
360
|
+
*/
|
|
361
|
+
interface VerifyOptions extends EudiploCredentials {
|
|
362
|
+
/** Presentation configuration ID */
|
|
363
|
+
configId: string;
|
|
364
|
+
/** Optional redirect URI */
|
|
365
|
+
redirectUri?: string;
|
|
366
|
+
/** Polling options */
|
|
367
|
+
polling?: SessionPollingOptions;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Options for the issue function
|
|
371
|
+
*/
|
|
372
|
+
interface IssueOptions extends EudiploCredentials {
|
|
373
|
+
/** Credential configuration IDs */
|
|
374
|
+
credentialConfigurationIds: string[];
|
|
375
|
+
/** Claims per credential config */
|
|
376
|
+
claims?: Record<string, Record<string, unknown>>;
|
|
377
|
+
/** Transaction code (optional) */
|
|
378
|
+
txCode?: string;
|
|
379
|
+
/** Polling options */
|
|
380
|
+
polling?: SessionPollingOptions;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Result of a verification or issuance flow
|
|
384
|
+
*/
|
|
385
|
+
interface FlowResult {
|
|
386
|
+
/** URI for QR code */
|
|
387
|
+
uri: string;
|
|
388
|
+
/** Session ID */
|
|
389
|
+
sessionId: string;
|
|
390
|
+
/** Wait for the session to complete */
|
|
391
|
+
waitForCompletion: (options?: SessionPollingOptions) => Promise<Session>;
|
|
392
|
+
/** Get current session status */
|
|
393
|
+
getStatus: () => Promise<Session>;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Create a presentation request for verification.
|
|
397
|
+
* Returns a URI for QR code and a function to wait for completion.
|
|
398
|
+
*
|
|
399
|
+
* @example
|
|
400
|
+
* ```typescript
|
|
401
|
+
* import { verify } from '@eudiplo/sdk-core';
|
|
402
|
+
*
|
|
403
|
+
* const { uri, waitForCompletion } = await verify({
|
|
404
|
+
* baseUrl: 'https://eudiplo.example.com',
|
|
405
|
+
* clientId: 'demo',
|
|
406
|
+
* clientSecret: 'secret',
|
|
407
|
+
* configId: 'age-over-18'
|
|
408
|
+
* });
|
|
409
|
+
*
|
|
410
|
+
* console.log('Scan this:', uri);
|
|
411
|
+
* const session = await waitForCompletion();
|
|
412
|
+
* console.log('Verified!', session.credentials);
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
declare function verify(options: VerifyOptions): Promise<FlowResult>;
|
|
416
|
+
/**
|
|
417
|
+
* Create a credential issuance offer.
|
|
418
|
+
* Returns a URI for QR code and a function to wait for completion.
|
|
419
|
+
*
|
|
420
|
+
* @example
|
|
421
|
+
* ```typescript
|
|
422
|
+
* import { issue } from '@eudiplo/sdk-core';
|
|
423
|
+
*
|
|
424
|
+
* const { uri, waitForCompletion } = await issue({
|
|
425
|
+
* baseUrl: 'https://eudiplo.example.com',
|
|
426
|
+
* clientId: 'demo',
|
|
427
|
+
* clientSecret: 'secret',
|
|
428
|
+
* credentialConfigurationIds: ['PID'],
|
|
429
|
+
* claims: {
|
|
430
|
+
* PID: { given_name: 'John', family_name: 'Doe' }
|
|
431
|
+
* }
|
|
432
|
+
* });
|
|
433
|
+
*
|
|
434
|
+
* console.log('Scan this:', uri);
|
|
435
|
+
* const session = await waitForCompletion();
|
|
436
|
+
* ```
|
|
437
|
+
*/
|
|
438
|
+
declare function issue(options: IssueOptions): Promise<FlowResult>;
|
|
439
|
+
/**
|
|
440
|
+
* One-liner: Verify and wait for result in a single call.
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* ```typescript
|
|
444
|
+
* import { verifyAndWait } from '@eudiplo/sdk-core';
|
|
445
|
+
*
|
|
446
|
+
* const session = await verifyAndWait({
|
|
447
|
+
* baseUrl: 'https://eudiplo.example.com',
|
|
448
|
+
* clientId: 'demo',
|
|
449
|
+
* clientSecret: 'secret',
|
|
450
|
+
* configId: 'age-over-18',
|
|
451
|
+
* onUri: (uri) => showQRCode(uri),
|
|
452
|
+
* onUpdate: (s) => console.log('Status:', s.status)
|
|
453
|
+
* });
|
|
454
|
+
* ```
|
|
455
|
+
*/
|
|
456
|
+
declare function verifyAndWait(options: VerifyOptions & {
|
|
457
|
+
/** Called with the URI when available - use to display QR code */
|
|
458
|
+
onUri: (uri: string) => void;
|
|
459
|
+
}): Promise<Session>;
|
|
460
|
+
/**
|
|
461
|
+
* One-liner: Issue credential and wait for completion in a single call.
|
|
462
|
+
*
|
|
463
|
+
* @example
|
|
464
|
+
* ```typescript
|
|
465
|
+
* import { issueAndWait } from '@eudiplo/sdk-core';
|
|
466
|
+
*
|
|
467
|
+
* const session = await issueAndWait({
|
|
468
|
+
* baseUrl: 'https://eudiplo.example.com',
|
|
469
|
+
* clientId: 'demo',
|
|
470
|
+
* clientSecret: 'secret',
|
|
471
|
+
* credentialConfigurationIds: ['PID'],
|
|
472
|
+
* claims: { PID: { given_name: 'John' } },
|
|
473
|
+
* onUri: (uri) => showQRCode(uri)
|
|
474
|
+
* });
|
|
475
|
+
* ```
|
|
476
|
+
*/
|
|
477
|
+
declare function issueAndWait(options: IssueOptions & {
|
|
478
|
+
/** Called with the URI when available - use to display QR code */
|
|
479
|
+
onUri: (uri: string) => void;
|
|
480
|
+
}): Promise<Session>;
|
|
481
|
+
/**
|
|
482
|
+
* Options for DC API verification
|
|
483
|
+
*/
|
|
484
|
+
interface DcApiVerifyOptions extends EudiploCredentials {
|
|
485
|
+
/** Presentation configuration ID */
|
|
486
|
+
configId: string;
|
|
487
|
+
/** Optional redirect URI */
|
|
488
|
+
redirectUri?: string;
|
|
489
|
+
/** Whether to return full credential data (default: true) */
|
|
490
|
+
sendResponse?: boolean;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Verify a credential using the Digital Credentials API (browser-native flow).
|
|
494
|
+
* This is the simplest way to verify credentials when the DC API is available.
|
|
495
|
+
*
|
|
496
|
+
* @example
|
|
497
|
+
* ```typescript
|
|
498
|
+
* import { verifyWithDcApi, isDcApiAvailable } from '@eudiplo/sdk-core';
|
|
499
|
+
*
|
|
500
|
+
* if (isDcApiAvailable()) {
|
|
501
|
+
* const result = await verifyWithDcApi({
|
|
502
|
+
* baseUrl: 'https://eudiplo.example.com',
|
|
503
|
+
* clientId: 'demo',
|
|
504
|
+
* clientSecret: 'secret',
|
|
505
|
+
* configId: 'age-over-18'
|
|
506
|
+
* });
|
|
507
|
+
* console.log('Verified!', result.credentials);
|
|
508
|
+
* } else {
|
|
509
|
+
* // Fall back to QR code flow
|
|
510
|
+
* const { uri } = await verify({ ... });
|
|
511
|
+
* }
|
|
512
|
+
* ```
|
|
513
|
+
*/
|
|
514
|
+
declare function verifyWithDcApi(options: DcApiVerifyOptions): Promise<DcApiPresentationResult>;
|
|
515
|
+
/**
|
|
516
|
+
* Create a presentation request for DC API and get the session.
|
|
517
|
+
* Use this when you need more control over the DC API flow.
|
|
518
|
+
*
|
|
519
|
+
* @example
|
|
520
|
+
* ```typescript
|
|
521
|
+
* import { createDcApiRequest, submitDcApiPresentation, isDcApiAvailable } from '@eudiplo/sdk-core';
|
|
522
|
+
*
|
|
523
|
+
* if (isDcApiAvailable()) {
|
|
524
|
+
* const { session, submit } = await createDcApiRequest({
|
|
525
|
+
* baseUrl: 'https://eudiplo.example.com',
|
|
526
|
+
* clientId: 'demo',
|
|
527
|
+
* clientSecret: 'secret',
|
|
528
|
+
* configId: 'age-over-18'
|
|
529
|
+
* });
|
|
530
|
+
*
|
|
531
|
+
* // Show some UI, then submit when user is ready
|
|
532
|
+
* const result = await submit();
|
|
533
|
+
* console.log('Verified!', result.credentials);
|
|
534
|
+
* }
|
|
535
|
+
* ```
|
|
536
|
+
*/
|
|
537
|
+
declare function createDcApiRequest(options: DcApiVerifyOptions): Promise<{
|
|
538
|
+
session: Session;
|
|
539
|
+
submit: (dcOptions?: DcApiPresentationOptions) => Promise<DcApiPresentationResult>;
|
|
540
|
+
}>;
|
|
541
|
+
/**
|
|
542
|
+
* Data returned from server to browser for DC API flow
|
|
543
|
+
*/
|
|
544
|
+
interface DcApiRequestData {
|
|
545
|
+
/** The signed JWT request object to pass to the DC API */
|
|
546
|
+
requestObject: string;
|
|
547
|
+
/** Session ID for tracking */
|
|
548
|
+
sessionId: string;
|
|
549
|
+
/** The response_uri where wallet responses should be submitted */
|
|
550
|
+
responseUri: string;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Wallet response data from the DC API to send back to server
|
|
554
|
+
*/
|
|
555
|
+
interface DcApiWalletResponse {
|
|
556
|
+
/** The encrypted VP token response from the wallet */
|
|
557
|
+
response?: string;
|
|
558
|
+
/** Error code if the wallet returned an error */
|
|
559
|
+
error?: string;
|
|
560
|
+
/** Error description if available */
|
|
561
|
+
error_description?: string;
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* SERVER-SIDE: Create a DC API request and return the data needed by the browser.
|
|
565
|
+
* Use this on your server where credentials are stored securely.
|
|
566
|
+
*
|
|
567
|
+
* @example
|
|
568
|
+
* ```typescript
|
|
569
|
+
* // On your server (e.g., Express/Next.js API route)
|
|
570
|
+
* import { createDcApiRequestForBrowser } from '@eudiplo/sdk-core';
|
|
571
|
+
*
|
|
572
|
+
* app.post('/api/start-verification', async (req, res) => {
|
|
573
|
+
* const requestData = await createDcApiRequestForBrowser({
|
|
574
|
+
* baseUrl: 'https://eudiplo.example.com',
|
|
575
|
+
* clientId: process.env.EUDIPLO_CLIENT_ID, // Safe on server
|
|
576
|
+
* clientSecret: process.env.EUDIPLO_SECRET, // Safe on server
|
|
577
|
+
* configId: 'age-over-18',
|
|
578
|
+
* });
|
|
579
|
+
*
|
|
580
|
+
* // Send only the safe data to the browser
|
|
581
|
+
* res.json(requestData);
|
|
582
|
+
* });
|
|
583
|
+
* ```
|
|
584
|
+
*/
|
|
585
|
+
declare function createDcApiRequestForBrowser(options: DcApiVerifyOptions): Promise<DcApiRequestData>;
|
|
586
|
+
/**
|
|
587
|
+
* BROWSER-SIDE: Call the Digital Credentials API with a request from your server.
|
|
588
|
+
* This function runs in the browser and invokes the native DC API.
|
|
589
|
+
*
|
|
590
|
+
* @example
|
|
591
|
+
* ```typescript
|
|
592
|
+
* // In your browser code
|
|
593
|
+
* import { callDcApi, isDcApiAvailable } from '@eudiplo/sdk-core';
|
|
594
|
+
*
|
|
595
|
+
* // Get request data from your server
|
|
596
|
+
* const requestData = await fetch('/api/start-verification', { method: 'POST' })
|
|
597
|
+
* .then(r => r.json());
|
|
598
|
+
*
|
|
599
|
+
* if (isDcApiAvailable()) {
|
|
600
|
+
* // This calls the browser's native Digital Credentials API
|
|
601
|
+
* const walletResponse = await callDcApi(requestData.requestObject);
|
|
602
|
+
*
|
|
603
|
+
* // Send the wallet response back to your server for verification
|
|
604
|
+
* const result = await fetch('/api/complete-verification', {
|
|
605
|
+
* method: 'POST',
|
|
606
|
+
* headers: { 'Content-Type': 'application/json' },
|
|
607
|
+
* body: JSON.stringify({
|
|
608
|
+
* sessionId: requestData.sessionId,
|
|
609
|
+
* walletResponse,
|
|
610
|
+
* }),
|
|
611
|
+
* }).then(r => r.json());
|
|
612
|
+
* }
|
|
613
|
+
* ```
|
|
614
|
+
*/
|
|
615
|
+
declare function callDcApi(requestObject: string): Promise<DcApiWalletResponse>;
|
|
616
|
+
/**
|
|
617
|
+
* SERVER-SIDE: Submit the wallet response to EUDIPLO and get verified credentials.
|
|
618
|
+
* Use this on your server after receiving the wallet response from the browser.
|
|
619
|
+
*
|
|
620
|
+
* @example
|
|
621
|
+
* ```typescript
|
|
622
|
+
* // On your server
|
|
623
|
+
* import { submitDcApiWalletResponse } from '@eudiplo/sdk-core';
|
|
624
|
+
*
|
|
625
|
+
* app.post('/api/complete-verification', async (req, res) => {
|
|
626
|
+
* const { sessionId, walletResponse } = req.body;
|
|
627
|
+
*
|
|
628
|
+
* // You stored the responseUri when creating the request, or pass it from client
|
|
629
|
+
* const result = await submitDcApiWalletResponse({
|
|
630
|
+
* responseUri: storedResponseUri, // or from request
|
|
631
|
+
* walletResponse,
|
|
632
|
+
* sendResponse: true, // Get verified claims back
|
|
633
|
+
* });
|
|
634
|
+
*
|
|
635
|
+
* // result.credentials contains the verified data
|
|
636
|
+
* res.json(result);
|
|
637
|
+
* });
|
|
638
|
+
* ```
|
|
639
|
+
*/
|
|
640
|
+
declare function submitDcApiWalletResponse(options: {
|
|
641
|
+
/** The response_uri from the request (from DcApiRequestData.responseUri) */
|
|
642
|
+
responseUri: string;
|
|
643
|
+
/** The wallet response from callDcApi() */
|
|
644
|
+
walletResponse: DcApiWalletResponse;
|
|
645
|
+
/** Whether to return full credential data (default: true) */
|
|
646
|
+
sendResponse?: boolean;
|
|
647
|
+
/** Custom fetch implementation (optional) */
|
|
648
|
+
fetch?: typeof fetch;
|
|
649
|
+
}): Promise<DcApiPresentationResult>;
|
|
650
|
+
|
|
651
|
+
export { type DcApiPresentationOptions, type DcApiPresentationResult, type DcApiRequestData, type DcApiVerifyOptions, type DcApiWalletResponse, type DigitalCredentialResponse, EudiploClient, type EudiploClientConfig, type EudiploCredentials, type FlowResult, HealthControllerCheckError, HealthControllerCheckResponse, type IssuanceOfferOptions, type IssueOptions, type OfferResult, type PresentationRequestOptions, Session, type SessionPollingOptions, type SessionStatusEvent, type SessionSubscription, type SessionSubscriptionOptions, type VerifyOptions, callDcApi, createDcApiRequest, createDcApiRequestForBrowser, isDcApiAvailable, issue, issueAndWait, submitDcApiWalletResponse, verify, verifyAndWait, verifyWithDcApi };
|