@eudiplo/sdk-core 5.1.0 → 6.0.0-main.a2a87ad
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/dist/api/client/client.gen.d.mts +1 -1
- package/dist/api/client/client.gen.d.ts +1 -1
- package/dist/api/client/index.d.mts +2 -2
- package/dist/api/client/index.d.ts +2 -2
- package/dist/api/client/index.js +13 -5
- package/dist/api/client/index.mjs +13 -5
- package/dist/api/client/types.gen.d.mts +1 -1
- package/dist/api/client/types.gen.d.ts +1 -1
- package/dist/api/client.gen.d.mts +2 -2
- package/dist/api/client.gen.d.ts +2 -2
- package/dist/api/index.d.mts +72 -14
- package/dist/api/index.d.ts +72 -14
- package/dist/api/index.js +67 -6
- package/dist/api/index.mjs +58 -6
- package/dist/index.d.mts +9 -5
- package/dist/index.d.ts +9 -5
- package/dist/index.js +136 -14
- package/dist/index.mjs +126 -14
- package/dist/{types.gen-CdvErMyl.d.mts → types.gen-Cg-nB7uf.d.mts} +904 -193
- package/dist/{types.gen-CdvErMyl.d.ts → types.gen-Cg-nB7uf.d.ts} +904 -193
- package/dist/{types.gen-zNuA7BkO.d.mts → types.gen-DZ4ax15r.d.mts} +1 -1
- package/dist/{types.gen-zNuA7BkO.d.ts → types.gen-DZ4ax15r.d.ts} +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1083,6 +1083,15 @@ var credentialConfigControllerUpdateCredentialConfiguration = (options) => (opti
|
|
|
1083
1083
|
...options.headers
|
|
1084
1084
|
}
|
|
1085
1085
|
});
|
|
1086
|
+
var schemaMetadataControllerPublishSchemaMetadata = (options) => (options.client ?? client).post({
|
|
1087
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1088
|
+
url: "/api/schema-metadata/publish",
|
|
1089
|
+
...options,
|
|
1090
|
+
headers: {
|
|
1091
|
+
"Content-Type": "application/json",
|
|
1092
|
+
...options.headers
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1086
1095
|
var schemaMetadataControllerSignSchemaMetaConfig = (options) => (options.client ?? client).post({
|
|
1087
1096
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1088
1097
|
url: "/api/schema-metadata/sign",
|
|
@@ -1092,6 +1101,15 @@ var schemaMetadataControllerSignSchemaMetaConfig = (options) => (options.client
|
|
|
1092
1101
|
...options.headers
|
|
1093
1102
|
}
|
|
1094
1103
|
});
|
|
1104
|
+
var schemaMetadataControllerPublishSchemaMetadataVersion = (options) => (options.client ?? client).post({
|
|
1105
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1106
|
+
url: "/api/schema-metadata/publish-version",
|
|
1107
|
+
...options,
|
|
1108
|
+
headers: {
|
|
1109
|
+
"Content-Type": "application/json",
|
|
1110
|
+
...options.headers
|
|
1111
|
+
}
|
|
1112
|
+
});
|
|
1095
1113
|
var schemaMetadataControllerSignVersionSchemaMetaConfig = (options) => (options.client ?? client).post({
|
|
1096
1114
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1097
1115
|
url: "/api/schema-metadata/sign-version",
|
|
@@ -1150,11 +1168,6 @@ var schemaMetadataControllerGetJwt = (options) => (options.client ?? client).get
|
|
|
1150
1168
|
url: "/api/schema-metadata/{id}/versions/{version}/jwt",
|
|
1151
1169
|
...options
|
|
1152
1170
|
});
|
|
1153
|
-
var schemaMetadataControllerExport = (options) => (options.client ?? client).get({
|
|
1154
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
1155
|
-
url: "/api/schema-metadata/{id}/versions/{version}/export",
|
|
1156
|
-
...options
|
|
1157
|
-
});
|
|
1158
1171
|
var schemaMetadataControllerGetSchema = (options) => (options.client ?? client).get({
|
|
1159
1172
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1160
1173
|
url: "/api/schema-metadata/{id}/versions/{version}/schemas/{format}",
|
|
@@ -1335,6 +1348,15 @@ var presentationManagementControllerResolveSchemaMetadata = (options) => (option
|
|
|
1335
1348
|
...options.headers
|
|
1336
1349
|
}
|
|
1337
1350
|
});
|
|
1351
|
+
var presentationManagementControllerResolveSchemaMetadataJwt = (options) => (options.client ?? client).post({
|
|
1352
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1353
|
+
url: "/api/verifier/config/schema-metadata/resolve-jwt",
|
|
1354
|
+
...options,
|
|
1355
|
+
headers: {
|
|
1356
|
+
"Content-Type": "application/json",
|
|
1357
|
+
...options.headers
|
|
1358
|
+
}
|
|
1359
|
+
});
|
|
1338
1360
|
var presentationManagementControllerListSchemaMetadataCatalog = (options) => (options?.client ?? client).get({
|
|
1339
1361
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1340
1362
|
url: "/api/verifier/config/schema-metadata/catalog",
|
|
@@ -1428,6 +1450,17 @@ var deferredControllerFailDeferred = (options) => (options.client ?? client).pos
|
|
|
1428
1450
|
...options.headers
|
|
1429
1451
|
}
|
|
1430
1452
|
});
|
|
1453
|
+
var chainedAsVpControllerPar = (options) => (options.client ?? client).post({ url: "/api/issuers/{tenantId}/chained-as-vp/par", ...options });
|
|
1454
|
+
var chainedAsVpControllerAuthorize = (options) => (options.client ?? client).get({ url: "/api/issuers/{tenantId}/chained-as-vp/authorize", ...options });
|
|
1455
|
+
var chainedAsVpControllerVpCallback = (options) => (options.client ?? client).get({ url: "/api/issuers/{tenantId}/chained-as-vp/vp-callback", ...options });
|
|
1456
|
+
var chainedAsVpControllerToken = (options) => (options.client ?? client).post({
|
|
1457
|
+
url: "/api/issuers/{tenantId}/chained-as-vp/token",
|
|
1458
|
+
...options,
|
|
1459
|
+
headers: {
|
|
1460
|
+
"Content-Type": "application/json",
|
|
1461
|
+
...options.headers
|
|
1462
|
+
}
|
|
1463
|
+
});
|
|
1431
1464
|
var keyChainControllerGetProviders = (options) => (options?.client ?? client).get({
|
|
1432
1465
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1433
1466
|
url: "/api/key-chain/providers",
|
|
@@ -1438,6 +1471,25 @@ var keyChainControllerGetProvidersHealth = (options) => (options?.client ?? clie
|
|
|
1438
1471
|
url: "/api/key-chain/providers/health",
|
|
1439
1472
|
...options
|
|
1440
1473
|
});
|
|
1474
|
+
var keyChainControllerDeleteTenantKmsConfig = (options) => (options?.client ?? client).delete({
|
|
1475
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1476
|
+
url: "/api/key-chain/providers/config",
|
|
1477
|
+
...options
|
|
1478
|
+
});
|
|
1479
|
+
var keyChainControllerGetTenantKmsConfig = (options) => (options?.client ?? client).get({
|
|
1480
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1481
|
+
url: "/api/key-chain/providers/config",
|
|
1482
|
+
...options
|
|
1483
|
+
});
|
|
1484
|
+
var keyChainControllerUpdateTenantKmsConfig = (options) => (options.client ?? client).put({
|
|
1485
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1486
|
+
url: "/api/key-chain/providers/config",
|
|
1487
|
+
...options,
|
|
1488
|
+
headers: {
|
|
1489
|
+
"Content-Type": "application/json",
|
|
1490
|
+
...options.headers
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1441
1493
|
var keyChainControllerGetAll = (options) => (options?.client ?? client).get({
|
|
1442
1494
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1443
1495
|
url: "/api/key-chain",
|
|
@@ -1632,7 +1684,8 @@ var EudiploClient = class {
|
|
|
1632
1684
|
response_type: options.responseType ?? "uri",
|
|
1633
1685
|
credentialConfigurationIds: options.credentialConfigurationIds,
|
|
1634
1686
|
flow: options.flow ?? "pre_authorized_code",
|
|
1635
|
-
tx_code: options.txCode
|
|
1687
|
+
tx_code: options.txCode,
|
|
1688
|
+
authorization_server: options.authorizationServer
|
|
1636
1689
|
};
|
|
1637
1690
|
if (options.claims) {
|
|
1638
1691
|
const credentialClaims = {};
|
|
@@ -2054,6 +2107,40 @@ async function submitDcApiResponse(options) {
|
|
|
2054
2107
|
|
|
2055
2108
|
// src/config/derive.ts
|
|
2056
2109
|
var JSON_SCHEMA_DRAFT_2020_12 = "https://json-schema.org/draft/2020-12/schema";
|
|
2110
|
+
function resolveChildPath(parentPath, parentType, childPath) {
|
|
2111
|
+
if (childPath.length >= parentPath.length) {
|
|
2112
|
+
const startsWithParent = parentPath.every((seg, i) => seg === childPath[i]);
|
|
2113
|
+
if (startsWithParent) {
|
|
2114
|
+
return childPath;
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
if (parentType === "array" && childPath.length > 0) {
|
|
2118
|
+
if (childPath[0] === null) {
|
|
2119
|
+
throw new Error(
|
|
2120
|
+
"Relative child paths under array parents must not start with null. Use ['field'] instead of [null, 'field']."
|
|
2121
|
+
);
|
|
2122
|
+
}
|
|
2123
|
+
if (typeof childPath[0] !== "number") {
|
|
2124
|
+
return [...parentPath, null, ...childPath];
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
return [...parentPath, ...childPath];
|
|
2128
|
+
}
|
|
2129
|
+
function flattenFields(fields) {
|
|
2130
|
+
const result = [];
|
|
2131
|
+
for (const field of fields) {
|
|
2132
|
+
const { children, ...fieldWithoutChildren } = field;
|
|
2133
|
+
result.push(fieldWithoutChildren);
|
|
2134
|
+
if (children && children.length > 0) {
|
|
2135
|
+
const resolvedChildren = children.map((child) => ({
|
|
2136
|
+
...child,
|
|
2137
|
+
path: resolveChildPath(field.path, field.type, child.path)
|
|
2138
|
+
}));
|
|
2139
|
+
result.push(...flattenFields(resolvedChildren));
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
return result;
|
|
2143
|
+
}
|
|
2057
2144
|
function segmentToKey(segment) {
|
|
2058
2145
|
if (segment === null) {
|
|
2059
2146
|
return "*";
|
|
@@ -2124,9 +2211,25 @@ function mergeLeafSchema(existing, next) {
|
|
|
2124
2211
|
}
|
|
2125
2212
|
return merged;
|
|
2126
2213
|
}
|
|
2214
|
+
function isArrayPathSegment(segment) {
|
|
2215
|
+
return typeof segment === "number" || segment === null;
|
|
2216
|
+
}
|
|
2127
2217
|
function ensureSchemaNode(root, path) {
|
|
2128
2218
|
let cursor = root;
|
|
2129
2219
|
for (const segment of path) {
|
|
2220
|
+
if (isArrayPathSegment(segment)) {
|
|
2221
|
+
if (cursor.type !== "array") {
|
|
2222
|
+
cursor.type = "array";
|
|
2223
|
+
}
|
|
2224
|
+
if (!cursor.items || typeof cursor.items !== "object" || Array.isArray(cursor.items)) {
|
|
2225
|
+
cursor.items = {
|
|
2226
|
+
type: "object",
|
|
2227
|
+
properties: {}
|
|
2228
|
+
};
|
|
2229
|
+
}
|
|
2230
|
+
cursor = cursor.items;
|
|
2231
|
+
continue;
|
|
2232
|
+
}
|
|
2130
2233
|
const key = segmentToKey(segment);
|
|
2131
2234
|
cursor.properties ??= {};
|
|
2132
2235
|
if (!cursor.properties[key]) {
|
|
@@ -2153,7 +2256,7 @@ function ensureFrameNode(root, path) {
|
|
|
2153
2256
|
}
|
|
2154
2257
|
function buildClaims(fields) {
|
|
2155
2258
|
const claims = {};
|
|
2156
|
-
for (const field of fields) {
|
|
2259
|
+
for (const field of flattenFields(fields)) {
|
|
2157
2260
|
if (!Object.prototype.hasOwnProperty.call(field, "defaultValue")) {
|
|
2158
2261
|
continue;
|
|
2159
2262
|
}
|
|
@@ -2164,7 +2267,7 @@ function buildClaims(fields) {
|
|
|
2164
2267
|
function buildDisclosureFrame(fields) {
|
|
2165
2268
|
const frame = {};
|
|
2166
2269
|
let hasDisclosure = false;
|
|
2167
|
-
for (const field of fields) {
|
|
2270
|
+
for (const field of flattenFields(fields)) {
|
|
2168
2271
|
if (!field.disclosable || field.path.length === 0) {
|
|
2169
2272
|
continue;
|
|
2170
2273
|
}
|
|
@@ -2181,7 +2284,7 @@ function buildDisclosureFrame(fields) {
|
|
|
2181
2284
|
return hasDisclosure ? frame : void 0;
|
|
2182
2285
|
}
|
|
2183
2286
|
function buildClaimsMetadata(fields) {
|
|
2184
|
-
return fields.filter((field) => field.path.length > 0).map((field) => {
|
|
2287
|
+
return flattenFields(fields).filter((field) => field.path.length > 0).map((field) => {
|
|
2185
2288
|
const metadata = {
|
|
2186
2289
|
path: field.path
|
|
2187
2290
|
};
|
|
@@ -2219,14 +2322,23 @@ function buildJsonSchema(fields) {
|
|
|
2219
2322
|
type: "object",
|
|
2220
2323
|
properties: {}
|
|
2221
2324
|
};
|
|
2222
|
-
for (const field of fields) {
|
|
2325
|
+
for (const field of flattenFields(fields)) {
|
|
2223
2326
|
if (field.path.length === 0) {
|
|
2224
2327
|
continue;
|
|
2225
2328
|
}
|
|
2226
2329
|
const parent = ensureSchemaNode(root, field.path.slice(0, -1));
|
|
2227
|
-
const
|
|
2228
|
-
parent.properties ??= {};
|
|
2330
|
+
const leafSegment = field.path.at(-1);
|
|
2229
2331
|
const leafSchema = buildLeafSchema(field);
|
|
2332
|
+
if (isArrayPathSegment(leafSegment ?? null)) {
|
|
2333
|
+
if (parent.type !== "array") {
|
|
2334
|
+
parent.type = "array";
|
|
2335
|
+
}
|
|
2336
|
+
const existingItems = parent.items && typeof parent.items === "object" && !Array.isArray(parent.items) ? parent.items : void 0;
|
|
2337
|
+
parent.items = existingItems ? mergeLeafSchema(existingItems, leafSchema) : leafSchema;
|
|
2338
|
+
continue;
|
|
2339
|
+
}
|
|
2340
|
+
const leafKey = segmentToKey(leafSegment ?? "");
|
|
2341
|
+
parent.properties ??= {};
|
|
2230
2342
|
const existing = parent.properties[leafKey];
|
|
2231
2343
|
parent.properties[leafKey] = existing && typeof existing === "object" && !Array.isArray(existing) ? mergeLeafSchema(existing, leafSchema) : leafSchema;
|
|
2232
2344
|
if (field.mandatory) {
|
|
@@ -2237,7 +2349,7 @@ function buildJsonSchema(fields) {
|
|
|
2237
2349
|
}
|
|
2238
2350
|
function buildClaimsByNamespace(fields) {
|
|
2239
2351
|
const byNamespace = {};
|
|
2240
|
-
for (const field of fields) {
|
|
2352
|
+
for (const field of flattenFields(fields)) {
|
|
2241
2353
|
if (!field.namespace || !Object.prototype.hasOwnProperty.call(field, "defaultValue")) {
|
|
2242
2354
|
continue;
|
|
2243
2355
|
}
|
|
@@ -2260,6 +2372,6 @@ function deriveRuntimeArtifacts(fields) {
|
|
|
2260
2372
|
};
|
|
2261
2373
|
}
|
|
2262
2374
|
|
|
2263
|
-
export { EudiploClient, appControllerGetFrontendConfig, appControllerGetVersion, attributeProviderControllerCreate, attributeProviderControllerDelete, attributeProviderControllerGetAll, attributeProviderControllerGetById, attributeProviderControllerUpdate, auditLogControllerGetAuditLogs, authControllerGetOAuth2Token, buildClaims, buildClaimsByNamespace, buildClaimsMetadata, buildDisclosureFrame, buildJsonSchema, cacheControllerClearAllCaches, cacheControllerClearStatusListCache, cacheControllerClearTrustListCache, cacheControllerGetStats, client, clientControllerCreateClient, clientControllerDeleteClient, clientControllerGetClient, clientControllerGetClientSecret, clientControllerGetClients, clientControllerRotateClientSecret, clientControllerUpdateClient, credentialConfigControllerDeleteIssuanceConfiguration, credentialConfigControllerGetConfigById, credentialConfigControllerGetConfigs, credentialConfigControllerStoreCredentialConfiguration, credentialConfigControllerUpdateCredentialConfiguration, credentialOfferControllerGetOffer, deferredControllerCompleteDeferred, deferredControllerFailDeferred, deriveRuntimeArtifacts, isDcApiAvailable, issuanceConfigControllerGetIssuanceConfigurations, issuanceConfigControllerStoreIssuanceConfiguration, keyChainControllerCreate, keyChainControllerDelete, keyChainControllerExport, keyChainControllerGetAll, keyChainControllerGetById, keyChainControllerGetProviders, keyChainControllerGetProvidersHealth, keyChainControllerImport, keyChainControllerRotate, keyChainControllerUpdate, presentationManagementControllerConfiguration, presentationManagementControllerDeleteConfiguration, presentationManagementControllerGetConfiguration, presentationManagementControllerListSchemaMetadataCatalog, presentationManagementControllerReissueRegistrationCertificate, presentationManagementControllerResolveIssuerMetadata, presentationManagementControllerResolveSchemaMetadata, presentationManagementControllerStorePresentationConfig, presentationManagementControllerUpdateConfiguration, registrarControllerCreateAccessCertificate, registrarControllerCreateConfig, registrarControllerDeleteConfig, registrarControllerGetConfig, registrarControllerUpdateConfig, schemaMetadataControllerDeprecateVersion,
|
|
2375
|
+
export { EudiploClient, appControllerGetFrontendConfig, appControllerGetVersion, attributeProviderControllerCreate, attributeProviderControllerDelete, attributeProviderControllerGetAll, attributeProviderControllerGetById, attributeProviderControllerUpdate, auditLogControllerGetAuditLogs, authControllerGetOAuth2Token, buildClaims, buildClaimsByNamespace, buildClaimsMetadata, buildDisclosureFrame, buildJsonSchema, cacheControllerClearAllCaches, cacheControllerClearStatusListCache, cacheControllerClearTrustListCache, cacheControllerGetStats, chainedAsVpControllerAuthorize, chainedAsVpControllerPar, chainedAsVpControllerToken, chainedAsVpControllerVpCallback, client, clientControllerCreateClient, clientControllerDeleteClient, clientControllerGetClient, clientControllerGetClientSecret, clientControllerGetClients, clientControllerRotateClientSecret, clientControllerUpdateClient, credentialConfigControllerDeleteIssuanceConfiguration, credentialConfigControllerGetConfigById, credentialConfigControllerGetConfigs, credentialConfigControllerStoreCredentialConfiguration, credentialConfigControllerUpdateCredentialConfiguration, credentialOfferControllerGetOffer, deferredControllerCompleteDeferred, deferredControllerFailDeferred, deriveRuntimeArtifacts, flattenFields, isDcApiAvailable, issuanceConfigControllerGetIssuanceConfigurations, issuanceConfigControllerStoreIssuanceConfiguration, keyChainControllerCreate, keyChainControllerDelete, keyChainControllerDeleteTenantKmsConfig, keyChainControllerExport, keyChainControllerGetAll, keyChainControllerGetById, keyChainControllerGetProviders, keyChainControllerGetProvidersHealth, keyChainControllerGetTenantKmsConfig, keyChainControllerImport, keyChainControllerRotate, keyChainControllerUpdate, keyChainControllerUpdateTenantKmsConfig, presentationManagementControllerConfiguration, presentationManagementControllerDeleteConfiguration, presentationManagementControllerGetConfiguration, presentationManagementControllerListSchemaMetadataCatalog, presentationManagementControllerReissueRegistrationCertificate, presentationManagementControllerResolveIssuerMetadata, presentationManagementControllerResolveSchemaMetadata, presentationManagementControllerResolveSchemaMetadataJwt, presentationManagementControllerStorePresentationConfig, presentationManagementControllerUpdateConfiguration, registrarControllerCreateAccessCertificate, registrarControllerCreateConfig, registrarControllerDeleteConfig, registrarControllerGetConfig, registrarControllerUpdateConfig, schemaMetadataControllerDeprecateVersion, schemaMetadataControllerFindAll, schemaMetadataControllerFindOne, schemaMetadataControllerGetJwt, schemaMetadataControllerGetLatest, schemaMetadataControllerGetMine, schemaMetadataControllerGetSchema, schemaMetadataControllerGetVersions, schemaMetadataControllerGetVocabularies, schemaMetadataControllerPublishSchemaMetadata, schemaMetadataControllerPublishSchemaMetadataVersion, schemaMetadataControllerRemove, schemaMetadataControllerSignSchemaMetaConfig, schemaMetadataControllerSignVersionSchemaMetaConfig, schemaMetadataControllerUpdate, sessionConfigControllerGetConfig, sessionConfigControllerResetConfig, sessionConfigControllerUpdateConfig, sessionControllerDeleteSession, sessionControllerGetAllSessions, sessionControllerGetSession, sessionControllerGetSessionLogs, sessionControllerRevokeAll, sessionEventsControllerSubscribeToSessionEvents, statusListConfigControllerGetConfig, statusListConfigControllerResetConfig, statusListConfigControllerUpdateConfig, statusListManagementControllerCreateList, statusListManagementControllerDeleteList, statusListManagementControllerGetList, statusListManagementControllerGetLists, statusListManagementControllerUpdateList, storageControllerUpload, tenantControllerDeleteTenant, tenantControllerGetTenant, tenantControllerGetTenants, tenantControllerInitTenant, tenantControllerUpdateTenant, trustListControllerCreateTrustList, trustListControllerDeleteTrustList, trustListControllerExportTrustList, trustListControllerGetAllTrustLists, trustListControllerGetTrustList, trustListControllerGetTrustListVersion, trustListControllerGetTrustListVersions, trustListControllerUpdateTrustList, userControllerCreateUser, userControllerDeleteUser, userControllerGetUser, userControllerGetUsers, userControllerUpdateUser, verifierOfferControllerGetOffer, webhookEndpointControllerCreate, webhookEndpointControllerDelete, webhookEndpointControllerGetAll, webhookEndpointControllerGetById, webhookEndpointControllerUpdate };
|
|
2264
2376
|
//# sourceMappingURL=index.mjs.map
|
|
2265
2377
|
//# sourceMappingURL=index.mjs.map
|